create-openclaw-bot 5.6.5 → 5.6.7

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.
Files changed (2) hide show
  1. package/dist/cli.js +47 -41
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -191,14 +191,13 @@ function resolveNative9RouterDesktopLaunch() {
191
191
  };
192
192
  }
193
193
 
194
- function build9RouterSmartRouteSyncScript(dbPath) {
195
- const safeDbPath = JSON.stringify(dbPath);
196
- return `function bootstrap() {
197
- const fs = require('fs');
198
- const path = require('path');
199
- const safeDbPath = JSON.stringify(dbPath);
200
- const dbPath = ${safeDbPath};
201
- const ROUTER='http://localhost:20128';
194
+ function build9RouterSmartRouteSyncScript(dbPath) {
195
+ const safeDbPath = JSON.stringify(dbPath);
196
+ return `function bootstrap() {
197
+ const fs = require('fs');
198
+ const path = require('path');
199
+ const dbPath = ${safeDbPath};
200
+ const ROUTER='http://localhost:20128';
202
201
  const MODEL_PRIORITY = {
203
202
  openai: ['openai/gpt-4o', 'openai/gpt-4.1'],
204
203
  anthropic: ['anthropic/claude-sonnet-4', 'anthropic/claude-haiku-3.5'],
@@ -882,19 +881,19 @@ function startNative9RouterPm2({ isVi, projectDir, appName, syncScriptPath }) {
882
881
  execFileSync('pm2', [
883
882
  'start',
884
883
  routerLaunch.command,
885
- '--name',
886
- routerAppName,
887
- '--cwd',
888
- normalizedProjectDir,
889
- '--interpreter',
890
- 'none',
891
- '--',
892
- ...routerLaunch.args
893
- ], {
894
- cwd: projectDir,
895
- stdio: 'inherit',
896
- env: { ...process.env, ...routerLaunch.env }
897
- });
884
+ '--name',
885
+ routerAppName,
886
+ '--cwd',
887
+ normalizedProjectDir,
888
+ '--interpreter',
889
+ 'none',
890
+ '--',
891
+ ...routerLaunch.args
892
+ ], {
893
+ cwd: projectDir,
894
+ stdio: 'inherit',
895
+ env: { ...process.env, ...routerLaunch.env }
896
+ });
898
897
  if (syncScriptPath) {
899
898
  const syncAppName = `${appName}-9router-sync`;
900
899
  try {
@@ -906,26 +905,33 @@ function startNative9RouterPm2({ isVi, projectDir, appName, syncScriptPath }) {
906
905
  } catch {
907
906
  // ignore missing app
908
907
  }
909
- execFileSync('pm2', [
910
- 'start',
911
- normalizedSyncScriptPath,
912
- '--name',
913
- syncAppName,
914
- '--cwd',
915
- normalizedProjectDir,
916
- '--interpreter',
917
- process.execPath
918
- ], {
919
- cwd: projectDir,
920
- stdio: 'inherit',
921
- env: process.env
922
- });
923
- }
924
- runPm2Save({ projectDir, isVi });
925
- console.log(chalk.green(`\n✅ ${isVi ? '9Router da duoc khoi dong qua PM2.' : '9Router is running via PM2.'}`));
926
- console.log(chalk.gray(isVi ? ` Xem log: pm2 logs ${routerAppName}` : ` View logs: pm2 logs ${routerAppName}`));
927
- }
928
-
908
+ try {
909
+ execFileSync('pm2', [
910
+ 'start',
911
+ normalizedSyncScriptPath,
912
+ '--name',
913
+ syncAppName,
914
+ '--cwd',
915
+ normalizedProjectDir,
916
+ '--interpreter',
917
+ process.execPath,
918
+ '--no-autorestart',
919
+ ], {
920
+ cwd: projectDir,
921
+ stdio: 'inherit',
922
+ env: process.env
923
+ });
924
+ } catch (syncErr) {
925
+ console.log(chalk.yellow(isVi
926
+ ? `\n⚠️ Khong the tu dong khoi dong sync script qua PM2.`
927
+ : `\n⚠️ Could not auto-start 9router sync script via PM2.`));
928
+ }
929
+ }
930
+ runPm2Save({ projectDir, isVi });
931
+ console.log(chalk.green(`\n✅ ${isVi ? '9Router da duoc khoi dong qua PM2.' : '9Router is running via PM2.'}`));
932
+ console.log(chalk.gray(isVi ? ` Xem log: pm2 logs ${routerAppName}` : ` View logs: pm2 logs ${routerAppName}`));
933
+ }
934
+
929
935
  async function ensureProjectRuntimeDirs(projectDir, isVi) {
930
936
  await fs.ensureDir(path.join(projectDir, '.openclaw'));
931
937
  await fs.ensureDir(getProject9RouterDataDir(projectDir));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-openclaw-bot",
3
- "version": "5.6.5",
3
+ "version": "5.6.7",
4
4
  "description": "Interactive CLI installer for OpenClaw Bot",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {