@getstrata/cli 2.2.4 → 2.2.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @getstrata/cli changelog
2
2
 
3
+ ## 2.2.6
4
+
5
+ - fix(cli): relay shutdown to children and simplify container launcher
6
+
7
+ ## 2.2.5
8
+
9
+ - fix(starter): keep container readiness independent of API admission
10
+
3
11
  ## 2.2.4
4
12
 
5
13
  - perf(database): seek Postgres composite keyset bounds
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getstrata/cli",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
4
4
  "description": "Strata CLI: framework commands for Bun apps (dev, start, migrate, run)",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -50,8 +50,8 @@
50
50
  ],
51
51
  "scripts": {},
52
52
  "peerDependencies": {
53
- "@getstrata/bootstrap": "^2.2.4",
54
- "@getstrata/core": "^2.2.4"
53
+ "@getstrata/bootstrap": "^2.2.6",
54
+ "@getstrata/core": "^2.2.6"
55
55
  },
56
56
  "publishConfig": {
57
57
  "access": "public"
package/src/spawnBun.ts CHANGED
@@ -13,7 +13,20 @@ async function spawnBun(app: StrataAppConfig, bunArgs: string[]): Promise<number
13
13
  env: process.env,
14
14
  });
15
15
 
16
- return await proc.exited;
16
+ // The CLI owns this child. A container signals its supervisor, not the server.
17
+ const signals = ["SIGINT", "SIGTERM"] as const;
18
+ const relays = signals.map((signal) => {
19
+ const relay = () => {
20
+ if (proc.exitCode === null) proc.kill(signal);
21
+ };
22
+ process.on(signal, relay);
23
+ return () => process.off(signal, relay);
24
+ });
25
+ try {
26
+ return await proc.exited;
27
+ } finally {
28
+ for (const remove of relays) remove();
29
+ }
17
30
  }
18
31
 
19
32
  export { bunExecutable, spawnBun };