@nifrajs/cli 5.15.1 → 5.16.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 (166) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +11 -0
  3. package/dist/build-provenance.d.ts +14 -0
  4. package/dist/build-provenance.d.ts.map +1 -0
  5. package/dist/build-provenance.js +82 -0
  6. package/dist/build-provenance.js.map +1 -0
  7. package/dist/check-diagnostics.d.ts +1 -0
  8. package/dist/check-diagnostics.d.ts.map +1 -1
  9. package/dist/check-diagnostics.js +4 -0
  10. package/dist/check-diagnostics.js.map +1 -1
  11. package/dist/check-scan.d.ts +1 -1
  12. package/dist/check-scan.d.ts.map +1 -1
  13. package/dist/check-scan.js +6 -5
  14. package/dist/check-scan.js.map +1 -1
  15. package/dist/check-timings.d.ts +11 -0
  16. package/dist/check-timings.d.ts.map +1 -0
  17. package/dist/check-timings.js +23 -0
  18. package/dist/check-timings.js.map +1 -0
  19. package/dist/check.d.ts +3 -0
  20. package/dist/check.d.ts.map +1 -1
  21. package/dist/check.js +68 -28
  22. package/dist/check.js.map +1 -1
  23. package/dist/cli.d.ts.map +1 -1
  24. package/dist/cli.js +26 -11
  25. package/dist/cli.js.map +1 -1
  26. package/dist/command-catalog.d.ts +3 -0
  27. package/dist/command-catalog.d.ts.map +1 -1
  28. package/dist/command-catalog.js +25 -4
  29. package/dist/command-catalog.js.map +1 -1
  30. package/dist/dev-feed-tool.d.ts.map +1 -1
  31. package/dist/dev-feed-tool.js +4 -2
  32. package/dist/dev-feed-tool.js.map +1 -1
  33. package/dist/doctor.d.ts +5 -2
  34. package/dist/doctor.d.ts.map +1 -1
  35. package/dist/doctor.js +27 -9
  36. package/dist/doctor.js.map +1 -1
  37. package/dist/internal/named-imports.d.ts +4 -0
  38. package/dist/internal/named-imports.d.ts.map +1 -0
  39. package/dist/internal/named-imports.js +19 -0
  40. package/dist/internal/named-imports.js.map +1 -0
  41. package/dist/internal/rewrite-kit.d.ts +35 -0
  42. package/dist/internal/rewrite-kit.d.ts.map +1 -0
  43. package/dist/internal/rewrite-kit.js +14 -0
  44. package/dist/internal/rewrite-kit.js.map +1 -0
  45. package/dist/internal/source-facts.d.ts +37 -0
  46. package/dist/internal/source-facts.d.ts.map +1 -1
  47. package/dist/internal/source-facts.js +115 -0
  48. package/dist/internal/source-facts.js.map +1 -1
  49. package/dist/levels-tool.d.ts +3 -0
  50. package/dist/levels-tool.d.ts.map +1 -1
  51. package/dist/levels-tool.js +28 -18
  52. package/dist/levels-tool.js.map +1 -1
  53. package/dist/mcp-exec.js +1 -1
  54. package/dist/mcp-exec.js.map +1 -1
  55. package/dist/mcp-http.js +1 -1
  56. package/dist/mcp-io.d.ts +3 -1
  57. package/dist/mcp-io.d.ts.map +1 -1
  58. package/dist/mcp-io.js +9 -2
  59. package/dist/mcp-io.js.map +1 -1
  60. package/dist/mcp-isolate.d.ts.map +1 -1
  61. package/dist/mcp-isolate.js +3 -1
  62. package/dist/mcp-isolate.js.map +1 -1
  63. package/dist/mcp-project-child.d.ts +10 -0
  64. package/dist/mcp-project-child.d.ts.map +1 -1
  65. package/dist/mcp-project-child.js +12 -1
  66. package/dist/mcp-project-child.js.map +1 -1
  67. package/dist/mcp-tool-meta.d.ts.map +1 -1
  68. package/dist/mcp-tool-meta.js +4 -1
  69. package/dist/mcp-tool-meta.js.map +1 -1
  70. package/dist/recipes/5.16.0.d.ts +12 -0
  71. package/dist/recipes/5.16.0.d.ts.map +1 -0
  72. package/dist/recipes/5.16.0.js +31 -0
  73. package/dist/recipes/5.16.0.js.map +1 -0
  74. package/dist/recipes/index.d.ts.map +1 -1
  75. package/dist/recipes/index.js +2 -0
  76. package/dist/recipes/index.js.map +1 -1
  77. package/dist/review.d.ts.map +1 -1
  78. package/dist/review.js +3 -0
  79. package/dist/review.js.map +1 -1
  80. package/dist/rules/codes.d.ts +3 -0
  81. package/dist/rules/codes.d.ts.map +1 -1
  82. package/dist/rules/codes.js +3 -0
  83. package/dist/rules/codes.js.map +1 -1
  84. package/dist/rules/explanations.d.ts.map +1 -1
  85. package/dist/rules/explanations.js +15 -0
  86. package/dist/rules/explanations.js.map +1 -1
  87. package/dist/rules/route-hooks.d.ts +10 -0
  88. package/dist/rules/route-hooks.d.ts.map +1 -0
  89. package/dist/rules/route-hooks.js +88 -0
  90. package/dist/rules/route-hooks.js.map +1 -0
  91. package/dist/rules/silent-sse.d.ts +9 -0
  92. package/dist/rules/silent-sse.d.ts.map +1 -0
  93. package/dist/rules/silent-sse.js +89 -0
  94. package/dist/rules/silent-sse.js.map +1 -0
  95. package/dist/rules/source-scan.d.ts +4 -2
  96. package/dist/rules/source-scan.d.ts.map +1 -1
  97. package/dist/rules/source-scan.js +3 -1
  98. package/dist/rules/source-scan.js.map +1 -1
  99. package/dist/source-rewrites.d.ts +2 -20
  100. package/dist/source-rewrites.d.ts.map +1 -1
  101. package/dist/source-rewrites.js +3 -13
  102. package/dist/source-rewrites.js.map +1 -1
  103. package/dist/typecheck-cache.d.ts +6 -0
  104. package/dist/typecheck-cache.d.ts.map +1 -0
  105. package/dist/typecheck-cache.js +37 -0
  106. package/dist/typecheck-cache.js.map +1 -0
  107. package/dist/typecheck-coverage.js +1 -1
  108. package/dist/typecheck-coverage.js.map +1 -1
  109. package/dist/typed-api-rewrites.d.ts +3 -0
  110. package/dist/typed-api-rewrites.d.ts.map +1 -0
  111. package/dist/typed-api-rewrites.js +253 -0
  112. package/dist/typed-api-rewrites.js.map +1 -0
  113. package/dist/upgrade.d.ts.map +1 -1
  114. package/dist/upgrade.js +3 -1
  115. package/dist/upgrade.js.map +1 -1
  116. package/dist/verification-gates.d.ts +23 -0
  117. package/dist/verification-gates.d.ts.map +1 -0
  118. package/dist/verification-gates.js +8 -0
  119. package/dist/verification-gates.js.map +1 -0
  120. package/dist/verification.d.ts +2 -0
  121. package/dist/verification.d.ts.map +1 -1
  122. package/dist/verification.js +6 -0
  123. package/dist/verification.js.map +1 -1
  124. package/dist/work-graph.d.ts +17 -8
  125. package/dist/work-graph.d.ts.map +1 -1
  126. package/dist/work-graph.js +157 -104
  127. package/dist/work-graph.js.map +1 -1
  128. package/docs/examples.json +2 -2
  129. package/docs/llms-full.txt +563 -46
  130. package/docs/types.json +269 -84
  131. package/package.json +12 -12
  132. package/src/build-provenance.ts +107 -0
  133. package/src/check-diagnostics.ts +5 -0
  134. package/src/check-scan.ts +7 -4
  135. package/src/check-timings.ts +27 -0
  136. package/src/check.ts +77 -32
  137. package/src/cli.ts +33 -12
  138. package/src/command-catalog.ts +28 -4
  139. package/src/dev-feed-tool.ts +8 -3
  140. package/src/doctor.ts +37 -18
  141. package/src/internal/named-imports.ts +26 -0
  142. package/src/internal/rewrite-kit.ts +49 -0
  143. package/src/internal/source-facts.ts +158 -0
  144. package/src/levels-tool.ts +27 -18
  145. package/src/mcp-exec.ts +1 -1
  146. package/src/mcp-http.ts +1 -1
  147. package/src/mcp-io.ts +13 -1
  148. package/src/mcp-isolate.ts +4 -0
  149. package/src/mcp-project-child.ts +19 -1
  150. package/src/mcp-tool-meta.ts +5 -1
  151. package/src/recipes/5.16.0.ts +41 -0
  152. package/src/recipes/index.ts +2 -0
  153. package/src/review.ts +3 -0
  154. package/src/rules/codes.ts +3 -0
  155. package/src/rules/explanations.ts +15 -0
  156. package/src/rules/route-hooks.ts +112 -0
  157. package/src/rules/silent-sse.ts +95 -0
  158. package/src/rules/source-scan.ts +8 -3
  159. package/src/source-rewrites.ts +18 -52
  160. package/src/typecheck-cache.ts +33 -0
  161. package/src/typecheck-coverage.ts +1 -1
  162. package/src/typed-api-rewrites.ts +308 -0
  163. package/src/upgrade.ts +2 -1
  164. package/src/verification-gates.ts +9 -0
  165. package/src/verification.ts +8 -0
  166. package/src/work-graph.ts +200 -121
@@ -300,13 +300,13 @@ to full-stack later without a rewrite.
300
300
  regex), but a real request also pays for middleware and validation,
