@ubean/build 0.7.8 → 0.7.9
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-DjMl6okP.js → vite-DB8B8_5Z.js} +13 -1
- package/dist/vite.js +1 -1
- package/package.json +14 -14
package/dist/production.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { T as buildWithEnvironments, v as createIslandsSsrStubPlugin, y as generateCloudflareWorkerEntry, b as generateNodeServerEntry, x as generateStandardHandlerEntry, S as generateVirtualModulesToDisk, C as getPresetBuildConfig, w as serializePagesForEntry } from "./vite-
|
|
1
|
+
export { T as buildWithEnvironments, v as createIslandsSsrStubPlugin, y as generateCloudflareWorkerEntry, b as generateNodeServerEntry, x as generateStandardHandlerEntry, S as generateVirtualModulesToDisk, C as getPresetBuildConfig, w as serializePagesForEntry } from "./vite-DB8B8_5Z.js";
|
|
@@ -68,6 +68,7 @@ function pageGlobExtensions(extensions, markdownExts = []) {
|
|
|
68
68
|
*
|
|
69
69
|
* 必须与扫描器的 `layoutsPattern`(`@ubean/vue` 的 `scan-pages.ts`)同源,否则会出现
|
|
70
70
|
* 「扫描到但 `import.meta.glob` 加载不到」(或反向)—— 与 `pageGlobExtensions` 同一个陷阱。
|
|
71
|
+
* 层数也要同源(**两层**:`xx.*` 与 `xx/index.*`),见 `layoutGlobPattern`。
|
|
71
72
|
*
|
|
72
73
|
* 与页面的差异:不含 markdown 后缀(布局不是 markdown 页面),也不含元数据页的 `js`。
|
|
73
74
|
* `@ubean/vue` 不能依赖 `@ubean/config`(依赖白名单只有 vue + vue-router),
|
|
@@ -82,6 +83,17 @@ function layoutGlobExtensions(extensions) {
|
|
|
82
83
|
return [...new Set(base)].join(",");
|
|
83
84
|
}
|
|
84
85
|
/**
|
|
86
|
+
* 布局 glob 模式(任意 `src` 前缀)——`import.meta.glob` 的完整参数。
|
|
87
|
+
*
|
|
88
|
+
* 与 `@ubean/vue` 扫描器同源:**只两层**(`layouts/xx.*` 与 `layouts/xx/index.*`)。
|
|
89
|
+
* 递归 glob 会把 `layouts/admin/dashboard.vue` 这类产物打进 `layoutLoaders`,
|
|
90
|
+
* 而扫描器已不再为它们注册名字 —— 白带 chunk。
|
|
91
|
+
*/
|
|
92
|
+
function layoutGlobPattern(prefix, extensions) {
|
|
93
|
+
const exts = globExtSegment(layoutGlobExtensions(extensions));
|
|
94
|
+
return [`${prefix}/layouts/*.${exts}`, `${prefix}/layouts/*/index.${exts}`];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
85
97
|
* 逗号串 → glob 的扩展名段(拼在 `**\/*.` 后面)。
|
|
86
98
|
*
|
|
87
99
|
* 单扩展名时**不能**用 brace:`**\/*.{vue}` 在 tinyglobby / Vite 的 glob 里匹配不到
|
|
@@ -1601,7 +1613,7 @@ async function generateVirtualModulesToDisk(cwd, config, scanResult, virtualDir,
|
|
|
1601
1613
|
const pagesGlob = JSON.stringify(`${viteSrcPrefix}/pages/**/*.{${pagesExts}}`);
|
|
1602
1614
|
const routesGlob = JSON.stringify(`${viteSrcPrefix}/routes/**/*.{ts,js,mjs}`);
|
|
1603
1615
|
const middlewareGlob = JSON.stringify(`${viteSrcPrefix}/middleware/**/*.{ts,js,mjs}`);
|
|
1604
|
-
const layoutsGlob = JSON.stringify(
|
|
1616
|
+
const layoutsGlob = JSON.stringify(layoutGlobPattern(viteSrcPrefix, config.pages?.extensions));
|
|
1605
1617
|
const cronsDirs = (Array.isArray(config.dir.crons) ? config.dir.crons : [config.dir.crons || "crons"]).map((d) => d.replace(/\\/g, "/"));
|
|
1606
1618
|
const cronsGlob = JSON.stringify(cronsDirs.length === 1 ? `${viteSrcPrefix}/${cronsDirs[0]}/**/*.{ts,js,mjs}` : `${viteSrcPrefix}/{${cronsDirs.join(",")}}/**/*.{ts,js,mjs}`);
|
|
1607
1619
|
const seoGlob = JSON.stringify(`${viteSrcPrefix}/{sitemap,robots,manifest,opengraph-image,icon,apple-icon}.{ts,js,mjs,mts,cjs}`);
|
package/dist/vite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { g as createVirtualRegistry } from "./ssr-singleton-CD6tSMIE.js";
|
|
2
2
|
import { A as buildDevSsrRoutes, C as peekDevScanCoordinator, D as resolveDevSecurityHeaders, E as createDevAppReady, O as resolveLocaleVueParam, S as onDevScan, T as createDevApp, _ as sendWebResponse, b as createDevScanCoordinator, c as DEVTOOLS_PASS_THROUGH_PREFIXES, d as ensureDevApp, f as getDevApp, g as ubeanDevRequestPlugin, h as isViteResourceRequest, j as toVueRouterPagePath, k as enhanceDevApp, l as collectDevCssLinks, m as isFrameworkHtmlPage, p as injectStylesheetLinks, u as createUbeanRequestHandlers, v as toWebRequest, w as bootstrapDevApp, x as getDevScanCoordinator, y as DEV_SCAN_DIRS } from "./vue-MPB6L-fL.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-
|
|
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-DB8B8_5Z.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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ubean/build",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.9",
|
|
4
4
|
"description": "Vite plugins, production build, SSG prerender, type codegen, and Server Actions plugin for ubean",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -49,19 +49,19 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@intlify/unplugin-vue-i18n": "11.2.7",
|
|
52
|
-
"@ubean/app": "0.7.
|
|
53
|
-
"@ubean/client": "0.7.
|
|
54
|
-
"@ubean/config": "0.7.
|
|
55
|
-
"@ubean/i18n": "0.7.
|
|
56
|
-
"@ubean/islands": "0.7.
|
|
57
|
-
"@ubean/markdown": "0.7.
|
|
58
|
-
"@ubean/pages": "0.7.
|
|
59
|
-
"@ubean/preset": "0.7.
|
|
60
|
-
"@ubean/routes": "0.7.
|
|
61
|
-
"@ubean/scan": "0.7.
|
|
62
|
-
"@ubean/server": "0.7.
|
|
63
|
-
"@ubean/shared": "0.7.
|
|
64
|
-
"@ubean/vue": "0.7.
|
|
52
|
+
"@ubean/app": "0.7.9",
|
|
53
|
+
"@ubean/client": "0.7.9",
|
|
54
|
+
"@ubean/config": "0.7.9",
|
|
55
|
+
"@ubean/i18n": "0.7.9",
|
|
56
|
+
"@ubean/islands": "0.7.9",
|
|
57
|
+
"@ubean/markdown": "0.7.9",
|
|
58
|
+
"@ubean/pages": "0.7.9",
|
|
59
|
+
"@ubean/preset": "0.7.9",
|
|
60
|
+
"@ubean/routes": "0.7.9",
|
|
61
|
+
"@ubean/scan": "0.7.9",
|
|
62
|
+
"@ubean/server": "0.7.9",
|
|
63
|
+
"@ubean/shared": "0.7.9",
|
|
64
|
+
"@ubean/vue": "0.7.9",
|
|
65
65
|
"@vitejs/plugin-vue": "^6.0.10",
|
|
66
66
|
"@vitejs/plugin-vue-jsx": "^5.1.6",
|
|
67
67
|
"openapi-typescript": "^7.13.0",
|