@drisp/cli 0.6.1 → 0.6.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.
@@ -34017,6 +34017,22 @@ async function startRunnerProcess(options = {}) {
34017
34017
  };
34018
34018
  }
34019
34019
 
34020
+ // src/infra/daemon/shutdownSignal.ts
34021
+ function waitForShutdownSignal() {
34022
+ return new Promise((resolve) => {
34023
+ const keepAlive = setInterval(() => {
34024
+ }, 2 ** 31 - 1);
34025
+ const onSignal = (signal) => {
34026
+ clearInterval(keepAlive);
34027
+ process.off("SIGINT", onSignal);
34028
+ process.off("SIGTERM", onSignal);
34029
+ resolve(signal);
34030
+ };
34031
+ process.on("SIGINT", onSignal);
34032
+ process.on("SIGTERM", onSignal);
34033
+ });
34034
+ }
34035
+
34020
34036
  export {
34021
34037
  releaseMcpAsset,
34022
34038
  getGlyphs,
@@ -34117,6 +34133,7 @@ export {
34117
34133
  readPidLock,
34118
34134
  readRunnerStatusFile,
34119
34135
  RunnerStartupError,
34120
- startRunnerProcess
34136
+ startRunnerProcess,
34137
+ waitForShutdownSignal
34121
34138
  };
34122
- //# sourceMappingURL=chunk-HQWVYIYF.js.map
34139
+ //# sourceMappingURL=chunk-ANYY7XRT.js.map
@@ -1,6 +1,7 @@
1
1
  import {
2
- startRunnerProcess
3
- } from "./chunk-HQWVYIYF.js";
2
+ startRunnerProcess,
3
+ waitForShutdownSignal
4
+ } from "./chunk-ANYY7XRT.js";
4
5
 
5
6
  // src/app/entry/runnerDaemon.ts
6
7
  import path from "path";
@@ -21,15 +22,7 @@ async function runRunnerDaemonEntry() {
21
22
  );
22
23
  return 1;
23
24
  }
24
- const reason = await new Promise((resolve) => {
25
- const onSignal = (signal) => {
26
- process.off("SIGINT", onSignal);
27
- process.off("SIGTERM", onSignal);
28
- resolve(signal);
29
- };
30
- process.on("SIGINT", onSignal);
31
- process.on("SIGTERM", onSignal);
32
- });
25
+ const reason = await waitForShutdownSignal();
33
26
  await runner.stop(reason);
34
27
  return 0;
35
28
  }
@@ -53,4 +46,4 @@ if (process.argv.includes("--help")) {
53
46
  export {
54
47
  runRunnerDaemonEntry
55
48
  };
56
- //# sourceMappingURL=chunk-OT72W4DD.js.map
49
+ //# sourceMappingURL=chunk-VETXW62U.js.map
package/dist/cli.js CHANGED
@@ -98,10 +98,11 @@ import {
98
98
  supportsSessionApproval,
99
99
  todoGlyphSet,
100
100
  visualPositionToOffset,
101
+ waitForShutdownSignal,
101
102
  wrapText,
102
103
  writeAttachmentMirror,
103
104
  writeDashboardClientConfig
104
- } from "./chunk-HQWVYIYF.js";
105
+ } from "./chunk-ANYY7XRT.js";
105
106
  import {
106
107
  generateId as generateId2
107
108
  } from "./chunk-USK5VSQ7.js";
@@ -13147,7 +13148,7 @@ var cachedVersion = null;
13147
13148
  function readPackageVersion() {
13148
13149
  if (cachedVersion !== null) return cachedVersion;
13149
13150
  try {
13150
- const injected = "0.6.1";
13151
+ const injected = "0.6.2";
13151
13152
  if (typeof injected === "string" && injected.length > 0) {
13152
13153
  cachedVersion = injected;
13153
13154
  return cachedVersion;
@@ -13648,7 +13649,7 @@ async function runRunnerCommand(input, deps = {}) {
13648
13649
  return err instanceof RunnerStartupError ? err.exitCode : 1;
13649
13650
  }
13650
13651
  logOut(`runner: foreground runtime connected (pid ${runner.pid})`);
13651
- const wait = deps.waitForShutdown ?? defaultWaitForShutdown;
13652
+ const wait = deps.waitForShutdown ?? waitForShutdownSignal;
13652
13653
  const reason = await wait();
13653
13654
  await runner.stop(reason);
13654
13655
  logOut(`runner: stopped (${reason})`);
@@ -14028,17 +14029,6 @@ async function runRunnerCommand(input, deps = {}) {
14028
14029
  logError(USAGE3);
14029
14030
  return 2;
14030
14031
  }
14031
- function defaultWaitForShutdown() {
14032
- return new Promise((resolve) => {
14033
- const onSignal = (signal) => {
14034
- process.off("SIGINT", onSignal);
14035
- process.off("SIGTERM", onSignal);
14036
- resolve(signal);
14037
- };
14038
- process.once("SIGINT", onSignal);
14039
- process.once("SIGTERM", onSignal);
14040
- });
14041
- }
14042
14032
  function resolveRunnerEntry() {
14043
14033
  let here;
14044
14034
  try {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  runRunnerDaemonEntry
3
- } from "./chunk-OT72W4DD.js";
4
- import "./chunk-HQWVYIYF.js";
3
+ } from "./chunk-VETXW62U.js";
4
+ import "./chunk-ANYY7XRT.js";
5
5
  import "./chunk-USK5VSQ7.js";
6
6
  import "./chunk-QVRTU2MM.js";
7
7
  import "./chunk-PZ5AY32C.js";
package/dist/runner.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  runRunnerDaemonEntry
3
- } from "./chunk-OT72W4DD.js";
4
- import "./chunk-HQWVYIYF.js";
3
+ } from "./chunk-VETXW62U.js";
4
+ import "./chunk-ANYY7XRT.js";
5
5
  import "./chunk-USK5VSQ7.js";
6
6
  import "./chunk-QVRTU2MM.js";
7
7
  import "./chunk-PZ5AY32C.js";
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "hooks",
18
18
  "dashboard"
19
19
  ],
20
- "version": "0.6.1",
20
+ "version": "0.6.2",
21
21
  "license": "MIT",
22
22
  "bin": {
23
23
  "athena": "dist/cli.js",