@nifrajs/web 2.9.1 → 2.11.0

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.
Files changed (62) hide show
  1. package/dist/client.d.ts +12 -0
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +16 -0
  4. package/dist/client.js.map +1 -1
  5. package/dist/dev-ssr-graph.d.ts +33 -0
  6. package/dist/dev-ssr-graph.d.ts.map +1 -0
  7. package/dist/dev-ssr-graph.js +285 -0
  8. package/dist/dev-ssr-graph.js.map +1 -0
  9. package/dist/dev.d.ts.map +1 -1
  10. package/dist/dev.js +76 -18
  11. package/dist/dev.js.map +1 -1
  12. package/dist/index.d.ts +28 -25
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +53 -79
  15. package/dist/index.js.map +1 -1
  16. package/dist/internal/head-merge.d.ts +27 -0
  17. package/dist/internal/head-merge.d.ts.map +1 -0
  18. package/dist/internal/head-merge.js +65 -0
  19. package/dist/internal/head-merge.js.map +1 -0
  20. package/dist/internal/server-boundary.d.ts +1 -2
  21. package/dist/internal/server-boundary.d.ts.map +1 -1
  22. package/dist/internal/server-boundary.js +1 -2
  23. package/dist/internal/server-boundary.js.map +1 -1
  24. package/dist/isr.d.ts +32 -3
  25. package/dist/isr.d.ts.map +1 -1
  26. package/dist/isr.js +181 -16
  27. package/dist/isr.js.map +1 -1
  28. package/dist/manifest.d.ts +2 -0
  29. package/dist/manifest.d.ts.map +1 -1
  30. package/dist/manifest.js.map +1 -1
  31. package/dist/plugins/css-modules.d.ts +12 -0
  32. package/dist/plugins/css-modules.d.ts.map +1 -1
  33. package/dist/plugins/css-modules.js +0 -0
  34. package/dist/plugins/css-modules.js.map +1 -1
  35. package/dist/plugins/kit.d.ts +54 -0
  36. package/dist/plugins/kit.d.ts.map +1 -1
  37. package/dist/plugins/kit.js +66 -0
  38. package/dist/plugins/kit.js.map +1 -1
  39. package/dist/public-dir.d.ts.map +1 -1
  40. package/dist/public-dir.js +71 -4
  41. package/dist/public-dir.js.map +1 -1
  42. package/dist/route-manifest.d.ts +3 -1
  43. package/dist/route-manifest.d.ts.map +1 -1
  44. package/dist/route-manifest.js +3 -0
  45. package/dist/route-manifest.js.map +1 -1
  46. package/dist/vite.d.ts.map +1 -1
  47. package/dist/vite.js +27 -1
  48. package/dist/vite.js.map +1 -1
  49. package/package.json +3 -3
  50. package/src/client.ts +28 -0
  51. package/src/dev-ssr-graph.ts +311 -0
  52. package/src/dev.ts +81 -20
  53. package/src/index.ts +63 -71
  54. package/src/internal/head-merge.ts +80 -0
  55. package/src/internal/server-boundary.ts +1 -2
  56. package/src/isr.ts +216 -19
  57. package/src/manifest.ts +2 -0
  58. package/src/plugins/css-modules.ts +0 -0
  59. package/src/plugins/kit.ts +71 -0
  60. package/src/public-dir.ts +74 -4
  61. package/src/route-manifest.ts +10 -1
  62. package/src/vite.ts +29 -1
package/dist/dev.js CHANGED
@@ -10,9 +10,9 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
10
10
  * `@nifrajs/web/dev` - the **Bun pipeline's** dev server: one toolchain, no Vite in the process.
11
11
  *
12
12
  * nifra ships two dev pipelines and the rule between them is that a pipeline owns a whole phase. The
13
- * Vite server (`@nifrajs/web/vite`) is the default - mature framework plugins, and it resolves SSR as
14
- * well as the client so both halves agree on every specifier. This is the other one: `Bun.serve` bundles
15
- * and hot-reloads the client while Bun's runtime resolves SSR. Only one toolchain is present, so the two
13
+ * Vite server (`@nifrajs/web/vite`) is the Vite-only escape hatch - mature framework plugins, and it
14
+ * resolves SSR as well as the client so both halves agree on every specifier. This is the other one:
15
+ * `Bun.serve` bundles and hot-reloads the client while Bun's runtime resolves SSR. Only one toolchain is present, so the two
16
16
  * cannot disagree.
17
17
  *
18
18
  * What you get: React Fast Refresh WITH state preserved - Bun's dev server applies it natively, no plugin
@@ -22,9 +22,9 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
22
22
  * not, and saving it does a clean full reload. Plus no Vite dependency and ONE bundler across dev and
23
23
  * production, which is the real prize - the dev/prod seam disappears.
24
24
  *
25
- * What you give up: `*.module.css`. Bun's DEV-server bundler has no CSS-Modules transform (its production
26
- * `Bun.build` does), so the import compiles to a dangling reference. Plain CSS and Tailwind are fine. The
27
- * CLI refuses `nifra dev --bun` for a CSS-Modules app rather than serving a broken client.
25
+ * CSS Modules, server functions, and `*.server` modules use the same production transforms through the
26
+ * generated Bun config. The CLI owns that config because Bun's HTML dev server accepts plugins only from
27
+ * `[serve.static] plugins`; direct callers should pass the equivalent plugin through their Bun config.
28
28
  *
