@nifrajs/cli 2.9.1 → 2.10.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/README.md +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +35 -3
- package/dist/cli.js.map +1 -1
- package/dist/introspect.d.ts +26 -6
- package/dist/introspect.d.ts.map +1 -1
- package/dist/introspect.js +85 -1
- package/dist/introspect.js.map +1 -1
- package/dist/mcp-http.js +1 -1
- package/dist/mcp-http.js.map +1 -1
- package/dist/sdk.d.ts +10 -0
- package/dist/sdk.d.ts.map +1 -0
- package/dist/sdk.js +229 -0
- package/dist/sdk.js.map +1 -0
- package/docs/llms-full.txt +47 -5
- package/docs/types.json +639 -13
- package/package.json +9 -9
- package/src/cli.ts +33 -3
- package/src/introspect.ts +118 -4
- package/src/mcp-http.ts +1 -1
- package/src/sdk.ts +260 -0
package/docs/types.json
CHANGED
|
@@ -523,6 +523,19 @@
|
|
|
523
523
|
"signature": "export interface AuthedOptions<User> {\n /** Require a resolvable tenant. When set and no tenant resolves, fail closed with `403`. */\n readonly requireTenant?: boolean;\n /** Browser redirect target (`302`) for a missing session, instead of the default `401` JSON. Same-origin. */\n readonly redirectTo?: string;\n /** Resolve the tenant id from the user. Default: `user.tenantId ?? user.orgId` (string-valued only). */\n readonly tenantOf?: (user: User) => string | undefined;\n}",
|
|
524
524
|
"doc": "/**\n * Options for {@link requirePrincipal} / {@link authed}.\n */"
|
|
525
525
|
},
|
|
526
|
+
{
|
|
527
|
+
"name": "AuthorizationRequest",
|
|
528
|
+
"kind": "interface",
|
|
529
|
+
"package": "@nifrajs/auth",
|
|
530
|
+
"signature": "export interface AuthorizationRequest<Subject = unknown, Resource = unknown> {\n readonly subject: Subject;\n readonly action: string;\n readonly resource?: Resource;\n}",
|
|
531
|
+
"doc": "/**\n * Public authorization seam. Nifra supplies the control-flow contract; the application or data layer\n * supplies the actual policy. No subject/resource data is persisted or interpreted here.\n */"
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"name": "Authorizer",
|
|
535
|
+
"kind": "type",
|
|
536
|
+
"package": "@nifrajs/auth",
|
|
537
|
+
"signature": "export type Authorizer<Subject = unknown, Resource = unknown> = (request: AuthorizationRequest<Subject, Resource>) => boolean | Promise<boolean>;"
|
|
538
|
+
},
|
|
526
539
|
{
|
|
527
540
|
"name": "AuthPlugin",
|
|
528
541
|
"kind": "type",
|
|
@@ -890,6 +903,13 @@
|
|
|
890
903
|
"signature": "export declare function boolean(opts?: Base<boolean>): StandardSchemaV1<boolean>;",
|
|
891
904
|
"doc": "/** A boolean: `true`/`1`/`yes`/`on` → true; `false`/`0`/`no`/`off`/empty → false (case-insensitive). */"
|
|
892
905
|
},
|
|
906
|
+
{
|
|
907
|
+
"name": "BoundDataPort",
|
|
908
|
+
"kind": "interface",
|
|
909
|
+
"package": "@nifrajs/core",
|
|
910
|
+
"signature": "export interface BoundDataPort<Contract extends DataContract> extends TypedDataPort<Contract> {\n}",
|
|
911
|
+
"doc": "/** A data port bound to one request context; every operation emits capability evidence first. */"
|
|
912
|
+
},
|
|
893
913
|
{
|
|
894
914
|
"name": "bridgeScript",
|
|
895
915
|
"kind": "function",
|
|
@@ -1100,6 +1120,32 @@
|
|
|
1100
1120
|
"signature": "export declare function bunImageBackend(): ImageBackend;",
|
|
1101
1121
|
"doc": "/**\n * {@link ImageBackend} backed by `Bun.Image` (libjpeg-turbo / libspng / libwebp, decoded off the main\n * thread). Requires the Bun runtime. The default backend of `createImageHandler`.\n */"
|
|
1102
1122
|
},
|
|
1123
|
+
{
|
|
1124
|
+
"name": "ByteRange",
|
|
1125
|
+
"kind": "interface",
|
|
1126
|
+
"package": "@nifrajs/core",
|
|
1127
|
+
"signature": "export interface ByteRange {\n readonly start: number;\n readonly end: number;\n}",
|
|
1128
|
+
"doc": "/**\n * `Range: bytes=...` parsing - the shared owner for every byte-range surface in the framework.\n *\n * This lives in core rather than in the middleware package because two unrelated layers need the\n * exact same answer: `@nifrajs/middleware`'s `rangeResponse` for caller-owned buffers, and\n * `@nifrajs/web`'s `public/` static handler for files on disk. A second implementation that happens\n * to agree today is how a media server ends up serving byte 0 of a seek request in one code path and\n * byte N in the other.\n *\n * The input is request-controlled on every call, so the parser is bounded before it is clever: a\n * capped header length and a capped specifier count keep a malformed range-set from turning a sort\n * and merge into an allocation amplifier.\n */"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"name": "ByteRange",
|
|
1132
|
+
"kind": "interface",
|
|
1133
|
+
"package": "@nifrajs/middleware",
|
|
1134
|
+
"signature": "export interface ByteRange {\n readonly start: number;\n readonly end: number;\n}",
|
|
1135
|
+
"doc": "/**\n * `Range: bytes=...` parsing - the shared owner for every byte-range surface in the framework.\n *\n * This lives in core rather than in the middleware package because two unrelated layers need the\n * exact same answer: `@nifrajs/middleware`'s `rangeResponse` for caller-owned buffers, and\n * `@nifrajs/web`'s `public/` static handler for files on disk. A second implementation that happens\n * to agree today is how a media server ends up serving byte 0 of a seek request in one code path and\n * byte N in the other.\n *\n * The input is request-controlled on every call, so the parser is bounded before it is clever: a\n * capped header length and a capped specifier count keep a malformed range-set from turning a sort\n * and merge into an allocation amplifier.\n */"
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
"name": "ByteRangeResult",
|
|
1139
|
+
"kind": "type",
|
|
1140
|
+
"package": "@nifrajs/core",
|
|
1141
|
+
"signature": "export type ByteRangeResult = {\n readonly kind: \"none\";\n} | {\n readonly kind: \"unsatisfiable\";\n} | {\n readonly kind: \"satisfiable\";\n readonly ranges: readonly ByteRange[];\n};"
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"name": "ByteRangeResult",
|
|
1145
|
+
"kind": "type",
|
|
1146
|
+
"package": "@nifrajs/middleware",
|
|
1147
|
+
"signature": "export type ByteRangeResult = {\n readonly kind: \"none\";\n} | {\n readonly kind: \"unsatisfiable\";\n} | {\n readonly kind: \"satisfiable\";\n readonly ranges: readonly ByteRange[];\n};"
|
|
1148
|
+
},
|
|
1103
1149
|
{
|
|
1104
1150
|
"name": "bytes",
|
|
1105
1151
|
"kind": "function",
|
|
@@ -1155,7 +1201,7 @@
|
|
|
1155
1201
|
"name": "CachedResponse",
|
|
1156
1202
|
"kind": "interface",
|
|
1157
1203
|
"package": "@nifrajs/web",
|
|
1158
|
-
"signature": "export interface CachedResponse {\n /** The rendered document (UTF-8 HTML, fully buffered). */\n readonly body: string;\n readonly status: number;\n /** Response headers to replay (e.g. `content-type`). */\n readonly headers: Readonly<Record<string, string>>;\n /** When this entry was stored, via the injected clock (ms epoch). */\n readonly storedAt: number;\n /** Freshness window (ms): `now - storedAt >= revalidate` ⇒ stale (serve it, regenerate behind it). */\n readonly revalidate: number;\n}",
|
|
1204
|
+
"signature": "export interface CachedResponse {\n /** The rendered document (UTF-8 HTML, fully buffered). */\n readonly body: string;\n readonly status: number;\n /** Response headers to replay (e.g. `content-type`). */\n readonly headers: Readonly<Record<string, string>>;\n /** When this entry was stored, via the injected clock (ms epoch). */\n readonly storedAt: number;\n /** Freshness window (ms): `now - storedAt >= revalidate` ⇒ stale (serve it, regenerate behind it). */\n readonly revalidate: number;\n /** Public, bounded invalidation labels. A tag purge makes matching entries miss immediately. */\n readonly tags?: readonly string[];\n}",
|
|
1159
1205
|
"doc": "/** A cached SSR response - the bytes + metadata a {@link CacheStore} persists. */"
|
|
1160
1206
|
},
|
|
1161
1207
|
{
|
|
@@ -1181,7 +1227,7 @@
|
|
|
1181
1227
|
"name": "CacheStore",
|
|
1182
1228
|
"kind": "interface",
|
|
1183
1229
|
"package": "@nifrajs/web",
|
|
1184
|
-
"signature": "export interface CacheStore {\n /** The cached entry for `key`, or `undefined` on a miss. */\n get(key: string): Promise<CachedResponse | undefined>;\n /** Store (or overwrite) the entry for `key`. */\n set(key: string, value: CachedResponse): Promise<void>;\n /** Drop `key` (on-demand revalidation / purge). A no-op if absent. */\n delete(key: string): Promise<void>;\n}",
|
|
1230
|
+
"signature": "export interface CacheStore {\n /** The cached entry for `key`, or `undefined` on a miss. */\n get(key: string): Promise<CachedResponse | undefined>;\n /** Store (or overwrite) the entry for `key`. */\n set(key: string, value: CachedResponse): Promise<void>;\n /** Drop `key` (on-demand revalidation / purge). A no-op if absent. */\n delete(key: string): Promise<void>;\n /** Drop every cached response carrying `tag`, when the backend supports tag invalidation. */\n readonly invalidateTag?: (tag: string) => Promise<void>;\n}",
|
|
1185
1231
|
"doc": "/**\n * Pluggable ISR cache backend. **Production deploys MUST use a shared/durable store** (Workers KV,\n * Redis, the platform Cache API) so cached pages *and* revalidation hold across instances;\n * {@link MemoryCacheStore} is dev / single-instance only. Implementations are async so a network store\n * (KV/Redis) fits the same interface.\n */"
|
|
1186
1232
|
},
|
|
1187
1233
|
{
|
|
@@ -1725,6 +1771,57 @@
|
|
|
1725
1771
|
"package": "@nifrajs/testing",
|
|
1726
1772
|
"signature": "export declare function certifyAdapter<Adapter>(options: {\n readonly profile: AdapterCertificationProfile<Adapter>;\n readonly adapterId: string;\n /** A fresh adapter per check prevents one failed check from contaminating the next. */\n readonly createAdapter: () => Adapter | Promise<Adapter>;\n readonly cleanup?: (adapter: Adapter) => void | Promise<void>;\n}): Promise<AdapterCertificationReport>;"
|
|
1727
1773
|
},
|
|
1774
|
+
{
|
|
1775
|
+
"name": "ChannelCloseReason",
|
|
1776
|
+
"kind": "type",
|
|
1777
|
+
"package": "@nifrajs/core",
|
|
1778
|
+
"signature": "export type ChannelCloseReason = \"closed\" | \"backpressure\" | \"aborted\";"
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"name": "ChannelContract",
|
|
1782
|
+
"kind": "interface",
|
|
1783
|
+
"package": "@nifrajs/core",
|
|
1784
|
+
"signature": "export interface ChannelContract<Name extends string, Message> {\n readonly name: Name;\n /** Type-only message witness; adapters never materialize it. */\n readonly __message?: (value: Message) => Message;\n}",
|
|
1785
|
+
"doc": "/** Typed, runtime-neutral channel contracts. Durable replay, presence, fan-out, and tenant-aware\n * routing belong in an adapter; the bundled hub provides only bounded process-local replay for tests\n * and local development. */"
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
"name": "ChannelEvent",
|
|
1789
|
+
"kind": "interface",
|
|
1790
|
+
"package": "@nifrajs/core",
|
|
1791
|
+
"signature": "export interface ChannelEvent<Message> {\n /** Monotonic within one channel; adapters may use a different opaque cursor representation. */\n readonly sequence: number;\n readonly resumeToken: string;\n readonly data: Message;\n}"
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
"name": "ChannelHub",
|
|
1795
|
+
"kind": "interface",
|
|
1796
|
+
"package": "@nifrajs/core",
|
|
1797
|
+
"signature": "export interface ChannelHub {\n subscribe<Name extends string, Message>(channel: ChannelContract<Name, Message>, options?: ChannelSubscribeOptions): ChannelSubscription<Message>;\n publish<Name extends string, Message>(channel: ChannelContract<Name, Message>, data: Message): ChannelEvent<Message>;\n}"
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
"name": "channelReadableStream",
|
|
1801
|
+
"kind": "function",
|
|
1802
|
+
"package": "@nifrajs/core",
|
|
1803
|
+
"signature": "export declare function channelReadableStream<Message>(subscription: ChannelSubscription<Message>): ReadableStream<ChannelEvent<Message>>;",
|
|
1804
|
+
"doc": "/** Adapt a channel subscription to a cancellable Web stream for SSE/HTTP adapters. */"
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
"name": "ChannelResumeUnavailableError",
|
|
1808
|
+
"kind": "class",
|
|
1809
|
+
"package": "@nifrajs/core",
|
|
1810
|
+
"signature": "export declare class ChannelResumeUnavailableError extends Error {\n readonly channel: string;\n readonly resumeToken: string;\n constructor(channel: string, resumeToken: string);\n}",
|
|
1811
|
+
"doc": "/** A requested cursor is malformed, belongs to another channel, or fell outside retained history. */"
|
|
1812
|
+
},
|
|
1813
|
+
{
|
|
1814
|
+
"name": "ChannelSubscribeOptions",
|
|
1815
|
+
"kind": "interface",
|
|
1816
|
+
"package": "@nifrajs/core",
|
|
1817
|
+
"signature": "export interface ChannelSubscribeOptions {\n /** Maximum undelivered events retained for this subscriber. Default 64. */\n readonly maxQueue?: number;\n /** Resume after this opaque cursor. The adapter must fail closed when the cursor is unavailable. */\n readonly resumeFrom?: string;\n readonly signal?: AbortSignal;\n}"
|
|
1818
|
+
},
|
|
1819
|
+
{
|
|
1820
|
+
"name": "ChannelSubscription",
|
|
1821
|
+
"kind": "interface",
|
|
1822
|
+
"package": "@nifrajs/core",
|
|
1823
|
+
"signature": "export interface ChannelSubscription<Message> extends AsyncIterableIterator<ChannelEvent<Message>> {\n readonly channel: string;\n readonly closed: boolean;\n readonly closeReason: ChannelCloseReason | undefined;\n readonly resumeToken: string | undefined;\n close(): void;\n}"
|
|
1824
|
+
},
|
|
1728
1825
|
{
|
|
1729
1826
|
"name": "checkResponseContract",
|
|
1730
1827
|
"kind": "function",
|
|
@@ -2008,6 +2105,19 @@
|
|
|
2008
2105
|
"signature": "export declare function computeIdempotencyFingerprint(method: string, path: string, body: Uint8Array, contentType?: string): Promise<string>;",
|
|
2009
2106
|
"doc": "/**\n * SHA-256 fingerprint binding a key to one request: method, path (+ query), and the raw body bytes.\n * A collision-resistant hash matters - a weak hash would let a crafted body replay another's response.\n */"
|
|
2010
2107
|
},
|
|
2108
|
+
{
|
|
2109
|
+
"name": "conditionalResponse",
|
|
2110
|
+
"kind": "function",
|
|
2111
|
+
"package": "@nifrajs/middleware",
|
|
2112
|
+
"signature": "export declare function conditionalResponse(request: Request, response: Response, options?: ConditionalResponseOptions): Response;",
|
|
2113
|
+
"doc": "/** Apply validators to a response and produce a standards-compliant 304 when it is fresh. */"
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
"name": "ConditionalResponseOptions",
|
|
2117
|
+
"kind": "interface",
|
|
2118
|
+
"package": "@nifrajs/middleware",
|
|
2119
|
+
"signature": "export interface ConditionalResponseOptions {\n /** Entity tag to attach and compare using HTTP weak comparison for GET/HEAD. */\n readonly etag?: string;\n /** Last-modified validator to attach and compare at one-second HTTP date precision. */\n readonly lastModified?: Date;\n}"
|
|
2120
|
+
},
|
|
2011
2121
|
{
|
|
2012
2122
|
"name": "consoleAgentExporter",
|
|
2013
2123
|
"kind": "function",
|
|
@@ -2056,6 +2166,12 @@
|
|
|
2056
2166
|
"package": "@nifrajs/image",
|
|
2057
2167
|
"signature": "export declare const CONTENT_TYPE: Record<OutputFormat, string>;"
|
|
2058
2168
|
},
|
|
2169
|
+
{
|
|
2170
|
+
"name": "ContentPreference",
|
|
2171
|
+
"kind": "interface",
|
|
2172
|
+
"package": "@nifrajs/middleware",
|
|
2173
|
+
"signature": "export interface ContentPreference {\n readonly type: string;\n readonly subtype: string;\n readonly q: number;\n readonly specificity: 0 | 1 | 2;\n}"
|
|
2174
|
+
},
|
|
2059
2175
|
{
|
|
2060
2176
|
"name": "ContentProps",
|
|
2061
2177
|
"kind": "interface",
|
|
@@ -2274,6 +2390,13 @@
|
|
|
2274
2390
|
"package": "@nifrajs/middleware",
|
|
2275
2391
|
"signature": "export declare function createCsrfToken(secret: string | Uint8Array, nonce?: string): Promise<string>;"
|
|
2276
2392
|
},
|
|
2393
|
+
{
|
|
2394
|
+
"name": "createDataPort",
|
|
2395
|
+
"kind": "function",
|
|
2396
|
+
"package": "@nifrajs/core",
|
|
2397
|
+
"signature": "export declare function createDataPort<Contract extends DataContract>(contract: Contract, adapter: TypedDataPort<Contract>, options?: DataPortOptions): DataPort<Contract>;",
|
|
2398
|
+
"doc": "/**\n * Bind a private data adapter to request-local capability evidence.\n *\n * The adapter remains responsible for RLS enforcement and durable storage. This wrapper owns the\n * framework-side proof boundary: it emits exactly the operation's typed `db.read`/`db.write` token\n * before invoking the adapter, and refuses to run when no beacon is configured or the beacon denies\n * the operation. The context is never copied into the request or retained by the port.\n *\n * The emitted token is derived from the **contract**, never from `request.capability`. The typed\n * request narrows that field, but types are erased before this line runs, and a request assembled\n * from decoded input would otherwise let a write operation announce itself as `db.read` - evidence\n * that names the wrong capability is worse than no evidence, because the ledger looks satisfied. An\n * unknown operation, or a declared capability that disagrees with the contract, fails closed.\n */"
|
|
2399
|
+
},
|
|
2277
2400
|
{
|
|
2278
2401
|
"name": "createDevServer",
|
|
2279
2402
|
"kind": "function",
|
|
@@ -2422,6 +2545,13 @@
|
|
|
2422
2545
|
"signature": "export declare function createObservationLifecycle(options?: ObservationLifecycleOptions): ObservationLifecycle;",
|
|
2423
2546
|
"doc": "/** Creates an independent lifecycle factory. Adapters are always called fail-open. */"
|
|
2424
2547
|
},
|
|
2548
|
+
{
|
|
2549
|
+
"name": "createPngRasterizer",
|
|
2550
|
+
"kind": "function",
|
|
2551
|
+
"package": "@nifrajs/image",
|
|
2552
|
+
"signature": "export declare function createPngRasterizer(render: PngRenderer): OgImageRasterizer;",
|
|
2553
|
+
"doc": "/**\n * Adapt an injected SVG→PNG renderer to `ogImageResponse`.\n *\n * The renderer stays application-owned because codec/WASM choice is runtime-specific. For example:\n *\n * ```ts\n * import { Resvg } from \"@resvg/resvg-js\"\n * import { createPngRasterizer } from \"@nifrajs/image/og-png\"\n * const rasterizer = createPngRasterizer((svg) => new Resvg(svg).render().asPng())\n * ```\n *\n * This is the public reference adapter; the core package remains zero-dependency and keeps SVG as its\n * explicit default for callers that do not opt into a codec.\n */"
|
|
2554
|
+
},
|
|
2425
2555
|
{
|
|
2426
2556
|
"name": "createQuery",
|
|
2427
2557
|
"kind": "function",
|
|
@@ -2475,6 +2605,13 @@
|
|
|
2475
2605
|
"package": "@nifrajs/core",
|
|
2476
2606
|
"signature": "export interface CreateRequestLedgerOptions {\n /** HTTP method of the matched route. */\n readonly method: string;\n /** The registered route pattern - callers must never pass the concrete request URL. */\n readonly path: string;\n /** The route's declared capability tokens, surfaced verbatim on the sealed ledger. Default `[]`. */\n readonly declared?: readonly string[];\n /** Entry bound; exceeding it throws {@link EffectLedgerOverflowError}. Default {@link DEFAULT_MAX_ENTRIES}. */\n readonly maxEntries?: number;\n /** Compute the tamper-evident hash chain at seal. Default false. */\n readonly chain?: boolean;\n /** Injectable monotonic clock (ms) for deterministic tests. Default `performance.now`. */\n readonly clock?: () => number;\n}"
|
|
2477
2607
|
},
|
|
2608
|
+
{
|
|
2609
|
+
"name": "createResvgRasterizer",
|
|
2610
|
+
"kind": "function",
|
|
2611
|
+
"package": "@nifrajs/image",
|
|
2612
|
+
"signature": "export declare function createResvgRasterizer(Resvg: ResvgConstructor): OgImageRasterizer;",
|
|
2613
|
+
"doc": "/** Reference adapter for Resvg-compatible constructors, without making the optional codec a dependency. */"
|
|
2614
|
+
},
|
|
2478
2615
|
{
|
|
2479
2616
|
"name": "createSagaEngine",
|
|
2480
2617
|
"kind": "function",
|
|
@@ -2614,6 +2751,13 @@
|
|
|
2614
2751
|
"package": "create-nifra",
|
|
2615
2752
|
"signature": "export declare const CURSOR_MCP_JSON_PATH = \".cursor/mcp.json\";"
|
|
2616
2753
|
},
|
|
2754
|
+
{
|
|
2755
|
+
"name": "DATA_CAPABILITIES",
|
|
2756
|
+
"kind": "const",
|
|
2757
|
+
"package": "@nifrajs/core",
|
|
2758
|
+
"signature": "export declare const DATA_CAPABILITIES: Readonly<{\n readonly read: \"db.read\";\n readonly write: \"db.write\";\n}>;",
|
|
2759
|
+
"doc": "/** Public, token-only data access contracts. Durable adapters and RLS policy enforcement stay outside\n * this package; this subpath defines the typed seam they implement. */"
|
|
2760
|
+
},
|
|
2617
2761
|
{
|
|
2618
2762
|
"name": "DATA_CLASSIFICATION_RANK",
|
|
2619
2763
|
"kind": "const",
|
|
@@ -2635,6 +2779,25 @@
|
|
|
2635
2779
|
"signature": "export declare const DATA_HEADER = \"x-nifra-data\";",
|
|
2636
2780
|
"doc": "/**\n * Request header that asks a nifra route's GET to return just the loader data as JSON (instead of\n * the full HTML document). Set by client-side navigation; read by `createWebApp`'s GET handler.\n */"
|
|
2637
2781
|
},
|
|
2782
|
+
{
|
|
2783
|
+
"name": "DataAccess",
|
|
2784
|
+
"kind": "type",
|
|
2785
|
+
"package": "@nifrajs/core",
|
|
2786
|
+
"signature": "export type DataAccess = keyof typeof DATA_CAPABILITIES;"
|
|
2787
|
+
},
|
|
2788
|
+
{
|
|
2789
|
+
"name": "DataCapability",
|
|
2790
|
+
"kind": "type",
|
|
2791
|
+
"package": "@nifrajs/core",
|
|
2792
|
+
"signature": "export type DataCapability = (typeof DATA_CAPABILITIES)[DataAccess];"
|
|
2793
|
+
},
|
|
2794
|
+
{
|
|
2795
|
+
"name": "DataCapabilityBeacon",
|
|
2796
|
+
"kind": "type",
|
|
2797
|
+
"package": "@nifrajs/core",
|
|
2798
|
+
"signature": "export type DataCapabilityBeacon = (context: object, capability: DataCapability) => void;",
|
|
2799
|
+
"doc": "/** Runtime capability beacon used by a request-bound data port. */"
|
|
2800
|
+
},
|
|
2638
2801
|
{
|
|
2639
2802
|
"name": "DataClassification",
|
|
2640
2803
|
"kind": "type",
|
|
@@ -2642,6 +2805,24 @@
|
|
|
2642
2805
|
"signature": "export type DataClassification = \"public\" | \"pii\" | \"secret\";",
|
|
2643
2806
|
"doc": "/** Sensitivity of the data a response carries. Ordered `public` < `pii` < `secret`. */"
|
|
2644
2807
|
},
|
|
2808
|
+
{
|
|
2809
|
+
"name": "DataContract",
|
|
2810
|
+
"kind": "interface",
|
|
2811
|
+
"package": "@nifrajs/core",
|
|
2812
|
+
"signature": "export interface DataContract<Operations extends DataOperationMap = DataOperationMap> {\n readonly version: string;\n readonly operations: Operations;\n}"
|
|
2813
|
+
},
|
|
2814
|
+
{
|
|
2815
|
+
"name": "DataContractSnapshot",
|
|
2816
|
+
"kind": "interface",
|
|
2817
|
+
"package": "@nifrajs/core",
|
|
2818
|
+
"signature": "export interface DataContractSnapshot {\n readonly version: string;\n readonly operations: Readonly<Record<string, {\n readonly access: DataAccess;\n }>>;\n}"
|
|
2819
|
+
},
|
|
2820
|
+
{
|
|
2821
|
+
"name": "DataDrift",
|
|
2822
|
+
"kind": "interface",
|
|
2823
|
+
"package": "@nifrajs/core",
|
|
2824
|
+
"signature": "export interface DataDrift {\n readonly kind: \"version\" | \"added\" | \"removed\" | \"access-changed\";\n readonly operation?: string;\n readonly declaredAccess?: DataAccess;\n readonly observedAccess?: DataAccess;\n readonly declaredVersion?: string;\n readonly observedVersion?: string;\n}"
|
|
2825
|
+
},
|
|
2645
2826
|
{
|
|
2646
2827
|
"name": "dataFileFor",
|
|
2647
2828
|
"kind": "function",
|
|
@@ -2649,6 +2830,70 @@
|
|
|
2649
2830
|
"signature": "export declare function dataFileFor(pattern: string): string;",
|
|
2650
2831
|
"doc": "/** The static loader-data file next to a route's `index.html`: `/` → `_data.json`, `/a/b` →\n * `a/b/_data.json`. The client fetches it on soft-nav into a prerendered route (no worker). */"
|
|
2651
2832
|
},
|
|
2833
|
+
{
|
|
2834
|
+
"name": "DataInput",
|
|
2835
|
+
"kind": "type",
|
|
2836
|
+
"package": "@nifrajs/core",
|
|
2837
|
+
"signature": "export type DataInput<Contract extends DataContract, Operation extends keyof Contract[\"operations\"] & string> = Contract[\"operations\"][Operation] extends infer Definition ? InputOf<Definition> : never;"
|
|
2838
|
+
},
|
|
2839
|
+
{
|
|
2840
|
+
"name": "DataOperationMap",
|
|
2841
|
+
"kind": "type",
|
|
2842
|
+
"package": "@nifrajs/core",
|
|
2843
|
+
"signature": "export type DataOperationMap = Readonly<Record<string, DataOperationSpec>>;"
|
|
2844
|
+
},
|
|
2845
|
+
{
|
|
2846
|
+
"name": "DataOperationSpec",
|
|
2847
|
+
"kind": "interface",
|
|
2848
|
+
"package": "@nifrajs/core",
|
|
2849
|
+
"signature": "export interface DataOperationSpec {\n readonly access: DataAccess;\n readonly input?: unknown;\n readonly output?: unknown;\n}"
|
|
2850
|
+
},
|
|
2851
|
+
{
|
|
2852
|
+
"name": "DataOutput",
|
|
2853
|
+
"kind": "type",
|
|
2854
|
+
"package": "@nifrajs/core",
|
|
2855
|
+
"signature": "export type DataOutput<Contract extends DataContract, Operation extends keyof Contract[\"operations\"] & string> = Contract[\"operations\"][Operation] extends infer Definition ? OutputOf<Definition> : unknown;"
|
|
2856
|
+
},
|
|
2857
|
+
{
|
|
2858
|
+
"name": "DataPort",
|
|
2859
|
+
"kind": "interface",
|
|
2860
|
+
"package": "@nifrajs/core",
|
|
2861
|
+
"signature": "export interface DataPort<Contract extends DataContract> {\n for(context: object): BoundDataPort<Contract>;\n}",
|
|
2862
|
+
"doc": "/** Public factory for wiring a private data adapter into Nifra's capability evidence chain. */"
|
|
2863
|
+
},
|
|
2864
|
+
{
|
|
2865
|
+
"name": "DataPortOptions",
|
|
2866
|
+
"kind": "interface",
|
|
2867
|
+
"package": "@nifrajs/core",
|
|
2868
|
+
"signature": "export interface DataPortOptions {\n /** Usually `useCapability` from `@nifrajs/core/capabilities`. */\n readonly beacon?: DataCapabilityBeacon;\n}",
|
|
2869
|
+
"doc": "/** Options for the public request-bound data port wrapper. */"
|
|
2870
|
+
},
|
|
2871
|
+
{
|
|
2872
|
+
"name": "DataRequest",
|
|
2873
|
+
"kind": "interface",
|
|
2874
|
+
"package": "@nifrajs/core",
|
|
2875
|
+
"signature": "export interface DataRequest<Operation extends string = string, Input = unknown> {\n readonly operation: Operation;\n readonly scope: DataScope;\n readonly capability: DataCapability;\n readonly input: Input;\n}"
|
|
2876
|
+
},
|
|
2877
|
+
{
|
|
2878
|
+
"name": "DataRequestFor",
|
|
2879
|
+
"kind": "type",
|
|
2880
|
+
"package": "@nifrajs/core",
|
|
2881
|
+
"signature": "export type DataRequestFor<Contract extends DataContract, Operation extends keyof Contract[\"operations\"] & string> = {\n readonly operation: Operation;\n readonly scope: DataScope;\n readonly capability: CapabilityOf<Contract[\"operations\"][Operation]>;\n} & InputField<DataInput<Contract, Operation>>;"
|
|
2882
|
+
},
|
|
2883
|
+
{
|
|
2884
|
+
"name": "dataScope",
|
|
2885
|
+
"kind": "function",
|
|
2886
|
+
"package": "@nifrajs/core",
|
|
2887
|
+
"signature": "export declare function dataScope(token: string, digest?: string): DataScope;",
|
|
2888
|
+
"doc": "/** Backward-compatible constructor for {@link RlsScope}. */"
|
|
2889
|
+
},
|
|
2890
|
+
{
|
|
2891
|
+
"name": "DataScope",
|
|
2892
|
+
"kind": "type",
|
|
2893
|
+
"package": "@nifrajs/core",
|
|
2894
|
+
"signature": "export type DataScope = RlsScope;",
|
|
2895
|
+
"doc": "/** Backward-compatible name for the request scope carried by every data operation. */"
|
|
2896
|
+
},
|
|
2652
2897
|
{
|
|
2653
2898
|
"name": "DeadlineAdmission",
|
|
2654
2899
|
"kind": "type",
|
|
@@ -2816,6 +3061,13 @@
|
|
|
2816
3061
|
"signature": "export declare function defineCertificationProfile<Adapter>(profile: AdapterCertificationProfile<Adapter>): AdapterCertificationProfile<Adapter>;",
|
|
2817
3062
|
"doc": "/** Define and validate a custom domain/provider profile at module initialization. */"
|
|
2818
3063
|
},
|
|
3064
|
+
{
|
|
3065
|
+
"name": "defineChannel",
|
|
3066
|
+
"kind": "function",
|
|
3067
|
+
"package": "@nifrajs/core",
|
|
3068
|
+
"signature": "export declare function defineChannel<Name extends string, Message>(name: Name): ChannelContract<Name, Message>;",
|
|
3069
|
+
"doc": "/** Define a typed channel name. Message types are erased; adapters own validation at their boundary. */"
|
|
3070
|
+
},
|
|
2819
3071
|
{
|
|
2820
3072
|
"name": "defineCollection",
|
|
2821
3073
|
"kind": "function",
|
|
@@ -2830,6 +3082,13 @@
|
|
|
2830
3082
|
"signature": "export declare function defineContract<const C extends ContractShape>(contract: C): C;",
|
|
2831
3083
|
"doc": "/**\n * Define a standalone, versionable contract. Identity at runtime (it returns the\n * contract for type inference via the `const` type parameter, which preserves the\n * path/method literals) plus boot-time (L2) validation: each operation must use a\n * known method, a path starting with `/`, and no two operations may share a\n * `(method, path)`. Deeper path validation (param names, wildcard position) runs\n * when the contract is `implement`ed.\n */"
|
|
2832
3084
|
},
|
|
3085
|
+
{
|
|
3086
|
+
"name": "defineDataContract",
|
|
3087
|
+
"kind": "function",
|
|
3088
|
+
"package": "@nifrajs/core",
|
|
3089
|
+
"signature": "export declare function defineDataContract<const Operations extends DataOperationMap>(input: {\n readonly version: string;\n readonly operations: Operations;\n}): DataContract<Operations>;",
|
|
3090
|
+
"doc": "/** Define and freeze a token-only data contract. Input/output types are erased at runtime. */"
|
|
3091
|
+
},
|
|
2833
3092
|
{
|
|
2834
3093
|
"name": "defineEnv",
|
|
2835
3094
|
"kind": "function",
|
|
@@ -2946,7 +3205,7 @@
|
|
|
2946
3205
|
"name": "deriveRouteEntry",
|
|
2947
3206
|
"kind": "function",
|
|
2948
3207
|
"package": "@nifrajs/web",
|
|
2949
|
-
"signature": "export declare function deriveRouteEntry(id: string, pattern: string, module: Pick<RouteModule, \"prerender\" | \"getStaticPaths\" | \"revalidate\" | \"hydrate\">, prerenderedPaths?: readonly string[]): RouteManifestEntry;",
|
|
3208
|
+
"signature": "export declare function deriveRouteEntry(id: string, pattern: string, module: Pick<RouteModule, \"prerender\" | \"getStaticPaths\" | \"revalidate\" | \"revalidateTags\" | \"hydrate\">, prerenderedPaths?: readonly string[]): RouteManifestEntry;",
|
|
2950
3209
|
"doc": "/**\n * Derive one route's behaviour from its module exports.\n *\n * `prerender`/`getStaticPaths` win over `revalidate`: a page rendered at build time is not revalidated at\n * runtime, so if a route declares both, the build-time answer is the one that describes what ships. That\n * combination is worth surfacing rather than silently resolving, which is what `conflicts` is for once a\n * target is known.\n */"
|
|
2951
3210
|
},
|
|
2952
3211
|
{
|
|
@@ -3049,6 +3308,13 @@
|
|
|
3049
3308
|
"signature": "export interface DiagnosticFrame {\n readonly raw: string;\n readonly file?: string;\n readonly line?: number;\n readonly column?: number;\n}",
|
|
3050
3309
|
"doc": "/** One parsed stack frame. `file`/`line`/`column` are present only when the frame could be located. */"
|
|
3051
3310
|
},
|
|
3311
|
+
{
|
|
3312
|
+
"name": "diffDataContract",
|
|
3313
|
+
"kind": "function",
|
|
3314
|
+
"package": "@nifrajs/core",
|
|
3315
|
+
"signature": "export declare function diffDataContract(declared: DataContract, observed: DataContractSnapshot | DataContract): readonly DataDrift[];",
|
|
3316
|
+
"doc": "/** Compare a declared contract with an adapter-observed token-only snapshot. */"
|
|
3317
|
+
},
|
|
3052
3318
|
{
|
|
3053
3319
|
"name": "diffManifestRoutes",
|
|
3054
3320
|
"kind": "function",
|
|
@@ -3718,6 +3984,18 @@
|
|
|
3718
3984
|
"package": "@nifrajs/testing",
|
|
3719
3985
|
"signature": "export interface FailureScenarioReport {\n readonly name: string;\n readonly ok: boolean;\n readonly replay: FailureReplay;\n readonly evidence: readonly FailureEvidence[];\n /** Sanitized failure identity. Messages and stacks are deliberately excluded. */\n readonly error?: {\n readonly name: string;\n readonly kind?: FailureInjectedError[\"kind\"];\n };\n}"
|
|
3720
3986
|
},
|
|
3987
|
+
{
|
|
3988
|
+
"name": "FetchApp",
|
|
3989
|
+
"kind": "interface",
|
|
3990
|
+
"package": "@nifrajs/core",
|
|
3991
|
+
"signature": "export interface FetchApp<Env = unknown> {\n fetch(request: Request, platform?: Platform<Env>): MaybePromise<Response>;\n}"
|
|
3992
|
+
},
|
|
3993
|
+
{
|
|
3994
|
+
"name": "FetchApp",
|
|
3995
|
+
"kind": "interface",
|
|
3996
|
+
"package": "nifra",
|
|
3997
|
+
"signature": "export interface FetchApp<Env = unknown> {\n fetch(request: Request, platform?: Platform<Env>): MaybePromise<Response>;\n}"
|
|
3998
|
+
},
|
|
3721
3999
|
{
|
|
3722
4000
|
"name": "Fetcher",
|
|
3723
4001
|
"kind": "interface",
|
|
@@ -4799,6 +5077,13 @@
|
|
|
4799
5077
|
"signature": "export declare function isAllowedFontUrl(raw: string): boolean;",
|
|
4800
5078
|
"doc": "/** `true` iff `raw` is an `https://fonts.gstatic.com/…` URL - the only host we'll download from. */"
|
|
4801
5079
|
},
|
|
5080
|
+
{
|
|
5081
|
+
"name": "isAuthorized",
|
|
5082
|
+
"kind": "function",
|
|
5083
|
+
"package": "@nifrajs/auth",
|
|
5084
|
+
"signature": "export declare function isAuthorized<Subject, Resource>(authorizer: Authorizer<Subject, Resource>, request: AuthorizationRequest<Subject, Resource>): Promise<boolean>;",
|
|
5085
|
+
"doc": "/** Evaluate a policy, failing closed for any non-true result. */"
|
|
5086
|
+
},
|
|
4802
5087
|
{
|
|
4803
5088
|
"name": "isBuildTarget",
|
|
4804
5089
|
"kind": "function",
|
|
@@ -4908,6 +5193,13 @@
|
|
|
4908
5193
|
"signature": "export declare const ISR_REVALIDATE_HEADER = \"x-nifra-isr-revalidate\";",
|
|
4909
5194
|
"doc": "/**\n * Response header a route uses to advertise its ISR freshness (**seconds**) to a {@link withISR}\n * wrapper - `createWebApp` emits it from a route's `export const revalidate`. Deliberately distinct\n * from the action-revalidation `x-nifra-revalidate` header (a CSV path list the *client* parses to\n * refetch): this one is an integer TTL the *wrapper* reads, so the two channels never alias.\n */"
|
|
4910
5195
|
},
|
|
5196
|
+
{
|
|
5197
|
+
"name": "ISR_REVALIDATE_TAGS_HEADER",
|
|
5198
|
+
"kind": "const",
|
|
5199
|
+
"package": "@nifrajs/web",
|
|
5200
|
+
"signature": "export declare const ISR_REVALIDATE_TAGS_HEADER = \"x-nifra-isr-tags\";",
|
|
5201
|
+
"doc": "/** Response header carrying bounded route tags into {@link withISR}. */"
|
|
5202
|
+
},
|
|
4911
5203
|
{
|
|
4912
5204
|
"name": "ISR_STATUS_HEADER",
|
|
4913
5205
|
"kind": "const",
|
|
@@ -5146,14 +5438,14 @@
|
|
|
5146
5438
|
"name": "KVCacheStore",
|
|
5147
5439
|
"kind": "class",
|
|
5148
5440
|
"package": "@nifrajs/web",
|
|
5149
|
-
"signature": "export declare class KVCacheStore implements CacheStore {\n private readonly kv;\n private readonly putOptions;\n constructor(kv: KVNamespaceLike, options?: KVCacheStoreOptions);\n get(key: string): Promise<CachedResponse | undefined>;\n set(key: string, value: CachedResponse): Promise<void>;\n delete(key: string): Promise<void>;\n}",
|
|
5150
|
-
"doc": "/**\n * A {@link CacheStore} backed by a **Cloudflare Workers KV** namespace (or any {@link KVNamespaceLike}\n * binding) - the production-grade shared/durable store ISR wants: cached pages and on-demand purges\n * hold *across* worker instances (unlike the per-instance {@link MemoryCacheStore}). Entries serialize\n * to JSON; every read is validated before it's trusted (a malformed/version-skewed entry is treated as\n * a miss). Construct it in your Workers `fetch` from the binding: `new KVCacheStore(env.ISR_CACHE)`.\n */"
|
|
5441
|
+
"signature": "export declare class KVCacheStore implements CacheStore {\n private readonly kv;\n private readonly putOptions;\n constructor(kv: KVNamespaceLike, options?: KVCacheStoreOptions);\n get(key: string): Promise<CachedResponse | undefined>;\n set(key: string, value: CachedResponse): Promise<void>;\n delete(key: string): Promise<void>;\n invalidateTag(tag: string): Promise<void>;\n private tagKey;\n}",
|
|
5442
|
+
"doc": "/**\n * A {@link CacheStore} backed by a **Cloudflare Workers KV** namespace (or any {@link KVNamespaceLike}\n * binding) - the production-grade shared/durable store ISR wants: cached pages and on-demand purges\n * hold *across* worker instances (unlike the per-instance {@link MemoryCacheStore}). Entries serialize\n * to JSON; every read is validated before it's trusted (a malformed/version-skewed entry is treated as\n * a miss). Construct it in your Workers `fetch` from the binding: `new KVCacheStore(env.ISR_CACHE)`.\n *\n * Cloudflare is the default, not a requirement: {@link KVNamespaceLike} is three structural methods,\n * so a Redis, Deno KV, or Upstash binding satisfies it (pass `minExpirationTtl` for their TTL floor).\n * A backend that *can* enumerate keys deserves its own {@link CacheStore} rather than this one - the\n * epoch indirection in {@link KVCacheStore.invalidateTag} exists only because KV cannot list by tag.\n */"
|
|
5151
5443
|
},
|
|
5152
5444
|
{
|
|
5153
5445
|
"name": "KVCacheStoreOptions",
|
|
5154
5446
|
"kind": "interface",
|
|
5155
5447
|
"package": "@nifrajs/web",
|
|
5156
|
-
"signature": "export interface KVCacheStoreOptions {\n /**\n * GC backstop (**seconds**) written as the KV entry's `expirationTtl`, so abandoned entries\n * eventually evict. MUST exceed your longest `revalidate` window - otherwise KV expiry turns a\n * stale-while-revalidate into a *blocking* miss (the entry vanishes instead of being served stale\n * while it regenerates) - and be ≥ 60 (Cloudflare KV's minimum). Omit ⇒ entries persist until\n * overwritten on regeneration or purged via `revalidateEndpoint`.\n */\n readonly expirationTtl?: number;\n}"
|
|
5448
|
+
"signature": "export interface KVCacheStoreOptions {\n /**\n * GC backstop (**seconds**) written as the KV entry's `expirationTtl`, so abandoned entries\n * eventually evict. MUST exceed your longest `revalidate` window - otherwise KV expiry turns a\n * stale-while-revalidate into a *blocking* miss (the entry vanishes instead of being served stale\n * while it regenerates) - and be ≥ 60 (Cloudflare KV's minimum). Omit ⇒ entries persist until\n * overwritten on regeneration or purged via `revalidateEndpoint`.\n */\n readonly expirationTtl?: number;\n /**\n * Smallest `expirationTtl` this binding accepts (**seconds**). Defaults to 60, which is Cloudflare\n * KV's floor - the common case, and worth rejecting at construction because Cloudflare fails the\n * `put` at runtime instead, one deploy later.\n *\n * The floor belongs to the *binding*, not to this class. {@link KVNamespaceLike} is structural, so\n * a Redis, Deno KV, Upstash, or in-memory binding satisfies it too, and those accept far shorter\n * TTLs. Pass their real minimum, or `0` for a backend with none.\n */\n readonly minExpirationTtl?: number;\n}"
|
|
5157
5449
|
},
|
|
5158
5450
|
{
|
|
5159
5451
|
"name": "KVNamespaceLike",
|
|
@@ -5176,6 +5468,66 @@
|
|
|
5176
5468
|
"signature": "export declare class KVSessionStore implements SessionStore {\n private readonly kv;\n constructor(kv: KVNamespaceLike);\n get(id: string): Promise<SessionRecord | undefined>;\n set(id: string, record: SessionRecord): Promise<void>;\n delete(id: string): Promise<void>;\n}",
|
|
5177
5469
|
"doc": "/**\n * A {@link SessionStore} backed by a **Cloudflare Workers KV** namespace (or any {@link KVNamespaceLike})\n * - the durable, shared production store: sessions hold across worker instances and survive restarts.\n * Records serialize to JSON; the entry's KV `expiration` is set from the record's `expiresAt` so KV\n * auto-evicts the session (a GC backstop - the manager still authoritatively checks expiry on read).\n * Every read is validated, so a corrupt/skewed entry reads as no session.\n */"
|
|
5178
5470
|
},
|
|
5471
|
+
{
|
|
5472
|
+
"name": "LambdaEvent",
|
|
5473
|
+
"kind": "type",
|
|
5474
|
+
"package": "@nifrajs/core",
|
|
5475
|
+
"signature": "export type LambdaEvent = LambdaV2Event | LambdaV1Event;"
|
|
5476
|
+
},
|
|
5477
|
+
{
|
|
5478
|
+
"name": "LambdaEvent",
|
|
5479
|
+
"kind": "type",
|
|
5480
|
+
"package": "nifra",
|
|
5481
|
+
"signature": "export type LambdaEvent = LambdaV2Event | LambdaV1Event;"
|
|
5482
|
+
},
|
|
5483
|
+
{
|
|
5484
|
+
"name": "LambdaHandler",
|
|
5485
|
+
"kind": "type",
|
|
5486
|
+
"package": "@nifrajs/core",
|
|
5487
|
+
"signature": "export type LambdaHandler = (event: LambdaEvent, context?: unknown) => Promise<LambdaResponse>;"
|
|
5488
|
+
},
|
|
5489
|
+
{
|
|
5490
|
+
"name": "LambdaHandler",
|
|
5491
|
+
"kind": "type",
|
|
5492
|
+
"package": "nifra",
|
|
5493
|
+
"signature": "export type LambdaHandler = (event: LambdaEvent, context?: unknown) => Promise<LambdaResponse>;"
|
|
5494
|
+
},
|
|
5495
|
+
{
|
|
5496
|
+
"name": "LambdaResponse",
|
|
5497
|
+
"kind": "type",
|
|
5498
|
+
"package": "@nifrajs/core",
|
|
5499
|
+
"signature": "export type LambdaResponse = PlatformResponse;"
|
|
5500
|
+
},
|
|
5501
|
+
{
|
|
5502
|
+
"name": "LambdaResponse",
|
|
5503
|
+
"kind": "type",
|
|
5504
|
+
"package": "nifra",
|
|
5505
|
+
"signature": "export type LambdaResponse = PlatformResponse;"
|
|
5506
|
+
},
|
|
5507
|
+
{
|
|
5508
|
+
"name": "LambdaV1Event",
|
|
5509
|
+
"kind": "interface",
|
|
5510
|
+
"package": "@nifrajs/core",
|
|
5511
|
+
"signature": "export interface LambdaV1Event {\n readonly httpMethod: string;\n readonly path: string;\n readonly headers?: HeaderRecord;\n readonly multiValueHeaders?: HeaderRecord;\n readonly queryStringParameters?: Readonly<Record<string, string | undefined>>;\n readonly multiValueQueryStringParameters?: Readonly<Record<string, readonly string[] | undefined>>;\n readonly body?: string | null;\n readonly isBase64Encoded?: boolean;\n readonly requestContext?: {\n readonly domainName?: string;\n };\n}"
|
|
5512
|
+
},
|
|
5513
|
+
{
|
|
5514
|
+
"name": "LambdaV1Event",
|
|
5515
|
+
"kind": "interface",
|
|
5516
|
+
"package": "nifra",
|
|
5517
|
+
"signature": "export interface LambdaV1Event {\n readonly httpMethod: string;\n readonly path: string;\n readonly headers?: HeaderRecord;\n readonly multiValueHeaders?: HeaderRecord;\n readonly queryStringParameters?: Readonly<Record<string, string | undefined>>;\n readonly multiValueQueryStringParameters?: Readonly<Record<string, readonly string[] | undefined>>;\n readonly body?: string | null;\n readonly isBase64Encoded?: boolean;\n readonly requestContext?: {\n readonly domainName?: string;\n };\n}"
|
|
5518
|
+
},
|
|
5519
|
+
{
|
|
5520
|
+
"name": "LambdaV2Event",
|
|
5521
|
+
"kind": "interface",
|
|
5522
|
+
"package": "@nifrajs/core",
|
|
5523
|
+
"signature": "export interface LambdaV2Event {\n readonly version?: \"2.0\";\n readonly rawPath?: string;\n readonly rawQueryString?: string;\n readonly headers?: HeaderRecord;\n readonly cookies?: readonly string[];\n readonly body?: string | null;\n readonly isBase64Encoded?: boolean;\n readonly requestContext?: {\n readonly domainName?: string;\n readonly http?: {\n readonly method: string;\n readonly path?: string;\n };\n };\n}"
|
|
5524
|
+
},
|
|
5525
|
+
{
|
|
5526
|
+
"name": "LambdaV2Event",
|
|
5527
|
+
"kind": "interface",
|
|
5528
|
+
"package": "nifra",
|
|
5529
|
+
"signature": "export interface LambdaV2Event {\n readonly version?: \"2.0\";\n readonly rawPath?: string;\n readonly rawQueryString?: string;\n readonly headers?: HeaderRecord;\n readonly cookies?: readonly string[];\n readonly body?: string | null;\n readonly isBase64Encoded?: boolean;\n readonly requestContext?: {\n readonly domainName?: string;\n readonly http?: {\n readonly method: string;\n readonly path?: string;\n };\n };\n}"
|
|
5530
|
+
},
|
|
5179
5531
|
{
|
|
5180
5532
|
"name": "language",
|
|
5181
5533
|
"kind": "function",
|
|
@@ -5687,7 +6039,7 @@
|
|
|
5687
6039
|
"name": "MemoryCacheStore",
|
|
5688
6040
|
"kind": "class",
|
|
5689
6041
|
"package": "@nifrajs/web",
|
|
5690
|
-
"signature": "export declare class MemoryCacheStore implements CacheStore {\n private readonly cache;\n private readonly max;\n constructor(options?: MemoryCacheStoreOptions);\n get(key: string): Promise<CachedResponse | undefined>;\n set(key: string, value: CachedResponse): Promise<void>;\n delete(key: string): Promise<void>;\n}",
|
|
6042
|
+
"signature": "export declare class MemoryCacheStore implements CacheStore {\n private readonly cache;\n private readonly max;\n private readonly tagEpoch;\n constructor(options?: MemoryCacheStoreOptions);\n get(key: string): Promise<CachedResponse | undefined>;\n set(key: string, value: CachedResponse): Promise<void>;\n delete(key: string): Promise<void>;\n invalidateTag(tag: string): Promise<void>;\n private pruneTagEpochs;\n}",
|
|
5691
6043
|
"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 */"
|
|
5692
6044
|
},
|
|
5693
6045
|
{
|
|
@@ -5702,6 +6054,19 @@
|
|
|
5702
6054
|
"package": "@nifrajs/core",
|
|
5703
6055
|
"signature": "export interface MemoryCausalityStoreOptions {\n /** Global record bound. Default 10,000. */\n readonly maxRecords?: number;\n /** In-memory evidence disappears on restart and is rejected in production unless explicitly allowed. */\n readonly allowInProduction?: boolean;\n}"
|
|
5704
6056
|
},
|
|
6057
|
+
{
|
|
6058
|
+
"name": "memoryChannelHub",
|
|
6059
|
+
"kind": "function",
|
|
6060
|
+
"package": "@nifrajs/core",
|
|
6061
|
+
"signature": "export declare function memoryChannelHub(options?: MemoryChannelHubOptions): ChannelHub;",
|
|
6062
|
+
"doc": "/** A bounded in-memory hub suitable for tests and local development, never for durable fan-out. */"
|
|
6063
|
+
},
|
|
6064
|
+
{
|
|
6065
|
+
"name": "MemoryChannelHubOptions",
|
|
6066
|
+
"kind": "interface",
|
|
6067
|
+
"package": "@nifrajs/core",
|
|
6068
|
+
"signature": "export interface MemoryChannelHubOptions {\n /** Default queue bound per subscriber. Default 64. */\n readonly maxQueue?: number;\n /** Maximum events retained per channel for local cursor replay. Default: the queue bound. */\n readonly historySize?: number;\n}"
|
|
6069
|
+
},
|
|
5705
6070
|
{
|
|
5706
6071
|
"name": "MemoryDurableEffectStore",
|
|
5707
6072
|
"kind": "class",
|
|
@@ -6048,6 +6413,37 @@
|
|
|
6048
6413
|
"signature": "export interface MovableStorageAdapter extends StorageAdapter {\n copy(sourceKey: string, destinationKey: string): Promise<void>;\n move(sourceKey: string, destinationKey: string): Promise<void>;\n}",
|
|
6049
6414
|
"doc": "/** Optional server-side copy/move capability. */"
|
|
6050
6415
|
},
|
|
6416
|
+
{
|
|
6417
|
+
"name": "MultipartBody",
|
|
6418
|
+
"kind": "type",
|
|
6419
|
+
"package": "@nifrajs/middleware",
|
|
6420
|
+
"signature": "export type MultipartBody = string | Uint8Array | ArrayBuffer | ArrayBufferView | Blob | ReadableStream<Uint8Array>;"
|
|
6421
|
+
},
|
|
6422
|
+
{
|
|
6423
|
+
"name": "MultipartHeadersInit",
|
|
6424
|
+
"kind": "type",
|
|
6425
|
+
"package": "@nifrajs/middleware",
|
|
6426
|
+
"signature": "export type MultipartHeadersInit = Headers | Readonly<Record<string, string>> | ReadonlyArray<readonly [string, string]>;"
|
|
6427
|
+
},
|
|
6428
|
+
{
|
|
6429
|
+
"name": "MultipartPart",
|
|
6430
|
+
"kind": "interface",
|
|
6431
|
+
"package": "@nifrajs/middleware",
|
|
6432
|
+
"signature": "export interface MultipartPart {\n readonly headers?: MultipartHeadersInit;\n readonly body: MultipartBody;\n}"
|
|
6433
|
+
},
|
|
6434
|
+
{
|
|
6435
|
+
"name": "multipartResponse",
|
|
6436
|
+
"kind": "function",
|
|
6437
|
+
"package": "@nifrajs/middleware",
|
|
6438
|
+
"signature": "export declare function multipartResponse(parts: Iterable<MultipartPart> | AsyncIterable<MultipartPart>, options?: MultipartResponseOptions): Response;",
|
|
6439
|
+
"doc": "/**\n * Stream a multipart response without buffering the parts. The part headers and bodies are emitted\n * as supplied; this helper deliberately does not persist, inspect, or serialize payloads.\n */"
|
|
6440
|
+
},
|
|
6441
|
+
{
|
|
6442
|
+
"name": "MultipartResponseOptions",
|
|
6443
|
+
"kind": "interface",
|
|
6444
|
+
"package": "@nifrajs/middleware",
|
|
6445
|
+
"signature": "export interface MultipartResponseOptions {\n /** Boundary token. If omitted, a cryptographically random boundary is generated. */\n readonly boundary?: string;\n /** Multipart subtype. Defaults to `mixed`; use `form-data` when parts carry form names. */\n readonly subtype?: \"mixed\" | \"form-data\";\n /** HTTP response status. Defaults to 200. */\n readonly status?: number;\n}"
|
|
6446
|
+
},
|
|
6051
6447
|
{
|
|
6052
6448
|
"name": "MutationCallbacks",
|
|
6053
6449
|
"kind": "interface",
|
|
@@ -6195,6 +6591,13 @@
|
|
|
6195
6591
|
"signature": "export interface NavLinkRenderProps {\n /** True when the current location matches this link's `to` (prefix match, or exact when `end`). */\n readonly isActive: boolean;\n /** True while a client navigation to THIS link's target is in flight (matched like `isActive`).\n * `false` on SSR and when idle. Use it to show a per-link spinner during the transition. */\n readonly isPending: boolean;\n}",
|
|
6196
6592
|
"doc": "/** The state a {@link NavLink}'s function-form `className`/`style`/`children` receive. */"
|
|
6197
6593
|
},
|
|
6594
|
+
{
|
|
6595
|
+
"name": "negotiateContentType",
|
|
6596
|
+
"kind": "function",
|
|
6597
|
+
"package": "@nifrajs/middleware",
|
|
6598
|
+
"signature": "export declare function negotiateContentType(accept: string | null | Headers | Request, offered: readonly string[]): string | undefined;",
|
|
6599
|
+
"doc": "/**\n * Select the best offered media type for an `Accept` header. The returned string is the original\n * offered value, so parameters such as `profile` are preserved. An absent/empty header accepts the\n * first offer; an explicit `q=0` or no matching offer returns `undefined`.\n */"
|
|
6600
|
+
},
|
|
6198
6601
|
{
|
|
6199
6602
|
"name": "negotiateLocale",
|
|
6200
6603
|
"kind": "function",
|
|
@@ -6208,6 +6611,30 @@
|
|
|
6208
6611
|
"package": "@nifrajs/i18n",
|
|
6209
6612
|
"signature": "export interface NegotiateOptions {\n /** The locales the app supports, e.g. `[\"en\", \"fr\", \"de\"]`. Matched case-insensitively. */\n readonly locales: readonly Locale[];\n /** Returned when nothing matches. */\n readonly defaultLocale: Locale;\n /** A cookie name whose value (if a supported locale) wins over `Accept-Language` (a user's explicit\n * choice). Omit to skip the cookie. */\n readonly cookie?: string;\n}"
|
|
6210
6613
|
},
|
|
6614
|
+
{
|
|
6615
|
+
"name": "NetlifyEvent",
|
|
6616
|
+
"kind": "interface",
|
|
6617
|
+
"package": "@nifrajs/core",
|
|
6618
|
+
"signature": "export interface NetlifyEvent {\n readonly httpMethod: string;\n readonly path: string;\n readonly rawUrl?: string;\n readonly rawQuery?: string;\n readonly headers?: HeaderRecord;\n readonly multiValueHeaders?: HeaderRecord;\n readonly body?: string | null;\n readonly isBase64Encoded?: boolean;\n readonly cookies?: readonly string[];\n}"
|
|
6619
|
+
},
|
|
6620
|
+
{
|
|
6621
|
+
"name": "NetlifyEvent",
|
|
6622
|
+
"kind": "interface",
|
|
6623
|
+
"package": "nifra",
|
|
6624
|
+
"signature": "export interface NetlifyEvent {\n readonly httpMethod: string;\n readonly path: string;\n readonly rawUrl?: string;\n readonly rawQuery?: string;\n readonly headers?: HeaderRecord;\n readonly multiValueHeaders?: HeaderRecord;\n readonly body?: string | null;\n readonly isBase64Encoded?: boolean;\n readonly cookies?: readonly string[];\n}"
|
|
6625
|
+
},
|
|
6626
|
+
{
|
|
6627
|
+
"name": "NetlifyHandler",
|
|
6628
|
+
"kind": "type",
|
|
6629
|
+
"package": "@nifrajs/core",
|
|
6630
|
+
"signature": "export type NetlifyHandler = (event: NetlifyEvent) => Promise<PlatformResponse>;"
|
|
6631
|
+
},
|
|
6632
|
+
{
|
|
6633
|
+
"name": "NetlifyHandler",
|
|
6634
|
+
"kind": "type",
|
|
6635
|
+
"package": "nifra",
|
|
6636
|
+
"signature": "export type NetlifyHandler = (event: NetlifyEvent) => Promise<PlatformResponse>;"
|
|
6637
|
+
},
|
|
6211
6638
|
{
|
|
6212
6639
|
"name": "nextRun",
|
|
6213
6640
|
"kind": "function",
|
|
@@ -6502,6 +6929,32 @@
|
|
|
6502
6929
|
"package": "@nifrajs/otel",
|
|
6503
6930
|
"signature": "export interface ObservationParent {\n readonly traceId: string;\n readonly spanId: string;\n readonly sampled: boolean;\n}"
|
|
6504
6931
|
},
|
|
6932
|
+
{
|
|
6933
|
+
"name": "OgImageOptions",
|
|
6934
|
+
"kind": "interface",
|
|
6935
|
+
"package": "@nifrajs/image",
|
|
6936
|
+
"signature": "export interface OgImageOptions {\n readonly title: string;\n readonly description?: string;\n readonly eyebrow?: string;\n readonly width?: number;\n readonly height?: number;\n readonly background?: string;\n readonly foreground?: string;\n readonly accent?: string;\n /** Optional PNG/JPEG/WebP backend. Omit to serve the generated SVG. */\n readonly rasterizer?: OgImageRasterizer;\n /** Browser/cache freshness in seconds. Default one year. */\n readonly cacheMaxAge?: number;\n /** Maximum bytes accepted from an injected rasterizer. Default 10 MiB. */\n readonly maxBytes?: number;\n}"
|
|
6937
|
+
},
|
|
6938
|
+
{
|
|
6939
|
+
"name": "OgImageRasterized",
|
|
6940
|
+
"kind": "interface",
|
|
6941
|
+
"package": "@nifrajs/image",
|
|
6942
|
+
"signature": "export interface OgImageRasterized {\n readonly bytes: Uint8Array;\n readonly contentType: string;\n}",
|
|
6943
|
+
"doc": "/**\n * Dependency-free Open Graph image generation.\n *\n * **The default SVG output does not work as a social card.** X, Facebook, LinkedIn, Slack, Discord\n * and iMessage all refuse `image/svg+xml` for `og:image` and render nothing - the link preview is\n * blank, and it is blank silently, which is the failure mode this package exists to prevent\n * elsewhere. Serving SVG is only useful where you control the consumer: an internal dashboard, a\n * docs thumbnail, a preview route you look at yourself.\n *\n * **For a card a crawler will actually render, pass `rasterizer`.** It receives the SVG and returns\n * PNG/JPEG/WebP bytes - a Satori + Resvg pair is the usual choice. Keeping it injected rather than\n * bundled is what keeps a WASM rasterizer out of `@nifrajs/image` and out of every browser bundle\n * that imports this package for something else.\n *\n * ```ts\n * import { ogImageResponse } from \"@nifrajs/image/og\"\n *\n * // Renders on X, Facebook, LinkedIn, Slack.\n * export const GET = (request: Request) =>\n * ogImageResponse({ title: \"Ship it\", rasterizer: pngRasterizer }, request)\n * ```\n */"
|
|
6944
|
+
},
|
|
6945
|
+
{
|
|
6946
|
+
"name": "OgImageRasterizer",
|
|
6947
|
+
"kind": "type",
|
|
6948
|
+
"package": "@nifrajs/image",
|
|
6949
|
+
"signature": "export type OgImageRasterizer = (svg: string) => OgImageRasterized | Promise<OgImageRasterized>;"
|
|
6950
|
+
},
|
|
6951
|
+
{
|
|
6952
|
+
"name": "ogImageResponse",
|
|
6953
|
+
"kind": "function",
|
|
6954
|
+
"package": "@nifrajs/image",
|
|
6955
|
+
"signature": "export declare function ogImageResponse(options: OgImageOptions, request?: Request): Promise<Response>;",
|
|
6956
|
+
"doc": "/**\n * Build a cacheable OG image response. GET and HEAD are supported; conditional requests short-circuit\n * rasterization, so a crawler revalidation never repeats expensive codec work.\n */"
|
|
6957
|
+
},
|
|
6505
6958
|
{
|
|
6506
6959
|
"name": "OnRequestResult",
|
|
6507
6960
|
"kind": "type",
|
|
@@ -6681,6 +7134,27 @@
|
|
|
6681
7134
|
"signature": "export declare function parse(text: string, limits?: WireDecodeLimits): unknown;",
|
|
6682
7135
|
"doc": "/** `JSON.parse` + `decode` in one call - the rich-type equivalent of `JSON.parse`. */"
|
|
6683
7136
|
},
|
|
7137
|
+
{
|
|
7138
|
+
"name": "parseAcceptHeader",
|
|
7139
|
+
"kind": "function",
|
|
7140
|
+
"package": "@nifrajs/middleware",
|
|
7141
|
+
"signature": "export declare function parseAcceptHeader(value: string | null): readonly ContentPreference[];",
|
|
7142
|
+
"doc": "/** Parse an `Accept` header, preserving quality and wildcard specificity. */"
|
|
7143
|
+
},
|
|
7144
|
+
{
|
|
7145
|
+
"name": "parseByteRange",
|
|
7146
|
+
"kind": "function",
|
|
7147
|
+
"package": "@nifrajs/core",
|
|
7148
|
+
"signature": "export declare function parseByteRange(value: string | null, size: number): ByteRangeResult;",
|
|
7149
|
+
"doc": "/**\n * Parse an HTTP `Range: bytes=...` header against a known representation size.\n *\n * Three outcomes, and the distinction matters to the caller's status code: `none` means the header\n * was absent or syntactically invalid and must be ignored (200), `unsatisfiable` means a well-formed\n * range-set selected nothing (416), `satisfiable` carries the coalesced ranges (206).\n */"
|
|
7150
|
+
},
|
|
7151
|
+
{
|
|
7152
|
+
"name": "parseByteRange",
|
|
7153
|
+
"kind": "function",
|
|
7154
|
+
"package": "@nifrajs/middleware",
|
|
7155
|
+
"signature": "export declare function parseByteRange(value: string | null, size: number): ByteRangeResult;",
|
|
7156
|
+
"doc": "/**\n * Parse an HTTP `Range: bytes=...` header against a known representation size.\n *\n * Three outcomes, and the distinction matters to the caller's status code: `none` means the header\n * was absent or syntactically invalid and must be ignored (200), `unsatisfiable` means a well-formed\n * range-set selected nothing (416), `satisfiable` carries the coalesced ranges (206).\n */"
|
|
7157
|
+
},
|
|
6684
7158
|
{
|
|
6685
7159
|
"name": "parseCausalityContext",
|
|
6686
7160
|
"kind": "function",
|
|
@@ -6866,6 +7340,18 @@
|
|
|
6866
7340
|
"signature": "export interface Platform<Env = unknown> {\n /** Platform bindings (KV/D1/secrets on Workers). Typed as `Env` when the app declares them via\n * `server<Env>()`; otherwise `unknown` - validate before use. */\n readonly env?: Env;\n /** Extend the response's lifetime for background work (Workers `ctx.waitUntil`). */\n readonly waitUntil?: (promise: Promise<unknown>) => void;\n /** The raw socket peer address the serving adapter observed, if any (`listen()`, `@nifrajs/node`,\n * `@nifrajs/deno` set it). The server applies the app's `clientIp` trust declaration to this before\n * exposing {@link Context.clientIp}; read `c.clientIp`, not this. */\n readonly clientIp?: string | undefined;\n}",
|
|
6867
7341
|
"doc": "/**\n * Runtime platform inputs, passed as `app.fetch(request, platform)`. Edge adapters (e.g.\n * Cloudflare Workers) supply `env` (bindings) + `waitUntil`; Bun/Node/Deno omit them. Optional +\n * runtime-neutral, so `app.fetch` stays a Web-standard handler.\n */"
|
|
6868
7342
|
},
|
|
7343
|
+
{
|
|
7344
|
+
"name": "PlatformResponse",
|
|
7345
|
+
"kind": "interface",
|
|
7346
|
+
"package": "@nifrajs/core",
|
|
7347
|
+
"signature": "export interface PlatformResponse {\n readonly statusCode: number;\n /** Single-valued headers. `set-cookie` never appears here - see the two fields below. */\n readonly headers: Readonly<Record<string, string>>;\n /**\n * Repeated headers, currently only `set-cookie`. Netlify Functions and API Gateway REST (v1) read\n * this; omitted when the response sets no cookies.\n */\n readonly multiValueHeaders?: Readonly<Record<string, readonly string[]>>;\n /** API Gateway HTTP API (v2) takes cookies here rather than in a header. Omitted when there are none. */\n readonly cookies?: readonly string[];\n readonly body: string;\n readonly isBase64Encoded: true;\n}"
|
|
7348
|
+
},
|
|
7349
|
+
{
|
|
7350
|
+
"name": "PlatformResponse",
|
|
7351
|
+
"kind": "interface",
|
|
7352
|
+
"package": "nifra",
|
|
7353
|
+
"signature": "export interface PlatformResponse {\n readonly statusCode: number;\n /** Single-valued headers. `set-cookie` never appears here - see the two fields below. */\n readonly headers: Readonly<Record<string, string>>;\n /**\n * Repeated headers, currently only `set-cookie`. Netlify Functions and API Gateway REST (v1) read\n * this; omitted when the response sets no cookies.\n */\n readonly multiValueHeaders?: Readonly<Record<string, readonly string[]>>;\n /** API Gateway HTTP API (v2) takes cookies here rather than in a header. Omitted when there are none. */\n readonly cookies?: readonly string[];\n readonly body: string;\n readonly isBase64Encoded: true;\n}"
|
|
7354
|
+
},
|
|
6869
7355
|
{
|
|
6870
7356
|
"name": "PluginBuilder",
|
|
6871
7357
|
"kind": "type",
|
|
@@ -6873,6 +7359,13 @@
|
|
|
6873
7359
|
"signature": "export type PluginBuilder = Parameters<BunPlugin[\"setup\"]>[0];",
|
|
6874
7360
|
"doc": "/** The argument Bun passes to a plugin's `setup` - Bun doesn't export the type, so derive it. */"
|
|
6875
7361
|
},
|
|
7362
|
+
{
|
|
7363
|
+
"name": "PngRenderer",
|
|
7364
|
+
"kind": "type",
|
|
7365
|
+
"package": "@nifrajs/image",
|
|
7366
|
+
"signature": "export type PngRenderer = (svg: string) => Uint8Array | Promise<Uint8Array>;",
|
|
7367
|
+
"doc": "/** A dependency-free shape implemented by SVG→PNG codecs such as Resvg, Satori, or a WASM backend. */"
|
|
7368
|
+
},
|
|
6876
7369
|
{
|
|
6877
7370
|
"name": "port",
|
|
6878
7371
|
"kind": "function",
|
|
@@ -7065,6 +7558,19 @@
|
|
|
7065
7558
|
"signature": "export type PrincipalFor<User, RequireTenant extends boolean> = RequireTenant extends true ? Principal<User> & {\n readonly tenantId: string;\n} : Principal<User>;",
|
|
7066
7559
|
"doc": "/**\n * The principal type for a given `requireTenant` flag: `tenantId` narrows to a required `string` when\n * `requireTenant` is `true`, otherwise stays optional (`string | undefined`). The flag is captured as a\n * literal `const` type parameter at the call sites so `{ requireTenant: true }` selects the narrowed branch.\n */"
|
|
7067
7560
|
},
|
|
7561
|
+
{
|
|
7562
|
+
"name": "problemDetails",
|
|
7563
|
+
"kind": "function",
|
|
7564
|
+
"package": "@nifrajs/middleware",
|
|
7565
|
+
"signature": "export declare function problemDetails(options?: ProblemDetailsOptions): import(\"@nifrajs/core/server\").NifraPlugin<import(\"@nifrajs/core/server\").AnyServer, import(\"@nifrajs/core/server\").AnyServer>;",
|
|
7566
|
+
"doc": "/**\n * Opt-in RFC 9457 formatting for Nifra's structured error envelope.\n *\n * The default `{ ok: false, error }` response remains unchanged. This plugin only converts that\n * framework envelope, so custom JSON errors and already-formatted problem documents pass through.\n * Raw JSON error Responses are supported through a capped clone; encoded responses are never drained.\n */"
|
|
7567
|
+
},
|
|
7568
|
+
{
|
|
7569
|
+
"name": "ProblemDetailsOptions",
|
|
7570
|
+
"kind": "interface",
|
|
7571
|
+
"package": "@nifrajs/middleware",
|
|
7572
|
+
"signature": "export interface ProblemDetailsOptions {\n /** Include only the request pathname as `instance`. Query strings are never included. Default false. */\n readonly includeInstance?: boolean;\n /** Prefix for code-specific problem types. Default `about:blank`. */\n readonly typeBase?: string;\n /** Maximum JSON error body inspected. Default 64 KiB. */\n readonly maxBytes?: number;\n}"
|
|
7573
|
+
},
|
|
7068
7574
|
{
|
|
7069
7575
|
"name": "prompt",
|
|
7070
7576
|
"kind": "function",
|
|
@@ -7269,6 +7775,19 @@
|
|
|
7269
7775
|
"signature": "export declare function randomEffectDigestKey(): Uint8Array;",
|
|
7270
7776
|
"doc": "/** Fresh random digest key (32 bytes). Per-process by default - persist one externally to correlate across restarts. */"
|
|
7271
7777
|
},
|
|
7778
|
+
{
|
|
7779
|
+
"name": "rangeResponse",
|
|
7780
|
+
"kind": "function",
|
|
7781
|
+
"package": "@nifrajs/middleware",
|
|
7782
|
+
"signature": "export declare function rangeResponse(request: Request, body: string | ArrayBuffer | ArrayBufferView | Uint8Array, options?: RangeResponseOptions): Response;",
|
|
7783
|
+
"doc": "/**\n * Create a standards-shaped byte representation response with Range, If-Range, and conditional\n * validator handling. The input is already caller-owned memory; this helper does not read or retain\n * external state. Multiple ranges use `multipart/byteranges` and adjacent ranges are coalesced.\n */"
|
|
7784
|
+
},
|
|
7785
|
+
{
|
|
7786
|
+
"name": "RangeResponseOptions",
|
|
7787
|
+
"kind": "interface",
|
|
7788
|
+
"package": "@nifrajs/middleware",
|
|
7789
|
+
"signature": "export interface RangeResponseOptions {\n /** Media type for the complete representation and each single-range response. */\n readonly contentType?: string;\n /** Entity tag used for conditional requests and `If-Range`. */\n readonly etag?: string;\n /** Validator used for conditional requests and date-form `If-Range`. */\n readonly lastModified?: Date;\n /** Optional cache policy copied to the response. */\n readonly cacheControl?: string;\n}"
|
|
7790
|
+
},
|
|
7272
7791
|
{
|
|
7273
7792
|
"name": "rateLimit",
|
|
7274
7793
|
"kind": "function",
|
|
@@ -7627,6 +8146,13 @@
|
|
|
7627
8146
|
"signature": "export type RenderMode = \"static\" | \"isr\" | \"ssr\";",
|
|
7628
8147
|
"doc": "/**\n * How a route produces its HTML.\n *\n * - `static` - prerendered at build; served as a file, no server render at request time.\n * - `isr` - server-rendered, then cached and revalidated on a timer (`export const revalidate`).\n * - `ssr` - server-rendered per request. The default, and the only mode that needs a live server.\n */"
|
|
7629
8148
|
},
|
|
8149
|
+
{
|
|
8150
|
+
"name": "renderOgImage",
|
|
8151
|
+
"kind": "function",
|
|
8152
|
+
"package": "@nifrajs/image",
|
|
8153
|
+
"signature": "export declare function renderOgImage(options: OgImageOptions): string;",
|
|
8154
|
+
"doc": "/** Render a bounded, deterministic SVG suitable for an `og:image` endpoint. */"
|
|
8155
|
+
},
|
|
7630
8156
|
{
|
|
7631
8157
|
"name": "renderPage",
|
|
7632
8158
|
"kind": "function",
|
|
@@ -7645,7 +8171,7 @@
|
|
|
7645
8171
|
"name": "RenderPageOptions",
|
|
7646
8172
|
"kind": "interface",
|
|
7647
8173
|
"package": "@nifrajs/web",
|
|
7648
|
-
"signature": "export interface RenderPageOptions {\n readonly adapter: RenderAdapter;\n /** The layout chain to render - outermost layout → page (opaque; the adapter renders it). */\n readonly chain: readonly unknown[];\n /** The loader output for this request. */\n readonly data: unknown;\n /** An action's data return (POST only) - surfaced to the page as `actionData` + serialized\n * for the client so post-POST hydration matches. Omit on GETs. */\n readonly actionData?: unknown;\n /**\n * URL of the built client entry (loaded as a module script).\n *\n * Optional ONLY on a `hydrate: false` page, where there is no client takeover to feed and this value\n * reaches no output at all. The union below is what enforces that: omitting it on a hydrating page\n * stays a compile error rather than rendering `src=\"\"`.\n */\n readonly clientEntry?: string;\n /** Chunk URLs for the **matched** route (its layout chain + own chunk) to `modulepreload` in the\n * shell - so the route code downloads in parallel with the entry instead of after it\n * (`buildClient`'s per-route map). Empty/omitted ⇒ only the entry is preloaded (unchanged). */\n readonly preload?: readonly string[];\n /** Stylesheet URLs for the **matched** route (its layout chain + own CSS, from `buildClient`'s\n * `BuildManifest.css`) - injected as `<link rel=\"stylesheet\">` in `<head>` so styles arrive with the\n * first paint (no FOUC). Rendered even on non-hydrated pages. Empty/omitted ⇒ none (unchanged). */\n readonly styles?: readonly string[];\n /** SSG: the prerendered-path set, serialized to `window.__NIFRA_PRERENDERED__` so the client fetches\n * a static `_data.json` on soft-nav into a prerendered route. Empty/omitted ⇒ not injected. */\n readonly prerenderedPaths?: readonly string[];\n /** ISR: route freshness in seconds, emitted as the `x-nifra-isr-revalidate` header for a `withISR`\n * wrapper to read. Omit ⇒ no header (the wrapper's default TTL applies). */\n readonly revalidate?: number;\n /** Matched route id; written to `window.__NIFRA_ROUTE__` so the client hydrates this chain. */\n readonly routeId?: string;\n /** The matched route's decoded path params - surfaced to the page as `params` (via {@link RenderProps})\n * so an adapter's `useParams` is SSR-correct. Omit ⇒ `{}` (a route with no dynamic segments, or an\n * error/404 render). */\n readonly params?: Readonly<Record<string, string>>;\n /** The request's `pathname + search` - surfaced as `path` (via {@link RenderProps}) so an adapter's\n * `useLocation`/`useSearchParams` render the right URL server-side and hydrate without drift. Omit ⇒\n * `\"\"`. */\n readonly path?: string;\n /** The route's validated search (`searchOf(mod.searchSchema, url.search)`, the same value handed to\n * the loader as `ctx.search`), surfaced as `search` (via {@link RenderProps}) so an adapter's\n * `useSearch` is SSR-correct. Omit ⇒ `{}` (a render with no search context). */\n readonly search?: Record<string, unknown>;\n /** Per-layout loader data, forwarded to the adapter as `RenderProps.layoutData`. Aligned with the\n * chain's layout prefix; omitted when no layout in the chain has a loader. */\n readonly layoutData?: readonly unknown[];\n /** HTTP status for the response (default 200; e.g. 404 for a not-found page). */\n readonly status?: number;\n /** Extra response headers - e.g. the `cache-control` a terminal status page wants. `content-type`\n * is ignored (the document is always HTML) and the ISR freshness header is applied after these,\n * so neither can be overridden from here. */\n readonly headers?: HeadersLike;\n /** Document title (fallback when `head.title` is unset). */\n readonly title?: string;\n /** Resolved route head - `title` overrides `title` above; `meta`/`link` render as managed\n * (`data-nifra`) tags the client updates on navigation.\n *\n * **Head contract (the layout chain contributes).** `createWebApp` resolves this via\n * {@link mergeHeads}: a route's head is its **layout chain's** `meta`/`head` exports merged with the\n * page's. A `_layout.tsx` may `export const meta` (or `export function meta(args)`) - its tags land\n * on every page below it (the home for `hreflang`, `preconnect`, a section-default `<title>`). The\n * merge is **nearest-wins for scalars** (the page's `title` overrides an inner layout's, which\n * overrides an outer one; an undefined page title keeps the layout's) and **concatenated for the\n * `meta`/`link` arrays** (outermost layout first, page last). `<meta>`/`<link>` attributes pass a\n * shared tag-specific allowlist (including inert `data-*` metadata) and values are escaped. */\n readonly head?: Meta;\n /** Id of the container wrapping the app markup (default `\"root\"`). A non-default id also gets\n * {@link ROOT_ATTRIBUTE}, which is how the generated client entry finds the container to hydrate -\n * the entry is built once and cannot know what a given render chose. */\n readonly rootId?: string;\n /** When `false`, emit a complete but **non-hydrated** document - no client entry script, data\n * globals, or modulepreloads. Used for server-rendered `_error` pages: a terminal state that needs no\n * client takeover, and it sidesteps an SSR/hydrate mismatch (the server rendered the boundary, not\n * the page the client manifest maps this route id to). Default `true`. */\n readonly hydrate?: boolean;\n /** Island client bundles (`@nifrajs/web/islands`) to load as `<script type=\"module\">` in the document\n * tail - emitted **regardless of `hydrate`**, so a static (`hydrate: false`) page can still mount\n * no-framework islands. URLs are attribute-escaped. Empty/omitted ⇒ none (unchanged output). */\n readonly islandScripts?: readonly string[];\n /** CSP nonce applied to every framework-owned executable script in this document. */\n readonly nonce?: string;\n /**\n * Advanced: a per-route slot the renderer fills with the request-invariant document pieces (shell\n * prefix/suffix, tail statics) on the first render and reuses afterwards, skipping their re-assembly.\n *\n * Only pass a cache when every shell-shaping input is IDENTICAL across the requests sharing it:\n * same `head` content (a static meta chain - never a `meta(data)` function), `title`, `styles`,\n * `preload`, `islandScripts`, `clientEntry`, `rootId`, `hydrate`, and `prerenderedPaths`. Per-request\n * values (`data`, `params`, `search`, `actionData`, `layoutData`, deferred state) are always assembled\n * fresh and safe. A per-request `nonce` disables the cache automatically. `createWebApp` wires this\n * per route, gated on the route + layout metas being static.\n */\n readonly assemblyCache?: RenderAssemblyCache;\n}"
|
|
8174
|
+
"signature": "export interface RenderPageOptions {\n readonly adapter: RenderAdapter;\n /** The layout chain to render - outermost layout → page (opaque; the adapter renders it). */\n readonly chain: readonly unknown[];\n /** The loader output for this request. */\n readonly data: unknown;\n /** An action's data return (POST only) - surfaced to the page as `actionData` + serialized\n * for the client so post-POST hydration matches. Omit on GETs. */\n readonly actionData?: unknown;\n /**\n * URL of the built client entry (loaded as a module script).\n *\n * Optional ONLY on a `hydrate: false` page, where there is no client takeover to feed and this value\n * reaches no output at all. The union below is what enforces that: omitting it on a hydrating page\n * stays a compile error rather than rendering `src=\"\"`.\n */\n readonly clientEntry?: string;\n /** Chunk URLs for the **matched** route (its layout chain + own chunk) to `modulepreload` in the\n * shell - so the route code downloads in parallel with the entry instead of after it\n * (`buildClient`'s per-route map). Empty/omitted ⇒ only the entry is preloaded (unchanged). */\n readonly preload?: readonly string[];\n /** Stylesheet URLs for the **matched** route (its layout chain + own CSS, from `buildClient`'s\n * `BuildManifest.css`) - injected as `<link rel=\"stylesheet\">` in `<head>` so styles arrive with the\n * first paint (no FOUC). Rendered even on non-hydrated pages. Empty/omitted ⇒ none (unchanged). */\n readonly styles?: readonly string[];\n /** SSG: the prerendered-path set, serialized to `window.__NIFRA_PRERENDERED__` so the client fetches\n * a static `_data.json` on soft-nav into a prerendered route. Empty/omitted ⇒ not injected. */\n readonly prerenderedPaths?: readonly string[];\n /** ISR: route freshness in seconds, emitted as the `x-nifra-isr-revalidate` header for a `withISR`\n * wrapper to read. Omit ⇒ no header (the wrapper's default TTL applies). */\n readonly revalidate?: number;\n /** ISR invalidation tags emitted as a bounded `x-nifra-isr-tags` header. */\n readonly revalidateTags?: readonly string[];\n /** Matched route id; written to `window.__NIFRA_ROUTE__` so the client hydrates this chain. */\n readonly routeId?: string;\n /** The matched route's decoded path params - surfaced to the page as `params` (via {@link RenderProps})\n * so an adapter's `useParams` is SSR-correct. Omit ⇒ `{}` (a route with no dynamic segments, or an\n * error/404 render). */\n readonly params?: Readonly<Record<string, string>>;\n /** The request's `pathname + search` - surfaced as `path` (via {@link RenderProps}) so an adapter's\n * `useLocation`/`useSearchParams` render the right URL server-side and hydrate without drift. Omit ⇒\n * `\"\"`. */\n readonly path?: string;\n /** The route's validated search (`searchOf(mod.searchSchema, url.search)`, the same value handed to\n * the loader as `ctx.search`), surfaced as `search` (via {@link RenderProps}) so an adapter's\n * `useSearch` is SSR-correct. Omit ⇒ `{}` (a render with no search context). */\n readonly search?: Record<string, unknown>;\n /** Per-layout loader data, forwarded to the adapter as `RenderProps.layoutData`. Aligned with the\n * chain's layout prefix; omitted when no layout in the chain has a loader. */\n readonly layoutData?: readonly unknown[];\n /** HTTP status for the response (default 200; e.g. 404 for a not-found page). */\n readonly status?: number;\n /** Extra response headers - e.g. the `cache-control` a terminal status page wants. `content-type`\n * is ignored (the document is always HTML) and the ISR freshness header is applied after these,\n * so neither can be overridden from here. */\n readonly headers?: HeadersLike;\n /** Document title (fallback when `head.title` is unset). */\n readonly title?: string;\n /** Resolved route head - `title` overrides `title` above; `meta`/`link` render as managed\n * (`data-nifra`) tags the client updates on navigation.\n *\n * **Head contract (the layout chain contributes).** `createWebApp` resolves this via\n * {@link mergeHeads}: a route's head is its **layout chain's** `meta`/`head` exports merged with the\n * page's. A `_layout.tsx` may `export const meta` (or `export function meta(args)`) - its tags land\n * on every page below it (the home for `hreflang`, `preconnect`, a section-default `<title>`). The\n * merge is **nearest-wins for scalars** (the page's `title` overrides an inner layout's, which\n * overrides an outer one; an undefined page title keeps the layout's) and **concatenated for the\n * `meta`/`link` arrays** (outermost layout first, page last). `<meta>`/`<link>` attributes pass a\n * shared tag-specific allowlist (including inert `data-*` metadata) and values are escaped. */\n readonly head?: Meta;\n /** Id of the container wrapping the app markup (default `\"root\"`). A non-default id also gets\n * {@link ROOT_ATTRIBUTE}, which is how the generated client entry finds the container to hydrate -\n * the entry is built once and cannot know what a given render chose. */\n readonly rootId?: string;\n /** When `false`, emit a complete but **non-hydrated** document - no client entry script, data\n * globals, or modulepreloads. Used for server-rendered `_error` pages: a terminal state that needs no\n * client takeover, and it sidesteps an SSR/hydrate mismatch (the server rendered the boundary, not\n * the page the client manifest maps this route id to). Default `true`. */\n readonly hydrate?: boolean;\n /** Island client bundles (`@nifrajs/web/islands`) to load as `<script type=\"module\">` in the document\n * tail - emitted **regardless of `hydrate`**, so a static (`hydrate: false`) page can still mount\n * no-framework islands. URLs are attribute-escaped. Empty/omitted ⇒ none (unchanged output). */\n readonly islandScripts?: readonly string[];\n /** CSP nonce applied to every framework-owned executable script in this document. */\n readonly nonce?: string;\n /**\n * Advanced: a per-route slot the renderer fills with the request-invariant document pieces (shell\n * prefix/suffix, tail statics) on the first render and reuses afterwards, skipping their re-assembly.\n *\n * Only pass a cache when every shell-shaping input is IDENTICAL across the requests sharing it:\n * same `head` content (a static meta chain - never a `meta(data)` function), `title`, `styles`,\n * `preload`, `islandScripts`, `clientEntry`, `rootId`, `hydrate`, and `prerenderedPaths`. Per-request\n * values (`data`, `params`, `search`, `actionData`, `layoutData`, deferred state) are always assembled\n * fresh and safe. A per-request `nonce` disables the cache automatically. `createWebApp` wires this\n * per route, gated on the route + layout metas being static.\n */\n readonly assemblyCache?: RenderAssemblyCache;\n}"
|
|
7649
8175
|
},
|
|
7650
8176
|
{
|
|
7651
8177
|
"name": "renderPageResult",
|
|
@@ -7747,6 +8273,13 @@
|
|
|
7747
8273
|
"signature": "export interface RequestSpec {\n /** HTTP method. Default `\"GET\"`. */\n readonly method?: string;\n /** Path (`\"/users/1\"`) or an absolute URL. Relative paths resolve against a local origin. */\n readonly path: string;\n /** Request headers. */\n readonly headers?: Readonly<Record<string, string>>;\n /** Body. A plain object/array is JSON-encoded (with a JSON content-type unless you set one); a\n * string/`Uint8Array` is sent as-is. Ignored for GET/HEAD (those can't carry a body). */\n readonly body?: unknown;\n /** Optional label echoed back on the result (handy in the playground UI). */\n readonly label?: string;\n}",
|
|
7748
8274
|
"doc": "/** One request to drive through the app. */"
|
|
7749
8275
|
},
|
|
8276
|
+
{
|
|
8277
|
+
"name": "requireAuthorization",
|
|
8278
|
+
"kind": "function",
|
|
8279
|
+
"package": "@nifrajs/auth",
|
|
8280
|
+
"signature": "export declare function requireAuthorization<Subject, Resource>(authorizer: Authorizer<Subject, Resource>, request: AuthorizationRequest<Subject, Resource>): Promise<void>;",
|
|
8281
|
+
"doc": "/** Require an application/data-layer policy to allow an action; denied requests throw a 403 Response. */"
|
|
8282
|
+
},
|
|
7750
8283
|
{
|
|
7751
8284
|
"name": "requirePeer",
|
|
7752
8285
|
"kind": "function",
|
|
@@ -8015,6 +8548,18 @@
|
|
|
8015
8548
|
"signature": "export type Result<Data, Errors = unknown> = {\n readonly ok: true;\n readonly status: number;\n readonly data: Data;\n readonly error: null;\n} | ([Errors] extends [Record<number, unknown>] ? DeclaredFailures<Errors> | {\n readonly ok: false;\n readonly status: Exclude<ErrorStatus, Extract<keyof Errors, number>> | 0;\n readonly data: unknown;\n readonly error: ApiError;\n} : {\n readonly ok: false;\n readonly status: number;\n readonly data: Errors;\n readonly error: ApiError;\n});",
|
|
8016
8549
|
"doc": "/**\n * The outcome of a client call. The client never throws - inspect `ok` to branch.\n *\n * On success, `data` is the route's response type. On failure the union is DISCRIMINATED BY\n * `status` when the route declares an `errors` record: `status === 404` narrows `data` to the\n * declared 404 body; every undeclared status (plus `0` for a transport error with no response)\n * falls into a fallback arm whose `data` is `unknown`. A route with no `errors` contract keeps a\n * single failure arm with `data: Errors` (`unknown`). `error` is always the server's normalized\n * `{ error, issues? }` summary on failure, `null` on success.\n */"
|
|
8017
8550
|
},
|
|
8551
|
+
{
|
|
8552
|
+
"name": "ResvgConstructor",
|
|
8553
|
+
"kind": "type",
|
|
8554
|
+
"package": "@nifrajs/image",
|
|
8555
|
+
"signature": "export type ResvgConstructor = new (svg: string) => ResvgRenderer;"
|
|
8556
|
+
},
|
|
8557
|
+
{
|
|
8558
|
+
"name": "ResvgRenderer",
|
|
8559
|
+
"kind": "interface",
|
|
8560
|
+
"package": "@nifrajs/image",
|
|
8561
|
+
"signature": "export interface ResvgRenderer {\n render(): {\n asPng(): Uint8Array | Promise<Uint8Array>;\n };\n}"
|
|
8562
|
+
},
|
|
8018
8563
|
{
|
|
8019
8564
|
"name": "resyncServerManifestSource",
|
|
8020
8565
|
"kind": "function",
|
|
@@ -8054,7 +8599,7 @@
|
|
|
8054
8599
|
"kind": "function",
|
|
8055
8600
|
"package": "@nifrajs/web",
|
|
8056
8601
|
"signature": "export declare function revalidateEndpoint(options: RevalidateEndpointOptions): (req: Request) => Promise<Response>;",
|
|
8057
|
-
"doc": "/**\n * An **on-demand revalidation** (purge) endpoint - a `fetch` handler that drops a path's cached entry\n *
|
|
8602
|
+
"doc": "/**\n * An **on-demand revalidation** (purge) endpoint - a `fetch` handler that drops a path's cached entry\n * or invalidates every entry carrying a tag. `POST` with the secret in the token header and either\n * `?path=/blog/x`, `?tag=products`, or a JSON `{ \"path\": \"/blog/x\" }` / `{ \"tag\": \"products\" }` body.\n * The token is checked in **constant time** (wrong/missing → `401`); malformed targets → `400`;\n * non-POST → `405`. A store without tag support returns `501` for tag requests. Mount it on a nifra route, e.g.\n * `app.post(\"/__nifra/revalidate\", (c) => handler(c.req))`.\n */"
|
|
8058
8603
|
},
|
|
8059
8604
|
{
|
|
8060
8605
|
"name": "RevalidateEndpointOptions",
|
|
@@ -8081,6 +8626,20 @@
|
|
|
8081
8626
|
"package": "@nifrajs/core",
|
|
8082
8627
|
"signature": "export interface RichWireCodecOptions {\n readonly limits?: WireDecodeLimits;\n}"
|
|
8083
8628
|
},
|
|
8629
|
+
{
|
|
8630
|
+
"name": "rlsScope",
|
|
8631
|
+
"kind": "function",
|
|
8632
|
+
"package": "@nifrajs/core",
|
|
8633
|
+
"signature": "export declare function rlsScope(token: string, digest?: string): RlsScope;",
|
|
8634
|
+
"doc": "/** Create a bounded, opaque RLS/equivalent policy scope for a data adapter. */"
|
|
8635
|
+
},
|
|
8636
|
+
{
|
|
8637
|
+
"name": "RlsScope",
|
|
8638
|
+
"kind": "interface",
|
|
8639
|
+
"package": "@nifrajs/core",
|
|
8640
|
+
"signature": "export interface RlsScope {\n /** Caller-owned scope token. The public seam never interprets, logs, or derives identity from it. */\n readonly token: string;\n /** Optional opaque digest for correlating a scope without exposing tenant or subject data. */\n readonly digest?: string;\n}",
|
|
8641
|
+
"doc": "/** Opaque request-local RLS (or equivalent data-policy) scope passed to an adapter. */"
|
|
8642
|
+
},
|
|
8084
8643
|
{
|
|
8085
8644
|
"name": "robots",
|
|
8086
8645
|
"kind": "function",
|
|
@@ -8242,7 +8801,7 @@
|
|
|
8242
8801
|
"name": "RouteManifestEntry",
|
|
8243
8802
|
"kind": "interface",
|
|
8244
8803
|
"package": "@nifrajs/web",
|
|
8245
|
-
"signature": "export interface RouteManifestEntry {\n /** The route's id (its key in the build manifest and in `routes`). */\n readonly id: string;\n /** The matching pattern, e.g. `/blog/:slug`. */\n readonly pattern: string;\n readonly mode: RenderMode;\n /** Whether the full-document client is shipped. `false` means the page loads no framework JS. */\n readonly hydrate: boolean;\n /** Revalidation window in seconds. Present only for `isr`. */\n readonly revalidate?: number;\n /**\n * Concrete paths prerendered at build. Present for `static` routes: a single path for a static route,\n * one per `getStaticPaths` entry for a dynamic one. Absent means \"no path was enumerated\", which for a\n * dynamic route is exactly the condition that makes it unprerenderable.\n */\n readonly prerenderedPaths?: readonly string[];\n /** What this route needs from the host to behave as declared. */\n readonly requires: readonly RouteCapability[];\n}",
|
|
8804
|
+
"signature": "export interface RouteManifestEntry {\n /** The route's id (its key in the build manifest and in `routes`). */\n readonly id: string;\n /** The matching pattern, e.g. `/blog/:slug`. */\n readonly pattern: string;\n readonly mode: RenderMode;\n /** Whether the full-document client is shipped. `false` means the page loads no framework JS. */\n readonly hydrate: boolean;\n /** Revalidation window in seconds. Present only for `isr`. */\n readonly revalidate?: number;\n /** Bounded tags that can purge this route from a shared ISR store. */\n readonly revalidateTags?: readonly string[];\n /**\n * Concrete paths prerendered at build. Present for `static` routes: a single path for a static route,\n * one per `getStaticPaths` entry for a dynamic one. Absent means \"no path was enumerated\", which for a\n * dynamic route is exactly the condition that makes it unprerenderable.\n */\n readonly prerenderedPaths?: readonly string[];\n /** What this route needs from the host to behave as declared. */\n readonly requires: readonly RouteCapability[];\n}",
|
|
8246
8805
|
"doc": "/** One route's resolved behaviour. */"
|
|
8247
8806
|
},
|
|
8248
8807
|
{
|
|
@@ -8256,7 +8815,7 @@
|
|
|
8256
8815
|
"name": "RouteModule",
|
|
8257
8816
|
"kind": "interface",
|
|
8258
8817
|
"package": "@nifrajs/web",
|
|
8259
|
-
"signature": "export interface RouteModule {\n readonly default: unknown;\n readonly loader?: Loader;\n readonly action?: Action;\n /** A Standard Schema validating this route's URL search params. When present, `ctx.search` is parsed +\n * validated against it (failing closed to the schema's defaults on invalid input); type it into the\n * loader with `LoaderArgs<Api, Env, typeof searchSchema>`. */\n readonly searchSchema?: StandardSchemaV1<unknown, Record<string, unknown>>;\n /** Search keys that are purely client-side UI (`\"tab\"`, a client-side `\"sort\"`, `\"modal\"`) and do NOT\n * affect this route's loader. When a client navigation stays on the same route + pathname and changes\n * ONLY these keys, the router updates the URL (so `useSearch` re-renders) WITHOUT re-running the loader.\n * Any other key change revalidates as usual - so omitting a data-affecting key here can never serve\n * stale data, it only forgoes the optimization. Client-only: the server always renders fresh. */\n readonly searchClientKeys?: readonly string[];\n readonly meta?: MetaInput;\n /**\n * Opt this route out of nifra's full-document client hydration. The server still renders the full\n * HTML document, loaders/actions still run, and native links/forms still work; the generated app\n * client, route chunks, and loader globals are omitted for hard navigations. Intended for static or\n * island-hydrated pages where interactivity is mounted by smaller, explicit client entries.\n */\n readonly hydrate?: boolean;\n /**\n * Opt a **static** route (no `:param`/`*`) into build-time prerendering (SSG): `prerenderRoutes`\n * (from `@nifrajs/web/build`) renders it to a static `index.html` at build. The loader runs at build\n * with the in-process `api` (build-safe data only - no per-request cookies/secrets); `defer()` on a\n * prerendered route resolves at build. For **dynamic** routes use {@link getStaticPaths} instead.\n */\n readonly prerender?: boolean;\n /**\n * Enumerate the concrete params to prerender for a **dynamic** (`:param`) route - the SSG path list\n * (blogs/docs/etc.). Runs at build; `prerenderRoutes` renders one `index.html` per returned path.\n */\n readonly getStaticPaths?: GetStaticPaths;\n /**\n * ISR freshness for this route, in **seconds**. `createWebApp` emits it as an `x-nifra-revalidate`\n * response header that `withISR` reads to set the page's cache TTL (overriding the wrapper's\n * default). Older-than-`revalidate` cached pages are served stale while regenerating.\n */\n readonly revalidate?: number;\n /**\n * No-framework island bundles (`@nifrajs/web/islands`) to load on this route, as `<script\n * type=\"module\">` in the document tail. Loaded **regardless of `hydrate`** - pair with\n * `export const hydrate = false` for a static page that ships zero framework JS and mounts\n * interactivity through `<Island>` markers + `mountIslands` enhancers instead.\n */\n readonly islandScripts?: readonly string[];\n}",
|
|
8818
|
+
"signature": "export interface RouteModule {\n readonly default: unknown;\n readonly loader?: Loader;\n readonly action?: Action;\n /** A Standard Schema validating this route's URL search params. When present, `ctx.search` is parsed +\n * validated against it (failing closed to the schema's defaults on invalid input); type it into the\n * loader with `LoaderArgs<Api, Env, typeof searchSchema>`. */\n readonly searchSchema?: StandardSchemaV1<unknown, Record<string, unknown>>;\n /** Search keys that are purely client-side UI (`\"tab\"`, a client-side `\"sort\"`, `\"modal\"`) and do NOT\n * affect this route's loader. When a client navigation stays on the same route + pathname and changes\n * ONLY these keys, the router updates the URL (so `useSearch` re-renders) WITHOUT re-running the loader.\n * Any other key change revalidates as usual - so omitting a data-affecting key here can never serve\n * stale data, it only forgoes the optimization. Client-only: the server always renders fresh. */\n readonly searchClientKeys?: readonly string[];\n readonly meta?: MetaInput;\n /**\n * Opt this route out of nifra's full-document client hydration. The server still renders the full\n * HTML document, loaders/actions still run, and native links/forms still work; the generated app\n * client, route chunks, and loader globals are omitted for hard navigations. Intended for static or\n * island-hydrated pages where interactivity is mounted by smaller, explicit client entries.\n */\n readonly hydrate?: boolean;\n /**\n * Opt a **static** route (no `:param`/`*`) into build-time prerendering (SSG): `prerenderRoutes`\n * (from `@nifrajs/web/build`) renders it to a static `index.html` at build. The loader runs at build\n * with the in-process `api` (build-safe data only - no per-request cookies/secrets); `defer()` on a\n * prerendered route resolves at build. For **dynamic** routes use {@link getStaticPaths} instead.\n */\n readonly prerender?: boolean;\n /**\n * Enumerate the concrete params to prerender for a **dynamic** (`:param`) route - the SSG path list\n * (blogs/docs/etc.). Runs at build; `prerenderRoutes` renders one `index.html` per returned path.\n */\n readonly getStaticPaths?: GetStaticPaths;\n /**\n * ISR freshness for this route, in **seconds**. `createWebApp` emits it as an `x-nifra-revalidate`\n * response header that `withISR` reads to set the page's cache TTL (overriding the wrapper's\n * default). Older-than-`revalidate` cached pages are served stale while regenerating.\n */\n readonly revalidate?: number;\n /** Optional bounded tags used by ISR on-demand invalidation (`?tag=...`). */\n readonly revalidateTags?: readonly string[];\n /**\n * No-framework island bundles (`@nifrajs/web/islands`) to load on this route, as `<script\n * type=\"module\">` in the document tail. Loaded **regardless of `hydrate`** - pair with\n * `export const hydrate = false` for a static page that ships zero framework JS and mounts\n * interactivity through `<Island>` markers + `mountIslands` enhancers instead.\n */\n readonly islandScripts?: readonly string[];\n}",
|
|
8260
8819
|
"doc": "/** A route module - the default component + optional loader / action / meta. */"
|
|
8261
8820
|
},
|
|
8262
8821
|
{
|
|
@@ -9396,6 +9955,13 @@
|
|
|
9396
9955
|
"signature": "export declare function snapshotCapabilities(report: CapabilityAssuranceReport): CapabilitySnapshot;",
|
|
9397
9956
|
"doc": "/** Deterministic, PII-free lockfile material. */"
|
|
9398
9957
|
},
|
|
9958
|
+
{
|
|
9959
|
+
"name": "snapshotDataContract",
|
|
9960
|
+
"kind": "function",
|
|
9961
|
+
"package": "@nifrajs/core",
|
|
9962
|
+
"signature": "export declare function snapshotDataContract(contract: DataContract): DataContractSnapshot;",
|
|
9963
|
+
"doc": "/** Strip a contract to its token-only version/access snapshot for CI or adapter drift checks. */"
|
|
9964
|
+
},
|
|
9399
9965
|
{
|
|
9400
9966
|
"name": "snapshotRoutes",
|
|
9401
9967
|
"kind": "function",
|
|
@@ -10143,6 +10709,34 @@
|
|
|
10143
10709
|
"signature": "export declare function toHtmlAttrs(resolved: ResolvedImage): HtmlImageAttrs;",
|
|
10144
10710
|
"doc": "/**\n * Map a {@link ResolvedImage} to plain lowercase HTML `<img>` attribute names - `srcset` (not React's\n * `srcSet`), `fetchpriority` (not `fetchPriority`) - dropping unset optionals. For the adapters that\n * spread attributes straight onto a host element (Solid / Vue / Svelte / Preact); React consumes\n * `ResolvedImage` directly because it requires the camelCased prop names.\n */"
|
|
10145
10711
|
},
|
|
10712
|
+
{
|
|
10713
|
+
"name": "toLambdaHandler",
|
|
10714
|
+
"kind": "function",
|
|
10715
|
+
"package": "@nifrajs/core",
|
|
10716
|
+
"signature": "export declare function toLambdaHandler<Env = unknown>(app: FetchApp<Env>): LambdaHandler;",
|
|
10717
|
+
"doc": "/** Adapt API Gateway HTTP API (v2) and REST API (v1) events to a Web-standard app. */"
|
|
10718
|
+
},
|
|
10719
|
+
{
|
|
10720
|
+
"name": "toLambdaHandler",
|
|
10721
|
+
"kind": "function",
|
|
10722
|
+
"package": "nifra",
|
|
10723
|
+
"signature": "export declare function toLambdaHandler<Env = unknown>(app: FetchApp<Env>): LambdaHandler;",
|
|
10724
|
+
"doc": "/** Adapt API Gateway HTTP API (v2) and REST API (v1) events to a Web-standard app. */"
|
|
10725
|
+
},
|
|
10726
|
+
{
|
|
10727
|
+
"name": "toNetlifyHandler",
|
|
10728
|
+
"kind": "function",
|
|
10729
|
+
"package": "@nifrajs/core",
|
|
10730
|
+
"signature": "export declare function toNetlifyHandler<Env = unknown>(app: FetchApp<Env>): NetlifyHandler;",
|
|
10731
|
+
"doc": "/** Adapt a Web-standard app to a Netlify Functions event handler. */"
|
|
10732
|
+
},
|
|
10733
|
+
{
|
|
10734
|
+
"name": "toNetlifyHandler",
|
|
10735
|
+
"kind": "function",
|
|
10736
|
+
"package": "nifra",
|
|
10737
|
+
"signature": "export declare function toNetlifyHandler<Env = unknown>(app: FetchApp<Env>): NetlifyHandler;",
|
|
10738
|
+
"doc": "/** Adapt a Web-standard app to a Netlify Functions event handler. */"
|
|
10739
|
+
},
|
|
10146
10740
|
{
|
|
10147
10741
|
"name": "ToolAnnotations",
|
|
10148
10742
|
"kind": "interface",
|
|
@@ -10184,6 +10778,20 @@
|
|
|
10184
10778
|
"signature": "export declare function topUserFrame(frames: readonly DiagnosticFrame[], root: string | undefined): DiagnosticFrame | undefined;",
|
|
10185
10779
|
"doc": "/** The first frame that points at the user's own source - what the codeframe should show. */"
|
|
10186
10780
|
},
|
|
10781
|
+
{
|
|
10782
|
+
"name": "toVercelHandler",
|
|
10783
|
+
"kind": "function",
|
|
10784
|
+
"package": "@nifrajs/core",
|
|
10785
|
+
"signature": "export declare function toVercelHandler<Env = unknown>(app: FetchApp<Env>): VercelHandler;",
|
|
10786
|
+
"doc": "/** Adapt a Web-standard app to a Vercel Edge Function default export. */"
|
|
10787
|
+
},
|
|
10788
|
+
{
|
|
10789
|
+
"name": "toVercelHandler",
|
|
10790
|
+
"kind": "function",
|
|
10791
|
+
"package": "nifra",
|
|
10792
|
+
"signature": "export declare function toVercelHandler<Env = unknown>(app: FetchApp<Env>): VercelHandler;",
|
|
10793
|
+
"doc": "/** Adapt a Web-standard app to a Vercel Edge Function default export. */"
|
|
10794
|
+
},
|
|
10187
10795
|
{
|
|
10188
10796
|
"name": "TraceContext",
|
|
10189
10797
|
"kind": "type",
|
|
@@ -10289,6 +10897,12 @@
|
|
|
10289
10897
|
"package": "@nifrajs/middleware",
|
|
10290
10898
|
"signature": "export declare function tryVerifyJwt<C extends JwtClaims = JwtClaims>(token: string, options: VerifyJwtOptions): Promise<VerifyJwtResult<C>>;"
|
|
10291
10899
|
},
|
|
10900
|
+
{
|
|
10901
|
+
"name": "TypedDataPort",
|
|
10902
|
+
"kind": "interface",
|
|
10903
|
+
"package": "@nifrajs/core",
|
|
10904
|
+
"signature": "export interface TypedDataPort<Contract extends DataContract> {\n execute<Operation extends keyof Contract[\"operations\"] & string>(request: DataRequestFor<Contract, Operation>): Promise<DataOutput<Contract, Operation>>;\n}"
|
|
10905
|
+
},
|
|
10292
10906
|
{
|
|
10293
10907
|
"name": "typedSSEStream",
|
|
10294
10908
|
"kind": "function",
|
|
@@ -10903,6 +11517,18 @@
|
|
|
10903
11517
|
"signature": "export type VanillaComponent = (props: RenderProps & {\n children?: Template;\n}) => Template;",
|
|
10904
11518
|
"doc": "/**\n * A vanilla \"component\": a plain function from props to a {@link Template}. The page (innermost\n * chain element) receives the loader {@link RenderProps}; a layout receives `{ children }` - the\n * already-rendered inner fragment - plus the same render props, mirroring the React/Preact\n * adapters' `children` contract.\n */"
|
|
10905
11519
|
},
|
|
11520
|
+
{
|
|
11521
|
+
"name": "VercelHandler",
|
|
11522
|
+
"kind": "type",
|
|
11523
|
+
"package": "@nifrajs/core",
|
|
11524
|
+
"signature": "export type VercelHandler = (request: Request) => MaybePromise<Response>;"
|
|
11525
|
+
},
|
|
11526
|
+
{
|
|
11527
|
+
"name": "VercelHandler",
|
|
11528
|
+
"kind": "type",
|
|
11529
|
+
"package": "nifra",
|
|
11530
|
+
"signature": "export type VercelHandler = (request: Request) => MaybePromise<Response>;"
|
|
11531
|
+
},
|
|
10906
11532
|
{
|
|
10907
11533
|
"name": "VerifiedJwt",
|
|
10908
11534
|
"kind": "interface",
|
|
@@ -10983,14 +11609,14 @@
|
|
|
10983
11609
|
"name": "VERSION",
|
|
10984
11610
|
"kind": "const",
|
|
10985
11611
|
"package": "@nifrajs/core",
|
|
10986
|
-
"signature": "export declare const VERSION: \"2.
|
|
11612
|
+
"signature": "export declare const VERSION: \"2.10.0\";",
|
|
10987
11613
|
"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 */"
|
|
10988
11614
|
},
|
|
10989
11615
|
{
|
|
10990
11616
|
"name": "VERSION",
|
|
10991
11617
|
"kind": "const",
|
|
10992
11618
|
"package": "nifra",
|
|
10993
|
-
"signature": "export declare const VERSION: \"2.
|
|
11619
|
+
"signature": "export declare const VERSION: \"2.10.0\";",
|
|
10994
11620
|
"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 */"
|
|
10995
11621
|
},
|
|
10996
11622
|
{
|