livedesk 0.1.398 → 0.1.399
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.
|
@@ -243,8 +243,18 @@ function readConfig(env = process.env) {
|
|
|
243
243
|
cleanVersion(env.LIVEDESK_CLIENT_UPDATE_CURRENT_PRODUCT_VERSION)
|
|
244
244
|
|| cleanVersion(env.LIVEDESK_NPM_LAUNCHER_VERSION),
|
|
245
245
|
currentAgentVersion: cleanVersion(env.LIVEDESK_CLIENT_UPDATE_CURRENT_AGENT_VERSION),
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
// Dedicated RemoteFast and Node Agent handoffs freeze the owned process
|
|
247
|
+
// tree under UPDATE_WAIT_PID / UPDATE_AGENT_PID. The Hub-owned bridge for
|
|
248
|
+
// older Agents uses the CLIENT_* aliases. Accept both contracts so the
|
|
249
|
+
// exact target package can always prove and stop the same old runtime.
|
|
250
|
+
launcherPid: positivePid(
|
|
251
|
+
env.LIVEDESK_UPDATE_WAIT_PID
|
|
252
|
+
|| env.LIVEDESK_CLIENT_PARENT_PID
|
|
253
|
+
),
|
|
254
|
+
agentPid: positivePid(
|
|
255
|
+
env.LIVEDESK_UPDATE_AGENT_PID
|
|
256
|
+
|| env.LIVEDESK_CLIENT_UPDATE_AGENT_PID
|
|
257
|
+
),
|
|
248
258
|
starterPid: positivePid(env.LIVEDESK_UPDATE_STARTER_PID),
|
|
249
259
|
updateDeadlineEpochMs: Number(env.LIVEDESK_CLIENT_UPDATE_DEADLINE_EPOCH_MS),
|
|
250
260
|
runtimePort: normalizePort(env.LIVEDESK_CLIENT_RUNTIME_PORT || env.LIVEDESK_LOCAL_RUNTIME_PORT),
|
|
@@ -1528,15 +1538,20 @@ export async function runLegacyClientUpdateSupervisor(options = {}) {
|
|
|
1528
1538
|
));
|
|
1529
1539
|
|
|
1530
1540
|
log(`started operation=${config.operationId || 'unknown'} target=${config.targetProductVersion}/${config.targetVersion} current=${config.currentProductVersion || 'unknown'} device=${config.deviceId}`);
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1541
|
+
const missingConfiguration = [
|
|
1542
|
+
['operationId', config.operationId],
|
|
1543
|
+
['deviceId', config.deviceId],
|
|
1544
|
+
['targetProductVersion', config.targetProductVersion],
|
|
1545
|
+
['targetVersion', config.targetVersion],
|
|
1546
|
+
['currentProductVersion', config.currentProductVersion],
|
|
1547
|
+
['currentAgentVersion', config.currentAgentVersion],
|
|
1548
|
+
['launcherPid', config.launcherPid > 1],
|
|
1549
|
+
['agentPid', config.agentPid > 1]
|
|
1550
|
+
].filter(([, value]) => !value).map(([name]) => name);
|
|
1551
|
+
if (missingConfiguration.length > 0) {
|
|
1552
|
+
throw new Error(
|
|
1553
|
+
`legacy update configuration is incomplete: missing ${missingConfiguration.join(', ')}`
|
|
1554
|
+
);
|
|
1540
1555
|
}
|
|
1541
1556
|
ensureDeadline('configuration validation');
|
|
1542
1557
|
if (cleanVersion(productManifest.version) !== config.targetProductVersion) {
|