ubean 0.5.2 → 0.6.0-beta.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/build.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ubeanServerActionsPlugin } from "@ubean/build/actions";
2
- import { UbeanPluginOptions, UbeanPluginOptions as UbeanCorePluginOptions, ubeanPlugin, ubeanPlugin as ubeanCorePlugin } from "@ubean/build/vite";
2
+ import { PreviewMiddleware, UbeanPluginOptions, UbeanPluginOptions as UbeanCorePluginOptions, UbeanPreviewMiddlewareOptions, UbeanPreviewPluginOptions, createPreviewMiddleware, previewMimeType, resolvePreviewFile, ubeanPlugin, ubeanPlugin as ubeanCorePlugin, ubeanPreviewPlugin } from "@ubean/build/vite";
3
3
  import { UbeanViteOptions, VUE_PLUGIN_INCLUDE, ubeanVite } from "@ubean/build/vue";
4
4
  import { ubeanIslandsPlugin } from "@ubean/islands/vite";
5
5
  export * from "@ubean/config";
@@ -7,4 +7,4 @@ export * from "@ubean/build/prerender";
7
7
  export * from "@ubean/preset";
8
8
  export * from "@ubean/build/codegen";
9
9
  export * from "@ubean/scan";
10
- export { type UbeanCorePluginOptions, type UbeanPluginOptions, type UbeanViteOptions, VUE_PLUGIN_INCLUDE, ubeanCorePlugin, ubeanIslandsPlugin, ubeanPlugin, ubeanServerActionsPlugin, ubeanVite };
10
+ export { type PreviewMiddleware, type UbeanCorePluginOptions, type UbeanPluginOptions, type UbeanPreviewMiddlewareOptions, type UbeanPreviewPluginOptions, type UbeanViteOptions, VUE_PLUGIN_INCLUDE, createPreviewMiddleware, previewMimeType, resolvePreviewFile, ubeanCorePlugin, ubeanIslandsPlugin, ubeanPlugin, ubeanPreviewPlugin, ubeanServerActionsPlugin, ubeanVite };
package/dist/build.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ubeanServerActionsPlugin } from "@ubean/build/actions";
2
- import { ubeanPlugin, ubeanPlugin as ubeanCorePlugin } from "@ubean/build/vite";
2
+ import { createPreviewMiddleware, previewMimeType, resolvePreviewFile, ubeanPlugin, ubeanPlugin as ubeanCorePlugin, ubeanPreviewPlugin } from "@ubean/build/vite";
3
3
  import { VUE_PLUGIN_INCLUDE, ubeanVite } from "@ubean/build/vue";
4
4
  import { ubeanIslandsPlugin } from "@ubean/islands/vite";
5
5
  export * from "@ubean/config";
@@ -7,4 +7,4 @@ export * from "@ubean/build/prerender";
7
7
  export * from "@ubean/preset";
8
8
  export * from "@ubean/build/codegen";
9
9
  export * from "@ubean/scan";
10
- export { VUE_PLUGIN_INCLUDE, ubeanCorePlugin, ubeanIslandsPlugin, ubeanPlugin, ubeanServerActionsPlugin, ubeanVite };
10
+ export { VUE_PLUGIN_INCLUDE, createPreviewMiddleware, previewMimeType, resolvePreviewFile, ubeanCorePlugin, ubeanIslandsPlugin, ubeanPlugin, ubeanPreviewPlugin, ubeanServerActionsPlugin, ubeanVite };
package/dist/client.d.ts CHANGED
@@ -2,7 +2,7 @@ import { HydrateIslandsOptions } from "@ubean/islands/runtime";
2
2
  import { UseActionReturn, UseFormActionReturn, callAction, invokeServerFn, useAction, useFormAction } from "@ubean/routes/runtime";
3
3
  import { CSSProperties, Component, ComputedRef, Plugin, Ref } from "vue";
4
4
  export * from "@ubean/client";
5
- //#region ../../node_modules/.pnpm/hookable@6.1.1/node_modules/hookable/dist/index.d.mts
5
+ //#region ../../node_modules/.pnpm/hookable@6.1.2/node_modules/hookable/dist/index.d.mts
6
6
  type HookCallback = (...arguments_: any) => Promise<void> | void;
7
7
  type HookKeys<T> = keyof T & string;
8
8
  type InferCallback<HT, HN extends keyof HT> = HT[HN] extends HookCallback ? HT[HN] : never;
@@ -24,7 +24,7 @@ declare global {
24
24
  }
25
25
  }
26
26
  //#endregion
27
- //#region ../../node_modules/.pnpm/unhead@3.4.0_@voidzero-dev+vite-plus-core@0.3.1_@types+node@26.5.1_jiti@2.7.0_terser@5._21de6f7d064bc2c8a89403c09d1bb6b3/node_modules/unhead/dist/shared/unhead.DC0v7nqS.d.ts
27
+ //#region ../../node_modules/.pnpm/unhead@3.4.1_@voidzero-dev+vite-plus-core@0.3.3_@types+node@26.6.1_@vitejs+devtools@0.7_7ae786e2cf77c7a93069cea6941fc09d/node_modules/unhead/dist/shared/unhead.DC0v7nqS.d.ts
28
28
  type Booleanable = boolean | 'false' | 'true' | '';
29
29
  type Stringable = string | Booleanable | number;
30
30
  type Falsy$1 = false | null | undefined;
@@ -1831,7 +1831,7 @@ interface HeadTag extends TagPriority, TagPosition, ResolvesDuplicates, HasTempl
1831
1831
  _source?: string;
1832
1832
  }
1833
1833
  //#endregion
