feat: 添加 Repo 和 User 模块,增强 CNBCore 功能

This commit is contained in:
2025-12-15 17:08:39 +08:00
parent 5e43eb2db7
commit 52ccf115fb
9 changed files with 390 additions and 32 deletions

View File

@@ -1,8 +1,14 @@
import { CNB } from "../src";
import dotenv from "dotenv";
import util from 'node:util';
dotenv.config();
export const cnb = new CNB(process.env.CNB_TOKEN || "");
export const token = process.env.CNB_TOKEN || "";
export const cookie = process.env.CNB_COOKIE || "";
console.log("Using CNB_TOKEN:", token.slice(0, 4) + "****", cookie);
export const cnb = new CNB({ token, cookie });
export const showMore = (obj: any) => {
return util.inspect(obj, { showHidden: false, depth: null, colors: true });
}
// const worksaceList = await cnb.workspace.list({ status: 'running' });
// console.log("worksaceList", worksaceList);