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
- launcherPid: positivePid(env.LIVEDESK_CLIENT_PARENT_PID),
247
- agentPid: positivePid(env.LIVEDESK_CLIENT_UPDATE_AGENT_PID),
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
- if (!config.operationId
1532
- || !config.deviceId
1533
- || !config.targetProductVersion
1534
- || !config.targetVersion
1535
- || !config.currentProductVersion
1536
- || !config.currentAgentVersion
1537
- || config.launcherPid <= 1
1538
- || config.agentPid <= 1) {
1539
- throw new Error('legacy update configuration is incomplete');
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "livedesk",
3
- "version": "0.1.398",
3
+ "version": "0.1.399",
4
4
  "livedeskClientVersion": "0.1.173",
5
5
  "buildFlavor": "production",
6
6
  "description": "LiveDesk Hub and client launcher",