Include server-served client runtimes in asset cache version
Quality / quality (ubuntu-latest) (push) Canceled after 0s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
Clintchiz committed 2026-10-01 20:43:03 +05:30
1 parent c3818f0041
commit 0a17867ae7
3 files changed
+8 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@wrnexus/cli",
"version": "0.8.73",
"version": "0.8.74",
"type": "module",
"main": "src/index.ts",
"exports": {
+6 -1
View File
@@ -23,7 +23,7 @@ import {
} from "node:fs";
import { basename, dirname, extname, join, relative, resolve } from "node:path";
import { buildRouter, type Route } from "@wrnexus/router";
import { getComponentControllerRuntime, getReactiveRuntime } from "@wrnexus/csr";
import { getComponentControllerRuntime, getReactiveRuntime, getNavRuntime, getActionRuntime, getRealtimeRuntime } from "@wrnexus/csr";
import { getIslandRuntime } from "@wrnexus/react/runtime";
import {
analyzeRuntimeImports,
@@ -490,6 +490,11 @@ export async function runBuild(appRoot: string): Promise<void> {
console.log(`✓ Partial shells: ${partialShells.size} build-time route shell(s)`);
}
const assetHash = createHash("sha256");
// These runtimes are served from the framework rather than emitted files,
// but share the immutable asset URL version and must invalidate it too.
assetHash.update(getNavRuntime());
assetHash.update(getActionRuntime());
assetHash.update(getRealtimeRuntime());
for (const file of clientFiles.values()) assetHash.update(readFileSync(file));
if (clientFiles.size) console.log(`✓ Client modules: ${clientFiles.size} bundled module(s)`);
const emittedPluginAssets = await emitPluginAssets(