create-openclaw-bot 5.6.6 → 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 +40 -33
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -881,19 +881,19 @@ function startNative9RouterPm2({ isVi, projectDir, appName, syncScriptPath }) {
881
881
  execFileSync('pm2', [
882
882
  'start',
883
883
  routerLaunch.command,
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
- });
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
+ });
897
897
  if (syncScriptPath) {
898
898
  const syncAppName = `${appName}-9router-sync`;
899
899
  try {
@@ -905,26 +905,33 @@ function startNative9RouterPm2({ isVi, projectDir, appName, syncScriptPath }) {
905
905
  } catch {
906
906
  // ignore missing app
907
907
  }
908
- execFileSync('pm2', [
909
- 'start',
910
- normalizedSyncScriptPath,
911
- '--name',
912
- syncAppName,
913
- '--cwd',
914
- normalizedProjectDir,
915
- '--interpreter',
916
- process.execPath
917
- ], {
918
- cwd: projectDir,
919
- stdio: 'inherit',
920
- env: process.env
921
- });
922
- }
923
- runPm2Save({ projectDir, isVi });
924
- console.log(chalk.green(`\n✅ ${isVi ? '9Router da duoc khoi dong qua PM2.' : '9Router is running via PM2.'}`));
925
- console.log(chalk.gray(isVi ? ` Xem log: pm2 logs ${routerAppName}` : ` View logs: pm2 logs ${routerAppName}`));
926
- }
927
-
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
+
928
935
  async function ensureProjectRuntimeDirs(projectDir, isVi) {
929
936
  await fs.ensureDir(path.join(projectDir, '.openclaw'));
930
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.6",
3
+ "version": "5.6.7",
4
4
  "description": "Interactive CLI installer for OpenClaw Bot",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {