rechrome 1.31.0 → 1.31.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rechrome",
3
- "version": "1.31.0",
3
+ "version": "1.31.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/snomiao/rechrome.git"
package/rechrome.js CHANGED
@@ -1990,13 +1990,16 @@ export async function daemonInstall(serveUrl: string): Promise<void> {
1990
1990
  await runPm(mgr, ["save"]); // persist process list for `pm2 resurrect` on reboot
1991
1991
  } else {
1992
1992
  const envArgs = Object.entries(daemonEnv).flatMap(([k, v]) => ["--env", `${k}=${v}`]);
1993
+ // oxmgr shell-splits the command string (backslashes are escapes, so `C:\Users\…` became
1994
+ // `C:Users…`); pass quoted forward-slash paths — Windows accepts `/`, quotes keep spaces.
1995
+ const q = (path: string) => `"${path.replaceAll("\\", "/")}"`;
1993
1996
  startCode = await runPm(mgr, [
1994
1997
  "start",
1995
1998
  "--name", PM_PROCESS_NAME,
1996
1999
  "--restart", "always",
1997
2000
  "--cwd", home,
1998
2001
  ...envArgs,
1999
- `${bunBin} ${rechScript} serve`,
2002
+ `${q(bunBin)} ${q(rechScript)} serve`,
2000
2003
  ]);
2001
2004
  // Boot/login persistence: on Windows the winfix oxmgr wires Task Scheduler,
2002
2005
  // on POSIX a systemd --user unit / launchd agent — the equivalent of the pm2
package/rechrome.ts CHANGED
@@ -1990,13 +1990,16 @@ export async function daemonInstall(serveUrl: string): Promise<void> {
1990
1990
  await runPm(mgr, ["save"]); // persist process list for `pm2 resurrect` on reboot
1991
1991
  } else {
1992
1992
  const envArgs = Object.entries(daemonEnv).flatMap(([k, v]) => ["--env", `${k}=${v}`]);
1993
+ // oxmgr shell-splits the command string (backslashes are escapes, so `C:\Users\…` became
1994
+ // `C:Users…`); pass quoted forward-slash paths — Windows accepts `/`, quotes keep spaces.
1995
+ const q = (path: string) => `"${path.replaceAll("\\", "/")}"`;
1993
1996
  startCode = await runPm(mgr, [
1994
1997
  "start",
1995
1998
  "--name", PM_PROCESS_NAME,
1996
1999
  "--restart", "always",
1997
2000
  "--cwd", home,
1998
2001
  ...envArgs,
1999
- `${bunBin} ${rechScript} serve`,
2002
+ `${q(bunBin)} ${q(rechScript)} serve`,
2000
2003
  ]);
2001
2004
  // Boot/login persistence: on Windows the winfix oxmgr wires Task Scheduler,
2002
2005
  // on POSIX a systemd --user unit / launchd agent — the equivalent of the pm2