@finesoft/front 0.5.1 → 0.5.2

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.
Files changed (128) hide show
  1. package/README.md +4 -4
  2. package/dist/Outlet.svelte +39 -0
  3. package/dist/Outlet.svelte.d.ts +7 -0
  4. package/dist/browser-DIU6Sxl3.mjs +1237 -0
  5. package/dist/browser-kFMjlLGT.d.mts +262 -0
  6. package/dist/browser.d.mts +7 -2
  7. package/dist/browser.mjs +9 -1
  8. package/dist/controller-types-CgmJ6-le.d.mts +16 -0
  9. package/dist/cookies-Bpf9VayB.d.mts +779 -0
  10. package/dist/fetch-policy-BHT8RtrL.mjs +82 -0
  11. package/dist/host-guard-DDWxLpFL.mjs +222 -0
  12. package/dist/http-B6CJqDyf.d.mts +46 -0
  13. package/dist/http-CaxrMD1A.d.mts +1 -0
  14. package/dist/http-D70PL72H.mjs +257 -0
  15. package/dist/http.d.mts +3 -0
  16. package/dist/http.mjs +2 -0
  17. package/dist/index-node.d.mts +15 -0
  18. package/dist/index-node.mjs +15 -0
  19. package/dist/index.d.mts +48 -697
  20. package/dist/index.mjs +44 -261
  21. package/dist/load-node.d.mts +5 -0
  22. package/dist/load-node.mjs +10 -0
  23. package/dist/load-portable.d.mts +5 -0
  24. package/dist/load-portable.mjs +8 -0
  25. package/dist/lru-map-BKoUAySU.mjs +50 -0
  26. package/dist/messages-CAt2QdGr.mjs +140 -0
  27. package/dist/native-contract-DuR25hYB.d.mts +14 -0
  28. package/dist/native-contract.d.mts +2 -0
  29. package/dist/native-contract.mjs +1 -0
  30. package/dist/node-D9hB4dsz.d.mts +35 -0
  31. package/dist/node.d.mts +2 -0
  32. package/dist/node.mjs +59 -0
  33. package/dist/path-CGFl2w7D.mjs +113 -0
  34. package/dist/path-CXT6xGPO.d.mts +261 -0
  35. package/dist/portable-CaxrMD1A.d.mts +1 -0
  36. package/dist/portable.d.mts +11 -0
  37. package/dist/portable.mjs +12 -0
  38. package/dist/proxy-1SphZ7x7.mjs +436 -0
  39. package/dist/proxy-2dSWO-Xw.d.mts +53 -0
  40. package/dist/public-types-BcJM-AYc.mjs +835 -0
  41. package/dist/react-DhwBRw01.d.mts +16 -0
  42. package/dist/react.d.mts +3 -0
  43. package/dist/react.mjs +29 -0
  44. package/dist/rolldown-runtime-B4iAMlE-.mjs +35 -0
  45. package/dist/secure-fetch-Xlht2jd7.d.mts +30 -0
  46. package/dist/server-controller-proxy-BkVuVWVD.d.mts +38 -0
  47. package/dist/session-DnB4ZC3x.d.mts +1279 -0
  48. package/dist/src-Ftl_0rhu.mjs +28 -0
  49. package/dist/src-qwx7Vw8g.mjs +3807 -0
  50. package/dist/ssr-BEUNDvbj.d.mts +210 -0
  51. package/dist/ssr-C8xnYXoY.mjs +357 -0
  52. package/dist/ssr.d.mts +3 -0
  53. package/dist/ssr.mjs +3 -0
  54. package/dist/svelte-Dr5to3SE.d.mts +16 -0
  55. package/dist/svelte.d.mts +3 -0
  56. package/dist/svelte.mjs +13 -0
  57. package/dist/typegen-C-WeJCtf.d.mts +12 -0
  58. package/dist/typegen-cli.d.mts +1 -0
  59. package/dist/typegen-cli.mjs +11 -0
  60. package/dist/typegen.d.mts +3 -0
  61. package/dist/typegen.mjs +2 -0
  62. package/dist/types-BuaZHRG7.mjs +402 -0
  63. package/dist/undici-CPfL25Hr.mjs +22262 -0
  64. package/dist/vite-Cj4SPA8D.d.mts +277 -0
  65. package/dist/vite.d.mts +4 -0
  66. package/dist/vite.mjs +2354 -0
  67. package/dist/vue-DGmzuKho.d.mts +32 -0
  68. package/dist/vue.d.mts +3 -0
  69. package/dist/vue.mjs +56 -0
  70. package/dist/web.d.mts +6 -0
  71. package/dist/web.mjs +8 -0
  72. package/dist/worker.d.mts +2 -0
  73. package/dist/worker.mjs +2 -0
  74. package/docs/01-getting-started.md +67 -199
  75. package/docs/02-routing-and-controllers.md +163 -241
  76. package/docs/03-middleware.md +10 -212
  77. package/docs/04-rendering-and-hydration.md +6 -333
  78. package/docs/05-i18n.md +7 -237
  79. package/docs/06-http-client.md +20 -263
  80. package/docs/07-di-container.md +23 -257
  81. package/docs/08-observability.md +6 -286
  82. package/docs/09-server-and-deployment.md +59 -219
  83. package/docs/10-features-platform-pwa.md +7 -231
  84. package/docs/11-navigation.md +143 -288
  85. package/docs/12-session-restoration.md +6 -214
  86. package/docs/README.md +7 -7
  87. package/docs/advanced/custom-action-handler.md +29 -229
  88. package/docs/advanced/custom-adapter.md +7 -259
  89. package/docs/advanced/custom-event-recorder.md +7 -312
  90. package/docs/advanced/inline-proxy-codegen.md +6 -185
  91. package/docs/advanced/multi-tenant-scopes.md +10 -323
  92. package/docs/engineering/ci-release-flow.md +35 -222
  93. package/docs/engineering/project-structure.md +34 -277
  94. package/docs/engineering/testing.md +8 -310
  95. package/docs/pitfalls/container-scope-leak.md +2 -214
  96. package/docs/pitfalls/i18n-bundle-size.md +6 -176
  97. package/docs/pitfalls/proxy-binary-payloads.md +8 -12
  98. package/docs/pitfalls/ssr-hydration-mismatch.md +4 -160
  99. package/docs/pitfalls/ssr-vs-csr-globals.md +9 -170
  100. package/docs/zh/01-getting-started.md +67 -199
  101. package/docs/zh/02-routing-and-controllers.md +166 -244
  102. package/docs/zh/03-middleware.md +10 -212
  103. package/docs/zh/04-rendering-and-hydration.md +6 -333
  104. package/docs/zh/05-i18n.md +7 -237
  105. package/docs/zh/06-http-client.md +20 -263
  106. package/docs/zh/07-di-container.md +23 -257
  107. package/docs/zh/08-observability.md +6 -283
  108. package/docs/zh/09-server-and-deployment.md +59 -219
  109. package/docs/zh/10-features-platform-pwa.md +7 -231
  110. package/docs/zh/11-navigation.md +130 -290
  111. package/docs/zh/12-session-restoration.md +6 -214
  112. package/docs/zh/README.md +4 -4
  113. package/docs/zh/advanced/custom-action-handler.md +29 -229
  114. package/docs/zh/advanced/custom-adapter.md +7 -259
  115. package/docs/zh/advanced/custom-event-recorder.md +7 -312
  116. package/docs/zh/advanced/inline-proxy-codegen.md +6 -185
  117. package/docs/zh/advanced/multi-tenant-scopes.md +10 -323
  118. package/docs/zh/engineering/ci-release-flow.md +35 -222
  119. package/docs/zh/engineering/project-structure.md +34 -277
  120. package/docs/zh/engineering/testing.md +8 -310
  121. package/docs/zh/pitfalls/container-scope-leak.md +2 -214
  122. package/docs/zh/pitfalls/i18n-bundle-size.md +6 -176
  123. package/docs/zh/pitfalls/proxy-binary-payloads.md +8 -12
  124. package/docs/zh/pitfalls/ssr-hydration-mismatch.md +4 -160
  125. package/docs/zh/pitfalls/ssr-vs-csr-globals.md +9 -170
  126. package/package.json +118 -20
  127. package/dist/browser-BHhVWXik.mjs +0 -2
  128. package/dist/browser-BV2BBXm7.d.mts +0 -2811
