mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-07 07:09:15 +00:00
* fix(cli): commands exit without waiting on update checks or telemetry The update and skills checks run in a detached child that refreshes the caches for the next run; the parent only reads the caches. finalizeCli no longer awaits the telemetry flush: the exit handler flushSync() delivers what is queued. The events beacon, feedback and figma error paths stop awaiting flush() too. * fix(cli): retry a failed background check at most once an hour Before starting the background worker, the CLI stamps a per-check attempt time and skips a check it attempted within the hour, so a dead network no longer starts a worker on every command. The stale-pin notice writes onto a fresh read, detached spawns set windowsHide, and a test ties the worker path to its build entry. * fix(cli): a failed-check stamp dated in the future no longer silences update checks
10 lines
382 B
TypeScript
10 lines
382 B
TypeScript
import { checkForUpdate } from "./utils/updateCheck.js";
|
|
import { refreshSkillsCache } from "./utils/skillsUpdateCheck.js";
|
|
|
|
// Detached child of launchBackgroundChecks: refreshes the caches the next run's notices read.
|
|
const due = process.argv.slice(2);
|
|
await Promise.allSettled([
|
|
due.includes("update") && checkForUpdate(),
|
|
due.includes("skills") && refreshSkillsCache(),
|
|
]);
|