@ubean/build 0.6.1 → 0.6.2
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/production.js +1 -1
- package/dist/{vite-KFKQ41Jy.js → vite-CrhHLCqC.js} +1 -1
- package/dist/vite.d.ts +11 -7
- package/dist/vite.js +2 -2
- package/dist/{vue-Dh1dtOIU.js → vue-DTMMMa4v.js} +27 -9
- package/dist/vue.js +1 -1
- package/package.json +14 -14
package/dist/production.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as getPresetBuildConfig, S as generateVirtualModulesToDisk, T as buildWithEnvironments, b as generateNodeServerEntry, v as createIslandsSsrStubPlugin, w as serializePagesForEntry, x as generateStandardHandlerEntry, y as generateCloudflareWorkerEntry } from "./vite-
|
|
1
|
+
import { C as getPresetBuildConfig, S as generateVirtualModulesToDisk, T as buildWithEnvironments, b as generateNodeServerEntry, v as createIslandsSsrStubPlugin, w as serializePagesForEntry, x as generateStandardHandlerEntry, y as generateCloudflareWorkerEntry } from "./vite-CrhHLCqC.js";
|
|
2
2
|
export { buildWithEnvironments, createIslandsSsrStubPlugin, generateCloudflareWorkerEntry, generateNodeServerEntry, generateStandardHandlerEntry, generateVirtualModulesToDisk, getPresetBuildConfig, serializePagesForEntry };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as ssrSingletonProdOptimizeExclude, m as createVirtualRegistry, o as ssrSingletonProdSsr, y as __exportAll } from "./ssr-singleton-Bbds29jS.js";
|
|
2
2
|
import { a as createRoutingVirtualModule, i as createPagesVirtualModule, n as createLocalesVirtualModule, r as createMetaVirtualModule, s as transformMacros, t as createAppVirtualModule } from "./virtual-modules-BK0L1Op-.js";
|
|
3
3
|
import { i as generateOpenApiTypes, r as generateTypes } from "./codegen-DNUCCW3C.js";
|
|
4
|
-
import { _ as toWebRequest, a as createVueAppEntryVirtualModule, b as getDevScanCoordinator, g as sendWebResponse, i as createServerEntryVirtualModule, n as ubeanVite, o as createVuePagesVirtualModule, r as createClientEntryVirtualModule, u as ensureDevApp } from "./vue-
|
|
4
|
+
import { _ as toWebRequest, a as createVueAppEntryVirtualModule, b as getDevScanCoordinator, g as sendWebResponse, i as createServerEntryVirtualModule, n as ubeanVite, o as createVuePagesVirtualModule, r as createClientEntryVirtualModule, u as ensureDevApp } from "./vue-DTMMMa4v.js";
|
|
5
5
|
import { createStaticSsgRenderer } from "./static-render.js";
|
|
6
6
|
import { prerender, resolvePrerenderStaticDir } from "./prerender.js";
|
|
7
7
|
import { dirname, join, relative, resolve } from "pathe";
|
package/dist/vite.d.ts
CHANGED
|
@@ -108,15 +108,19 @@ export declare function createUbeanDevEnvironmentFactory(runner: EnvRunnerLike):
|
|
|
108
108
|
//#endregion
|
|
109
109
|
//#region src/dev/dev-request-router.d.ts
|
|
110
110
|
/**
|
|
111
|
-
* DevTools 相关、**必须交给 Vite** 的命名空间前缀(
|
|
111
|
+
* DevTools 相关、**必须交给 Vite** 的命名空间前缀(devframe hub 外壳 + ubean DevTools SPA)。
|
|
112
112
|
*
|
|
113
113
|
* 它们全落在 `_` / `__` 保留命名空间里,判据默认会判给 ubean → 应用 404,因此调用方要把这份
|
|
114
|
-
* 前缀整体传给 `passThrough
|
|
115
|
-
* - `/
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* - `/_devtools` →
|
|
119
|
-
* `/_devtools/__connection.json`。裸 `/_devtools` 由 `devtoolsRedirect`
|
|
114
|
+
* 前缀整体传给 `passThrough`。三个条目覆盖了 devframe hub 实际使用的名字:
|
|
115
|
+
* - `/__devframes` → hub base(默认 `/__devframes/`):外壳 HTML、`__connection.json`、
|
|
116
|
+
* `__ws`(WebSocket upgrade)、`__sse`、`__mcp`、`__client-imports.js`、每个 devframe 的
|
|
117
|
+
* 静态产物(`/__devframes/<id>/`)与远程 assets 代理;
|
|
118
|
+
* - `/_devtools` → ubean DevTools 的 devframe 挂载点(`basePath`):`index.html` 与
|
|
119
|
+
* `assets/*` 及 `/_devtools/__connection.json`。裸 `/_devtools` 由 `devtoolsRedirect`
|
|
120
|
+
* 抢先 302 到 hub 外壳,不受影响;
|
|
121
|
+
* - `/__devtools` → **历史条目**(旧 DTK 外壳),保留是为了兼容仍装了 `@vitejs/devtools` 的
|
|
122
|
+
* 用户项目 —— 那套外壳的 `/__devtools-assets/`、`/__devtools-client-imports.js` 仍在
|
|
123
|
+
* `__` 命名空间里。
|
|
120
124
|
*
|
|
121
125
|
* 2026-09-17 实测:`/__devtools-assets/vite-plus.svg`(应用页控制台报 404)与
|
|
122
126
|
* `/_devtools/index.html`(DevTools 面板空白的真凶)此前都落进了应用 404。
|
package/dist/vite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { m as createVirtualRegistry } from "./ssr-singleton-Bbds29jS.js";
|
|
2
|
-
import { A as toVueRouterPagePath, C as bootstrapDevApp, D as resolveLocaleVueParam, E as resolveDevSecurityHeaders, O as enhanceDevApp, S as peekDevScanCoordinator, T as createDevAppReady, _ as toWebRequest, b as getDevScanCoordinator, c as collectDevCssLinks, d as getDevApp, f as injectStylesheetLinks, g as sendWebResponse, h as ubeanDevRequestPlugin, k as buildDevSsrRoutes, l as createUbeanRequestHandlers, m as isViteResourceRequest, p as isFrameworkHtmlPage, s as DEVTOOLS_PASS_THROUGH_PREFIXES, u as ensureDevApp, v as DEV_SCAN_DIRS, w as createDevApp, x as onDevScan, y as createDevScanCoordinator } from "./vue-
|
|
3
|
-
import { D as createCloudflarePreviewRunner, E as MINIFLARE_INSTALL_HINT, O as defaultLoadMiniflare, _ as ubeanPreviewPlugin, a as createEnvRunnerTransport, c as getDevWorkerEntrySource, d as attachPreviewMiddleware, f as createPreviewMiddleware, g as sendPreviewStatus, h as sendPreviewFile, i as bridgeEnvRunnerInvokes, k as readCompatibilityDate, l as invalidateDevWorkerModules, m as resolvePreviewFile, n as UBEAN_DEV_ENV_NAME, o as createUbeanDevEnvironmentFactory, p as previewMimeType, r as UbeanDevEnvironment, s as DEV_WORKER_FILE, t as ubeanPlugin, u as writeDevWorkerEntry } from "./vite-
|
|
2
|
+
import { A as toVueRouterPagePath, C as bootstrapDevApp, D as resolveLocaleVueParam, E as resolveDevSecurityHeaders, O as enhanceDevApp, S as peekDevScanCoordinator, T as createDevAppReady, _ as toWebRequest, b as getDevScanCoordinator, c as collectDevCssLinks, d as getDevApp, f as injectStylesheetLinks, g as sendWebResponse, h as ubeanDevRequestPlugin, k as buildDevSsrRoutes, l as createUbeanRequestHandlers, m as isViteResourceRequest, p as isFrameworkHtmlPage, s as DEVTOOLS_PASS_THROUGH_PREFIXES, u as ensureDevApp, v as DEV_SCAN_DIRS, w as createDevApp, x as onDevScan, y as createDevScanCoordinator } from "./vue-DTMMMa4v.js";
|
|
3
|
+
import { D as createCloudflarePreviewRunner, E as MINIFLARE_INSTALL_HINT, O as defaultLoadMiniflare, _ as ubeanPreviewPlugin, a as createEnvRunnerTransport, c as getDevWorkerEntrySource, d as attachPreviewMiddleware, f as createPreviewMiddleware, g as sendPreviewStatus, h as sendPreviewFile, i as bridgeEnvRunnerInvokes, k as readCompatibilityDate, l as invalidateDevWorkerModules, m as resolvePreviewFile, n as UBEAN_DEV_ENV_NAME, o as createUbeanDevEnvironmentFactory, p as previewMimeType, r as UbeanDevEnvironment, s as DEV_WORKER_FILE, t as ubeanPlugin, u as writeDevWorkerEntry } from "./vite-CrhHLCqC.js";
|
|
4
4
|
export { DEVTOOLS_PASS_THROUGH_PREFIXES, DEV_SCAN_DIRS, DEV_WORKER_FILE, MINIFLARE_INSTALL_HINT, UBEAN_DEV_ENV_NAME, UbeanDevEnvironment, attachPreviewMiddleware, bootstrapDevApp, bridgeEnvRunnerInvokes, buildDevSsrRoutes, collectDevCssLinks, createCloudflarePreviewRunner, createDevApp, createDevAppReady, createDevScanCoordinator, createEnvRunnerTransport, createPreviewMiddleware, createUbeanDevEnvironmentFactory, createUbeanRequestHandlers, createVirtualRegistry, defaultLoadMiniflare, enhanceDevApp, ensureDevApp, getDevApp, getDevScanCoordinator, getDevWorkerEntrySource, injectStylesheetLinks, invalidateDevWorkerModules, isFrameworkHtmlPage, isViteResourceRequest, onDevScan, peekDevScanCoordinator, previewMimeType, readCompatibilityDate, resolveDevSecurityHeaders, resolveLocaleVueParam, resolvePreviewFile, sendPreviewFile, sendPreviewStatus, sendWebResponse, toVueRouterPagePath, toWebRequest, ubeanDevRequestPlugin, ubeanPlugin, ubeanPreviewPlugin, writeDevWorkerEntry };
|
|
@@ -694,20 +694,28 @@ const RESERVED_APP_PREFIXES = [
|
|
|
694
694
|
"/api/"
|
|
695
695
|
];
|
|
696
696
|
/**
|
|
697
|
-
* DevTools 相关、**必须交给 Vite** 的命名空间前缀(
|
|
697
|
+
* DevTools 相关、**必须交给 Vite** 的命名空间前缀(devframe hub 外壳 + ubean DevTools SPA)。
|
|
698
698
|
*
|
|
699
699
|
* 它们全落在 `_` / `__` 保留命名空间里,判据默认会判给 ubean → 应用 404,因此调用方要把这份
|
|
700
|
-
* 前缀整体传给 `passThrough
|
|
701
|
-
* - `/
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
* - `/_devtools` →
|
|
705
|
-
* `/_devtools/__connection.json`。裸 `/_devtools` 由 `devtoolsRedirect`
|
|
700
|
+
* 前缀整体传给 `passThrough`。三个条目覆盖了 devframe hub 实际使用的名字:
|
|
701
|
+
* - `/__devframes` → hub base(默认 `/__devframes/`):外壳 HTML、`__connection.json`、
|
|
702
|
+
* `__ws`(WebSocket upgrade)、`__sse`、`__mcp`、`__client-imports.js`、每个 devframe 的
|
|
703
|
+
* 静态产物(`/__devframes/<id>/`)与远程 assets 代理;
|
|
704
|
+
* - `/_devtools` → ubean DevTools 的 devframe 挂载点(`basePath`):`index.html` 与
|
|
705
|
+
* `assets/*` 及 `/_devtools/__connection.json`。裸 `/_devtools` 由 `devtoolsRedirect`
|
|
706
|
+
* 抢先 302 到 hub 外壳,不受影响;
|
|
707
|
+
* - `/__devtools` → **历史条目**(旧 DTK 外壳),保留是为了兼容仍装了 `@vitejs/devtools` 的
|
|
708
|
+
* 用户项目 —— 那套外壳的 `/__devtools-assets/`、`/__devtools-client-imports.js` 仍在
|
|
709
|
+
* `__` 命名空间里。
|
|
706
710
|
*
|
|
707
711
|
* 2026-09-17 实测:`/__devtools-assets/vite-plus.svg`(应用页控制台报 404)与
|
|
708
712
|
* `/_devtools/index.html`(DevTools 面板空白的真凶)此前都落进了应用 404。
|
|
709
713
|
*/
|
|
710
|
-
const DEVTOOLS_PASS_THROUGH_PREFIXES = [
|
|
714
|
+
const DEVTOOLS_PASS_THROUGH_PREFIXES = [
|
|
715
|
+
"/__devframes",
|
|
716
|
+
"/__devtools",
|
|
717
|
+
"/_devtools"
|
|
718
|
+
];
|
|
711
719
|
/**
|
|
712
720
|
* 框架内置的 **HTML 页面**(不是应用页面):`/_scalar`(Scalar API 文档)与 `/_devtools`
|
|
713
721
|
* (DevTools SPA)。
|
|
@@ -721,9 +729,19 @@ const DEVTOOLS_PASS_THROUGH_PREFIXES = ["/__devtools", "/_devtools"];
|
|
|
721
729
|
* `transformIndexHtml`(决定要不要注入客户端入口);单点维护,避免两边各写一份字符串判定。
|
|
722
730
|
*/
|
|
723
731
|
const FRAMEWORK_HTML_PAGES = ["/_devtools", "/_scalar"];
|
|
732
|
+
/**
|
|
733
|
+
* devframe hub 自身的 base(`DEVFRAMES_HUB_BASE`)以及 hub 下的全部子路径。
|
|
734
|
+
*
|
|
735
|
+
* hub 的外壳页与 devframe 的产物都不带应用的挂载点,且 `@devframes/hub-ui` 的嵌入式引导脚本
|
|
736
|
+
* 由 hub 自己注入(`transformIndexHtml` 会再注一份应用入口 → 同一个页面被启动两次,devframe
|
|
737
|
+
* 会在 console 报 `A client context is already published on this page`)。因此整个
|
|
738
|
+
* `/__devframes/` 命名空间都跳过 HTML transform。
|
|
739
|
+
*/
|
|
740
|
+
const HUB_BASE_PREFIX = "/__devframes/";
|
|
724
741
|
/** 该 URL 是否指向框架内置的 HTML 页面(见 {@link FRAMEWORK_HTML_PAGES})。 */
|
|
725
742
|
function isFrameworkHtmlPage(url) {
|
|
726
743
|
const pathname = url.split("?")[0].split("#")[0];
|
|
744
|
+
if (pathname === HUB_BASE_PREFIX.slice(0, -1) || pathname.startsWith(HUB_BASE_PREFIX)) return true;
|
|
727
745
|
return FRAMEWORK_HTML_PAGES.some((page) => pathname === page || pathname.startsWith(`${page}/`));
|
|
728
746
|
}
|
|
729
747
|
/** 「取模块而不是取页面」的查询标记:Vite 的 import-analysis 会在这些请求上加它们。 */
|
|
@@ -1053,7 +1071,7 @@ function ubeanDevRequestPlugin(options) {
|
|
|
1053
1071
|
const pathname = (req.url || "/").split("?")[0].split("#")[0];
|
|
1054
1072
|
if (pathname === "/_devtools" || pathname === "/_devtools/") {
|
|
1055
1073
|
res.statusCode = 302;
|
|
1056
|
-
res.setHeader("Location", "/
|
|
1074
|
+
res.setHeader("Location", "/__devframes/");
|
|
1057
1075
|
res.end();
|
|
1058
1076
|
return;
|
|
1059
1077
|
}
|
package/dist/vue.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createVueAppEntryVirtualModule, i as createServerEntryVirtualModule, n as ubeanVite, o as createVuePagesVirtualModule, r as createClientEntryVirtualModule, t as VUE_PLUGIN_INCLUDE } from "./vue-
|
|
1
|
+
import { a as createVueAppEntryVirtualModule, i as createServerEntryVirtualModule, n as ubeanVite, o as createVuePagesVirtualModule, r as createClientEntryVirtualModule, t as VUE_PLUGIN_INCLUDE } from "./vue-DTMMMa4v.js";
|
|
2
2
|
export { VUE_PLUGIN_INCLUDE, createClientEntryVirtualModule, createServerEntryVirtualModule, createVueAppEntryVirtualModule, createVuePagesVirtualModule, ubeanVite as default, ubeanVite };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ubean/build",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Vite plugins, production build, SSG prerender, type codegen, and Server Actions plugin for ubean",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@intlify/unplugin-vue-i18n": "11.2.5",
|
|
48
|
-
"@ubean/app": "0.6.
|
|
49
|
-
"@ubean/client": "0.6.
|
|
50
|
-
"@ubean/config": "0.6.
|
|
51
|
-
"@ubean/i18n": "0.6.
|
|
52
|
-
"@ubean/islands": "0.6.
|
|
53
|
-
"@ubean/markdown": "0.6.
|
|
54
|
-
"@ubean/pages": "0.6.
|
|
55
|
-
"@ubean/preset": "0.6.
|
|
56
|
-
"@ubean/routes": "0.6.
|
|
57
|
-
"@ubean/scan": "0.6.
|
|
58
|
-
"@ubean/server": "0.6.
|
|
59
|
-
"@ubean/shared": "0.6.
|
|
60
|
-
"@ubean/vue": "0.6.
|
|
48
|
+
"@ubean/app": "0.6.2",
|
|
49
|
+
"@ubean/client": "0.6.2",
|
|
50
|
+
"@ubean/config": "0.6.2",
|
|
51
|
+
"@ubean/i18n": "0.6.2",
|
|
52
|
+
"@ubean/islands": "0.6.2",
|
|
53
|
+
"@ubean/markdown": "0.6.2",
|
|
54
|
+
"@ubean/pages": "0.6.2",
|
|
55
|
+
"@ubean/preset": "0.6.2",
|
|
56
|
+
"@ubean/routes": "0.6.2",
|
|
57
|
+
"@ubean/scan": "0.6.2",
|
|
58
|
+
"@ubean/server": "0.6.2",
|
|
59
|
+
"@ubean/shared": "0.6.2",
|
|
60
|
+
"@ubean/vue": "0.6.2",
|
|
61
61
|
"@vitejs/plugin-vue": "^6.0.10",
|
|
62
62
|
"openapi-typescript": "^7.13.0",
|
|
63
63
|
"pathe": "^2.0.3",
|