feat: add safe project upgrades and production performance fixes

This commit is contained in:
2026-07-12 16:54:22 +05:30
parent a524c08126
commit 935b3103dd
68 changed files with 555 additions and 107 deletions
+5
View File
@@ -75,6 +75,8 @@ export interface ProdOptions {
theme?: ResolvedTheme;
/** Absolute path to the pre-built Wire UI stylesheet (`ui.css`). */
uiCssPath?: string;
/** Combined production theme + Wire UI stylesheet. */
frameworkCssPath?: string;
/** Pre-built `window.__wireSchemas = {...}` script for client validation. */
schemasJs?: string;
/** Resolved i18n bundle (default lang + locale messages). */
@@ -216,6 +218,8 @@ function createProdAssetServer(opts: ProdOptions): AssetServer {
if (pathname === "/__wrnexus/theme.css") return serveFile(opts.themePath, CSS_HEADERS);
if (pathname === "/__wrnexus/theme.js") return serveFile(opts.themeJsPath, JS_HEADERS);
if (pathname === "/__wrnexus/ui.css") return serveFile(opts.uiCssPath, CSS_HEADERS);
if (pathname === "/__wrnexus/framework.css")
return serveFile(opts.frameworkCssPath, CSS_HEADERS);
if (pathname === "/__wrnexus/styles.css") return serveFile(opts.stylesPath, CSS_HEADERS);
return servePublicAsset(opts.publicDir, pathname, MODE);
},
@@ -279,6 +283,7 @@ export function createProductionHandlers(
assets,
hasStyles: !!opts.stylesPath,
hasUi: !!opts.uiCssPath,
hasFrameworkStyles: !!opts.frameworkCssPath,
theme: opts.theme,
i18n: opts.i18n,
inlineStyles: opts.inlineStyles,