panrouter 1.4.0 → 1.4.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.
Files changed (2) hide show
  1. package/daemon.mjs +4 -3
  2. package/package.json +1 -1
package/daemon.mjs CHANGED
@@ -70,14 +70,16 @@ const serverProcess = (() => {
70
70
  } catch {}
71
71
 
72
72
  log("Starting server...");
73
- const child = spawn("cmd.exe", ["/c", "start", "/B", "node", serverPath], {
73
+ // node 直接 spawn 子进程, 避免 cmd /c 的额外 shell
74
+ const child = spawn(process.execPath, [serverPath], {
74
75
  cwd: appDir,
75
76
  stdio: "ignore",
76
77
  windowsHide: true,
78
+ detached: true,
77
79
  shell: false,
78
80
  });
79
81
  child.unref();
80
- log(`Server started via cmd /c start /B`);
82
+ log(`Server started PID=${child.pid}`);
81
83
  return child;
82
84
  })();
83
85
 
@@ -113,7 +115,6 @@ const serverProcess = (() => {
113
115
  if (evt.type === "click") {
114
116
  if (evt.index === 2) { // 退出
115
117
  log("Exit from PS menu");
116
- try { if (serverProcess && !serverProcess.killed) serverProcess.kill(); } catch {}
117
118
  psSend({ action: "kill" });
118
119
  setTimeout(() => process.exit(0), 500);
119
120
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "panrouter",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "让 Claude Code 免费使用 DeepSeek 等模型,无需 API Key",
5
5
  "type": "module",
6
6
  "bin": {