@nifrajs/cli 5.4.0 → 5.5.1

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 (113) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/README.md +2 -1
  3. package/dist/check-scan.d.ts +6 -0
  4. package/dist/check-scan.d.ts.map +1 -1
  5. package/dist/check-scan.js +10 -10
  6. package/dist/check-scan.js.map +1 -1
  7. package/dist/check.d.ts.map +1 -1
  8. package/dist/check.js +1 -0
  9. package/dist/check.js.map +1 -1
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +6 -5
  12. package/dist/cli.js.map +1 -1
  13. package/dist/docs-search.d.ts +10 -1
  14. package/dist/docs-search.d.ts.map +1 -1
  15. package/dist/docs-search.js +86 -9
  16. package/dist/docs-search.js.map +1 -1
  17. package/dist/doctor.d.ts.map +1 -1
  18. package/dist/doctor.js +49 -4
  19. package/dist/doctor.js.map +1 -1
  20. package/dist/internal/source-facts.d.ts +2 -1
  21. package/dist/internal/source-facts.d.ts.map +1 -1
  22. package/dist/internal/source-facts.js +17 -11
  23. package/dist/internal/source-facts.js.map +1 -1
  24. package/dist/load.d.ts +4 -1
  25. package/dist/load.d.ts.map +1 -1
  26. package/dist/load.js +8 -0
  27. package/dist/load.js.map +1 -1
  28. package/dist/lock-links.d.ts.map +1 -1
  29. package/dist/lock-links.js +3 -1
  30. package/dist/lock-links.js.map +1 -1
  31. package/dist/mcp-http.js +1 -1
  32. package/dist/recipes/5.4.0.d.ts.map +1 -1
  33. package/dist/recipes/5.4.0.js +2 -0
  34. package/dist/recipes/5.4.0.js.map +1 -1
  35. package/dist/recipes/5.5.0.d.ts +9 -0
  36. package/dist/recipes/5.5.0.d.ts.map +1 -0
  37. package/dist/recipes/5.5.0.js +31 -0
  38. package/dist/recipes/5.5.0.js.map +1 -0
  39. package/dist/recipes/index.d.ts +7 -0
  40. package/dist/recipes/index.d.ts.map +1 -1
  41. package/dist/recipes/index.js +2 -0
  42. package/dist/recipes/index.js.map +1 -1
  43. package/dist/release-verification.d.ts +20 -0
  44. package/dist/release-verification.d.ts.map +1 -1
  45. package/dist/release-verification.js +62 -13
  46. package/dist/release-verification.js.map +1 -1
  47. package/dist/review.d.ts.map +1 -1
  48. package/dist/review.js +2 -0
  49. package/dist/review.js.map +1 -1
  50. package/dist/rules/codes.d.ts +2 -0
  51. package/dist/rules/codes.d.ts.map +1 -1
  52. package/dist/rules/codes.js +2 -0
  53. package/dist/rules/codes.js.map +1 -1
  54. package/dist/rules/explanations.d.ts.map +1 -1
  55. package/dist/rules/explanations.js +12 -2
  56. package/dist/rules/explanations.js.map +1 -1
  57. package/dist/rules/legacy.d.ts.map +1 -1
  58. package/dist/rules/legacy.js +63 -19
  59. package/dist/rules/legacy.js.map +1 -1
  60. package/dist/rules/security.d.ts +6 -0
  61. package/dist/rules/security.d.ts.map +1 -1
  62. package/dist/rules/security.js +152 -2
  63. package/dist/rules/security.js.map +1 -1
  64. package/dist/rules/zones.d.ts.map +1 -1
  65. package/dist/rules/zones.js +43 -1
  66. package/dist/rules/zones.js.map +1 -1
  67. package/dist/smoke.d.ts +17 -1
  68. package/dist/smoke.d.ts.map +1 -1
  69. package/dist/smoke.js +49 -0
  70. package/dist/smoke.js.map +1 -1
  71. package/dist/upgrade.d.ts +40 -12
  72. package/dist/upgrade.d.ts.map +1 -1
  73. package/dist/upgrade.js +182 -17
  74. package/dist/upgrade.js.map +1 -1
  75. package/dist/verification-plan.d.ts +4 -0
  76. package/dist/verification-plan.d.ts.map +1 -1
  77. package/dist/verification-plan.js +48 -0
  78. package/dist/verification-plan.js.map +1 -1
  79. package/dist/version-drift.d.ts +2 -1
  80. package/dist/version-drift.d.ts.map +1 -1
  81. package/dist/version-drift.js +11 -26
  82. package/dist/version-drift.js.map +1 -1
  83. package/dist/web-app-options.d.ts +1 -1
  84. package/dist/web-app-options.d.ts.map +1 -1
  85. package/dist/web-app-options.js.map +1 -1
  86. package/docs/examples.json +14 -2
  87. package/docs/llms-full.txt +371 -43
  88. package/docs/types.json +173 -49
  89. package/package.json +11 -11
  90. package/src/check-scan.ts +10 -12
  91. package/src/check.ts +1 -0
  92. package/src/cli.ts +6 -5
  93. package/src/docs-search.ts +90 -10
  94. package/src/doctor.ts +60 -4
  95. package/src/internal/source-facts.ts +27 -13
  96. package/src/load.ts +13 -0
  97. package/src/lock-links.ts +3 -1
  98. package/src/mcp-http.ts +1 -1
  99. package/src/recipes/5.4.0.ts +2 -0
  100. package/src/recipes/5.5.0.ts +32 -0
  101. package/src/recipes/index.ts +9 -0
  102. package/src/release-verification.ts +88 -12
  103. package/src/review.ts +2 -0
  104. package/src/rules/codes.ts +2 -0
  105. package/src/rules/explanations.ts +12 -2
  106. package/src/rules/legacy.ts +75 -20
  107. package/src/rules/security.ts +171 -2
  108. package/src/rules/zones.ts +44 -1
  109. package/src/smoke.ts +70 -0
  110. package/src/upgrade.ts +199 -21
  111. package/src/verification-plan.ts +51 -0
  112. package/src/version-drift.ts +18 -26
  113. package/src/web-app-options.ts +1 -0
@@ -236,14 +236,14 @@ to full-stack later without a rewrite.
236
236
  **Throughput - the realistic case.** Router micro-benchmarks flatter Hono (a single compiled
237
237
  regex), but a real request also pays for middleware and validation,
238
238
  context, and serialization. In the current matrix Nifra runs **level with Elysia on Bun** -
239
- 101% of Elysia on `GET /users/:id` and
240
- 101% on the validated `POST` - and
241
- **level with Fastify on Node** (98% of Fastify on GET,
242
- 101% on the validated `POST`), with Elysia, Hono,
243
- and Express behind. On **Deno** it runs at 97% of Elysia on
244
- GET and 114% on the validated `POST`. In the realistic shape (security headers + CORS +
239
+ 100% of Elysia on `GET /users/:id` and
240
+ 102% on the validated `POST` - and
241
+ **level with Fastify on Node** (102% of Fastify on GET,
242
+ 99% on the validated `POST`), with Elysia, Hono,
243
+ and Express behind. On **Deno** it runs at 98% of Elysia on
244
+ GET and 118% on the validated `POST`. In the realistic shape (security headers + CORS +
245
245
  bearer auth + cookies + validated query/body + a ~2.4 KB JSON response, measured with
246
- `oha`) Nifra runs at **98% of Elysia on GET and 99% on POST**. Treat benchmark
246
+ `oha`) Nifra runs at **104% of Elysia on GET and 104% on POST**. Treat benchmark
247
247
  rows as same-run evidence, not a permanent law of nature.
