worktree-bay 2.3.1 → 2.3.2
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/dist/proc.js +7 -2
- package/package.json +1 -1
package/dist/proc.js
CHANGED
|
@@ -30,8 +30,13 @@ export function startDetached(ws, dir, service, slug, port, cmd) {
|
|
|
30
30
|
fs.mkdirSync(logDir, { recursive: true });
|
|
31
31
|
const log = path.join(logDir, `${slug}-${service}.log`);
|
|
32
32
|
const fd = fs.openSync(log, 'a');
|
|
33
|
-
//
|
|
34
|
-
|
|
33
|
+
// 后台启动、CLI 退出后仍存活、且不弹窗:
|
|
34
|
+
// - Windows:不要 detached(detached 会新开控制台窗口、且与 windowsHide 冲突);用 windowsHide 抑制窗口,
|
|
35
|
+
// 子进程在父进程正常退出后不会被自动杀(Windows 默认不 kill-on-parent-exit),kill 时用 taskkill /T 杀进程树。
|
|
36
|
+
// - 类 Unix:detached 建新进程组,便于用 kill(-pid) 整组结束。
|
|
37
|
+
// 两边都把 stdout/stderr 落日志文件,并 unref 让本进程能直接退出。
|
|
38
|
+
const detached = process.platform !== 'win32';
|
|
39
|
+
const child = spawn(cmd, { cwd: dir, shell: true, detached, stdio: ['ignore', fd, fd], windowsHide: true });
|
|
35
40
|
const pid = child.pid ?? -1;
|
|
36
41
|
child.unref();
|
|
37
42
|
const rec = { dir, service, port, pid, cmd, log, startedAt: Date.now() };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "worktree-bay",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Per-feature git worktree + port slots for parallel multi-service development: auto deps, env wiring, frontend-to-backend, merge-aware reclaim, plus an MCP server for AI agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"git",
|