301
301
  context, and serialization. In the current matrix Nifra runs **level with Elysia on Bun** -
302
302
  100% of Elysia on `GET /users/:id` and
303
- 100% on the validated `POST` - and
304
- **level with Fastify on Node** (107% of Fastify on GET,
305
- 105% on the validated `POST`), with Elysia, Hono,
306
- and Express behind. On **Deno** it runs at 107% of Elysia on
307
- GET and 127% on the validated `POST`. In the realistic shape (security headers + CORS +
303
+ 103% on the validated `POST` - and
304
+ **level with Fastify on Node** (105% of Fastify on GET,
305
+ 102% on the validated `POST`), with Elysia, Hono,
306
+ and Express behind. On **Deno** it runs at 117% of Elysia on
307
+ GET and 139% on the validated `POST`. In the realistic shape (security headers + CORS +
308
308
  bearer auth + cookies + validated query/body + a ~2.4 KB JSON response, measured on
309
- **Bun** with `oha`) Nifra runs at **110% of Elysia on GET and 114% on POST**. Treat benchmark
309
+ **Bun** with `oha`) Nifra runs at **123% of Elysia on GET and 121% on POST**. Treat benchmark
310
310
  rows as same-run evidence, not a permanent law of nature.
311
311
 
312
312
  -
@@ -661,15 +661,16 @@ combined with `hydrate = false`: nothing would ever render the page.
661
661
 
662
662
  Export a `searchSchema` - any Standard Schema (valibot, zod, arktype) - and the URL
663
663
  query becomes typed and validated on both sides: the loader receives it as
664
- `ctx.search` and the component reads the same value with
665
- `useSearch<typeof searchSchema>()`. Invalid or hostile input fails closed to the
666
- schema's defaults (never a 500), and the value is derived identically on the server and on each
667
- client navigation - so a query-reading page hydrates with no mismatch and never touches
664
+ `ctx.search` and the page receives the same value as its `search` prop,
665
+ typed by the schema. A nested component reads it with `useSearch("/reports")`;
666
+ the argument names the route, and a pattern the generated route table does not hold is a
667
+ compile error. Invalid or hostile input fails closed to the schema's defaults (never a 500),
668
+ and the value is derived identically on the server and on each client navigation - so a
669
+ query-reading page hydrates with no mismatch and never touches
668
670
  `window.location.search` by hand.
669
671
 
670
672
  ```tsx
671
673
  // routes/reports.tsx - a typed, validated ?page=&sort= query.
672
- import { useSearch } from "@nifrajs/web-react/router"
673
674
  import * as v from "valibot" // any Standard Schema works (valibot, zod, arktype)
674
675
  import type { Route } from "./+types/reports"
675
676
 
@@ -679,10 +680,11 @@ export const searchSchema = v.object({
679
680
  sort: v.optional(v.picklist(["new", "top"]), "new"),
680
681
  })
681
682
 
682
- // The component reads the SAME value - SSR-correct, so page/sort hydrate with no mismatch and you
683
- // never parse window.location.search by hand.
684
- export default function Reports({ data }: Route.ComponentProps) {
685
- const { page, sort } = useSearch<typeof searchSchema>() // { page: number; sort: "new" | "top" }
683
+ // The page gets the SAME value as the search prop - SSR-correct, so page/sort hydrate with no mismatch
684
+ // and you never parse window.location.search by hand. A nested component reads it with
685
+ // useSearch("/reports").
686
+ export default function Reports({ data, search }: Route.ComponentProps) {
687
+ const { page, sort } = search // { page: number; sort: "new" | "top" }
686
688
  return <Pager page={page} sort={sort} rows={data.rows} />
687
689
  }
688
690
 
@@ -695,13 +697,37 @@ export async function loader({ search, api }: Route.LoaderArgs) {
695
697
  }
696
698
  ```
697
699
 
698
- Without a `searchSchema`, `ctx.search` and `useSearch()` are
699
- the raw parsed query (`Record<string, unknown>`). `useSearch` ships on
700
- every adapter (React, Preact, Vue, Solid, Svelte), each in that framework's shape - a value on
701
- React/Preact, a `Ref` on Vue, an accessor on Solid/Svelte. For imperative reads and
702
- writes of the raw query, `useSearchParams()` mirrors react-router's
700
+ Without a `searchSchema`, `ctx.search`, the `search` prop and
701
+ `useSearch` are the raw parsed query (`Record<string, unknown>`).
702
+ `useSearch` and `useParams` ship on every adapter (React, Preact, Vue,
703
+ Solid, Svelte), each in that framework's shape - a value on React/Preact, a `Ref` on
704
+ Vue, an accessor on Solid/Svelte. `useParams("/users/:id")` is that route's
705
+ params. For imperative reads and writes of the raw query, `useSearchParams()` mirrors
706
+ react-router's
703
707
  `[params, setParams]` tuple.
704
708
 
709
+ A link may leave out a field the schema defaults: `href` takes the schema's
710
+ _input_, where the page and the hooks read its _output_. A route without params
711
+ types `props.params` with no keys, so reading one is a compile error. Under
712
+ `nifra check`, `NF-C059` flags a hook that names another page's route
713
+ and `NF-C060` a cast to `Href`; a project made by
714
+ `create-nifra` also fails on `NF-C057`, a dead path string.
715
+
716
+ `.svelte` and `.vue` routes get their `searchSchema` typed too,
717
+ under `svelte-check` and `vue-tsc`; plain `tsc` cannot read those
718
+ files and falls back to the raw query. A Svelte page takes `search` from its props. A
719
+ Vue page reads it with `useSearch("/reports")`: `@vue/compiler-sfc`
720
+ cannot resolve `Route.ComponentProps` for `defineProps`.
721
+
722
+ Coming from 5.15 or earlier, `nifra upgrade 5.16.0 --write` rewrites
723
+ `useSearch<typeof searchSchema>()`, `useParams<T>()` and the
724
+ bare calls in a page file to name that page's route. A hook in a layout, a component shared
725
+ by several pages or a `.svelte` or `.vue` file is listed by line instead:
726
+ only its author knows the route it renders in, and a shared component takes the pattern as a
727
+ prop typed as the union of its routes. The same run rewrites the query cache and
728
+ `formFor` calls; see
729
+ upgrading nifra.
730
+
705
731
  To WRITE search, build the link with `href` and hand it to `useNavigate`:
706
732
  `navigate(href({ to: "/reports", search: { page: 2 } }))`. `href` and
707
733
  `rawHref` are exported by every adapter's router entry (
@@ -717,23 +743,34 @@ search shape are compile errors, and a changed `searchSchema` shows up as a
717
743
 
718
744
  Each param is encoded as one path segment, so a value such as `a/b` or
719
745
  `//evil.com` stays inside the segment and never changes where the link goes. A
720
- param that is missing, empty, `.`, `..` or an unpaired surrogate throws a
721
- `TypeError` naming it. `navigate` takes only an `href` result,
746
+ param that is missing, empty, `.`, `..` or an unpaired surrogate does not
747
+ throw, since it usually comes from data and one bad row should not fail the page:
748
+ `href` logs a `console.error` once per distinct message (it remembers the
749
+ last 64, then starts over), naming the route and the param and never the value, and returns
750
+ an inert link that `Link`, `Navigate`, `navigate` and a
751
+ click, modified click or middle click on a plain anchor ignore, in every adapter. Before
752
+ hydration, or without scripts, a plain anchor holding it loads a path no route names: a 404, or the page of a dynamic route such as
753
+ `/:id` that matches any one segment;
754
+ an anchor that must never navigate leaves its `href` off with
755
+ `href={isInertHref(link) ? undefined : link}`. `onHrefRefused(report)` takes over the logging: it hears every refusal, in
756
+ place of the default, so an app can send them to its error tracker. `navigate` takes only an `href` result,
722
757
  or a history delta such as `navigate(-1)`; a string or a template literal is a
723
758
  compile error. So do React's `Link`, `NavLink` and `Navigate`
724
759
  (`<Link to={href({ to: "/pricing" })}>`) and the server's
725
760
  `redirect()`; when `to` is not a same-origin path,
726
761
  `Link` and `NavLink` render the anchor without an `href`,
727
762
  and `Navigate` and `setSearchParams` do not navigate; each logs a
728
- `console.error` that names the call and never the value. `redirect`
763
+ `console.error` that never holds the value. `redirect`
729
764
  takes an off-origin location with `{ external: true }`, which still refuses
730
765
  one holding a line break. For a same-origin path built elsewhere - a CMS link,
731
766
  `/llms.txt` - `rawHref("/llms.txt")` checks it (one leading
732
767
  `/`, no backslash or control character) and returns the same type. A link to
733
768
  another site is a plain `<a href>`. A path that comes from outside is
734
- checked where it is read: `rawHref` throws a `TypeError` for one that is
735
- not same-origin, so catch it at that call when a field cannot be trusted. A value that gets
736
- past it as a forged `Href` costs only its own link.
769
+ checked where it is read: `rawHref` returns the same inert link, and logs, for one that
770
+ is not same-origin. A value that gets past it as a forged `Href` costs only its own
771
+ link. `redirect` has no page to fall back to, so a refused location throws unless you
772
+ pass `{ fallback: href({ to: "/" }) }`: an action that has already written
773
+ should, so a bad value costs the destination and not a 500 after the write.
737
774
 
738
775
  ### Moving existing links to href()
739
776
 
@@ -2090,7 +2127,11 @@ import { t } from "@nifrajs/schema"
2090
2127
  import { createTodo } from "./db/write.ts"
2091
2128
 