248
248
 
249
249
  -
@@ -955,7 +955,7 @@ Check the value in the page's loader.
955
955
  ### Several methods, custom methods (all, method)
956
956
 
957
957
  `all()` registers one handler under every standard method, and `method()`
958
- under the method or methods you name, including one outside the standard seven. Both come
958
+ under the method or methods you name, including one outside the standard ones. Both come
959
959
  from `@nifrajs/core/methods` and are applied with `use()`:
960
960
 
961
961
  ```ts
@@ -963,9 +963,9 @@ import { server } from "@nifrajs/core/server"
963
963
  import { all, method } from "@nifrajs/core/methods"
964
964
 
965
965
  export const app = server()
966
- // GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS /echo
966
+ // GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS and QUERY /echo
967
967
  .use(all("/echo", (c) => ({ method: c.req.method })))
968
- // A method outside the standard seven
968
+ // A method outside the standard ones
969
969
  .use(method("PURGE", "/cache/:key", (c) => ({ purged: c.params.key })))
970
970
  // A list of methods, one handler
971
971
  .use(method(["GET", "POST"], "/search", (c) => ({ q: c.query.get("q") })))
@@ -978,7 +978,7 @@ registered for that method and path. One call is one registration: if any of its
978
978
  refused, none is added.
979
979
 
980
980
  -
981
- **There is no catch-all.** `all()` is the seven standard methods, and a
981
+ **There is no catch-all.** `all()` is the eight standard methods, and a
982
982
  request with any other method is still a `405` with an `Allow`
983
983
  header. To hand every request under a path to another handler whatever its method, use
984
984
  `mount()`.
@@ -1001,6 +1001,48 @@ route is under a method it lists. `securityBaseline()` holds a custom method to
1001
1001
  its mutation rules, CSRF included, and `csrf()` publishes its evidence for one.
1002
1002
  Left unmatched, a route is reported as `unclassified-route`.
1003
1003
 
1004
+ #### QUERY
1005
+
1006
+ `QUERY` is a read like `GET` that carries its input in the body, for a
1007
+ filter too large or too structured for a URL. It is a standard method without a builder of
1008
+ its own: `method("QUERY", ...)` registers it, the route is typed and validates a
1009
+ `body` schema, and `all()` includes it. The typed client calls it as
1010
+ `$query(body)`, so a route segment named `query` stays an ordinary path,
1011
+ and retries it like the other idempotent methods.
1012
+
1013
+ ```ts
1014
+ import { client } from "@nifrajs/client"
1015
+ import { server } from "@nifrajs/core/server"
1016
+ import { method } from "@nifrajs/core/methods"
1017
+ import { t } from "@nifrajs/schema"
1018
+
1019
+ // QUERY: a safe, repeatable read whose filter travels in the body instead of the URL.
1020
+ export const app = server().use(
1021
+ method("QUERY", "/books", { body: t.object({ author: t.string() }) }, (c) => ({
1022
+ author: c.body.author,
1023
+ })),
1024
+ )
1025
+
1026
+ const api = client<typeof app>("https://api.example.com")
1027
+ const found = await api.books.$query({ author: "Le Guin" }) // the body is checked against the schema
1028
+ ```
1029
+
1030
+ -
1031
+ **OpenAPI:** a `toOpenAPI(app, { openapiVersion: "3.2.0" })` document
1032
+ lists it as the path item's `query` operation. OpenAPI 3.1 has no field for it,
1033
+ so a 3.1 document leaves the route out.
1034
+
1035
+ -
1036
+ **Middleware:** `csrf()` lets it through without a token, since a cross-site
1037
+ page cannot send one: a form has no such method, and a cross-origin `fetch` must
1038
+ pass a CORS preflight first. `cors()` advertises it, `bodyLimit()`
1039
+ bounds its body, and `securityBaseline()` holds it to the read rules.
1040
+
1041
+ -
1042
+ **Runtimes:** Bun, Node, Deno and workerd accept it. On Bun it is served by the portable
1043
+ router, since Bun's route table has no slot for it. The compact server from
1044
+ `@nifrajs/edge` has no way to register it.
1045
+
1004
1046
  Whether a custom method reaches the app is up to the runtime's HTTP parser.
1005
1047
  `PROPFIND`, `REPORT`, `PURGE` and `QUERY` arrive on
1006
1048
  Bun, Node, Deno and workerd. A token the parser does not know is answered by the runtime
@@ -3181,6 +3223,13 @@ normal response path, so the body is serialized with its content-type, and decla
3181
3223
  `responseHeaders` and every `onResponse` hook apply to it. A hand-built
3182
3224
  `Response` still works.
3183
3225
 
3226
+ An `onRequest` hook that throws or rejects (a rate-limit store that is down, say)
3227
+ fails the request the way a handler error does. Every `onError` the app
3228
+ registered sees it, in order, with a context that has no route params; the first answer is
3229
+ sent. When none answers, the error is logged and the client gets the default
3230
+ `500`. A thrown `Response` or `status()` value is sent as
3231
+ if returned.
3232
+
3184
3233
  #### Which hooks run where
3185
3234
 
3186
3235
  Where a hook is registered decides which requests it sees. `nifra routes --hooks`
@@ -4849,8 +4898,16 @@ rewritten onto, or set `trustHost` when a proxy you control fixes the host. Give
4849
4898
  `createSessions` signs the cookie (HMAC, verified constant-time) and always marks it
4850
4899
  `HttpOnly`. In **store mode** the cookie is just an opaque id and the data lives in
4851
4900
  a `SessionStore`; in **cookie mode** (no store) the data is signed into the cookie.
4852
- Stores mirror the ISR discipline: `MemorySessionStore` is prod-guarded;
4853
- `KVSessionStore` is the durable, shared production store.
4901
+ `MemorySessionStore` is prod-guarded. Production store mode needs a strongly
4902
+ consistent shared `SessionStore`, such as a transactional adapter or Durable Object.
4903
+ Every instance must observe completed writes and deletes, including revocation markers.
4904
+
4905
+ `createSessions` refuses `KVSessionStore` and any adapter declaring
4906
+ `consistency: "eventual"`. Workers KV can serve stale sessions and missing logout
4907
+ markers, allowing a revoked session to be restored. Migrate existing KV-backed sessions to a
4908
+ strongly consistent store; the KV adapter remains exported for reading legacy records.
4909
+ Custom adapters may declare `consistency: "strong"`; omitting it asserts the same
4910
+ contract. Disabling rolling renewal does not make eventually consistent logout safe.
4854
4911
 
4855
4912
  The signature covers the cookie name, so two managers that share a secret never read each
4856
4913
  other's cookies; still, give sessions a secret no other signed value uses. A cookie-mode
@@ -4868,8 +4925,8 @@ import { createSessions, MemorySessionStore } from "@nifrajs/auth"
4868
4925
 
4869
4926
  let manager: ReturnType<typeof createSessions> | undefined
4870
4927
  export const getSessions = () => (manager ??= createSessions({
4871
- secret: process.env.SESSION_SECRET!, // ≥ 16 chars; rotating it invalidates all sessions
4872
- store: new MemorySessionStore(), // prod: new KVSessionStore(env.SESSIONS)
4928
+ secret: process.env.SESSION_SECRET!, // at least 32 bytes; never reuse another signing secret
4929
+ store: new MemorySessionStore(), // production: a strongly consistent shared SessionStore
4873
4930
  // cookie: { secure: false }, // local http dev only
4874
4931
  }))
4875
4932
  ```
