@camox/cli 0.17.4 → 0.17.5

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/dist/index.mjs +14 -11
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -782,18 +782,21 @@ src/routeTree.gen.ts
782
782
  }
783
783
  p.outro(`Starting dev server...`);
784
784
  const [cmd, ...args] = devCmd.split(" ");
785
- let interruptReceived = false;
786
- process.on("SIGINT", () => {
787
- interruptReceived = true;
788
- });
789
- spawn(cmd, args, {
785
+ const child = spawn(cmd, args, {
790
786
  cwd: targetDir,
791
- stdio: "inherit"
792
- }).on("close", () => {
793
- if (interruptReceived) {
794
- process.exit(0);
795
- return;
796
- }
787
+ stdio: "inherit",
788
+ detached: true
789
+ });
790
+ const sigintHandler = () => {
791
+ if (child.pid) try {
792
+ process.kill(-child.pid, "SIGTERM");
793
+ } catch {}
794
+ };
795
+ process.on("SIGINT", sigintHandler);
796
+ process.on("exit", sigintHandler);
797
+ child.on("close", () => {
798
+ process.removeListener("SIGINT", sigintHandler);
799
+ process.removeListener("exit", sigintHandler);
797
800
  dropIntoProject();
798
801
  });
799
802
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camox/cli",
3
- "version": "0.17.4",
3
+ "version": "0.17.5",
4
4
  "bin": {
5
5
  "camox": "./dist/index.mjs"
6
6
  },
@@ -26,7 +26,7 @@
26
26
  "@types/node": "^24.12.2",
27
27
  "@typescript/native-preview": "7.0.0-dev.20260412.1",
28
28
  "vite-plus": "latest",
29
- "@camox/api-contract": "0.17.4"
29
+ "@camox/api-contract": "0.17.5"
30
30
  },
31
31
  "nx": {
32
32
  "tags": [