@devframes/vite 0.9.3 → 0.9.5
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.
- package/dist/single.d.mts +3 -3
- package/dist/single.mjs +4 -3
- package/package.json +7 -7
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.
|
|
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 (`
|
|
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.
|
|
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
|
|
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 (`
|
|
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
|
+
"version": "0.9.5",
|
|
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.
|
|
35
|
-
"
|
|
36
|
-
"
|
|
34
|
+
"@devframes/hub": "0.9.5",
|
|
35
|
+
"devframe": "0.9.5",
|
|
36
|
+
"@devframes/hub-ui": "0.9.5"
|
|
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
|
|
60
|
-
"@devframes/hub": "0.9.
|
|
61
|
-
"devframe": "0.9.
|
|
59
|
+
"@devframes/hub": "0.9.5",
|
|
60
|
+
"@devframes/hub-ui": "0.9.5",
|
|
61
|
+
"devframe": "0.9.5"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "tsdown",
|