@@ -6067,14 +6124,16 @@ Inbound frames arrive raw (`string | Uint8Array`) by default. Add a
6067
6124
  [Standard Schema](https://standardschema.dev) (`t`, zod, valibot) - and
6068
6125
  Nifra parses each frame as JSON, validates it, and hands `message` the typed
6069
6126
  value; anything that fails goes to `onInvalidMessage` instead (so a malformed
6070
- frame can never reach your handler).
6127
+ frame can never reach your handler). `nifra check` reports
6128
+ `NF-S009` (info) for a route whose `message` calls
6129
+ `JSON.parse` itself with no `messageSchema`.
6071
6130
 
6072
6131
  ```ts
6073
6132
  // doc-check: skip - illustrative: validated inbound frames on an existing app.
6074
6133
  import { t } from "@nifrajs/schema"
6075
6134
 
6076
6135
  app.ws("/chat", {
6077
- messageSchema: t.Object({ kind: t.Literal("say"), text: t.String({ maxLength: 500 }) }),
6136
+ messageSchema: t.object({ kind: t.literal("say"), text: t.string({ maxLength: 500 }) }),
6078
6137
  message(ws, msg) {
6079
6138
  // msg is typed { kind: "say"; text: string } - already parsed + validated.
6080
6139
  app.publish("room", msg.text)
@@ -6099,7 +6158,7 @@ contract check for your own output, not an inbound security boundary; the flag r
6099
6158
  import { t } from "@nifrajs/schema"
6100
6159
 
6101
6160
  app.ws("/events", {
6102
- sendSchema: t.Object({ kind: t.Literal("ready"), id: t.String() }),
6161
+ sendSchema: t.object({ kind: t.literal("ready"), id: t.string() }),
6103
6162
  validateSend: true, // opt in; default remains type-level only
6104
6163
  open(ws) {
6105
6164
  ws.send(JSON.stringify({ kind: "ready", id: "evt-1" }))
@@ -6107,6 +6166,114 @@ app.ws("/events", {
6107
6166
  })
6108
6167
  ```
6109
6168
 
