You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 54e374d
Browse filesBrowse the repository at this point in the historyBrowse files
Document the 0.9 framework-adapter changes in the migration guide: the
Vite bridge moving from `devframe/helpers/vite` to `@devframes/vite`
(with `viteDevBridge` → `devframeVite`/`devframeVitePlugin`/
`devframeViteBridge` and the flattened bridge options), the
`@devframes/nuxt` and `@devframes/next` `/dev-spa` split (and the
throwing bare root), and the new `/hub` scope for mounting a hub inside
a tool.
This PR was created with the help of an agent.
Each splits into two scoped subpaths — `.../dev-spa` (author one devframe's SPA) and `.../hub` (mount a whole `@devframes/hub`) — and the bare package root throws with a pointer to both.
| mount a hub inside a tool |`@devframes/{vite,nuxt,next}/hub` (+ `/hub/client`) |
45
+
34
46
## `devframe/adapters/cli` is removed
35
47
36
48
The CLI adapter was renamed to `cac` in 0.7. The `devframe/adapters/cli` entry - `createCli`, `CreateCliOptions`, and `CliHandle` - is now gone. Import from `devframe/adapters/cac` instead:
`devframe/helpers/vite` is now its own package, `@devframes/vite` — so it can depend on `vite` directly (its plugins are typed against Vite's real `Plugin` / `ViteDevServer`) while `devframe` core stays free of a Vite dependency. It also splits into two scoped subpaths, and the single `viteDevBridge` becomes three purpose-named plugins on `@devframes/vite/dev-spa`:
254
+
255
+
| 0.8.x | 0.9 |
256
+
|---|---|
257
+
|`import { viteDevBridge } from 'devframe/helpers/vite'`|`import { devframeVite } from '@devframes/vite/dev-spa'`|
The `devMiddleware` boolean/object option is gone: `devframeVitePlugin` is always the static mount, `devframeViteBridge` is always the RPC bridge, and their bridge options are flattened to the top level (`port`, `host`, `flags`, `auth`, `mcp`). `devframeVite(def, { bridge })` is a convenience wrapper that picks between the two.
`@devframes/vite` (and `@devframes/nuxt` / `@devframes/next`) take `@devframes/hub` and `@devframes/hub-ui` as **optional** peers — only the `/hub` scope needs them. Install `vite` as a peer as before. See [`@devframes/vite`](/helpers/vite-bridge) for the full reference.
283
+
284
+
## `@devframes/nuxt` and `@devframes/next` split into `/dev-spa` and `/hub`
285
+
286
+
Both packages now serve their single-devframe surface from a `.../dev-spa` subpath, and the bare package root throws with a pointer to the two scopes.
Next — the config/handler helpers and the React client move down a level:
299
+
300
+
| 0.8.x | 0.9 |
301
+
|---|---|
302
+
|`import { withDevframe } from '@devframes/next'`|`import { withDevframe } from '@devframes/next/dev-spa'`|
303
+
|`import { createDevframeNextHandler } from '@devframes/next'`|`import { createDevframeNextHandler } from '@devframes/next/dev-spa'`|
304
+
|`import { RpcProvider, useRpc } from '@devframes/next/client'`|`import { RpcProvider, useRpc } from '@devframes/next/dev-spa/client'`|
305
+
306
+
## Mounting a hub: the new `/hub` scope
307
+
308
+
Standing up a whole `@devframes/hub` (many integrations) inside a tool now has a first-class home instead of hand-rolled `initHub` glue: `@devframes/vite/hub`, `@devframes/nuxt/hub`, and `@devframes/next/hub`. Each wraps `initHub`, defaults the UI slot to `@devframes/hub-ui`'s `createUi()` (override with `ui`, or `ui: false` for a headless hub you drive with the matching `/hub/client` helper), and mounts everything under one namespace.
Vite and Nuxt already have native hub viewers, so `@devframes/vite/hub` and `@devframes/nuxt/hub` print a one-time recommendation to prefer [Vite DevTools](https://devtools.vite.dev) / [Nuxt DevTools](https://devtools.nuxt.com) (silence with `{ quiet: true }`); `@devframes/next/hub` has no native counterpart and stays quiet. See [`@devframes/vite`](/helpers/vite-bridge#mounting-a-hub), [`@devframes/nuxt`](/helpers/nuxt#mounting-a-hub), and [`@devframes/next`](/helpers/next#mounting-a-hub).
0 commit comments