更新代码仓库相关功能,修改 API 参数,添加删除仓库功能,更新文档和测试用例

This commit is contained in:
xiongxiao
2026-01-16 03:46:14 +08:00
parent d85f42d38b
commit f10f588ea5
10 changed files with 208 additions and 45 deletions

View File

@@ -6,13 +6,16 @@ const config = useConfig()
export const token = useKey("CNB_TOKEN") as string || '';
export const cookie = useKey("CNB_COOKIE") as string || '';
console.log('token', token)
import { app } from '../agent/index.ts'
export { app }
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' });
// const worksaceList = await cnb.workspace.list({ status: 'running' });
console.log("worksaceList", showMore(worksaceList));
// console.log("worksaceList", showMore(worksaceList));
// const sn = 'cnb-o18-1jbklfuoh'