@workclaw/cli 1.0.22 → 1.0.23
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.
|
@@ -4279,6 +4279,20 @@ class LocalInstaller {
|
|
|
4279
4279
|
throw new AppError$1(ERROR_CODES$1.NPM_INSTALL_FAILED, "插件解压后未找到 package.json");
|
|
4280
4280
|
}
|
|
4281
4281
|
debugLog("[下载插件] 插件解压成功");
|
|
4282
|
+
this.spinner.prefixText = this.prefixText;
|
|
4283
|
+
this.spinner.text = `${chalk.cyan("下载插件")} ${chalk.dim("→")} ${chalk.yellow("安装依赖")}`;
|
|
4284
|
+
debugLog("[下载插件] 执行 npm install 安装生产环境依赖");
|
|
4285
|
+
try {
|
|
4286
|
+
execSync("npm install --production", {
|
|
4287
|
+
cwd: paths.target,
|
|
4288
|
+
stdio: "pipe",
|
|
4289
|
+
timeout: 12e4
|
|
4290
|
+
});
|
|
4291
|
+
debugLog("[下载插件] npm install 执行成功");
|
|
4292
|
+
} catch (error) {
|
|
4293
|
+
const errorMsg = error.stderr?.toString() || error.message || "未知错误";
|
|
4294
|
+
debugLog(`[下载插件] npm install 可能存在问题: ${errorMsg}`);
|
|
4295
|
+
}
|
|
4282
4296
|
this.prefixText += chalk.green(`✓ 插件下载完成
|
|
4283
4297
|
`);
|
|
4284
4298
|
try {
|
|
@@ -4468,9 +4482,11 @@ class LocalInstaller {
|
|
|
4468
4482
|
// 网关端口
|
|
4469
4483
|
port: 18789,
|
|
4470
4484
|
// 绑定地址:'loopback' | 'lan' | 'all'
|
|
4471
|
-
bind: "
|
|
4472
|
-
//
|
|
4473
|
-
auth: {
|
|
4485
|
+
bind: "lan",
|
|
4486
|
+
// 认证模式(token字段未设置,是因为需要使用原始配置的token)
|
|
4487
|
+
auth: {
|
|
4488
|
+
mode: "token"
|
|
4489
|
+
},
|
|
4474
4490
|
// Tailscale 配置
|
|
4475
4491
|
tailscale: { mode: "off", resetOnExit: false },
|
|
4476
4492
|
nodes: {
|
|
@@ -4481,9 +4497,7 @@ class LocalInstaller {
|
|
|
4481
4497
|
"screen.record",
|
|
4482
4498
|
"contacts.add",
|
|
4483
4499
|
"calendar.add",
|
|
4484
|
-
"reminders.add"
|
|
4485
|
-
"sms.send",
|
|
4486
|
-
"sms.search"
|
|
4500
|
+
"reminders.add"
|
|
4487
4501
|
]
|
|
4488
4502
|
},
|
|
4489
4503
|
controlUi: {
|
|
@@ -4505,9 +4519,9 @@ class LocalInstaller {
|
|
|
4505
4519
|
// logging: 日志配置
|
|
4506
4520
|
logging: {
|
|
4507
4521
|
// 日志级别:'debug' | 'info' | 'warn' | 'error'
|
|
4508
|
-
level: "
|
|
4522
|
+
level: "trace",
|
|
4509
4523
|
// 控制台日志级别
|
|
4510
|
-
consoleLevel: "
|
|
4524
|
+
consoleLevel: "trace",
|
|
4511
4525
|
// 控制台样式:'pretty' | 'basic' | 'raw'
|
|
4512
4526
|
consoleStyle: "pretty",
|
|
4513
4527
|
// 敏感信息脱敏:'off' | 'keys' | 'all'
|
|
@@ -4521,15 +4535,21 @@ class LocalInstaller {
|
|
|
4521
4535
|
plugins: {
|
|
4522
4536
|
// 允许的插件列表
|
|
4523
4537
|
allow: [config.PLUGIN_NAME],
|
|
4524
|
-
//
|
|
4538
|
+
// 插件安装跟踪(支持 openclaw plugins update 命令)
|
|
4525
4539
|
installs: {
|
|
4526
4540
|
[config.PLUGIN_NAME]: {
|
|
4541
|
+
// 安装来源
|
|
4542
|
+
source: "npm",
|
|
4527
4543
|
// npm 包名
|
|
4528
|
-
|
|
4544
|
+
spec: PLUGIN_PACKAGE_NAME$1,
|
|
4529
4545
|
// 安装路径
|
|
4530
4546
|
installPath: paths.target
|
|
4531
4547
|
}
|
|
4532
4548
|
},
|
|
4549
|
+
// 插件加载路径(本地开发或自定义安装位置)
|
|
4550
|
+
load: {
|
|
4551
|
+
paths: [paths.target]
|
|
4552
|
+
},
|
|
4533
4553
|
// 插件条目启用状态
|
|
4534
4554
|
entries: {
|
|
4535
4555
|
[config.PLUGIN_NAME]: { enabled: true }
|
|
@@ -4869,6 +4889,22 @@ class BoxInstaller {
|
|
|
4869
4889
|
debugLog(`[解压插件] 插件解压成功: ${paths.target}`);
|
|
4870
4890
|
this.prefixText += chalk.green(`✓ 插件解压成功
|
|
4871
4891
|
`);
|
|
4892
|
+
this.spinner.prefixText = this.prefixText;
|
|
4893
|
+
this.spinner.text = `${chalk.cyan("安装依赖")} ${chalk.dim("→")} ${chalk.yellow("正在安装...")}`;
|
|
4894
|
+
debugLog("[安装依赖] 执行 npm install 安装生产环境依赖");
|
|
4895
|
+
try {
|
|
4896
|
+
execSync("npm install --production", {
|
|
4897
|
+
cwd: paths.target,
|
|
4898
|
+
stdio: "pipe",
|
|
4899
|
+
timeout: 12e4
|
|
4900
|
+
});
|
|
4901
|
+
debugLog("[安装依赖] npm install 执行成功");
|
|
4902
|
+
this.prefixText += chalk.green(`✓ 依赖安装成功
|
|
4903
|
+
`);
|
|
4904
|
+
} catch (error) {
|
|
4905
|
+
const errorMsg = error.stderr?.toString() || error.message || "未知错误";
|
|
4906
|
+
debugLog(`[安装依赖] npm install 可能存在问题: ${errorMsg}`);
|
|
4907
|
+
}
|
|
4872
4908
|
await fs.rm(paths.temp, { recursive: true, force: true });
|
|
4873
4909
|
debugLog(`[解压插件] 清理临时文件成功`);
|
|
4874
4910
|
this.prefixText += chalk.green(`✓ 清理临时文件成功
|
|
@@ -5114,15 +5150,21 @@ class BoxInstaller {
|
|
|
5114
5150
|
plugins: {
|
|
5115
5151
|
// 允许的插件列表
|
|
5116
5152
|
allow: [config.PLUGIN_NAME],
|
|
5117
|
-
//
|
|
5153
|
+
// 插件安装跟踪(支持 openclaw plugins update 命令)
|
|
5118
5154
|
installs: {
|
|
5119
5155
|
[config.PLUGIN_NAME]: {
|
|
5156
|
+
// 安装来源
|
|
5157
|
+
source: "npm",
|
|
5120
5158
|
// npm 包名
|
|
5121
|
-
|
|
5159
|
+
spec: PLUGIN_PACKAGE_NAME,
|
|
5122
5160
|
// 安装路径
|
|
5123
5161
|
installPath: paths.target
|
|
5124
5162
|
}
|
|
5125
5163
|
},
|
|
5164
|
+
// 插件加载路径
|
|
5165
|
+
load: {
|
|
5166
|
+
paths: [paths.target]
|
|
5167
|
+
},
|
|
5126
5168
|
// 插件条目启用状态
|
|
5127
5169
|
entries: {
|
|
5128
5170
|
[config.PLUGIN_NAME]: { enabled: true }
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workclaw/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.23",
|
|
5
5
|
"description": "WorkClaw CLI 工具 - 用于初始化和配置 WorkClaw 插件",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -38,4 +38,4 @@
|
|
|
38
38
|
"semver": "^7.7.1",
|
|
39
39
|
"tar": "^7.4.0"
|
|
40
40
|
}
|
|
41
|
-
}
|
|
41
|
+
}
|