2092
2129
  export const addTodo = serverFn(
2093
- { input: t.object({ text: t.string({ minLength: 1 }) }), capabilities: ["db.write"] },
2130
+ {
2131
+ input: t.object({ text: t.string({ minLength: 1 }) }),
2132
+ output: t.object({ id: t.string() }),
2133
+ capabilities: ["db.write"],
2134
+ },
2094
2135
  async ({ text }) => createTodo({ text }),
2095
2136
  )
2096
2137
  ```
@@ -2099,6 +2140,11 @@ The second argument receives the validated input and the ordinary Nifra `Context
2099
2140
  `c.env`, `c.clientIp`, `c.budget`, cookies and the capability
2100
2141
  guard are all there, because this is a route.
2101
2142
 
2143
+ The caller sees what `output` lets through: its type is the schema's output, and
2144
+ what the function returns must fit the schema's input, so a field the schema drops is not in
2145
+ the type the browser gets. A function that returns data without an `output` schema is
2146
+ refused at run time, so it is a compile error too; one that returns nothing needs no schema.
2147
+
2102
2148
  ### Mounting
2103
2149
 
2104
2150
  ```ts
@@ -3513,14 +3559,20 @@ app.get("/notifications", (c) =>
3513
3559
  return new Promise<void>((resolve) =>
3514
3560
  stream.signal.addEventListener("abort", () => { off(); resolve() }, { once: true }),
3515
3561
  )
3516
- }, { keepAlive: 15_000 }),
3562
+ }, { keepAlive: 5_000 }),
3517
3563
  )
3518
3564
  ```
3519
3565
 
3520
3566
  `event:`, `id:`, and `retry:` are supported (and CR/LF is
3521
3567
  stripped from `event`/`id` to prevent frame injection); multi-line
3522
3568
  `data` is split into multiple `data:` lines per the spec; and
3523
- `keepAlive` emits comment pings so idle proxies don't drop the connection.
3569
+ `keepAlive` emits comment pings so idle proxies don't drop the connection. Bun also
3570
+ closes a connection that sends nothing for its idle timeout (10 seconds by default), so keep
3571
+ the interval well under the timeout you run with: `idleTimeoutSec` on
3572
+ `listen()`, `idleTimeout` on `Bun.serve()`. Under
3573
+ `listen()`, wrapping the producer in `withIdleTimeout` holds one
3574
+ stream's connection open instead; under a hand-written `Bun.serve` it changes
3575
+ nothing, so set `idleTimeout` there, above the slowest quiet period (0 to 255).
3524
3576
 
3525
3577
  A client that stops reading is dropped once it has `maxBufferedBytes` (default 1
3526
3578
  MiB) of events unread: `stream.signal` aborts with `sse_client_too_slow`,
