@powerbase/cli 0.1.1 → 0.1.2
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/bin/install-wizard.js +9 -2
- package/package.json +5 -5
package/bin/install-wizard.js
CHANGED
|
@@ -43,7 +43,11 @@ function main() {
|
|
|
43
43
|
const skillsUrl = webHost || serverHost;
|
|
44
44
|
console.log('正在安装 PowerBase CLI...');
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
let installed = run('npm', ['install', '-g', '@powerbase/cli@latest']);
|
|
47
|
+
if (installed.status !== 0) {
|
|
48
|
+
console.log('默认源未取到最新版本,改用官方 registry 重试...');
|
|
49
|
+
installed = run('npm', ['install', '-g', '@powerbase/cli@latest', '--registry', 'https://registry.npmjs.org']);
|
|
50
|
+
}
|
|
47
51
|
if (installed.status !== 0) {
|
|
48
52
|
console.error('全局安装失败。请重试:npm install -g @powerbase/cli');
|
|
49
53
|
return 1;
|
|
@@ -51,7 +55,10 @@ function main() {
|
|
|
51
55
|
|
|
52
56
|
if (skillsUrl) {
|
|
53
57
|
console.log('正在安装 AI 技能...');
|
|
54
|
-
|
|
58
|
+
let skills = run('npx', ['-y', 'skills', 'add', skillsUrl, '--skill', 'powerbase', '-y', '-g']);
|
|
59
|
+
if (skills.status !== 0) {
|
|
60
|
+
skills = run('npx', ['--registry', 'https://registry.npmjs.org', '-y', 'skills', 'add', skillsUrl, '--skill', 'powerbase', '-y', '-g']);
|
|
61
|
+
}
|
|
55
62
|
if (skills.status !== 0) {
|
|
56
63
|
console.warn(`技能安装失败。可稍后手动执行:npx -y skills add ${skillsUrl} --skill powerbase -y -g`);
|
|
57
64
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerbase/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "PowerBase CLI - query and manage PowerBase knowledge bases from the terminal",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"node": "\u003e=18"
|
|
20
20
|
},
|
|
21
21
|
"optionalDependencies": {
|
|
22
|
-
"@powerbase/cli-win32-x64": "0.1.
|
|
23
|
-
"@powerbase/cli-win32-arm64": "0.1.
|
|
24
|
-
"@powerbase/cli-darwin-arm64": "0.1.
|
|
25
|
-
"@powerbase/cli-darwin-x64": "0.1.
|
|
22
|
+
"@powerbase/cli-win32-x64": "0.1.2",
|
|
23
|
+
"@powerbase/cli-win32-arm64": "0.1.2",
|
|
24
|
+
"@powerbase/cli-darwin-arm64": "0.1.2",
|
|
25
|
+
"@powerbase/cli-darwin-x64": "0.1.2"
|
|
26
26
|
}
|
|
27
27
|
}
|