@kevisual/cnb 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/opencode.js +14 -12
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +14 -12
- package/package.json +1 -1
- package/src/index.ts +12 -10
- package/src/workspace/index.ts +3 -3
package/dist/opencode.js
CHANGED
|
@@ -22629,8 +22629,8 @@ class CNBCore {
|
|
|
22629
22629
|
|
|
22630
22630
|
// src/workspace/index.ts
|
|
22631
22631
|
class Workspace extends CNBCore {
|
|
22632
|
-
constructor(
|
|
22633
|
-
super(
|
|
22632
|
+
constructor(options) {
|
|
22633
|
+
super(options);
|
|
22634
22634
|
}
|
|
22635
22635
|
async deleteWorkspace(params) {
|
|
22636
22636
|
const data = {};
|
|
@@ -22994,21 +22994,23 @@ class CNB extends CNBCore {
|
|
|
22994
22994
|
mission;
|
|
22995
22995
|
ai;
|
|
22996
22996
|
constructor(options) {
|
|
22997
|
-
super({ token: options.token, cookie: options.cookie, cnb: options.cnb });
|
|
22997
|
+
super({ ...options, token: options.token, cookie: options.cookie, cnb: options.cnb });
|
|
22998
22998
|
this.init(options);
|
|
22999
22999
|
}
|
|
23000
23000
|
init(cnbOptions) {
|
|
23001
23001
|
const token = this.token;
|
|
23002
23002
|
const cookie = this.cookie;
|
|
23003
|
-
const
|
|
23004
|
-
|
|
23005
|
-
|
|
23006
|
-
this.
|
|
23007
|
-
this.
|
|
23008
|
-
this.
|
|
23009
|
-
this.
|
|
23010
|
-
this.
|
|
23011
|
-
this.
|
|
23003
|
+
const cors = cnbOptions?.cors || {};
|
|
23004
|
+
const cnb = cnbOptions?.cnb;
|
|
23005
|
+
const options = { token, cookie, cors, cnb };
|
|
23006
|
+
this.workspace = new Workspace(options);
|
|
23007
|
+
this.knowledgeBase = new KnowledgeBase(options);
|
|
23008
|
+
this.repo = new Repo(options);
|
|
23009
|
+
this.user = new User(options);
|
|
23010
|
+
this.build = new Build(options);
|
|
23011
|
+
this.issue = new Issue(options);
|
|
23012
|
+
this.mission = new Mission(options);
|
|
23013
|
+
this.ai = new AiBase(options);
|
|
23012
23014
|
}
|
|
23013
23015
|
setToken(token) {
|
|
23014
23016
|
this.token = token;
|
package/dist/routes.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ interface ListParams {
|
|
|
84
84
|
* https://api.cnb.cool/#/operations/GetWorkspaceDetail
|
|
85
85
|
*/
|
|
86
86
|
declare class Workspace extends CNBCore {
|
|
87
|
-
constructor(
|
|
87
|
+
constructor(options: CNBCoreOptions);
|
|
88
88
|
/**
|
|
89
89
|
* 删除我的云原生开发环境
|
|
90
90
|
* @param params 删除参数,pipelineId 和 sn 二选一,优先使用 pipelineId
|
package/dist/routes.js
CHANGED
|
@@ -22629,8 +22629,8 @@ class CNBCore {
|
|
|
22629
22629
|
|
|
22630
22630
|
// src/workspace/index.ts
|
|
22631
22631
|
class Workspace extends CNBCore {
|
|
22632
|
-
constructor(
|
|
22633
|
-
super(
|
|
22632
|
+
constructor(options) {
|
|
22633
|
+
super(options);
|
|
22634
22634
|
}
|
|
22635
22635
|
async deleteWorkspace(params) {
|
|
22636
22636
|
const data = {};
|
|
@@ -22994,21 +22994,23 @@ class CNB extends CNBCore {
|
|
|
22994
22994
|
mission;
|
|
22995
22995
|
ai;
|
|
22996
22996
|
constructor(options) {
|
|
22997
|
-
super({ token: options.token, cookie: options.cookie, cnb: options.cnb });
|
|
22997
|
+
super({ ...options, token: options.token, cookie: options.cookie, cnb: options.cnb });
|
|
22998
22998
|
this.init(options);
|
|
22999
22999
|
}
|
|
23000
23000
|
init(cnbOptions) {
|
|
23001
23001
|
const token = this.token;
|
|
23002
23002
|
const cookie = this.cookie;
|
|
23003
|
-
const
|
|
23004
|
-
|
|
23005
|
-
|
|
23006
|
-
this.
|
|
23007
|
-
this.
|
|
23008
|
-
this.
|
|
23009
|
-
this.
|
|
23010
|
-
this.
|
|
23011
|
-
this.
|
|
23003
|
+
const cors = cnbOptions?.cors || {};
|
|
23004
|
+
const cnb = cnbOptions?.cnb;
|
|
23005
|
+
const options = { token, cookie, cors, cnb };
|
|
23006
|
+
this.workspace = new Workspace(options);
|
|
23007
|
+
this.knowledgeBase = new KnowledgeBase(options);
|
|
23008
|
+
this.repo = new Repo(options);
|
|
23009
|
+
this.user = new User(options);
|
|
23010
|
+
this.build = new Build(options);
|
|
23011
|
+
this.issue = new Issue(options);
|
|
23012
|
+
this.mission = new Mission(options);
|
|
23013
|
+
this.ai = new AiBase(options);
|
|
23012
23014
|
}
|
|
23013
23015
|
setToken(token) {
|
|
23014
23016
|
this.token = token;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -21,21 +21,23 @@ export class CNB extends CNBCore {
|
|
|
21
21
|
mission!: Mission;
|
|
22
22
|
ai!: AiBase;
|
|
23
23
|
constructor(options: CNBOptions) {
|
|
24
|
-
super({ token: options.token, cookie: options.cookie, cnb: options.cnb });
|
|
24
|
+
super({ ...options, token: options.token, cookie: options.cookie, cnb: options.cnb });
|
|
25
25
|
this.init(options);
|
|
26
26
|
}
|
|
27
27
|
init(cnbOptions?: CNBOptions) {
|
|
28
28
|
const token = this.token;
|
|
29
29
|
const cookie = this.cookie;
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
30
|
+
const cors = cnbOptions?.cors || {}
|
|
31
|
+
const cnb = cnbOptions?.cnb
|
|
32
|
+
const options = { token, cookie, cors, cnb };
|
|
33
|
+
this.workspace = new Workspace(options);
|
|
34
|
+
this.knowledgeBase = new KnowledgeBase(options);
|
|
35
|
+
this.repo = new Repo(options);
|
|
36
|
+
this.user = new User(options);
|
|
37
|
+
this.build = new Build(options);
|
|
38
|
+
this.issue = new Issue(options);
|
|
39
|
+
this.mission = new Mission(options);
|
|
40
|
+
this.ai = new AiBase(options);
|
|
39
41
|
}
|
|
40
42
|
setToken(token: string) {
|
|
41
43
|
this.token = token;
|
package/src/workspace/index.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { Result } from "@kevisual/query/query";
|
|
9
|
-
import { CNBCore } from "../cnb-core.ts";
|
|
9
|
+
import { CNBCore, CNBCoreOptions } from "../cnb-core.ts";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* 工作空间列表查询参数
|
|
@@ -33,8 +33,8 @@ export interface ListParams {
|
|
|
33
33
|
* https://api.cnb.cool/#/operations/GetWorkspaceDetail
|
|
34
34
|
*/
|
|
35
35
|
export class Workspace extends CNBCore {
|
|
36
|
-
constructor(
|
|
37
|
-
super(
|
|
36
|
+
constructor(options: CNBCoreOptions) {
|
|
37
|
+
super(options);
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* 删除我的云原生开发环境
|