@thexjs/core 1.8.4 → 1.9.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/adapter.d.ts +14 -7
- package/dist/adapter.js +6 -2
- package/dist/backpressure-05lHLY5O.d.ts +51 -0
- package/dist/{chunk-VGTN4YI5.js → chunk-ME4ES2PD.js} +7 -5
- package/dist/index.d.ts +72 -91
- package/dist/index.js +1438 -1382
- package/package.json +1 -1
package/dist/adapter.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { B as BackpressureOptions } from './backpressure-05lHLY5O.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* The scratch directory that holds the transient (transpiled module / entry
|
|
3
5
|
* source) files the bundler reads before inlining everything into
|
|
@@ -39,6 +41,8 @@ interface AdapterOptions {
|
|
|
39
41
|
images?: {
|
|
40
42
|
remoteHosts?: string[];
|
|
41
43
|
};
|
|
44
|
+
/** Optional per-process request admission/backpressure. */
|
|
45
|
+
backpressure?: BackpressureOptions | false;
|
|
42
46
|
/** Client build output dir. Server-mode routes' island bundles are emitted
|
|
43
47
|
* into `<islandsDir>/_islands/` here so adapters can ship them as static
|
|
44
48
|
* assets. Undefined skips island bundling (server HTML ships no island
|
|
@@ -96,16 +100,18 @@ interface BuildManifest {
|
|
|
96
100
|
observability?: AdapterOptions["observability"];
|
|
97
101
|
/** Remote image proxy options serialized for the generated entry. */
|
|
98
102
|
images?: AdapterOptions["images"];
|
|
103
|
+
/** Backpressure options serialized for the generated entry. */
|
|
104
|
+
backpressure?: AdapterOptions["backpressure"];
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
/**
|
|
102
|
-
* Serializes runtime config (security / observability / images
|
|
103
|
-
* generated entry. Only JSON-serializable values can cross the build
|
|
104
|
-
* boundary -- a
|
|
105
|
-
*
|
|
106
|
-
*
|
|
108
|
+
* Serializes runtime config (security / observability / images / backpressure)
|
|
109
|
+
* into the generated entry. Only JSON-serializable values can cross the build
|
|
110
|
+
* boundary -- a callback in runtime config must not silently vanish, or the
|
|
111
|
+
* deployed function would drift from `x start`. Fail the build loudly with
|
|
112
|
+
* the offending keys.
|
|
107
113
|
*/
|
|
108
|
-
declare function serializeRuntimeOptions(label: string, options:
|
|
114
|
+
declare function serializeRuntimeOptions(label: string, options: object | undefined): string;
|
|
109
115
|
/**
|
|
110
116
|
* Emits the source for the adapter render-function entry module.
|
|
111
117
|
*
|
|
@@ -121,7 +127,8 @@ declare function serializeRuntimeOptions(label: string, options: Record<string,
|
|
|
121
127
|
* function behaves exactly like the `x start` production server -- health
|
|
122
128
|
* checks, rate limiting, revalidation, server actions, SSR with
|
|
123
129
|
* loaders/layouts/middleware, API routes, security headers, the 404 page,
|
|
124
|
-
* request logging -- all of it, with no
|
|
130
|
+
* request logging, and configured request backpressure -- all of it, with no
|
|
131
|
+
* drift between the two.
|
|
125
132
|
*
|
|
126
133
|
* The returned module exports a `handler` function; the platform adapter
|
|
127
134
|
* decides its signature (e.g. a Node `(req, res)` bridge for Vercel).
|
package/dist/adapter.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
scanNotFound,
|
|
10
10
|
scanPages,
|
|
11
11
|
scanRoutes
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ME4ES2PD.js";
|
|
13
13
|
import "./chunk-OXV2QTWV.js";
|
|
14
14
|
|
|
15
15
|
// src/adapter/bundle.ts
|
|
@@ -76,10 +76,12 @@ function generateAdapterEntry(manifest, entryDir) {
|
|
|
76
76
|
const securityOpts = serializeRuntimeOptions("security", manifest.security);
|
|
77
77
|
const observabilityOpts = serializeRuntimeOptions("observability", manifest.observability);
|
|
78
78
|
const imagesOpts = serializeRuntimeOptions("images", manifest.images);
|
|
79
|
+
const backpressureOpts = manifest.backpressure === void 0 ? "undefined" : manifest.backpressure === false ? "false" : serializeRuntimeOptions("backpressure", manifest.backpressure);
|
|
79
80
|
lines.push(
|
|
80
81
|
`const __x_security = ${securityOpts};`,
|
|
81
82
|
`const __x_observability = ${observabilityOpts};`,
|
|
82
83
|
`const __x_images = ${imagesOpts};`,
|
|
84
|
+
`const __x_backpressure = ${backpressureOpts};`,
|
|
83
85
|
""
|
|
84
86
|
);
|
|
85
87
|
const refs = /* @__PURE__ */ new Map();
|
|
@@ -148,6 +150,7 @@ function generateAdapterEntry(manifest, entryDir) {
|
|
|
148
150
|
" ...(Object.keys(__x_security).length > 0 ? { security: __x_security } : {}),",
|
|
149
151
|
" ...(Object.keys(__x_observability).length > 0 ? { observability: __x_observability } : {}),",
|
|
150
152
|
" ...(Object.keys(__x_images).length > 0 ? { images: __x_images } : {}),",
|
|
153
|
+
" ...(__x_backpressure !== undefined ? { backpressure: __x_backpressure } : {}),",
|
|
151
154
|
" preloaded: {",
|
|
152
155
|
" routes: __x_preloadedRoutes,",
|
|
153
156
|
...manifest.notFound ? [` notFoundComponent: ${manifest.notFound.identifier}.default ?? undefined,`] : [],
|
|
@@ -304,7 +307,8 @@ async function resolveBuildManifest(options, scratchDir) {
|
|
|
304
307
|
...existsSync(join2(projectRoot, "public", "styles.css")) ? { stylesheetHref: "/styles.css" } : {},
|
|
305
308
|
security: options.security,
|
|
306
309
|
observability: options.observability,
|
|
307
|
-
images: options.images
|
|
310
|
+
images: options.images,
|
|
311
|
+
backpressure: options.backpressure
|
|
308
312
|
};
|
|
309
313
|
}
|
|
310
314
|
function allModuleRefs(manifest) {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
interface BackpressureOptions {
|
|
2
|
+
/** Maximum number of requests allowed to execute concurrently in this process. */
|
|
3
|
+
maxConcurrent: number;
|
|
4
|
+
/** Maximum number of additional requests allowed to wait for a slot. Default: 0. */
|
|
5
|
+
maxQueue?: number;
|
|
6
|
+
/** Retry-After value used by `withBackpressure` when the queue is full. Default: 1 second. */
|
|
7
|
+
retryAfterSeconds?: number;
|
|
8
|
+
}
|
|
9
|
+
interface BackpressureSnapshot {
|
|
10
|
+
active: number;
|
|
11
|
+
queued: number;
|
|
12
|
+
maxConcurrent: number;
|
|
13
|
+
maxQueue: number;
|
|
14
|
+
}
|
|
15
|
+
interface BackpressureLease {
|
|
16
|
+
/** Releases one active slot. Safe to call more than once. */
|
|
17
|
+
release(): void;
|
|
18
|
+
}
|
|
19
|
+
interface BackpressureController {
|
|
20
|
+
/**
|
|
21
|
+
* Waits for an execution slot. Rejects with `BackpressureSaturatedError`
|
|
22
|
+
* when the queue is full, or with the request's abort reason while queued.
|
|
23
|
+
*/
|
|
24
|
+
acquire(signal?: AbortSignal): Promise<BackpressureLease>;
|
|
25
|
+
snapshot(): BackpressureSnapshot;
|
|
26
|
+
}
|
|
27
|
+
declare class BackpressureSaturatedError extends Error {
|
|
28
|
+
readonly retryAfterSeconds: number;
|
|
29
|
+
constructor(retryAfterSeconds: number);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates one in-process admission controller.
|
|
33
|
+
*
|
|
34
|
+
* This is deliberately separate from rate limiting: rate limiting controls
|
|
35
|
+
* request frequency per identity/window, while this controller bounds the
|
|
36
|
+
* amount of work that may be active or waiting inside one process at a time.
|
|
37
|
+
* Queued requests are promoted FIFO as active leases are released.
|
|
38
|
+
*/
|
|
39
|
+
declare function createBackpressureController(options: BackpressureOptions): BackpressureController;
|
|
40
|
+
type BackpressureHandler<TServer = unknown> = (req: Request, server?: TServer) => Response | Promise<Response>;
|
|
41
|
+
/**
|
|
42
|
+
* Wraps a request handler with bounded per-process admission.
|
|
43
|
+
*
|
|
44
|
+
* Saturation is reported as 503 Service Unavailable (not 429): the caller is
|
|
45
|
+
* not being rate-limited; this process has no execution/queue capacity left.
|
|
46
|
+
* Requests aborted while waiting are removed from the queue and their abort
|
|
47
|
+
* reason is re-thrown without invoking the wrapped handler.
|
|
48
|
+
*/
|
|
49
|
+
declare function withBackpressure<TServer = unknown>(handler: BackpressureHandler<TServer>, options: BackpressureOptions): BackpressureHandler<TServer>;
|
|
50
|
+
|
|
51
|
+
export { type BackpressureOptions as B, type BackpressureController as a, type BackpressureHandler as b, type BackpressureLease as c, BackpressureSaturatedError as d, type BackpressureSnapshot as e, createBackpressureController as f, withBackpressure as w };
|
|
@@ -60,7 +60,12 @@ var SAFE_ENV_KEYS = /* @__PURE__ */ new Set([
|
|
|
60
60
|
"PATH",
|
|
61
61
|
"TMPDIR",
|
|
62
62
|
"TEMP",
|
|
63
|
-
"TMP"
|
|
63
|
+
"TMP",
|
|
64
|
+
// Vercel injects this at build time as a cache-busting salt for
|
|
65
|
+
// content-addressed output (a Unix timestamp, e.g. "1783933175"). It is not
|
|
66
|
+
// a secret, but its short numeric value routinely appears inside bundled
|
|
67
|
+
// code, so the value scan would otherwise fail every Vercel build.
|
|
68
|
+
"VERCEL_HASH_SALT"
|
|
64
69
|
]);
|
|
65
70
|
var SENSITIVE_KEY_PATTERNS = [
|
|
66
71
|
/SECRET/i,
|
|
@@ -386,10 +391,7 @@ export function href<T extends keyof RouteMap & string>(
|
|
|
386
391
|
const isNamedToken = (key: string) => new RegExp(\`(^|/):\${key}(?=/|$)\`).test(path);
|
|
387
392
|
for (const [key, value] of Object.entries(params)) {
|
|
388
393
|
if (!isNamedToken(key)) {
|
|
389
|
-
const encoded = String(value)
|
|
390
|
-
.split("/")
|
|
391
|
-
.map(encodeURIComponent)
|
|
392
|
-
.join("/");
|
|
394
|
+
const encoded = String(value).split("/").map(encodeURIComponent).join("/");
|
|
393
395
|
result = result.replace(/\\*/, encoded);
|
|
394
396
|
}
|
|
395
397
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,56 +1,8 @@
|
|
|
1
|
+
import { B as BackpressureOptions } from './backpressure-05lHLY5O.js';
|
|
2
|
+
export { a as BackpressureController, b as BackpressureHandler, c as BackpressureLease, d as BackpressureSaturatedError, e as BackpressureSnapshot, f as createBackpressureController, w as withBackpressure } from './backpressure-05lHLY5O.js';
|
|
1
3
|
import * as react from 'react';
|
|
2
4
|
import { ComponentType, ReactNode, CSSProperties, AnchorHTMLAttributes } from 'react';
|
|
3
5
|
|
|
4
|
-
interface BackpressureOptions {
|
|
5
|
-
/** Maximum number of requests allowed to execute concurrently in this process. */
|
|
6
|
-
maxConcurrent: number;
|
|
7
|
-
/** Maximum number of additional requests allowed to wait for a slot. Default: 0. */
|
|
8
|
-
maxQueue?: number;
|
|
9
|
-
/** Retry-After value used by `withBackpressure` when the queue is full. Default: 1 second. */
|
|
10
|
-
retryAfterSeconds?: number;
|
|
11
|
-
}
|
|
12
|
-
interface BackpressureSnapshot {
|
|
13
|
-
active: number;
|
|
14
|
-
queued: number;
|
|
15
|
-
maxConcurrent: number;
|
|
16
|
-
maxQueue: number;
|
|
17
|
-
}
|
|
18
|
-
interface BackpressureLease {
|
|
19
|
-
/** Releases one active slot. Safe to call more than once. */
|
|
20
|
-
release(): void;
|
|
21
|
-
}
|
|
22
|
-
interface BackpressureController {
|
|
23
|
-
/**
|
|
24
|
-
* Waits for an execution slot. Rejects with `BackpressureSaturatedError`
|
|
25
|
-
* when the queue is full, or with the request's abort reason while queued.
|
|
26
|
-
*/
|
|
27
|
-
acquire(signal?: AbortSignal): Promise<BackpressureLease>;
|
|
28
|
-
snapshot(): BackpressureSnapshot;
|
|
29
|
-
}
|
|
30
|
-
declare class BackpressureSaturatedError extends Error {
|
|
31
|
-
readonly retryAfterSeconds: number;
|
|
32
|
-
constructor(retryAfterSeconds: number);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Creates one in-process admission controller.
|
|
36
|
-
*
|
|
37
|
-
* This is deliberately separate from rate limiting: rate limiting controls
|
|
38
|
-
* request frequency per identity/window, while this controller bounds the
|
|
39
|
-
* amount of work that may be active or waiting inside one process at a time.
|
|
40
|
-
* Queued requests are promoted FIFO as active leases are released.
|
|
41
|
-
*/
|
|
42
|
-
declare function createBackpressureController(options: BackpressureOptions): BackpressureController;
|
|
43
|
-
type BackpressureHandler<TServer = unknown> = (req: Request, server?: TServer) => Response | Promise<Response>;
|
|
44
|
-
/**
|
|
45
|
-
* Wraps a request handler with bounded per-process admission.
|
|
46
|
-
*
|
|
47
|
-
* Saturation is reported as 503 Service Unavailable (not 429): the caller is
|
|
48
|
-
* not being rate-limited; this process has no execution/queue capacity left.
|
|
49
|
-
* Requests aborted while waiting are removed from the queue and their abort
|
|
50
|
-
* reason is re-thrown without invoking the wrapped handler.
|
|
51
|
-
*/
|
|
52
|
-
declare function withBackpressure<TServer = unknown>(handler: BackpressureHandler<TServer>, options: BackpressureOptions): BackpressureHandler<TServer>;
|
|
53
|
-
|
|
54
6
|
type RouteMode = "static" | "server";
|
|
55
7
|
interface BuildOptions {
|
|
56
8
|
routesDir?: string;
|
|
@@ -63,50 +15,15 @@ interface BuildOptions {
|
|
|
63
15
|
/**
|
|
64
16
|
* Absolute path to the project's x.config.ts/js/mjs, if any. When set, the
|
|
65
17
|
* generated production server entry re-imports it at startup and forwards
|
|
66
|
-
* its `security`/`observability` fields into
|
|
67
|
-
* can hold live values (rate-limit key
|
|
68
|
-
* checks) that can't be serialized into
|
|
18
|
+
* its runtime `security`/`observability`/`images`/`backpressure` fields into
|
|
19
|
+
* `createApp()` — those fields can hold live values (rate-limit key
|
|
20
|
+
* functions, error reporters, health checks) that can't be serialized into
|
|
21
|
+
* the generated file directly.
|
|
69
22
|
*/
|
|
70
23
|
configPath?: string;
|
|
71
24
|
}
|
|
72
25
|
declare function build(options: BuildOptions): Promise<void>;
|
|
73
26
|
|
|
74
|
-
/**
|
|
75
|
-
* Inline client-side navigation script.
|
|
76
|
-
*
|
|
77
|
-
* Embedded directly into every rendered page as a <script> tag (see render.ts).
|
|
78
|
-
* Intercepts same-origin <a> clicks, fetches the destination page, and swaps
|
|
79
|
-
* the #root element's content in place. Includes hover-prefetch and popstate
|
|
80
|
-
* (back/forward) support.
|
|
81
|
-
*
|
|
82
|
-
* Opt-out attributes on <a> / <Link />:
|
|
83
|
-
* - data-no-nav — skip client navigation (full page load)
|
|
84
|
-
* - data-no-prefetch — skip hover prefetch (navigation still works)
|
|
85
|
-
*/
|
|
86
|
-
declare global {
|
|
87
|
-
interface Window {
|
|
88
|
-
__xIslandRoots?: Array<{
|
|
89
|
-
unmount(): void;
|
|
90
|
-
}>;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
declare const CLIENT_NAV_SCRIPT: string;
|
|
94
|
-
|
|
95
|
-
interface Frontmatter {
|
|
96
|
-
title?: string;
|
|
97
|
-
[key: string]: unknown;
|
|
98
|
-
}
|
|
99
|
-
interface ContentEntry {
|
|
100
|
-
filePath: string;
|
|
101
|
-
routePath: string;
|
|
102
|
-
slug: string;
|
|
103
|
-
frontmatter: Frontmatter;
|
|
104
|
-
body: string;
|
|
105
|
-
}
|
|
106
|
-
declare function scanContent(rootDir: string): ContentEntry[];
|
|
107
|
-
declare function escapeHtml(s: string): string;
|
|
108
|
-
declare function renderMarkdown(md: string): string;
|
|
109
|
-
|
|
110
27
|
interface ImageProxyOptions {
|
|
111
28
|
/** Hostnames allowed to be proxied, e.g. ["stardance.hackclub.com"]. Required — an empty/missing list disables the route (404). */
|
|
112
29
|
remoteHosts?: string[];
|
|
@@ -504,7 +421,7 @@ interface RouteProps {
|
|
|
504
421
|
params: Record<string, string>;
|
|
505
422
|
loaderData?: Record<string, unknown>;
|
|
506
423
|
}
|
|
507
|
-
interface CreateAppOptions {
|
|
424
|
+
interface CreateAppOptions$1 {
|
|
508
425
|
/** Primary route directory (legacy — mixes pages, api, layouts together). */
|
|
509
426
|
routesDir?: string;
|
|
510
427
|
/** Separate directory for page routes (preferred over routesDir when set). */
|
|
@@ -611,9 +528,73 @@ interface AppServeOptions {
|
|
|
611
528
|
interface RevalidateOptions {
|
|
612
529
|
revalidate?: number;
|
|
613
530
|
}
|
|
531
|
+
|
|
532
|
+
/** Public application options, including opt-in per-process backpressure. */
|
|
533
|
+
interface CreateAppOptions extends CreateAppOptions$1 {
|
|
534
|
+
/**
|
|
535
|
+
* Bounds requests admitted into the application request pipeline for this
|
|
536
|
+
* process. `undefined`/`false` keeps the existing unbounded behavior.
|
|
537
|
+
*
|
|
538
|
+
* Liveness/readiness probes, an enabled built-in `/metrics` endpoint, and
|
|
539
|
+
* the development live-reload stream bypass admission so overload cannot
|
|
540
|
+
* make the process look dead or consume a permanent slot with the dev SSE
|
|
541
|
+
* connection.
|
|
542
|
+
*/
|
|
543
|
+
backpressure?: BackpressureOptions | false;
|
|
544
|
+
}
|
|
545
|
+
/** Type-safe config helper for x.config.ts. */
|
|
614
546
|
declare function defineConfig(config: CreateAppOptions): CreateAppOptions;
|
|
547
|
+
/**
|
|
548
|
+
* Creates the normal application and, when configured, places one bounded
|
|
549
|
+
* admission gate in front of its request pipeline.
|
|
550
|
+
*
|
|
551
|
+
* The controller is per `createApp()` call/process. Saturation returns 503 +
|
|
552
|
+
* Retry-After. A client that disconnects while queued is removed without
|
|
553
|
+
* entering the application pipeline or being turned into a false 500.
|
|
554
|
+
*
|
|
555
|
+
* Rate limiting remains the existing inner createApp policy. The two controls
|
|
556
|
+
* keep distinct semantics (429 policy vs 503 process capacity), but if the
|
|
557
|
+
* process is already saturated the outer admission gate can return 503 before
|
|
558
|
+
* the request reaches the inner rate limiter.
|
|
559
|
+
*/
|
|
615
560
|
declare function createApp(options: CreateAppOptions): Promise<AppServeOptions>;
|
|
616
561
|
|
|
562
|
+
/**
|
|
563
|
+
* Inline client-side navigation script.
|
|
564
|
+
*
|
|
565
|
+
* Embedded directly into every rendered page as a <script> tag (see render.ts).
|
|
566
|
+
* Intercepts same-origin <a> clicks, fetches the destination page, and swaps
|
|
567
|
+
* the #root element's content in place. Includes hover-prefetch and popstate
|
|
568
|
+
* (back/forward) support.
|
|
569
|
+
*
|
|
570
|
+
* Opt-out attributes on <a> / <Link />:
|
|
571
|
+
* - data-no-nav — skip client navigation (full page load)
|
|
572
|
+
* - data-no-prefetch — skip hover prefetch (navigation still works)
|
|
573
|
+
*/
|
|
574
|
+
declare global {
|
|
575
|
+
interface Window {
|
|
576
|
+
__xIslandRoots?: Array<{
|
|
577
|
+
unmount(): void;
|
|
578
|
+
}>;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
declare const CLIENT_NAV_SCRIPT: string;
|
|
582
|
+
|
|
583
|
+
interface Frontmatter {
|
|
584
|
+
title?: string;
|
|
585
|
+
[key: string]: unknown;
|
|
586
|
+
}
|
|
587
|
+
interface ContentEntry {
|
|
588
|
+
filePath: string;
|
|
589
|
+
routePath: string;
|
|
590
|
+
slug: string;
|
|
591
|
+
frontmatter: Frontmatter;
|
|
592
|
+
body: string;
|
|
593
|
+
}
|
|
594
|
+
declare function scanContent(rootDir: string): ContentEntry[];
|
|
595
|
+
declare function escapeHtml(s: string): string;
|
|
596
|
+
declare function renderMarkdown(md: string): string;
|
|
597
|
+
|
|
617
598
|
declare function renderErrorOverlay(error: unknown): string;
|
|
618
599
|
|
|
619
600
|
interface ImageProps {
|
|
@@ -1124,4 +1105,4 @@ declare function resetServerFunctions(): void;
|
|
|
1124
1105
|
declare function registerServerFunctions(routePath: string, paramNames: string[], fns: Record<string, (...args: unknown[]) => Promise<unknown>>): void;
|
|
1125
1106
|
declare function getServerFunctionHandler(csrfOptions?: CsrfOptions): (req: Request) => Promise<Response | null>;
|
|
1126
1107
|
|
|
1127
|
-
export { type AuditEntry, type AuditEvent, type AuditSink,
|
|
1108
|
+
export { type AuditEntry, type AuditEvent, type AuditSink, BackpressureOptions, type BuildOptions, CLIENT_NAV_SCRIPT, type ContentEntry, type CounterSeries, type CreateAppOptions, type CsrfOptions, type CsrfResult, DEFAULT_HISTOGRAM_BUCKETS_MS, DEFAULT_MAX_BODY_SIZE, DefaultNotFound, EnvLeakageError, type ErrorContext, type ErrorReporter, type Frontmatter, type HealthCheck, type HealthCheckOptions, type HistogramSeries, Image, type ImageProps, type ImageProxyOptions, type InMemoryMetricsOptions, type InMemoryMetricsReporter, Island, type IslandEntry, type IslandMode, IslandProvider, type LayoutEntry, Link, type LinkProps, type LoaderArgs, type LoaderReturn, type LogFields, type Logger, type MetricLabels, type MetricsReporter, type MetricsSnapshot, type MiddlewareContext, type MiddlewareEntry, type MiddlewareFn, type MiddlewareNext, type NotFoundEntry, OTEL_ERROR_STATUS_CODE, type OtelMeterLike, type OtelTracerLike, PUBLIC_ENV_PREFIX, type ProcessCrashHandlerOptions, REDACTED, type RateLimitOptions, type RateLimitResult, type RateLimitStore, type ReadinessResult, RequestBodyTooLargeError, type RevalidateOptions, type RouteEntry, type RouteMode, type RouteProps, SRCSET_WIDTHS, type SecurityHeadersOptions, type SentryLike, type TraceSpan, type TracerLike, type TrustedProxyOptions, applySecurityHeaders, assertNoEnvLeakage, audit, auditLoginFailure, auditLoginSuccess, auditLogout, auditPasswordChanged, auditPermissionDenied, auditRoleChanged, auditSessionRevoked, build, buildSecurityHeaders, buildSrcSet, checkCsrf, clientIpFromRequest, combineReporters, composeMiddleware, configureTrustedProxy, createApp, createConsoleAuditSink, createHealthCheckHandler, createImageProxyHandler, createInMemoryMetrics, createOtelReporter, createOtlpMetricsReporter, createRateLimiter, createRedisRateLimitStore, createSentryReporter, dbTraceAttributes, defineConfig, enforceRequestBodySize, escapeHtml, findLayoutChain, findLeakedEnvKeys, findMiddlewareChain, generateCsrfToken, generateManifestSource, generateServerFunctionClient, getAuditSink, getErrorReporter, getServerFunctionHandler, getTracer, installProcessCrashHandlers, isSensitiveKey, isTrustedProxy, logger, noopAuditSink, noopMetrics, noopReporter, rateLimitMiddleware, redactString, redactValue, registerServerFunctions, renderErrorOverlay, renderMarkdown, renderPage, renderStaticPage, renderStreamingPage, reportException, requestIdFromRequest, resetServerFunctions, resetTrustedProxy, runWithRequestSpan, scanApiDir, scanContent, scanLayouts, scanLayoutsDir, scanMiddleware, scanNotFound, scanPages, scanRoutes, setAuditSink, setErrorReporter, setImageRemoteHosts, setTracer, tracePhase, tracePhaseSync, traceRequestId, verifyCsrfToken, verifyOrigin, withCsrfCookie, withRequestLogging, withRequestMetrics, withRequestTracing, writeManifest };
|