@hublo/sentinel 1.7.0-alpha.28 → 1.7.0-alpha.29

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.
@@ -12,7 +12,7 @@ import {
12
12
  presetNotInstalledYet,
13
13
  registerAdapters,
14
14
  resolve
15
- } from "../chunk-CZFZRF3I.js";
15
+ } from "../chunk-ZZP4DWQK.js";
16
16
  import "../chunk-NE3IEJBN.js";
17
17
  import "../chunk-VWASE6NN.js";
18
18
  import {
@@ -5905,7 +5905,15 @@ async function waitFor(url) {
5905
5905
  throw new Error(`${url} never answered`);
5906
5906
  }
5907
5907
  async function serve(options) {
5908
- const { config, moduleDir, builds, logs, detached = false, ports = DEFAULT_PORTS } = options;
5908
+ const {
5909
+ config,
5910
+ moduleDir,
5911
+ builds,
5912
+ logs,
5913
+ detached = false,
5914
+ ports = DEFAULT_PORTS,
5915
+ stopGraceMs = 5e3
5916
+ } = options;
5909
5917
  mkdirSync6(logs, { recursive: true });
5910
5918
  const children = [];
5911
5919
  const start = (name, args, cwd = process.cwd(), env = {}) => {
@@ -5917,7 +5925,7 @@ async function serve(options) {
5917
5925
  detached
5918
5926
  });
5919
5927
  if (detached) child.unref();
5920
- children.push(child);
5928
+ children.push({ name, child });
5921
5929
  };
5922
5930
  const session = readSession(moduleDir);
5923
5931
  if (session?.store !== void 0) await seedStore(session.store);
@@ -5952,7 +5960,15 @@ async function serve(options) {
5952
5960
  ]);
5953
5961
  }
5954
5962
  const stop = () => {
5955
- for (const child of children) child.kill();
5963
+ for (const { child } of children) child.kill();
5964
+ setTimeout(() => {
5965
+ for (const { name, child } of children) {
5966
+ if (child.exitCode !== null || child.signalCode !== null) continue;
5967
+ process.stderr.write(`${name} did not stop on SIGTERM in ${stopGraceMs} ms: killed
5968
+ `);
5969
+ child.kill("SIGKILL");
5970
+ }
5971
+ }, stopGraceMs).unref();
5956
5972
  };
5957
5973
  try {
5958
5974
  for (const side of Object.keys(builds)) {
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  registerAdapters,
7
7
  resolve,
8
8
  setDefaultRunner
9
- } from "./chunk-CZFZRF3I.js";
9
+ } from "./chunk-ZZP4DWQK.js";
10
10
  import "./chunk-NE3IEJBN.js";
11
11
  import "./chunk-VWASE6NN.js";
12
12
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hublo/sentinel",
3
- "version": "1.7.0-alpha.28",
3
+ "version": "1.7.0-alpha.29",
4
4
  "description": "One CLI that guards code health across Hublo repos: shared lint/typescript/build/test presets, static & dynamic analysis, and architecture checks.",
5
5
  "type": "module",
6
6
  "license": "MIT",