29
29
  * ## How the two halves meet
30
30
  *
@@ -46,7 +46,10 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
46
46
  * production, which reads CSS from the build manifest, is perfectly fine.
47
47
  *
48
48
  * SSR invalidation is Bun's import cache rather than Vite's module graph, so route modules are re-imported
49
- * under a changing query on each change - which is what `discoverRoutes({ importQuery })` exists for.
49
+ * under a changing query on each change - which is what `discoverRoutes({ importQuery })` exists for. That
50
+ * query stops at the route file, so everything BELOW it - components, helpers, `*.server` modules - is
51
+ * tracked and re-keyed per module by `./dev-ssr-graph.ts`, or SSR would render the code that was on disk
52
+ * when the server started.
50
53
  *
51
54
  * Bun-only + build-time; never imported by the edge runtime.
52
55
  */
@@ -56,8 +59,10 @@ import { buildClient } from "./build.js";
56
59
  import { resolveDevEntry } from "./bun-dev-entry.js";
57
60
  import { createDevDiagnostics } from "./dev-diagnostics.js";
58
61
  import { explainBindFailure } from "./dev-port.js";
62
+ import { createSsrGraph } from "./dev-ssr-graph.js";
59
63
  import { discoverRoutes } from "./fs.js";
60
64
  import { DEFAULT_DEV_PORT, generateClientEntry } from "./index.js";
65
+ import { DEV_HMR_ENV, DEV_ROOT_ENV, DEV_ROUTES_ENV } from "./plugins/kit.js";
61
66
  import { servePublicDir } from "./public-dir.js";
62
67
  export { LAST_ERROR_PATH } from "./diagnostic.js";
63
68
  /**
@@ -169,13 +174,52 @@ export function injectStyles(html, styles) {
169
174
  export async function createDevServer(options) {
170
175
  const { createApp, port = DEFAULT_DEV_PORT, routesDir, clientModule } = options;
171
176
  const serve = bunServe();
177
+ // Tell the framework compiler plugins they are compiling for a DEV SERVER, so they may emit HMR
178
+ // wiring. It cannot be a plugin constructor argument: an app builds its `clientPlugins` once in
179
+ // `nifra.config.ts` and the same objects serve dev and `nifra build`. Guarding the emitted code with
180
+ // `if (import.meta.hot)` is not sufficient either - `Bun.build` keeps the branch, so the HMR calls
181
+ // ship to production. This flag is the phase signal; `nifra build` never sets it.
182
+ process.env[DEV_HMR_ENV] = "1";
183
+ // Dev-shaped runtimes for SSR, matching what the client bundle gets: a library ships its dev build
184
+ // behind the `development` export condition with a `NODE_ENV` fallback for resolvers that set no
185
+ // conditions, and Bun's runtime (where SSR runs) is one of those. `nifra dev` sets this on the server
186
+ // process before it reads the app config, which is earlier than this and is the point that matters -
187
+ // a framework runtime imported through the config has already read the flag by the time this line
188
+ // runs. This is the floor for a dev server started programmatically. `??=`, so a pinned value stands.
189
+ process.env.NODE_ENV ??= "development";
190
+ // `conditions` governs the production client bundle but CANNOT govern the one served here: Bun's
191
+ // dev-server bundler takes no resolve conditions, from `bunfig.toml` or anywhere else, so a package
192
+ // with an `exports` map can resolve to a different file in dev than in `nifra build`. SSR is fine -
193
+ // `nifra dev` passes these to the runtime as `--conditions` when it re-execs - which is exactly why
194
+ // this is worth a line: the halves of the dev process no longer agree, and the drift is invisible
195
+ // until production picks the other file. Said once at startup rather than swallowed.
196
+ if (options.conditions !== undefined && options.conditions.length > 0) {
197
+ console.warn(`\n[nifra/web/dev] \`conditions: [${options.conditions.map((c) => `"${c}"`).join(", ")}]\` ` +
198
+ "does not reach the client bundle on the Bun dev pipeline.\n" +
199
+ " Bun's dev-server bundler accepts no resolve conditions, so a package with an `exports` map\n" +
200
+ " may resolve differently here than in `nifra build`. SSR does honour them.\n" +
201
+ " Run `nifra dev --vite` if this app needs exact dev/prod client resolution.\n");
202
+ }
172
203
  // The app root. `routesDir` is `<app>/routes` by convention, so its parent is the project - the one
173
204
  // place a generated entry can sit and still resolve the app's imports.
174
205
  const root = resolve(routesDir, "..");
206
+ // Which files are the app's own components, for the plugins that hot-patch at component granularity
207
+ // (`devHotComponent`). Announced here rather than passed, for the same reason the flag above is.
208
+ process.env[DEV_ROOT_ENV] = root;
209
+ process.env[DEV_ROUTES_ENV] = resolve(routesDir);
175
210
  // The most recent SSR failure as a structured Diagnostic, scoped to THIS server. Served at
176
211
  // LAST_ERROR_PATH so an agent driving the dev server reads the exact failure (code, codeframe, fix) as
177
212
  // JSON instead of scraping the overlay. Shared with the Vite adapter so the endpoint can't drift.
178
213
  const devDiagnostics = createDevDiagnostics(root);
214
+ // SSR freshness BELOW the route module. The route-level `importQuery` only ever reloaded the route
215
+ // itself; everything it imports is tracked here and re-keyed when it changes. Registered now because a
216
+ // Bun runtime plugin only affects modules loaded after it, and the first route import is `appFor`
217
+ // below - the CLI's own plugins (CSS Modules, the app's `serverPlugins`) register earlier still, and
218
+ // being earlier is what gives them first refusal on the specifiers and file types they own. That
219
+ // ordering is deliberate: a framework plugin compiling `.vue`/`.svelte`/`.tsx` keeps its loader, and
220
+ // re-keys the imports of what it compiled by handing its output through `rewriteSsrImports`.
221
+ const ssrGraph = createSsrGraph({ root });
222
+ (await import("bun")).plugin(ssrGraph.plugin);
179
223
  const devDir = resolve(root, DEV_DIR);
180
224
  const entryPath = resolve(devDir, "entry.tsx");
181
225
  const htmlPath = resolve(devDir, "entry.html");
@@ -193,7 +237,7 @@ export async function createDevServer(options) {
193
237
  let server;
194
238
  // The last resolved entry, with the time it was resolved. Deliberately short-lived - see `currentEntry`.
195
239
  let cache;
196
- // The app, tagged with the entry hash it was built against - see `appFor`.
240
+ // The app, tagged with the build it was made for - see `appFor`.
197
241
  let built;
198
242
  let building;
199
243
  let version = 0;
@@ -242,29 +286,39 @@ export async function createDevServer(options) {
242
286
  *
243
287
  * The watcher still runs: it regenerates the entry when routes are added or removed, and re-checks for
244
288
  * client leaks. It is no longer what keeps SSR correct.
289
+ *
290
+ * The entry hash is not the whole marker, though, because it only covers the CLIENT graph. A module
291
+ * the browser never receives - a `*.server` file, a loader's helper - can change without moving it, so
292
+ * the key also carries {@link SsrGraph} generation, which counts changes on the SERVER side. Either
293
+ * one moving rebuilds the app, which is what re-imports the route modules under a fresh query.
245
294
  */