1834
- //#region ../../node_modules/.pnpm/unhead@3.4.0_@voidzero-dev+vite-plus-core@0.3.1_@types+node@26.5.1_jiti@2.7.0_terser@5._21de6f7d064bc2c8a89403c09d1bb6b3/node_modules/unhead/dist/shared/unhead.CN9FlNPx.d.ts
1834
+ //#region ../../node_modules/.pnpm/unhead@3.4.1_@voidzero-dev+vite-plus-core@0.3.3_@types+node@26.6.1_@vitejs+devtools@0.7_7ae786e2cf77c7a93069cea6941fc09d/node_modules/unhead/dist/shared/unhead.CguV8W7j.d.ts
1835
1835
  type UseScriptStatus = 'awaitingLoad' | 'loading' | 'loaded' | 'error' | 'removed';
1836
1836
  type BaseScriptApi = Record<symbol | string, any>;
1837
1837
  type HasDiscriminatedParameters<T> = T extends {
@@ -2043,7 +2043,7 @@ interface DOMHeadHooks {
2043
2043
  interface SSRHeadHooks {
2044
2044
  /**
2045
2045
  * Fired by `renderSSRHeadSuspenseChunk` with normalized tags from entries
2046
- * pending after the shell. It runs before Streamed Body Tags are split out.
2046
+ * pending after the shell. It runs before streamed body tags are split out.
2047
2047
  * It also runs before the remaining patch is serialized and entries clear.
2048
2048
  *
2049
2049
  * The chunk renderer normally serializes entry input without normalizing
@@ -2351,7 +2351,7 @@ interface Unhead<Input = ResolvableHead, RenderResult = unknown> {
2351
2351
  */
2352
2352
  _titleTemplate?: string;
2353
2353
  /**
2354
- * Per-response state for Streamed Body Tags.
2354
+ * Per-response state for streamed body tags.
2355
2355
  *
2356
2356
  * @internal
2357
2357
  */
@@ -2380,13 +2380,13 @@ interface DomState {
2380
2380
  _e: Map<string, Element>;
2381
2381
  }
2382
2382
  //#endregion
2383
- //#region ../../node_modules/.pnpm/unhead@3.4.0_@voidzero-dev+vite-plus-core@0.3.1_@types+node@26.5.1_jiti@2.7.0_terser@5._21de6f7d064bc2c8a89403c09d1bb6b3/node_modules/unhead/dist/shared/unhead.DiHEHi7R.d.ts
2383
+ //#region ../../node_modules/.pnpm/unhead@3.4.1_@voidzero-dev+vite-plus-core@0.3.3_@types+node@26.6.1_@vitejs+devtools@0.7_7ae786e2cf77c7a93069cea6941fc09d/node_modules/unhead/dist/shared/unhead.DiHEHi7R.d.ts
2384
2384
  type Base = RawInput<'base'>;
2385
2385
  type HtmlAttributes = RawInput<'htmlAttrs'>;
2386
2386
  type Noscript = RawInput<'noscript'>;
2387
2387
  type Style = RawInput<'style'>;
2388
2388
  //#endregion
2389
- //#region ../../node_modules/.pnpm/@unhead+vue@3.4.0_@oxc-project+types@0.148.0_@voidzero-dev+vite-plus-core@0.3.1_@types+_e973c555571065b45518274d31553b62/node_modules/@unhead/vue/dist/shared/vue.B8YcFbNO.d.ts
2389
+ //#region ../../node_modules/.pnpm/@unhead+vue@3.4.1_@oxc-project+types@0.150.0_@voidzero-dev+vite-plus-core@0.3.3_@types+_be8c9c4fd57a18926eee558fa4d02f71/node_modules/@unhead/vue/dist/shared/vue.B8YcFbNO.d.ts
2390
2390
  type Falsy = false | null | undefined;
2391
2391
  type MaybeFalsy<T> = T | Falsy;
2392
2392
  type ResolvableValue<T> = MaybeFalsy<T> | (() => MaybeFalsy<T>) | ComputedRef<MaybeFalsy<T>> | Ref<MaybeFalsy<T>>;
@@ -2509,7 +2509,7 @@ interface ReactiveHead {
2509
2509
  type UseHeadInput<_Deprecated = never> = ResolvableValue<ReactiveHead>;
2510
2510
  type VueHeadClient<I = UseHeadInput, R = unknown> = Unhead<I, R> & Plugin;
2511
2511
  //#endregion
2512
- //#region ../../node_modules/.pnpm/@unhead+vue@3.4.0_@oxc-project+types@0.148.0_@voidzero-dev+vite-plus-core@0.3.1_@types+_e973c555571065b45518274d31553b62/node_modules/@unhead/vue/dist/server.d.ts
2512
+ //#region ../../node_modules/.pnpm/@unhead+vue@3.4.1_@oxc-project+types@0.150.0_@voidzero-dev+vite-plus-core@0.3.3_@types+_be8c9c4fd57a18926eee558fa4d02f71/node_modules/@unhead/vue/dist/server.d.ts
2513
2513
  declare function createHead(options?: Omit<CreateServerHeadOptions, 'propResolvers'>): VueHeadClient<UseHeadInput, SSRHeadPayload>;
2514
2514
  //#endregion
2515
2515
  //#region src/client.d.ts
package/dist/client.js CHANGED
@@ -3,7 +3,7 @@ import { islands } from "virtual:ubean-islands-registry";
3
3
  import { callAction, invokeServerFn, useAction, useFormAction } from "@ubean/routes/runtime";
4
4
  import { isRef, toValue } from "vue";
5
5
  export * from "@ubean/client";
6
- //#region ../../node_modules/.pnpm/unhead@3.4.0_@voidzero-dev+vite-plus-core@0.3.1_@types+node@26.5.1_jiti@2.7.0_terser@5._21de6f7d064bc2c8a89403c09d1bb6b3/node_modules/unhead/dist/shared/unhead.D7HkBzZn.mjs
6
+ //#region ../../node_modules/.pnpm/unhead@3.4.1_@voidzero-dev+vite-plus-core@0.3.3_@types+node@26.6.1_@vitejs+devtools@0.7_7ae786e2cf77c7a93069cea6941fc09d/node_modules/unhead/dist/shared/unhead.D7HkBzZn.mjs
7
7
  function registerPlugin(head, p) {
8
8
  if (typeof p === "function" && p.key && head.plugins.has(p.key)) return;
9
9
  const plugin = typeof p === "function" ? p(head) : p;
@@ -58,7 +58,7 @@ function createUnhead(renderer, resolvedOptions = {}) {
58
58
  return head;
59
59
  }
60
60
  //#endregion
61
- //#region ../../node_modules/.pnpm/unhead@3.4.0_@voidzero-dev+vite-plus-core@0.3.1_@types+node@26.5.1_jiti@2.7.0_terser@5._21de6f7d064bc2c8a89403c09d1bb6b3/node_modules/unhead/dist/shared/unhead.CGPOfp5O.mjs
61
+ //#region ../../node_modules/.pnpm/unhead@3.4.1_@voidzero-dev+vite-plus-core@0.3.3_@types+node@26.6.1_@vitejs+devtools@0.7_7ae786e2cf77c7a93069cea6941fc09d/node_modules/unhead/dist/shared/unhead.CGPOfp5O.mjs
62
62
  const SelfClosingTags = /* @__PURE__ */ new Set([
63
63
  "meta",
64
64
  "link",
@@ -143,7 +143,7 @@ function isUnsafeKey(key) {
143
143
  return key === "__proto__" || key === "constructor" || key === "prototype";
144
144
  }
145
145
  //#endregion
146
- //#region ../../node_modules/.pnpm/hookable@6.1.1/node_modules/hookable/dist/index.mjs
146
+ //#region ../../node_modules/.pnpm/hookable@6.1.2/node_modules/hookable/dist/index.mjs
147
147
  function callHooks(hooks, args, startIndex, task) {
148
148
  for (let i = startIndex; i < hooks.length; i += 1) try {
149
149
  const result = task ? task.run(() => hooks[i](...args)) : hooks[i](...args);
@@ -179,11 +179,11 @@ var HookableCore = class {
179
179
  callHook(name, ...args) {
180
180
  const hooks = this._hooks[name];
181
181
  if (!hooks || hooks.length === 0) return;
182
- return callHooks(hooks, args, 0);
182
+ return callHooks(hooks.slice(), args, 0);
183
183
  }
184
184
  };
185
185
  //#endregion
186
- //#region ../../node_modules/.pnpm/unhead@3.4.0_@voidzero-dev+vite-plus-core@0.3.1_@types+node@26.5.1_jiti@2.7.0_terser@5._21de6f7d064bc2c8a89403c09d1bb6b3/node_modules/unhead/dist/shared/unhead.Bm4Y6XQI.mjs
186
+ //#region ../../node_modules/.pnpm/unhead@3.4.1_@voidzero-dev+vite-plus-core@0.3.3_@types+node@26.6.1_@vitejs+devtools@0.7_7ae786e2cf77c7a93069cea6941fc09d/node_modules/unhead/dist/shared/unhead.Bm4Y6XQI.mjs
187
187
  function createHooks(hooks) {
188
188
  const instance = new HookableCore();
189
189
  for (const key in hooks || {}) instance.hook(key, hooks[key]);
@@ -194,7 +194,7 @@ function callHook(head, hook, ctx) {
194
194
  return head.hooks?.callHook(hook, ctx);
195
195
  }
196
196
  //#endregion
197
- //#region ../../node_modules/.pnpm/unhead@3.4.0_@voidzero-dev+vite-plus-core@0.3.1_@types+node@26.5.1_jiti@2.7.0_terser@5._21de6f7d064bc2c8a89403c09d1bb6b3/node_modules/unhead/dist/shared/unhead.-hZVKou0.mjs
197
+ //#region ../../node_modules/.pnpm/unhead@3.4.1_@voidzero-dev+vite-plus-core@0.3.3_@types+node@26.6.1_@vitejs+devtools@0.7_7ae786e2cf77c7a93069cea6941fc09d/node_modules/unhead/dist/shared/unhead.-hZVKou0.mjs
198
198
  const META_NOREWRITE_RE = /^(?:viewport|description|keywords|robots)$/;
199
199
  const META_KEY_ATTRS = [
200
200
  "name",
@@ -539,7 +539,7 @@ function resolveTags(head, options) {
539
539
  return sanitizeTagsInPlace(ctx.tags);
540
540
  }
541
541
  //#endregion
542
- //#region ../../node_modules/.pnpm/unhead@3.4.0_@voidzero-dev+vite-plus-core@0.3.1_@types+node@26.5.1_jiti@2.7.0_terser@5._21de6f7d064bc2c8a89403c09d1bb6b3/node_modules/unhead/dist/shared/unhead.Dssd7L5I.mjs
542
+ //#region ../../node_modules/.pnpm/unhead@3.4.1_@voidzero-dev+vite-plus-core@0.3.3_@types+node@26.6.1_@vitejs+devtools@0.7_7ae786e2cf77c7a93069cea6941fc09d/node_modules/unhead/dist/shared/unhead.Dssd7L5I.mjs
543
543
  const isTruthy = (v) => v === "" || v === true;
544
544
  function capoTagWeight(tag) {
545
545
  if (typeof tag.tagPriority === "number") return tag.tagPriority;
@@ -704,7 +704,7 @@ function createHead$1(options = {}) {
704
704
  return core;
705
705
  }
706
706
  //#endregion
707
- //#region ../../node_modules/.pnpm/@unhead+vue@3.4.0_@oxc-project+types@0.148.0_@voidzero-dev+vite-plus-core@0.3.1_@types+_e973c555571065b45518274d31553b62/node_modules/@unhead/vue/dist/shared/vue.DKb5ZKVl.mjs
707
+ //#region ../../node_modules/.pnpm/@unhead+vue@3.4.1_@oxc-project+types@0.150.0_@voidzero-dev+vite-plus-core@0.3.3_@types+_be8c9c4fd57a18926eee558fa4d02f71/node_modules/@unhead/vue/dist/shared/vue.DKb5ZKVl.mjs
708
708
  const headSymbol = "usehead";
709
709
  // @__NO_SIDE_EFFECTS__
710
710
  function vueInstall(head) {
@@ -715,10 +715,10 @@ function vueInstall(head) {
715
715
  } }.install;
716
716
  }
717
717
  //#endregion
718
- //#region ../../node_modules/.pnpm/@unhead+vue@3.4.0_@oxc-project+types@0.148.0_@voidzero-dev+vite-plus-core@0.3.1_@types+_e973c555571065b45518274d31553b62/node_modules/@unhead/vue/dist/shared/vue.D2XR8FqS.mjs
718
+ //#region ../../node_modules/.pnpm/@unhead+vue@3.4.1_@oxc-project+types@0.150.0_@voidzero-dev+vite-plus-core@0.3.3_@types+_be8c9c4fd57a18926eee558fa4d02f71/node_modules/@unhead/vue/dist/shared/vue.D2XR8FqS.mjs
719
719
  const VueResolver = /* @__PURE__ */ Object.assign((_, value) => isRef(value) ? toValue(value) : value, { _static: true });
720
720
  //#endregion
721
- //#region ../../node_modules/.pnpm/@unhead+vue@3.4.0_@oxc-project+types@0.148.0_@voidzero-dev+vite-plus-core@0.3.1_@types+_e973c555571065b45518274d31553b62/node_modules/@unhead/vue/dist/server.mjs
721
+ //#region ../../node_modules/.pnpm/@unhead+vue@3.4.1_@oxc-project+types@0.150.0_@voidzero-dev+vite-plus-core@0.3.3_@types+_be8c9c4fd57a18926eee558fa4d02f71/node_modules/@unhead/vue/dist/server.mjs
722
722
  // @__NO_SIDE_EFFECTS__
723
723
  function createHead(options = {}) {
724
724
  const head = /* @__PURE__ */ createHead$1({
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { InternalFetchOptions, PageAssetTags, PageRenderer, defineDataKey } from "@ubean/pages";
2
- import { AppPluginConfig, CreateUbeanRouterOptions, DataCacheStore, DefineAppOptions, Head, HydrateIslandsOptions, I18nRuntimeConfig, IslandHydrateOptions, IslandRecord, Link, LinkProps, PageView, ResolvedAppConfig, RouteLocation, RouteLocationRaw, TypedLinkProps, UbeanAppInstance, UbeanVueContext, UseAsyncDataOptions, UseAsyncDataReturn, UseCacheViewsReturn, UsePageTransitionReturn, UseReloadSignalReturn, ViewTransitionOptions, applyAppConfig, clearCache, clearPageTransition, collectIslands, configureI18nRuntime, createDataCacheStore, createDefaultAppConfig, createLinkHandler, createUbeanI18n, createUbeanRouter, createUbeanSSRApp, createUseAsyncData, defineApp, defineMeta, definePage, disablePageCache, enablePageCache, excludePageCache, extractLocaleFromPath, extractPageData, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getI18nRuntimeConfig, getInitialPageData, getInitialState, getLocale, getNavigationType, getPageTransitionName, getReloadCounter, hasPendingIslands, hydrateIsland, hydrateIslands, includePageCache, initCachedViewsFromRoutes, invalidateCache, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, localizePath, mergeAppConfig, reloadPage, resetRouteCache, resolveRoute, scheduleIslandHydration, setLocale, setPageTransition, supportsViewTransitions, switchLocalePath, useCacheViews, useHead, useHeadInstance, useLocaleHead, useLocalePath, useLocaleRoute, usePage, usePageTransition, useReloadSignal, useServerData, useSwitchLocalePath, useViewTransition, useViewTransitionState, withViewTransition } from "@ubean/client";
2
+ import { AppPluginConfig, CreateUbeanRouterOptions, DataCacheStore, DefineAppOptions, Head, HydrateIslandsOptions, I18nRuntimeConfig, IslandHydrateOptions, IslandRecord, Link, LinkProps, MatcherFunction, MatcherGuardOptions, PageView, ResolvedAppConfig, RouteLocation, RouteLocationRaw, TypedLinkProps, UbeanAppInstance, UbeanVueContext, UseAsyncDataOptions, UseAsyncDataReturn, UseCacheViewsReturn, UsePageTransitionReturn, UseReloadSignalReturn, ViewTransitionOptions, applyAppConfig, clearCache, clearPageTransition, collectIslands, configureI18nRuntime, createDataCacheStore, createDefaultAppConfig, createLinkHandler, createMatcherGuard, createUbeanI18n, createUbeanRouter, createUbeanSSRApp, createUseAsyncData, defineApp, defineMatcher, defineMeta, definePage, disablePageCache, enablePageCache, excludePageCache, extractLocaleFromPath, extractPageData, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getI18nRuntimeConfig, getInitialPageData, getInitialState, getLocale, getMatcher, getNavigationType, getPageTransitionName, getReloadCounter, hasMatcher, hasPendingIslands, hydrateIsland, hydrateIslands, includePageCache, initCachedViewsFromRoutes, invalidateCache, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, listMatcherNames, localizePath, mergeAppConfig, reloadPage, resetRouteCache, resolveRoute, scheduleIslandHydration, setLocale, setPageTransition, supportsViewTransitions, switchLocalePath, useCacheViews, useHead, useHeadInstance, useLocaleHead, useLocalePath, useLocaleRoute, usePage, usePageTransition, useReloadSignal, useSchemaOrg, useServerData, useSwitchLocalePath, useViewTransition, useViewTransitionState, validateParams, withViewTransition } from "@ubean/client";
3
3
  import { IslandOptions, IslandStrategy, ServerIslandOptions, defineIsland, defineServerIsland, getIslandsBootstrapScript, vClient } from "@ubean/islands";
4
4
  import { LogLevelName, RequestLoggerOptions, UbeanLogger, UbeanLoggerOptions, createUbeanLogger, getLogger, logger, setDebugLogging, setMinLevel } from "@ubean/shared/logger";
5
5
  import { UbeanConfig } from "@ubean/config";
@@ -11,4 +11,4 @@ export * from "@ubean/markdown";
11
11
  //#region src/index.d.ts
12
12
  export declare function defineConfig(config?: UbeanConfig): UbeanConfig;
13
13
  //#endregion
14
- export { type AppPluginConfig, type CreateUbeanRouterOptions, type DataCacheStore, type DefineAppOptions, Head, type HttpMethod, type HydrateIslandsOptions, type I18nRuntimeConfig, type InternalFetchOptions, type IslandHydrateOptions, type IslandOptions, type IslandRecord, type IslandStrategy, Link, type LinkProps, type LogLevelName, type PageAssetTags, type PageHead, type PageRenderer, PageView, type RequestLoggerOptions, type ResolvedAppConfig, type RouteLocation, type RouteLocationRaw, type ServerIslandOptions, type TypedLinkProps, type UbeanAppInstance, type UbeanLogger, type UbeanLoggerOptions, type UbeanVueContext, type UseAsyncDataOptions, type UseAsyncDataReturn, type UseCacheViewsReturn, type UsePageTransitionReturn, type UseReloadSignalReturn, type ViewTransitionOptions, applyAppConfig, clearCache, clearPageTransition, collectIslands, configureI18nRuntime, createDataCacheStore, createDefaultAppConfig, createLinkHandler, createUbeanI18n, createUbeanLogger, createUbeanRouter, createUbeanSSRApp, createUseAsyncData, defineApp, defineDataKey, defineIsland, defineMeta, definePage, defineServerIsland, disablePageCache, enablePageCache, excludePageCache, extractLocaleFromPath, extractPageData, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getI18nRuntimeConfig, getInitialPageData, getInitialState, getIslandsBootstrapScript, getLocale, getLogger, getNavigationType, getPageTransitionName, getReloadCounter, hasPendingIslands, hydrateIsland, hydrateIslands, includePageCache, initCachedViewsFromRoutes, invalidateCache, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, localizePath, logger, mergeAppConfig, reloadPage, resetRouteCache, resolveRoute, scheduleIslandHydration, setDebugLogging, setLocale, setMinLevel, setPageTransition, supportsViewTransitions, switchLocalePath, useCacheViews, useHead, useHeadInstance, useLocaleHead, useLocalePath, useLocaleRoute, usePage, usePageTransition, useReloadSignal, useServerData, useSwitchLocalePath, useViewTransition, useViewTransitionState, vClient, withViewTransition };
14
+ export { type AppPluginConfig, type CreateUbeanRouterOptions, type DataCacheStore, type DefineAppOptions, Head, type HttpMethod, type HydrateIslandsOptions, type I18nRuntimeConfig, type InternalFetchOptions, type IslandHydrateOptions, type IslandOptions, type IslandRecord, type IslandStrategy, Link, type LinkProps, type LogLevelName, type MatcherFunction, type MatcherGuardOptions, type PageAssetTags, type PageHead, type PageRenderer, PageView, type RequestLoggerOptions, type ResolvedAppConfig, type RouteLocation, type RouteLocationRaw, type ServerIslandOptions, type TypedLinkProps, type UbeanAppInstance, type UbeanLogger, type UbeanLoggerOptions, type UbeanVueContext, type UseAsyncDataOptions, type UseAsyncDataReturn, type UseCacheViewsReturn, type UsePageTransitionReturn, type UseReloadSignalReturn, type ViewTransitionOptions, applyAppConfig, clearCache, clearPageTransition, collectIslands, configureI18nRuntime, createDataCacheStore, createDefaultAppConfig, createLinkHandler, createMatcherGuard, createUbeanI18n, createUbeanLogger, createUbeanRouter, createUbeanSSRApp, createUseAsyncData, defineApp, defineDataKey, defineIsland, defineMatcher, defineMeta, definePage, defineServerIsland, disablePageCache, enablePageCache, excludePageCache, extractLocaleFromPath, extractPageData, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getI18nRuntimeConfig, getInitialPageData, getInitialState, getIslandsBootstrapScript, getLocale, getLogger, getMatcher, getNavigationType, getPageTransitionName, getReloadCounter, hasMatcher, hasPendingIslands, hydrateIsland, hydrateIslands, includePageCache, initCachedViewsFromRoutes, invalidateCache, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, listMatcherNames, localizePath, logger, mergeAppConfig, reloadPage, resetRouteCache, resolveRoute, scheduleIslandHydration, setDebugLogging, setLocale, setMinLevel, setPageTransition, supportsViewTransitions, switchLocalePath, useCacheViews, useHead, useHeadInstance, useLocaleHead, useLocalePath, useLocaleRoute, usePage, usePageTransition, useReloadSignal, useSchemaOrg, useServerData, useSwitchLocalePath, useViewTransition, useViewTransitionState, vClient, validateParams, withViewTransition };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineDataKey } from "@ubean/pages";
2
- import { Head, Link, PageView, applyAppConfig, clearCache, clearPageTransition, collectIslands, configureI18nRuntime, createDataCacheStore, createDefaultAppConfig, createLinkHandler, createUbeanI18n, createUbeanRouter, createUbeanSSRApp, createUseAsyncData, defineApp, defineMeta, definePage, disablePageCache, enablePageCache, excludePageCache, extractLocaleFromPath, extractPageData, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getI18nRuntimeConfig, getInitialPageData, getInitialState, getLocale, getNavigationType, getPageTransitionName, getReloadCounter, hasPendingIslands, hydrateIsland, hydrateIslands, includePageCache, initCachedViewsFromRoutes, invalidateCache, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, localizePath, mergeAppConfig, reloadPage, resetRouteCache, resolveRoute, scheduleIslandHydration, setLocale, setPageTransition, supportsViewTransitions, switchLocalePath, useCacheViews, useHead, useHeadInstance, useLocaleHead, useLocalePath, useLocaleRoute, usePage, usePageTransition, useReloadSignal, useServerData, useSwitchLocalePath, useViewTransition, useViewTransitionState, withViewTransition } from "@ubean/client";
2
+ import { Head, Link, PageView, applyAppConfig, clearCache, clearPageTransition, collectIslands, configureI18nRuntime, createDataCacheStore, createDefaultAppConfig, createLinkHandler, createMatcherGuard, createUbeanI18n, createUbeanRouter, createUbeanSSRApp, createUseAsyncData, defineApp, defineMatcher, defineMeta, definePage, disablePageCache, enablePageCache, excludePageCache, extractLocaleFromPath, extractPageData, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getI18nRuntimeConfig, getInitialPageData, getInitialState, getLocale, getMatcher, getNavigationType, getPageTransitionName, getReloadCounter, hasMatcher, hasPendingIslands, hydrateIsland, hydrateIslands, includePageCache, initCachedViewsFromRoutes, invalidateCache, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, listMatcherNames, localizePath, mergeAppConfig, reloadPage, resetRouteCache, resolveRoute, scheduleIslandHydration, setLocale, setPageTransition, supportsViewTransitions, switchLocalePath, useCacheViews, useHead, useHeadInstance, useLocaleHead, useLocalePath, useLocaleRoute, usePage, usePageTransition, useReloadSignal, useSchemaOrg, useServerData, useSwitchLocalePath, useViewTransition, useViewTransitionState, validateParams, withViewTransition } from "@ubean/client";
3
3
  import { defineIsland, defineServerIsland, getIslandsBootstrapScript, vClient } from "@ubean/islands";
4
4
  import { createUbeanLogger, getLogger, logger, setDebugLogging, setMinLevel } from "@ubean/shared/logger";
5
5
  export * from "@ubean/shared";
@@ -11,4 +11,4 @@ function defineConfig(config) {
11
11
  return config ?? {};
12
12
  }
13
13
  //#endregion
14
- export { Head, Link, PageView, applyAppConfig, clearCache, clearPageTransition, collectIslands, configureI18nRuntime, createDataCacheStore, createDefaultAppConfig, createLinkHandler, createUbeanI18n, createUbeanLogger, createUbeanRouter, createUbeanSSRApp, createUseAsyncData, defineApp, defineConfig, defineDataKey, defineIsland, defineMeta, definePage, defineServerIsland, disablePageCache, enablePageCache, excludePageCache, extractLocaleFromPath, extractPageData, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getI18nRuntimeConfig, getInitialPageData, getInitialState, getIslandsBootstrapScript, getLocale, getLogger, getNavigationType, getPageTransitionName, getReloadCounter, hasPendingIslands, hydrateIsland, hydrateIslands, includePageCache, initCachedViewsFromRoutes, invalidateCache, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, localizePath, logger, mergeAppConfig, reloadPage, resetRouteCache, resolveRoute, scheduleIslandHydration, setDebugLogging, setLocale, setMinLevel, setPageTransition, supportsViewTransitions, switchLocalePath, useCacheViews, useHead, useHeadInstance, useLocaleHead, useLocalePath, useLocaleRoute, usePage, usePageTransition, useReloadSignal, useServerData, useSwitchLocalePath, useViewTransition, useViewTransitionState, vClient, withViewTransition };
14
+ export { Head, Link, PageView, applyAppConfig, clearCache, clearPageTransition, collectIslands, configureI18nRuntime, createDataCacheStore, createDefaultAppConfig, createLinkHandler, createMatcherGuard, createUbeanI18n, createUbeanLogger, createUbeanRouter, createUbeanSSRApp, createUseAsyncData, defineApp, defineConfig, defineDataKey, defineIsland, defineMatcher, defineMeta, definePage, defineServerIsland, disablePageCache, enablePageCache, excludePageCache, extractLocaleFromPath, extractPageData, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getI18nRuntimeConfig, getInitialPageData, getInitialState, getIslandsBootstrapScript, getLocale, getLogger, getMatcher, getNavigationType, getPageTransitionName, getReloadCounter, hasMatcher, hasPendingIslands, hydrateIsland, hydrateIslands, includePageCache, initCachedViewsFromRoutes, invalidateCache, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, listMatcherNames, localizePath, logger, mergeAppConfig, reloadPage, resetRouteCache, resolveRoute, scheduleIslandHydration, setDebugLogging, setLocale, setMinLevel, setPageTransition, supportsViewTransitions, switchLocalePath, useCacheViews, useHead, useHeadInstance, useLocaleHead, useLocalePath, useLocaleRoute, usePage, usePageTransition, useReloadSignal, useSchemaOrg, useServerData, useSwitchLocalePath, useViewTransition, useViewTransitionState, vClient, validateParams, withViewTransition };
package/dist/server.d.ts CHANGED
@@ -4,5 +4,4 @@ import { createRequestLoggerMiddleware } from "@ubean/shared/logger/hono";
4
4
  export * from "@ubean/app";
5
5
  export * from "@ubean/server";
6
6
  export * from "@ubean/routes";
7
- export * from "@ubean/shared/node";
8
7
  export { createRequestLoggerMiddleware, describeRoute, openAPIRouteHandler, resolver, sqlRawAlias, validator };
package/dist/server.js CHANGED
@@ -4,5 +4,4 @@ import { createRequestLoggerMiddleware } from "@ubean/shared/logger/hono";
4
4
  export * from "@ubean/app";
5
5
  export * from "@ubean/server";
6
6
  export * from "@ubean/routes";
7
- export * from "@ubean/shared/node";
8
7
  export { createRequestLoggerMiddleware, describeRoute, openAPIRouteHandler, resolver, sqlRawAlias, validator };
package/dist/vite.d.ts CHANGED
@@ -1,20 +1,31 @@
1
1
  import { UbeanPluginOptions } from "@ubean/build/vite";
2
2
  import { UbeanViteOptions } from "@ubean/build/vue";
3
+ import { ensureUbeanConfig } from "@ubean/config";
3
4
  import { Plugin } from "vite";
4
5
  //#region src/vite.d.ts
5
6
  /**
6
7
  * ubean 默认 Vite 插件组合(无参数版本)。
7
8
  *
8
- * 返回一个扁平的 `Plugin[]`,包含:
9
+ * 返回的数组包含:
9
10
  * 1. `ubeanCorePlugin` — 框架无关的核心插件(路由扫描、虚拟模块、宏转换)
10
11
  * 2. `ubeanVite` — Vue 专属插件(页面/入口虚拟模块、自动导入、组件解析)
11
12
  * 3. `ubeanIslandsPlugin` — Islands 架构插件(SFC 中 `v-client.*` 指令转换)
12
13
  * 4. `ubeanServerActionsPlugin` — Server Actions 插件(`defineAction()` 调用转换)
13
14
  *
14
- * 配置来源:始终从 `ubean.config.ts` 加载(同步),不接受 `config` 参数。
15
+ * **是 async 的**,因为配置在工厂内 `await`(`vite.config.ts` 里照常写
16
+ * `plugins: [ubeanPlugin()]`,不需要 await —— Vite 的 `PluginOption` 是
17
+ * `Thenable<Plugin | … | PluginOption[]>`,插件数组里的 Promise 会在跑任何钩子之前被 await)。
18
+ *
19
+ * 这样做的意义:`ubean.config.ts` 的**顶层 await** 在两条路径上都能解析 ——
20
+ * 裸 Vite(`vite dev` / `vp dev`)与 CLI(`ubean dev` / `build` / `preview`)走同一个入口。
21
+ * 此前工厂必须同步拿配置(jiti 同步模式把配置编译成 CJS,顶层 await 是语法错误),
22
+ * 只有 CLI 路径能用顶层 await,裸 Vite 路径会崩在 `vite.config.ts` 求值阶段。
23
+ *
24
+ * 配置来源始终是 `ubean.config.ts`(不接受参数)。缓存优先:CLI 已加载时直接复用,
25
+ * 既不做二次加载,也不会覆盖 CLI 对 resolved 配置的原地修改。
15
26
  *
16
27
  * 注:组件级缓存通过 `defineCachedFunction()` 显式调用,无需 Vite 插件参与。
17
28
  */
18
- export declare function ubeanPlugin(): Plugin[];
29
+ export declare function ubeanPlugin(): Promise<Plugin[]>;
19
30
  //#endregion
20
- export type { UbeanPluginOptions, UbeanViteOptions };
31
+ export { type UbeanPluginOptions, type UbeanViteOptions, ensureUbeanConfig };
package/dist/vite.js CHANGED
@@ -1,30 +1,52 @@
1
1
  import { ubeanServerActionsPlugin } from "@ubean/build/actions";
2
- import { ubeanPlugin as ubeanPlugin$1 } from "@ubean/build/vite";
2
+ import { DEVTOOLS_PASS_THROUGH_PREFIXES, createVirtualRegistry, ubeanDevRequestPlugin, ubeanPlugin as ubeanPlugin$1 } from "@ubean/build/vite";
3
3
  import { ubeanVite } from "@ubean/build/vue";
4
- import { loadUbeanConfigSync } from "@ubean/config";
4
+ import { ensureUbeanConfig } from "@ubean/config";
5
5
  import { ubeanIslandsPlugin } from "@ubean/islands/vite";
6
6
  //#region src/vite.ts
7
7
  /**
8
8
  * ubean 默认 Vite 插件组合(无参数版本)。
9
9
  *
10
- * 返回一个扁平的 `Plugin[]`,包含:
10
+ * 返回的数组包含:
11
11
  * 1. `ubeanCorePlugin` — 框架无关的核心插件(路由扫描、虚拟模块、宏转换)
12
12
  * 2. `ubeanVite` — Vue 专属插件(页面/入口虚拟模块、自动导入、组件解析)
13
13
  * 3. `ubeanIslandsPlugin` — Islands 架构插件(SFC 中 `v-client.*` 指令转换)
14
14
  * 4. `ubeanServerActionsPlugin` — Server Actions 插件(`defineAction()` 调用转换)
15
15
  *
16
- * 配置来源:始终从 `ubean.config.ts` 加载(同步),不接受 `config` 参数。
16
+ * **是 async 的**,因为配置在工厂内 `await`(`vite.config.ts` 里照常写
17
+ * `plugins: [ubeanPlugin()]`,不需要 await —— Vite 的 `PluginOption` 是
18
+ * `Thenable<Plugin | … | PluginOption[]>`,插件数组里的 Promise 会在跑任何钩子之前被 await)。
19
+ *
20
+ * 这样做的意义:`ubean.config.ts` 的**顶层 await** 在两条路径上都能解析 ——
21
+ * 裸 Vite(`vite dev` / `vp dev`)与 CLI(`ubean dev` / `build` / `preview`)走同一个入口。
22
+ * 此前工厂必须同步拿配置(jiti 同步模式把配置编译成 CJS,顶层 await 是语法错误),
23
+ * 只有 CLI 路径能用顶层 await,裸 Vite 路径会崩在 `vite.config.ts` 求值阶段。
24
+ *
25
+ * 配置来源始终是 `ubean.config.ts`(不接受参数)。缓存优先:CLI 已加载时直接复用,
26
+ * 既不做二次加载,也不会覆盖 CLI 对 resolved 配置的原地修改。
17
27
  *
18
28
  * 注:组件级缓存通过 `defineCachedFunction()` 显式调用,无需 Vite 插件参与。
19
29
  */
20
- function ubeanPlugin() {
21
- const config = loadUbeanConfigSync();
22
- return [
23
- ubeanPlugin$1({ config }),
24
- ...ubeanVite({ config }),
30
+ async function ubeanPlugin() {
31
+ const config = await ensureUbeanConfig();
32
+ const registry = createVirtualRegistry();
33
+ const plugins = [
34
+ ubeanPlugin$1({
35
+ config,
36
+ registry
37
+ }),
38
+ ...ubeanVite({
39
+ config,
40
+ registry
41
+ }),
25
42
  ubeanIslandsPlugin(),
26
43
  ubeanServerActionsPlugin({ root: config.rootDir || process.cwd() })
27
44
  ];
45
+ plugins.push(ubeanDevRequestPlugin({
46
+ passThrough: config.devtools?.enabled ? [...DEVTOOLS_PASS_THROUGH_PREFIXES] : [],
47
+ devtoolsRedirect: config.devtools?.enabled === true
48
+ }));
49
+ return plugins;
28
50
  }
29
51
  //#endregion
30
- export { ubeanPlugin };
52
+ export { ensureUbeanConfig, ubeanPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ubean",
3
- "version": "0.5.2",
3
+ "version": "0.6.0-beta.2",
4
4
  "description": "Vue-first full-stack meta-framework built on Vite-Plus with Hono (aggregator of all @ubean/* subpackages)",
5
5
  "bin": {
6
6
  "ubean": "./bin/ubean.mjs"
@@ -51,31 +51,31 @@
51
51
  "@hono/standard-validator": "^0.4.0",
52
52
  "@standard-community/standard-json": "^0.3.6",
53
53
  "@standard-community/standard-openapi": "^0.2.10",
54
- "@ubean/app": "0.5.2",
55
- "@ubean/build": "0.5.2",
56
- "@ubean/cli": "0.5.2",
57
- "@ubean/client": "0.5.2",
58
- "@ubean/config": "0.5.2",
59
- "@ubean/i18n": "0.5.2",
60
- "@ubean/integrations": "0.5.2",
61
- "@ubean/islands": "0.5.2",
62
- "@ubean/markdown": "0.5.2",
63
- "@ubean/pages": "0.5.2",
64
- "@ubean/preset": "0.5.2",
65
- "@ubean/routes": "0.5.2",
66
- "@ubean/scan": "0.5.2",
67
- "@ubean/seo": "0.5.2",
68
- "@ubean/server": "0.5.2",
69
- "@ubean/shared": "0.5.2",
70
- "hono": "4.13.7",
54
+ "@ubean/app": "0.6.0-beta.2",
55
+ "@ubean/build": "0.6.0-beta.2",
56
+ "@ubean/cli": "0.6.0-beta.2",
57
+ "@ubean/client": "0.6.0-beta.2",
58
+ "@ubean/config": "0.6.0-beta.2",
59
+ "@ubean/i18n": "0.6.0-beta.2",
60
+ "@ubean/integrations": "0.6.0-beta.2",
61
+ "@ubean/islands": "0.6.0-beta.2",
62
+ "@ubean/markdown": "0.6.0-beta.2",
63
+ "@ubean/pages": "0.6.0-beta.2",
64
+ "@ubean/preset": "0.6.0-beta.2",
65
+ "@ubean/routes": "0.6.0-beta.2",
66
+ "@ubean/scan": "0.6.0-beta.2",
67
+ "@ubean/seo": "0.6.0-beta.2",
68
+ "@ubean/server": "0.6.0-beta.2",
69
+ "@ubean/shared": "0.6.0-beta.2",
70
+ "hono": "4.13.8",
71
71
  "hono-openapi": "^1.3.3"
72
72
  },
73
73
  "devDependencies": {
74
- "@types/node": "^26.5.0",
74
+ "@types/node": "^26.6.1",
75
75
  "typescript": "npm:typescript-native-bridge@latest",
76
- "vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
77
- "vite-plus": "0.3.1",
78
- "vue": "^3.5.42"
76
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.3.3",
77
+ "vite-plus": "0.3.3",
78
+ "vue": "^3.5.43"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "vue": "^3.0.0"