mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Re-running `stack dev` / `hexclave dev` now picks up the latest published dashboard without reinstalling the CLI. Before doing any work, the `dev` command checks npm for a newer `@hexclave/cli` and, if found, re-execs `npx <pkg>@<latest> stack dev ...` so the running code (and the dashboard bundled in that tarball) is the latest. The user's installed dependency is left untouched. Because `stack dev` keeps a detached background dashboard alive across runs and reuses it by default, the now-latest process also compares the running dashboard's version against its own and restarts the stale one so the new dashboard actually binds the port. - self-update.ts: maybeReexecToLatest(), resolveLatestVersion() (TTL-cached registry lookup, short timeout, offline-safe), isVersionNewer(), buildNpxInvocation(). Loop guard via STACK_CLI_SKIP_AUTO_UPDATE; opt-outs via STACK_CLI_NO_AUTO_UPDATE, --no-auto-update, and auto-skip in CI. - dev.ts: re-exec at the top of the dev action; killLocalDashboard() + version handshake in startDashboardIfNeeded; stamp CLI version when recording the dashboard process; --no-auto-update flag. - dev-env-state.ts: localDashboard.version + cliUpdateCheck cache helpers. - Tests for self-update and the new dev-env-state fields. |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| .eslintrc.cjs | ||
| package.json | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| vitest.config.ts | ||