@rubytech/taskmaster 1.0.58 → 1.0.60
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/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { loadConfig } from "../../config/config.js";
|
|
2
2
|
import { resolveTaskmasterPackageRoot } from "../../infra/taskmaster-root.js";
|
|
3
|
-
import { scheduleGatewaySigusr1Restart } from "../../infra/restart.js";
|
|
3
|
+
import { scheduleGatewaySigusr1Restart, triggerTaskmasterRestart, } from "../../infra/restart.js";
|
|
4
4
|
import { formatDoctorNonInteractiveHint, readRestartSentinel, writeRestartSentinel, } from "../../infra/restart-sentinel.js";
|
|
5
5
|
import { checkUpdateStatus, compareSemverStrings } from "../../infra/update-check.js";
|
|
6
6
|
import { normalizeUpdateChannel, resolveEffectiveUpdateChannel, } from "../../infra/update-channels.js";
|
|
@@ -222,10 +222,30 @@ export const updateHandlers = {
|
|
|
222
222
|
status: result.status,
|
|
223
223
|
reason: result.reason ?? null,
|
|
224
224
|
});
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
225
|
+
// Global installs replace files on disk — need a full daemon restart
|
|
226
|
+
// (in-process SIGUSR1 restart keeps stale module cache).
|
|
227
|
+
// Git installs rebuild in-place and benefit from the fast in-process restart.
|
|
228
|
+
const isGlobalInstall = result.mode === "npm" || result.mode === "pnpm" || result.mode === "bun";
|
|
229
|
+
let restart;
|
|
230
|
+
if (isGlobalInstall && result.status === "ok") {
|
|
231
|
+
// Respond first, then trigger full daemon restart after a short delay
|
|
232
|
+
const delayMs = restartDelayMs ?? 2000;
|
|
233
|
+
setTimeout(() => {
|
|
234
|
+
const attempt = triggerTaskmasterRestart();
|
|
235
|
+
if (!attempt.ok) {
|
|
236
|
+
log.error(`daemon restart failed: ${attempt.detail ?? "unknown"}`);
|
|
237
|
+
// Fall back to in-process restart
|
|
238
|
+
scheduleGatewaySigusr1Restart({ delayMs: 0, reason: "update.run (fallback)" });
|
|
239
|
+
}
|
|
240
|
+
}, delayMs);
|
|
241
|
+
restart = { ok: true };
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
restart = scheduleGatewaySigusr1Restart({
|
|
245
|
+
delayMs: restartDelayMs,
|
|
246
|
+
reason: "update.run",
|
|
247
|
+
});
|
|
248
|
+
}
|
|
229
249
|
respond(true, {
|
|
230
250
|
ok: true,
|
|
231
251
|
result,
|