6169
+ ### Typed messages, end to end
6170
+
6171
+ Put both schemas in a module the server and the client import, each a
6172
+ `t.union` discriminated on a literal `type`. The server's
6173
+ `message` then switches over what the client sent, and the typed client's
6174
+ `.ws()` handle types `send` from `messageSchema` and every
6175
+ received frame from `sendSchema`. A `default` branch that assigns the
6176
+ frame to `never` turns a new server frame into a compile error on the client
6177
+ instead of a silently ignored message.
6178
+
6179
+ The client types received frames but does not check them unless asked: pass the
6180
+ route's `sendSchema` as `validateReceive` (the typed client
6181
+ carries the contract's types, not its schemas, so the schema is the import). A frame
6182
+ that fails is not delivered; `onError` gets a `TypeError` naming the
6183
+ issues, with the frame as its `cause`. Frames keep their arrival order, an async
6184
+ schema included.
6185
+
6186
+ ```ts
6187
+ import { client } from "@nifrajs/client"
6188
+ import { type InferOutput, server } from "@nifrajs/core/server"
6189
+ import { websocket } from "@nifrajs/core/ws"
6190
+ import { t } from "@nifrajs/schema"
6191
+
6192
+ // The contract, in a module both sides import: one discriminated union per direction.
6193
+ export const ChatIn = t.union([
6194
+ t.object({ type: t.literal("say"), text: t.string({ maxLength: 500 }) }),
6195
+ t.object({ type: t.literal("pong"), id: t.integer() }),
6196
+ ])
6197
+ export const ChatOut = t.union([
6198
+ t.object({ type: t.literal("said"), from: t.string(), text: t.string() }),
6199
+ t.object({ type: t.literal("ping"), id: t.integer() }),
6200
+ ])
6201
+ type ChatFrame = InferOutput<typeof ChatOut>
6202
+
6203
+ const frame = (value: ChatFrame): string => JSON.stringify(value)
6204
+
6205
+ // Server: a ping every 30 s; a connection that leaves two unanswered is closed.
6206
+ const app = server()
6207
+ .use(websocket())
6208
+ .ws("/chat", {
6209
+ messageSchema: ChatIn,
6210
+ sendSchema: ChatOut,
6211
+ upgrade: (c) => ({
6212
+ user: c.cookies.user ?? "guest",
6213
+ sent: 0,
6214
+ unanswered: 0,
6215
+ timer: undefined as ReturnType<typeof setInterval> | undefined,
6216
+ }),
6217
+ open(ws) {
6218
+ ws.subscribe("room")
6219
+ ws.data.timer = setInterval(() => {
6220
+ if (ws.data.unanswered >= 2) return ws.close(4000, "heartbeat timeout")
6221
+ ws.data.unanswered += 1
6222
+ ws.data.sent += 1
6223
+ ws.send(frame({ type: "ping", id: ws.data.sent }))
6224
+ }, 30_000)
6225
+ },
6226
+ message(ws, msg) {
6227
+ switch (msg.type) {
6228
+ case "say":
6229
+ app.publish("room", frame({ type: "said", from: ws.data.user, text: msg.text }))
6230
+ break
6231
+ case "pong":
6232
+ // Only an answer to a ping still outstanding counts, not any id the client makes up.
6233
+ if (msg.id > ws.data.sent - ws.data.unanswered && msg.id <= ws.data.sent) {
6234
+ ws.data.unanswered = 0
6235
+ }
6236
+ break
6237
+ }
6238
+ },
6239
+ close: (ws) => clearInterval(ws.data.timer),
6240
+ })
6241
+
6242
+ // Client: frames are typed from sendSchema, and checked against it with validateReceive.
6243
+ export async function joinChat(baseUrl: string): Promise<void> {
6244
+ const chat = client<typeof app>(baseUrl).chat.ws({
6245
+ validateReceive: ChatOut,
6246
+ onError: (error) => console.warn(error),
6247
+ })
6248
+ for await (const msg of chat.messages()) {
6249
+ switch (msg.type) {
6250
+ case "said":
6251
+ console.log(`${msg.from}: ${msg.text}`)
6252
+ break
6253
+ case "ping":
6254
+ chat.send({ type: "pong", id: msg.id }) // a frame the client must answer
6255
+ break
6256
+ default: {
6257
+ const unhandled: never = msg // a new ChatOut variant fails to compile here
6258
+ throw new Error(`unhandled frame ${JSON.stringify(unhandled)}`)
6259
+ }
6260
+ }
6261
+ }
6262
+ }
6263
+ ```
6264
+
6265
+ ### Frames the client must answer (heartbeats)
6266
+
6267
+ A server heartbeat that the application can see is an ordinary frame in the contract: a
6268
+ `ping` variant in `sendSchema` and a `pong` variant in
6269
+ `messageSchema`. The client answers it from the same switch that handles every
6270
+ other frame, so the answer is typed and the exhaustiveness check covers it; the server
6271
+ counts unanswered pings in `ws.data`, takes a `pong` only for a ping
6272
+ still outstanding, and closes a connection that stops answering, as above. Clear the timer in `close`. WebSocket protocol pings (the
6273
+ runtime's own keep-alive) are answered by the socket itself and never reach
6274
+ `messages()`; use them to keep a connection open through proxies, and a frame
6275
+ in the contract when the server needs to know the client is still running.
6276
+
6110
6277
  ### Pub/sub - app.publish
6111
6278
 
6112
6279
  `ws.subscribe(topic)` joins a topic; `app.publish(topic, data)`
@@ -6184,7 +6351,10 @@ npm i ws
6184
6351
 
6185
6352
  `server({ wsMaxPayloadBytes })` caps one inbound message (default
6186
6353
  `maxBodyBytes`, 1 MB): a socket that sends more is closed with `1009`
6187
- and the message never reaches your handler. Bun and Node refuse it while it arrives. Deno's
6354
+ and the message never reaches your handler. Bun and Node refuse it while it arrives. When a
6355
+ message passes Bun's own frame limit (the largest cap on the listener, below), Bun drops the
6356
+ connection without a close frame, so the client sees `1006`; your
6357
+ `close` handler still gets `1009`, as on every other runtime. Deno's
6188
6358
  `Deno.upgradeWebSocket` takes no size limit, so Deno receives each message whole
6189
6359
  (up to its own limit, 64 MiB on Deno 2.9) before nifra can check it: the cap still keeps the
6190
6360
  message from your handler, but it does not bound the memory Deno spent receiving it. Where that
@@ -6429,9 +6599,12 @@ On Cloudflare/Vercel the platform serves assets, so you don't need it there.
6429
6599
  Every file under the mount is cached as immutable by default. If the directory also holds
6430
6600
  files that keep their name across deploys, pass the build manifest's `assets` as
6431
6601
  `hashedFiles`: only those URL paths stay immutable, and every other file is sent
6432
- with its validators so the browser revalidates it, plus `cacheControl` when you
6433
- set one. Its `ETag` comes from its bytes, so a deploy that keeps timestamps (a
6434
- container image, `rsync -a`, the Nix store) still revalidates a changed file. The server that `nifra build --target bun` or `node`
6602
+ with `cacheControl` when you set one. Files up to 256 KiB carry an `ETag`
6603
+ from the exact snapshot served, so a deploy that keeps timestamps still revalidates changed
6604
+ bytes. Larger files stream without an `ETag` and revalidate by
6605
+ `Last-Modified` once their last change has settled; ordinary ranges work, while
6606
+ an `If-Range` request gets the whole file. The server that
6607
+ `nifra build --target bun` or `node`
6435
6608
  generates does this already. It caches only the client build's own content-hashed outputs as
6436
6609
  immutable. A file copied from `public/`, even under `public/assets/`,
6437
6610
  gets a one-day policy.
@@ -6934,6 +7107,21 @@ the commands that move it to the target; upgrade those first, or pass
6934
7107
  targets with the notes of every release after the one you declare: what an app can observe
6935
7108
  changing on the way up.
6936
7109
 
7110
+ A release recipe names the packages its notes change. When none of them is one the project
7111
+ loads (every group package a `package.json` names, and what those depend on as
7112
+ installed), the list and the plan say so beside the release: no announced behaviour change
7113
+ for this project, with the packages it does change. A tool such as `@nifrajs/cli`
7114
+ counts when it is declared, without its own dependencies, since a release that changes what
7115
+ a tool does names the tool. A release without that list, or a declared package that is not
7116
+ installed, is never marked.
7117
+
7118
+ #### Releases and support
7119
+
7120
+ Behaviour changes ship in minor releases; fixes ship as patches of the latest version and
7121
+ change nothing an app relies on. Only the latest release is supported: security fixes and
7122
+ fixes for data loss ship as patches of it, so move to the latest with
7123
+ `nifra upgrade`. `SECURITY.md` lists the supported versions.
7124
+
6937
7125
  ### Scope
6938
7126
 
6939
7127
  `nifra build` defaults to a self-hosted Bun server. Use `--target node`,
@@ -8402,7 +8590,7 @@ the preflight never executes app code:
8402
8590
  {
8403
8591
  "name": "my-app",
8404
8592
  "dependencies": {
8405
- "react": "19.2.8",
8593
+ "react": "19.3.1",
8406
8594
  "@example/ui": "link:../design-system/packages/ui"
8407
8595
  },
8408
8596
  "nifra": {
@@ -8638,8 +8826,11 @@ Every `@nifrajs/*` package, `nifra` and `create-nifra` ship
8638
8826
  together at one version. `nifra doctor` (and `nifra check`, as the
8639
8827
  `NF-D002` advisory) reads the versions your `package.json` files pin,
8640
8828
  the versions installed in `node_modules` - followed to their real location, so a
8641
- linked repository reports its own - and the running CLI. When they disagree it names each
8642
- version and where it came from. It only reads files, and it never fails the run.
8829
+ linked repository reports its own - the copies a `link:` or `file:`
8830
+ repository outside the root installs in its own `node_modules` (its imports load
8831
+ those, whatever the workspace installs, so two live-linked repositories that each pin one
8832
+ version still run two), and the running CLI. When they disagree it names each version and
8833
+ where it came from. It only reads files, and it never fails the run.
8643
8834
 
8644
8835
  The fix is [`nifra upgrade <highest>`](/docs/cli#upgrade), not a
8645
8836
  hand edit of the pins: it runs
@@ -10088,6 +10279,91 @@ await serve(app, {
10088
10279
  })
10089
10280
  ```
10090
10281
 
10282
+ A build script that calls `buildServer` itself passes it the manifest
10283
+ `buildClient` returned. The generated `server-manifest` then exports
10284
+ `buildAssets` (a `Set` of every file the build emitted, by request path:
10285
+ the bundle and the copied `public/` files) and `isBuildAsset(pathname)`, so
10286
+ a hand-written static handler or gate can allow exactly the files that exist.
10287
+
10288
+ ```ts
10289
+ // doc-check: skip - fragment: a build script; the routes and entry paths are your app's.
10290
+ import { buildClient, buildServer } from "@nifrajs/web/build"
10291
+
10292
+ const client = await buildClient({ routesDir: "routes", outDir: "dist/assets", clientModule })
10293
+ // One option for the whole client build: entry, stylesheets, per-route CSS, copy chunks, and the
10294
+ // set of files it emitted. Forgetting `styles` used to ship unstyled pages; there is nothing to forget.
10295
+ await buildServer({ routesDir: "routes", serverEntry: "server.ts", outDir: ".build", target: "bun", client })
10296
+ ```
10297
+
10298
+ ### Hosts that serve part of the app
10299
+
10300
+ An app that also answers on domains other people point at it usually must not show all of
10301
+ itself there: such a domain should not render your sign-in page under its own certificate.
10302
+ `createHostPolicy` names, per host, the page routes it renders and the other paths
10303
+ it serves, and takes the build's own files by token, never by guessing their names. A gate that
10304
+ knows only page paths refuses the page's stylesheet and bundle, and the page answers 200 while
10305
+ rendering unstyled and never hydrating.
10306
+
10307
+ ```ts
10308
+ // doc-check: skip - fragment: adapter, manifest and build as above; ./server-manifest is generated by buildServer.
10309
+ import { createHostPolicy, createWebApp } from "@nifrajs/web"
10310
+ import { buildAssets } from "./server-manifest"
10311
+
10312
+ const ownHosts = new Set(["app.example.com", "localhost"])
10313
+
10314
+ // On every other host (a domain pointed at the app): the public pages, the API they call, and
10315
+ // exactly the files the build emitted. Nothing else renders there, the sign-in page included.
10316
+ export const hostPolicy = createHostPolicy({
10317
+ rules: [{
10318
+ hosts: (host) => !ownHosts.has(host),
10319
+ pages: ["/", "/p/:id", "/share/*"],
10320
+ paths: ["/api/public/*"],
10321
+ }],
10322
+ })
10323
+
10324
+ export const app = createWebApp({ adapter, manifest, clientEntry: build.entry, hostPolicy, buildAssets })
10325
+ ```
10326
+
10327
+ -
10328
+ **Order.** `createWebApp` checks the policy before everything it answers:
10329
+ `use` middleware, mounts, the API, prerendered pages and pages. A refused path
10330
+ gets a bare `404` with `cache-control: no-store`, or what
10331
+ `refuse` returns.
10332
+
10333
+ -
10334
+ **The build's files.** `buildAssets: true` (the default) serves on that host
10335
+ every file the build emitted. Set it to `false` and list files in
10336
+ `paths` to serve only some.
10337
+
10338
+ -
10339
+ **
10340
+ With `nifra build`.
10341
+ **
10342
+ Export `hostPolicy` from `backend/framework.ts`. The generated server
10343
+ entry passes it and `buildAssets` to `createWebApp`, and checks it
10344
+ before its own static files on Bun, Node and Deno, and before the Cloudflare worker's
10345
+ `ASSETS` fallback (the build then routes every file, the client bundle included,
10346
+ through the worker). Vercel serves files from its CDN before the function runs, so there the policy
10347
+ governs pages and the API only.
10348
+
10349
+ -
10350
+ **In development.** `nifra dev` serves the bundle and `public/`
10351
+ ahead of the app, so only pages and the API are checked there.
10352
+
10353
+ -
10354
+ **Soft navigations.** A client-side navigation fetches the page's data from the
10355
+ server, which applies the policy, so a refused page fails there as it would on a full load.
10356
+
10357
+ `nifra smoke` checks it end to end. For each entry in a fixture's `hosts`
10358
+ it renders the pages on that host, fetches every file they reference (scripts and their
10359
+ imports, stylesheets and their `url()`s, icons) on the same host and expects 200,
10360
+ then expects each `refused` path to answer 404.
10361
+
10362
+ ```ts
10363
+ // doc-check: skip - fragment: a nifra.smoke.ts fixture's hosts field.
10364
+ hosts: [{ id: "partner", host: "docs.partner.test", pages: ["/", "/p/demo"], refused: ["/login"] }]
10365
+ ```
10366
+
10091
10367
  ### A strict CSP on nifra's nonce
10092
10368
 
10093
10369
  Pass `createCspPolicy` as `csp` and nifra writes the
@@ -11704,8 +11980,8 @@ app.
11704
11980
 
11705
11981
  -
11706
11982
  **Much faster SSR** - the current dynamic-page snapshot reports Nifra at
11707
- 20× the throughput of Next.js, 7× Nuxt, and
11708
- 3.2× SvelteKit / 3.3× SolidStart, with a fraction
11983
+ 15× the throughput of Next.js, 7.2× Nuxt, and
11984
+ 3.9× SvelteKit / 2.2× SolidStart, with a fraction
11709
11985
  of the client JavaScript. See [benchmarks](/benchmarks).
11710
11986
 
11711
11987
  -
@@ -12489,6 +12765,15 @@ most specific entry decides: above, `src/ui/mailer.ts` is backend code in a
12489
12765
  frontend folder. One path listed under two sides is refused. Builds, dev servers,
12490
12766
  `nifra check` and the editor plugin all read this setting.
12491
12767
 
12768
+ `frontend/` and `backend/` keep their own rules, with one exception: a
12769
+ module there that both sides import can be declared shared where it lives, by a
12770
+ `shared` entry naming it or by a `.shared` suffix. The entry changes no
12771
+ import; the suffix renames the file. Either way the module is then held to the shared rules
12772
+ (it may import only shared code and packages, and read no private environment variable), so
12773
+ the declaration narrows what it may reach and never widens it. When backend code imports a
12774
+ frontend module, NF-C028 says whether that module can be shared as it is, or names the import
12775
+ or environment read that stops it.
12776
+
12492
12777
  A project that serves no pages has no browser, so the zones do not apply to it. Declare that
12493
12778
  in its `package.json` with `"nifra": { "kind": "api" }`:
12494
12779
  `nifra check` then skips the zone checks and the server-only import check there,
@@ -13986,6 +14271,38 @@ Part of the **[nifra](https://nifra.dev)** full-stack TypeScript framework - one
13986
14271
  bun add @nifrajs/auth
13987
14272
  ```
13988
14273
 
14274
+ ## Store revocation and rotation
14275
+
14276
+ Store mode requires strongly consistent reads: every instance must observe completed writes and
14277
+ deletes, including revocation markers. `createSessions` refuses adapters declaring
14278
+ `consistency: "eventual"`. `KVSessionStore` declares this and is no longer accepted: Workers KV can
14279
+ serve a cached session and a cached missing marker after logout, allowing renewal to restore it.
14280
+ Its export remains available for reading and migrating legacy records.
14281
+
14282
+ Use a strongly consistent shared `SessionStore`, for example a transactional adapter or a Durable
14283
+ Object, in production. `MemorySessionStore` remains suitable for development or an explicitly allowed
14284
+ single-instance deployment. Custom adapters may declare `consistency: "strong"`; omitting the
14285
+ declaration preserves compatibility but asserts the same strong-consistency contract. Wrapping or
14286
+ relabeling Workers KV does not make its reads strongly consistent. No eventual-consistency opt-in is
14287
+ provided, including when rolling renewal is disabled.
14288
+
14289
+ In store mode, `destroy` revokes the entire session family, including later IDs issued by
14290
+ `regenerate`. A cookie that a rotation has already replaced does this only for 60 seconds after
14291
+ the rotation, while the rotating response may still be on its way to the browser. After that,
14292
+ logging out with it drops only that superseded ID, so a kept pre-login cookie cannot end the
14293
+ session that replaced it. Rotated IDs remain opaque signed cookie values. Store adapters must retain
14294
+ `<id>.rotated` and `<family>.revoked` marker records until their `expiresAt`, including after the
14295
+ original session record is deleted. Do not interpret markers as sessions.
14296
+ For store adapters, the family is the session's original ID: a rotated ID has the form
14297
+ `<family>~<replacement>`, and repeated rotations keep that same family prefix.
14298
+
14299
+ Adapters may implement `SessionStore.rotate(previousId, nextId, record, marker)` atomically: refuse
14300
+ when the previous record is missing, rotated, or its family is revoked; otherwise write the rotation
14301
+ marker, delete the old record, and store the replacement in one transaction. Return whether it won.
14302
+ The built-in memory store implements this operation. Adapters with only `get`/`set`/`delete` keep
14303
+ logout markers separate from rotation markers and check family revocation after writing; concurrent
14304
+ rotations can produce multiple replacement IDs, all revoked by one logout of the family.
14305
+
13989
14306
  ## Docs
13990
14307
 
13991
14308
  - Reference: <https://nifra.dev/docs>
@@ -14365,7 +14682,8 @@ is the feedback plan and reports which release gates it omits. CI and release au
14365
14682
  consumer, publish, and cross-runtime gates. Each gate runs a `package.json` script (`bun run lint`,
14366
14683
  `bun run check:docs`, ...); a gate whose script the project does not declare is reported as
14367
14684
  `undeclared` and does not fail the run. The nifra repository's own `bun run verify` and
14368
- `bun run check:release` fail that gate instead, so a renamed script cannot drop it. Run `nifra port --ci --target <target>` for an app's
14685
+ `bun run check:release` fail that gate instead, so a renamed script cannot drop it. A line on stderr
14686
+ marks each gate as it starts and finishes, with its time. Run `nifra port --ci --target <target>` for an app's
14369
14687
  resolved deployment target; CI never guesses a target when none is configured.
14370
14688
 
14371
14689
  ## `nifra check` - the drift gate (run as "done")
@@ -14629,7 +14947,9 @@ for a repository you trust.
14629
14947
 
14630
14948
  `IsolatedExtensionWorker` is an opt-in process-backed crash-containment seam for
14631
14949
  extensions. It is not a hostile-code sandbox; use OS-level isolation before
14632
- loading code you do not trust.
14950
+ loading code you do not trust. `start()` rejects, and the worker is stopped, when the
14951
+ module exits before it is ready (a clean exit included) or is not ready within
14952
+ `startTimeoutMs` (default 30 s); `timeoutMs` bounds each tool call.
14633
14953
 
14634
14954
  `NifraBackend` is a small provider port for a future native backend. It accepts
14635
14955
  an injected model implementation and bounded tools without importing a provider
@@ -15685,7 +16005,9 @@ bind it, for example to show or hide the nested island.
15685
16005
 
15686
16006
  `signal(initial)` / `computed(fn)` / `effect(fn) → dispose` / `batch(fn)` - auto-tracking with
15687
16007
  per-run re-tracking, `Object.is` skips, synchronous updates; `batch` coalesces multiple writes
15688
- into one flush. A `computed` runs on first read and stops by itself once nothing reads it: the
16008
+ into one flush. Computeds settle before any effect runs, so an effect never sees one that lags its
16009
+ inputs. A write or batch runs each affected effect once; an effect runs again only when another
16010
+ effect writes one of its inputs during that flush, and its last run sees the settled values. A `computed` runs on first read and stops by itself once nothing reads it: the
15689
16011
  next change to its inputs stops it instead of recomputing, and reading it again computes it afresh.
15690
16012
  Every effect an island's setup creates stops when `mountIslands`' disposer unmounts it; one created
15691
16013
  outside an island runs until its disposer is called. Island-scale by design: if a widget outgrows this (lists, ownership trees,
@@ -16252,17 +16574,21 @@ the check there only makes it need repeated swaps. Mutable or attacker-writable
16252
16574
  therefore outside the adapter's guarantee on those platforms. Store user-controlled files outside the static root and serve them through
16253
16575
  an application or object-storage path with its own validation policy.
16254
16576
 
16255
- Every file carries `Accept-Ranges: bytes` and a strong `ETag` from its content: 128 bits of its
16256
- SHA-256, the same for the same bytes on every instance and on `servePublicDir`. A replacement that
16257
- keeps a file's size and timestamps - `cp -p`, `rsync -a`, tar, a container image layer,
16258
- SOURCE_DATE_EPOCH, the Nix store - still changes its tag. The tag is remembered per file version
16259
- (device, inode, size, mtime and ctime), so a known file costs no extra read; the first request for a
16260
- file reads it once (a file up to 256 KiB is then served from those bytes), and one changed in the last
16261
- 2 s is read again until its ctime settles. A file over 256 MiB is tagged by that identity instead of
16262
- its bytes: still strong, but different on each instance.
16577
+ Every file carries `Accept-Ranges: bytes`. A file up to 256 KiB is read whole and carries a strong
16578
+ `ETag` from exactly the bytes served: 128 bits of their SHA-256, the same for the same bytes on every
16579
+ instance and on `servePublicDir`. A replacement that keeps a file's size and timestamps still changes
16580
+ its tag. The tag is remembered per file version (device, inode, size, mtime and ctime): a file over
16581
+ 4 KiB reuses it without hashing when a second stat after the read shows the same version, and a
16582
+ `HEAD` or a `304` for that tag is answered from the stat without reading the file at all. A
16583
+ larger file streams without an automatic `ETag`, because an open file can be overwritten after any
16584
+ separate hash pass: an `If-Range` request for it gets the whole file, and an unguarded range still
16585
+ works. Explicit validator headers remain the caller's responsibility and must describe an immutable
16586
+ representation.
16263
16587
 
16264
16588
  `Last-Modified` is sent only while the file's mtime is the time of its own last change (it matches its
16265
- ctime), since a copy that keeps or normalizes mtimes gives a changed file the old date. Explicit
16589
+ ctime), since a copy that keeps or normalizes mtimes gives a changed file the old date. A streamed
16590
+ file is dated only once that change is more than 2 s old, so a write during the stream lands in a
16591
+ later second than the date it was sent with. Explicit
16266
16592
  validator headers still apply. `If-None-Match` takes precedence over `If-Modified-Since`; a matching
16267
16593
  condition gets a bodyless 304. `Range` on GET is parsed by a copy of `@nifrajs/core/range`, the parser
16268
16594
  `servePublicDir` uses, and gated by `If-Range`: it must name the file's strong tag, or its exact date
@@ -16927,6 +17253,8 @@ import { assertSafeKey, StorageKeyError } from "@nifrajs/storage"
16927
17253
  - `new MemoryStorage()` · `new FileStorage(root)` · `new R2Storage(bucket)`.
16928
17254
  - `put(key, data, { contentType?, metadata? })` - `data` is `Uint8Array | ArrayBuffer | string`.
16929
17255
  - `get(key)` → `{ body, size, contentType?, metadata? } | null` · `delete(key)` · `exists(key)` · `list({ prefix?, limit? })`.
17256
+ `FileStorage.list` reads and sorts each directory it enters, so even `limit: 1` costs time in
17257
+ proportion to those directories' entries; split a very large store across key prefixes.
16930
17258
  - `assertSafeKey(key)` / `StorageKeyError` · `toBytes(data)`.
16931
17259
  - `assertStorageAdapterConformance({ createAdapter })` - dependency-free executable adapter contract.
16932
17260
  - Optional interfaces: `PagedStorageAdapter` · `PresignableStorageAdapter` · `MovableStorageAdapter`.
@@ -17738,7 +18066,7 @@ done-gate, or `nifra mcp` to give the agent live project tools.
17738
18066
 
17739
18067
  ## @nifrajs/agent-app
17740
18068
 
17741
- `AGENT_APP_FEATURES`, `AgentAppClient`, `AgentAppClientOptions`, `AgentAppError`, `AgentEventView`, `AgentTransport`, `AgentTransportError`, `AgentTransportRequest`, `ApprovalRequiredView`, `ApprovalResolvedView`, `AssistantChunkView`, `AuthProvider`, `BoundaryDecisionResult`, `BoundaryItemView`, `BoundaryStateView`, `CommandOutcome`, `ContextUsageView`, `CreateSessionInput`, `EvalComparisonView`, `EvidenceTimelineView`, `ExtensionEventView`, `ExtensionReloadedView`, `FaultInjectionView`, `HandoffView`, `HttpAgentTransport`, `HttpAgentTransportOptions`, `MemoryCompactedView`, `OrderedEventBuffer`, `PendingApprovalView`, `PlanUpdatedView`, `ReasoningDeltaView`, `RegistryCapabilityView`, `RepairRequiredView`, `ReplayEntryView`, `ReplayResult`, `ResolveHandoffInput`, `ResumeInput`, `ReviewView`, `ReviewViewCheck`, `ReviewViewEvidence`, `ReviewViewFinding`, `ReviewViewStatus`, `RunStudioNodeState`, `RunStudioNodeView`, `RunStudioView`, `RunView`, `SessionFailedView`, `SessionLifecycleView`, `SessionStoppedView`, `SessionView`, `ToolCompletedView`, `ToolDeltaView`, `ToolStartedView`, `TurnStartedView`, `VerificationCompletedView`, `boundaryCommands`, `boundaryIsStale`, `parseEventStream`, `toEvalComparisonView`, `toEventView`, `toEvidenceTimelineView`, `toFaultInjectionViews`, `toHandoffView`, `toRegistryCapabilityView`, `toReviewView`, `toRunStudioView`, `toRunView`, `toSessionView`, `virtualizeEvidenceRows`
18069
+ `AGENT_APP_FEATURES`, `AgentAppClient`, `AgentAppClientOptions`, `AgentAppError`, `AgentEventView`, `AgentTransport`, `AgentTransportError`, `AgentTransportRequest`, `AgentTurnError`, `ApprovalRequiredView`, `ApprovalResolvedView`, `AssistantChunkView`, `AuthProvider`, `BoundaryDecisionResult`, `BoundaryItemView`, `BoundaryStateView`, `CommandOutcome`, `ContextUsageView`, `CreateSessionInput`, `EvalComparisonView`, `EvidenceTimelineView`, `ExtensionEventView`, `ExtensionReloadedView`, `FaultInjectionView`, `HandoffView`, `HttpAgentTransport`, `HttpAgentTransportOptions`, `MemoryCompactedView`, `OrderedEventBuffer`, `PendingApprovalView`, `PlanUpdatedView`, `ReasoningDeltaView`, `RegistryCapabilityView`, `RepairRequiredView`, `ReplayEntryView`, `ReplayResult`, `ResolveHandoffInput`, `ResumeInput`, `ReviewView`, `ReviewViewCheck`, `ReviewViewEvidence`, `ReviewViewFinding`, `ReviewViewStatus`, `RunStudioNodeState`, `RunStudioNodeView`, `RunStudioView`, `RunView`, `SessionFailedView`, `SessionLifecycleView`, `SessionStoppedView`, `SessionView`, `ToolCompletedView`, `ToolDeltaView`, `ToolStartedView`, `TurnStartedView`, `VerificationCompletedView`, `boundaryCommands`, `boundaryIsStale`, `parseEventStream`, `toEvalComparisonView`, `toEventView`, `toEvidenceTimelineView`, `toFaultInjectionViews`, `toHandoffView`, `toRegistryCapabilityView`, `toReviewView`, `toRunStudioView`, `toRunView`, `toSessionView`, `virtualizeEvidenceRows`
17742
18070
 
17743
18071
  ## @nifrajs/agent-protocol
17744
18072
 
@@ -17774,7 +18102,7 @@ done-gate, or `nifra mcp` to give the agent live project tools.
17774
18102
 
17775
18103
  ## @nifrajs/client
17776
18104
 
17777
- `ActionArgs`, `ActionData`, `ApiError`, `ApiProxy`, `ClientOptions`, `ClientRetryOptions`, `FetchFn`, `InProcessClient`, `InProcessClientOptions`, `InputOf`, `Jsonify`, `LoaderArgs`, `LoaderData`, `LoaderResponseControls`, `OutputOf`, `RESERVED_EXACT_KEYS`, `RESERVED_KEY_READOUT`, `RESERVED_VERB_KEYS`, `Register`, `RegisteredBackend`, `RegisteredEnv`, `RegistryOf`, `ResponseContractViolation`, `Result`, `RouteActionReturn`, `RouteLoaderArgs`, `RouteLoaderReturn`, `SearchSchemaOf`, `SubscribeOptions`, `Subscription`, `TestClientOptions`, `Treaty`, `TreatyFromRegistry`, `WsCallOptions`, `WsHandle`, `client`, `inProcessClient`, `reservedKeyFor`, `testClient`
18105
+ `ActionArgs`, `ActionData`, `ApiError`, `ApiProxy`, `ClientOptions`, `ClientRetryOptions`, `FetchFn`, `InProcessClient`, `InProcessClientOptions`, `InputOf`, `Jsonify`, `LoaderArgs`, `LoaderData`, `LoaderResponseControls`, `NAMESPACED_KEYS`, `OutputOf`, `RESERVED_EXACT_KEYS`, `RESERVED_KEY_READOUT`, `RESERVED_VERB_KEYS`, `Register`, `RegisteredBackend`, `RegisteredEnv`, `RegistryOf`, `ResponseContractViolation`, `Result`, `RouteActionReturn`, `RouteLoaderArgs`, `RouteLoaderReturn`, `SearchSchemaOf`, `SubscribeOptions`, `Subscription`, `TestClientOptions`, `Treaty`, `TreatyFromRegistry`, `WsCallOptions`, `WsHandle`, `client`, `inProcessClient`, `reservedKeyFor`, `testClient`
17778
18106
 
17779
18107
  ## @nifrajs/coding-agent
17780
18108
 
@@ -17894,11 +18222,11 @@ done-gate, or `nifra mcp` to give the agent live project tools.
17894
18222
 
17895
18223
  ## @nifrajs/uploads
17896
18224
 
17897
- `DETECTABLE_MIME_TYPES`, `FILE_TYPE_PREFIX_BYTES`, `FileType`, `ImageReencoder`, `SignDownloadUrlOptions`, `StripImageMetadataOptions`, `UploadResult`, `ValidateUploadOptions`, `detectFileType`, `signDownloadUrl`, `stripImageMetadata`, `validateUpload`, `verifyDownloadUrl`
18225
+ `DETECTABLE_MIME_TYPES`, `FILE_TYPE_PREFIX_BYTES`, `FileType`, `ImagePixelLimitError`, `ImageReencoder`, `SignDownloadUrlOptions`, `StripImageMetadataOptions`, `UploadResult`, `ValidateUploadOptions`, `detectFileType`, `signDownloadUrl`, `stripImageMetadata`, `validateUpload`, `verifyDownloadUrl`
17898
18226
 
17899
18227
  ## @nifrajs/web
17900
18228
 
17901
- `ACTION_GLOBAL`, `Action`, `BOUNDARY_GLOBAL`, `BackendOnly`, `Blocker`, `BlockerController`, `BlockerFunction`, `BlockerLocation`, `BlockerState`, `Boundary`, `BoundaryDescriptor`, `BoundaryError`, `BoundaryMode`, `BoundaryRegistration`, `BoundaryRequestCtx`, `BoundaryState`, `BoundaryStates`, `BoundaryStatus`, `BrowserNavigate`, `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`, `Deferred`, `DehydratedState`, `DocumentParts`, `DraftCookieControls`, `DynamicBoundary`, `DynamicBoundaryBatch`, `EnableDraftOptions`, `FetchRouteData`, `Fetcher`, `FetcherState`, `FontDisplay`, `FontFace`, `FontPreloadInput`, `FontSource`, `GenerateClientEntryOptions`, `GenerateRouteSearchTypesOptions`, `GenerateServerManifestOptions`, `GetStaticPaths`, `HANDOVER_ID`, `HtmlSanitizer`, `IDLE_BLOCKER`, `ISRApp`, `ISROptions`, `ISRPlatform`, `ISRQuery`, `ISRStoreOp`, `ISR_REVALIDATE_HEADER`, `ISR_REVALIDATE_TAGS_HEADER`, `ISR_STATUS_HEADER`, `InertScriptType`, `InfiniteData`, `InfiniteQueryHandle`, `InfiniteQueryOptions`, `InterceptBoundary`, `KVCacheStore`, `KVCacheStoreOptions`, `KVNamespaceLike`, `LAYOUT_DATA_GLOBAL`, `LOCALES_GLOBAL`, `LayoutEntry`, `LinkDescriptor`, `Loader`, `LoaderContext`, `LoaderResponseControls`, `LoadingEntry`, `Manifest`, `MatchChain`, `MemoryCacheStore`, `MemoryCacheStoreOptions`, `MemoryStaticBoundaryCache`, `Meta`, `MetaArgs`, `MetaDescriptor`, `MetaInput`, `MiddlewareOutcome`, `MountRouterOptions`, `MutationCallbacks`, `MutationHandle`, `MutationState`, `MutationStatus`, `NAV_FROM_HEADER`, `NavigateFunction`, `NavigateOptions`, `NavigateSearchOf`, `NavigateTargetInput`, `NonceContext`, `NonceGenerator`, `NonceHeader`, `NonceHeaderContext`, `NonceResolver`, `NotFoundEntry`, `NotFoundScope`, `OpenGraphInput`, `PRE_HYDRATION_GUARD`, `PageLocale`, `PageLocales`, `PendingBoundary`, `PrefetchMode`, `PrerenderedPageReaderOptions`, `PrerenderedPages`, `PreviewEndpointOptions`, `PublicDirCache`, `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`, `RevalidateResult`, `RevalidateTags`, `RevalidateTagsInput`, `RouteEntry`, `RouteMatch`, `RouteMiddleware`, `RouteModule`, `RoutePattern`, `RouteSearch`, `RouterState`, `SERVER_FN_MODULE`, `STATUS_HEADER`, `SanitizedHtml`, `ScriptDescriptor`, `SearchOf`, `ServePublicDirOptions`, `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`, `createClientRouter`, `createCspPolicy`, `createMatcher`, `createMutation`, `createNonceResolver`, `createQueryClient`, `createWebApp`, `defer`, `disableDraft`, `enableDraft`, `enumerateStaticRoutes`, `filePathToPattern`, `filePathToPatterns`, `fontFace`, `fontPreload`, `generateClientEntry`, `generateRouteSearchTypes`, `generateServerManifest`, `getBrowserNavigate`, `gone`, `hashQueryKey`, `isCacheablePage`, `isDraftEnabled`, `jsonLd`, `localeOfProps`, `mergeHeads`, `nifraScriptHashes`, `normalizeCssLoading`, `notFound`, `openGraph`, `pageLocaleIn`, `prerenderedPageReader`, `previewEndpoint`, `redirect`, `registerBlocker`, `renderPage`, `renderPageResult`, `resolveChainMeta`, `resolveDynamicBoundaries`, `resolveMeta`, `resolveNavigate`, `resolvePublicPath`, `resolveStaticBoundaries`, `revalidate`, `revalidateEndpoint`, `sanitizeHtml`, `sanitizedHtml`, `searchOf`, `searchOfChain`, `serializeData`, `serializeSearch`, `servePublicDir`, `setBlockerController`, `setBrowserNavigate`, `setSsrModuleLoader`, `ssrModuleLoader`, `startDynamicBoundaries`, `statusPage`, `trustHtml`, `unsafeInlineScript`, `webProjectEvidence`, `withISR`
18229
+ `ACTION_GLOBAL`, `Action`, `BOUNDARY_GLOBAL`, `BackendOnly`, `Blocker`, `BlockerController`, `BlockerFunction`, `BlockerLocation`, `BlockerState`, `Boundary`, `BoundaryDescriptor`, `BoundaryError`, `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`, `Deferred`, `DehydratedState`, `DocumentParts`, `DraftCookieControls`, `DynamicBoundary`, `DynamicBoundaryBatch`, `EnableDraftOptions`, `FetchRouteData`, `Fetcher`, `FetcherState`, `FontDisplay`, `FontFace`, `FontPreloadInput`, `FontSource`, `GenerateClientEntryOptions`, `GenerateRouteSearchTypesOptions`, `GenerateServerManifestOptions`, `GetStaticPaths`, `HANDOVER_ID`, `HostPolicy`, `HostPolicyOptions`, `HostPolicyRule`, `HtmlSanitizer`, `IDLE_BLOCKER`, `ISRApp`, `ISROptions`, `ISRPlatform`, `ISRQuery`, `ISRStoreOp`, `ISR_REVALIDATE_HEADER`, `ISR_REVALIDATE_TAGS_HEADER`, `ISR_STATUS_HEADER`, `InertScriptType`, `InfiniteData`, `InfiniteQueryHandle`, `InfiniteQueryOptions`, `InterceptBoundary`, `KVCacheStore`, `KVCacheStoreOptions`, `KVNamespaceLike`, `LAYOUT_DATA_GLOBAL`, `LOCALES_GLOBAL`, `LayoutEntry`, `LinkDescriptor`, `Loader`, `LoaderContext`, `LoaderResponseControls`, `LoadingEntry`, `Manifest`, `MatchChain`, `MemoryCacheStore`, `MemoryCacheStoreOptions`, `MemoryStaticBoundaryCache`, `Meta`, `MetaArgs`, `MetaDescriptor`, `MetaInput`, `MiddlewareOutcome`, `MountRouterOptions`, `MutationCallbacks`, `MutationHandle`, `MutationState`, `MutationStatus`, `NAV_FROM_HEADER`, `NavigateFunction`, `NavigateOptions`, `NavigateSearchOf`, `NavigateTargetInput`, `NonceContext`, `NonceGenerator`, `NonceHeader`, `NonceHeaderContext`, `NonceResolver`, `NotFoundEntry`, `NotFoundScope`, `OpenGraphInput`, `PRE_HYDRATION_GUARD`, `PageLocale`, `PageLocales`, `PendingBoundary`, `PrefetchMode`, `PrerenderedPageReaderOptions`, `PrerenderedPages`, `PreviewEndpointOptions`, `PublicDirCache`, `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`, `RevalidateResult`, `RevalidateTags`, `RevalidateTagsInput`, `RouteEntry`, `RouteMatch`, `RouteMiddleware`, `RouteModule`, `RoutePattern`, `RouteSearch`, `RouterState`, `SERVER_FN_MODULE`, `STATUS_HEADER`, `SanitizedHtml`, `ScriptDescriptor`, `SearchOf`, `ServePublicDirOptions`, `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`, `createClientRouter`, `createCspPolicy`, `createHostPolicy`, `createMatcher`, `createMutation`, `createNonceResolver`, `createQueryClient`, `createWebApp`, `defer`, `disableDraft`, `enableDraft`, `enumerateStaticRoutes`, `filePathToPattern`, `filePathToPatterns`, `fontFace`, `fontPreload`, `generateClientEntry`, `generateRouteSearchTypes`, `generateServerManifest`, `getBrowserNavigate`, `gone`, `hashQueryKey`, `isCacheablePage`, `isDraftEnabled`, `isHostPolicy`, `jsonLd`, `localeOfProps`, `mergeHeads`, `nifraScriptHashes`, `normalizeCssLoading`, `notFound`, `openGraph`, `pageLocaleIn`, `prerenderedPageReader`, `previewEndpoint`, `redirect`, `registerBlocker`, `renderPage`, `renderPageResult`, `resolveChainMeta`, `resolveDynamicBoundaries`, `resolveMeta`, `resolveNavigate`, `resolvePublicPath`, `resolveStaticBoundaries`, `revalidate`, `revalidateEndpoint`, `sanitizeHtml`, `sanitizedHtml`, `searchOf`, `searchOfChain`, `serializeData`, `serializeSearch`, `servePublicDir`, `setBlockerController`, `setBrowserNavigate`, `setSsrModuleLoader`, `ssrModuleLoader`, `startDynamicBoundaries`, `statusPage`, `trustHtml`, `unsafeInlineScript`, `webProjectEvidence`, `withISR`
17902
18230
 
17903
18231
  ## @nifrajs/web-preact
17904
18232