246
- const appFor = (entrySrc) => {
247
- if (built?.entry === entrySrc)
295
+ const appFor = (key) => {
296
+ if (built?.key === key)
248
297
  return Promise.resolve(built.app);
249
- if (building?.entry === entrySrc)
298
+ if (building?.key === key)
250
299
  return building.promise;
251
300
  version += 1;
252
301
  const promise = Promise.resolve(createApp(CLIENT_ENTRY_PATH, `v=${version}`));
253
- building = { entry: entrySrc, promise };
302
+ building = { key, promise };
254
303
  void promise
255
304
  .then((next) => {
256
- if (building?.entry === entrySrc) {
257
- built = { entry: entrySrc, app: next };
305
+ if (building?.key === key) {
306
+ built = { key, app: next };
258
307
  building = undefined;
259
308
  }
260
309
  })
261
310
  .catch(() => {
262
311
  // Clear the in-flight marker so the next request retries instead of re-awaiting a failed build.
263
- if (building?.entry === entrySrc)
312
+ if (building?.key === key)
264
313
  building = undefined;
265
314
  });
266
315
  return promise;
267
316
  };
317
+ /** Check the server-side graph for changes, then hand back the app for what is on disk right now. */
318
+ const appForRequest = (entrySrc) => {
319
+ ssrGraph.sweep();
320
+ return appFor(`${entrySrc}#${ssrGraph.generation()}`);
321
+ };
268
322
  try {
269
323
  server = serve({
270
324
  port,
@@ -290,7 +344,10 @@ export async function createDevServer(options) {
290
344
  return new Response(body, { headers });
291
345
  }
292
346
  // Static probe before routing; a miss returns undefined and falls through, so no route is
293
- // shadowed and a page render never pays a filesystem stat (extension-less paths skip it).
347
+ // shadowed. Every GET/HEAD pays the probe, including page renders and API routes: the handler
348
+ // serves extension-less files too (an ACME challenge token is the reason), so there is no
349
+ // cheap prefilter to skip. Dev only - production serves `public/` from the CDN, and a caller
350
+ // mounting this handler itself can pass `files` to answer a miss without touching the disk.
294
351
  const staticFile = await servePublic(req);
295
352
  if (staticFile !== undefined)
296
353
  return staticFile;
@@ -298,7 +355,7 @@ export async function createDevServer(options) {
298
355
  // One fresh probe per request: it is both the freshness check for SSR and the stylesheet list,
299
356
  // so the page cannot be rendered against a build the browser is not about to load.
300
357
  const entry = await currentEntry(true);
301
- const res = await (await appFor(entry.src)).fetch(req);
358
+ const res = await (await appForRequest(entry.src)).fetch(req);
302
359
  if (!(res.headers.get("content-type") ?? "").includes("text/html"))
303
360
  return res;
304
361
  if (entry.styles.length === 0)
@@ -332,7 +389,7 @@ export async function createDevServer(options) {
332
389
  try {
333
390
  // Build once up front so a dev server that cannot find the entry, or whose app fails to construct,
334
391
  // fails at startup with a real diagnosis instead of on the first page request.
335
- await appFor((await currentEntry()).src);
392
+ await appForRequest((await currentEntry()).src);
336
393
  }
337
394
  catch (err) {
338
395
  // Leaving the server up would answer 500s forever, which presents as a running server rather than as
@@ -415,6 +472,7 @@ export async function createDevServer(options) {
415
472
  clearInterval(topologyTimer);
416
473
  for (const file of watched)
417
474
  unwatchFile(file);
475
+ ssrGraph.dispose();
418
476
  server.stop(true);
419
477
  rmSync(devDir, { recursive: true, force: true });
420
478
  },
package/dist/dev.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dev.js","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,EACL,SAAS,EACT,WAAW,EACX,YAAY,EACZ,MAAM,EACN,WAAW,EACX,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAA2B,WAAW,EAAE,MAAM,YAAY,CAAA;AACjE,OAAO,EAAsB,eAAe,EAAE,MAAM,oBAAoB,CAAA;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AAA;YACP,CAAC;QACH,CAAC,CAAC,CAAA;IACN,CAAC,CAAA;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -9,17 +9,18 @@
9
9
  */
10
10
  import { server } from "@nifrajs/core/server";
11
11
  import { type Deferred, defer } from "./deferred.js";
12
- import type { LinkDescriptor, Manifest, Meta, MetaArgs, MetaDescriptor, MetaInput, ScriptDescriptor, UnsafeScriptDescriptor } from "./manifest.js";
12
+ import { mergeHeads, resolveMeta } from "./internal/head-merge.js";
13
+ import type { LinkDescriptor, Manifest, Meta, MetaDescriptor, ScriptDescriptor, UnsafeScriptDescriptor } from "./manifest.js";
13
14
  import { type Submission } from "./router.js";
14
15
  export { DRAFT_COOKIE, type DraftCookieControls, disableDraft, type EnableDraftOptions, enableDraft, isDraftEnabled, type PreviewEndpointOptions, previewEndpoint, } from "./draft.js";
15
16
  export { type FontDisplay, type FontFace, type FontPreloadInput, type FontSource, fontFace, fontPreload, } from "./fonts.js";
16
- export { type CachedResponse, type CacheStore, ISR_REVALIDATE_HEADER, ISR_STATUS_HEADER, type ISRApp, type ISROptions, type ISRPlatform, KVCacheStore, type KVCacheStoreOptions, type KVNamespaceLike, MemoryCacheStore, type MemoryCacheStoreOptions, type RevalidateEndpointOptions, revalidateEndpoint, withISR, } from "./isr.js";
17
+ export { type CachedResponse, type CacheStore, ISR_REVALIDATE_HEADER, ISR_REVALIDATE_TAGS_HEADER, ISR_STATUS_HEADER, type ISRApp, type ISROptions, type ISRPlatform, KVCacheStore, type KVCacheStoreOptions, type KVNamespaceLike, MemoryCacheStore, type MemoryCacheStoreOptions, type RevalidateEndpointOptions, revalidateEndpoint, withISR, } from "./isr.js";
17
18
  export { type Action, buildManifest, enumerateStaticRoutes, filePathToPattern, filePathToPatterns, type GetStaticPaths, type InertScriptType, type LayoutEntry, type LinkDescriptor, type Loader, type LoaderContext, type Manifest, type Meta, type MetaArgs, type MetaInput, type RouteEntry, type RouteModule, type ScriptDescriptor, type StaticPath, type StaticPaths, type StaticRoutes, type UnsafeScriptDescriptor, } from "./manifest.js";
18
19
  export { type Blocker, type BlockerController, type BlockerFunction, type BlockerLocation, type BlockerState, type BrowserNavigate, getBrowserNavigate, IDLE_BLOCKER, type NavigateFunction, type NavigateOptions, type NavigateSearchOf, type NavigateTargetInput, type RouteSearch, registerBlocker, resolveNavigate, setBlockerController, setBrowserNavigate, } from "./navigation.js";
19
20
  export { type PublicDirCache, resolvePublicPath, type ServePublicDirOptions, servePublicDir, } from "./public-dir.js";
20
21
  export { createMutation, createQueryClient, type DehydratedState, hashQueryKey, type InfiniteData, type InfiniteQueryHandle, type InfiniteQueryOptions, type MutationCallbacks, type MutationHandle, type MutationState, type MutationStatus, type QueryClient, type QueryClientOptions, type QueryHandle, type QueryOptions, type QueryState, type QueryStatus, } from "./query.js";
21
22
  export { type ClientRouter, type ClientRouterOptions, createClientRouter, createMatcher, DATA_HEADER, type Fetcher, type FetcherState, type FetchRouteData, type MountRouterOptions, NAV_FROM_HEADER, REDIRECT_HEADER, RETAIN_HEADER, REVALIDATE_HEADER, type RouteMatch, type RoutePattern, type RouterState, STATUS_HEADER, type Submission, type SubmitOptions, } from "./router.js";
22
- export { type Deferred, defer };
23
+ export { type Deferred, defer, mergeHeads, resolveMeta };
23
24
  /** Phantom brand key for {@link ServerOnly}. A unique symbol so the brand can't be forged by a plain
24
25
  * object literal; `unique symbol` keys never appear in the emitted JS, so the brand is purely
25
26
  * type-level (zero runtime cost). The property is optional + `never`-typed, so a `ServerOnly<T>`
@@ -119,6 +120,28 @@ export interface RenderAdapter {
119
120
  */
120
121
  hydrationHead(nonce?: string): string;
121
122
  }
123
+ /**
124
+ * Loads a module through the DEV SERVER'S module graph rather than the runtime's. Takes an absolute
125
+ * file path or a bare specifier; resolution, compilation and caching are the dev server's.
126
+ */
127
+ export type SsrModuleLoader = (id: string) => Promise<unknown>;
128
+ /**
129
+ * Publishes the dev server's SSR module loader. Called by a dev server that owns SSR resolution
130
+ * itself; pass `undefined` to clear it on shutdown.
131
+ */
132
+ export declare function setSsrModuleLoader(load: SsrModuleLoader | undefined): void;
133
+ /**
134
+ * The dev server's SSR module loader, or `undefined` when nothing owns SSR resolution but the runtime
135
+ * - the Bun dev pipeline, and every production build, where the adapter's assets are compiled ahead
136
+ * of time and a plain `import` is already the right thing.
137
+ *
138
+ * An adapter that must load a COMPILED asset at runtime (a `.svelte` component, say) has to prefer
139
+ * this over a bare `import`, and has to take the framework's SERVER RENDERER from it as well, not
140
+ * just the component. A component compiled by the dev server renders through the renderer the dev
141
+ * server resolved; mixing the two puts two copies of the framework runtime in one component tree,
142
+ * where context written by one half is invisible to the other.
143
+ */
144
+ export declare function ssrModuleLoader(): SsrModuleLoader | undefined;
122
145
  /** Global the server serializes loader data into; the client reads it to hydrate. */
123
146
  export declare const DATA_GLOBAL = "__NIFRA_DATA__";
124
147
  /** Per-layout loader data for hydration. Emitted ONLY when some layout in the chain has a loader, so
@@ -203,6 +226,8 @@ export interface RenderPageOptions {
203
226
  /** ISR: route freshness in seconds, emitted as the `x-nifra-isr-revalidate` header for a `withISR`
204
227
  * wrapper to read. Omit ⇒ no header (the wrapper's default TTL applies). */
205
228
  readonly revalidate?: number;
229
+ /** ISR invalidation tags emitted as a bounded `x-nifra-isr-tags` header. */
230
+ readonly revalidateTags?: readonly string[];
206
231
  /** Matched route id; written to `window.__NIFRA_ROUTE__` so the client hydrates this chain. */
207
232
  readonly routeId?: string;
208
233
  /** The matched route's decoded path params - surfaced to the page as `params` (via {@link RenderProps})
@@ -404,8 +429,6 @@ export declare function revalidate<T>(paths: readonly string[], data: T): Revali
404
429
  * separators.
405
430
  */
406
431
  export declare function serializeData(data: unknown): string;
407
- /** Resolve a route's `meta` (static or a function of the loader data + params) to a {@link Meta}. */
408
- export declare function resolveMeta(meta: MetaInput | undefined, args: MetaArgs): Meta;
409
432
  /**
410
433
  * A `<link rel="canonical">` descriptor for a route's `meta.link`. The canonical URL tells search
411
434
  * engines which URL is authoritative for a page (deduping query-string / tracking variants).
@@ -456,26 +479,6 @@ export declare function unsafeInlineScript(content: string, options: {
456
479
  readonly nonce: string;
457
480
  readonly type?: "module" | "text/javascript";
458
481
  }): UnsafeScriptDescriptor;
459
- /**
460
- * Merge a route's `<head>` contributions from its layout chain + the page into one {@link Meta}.
461
- *
462
- * The head contract (see {@link CreateWebAppOptions} and `LayoutEntry`): a `_layout.tsx` may export
463
- * `meta` to put sitewide tags (`hreflang`, `preconnect`, a default `<title>`, …) on every page below
464
- * it. `heads` is passed **outermost layout → … → innermost layout → page** (the same order as the
465
- * render chain), and merges:
466
- * - **`title`** - *nearest-wins*: the last defined value across the list, so the page overrides an
467
- * inner layout, which overrides an outer one. A layout `title` is the section default; an undefined
468
- * page `title` keeps it.
469
- * - **`meta` / `link`** - *concatenated* in list order (outermost first, page last). Duplicate-tag
470
- * de-duplication is the caller's concern; the framework emits exactly what's declared so a layout
471
- * can ship N `<link rel="alternate" hreflang>` tags and a page can add its own canonical.
472
- *
473
- * Returns a fresh object whose identity is stable per `heads` *content* only when every entry is a
474
- * static (by-reference) `Meta` and there is exactly one - otherwise a new object each call. That is
475
- * fine: {@link headTags}'s memo is keyed on identity, so a per-request merge simply recomputes (its
476
- * content can vary with loader data anyway).
477
- */
478
- export declare function mergeHeads(heads: readonly Meta[]): Meta;
479
482
  export interface CreateWebAppOptions {
480
483
  readonly adapter: RenderAdapter;
481
484
  readonly manifest: Manifest;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,EAAE,MAAM,EAA6B,MAAM,sBAAsB,CAAA;AACxE,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,EAIN,MAAM,eAAe,CAAA;AAOtB,OAAO,KAAK,EAGV,cAAc,EAEd,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,SAAS,EAGT,gBAAgB,EAChB,sBAAsB,EAC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AAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,+BAA+B,GACvC,MAAM,CAuBR;AAED,MAAM,WAAW,6BAA6B;IAC5C;6DACyD;IACzD,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IAC1C;4EACwE;IACxE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B;;+FAE2F;IAC3F,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;IAC/C;uFACmF;IACnF,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,GAAG,SAAS,CAAA;IAC9E;;;2FAGuF;IACvF,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,6BAA6B,GACrC,MAAM,CAwDR;AAED;;;;;;;;;GASG;AACH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA"}
package/dist/index.js CHANGED
@@ -12,9 +12,13 @@ import { server, urlPartsOf } from "@nifrajs/core/server";
12
12
  import { DEFERRED_ERROR_CODE, DEFERRED_RUNTIME, defer, MAP_DEFERRED_SOURCE, ndjsonStream, prepareDeferred, } from "./deferred.js";
13
13
  import { isDraftEnabled } from "./draft.js";
14
14
  import { trustedHeadAttributes } from "./internal/head-attributes.js";
15
+ // Head resolution/merging. Defined in an internal module so `@nifrajs/web/client` can export the same
16
+ // two functions to the generated client entry without dragging THIS module (and its server code) into
17
+ // the browser graph - see internal/head-merge.ts. Re-exported here so the public API is unchanged.
18
+ import { mergeHeads, resolveMeta } from "./internal/head-merge.js";
15
19
  import { jsStringLiteral } from "./internal/js-string.js";
16
20
  import { EXECUTABLE_SCRIPT_TYPES, INERT_SCRIPT_TYPES } from "./internal/script-types.js";
17
- import { ISR_REVALIDATE_HEADER } from "./isr.js";
21
+ import { ISR_REVALIDATE_HEADER, ISR_REVALIDATE_TAGS_HEADER, serializeISRTags } from "./isr.js";
18
22
  import { generateLlmsTxt } from "./llms-txt.js";
19
23
  import { createMatcher, DATA_HEADER, NAV_FROM_HEADER, PRERENDERED_GLOBAL, REDIRECT_HEADER, RETAIN_HEADER, REVALIDATE_HEADER, STATUS_HEADER, } from "./router.js";
20
24
  import { searchOf, searchOfChain } from "./search.js";
@@ -24,7 +28,7 @@ export { DRAFT_COOKIE, disableDraft, enableDraft, isDraftEnabled, previewEndpoin
24
28
  export { fontFace, fontPreload, } from "./fonts.js";
25
29
  // ISR (incremental static regeneration): a pluggable cache store + the `withISR` stale-while-revalidate
26
30
  // wrapper for rendered SSR responses.
27
- export { ISR_REVALIDATE_HEADER, ISR_STATUS_HEADER, KVCacheStore, MemoryCacheStore, revalidateEndpoint, withISR, } from "./isr.js";
31
+ export { ISR_REVALIDATE_HEADER, ISR_REVALIDATE_TAGS_HEADER, ISR_STATUS_HEADER, KVCacheStore, MemoryCacheStore, revalidateEndpoint, withISR, } from "./isr.js";
28
32
  // File-based routing manifest - pure + fs-free. `discoverRoutes` (fs) lives in `@nifrajs/web/fs`.
29
33
  export { buildManifest, enumerateStaticRoutes, filePathToPattern, filePathToPatterns, } from "./manifest.js";
30
34
  // Navigation bridge - a DOM-free seam the browser layer (`installHistory`) populates so an adapter's
@@ -39,13 +43,41 @@ export { createMutation, createQueryClient, hashQueryKey, } from "./query.js";
39
43
  // `DATA_HEADER` marks a navigation's data-only GET; `createWebApp` answers it with loader JSON.
40
44
  export { createClientRouter, createMatcher, DATA_HEADER, NAV_FROM_HEADER, REDIRECT_HEADER, RETAIN_HEADER, REVALIDATE_HEADER, STATUS_HEADER, } from "./router.js";
41
45
  // Deferred loader data (`defer()` + the `Deferred<T>` type) - consumed by the adapter's `<Await>`.
42
- export { defer };
46
+ export { defer, mergeHeads, resolveMeta };
43
47
  export { assertRenderAdapterConformance, RenderAdapterConformanceError, } from "./conformance.js";
44
48
  // The search-derivation primitive: parse a URL query, validate it against a route's `searchSchema`
45
49
  // (fail-closed to defaults), or return the raw parsed query when there is none. Both the server (loader
46
50
  // ctx + `renderPage`) and a client adapter mount call this with the same URL + schema, so the two sides
47
51
  // produce the identical value by construction. An adapter's `useSearch` binding reads its result.
48
52
  export { searchOf, searchOfChain, serializeSearch } from "./search.js";
53
+ /* A `globalThis` singleton for the same reason `@nifrajs/web-react`'s router context is one: in dev
54
+ * this module is evaluated twice in one process (the CLI's copy under Bun, and the app's copy), and a
55
+ * module-level `let` would leave the adapter reading a slot the dev server set on the other copy. */
56
+ const SSR_MODULE_LOADER_SLOT = Symbol.for("nifra.web.ssr-module-loader");
57
+ /* Explicitly `| undefined`: clearing the slot is part of the contract (a dev server clears it on
58
+ * stop), and under `exactOptionalPropertyTypes` "absent" and "set to undefined" are separate types. */
59
+ const loaderSlot = globalThis;
60
+ /**
61
+ * Publishes the dev server's SSR module loader. Called by a dev server that owns SSR resolution
62
+ * itself; pass `undefined` to clear it on shutdown.
63
+ */
64
+ export function setSsrModuleLoader(load) {
65
+ loaderSlot[SSR_MODULE_LOADER_SLOT] = load;
66
+ }
67
+ /**
68
+ * The dev server's SSR module loader, or `undefined` when nothing owns SSR resolution but the runtime
69
+ * - the Bun dev pipeline, and every production build, where the adapter's assets are compiled ahead
70
+ * of time and a plain `import` is already the right thing.
71
+ *
72
+ * An adapter that must load a COMPILED asset at runtime (a `.svelte` component, say) has to prefer
73
+ * this over a bare `import`, and has to take the framework's SERVER RENDERER from it as well, not
74
+ * just the component. A component compiled by the dev server renders through the renderer the dev
75
+ * server resolved; mixing the two puts two copies of the framework runtime in one component tree,
76
+ * where context written by one half is invisible to the other.
77
+ */
78
+ export function ssrModuleLoader() {
79
+ return loaderSlot[SSR_MODULE_LOADER_SLOT];
80
+ }
49
81
  /** Global the server serializes loader data into; the client reads it to hydrate. */
50
82
  export const DATA_GLOBAL = "__NIFRA_DATA__";
51
83
  /** Per-layout loader data for hydration. Emitted ONLY when some layout in the chain has a loader, so
@@ -123,7 +155,7 @@ export function renderPage(options) {
123
155
  return page instanceof Promise ? page.then((p) => p.toResponse()) : page.toResponse();
124
156
  }
125
157
  export function renderPageResult(options) {
126
- const { adapter, chain, data, actionData, clientEntry, preload = [], styles = [], prerenderedPaths = [], revalidate, routeId, status = 200, title = "nifra", head, rootId = "root", hydrate = true, islandScripts = [], nonce, headers: extraHeaders, } = options;
158
+ const { adapter, chain, data, actionData, clientEntry, preload = [], styles = [], prerenderedPaths = [], revalidate, revalidateTags = [], routeId, status = 200, title = "nifra", head, rootId = "root", hydrate = true, islandScripts = [], nonce, headers: extraHeaders, } = options;
127
159
  if (nonce !== undefined && nonce.trim() === "") {
128
160
  throw new TypeError("[nifra/web] renderPage nonce must be non-empty when provided");
129
161
  }
@@ -263,6 +295,9 @@ export function renderPageResult(options) {
263
295
  // the client's path-list channel.
264
296
  if (revalidate !== undefined)
265
297
  headers[ISR_REVALIDATE_HEADER] = String(revalidate);
298
+ const serializedTags = serializeISRTags(revalidateTags);
299
+ if (serializedTags !== undefined)
300
+ headers[ISR_REVALIDATE_TAGS_HEADER] = serializedTags;
266
301
  const renderProps = {
267
302
  data: forComponent,
268
303
  actionData: actionSplit?.forComponent,
@@ -693,12 +728,6 @@ function headTags(head) {
693
728
  headTagsCache.set(head, out);
694
729
  return out;
695
730
  }
696
- /** Resolve a route's `meta` (static or a function of the loader data + params) to a {@link Meta}. */
697
- export function resolveMeta(meta, args) {
698
- if (meta === undefined)
699
- return {};
700
- return typeof meta === "function" ? meta(args) : meta;
701
- }
702
731
  /**
703
732
  * A `<link rel="canonical">` descriptor for a route's `meta.link`. The canonical URL tells search
704
733
  * engines which URL is authoritative for a page (deduping query-string / tracking variants).
@@ -766,74 +795,6 @@ export function unsafeInlineScript(content, options) {
766
795
  content,
767
796
  };
768
797
  }
769
- /**
770
- * Merge a route's `<head>` contributions from its layout chain + the page into one {@link Meta}.
771
- *
772
- * The head contract (see {@link CreateWebAppOptions} and `LayoutEntry`): a `_layout.tsx` may export
773
- * `meta` to put sitewide tags (`hreflang`, `preconnect`, a default `<title>`, …) on every page below
774
- * it. `heads` is passed **outermost layout → … → innermost layout → page** (the same order as the
775
- * render chain), and merges:
776
- * - **`title`** - *nearest-wins*: the last defined value across the list, so the page overrides an
777
- * inner layout, which overrides an outer one. A layout `title` is the section default; an undefined
778
- * page `title` keeps it.
779
- * - **`meta` / `link`** - *concatenated* in list order (outermost first, page last). Duplicate-tag
780
- * de-duplication is the caller's concern; the framework emits exactly what's declared so a layout
781
- * can ship N `<link rel="alternate" hreflang>` tags and a page can add its own canonical.
782
- *
783
- * Returns a fresh object whose identity is stable per `heads` *content* only when every entry is a
784
- * static (by-reference) `Meta` and there is exactly one - otherwise a new object each call. That is
785
- * fine: {@link headTags}'s memo is keyed on identity, so a per-request merge simply recomputes (its
786
- * content can vary with loader data anyway).
787
- */
788
- export function mergeHeads(heads) {
789
- // Single-head fast path (a route with no layout `meta`, by far the common case) - return the
790
- // resolved object by reference so headTags' identity-keyed memo hits across requests for static meta.
791
- if (heads.length === 1)
792
- return heads[0];
793
- let title;
794
- let lang;
795
- let dir;
796
- const meta = [];
797
- const link = [];
798
- const script = [];
799
- const unsafeScript = [];
800
- for (const h of heads) {
801
- if (h.title !== undefined)
802
- title = h.title; // nearest-wins: later (more specific) overrides
803
- if (h.lang !== undefined)
804
- lang = h.lang; // nearest-wins, like title
805
- if (h.dir !== undefined)
806
- dir = h.dir;
807
- if (h.meta !== undefined)
808
- meta.push(...h.meta);
809
- if (h.link !== undefined)
810
- link.push(...h.link);
811
- if (h.script !== undefined)
812
- script.push(...h.script); // concatenated like meta/link (outermost first)
813
- if (h.unsafeScript !== undefined)
814
- unsafeScript.push(...h.unsafeScript);
815
- }
816
- // Build the result with only the fields that were actually contributed - an empty `meta`/`link`/
817
- // `script` array would otherwise be a spurious (if harmless) key. A mutable local; the cast to `Meta`
818
- // is sound because a key is assigned only when defined (so `exactOptionalPropertyTypes` never sees
819
- // `undefined`).
820
- const merged = {};
821
- if (title !== undefined)
822
- merged.title = title;
823
- if (meta.length > 0)
824
- merged.meta = meta;
825
- if (link.length > 0)
826
- merged.link = link;
827
- if (script.length > 0)
828
- merged.script = script;
829
- if (unsafeScript.length > 0)
830
- merged.unsafeScript = unsafeScript;
831
- if (lang !== undefined)
832
- merged.lang = lang;
833
- if (dir !== undefined)
834
- merged.dir = dir;
835
- return merged;
836
- }
837
798
  /**
838
799
  * Re-issue `request` with `prefix` removed from its pathname.
839
800
  *
@@ -1461,6 +1422,7 @@ export function createWebApp(options) {
1461
1422
  ...stylesOf(route.id),
1462
1423
  prerenderedPaths: options.prerenderedPaths ?? [],
1463
1424
  ...(mod.revalidate !== undefined ? { revalidate: mod.revalidate } : {}),
1425
+ ...(mod.revalidateTags !== undefined ? { revalidateTags: mod.revalidateTags } : {}),
1464
1426
  ...(mod.islandScripts !== undefined ? { islandScripts: mod.islandScripts } : {}),
1465
1427
  ...titleOption,
1466
1428
  ...assemblyCacheFor(mod, chainLayoutModules),
@@ -1650,7 +1612,9 @@ export function generateClientEntry(manifest, options) {
1650
1612
  statusRoutes[Number(status)] = routeId;
1651
1613
  }
1652
1614
  return `${[
1653
- 'import { createClientRouter, createMatcher, mergeHeads, resolveMeta } from "@nifrajs/web"',
1615
+ // `/client`, never the root: the root's graph carries the server (renderPage, the static-file
1616
+ // server), and Vite's dev server evaluates what it is given instead of tree-shaking it.
1617
+ 'import { createClientRouter, createMatcher, mergeHeads, resolveMeta } from "@nifrajs/web/client"',
1654
1618
  'import { applyHead, installForms, installHistory, signalHydrated } from "@nifrajs/web/client"',
1655
1619
  // Namespace import: `errorBoundary` is optional (an adapter may not export it). A namespace member
1656
1620
  // access yields `undefined` if absent - unlike a named import, which would be a link error.
@@ -1665,6 +1629,16 @@ export function generateClientEntry(manifest, options) {
1665
1629
  "the generated bootstrap, so a self-executing entry will not work. Use your adapter's " +
1666
1630
  '`/client` entry (e.g. "@nifrajs/web-react/client"), or re-export mountRouter from it.')})`,
1667
1631
  "const errorBoundary = __adapter.errorBoundary",
1632
+ // A hot update that the framework cannot actually apply must end in a reload, not in nothing.
1633
+ //
1634
+ // Bun's dev server applies React Fast Refresh to JSX modules. For React that patches the component
1635
+ // and preserves state. For Preact it does not - the module still LOOKS Fast-Refresh-able, so the
1636
+ // update is accepted and then swallowed: `bun:beforeUpdate`/`bun:afterUpdate` both fire, the server
1637
+ // logs a rebuild, and the page silently keeps rendering the old code. An edit that appears to do
1638
+ // nothing is the worst failure mode in a dev loop - worse than a reload, because there is no signal
1639
+ // to act on. An adapter that knows its framework is in that position says so, and the entry turns
1640
+ // the swallowed update into an honest full reload.
1641
+ 'if (import.meta.hot && __adapter.hotUpdateNeedsReload) import.meta.hot.on("bun:afterUpdate", () => location.reload())',
1668
1642
  `const errorRouteIds = new Set(${JSON.stringify(errorRouteIds)})`,
1669
1643
  // Each route is a lazy loader: dynamic imports → Bun.build (splitting) emits one chunk per
1670
1644
  // route, shared layouts/deps deduped into shared chunks, so a route's code loads only when