@nifrajs/cli 1.3.1 → 1.4.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/dist/cli.js +1 -1
- package/dist/introspect.d.ts +5 -12
- package/dist/introspect.d.ts.map +1 -1
- package/dist/introspect.js +8 -23
- package/dist/introspect.js.map +1 -1
- package/dist/mcp-http.js +1 -1
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +3 -16
- package/dist/mcp.js.map +1 -1
- package/docs/llms-full.txt +45 -9
- package/docs/types.json +344 -16
- package/package.json +8 -7
- package/src/cli.ts +1 -1
- package/src/introspect.ts +15 -37
- package/src/mcp-http.ts +1 -1
- package/src/mcp.ts +7 -28
package/docs/types.json
CHANGED
|
@@ -27,6 +27,12 @@
|
|
|
27
27
|
"signature": "export type ActionData<A> = A extends (...args: never[]) => infer R ? Awaited<R> extends {\n readonly __nifraRevalidate: readonly string[];\n readonly data: infer D;\n} ? Exclude<D, Response> : Exclude<Awaited<R>, Response> : never;",
|
|
28
28
|
"doc": "/**\n * The (awaited) data return of an `action`, for typing a page component's `actionData` prop.\n * A `Response` return (redirect/custom) is excluded — it never reaches the component. A\n * `revalidate(paths, data)` wrapper (from `@nifrajs/web`) is transparent: matched structurally (so this\n * stays decoupled from `@nifrajs/web`) and unwrapped to its inner `data` — what the component receives.\n */"
|
|
29
29
|
},
|
|
30
|
+
{
|
|
31
|
+
"name": "ActiveObservation",
|
|
32
|
+
"kind": "interface",
|
|
33
|
+
"package": "@nifrajs/otel",
|
|
34
|
+
"signature": "export interface ActiveObservation {\n readonly span: NifraSpan;\n readonly context: ObservationContext;\n /** Adds a sink to this in-flight span. Re-adding the same adapter is idempotent. */\n addAdapter(adapter: ObservationAdapter): void;\n /** Starts a child that inherits this span's trace identity and sampling decision. */\n startChild(input: Omit<StartObservation, \"parent\" | \"traceparent\">, additionalAdapters?: readonly ObservationAdapter[]): ActiveObservation;\n /** Records failure evidence without deciding the final status until the response is known. */\n recordError(error: unknown): void;\n /** Ends and exports once. Repeated calls return the same completed span without notifying again. */\n end(input?: EndObservation): NifraSpan;\n}"
|
|
35
|
+
},
|
|
30
36
|
{
|
|
31
37
|
"name": "AddRoute",
|
|
32
38
|
"kind": "type",
|
|
@@ -67,6 +73,33 @@
|
|
|
67
73
|
"package": "create-nifra",
|
|
68
74
|
"signature": "export interface AgentsMdOptions {\n readonly template: TemplateName;\n readonly framework: Framework;\n readonly name: string;\n /** Drizzle preset, when scaffolded with `--db` — adds a Database section. */\n readonly db?: DbChoice;\n /** Auth preset, when scaffolded with `--auth` — adds an Authentication section. */\n readonly auth?: AuthChoice;\n}"
|
|
69
75
|
},
|
|
76
|
+
{
|
|
77
|
+
"name": "AgentSpan",
|
|
78
|
+
"kind": "type",
|
|
79
|
+
"package": "@nifrajs/agent-telemetry",
|
|
80
|
+
"signature": "export type AgentSpan = NifraSpan;",
|
|
81
|
+
"doc": "/** A tool-call span. Kept as an alias for package-specific naming without duplicating OTel types. */"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "AgentSpanExporter",
|
|
85
|
+
"kind": "type",
|
|
86
|
+
"package": "@nifrajs/agent-telemetry",
|
|
87
|
+
"signature": "export type AgentSpanExporter = SpanExporter;",
|
|
88
|
+
"doc": "/** Exporter seam shared with `@nifrajs/otel`. */"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "agentTelemetry",
|
|
92
|
+
"kind": "function",
|
|
93
|
+
"package": "@nifrajs/agent-telemetry",
|
|
94
|
+
"signature": "export declare function agentTelemetry(options: AgentTelemetryOptions): {\n name: string;\n beforeHandle(context: HookContext): undefined;\n onError(error: unknown, context: HookContext): undefined;\n onResponse(response: Response, request: Request): Response;\n};",
|
|
95
|
+
"doc": "/**\n * Agent telemetry middleware. Register via `app.use(agentTelemetry({ exporter }))`.\n *\n * Creates child spans for requests targeting tool endpoints (`/_nifra/tool/*`)\n * or the MCP endpoint (`/mcp`). Non-matching requests pass through with zero overhead\n * (a single `startsWith` check — O(1), no regex).\n */"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "AgentTelemetryOptions",
|
|
99
|
+
"kind": "interface",
|
|
100
|
+
"package": "@nifrajs/agent-telemetry",
|
|
101
|
+
"signature": "export interface AgentTelemetryOptions {\n /** Exporter that receives completed tool-call spans. */\n readonly exporter: AgentSpanExporter;\n /** Path prefix for nifra tool routes (default `\"/_nifra/tool/\"`). */\n readonly toolPathPrefix?: string | undefined;\n /** Path for the MCP endpoint (default `\"/mcp\"`). */\n readonly mcpPath?: string | undefined;\n}"
|
|
102
|
+
},
|
|
70
103
|
{
|
|
71
104
|
"name": "aggregateSizeReport",
|
|
72
105
|
"kind": "function",
|
|
@@ -124,14 +157,14 @@
|
|
|
124
157
|
"name": "apiRoutesIndexSection",
|
|
125
158
|
"kind": "function",
|
|
126
159
|
"package": "@nifrajs/cli",
|
|
127
|
-
"signature": "export declare function apiRoutesIndexSection(routes: readonly
|
|
160
|
+
"signature": "export declare function apiRoutesIndexSection(routes: readonly ReflectedRoute[]): string;",
|
|
128
161
|
"doc": "/** Compact API-routes INDEX for the no-arg `nifra_context` call — `METHOD path` per route, WITHOUT the\n * body/query/response shapes or the per-route `call` line. Bounds the first-call payload on a big backend:\n * an agent gets the full route list (so it knows what's mounted) plus a pointer to fetch any route's full\n * contract via the `path`/`kind` slice, instead of every schema up front. */"
|
|
129
162
|
},
|
|
130
163
|
{
|
|
131
164
|
"name": "apiRoutesSection",
|
|
132
165
|
"kind": "function",
|
|
133
166
|
"package": "@nifrajs/cli",
|
|
134
|
-
"signature": "export declare function apiRoutesSection(routes: readonly
|
|
167
|
+
"signature": "export declare function apiRoutesSection(routes: readonly ReflectedRoute[]): string;",
|
|
135
168
|
"doc": "/** Markdown section listing the backend's API routes with their request + response field shapes. */"
|
|
136
169
|
},
|
|
137
170
|
{
|
|
@@ -183,6 +216,13 @@
|
|
|
183
216
|
"signature": "export declare function assertAuthableDb(db: DbChoice): void;",
|
|
184
217
|
"doc": "/**\n * Guard `--auth` against a DB whose ORM has no clean better-auth adapter. Throws an actionable error\n * for Kysely (passing a raw dialect to better-auth is manual wiring we won't fake-scaffold). Called by\n * the CLI before scaffolding so the failure is early and explains the fix.\n */"
|
|
185
218
|
},
|
|
219
|
+
{
|
|
220
|
+
"name": "assertRenderAdapterConformance",
|
|
221
|
+
"kind": "function",
|
|
222
|
+
"package": "@nifrajs/web",
|
|
223
|
+
"signature": "export declare function assertRenderAdapterConformance(adapter: RenderAdapter, fixture: RenderAdapterConformanceFixture): Promise<void>;",
|
|
224
|
+
"doc": "/**\n * Execute the observable {@link RenderAdapter} interface against a framework-specific fixture.\n *\n * The promise resolves only when the adapter proves all shared invariants: page props reach a\n * page-only render, streams contain byte chunks, layout chains nest outermost-first, optional\n * buffered rendering is byte-for-byte hydration-equivalent to streaming for non-deferred content,\n * and hydration-head output is a stable string. It rejects with\n * {@link RenderAdapterConformanceError} naming the first failed check.\n *\n * Framework semantics outside the interface—Suspense scheduling, compiler plugins, DOM hydration,\n * error boundaries, and framework-specific primitives—remain the adapter package's local tests.\n */"
|
|
225
|
+
},
|
|
186
226
|
{
|
|
187
227
|
"name": "assertSafeKey",
|
|
188
228
|
"kind": "function",
|
|
@@ -190,6 +230,13 @@
|
|
|
190
230
|
"signature": "export declare function assertSafeKey(key: string): void;",
|
|
191
231
|
"doc": "/** Throw {@link StorageKeyError} unless `key` is a safe relative storage key. */"
|
|
192
232
|
},
|
|
233
|
+
{
|
|
234
|
+
"name": "assertStorageAdapterConformance",
|
|
235
|
+
"kind": "function",
|
|
236
|
+
"package": "@nifrajs/storage",
|
|
237
|
+
"signature": "export declare function assertStorageAdapterConformance(options: StorageAdapterConformanceOptions): Promise<void>;",
|
|
238
|
+
"doc": "/**\n * Execute the observable {@link StorageAdapter} contract without depending on a test runner.\n *\n * The adapter must be isolated because this writes deterministic conformance keys. The promise resolves\n * only after proving byte + metadata round-trips, overwrite, missing/delete semantics, prefix/limit listing,\n * and uniform unsafe-key rejection across every key-taking method. When the adapter also implements an\n * optional capability ({@link PagedStorageAdapter}, {@link PresignableStorageAdapter},\n * {@link MovableStorageAdapter}), that capability's contract is proven too — implementing a capability\n * partially or unsafely fails conformance rather than silently escaping it.\n */"
|
|
239
|
+
},
|
|
193
240
|
{
|
|
194
241
|
"name": "attachWebSocket",
|
|
195
242
|
"kind": "function",
|
|
@@ -291,7 +338,7 @@
|
|
|
291
338
|
"name": "backendRoutes",
|
|
292
339
|
"kind": "function",
|
|
293
340
|
"package": "@nifrajs/cli",
|
|
294
|
-
"signature": "export declare function backendRoutes(backend: unknown):
|
|
341
|
+
"signature": "export declare function backendRoutes(backend: unknown): ReflectedRoute[];",
|
|
295
342
|
"doc": "/** Read the backend's registered routes, if it's a `server()` with a `.routes()` method. */"
|
|
296
343
|
},
|
|
297
344
|
{
|
|
@@ -766,6 +813,13 @@
|
|
|
766
813
|
"signature": "export declare function combine(...items: readonly Composable[]): NifraPlugin;",
|
|
767
814
|
"doc": "/** Compose middleware/plugins into one reusable bundle. Individual named plugins still dedupe. */"
|
|
768
815
|
},
|
|
816
|
+
{
|
|
817
|
+
"name": "combineObservationAdapters",
|
|
818
|
+
"kind": "function",
|
|
819
|
+
"package": "@nifrajs/otel",
|
|
820
|
+
"signature": "export declare function combineObservationAdapters(adapters: readonly ObservationAdapter[]): ObservationAdapter;",
|
|
821
|
+
"doc": "/**\n * Fan out lifecycle notifications to several adapters. Each adapter is isolated: an exception in\n * one sink cannot prevent the remaining sinks from observing the span.\n */"
|
|
822
|
+
},
|
|
769
823
|
{
|
|
770
824
|
"name": "commonSecretPatterns",
|
|
771
825
|
"kind": "const",
|
|
@@ -848,6 +902,13 @@
|
|
|
848
902
|
"signature": "export declare function computed<T>(fn: () => T): () => T;",
|
|
849
903
|
"doc": "/** Derived value, cached into a signal — recomputes when its tracked inputs change. */"
|
|
850
904
|
},
|
|
905
|
+
{
|
|
906
|
+
"name": "consoleAgentExporter",
|
|
907
|
+
"kind": "function",
|
|
908
|
+
"package": "@nifrajs/agent-telemetry",
|
|
909
|
+
"signature": "export declare function consoleAgentExporter(log?: (line: string) => void): AgentSpanExporter;",
|
|
910
|
+
"doc": "/**\n * Pretty-prints agent tool call traces to the terminal.\n *\n * Output format:\n * ```\n * [agent] tool:get_weather 12ms ok (input: 45B, output: 128B)\n * ```\n */"
|
|
911
|
+
},
|
|
851
912
|
{
|
|
852
913
|
"name": "consoleSpanExporter",
|
|
853
914
|
"kind": "function",
|
|
@@ -1076,6 +1137,20 @@
|
|
|
1076
1137
|
"package": "@nifrajs/mcp",
|
|
1077
1138
|
"signature": "export interface CreateMcpServerOptions {\n readonly name: string;\n readonly version: string;\n readonly tools?: readonly McpTool[];\n /** MCP Apps widgets — their resources are registered and the UI capability is advertised. */\n readonly widgets?: readonly McpWidget[];\n /** Extra (non-widget) resources to expose. */\n readonly resources?: readonly McpResource[];\n readonly prompts?: readonly McpPrompt[];\n /** GET health-page text. */\n readonly health?: string;\n /** Max JSON-RPC body size in bytes (default 1 MB). */\n readonly maxBodyBytes?: number;\n}"
|
|
1078
1139
|
},
|
|
1140
|
+
{
|
|
1141
|
+
"name": "createMockServer",
|
|
1142
|
+
"kind": "function",
|
|
1143
|
+
"package": "@nifrajs/mock",
|
|
1144
|
+
"signature": "export declare function createMockServer(app: MockableApp, options?: MockServerOptions | undefined): MockServer;",
|
|
1145
|
+
"doc": "/**\n * Create a mock server from a Nifra app's route definitions. For each route\n * with a `schema.response`, generates a handler returning fake data that\n * matches the response schema structure. Routes without response schemas\n * return `{}`.\n */"
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
"name": "createObservationLifecycle",
|
|
1149
|
+
"kind": "function",
|
|
1150
|
+
"package": "@nifrajs/otel",
|
|
1151
|
+
"signature": "export declare function createObservationLifecycle(options?: ObservationLifecycleOptions): ObservationLifecycle;",
|
|
1152
|
+
"doc": "/** Creates an independent lifecycle factory. Adapters are always called fail-open. */"
|
|
1153
|
+
},
|
|
1079
1154
|
{
|
|
1080
1155
|
"name": "createQuery",
|
|
1081
1156
|
"kind": "function",
|
|
@@ -1443,6 +1518,39 @@
|
|
|
1443
1518
|
"package": "@nifrajs/web",
|
|
1444
1519
|
"signature": "export interface DevServerOptions extends Omit<BuildClientOptions, \"minify\"> {\n /**\n * Build the nifra app for the freshly-built client entry. `importQuery` changes on every\n * rebuild — pass it to `discoverRoutes(routesDir, { importQuery })` so SSR re-imports edited\n * route modules instead of Bun's cached copies.\n */\n readonly createApp: (clientEntry: string, importQuery: string) => FetchApp | Promise<FetchApp>;\n /** Directories to watch (default: `[routesDir]`). */\n readonly watch?: readonly string[];\n /** Port to listen on (default {@link DEFAULT_DEV_PORT}). */\n readonly port?: number;\n}"
|
|
1445
1520
|
},
|
|
1521
|
+
{
|
|
1522
|
+
"name": "devtools",
|
|
1523
|
+
"kind": "function",
|
|
1524
|
+
"package": "@nifrajs/devtools",
|
|
1525
|
+
"signature": "export declare function devtools(options?: DevToolsOptions | undefined): import(\"@nifrajs/core\").NifraPlugin<import(\"@nifrajs/core\").AnyServer, import(\"@nifrajs/core\").AnyServer>;",
|
|
1526
|
+
"doc": "/**\n * DevTools plugin. Its observation adapter projects the single request span into a\n * `DevToolsEvent`; its middleware only owns the secured SSE transport.\n * When configuring `tracing()` yourself, register it before this plugin so DevTools attaches to\n * that request owner.\n */"
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"name": "DevToolsClientOptions",
|
|
1530
|
+
"kind": "interface",
|
|
1531
|
+
"package": "@nifrajs/devtools",
|
|
1532
|
+
"signature": "export interface DevToolsClientOptions {\n /** SSE path configured on the server plugin. */\n readonly path?: string | undefined;\n}"
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
"name": "devtoolsClientScript",
|
|
1536
|
+
"kind": "function",
|
|
1537
|
+
"package": "@nifrajs/devtools",
|
|
1538
|
+
"signature": "export declare function devtoolsClientScript(options?: DevToolsClientOptions): string;",
|
|
1539
|
+
"doc": "/**\n * Returns a self-contained JavaScript string that creates a floating DevTools\n * overlay in the browser. Inject via `<script>` tag in dev mode.\n *\n * The overlay:\n * - Connects to `/_nifra/devtools` via EventSource\n * - Shows a scrolling log of request traces\n * - Color-coded method badges and status codes\n * - ISR hit/miss/stale indicators\n * - Collapsible with a ⚡ toggle button\n */"
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
"name": "DevToolsEvent",
|
|
1543
|
+
"kind": "interface",
|
|
1544
|
+
"package": "@nifrajs/devtools",
|
|
1545
|
+
"signature": "export interface DevToolsEvent {\n readonly id: string;\n readonly traceId: string;\n readonly spanId: string;\n readonly parentSpanId?: string | undefined;\n readonly timestamp: number;\n readonly method: string;\n readonly path: string;\n readonly status: number;\n readonly durationMs: number;\n readonly isrStatus?: string | undefined;\n readonly bodyBytes: number;\n}",
|
|
1546
|
+
"doc": "/**\n * `@nifrajs/devtools` — interactive DevTools overlay for `nifra dev`.\n *\n * Server-side: a middleware plugin that captures request traces into a ring buffer\n * and streams them via SSE at `/_nifra/devtools`.\n *\n * Client-side: a floating browser overlay that connects to the SSE stream and\n * renders a scrolling log of request traces with ISR status badges.\n *\n * **Zero production overhead** — register conditionally:\n * ```ts\n * if (process.env.NODE_ENV !== \"production\") app.use(devtools())\n * ```\n * When not registered, routes stay `bare` and the SSE endpoint doesn't exist.\n */"
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
"name": "DevToolsOptions",
|
|
1550
|
+
"kind": "interface",
|
|
1551
|
+
"package": "@nifrajs/devtools",
|
|
1552
|
+
"signature": "export interface DevToolsOptions {\n /** Maximum events to retain in the ring buffer (default 200). */\n readonly maxEvents?: number | undefined;\n /** Maximum simultaneous SSE connections (default 5). */\n readonly maxConnections?: number | undefined;\n /** SSE path (default `/_nifra/devtools`). */\n readonly path?: string | undefined;\n /** Explicit enable switch. Defaults to true only when `NODE_ENV === \"development\"`. */\n readonly enabled?: boolean | undefined;\n /** Permit non-loopback URL hosts. Default false. */\n readonly allowRemote?: boolean | undefined;\n /** Additional origins permitted to open the stream. Same-origin requests are always allowed. */\n readonly allowedOrigins?: readonly string[] | undefined;\n /** Optional request authorization for the stream. */\n readonly authorize?: ((request: Request) => boolean | Promise<boolean>) | undefined;\n /**\n * Interval for SSE keep-alive comment frames, in milliseconds (default 15000). Pings stop\n * idle proxies/dev tunnels from dropping the stream and evict dead connections so they no\n * longer count against `maxConnections`.\n */\n readonly pingIntervalMs?: number | undefined;\n}"
|
|
1553
|
+
},
|
|
1446
1554
|
{
|
|
1447
1555
|
"name": "diffManifestRoutes",
|
|
1448
1556
|
"kind": "function",
|
|
@@ -1584,6 +1692,12 @@
|
|
|
1584
1692
|
"signature": "export declare function encodeCursor(value: unknown): string;",
|
|
1585
1693
|
"doc": "/** Encode any JSON-serializable value (e.g. the last row's sort key) into an opaque cursor string. */"
|
|
1586
1694
|
},
|
|
1695
|
+
{
|
|
1696
|
+
"name": "EndObservation",
|
|
1697
|
+
"kind": "interface",
|
|
1698
|
+
"package": "@nifrajs/otel",
|
|
1699
|
+
"signature": "export interface EndObservation {\n readonly statusCode?: number;\n /** Explicit status wins over status-code and recorded-error classification. */\n readonly status?: Exclude<SpanStatus, \"unset\">;\n readonly attributes?: Readonly<Record<string, AttributeValue>>;\n}"
|
|
1700
|
+
},
|
|
1587
1701
|
{
|
|
1588
1702
|
"name": "EnqueueOptions",
|
|
1589
1703
|
"kind": "interface",
|
|
@@ -1878,7 +1992,7 @@
|
|
|
1878
1992
|
"name": "FileStorage",
|
|
1879
1993
|
"kind": "class",
|
|
1880
1994
|
"package": "@nifrajs/storage",
|
|
1881
|
-
"signature": "export declare class FileStorage implements StorageAdapter {\n private readonly root;\n constructor(root: string);\n /** Resolve `key` to an absolute path, asserting it stays inside `root` (defense-in-depth on top of `assertSafeKey`). */\n private pathFor;\n put(key: string, data: StorageData,
|
|
1995
|
+
"signature": "export declare class FileStorage implements StorageAdapter {\n private readonly root;\n private readonly metadataRoot;\n constructor(root: string);\n private metadataPathFor;\n /** Resolve `key` to an absolute path, asserting it stays inside `root` (defense-in-depth on top of `assertSafeKey`). */\n private pathFor;\n put(key: string, data: StorageData, options?: PutOptions): Promise<void>;\n get(key: string): Promise<StorageObject | null>;\n delete(key: string): Promise<void>;\n exists(key: string): Promise<boolean>;\n list(options?: ListOptions): Promise<string[]>;\n private walk;\n}"
|
|
1882
1996
|
},
|
|
1883
1997
|
{
|
|
1884
1998
|
"name": "FileType",
|
|
@@ -2059,6 +2173,13 @@
|
|
|
2059
2173
|
"package": "@nifrajs/web",
|
|
2060
2174
|
"signature": "export declare function generateLlmsTxt(full: boolean, pageRoutes: ReadonlyArray<{\n readonly pattern: string;\n readonly id: string;\n}>, backend: unknown): Promise<string>;"
|
|
2061
2175
|
},
|
|
2176
|
+
{
|
|
2177
|
+
"name": "generateMockValue",
|
|
2178
|
+
"kind": "function",
|
|
2179
|
+
"package": "@nifrajs/mock",
|
|
2180
|
+
"signature": "export declare function generateMockValue(schema: unknown, fieldName?: string | undefined, rng?: (() => number) | undefined): unknown;",
|
|
2181
|
+
"doc": "/**\n * Generate a mock value from a schema object. Inspects JSON Schema properties\n * (`type`, `properties`, `items`, `enum`, `format`) that TypeBox / NifraSchema\n * objects carry directly. Unsupported constraints fail closed with\n * {@link UnsupportedMockSchemaError} rather than returning a known-invalid response.\n *\n * @param schema A JSON-Schema-shaped object (TypeBox, NifraSchema, or raw JSON Schema)\n * @param fieldName Optional field name hint for generating contextual string values\n * @param rng Optional seeded random function for deterministic output\n */"
|
|
2182
|
+
},
|
|
2062
2183
|
{
|
|
2063
2184
|
"name": "generateServerEntry",
|
|
2064
2185
|
"kind": "function",
|
|
@@ -2849,6 +2970,13 @@
|
|
|
2849
2970
|
"package": "@nifrajs/mcp",
|
|
2850
2971
|
"signature": "export type JsonRpcResponse = {\n jsonrpc: \"2.0\";\n id: JsonRpcId;\n result: unknown;\n} | {\n jsonrpc: \"2.0\";\n id: JsonRpcId;\n error: {\n code: number;\n message: string;\n };\n};"
|
|
2851
2972
|
},
|
|
2973
|
+
{
|
|
2974
|
+
"name": "JsonSchema",
|
|
2975
|
+
"kind": "type",
|
|
2976
|
+
"package": "@nifrajs/core",
|
|
2977
|
+
"signature": "export type JsonSchema = boolean | Readonly<Record<string, unknown>>;",
|
|
2978
|
+
"doc": "/** JSON Schema permits either a schema object or the boolean schemas `true` and `false`. */"
|
|
2979
|
+
},
|
|
2852
2980
|
{
|
|
2853
2981
|
"name": "jwk",
|
|
2854
2982
|
"kind": "function",
|
|
@@ -3440,7 +3568,7 @@
|
|
|
3440
3568
|
"name": "MemoryStorage",
|
|
3441
3569
|
"kind": "class",
|
|
3442
3570
|
"package": "@nifrajs/storage",
|
|
3443
|
-
"signature": "export declare class MemoryStorage implements StorageAdapter {\n private readonly objects;\n put(key: string, data: StorageData, options?: PutOptions): Promise<void>;\n get(key: string): Promise<StorageObject | null>;\n delete(key: string): Promise<void>;\n exists(key: string): Promise<boolean>;\n list(options?: ListOptions): Promise<string[]>;\n}"
|
|
3571
|
+
"signature": "export declare class MemoryStorage implements StorageAdapter {\n private readonly objects;\n constructor();\n put(key: string, data: StorageData, options?: PutOptions): Promise<void>;\n get(key: string): Promise<StorageObject | null>;\n delete(key: string): Promise<void>;\n exists(key: string): Promise<boolean>;\n list(options?: ListOptions): Promise<string[]>;\n}"
|
|
3444
3572
|
},
|
|
3445
3573
|
{
|
|
3446
3574
|
"name": "MemoryStore",
|
|
@@ -3523,6 +3651,32 @@
|
|
|
3523
3651
|
"signature": "export interface Middleware {\n readonly name?: string;\n readonly onRequest?: (req: Request) => MaybePromise<OnRequestResult>;\n readonly around?: <T>(context: Context, next: () => MaybePromise<T>) => MaybePromise<T>;\n readonly beforeHandle?: (context: Context) => MaybePromise<unknown>;\n readonly afterHandle?: (result: unknown, context: Context) => MaybePromise<unknown>;\n readonly onResponse?: (response: Response, req: Request) => MaybePromise<Response>;\n readonly onError?: (error: unknown, context: Context) => MaybePromise<unknown>;\n}",
|
|
3524
3652
|
"doc": "/**\n * A bundle of lifecycle hooks applied together via {@link Server.use} — the unit\n * `@nifrajs/middleware` ships (cors, security headers, rate-limit). Every hook is\n * optional and wired to its lifecycle point. Middleware is context-agnostic (sees\n * the base `Context`); `use` does no context-type merging — the full type-merging\n * plugin system is deferred, and `.use` is reserved as its future entry point.\n */"
|
|
3525
3653
|
},
|
|
3654
|
+
{
|
|
3655
|
+
"name": "MockableApp",
|
|
3656
|
+
"kind": "interface",
|
|
3657
|
+
"package": "@nifrajs/mock",
|
|
3658
|
+
"signature": "export interface MockableApp {\n routes(): readonly MockableRoute[];\n}",
|
|
3659
|
+
"doc": "/** App shape — anything with a `routes()` method. */"
|
|
3660
|
+
},
|
|
3661
|
+
{
|
|
3662
|
+
"name": "MockableRoute",
|
|
3663
|
+
"kind": "interface",
|
|
3664
|
+
"package": "@nifrajs/mock",
|
|
3665
|
+
"signature": "export interface MockableRoute {\n readonly method: string;\n readonly path: string;\n readonly schema?: {\n readonly response?: unknown;\n } | undefined;\n}",
|
|
3666
|
+
"doc": "/** Minimal route shape returned by `app.routes()`. */"
|
|
3667
|
+
},
|
|
3668
|
+
{
|
|
3669
|
+
"name": "MockServer",
|
|
3670
|
+
"kind": "interface",
|
|
3671
|
+
"package": "@nifrajs/mock",
|
|
3672
|
+
"signature": "export interface MockServer {\n /** Handle a request against the mock routes. */\n fetch(request: Request): Promise<Response>;\n /** The generated mock routes for inspection. */\n readonly mockRoutes: ReadonlyArray<{\n method: string;\n path: string;\n }>;\n}"
|
|
3673
|
+
},
|
|
3674
|
+
{
|
|
3675
|
+
"name": "MockServerOptions",
|
|
3676
|
+
"kind": "interface",
|
|
3677
|
+
"package": "@nifrajs/mock",
|
|
3678
|
+
"signature": "export interface MockServerOptions {\n /** Seed for deterministic mock generation. */\n readonly seed?: number | undefined;\n /** Log mock requests to console. */\n readonly verbose?: boolean | undefined;\n}"
|
|
3679
|
+
},
|
|
3526
3680
|
{
|
|
3527
3681
|
"name": "ModuleReader",
|
|
3528
3682
|
"kind": "type",
|
|
@@ -3593,6 +3747,13 @@
|
|
|
3593
3747
|
"signature": "export interface MountRouterOptions {\n readonly router: ClientRouter;\n /** routeId → layout chain (outermost layout → page); built by `generateClientEntry`. */\n readonly routes: Record<string, readonly unknown[]>;\n /** Hydration container (opaque — the adapter casts it to its DOM element type). */\n readonly container: unknown;\n}",
|
|
3594
3748
|
"doc": "/** Options for a per-adapter `mountRouter` (the Router binding that hydrates + re-renders). */"
|
|
3595
3749
|
},
|
|
3750
|
+
{
|
|
3751
|
+
"name": "MovableStorageAdapter",
|
|
3752
|
+
"kind": "interface",
|
|
3753
|
+
"package": "@nifrajs/storage",
|
|
3754
|
+
"signature": "export interface MovableStorageAdapter extends StorageAdapter {\n copy(sourceKey: string, destinationKey: string): Promise<void>;\n move(sourceKey: string, destinationKey: string): Promise<void>;\n}",
|
|
3755
|
+
"doc": "/** Optional server-side copy/move capability. */"
|
|
3756
|
+
},
|
|
3596
3757
|
{
|
|
3597
3758
|
"name": "namedCombine",
|
|
3598
3759
|
"kind": "function",
|
|
@@ -3717,6 +3878,43 @@
|
|
|
3717
3878
|
"signature": "export declare function number(opts?: Base<number> & Optional): StandardSchemaV1<number | undefined>;",
|
|
3718
3879
|
"doc": "/** A finite number, coerced from its decimal string. */"
|
|
3719
3880
|
},
|
|
3881
|
+
{
|
|
3882
|
+
"name": "ObservationAdapter",
|
|
3883
|
+
"kind": "interface",
|
|
3884
|
+
"package": "@nifrajs/otel",
|
|
3885
|
+
"signature": "export interface ObservationAdapter {\n onStart?(span: NifraSpan): void;\n onEnd(span: NifraSpan): void;\n}",
|
|
3886
|
+
"doc": "/**\n * Where ended spans go. Implement this to bridge to the OpenTelemetry SDK (map each field onto a\n * real `Span` from a `Tracer`), ship to a collector, or just log. `onStart` is optional (most\n * backends only need the completed span).\n */"
|
|
3887
|
+
},
|
|
3888
|
+
{
|
|
3889
|
+
"name": "ObservationClock",
|
|
3890
|
+
"kind": "interface",
|
|
3891
|
+
"package": "@nifrajs/otel",
|
|
3892
|
+
"signature": "export interface ObservationClock {\n /** Epoch milliseconds for interoperable start/end timestamps. */\n wallTime(): number;\n /** Monotonic milliseconds for durations. */\n monotonicTime(): number;\n}"
|
|
3893
|
+
},
|
|
3894
|
+
{
|
|
3895
|
+
"name": "ObservationContext",
|
|
3896
|
+
"kind": "interface",
|
|
3897
|
+
"package": "@nifrajs/otel",
|
|
3898
|
+
"signature": "export interface ObservationContext {\n readonly traceId: string;\n readonly spanId: string;\n readonly parentSpanId?: string;\n readonly sampled: boolean;\n /** This span's outbound W3C trace context. */\n readonly traceparent: string;\n}"
|
|
3899
|
+
},
|
|
3900
|
+
{
|
|
3901
|
+
"name": "ObservationLifecycle",
|
|
3902
|
+
"kind": "interface",
|
|
3903
|
+
"package": "@nifrajs/otel",
|
|
3904
|
+
"signature": "export interface ObservationLifecycle {\n start(input: StartObservation, additionalAdapters?: readonly ObservationAdapter[]): ActiveObservation;\n}"
|
|
3905
|
+
},
|
|
3906
|
+
{
|
|
3907
|
+
"name": "ObservationLifecycleOptions",
|
|
3908
|
+
"kind": "interface",
|
|
3909
|
+
"package": "@nifrajs/otel",
|
|
3910
|
+
"signature": "export interface ObservationLifecycleOptions {\n readonly adapters?: readonly ObservationAdapter[];\n /** Injectable seams are primarily useful for deterministic tests and constrained runtimes. */\n readonly clock?: ObservationClock;\n readonly generateTraceId?: () => string;\n readonly generateSpanId?: () => string;\n}"
|
|
3911
|
+
},
|
|
3912
|
+
{
|
|
3913
|
+
"name": "ObservationParent",
|
|
3914
|
+
"kind": "interface",
|
|
3915
|
+
"package": "@nifrajs/otel",
|
|
3916
|
+
"signature": "export interface ObservationParent {\n readonly traceId: string;\n readonly spanId: string;\n readonly sampled: boolean;\n}"
|
|
3917
|
+
},
|
|
3720
3918
|
{
|
|
3721
3919
|
"name": "OnRequestResult",
|
|
3722
3920
|
"kind": "type",
|
|
@@ -3848,6 +4046,13 @@
|
|
|
3848
4046
|
"signature": "export interface Page<Item> {\n readonly items: Item[];\n readonly nextCursor: string | null;\n}",
|
|
3849
4047
|
"doc": "/** A cursor-pagination page — matches the shape of `t.paginated(item)`. */"
|
|
3850
4048
|
},
|
|
4049
|
+
{
|
|
4050
|
+
"name": "PagedStorageAdapter",
|
|
4051
|
+
"kind": "interface",
|
|
4052
|
+
"package": "@nifrajs/storage",
|
|
4053
|
+
"signature": "export interface PagedStorageAdapter extends StorageAdapter {\n listPage(options?: StorageListPageOptions): Promise<StorageListPage>;\n}",
|
|
4054
|
+
"doc": "/** Optional cursor-listing capability. Kept out of {@link StorageAdapter} for simple stores. */"
|
|
4055
|
+
},
|
|
3851
4056
|
{
|
|
3852
4057
|
"name": "PageRouteInput",
|
|
3853
4058
|
"kind": "interface",
|
|
@@ -4159,6 +4364,13 @@
|
|
|
4159
4364
|
"signature": "export declare function prerenderRoutes(options: PrerenderOptions): Promise<PrerenderResult>;",
|
|
4160
4365
|
"doc": "/**\n * Render every opted-in static route to a static `index.html` under `outDir`. Run AFTER `buildClient`\n * (so the app references the hashed client entry). Returns a report of what was emitted vs skipped —\n * the caller can use `prerendered` to wire a hybrid deploy (e.g. exclude those paths from the SSR\n * worker so the CDN serves the static file). Never throws on a per-route miss: a non-OK response or a\n * non-opted/dynamic route is recorded in `skipped` and the build continues.\n */"
|
|
4161
4366
|
},
|
|
4367
|
+
{
|
|
4368
|
+
"name": "PresignableStorageAdapter",
|
|
4369
|
+
"kind": "interface",
|
|
4370
|
+
"package": "@nifrajs/storage",
|
|
4371
|
+
"signature": "export interface PresignableStorageAdapter extends StorageAdapter {\n presign(key: string, operation: StoragePresignOperation, options?: StoragePresignOptions): Promise<StoragePresignedUrl>;\n}",
|
|
4372
|
+
"doc": "/** Optional provider-side URL-signing capability. Asset sensitivity and TTL policy stay with callers. */"
|
|
4373
|
+
},
|
|
4162
4374
|
{
|
|
4163
4375
|
"name": "Prettify",
|
|
4164
4376
|
"kind": "type",
|
|
@@ -4478,6 +4690,39 @@
|
|
|
4478
4690
|
"signature": "export interface RedirectOptions {\n /** HTTP status (default 303 See Other; pass 307/308 to preserve the method). */\n readonly status?: number;\n /** Allow an off-origin / absolute destination. Off by default: only a same-origin path (a single\n * leading `/`) is permitted, so an action can't be turned into an open redirect by passing\n * attacker-controlled input straight through. Set `true` for a deliberate external redirect. */\n readonly external?: boolean;\n}",
|
|
4479
4691
|
"doc": "/** Options for {@link redirect}. */"
|
|
4480
4692
|
},
|
|
4693
|
+
{
|
|
4694
|
+
"name": "ReflectedRoute",
|
|
4695
|
+
"kind": "interface",
|
|
4696
|
+
"package": "@nifrajs/core",
|
|
4697
|
+
"signature": "export interface ReflectedRoute {\n readonly method: string;\n readonly path: string;\n readonly schema?: ReflectedRouteSchema;\n readonly tool?: {\n readonly name: string;\n readonly description: string;\n readonly annotations?: ToolAnnotations;\n };\n}"
|
|
4698
|
+
},
|
|
4699
|
+
{
|
|
4700
|
+
"name": "ReflectedRouteSchema",
|
|
4701
|
+
"kind": "interface",
|
|
4702
|
+
"package": "@nifrajs/core",
|
|
4703
|
+
"signature": "export interface ReflectedRouteSchema {\n readonly body?: SchemaReflection;\n readonly query?: SchemaReflection;\n readonly response?: SchemaReflection;\n readonly errors?: Readonly<Record<string, SchemaReflection>>;\n}"
|
|
4704
|
+
},
|
|
4705
|
+
{
|
|
4706
|
+
"name": "ReflectedSchemaField",
|
|
4707
|
+
"kind": "interface",
|
|
4708
|
+
"package": "@nifrajs/core",
|
|
4709
|
+
"signature": "export interface ReflectedSchemaField {\n readonly name: string;\n readonly required: boolean;\n readonly schema: JsonSchema;\n}",
|
|
4710
|
+
"doc": "/** One top-level property of an introspectable object schema. */"
|
|
4711
|
+
},
|
|
4712
|
+
{
|
|
4713
|
+
"name": "reflectRoutes",
|
|
4714
|
+
"kind": "function",
|
|
4715
|
+
"package": "@nifrajs/core",
|
|
4716
|
+
"signature": "export declare function reflectRoutes(source: unknown): readonly ReflectedRoute[];",
|
|
4717
|
+
"doc": "/**\n * Safely enumerate and normalize route descriptors from an app or descriptor array. Invalid entries\n * are ignored; a missing/throwing `routes()` method yields an empty array.\n */"
|
|
4718
|
+
},
|
|
4719
|
+
{
|
|
4720
|
+
"name": "reflectSchema",
|
|
4721
|
+
"kind": "function",
|
|
4722
|
+
"package": "@nifrajs/core",
|
|
4723
|
+
"signature": "export declare function reflectSchema(value: unknown): SchemaReflection;",
|
|
4724
|
+
"doc": "/**\n * Reflect a Standard Schema, Nifra/TypeBox schema carrier, or raw JSON Schema. Never throws.\n * Validation-only schemas have `standard` but no `jsonSchema`; raw JSON Schema has the reverse.\n */"
|
|
4725
|
+
},
|
|
4481
4726
|
{
|
|
4482
4727
|
"name": "registerFormat",
|
|
4483
4728
|
"kind": "function",
|
|
@@ -4518,7 +4763,21 @@
|
|
|
4518
4763
|
"kind": "interface",
|
|
4519
4764
|
"package": "@nifrajs/web",
|
|
4520
4765
|
"signature": "export interface RenderAdapter {\n /**\n * Server: render a route's layout `chain` (outermost layout → page) to a **stream** of HTML\n * bytes, including the framework's hydration markers. The page (innermost) receives `props`\n * (the loader data); each layout wraps the child via its `children`. Returns (or resolves to)\n * a Web `ReadableStream<Uint8Array>`: a streaming renderer flushes the shell first and streams\n * Suspense boundaries as they resolve; a non-streaming renderer may return a one-chunk stream.\n * May be async — e.g. React resolves once the shell is renderable, so a shell-render throw can\n * still map to an error status before any byte is sent.\n */\n renderToStream(chain: readonly unknown[], props: RenderProps): ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>;\n /**\n * Server (optional): render the chain to a complete HTML **string** in one pass, with the same\n * hydration markers `renderToStream` produces. When provided, `renderPage` uses it for any page\n * that does **not** `defer()` — buffering the document is faster than the streaming pipeline there,\n * because the framework's synchronous renderer (React `renderToString`, Solid `renderToString`,\n * Preact `render`, Vue `renderToString`, Svelte `render`) is markedly cheaper than its streaming\n * renderer — most visibly on Bun, where React Fizz / Solid `renderToStream` are the heaviest. Pages\n * that `defer()` keep the streaming path (progressive `<Await>` needs it). Markup MUST be\n * hydration-equivalent to `renderToStream`; a throw surfaces like the streaming shell-readiness\n * await (the `_error` boundary maps it to a status). Omit it to always stream.\n */\n renderToString?(chain: readonly unknown[], props: RenderProps): string | Promise<string>;\n /**\n * Server: per-document bootstrap markup injected into `<head>` that the client\n * `hydrate` requires (Solid: `generateHydrationScript()`). Empty string if none.\n */\n hydrationHead(): string;\n}",
|
|
4521
|
-
"doc": "
|
|
4766
|
+
"doc": "/**\n * The seam every render adapter implements. New adapters should prove these invariants with\n * {@link assertRenderAdapterConformance}; framework-specific behavior remains locally tested.\n */"
|
|
4767
|
+
},
|
|
4768
|
+
{
|
|
4769
|
+
"name": "RenderAdapterConformanceError",
|
|
4770
|
+
"kind": "class",
|
|
4771
|
+
"package": "@nifrajs/web",
|
|
4772
|
+
"signature": "export declare class RenderAdapterConformanceError extends Error {\n readonly check: string;\n constructor(check: string, message: string, cause?: unknown);\n}",
|
|
4773
|
+
"doc": "/** A failed invariant reported by {@link assertRenderAdapterConformance}. */"
|
|
4774
|
+
},
|
|
4775
|
+
{
|
|
4776
|
+
"name": "RenderAdapterConformanceFixture",
|
|
4777
|
+
"kind": "interface",
|
|
4778
|
+
"package": "@nifrajs/web",
|
|
4779
|
+
"signature": "export interface RenderAdapterConformanceFixture {\n /** A page that renders the `page`, `data`, and `pending` markers from the supplied props. */\n readonly page: unknown;\n /** The outer layout, which renders `markers.outer` before its child. */\n readonly outerLayout: unknown;\n /** The inner layout, which renders `markers.inner` before its child. */\n readonly innerLayout: unknown;\n /** Props passed to the page. Use values represented by the `data` and `pending` markers. */\n readonly props: RenderProps;\n /**\n * Set when the fixture renders **deferred/streaming-only** content (e.g. Suspense that resolves during\n * the stream). Streaming and buffered (`renderToString`) output then legitimately differ byte-for-byte,\n * so the hydration-equivalence check is relaxed to \"buffered output still contains every marker\" instead\n * of exact equality. Leave unset for plain synchronous content (the stricter, preferred check).\n */\n readonly deferred?: boolean;\n /** Unique text fragments observable in the rendered HTML. */\n readonly markers: {\n readonly page: string;\n readonly data: string;\n readonly pending: string;\n readonly outer: string;\n readonly inner: string;\n };\n}",
|
|
4780
|
+
"doc": "/** Framework-specific values that let the shared conformance module exercise a render adapter. */"
|
|
4522
4781
|
},
|
|
4523
4782
|
{
|
|
4524
4783
|
"name": "renderDevErrorOverlay",
|
|
@@ -5061,7 +5320,7 @@
|
|
|
5061
5320
|
"name": "RouteTableInput",
|
|
5062
5321
|
"kind": "interface",
|
|
5063
5322
|
"package": "@nifrajs/cli",
|
|
5064
|
-
"signature": "export interface RouteTableInput {\n readonly pages: readonly PageRouteInput[];\n readonly api:
|
|
5323
|
+
"signature": "export interface RouteTableInput {\n readonly pages: readonly PageRouteInput[];\n readonly api: ReadonlyArray<Pick<ReflectedRoute, \"method\" | \"path\">>;\n /** The page router's `apiPrefix` (default `/api`); an API route at/under it is auto-mounted. `\"\"`\n * disables the auto-mount, so no API route is marked auto-mounted. */\n readonly apiPrefix?: string;\n}"
|
|
5065
5324
|
},
|
|
5066
5325
|
{
|
|
5067
5326
|
"name": "routeTableToJson",
|
|
@@ -5330,6 +5589,13 @@
|
|
|
5330
5589
|
"package": "@nifrajs/cron",
|
|
5331
5590
|
"signature": "export interface SchedulerOptions {\n /** Called when a job handler throws/rejects. Default: `console.error`. A throwing onError is swallowed. */\n readonly onError?: (error: unknown, jobName: string) => void;\n /** Injectable clock (tests). Default `() => new Date()`. */\n readonly now?: () => Date;\n}"
|
|
5332
5591
|
},
|
|
5592
|
+
{
|
|
5593
|
+
"name": "SchemaReflection",
|
|
5594
|
+
"kind": "interface",
|
|
5595
|
+
"package": "@nifrajs/core",
|
|
5596
|
+
"signature": "export interface SchemaReflection {\n /** The Standard Schema validator, when the value implements Standard Schema v1. */\n readonly standard: StandardSchemaV1 | undefined;\n /** Raw JSON Schema metadata, when the value exposes it or is itself a raw JSON Schema. */\n readonly jsonSchema: JsonSchema | undefined;\n /** Top-level object fields, or `undefined` when the JSON Schema is absent/non-object. */\n readonly fields: readonly ReflectedSchemaField[] | undefined;\n}",
|
|
5597
|
+
"doc": "/** Validation and introspection capabilities discovered for one schema-like value. */"
|
|
5598
|
+
},
|
|
5333
5599
|
{
|
|
5334
5600
|
"name": "ScoredExample",
|
|
5335
5601
|
"kind": "interface",
|
|
@@ -5803,17 +6069,17 @@
|
|
|
5803
6069
|
},
|
|
5804
6070
|
{
|
|
5805
6071
|
"name": "SpanExporter",
|
|
5806
|
-
"kind": "
|
|
6072
|
+
"kind": "type",
|
|
5807
6073
|
"package": "@nifrajs/otel",
|
|
5808
|
-
"signature": "export
|
|
5809
|
-
"doc": "
|
|
6074
|
+
"signature": "export type SpanExporter = ObservationAdapter;",
|
|
6075
|
+
"doc": "/** Backwards-compatible name for an observation sink. */"
|
|
5810
6076
|
},
|
|
5811
6077
|
{
|
|
5812
6078
|
"name": "SpanStatus",
|
|
5813
6079
|
"kind": "type",
|
|
5814
6080
|
"package": "@nifrajs/otel",
|
|
5815
6081
|
"signature": "export type SpanStatus = \"unset\" | \"ok\" | \"error\";",
|
|
5816
|
-
"doc": "/**\n * The span model + exporter seam. Attribute names follow OpenTelemetry HTTP semantic conventions\n * (`http.request.method`, `url.path`, `http.response.status_code`, …) so a span maps cleanly onto an\n * OTel `Span` when bridged — but nothing here depends on the OTel SDK. You supply
|
|
6082
|
+
"doc": "/**\n * The span model + exporter seam. Attribute names follow OpenTelemetry HTTP semantic conventions\n * (`http.request.method`, `url.path`, `http.response.status_code`, …) so a span maps cleanly onto an\n * OTel `Span` when bridged — but nothing here depends on the OTel SDK. You supply an\n * {@link ObservationAdapter}\n * (a ~10-line adapter to `@opentelemetry/api`, or the bundled {@link consoleSpanExporter}).\n */"
|
|
5817
6083
|
},
|
|
5818
6084
|
{
|
|
5819
6085
|
"name": "splitSections",
|
|
@@ -5944,6 +6210,12 @@
|
|
|
5944
6210
|
"signature": "export interface StandardWebSocket {\n send(data: string | ArrayBufferView | ArrayBuffer): void;\n close(code?: number, reason?: string): void;\n readonly readyState: number;\n binaryType?: string;\n addEventListener(type: string, listener: (event: never) => void): void;\n}",
|
|
5945
6211
|
"doc": "/**\n * A standard server-side `WebSocket` — the half returned by Deno's `Deno.upgradeWebSocket` and the\n * Workers `WebSocketPair`. {@link attachWebSocket} wires one to a nifra handler, so the Deno and Workers\n * bridges share all the dispatch/normalization/error-isolation logic (only the upgrade call differs).\n */"
|
|
5946
6212
|
},
|
|
6213
|
+
{
|
|
6214
|
+
"name": "StartObservation",
|
|
6215
|
+
"kind": "interface",
|
|
6216
|
+
"package": "@nifrajs/otel",
|
|
6217
|
+
"signature": "export interface StartObservation {\n readonly name: string;\n /** Explicit parent. `null` forces a root span; `undefined` falls back to `traceparent`. */\n readonly parent?: ObservationParent | null;\n /** Inbound W3C header used when `parent` is undefined. */\n readonly traceparent?: string | null;\n readonly attributes?: Readonly<Record<string, AttributeValue>>;\n}"
|
|
6218
|
+
},
|
|
5947
6219
|
{
|
|
5948
6220
|
"name": "StaticPath",
|
|
5949
6221
|
"kind": "interface",
|
|
@@ -5978,6 +6250,20 @@
|
|
|
5978
6250
|
"signature": "export interface StorageAdapter {\n /** Store `data` under `key`, overwriting any existing object. */\n put(key: string, data: StorageData, options?: PutOptions): Promise<void>;\n /** Read the object at `key`, or `null` if it doesn't exist. */\n get(key: string): Promise<StorageObject | null>;\n /** Remove `key`. No-op if it doesn't exist. */\n delete(key: string): Promise<void>;\n /** Whether an object exists at `key`. */\n exists(key: string): Promise<boolean>;\n /** List stored keys (optionally filtered by prefix + capped). */\n list(options?: ListOptions): Promise<string[]>;\n}",
|
|
5979
6251
|
"doc": "/**\n * A blob store keyed by string. Keys are POSIX-ish paths (`avatars/u1.png`); every adapter rejects unsafe\n * keys (absolute, `..` traversal, NUL, backslash) so a key valid in one adapter is valid in all. All\n * methods are async.\n */"
|
|
5980
6252
|
},
|
|
6253
|
+
{
|
|
6254
|
+
"name": "StorageAdapterConformanceError",
|
|
6255
|
+
"kind": "class",
|
|
6256
|
+
"package": "@nifrajs/storage",
|
|
6257
|
+
"signature": "export declare class StorageAdapterConformanceError extends Error {\n readonly check: string;\n constructor(check: string, message: string, cause?: unknown);\n}",
|
|
6258
|
+
"doc": "/** A failed invariant reported by {@link assertStorageAdapterConformance}. */"
|
|
6259
|
+
},
|
|
6260
|
+
{
|
|
6261
|
+
"name": "StorageAdapterConformanceOptions",
|
|
6262
|
+
"kind": "interface",
|
|
6263
|
+
"package": "@nifrajs/storage",
|
|
6264
|
+
"signature": "export interface StorageAdapterConformanceOptions {\n /** Return an empty, isolated adapter for this run. */\n readonly createAdapter: () => StorageAdapter | Promise<StorageAdapter>;\n}",
|
|
6265
|
+
"doc": "/** Construction and cleanup hooks for {@link assertStorageAdapterConformance}. */"
|
|
6266
|
+
},
|
|
5981
6267
|
{
|
|
5982
6268
|
"name": "StorageData",
|
|
5983
6269
|
"kind": "type",
|
|
@@ -5989,9 +6275,23 @@
|
|
|
5989
6275
|
"name": "StorageKeyError",
|
|
5990
6276
|
"kind": "class",
|
|
5991
6277
|
"package": "@nifrajs/storage",
|
|
5992
|
-
"signature": "export declare class StorageKeyError extends Error {\n
|
|
6278
|
+
"signature": "export declare class StorageKeyError extends Error {\n constructor(message: string);\n}",
|
|
5993
6279
|
"doc": "/**\n * Storage-key safety. A key is a POSIX-ish relative path (`avatars/u1.png`); we reject anything that\n * could escape a `FileStorage` root or otherwise misbehave — absolute paths, `..` traversal, NUL bytes,\n * and backslashes (Windows traversal). Enforced by EVERY adapter (not just `FileStorage`) so a key is\n * portable across them, and so the check can't be forgotten on the one adapter where it's a vulnerability.\n */"
|
|
5994
6280
|
},
|
|
6281
|
+
{
|
|
6282
|
+
"name": "StorageListPage",
|
|
6283
|
+
"kind": "interface",
|
|
6284
|
+
"package": "@nifrajs/storage",
|
|
6285
|
+
"signature": "export interface StorageListPage {\n readonly keys: readonly string[];\n /** Opaque cursor for the next page; absent when this is the final page. */\n readonly cursor?: string;\n}",
|
|
6286
|
+
"doc": "/** One page of keys from stores that expose cursor-based listing. */"
|
|
6287
|
+
},
|
|
6288
|
+
{
|
|
6289
|
+
"name": "StorageListPageOptions",
|
|
6290
|
+
"kind": "interface",
|
|
6291
|
+
"package": "@nifrajs/storage",
|
|
6292
|
+
"signature": "export interface StorageListPageOptions extends ListOptions {\n readonly cursor?: string;\n}",
|
|
6293
|
+
"doc": "/** Cursor-aware listing options. `cursor` is adapter-owned and must be treated as opaque. */"
|
|
6294
|
+
},
|
|
5995
6295
|
{
|
|
5996
6296
|
"name": "StorageObject",
|
|
5997
6297
|
"kind": "interface",
|
|
@@ -5999,6 +6299,27 @@
|
|
|
5999
6299
|
"signature": "export interface StorageObject {\n readonly body: Uint8Array;\n readonly size: number;\n readonly contentType?: string;\n readonly metadata?: Readonly<Record<string, string>>;\n}",
|
|
6000
6300
|
"doc": "/** An object read back from storage. `body` is buffered (not streamed) — fine for typical uploads. */"
|
|
6001
6301
|
},
|
|
6302
|
+
{
|
|
6303
|
+
"name": "StoragePresignedUrl",
|
|
6304
|
+
"kind": "interface",
|
|
6305
|
+
"package": "@nifrajs/storage",
|
|
6306
|
+
"signature": "export interface StoragePresignedUrl {\n readonly url: string;\n readonly expiresAt?: Date;\n}",
|
|
6307
|
+
"doc": "/** A provider-minted URL and its known expiry. */"
|
|
6308
|
+
},
|
|
6309
|
+
{
|
|
6310
|
+
"name": "StoragePresignOperation",
|
|
6311
|
+
"kind": "type",
|
|
6312
|
+
"package": "@nifrajs/storage",
|
|
6313
|
+
"signature": "export type StoragePresignOperation = \"get\" | \"put\";",
|
|
6314
|
+
"doc": "/** Operation represented by a presigned storage URL. */"
|
|
6315
|
+
},
|
|
6316
|
+
{
|
|
6317
|
+
"name": "StoragePresignOptions",
|
|
6318
|
+
"kind": "interface",
|
|
6319
|
+
"package": "@nifrajs/storage",
|
|
6320
|
+
"signature": "export interface StoragePresignOptions {\n readonly expiresInSeconds?: number;\n /** For PUT URLs, pin the declared MIME type. */\n readonly contentType?: string;\n /** For PUT URLs, pin the exact request-body size. */\n readonly contentLength?: number;\n}",
|
|
6321
|
+
"doc": "/** Mechanical constraints applied while minting a presigned URL. */"
|
|
6322
|
+
},
|
|
6002
6323
|
{
|
|
6003
6324
|
"name": "StoredEntry",
|
|
6004
6325
|
"kind": "interface",
|
|
@@ -6270,9 +6591,9 @@
|
|
|
6270
6591
|
},
|
|
6271
6592
|
{
|
|
6272
6593
|
"name": "TraceContext",
|
|
6273
|
-
"kind": "
|
|
6594
|
+
"kind": "type",
|
|
6274
6595
|
"package": "@nifrajs/otel",
|
|
6275
|
-
"signature": "export
|
|
6596
|
+
"signature": "export type TraceContext = ObservationContext;",
|
|
6276
6597
|
"doc": "/** The trace context exposed on the handler `c.trace` (typed, threaded via `derive`). */"
|
|
6277
6598
|
},
|
|
6278
6599
|
{
|
|
@@ -6293,7 +6614,7 @@
|
|
|
6293
6614
|
"name": "TracingOptions",
|
|
6294
6615
|
"kind": "interface",
|
|
6295
6616
|
"package": "@nifrajs/otel",
|
|
6296
|
-
"signature": "export interface TracingOptions {\n /** Where spans are sent. Default: {@link consoleSpanExporter}. */\n readonly exporter?: SpanExporter;\n /** Sets the `service.name` attribute on every span. */\n readonly serviceName?: string;\n /**\n * Set the outbound `traceparent` on the RESPONSE too (handy for browser/client correlation).\n * Default false — most setups only propagate downstream, not back to the caller.\n */\n readonly responseHeader?: boolean;\n}"
|
|
6617
|
+
"signature": "export interface TracingOptions {\n /** Where spans are sent. Default: {@link consoleSpanExporter}. */\n readonly exporter?: SpanExporter;\n /** Additional observation adapters (DevTools, a private redacting backend, metrics, …). */\n readonly adapters?: readonly ObservationAdapter[];\n /** Sets the `service.name` attribute on every span. */\n readonly serviceName?: string;\n /**\n * Set the outbound `traceparent` on the RESPONSE too (handy for browser/client correlation).\n * Default false — most setups only propagate downstream, not back to the caller.\n */\n readonly responseHeader?: boolean;\n}"
|
|
6297
6618
|
},
|
|
6298
6619
|
{
|
|
6299
6620
|
"name": "TrailingSlashOptions",
|
|
@@ -6391,6 +6712,13 @@
|
|
|
6391
6712
|
"signature": "export declare function unsignValue(signed: string, secret: string): Promise<string | null>;",
|
|
6392
6713
|
"doc": "/**\n * Verify a `value.signature` produced by {@link signValue} and return the value, or `null` if the\n * signature is missing, malformed, or doesn't match. Verification is **constant-time**\n * (`crypto.subtle.verify`), so a wrong signature can't be discovered byte-by-byte via timing.\n */"
|
|
6393
6714
|
},
|
|
6715
|
+
{
|
|
6716
|
+
"name": "UnsupportedMockSchemaError",
|
|
6717
|
+
"kind": "class",
|
|
6718
|
+
"package": "@nifrajs/mock",
|
|
6719
|
+
"signature": "export declare class UnsupportedMockSchemaError extends Error {\n readonly keyword: string;\n constructor(keyword: string, message: string);\n}",
|
|
6720
|
+
"doc": "/**\n * `@nifrajs/mock` — contract-based mock server.\n *\n * Reads a Nifra app's registered routes and their Standard Schema / JSON Schema\n * response definitions, then generates fake responses from supported JSON Schema keywords. Use it\n * for frontend-first development, agent testing, or CI smoke tests.\n */"
|
|
6721
|
+
},
|
|
6394
6722
|
{
|
|
6395
6723
|
"name": "UploadResult",
|
|
6396
6724
|
"kind": "type",
|
|
@@ -6726,7 +7054,7 @@
|
|
|
6726
7054
|
"name": "VERSION",
|
|
6727
7055
|
"kind": "const",
|
|
6728
7056
|
"package": "@nifrajs/core",
|
|
6729
|
-
"signature": "export declare const VERSION: \"1.
|
|
7057
|
+
"signature": "export declare const VERSION: \"1.4.0\";",
|
|
6730
7058
|
"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, so the literal can't go stale\n * (it shipped at \"0.0.0\" through 1.0.0 before those guards existed). Kept narrow (`as const`) so\n * consumers can pin it at the type level — see `test/version.test-d.ts`.\n */"
|
|
6731
7059
|
},
|
|
6732
7060
|
{
|