@kevisual/cnb 0.0.19 → 0.0.21
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 +6 -2
- package/dist/routes.d.ts +7 -0
- package/dist/routes.js +6 -2
- package/package.json +7 -6
- package/src/cnb-core.ts +2 -2
- package/src/repo/index.ts +11 -1
- package/src/workspace/index.ts +2 -0
package/dist/opencode.js
CHANGED
|
@@ -22567,7 +22567,6 @@ class CNBCore {
|
|
|
22567
22567
|
}
|
|
22568
22568
|
delete _headers.Authorization;
|
|
22569
22569
|
}
|
|
22570
|
-
console.log("Request URL:", url2, data, _headers);
|
|
22571
22570
|
const response = await fetch(url2 || "", {
|
|
22572
22571
|
method,
|
|
22573
22572
|
headers: _headers,
|
|
@@ -22602,7 +22601,6 @@ class CNBCore {
|
|
|
22602
22601
|
if (url2 && url2.startsWith("http")) {
|
|
22603
22602
|
return url2;
|
|
22604
22603
|
}
|
|
22605
|
-
console.log("url", url2, this.baseURL);
|
|
22606
22604
|
if (url2.startsWith("/")) {
|
|
22607
22605
|
return this.baseURL + url2;
|
|
22608
22606
|
}
|
|
@@ -22678,6 +22676,8 @@ class Workspace extends CNBCore {
|
|
|
22678
22676
|
const data = {};
|
|
22679
22677
|
if (params.branch) {
|
|
22680
22678
|
data.branch = params.branch;
|
|
22679
|
+
} else {
|
|
22680
|
+
data.branch = "main";
|
|
22681
22681
|
}
|
|
22682
22682
|
if (params.ref) {
|
|
22683
22683
|
data.ref = params.ref;
|
|
@@ -22797,6 +22797,10 @@ class Repo extends CNBCore {
|
|
|
22797
22797
|
}
|
|
22798
22798
|
return this.get({ url: url2, params: _params });
|
|
22799
22799
|
}
|
|
22800
|
+
updateRepoInfo(repo, params) {
|
|
22801
|
+
const url2 = `/${repo}`;
|
|
22802
|
+
return this.patch({ url: url2, data: params });
|
|
22803
|
+
}
|
|
22800
22804
|
}
|
|
22801
22805
|
|
|
22802
22806
|
// src/user/index.ts
|
package/dist/routes.d.ts
CHANGED
|
@@ -297,7 +297,14 @@ declare class Repo extends CNBCore {
|
|
|
297
297
|
search?: string;
|
|
298
298
|
status?: 'active' | 'archived';
|
|
299
299
|
}): Promise<Result<RepoItem[]>>;
|
|
300
|
+
updateRepoInfo(repo: string, params: UpdateRepoInfo): Promise<any>;
|
|
300
301
|
}
|
|
302
|
+
type UpdateRepoInfo = {
|
|
303
|
+
description?: string;
|
|
304
|
+
license?: 'MIT' | 'Apache-2.0' | 'GPL-3.0' | 'Unlicense';
|
|
305
|
+
site?: string;
|
|
306
|
+
topics?: string[];
|
|
307
|
+
};
|
|
301
308
|
type CreateRepoData = {
|
|
302
309
|
description: string;
|
|
303
310
|
license?: 'MIT' | 'Apache-2.0' | 'GPL-3.0' | 'Unlicense';
|
package/dist/routes.js
CHANGED
|
@@ -22567,7 +22567,6 @@ class CNBCore {
|
|
|
22567
22567
|
}
|
|
22568
22568
|
delete _headers.Authorization;
|
|
22569
22569
|
}
|
|
22570
|
-
console.log("Request URL:", url2, data, _headers);
|
|
22571
22570
|
const response = await fetch(url2 || "", {
|
|
22572
22571
|
method,
|
|
22573
22572
|
headers: _headers,
|
|
@@ -22602,7 +22601,6 @@ class CNBCore {
|
|
|
22602
22601
|
if (url2 && url2.startsWith("http")) {
|
|
22603
22602
|
return url2;
|
|
22604
22603
|
}
|
|
22605
|
-
console.log("url", url2, this.baseURL);
|
|
22606
22604
|
if (url2.startsWith("/")) {
|
|
22607
22605
|
return this.baseURL + url2;
|
|
22608
22606
|
}
|
|
@@ -22678,6 +22676,8 @@ class Workspace extends CNBCore {
|
|
|
22678
22676
|
const data = {};
|
|
22679
22677
|
if (params.branch) {
|
|
22680
22678
|
data.branch = params.branch;
|
|
22679
|
+
} else {
|
|
22680
|
+
data.branch = "main";
|
|
22681
22681
|
}
|
|
22682
22682
|
if (params.ref) {
|
|
22683
22683
|
data.ref = params.ref;
|
|
@@ -22797,6 +22797,10 @@ class Repo extends CNBCore {
|
|
|
22797
22797
|
}
|
|
22798
22798
|
return this.get({ url: url2, params: _params });
|
|
22799
22799
|
}
|
|
22800
|
+
updateRepoInfo(repo, params) {
|
|
22801
|
+
const url2 = `/${repo}`;
|
|
22802
|
+
return this.patch({ url: url2, data: params });
|
|
22803
|
+
}
|
|
22800
22804
|
}
|
|
22801
22805
|
|
|
22802
22806
|
// src/user/index.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevisual/cnb",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,19 +16,20 @@
|
|
|
16
16
|
],
|
|
17
17
|
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"packageManager": "pnpm@10.
|
|
19
|
+
"packageManager": "pnpm@10.29.1",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@kevisual/ai": "^0.0.24",
|
|
23
23
|
"@kevisual/code-builder": "^0.0.6",
|
|
24
|
+
"@kevisual/dts": "^0.0.3",
|
|
24
25
|
"@kevisual/context": "^0.0.4",
|
|
25
26
|
"@kevisual/types": "^0.0.12",
|
|
26
|
-
"@opencode-ai/plugin": "^1.1.
|
|
27
|
+
"@opencode-ai/plugin": "^1.1.53",
|
|
27
28
|
"@types/bun": "^1.3.8",
|
|
28
|
-
"@types/node": "^25.2.
|
|
29
|
+
"@types/node": "^25.2.2",
|
|
29
30
|
"@types/ws": "^8.18.1",
|
|
30
31
|
"dayjs": "^1.11.19",
|
|
31
|
-
"dotenv": "^17.2.
|
|
32
|
+
"dotenv": "^17.2.4"
|
|
32
33
|
},
|
|
33
34
|
"publishConfig": {
|
|
34
35
|
"access": "public"
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
"zod": "^4.3.6"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
|
-
"@kevisual/query": "^0.0.
|
|
41
|
+
"@kevisual/query": "^0.0.40",
|
|
41
42
|
"@kevisual/router": "^0.0.70",
|
|
42
43
|
"@kevisual/use-config": "^1.0.30",
|
|
43
44
|
"es-toolkit": "^1.44.0",
|
package/src/cnb-core.ts
CHANGED
|
@@ -79,7 +79,7 @@ export class CNBCore {
|
|
|
79
79
|
}
|
|
80
80
|
delete _headers.Authorization;
|
|
81
81
|
}
|
|
82
|
-
console.log('Request URL:', url, data, _headers);
|
|
82
|
+
// console.log('Request URL:', url, data, _headers);
|
|
83
83
|
const response = await fetch(url || '', {
|
|
84
84
|
method,
|
|
85
85
|
headers: _headers,
|
|
@@ -115,7 +115,7 @@ export class CNBCore {
|
|
|
115
115
|
if (url && url.startsWith('http')) {
|
|
116
116
|
return url;
|
|
117
117
|
}
|
|
118
|
-
console.log('url', url, this.baseURL)
|
|
118
|
+
// console.log('url', url, this.baseURL)
|
|
119
119
|
if (url.startsWith('/')) {
|
|
120
120
|
return this.baseURL + url;
|
|
121
121
|
}
|
package/src/repo/index.ts
CHANGED
|
@@ -95,11 +95,21 @@ export class Repo extends CNBCore {
|
|
|
95
95
|
page: params.page || 1,
|
|
96
96
|
page_size: params.page_size || 999,
|
|
97
97
|
}
|
|
98
|
-
if(!_params.search) {
|
|
98
|
+
if (!_params.search) {
|
|
99
99
|
delete _params.search;
|
|
100
100
|
}
|
|
101
101
|
return this.get({ url, params: _params });
|
|
102
102
|
}
|
|
103
|
+
updateRepoInfo(repo: string, params: UpdateRepoInfo): Promise<any> {
|
|
104
|
+
const url = `/${repo}`;
|
|
105
|
+
return this.patch({ url, data: params });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
type UpdateRepoInfo = {
|
|
109
|
+
description?: string;
|
|
110
|
+
license?: 'MIT' | 'Apache-2.0' | 'GPL-3.0' | 'Unlicense';
|
|
111
|
+
site?: string;
|
|
112
|
+
topics?: string[];
|
|
103
113
|
}
|
|
104
114
|
|
|
105
115
|
type CreateRepoData = {
|