verus-pm 0.2.16 → 0.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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/bin/verus.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const { existsSync } = require("node:fs");
4
- const { spawnSync } = require("node:child_process");
4
+ const { spawn } = require("node:child_process");
5
5
  const { join } = require("node:path");
6
6
 
7
7
  const PLATFORM_NAMES = { darwin: "darwin", linux: "linux", win32: "windows" };
@@ -27,11 +27,30 @@ if (!binaryPath) {
27
27
  process.exit(1);
28
28
  }
29
29
 
30
- const result = spawnSync(binaryPath, process.argv.slice(2), { stdio: "inherit" });
31
-
32
- if (result.error) {
33
- console.error(`Failed to launch Verus: ${result.error.message}`);
34
- process.exit(1);
30
+ // Use async spawn to properly forward signals and keep the child process
31
+ // attached to this session. spawnSync doesn't forward signals correctly,
32
+ // causing the child to become orphaned when the terminal closes.
33
+ const child = spawn(binaryPath, process.argv.slice(2), {
34
+ stdio: "inherit",
35
+ });
36
+
37
+ // Forward signals to child process so Ctrl+C and terminal close work correctly
38
+ for (const sig of ["SIGINT", "SIGTERM", "SIGHUP"]) {
39
+ process.on(sig, () => {
40
+ child.kill(sig);
41
+ });
35
42
  }
36
43
 
37
- process.exit(result.status ?? 1);
44
+ child.on("error", (err) => {
45
+ console.error(`Failed to launch Verus: ${err.message}`);
46
+ process.exit(1);
47
+ });
48
+
49
+ child.on("exit", (code, signal) => {
50
+ if (signal) {
51
+ // Re-raise the signal so the parent shell sees the correct exit reason
52
+ process.kill(process.pid, signal);
53
+ } else {
54
+ process.exit(code ?? 1);
55
+ }
56
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verus-pm",
3
- "version": "0.2.16",
3
+ "version": "0.3.2",
4
4
  "description": "AI-powered project management — CLI + Web Dashboard in one command",
5
5
  "bin": {
6
6
  "verus": "./bin/verus.js",