Skip to content

deps: upgrade devframe to v0.9.12 + bake static build through buildHub - #561

Merged
antfu merged 2 commits into
mainfrom
deps/devframe-0.9.12
Sep 4, 2026
Merged

deps: upgrade devframe to v0.9.12 + bake static build through buildHub#561
antfu merged 2 commits into
mainfrom
deps/devframe-0.9.12

Conversation

@antfubot

@antfubot antfubot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Description

Upgrades devframe (and every @devframes/* package) to ^0.9.12, and retires Vite DevTools' hand-rolled static builder in favour of the hub's own buildHub.

Background. This repo filed devframes/devframe#347buildHub({ context }) (devframes/devframe#349), then devframes/devframe#353 → deploy-root sibling layout (devframes/devframe#355). 0.9.12 ships both, which together let buildHub bake an already-mounted context whose devframe SPAs and vendored assets are served as root-level siblings of the /__devtools/ hub base — exactly Vite DevTools' layout.

What changed. buildStaticDevTools now delegates to buildHub, the static counterpart of the live initHub in createDevToolsHub. It reuses our already-assembled kit context and emits the whole snapshot itself: the branded ui slot's viewer + embedded.js, each devframe SPA and the vendored assets from ctx.views.buildStaticDirs, the dock renderers, the discovery documents, the backend: 'static' connection metas, and the RPC dump. Core stops shadowing (and drifting from) the hub pipeline.

Net −90 lines in build-static.ts, and the snapshot gains three things the hand-rolled baker lacked, for free from the shared pipeline:

  • a baked __index.json discovery document,
  • per-frame __connection.json (a standalone-loaded devframe SPA now finds the shared dump),
  • the ui slot's setup runs, baking branding / dock preferences into the connection meta's configs.

Deploy base (below-root hosting) and the standalone root redirect are preserved — verified with a real cli build (default and --base /ci-build-123/): the hub subtree lands at dist/__devtools/, the devframe SPAs and dist/__devtools-assets/ beside it, and the renderer imports / redirect / __index.json base carry the deploy prefix.

pnpm typecheck && pnpm test && pnpm lint && pnpm build all pass.

Linked Issues

Completes the buildHub adoption tracked in devframes/devframe#347 / devframes/devframe#349 / devframes/devframe#353 / devframes/devframe#355. Supersedes #560 (the 0.9.11 bump), which can be closed in favour of this.

Additional context

The build-static-renderers unit test is removed: it mocked the renderer-manifest and RPC-dump internals that now live in buildHub (covered by that package's own tests upstream); re-mocking buildHub's guts would be testing implementation. The wiring is exercised by the cli build end to end.

Residual 0.9.x @devframes/* entries in pnpm-lock.yaml come from the published @vitejs/devtools@0.5.2 pulled in transitively by a fixture — pre-existing; the workspace packages all resolve to 0.9.12.

This PR was created with the help of an agent.

devframe 0.9.12 (devframes/devframe#349, #355) lets buildHub bake an
already-mounted context whose devframes and assets are served as root-level
siblings of the hub base. Replace the hand-rolled static baker with a buildHub
call, the static counterpart of the live initHub in createDevToolsHub: it reuses
our kit context and emits the whole snapshot (ui slot, devframe SPAs + assets
from ctx.views.buildStaticDirs, dock renderers, discovery documents, connection
metas, RPC dump), so core stops shadowing and drifting from the hub pipeline.

Net: buildStaticDevTools drops ~90 lines and gains a baked __index.json, per-frame
__connection.json (a standalone-loaded frame now finds the shared dump), and the
ui slot's setup (branding/dock preferences baked into staticConfig) for free from
the shared pipeline. Deploy base and the root redirect are preserved.

The build-static-renderers unit test is removed: it mocked the renderer-manifest
and rpc-dump internals that now live in buildHub (covered upstream); the wiring is
exercised by the cli build end to end.
@antfu
antfu merged commit 99cb433 into main Sep 4, 2026
10 checks passed
@antfu
antfu deleted the deps/devframe-0.9.12 branch September 4, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants