@firstpick/pi-package-webui 0.5.8 → 0.6.0

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.
@@ -71,7 +71,11 @@ function runCommand(command, args, { cwd, timeoutMs = GIT_DEFAULT_TIMEOUT_MS, ma
71
71
  if (stderr.length > maxOutputLength) stderr = stderr.slice(-maxOutputLength);
72
72
  });
73
73
  child.on("error", (error) => finish({ exitCode: undefined, stdout, stderr, error: error?.message || String(error) }));
74
- child.on("exit", (exitCode, signal) => finish({ exitCode, signal, stdout, stderr, timedOut: false }));
74
+ // "close", not "exit": exit can fire before the stdio pipes flush, which
75
+ // intermittently yields empty/truncated stdout for a successful command
76
+ // (e.g. `git rev-parse --show-toplevel` → "" → path.resolve("") →
77
+ // process.cwd() → worktree data read from the wrong repository).
78
+ child.on("close", (exitCode, signal) => finish({ exitCode, signal, stdout, stderr, timedOut: false }));
75
79
  });
76
80
  }
77
81
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firstpick/pi-package-webui",
3
- "version": "0.5.8",
3
+ "version": "0.6.0",
4
4
  "description": "Pi Web UI companion package with a local browser UI CLI plus /webui-start and /webui-status commands.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/Firstp1ck/npm-packages/tree/main/pi-package-webui#readme",
@@ -49,7 +49,7 @@
49
49
  "pi-webui": "./bin/pi-webui.mjs"
50
50
  },
51
51
  "scripts": {
52
- "check": "node --check public/app.js && node --check bin/pi-webui.mjs && node --check webui-rpc-helper.mjs && node --check lib/trust-boundaries.mjs && node --check lib/native-command-adapter.mjs && node --check lib/session-actions.mjs && node --check lib/auth-actions.mjs && node --check lib/temp-artifacts.mjs && node tests/run-all.mjs",
52
+ "check": "node --check public/app.js && node --check public/voice-conversation.mjs && node --check bin/pi-webui.mjs && node --check webui-rpc-helper.mjs && node --check lib/trust-boundaries.mjs && node --check lib/native-command-adapter.mjs && node --check lib/session-actions.mjs && node --check lib/auth-actions.mjs && node --check lib/temp-artifacts.mjs && node tests/run-all.mjs",
53
53
  "test": "node tests/run-all.mjs"
54
54
  },
55
55
  "dependencies": {