@wps365/openclaw-wpsxiezuo 1.6.3 → 1.6.5-beta.0
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/cli.mjs +10 -6
- package/dist/index.js +48 -48
- package/package.json +1 -1
package/bin/cli.mjs
CHANGED
|
@@ -47,8 +47,7 @@ function env(name) {
|
|
|
47
47
|
const CHANNEL_ID = "wps-xiezuo";
|
|
48
48
|
const LEGACY_CHANNEL_IDS = ["wps", "openclaw-wps-xiezuo"];
|
|
49
49
|
const ALL_IDS = [CHANNEL_ID, ...LEGACY_CHANNEL_IDS];
|
|
50
|
-
|
|
51
|
-
const UNINSTALL_IDS = [CHANNEL_ID, "wps"];
|
|
50
|
+
const UNINSTALL_IDS = [CHANNEL_ID];
|
|
52
51
|
const DEFAULT_BASE_URL = "https://openapi.wps.cn";
|
|
53
52
|
const DEFAULT_AGENT_ID = "digital-assistant";
|
|
54
53
|
const OPENCLAW_HOME = path.join(os.homedir(), ".openclaw");
|
|
@@ -482,10 +481,15 @@ ${c.cyan}提示:${c.reset}如果不想等待自动校验,可 ${c.bold}Ctrl+C
|
|
|
482
481
|
continue;
|
|
483
482
|
}
|
|
484
483
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
484
|
+
// 按行过滤(grep 语义),兼容 Windows / macOS / Linux。
|
|
485
|
+
// 不依赖系统 grep / findstr,用 Node.js 正则逐行匹配,跨平台一致。
|
|
486
|
+
const allLines = `${list.stdout}\n${list.stderr}`.split(/\r?\n/);
|
|
487
|
+
const pattern = new RegExp(knownIds.map((id) => id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), "i");
|
|
488
|
+
const matchedLines = allLines.filter((line) => pattern.test(line));
|
|
489
|
+
|
|
490
|
+
if (matchedLines.length > 0) {
|
|
491
|
+
log.info("插件已在 openclaw plugins list 中确认注册:");
|
|
492
|
+
matchedLines.forEach((line) => log.info(` ${line.trim()}`));
|
|
489
493
|
return;
|
|
490
494
|
}
|
|
491
495
|
|