@devframes/vite 0.9.4 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { DevframeClientHost, DevframeClientHost as DevframeClientHost$1, DevframeClientHostOptions, DevframeClientHostOptions as DevframeClientHostOptions$1 } from "@devframes/hub/client";
1
+ import { DevframeClientHost, DevframeClientHostOptions, DevframeClientRuntime, DevframeClientRuntime as DevframeClientRuntime$1, DevframeClientRuntimeOptions, DevframeClientRuntimeOptions as DevframeClientRuntimeOptions$1 } from "@devframes/hub/client";
2
2
  //#region src/hub-client.d.ts
3
- interface MountDevframeHubClientOptions extends DevframeClientHostOptions$1 {
3
+ interface MountDevframeHubClientOptions extends DevframeClientRuntimeOptions$1 {
4
4
  /**
5
5
  * Hub mount base to connect to. Forwarded as `connect.baseURL` when no
6
6
  * `rpc` / `connect.baseURL` is supplied.
@@ -15,12 +15,12 @@ interface MountDevframeHubClientOptions extends DevframeClientHostOptions$1 {
15
15
  * (defaulting `base` to `/__devframes/`), assembles the shared
16
16
  * `DevframeClientContext`, and imports each dock's client script into the
17
17
  * page. A thin default-applying wrapper over `@devframes/hub/client`'s
18
- * `createDevframeClientHost`.
18
+ * `createDevframeClientRuntime`.
19
19
  *
20
20
  * Only needed when you render your own dock UI (or override the hub's `ui`).
21
21
  * With the default `@devframes/hub-ui`, its injected `embedded.js` boots the
22
22
  * client for you, so the host page needs no client code.
23
23
  */
24
- declare function mountDevframeHubClient(options?: MountDevframeHubClientOptions): Promise<DevframeClientHost$1>;
24
+ declare function mountDevframeHubClient(options?: MountDevframeHubClientOptions): Promise<DevframeClientRuntime$1>;
25
25
  //#endregion
26
- export { type DevframeClientHost, type DevframeClientHostOptions, MountDevframeHubClientOptions, mountDevframeHubClient };
26
+ export { type DevframeClientHost, type DevframeClientHostOptions, type DevframeClientRuntime, type DevframeClientRuntimeOptions, MountDevframeHubClientOptions, mountDevframeHubClient };
@@ -1,4 +1,4 @@
1
- import { createDevframeClientHost } from "@devframes/hub/client";
1
+ import { createDevframeClientRuntime } from "@devframes/hub/client";
2
2
  import { DEVFRAMES_HUB_BASE } from "@devframes/hub/constants";
3
3
  //#region src/hub-client.ts
4
4
  /**
@@ -7,7 +7,7 @@ import { DEVFRAMES_HUB_BASE } from "@devframes/hub/constants";
7
7
  * (defaulting `base` to `/__devframes/`), assembles the shared
8
8
  * `DevframeClientContext`, and imports each dock's client script into the
9
9
  * page. A thin default-applying wrapper over `@devframes/hub/client`'s
10
- * `createDevframeClientHost`.
10
+ * `createDevframeClientRuntime`.
11
11
  *
12
12
  * Only needed when you render your own dock UI (or override the hub's `ui`).
13
13
  * With the default `@devframes/hub-ui`, its injected `embedded.js` boots the
@@ -15,7 +15,7 @@ import { DEVFRAMES_HUB_BASE } from "@devframes/hub/constants";
15
15
  */
16
16
  function mountDevframeHubClient(options = {}) {
17
17
  const { base = DEVFRAMES_HUB_BASE, connect, ...rest } = options;
18
- return createDevframeClientHost({
18
+ return createDevframeClientRuntime({
19
19
  ...rest,
20
20
  ...rest.rpc ? {} : { connect: {
21
21
  baseURL: base,
package/dist/hub.d.mts CHANGED
@@ -48,7 +48,7 @@ interface ViteDevframeHubOptions {
48
48
  * The hub's UI slot. Defaults to `@devframes/hub-ui`'s `createUi()` (the
49
49
  * reference floating dock + standalone viewer) when omitted — install
50
50
  * `@devframes/hub-ui` for that default. Pass your own {@link DevframeHubUi}
51
- * to swap the viewer, or `false` for a headless hub (serve your own UI
51
+ * to swap the hub UI provider, or `false` for a headless hub (serve your own UI
52
52
  * against `@devframes/hub/client`).
53
53
  */
54
54
  ui?: DevframeHubUi | false;
package/dist/single.d.mts CHANGED
@@ -1,6 +1,6 @@
1
+ import { DevframeDefinition, McpRouteOptions } from "devframe";
1
2
  import { IncomingMessage, ServerResponse } from "node:http";
2
3
  import { Plugin } from "vite";
3
- import { DevframeDefinition, McpRouteOptions } from "devframe";
4
4
  import { DevframeAuthHandler } from "devframe/node/auth";
5
5
  //#region src/single.d.ts
6
6
  /**
@@ -40,7 +40,7 @@ interface DevframeVitePluginOptions {
40
40
  base?: string;
41
41
  }
42
42
  /**
43
- * Statically mount a devframe's built SPA (`def.cli.distDir`) at
43
+ * Statically mount a devframe's built SPA (`def.clientAssets`) at
44
44
  * `options.base` inside an existing Vite dev server. No RPC server is
45
45
  * started — reach for {@link devframeViteBridge} when the mounted UI
46
46
  * needs a live RPC/WebSocket connection back to the devframe.
@@ -94,7 +94,7 @@ interface DevframeViteBridgeOptions {
94
94
  }
95
95
  /**
96
96
  * Bridge a devframe's RPC + WebSocket backend into an existing Vite dev
97
- * server: the host app owns the SPA (`distDir` is never mounted), and this
97
+ * server: the host app owns the SPA (`clientAssets` is never mounted), and this
98
98
  * plugin serves discovery (`<base>__connection.json`), the WebSocket RPC
99
99
  * upgrade (`<base>__ws`, shared on Vite's own HTTP server), and the
100
100
  * optional MCP route through {@link initDevframe}'s node middleware — so
package/dist/single.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import process from "node:process";
2
+ import { resolveClientAssets } from "devframe";
2
3
  import { initDevframe } from "devframe/initiate";
3
4
  import { diagnostics, normalizeBasePath, resolveBasePath } from "devframe/internal";
4
5
  import { resolveStaticAssetsSource } from "devframe/utils/remote-assets";
@@ -6,7 +7,7 @@ import { serveStaticNodeMiddleware } from "devframe/utils/serve-static";
6
7
  import { join, resolve } from "pathe";
7
8
  //#region src/single.ts
8
9
  /**
9
- * Statically mount a devframe's built SPA (`def.cli.distDir`) at
10
+ * Statically mount a devframe's built SPA (`def.clientAssets`) at
10
11
  * `options.base` inside an existing Vite dev server. No RPC server is
11
12
  * started — reach for {@link devframeViteBridge} when the mounted UI
12
13
  * needs a live RPC/WebSocket connection back to the devframe.
@@ -18,7 +19,7 @@ import { join, resolve } from "pathe";
18
19
  */
19
20
  function devframeVitePlugin(d, options = {}) {
20
21
  const base = normalizeMountBase(options.base ?? resolveBasePath(d, "hosted"));
21
- const distDir = d.cli?.distDir;
22
+ const distDir = resolveClientAssets(d);
22
23
  return {
23
24
  name: `devframe:${d.id}`,
24
25
  apply: "serve",
@@ -31,7 +32,7 @@ function devframeVitePlugin(d, options = {}) {
31
32
  }
32
33
  /**
33
34
  * Bridge a devframe's RPC + WebSocket backend into an existing Vite dev
34
- * server: the host app owns the SPA (`distDir` is never mounted), and this
35
+ * server: the host app owns the SPA (`clientAssets` is never mounted), and this
35
36
  * plugin serves discovery (`<base>__connection.json`), the WebSocket RPC
36
37
  * upgrade (`<base>__ws`, shared on Vite's own HTTP server), and the
37
38
  * optional MCP route through {@link initDevframe}'s node middleware — so
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devframes/vite",
3
3
  "type": "module",
4
- "version": "0.9.4",
4
+ "version": "0.9.6",
5
5
  "description": "Vite plugin for mounting a devframe inside any Vite-based host (Astro, SolidStart, Nuxt, plain Vite apps).",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -31,9 +31,9 @@
31
31
  ],
32
32
  "peerDependencies": {
33
33
  "vite": "^7.0.0 || ^8.0.0",
34
- "@devframes/hub": "0.9.4",
35
- "devframe": "0.9.4",
36
- "@devframes/hub-ui": "0.9.4"
34
+ "@devframes/hub-ui": "0.9.6",
35
+ "devframe": "0.9.6",
36
+ "@devframes/hub": "0.9.6"
37
37
  },
38
38
  "peerDependenciesMeta": {
39
39
  "@devframes/hub": {
@@ -56,9 +56,9 @@
56
56
  "tsdown": "^0.22.14",
57
57
  "vite": "^8.2.1",
58
58
  "vitest": "^4.1.10",
59
- "@devframes/hub": "0.9.4",
60
- "@devframes/hub-ui": "0.9.4",
61
- "devframe": "0.9.4"
59
+ "@devframes/hub": "0.9.6",
60
+ "devframe": "0.9.6",
61
+ "@devframes/hub-ui": "0.9.6"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "tsdown",