@nifrajs/cli 2.9.1 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/check.d.ts +9 -1
- package/dist/check.d.ts.map +1 -1
- package/dist/check.js +38 -6
- package/dist/check.js.map +1 -1
- package/dist/cli.d.ts +2 -18
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +129 -66
- package/dist/cli.js.map +1 -1
- package/dist/dev-bun-config.d.ts +17 -6
- package/dist/dev-bun-config.d.ts.map +1 -1
- package/dist/dev-bun-config.js +51 -14
- package/dist/dev-bun-config.js.map +1 -1
- package/dist/doctor.d.ts +10 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +17 -1
- package/dist/doctor.js.map +1 -1
- package/dist/introspect.d.ts +26 -6
- package/dist/introspect.d.ts.map +1 -1
- package/dist/introspect.js +92 -2
- package/dist/introspect.js.map +1 -1
- package/dist/load.d.ts +4 -0
- package/dist/load.d.ts.map +1 -1
- package/dist/load.js +1 -0
- package/dist/load.js.map +1 -1
- package/dist/mcp-http.js +1 -1
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp.js +2 -2
- package/dist/mcp.js.map +1 -1
- package/dist/pipeline-guard.d.ts +25 -10
- package/dist/pipeline-guard.d.ts.map +1 -1
- package/dist/pipeline-guard.js +35 -15
- package/dist/pipeline-guard.js.map +1 -1
- package/dist/pipeline-report.d.ts +34 -0
- package/dist/pipeline-report.d.ts.map +1 -0
- package/dist/pipeline-report.js +282 -0
- package/dist/pipeline-report.js.map +1 -0
- 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 +246 -17
- package/docs/types.json +725 -16
- package/package.json +9 -9
- package/src/check.ts +54 -5
- package/src/cli.ts +131 -67
- package/src/dev-bun-config.ts +57 -14
- package/src/doctor.ts +28 -1
- package/src/introspect.ts +124 -4
- package/src/load.ts +5 -0
- package/src/mcp-http.ts +1 -1
- package/src/mcp.ts +2 -2
- package/src/pipeline-guard.ts +44 -14
- package/src/pipeline-report.ts +341 -0
- 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
|
{
|
|
@@ -2970,6 +3229,33 @@
|
|
|
2970
3229
|
"signature": "export declare function detectServerOnlyInClient(graph: ClientModuleGraph): ReadonlyArray<ServerOnlyFinding>;",
|
|
2971
3230
|
"doc": "/**\n * Scan a build's metafile for any module that opts into the `server-only` marker (a side-effect\n * `import \"@nifrajs/web/server-only\"`) yet landed in a CLIENT output chunk, returning a sorted, deduped\n * list of {@link ServerOnlyFinding}s. Mirrors {@link detectNodeBuiltinsInClient}: it reads the SAME\n * graph facts - which inputs import the marker (the \"marked\" modules), which chunk each landed in (the\n * per-output `inputs`), and the shortest import chain from a user entry to it. The marker module ITSELF\n * (which imports nothing) is excluded - only the modules that *opt in* are flagged. Pure + exported for\n * unit testing. Empty ⇒ clean.\n */"
|
|
2972
3231
|
},
|
|
3232
|
+
{
|
|
3233
|
+
"name": "DEV_HMR_ENV",
|
|
3234
|
+
"kind": "const",
|
|
3235
|
+
"package": "@nifrajs/web",
|
|
3236
|
+
"signature": "export declare const DEV_HMR_ENV = \"NIFRA_DEV_HMR\";",
|
|
3237
|
+
"doc": "/**\n * Env flag a nifra dev server sets for its own lifetime, so a framework compiler plugin can tell a dev\n * compile from a `nifra build` one. Exported for the dev server that sets it; plugins ask\n * {@link devServerCompile} instead of reading it.\n */"
|
|
3238
|
+
},
|
|
3239
|
+
{
|
|
3240
|
+
"name": "DEV_ROOT_ENV",
|
|
3241
|
+
"kind": "const",
|
|
3242
|
+
"package": "@nifrajs/web",
|
|
3243
|
+
"signature": "export declare const DEV_ROOT_ENV = \"NIFRA_DEV_ROOT\";",
|
|
3244
|
+
"doc": "/**\n * The app root and the routes directory of the running dev server, for plugins that need to tell one of\n * the app's own components from a dependency or a route module. Set alongside {@link DEV_HMR_ENV}; read\n * through {@link devHotComponent}.\n */"
|
|
3245
|
+
},
|
|
3246
|
+
{
|
|
3247
|
+
"name": "DEV_ROUTES_ENV",
|
|
3248
|
+
"kind": "const",
|
|
3249
|
+
"package": "@nifrajs/web",
|
|
3250
|
+
"signature": "export declare const DEV_ROUTES_ENV = \"NIFRA_DEV_ROUTES\";"
|
|
3251
|
+
},
|
|
3252
|
+
{
|
|
3253
|
+
"name": "devHotComponent",
|
|
3254
|
+
"kind": "function",
|
|
3255
|
+
"package": "@nifrajs/web",
|
|
3256
|
+
"signature": "export declare function devHotComponent(path: string): boolean;",
|
|
3257
|
+
"doc": "/**\n * Whether a dev compile of `path` may wrap the module in component-level hot-patching - i.e. whether it\n * is one of the app's OWN components rather than a dependency or a route module.\n *\n * The exclusions are not caution, they are two things such a wrapper cannot survive:\n *\n * - a **dependency**, whose components are the framework's own composition machinery. An adapter folds\n * a layout chain through them, so they are entered from a snippet or as a dynamic component - and a\n * wrapper there sits between the SSR markup and the component that is supposed to claim it.\n * - a **route module**, for the same reason one level down: a route or layout IS a chain member, so it\n * is always the dynamic child. It is also the wrong boundary to patch - a route module carries the\n * loader and meta the server ran, and re-running those is a navigation, not a patch. Editing one\n * finds no accepting module and reloads the page, which is the correct outcome.\n *\n * Both cost nothing in practice: the components an edit loop actually touches are the views, and a view\n * that wants to hot-patch lives outside the routes directory. Where the split is unknown (no dev server,\n * or a root that was never announced), the answer is `false` - a full reload is always correct, a\n * mispatched tree is not.\n */"
|
|
3258
|
+
},
|
|
2973
3259
|
{
|
|
2974
3260
|
"name": "devHtml",
|
|
2975
3261
|
"kind": "function",
|
|
@@ -2983,6 +3269,13 @@
|
|
|
2983
3269
|
"package": "@nifrajs/web",
|
|
2984
3270
|
"signature": "export interface DevServer {\n readonly port: number;\n /**\n * The URL pages point their client entry at - always {@link CLIENT_ENTRY_PATH}, never Bun's hashed\n * chunk. Deliberately not the underlying chunk URL: that one moves on every rebuild, and anything\n * holding onto it is holding onto a URL that will stop working.\n */\n readonly clientEntry: string;\n stop(): void;\n}"
|
|
2985
3271
|
},
|
|
3272
|
+
{
|
|
3273
|
+
"name": "devServerCompile",
|
|
3274
|
+
"kind": "function",
|
|
3275
|
+
"package": "@nifrajs/web",
|
|
3276
|
+
"signature": "export declare function devServerCompile(): boolean;",
|
|
3277
|
+
"doc": "/**\n * True while a nifra dev server is running, i.e. the compile may emit HMR wiring (and, where the\n * framework couples the two, dev-mode runtime output).\n *\n * The phase cannot be a plugin constructor argument: an app builds its `clientPlugins` once in\n * `nifra.config.ts` and the same plugin objects serve both `nifra dev` and `nifra build`. Guarding the\n * emitted code with `if (import.meta.hot)` is not sufficient either - `Bun.build` keeps the branch, so\n * the HMR calls were measured shipping in production client chunks. The dev server announces itself in\n * the environment instead, and `nifra build` never sets it. Read per compile (not captured at\n * registration) so the flag is honoured however late the server sets it.\n */"
|
|
3278
|
+
},
|
|
2986
3279
|
{
|
|
2987
3280
|
"name": "DevServerOptions",
|
|
2988
3281
|
"kind": "interface",
|
|
@@ -3049,6 +3342,13 @@
|
|
|
3049
3342
|
"signature": "export interface DiagnosticFrame {\n readonly raw: string;\n readonly file?: string;\n readonly line?: number;\n readonly column?: number;\n}",
|
|
3050
3343
|
"doc": "/** One parsed stack frame. `file`/`line`/`column` are present only when the frame could be located. */"
|
|
3051
3344
|
},
|
|
3345
|
+
{
|
|
3346
|
+
"name": "diffDataContract",
|
|
3347
|
+
"kind": "function",
|
|
3348
|
+
"package": "@nifrajs/core",
|
|
3349
|
+
"signature": "export declare function diffDataContract(declared: DataContract, observed: DataContractSnapshot | DataContract): readonly DataDrift[];",
|
|
3350
|
+
"doc": "/** Compare a declared contract with an adapter-observed token-only snapshot. */"
|
|
3351
|
+
},
|
|
3052
3352
|
{
|
|
3053
3353
|
"name": "diffManifestRoutes",
|
|
3054
3354
|
"kind": "function",
|
|
@@ -3718,6 +4018,18 @@
|
|
|
3718
4018
|
"package": "@nifrajs/testing",
|
|
3719
4019
|
"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
4020
|
},
|
|
4021
|
+
{
|
|
4022
|
+
"name": "FetchApp",
|
|
4023
|
+
"kind": "interface",
|
|
4024
|
+
"package": "@nifrajs/core",
|
|
4025
|
+
"signature": "export interface FetchApp<Env = unknown> {\n fetch(request: Request, platform?: Platform<Env>): MaybePromise<Response>;\n}"
|
|
4026
|
+
},
|
|
4027
|
+
{
|
|
4028
|
+
"name": "FetchApp",
|
|
4029
|
+
"kind": "interface",
|
|
4030
|
+
"package": "nifra",
|
|
4031
|
+
"signature": "export interface FetchApp<Env = unknown> {\n fetch(request: Request, platform?: Platform<Env>): MaybePromise<Response>;\n}"
|
|
4032
|
+
},
|
|
3721
4033
|
{
|
|
3722
4034
|
"name": "Fetcher",
|
|
3723
4035
|
"kind": "interface",
|
|
@@ -4242,6 +4554,13 @@
|
|
|
4242
4554
|
"signature": "export declare class Histogram {\n readonly name: string;\n readonly help: string;\n private readonly series;\n private readonly buckets;\n constructor(name: string, help: string, buckets: readonly number[]);\n observe(value: number, labels?: Labels): void;\n render(): string;\n}",
|
|
4243
4555
|
"doc": "/** Latency-style distribution over fixed buckets (seconds). Renders Prometheus cumulative buckets. */"
|
|
4244
4556
|
},
|
|
4557
|
+
{
|
|
4558
|
+
"name": "hotUpdateNeedsReload",
|
|
4559
|
+
"kind": "const",
|
|
4560
|
+
"package": "@nifrajs/web-preact",
|
|
4561
|
+
"signature": "export declare const hotUpdateNeedsReload = true;",
|
|
4562
|
+
"doc": "/**\n * Preact cannot apply Bun's hot updates, so the generated client entry reloads instead.\n *\n * Bun's dev server runs React Fast Refresh over JSX modules. A Preact component compiles to JSX that\n * looks the same, so the update is ACCEPTED - and then dropped, because Preact's refresh runtime\n * (prefresh) is not the one Bun installs. Measured: `bun:beforeUpdate` and `bun:afterUpdate` both fire,\n * the server logs the rebuild, the browser keeps rendering the old component and never reloads. The\n * edit simply appears not to happen.\n *\n * Reloading loses component state, which React keeps here. That is the honest trade until Bun's dev\n * server can install prefresh: a visible reload beats an edit that silently does nothing.\n */"
|
|
4563
|
+
},
|
|
4245
4564
|
{
|
|
4246
4565
|
"name": "html",
|
|
4247
4566
|
"kind": "function",
|
|
@@ -4799,6 +5118,13 @@
|
|
|
4799
5118
|
"signature": "export declare function isAllowedFontUrl(raw: string): boolean;",
|
|
4800
5119
|
"doc": "/** `true` iff `raw` is an `https://fonts.gstatic.com/…` URL - the only host we'll download from. */"
|
|
4801
5120
|
},
|
|
5121
|
+
{
|
|
5122
|
+
"name": "isAuthorized",
|
|
5123
|
+
"kind": "function",
|
|
5124
|
+
"package": "@nifrajs/auth",
|
|
5125
|
+
"signature": "export declare function isAuthorized<Subject, Resource>(authorizer: Authorizer<Subject, Resource>, request: AuthorizationRequest<Subject, Resource>): Promise<boolean>;",
|
|
5126
|
+
"doc": "/** Evaluate a policy, failing closed for any non-true result. */"
|
|
5127
|
+
},
|
|
4802
5128
|
{
|
|
4803
5129
|
"name": "isBuildTarget",
|
|
4804
5130
|
"kind": "function",
|
|
@@ -4908,6 +5234,13 @@
|
|
|
4908
5234
|
"signature": "export declare const ISR_REVALIDATE_HEADER = \"x-nifra-isr-revalidate\";",
|
|
4909
5235
|
"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
5236
|
},
|
|
5237
|
+
{
|
|
5238
|
+
"name": "ISR_REVALIDATE_TAGS_HEADER",
|
|
5239
|
+
"kind": "const",
|
|
5240
|
+
"package": "@nifrajs/web",
|
|
5241
|
+
"signature": "export declare const ISR_REVALIDATE_TAGS_HEADER = \"x-nifra-isr-tags\";",
|
|
5242
|
+
"doc": "/** Response header carrying bounded route tags into {@link withISR}. */"
|
|
5243
|
+
},
|
|
4911
5244
|
{
|
|
4912
5245
|
"name": "ISR_STATUS_HEADER",
|
|
4913
5246
|
"kind": "const",
|
|
@@ -5146,14 +5479,14 @@
|
|
|
5146
5479
|
"name": "KVCacheStore",
|
|
5147
5480
|
"kind": "class",
|
|
5148
5481
|
"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 */"
|
|
5482
|
+
"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}",
|
|
5483
|
+
"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
5484
|
},
|
|
5152
5485
|
{
|
|
5153
5486
|
"name": "KVCacheStoreOptions",
|
|
5154
5487
|
"kind": "interface",
|
|
5155
5488
|
"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}"
|
|
5489
|
+
"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
5490
|
},
|
|
5158
5491
|
{
|
|
5159
5492
|
"name": "KVNamespaceLike",
|
|
@@ -5176,6 +5509,66 @@
|
|
|
5176
5509
|
"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
5510
|
"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
5511
|
},
|
|
5512
|
+
{
|
|
5513
|
+
"name": "LambdaEvent",
|
|
5514
|
+
"kind": "type",
|
|
5515
|
+
"package": "@nifrajs/core",
|
|
5516
|
+
"signature": "export type LambdaEvent = LambdaV2Event | LambdaV1Event;"
|
|
5517
|
+
},
|
|
5518
|
+
{
|
|
5519
|
+
"name": "LambdaEvent",
|
|
5520
|
+
"kind": "type",
|
|
5521
|
+
"package": "nifra",
|
|
5522
|
+
"signature": "export type LambdaEvent = LambdaV2Event | LambdaV1Event;"
|
|
5523
|
+
},
|
|
5524
|
+
{
|
|
5525
|
+
"name": "LambdaHandler",
|
|
5526
|
+
"kind": "type",
|
|
5527
|
+
"package": "@nifrajs/core",
|
|
5528
|
+
"signature": "export type LambdaHandler = (event: LambdaEvent, context?: unknown) => Promise<LambdaResponse>;"
|
|
5529
|
+
},
|
|
5530
|
+
{
|
|
5531
|
+
"name": "LambdaHandler",
|
|
5532
|
+
"kind": "type",
|
|
5533
|
+
"package": "nifra",
|
|
5534
|
+
"signature": "export type LambdaHandler = (event: LambdaEvent, context?: unknown) => Promise<LambdaResponse>;"
|
|
5535
|
+
},
|
|
5536
|
+
{
|
|
5537
|
+
"name": "LambdaResponse",
|
|
5538
|
+
"kind": "type",
|
|
5539
|
+
"package": "@nifrajs/core",
|
|
5540
|
+
"signature": "export type LambdaResponse = PlatformResponse;"
|
|
5541
|
+
},
|
|
5542
|
+
{
|
|
5543
|
+
"name": "LambdaResponse",
|
|
5544
|
+
"kind": "type",
|
|
5545
|
+
"package": "nifra",
|
|
5546
|
+
"signature": "export type LambdaResponse = PlatformResponse;"
|
|
5547
|
+
},
|
|
5548
|
+
{
|
|
5549
|
+
"name": "LambdaV1Event",
|
|
5550
|
+
"kind": "interface",
|
|
5551
|
+
"package": "@nifrajs/core",
|
|
5552
|
+
"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}"
|
|
5553
|
+
},
|
|
5554
|
+
{
|
|
5555
|
+
"name": "LambdaV1Event",
|
|
5556
|
+
"kind": "interface",
|
|
5557
|
+
"package": "nifra",
|
|
5558
|
+
"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}"
|
|
5559
|
+
},
|
|
5560
|
+
{
|
|
5561
|
+
"name": "LambdaV2Event",
|
|
5562
|
+
"kind": "interface",
|
|
5563
|
+
"package": "@nifrajs/core",
|
|
5564
|
+
"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}"
|
|
5565
|
+
},
|
|
5566
|
+
{
|
|
5567
|
+
"name": "LambdaV2Event",
|
|
5568
|
+
"kind": "interface",
|
|
5569
|
+
"package": "nifra",
|
|
5570
|
+
"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}"
|
|
5571
|
+
},
|
|
5179
5572
|
{
|
|
5180
5573
|
"name": "language",
|
|
5181
5574
|
"kind": "function",
|
|
@@ -5687,7 +6080,7 @@
|
|
|
5687
6080
|
"name": "MemoryCacheStore",
|
|
5688
6081
|
"kind": "class",
|
|
5689
6082
|
"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}",
|
|
6083
|
+
"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
6084
|
"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
6085
|
},
|
|
5693
6086
|
{
|
|
@@ -5702,6 +6095,19 @@
|
|
|
5702
6095
|
"package": "@nifrajs/core",
|
|
5703
6096
|
"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
6097
|
},
|
|
6098
|
+
{
|
|
6099
|
+
"name": "memoryChannelHub",
|
|
6100
|
+
"kind": "function",
|
|
6101
|
+
"package": "@nifrajs/core",
|
|
6102
|
+
"signature": "export declare function memoryChannelHub(options?: MemoryChannelHubOptions): ChannelHub;",
|
|
6103
|
+
"doc": "/** A bounded in-memory hub suitable for tests and local development, never for durable fan-out. */"
|
|
6104
|
+
},
|
|
6105
|
+
{
|
|
6106
|
+
"name": "MemoryChannelHubOptions",
|
|
6107
|
+
"kind": "interface",
|
|
6108
|
+
"package": "@nifrajs/core",
|
|
6109
|
+
"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}"
|
|
6110
|
+
},
|
|
5705
6111
|
{
|
|
5706
6112
|
"name": "MemoryDurableEffectStore",
|
|
5707
6113
|
"kind": "class",
|
|
@@ -5821,7 +6227,7 @@
|
|
|
5821
6227
|
"kind": "function",
|
|
5822
6228
|
"package": "@nifrajs/web",
|
|
5823
6229
|
"signature": "export declare function mergeHeads(heads: readonly Meta[]): Meta;",
|
|
5824
|
-
"doc": "/**\n * Merge a
|
|
6230
|
+
"doc": "/**\n * Merge a layout chain's heads, outermost first: `title`/`lang`/`dir` are nearest-wins, and\n * `meta`/`link`/`script` concatenate in chain order.\n *\n * Returns a fresh object whose identity is stable per `heads` *content* only when every entry is a\n * static (by-reference) `Meta` and there is exactly one - otherwise a new object each call. That is\n * fine: `headTags`'s memo is keyed on identity, so a per-request merge simply recomputes (its\n * content can vary with loader data anyway).\n */"
|
|
5825
6231
|
},
|
|
5826
6232
|
{
|
|
5827
6233
|
"name": "Messages",
|
|
@@ -6048,6 +6454,37 @@
|
|
|
6048
6454
|
"signature": "export interface MovableStorageAdapter extends StorageAdapter {\n copy(sourceKey: string, destinationKey: string): Promise<void>;\n move(sourceKey: string, destinationKey: string): Promise<void>;\n}",
|
|
6049
6455
|
"doc": "/** Optional server-side copy/move capability. */"
|
|
6050
6456
|
},
|
|
6457
|
+
{
|
|
6458
|
+
"name": "MultipartBody",
|
|
6459
|
+
"kind": "type",
|
|
6460
|
+
"package": "@nifrajs/middleware",
|
|
6461
|
+
"signature": "export type MultipartBody = string | Uint8Array | ArrayBuffer | ArrayBufferView | Blob | ReadableStream<Uint8Array>;"
|
|
6462
|
+
},
|
|
6463
|
+
{
|
|
6464
|
+
"name": "MultipartHeadersInit",
|
|
6465
|
+
"kind": "type",
|
|
6466
|
+
"package": "@nifrajs/middleware",
|
|
6467
|
+
"signature": "export type MultipartHeadersInit = Headers | Readonly<Record<string, string>> | ReadonlyArray<readonly [string, string]>;"
|
|
6468
|
+
},
|
|
6469
|
+
{
|
|
6470
|
+
"name": "MultipartPart",
|
|
6471
|
+
"kind": "interface",
|
|
6472
|
+
"package": "@nifrajs/middleware",
|
|
6473
|
+
"signature": "export interface MultipartPart {\n readonly headers?: MultipartHeadersInit;\n readonly body: MultipartBody;\n}"
|
|
6474
|
+
},
|
|
6475
|
+
{
|
|
6476
|
+
"name": "multipartResponse",
|
|
6477
|
+
"kind": "function",
|
|
6478
|
+
"package": "@nifrajs/middleware",
|
|
6479
|
+
"signature": "export declare function multipartResponse(parts: Iterable<MultipartPart> | AsyncIterable<MultipartPart>, options?: MultipartResponseOptions): Response;",
|
|
6480
|
+
"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 */"
|
|
6481
|
+
},
|
|
6482
|
+
{
|
|
6483
|
+
"name": "MultipartResponseOptions",
|
|
6484
|
+
"kind": "interface",
|
|
6485
|
+
"package": "@nifrajs/middleware",
|
|
6486
|
+
"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}"
|
|
6487
|
+
},
|
|
6051
6488
|
{
|
|
6052
6489
|
"name": "MutationCallbacks",
|
|
6053
6490
|
"kind": "interface",
|
|
@@ -6195,6 +6632,13 @@
|
|
|
6195
6632
|
"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
6633
|
"doc": "/** The state a {@link NavLink}'s function-form `className`/`style`/`children` receive. */"
|
|
6197
6634
|
},
|
|
6635
|
+
{
|
|
6636
|
+
"name": "negotiateContentType",
|
|
6637
|
+
"kind": "function",
|
|
6638
|
+
"package": "@nifrajs/middleware",
|
|
6639
|
+
"signature": "export declare function negotiateContentType(accept: string | null | Headers | Request, offered: readonly string[]): string | undefined;",
|
|
6640
|
+
"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 */"
|
|
6641
|
+
},
|
|
6198
6642
|
{
|
|
6199
6643
|
"name": "negotiateLocale",
|
|
6200
6644
|
"kind": "function",
|
|
@@ -6208,6 +6652,30 @@
|
|
|
6208
6652
|
"package": "@nifrajs/i18n",
|
|
6209
6653
|
"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
6654
|
},
|
|
6655
|
+
{
|
|
6656
|
+
"name": "NetlifyEvent",
|
|
6657
|
+
"kind": "interface",
|
|
6658
|
+
"package": "@nifrajs/core",
|
|
6659
|
+
"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}"
|
|
6660
|
+
},
|
|
6661
|
+
{
|
|
6662
|
+
"name": "NetlifyEvent",
|
|
6663
|
+
"kind": "interface",
|
|
6664
|
+
"package": "nifra",
|
|
6665
|
+
"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}"
|
|
6666
|
+
},
|
|
6667
|
+
{
|
|
6668
|
+
"name": "NetlifyHandler",
|
|
6669
|
+
"kind": "type",
|
|
6670
|
+
"package": "@nifrajs/core",
|
|
6671
|
+
"signature": "export type NetlifyHandler = (event: NetlifyEvent) => Promise<PlatformResponse>;"
|
|
6672
|
+
},
|
|
6673
|
+
{
|
|
6674
|
+
"name": "NetlifyHandler",
|
|
6675
|
+
"kind": "type",
|
|
6676
|
+
"package": "nifra",
|
|
6677
|
+
"signature": "export type NetlifyHandler = (event: NetlifyEvent) => Promise<PlatformResponse>;"
|
|
6678
|
+
},
|
|
6211
6679
|
{
|
|
6212
6680
|
"name": "nextRun",
|
|
6213
6681
|
"kind": "function",
|
|
@@ -6502,6 +6970,32 @@
|
|
|
6502
6970
|
"package": "@nifrajs/otel",
|
|
6503
6971
|
"signature": "export interface ObservationParent {\n readonly traceId: string;\n readonly spanId: string;\n readonly sampled: boolean;\n}"
|
|
6504
6972
|
},
|
|
6973
|
+
{
|
|
6974
|
+
"name": "OgImageOptions",
|
|
6975
|
+
"kind": "interface",
|
|
6976
|
+
"package": "@nifrajs/image",
|
|
6977
|
+
"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}"
|
|
6978
|
+
},
|
|
6979
|
+
{
|
|
6980
|
+
"name": "OgImageRasterized",
|
|
6981
|
+
"kind": "interface",
|
|
6982
|
+
"package": "@nifrajs/image",
|
|
6983
|
+
"signature": "export interface OgImageRasterized {\n readonly bytes: Uint8Array;\n readonly contentType: string;\n}",
|
|
6984
|
+
"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 */"
|
|
6985
|
+
},
|
|
6986
|
+
{
|
|
6987
|
+
"name": "OgImageRasterizer",
|
|
6988
|
+
"kind": "type",
|
|
6989
|
+
"package": "@nifrajs/image",
|
|
6990
|
+
"signature": "export type OgImageRasterizer = (svg: string) => OgImageRasterized | Promise<OgImageRasterized>;"
|
|
6991
|
+
},
|
|
6992
|
+
{
|
|
6993
|
+
"name": "ogImageResponse",
|
|
6994
|
+
"kind": "function",
|
|
6995
|
+
"package": "@nifrajs/image",
|
|
6996
|
+
"signature": "export declare function ogImageResponse(options: OgImageOptions, request?: Request): Promise<Response>;",
|
|
6997
|
+
"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 */"
|
|
6998
|
+
},
|
|
6505
6999
|
{
|
|
6506
7000
|
"name": "OnRequestResult",
|
|
6507
7001
|
"kind": "type",
|
|
@@ -6681,6 +7175,27 @@
|
|
|
6681
7175
|
"signature": "export declare function parse(text: string, limits?: WireDecodeLimits): unknown;",
|
|
6682
7176
|
"doc": "/** `JSON.parse` + `decode` in one call - the rich-type equivalent of `JSON.parse`. */"
|
|
6683
7177
|
},
|
|
7178
|
+
{
|
|
7179
|
+
"name": "parseAcceptHeader",
|
|
7180
|
+
"kind": "function",
|
|
7181
|
+
"package": "@nifrajs/middleware",
|
|
7182
|
+
"signature": "export declare function parseAcceptHeader(value: string | null): readonly ContentPreference[];",
|
|
7183
|
+
"doc": "/** Parse an `Accept` header, preserving quality and wildcard specificity. */"
|
|
7184
|
+
},
|
|
7185
|
+
{
|
|
7186
|
+
"name": "parseByteRange",
|
|
7187
|
+
"kind": "function",
|
|
7188
|
+
"package": "@nifrajs/core",
|
|
7189
|
+
"signature": "export declare function parseByteRange(value: string | null, size: number): ByteRangeResult;",
|
|
7190
|
+
"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 */"
|
|
7191
|
+
},
|
|
7192
|
+
{
|
|
7193
|
+
"name": "parseByteRange",
|
|
7194
|
+
"kind": "function",
|
|
7195
|
+
"package": "@nifrajs/middleware",
|
|
7196
|
+
"signature": "export declare function parseByteRange(value: string | null, size: number): ByteRangeResult;",
|
|
7197
|
+
"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 */"
|
|
7198
|
+
},
|
|
6684
7199
|
{
|
|
6685
7200
|
"name": "parseCausalityContext",
|
|
6686
7201
|
"kind": "function",
|
|
@@ -6866,6 +7381,18 @@
|
|
|
6866
7381
|
"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
7382
|
"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
7383
|
},
|
|
7384
|
+
{
|
|
7385
|
+
"name": "PlatformResponse",
|
|
7386
|
+
"kind": "interface",
|
|
7387
|
+
"package": "@nifrajs/core",
|
|
7388
|
+
"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}"
|
|
7389
|
+
},
|
|
7390
|
+
{
|
|
7391
|
+
"name": "PlatformResponse",
|
|
7392
|
+
"kind": "interface",
|
|
7393
|
+
"package": "nifra",
|
|
7394
|
+
"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}"
|
|
7395
|
+
},
|
|
6869
7396
|
{
|
|
6870
7397
|
"name": "PluginBuilder",
|
|
6871
7398
|
"kind": "type",
|
|
@@ -6873,6 +7400,13 @@
|
|
|
6873
7400
|
"signature": "export type PluginBuilder = Parameters<BunPlugin[\"setup\"]>[0];",
|
|
6874
7401
|
"doc": "/** The argument Bun passes to a plugin's `setup` - Bun doesn't export the type, so derive it. */"
|
|
6875
7402
|
},
|
|
7403
|
+
{
|
|
7404
|
+
"name": "PngRenderer",
|
|
7405
|
+
"kind": "type",
|
|
7406
|
+
"package": "@nifrajs/image",
|
|
7407
|
+
"signature": "export type PngRenderer = (svg: string) => Uint8Array | Promise<Uint8Array>;",
|
|
7408
|
+
"doc": "/** A dependency-free shape implemented by SVG→PNG codecs such as Resvg, Satori, or a WASM backend. */"
|
|
7409
|
+
},
|
|
6876
7410
|
{
|
|
6877
7411
|
"name": "port",
|
|
6878
7412
|
"kind": "function",
|
|
@@ -7065,6 +7599,19 @@
|
|
|
7065
7599
|
"signature": "export type PrincipalFor<User, RequireTenant extends boolean> = RequireTenant extends true ? Principal<User> & {\n readonly tenantId: string;\n} : Principal<User>;",
|
|
7066
7600
|
"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
7601
|
},
|
|
7602
|
+
{
|
|
7603
|
+
"name": "problemDetails",
|
|
7604
|
+
"kind": "function",
|
|
7605
|
+
"package": "@nifrajs/middleware",
|
|
7606
|
+
"signature": "export declare function problemDetails(options?: ProblemDetailsOptions): import(\"@nifrajs/core/server\").NifraPlugin<import(\"@nifrajs/core/server\").AnyServer, import(\"@nifrajs/core/server\").AnyServer>;",
|
|
7607
|
+
"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 */"
|
|
7608
|
+
},
|
|
7609
|
+
{
|
|
7610
|
+
"name": "ProblemDetailsOptions",
|
|
7611
|
+
"kind": "interface",
|
|
7612
|
+
"package": "@nifrajs/middleware",
|
|
7613
|
+
"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}"
|
|
7614
|
+
},
|
|
7068
7615
|
{
|
|
7069
7616
|
"name": "prompt",
|
|
7070
7617
|
"kind": "function",
|
|
@@ -7269,6 +7816,19 @@
|
|
|
7269
7816
|
"signature": "export declare function randomEffectDigestKey(): Uint8Array;",
|
|
7270
7817
|
"doc": "/** Fresh random digest key (32 bytes). Per-process by default - persist one externally to correlate across restarts. */"
|
|
7271
7818
|
},
|
|
7819
|
+
{
|
|
7820
|
+
"name": "rangeResponse",
|
|
7821
|
+
"kind": "function",
|
|
7822
|
+
"package": "@nifrajs/middleware",
|
|
7823
|
+
"signature": "export declare function rangeResponse(request: Request, body: string | ArrayBuffer | ArrayBufferView | Uint8Array, options?: RangeResponseOptions): Response;",
|
|
7824
|
+
"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 */"
|
|
7825
|
+
},
|
|
7826
|
+
{
|
|
7827
|
+
"name": "RangeResponseOptions",
|
|
7828
|
+
"kind": "interface",
|
|
7829
|
+
"package": "@nifrajs/middleware",
|
|
7830
|
+
"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}"
|
|
7831
|
+
},
|
|
7272
7832
|
{
|
|
7273
7833
|
"name": "rateLimit",
|
|
7274
7834
|
"kind": "function",
|
|
@@ -7627,6 +8187,13 @@
|
|
|
7627
8187
|
"signature": "export type RenderMode = \"static\" | \"isr\" | \"ssr\";",
|
|
7628
8188
|
"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
8189
|
},
|
|
8190
|
+
{
|
|
8191
|
+
"name": "renderOgImage",
|
|
8192
|
+
"kind": "function",
|
|
8193
|
+
"package": "@nifrajs/image",
|
|
8194
|
+
"signature": "export declare function renderOgImage(options: OgImageOptions): string;",
|
|
8195
|
+
"doc": "/** Render a bounded, deterministic SVG suitable for an `og:image` endpoint. */"
|
|
8196
|
+
},
|
|
7630
8197
|
{
|
|
7631
8198
|
"name": "renderPage",
|
|
7632
8199
|
"kind": "function",
|
|
@@ -7645,7 +8212,7 @@
|
|
|
7645
8212
|
"name": "RenderPageOptions",
|
|
7646
8213
|
"kind": "interface",
|
|
7647
8214
|
"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}"
|
|
8215
|
+
"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
8216
|
},
|
|
7650
8217
|
{
|
|
7651
8218
|
"name": "renderPageResult",
|
|
@@ -7747,6 +8314,13 @@
|
|
|
7747
8314
|
"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
8315
|
"doc": "/** One request to drive through the app. */"
|
|
7749
8316
|
},
|
|
8317
|
+
{
|
|
8318
|
+
"name": "requireAuthorization",
|
|
8319
|
+
"kind": "function",
|
|
8320
|
+
"package": "@nifrajs/auth",
|
|
8321
|
+
"signature": "export declare function requireAuthorization<Subject, Resource>(authorizer: Authorizer<Subject, Resource>, request: AuthorizationRequest<Subject, Resource>): Promise<void>;",
|
|
8322
|
+
"doc": "/** Require an application/data-layer policy to allow an action; denied requests throw a 403 Response. */"
|
|
8323
|
+
},
|
|
7750
8324
|
{
|
|
7751
8325
|
"name": "requirePeer",
|
|
7752
8326
|
"kind": "function",
|
|
@@ -7819,7 +8393,7 @@
|
|
|
7819
8393
|
"kind": "function",
|
|
7820
8394
|
"package": "@nifrajs/web",
|
|
7821
8395
|
"signature": "export declare function resolveMeta(meta: MetaInput | undefined, args: MetaArgs): Meta;",
|
|
7822
|
-
"doc": "/** Resolve a route's `meta`
|
|
8396
|
+
"doc": "/** Resolve a route's `meta` export - a static object, or a function of the route's data/params. */"
|
|
7823
8397
|
},
|
|
7824
8398
|
{
|
|
7825
8399
|
"name": "resolveNavigate",
|
|
@@ -8015,6 +8589,18 @@
|
|
|
8015
8589
|
"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
8590
|
"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
8591
|
},
|
|
8592
|
+
{
|
|
8593
|
+
"name": "ResvgConstructor",
|
|
8594
|
+
"kind": "type",
|
|
8595
|
+
"package": "@nifrajs/image",
|
|
8596
|
+
"signature": "export type ResvgConstructor = new (svg: string) => ResvgRenderer;"
|
|
8597
|
+
},
|
|
8598
|
+
{
|
|
8599
|
+
"name": "ResvgRenderer",
|
|
8600
|
+
"kind": "interface",
|
|
8601
|
+
"package": "@nifrajs/image",
|
|
8602
|
+
"signature": "export interface ResvgRenderer {\n render(): {\n asPng(): Uint8Array | Promise<Uint8Array>;\n };\n}"
|
|
8603
|
+
},
|
|
8018
8604
|
{
|
|
8019
8605
|
"name": "resyncServerManifestSource",
|
|
8020
8606
|
"kind": "function",
|
|
@@ -8054,7 +8640,7 @@
|
|
|
8054
8640
|
"kind": "function",
|
|
8055
8641
|
"package": "@nifrajs/web",
|
|
8056
8642
|
"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 *
|
|
8643
|
+
"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
8644
|
},
|
|
8059
8645
|
{
|
|
8060
8646
|
"name": "RevalidateEndpointOptions",
|
|
@@ -8069,6 +8655,13 @@
|
|
|
8069
8655
|
"signature": "export interface RevalidateResult<T> {\n readonly __nifraRevalidate: readonly string[];\n readonly data: T;\n}",
|
|
8070
8656
|
"doc": "/** The wrapper `revalidate()` returns: the action's `data` plus the paths it changed. A plain tagged\n * shape (not a class) so `@nifrajs/client`'s `ActionData` can unwrap it structurally without importing\n * from `@nifrajs/web`. `createWebApp` strips the wrapper - the client receives `data` as the body and\n * the paths via the `X-Nifra-Revalidate` header. */"
|
|
8071
8657
|
},
|
|
8658
|
+
{
|
|
8659
|
+
"name": "rewriteSsrImports",
|
|
8660
|
+
"kind": "function",
|
|
8661
|
+
"package": "@nifrajs/web",
|
|
8662
|
+
"signature": "export declare function rewriteSsrImports(contents: string, path: string, generate: \"dom\" | \"ssr\"): string;",
|
|
8663
|
+
"doc": "/**\n * Re-key the app-owned imports of a module a **server-side** plugin just compiled. A plugin that claims a\n * file extension is the only code that sees that file's source, so it is the only place its imports can\n * be versioned; without this call every component in that language stays on the code it had at startup.\n *\n * A no-op outside a Bun dev server, and on the client half of a plugin - the client is bundled, and a\n * bundle has no import cache to bust.\n */"
|
|
8664
|
+
},
|
|
8072
8665
|
{
|
|
8073
8666
|
"name": "richWireCodec",
|
|
8074
8667
|
"kind": "function",
|
|
@@ -8081,6 +8674,20 @@
|
|
|
8081
8674
|
"package": "@nifrajs/core",
|
|
8082
8675
|
"signature": "export interface RichWireCodecOptions {\n readonly limits?: WireDecodeLimits;\n}"
|
|
8083
8676
|
},
|
|
8677
|
+
{
|
|
8678
|
+
"name": "rlsScope",
|
|
8679
|
+
"kind": "function",
|
|
8680
|
+
"package": "@nifrajs/core",
|
|
8681
|
+
"signature": "export declare function rlsScope(token: string, digest?: string): RlsScope;",
|
|
8682
|
+
"doc": "/** Create a bounded, opaque RLS/equivalent policy scope for a data adapter. */"
|
|
8683
|
+
},
|
|
8684
|
+
{
|
|
8685
|
+
"name": "RlsScope",
|
|
8686
|
+
"kind": "interface",
|
|
8687
|
+
"package": "@nifrajs/core",
|
|
8688
|
+
"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}",
|
|
8689
|
+
"doc": "/** Opaque request-local RLS (or equivalent data-policy) scope passed to an adapter. */"
|
|
8690
|
+
},
|
|
8084
8691
|
{
|
|
8085
8692
|
"name": "robots",
|
|
8086
8693
|
"kind": "function",
|
|
@@ -8242,7 +8849,7 @@
|
|
|
8242
8849
|
"name": "RouteManifestEntry",
|
|
8243
8850
|
"kind": "interface",
|
|
8244
8851
|
"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}",
|
|
8852
|
+
"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
8853
|
"doc": "/** One route's resolved behaviour. */"
|
|
8247
8854
|
},
|
|
8248
8855
|
{
|
|
@@ -8256,7 +8863,7 @@
|
|
|
8256
8863
|
"name": "RouteModule",
|
|
8257
8864
|
"kind": "interface",
|
|
8258
8865
|
"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}",
|
|
8866
|
+
"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
8867
|
"doc": "/** A route module - the default component + optional loader / action / meta. */"
|
|
8261
8868
|
},
|
|
8262
8869
|
{
|
|
@@ -8647,6 +9254,13 @@
|
|
|
8647
9254
|
"signature": "export interface SchemaSnapshot {\n readonly jsonSchema?: JsonSchema;\n readonly fields?: readonly ReflectedSchemaField[];\n}",
|
|
8648
9255
|
"doc": "/** One schema position in a snapshot: JSON Schema metadata only, no validator. */"
|
|
8649
9256
|
},
|
|
9257
|
+
{
|
|
9258
|
+
"name": "scopedName",
|
|
9259
|
+
"kind": "function",
|
|
9260
|
+
"package": "@nifrajs/web",
|
|
9261
|
+
"signature": "export declare function scopedName(filePath: string, className: string): string;",
|
|
9262
|
+
"doc": "/**\n * The scoped name for a class. Keyed by `filePath` + `className` (NUL-separated so `\"a\"+\"bc\"` can't\n * collide with `\"ab\"+\"c\"`), so the same class name in two different files gets two different scoped\n * names - cross-file collision resistance - while staying stable across builds.\n *\n * Exported because it is the definition of the name, and the OTHER pipeline has to be able to produce\n * it: Vite ships its own CSS-Modules naming, so without handing Vite this function a class is called\n * one thing under `nifra dev --vite` and another after `nifra build`. `filePath` must be the\n * package-relative form from `reproduciblePath`, never an absolute path, or the name stops being\n * reproducible across machines.\n */"
|
|
9263
|
+
},
|
|
8650
9264
|
{
|
|
8651
9265
|
"name": "ScriptDescriptor",
|
|
8652
9266
|
"kind": "interface",
|
|
@@ -9239,6 +9853,13 @@
|
|
|
9239
9853
|
"signature": "export type SetSearchParams = (next: SearchParamsInit | ((prev: URLSearchParams) => SearchParamsInit), options?: NavigateOptions) => void;",
|
|
9240
9854
|
"doc": "/** Set the query string. Accepts a `URLSearchParams`, a record, a raw string, or an updater of the\n * current params; navigates to the same pathname with the new query (push, or replace via options). */"
|
|
9241
9855
|
},
|
|
9856
|
+
{
|
|
9857
|
+
"name": "setSsrModuleLoader",
|
|
9858
|
+
"kind": "function",
|
|
9859
|
+
"package": "@nifrajs/web",
|
|
9860
|
+
"signature": "export declare function setSsrModuleLoader(load: SsrModuleLoader | undefined): void;",
|
|
9861
|
+
"doc": "/**\n * Publishes the dev server's SSR module loader. Called by a dev server that owns SSR resolution\n * itself; pass `undefined` to clear it on shutdown.\n */"
|
|
9862
|
+
},
|
|
9242
9863
|
{
|
|
9243
9864
|
"name": "shapeOf",
|
|
9244
9865
|
"kind": "function",
|
|
@@ -9396,6 +10017,13 @@
|
|
|
9396
10017
|
"signature": "export declare function snapshotCapabilities(report: CapabilityAssuranceReport): CapabilitySnapshot;",
|
|
9397
10018
|
"doc": "/** Deterministic, PII-free lockfile material. */"
|
|
9398
10019
|
},
|
|
10020
|
+
{
|
|
10021
|
+
"name": "snapshotDataContract",
|
|
10022
|
+
"kind": "function",
|
|
10023
|
+
"package": "@nifrajs/core",
|
|
10024
|
+
"signature": "export declare function snapshotDataContract(contract: DataContract): DataContractSnapshot;",
|
|
10025
|
+
"doc": "/** Strip a contract to its token-only version/access snapshot for CI or adapter drift checks. */"
|
|
10026
|
+
},
|
|
9399
10027
|
{
|
|
9400
10028
|
"name": "snapshotRoutes",
|
|
9401
10029
|
"kind": "function",
|
|
@@ -9415,7 +10043,7 @@
|
|
|
9415
10043
|
"kind": "function",
|
|
9416
10044
|
"package": "@nifrajs/web-solid",
|
|
9417
10045
|
"signature": "export declare function solidBunPlugin(generate: \"dom\" | \"ssr\"): BunPlugin;",
|
|
9418
|
-
"doc": "/**\n * Bun build/runtime plugin that compiles Solid components with Babel - `generate: \"ssr\"`\n * for the server, `\"dom\"` for the client, `hydratable` so SSR and hydrate align. Solid's\n * reactive-JSX compiler ships only as a Babel plugin (no swc/native port); this runs at\n * build time, on `.tsx` files only.\n */"
|
|
10046
|
+
"doc": "/**\n * Bun build/runtime plugin that compiles Solid components with Babel - `generate: \"ssr\"`\n * for the server, `\"dom\"` for the client, `hydratable` so SSR and hydrate align. Solid's\n * reactive-JSX compiler ships only as a Babel plugin (no swc/native port); this runs at\n * build time, on `.tsx` files only.\n *\n * Under a dev server the client half additionally runs `solid-refresh`, which is what makes an edit\n * patch the running component tree instead of reloading the page - see {@link setupSolidRefresh}.\n */"
|
|
9419
10047
|
},
|
|
9420
10048
|
{
|
|
9421
10049
|
"name": "solidMdxBunPlugin",
|
|
@@ -9549,6 +10177,20 @@
|
|
|
9549
10177
|
"signature": "export interface SSEStream {\n /** Enqueue an event frame. No-op once the stream is closed. */\n send(message: SSEMessage): void;\n /** End the stream now. */\n close(): void;\n /** Aborts when the client disconnects - use it to tear down subscriptions/loops. */\n readonly signal: AbortSignal;\n}",
|
|
9550
10178
|
"doc": "/** The stream handed to the `run` callback. */"
|
|
9551
10179
|
},
|
|
10180
|
+
{
|
|
10181
|
+
"name": "ssrModuleLoader",
|
|
10182
|
+
"kind": "function",
|
|
10183
|
+
"package": "@nifrajs/web",
|
|
10184
|
+
"signature": "export declare function ssrModuleLoader(): SsrModuleLoader | undefined;",
|
|
10185
|
+
"doc": "/**\n * The dev server's SSR module loader, or `undefined` when nothing owns SSR resolution but the runtime\n * - the Bun dev pipeline, and every production build, where the adapter's assets are compiled ahead\n * of time and a plain `import` is already the right thing.\n *\n * An adapter that must load a COMPILED asset at runtime (a `.svelte` component, say) has to prefer\n * this over a bare `import`, and has to take the framework's SERVER RENDERER from it as well, not\n * just the component. A component compiled by the dev server renders through the renderer the dev\n * server resolved; mixing the two puts two copies of the framework runtime in one component tree,\n * where context written by one half is invisible to the other.\n */"
|
|
10186
|
+
},
|
|
10187
|
+
{
|
|
10188
|
+
"name": "SsrModuleLoader",
|
|
10189
|
+
"kind": "type",
|
|
10190
|
+
"package": "@nifrajs/web",
|
|
10191
|
+
"signature": "export type SsrModuleLoader = (id: string) => Promise<unknown>;",
|
|
10192
|
+
"doc": "/**\n * Loads a module through the DEV SERVER'S module graph rather than the runtime's. Takes an absolute\n * file path or a bare specifier; resolution, compilation and caching are the dev server's.\n */"
|
|
10193
|
+
},
|
|
9552
10194
|
{
|
|
9553
10195
|
"name": "StandardFailure",
|
|
9554
10196
|
"kind": "interface",
|
|
@@ -9975,6 +10617,13 @@
|
|
|
9975
10617
|
"signature": "export declare const svelteDedupePlugin: (from: string) => BunPlugin;",
|
|
9976
10618
|
"doc": "/**\n * Dedupe Svelte to a single copy - the Svelte analogue of `reactDedupePlugin`/`preactDedupePlugin`, closing\n * the same class of bug for Svelte (which had NO build-time dedup before). A workspace- or file-linked\n * `@nifrajs/web-svelte` can resolve its OWN `svelte` (e.g. a sibling repo's install store) while the app's\n * components resolve another - SAME version, two physical copies. Svelte 5's client runtime\n * (`svelte/internal/client`) holds module-level component-context state, so two copies means the compiled\n * components register on one runtime while `hydrate` runs on the other → hydration throws\n * `Cannot read properties of undefined (reading 'call')` and the server-rendered markup is wiped.\n *\n * Pin every `svelte` + `svelte/internal/*` import to the ONE copy resolvable from `from` (the app root) so\n * the renderer (`hydrate`/`mount`) and the compiled components share one runtime. Unlike react/preact (a\n * fixed subpath list), Svelte has many internal subpaths, so each matched import is resolved dynamically.\n * `svelte/compiler` (build-time only, not in the bundle) doesn't match the filter and is left alone. No-op\n * when Svelte isn't used / isn't resolvable from `from`.\n */"
|
|
9977
10619
|
},
|
|
10620
|
+
{
|
|
10621
|
+
"name": "svelteHmrBoundary",
|
|
10622
|
+
"kind": "function",
|
|
10623
|
+
"package": "@nifrajs/web-svelte",
|
|
10624
|
+
"signature": "export declare function svelteHmrBoundary({ filename }: {\n filename: string;\n}): {\n hmr: boolean;\n};",
|
|
10625
|
+
"doc": "/**\n * The same hot-patch boundary as the Bun pipeline's, in the shape `@sveltejs/vite-plugin-svelte` takes:\n *\n * ```ts\n * svelte({ dynamicCompileOptions: svelteHmrBoundary })\n * ```\n *\n * Svelte's HMR wrapper resolves the component through a signal, which survives hydration only where\n * the component is a plain child in a template. A layout or a page is not: the adapter's `Chain` enters\n * chain members as dynamic components and through snippets, so a wrapper on one leaves the hydration\n * cursor pointing at markup the wrapped component never claims. Svelte then throws the server's tree\n * away and re-renders on the client - `hydration_mismatch` in the console, on first load, before any\n * edit. Left on, the dev server quietly stops exercising hydration at all.\n *\n * Views keep hot-patching; route modules fall back to a full reload, which is what they want anyway\n * (a route module carries the loader and meta the server ran, and re-running those is a navigation).\n * Outside a nifra dev server nothing is announced and the answer is \"no boundary\" - a full reload is\n * always correct, a mispatched tree is not.\n */"
|
|
10626
|
+
},
|
|
9978
10627
|
{
|
|
9979
10628
|
"name": "svelteMdxBunPlugin",
|
|
9980
10629
|
"kind": "function",
|
|
@@ -10143,6 +10792,34 @@
|
|
|
10143
10792
|
"signature": "export declare function toHtmlAttrs(resolved: ResolvedImage): HtmlImageAttrs;",
|
|
10144
10793
|
"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
10794
|
},
|
|
10795
|
+
{
|
|
10796
|
+
"name": "toLambdaHandler",
|
|
10797
|
+
"kind": "function",
|
|
10798
|
+
"package": "@nifrajs/core",
|
|
10799
|
+
"signature": "export declare function toLambdaHandler<Env = unknown>(app: FetchApp<Env>): LambdaHandler;",
|
|
10800
|
+
"doc": "/** Adapt API Gateway HTTP API (v2) and REST API (v1) events to a Web-standard app. */"
|
|
10801
|
+
},
|
|
10802
|
+
{
|
|
10803
|
+
"name": "toLambdaHandler",
|
|
10804
|
+
"kind": "function",
|
|
10805
|
+
"package": "nifra",
|
|
10806
|
+
"signature": "export declare function toLambdaHandler<Env = unknown>(app: FetchApp<Env>): LambdaHandler;",
|
|
10807
|
+
"doc": "/** Adapt API Gateway HTTP API (v2) and REST API (v1) events to a Web-standard app. */"
|
|
10808
|
+
},
|
|
10809
|
+
{
|
|
10810
|
+
"name": "toNetlifyHandler",
|
|
10811
|
+
"kind": "function",
|
|
10812
|
+
"package": "@nifrajs/core",
|
|
10813
|
+
"signature": "export declare function toNetlifyHandler<Env = unknown>(app: FetchApp<Env>): NetlifyHandler;",
|
|
10814
|
+
"doc": "/** Adapt a Web-standard app to a Netlify Functions event handler. */"
|
|
10815
|
+
},
|
|
10816
|
+
{
|
|
10817
|
+
"name": "toNetlifyHandler",
|
|
10818
|
+
"kind": "function",
|
|
10819
|
+
"package": "nifra",
|
|
10820
|
+
"signature": "export declare function toNetlifyHandler<Env = unknown>(app: FetchApp<Env>): NetlifyHandler;",
|
|
10821
|
+
"doc": "/** Adapt a Web-standard app to a Netlify Functions event handler. */"
|
|
10822
|
+
},
|
|
10146
10823
|
{
|
|
10147
10824
|
"name": "ToolAnnotations",
|
|
10148
10825
|
"kind": "interface",
|
|
@@ -10184,6 +10861,20 @@
|
|
|
10184
10861
|
"signature": "export declare function topUserFrame(frames: readonly DiagnosticFrame[], root: string | undefined): DiagnosticFrame | undefined;",
|
|
10185
10862
|
"doc": "/** The first frame that points at the user's own source - what the codeframe should show. */"
|
|
10186
10863
|
},
|
|
10864
|
+
{
|
|
10865
|
+
"name": "toVercelHandler",
|
|
10866
|
+
"kind": "function",
|
|
10867
|
+
"package": "@nifrajs/core",
|
|
10868
|
+
"signature": "export declare function toVercelHandler<Env = unknown>(app: FetchApp<Env>): VercelHandler;",
|
|
10869
|
+
"doc": "/** Adapt a Web-standard app to a Vercel Edge Function default export. */"
|
|
10870
|
+
},
|
|
10871
|
+
{
|
|
10872
|
+
"name": "toVercelHandler",
|
|
10873
|
+
"kind": "function",
|
|
10874
|
+
"package": "nifra",
|
|
10875
|
+
"signature": "export declare function toVercelHandler<Env = unknown>(app: FetchApp<Env>): VercelHandler;",
|
|
10876
|
+
"doc": "/** Adapt a Web-standard app to a Vercel Edge Function default export. */"
|
|
10877
|
+
},
|
|
10187
10878
|
{
|
|
10188
10879
|
"name": "TraceContext",
|
|
10189
10880
|
"kind": "type",
|
|
@@ -10289,6 +10980,12 @@
|
|
|
10289
10980
|
"package": "@nifrajs/middleware",
|
|
10290
10981
|
"signature": "export declare function tryVerifyJwt<C extends JwtClaims = JwtClaims>(token: string, options: VerifyJwtOptions): Promise<VerifyJwtResult<C>>;"
|
|
10291
10982
|
},
|
|
10983
|
+
{
|
|
10984
|
+
"name": "TypedDataPort",
|
|
10985
|
+
"kind": "interface",
|
|
10986
|
+
"package": "@nifrajs/core",
|
|
10987
|
+
"signature": "export interface TypedDataPort<Contract extends DataContract> {\n execute<Operation extends keyof Contract[\"operations\"] & string>(request: DataRequestFor<Contract, Operation>): Promise<DataOutput<Contract, Operation>>;\n}"
|
|
10988
|
+
},
|
|
10292
10989
|
{
|
|
10293
10990
|
"name": "typedSSEStream",
|
|
10294
10991
|
"kind": "function",
|
|
@@ -10903,6 +11600,18 @@
|
|
|
10903
11600
|
"signature": "export type VanillaComponent = (props: RenderProps & {\n children?: Template;\n}) => Template;",
|
|
10904
11601
|
"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
11602
|
},
|
|
11603
|
+
{
|
|
11604
|
+
"name": "VercelHandler",
|
|
11605
|
+
"kind": "type",
|
|
11606
|
+
"package": "@nifrajs/core",
|
|
11607
|
+
"signature": "export type VercelHandler = (request: Request) => MaybePromise<Response>;"
|
|
11608
|
+
},
|
|
11609
|
+
{
|
|
11610
|
+
"name": "VercelHandler",
|
|
11611
|
+
"kind": "type",
|
|
11612
|
+
"package": "nifra",
|
|
11613
|
+
"signature": "export type VercelHandler = (request: Request) => MaybePromise<Response>;"
|
|
11614
|
+
},
|
|
10906
11615
|
{
|
|
10907
11616
|
"name": "VerifiedJwt",
|
|
10908
11617
|
"kind": "interface",
|
|
@@ -10983,14 +11692,14 @@
|
|
|
10983
11692
|
"name": "VERSION",
|
|
10984
11693
|
"kind": "const",
|
|
10985
11694
|
"package": "@nifrajs/core",
|
|
10986
|
-
"signature": "export declare const VERSION: \"2.
|
|
11695
|
+
"signature": "export declare const VERSION: \"2.11.0\";",
|
|
10987
11696
|
"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
11697
|
},
|
|
10989
11698
|
{
|
|
10990
11699
|
"name": "VERSION",
|
|
10991
11700
|
"kind": "const",
|
|
10992
11701
|
"package": "nifra",
|
|
10993
|
-
"signature": "export declare const VERSION: \"2.
|
|
11702
|
+
"signature": "export declare const VERSION: \"2.11.0\";",
|
|
10994
11703
|
"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
11704
|
},
|
|
10996
11705
|
{
|