@@ -0,0 +1,82 @@
1
+ import { i as __toESM } from "./rolldown-runtime-B4iAMlE-.mjs";
2
+ import { r as HostGuardError, t as classifyHost } from "./host-guard-DDWxLpFL.mjs";
3
+ import "./src-Ftl_0rhu.mjs";
4
+ import { lookup } from "node:dns/promises";
5
+ import { isIP } from "node:net";
6
+ //#region ../server/src/dynamic-import.ts
7
+ /** Cache for stable (non-file://) modules — avoids redundant resolution. */
8
+ const moduleCache = /* @__PURE__ */ new Map();
9
+ /**
10
+ * Opaque dynamic import wrapper.
11
+ *
12
+ * Uses native `import()` directly — compatible with all JS runtimes
13
+ * including Cloudflare Workers (which forbid `new Function`).
14
+ *
15
+ * This may produce "dynamic import cannot be analyzed" warnings in Vite dev
16
+ * mode when the `@vite-ignore` comment is stripped by tsdown during bundling.
17
+ * These warnings are harmless: all specifiers are either well-known Node.js
18
+ * built-ins (externalized) or absolute file:// URLs constructed by the framework.
19
+ */
20
+ const rawImport = (specifier) => import(
21
+ /* @vite-ignore */
22
+ specifier
23
+ );
24
+ const debugEnabled = typeof process !== "undefined" && process.env?.FINESOFT_DEBUG === "1";
25
+ function logDebug(msg) {
26
+ if (debugEnabled) console.debug(`[finesoft:dynamic-import] ${msg}`);
27
+ }
28
+ async function dynamicImport(specifier) {
29
+ const cacheable = !specifier.startsWith("file:") && !specifier.startsWith("/");
30
+ if (cacheable) {
31
+ const cached = moduleCache.get(specifier);
32
+ if (cached) {
33
+ logDebug(`cache hit → ${specifier}`);
34
+ return cached;
35
+ }
36
+ }
37
+ logDebug(`importing → ${specifier}`);
38
+ const mod = await rawImport(specifier);
39
+ if (cacheable) moduleCache.set(specifier, mod);
40
+ return mod;
41
+ }
42
+ //#endregion
43
+ //#region ../server/src/node/dns.ts
44
+ /** Uses the OS resolver, including hosts-file entries, matching Node fetch. */
45
+ const nodeDnsLookup = async (hostname) => (await lookup(hostname, { all: true })).map(({ address }) => address);
46
+ //#endregion
47
+ //#region ../server/src/node/fetch-policy.ts
48
+ let dispatcher;
49
+ const guardedLookup = (hostname, options, callback) => {
50
+ nodeDnsLookup(hostname).then((addresses) => {
51
+ const records = addresses.map((address) => {
52
+ const family = isIP(address);
53
+ const verdict = classifyHost(address);
54
+ if (!family || !verdict.ok) throw new HostGuardError(hostname, `host resolves to forbidden address ${address}`);
55
+ return {
56
+ address,
57
+ family
58
+ };
59
+ });
60
+ const selected = options.family ? records.filter((record) => record.family === options.family) : records;
61
+ if (!selected.length) throw new HostGuardError(hostname, "DNS lookup returned no addresses");
62
+ if (options.all) callback(null, selected);
63
+ else callback(null, selected[0].address, selected[0].family);
64
+ }).catch((error) => callback(error, "", 0));
65
+ };
66
+ /** Node fetch policy: validate DNS at socket creation, retaining hostname/TLS SNI. */
67
+ const nodeSafeFetchOptions = Object.freeze({
68
+ validateDns: false,
69
+ wrapFetch: (baseFetch) => async (input, init) => {
70
+ const url = typeof input === "object" && "url" in input ? input.url : String(input);
71
+ if (!URL.canParse(url)) return baseFetch(input, init);
72
+ const agent = await (dispatcher ??= import("./undici-CPfL25Hr.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)).then(({ Agent }) => new Agent({ connect: { lookup: guardedLookup } })));
73
+ return baseFetch(input, {
74
+ ...init,
75
+ dispatcher: agent
76
+ });
77
+ }
78
+ });
79
+ //#endregion
80
+ export { nodeDnsLookup as n, dynamicImport as r, nodeSafeFetchOptions as t };
81
+
82
+ //# sourceMappingURL=fetch-policy-BHT8RtrL.mjs.map
@@ -0,0 +1,222 @@
1
+ //#region ../core/src/http/errors.ts
2
+ /** HTTP 请求错误 */
3
+ var HttpError = class extends Error {
4
+ status;
5
+ statusText;
6
+ body;
7
+ constructor(status, statusText, body) {
8
+ super(`HTTP ${status}: ${statusText}`);
9
+ this.status = status;
10
+ this.statusText = statusText;
11
+ this.body = body;
12
+ this.name = "HttpError";
13
+ }
14
+ };
15
+ /**
16
+ * SSRF 防护拦截到不安全的目标地址时抛出。应用层可以 catch 它来给出业务友好的错误,
17
+ * 不需要靠 message 字符串匹配。
18
+ */
19
+ var HostGuardError = class extends Error {
20
+ url;
21
+ reason;
22
+ constructor(url, reason) {
23
+ super(`Refused to fetch ${url}: ${reason}`);
24
+ this.url = url;
25
+ this.reason = reason;
26
+ this.name = "HostGuardError";
27
+ }
28
+ };
29
+ //#endregion
30
+ //#region ../core/src/http/host-guard.ts
31
+ /**
32
+ * Inspect a hostname string (the `URL.hostname` value, without brackets, port,
33
+ * or userinfo). Returns `{ok: false}` for anything in a private/loopback/
34
+ * reserved range; `{ok: true}` if the literal looks like a public address or a
35
+ * non-IP name (the caller may then DNS-resolve and re-check).
36
+ */
37
+ function classifyHost(rawHost) {
38
+ if (!rawHost) return {
39
+ ok: false,
40
+ reason: "empty host"
41
+ };
42
+ const host = rawHost.toLowerCase();
43
+ const stripped = host.startsWith("[") && host.endsWith("]") ? host.slice(1, -1) : host;
44
+ if (stripped === "localhost" || stripped.endsWith(".localhost")) return {
45
+ ok: false,
46
+ reason: "loopback host forbidden"
47
+ };
48
+ if (stripped.includes(":")) return classifyIPv6(stripped);
49
+ const v4 = parseIPv4Loose(stripped);
50
+ if (v4) return classifyIPv4Octets(v4);
51
+ return { ok: true };
52
+ }
53
+ /**
54
+ * Convenience wrapper for callers holding a full URL string. Also rejects
55
+ * non-http(s) schemes (gopher, file, data, …).
56
+ */
57
+ function classifyUrl(rawUrl) {
58
+ let url;
59
+ try {
60
+ url = new URL(rawUrl);
61
+ } catch {
62
+ return {
63
+ ok: false,
64
+ reason: "invalid URL"
65
+ };
66
+ }
67
+ if (url.protocol !== "http:" && url.protocol !== "https:") return {
68
+ ok: false,
69
+ reason: `scheme "${url.protocol}" not allowed (only http/https)`
70
+ };
71
+ return classifyHost(url.hostname);
72
+ }
73
+ /**
74
+ * Parse an IPv4 host in the various forms web platforms historically accept:
75
+ *
76
+ * - "127.0.0.1" (dotted decimal, the only RFC-correct form)
77
+ * - "2130706433" (one big decimal — equals 0x7F000001)
78
+ * - "0x7f000001" (one big hex)
79
+ * - "0177.0.0.1" (per-octet octal, leading 0)
80
+ * - "0xff.0xff.0xff.0xff" (per-octet hex)
81
+ *
82
+ * Returns the 4 octets if parseable, else null. We do NOT mark these as
83
+ * "invalid host" — bypass attempts via decimal/hex/octal are valid IP literals
84
+ * and Node's fetch will resolve them. We just need their octets to check
85
+ * against private ranges.
86
+ */
87
+ function parseIPv4Loose(host) {
88
+ if (host.length === 0) return null;
89
+ if (!host.includes(".")) {
90
+ const n = parsePartLoose(host);
91
+ if (n === null || n < 0 || n > 4294967295) return null;
92
+ return [
93
+ n >>> 24 & 255,
94
+ n >>> 16 & 255,
95
+ n >>> 8 & 255,
96
+ n & 255
97
+ ];
98
+ }
99
+ const parts = host.split(".");
100
+ if (parts.length !== 4) return null;
101
+ const out = [];
102
+ for (const part of parts) {
103
+ const n = parsePartLoose(part);
104
+ if (n === null || n < 0 || n > 255) return null;
105
+ out.push(n);
106
+ }
107
+ return out;
108
+ }
109
+ function parsePartLoose(part) {
110
+ if (part.length === 0) return null;
111
+ if (part.startsWith("0x") || part.startsWith("0X")) {
112
+ const hex = part.slice(2);
113
+ if (!/^[0-9a-f]+$/i.test(hex)) return null;
114
+ return parseInt(hex, 16);
115
+ }
116
+ if (part.length > 1 && part.startsWith("0")) {
117
+ if (!/^[0-7]+$/.test(part)) return null;
118
+ return parseInt(part, 8);
119
+ }
120
+ if (!/^[0-9]+$/.test(part)) return null;
121
+ return parseInt(part, 10);
122
+ }
123
+ function classifyIPv4Octets(o) {
124
+ const [a, b] = o;
125
+ if (a === 0) return {
126
+ ok: false,
127
+ reason: "unspecified IPv4 forbidden"
128
+ };
129
+ if (a === 127) return {
130
+ ok: false,
131
+ reason: "loopback IPv4 forbidden"
132
+ };
133
+ if (a === 10) return {
134
+ ok: false,
135
+ reason: "private IPv4 (10/8) forbidden"
136
+ };
137
+ if (a === 172 && b >= 16 && b <= 31) return {
138
+ ok: false,
139
+ reason: "private IPv4 (172.16/12) forbidden"
140
+ };
141
+ if (a === 192 && b === 168) return {
142
+ ok: false,
143
+ reason: "private IPv4 (192.168/16) forbidden"
144
+ };
145
+ if (a === 169 && b === 254) return {
146
+ ok: false,
147
+ reason: "link-local IPv4 forbidden"
148
+ };
149
+ if (a === 100 && b >= 64 && b <= 127) return {
150
+ ok: false,
151
+ reason: "CGNAT IPv4 forbidden"
152
+ };
153
+ if (a >= 224 && a <= 239) return {
154
+ ok: false,
155
+ reason: "multicast IPv4 forbidden"
156
+ };
157
+ if (a >= 240) return {
158
+ ok: false,
159
+ reason: "reserved IPv4 forbidden"
160
+ };
161
+ return { ok: true };
162
+ }
163
+ /**
164
+ * Best-effort IPv6 classification. We only need to recognise loopback,
165
+ * link-local, ULA, and IPv4-mapped/-compatible forms; we don't need to
166
+ * canonicalise arbitrary IPv6.
167
+ */
168
+ function classifyIPv6(host) {
169
+ const lower = host.toLowerCase();
170
+ if (lower === "::" || lower === "::0") return {
171
+ ok: false,
172
+ reason: "unspecified IPv6 forbidden"
173
+ };
174
+ if (lower === "::1") return {
175
+ ok: false,
176
+ reason: "loopback IPv6 forbidden"
177
+ };
178
+ if (lower.startsWith("fe8") || lower.startsWith("fe9") || lower.startsWith("fea") || lower.startsWith("feb")) return {
179
+ ok: false,
180
+ reason: "link-local IPv6 forbidden"
181
+ };
182
+ if (lower.startsWith("fc") || lower.startsWith("fd")) return {
183
+ ok: false,
184
+ reason: "ULA IPv6 forbidden"
185
+ };
186
+ if (lower.startsWith("ff")) return {
187
+ ok: false,
188
+ reason: "multicast IPv6 forbidden"
189
+ };
190
+ const v4 = extractIPv4FromIPv6(lower);
191
+ if (v4) {
192
+ const verdict = classifyIPv4Octets(v4);
193
+ if (!verdict.ok) return {
194
+ ok: false,
195
+ reason: `IPv4-in-IPv6 ${verdict.reason}`
196
+ };
197
+ }
198
+ return { ok: true };
199
+ }
200
+ function extractIPv4FromIPv6(lower) {
201
+ const dottedMatch = lower.match(/(?:^|:)((?:\d{1,3}\.){3}\d{1,3})$/);
202
+ if (dottedMatch) {
203
+ const v4 = parseIPv4Loose(dottedMatch[1]);
204
+ if (v4) return v4;
205
+ }
206
+ const hexMatch = lower.match(/(?:^|:)([0-9a-f]{1,4}):([0-9a-f]{1,4})$/);
207
+ if (hexMatch && (lower.startsWith("::ffff:") || lower.includes(":ffff:"))) {
208
+ const hi = parseInt(hexMatch[1], 16);
209
+ const lo = parseInt(hexMatch[2], 16);
210
+ return [
211
+ hi >>> 8 & 255,
212
+ hi & 255,
213
+ lo >>> 8 & 255,
214
+ lo & 255
215
+ ];
216
+ }
217
+ return null;
218
+ }
219
+ //#endregion
220
+ export { HttpError as i, classifyUrl as n, HostGuardError as r, classifyHost as t };
221
+
222
+ //# sourceMappingURL=host-guard-DDWxLpFL.mjs.map
@@ -0,0 +1,46 @@
1
+ import { E as ParamSchema, c as ExecutionContext, d as ExecutionHandle, h as Operation, p as Invocation, t as CompiledPath, y as RuntimeHandle } from "./path-CXT6xGPO.mjs";
2
+ //#region ../server/src/http.d.ts
3
+ interface HttpEndpoint {
4
+ readonly method: string;
5
+ readonly path: string;
6
+ readonly compiledPath: CompiledPath;
7
+ readonly paramCodecs?: Record<string, ParamSchema>;
8
+ readonly respond: (request: Request, execution: ExecutionHandle, params: Readonly<Record<string, unknown>>) => Promise<Response>;
9
+ }
10
+ interface EndpointOptions<I, O> {
11
+ readonly method: string;
12
+ /** Segment pathname pattern. Supports `:param` and optional `:param?`. */
13
+ readonly path: string;
14
+ readonly operation: Operation<I, O>;
15
+ readonly paramCodecs?: Record<string, ParamSchema>;
16
+ readonly decode: (request: Request, context: ExecutionContext, params: Readonly<Record<string, unknown>>) => I | Promise<I>;
17
+ /** Explicit public projection. No automatic serialization of operation results. */
18
+ readonly encode: (output: O, context: ExecutionContext) => Response | Promise<Response>;
19
+ }
20
+ declare function defineEndpoint<I, O>(options: EndpointOptions<I, O>): HttpEndpoint;
21
+ interface HttpHost {
22
+ /** The host must retain the supplied promise, including its resource cleanup. */
23
+ waitUntil(promise: Promise<unknown>): void;
24
+ /** Retain the complete invocation, including encoding, body consumption/cancel and cleanup. */
25
+ trackRequest?(completion: Promise<void>): void;
26
+ }
27
+ interface HttpHandlerOptions {
28
+ readonly runtime: RuntimeHandle;
29
+ readonly endpoints: readonly HttpEndpoint[];
30
+ /** Identity/locale must be derived from trusted authentication, not arbitrary client claims. */
31
+ readonly context?: (request: Request, bindings: Readonly<Record<string, unknown>>) => Omit<Invocation, "signal"> | Promise<Omit<Invocation, "signal">>;
32
+ }
33
+ /** The execution owner directly satisfies the native Worker fetch contract. */
34
+ interface HttpHandler {
35
+ fetch(request: Request, bindings?: Readonly<Record<string, unknown>>, host?: HttpHost): Promise<Response>;
36
+ }
37
+ type ManagedTask = (context: ExecutionContext) => void | Promise<void>;
38
+ /** Run work in its own execution scope. Use the supplied task context to acquire resources.
39
+ * Its signal is independent of response cancellation; cleanup is part of host waitUntil.
40
+ * The callback must await all its work and may not return streams or retain request resources.
41
+ */
42
+ declare function runManagedTask(context: ExecutionContext, task: ManagedTask): void;
43
+ declare function createHttpHandler(input: HttpHandlerOptions | (() => HttpHandlerOptions)): HttpHandler;
44
+ //#endregion
45
+ export { HttpHost as a, defineEndpoint as c, HttpHandlerOptions as i, runManagedTask as l, HttpEndpoint as n, ManagedTask as o, HttpHandler as r, createHttpHandler as s, EndpointOptions as t };
46
+ //# sourceMappingURL=http-B6CJqDyf.d.mts.map
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,257 @@
1
+ import { n as ExecutionError, t as compilePath } from "./path-CGFl2w7D.mjs";
2
+ import "./src-Ftl_0rhu.mjs";
3
+ //#region ../server/src/http.ts
4
+ function defineEndpoint(options) {
5
+ const { method, path, operation, decode, encode, paramCodecs } = options;
6
+ if (!/^[A-Za-z]+$/.test(method) || !path.startsWith("/") || typeof decode !== "function" || typeof encode !== "function") throw new ExecutionError("configuration");
7
+ let compiledPath;
8
+ try {
9
+ compiledPath = compilePath(path);
10
+ } catch (cause) {
11
+ throw new ExecutionError("configuration", void 0, { cause });
12
+ }
13
+ return Object.freeze({
14
+ method: method.toUpperCase(),
15
+ path,
16
+ compiledPath,
17
+ paramCodecs,
18
+ async respond(request, execution, params) {
19
+ let input;
20
+ try {
21
+ input = await decode(request, execution.context, params);
22
+ } catch (error) {
23
+ throw error instanceof ExecutionError ? error : new ExecutionError("validation", void 0, { cause: error });
24
+ }
25
+ const output = await execution.execute(operation, input);
26
+ const response = await encode(output, execution.context);
27
+ if (!(response instanceof Response)) throw new ExecutionError("failure");
28
+ return response;
29
+ }
30
+ });
31
+ }
32
+ const TASK_BINDING = "__finesoftManagedTask";
33
+ /** Run work in its own execution scope. Use the supplied task context to acquire resources.
34
+ * Its signal is independent of response cancellation; cleanup is part of host waitUntil.
35
+ * The callback must await all its work and may not return streams or retain request resources.
36
+ */
37
+ function runManagedTask(context, task) {
38
+ const schedule = context.bindings[TASK_BINDING];
39
+ if (typeof schedule !== "function") throw new ExecutionError("capability");
40
+ schedule(task);
41
+ }
42
+ function publicError(error) {
43
+ const classified = error instanceof ExecutionError ? error : new ExecutionError("failure");
44
+ const safe = new ExecutionError(classified.code);
45
+ return Response.json({ error: {
46
+ code: safe.code,
47
+ message: safe.message
48
+ } }, { status: safe.status });
49
+ }
50
+ function createHttpHandler(input) {
51
+ function prepare(options) {
52
+ const routes = [...options.endpoints];
53
+ for (const endpoint of routes) if (routes.some((other) => other !== endpoint && other.method === endpoint.method && other.compiledPath.descriptor.shape === endpoint.compiledPath.descriptor.shape)) throw new ExecutionError("configuration");
54
+ return {
55
+ options,
56
+ routes
57
+ };
58
+ }
59
+ let prepared = typeof input === "function" ? void 0 : prepare(input);
60
+ return { async fetch(request, bindings = {}, host) {
61
+ const { options, routes } = prepared ??= prepare(typeof input === "function" ? input() : input);
62
+ const pathname = new URL(request.url).pathname;
63
+ const shaped = routes.map((endpoint) => ({
64
+ endpoint,
65
+ params: endpoint.compiledPath.match(pathname)
66
+ })).filter((candidate) => candidate.params !== null);
67
+ if (shaped.length === 0) return publicError(new ExecutionError("not_found"));
68
+ const sameMethod = shaped.filter((candidate) => candidate.endpoint.method === request.method);
69
+ if (sameMethod.length === 0) {
70
+ const allow = [...new Set(shaped.map((candidate) => candidate.endpoint.method))];
71
+ return Response.json({ error: {
72
+ code: "method_not_allowed",
73
+ message: "Method not allowed"
74
+ } }, {
75
+ status: 405,
76
+ headers: { Allow: allow.join(", ") }
77
+ });
78
+ }
79
+ let selected;
80
+ for (const candidate of sameMethod) {
81
+ const params = Object.assign(Object.create(null), candidate.params);
82
+ let valid = true;
83
+ for (const parameter of candidate.endpoint.compiledPath.descriptor.parameters) {
84
+ const codec = candidate.endpoint.paramCodecs?.[parameter.name];
85
+ if (!codec) continue;
86
+ let result;
87
+ try {
88
+ result = await codec["~standard"].validate(candidate.params[parameter.name]);
89
+ } catch {
90
+ valid = false;
91
+ break;
92
+ }
93
+ if (result.issues) {
94
+ valid = false;
95
+ break;
96
+ }
97
+ params[parameter.name] = result.value;
98
+ }
99
+ if (valid) {
100
+ selected = {
101
+ endpoint: candidate.endpoint,
102
+ params
103
+ };
104
+ break;
105
+ }
106
+ }
107
+ if (!selected) return publicError(new ExecutionError("validation"));
108
+ const { endpoint, params } = selected;
109
+ const abort = new AbortController();
110
+ const signal = AbortSignal.any([request.signal, abort.signal]);
111
+ let execution;
112
+ let acceptingTasks = true;
113
+ let complete;
114
+ const completion = new Promise((resolve) => {
115
+ complete = resolve;
116
+ });
117
+ let responseOwnsCompletion = false;
118
+ try {
119
+ host?.trackRequest?.(completion);
120
+ const invocation = await options.context?.(request, bindings);
121
+ const requestBindings = {
122
+ ...bindings,
123
+ ...invocation?.bindings
124
+ };
125
+ const schedule = (task) => {
126
+ signal.throwIfAborted();
127
+ if (!host || !acceptingTasks) throw new ExecutionError("capability");
128
+ const taskExecution = options.runtime.createExecution({
129
+ ...invocation,
130
+ traceId: execution.context.traceId,
131
+ bindings: {
132
+ ...requestBindings,
133
+ [TASK_BINDING]: void 0
134
+ }
135
+ });
136
+ let registered = false;
137
+ const work = Promise.resolve().then(async () => {
138
+ let failed = false;
139
+ let taskError;
140
+ try {
141
+ if (registered) await task(taskExecution.context);
142
+ } catch (error) {
143
+ failed = true;
144
+ taskError = error;
145
+ }
146
+ try {
147
+ await taskExecution.dispose();
148
+ } catch (error) {
149
+ if (failed) throw new AggregateError([taskError, error], "Managed task and cleanup failed");
150
+ throw error;
151
+ }
152
+ if (failed) throw taskError;
153
+ });
154
+ try {
155
+ host.waitUntil(work);
156
+ registered = true;
157
+ } catch (error) {
158
+ work.catch(() => {});
159
+ throw new ExecutionError("capability", void 0, { cause: error });
160
+ }
161
+ };
162
+ execution = options.runtime.createExecution({
163
+ ...invocation,
164
+ signal,
165
+ bindings: {
166
+ ...requestBindings,
167
+ [TASK_BINDING]: schedule
168
+ }
169
+ });
170
+ const response = await endpoint.respond(request, execution, params);
171
+ if (signal.aborted) {
172
+ await response.body?.cancel(signal.reason);
173
+ throw new ExecutionError("cancelled");
174
+ }
175
+ acceptingTasks = false;
176
+ const ownedResponse = await ownResponse(response, execution, abort, signal, complete);
177
+ responseOwnsCompletion = true;
178
+ return ownedResponse;
179
+ } catch (error) {
180
+ acceptingTasks = false;
181
+ try {
182
+ await execution?.dispose();
183
+ } catch {}
184
+ return publicError(signal.aborted ? new ExecutionError("cancelled") : error);
185
+ } finally {
186
+ if (!responseOwnsCompletion) complete();
187
+ }
188
+ } };
189
+ }
190
+ /** The body reader, not Response creation, ends the execution. No prefetch into our wrapper. */
191
+ async function ownResponse(response, execution, abort, signal, complete) {
192
+ if (!response.body) {
193
+ await execution.dispose();
194
+ complete();
195
+ return response;
196
+ }
197
+ const reader = response.body.getReader();
198
+ let finished;
199
+ let controller;
200
+ const finish = (cancellation) => {
201
+ if (finished) return finished;
202
+ finished = Promise.resolve().then(async () => {
203
+ signal.removeEventListener("abort", onAbort);
204
+ try {
205
+ if (cancellation) await reader.cancel(cancellation.reason);
206
+ } catch {}
207
+ try {
208
+ await execution.dispose();
209
+ } catch {} finally {
210
+ complete();
211
+ }
212
+ });
213
+ return finished;
214
+ };
215
+ const onAbort = () => {
216
+ finish({ reason: signal.reason }).then(() => controller.error(new ExecutionError("cancelled")));
217
+ };
218
+ const body = new ReadableStream({
219
+ start(c) {
220
+ controller = c;
221
+ signal.addEventListener("abort", onAbort, { once: true });
222
+ if (signal.aborted) onAbort();
223
+ },
224
+ async pull(c) {
225
+ try {
226
+ const result = await reader.read();
227
+ if (signal.aborted) {
228
+ await finish();
229
+ c.error(new ExecutionError("cancelled"));
230
+ return;
231
+ }
232
+ if (result.done) {
233
+ await finish();
234
+ c.close();
235
+ } else c.enqueue(result.value);
236
+ } catch (error) {
237
+ await finish();
238
+ c.error(error);
239
+ }
240
+ },
241
+ async cancel(reason) {
242
+ signal.removeEventListener("abort", onAbort);
243
+ const completion = finish({ reason });
244
+ abort.abort(reason);
245
+ await completion;
246
+ }
247
+ }, { highWaterMark: 0 });
248
+ return new Response(body, {
249
+ status: response.status,
250
+ statusText: response.statusText,
251
+ headers: response.headers
252
+ });
253
+ }
254
+ //#endregion
255
+ export { defineEndpoint as n, runManagedTask as r, createHttpHandler as t };
256
+
257
+ //# sourceMappingURL=http-D70PL72H.mjs.map
@@ -0,0 +1,3 @@
1
+ import { a as HttpHost, c as defineEndpoint, i as HttpHandlerOptions, l as runManagedTask, n as HttpEndpoint, o as ManagedTask, r as HttpHandler, s as createHttpHandler, t as EndpointOptions } from "./http-B6CJqDyf.mjs";
2
+ import "./http-CaxrMD1A.mjs";
3
+ export { EndpointOptions, HttpEndpoint, HttpHandler, HttpHandlerOptions, HttpHost, ManagedTask, createHttpHandler, defineEndpoint, runManagedTask };
package/dist/http.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { n as defineEndpoint, r as runManagedTask, t as createHttpHandler } from "./http-D70PL72H.mjs";
2
+ export { createHttpHandler, defineEndpoint, runManagedTask };
@@ -0,0 +1,15 @@
1
+ import { A as makeSchema, C as ImpressionEntry, D as StandardIssue, E as ParamSchema, F as Token, I as createToken, M as Provider, N as ProviderContext, O as StandardResult, P as provide, S as EventRecorder, T as InferOutput, _ as OperationPolicy, a as compilePath, b as RuntimeOptions, c as ExecutionContext, d as ExecutionHandle, f as Implementation, g as OperationHandler, h as Operation, i as PathParams, j as Container, k as StandardSchemaV1, l as ExecutionError, m as ModuleDefinition, n as PathDescriptor, o as AnyOperation, p as Invocation, r as PathParameterDescriptor, s as AppDefinition, t as CompiledPath, u as ExecutionErrorCode, v as QueryCache, w as MetricsFieldsProvider, x as executionErrorFromHttp, y as RuntimeHandle } from "./path-CXT6xGPO.mjs";
2
+ import { $ as createActiveLeafCodec, $n as list, $t as MiddlewareResult, A as SessionStore, An as PlatformInfo, At as isCompoundAction, B as ControllerContext, Bn as ConsoleLoggerFactory, Bt as NavigationPath, C as SessionFailure, Cn as Storage, Ct as ACTION_KINDS, D as SessionSlice, Dn as LocaleInfo, Dt as ExternalUrlAction, E as SessionRestoreResult, En as LocaleAttributes, Et as CompoundAction, F as WebRuntime, Fn as ReportCallback, Ft as LeafNode, G as controllerContext, Gn as InferParams, Gt as SplitColumn, H as SERVER_CONTROLLER, Hn as Logger, Ht as NavigationSnapshot, I as WebRuntimeOptions, In as ReportingLogger, It as NAVIGATION_NODE_KINDS, J as resolveConfiguredMessages, Jn as QuerySchemaMap, Jt as StackNode, K as MessagesLoader, Kn as InferQuery, Kt as SplitNode, L as createWebRuntime, Ln as ReportingLoggerFactory, Lt as NavigationError, M as SessionWriteResult, Mn as BaseController, Mt as isFlowAction, N as StorageUnavailableError, Nn as ControllerFailure, Nt as makeExternalUrlAction, O as SessionSnapshot, On as TextDirection, Ot as FlowAction, P as WebConfiguration, Pn as ControllerInput, Pt as makeFlowAction, Q as NavigationRouterLike, Qn as isMultiValueSchema, Qt as DenyResult, R as PageControllerDefinition, Rn as ReportingLoggerOptions, Rt as NavigationNode, S as SessionErrorContext, Sn as FeatureFlagsProvider, St as ActionHandler, T as SessionNavigation, Tn as resolveMessages, Tt as ActionInvocation, U as SERVER_REQUEST, Un as LoggerFactory, Ut as ResolvedDestination, V as PageControllerInput, Vn as LogFilter, Vt as NavigationPathStep, W as ServerRequestState, Wn as ExtractParamNames, Wt as SPLIT_VISIBILITIES, X as FullStateCodecOptions, Xn as ListOptions, Xt as AfterLoadGuard, Y as DEFAULT_NAV_PARAM, Yn as StripOptional, Yt as TabsNode, Z as NavigationCodec, Zn as MultiValueSchema, Zt as BeforeLoadGuard, _ as AsyncStorage, _n as RouteInput, _t as PrefetchedIntents, a as NavigationCommitContext, an as deny, at as SerializedSplit, b as SESSION_DEFAULT_VERSION, bn as DEP_KEYS, bt as Router, c as NavigationTransactionContext, cn as rewrite, ct as SerializedTabs, d as createWebSession, dn as FINESOFT_PUBLIC, dt as serializeNavigationStable, en as NavigationContext, er as Intent, et as createFullStateCodec, f as AppSnapshot, fn as PublicProjection, ft as PageRoute, g as WebAppView, gn as markPublic, gt as PrefetchedIntent, h as ViewProps, hn as isPublicMarked, ht as route, i as BeforeNavigateResult, in as RewriteResult, it as SerializedNavigation, j as SessionStoreOptions, jn as detectPlatform, jt as isExternalUrlAction, k as SessionStateProvider, kn as Translator, kt as TreeAction, l as WebSession, ln as BASE_PAGE_FIELDS, lt as deserializeNavigation, m as ViewEntry, mn as getPublicFields, mt as RouteDefinition, n as BeforeCommitResult, nn as PostLoadContext, nt as encodeNavigationTreeParam, o as NavigationCommitError, on as next, ot as SerializedSplitColumn, p as NavigationSummary, pn as PublicValueCodec, pt as RenderMode, q as MessagesLoaderContext, qn as ParamsFor, qt as SplitVisibility, r as BeforeNavigatePolicy, rn as RedirectResult, rt as SerializedLeaf, s as NavigationContextInput, sn as redirect, st as SerializedStack, t as BeforeCommitPolicy, tn as NextResult, tt as decodeNavigationTreeParam, u as WebSessionOptions, un as BasePage, ut as serializeNavigation, v as NavigationScopedState, vn as RouteIntent, vt as RouteAddOptions, w as SessionLoadResult, wn as TranslationMessages, wt as Action, x as SessionError, xn as FeatureFlags, xt as ActionDispatcher, y as SESSION_DEFAULT_KEY, yn as RouteParams, yt as RouteMatch, z as WebAppDefinition, zn as ConsoleLogger, zt as NavigationNodeKind } from "./session-DnB4ZC3x.mjs";
3
+ import { $ as SimpleTranslatorOptions, $t as uuid, A as setVisibility, At as fetchWithRedirects, B as split, Bt as HttpError, C as popTo, Ct as isSome, D as resolveActivePath, Dt as mapEach, E as replaceTop, Et as Mapper, F as isLeafNode, Ft as HttpClientConfig, G as safeErrorPage, Gt as withDefault, H as tabs, Ht as CompositeLogger, I as isSplitNode, It as HttpRequestOptions, J as defineModule, Jt as bool, K as createRuntime, Kt as NumOptions, L as isStackNode, Lt as RequestInterceptor, M as resourceKey, Mt as classifyHost, N as SplitColumnInit, Nt as classifyUrl, O as selectColumn, Ot as pipe, P as TabsInit, Pt as HttpClient, Q as SimpleTranslator, Qt as str, R as isTabsNode, Rt as ResponseInterceptor, S as pop, St as isNone, T as push, Tt as AsyncMapper, U as RouteInputFor, Ut as CompositeLoggerFactory, V as stack, Vt as stableStringify, W as SafeErrorPageOptions, Wt as optional, X as implementController, Xt as num, Y as defineOperation, Yt as int, Z as implementOperation, Zt as oneOf, _ as collectAllLeaves, _t as removeHost, a as LoadPageOptions, at as PluralCategory, b as findNode, bt as None, c as defineWebApp, ct as interpolate, d as runBeforeLoadGuards, dt as VoidEventRecorder, et as getLocaleAttributes, f as createSessionStore, ft as ConsoleEventRecorder, g as encodeSnapshot, gt as getBaseUrl, h as decodeSnapshot, ht as buildUrl, i as resolveInitialNavigation, it as resolveLocaleFromUrl, j as visibleSplitColumns, jt as HostCheckResult, k as selectTab, kt as pipeAsync, l as getWebPlan, lt as resolvePluralKey, m as createNavigationScopedState, mt as generateUuid, n as PageReference, nt as isRtl, o as PageLoadResult, ot as PluralRuleProvider, p as collectLeafKeys, pt as CompositeEventRecorder, q as defineApp, qt as StrOptions, r as definePage, rt as makeLocaleInfo, s as loadPage, st as englishPlural, t as parseCookieString, tt as getTextDirection, u as runAfterLoadGuards, ut as WithFieldsRecorder, v as collectVisibleDestinations, vt as removeQueryParams, w as popToRoot, wt as LruMap, x as mapNavigationLeaves, xt as Optional, y as findNearestStack, yt as removeScheme, z as leaf, zt as HostGuardError } from "./cookies-Bpf9VayB.mjs";
4
+ import { a as enforceHostGuard, i as TargetGuardOptions, n as secureFetch, r as DnsLookup, t as SecureFetchOptions } from "./secure-fetch-Xlht2jd7.mjs";
5
+ import { a as WebHydration, c as decodeWireEnvelope, i as FRAMEWORK_PROTOCOL_VERSION, l as getFrameworkBuildId, n as ServerControllerProxy, o as WireDecodeResult, r as ServerControllerRequest, s as WireEnvelope, t as SERVER_CONTROLLER_PATH } from "./server-controller-proxy-BkVuVWVD.mjs";
6
+ import { A as createBrowserApp, C as defaultShouldRestore, D as BrowserAppConfig, E as createNavigationBridge, O as BrowserAppHandle, S as createSessionBridge, T as NavigationBridgeDependencies, _ as createDomRestore, a as IntersectionImpressionObserver, b as SESSION_DEFAULT_DEBOUNCE_MS, c as getPWADisplayMode, d as createPrefetchedIntentsFromDom, f as deserializeServerData, g as DomRestoreOptions, h as DomRestore, i as ImpressionObserverOptions, k as BrowserSessionConfig, l as resetFilterCache, m as History, n as createBrowserContext, o as ImpressionObserver, p as tryScroll, r as setHtmlLocaleAttributes, s as PWADisplayMode, t as BrowserContextOptions, u as shouldLog, v as createWebStorage, w as NavigationBridge, x as SessionBridgeOptions, y as BrowserSession } from "./browser-kFMjlLGT.mjs";
7
+ import { a as HttpHost, c as defineEndpoint, i as HttpHandlerOptions, l as runManagedTask, n as HttpEndpoint, o as ManagedTask, r as HttpHandler, s as createHttpHandler, t as EndpointOptions } from "./http-B6CJqDyf.mjs";
8
+ import { C as createSSRRender, E as SSRRenderResult, S as SSRRenderConfig, T as SSRContext, _ as serializeServerData, a as SSRRequestContext, b as injectCSRShell, c as matchRenderModeOverride, d as ServerControllerContext, f as ServerControllerInput, g as materializeServerData, h as SerializeServerDataOptions, i as SSRModule, l as BaseServerController, m as createServerContext, n as SSRHandler, o as SSRResponseResult, p as ServerContextOptions, r as SSRHandlerOptions, s as createSSRHandler, t as SSRCache, u as CookieOptions, v as InjectSSROptions, w as SSRAppResult, x as injectSSRContent, y as SSR_PLACEHOLDERS } from "./ssr-BEUNDvbj.mjs";
9
+ import { a as registerProxyRoutes, n as ProxyRouteConfig, r as ProxyRouter, t as ProxyAuthConfig } from "./proxy-2dSWO-Xw.mjs";
10
+ import { a as nodeDnsLookup, i as nodeSafeFetchOptions, n as NodeHandlerServer, r as startNodeHandler, t as NodeHandlerOptions } from "./node-D9hB4dsz.mjs";
11
+ import { c as FinesoftFrontViteOptions, d as AdapterContext, u as Adapter } from "./vite-Cj4SPA8D.mjs";
12
+ import { n as ControllerTypeResult, t as ControllerTypeOptions } from "./controller-types-CgmJ6-le.mjs";
13
+ import { t as FrontTypeOptions } from "./typegen-C-WeJCtf.mjs";
14
+ import { NativeBindings, NativeView, NativeViews, Outlet, Renderer, autoAdapter, cloudflareAdapter, finesoftFrontViteConfig, generateControllerTypes, generateFrontTypes, generateProxyCode, netlifyAdapter, nodeAdapter, resolveAdapter, staticAdapter, useSnapshot, vercelAdapter } from "./index.mjs";
15
+ export { ACTION_KINDS, type Action, ActionDispatcher, type ActionHandler, type ActionInvocation, type Adapter, type AdapterContext, type AfterLoadGuard, AnyOperation, AppDefinition, AppSnapshot, type AsyncMapper, type AsyncStorage, BASE_PAGE_FIELDS, BaseController, type BasePage, BaseServerController, type BeforeCommitPolicy, type BeforeCommitResult, type BeforeLoadGuard, type BeforeNavigatePolicy, type BeforeNavigateResult, type BrowserAppConfig, type BrowserAppHandle, type BrowserContextOptions, type BrowserSession, type BrowserSessionConfig, type CompiledPath, CompositeEventRecorder, CompositeLogger, CompositeLoggerFactory, type CompoundAction, ConsoleEventRecorder, ConsoleLogger, ConsoleLoggerFactory, Container, ControllerContext, type ControllerFailure, type ControllerInput, type ControllerTypeOptions, type ControllerTypeResult, type CookieOptions, DEFAULT_NAV_PARAM, DEP_KEYS, type DenyResult, type DnsLookup, type DomRestore, type DomRestoreOptions, EndpointOptions, type EventRecorder, ExecutionContext, ExecutionError, ExecutionErrorCode, ExecutionHandle, type ExternalUrlAction, type ExtractParamNames, FINESOFT_PUBLIC, FRAMEWORK_PROTOCOL_VERSION, type FeatureFlags, type FeatureFlagsProvider, type FinesoftFrontViteOptions, type FlowAction, type FrontTypeOptions, type FullStateCodecOptions, History, type HostCheckResult, HostGuardError, HttpClient, type HttpClientConfig, HttpEndpoint, HttpError, HttpHandler, HttpHandlerOptions, HttpHost, type HttpRequestOptions, Implementation, type ImpressionEntry, type ImpressionObserver, type ImpressionObserverOptions, type InferOutput, type InferParams, type InferQuery, type InjectSSROptions, type Intent, IntersectionImpressionObserver, Invocation, type LeafNode, type ListOptions, type LoadPageOptions, type LocaleAttributes, type LocaleInfo, type LogFilter, type Logger, type LoggerFactory, LruMap, ManagedTask, type Mapper, type MessagesLoader, type MessagesLoaderContext, type MetricsFieldsProvider, type MiddlewareResult, ModuleDefinition, type MultiValueSchema, NAVIGATION_NODE_KINDS, NativeBindings, NativeView, NativeViews, type NavigationBridge, type NavigationBridgeDependencies, type NavigationCodec, type NavigationCommitContext, NavigationCommitError, type NavigationContext, type NavigationContextInput, NavigationError, type NavigationNode, type NavigationNodeKind, type NavigationPath, type NavigationPathStep, type NavigationRouterLike, type NavigationScopedState, type NavigationSnapshot, NavigationSummary, type NavigationTransactionContext, type NextResult, type NodeHandlerOptions, type NodeHandlerServer, type None, type NumOptions, Operation, OperationHandler, OperationPolicy, type Optional, Outlet, type PWADisplayMode, type PageControllerDefinition, PageControllerInput, type PageLoadResult, type PageReference, type PageRoute, type ParamSchema, type ParamsFor, type PathDescriptor, type PathParameterDescriptor, type PathParams, type PlatformInfo, type PluralCategory, type PluralRuleProvider, type PostLoadContext, type PrefetchedIntent, PrefetchedIntents, type Provider, type ProviderContext, type ProxyAuthConfig, type ProxyRouteConfig, type ProxyRouter, type PublicProjection, type PublicValueCodec, QueryCache, type QuerySchemaMap, type RedirectResult, type RenderMode, Renderer, type ReportCallback, ReportingLogger, ReportingLoggerFactory, type ReportingLoggerOptions, type RequestInterceptor, type ResolvedDestination, type ResponseInterceptor, type RewriteResult, type RouteAddOptions, type RouteDefinition, type RouteInput, type RouteInputFor, type RouteIntent, type RouteMatch, type RouteParams, Router, RuntimeHandle, RuntimeOptions, SERVER_CONTROLLER, SERVER_CONTROLLER_PATH, SERVER_REQUEST, SESSION_DEFAULT_DEBOUNCE_MS, SESSION_DEFAULT_KEY, SESSION_DEFAULT_VERSION, SPLIT_VISIBILITIES, type SSRAppResult, SSRCache, type SSRContext, SSRHandler, SSRHandlerOptions, SSRModule, type SSRRenderConfig, type SSRRenderResult, SSRRequestContext, SSRResponseResult, SSR_PLACEHOLDERS, type SafeErrorPageOptions, type SecureFetchOptions, type SerializeServerDataOptions, type SerializedLeaf, type SerializedNavigation, type SerializedSplit, type SerializedSplitColumn, type SerializedStack, type SerializedTabs, type ServerContextOptions, type ServerControllerContext, type ServerControllerInput, ServerControllerProxy, type ServerControllerRequest, ServerRequestState, type SessionBridgeOptions, SessionError, type SessionErrorContext, type SessionFailure, type SessionLoadResult, type SessionNavigation, type SessionRestoreResult, type SessionSlice, type SessionSnapshot, type SessionStateProvider, type SessionStore, type SessionStoreOptions, type SessionWriteResult, SimpleTranslator, type SimpleTranslatorOptions, type SplitColumn, type SplitColumnInit, type SplitNode, type SplitVisibility, type StackNode, type StandardIssue, type StandardResult, type StandardSchemaV1, type Storage, StorageUnavailableError, type StrOptions, type StripOptional, type TabsInit, type TabsNode, type TargetGuardOptions, type TextDirection, type Token, type TranslationMessages, type Translator, type TreeAction, ViewEntry, ViewProps, VoidEventRecorder, type WebAppDefinition, WebAppView, type WebConfiguration, type WebHydration, type WebRuntime, type WebRuntimeOptions, type WebSession, type WebSessionOptions, type WireDecodeResult, type WireEnvelope, WithFieldsRecorder, autoAdapter, bool, buildUrl, classifyHost, classifyUrl, cloudflareAdapter, collectAllLeaves, collectLeafKeys, collectVisibleDestinations, compilePath, controllerContext, createActiveLeafCodec, createBrowserApp, createBrowserContext, createDomRestore, createFullStateCodec, createHttpHandler, createNavigationBridge, createNavigationScopedState, createPrefetchedIntentsFromDom, createRuntime, createSSRHandler, createSSRRender, createServerContext, createSessionBridge, createSessionStore, createToken, createWebRuntime, createWebSession, createWebStorage, decodeNavigationTreeParam, decodeSnapshot, decodeWireEnvelope, defaultShouldRestore, defineApp, defineEndpoint, defineModule, defineOperation, definePage, defineWebApp, deny, deserializeNavigation, deserializeServerData, detectPlatform, encodeNavigationTreeParam, encodeSnapshot, enforceHostGuard, englishPlural, executionErrorFromHttp, fetchWithRedirects, findNearestStack, findNode, finesoftFrontViteConfig, generateControllerTypes, generateFrontTypes, generateProxyCode, generateUuid, getBaseUrl, getFrameworkBuildId, getLocaleAttributes, getPWADisplayMode, getPublicFields, getTextDirection, getWebPlan, implementController, implementOperation, injectCSRShell, injectSSRContent, int, interpolate, isCompoundAction, isExternalUrlAction, isFlowAction, isLeafNode, isMultiValueSchema, isNone, isPublicMarked, isRtl, isSome, isSplitNode, isStackNode, isTabsNode, leaf, list, loadPage, makeExternalUrlAction, makeFlowAction, makeLocaleInfo, makeSchema, mapEach, mapNavigationLeaves, markPublic, matchRenderModeOverride, materializeServerData, netlifyAdapter, next, nodeAdapter, nodeDnsLookup, nodeSafeFetchOptions, num, oneOf, optional, parseCookieString, pipe, pipeAsync, pop, popTo, popToRoot, provide, push, redirect, registerProxyRoutes, removeHost, removeQueryParams, removeScheme, replaceTop, resetFilterCache, resolveActivePath, resolveAdapter, resolveConfiguredMessages, resolveInitialNavigation, resolveLocaleFromUrl, resolveMessages, resolvePluralKey, resourceKey, rewrite, route, runAfterLoadGuards, runBeforeLoadGuards, runManagedTask, safeErrorPage, secureFetch, selectColumn, selectTab, serializeNavigation, serializeNavigationStable, serializeServerData, setHtmlLocaleAttributes, setVisibility, shouldLog, split, stableStringify, stack, startNodeHandler, staticAdapter, str, tabs, tryScroll, useSnapshot, uuid, vercelAdapter, visibleSplitColumns, withDefault };