omnius 1.0.968 → 1.0.970
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 +2 -2
- package/dist/launcher.cjs +116 -14
- package/dist/update-worker-runtime.js +46 -8
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/index.js
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 43070413 bytes
|
|
4
|
+
sha256: e6f6c9c3848b594d7fc43739457a236cd1751bea909c66e6d77b8a84583668e9
|
package/dist/launcher.cjs
CHANGED
|
@@ -6,9 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
const { spawn, spawnSync } = require('node:child_process');
|
|
8
8
|
const { createHash } = require('node:crypto');
|
|
9
|
-
const { existsSync, lstatSync, readFileSync, realpathSync } = require('node:fs');
|
|
9
|
+
const { existsSync, lstatSync, readdirSync, readFileSync, realpathSync } = require('node:fs');
|
|
10
10
|
const { dirname, isAbsolute, join, resolve } = require('node:path');
|
|
11
11
|
|
|
12
|
+
// Leave systemd's 120-second main-process stop timeout enough time to
|
|
13
|
+
// observe exit after the daemon's own grace period expires.
|
|
14
|
+
const DAEMON_STOP_GRACE_MS = 110_000;
|
|
15
|
+
const DAEMON_FORCED_SHUTDOWN = 124;
|
|
16
|
+
|
|
12
17
|
function resetTerminal() {
|
|
13
18
|
// Disable reporting before canonical/ECHO mode returns. Reversing this order
|
|
14
19
|
// lets buffered pointer reports appear as literal ESC[<35;x;yM text.
|
|
@@ -119,10 +124,43 @@ function readHandoff(path, token, expectedPid, runtime = process) {
|
|
|
119
124
|
};
|
|
120
125
|
}
|
|
121
126
|
|
|
127
|
+
function linuxProcessIdentity(pid) {
|
|
128
|
+
try {
|
|
129
|
+
const stat = readFileSync(`/proc/${pid}/stat`, 'utf8');
|
|
130
|
+
const fields = stat.slice(stat.lastIndexOf(')') + 2).split(' ');
|
|
131
|
+
if (fields[0] !== 'Z' && /^\d+$/.test(fields[19])) {
|
|
132
|
+
return { pid, parent: Number(fields[1]), group: Number(fields[2]), session: Number(fields[3]), started: fields[19] };
|
|
133
|
+
}
|
|
134
|
+
} catch {}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function linuxDaemonGroupIdentity(pid, parentPid) {
|
|
138
|
+
const owner = linuxProcessIdentity(pid);
|
|
139
|
+
return owner?.parent === parentPid && owner.group === pid && owner.session === pid ? owner : undefined;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function linuxDaemonGroupMembers(owner) {
|
|
143
|
+
try {
|
|
144
|
+
const members = readdirSync('/proc').filter(entry => /^\d+$/.test(entry)).map(entry => linuxProcessIdentity(Number(entry)))
|
|
145
|
+
.filter(member => member && member.pid !== owner.pid && member.group === owner.pid && member.session === owner.pid);
|
|
146
|
+
// The group must belong to our original child throughout the scan.
|
|
147
|
+
if (linuxDaemonGroupIdentity(owner.pid, owner.parent)?.started === owner.started) return members;
|
|
148
|
+
} catch {}
|
|
149
|
+
return [];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function linuxDaemonGroupHasMember(owner, members) {
|
|
153
|
+
return members.some(record => {
|
|
154
|
+
const member = linuxProcessIdentity(record.pid);
|
|
155
|
+
return member?.started === record.started && member.group === owner.pid && member.session === owner.pid;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
122
159
|
function startLauncher(options = {}) {
|
|
123
160
|
const runtime = options.process || process;
|
|
124
161
|
const spawnChild = options.spawn || spawn;
|
|
125
162
|
const delay = options.setTimeout || setTimeout;
|
|
163
|
+
const clearDelay = options.clearTimeout || clearTimeout;
|
|
126
164
|
const reset = options.resetTerminal || resetTerminal;
|
|
127
165
|
let launch = {
|
|
128
166
|
entry: options.entry || resolve(__dirname, 'index.js'),
|
|
@@ -139,11 +177,69 @@ function startLauncher(options = {}) {
|
|
|
139
177
|
}
|
|
140
178
|
}
|
|
141
179
|
let child;
|
|
180
|
+
let daemonGroup = false;
|
|
181
|
+
let daemonGroupIdentity;
|
|
182
|
+
let stoppingSignal = null;
|
|
183
|
+
let shutdown;
|
|
142
184
|
let nextLaunch = null;
|
|
143
185
|
let nextToken = null;
|
|
144
186
|
|
|
145
|
-
const
|
|
146
|
-
|
|
187
|
+
const finishBySignal = signal => {
|
|
188
|
+
reset();
|
|
189
|
+
runtime.removeListener('SIGINT', onInterrupt);
|
|
190
|
+
runtime.removeListener('SIGTERM', onTerminate);
|
|
191
|
+
runtime.kill(runtime.pid, signal);
|
|
192
|
+
};
|
|
193
|
+
const finishChild = (code, signal) => {
|
|
194
|
+
if (shutdown) {
|
|
195
|
+
clearDelay(shutdown.deadline);
|
|
196
|
+
if (shutdown.poll) clearDelay(shutdown.poll);
|
|
197
|
+
if (shutdown.forcedAt !== undefined) {
|
|
198
|
+
reset();
|
|
199
|
+
runtime.exit(DAEMON_FORCED_SHUTDOWN);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (signal) return finishBySignal(signal);
|
|
204
|
+
if (code === 120 && stoppingSignal) return finishBySignal(stoppingSignal);
|
|
205
|
+
reset();
|
|
206
|
+
runtime.exit(typeof code === 'number' ? code : 1);
|
|
207
|
+
};
|
|
208
|
+
const waitForStoppedGroup = () => {
|
|
209
|
+
const stop = shutdown;
|
|
210
|
+
if (!stop?.exited) return;
|
|
211
|
+
if (stop.owner && linuxDaemonGroupHasMember(stop.owner, stop.members) &&
|
|
212
|
+
(stop.forcedAt === undefined || Date.now() - stop.forcedAt < 5_000)) {
|
|
213
|
+
stop.poll = delay(waitForStoppedGroup, 100);
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
finishChild(stop.exited.code, stop.exited.signal);
|
|
217
|
+
};
|
|
218
|
+
const forward = signal => {
|
|
219
|
+
stoppingSignal ??= signal;
|
|
220
|
+
const stoppingChild = child;
|
|
221
|
+
if (!stoppingChild) {
|
|
222
|
+
if (!shutdown?.exited) finishBySignal(stoppingSignal);
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
if (daemonGroup && stoppingChild.pid > 0 && !shutdown) {
|
|
226
|
+
const owner = daemonGroupIdentity;
|
|
227
|
+
const stop = { owner, members: owner ? linuxDaemonGroupMembers(owner) : [] };
|
|
228
|
+
shutdown = stop;
|
|
229
|
+
stop.deadline = delay(() => {
|
|
230
|
+
const leader = child === stoppingChild && stoppingChild.exitCode == null && stoppingChild.signalCode == null;
|
|
231
|
+
const groupVerified = owner && (leader && linuxDaemonGroupIdentity(owner.pid, runtime.pid)?.started === owner.started ||
|
|
232
|
+
linuxDaemonGroupHasMember(owner, stop.members));
|
|
233
|
+
if (!groupVerified && (!leader || owner)) return;
|
|
234
|
+
stop.forcedAt = Date.now();
|
|
235
|
+
runtime.stderr.write('Omnius daemon shutdown exceeded its grace period. Stopping the daemon and its attached workers.\n');
|
|
236
|
+
if (groupVerified) {
|
|
237
|
+
try { runtime.kill(-owner.pid, 'SIGKILL'); return; } catch {}
|
|
238
|
+
}
|
|
239
|
+
if (leader) try { stoppingChild.kill('SIGKILL'); } catch {}
|
|
240
|
+
}, DAEMON_STOP_GRACE_MS);
|
|
241
|
+
}
|
|
242
|
+
try { stoppingChild.kill(signal); } catch {}
|
|
147
243
|
};
|
|
148
244
|
const onInterrupt = () => forward('SIGINT');
|
|
149
245
|
const onTerminate = () => forward('SIGTERM');
|
|
@@ -151,10 +247,17 @@ function startLauncher(options = {}) {
|
|
|
151
247
|
runtime.on('SIGTERM', onTerminate);
|
|
152
248
|
|
|
153
249
|
function runChild() {
|
|
250
|
+
if (stoppingSignal) return;
|
|
154
251
|
const boot = packageIdentity(launch.entry);
|
|
252
|
+
// Own a service process group without changing foreground terminal
|
|
253
|
+
// behavior. Detached /v1/run jobs keep their own process groups and
|
|
254
|
+
// remain eligible for graceful handoff across daemon replacements.
|
|
255
|
+
daemonGroup = runtime.platform === 'linux' && launch.env.OMNIUS_DAEMON === '1' &&
|
|
256
|
+
launch.argv[0] === 'serve' && launch.argv.includes('--daemon');
|
|
155
257
|
const childProc = spawnChild(runtime.execPath, [...launch.execArgv, launch.entry, ...launch.argv], {
|
|
156
258
|
stdio: ['inherit', 'inherit', 'inherit', 'ipc'], cwd: launch.cwd,
|
|
157
259
|
env: { ...launch.env, OMNIUS_LAUNCHER_PROTOCOL: '2' },
|
|
260
|
+
...(daemonGroup ? { detached: true } : {}),
|
|
158
261
|
});
|
|
159
262
|
// Launch markers are one-use. A later legacy exit120 must not replay a
|
|
160
263
|
// checkpoint already consumed by the child that is now running.
|
|
@@ -162,6 +265,7 @@ function startLauncher(options = {}) {
|
|
|
162
265
|
delete launch.env.__OMNIUS_UPDATE_HANDOFF_TOKEN;
|
|
163
266
|
delete launch.env.__OMNIUS_RESUMED;
|
|
164
267
|
child = childProc;
|
|
268
|
+
daemonGroupIdentity = daemonGroup && childProc.pid > 0 ? linuxDaemonGroupIdentity(childProc.pid, runtime.pid) : undefined;
|
|
165
269
|
nextLaunch = null;
|
|
166
270
|
nextToken = null;
|
|
167
271
|
childProc.on('message', message => {
|
|
@@ -173,6 +277,7 @@ function startLauncher(options = {}) {
|
|
|
173
277
|
if (child !== childProc || message?.type !== 'omnius:update-restart') return;
|
|
174
278
|
let error;
|
|
175
279
|
try {
|
|
280
|
+
if (stoppingSignal) throw new Error('Omnius launcher is shutting down');
|
|
176
281
|
const proposed = readHandoff(message.path, message.token, childProc.pid, runtime);
|
|
177
282
|
if (!newerVersion(proposed.version, boot.version)) throw new Error('Update restart target is not newer than the running version');
|
|
178
283
|
nextLaunch = proposed;
|
|
@@ -189,15 +294,14 @@ function startLauncher(options = {}) {
|
|
|
189
294
|
});
|
|
190
295
|
|
|
191
296
|
childProc.on('exit', (code, signal) => {
|
|
192
|
-
if (
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
runtime.kill(runtime.pid, signal);
|
|
297
|
+
if (child !== childProc) return;
|
|
298
|
+
child = undefined;
|
|
299
|
+
if (shutdown) {
|
|
300
|
+
shutdown.exited = { code, signal };
|
|
301
|
+
waitForStoppedGroup();
|
|
198
302
|
return;
|
|
199
303
|
}
|
|
200
|
-
if (code === 120) {
|
|
304
|
+
if (!signal && code === 120 && !stoppingSignal) {
|
|
201
305
|
// Older children know only exit120. A changed installed version is the
|
|
202
306
|
// required boundary; same-version exits cannot form a restart loop.
|
|
203
307
|
const disk = packageIdentity(launch.entry);
|
|
@@ -212,8 +316,7 @@ function startLauncher(options = {}) {
|
|
|
212
316
|
}
|
|
213
317
|
runtime.stderr.write('Omnius refused a same-version update restart; saved work remains on disk.\n');
|
|
214
318
|
}
|
|
215
|
-
|
|
216
|
-
runtime.exit(typeof code === 'number' ? code : 1);
|
|
319
|
+
finishChild(code, signal);
|
|
217
320
|
});
|
|
218
321
|
}
|
|
219
322
|
|
|
@@ -225,10 +328,9 @@ function startLauncher(options = {}) {
|
|
|
225
328
|
runtime.exit(1);
|
|
226
329
|
return;
|
|
227
330
|
}
|
|
228
|
-
const clearDelay = options.clearTimeout || clearTimeout;
|
|
229
331
|
const timer = delay(() => runtime.exit(1), 120_000);
|
|
230
332
|
const onStart = message => {
|
|
231
|
-
if (message?.type !== 'omnius:update-wrapper-start' || message.token !== launch.token) return;
|
|
333
|
+
if (stoppingSignal || message?.type !== 'omnius:update-wrapper-start' || message.token !== launch.token) return;
|
|
232
334
|
runtime.removeListener('message', onStart);
|
|
233
335
|
clearDelay(timer);
|
|
234
336
|
delete launch.env.__OMNIUS_UPDATE_WAIT_FOR_PARENT;
|
|
@@ -304313,6 +304313,21 @@ var init_daemon_supervision = __esm({
|
|
|
304313
304313
|
}
|
|
304314
304314
|
});
|
|
304315
304315
|
|
|
304316
|
+
// packages/cli/src/daemon-checkpoint-interrupted.ts
|
|
304317
|
+
var DaemonCheckpointInterruptedError;
|
|
304318
|
+
var init_daemon_checkpoint_interrupted = __esm({
|
|
304319
|
+
"packages/cli/src/daemon-checkpoint-interrupted.ts"() {
|
|
304320
|
+
DaemonCheckpointInterruptedError = class extends Error {
|
|
304321
|
+
constructor(listenerReleased) {
|
|
304322
|
+
super(listenerReleased ? "The daemon released its listener before completing its shutdown checkpoint. The installer was held." : "The service stop interrupted the daemon shutdown checkpoint, and the listener is still occupied. The installer was held.");
|
|
304323
|
+
this.listenerReleased = listenerReleased;
|
|
304324
|
+
this.name = "DaemonCheckpointInterruptedError";
|
|
304325
|
+
}
|
|
304326
|
+
listenerReleased;
|
|
304327
|
+
};
|
|
304328
|
+
}
|
|
304329
|
+
});
|
|
304330
|
+
|
|
304316
304331
|
// packages/cli/src/daemon-service-authorization.ts
|
|
304317
304332
|
var DaemonServiceAuthorizationError;
|
|
304318
304333
|
var init_daemon_service_authorization = __esm({
|
|
@@ -304454,6 +304469,22 @@ async function runDaemonServiceControl(scope, args, timeoutMs = 2e4, run2 = runD
|
|
|
304454
304469
|
}
|
|
304455
304470
|
return result;
|
|
304456
304471
|
}
|
|
304472
|
+
async function stopManagedDaemonForUpdate(service, listenerStopped, run2) {
|
|
304473
|
+
const stop = await runDaemonServiceControl(service.scope, ["stop", service.unit], DAEMON_SERVICE_COMMAND_TIMEOUT_MS, run2);
|
|
304474
|
+
const status = await runDaemonServiceControl(service.scope, [
|
|
304475
|
+
"show",
|
|
304476
|
+
service.unit,
|
|
304477
|
+
"--property=LoadState,ActiveState,MainPID,Job,Result,ExecMainCode,ExecMainStatus"
|
|
304478
|
+
], 5e3, run2);
|
|
304479
|
+
if (status.code !== 0) return false;
|
|
304480
|
+
const properties = Object.fromEntries(status.stdout.trimEnd().split(/\r?\n/).map((line) => line.split("=", 2)));
|
|
304481
|
+
if (properties.LoadState !== "loaded" || properties.ActiveState !== "inactive" && properties.ActiveState !== "failed" || properties.MainPID !== "0" || properties.Job !== "") return false;
|
|
304482
|
+
const alreadyStopped = service.active === "inactive" || service.active === "failed";
|
|
304483
|
+
const exitedCleanly = properties.Result === "success" && properties.ExecMainCode === "1" && properties.ExecMainStatus === "0";
|
|
304484
|
+
const listenerReleased = await listenerStopped();
|
|
304485
|
+
if (stop.code === 0 && (alreadyStopped || exitedCleanly)) return listenerReleased;
|
|
304486
|
+
throw new DaemonCheckpointInterruptedError(listenerReleased);
|
|
304487
|
+
}
|
|
304457
304488
|
function quote(value) {
|
|
304458
304489
|
if (/[\r\n\0]/.test(value)) throw new Error("Service values must not contain control characters");
|
|
304459
304490
|
return `"${value.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/%/g, "%%")}"`;
|
|
@@ -304630,6 +304661,7 @@ async function daemonServiceAction(action, scope) {
|
|
|
304630
304661
|
var DAEMON_SERVICE_UNIT, DAEMON_SERVICE_STOP_GRACE_MS, DAEMON_SERVICE_COMMAND_TIMEOUT_MS, runDaemonServiceCommand, daemonEnvironmentModule;
|
|
304631
304662
|
var init_daemon_service = __esm({
|
|
304632
304663
|
"packages/cli/src/daemon-service.ts"() {
|
|
304664
|
+
init_daemon_checkpoint_interrupted();
|
|
304633
304665
|
init_daemon_service_authorization();
|
|
304634
304666
|
DAEMON_SERVICE_UNIT = "omnius-daemon.service";
|
|
304635
304667
|
DAEMON_SERVICE_STOP_GRACE_MS = 12e4;
|
|
@@ -305318,7 +305350,9 @@ async function stopDaemonAtPort(port = getDaemonPort(), dependencies) {
|
|
|
305318
305350
|
async function quiesceDaemonForUpdate(port = getDaemonPort(), scope) {
|
|
305319
305351
|
const managed = scope === null ? null : await discoverDaemonServiceAtPort(port, scope);
|
|
305320
305352
|
if (scope && !managed) return false;
|
|
305321
|
-
|
|
305353
|
+
const dependencies = daemonStopDependencies(managed);
|
|
305354
|
+
if (managed) dependencies.stopManagedService = () => stopManagedDaemonForUpdate(managed, () => waitForDaemonStopped(port));
|
|
305355
|
+
return stopDaemonAtPort(port, dependencies);
|
|
305322
305356
|
}
|
|
305323
305357
|
var OMNIUS_DIR, PID_FILE, DEFAULT_PORT2, LOCK_INITIALIZATION_GRACE_MS, DAEMON_GRACEFUL_STOP_ATTEMPTS, DEFAULT_RECLAIM_DEPENDENCIES, DEFAULT_CLAIM_RECLAIM_DEPENDENCIES, daemonStopDependencies;
|
|
305324
305358
|
var init_daemon = __esm({
|
|
@@ -305446,6 +305480,7 @@ function compareOmniusVersions(left, right) {
|
|
|
305446
305480
|
}
|
|
305447
305481
|
|
|
305448
305482
|
// packages/cli/src/update-service.ts
|
|
305483
|
+
init_daemon_checkpoint_interrupted();
|
|
305449
305484
|
init_daemon_service_authorization();
|
|
305450
305485
|
|
|
305451
305486
|
// packages/cli/src/user-systemd-environment.ts
|
|
@@ -306525,7 +306560,7 @@ async function quiesceDaemonWithRetry(quiesce, attempts = 3, pauseMs = 250) {
|
|
|
306525
306560
|
try {
|
|
306526
306561
|
if (await quiesce()) return true;
|
|
306527
306562
|
} catch (error) {
|
|
306528
|
-
if (error instanceof DaemonServiceAuthorizationError) throw error;
|
|
306563
|
+
if (error instanceof DaemonServiceAuthorizationError || error instanceof DaemonCheckpointInterruptedError) throw error;
|
|
306529
306564
|
}
|
|
306530
306565
|
if (attempt < boundedAttempts && pauseMs > 0) {
|
|
306531
306566
|
await new Promise((resolve13) => setTimeout(resolve13, pauseMs));
|
|
@@ -306854,6 +306889,8 @@ async function runVerifiedUpdateTransaction(initial, dependencies, paths = resol
|
|
|
306854
306889
|
let packageRecoveryNote;
|
|
306855
306890
|
let restoredPackageVerified = false;
|
|
306856
306891
|
let rolledBack = false;
|
|
306892
|
+
const interruptedAfterRelease = error instanceof DaemonCheckpointInterruptedError && error.listenerReleased;
|
|
306893
|
+
const unchangedPackage = interruptedAfterRelease ? previousInstallation : void 0;
|
|
306857
306894
|
if (installStarted && installerSettled && !packageVerified && installLease && previousInstallation) {
|
|
306858
306895
|
state = await transition(state, { phase: "recovering" }, paths);
|
|
306859
306896
|
const journal = (recovery) => ({
|
|
@@ -306952,10 +306989,10 @@ async function runVerifiedUpdateTransaction(initial, dependencies, paths = resol
|
|
|
306952
306989
|
packageRecoveryNote = `Rollback could not be verified: ${detail}`;
|
|
306953
306990
|
}
|
|
306954
306991
|
}
|
|
306955
|
-
if ((daemonQuiesced || rolledBack) && dependencies.recoverDaemon && installerSettled && (!installStarted || packageVerified || restoredPackageVerified)) {
|
|
306992
|
+
if ((daemonQuiesced || rolledBack || unchangedPackage) && dependencies.recoverDaemon && installerSettled && (!installStarted || packageVerified || restoredPackageVerified)) {
|
|
306956
306993
|
state = await transition(state, { phase: "recovering" }, paths);
|
|
306957
306994
|
try {
|
|
306958
|
-
const recovered = await dependencies.recoverDaemon();
|
|
306995
|
+
const recovered = await dependencies.recoverDaemon(unchangedPackage && { version: unchangedPackage.version, packageHash: unchangedPackage.packageHash });
|
|
306959
306996
|
recoveryNote = recovered ? "The daemon was restarted after the interrupted update." : "The daemon could not be recovered automatically after the failed update.";
|
|
306960
306997
|
if (rolledBack && state.tray_was_running && dependencies.restartTray && state.global_executable) {
|
|
306961
306998
|
recoveryNote += await dependencies.restartTray(state.global_executable).catch(() => false) ? " The indicator was relaunched on the restored version." : " The indicator could not be relaunched on the restored version.";
|
|
@@ -306963,7 +307000,7 @@ async function runVerifiedUpdateTransaction(initial, dependencies, paths = resol
|
|
|
306963
307000
|
} catch (recoveryError) {
|
|
306964
307001
|
recoveryNote = `Daemon recovery failed: ${recoveryError instanceof Error ? recoveryError.message : String(recoveryError)}`;
|
|
306965
307002
|
}
|
|
306966
|
-
} else if (daemonQuiesced && dependencies.recoverDaemon) {
|
|
307003
|
+
} else if ((daemonQuiesced || interruptedAfterRelease) && dependencies.recoverDaemon) {
|
|
306967
307004
|
recoveryNote = "Daemon recovery was held because the installed runtime could not be verified.";
|
|
306968
307005
|
}
|
|
306969
307006
|
state = await transition(state, {
|
|
@@ -308022,9 +308059,10 @@ async function runUpdateWorkerRuntime(state, paths, endpoint) {
|
|
|
308022
308059
|
return quiesceDaemonForUpdate(port, daemonScope);
|
|
308023
308060
|
},
|
|
308024
308061
|
restartDaemon: (expected, executable) => restartDaemon(port, expected, executable, daemonScope),
|
|
308025
|
-
recoverDaemon: async () => {
|
|
308026
|
-
await restartDaemon(port,
|
|
308027
|
-
|
|
308062
|
+
recoverDaemon: async (unchangedPackage) => {
|
|
308063
|
+
await restartDaemon(port, unchangedPackage?.version, void 0, daemonScope);
|
|
308064
|
+
const ready = await getDaemonReportedIdentity(port);
|
|
308065
|
+
return Boolean(ready && (!unchangedPackage || ready.bootVersion === unchangedPackage.version && ready.bootPackageHash === unchangedPackage.packageHash));
|
|
308028
308066
|
},
|
|
308029
308067
|
observeDaemon: async () => {
|
|
308030
308068
|
const identity = await getDaemonReportedIdentity(port);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.970",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.970",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "CC-BY-NC-4.0",
|
|
12
12
|
"dependencies": {
|
|
@@ -8383,9 +8383,9 @@
|
|
|
8383
8383
|
}
|
|
8384
8384
|
},
|
|
8385
8385
|
"node_modules/node-abi": {
|
|
8386
|
-
"version": "3.
|
|
8387
|
-
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.
|
|
8388
|
-
"integrity": "sha512-
|
|
8386
|
+
"version": "3.104.0",
|
|
8387
|
+
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.104.0.tgz",
|
|
8388
|
+
"integrity": "sha512-J2lVAHTQ8v1J7hl2k1eX70d/Fm+HE1EyUes2dOew59JgBlAW6NB7DABI8kdrgRPehhepJd18p1ivekA8BF7AOg==",
|
|
8389
8389
|
"license": "MIT",
|
|
8390
8390
|
"dependencies": {
|
|
8391
8391
|
"semver": "^7.3.5"
|
package/package.json
CHANGED