@nifrajs/cli 5.16.0 → 5.17.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.
- package/CHANGELOG.md +17 -0
- package/dist/cli.js +1 -1
- package/dist/mcp-http.js +1 -1
- package/dist/recipes/5.17.0.d.ts +10 -0
- package/dist/recipes/5.17.0.d.ts.map +1 -0
- package/dist/recipes/5.17.0.js +20 -0
- package/dist/recipes/5.17.0.js.map +1 -0
- package/dist/recipes/index.d.ts.map +1 -1
- package/dist/recipes/index.js +2 -0
- package/dist/recipes/index.js.map +1 -1
- package/docs/llms-full.txt +34 -17
- package/docs/types.json +27 -13
- package/package.json +12 -12
- package/src/cli.ts +1 -1
- package/src/mcp-http.ts +1 -1
- package/src/recipes/5.17.0.ts +28 -0
- package/src/recipes/index.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @nifrajs/cli
|
|
2
2
|
|
|
3
|
+
## 5.17.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [a6d0e89]
|
|
8
|
+
- @nifrajs/client@5.17.0
|
|
9
|
+
- @nifrajs/core@5.17.0
|
|
10
|
+
- @nifrajs/web@5.17.0
|
|
11
|
+
- @nifrajs/testing@5.17.0
|
|
12
|
+
- @nifrajs/i18n@5.17.0
|
|
13
|
+
- @nifrajs/mcp@5.17.0
|
|
14
|
+
- @nifrajs/schema@5.17.0
|
|
15
|
+
- @nifrajs/agent-review@5.17.0
|
|
16
|
+
- @nifrajs/mcp-db@5.17.0
|
|
17
|
+
- @nifrajs/runner@5.17.0
|
|
18
|
+
- @nifrajs/utils@5.17.0
|
|
19
|
+
|
|
3
20
|
## 5.16.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/dist/cli.js
CHANGED
|
@@ -307,7 +307,7 @@ set in the process environment is never overwritten by a file.
|
|
|
307
307
|
e.g. \`nifra check --env-file .env.local\`
|
|
308
308
|
|
|
309
309
|
${renderCommandCatalogHelp()}`;
|
|
310
|
-
const CLI_VERSION = "5.
|
|
310
|
+
const CLI_VERSION = "5.17.0";
|
|
311
311
|
const asAdapter = (v) => v;
|
|
312
312
|
const asBunPlugins = (v) => v;
|
|
313
313
|
const asComponentPlugins = (value) => value;
|
package/dist/mcp-http.js
CHANGED
|
@@ -7,7 +7,7 @@ import { docsTools } from "./mcp-docs-tools.js";
|
|
|
7
7
|
import { loadTypesCorpus } from "./types-search.js";
|
|
8
8
|
export { examplesAppTool, examplesWidget } from "./mcp-app-tool.js";
|
|
9
9
|
export { docsTools } from "./mcp-docs-tools.js";
|
|
10
|
-
const VERSION = "5.
|
|
10
|
+
const VERSION = "5.17.0";
|
|
11
11
|
const SERVER_INFO = { name: "nifra-docs", version: VERSION };
|
|
12
12
|
const docsHealth = (tools) => `nifra docs MCP - POST JSON-RPC 2.0 here (methods: initialize, tools/list, tools/call). Tools: ${tools
|
|
13
13
|
.map((tool) => tool.name)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { UpgradeRecipe } from "./index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Upgrade recipe for Nifra 5.17.
|
|
4
|
+
*
|
|
5
|
+
* No import or dependency moves and no source rewrites. The release bounds the memory that response
|
|
6
|
+
* caching, ISR, typed WebSockets, SSE and in-memory channels may hold, and checks cache eligibility
|
|
7
|
+
* against the final response. Each note names a limit or a contract an app can observe.
|
|
8
|
+
*/
|
|
9
|
+
export declare const recipe: UpgradeRecipe;
|
|
10
|
+
//# sourceMappingURL=5.17.0.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"5.17.0.d.ts","sourceRoot":"","sources":["../../src/recipes/5.17.0.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,EAAE,aAkBpB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const recipe = {
|
|
2
|
+
version: "5.17.0",
|
|
3
|
+
pins: [
|
|
4
|
+
{ match: "@nifrajs/", to: "5.17.0" },
|
|
5
|
+
{ match: "create-nifra", to: "5.17.0" },
|
|
6
|
+
{ match: "nifra", to: "5.17.0" },
|
|
7
|
+
],
|
|
8
|
+
importMoves: [],
|
|
9
|
+
sourceRewrites: [],
|
|
10
|
+
affects: ["@nifrajs/core", "@nifrajs/middleware", "@nifrajs/client", "@nifrajs/web"],
|
|
11
|
+
notes: [
|
|
12
|
+
"`cache()` stores a response only after every later hook has run, and checks it against the final response: a `private` or `no-store` policy, a `Set-Cookie`, or a `Vary` the key does not carry keeps it out of the shared cache. Server component owner routes bypass the generic cache before lookup. Entries written by an earlier version carry no `finalized` flag and count as misses, so the cache repopulates once after the upgrade. A custom `ResponseCacheStore` must keep `finalized` when it stores and returns an entry; a store that drops it never serves a hit.",
|
|
13
|
+
"`withISR` captures at most `maxEntryBytes` of a document (default 2 MiB). A larger page streams to the visitor without being cached, and a stored page over the limit is treated as a miss. `MemoryCacheStore` also takes `maxTotalBytes` (default 64 MiB, two bytes per UTF-16 code unit) and evicts the least recently used page past it. Raise either option when an app caches pages beyond those sizes.",
|
|
14
|
+
"The typed WebSocket client keeps at most `maxPendingMessages` frames (default 256) in `messages()` and in an async `validateReceive` queue. A consumer that falls that far behind ends its iteration and reports through `onError`; a full validation queue also closes the socket with code 4008. Pass a larger `maxPendingMessages` to a call whose consumer reads in bursts.",
|
|
15
|
+
"`stream.signal` of an `sse()` stream now aborts when the stream ends for any reason, including `stream.close()` and a failing producer (the error is the abort reason), not only when the client disconnects. A producer that unsubscribes in an abort listener is released on every path; code that assumed the signal meant a client disconnect should check `req.signal` instead.",
|
|
16
|
+
"`memoryChannelHub` enforces `maxChannels` when the last subscriber of a channel leaves, so an idle hub forgets the oldest inactive histories at once. A `resumeFrom` token for such a channel is refused with `ChannelResumeUnavailableError`, as it already was after a later publish.",
|
|
17
|
+
"`compression({ inlineMax })` gzips a buffered body of up to that many bytes on the calling thread, which measured faster than the thread pool when each core runs its own process. The default is unchanged.",
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=5.17.0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"5.17.0.js","sourceRoot":"","sources":["../../src/recipes/5.17.0.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,MAAM,GAAkB;IACnC,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE;QACJ,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE;QACpC,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,QAAQ,EAAE;QACvC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE;KACjC;IACD,WAAW,EAAE,EAAE;IACf,cAAc,EAAE,EAAE;IAClB,OAAO,EAAE,CAAC,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,cAAc,CAAC;IACpF,KAAK,EAAE;QACL,kjBAAkjB;QACljB,8YAA8Y;QAC9Y,iXAAiX;QACjX,sXAAsX;QACtX,yRAAyR;QACzR,8MAA8M;KAC/M;CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAyBH,0FAA0F;AAC1F,MAAM,WAAW,OAAO;IACtB,uEAAuE;IACvE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,mGAAmG;IACnG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CACpB;AAED,mGAAmG;AACnG,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,I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,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEpE;AAED,4CAA4C;AAC5C,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C"}
|
package/dist/recipes/index.js
CHANGED
|
@@ -19,6 +19,7 @@ import { recipe as v5_13_0 } from "./5.13.0.js";
|
|
|
19
19
|
import { recipe as v5_14_0 } from "./5.14.0.js";
|
|
20
20
|
import { recipe as v5_15_0 } from "./5.15.0.js";
|
|
21
21
|
import { recipe as v5_16_0 } from "./5.16.0.js";
|
|
22
|
+
import { recipe as v5_17_0 } from "./5.17.0.js";
|
|
22
23
|
const RECIPES = {
|
|
23
24
|
[v1_8_0.version]: v1_8_0,
|
|
24
25
|
[v2_0_0.version]: v2_0_0,
|
|
@@ -41,6 +42,7 @@ const RECIPES = {
|
|
|
41
42
|
[v5_14_0.version]: v5_14_0,
|
|
42
43
|
[v5_15_0.version]: v5_15_0,
|
|
43
44
|
[v5_16_0.version]: v5_16_0,
|
|
45
|
+
[v5_17_0.version]: v5_17_0,
|
|
44
46
|
};
|
|
45
47
|
export function getRecipe(version) {
|
|
46
48
|
return RECIPES[version];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,YAAY,CAAA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AC,CAAA;QACxC,IAAI,IAAI,KAAK,CAAC;YAAE,OAAO,IAAI,CAAA;IAC7B,CAAC;IACD,OAAO,CAAC,CAAA;AACV,CAAC"}
|
package/docs/llms-full.txt
CHANGED
|
@@ -299,14 +299,14 @@ to full-stack later without a rewrite.
|
|
|
299
299
|
**Throughput - the realistic case.** Router micro-benchmarks flatter Hono (a single compiled
|
|
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
|
-
|
|
303
|
-
|
|
304
|
-
**level with Fastify on Node** (
|
|
305
|
-
|
|
306
|
-
and Express behind. On **Deno** it runs at
|
|
307
|
-
GET and
|
|
302
|
+
99% of Elysia on `GET /users/:id` and
|
|
303
|
+
99% on the validated `POST` - and
|
|
304
|
+
**level with Fastify on Node** (104% of Fastify on GET,
|
|
305
|
+
101% on the validated `POST`), with Elysia, Hono,
|
|
306
|
+
and Express behind. On **Deno** it runs at 105% of Elysia on
|
|
307
|
+
GET and 125% 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 **
|
|
309
|
+
**Bun** with `oha`) Nifra runs at **109% of Elysia on GET and 109% on POST**. Treat benchmark
|
|
310
310
|
rows as same-run evidence, not a permanent law of nature.
|
|
311
311
|
|
|
312
312
|
-
|
|
@@ -2751,6 +2751,10 @@ broken. A store that also implements `fence()` keeps a purge that lands while a
|
|
|
2751
2751
|
page renders from being undone when that render stores the page it built from the old data;
|
|
2752
2752
|
both built-in stores do.
|
|
2753
2753
|
|
|
2754
|
+
ISR captures up to `maxEntryBytes` per document (2 MiB by default). Larger pages
|
|
2755
|
+
stream directly. `MemoryCacheStore` also has a `maxTotalBytes` budget
|
|
2756
|
+
for retained HTML (64 MiB by default) and evicts least-recently-used entries to stay within it.
|
|
2757
|
+
|
|
2754
2758
|
Workers KV is eventually consistent: a purge is usually seen at once where it was made and
|
|
2755
2759
|
reaches other locations as their copies expire, which Cloudflare puts at up to 60 seconds or
|
|
2756
2760
|
more. Until then those locations serve the old page. A page one of them rebuilt from the old
|
|
@@ -3541,6 +3545,9 @@ resolves, you call `stream.close()`, or the client disconnects (
|
|
|
3541
3545
|
`stream.signal`). It's a Web `ReadableStream` too, so it runs on Bun,
|
|
3542
3546
|
Node, Deno, and the edge - no `new Function`, no per-runtime API.
|
|
3543
3547
|
|
|
3548
|
+
Use `stream.signal` to release subscriptions when the stream ends, including
|
|
3549
|
+
when the producer closes the stream or fails.
|
|
3550
|
+
|
|
3544
3551
|
```ts
|
|
3545
3552
|
import { server } from "@nifrajs/core/server"
|
|
3546
3553
|
import { sse } from "@nifrajs/core/sse"
|
|
@@ -4542,9 +4549,11 @@ app.use(basicAuth({ username: "admin", password: process.env.PASS!, realm: "stag
|
|
|
4542
4549
|
### Response caching
|
|
4543
4550
|
|
|
4544
4551
|
`cache` is a full response cache with a pluggable store, `Vary`-aware keys,
|
|
4545
|
-
and a byte cap. It
|
|
4546
|
-
`Cache-Control`
|
|
4547
|
-
|
|
4552
|
+
and a byte cap. It checks the final response's `Set-Cookie`, `Vary`,
|
|
4553
|
+
and `Cache-Control` before storing an entry. Keep request gates that must run on
|
|
4554
|
+
hits before the cache. A custom store must retain the entire entry, including its
|
|
4555
|
+
`finalized` flag. Older entries without that flag miss.
|
|
4556
|
+
`MemoryResponseCache` is per-instance and refuses
|
|
4548
4557
|
`NODE_ENV=production` unless opted in - use a shared store in prod. `prettyJson`
|
|
4549
4558
|
pretty-prints JSON responses (capped, with an optional query toggle).
|
|
4550
4559
|
|
|
@@ -7646,6 +7655,10 @@ that fails is not delivered; `onError` gets a `TypeError` naming the
|
|
|
7646
7655
|
issues, with the frame as its `cause`. Frames keep their arrival order, an async
|
|
7647
7656
|
schema included.
|
|
7648
7657
|
|
|
7658
|
+
`maxPendingMessages` defaults to 256 per iterator and per validation queue.
|
|
7659
|
+
An iterator that falls behind ends and discards its buffered frames. If validation falls
|
|
7660
|
+
behind, the socket closes with code `4008`. Both report through `onError`.
|
|
7661
|
+
|
|
7649
7662
|
```ts
|
|
7650
7663
|
import { client } from "@nifrajs/client"
|
|
7651
7664
|
import { type InferOutput, server } from "@nifrajs/core/server"
|
|
@@ -8695,8 +8708,8 @@ starts from unless nothing else, installed or declared, names one.
|
|
|
8695
8708
|
|
|
8696
8709
|
```bash
|
|
8697
8710
|
nifra upgrade --list # the release targets this CLI knows
|
|
8698
|
-
nifra upgrade 5.
|
|
8699
|
-
nifra upgrade 5.
|
|
8711
|
+
nifra upgrade 5.17.0 # dry-run: every planned edit, nothing written
|
|
8712
|
+
nifra upgrade 5.17.0 --write # apply; it verifies with nifra check once the target is installed
|
|
8700
8713
|
# if pins were already bumped by hand, add --from <installed-version>
|
|
8701
8714
|
bun install # install the new pins
|
|
8702
8715
|
nifra check # verify against them
|
|
@@ -15123,7 +15136,7 @@ the command below, which runs every recipe since its installed version. The 5.6
|
|
|
15123
15136
|
its imports and dependencies; the follow-up changes below need a hand.
|
|
15124
15137
|
|
|
15125
15138
|
```sh
|
|
15126
|
-
nifra upgrade 5.
|
|
15139
|
+
nifra upgrade 5.17.0
|
|
15127
15140
|
```
|
|
15128
15141
|
|
|
15129
15142
|
-
|
|
@@ -15554,9 +15567,9 @@ Migrate a backend. For the full
|
|
|
15554
15567
|
rendering and route model, see Loaders & actions
|
|
15555
15568
|
and Routing.
|
|
15556
15569
|
|
|
15557
|
-
The current dynamic SSR snapshot reports Nifra at
|
|
15558
|
-
of Next.js,
|
|
15559
|
-
2.
|
|
15570
|
+
The current dynamic SSR snapshot reports Nifra at 29× the throughput
|
|
15571
|
+
of Next.js, 16× Nuxt, 6.1× SvelteKit, and
|
|
15572
|
+
2.3× SolidStart on the measured pages. See the
|
|
15560
15573
|
benchmark methodology and full results.
|
|
15561
15574
|
|
|
15562
15575
|
## Nifra - Migrate route by route
|
|
@@ -21428,6 +21441,10 @@ const app = server()
|
|
|
21428
21441
|
- **`combine()` / `namedCombine()`** - reusable runtime bundles for middleware/plugins.
|
|
21429
21442
|
- **`requestId()` / `logger()` / `etag()` / `compression()` / `cacheControl()` /
|
|
21430
21443
|
`idempotency()` / `healthcheck()` / `openapi()`** - additional operational middleware for APIs.
|
|
21444
|
+
- **`compression({ inlineMax })`** - on Node, gzip runs on the thread pool by default, which pays when a
|
|
21445
|
+
process has idle cores. With one process per core (a cluster, or `reusePort`), set `inlineMax` (bytes) to
|
|
21446
|
+
gzip buffered bodies up to that size on the calling thread; streamed bodies are unaffected. At 1 CPU
|
|
21447
|
+
per process on Node 26 (2-66 KB bodies) it measured 1.5-4x the pool's throughput.
|
|
21431
21448
|
|
|
21432
21449
|
## Header middleware: declared headers and `onResponseHeaders`
|
|
21433
21450
|
|
|
@@ -23310,7 +23327,7 @@ done-gate, or `nifra mcp` to give the agent live project tools.
|
|
|
23310
23327
|
|
|
23311
23328
|
## @nifrajs/core
|
|
23312
23329
|
|
|
23313
|
-
`AdmissionController`, `AdmissionDecision`, `AnyServer`, `AuthHeaders`, `AuthMaybePromise`, `AuthenticationFailure`, `AuthenticationFailureReason`, `AuthenticationInput`, `AuthenticationResult`, `AuthenticationStage`, `AuthenticationSuccess`, `Context`, `ContextPlugin`, `CookieOptions`, `CookieSecret`, `DeclaredMountRoute`, `DefinePluginResult`, `DurableObjectNamespaceLike`, `ExecutionContext`, `FRAMEWORK_NAME`, `FetchApp`, `FrameworkError`, `FrameworkName`, `Handler`, `IdentityPlugin`, `InferInput`, `InferOutput`, `JoinRoutePath`, `LambdaEvent`, `LambdaHandler`, `LambdaResponse`, `LambdaV1Event`, `LambdaV2Event`, `ListenTlsOptions`, `LogFields`, `Logger`, `METHODS`, `McpPromptDescriptor`, `McpResourceDescriptor`, `Method`, `Middleware`, `MountFetchOptions`, `MountOptions`, `MountableApp`, `NetlifyEvent`, `NetlifyHandler`, `NifraFeatureVersion`, `NifraPlugin`, `NifraWebSocket`, `NodeRequestContext`, `NodeRequestHook`, `NodeResponseBodyHook`, `NodeResponseContext`, `NodeResponseHook`, `NodeServeOutcome`, `OnRequestResult`, `OpaqueMountDeclaration`, `Params`, `PlainRender`, `Platform`, `PlatformResponse`, `PluginTypeCollapsed`, `PrefixRegistry`, `Prettify`, `PromptArgument`, `PromptMessage`, `ROUTE_PATTERN_OVERLAP_MAX_STATES`, `RedactOptions`, `Registry`, `RequestLocal`, `RequestPath`, `ResponseBodyHook`, `ResponseBodyReplacement`, `ResponseControls`, `ResponseFinalization`, `ResponseHeadersHook`, `ResponseHeadersView`, `ResponseMapFor`, `ResponseResult`, `RouteConfigError`, `RouteConfigErrorCode`, `RouteDescriptor`, `RouteInfo`, `RouteInfoFor`, `RouteMethod`, `RoutePatternOverlapLimitError`, `RouteSchema`, `Router`, `RouterMatch`, `RunningServer`, `SSEContext`, `SSEInit`, `SSEMessage`, `SSEStream`, `ScheduledController`, `ScheduledHandler`, `Server`, `ServerOptions`, `StandardIssue`, `StandardResult`, `StandardSchemaV1`, `StandardTypes`, `StandardWebSocket`, `StatusResponse`, `ToolAnnotations`, `TopicAdapter`, `TypedSSEStream`, `UrlParts`, `VERSION`, `ValidationOutcome`, `VercelHandler`, `Version`, `WebSocketContext`, `WebSocketData`, `WebSocketHandler`, `WebSocketUpgradeOutcome`, `authenticated`, `beforeHandler`, `carryRequestLocals`, `commonSecretPatterns`, `cookieNamePrefix`, `defineContextPlugin`, `defineIdentityPlugin`, `definePlugin`, `defineRouterPlugin`, `echoParam`, `hasDuplicateCookie`, `isAuthenticatedRequest`, `isSameOriginForm`, `isSameOriginPath`, `isSameOriginRequest`, `jsonLogger`, `markAuthenticatedRequest`, `parseCookies`, `pathnameOf`, `redactLogFields`, `rejected`, `replacedRequestOf`, `requestLocal`, `routePatternOverlap`, `routeTemplateOf`, `serializeCookie`, `server`, `signValue`, `silentLogger`, `staticResponse`, `status`, `toFetchHandler`, `toLambdaHandler`, `toNetlifyHandler`, `toVercelHandler`, `unsignValue`, `urlPartsOf`, `varyOn`, `writableResponse`
|
|
23330
|
+
`AdmissionController`, `AdmissionDecision`, `AnyServer`, `AuthHeaders`, `AuthMaybePromise`, `AuthenticationFailure`, `AuthenticationFailureReason`, `AuthenticationInput`, `AuthenticationResult`, `AuthenticationStage`, `AuthenticationSuccess`, `Context`, `ContextPlugin`, `CookieOptions`, `CookieSecret`, `DeclaredMountRoute`, `DefinePluginResult`, `DurableObjectNamespaceLike`, `ExecutionContext`, `FRAMEWORK_NAME`, `FetchApp`, `FrameworkError`, `FrameworkName`, `Handler`, `IdentityPlugin`, `InferInput`, `InferOutput`, `JoinRoutePath`, `LambdaEvent`, `LambdaHandler`, `LambdaResponse`, `LambdaV1Event`, `LambdaV2Event`, `ListenTlsOptions`, `LogFields`, `Logger`, `METHODS`, `McpPromptDescriptor`, `McpResourceDescriptor`, `Method`, `Middleware`, `MountFetchOptions`, `MountOptions`, `MountableApp`, `NetlifyEvent`, `NetlifyHandler`, `NifraFeatureVersion`, `NifraPlugin`, `NifraWebSocket`, `NodeRequestContext`, `NodeRequestHook`, `NodeResponseBodyHook`, `NodeResponseContext`, `NodeResponseHook`, `NodeServeOutcome`, `OnRequestResult`, `OpaqueMountDeclaration`, `Params`, `PlainRender`, `Platform`, `PlatformResponse`, `PluginTypeCollapsed`, `PrefixRegistry`, `Prettify`, `PromptArgument`, `PromptMessage`, `ROUTE_PATTERN_OVERLAP_MAX_STATES`, `RedactOptions`, `Registry`, `RequestLocal`, `RequestPath`, `ResponseBodyHook`, `ResponseBodyReplacement`, `ResponseControls`, `ResponseFinalization`, `ResponseHeadersHook`, `ResponseHeadersView`, `ResponseMapFor`, `ResponseResult`, `RouteConfigError`, `RouteConfigErrorCode`, `RouteDescriptor`, `RouteInfo`, `RouteInfoFor`, `RouteMethod`, `RoutePatternOverlapLimitError`, `RouteSchema`, `Router`, `RouterMatch`, `RunningServer`, `SSEContext`, `SSEInit`, `SSEMessage`, `SSEStream`, `ScheduledController`, `ScheduledHandler`, `Server`, `ServerOptions`, `StandardIssue`, `StandardResult`, `StandardSchemaV1`, `StandardTypes`, `StandardWebSocket`, `StatusResponse`, `ToolAnnotations`, `TopicAdapter`, `TypedSSEStream`, `UrlParts`, `VERSION`, `ValidationOutcome`, `VercelHandler`, `Version`, `WebSocketContext`, `WebSocketData`, `WebSocketHandler`, `WebSocketUpgradeOutcome`, `authenticated`, `beforeHandler`, `carryRequestLocals`, `commonSecretPatterns`, `cookieNamePrefix`, `defineContextPlugin`, `defineIdentityPlugin`, `definePlugin`, `defineRouterPlugin`, `echoParam`, `hasDuplicateCookie`, `isAuthenticatedRequest`, `isSameOriginForm`, `isSameOriginPath`, `isSameOriginRequest`, `jsonLogger`, `markAuthenticatedRequest`, `parseCookies`, `pathnameOf`, `redactLogFields`, `rejected`, `replacedRequestOf`, `requestLocal`, `routePatternOverlap`, `routeTemplateOf`, `serializeCookie`, `server`, `sharedResponseCacheBypass`, `signValue`, `silentLogger`, `staticResponse`, `status`, `toFetchHandler`, `toLambdaHandler`, `toNetlifyHandler`, `toVercelHandler`, `unsignValue`, `urlPartsOf`, `varyOn`, `writableResponse`
|
|
23314
23331
|
|
|
23315
23332
|
## @nifrajs/cron
|
|
23316
23333
|
|
package/docs/types.json
CHANGED
|
@@ -2730,7 +2730,7 @@
|
|
|
2730
2730
|
"name": "CachedResponse",
|
|
2731
2731
|
"kind": "interface",
|
|
2732
2732
|
"package": "@nifrajs/middleware",
|
|
2733
|
-
"signature": "export interface CachedResponse {\n readonly status: number;\n readonly statusText: string;\n readonly headers: readonly [string, string][];\n readonly body: Uint8Array;\n readonly expiresAt: number;\n readonly storedAt: number;\n}"
|
|
2733
|
+
"signature": "export interface CachedResponse {\n readonly status: number;\n readonly statusText: string;\n readonly headers: readonly [string, string][];\n readonly body: Uint8Array;\n readonly expiresAt: number;\n readonly storedAt: number;\n /** A shared-cache write checked against the final response. Older entries are misses. */\n readonly finalized?: true;\n}"
|
|
2734
2734
|
},
|
|
2735
2735
|
{
|
|
2736
2736
|
"name": "CachedResponse",
|
|
@@ -3851,7 +3851,7 @@
|
|
|
3851
3851
|
"name": "CompressionOptions",
|
|
3852
3852
|
"kind": "interface",
|
|
3853
3853
|
"package": "@nifrajs/middleware",
|
|
3854
|
-
"signature": "export interface CompressionOptions {\n /** Don't compress bodies smaller than this many bytes. Default `1024`. Enforced by peeking the body\n * (see below) since runtimes rarely expose `Content-Length` on a constructed `Response`. */\n readonly threshold?: number;\n /** Decide whether a `Content-Type` is worth compressing. Default: text, JSON/+json, JS, XML/+xml,\n * NDJSON, wasm, SVG. Already-compressed media (images, video, archives) is skipped. */\n readonly compressible?: (contentType: string) => boolean;\n}"
|
|
3854
|
+
"signature": "export interface CompressionOptions {\n /** Don't compress bodies smaller than this many bytes. Default `1024`. Enforced by peeking the body\n * (see below) since runtimes rarely expose `Content-Length` on a constructed `Response`. */\n readonly threshold?: number;\n /** Decide whether a `Content-Type` is worth compressing. Default: text, JSON/+json, JS, XML/+xml,\n * NDJSON, wasm, SVG. Already-compressed media (images, video, archives) is skipped. */\n readonly compressible?: (contentType: string) => boolean;\n /** Gzip a buffered body of up to this many bytes on the calling thread, rather than handing it to a\n * worker pool. The default depends on the runtime: Bun on Linux gzips inline up to 64 KiB, Deno\n * always does, and Node never does. A pool hand-off pays when the process has idle cores to spend\n * on it; when every core already runs a process of its own (one per core, behind a cluster or\n * `reusePort`) it only adds cost, and an inline limit measured 1.5 to 4 times the throughput on\n * Node. `0` gzips nothing inline. Streamed bodies are unaffected. */\n readonly inlineMax?: number;\n}"
|
|
3855
3855
|
},
|
|
3856
3856
|
{
|
|
3857
3857
|
"name": "Computed",
|
|
@@ -7556,7 +7556,7 @@
|
|
|
7556
7556
|
"name": "ISROptions",
|
|
7557
7557
|
"kind": "interface",
|
|
7558
7558
|
"package": "@nifrajs/web",
|
|
7559
|
-
"signature": "export interface ISROptions {\n readonly store: CacheStore;\n /**\n * Signs every page written to `store` and checks the signature on every read, so whoever else can\n * write the store (another service on the same KV namespace, a leaked token) cannot hand visitors a\n * page this app did not render. Required for every store but a {@link MemoryCacheStore}, whose\n * pages never leave the process and stay unsigned. The same in every process, at least 32\n * characters, and random: generate it, such as 32 random bytes as hex, since a guessable secret\n * can be found from any signed page and then signs pages of its own. A page whose signature is\n * missing or wrong reads as a miss and renders again, so a new secret only empties the cache. It\n * cannot stop a store writer from deleting pages, or from putting back an older page this app\n * stored for the same key. That page keeps its age: still within its freshness window, it is a hit\n * until the window ends; past it, it serves stale and regenerates.\n */\n readonly storeSecret?: string;\n /** Default freshness window (**seconds**) for a cached page; older ⇒ stale (served, regenerated\n * behind). A route overrides it per-page via `export const revalidate` (surfaced as the\n * `x-nifra-isr-revalidate` response header). */\n readonly revalidate: number;\n /** Monotonic clock (ms) - injected for testability; production passes `() => Date.now()`. */\n readonly now: () => number;\n /** Cache key for a request. Default: `origin + pathname`, plus the query parameters `query` admits,\n * so host-routed apps do not share entries across tenants. Return `null` to bypass the cache for\n * this request (it goes straight to the app, uncached). Replaces `query` entirely. Under the default\n * key a request carrying `Authorization` or a cookie outside `anonymousCookies` never reads the\n * store; a custom key takes that decision over, so include whatever identifies the visitor in it.\n * An action's `revalidate(paths)` keys each path with the action request's own headers, so it purges\n * the variant that client reads; a variant keyed on another header value (another language) is not\n * reached - tag those pages and revalidate the tag. */\n readonly key?: (req: Request) => string | null;\n /**\n * Cookie names that never change the page, such as a consent or analytics cookie. Under the default\n * key a request carrying `Authorization` or any other cookie skips the stored page and renders fresh,\n * because a signed-in visitor's page can differ from the anonymous one; a request whose cookies are\n * all listed here is served from the cache like one with none. Default none.\n */\n readonly anonymousCookies?: readonly string[];\n /**\n * How the query string reaches the default key. Default `\"bypass\"`: a request carrying any query\n * parameter skips the cache - rendered fresh, never stored - so `?a=1`, `?a=2`, ... cannot each\n * store a full page. A list caches by those parameters only, in any order (`?b=2&a=1` and\n * `?a=1&b=2` share an entry); a request carrying any other parameter still bypasses, because a\n * loader that reads it would otherwise be served another request's page. `\"all\"` keys on the whole\n * query string, so every distinct query is a new entry.\n */\n readonly query?: ISRQuery;\n /** Draft/preview secret (the same one given to `createWebApp({ draftSecret })` + `enableDraft`). When\n * set, a request carrying a valid signed draft cookie **bypasses the cache** - editors always render\n * fresh, and a draft render is never written to the store (it can't poison the public cache). */\n readonly draftSecret?: string;\n /**\n * Called when a store call fails: it throws, rejects, or outlives {@link storeTimeoutMs}, or (op\n * `\"verify\"`) a page it returns fails its {@link storeSecret} signature check. The request is served\n * without the cache either way - a failed read is a miss, a failed write still returns the rendered\n * page, a failed regeneration keeps the stale entry - so a store outage never changes a status.\n * Default: one `console.error` line per operation per minute, never naming the cache key.\n */\n readonly onStoreError?: (error: unknown, info: {\n readonly op: ISRStoreOp;\n }) => void;\n /**\n * Longest a store call may take (ms) before it counts as failed. Default none, so a hung store holds\n * the request; set it when the store is a network service.\n */\n readonly storeTimeoutMs?: number;\n /**\n * Caches below the pages whose entries carry the same tags, such as a `@nifrajs/cache` holding loader\n * data. An action's `revalidate(paths, data, { tags })` invalidates them first, then this store, then\n * publishes to live pages, then purges `cdn`; a cache that fails stops the rest, so no client reloads\n * stale data.\n */\n readonly dataCaches?: readonly {\n invalidateTag(tag: string): unknown;\n }[];\n /** A CDN an action's invalidation purges last (a `@nifrajs/web/cdn` provider). */\n readonly cdn?: CdnPurgeTarget;\n /**\n * An action's invalidation that still failed after its retries; the action's own answer never\n * changes. Default: one `console.error` line naming the operation id and stage.\n */\n readonly onInvalidationError?: (report: InvalidationReport) => void;\n}"
|
|
7559
|
+
"signature": "export interface ISROptions {\n readonly store: CacheStore;\n /** Maximum UTF-8 bytes captured for one document. Larger pages stream without caching.\n * Default 2 MiB. */\n readonly maxEntryBytes?: number;\n /**\n * Signs every page written to `store` and checks the signature on every read, so whoever else can\n * write the store (another service on the same KV namespace, a leaked token) cannot hand visitors a\n * page this app did not render. Required for every store but a {@link MemoryCacheStore}, whose\n * pages never leave the process and stay unsigned. The same in every process, at least 32\n * characters, and random: generate it, such as 32 random bytes as hex, since a guessable secret\n * can be found from any signed page and then signs pages of its own. A page whose signature is\n * missing or wrong reads as a miss and renders again, so a new secret only empties the cache. It\n * cannot stop a store writer from deleting pages, or from putting back an older page this app\n * stored for the same key. That page keeps its age: still within its freshness window, it is a hit\n * until the window ends; past it, it serves stale and regenerates.\n */\n readonly storeSecret?: string;\n /** Default freshness window (**seconds**) for a cached page; older ⇒ stale (served, regenerated\n * behind). A route overrides it per-page via `export const revalidate` (surfaced as the\n * `x-nifra-isr-revalidate` response header). */\n readonly revalidate: number;\n /** Monotonic clock (ms) - injected for testability; production passes `() => Date.now()`. */\n readonly now: () => number;\n /** Cache key for a request. Default: `origin + pathname`, plus the query parameters `query` admits,\n * so host-routed apps do not share entries across tenants. Return `null` to bypass the cache for\n * this request (it goes straight to the app, uncached). Replaces `query` entirely. Under the default\n * key a request carrying `Authorization` or a cookie outside `anonymousCookies` never reads the\n * store; a custom key takes that decision over, so include whatever identifies the visitor in it.\n * An action's `revalidate(paths)` keys each path with the action request's own headers, so it purges\n * the variant that client reads; a variant keyed on another header value (another language) is not\n * reached - tag those pages and revalidate the tag. */\n readonly key?: (req: Request) => string | null;\n /**\n * Cookie names that never change the page, such as a consent or analytics cookie. Under the default\n * key a request carrying `Authorization` or any other cookie skips the stored page and renders fresh,\n * because a signed-in visitor's page can differ from the anonymous one; a request whose cookies are\n * all listed here is served from the cache like one with none. Default none.\n */\n readonly anonymousCookies?: readonly string[];\n /**\n * How the query string reaches the default key. Default `\"bypass\"`: a request carrying any query\n * parameter skips the cache - rendered fresh, never stored - so `?a=1`, `?a=2`, ... cannot each\n * store a full page. A list caches by those parameters only, in any order (`?b=2&a=1` and\n * `?a=1&b=2` share an entry); a request carrying any other parameter still bypasses, because a\n * loader that reads it would otherwise be served another request's page. `\"all\"` keys on the whole\n * query string, so every distinct query is a new entry.\n */\n readonly query?: ISRQuery;\n /** Draft/preview secret (the same one given to `createWebApp({ draftSecret })` + `enableDraft`). When\n * set, a request carrying a valid signed draft cookie **bypasses the cache** - editors always render\n * fresh, and a draft render is never written to the store (it can't poison the public cache). */\n readonly draftSecret?: string;\n /**\n * Called when a store call fails: it throws, rejects, or outlives {@link storeTimeoutMs}, or (op\n * `\"verify\"`) a page it returns fails its {@link storeSecret} signature check. The request is served\n * without the cache either way - a failed read is a miss, a failed write still returns the rendered\n * page, a failed regeneration keeps the stale entry - so a store outage never changes a status.\n * Default: one `console.error` line per operation per minute, never naming the cache key.\n */\n readonly onStoreError?: (error: unknown, info: {\n readonly op: ISRStoreOp;\n }) => void;\n /**\n * Longest a store call may take (ms) before it counts as failed. Default none, so a hung store holds\n * the request; set it when the store is a network service.\n */\n readonly storeTimeoutMs?: number;\n /**\n * Caches below the pages whose entries carry the same tags, such as a `@nifrajs/cache` holding loader\n * data. An action's `revalidate(paths, data, { tags })` invalidates them first, then this store, then\n * publishes to live pages, then purges `cdn`; a cache that fails stops the rest, so no client reloads\n * stale data.\n */\n readonly dataCaches?: readonly {\n invalidateTag(tag: string): unknown;\n }[];\n /** A CDN an action's invalidation purges last (a `@nifrajs/web/cdn` provider). */\n readonly cdn?: CdnPurgeTarget;\n /**\n * An action's invalidation that still failed after its retries; the action's own answer never\n * changes. Default: one `console.error` line naming the operation id and stage.\n */\n readonly onInvalidationError?: (report: InvalidationReport) => void;\n}"
|
|
7560
7560
|
},
|
|
7561
7561
|
{
|
|
7562
7562
|
"name": "ISRPlatform",
|
|
@@ -9799,14 +9799,14 @@
|
|
|
9799
9799
|
"name": "MemoryCacheStore",
|
|
9800
9800
|
"kind": "class",
|
|
9801
9801
|
"package": "@nifrajs/web",
|
|
9802
|
-
"signature": "export declare class MemoryCacheStore implements CacheStore {\n private readonly cache;\n private readonly max;\n private readonly tagEpoch;\n private readonly tagIndex;\n private order;\n private readonly purgedKeys;\n private readonly purgedTags;\n private purgeFloor;\n constructor(options?: MemoryCacheStoreOptions);\n get(key: string): Promise<CachedResponse | undefined>;\n fence(): number;\n set(key: string, value: CachedResponse): Promise<void>;\n delete(key: string): Promise<void>;\n invalidateTag(tag: string): Promise<void>;\n private evict;\n private purgedAfter;\n private markPurged;\n}",
|
|
9802
|
+
"signature": "export declare class MemoryCacheStore implements CacheStore {\n private readonly cache;\n private readonly max;\n private readonly maxTotalBytes;\n private totalBytes;\n private readonly tagEpoch;\n private readonly tagIndex;\n private order;\n private readonly purgedKeys;\n private readonly purgedTags;\n private purgeFloor;\n constructor(options?: MemoryCacheStoreOptions);\n get(key: string): Promise<CachedResponse | undefined>;\n fence(): number;\n set(key: string, value: CachedResponse): Promise<void>;\n delete(key: string): Promise<void>;\n invalidateTag(tag: string): Promise<void>;\n private evict;\n private purgedAfter;\n private markPurged;\n}",
|
|
9803
9803
|
"doc": "/**\n * In-process ISR cache. Refuses to run in production unless explicitly allowed (mirrors the\n * rate-limit `MemoryStore` - a per-instance cache is unsafe across instances). Bounded **LRU**: a\n * read or write bumps the entry, so the least-recently-used evicts past `max` (a hot, frequently-read\n * page survives a burst of new pages).\n */"
|
|
9804
9804
|
},
|
|
9805
9805
|
{
|
|
9806
9806
|
"name": "MemoryCacheStoreOptions",
|
|
9807
9807
|
"kind": "interface",
|
|
9808
9808
|
"package": "@nifrajs/web",
|
|
9809
|
-
"signature": "export interface MemoryCacheStoreOptions {\n /** Allow the in-memory store in production. Off by default - per-instance caching means revalidation\n * won't propagate across instances and each instance caches separately. */\n readonly allowInProduction?: boolean;\n /** Hard cap on entries; the least-recently-used is evicted past it (default 500). */\n readonly max?: number;\n}"
|
|
9809
|
+
"signature": "export interface MemoryCacheStoreOptions {\n /** Allow the in-memory store in production. Off by default - per-instance caching means revalidation\n * won't propagate across instances and each instance caches separately. */\n readonly allowInProduction?: boolean;\n /** Hard cap on entries; the least-recently-used is evicted past it (default 500). */\n readonly max?: number;\n /** Total retained HTML budget, counted at two bytes per UTF-16 code unit. Default 64 MiB. */\n readonly maxTotalBytes?: number;\n}"
|
|
9810
9810
|
},
|
|
9811
9811
|
{
|
|
9812
9812
|
"name": "MemoryCausalityStoreOptions",
|
|
@@ -15241,14 +15241,14 @@
|
|
|
15241
15241
|
"name": "SSEStream",
|
|
15242
15242
|
"kind": "interface",
|
|
15243
15243
|
"package": "@nifrajs/core",
|
|
15244
|
-
"signature": "export interface SSEStream {\n /**\n * Enqueue an event frame. No-op once the stream is closed, including after a client that fell\n * more than `maxBufferedBytes` behind was dropped.\n */\n send(message: SSEMessage): void;\n /** End the stream now. */\n close(): void;\n /** Aborts when the
|
|
15244
|
+
"signature": "export interface SSEStream {\n /**\n * Enqueue an event frame. No-op once the stream is closed, including after a client that fell\n * more than `maxBufferedBytes` behind was dropped.\n */\n send(message: SSEMessage): void;\n /** End the stream now. */\n close(): void;\n /** Aborts when the stream ends - use it to tear down subscriptions and loops. */\n readonly signal: AbortSignal;\n}",
|
|
15245
15245
|
"doc": "/** The stream handed to the `run` callback. */"
|
|
15246
15246
|
},
|
|
15247
15247
|
{
|
|
15248
15248
|
"name": "SSEStream",
|
|
15249
15249
|
"kind": "interface",
|
|
15250
15250
|
"package": "nifra",
|
|
15251
|
-
"signature": "export interface SSEStream {\n /**\n * Enqueue an event frame. No-op once the stream is closed, including after a client that fell\n * more than `maxBufferedBytes` behind was dropped.\n */\n send(message: SSEMessage): void;\n /** End the stream now. */\n close(): void;\n /** Aborts when the
|
|
15251
|
+
"signature": "export interface SSEStream {\n /**\n * Enqueue an event frame. No-op once the stream is closed, including after a client that fell\n * more than `maxBufferedBytes` behind was dropped.\n */\n send(message: SSEMessage): void;\n /** End the stream now. */\n close(): void;\n /** Aborts when the stream ends - use it to tear down subscriptions and loops. */\n readonly signal: AbortSignal;\n}",
|
|
15252
15252
|
"doc": "/** The stream handed to the `run` callback. */"
|
|
15253
15253
|
},
|
|
15254
15254
|
{
|
|
@@ -17722,14 +17722,14 @@
|
|
|
17722
17722
|
"name": "TypedSSEStream",
|
|
17723
17723
|
"kind": "interface",
|
|
17724
17724
|
"package": "@nifrajs/core",
|
|
17725
|
-
"signature": "export interface TypedSSEStream<Event> {\n /** Send one typed event. `init` sets the optional SSE frame fields (`event`, `id`, `retry`). */\n send(event: Event, init?: Pick<SSEMessage, \"event\" | \"id\" | \"retry\">): void;\n /** Send a `: comment` line (e.g. an explicit ping). */\n comment(text: string): void;\n /** End the stream now. */\n close(): void;\n /** Aborts when the
|
|
17725
|
+
"signature": "export interface TypedSSEStream<Event> {\n /** Send one typed event. `init` sets the optional SSE frame fields (`event`, `id`, `retry`). */\n send(event: Event, init?: Pick<SSEMessage, \"event\" | \"id\" | \"retry\">): void;\n /** Send a `: comment` line (e.g. an explicit ping). */\n comment(text: string): void;\n /** End the stream now. */\n close(): void;\n /** Aborts when the stream ends - use it to tear down subscriptions and loops. */\n readonly signal: AbortSignal;\n}",
|
|
17726
17726
|
"doc": "/**\n * The stream handed to an `app.sse()` handler: `send` takes the route's TYPED event payload and\n * serializes it (JSON) into the SSE `data:` field - the compile-time half of the `sse` contract.\n */"
|
|
17727
17727
|
},
|
|
17728
17728
|
{
|
|
17729
17729
|
"name": "TypedSSEStream",
|
|
17730
17730
|
"kind": "interface",
|
|
17731
17731
|
"package": "nifra",
|
|
17732
|
-
"signature": "export interface TypedSSEStream<Event> {\n /** Send one typed event. `init` sets the optional SSE frame fields (`event`, `id`, `retry`). */\n send(event: Event, init?: Pick<SSEMessage, \"event\" | \"id\" | \"retry\">): void;\n /** Send a `: comment` line (e.g. an explicit ping). */\n comment(text: string): void;\n /** End the stream now. */\n close(): void;\n /** Aborts when the
|
|
17732
|
+
"signature": "export interface TypedSSEStream<Event> {\n /** Send one typed event. `init` sets the optional SSE frame fields (`event`, `id`, `retry`). */\n send(event: Event, init?: Pick<SSEMessage, \"event\" | \"id\" | \"retry\">): void;\n /** Send a `: comment` line (e.g. an explicit ping). */\n comment(text: string): void;\n /** End the stream now. */\n close(): void;\n /** Aborts when the stream ends - use it to tear down subscriptions and loops. */\n readonly signal: AbortSignal;\n}",
|
|
17733
17733
|
"doc": "/**\n * The stream handed to an `app.sse()` handler: `send` takes the route's TYPED event payload and\n * serializes it (JSON) into the SSE `data:` field - the compile-time half of the `sse` contract.\n */"
|
|
17734
17734
|
},
|
|
17735
17735
|
{
|
|
@@ -18053,14 +18053,14 @@
|
|
|
18053
18053
|
"name": "VERSION",
|
|
18054
18054
|
"kind": "const",
|
|
18055
18055
|
"package": "@nifrajs/core",
|
|
18056
|
-
"signature": "export declare const VERSION: \"5.
|
|
18056
|
+
"signature": "export declare const VERSION: \"5.17.0\";",
|
|
18057
18057
|
"doc": "/**\n * Current package version. A hardcoded literal on purpose - core runs on the edge (no fs), so it can't\n * read its own package.json at runtime. `scripts/version.ts` rewrites it on every release bump and\n * `check:publish` asserts it equals `@nifrajs/core`'s package version.\n */"
|
|
18058
18058
|
},
|
|
18059
18059
|
{
|
|
18060
18060
|
"name": "VERSION",
|
|
18061
18061
|
"kind": "const",
|
|
18062
18062
|
"package": "nifra",
|
|
18063
|
-
"signature": "export declare const VERSION: \"5.
|
|
18063
|
+
"signature": "export declare const VERSION: \"5.17.0\";",
|
|
18064
18064
|
"doc": "/**\n * Current package version. A hardcoded literal on purpose - core runs on the edge (no fs), so it can't\n * read its own package.json at runtime. `scripts/version.ts` rewrites it on every release bump and\n * `check:publish` asserts it equals `@nifrajs/core`'s package version.\n */"
|
|
18065
18065
|
},
|
|
18066
18066
|
{
|
|
@@ -18512,14 +18512,14 @@
|
|
|
18512
18512
|
"name": "WsCallOptions",
|
|
18513
18513
|
"kind": "interface",
|
|
18514
18514
|
"package": "@nifrajs/client",
|
|
18515
|
-
"signature": "export interface WsCallOptions<Out = unknown> {\n /** Sent on the handshake URL as an HTTP call sends it: an array repeats its key once per item,\n * and an `undefined` value is left out. */\n query?: Record<string, string | number | boolean | readonly (string | number | boolean)[] | undefined>;\n /** WebSocket subprotocols. A browser handshake cannot carry custom headers - authenticate via\n * `upgrade()` reading cookies/query/subprotocol, not an Authorization header. */\n protocols?: string | string[];\n /** Abort to close the socket (same effect as calling `close()`). */\n signal?: AbortSignal;\n /** Socket-level failures (connection refused, abnormal close), and frames `validateReceive` refuses. */\n onError?: (error: unknown) => void;\n /**\n * Check every received frame against this schema - the route's `sendSchema`, imported from the\n * module that declares it (the typed client carries the contract's types, not its schemas). A frame\n * that fails is not delivered: `onError` gets a `TypeError` naming the issues, with the frame as its\n * `cause`. Frames are still delivered in the order they arrived, an async schema included.\n */\n validateReceive?: StandardSchemaV1<unknown, Out>;\n}",
|
|
18515
|
+
"signature": "export interface WsCallOptions<Out = unknown> {\n /** Sent on the handshake URL as an HTTP call sends it: an array repeats its key once per item,\n * and an `undefined` value is left out. */\n query?: Record<string, string | number | boolean | readonly (string | number | boolean)[] | undefined>;\n /** WebSocket subprotocols. A browser handshake cannot carry custom headers - authenticate via\n * `upgrade()` reading cookies/query/subprotocol, not an Authorization header. */\n protocols?: string | string[];\n /** Abort to close the socket (same effect as calling `close()`). */\n signal?: AbortSignal;\n /** Socket-level failures (connection refused, abnormal close), and frames `validateReceive` refuses. */\n onError?: (error: unknown) => void;\n /** Maximum pending incoming messages per iterator and per validation queue, including the frame\n * being validated. Default 256. An overrun ends that iterator or closes the socket if validation\n * fell behind. Both report through `onError`. */\n maxPendingMessages?: number;\n /**\n * Check every received frame against this schema - the route's `sendSchema`, imported from the\n * module that declares it (the typed client carries the contract's types, not its schemas). A frame\n * that fails is not delivered: `onError` gets a `TypeError` naming the issues, with the frame as its\n * `cause`. Frames are still delivered in the order they arrived, an async schema included.\n */\n validateReceive?: StandardSchemaV1<unknown, Out>;\n}",
|
|
18516
18516
|
"doc": "/** `Out` is what the handle delivers: a `validateReceive` schema must produce that type. */"
|
|
18517
18517
|
},
|
|
18518
18518
|
{
|
|
18519
18519
|
"name": "WsHandle",
|
|
18520
18520
|
"kind": "interface",
|
|
18521
18521
|
"package": "@nifrajs/client",
|
|
18522
|
-
"signature": "export interface WsHandle<In, Out> {\n /** Send one typed frame (JSON-encoded). Queued until the socket opens, so it never throws. */\n send(message: In): void;\n /** Async-iterate incoming typed frames.
|
|
18522
|
+
"signature": "export interface WsHandle<In, Out> {\n /** Send one typed frame (JSON-encoded). Queued until the socket opens, so it never throws. */\n send(message: In): void;\n /** Async-iterate incoming typed frames. Drains on socket close. An abort or queue overrun ends\n * this iterator and discards its buffered messages. */\n messages(options?: {\n signal?: AbortSignal;\n }): AsyncIterableIterator<Out>;\n /** Callback form of {@link messages}; returns an unsubscribe. */\n onMessage(callback: (message: Out) => void): () => void;\n /** Resolves when the socket is open (rejects on a connect failure). */\n readonly opened: Promise<void>;\n close(code?: number, reason?: string): void;\n /** `using socket = client.x.ws()`: closes with the default code, as `close()` does. A runtime without `Symbol.dispose` needs a polyfill first. */\n [Symbol.dispose](): void;\n /** The underlying socket, for anything off the typed contract (binary frames, bufferedAmount…). */\n readonly raw: WebSocket;\n}",
|
|
18523
18523
|
"doc": "/**\n * A live typed WebSocket connection to an `app.ws()` route. `send` accepts the route's\n * `messageSchema` input type (validated server-side at the trust boundary); received frames are\n * typed from its `sendSchema` and JSON-parsed. Binary frames are not part of the typed contract\n * and are ignored by `messages()`/`onMessage` - use `raw` for them.\n */"
|
|
18524
18524
|
},
|
|
18525
18525
|
{
|
|
@@ -26027,6 +26027,20 @@
|
|
|
26027
26027
|
"signature": "export declare function shapeRows(columns: readonly string[], rows: readonly (readonly unknown[])[], options: ShapeRowsOptions): DbRows;",
|
|
26028
26028
|
"doc": "/**\n * Cap, mask and normalize rows fetched as arrays (at most `maxRows + 1`, so truncation is known\n * without counting). The byte cap halves the row count until the JSON fits.\n */"
|
|
26029
26029
|
},
|
|
26030
|
+
{
|
|
26031
|
+
"name": "sharedResponseCacheBypass",
|
|
26032
|
+
"kind": "const",
|
|
26033
|
+
"package": "@nifrajs/core",
|
|
26034
|
+
"signature": "export declare const sharedResponseCacheBypass: RequestLocal<(request: Request) => boolean>;",
|
|
26035
|
+
"doc": "/** Early request policy for the shared response cache. The ISR cache applies its own route policy. */"
|
|
26036
|
+
},
|
|
26037
|
+
{
|
|
26038
|
+
"name": "sharedResponseCacheBypass",
|
|
26039
|
+
"kind": "const",
|
|
26040
|
+
"package": "nifra",
|
|
26041
|
+
"signature": "export declare const sharedResponseCacheBypass: RequestLocal<(request: Request) => boolean>;",
|
|
26042
|
+
"doc": "/** Early request policy for the shared response cache. The ISR cache applies its own route policy. */"
|
|
26043
|
+
},
|
|
26030
26044
|
{
|
|
26031
26045
|
"name": "sharpImageBackend",
|
|
26032
26046
|
"kind": "function",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nifrajs/cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.17.0",
|
|
4
4
|
"description": "The nifra CLI - zero-config dev/build/start for a nifra app (`nifra dev`, `nifra build`, `nifra start`).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -70,17 +70,17 @@
|
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@nifrajs/agent-review": "5.
|
|
74
|
-
"@nifrajs/client": "5.
|
|
75
|
-
"@nifrajs/core": "5.
|
|
76
|
-
"@nifrajs/i18n": "5.
|
|
77
|
-
"@nifrajs/mcp": "5.
|
|
78
|
-
"@nifrajs/mcp-db": "5.
|
|
79
|
-
"@nifrajs/runner": "5.
|
|
80
|
-
"@nifrajs/schema": "5.
|
|
81
|
-
"@nifrajs/testing": "5.
|
|
82
|
-
"@nifrajs/utils": "5.
|
|
83
|
-
"@nifrajs/web": "5.
|
|
73
|
+
"@nifrajs/agent-review": "5.17.0",
|
|
74
|
+
"@nifrajs/client": "5.17.0",
|
|
75
|
+
"@nifrajs/core": "5.17.0",
|
|
76
|
+
"@nifrajs/i18n": "5.17.0",
|
|
77
|
+
"@nifrajs/mcp": "5.17.0",
|
|
78
|
+
"@nifrajs/mcp-db": "5.17.0",
|
|
79
|
+
"@nifrajs/runner": "5.17.0",
|
|
80
|
+
"@nifrajs/schema": "5.17.0",
|
|
81
|
+
"@nifrajs/testing": "5.17.0",
|
|
82
|
+
"@nifrajs/utils": "5.17.0",
|
|
83
|
+
"@nifrajs/web": "5.17.0"
|
|
84
84
|
},
|
|
85
85
|
"repository": {
|
|
86
86
|
"type": "git",
|
package/src/cli.ts
CHANGED
|
@@ -368,7 +368,7 @@ set in the process environment is never overwritten by a file.
|
|
|
368
368
|
${renderCommandCatalogHelp()}`
|
|
369
369
|
|
|
370
370
|
// Kept in lockstep with packages/cli/package.json by check:publish's version-consistency gate.
|
|
371
|
-
const CLI_VERSION = "5.
|
|
371
|
+
const CLI_VERSION = "5.17.0"
|
|
372
372
|
|
|
373
373
|
// A render adapter + nifra server are opaque to the CLI (it just forwards them); cast at the seam.
|
|
374
374
|
const asAdapter = (v: unknown): RenderAdapter => v as RenderAdapter
|
package/src/mcp-http.ts
CHANGED
|
@@ -30,7 +30,7 @@ export { docsTools } from "./mcp-docs-tools.ts"
|
|
|
30
30
|
export type { TypeEntry } from "./types-search.ts"
|
|
31
31
|
|
|
32
32
|
// Kept in lockstep with packages/cli/package.json by check:publish's version-consistency gate.
|
|
33
|
-
const VERSION = "5.
|
|
33
|
+
const VERSION = "5.17.0"
|
|
34
34
|
const SERVER_INFO = { name: "nifra-docs", version: VERSION }
|
|
35
35
|
// Derive the GET/health tool list from the tools actually served, so the line can never drift from them.
|
|
36
36
|
const docsHealth = (tools: McpTool[]): string =>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { UpgradeRecipe } from "./index.ts"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Upgrade recipe for Nifra 5.17.
|
|
5
|
+
*
|
|
6
|
+
* No import or dependency moves and no source rewrites. The release bounds the memory that response
|
|
7
|
+
* caching, ISR, typed WebSockets, SSE and in-memory channels may hold, and checks cache eligibility
|
|
8
|
+
* against the final response. Each note names a limit or a contract an app can observe.
|
|
9
|
+
*/
|
|
10
|
+
export const recipe: UpgradeRecipe = {
|
|
11
|
+
version: "5.17.0",
|
|
12
|
+
pins: [
|
|
13
|
+
{ match: "@nifrajs/", to: "5.17.0" },
|
|
14
|
+
{ match: "create-nifra", to: "5.17.0" },
|
|
15
|
+
{ match: "nifra", to: "5.17.0" },
|
|
16
|
+
],
|
|
17
|
+
importMoves: [],
|
|
18
|
+
sourceRewrites: [],
|
|
19
|
+
affects: ["@nifrajs/core", "@nifrajs/middleware", "@nifrajs/client", "@nifrajs/web"],
|
|
20
|
+
notes: [
|
|
21
|
+
"`cache()` stores a response only after every later hook has run, and checks it against the final response: a `private` or `no-store` policy, a `Set-Cookie`, or a `Vary` the key does not carry keeps it out of the shared cache. Server component owner routes bypass the generic cache before lookup. Entries written by an earlier version carry no `finalized` flag and count as misses, so the cache repopulates once after the upgrade. A custom `ResponseCacheStore` must keep `finalized` when it stores and returns an entry; a store that drops it never serves a hit.",
|
|
22
|
+
"`withISR` captures at most `maxEntryBytes` of a document (default 2 MiB). A larger page streams to the visitor without being cached, and a stored page over the limit is treated as a miss. `MemoryCacheStore` also takes `maxTotalBytes` (default 64 MiB, two bytes per UTF-16 code unit) and evicts the least recently used page past it. Raise either option when an app caches pages beyond those sizes.",
|
|
23
|
+
"The typed WebSocket client keeps at most `maxPendingMessages` frames (default 256) in `messages()` and in an async `validateReceive` queue. A consumer that falls that far behind ends its iteration and reports through `onError`; a full validation queue also closes the socket with code 4008. Pass a larger `maxPendingMessages` to a call whose consumer reads in bursts.",
|
|
24
|
+
"`stream.signal` of an `sse()` stream now aborts when the stream ends for any reason, including `stream.close()` and a failing producer (the error is the abort reason), not only when the client disconnects. A producer that unsubscribes in an abort listener is released on every path; code that assumed the signal meant a client disconnect should check `req.signal` instead.",
|
|
25
|
+
"`memoryChannelHub` enforces `maxChannels` when the last subscriber of a channel leaves, so an idle hub forgets the oldest inactive histories at once. A `resumeFrom` token for such a channel is refused with `ChannelResumeUnavailableError`, as it already was after a later publish.",
|
|
26
|
+
"`compression({ inlineMax })` gzips a buffered body of up to that many bytes on the calling thread, which measured faster than the thread pool when each core runs its own process. The default is unchanged.",
|
|
27
|
+
],
|
|
28
|
+
}
|
package/src/recipes/index.ts
CHANGED
|
@@ -28,6 +28,7 @@ import { recipe as v5_13_0 } from "./5.13.0.ts"
|
|
|
28
28
|
import { recipe as v5_14_0 } from "./5.14.0.ts"
|
|
29
29
|
import { recipe as v5_15_0 } from "./5.15.0.ts"
|
|
30
30
|
import { recipe as v5_16_0 } from "./5.16.0.ts"
|
|
31
|
+
import { recipe as v5_17_0 } from "./5.17.0.ts"
|
|
31
32
|
|
|
32
33
|
/** A pin rule: every dependency whose name starts with `match` is set to version `to`. */
|
|
33
34
|
export interface PinRule {
|
|
@@ -115,6 +116,7 @@ const RECIPES: Record<string, UpgradeRecipe> = {
|
|
|
115
116
|
[v5_14_0.version]: v5_14_0,
|
|
116
117
|
[v5_15_0.version]: v5_15_0,
|
|
117
118
|
[v5_16_0.version]: v5_16_0,
|
|
119
|
+
[v5_17_0.version]: v5_17_0,
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
export function getRecipe(version: string): UpgradeRecipe | undefined {
|