Skip to content

Commit d58c0c1

Browse files
committed
refactor(hub): skip capabilities.build:false devframes silently
The skip is the declared behavior, not a condition to report; drop the DF8007 diagnostic and its docs page.
1 parent 38b8448 commit d58c0c1

5 files changed

Lines changed: 6 additions & 47 deletions

File tree

‎docs/content/1.guide/18.hub-initiate.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ await buildHub({
115115

116116
Browser-side tools keep working in full: a page script still loads into the host page and talks to its panel over the [in-page channel](/guide/in-page-channel) (the a11y inspector scans a production app exactly as it does in dev). Reads resolve from the baked dump (`static`/`snapshot` RPCs, shared-state snapshots); live writes (messages, command execution) have no server, so the browser clients degrade to local no-ops, and a panel's dock-activation deep links ride a same-origin `BroadcastChannel` instead of the RPC relay.
117117

118-
A devframe whose value is inherently live declares `capabilities.build: false` and stays out of the build entirely - no dock, no SPA copy, no RPCs in the dump (`DF8007` logs each skip). The built-in terminals, code-server, and assets devframes declare it, so a hub mounting every built-in bakes only the tools that mean something statically. See the [buildHub options](/references/hub-api#buildhub-options) reference, and [`examples/a11y-messages-playground`](https://github.com/devframes/devframe/tree/main/examples/a11y-messages-playground) for a Vite host whose `vite build` output ships the hub.
118+
A devframe whose value is inherently live declares `capabilities.build: false` and silently stays out of the build entirely - no dock, no SPA copy, no RPCs in the dump. The built-in terminals, code-server, and assets devframes declare it, so a hub mounting every built-in bakes only the tools that mean something statically. See the [buildHub options](/references/hub-api#buildhub-options) reference, and [`examples/a11y-messages-playground`](https://github.com/devframes/devframe/tree/main/examples/a11y-messages-playground) for a Vite host whose `vite build` output ships the hub.
119119

120120
## Bring your own context
121121

‎docs/content/6.errors/DF8007.md‎

Lines changed: 0 additions & 34 deletions
This file was deleted.

‎packages/devframe/src/types/devframe.ts‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,10 @@ export interface DevframeDefinition {
390390
*
391391
* - `build: false`: `createCac` skips registering the `build` subcommand,
392392
* `createBuild` refuses (throws `DF0042`) unless `{ force: true }`, and
393-
* a hub static build (`buildHub`) skips the devframe entirely - no dock,
394-
* no SPA copy, no RPCs in the dump (`DF8007` logs the skip). Useful for
395-
* a devframe whose value is inherently live (e.g. it manages real files
396-
* on disk), so a static export would only ever produce a broken,
397-
* write-less shell of the tool.
393+
* a hub static build (`buildHub`) silently skips the devframe - no dock,
394+
* no SPA copy, no RPCs in the dump. Useful for a devframe whose value is
395+
* inherently live (e.g. it manages real files on disk), so a static
396+
* export would only ever produce a broken, write-less shell of the tool.
398397
* - `dev: false`: `createDevServer` refuses (throws `DF0058`) unless
399398
* `{ force: true }`. Useful for a devframe that only makes sense as a
400399
* static export (e.g. a report generator with nothing to serve live).

‎packages/hub/src/node/diagnostics.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ export const diagnostics = defineDiagnostics({
3838
why: (p: { urlBase: string, base: string }) => `A static hub build can only write mounts under its own base: "${p.urlBase}" escapes "${p.base}".`,
3939
fix: 'buildHub maps each mount base to a directory under its `outDir`, so every mount must live under the hub base. Drop the `basePath` override (or the `ctx.install` base) that points outside it, or move the hub `base` up so it contains the mount.',
4040
},
41-
DF8007: {
42-
why: (p: { id: string, name: string }) => `Devframe "${p.name}" (${p.id}) declares \`capabilities.build: false\`, so the static hub build skips it.`,
43-
fix: 'This is the declared behavior for a tool whose value is inherently live (a terminal, a process proxy): its dock, SPA, and RPCs stay out of the static output. Drop `capabilities.build: false` from the definition if the tool does have a meaningful baked form.',
44-
},
4541
DF8100: {
4642
why: (p: { id: string }) => `Dock with id "${p.id}" is already registered`,
4743
fix: 'Use the `force` parameter to overwrite an existing registration.',

‎packages/hub/src/node/install-devframe.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,8 @@ export async function prepareDevframe(
123123
d: DevframeDefinition,
124124
options: InstallDevframeOptions = {},
125125
): Promise<(() => Promise<void>) | null> {
126-
if (skippedInStaticBuild(ctx, d)) {
127-
diagnostics.DF8007({ id: d.id, name: d.name }, { method: 'log' })
126+
if (skippedInStaticBuild(ctx, d))
128127
return null
129-
}
130128

131129
const strategy = d.duplicationStrategy ?? 'warn'
132130
const isDuplicate = ctx.docks.views.has(d.id)

0 commit comments

Comments
 (0)