diff --git a/bun.lock b/bun.lock index 39fcddb8..a1d6251a 100644 --- a/bun.lock +++ b/bun.lock @@ -325,7 +325,7 @@ }, "packages/cli": { "name": "@wrnexus/cli", - "version": "0.8.73", + "version": "0.8.74", "bin": { "wrnexus": "src/index.ts", }, diff --git a/packages/cli/package.json b/packages/cli/package.json index e4203fc2..f434ff47 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/cli", - "version": "0.8.73", + "version": "0.8.74", "type": "module", "main": "src/index.ts", "exports": { diff --git a/packages/cli/src/build.ts b/packages/cli/src/build.ts index eb038cef..3ab9a88f 100644 --- a/packages/cli/src/build.ts +++ b/packages/cli/src/build.ts @@ -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 { 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(