thinkpool-pair 0.7.294 → 0.7.295
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/bridge.mjs +3 -3
- package/launcher.mjs +10 -1
- package/package.json +1 -1
package/bridge.mjs
CHANGED
|
@@ -348,9 +348,9 @@ if ((!argv[0] || argv[0] === 'setup') && process.stdin.isTTY) {
|
|
|
348
348
|
child.on('exit', (code) => process.exit(code == null ? 0 : code))
|
|
349
349
|
}),
|
|
350
350
|
serveAccountForeground: async () => { const { runAccount } = await import('./account.mjs'); await runAccount(SUPABASE_URL, SUPABASE_ANON) },
|
|
351
|
-
// install / uninstall
|
|
352
|
-
//
|
|
353
|
-
//
|
|
351
|
+
// install / uninstall are NOT terminal — they do their work, print their notes,
|
|
352
|
+
// and return to the menu. A confirmed update closes the launcher instead: its
|
|
353
|
+
// in-memory package version is stale while the new service runs independently.
|
|
354
354
|
installService: ({ room = null, agentCmd } = {}) => { svc.installService(room, agentCmd ? [agentCmd] : []) },
|
|
355
355
|
uninstallService: ({ room = null } = {}) => { svc.uninstallService(room) },
|
|
356
356
|
restartService: ({ room = null } = {}) => { svc.restartService(room) },
|
package/launcher.mjs
CHANGED
|
@@ -278,7 +278,16 @@ export async function runLauncher({ actions, io, state = detectState(), refresh
|
|
|
278
278
|
if (pick.key === 'quit') return
|
|
279
279
|
if (pick.key === 'serve') { if (await ensureLoggedIn()) await actions.serveAccountForeground() }
|
|
280
280
|
else if (pick.key === 'service') { if (await ensureLoggedIn()) { await actions.installService({ room: null }); resync() } }
|
|
281
|
-
else if (pick.key === 'restart') {
|
|
281
|
+
else if (pick.key === 'restart') {
|
|
282
|
+
const updated = await actions.restartUpdateService({ room: null })
|
|
283
|
+
// The launcher process cannot update its own in-memory VERSION. Returning to
|
|
284
|
+
// the menu after a successful service update therefore showed the old launcher
|
|
285
|
+
// version beside the new managed-service version and ended on a misleading
|
|
286
|
+
// "press Enter" pause. The service is already independently running, so close
|
|
287
|
+
// this stale installer process once the OS-level update is confirmed.
|
|
288
|
+
if (updated === true) return
|
|
289
|
+
resync()
|
|
290
|
+
}
|
|
282
291
|
else if (pick.key === 'uninstall') { await actions.uninstallService({ room: null }); resync() }
|
|
283
292
|
else if (pick.key === 'settings') await settingsMenu()
|
|
284
293
|
await io.ask('\n ' + C.dim('press Enter to return to the menu…'))
|