@@ -3692,6 +3744,15 @@ const queryState = queryClient.dehydrate({
3692
3744
  // On the client, seed the app's client before query components mount.
3693
3745
  ```
3694
3746
 
3747
+ ### Typed keys
3748
+
3749
+ `getQueryData` and `setQueryData` take a key made with
3750
+ `queryKey<T>(key)`, which carries the type of the data stored under it:
3751
+ `const todosKey = queryKey<Todo[]>(["todos"])`. The fetcher must return that type,
3752
+ the read gives `Todo[] | undefined`, and a write of another type is a compile error, so a
3753
+ key and its data cannot drift apart. At run time the key is the array itself, so prefix
3754
+ invalidation works unchanged. A plain key still takes the type of its fetcher.
3755
+
3695
3756
  ### Invalidation
3696
3757
 
3697
3758
  After a mutation, `useQueryClient().invalidateQueries(key)` marks matching entries
@@ -6146,8 +6207,10 @@ export const getSessions = () => (manager ??= createSessions({
6146
6207
  ### Log in & out
6147
6208
 
6148
6209
  A loader can _read_ the session but can't write cookies - so login/logout live in plain
6149
- Nifra routes that have the full `Context`. `regenerate()` rotates the
6150
- session id on login to defend against fixation; the `Set-Cookie` rides the redirect.
6210
+ Nifra routes that have the full `Context`. Store-backed sessions rotate their ID
6211
+ when a configured `identity` key changes. Call `regenerate()` to rotate
6212
+ explicitly, including on login when `identity` is omitted. The
6213
+ `Set-Cookie` rides the redirect.
6151
6214
 
6152
6215
  ```ts
6153
6216
  // backend/app.ts - login/logout are plain nifra routes (full Context → they can WRITE the cookie).
@@ -8361,7 +8424,7 @@ The dev server with true HMR, on port 4321. Bun runs it unless `vitePlugins` are
8361
8424
 
8362
8425
  `nifra build [--target <t>] [--out <dir>] [--transport <module>] [--prerender <paths>] [--report]`
8363
8426
 
8364
- A complete deploy directory for `bun`, `node`, `deno`, `cloudflare`, `vercel` or `static`. The server entry is generated from `backend/framework.ts`, `backend/app.ts` and `routes/`. `--report` prints each chunk's size. `--transport` builds the client to reach its server through that module's `fetch`, for a native shell. `--prerender` (static target) also prerenders the named pages, comma-separated, whether or not their route exports `prerender`.
8427
+ A complete deploy directory for `bun`, `node`, `deno`, `cloudflare`, `vercel` or `static`. The server entry is generated from `backend/framework.ts`, `backend/app.ts` and `routes/`. `--report` prints chunk sizes and initial framework JavaScript and CSS by route. `--transport` builds the client to reach its server through that module's `fetch`, for a native shell. `--prerender` (static target) also prerenders the named pages, comma-separated, whether or not their route exports `prerender`.
8365
8428
 
8366
8429
  `nifra start [--port <n>] [--out <dir>]`
8367
8430
 
@@ -8380,7 +8443,9 @@ What it does
8380
8443
 
8381
8444
  `nifra check [--lints-only] [--json] [--sarif]`
8382
8445
 
8383
- Typecheck plus contract lints: a hand-rolled `fetch()` to your own API, an untyped client, backend code reached from browser code. `--lints-only` skips tsc; `--sarif` emits SARIF 2.1.0.
8446
+ Typecheck and contract lints. Use `--incremental` to reuse TypeScript 5 or 6
8447
+ compiler state and `--timings` to see where the check spent its time.
8448
+ `--lints-only` skips tsc. `--sarif` emits SARIF 2.1.0.
8384
8449
 
8385
8450
  `nifra review [--diff <ref>] [--strict] [--fix] [--write]`
8386
8451
 
@@ -8449,9 +8514,11 @@ One JSON verdict over every applicable gate, each recorded as pass, fail or skip
8449
8514
 
8450
8515
  The verification ladder: L0 typed contract, L1 route assurance, L2 capability lockfile, L3 route manifest, L4 invariant-tested. `--min` fails below a level.
8451
8516
 
8452
- `nifra prove [--file <path>] [--min <n>]`
8517
+ `nifra prove [--file <path>] [--min <n>] [--run]`
8453
8518
 
8454
- Plan the cheapest proofs for the changed files and report a machine-checkable stop condition. Needs a fresh build.
8519
+ Plan cumulative verification gates against a build with matching source and artifact
8520
+ digests from `nifra build`. Run `nifra prove --run` to execute
8521
+ the gates and regenerate saved proofs for the v2 evidence envelope.
8455
8522
 
8456
8523
  `nifra capabilities snapshot | check | explain`
8457
8524
 
@@ -8628,8 +8695,8 @@ starts from unless nothing else, installed or declared, names one.
8628
8695
 
8629
8696
  ```bash
8630
8697
  nifra upgrade --list # the release targets this CLI knows
8631
- nifra upgrade 5.15.1 # dry-run: every planned edit, nothing written
8632
- nifra upgrade 5.15.1 --write # apply; it verifies with nifra check once the target is installed
8698
+ nifra upgrade 5.16.0 # dry-run: every planned edit, nothing written
8699
+ nifra upgrade 5.16.0 --write # apply; it verifies with nifra check once the target is installed
8633
8700
  # if pins were already bumped by hand, add --from <installed-version>
8634
8701
  bun install # install the new pins
8635
8702
  nifra check # verify against them
@@ -8671,6 +8738,19 @@ see mixed nifra versions. A
8671
8738
  `--write` drops those entries so the next `bun install` records them
8672
8739
  again (see stale file: links).
8673
8740
 
8741
+ A recipe can also rewrite source on the syntax tree, with the project's own TypeScript, for
8742
+ a call shape an import move cannot express. A rewrite changes only a shape it recognizes
8743
+ whole and lists every other site by file and line under "to edit by hand"; it never
8744
+ guesses. The 5.16 recipe carries three, for APIs the route table and the backend now type:
8745
+ `route-hooks` writes the page's own route into `useSearch` and
8746
+ `useParams` (the type-argument and bare forms are removed), `query-keys`
8747
+ wraps the key in `getQueryData` and `setQueryData` in
8748
+ `queryKey(...)`, and `form-for` turns
8749
+ `formFor<App, "/path">()` into
8750
+ `formFor<App>()("/path")`. None changes what runs: afterwards, run
8751
+ `nifra types` and `tsc`, and whatever is left shows as an error at its
8752
+ line.
8753
+
8674
8754
  A `link:` or `file:` dependency outside the root that installs its own
8675
8755
  `@nifrajs/*` at another version stops the upgrade before anything is written: its
8676
8756
  imports resolve from its own `node_modules`, so after the upgrade a
@@ -13021,6 +13101,414 @@ patched the server HTML. In development the page reports it to the dev server as
13021
13101
  installed in the project, `nifra_hydrate` reproduces it with a stable diagnostic.
13022
13102
  See hydration.
13023
13103
 
13104
+ ### Server components
13105
+
13106
+ #### NIFRA_COMPONENT_REQUEST
13107
+
13108
+ A server component request failed. The error carries a `code` and no further
13109
+ detail, so look on the server for the cause.
13110
+
13111
+ -
13112
+ `component_input` (422): the props the page sent failed the component's input
13113
+ schema.
13114
+
13115
+ -
13116
+ `component_denied` (401, 403 or 404): the request was not same-origin (call components from
13117
+ your own pages), or the component's `authorize` callback refused it with a 401, 403
13118
+ or 404.
13119
+
13120
+ -
13121
+ `component_version` (409): the browser's build differs from the server's, usually
13122
+ after a deploy. Reload the page.
13123
+
13124
+ -
13125
+ `component_busy` (429): every render slot is busy and the waiting queue is full. Reduce how
13126
+ many components render at once, or the work each one does.
13127
+
13128
+ -
13129
+ `component_timeout` or `component_cancelled`: the component outran its
13130
+ deadline, or the request was aborted first, for example by the visitor navigating away. For a
13131
+ timeout, speed up the data the component waits on.
13132
+
13133
+ #### NIFRA_COMPONENT_BUILD
13134
+
13135
+ The server component build refused the project: a component module, a build entry, or the
13136
+ source graph breaks a rule the compiler relies on. The message names the rule.
13137
+
13138
+ **Fix:** fix the one thing the message names and rebuild. The build never ships a
13139
+ bundle it refused.
13140
+
13141
+ ### Rendering and deployment
13142
+
13143
+ #### NIFRA_PPR_CONTRACT
13144
+
13145
+ A partially prerendered route broke the contract that lets its shell be shared between
13146
+ visitors: a visitor-specific loader, a dynamic hole set up wrongly, a nonce in the shell, or an
13147
+ invalid `ppr` option.
13148
+
13149
+ **Fix:** keep per-visitor data out of the shell (move it into a dynamic boundary,
13150
+ or mark a layout loader `gate`), give every hole a `boundaryLoaders`
13151
+ entry, and use `csp: createCspPolicy(...)` instead of a per-request nonce.
13152
+
13153
+ #### NIFRA_DEPLOYMENT_OUTPUT
13154
+
13155
+ A deployment adapter or the build output it was given broke a deployment rule: an unsafe or
13156
+ oversized output tree, a path collision, or an adapter that does not implement the interface
13157
+ this Nifra build supports.
13158
+
13159
+ **Fix:** emit additions only through the returned `files` array, keep
13160
+ paths relative and distinct, and match the adapter API version this Nifra build supports.
13161
+
13162
+ #### NIFRA_CLIENT_BUILD_NO_GRAPH
13163
+
13164
+ The client build's result had no metafile (or one without inputs or outputs), so Nifra cannot
13165
+ prove which modules reached the browser. It refuses to write the bundle rather than guess.
13166
+
13167
+ **Fix:** build the client through Nifra's build, which keeps the bundler's
13168
+ metafile. A custom build step must request the metafile and pass it through.
13169
+
13170
+ #### NIFRA_ROUTE_SLOT_UNAVAILABLE
13171
+
13172
+ A route slot named a parent route, a slot name, or a target route that is not registered, so
13173
+ the slot cannot render.
13174
+
13175
+ **Fix:** register the route the slot points at, and spell the slot name as the
13176
+ parent route declares it.
13177
+
13178
+ ### Middleware, stores and sessions
13179
+
13180
+ #### NIFRA_MEMORY_STORE_IN_PRODUCTION
13181
+
13182
+ An in-memory store (rate-limit MemoryStore, MemoryIdempotencyStore, MemoryResponseCache, MemorySessionStore) was created in production. Each instance keeps its own copy, so limits, de-duplication, cached responses or sessions differ per instance and are lost on restart.
13183
+
13184
+ - Use a shared store: Give the middleware or session manager a store every instance reads and writes (Redis or another shared backend) instead of the Memory* default.
13185
+
13186
+ - Single instance only: Pass { allowInProduction: true } when exactly one instance serves traffic and losing state on restart is acceptable.
13187
+
13188
+ #### NIFRA_CORS_CREDENTIALS_WILDCARD
13189
+
13190
+ cors() was given `credentials: true` with `origin: "*"`. Browsers refuse a wildcard origin on a credentialed request, so the combination can never work.
13191
+
13192
+ **Fix:** List the explicit origin(s) that may send credentials instead of the wildcard.
13193
+
13194
+ #### NIFRA_SECRET_TOO_SHORT
13195
+
13196
+ A signing secret is shorter than the 32 bytes (256 bits) nifra requires, so it is refused instead of used.
13197
+
13198
+ **Fix:** Generate one with `openssl rand -base64 32` and load it from the environment.
13199
+
13200
+ #### NIFRA_MIDDLEWARE_ORDER
13201
+
13202
+ A middleware that protects routes was installed after the routes it should guard, so those routes were registered without it.
13203
+
13204
+ **Fix:** Call app.use(...) for it before registering the routes it protects.
13205
+
13206
+ #### NIFRA_CONTEXT_STORAGE_MISSING
13207
+
13208
+ getContext() ran outside a request that went through contextStorage(): the middleware was not installed before the route, or the code ran outside any request (a partially prerendered shell is built outside every request).
13209
+
13210
+ **Fix:** Add app.use(contextStorage()) before the route and call getContext() during that request. For a PPR shell, read the request in a dynamic boundary's loader instead.
13211
+
13212
+ #### NIFRA_SESSION_STORE_CONSISTENCY
13213
+
13214
+ The session manager was given an eventually consistent store such as KVSessionStore. Logout and rotation need a read to see the write that revoked a session, which that kind of store does not promise.
13215
+
13216
+ **Fix:** Use a strongly consistent shared SessionStore.
13217
+
13218
+ ### Routes, wire and data
13219
+
13220
+ #### NIFRA_ROUTE_CONFIG
13221
+
13222
+ A route is misconfigured, and registration refuses it at boot rather than failing on the first request. The error's `code` names the rule (DUPLICATE_ROUTE, INVALID_PATH, INVALID_METHOD, WILDCARD_NOT_LAST, INVALID_IDEMPOTENCY, ...).
13223
+
13224
+ **Fix:** Read the `code` and the message, then correct the route definition they name. The server does not start until the route is valid.
13225
+
13226
+ #### NIFRA_ROUTE_FILES
13227
+
13228
+ The file routes, or a route's exports, break a convention the router relies on: two files map to one URL, two `_404` files answer the same URLs, an optional segment is mixed with literal text, a layout exports an `action`, or a route turns off both server rendering and hydration.
13229
+
13230
+ **Fix:** The message names the files and the rule. Keep one file per URL, one `_404` per scope, and put actions in route files, not layouts.
13231
+
13232
+ #### NIFRA_WIRE_INVALID
13233
+
13234
+ A value could not be encoded or decoded on the typed wire: a malformed frame, an unsupported codec or content type, a payload over maxBytes, or a value that is not JSON serializable.
13235
+
13236
+ **Fix:** Send values the wire can carry, from a client built against this server's contract. For an oversized payload, send less or raise maxBytes on purpose.
13237
+
13238
+ #### NIFRA_STORAGE_KEY
13239
+
13240
+ A storage key was refused before any read or write: it is empty or over 1024 characters, is absolute, has a backslash, NUL, "..", or an empty or "." segment, escapes the storage root, or reaches the file through a symbolic link, a moved root directory or an untrusted writable directory.
13241
+
13242
+ **Fix:** Build keys as relative, forward-slash paths that stay under the storage root, and never put unchecked user input into a key. For a symbolic link, a moved root or an untrusted directory, the message names what to check on the filesystem.
13243
+
13244
+ #### NIFRA_STORAGE_READ_LIMIT
13245
+
13246
+ An R2 object is larger than maxReadBytes (or reports invalid size metadata), so R2Storage refuses to buffer it. The key itself was valid.
13247
+
13248
+ **Fix:** Raise maxReadBytes on the R2Storage if objects of that size are expected; otherwise find why the object is larger than the limit.
13249
+
13250
+ #### NIFRA_OPENAPI_IMPORT
13251
+
13252
+ The OpenAPI document cannot be imported: it is malformed, uses a version outside 3.0.x, 3.1.x and 3.2.x, exceeds an import limit, or holds a construct Nifra cannot represent (a parameter $ref, an unsupported path template).
13253
+
13254
+ **Fix:** The message names the path in the document. Fix that part, and inline parameter $refs before importing: refs are never resolved.
13255
+
13256
+ #### NIFRA_SCHEMA_DECLARATION
13257
+
13258
+ A schema declaration uses something the schema builder cannot accept: a file list nested in a list, a file field outside t.form(), a header name that is not lower-cased, a declassified field with no reason, or a feature precompile refuses (custom registry kinds, runtime-only metadata).
13259
+
13260
+ **Fix:** The message names the declaration and what it expects. Declare file fields in t.form(), give declassified a reason, and keep precompiled schemas to plain, compilable shapes.
13261
+
13262
+ #### NIFRA_ASSURANCE_INPUT
13263
+
13264
+ An assurance, capability, manifest or evidence declaration is malformed: an id, path glob, scope, provenance, method or policy field outside what the registry accepts.
13265
+
13266
+ **Fix:** The message names the field and the accepted form (lowercase dot/dash ids, absolute path globs, a known scope). Correct the declaration; `nifra check` reports the same project-wide.
13267
+
13268
+ #### NIFRA_EFFECT_INVALID
13269
+
13270
+ An effect, saga or durable-journal declaration, or the store behind it, broke its contract: a value out of range, a missing step, or a store that is not durable where durability is required.
13271
+
13272
+ **Fix:** The message names the part. Where it says `store.durability === "durable"`, back the journal with a durable store; otherwise correct the id, cost or limit it names.
13273
+
13274
+ #### NIFRA_CONTENT_INVALID
13275
+
13276
+ A content collection, its baked index, or an MDX extension is malformed or out of range.
13277
+
13278
+ **Fix:** The message names the index, bucket or extension. Correct the collection definition it names.
13279
+
13280
+ #### NIFRA_JOBS_INVALID
13281
+
13282
+ A job, its payload, or a dead-letter record cannot be stored as data: a duplicate job name, an Error instance, a custom prototype, an accessor, or a record the dead-letter view cannot read.
13283
+
13284
+ **Fix:** Make the payload plain data (objects, arrays, strings, numbers, booleans), and give each job one name.
13285
+
13286
+ #### NIFRA_I18N_CONFIG
13287
+
13288
+ The locale, copy-table or localized-path configuration breaks a rule: a duplicate id or canonical pathname, two locales sharing an hreflang, a draft default locale, or a copy value of the wrong kind.
13289
+
13290
+ **Fix:** The message names the locale, table or pathname. Make the ids and pathnames unique and give each locale its own hreflang.
13291
+
13292
+ ### Build and assets
13293
+
13294
+ #### NIFRA_BUILD_PLUGIN
13295
+
13296
+ A build plugin (CSS Modules, SCSS, StyleX, a Vue single-file component, Svelte MDX) failed on a file or is missing a compiler dependency.
13297
+
13298
+ **Fix:** The message names the file and the compiler's own reason. Fix that source, or install the compiler package it says is missing or incompatible.
13299
+
13300
+ #### NIFRA_BUILD_OUTPUT
13301
+
13302
+ The client or server build, or the directory it writes to, broke a rule: no entry-point output, an output or public directory that is a symlink, escapes its root or overlaps the other, a build target the chosen option does not fit, or a glob pattern the bundler cannot read.
13303
+
13304
+ **Fix:** The message names the path, target or option. Move the output or public directory, drop the option the target does not support, or give the bundler a literal pattern.
13305
+
13306
+ #### NIFRA_ASSET_INVALID
13307
+
13308
+ A font, web manifest or service-worker asset was refused: a download from a non-allowed host or over its size limit, a stylesheet with no usable font files, an unknown manifest value, or a path with characters an asset path cannot hold.
13309
+
13310
+ **Fix:** The message names the family, URL or field. Request only Google-hosted fonts within the limits, and use the manifest values and path characters it lists.
13311
+
13312
+ ### Framework warnings
13313
+
13314
+ #### NIFRA_VUE_WARNING
13315
+
13316
+ Vue's development build warned about a component. The text after `[Vue warn]:` names the problem, and Vue's component trace names the component it happened in.
13317
+
13318
+ **Fix:** Fix the component the trace names. Do not silence Vue's warn handler: each warning is raised for a real mistake in that component.
13319
+
13320
+ #### NIFRA_SVELTE_DIAGNOSTIC
13321
+
13322
+ Svelte's development build reported a mistake. The identifier after `[svelte]` (or at the end of the https://svelte.dev/e/ link) is Svelte's own stable code.
13323
+
13324
+ **Fix:** Open https://svelte.dev/e/<code> for the cause and the repair, then fix the component the message locates.
13325
+
13326
+ #### NIFRA_REACT_WARNING
13327
+
13328
+ React reported a mistake: a development warning that links to react.dev/link/..., or an error whose message links to react.dev/errors/... (a minified production error).
13329
+
13330
+ **Fix:** Open the link in the message for the cause and the repair, then fix the component React's trace names. A react.dev/errors message is a thrown error, not a warning.
13331
+
13332
+ ### More framework warnings
13333
+
13334
+ #### NIFRA_PREACT_DIAGNOSTIC
13335
+
13336
+ Preact's debug build reported a mistake in a component: invalid nesting, a duplicate key, an invalid element type, a hook outside render, a render loop, or a prop of the wrong type. Preact has no stable code, so the message text is the identifier.
13337
+
13338
+ **Fix:** Fix the component the message names; Preact appends its component stack. Do not remove preact/debug to quiet it: each message is raised for a real mistake.
13339
+
13340
+ ### Configuration and runtime
13341
+
13342
+ #### NIFRA_HEADER_VALUE_INVALID
13343
+
13344
+ A response header or cookie value was refused: a control character, a newline, a leading or trailing space, an illegal character in a cookie Domain or Path, a `__Host-` cookie with a Domain, a cookie over its size limit, or a framing header set statically.
13345
+
13346
+ **Fix:** The message names the header or cookie. Remove the character it names, and set per-response headers with c.set.headers (cookies with c.set.cookie) instead of statically.
13347
+
13348
+ #### NIFRA_CSP_CONFIG
13349
+
13350
+ The Content-Security-Policy or inline-script setup conflicts: a cspHeader and a nonce resolver both writing the header, an executable inline script without a nonce, content the inert head.script slot refuses, or a policy used before it was prepared.
13351
+
13352
+ **Fix:** The message names the conflict. Use either `nonce` or `csp: createCspPolicy(...)`, give executable scripts a non-empty nonce, and use unsafeInlineScript() only where the message says to.
13353
+
13354
+ #### NIFRA_CDN_CONFIG
13355
+
13356
+ A CDN adapter was given a missing binding or a store that cannot do what was asked (for example invalidate by tag), or an option outside what it accepts.
13357
+
13358
+ **Fix:** The message names the adapter and what to pass (the `cache` binding, the @vercel/functions helper, a store that supports tags). Pass it where the CDN is configured.
13359
+
13360
+ #### NIFRA_PARITY_FAILED
13361
+
13362
+ The development/production parity check failed (identity parity or manifest parity), or its scan hit the limit before it could decide.
13363
+
13364
+ **Fix:** Read the differences the message lists and make development and production agree. When the scan limit was reached, narrow the scan by running from the app or workspace root.
13365
+
13366
+ #### NIFRA_API_MISUSE
13367
+
13368
+ An API was called in a state it does not allow: next() called twice, a request body read as a stream after it was consumed, a response body sent twice, headers written after the response was committed, notFound() applied twice or inside a group, or a query used with no query client.
13369
+
13370
+ **Fix:** The message names the call. Call it once, before the response is committed, and on the object it belongs to (read bodies with c.req.bytes() in a hook; apply notFound() to the parent server).
13371
+
13372
+ #### NIFRA_WEBSOCKET_INVALID
13373
+
13374
+ A WebSocket was opened or closed in a way the protocol or the client does not allow: a close reason over 123 UTF-8 bytes, a close code a server may not send, a path with a dot segment, or an in-process client that has no socket.
13375
+
13376
+ **Fix:** Close with a reason of at most 123 bytes and a code in 1000-1003, 1007-1014 or 3000-4999. Open sockets against a listening app, at a path without `.` or `..` segments.
13377
+
13378
+ #### NIFRA_VALUE_NOT_SERIALIZABLE
13379
+
13380
+ A value could not be turned into JSON or the typed wire: a circular reference, a BigInt, a non-finite number, a class instance, an undefined field or array item, or a type the wire has no encoding for.
13381
+
13382
+ **Fix:** Send plain data: objects, arrays, strings, finite numbers and booleans. Convert BigInt and class instances to plain values before they cross the boundary.
13383
+
13384
+ #### NIFRA_CRON_INVALID
13385
+
13386
+ A cron schedule or job registration is invalid: not five space-separated fields, an empty, out-of-range or malformed term, or two jobs with the same name.
13387
+
13388
+ **Fix:** Write the schedule as five space-separated fields with each value in its range, and register each job name once.
13389
+
13390
+ #### NIFRA_GRAPHQL_REQUEST
13391
+
13392
+ A GraphQL request was malformed (no `query`, a body that is not a JSON object, variables that are not a JSON object), or mountGraphql was configured in a way it refuses.
13393
+
13394
+ **Fix:** For a request, send a JSON object with a `query` string and an object for `variables`. For mountGraphql, call `.use(websocket())` before enabling subscriptions, and guard sockets with the same authorization as the HTTP endpoint.
13395
+
13396
+ #### NIFRA_IMAGE_INVALID
13397
+
13398
+ An image could not be processed or generated: a source that failed to decode or changed while it was being opened, variants without positive dimensions, or generated output over its size limit.
13399
+
13400
+ **Fix:** The message names the step. Give the image a valid source and positive dimensions, and keep generated output within maxBytes.
13401
+
13402
+ #### NIFRA_HTTP_RESPONSE_INVALID
13403
+
13404
+ The server adapter could not write or read the HTTP message: a status code outside the valid range, a body whose length disagrees with its Content-Length, an invalid header character, or a request that closed early.
13405
+
13406
+ **Fix:** Return a valid status, send a body that matches the Content-Length you set (or omit it), and keep header names and values to legal characters.
13407
+
13408
+ #### NIFRA_OPTION_RENAMED
13409
+
13410
+ An option was renamed in this version, and the old name is no longer read.
13411
+
13412
+ **Fix:** The message gives the new name. Rename the option where you pass it.
13413
+
13414
+ #### NIFRA_CLIENT_REFUSED
13415
+
13416
+ The typed client refused a response or a request: a response that breaks the route's declared contract, a server-sent event over its size limit, or a form field that is neither text nor a file.
13417
+
13418
+ **Fix:** For a contract violation, make the server return what its route declares (or update the declaration). For a form body, send strings and files only.
13419
+
13420
+ #### NIFRA_TOOL_INVALID
13421
+
13422
+ A tool declaration, its adapter, or its approval or budget settings break a rule: an option of the wrong type, a limit exceeded, a missing approval, or a duplicate tool name.
13423
+
13424
+ **Fix:** The message names the tool and the field. Correct the declaration; `nifra check` reports the same project-wide.
13425
+
13426
+ #### NIFRA_JWKS_UNAVAILABLE
13427
+
13428
+ The JWKS endpoint used to verify tokens could not be used: the fetch failed, the response could not be read or was over its size limit, the key set was invalid, or the URL is not https.
13429
+
13430
+ **Fix:** The message gives the status or reason. Check that the JWKS URL is reachable over https (localhost is allowed) and returns a valid key set within maxBytes.
13431
+
13432
+ #### NIFRA_BODY_PARSER_REFUSED
13433
+
13434
+ bodyParser was given a media type nifra already handles (JSON, a form, multipart) or one a browser can send from any site without a preflight request.
13435
+
13436
+ **Fix:** The message names the media type and what to do instead: body schemas already read JSON and forms, multipart uses multipartBody from @nifrajs/core/multipart, and a no-preflight type must be read in the handler.
13437
+
13438
+ #### NIFRA_IDEMPOTENCY_STORE_CORRUPT
13439
+
13440
+ A stored idempotency record could not be replayed: its body or status is not in the form the middleware wrote.
13441
+
13442
+ **Fix:** First confirm whether the original operation completed: deleting the record lets the next retry with that key run the handler again, which repeats any side effect already done (a charge, an email). Delete the record only once the operation is known not to have completed, or reconcile its effect by hand. If it recurs, check that nothing else writes to the idempotency store and that the store does not alter values.
13443
+
13444
+ #### NIFRA_AUTHJS_REQUEST_FAILED
13445
+
13446
+ The Auth.js bridge called an Auth.js endpoint (sign in, sign out, CSRF token) and it failed or did not answer.
13447
+
13448
+ **Fix:** The message gives the HTTP status. Check that the Auth.js endpoint is mounted and answering.
13449
+
13450
+ #### NIFRA_ACTION_FAILED
13451
+
13452
+ A route action request answered with a non-OK status, so the router threw instead of returning a result.
13453
+
13454
+ **Fix:** The message gives the status and the action URL. Look at the response and logs for that status on the server.
13455
+
13456
+ #### NIFRA_STRICT_MODE
13457
+
13458
+ A startup check failed while strict mode is on, so the process refuses to start instead of running with the problem.
13459
+
13460
+ **Fix:** Fix the problems the message lists above that line. Strict mode is meant to turn them into a startup failure.
13461
+
13462
+ #### NIFRA_LIBRARY_RESOLUTION
13463
+
13464
+ A UI library or optional peer did not resolve to one working copy: two copies of React reached server rendering (react-dom renders with a different React than your components import), or an optional peer is missing or failed to load.
13465
+
13466
+ **Fix:** For two copies, dedupe the library in your package manager so react-dom and your components import the same React. For a peer, the message names it and the underlying error: install it, or use the default build.
13467
+
13468
+ ### Configuration and runtime
13469
+
13470
+ #### NIFRA_RUNTIME_MISSING
13471
+
13472
+ A feature was used without its opt-in runtime installed: WebSocket routes, server-sent events, MCP declarations or the Node-direct renderer ship as separate plugins so apps that do not use them stay small.
13473
+
13474
+ **Fix:** The message names the plugin. Add the `.use(...)` it shows (websocket() from @nifrajs/core/ws, the streaming runtime, mcp(), or nodeDirect() from @nifrajs/core/node-direct) on the app that declares the routes, before those routes are declared. A child app that declares its own routes needs its own `.use(...)`; for WebSocket routes mounted from a child, install it where the message says (the parent or the child).
13475
+
13476
+ #### NIFRA_SERVER_LIFECYCLE
13477
+
13478
+ The server was configured at the wrong time or on the wrong runtime: a hook added after the page routes were declared (no page runs it), configuration changed after listen() sealed the server, or listen() called outside Bun.
13479
+
13480
+ **Fix:** Move the call before listen(). For a late hook, apply it in createWebApp({ use }) to cover the pages, or inside app.group(prefix, ...). Off Bun, serve with @nifrajs/node or @nifrajs/deno, or hand app.fetch to a fetch-compatible runtime.
13481
+
13482
+ ### Options
13483
+
13484
+ #### NIFRA_LIVE_CONFIG
13485
+
13486
+ The live (real-time) options are invalid: a missing or short secret, a hub and bus configured
13487
+ together, a path that is not absolute, or a subject that does not return a string.
13488
+
13489
+ **Fix:** the message names the option. A secret must be at least 32 bytes (
13490
+ `openssl rand -base64 32`), and `hub` and `bus` are exclusive.
13491
+
13492
+ #### NIFRA_OPTION_INVALID
13493
+
13494
+ An option passed to a Nifra function (`createWebApp`, a route, the CDN, ISR, a
13495
+ manifest) has a value outside what it accepts.
13496
+
13497
+ **Fix:** the message names the option and the shape it accepts. Correct the value
13498
+ at the call that sets it; nothing is silently coerced.
13499
+
13500
+ #### NIFRA_SOLID_DIAGNOSTIC
13501
+
13502
+ Solid 2.0's development build reported a reactivity mistake. The message opens with Solid's own
13503
+ stable code in square brackets (`[STRICT_READ_UNTRACKED]`), then names the owner path,
13504
+ the source location, and the guide for that code. Nifra records it in the dev feed so
13505
+ `nifra explain` and `nifra_explain` return it with the rest of your errors.
13506
+
13507
+ **Fix:** open the repair guide the message names (
13508
+ `node_modules/solid-js/skills/reactivity-diagnostics/SKILL.md`, anchored by the
13509
+ lower-cased code) and apply its repair at the reported location. Do not silence the report:
13510
+ Solid raises each one for a real defect or a real cost.
13511
+
13024
13512
  #### NIFRA_SCHEMA_PARSE
13025
13513
 
13026
13514
  Data crossing a boundary did not match its declared schema.
@@ -14635,7 +15123,7 @@ the command below, which runs every recipe since its installed version. The 5.6
14635
15123
  its imports and dependencies; the follow-up changes below need a hand.
14636
15124
 
14637
15125
  ```sh
14638
- nifra upgrade 5.15.1
15126
+ nifra upgrade 5.16.0
14639
15127
  ```
14640
15128
 
14641
15129
  -
@@ -15066,9 +15554,9 @@ Migrate a backend. For the full
15066
15554
  rendering and route model, see Loaders & actions
15067
15555
  and Routing.
15068
15556
 
15069
- The current dynamic SSR snapshot reports Nifra at 15× the throughput
15070
- of Next.js, 6.9× Nuxt, 4× SvelteKit, and
15071
- 2× SolidStart on the measured pages. See the
15557
+ The current dynamic SSR snapshot reports Nifra at 19× the throughput
15558
+ of Next.js, 8.4× Nuxt, 5.3× SvelteKit, and
15559
+ 2.2× SolidStart on the measured pages. See the
15072
15560
  benchmark methodology and full results.
15073
15561
 
15074
15562
  ## Nifra - Migrate route by route
@@ -15419,6 +15907,22 @@ semantic conventions, and ships no SDK. Cache operations, background jobs and ev
15419
15907
  join the request's trace through the context you bind them to, and a small bridge puts the
15420
15908
  OpenTelemetry SDK's own database and HTTP spans under the same tree.
15421
15909
 
15910
+ ### Find the slow stage of a page
15911
+
15912
+ Load the page with `nifra dev` running, then call `nifra_inspect`.
15913
+ The trace includes the request duration, ISR status when available, and the route's
15914
+ `routeTiming`. Its `phases` report page loaders, layout loaders,
15915
+ output validation, serialization, and rendering in milliseconds. Loader phases can
15916
+ overlap. A streamed response is measured through the initial response, before deferred
15917
+ values settle. An ISR hit or a stale response served from cache shows the cache status.
15918
+
15919
+ Run `nifra build --report` for the matched page and layout chunks, the client
15920
+ entry, their eager JavaScript imports, and the route stylesheet URLs. The per-route gzip
15921
+ totals estimate the initial framework assets. A literal `hydrate = false` shows
15922
+ zero framework JavaScript and keeps the stylesheet sizes. A hydration setting the build
15923
+ cannot determine shows an unknown JavaScript size. Use browser resource timing to measure dynamic imports, island scripts, locale-specific chunks, and bytes
15924
+ transferred with your server's compression and cache settings.
15925
+
15422
15926
  ### Request spans
15423
15927
 
15424
15928
  ```ts
@@ -17562,8 +18066,8 @@ so `achieved` is the highest rung with unbroken support underneath, and it is
17562
18066
  `-1` when even L0 fails.
17563
18067
 
17564
18068
  -
17565
- **L0 typed contract** - `nifra check` passes: the frontend and
17566
- backend cannot have silently diverged.
18069
+ **L0 typed contract** - `nifra check` passes and the compiler
18070
+ confirms the types across the frontend and backend.
17567
18071
 
17568
18072
  -
17569
18073
  **L1 route assurance** - every route is classified, and the enforcement a rule
@@ -18942,6 +19446,10 @@ For hand-rolled own-API `fetch()` calls, `nifra check` stays conservative: simpl
18942
19446
  that match a statically visible Nifra route get an exact typed-client rewrite diff; dynamic URLs, custom
18943
19447
  headers, bodies, query strings, or ambiguous routes fall back to manual steps.
18944
19448
 
19449
+ Run `nifra check --incremental --timings` while editing. TypeScript 5 and 6 reuse compiler state
19450
+ in `.nifra/check/`. The report includes elapsed milliseconds for the typecheck, source reads,
19451
+ lint and diagnostic phases. Pass `--json` for the same timings as structured data.
19452
+
18945
19453
  ## `nifra i18n check` - the catalog gate
18946
19454
 
18947
19455
  `nifra i18n check [entry]` imports the module that exports your `locales` (from `defineLocales`) and
@@ -19051,6 +19559,13 @@ and limits: [Where your code and secrets run](https://nifra.dev/docs/agents#proj
19051
19559
 
19052
19560
  `nifra check --json` returns stable diagnostic codes and machine-actionable evidence. `nifra assure --json --strict` returns one versioned bundle with explicit pass, fail, and skip gate results plus a `green` or `red` verdict. Use `nifra fix --code NF-...` for a registered fix recipe, and `nifra contracts snapshot` to opt into route contract drift detection.
19053
19561
 
19562
+ `nifra prove --min 2 --json` plans the same cumulative gates as `nifra levels`. Use
19563
+ `nifra prove --run --min 2 --json` to execute the plan and return passing or failing results
19564
+ bound to the current source graph and build artifact digests. Run `nifra build` first. It records
19565
+ content digests for project source, public assets, and the emitted build. Proofs require the current
19566
+ digests to match that record and every requested gate to pass. Use `--file` for impact hints.
19567
+ Regenerate saved proofs for the v2 evidence envelope with `nifra prove --run`.
19568
+
19054
19569
  Assurance configs may append application-supplied rule packs. Pack codes must not use the reserved `NF-` prefix. Rules are pure source scans and run after the built-in rules.
19055
19570
 
19056
19571
  Run the client from (or point it at) your project root. The protocol is hand-rolled
@@ -21197,7 +21712,7 @@ do on `@nifrajs/node`.
21197
21712
  `Content-Length` is declared is sent with that length and cut off, not finished, if the stream ends
21198
21713
  short or runs long.
21199
21714
  - **Headers uWS frames itself** - `Content-Length`, `Transfer-Encoding` and `Date` - are dropped from the
21200
- app's response, and uWS adds a `uWebSockets: 20` header it cannot be told to omit.
21715
+ app's response. The `uWebSockets: 20` banner uWS would add is switched off for the thread that loads the adapter; a worker thread switches off its own by loading it.
21201
21716
  - **Header values are checked** for CR, LF and other control characters before anything is written, and
21202
21717
  a status outside 100-999 is refused: either is a `500`, reported through the app's logger.
21203
21718
  - **uWS's parser, not Node's.** It rejects a repeated `Host`, a request carrying both `Content-Length`
@@ -21769,6 +22284,7 @@ skills/
21769
22284
  nifra-api/SKILL.md typed routes, schemas, middleware, WebSockets, the never-throwing client
21770
22285
  nifra-web/SKILL.md file routing, loaders/actions, SSR, islands, the client/server boundary
21771
22286
  nifra-verify/SKILL.md check, assure, capabilities, manifest diff, the verification ladder
22287
+ nifra-errors/SKILL.md every stable error and `nifra check` code, with its cause and repair (generated)
21772
22288
  ```
21773
22289
 
21774
22290
  ## Install
@@ -21882,9 +22398,10 @@ import { assertSafeKey, StorageKeyError } from "@nifrajs/storage"
21882
22398
 
21883
22399
  ## API
21884
22400
 
21885
- - `new MemoryStorage()` · `new FileStorage(root)` · `new R2Storage(bucket)`.
22401
+ - `new MemoryStorage()` · `new FileStorage(root)` · `new R2Storage(bucket, { maxReadBytes? })`.
21886
22402
  - `put(key, data, { contentType?, metadata? })` - `data` is `Uint8Array | ArrayBuffer | string`.
21887
22403
  - `get(key)` → `{ body, size, contentType?, metadata? } | null` · `delete(key)` · `exists(key)` · `list({ prefix?, limit? })`.
22404
+ `R2Storage.get` defaults to a 16 MiB read limit and throws a `RangeError` for oversized objects.
21888
22405
  `FileStorage.list` reads and sorts each directory it enters, so even `limit: 1` costs time in
21889
22406
  proportion to those directories' entries; split a very large store across key prefixes.
21890
22407
  - `assertSafeKey(key)` / `StorageKeyError` · `toBytes(data)`.
@@ -22917,7 +23434,7 @@ done-gate, or `nifra mcp` to give the agent live project tools.
22917
23434
 
22918
23435
  ## @nifrajs/web
22919
23436
 
22920
- `ACTION_GLOBAL`, `Action`, `BOUNDARY_GLOBAL`, `BackendOnly`, `Blocker`, `BlockerController`, `BlockerFunction`, `BlockerLocation`, `BlockerState`, `Boundary`, `BoundaryDescriptor`, `BoundaryError`, `BoundaryLoaderEntry`, `BoundaryLoadersOf`, `BoundaryMode`, `BoundaryRegistration`, `BoundaryRequestCtx`, `BoundaryState`, `BoundaryStates`, `BoundaryStatus`, `BrowserNavigate`, `BuildAssetSet`, `CacheStore`, `CachedResponse`, `CdnPurgeOutcome`, `CdnPurgeTarget`, `ClientAction`, `ClientActionArgs`, `ClientActionResult`, `ClientLoader`, `ClientLoaderArgs`, `ClientRequestBody`, `ClientRouteHooks`, `ClientRouter`, `ClientRouterOptions`, `CreateCspPolicyOptions`, `CreateNonceResolverOptions`, `CreateWebAppOptions`, `CspHeaderContext`, `CspPolicy`, `CssLoadingMode`, `DATA_GLOBAL`, `DATA_HEADER`, `DEFAULT_CSS_LOADING`, `DEFAULT_DEV_PORT`, `DRAFT_COOKIE`, `DataText`, `Deferred`, `DehydrateOptions`, `DehydratedQueryInfo`, `DehydratedState`, `DocumentParts`, `DraftCookieControls`, `DynamicBoundary`, `DynamicBoundaryBatch`, `EnableDraftOptions`, `FetchRouteData`, `Fetcher`, `FetcherState`, `FontDisplay`, `FontFace`, `FontPreloadInput`, `FontSource`, `GenerateClientEntryOptions`, `GenerateServerManifestOptions`, `GetStaticPaths`, `HANDOVER_ID`, `HostPolicy`, `HostPolicyOptions`, `HostPolicyRule`, `Href`, `HrefOptions`, `HtmlSanitizer`, `IDLE_BLOCKER`, `ISRApp`, `ISROptions`, `ISRPlatform`, `ISRQuery`, `ISRStoreOp`, `ISR_REVALIDATE_HEADER`, `ISR_REVALIDATE_TAGS_HEADER`, `ISR_STATUS_HEADER`, `IdentityEpochContext`, `InertScriptType`, `InfiniteData`, `InfiniteQueryHandle`, `InfiniteQueryOptions`, `InterceptBoundary`, `Intercepted`, `KVCacheStore`, `KVCacheStoreOptions`, `KVNamespaceLike`, `KeepAliveOptions`, `KeepAliveServerOptions`, `KeptPage`, `LAYOUT_DATA_GLOBAL`, `LOCALES_GLOBAL`, `LayoutEntry`, `LinkDescriptor`, `LiveClientEntry`, `Loader`, `LoaderContext`, `LoaderResponseControls`, `LoadingEntry`, `Manifest`, `MatchChain`, `MemoryCacheStore`, `MemoryCacheStoreOptions`, `MemoryStaticBoundaryCache`, `Meta`, `MetaArgs`, `MetaDescriptor`, `MetaInput`, `MiddlewareOutcome`, `MountRouterOptions`, `MutationCallbacks`, `MutationCancelledError`, `MutationContext`, `MutationHandle`, `MutationState`, `MutationStatus`, `NAV_FROM_HEADER`, `NavigateFunction`, `NavigateOptions`, `NonceContext`, `NonceGenerator`, `NonceHeader`, `NonceHeaderContext`, `NonceResolver`, `NotFoundEntry`, `NotFoundScope`, `OpenGraphInput`, `PREFETCH_HEADER`, `PRE_HYDRATION_GUARD`, `PageLocale`, `PageLocales`, `PendingBoundary`, `PrefetchMode`, `PrerenderedPageReaderOptions`, `PrerenderedPages`, `PreviewEndpointOptions`, `QueryClient`, `QueryClientOptions`, `QueryHandle`, `QueryOptions`, `QueryState`, `QueryStatus`, `REDIRECT_HEADER`, `RETAIN_HEADER`, `REVALIDATE_HEADER`, `ROOT_ATTRIBUTE`, `ROUTE_GLOBAL`, `RedirectOptions`, `RenderAdapter`, `RenderAdapterConformanceError`, `RenderAdapterConformanceFixture`, `RenderAssemblyCache`, `RenderPageInput`, `RenderPageOptions`, `RenderProps`, `RenderStreamOptions`, `RenderedPage`, `RevalidateEndpointOptions`, `RevalidateOptions`, `RevalidateResult`, `RevalidateTags`, `RevalidateTagsInput`, `RouteEntry`, `RouteMatch`, `RouteMiddleware`, `RouteModule`, `RoutePattern`, `RouteSlotName`, `RouteSlotPatternsOf`, `RouteSlotRegistry`, `RouteSlotTarget`, `RouteTable`, `RouterState`, `SERVER_FN_MODULE`, `STATUS_HEADER`, `SanitizedHtml`, `ScriptDescriptor`, `SearchOf`, `SharedBoundary`, `SharedHoleCtx`, `ShellCtx`, `ShouldRevalidate`, `ShouldRevalidateArgs`, `SsrModuleLoader`, `StaticBoundary`, `StaticBoundaryCache`, `StaticBoundaryImportEdge`, `StaticBoundaryRoot`, `StaticCtx`, `StaticPath`, `StaticPaths`, `StaticRoutes`, `StatusPageOptions`, `Submission`, `SubmitOptions`, `TrustedHtml`, `UIMatch`, `UnsafeScriptDescriptor`, `WebAppI18n`, `assertCssLoadingCompatible`, `assertRenderAdapterConformance`, `assertStaticBoundaryImports`, `boundaryDescriptors`, `boundaryModeKey`, `buildManifest`, `canonical`, `closeBoundary`, `createClientRouter`, `createCspPolicy`, `createHostPolicy`, `createMatcher`, `createMutation`, `createNonceResolver`, `createQueryClient`, `createWebApp`, `defer`, `disableDraft`, `enableDraft`, `enumerateStaticRoutes`, `filePathToPattern`, `filePathToPatterns`, `fontFace`, `fontPreload`, `generateClientEntry`, `generateServerManifest`, `getBrowserNavigate`, `gone`, `hashQueryKey`, `href`, `isCacheablePage`, `isDraftEnabled`, `isHostPolicy`, `jsonLd`, `localeOfProps`, `mergeHeads`, `nifraScriptHashes`, `normalizeCssLoading`, `notFound`, `openGraph`, `pageLocaleIn`, `prerenderedPageReader`, `previewEndpoint`, `rawHref`, `redirect`, `registerBlocker`, `renderPage`, `renderPageResult`, `resolveChainMeta`, `resolveDynamicBoundaries`, `resolveMeta`, `resolvePublicPath`, `resolveStaticBoundaries`, `revalidate`, `revalidateEndpoint`, `rotateIdentityEpoch`, `sanitizeHtml`, `sanitizedHtml`, `searchOf`, `searchOfChain`, `serializeData`, `serializeSearch`, `setBlockerController`, `setBrowserNavigate`, `setSsrModuleLoader`, `ssrModuleLoader`, `startDynamicBoundaries`, `statusPage`, `trustHtml`, `unsafeInlineScript`, `webProjectEvidence`, `withISR`
23437
+ `ACTION_GLOBAL`, `Action`, `BOUNDARY_GLOBAL`, `BackendOnly`, `Blocker`, `BlockerController`, `BlockerFunction`, `BlockerLocation`, `BlockerState`, `Boundary`, `BoundaryDescriptor`, `BoundaryError`, `BoundaryLoaderEntry`, `BoundaryLoadersOf`, `BoundaryMode`, `BoundaryRegistration`, `BoundaryRequestCtx`, `BoundaryState`, `BoundaryStates`, `BoundaryStatus`, `BrowserNavigate`, `BuildAssetSet`, `CacheStore`, `CachedResponse`, `CdnPurgeOutcome`, `CdnPurgeTarget`, `ClientAction`, `ClientActionArgs`, `ClientActionResult`, `ClientLoader`, `ClientLoaderArgs`, `ClientRequestBody`, `ClientRouteHooks`, `ClientRouter`, `ClientRouterOptions`, `CreateCspPolicyOptions`, `CreateNonceResolverOptions`, `CreateWebAppOptions`, `CspHeaderContext`, `CspPolicy`, `CssLoadingMode`, `DATA_GLOBAL`, `DATA_HEADER`, `DEFAULT_CSS_LOADING`, `DEFAULT_DEV_PORT`, `DRAFT_COOKIE`, `DataText`, `Deferred`, `DehydrateOptions`, `DehydratedQueryInfo`, `DehydratedState`, `DocumentParts`, `DraftCookieControls`, `DynamicBoundary`, `DynamicBoundaryBatch`, `EnableDraftOptions`, `FetchRouteData`, `Fetcher`, `FetcherState`, `FontDisplay`, `FontFace`, `FontPreloadInput`, `FontSource`, `GenerateClientEntryOptions`, `GenerateServerManifestOptions`, `GetStaticPaths`, `HANDOVER_ID`, `HostPolicy`, `HostPolicyOptions`, `HostPolicyRule`, `Href`, `HrefOptions`, `HrefRefusal`, `HtmlSanitizer`, `IDLE_BLOCKER`, `ISRApp`, `ISROptions`, `ISRPlatform`, `ISRQuery`, `ISRStoreOp`, `ISR_REVALIDATE_HEADER`, `ISR_REVALIDATE_TAGS_HEADER`, `ISR_STATUS_HEADER`, `IdentityEpochContext`, `InertScriptType`, `InfiniteData`, `InfiniteQueryHandle`, `InfiniteQueryOptions`, `InterceptBoundary`, `Intercepted`, `KVCacheStore`, `KVCacheStoreOptions`, `KVNamespaceLike`, `KeepAliveOptions`, `KeepAliveServerOptions`, `KeptPage`, `LAYOUT_DATA_GLOBAL`, `LOCALES_GLOBAL`, `LayoutEntry`, `LinkDescriptor`, `LiveClientEntry`, `Loader`, `LoaderContext`, `LoaderResponseControls`, `LoadingEntry`, `Manifest`, `MatchChain`, `MemoryCacheStore`, `MemoryCacheStoreOptions`, `MemoryStaticBoundaryCache`, `Meta`, `MetaArgs`, `MetaDescriptor`, `MetaInput`, `MiddlewareOutcome`, `MountRouterOptions`, `MutationCallbacks`, `MutationCancelledError`, `MutationContext`, `MutationHandle`, `MutationState`, `MutationStatus`, `NAV_FROM_HEADER`, `NavigateFunction`, `NavigateOptions`, `NonceContext`, `NonceGenerator`, `NonceHeader`, `NonceHeaderContext`, `NonceResolver`, `NotFoundEntry`, `NotFoundScope`, `OpenGraphInput`, `PREFETCH_HEADER`, `PRE_HYDRATION_GUARD`, `PageLocale`, `PageLocales`, `ParamsOfFrom`, `PendingBoundary`, `PlainKeyDefault`, `PlainQueryKey`, `PrefetchMode`, `PrerenderedPageReaderOptions`, `PrerenderedPages`, `PreviewEndpointOptions`, `QueryClient`, `QueryClientOptions`, `QueryHandle`, `QueryKey`, `QueryOptions`, `QueryState`, `QueryStatus`, `REDIRECT_HEADER`, `RETAIN_HEADER`, `REVALIDATE_HEADER`, `ROOT_ATTRIBUTE`, `ROUTE_GLOBAL`, `RedirectOptions`, `RenderAdapter`, `RenderAdapterConformanceError`, `RenderAdapterConformanceFixture`, `RenderAssemblyCache`, `RenderPageInput`, `RenderPageOptions`, `RenderProps`, `RenderStreamOptions`, `RenderedPage`, `RevalidateEndpointOptions`, `RevalidateOptions`, `RevalidateResult`, `RevalidateTags`, `RevalidateTagsInput`, `RouteEntry`, `RouteFrom`, `RouteMatch`, `RouteMiddleware`, `RouteModule`, `RouteParamsOf`, `RoutePattern`, `RouteSearchInOf`, `RouteSearchOf`, `RouteSlotName`, `RouteSlotPatternsOf`, `RouteSlotRegistry`, `RouteSlotTarget`, `RouteTable`, `RouteTablePattern`, `RouterState`, `SERVER_FN_MODULE`, `STATUS_HEADER`, `SanitizedHtml`, `ScriptDescriptor`, `SearchInputOf`, `SearchOf`, `SearchOfFrom`, `SharedBoundary`, `SharedHoleCtx`, `ShellCtx`, `ShouldRevalidate`, `ShouldRevalidateArgs`, `SsrModuleLoader`, `StaticBoundary`, `StaticBoundaryCache`, `StaticBoundaryImportEdge`, `StaticBoundaryRoot`, `StaticCtx`, `StaticPath`, `StaticPaths`, `StaticRoutes`, `StatusPageOptions`, `Submission`, `SubmitOptions`, `TrustedHtml`, `UIMatch`, `UnsafeScriptDescriptor`, `WebAppI18n`, `assertCssLoadingCompatible`, `assertRenderAdapterConformance`, `assertStaticBoundaryImports`, `boundaryDescriptors`, `boundaryModeKey`, `buildManifest`, `canonical`, `closeBoundary`, `createClientRouter`, `createCspPolicy`, `createHostPolicy`, `createMatcher`, `createMutation`, `createNonceResolver`, `createQueryClient`, `createWebApp`, `defer`, `disableDraft`, `enableDraft`, `enumerateStaticRoutes`, `filePathToPattern`, `filePathToPatterns`, `fontFace`, `fontPreload`, `generateClientEntry`, `generateServerManifest`, `getBrowserNavigate`, `gone`, `hashQueryKey`, `href`, `isCacheablePage`, `isDraftEnabled`, `isHostPolicy`, `isInertHref`, `jsonLd`, `localeOfProps`, `mergeHeads`, `nifraScriptHashes`, `normalizeCssLoading`, `notFound`, `onHrefRefused`, `openGraph`, `pageLocaleIn`, `prerenderedPageReader`, `previewEndpoint`, `queryKey`, `rawHref`, `redirect`, `registerBlocker`, `renderPage`, `renderPageResult`, `resolveChainMeta`, `resolveDynamicBoundaries`, `resolveMeta`, `resolvePublicPath`, `resolveStaticBoundaries`, `revalidate`, `revalidateEndpoint`, `rotateIdentityEpoch`, `sanitizeHtml`, `sanitizedHtml`, `searchOf`, `searchOfChain`, `serializeData`, `serializeSearch`, `setBlockerController`, `setBrowserNavigate`, `setSsrModuleLoader`, `ssrModuleLoader`, `startDynamicBoundaries`, `statusPage`, `trustHtml`, `unsafeInlineScript`, `webProjectEvidence`, `withISR`
22921
23438
 
22922
23439
  ## @nifrajs/web-preact
22923
23440