livedesk 0.1.270 → 0.1.271
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/hub/src/live-desk-update.js +18 -2
- package/package.json +1 -1
|
@@ -324,7 +324,23 @@ export function createLiveDeskUpdateManager({
|
|
|
324
324
|
if (needsHubRestart && !restartSupported) {
|
|
325
325
|
return { ok: false, error: 'Hub launcher restart is unavailable. Start LiveDesk through npx livedesk@latest.', ...getStatus() };
|
|
326
326
|
}
|
|
327
|
-
|
|
327
|
+
if (managerNeedsUpdate) {
|
|
328
|
+
run = {
|
|
329
|
+
operationId: randomUUID(),
|
|
330
|
+
state: 'dispatching',
|
|
331
|
+
startedAt: new Date(now()).toISOString(),
|
|
332
|
+
updatedAt: new Date(now()).toISOString(),
|
|
333
|
+
latestManagerVersion: release.latestManagerVersion,
|
|
334
|
+
latestClientVersion: release.latestClientVersion,
|
|
335
|
+
needsHubRestart: true,
|
|
336
|
+
error: '',
|
|
337
|
+
targets: []
|
|
338
|
+
};
|
|
339
|
+
requestRestart();
|
|
340
|
+
return { ok: true, ...getStatus() };
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const targets = outdatedClients;
|
|
328
344
|
const credentials = remoteHub.getStatus({ includeSecrets: true });
|
|
329
345
|
run = {
|
|
330
346
|
operationId: randomUUID(),
|
|
@@ -333,7 +349,7 @@ export function createLiveDeskUpdateManager({
|
|
|
333
349
|
updatedAt: new Date(now()).toISOString(),
|
|
334
350
|
latestManagerVersion: release.latestManagerVersion,
|
|
335
351
|
latestClientVersion: release.latestClientVersion,
|
|
336
|
-
needsHubRestart,
|
|
352
|
+
needsHubRestart: false,
|
|
337
353
|
error: '',
|
|
338
354
|
targets: targets.map(device => ({
|
|
339
355
|
deviceId: String(device.deviceId || ''),
|