@zixt/host 0.0.37 → 0.0.38
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/dist/index.js +12 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import { homedir } from "node:os";
|
|
|
31
31
|
// package.json
|
|
32
32
|
var package_default = {
|
|
33
33
|
name: "@zixt/host",
|
|
34
|
-
version: "0.0.
|
|
34
|
+
version: "0.0.38",
|
|
35
35
|
type: "module",
|
|
36
36
|
exports: {
|
|
37
37
|
".": "./src/client.ts",
|
|
@@ -19476,6 +19476,15 @@ function createWorkerWatchdogSendDrain() {
|
|
|
19476
19476
|
}
|
|
19477
19477
|
};
|
|
19478
19478
|
}
|
|
19479
|
+
function finishWorkerProcess(exitCode, runtime = process) {
|
|
19480
|
+
runtime.exitCode = exitCode;
|
|
19481
|
+
if (runtime.connected && typeof runtime.disconnect === "function") {
|
|
19482
|
+
try {
|
|
19483
|
+
runtime.disconnect();
|
|
19484
|
+
} catch {
|
|
19485
|
+
}
|
|
19486
|
+
}
|
|
19487
|
+
}
|
|
19479
19488
|
function startWorkerWatchdogHeartbeat(env = process.env, argv = process.argv.slice(2)) {
|
|
19480
19489
|
const ownership = consumeWorkerOwnershipArguments(argv, env);
|
|
19481
19490
|
const nonce = env[WORKER_WATCHDOG_NONCE_ENV];
|
|
@@ -37551,11 +37560,11 @@ function shutdown(exitCode = 0) {
|
|
|
37551
37560
|
const recoveringLiveRuns = activeSessions > 0;
|
|
37552
37561
|
setTimeout(
|
|
37553
37562
|
() => {
|
|
37554
|
-
|
|
37563
|
+
finishWorkerProcess(recoveringLiveRuns ? 1 : exitCode);
|
|
37555
37564
|
},
|
|
37556
37565
|
recoveringLiveRuns ? 3e4 : 2e3
|
|
37557
37566
|
).unref();
|
|
37558
|
-
void workerWatchdog.stop().then(() => client.stop()).then(() =>
|
|
37567
|
+
void workerWatchdog.stop().then(() => client.stop()).then(() => finishWorkerProcess(exitCode));
|
|
37559
37568
|
}
|
|
37560
37569
|
stopUpdateWatch = !packagedBuild ? () => {
|
|
37561
37570
|
} : watchForUpdates({
|