@colinlu50/openclaw-lark-stream 2026.3.22 → 2026.3.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.
@@ -20,8 +20,13 @@ const subcommand = args[0];
20
20
  // 2) Then swap the installed official code with our fork
21
21
  if (subcommand === "install" || subcommand === "update") {
22
22
  // Step 1: Run tools for interactive setup (installs official + configures bot)
23
- const toolsArgs = args.slice(); // forward all flags (--app, --use-existing, --version, etc.)
24
- runTools(toolsArgs);
23
+ // Don't exit on error config is already saved, we still need to swap the code.
24
+ const toolsArgs = args.slice();
25
+ try {
26
+ runTools(toolsArgs);
27
+ } catch {
28
+ // Tools may fail on gateway restart etc. — that's OK, config is preserved.
29
+ }
25
30
 
26
31
  // Step 2: Replace official plugin code with ours
27
32
  try {
@@ -33,7 +38,7 @@ if (subcommand === "install" || subcommand === "update") {
33
38
  stdio: "inherit",
34
39
  });
35
40
  console.log(`\n✅ ${SELF_PACKAGE} installed successfully.`);
36
- console.log("Restart the gateway to load the new plugin.");
41
+ console.log("Run: openclaw gateway restart");
37
42
  } catch (error) {
38
43
  console.error(`\n❌ Failed to install ${SELF_PACKAGE}. The bot config is preserved.`);
39
44
  console.error("You can retry with: openclaw plugins install " + SELF_PACKAGE);
@@ -43,7 +48,11 @@ if (subcommand === "install" || subcommand === "update") {
43
48
  }
44
49
 
45
50
  // ── All other commands: delegate to @larksuite/openclaw-lark-tools ──
46
- runTools(args);
51
+ try {
52
+ runTools(args);
53
+ } catch (error) {
54
+ process.exit(error.status ?? 1);
55
+ }
47
56
 
48
57
  function runTools(fwdArgs) {
49
58
  let version = "latest";
@@ -55,31 +64,27 @@ function runTools(fwdArgs) {
55
64
 
56
65
  const allArgs = ["--yes", `@larksuite/openclaw-lark-tools@${version}`, ...fwdArgs];
57
66
 
58
- try {
59
- if (process.platform === "win32") {
60
- const npxCli = join(
61
- dirname(process.execPath),
62
- "node_modules",
63
- "npm",
64
- "bin",
65
- "npx-cli.js",
66
- );
67
- execFileSync(process.execPath, [npxCli, ...allArgs], {
68
- stdio: "inherit",
69
- env: {
70
- ...process.env,
71
- NODE_OPTIONS: [
72
- process.env.NODE_OPTIONS,
73
- "--disable-warning=DEP0190",
74
- ]
75
- .filter(Boolean)
76
- .join(" "),
77
- },
78
- });
79
- } else {
80
- execFileSync("npx", allArgs, { stdio: "inherit" });
81
- }
82
- } catch (error) {
83
- process.exit(error.status ?? 1);
67
+ if (process.platform === "win32") {
68
+ const npxCli = join(
69
+ dirname(process.execPath),
70
+ "node_modules",
71
+ "npm",
72
+ "bin",
73
+ "npx-cli.js",
74
+ );
75
+ execFileSync(process.execPath, [npxCli, ...allArgs], {
76
+ stdio: "inherit",
77
+ env: {
78
+ ...process.env,
79
+ NODE_OPTIONS: [
80
+ process.env.NODE_OPTIONS,
81
+ "--disable-warning=DEP0190",
82
+ ]
83
+ .filter(Boolean)
84
+ .join(" "),
85
+ },
86
+ });
87
+ } else {
88
+ execFileSync("npx", allArgs, { stdio: "inherit" });
84
89
  }
85
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colinlu50/openclaw-lark-stream",
3
- "version": "2026.3.22",
3
+ "version": "2026.3.23",
4
4
  "description": "OpenClaw Lark/Feishu channel plugin",
5
5
  "type": "module",
6
6
  "bin": {