@sjcx/vorma 0.0.0-pre.2 → 0.0.0-pre.4
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/build/assemble-artifacts.d.ts +1 -1
- package/dist/build/bundle-client.d.ts +1 -1
- package/dist/build/cli.js +53 -44
- package/dist/build/compile-application.d.ts +2 -2
- package/dist/build/development-artifacts.d.ts +1 -1
- package/dist/build/development-build.d.ts +3 -6
- package/dist/build/development-server-process.d.ts +3 -3
- package/dist/build/development-work.d.ts +4 -3
- package/dist/build/generate-application.d.ts +4 -4
- package/dist/build/index.d.ts +2 -3
- package/dist/build/index.js +1 -1
- package/dist/build/inspect-projects.d.ts +3 -3
- package/dist/build/load-config.d.ts +17 -16
- package/dist/build/publish-artifacts.d.ts +1 -4
- package/dist/build/render-client-transport.d.ts +1 -1
- package/dist/build/render-server-generated.d.ts +1 -12
- package/dist/build/render-types.d.ts +1 -1
- package/dist/build/resolve-config.d.ts +6 -9
- package/dist/build/source-layout.d.ts +2 -2
- package/dist/build/typescript-projects.d.ts +5 -0
- package/dist/{build-DcP5_DUV.js → build-BeUTL6eX.js} +104 -301
- package/package.json +5 -36
- package/dist/build/compile-server.d.ts +0 -42
- package/dist/client/assembly.d.ts +0 -40
- package/dist/client/browser-http-client.d.ts +0 -10
- package/dist/client/client-loaders.d.ts +0 -93
- package/dist/client/commit.d.ts +0 -41
- package/dist/client/contracts.d.ts +0 -192
- package/dist/client/core.d.ts +0 -45
- package/dist/client/development.d.ts +0 -16
- package/dist/client/document-recovery.d.ts +0 -4
- package/dist/client/endpoints.d.ts +0 -54
- package/dist/client/errors.d.ts +0 -87
- package/dist/client/freshness.d.ts +0 -51
- package/dist/client/head.d.ts +0 -14
- package/dist/client/history.d.ts +0 -25
- package/dist/client/index.d.ts +0 -80
- package/dist/client/index.js +0 -150
- package/dist/client/links.d.ts +0 -48
- package/dist/client/materialize.d.ts +0 -21
- package/dist/client/modules.d.ts +0 -2
- package/dist/client/navigation.d.ts +0 -47
- package/dist/client/payload.d.ts +0 -54
- package/dist/client/prefetch.d.ts +0 -28
- package/dist/client/prepare.d.ts +0 -47
- package/dist/client/projections.d.ts +0 -26
- package/dist/client/queries.d.ts +0 -33
- package/dist/client/react/application.d.ts +0 -87
- package/dist/client/react/hooks.d.ts +0 -36
- package/dist/client/react/index.d.ts +0 -5
- package/dist/client/react/index.js +0 -3237
- package/dist/client/react/link.d.ts +0 -27
- package/dist/client/react/view.d.ts +0 -86
- package/dist/client/request.d.ts +0 -16
- package/dist/client/route-context.d.ts +0 -31
- package/dist/client/route-matching.d.ts +0 -22
- package/dist/client/route-synchronization.d.ts +0 -30
- package/dist/client/route-url.d.ts +0 -5
- package/dist/client/runtime.d.ts +0 -82
- package/dist/client/scroll.d.ts +0 -16
- package/dist/client/services.d.ts +0 -34
- package/dist/client/state.d.ts +0 -102
- package/dist/client/static-assets.d.ts +0 -3
- package/dist/client/stylesheets.d.ts +0 -7
- package/dist/client/transport-type-entries.d.ts +0 -2
- package/dist/client/types.d.ts +0 -152
- package/dist/client/view-definition.d.ts +0 -24
- package/dist/client/work-indicator.d.ts +0 -18
- package/dist/compile-Me8EOyMK.js +0 -870
- package/dist/development-B_rxuwY7.js +0 -128
- package/dist/hash-set-BPx3iXec.js +0 -141
- package/dist/href-Cqyax8Y0.js +0 -357
- package/dist/materialize-DZ7VSLFk.js +0 -739
- package/dist/metadata-BoPKo-G2.js +0 -32
- package/dist/primitives/tasks/index.d.ts +0 -1
- package/dist/primitives/tasks/index.js +0 -1
- package/dist/route-context-CtY_9U_W.js +0 -559
- package/dist/route-matching-D_uSG2P9.js +0 -33
- package/dist/search-parse-0f7oqVsG.js +0 -375
- package/dist/server/config/index.d.ts +0 -36
- package/dist/server/config/index.js +0 -30
- package/dist/server/development/metadata.d.ts +0 -11
- package/dist/server/document.d.ts +0 -37
- package/dist/server/form-data.d.ts +0 -21
- package/dist/server/graph/compile.d.ts +0 -118
- package/dist/server/graph/declarations.d.ts +0 -117
- package/dist/server/graph/literal-error-tag.d.ts +0 -14
- package/dist/server/graph/pattern-conflicts.d.ts +0 -36
- package/dist/server/graph/search-schema.d.ts +0 -13
- package/dist/server/graph/transport-schema.d.ts +0 -11
- package/dist/server/index.d.ts +0 -310
- package/dist/server/index.js +0 -2311
- package/dist/server/public-assets.d.ts +0 -18
- package/dist/server/runtime/application.d.ts +0 -15
- package/dist/server/runtime/assets.d.ts +0 -15
- package/dist/server/runtime/context.d.ts +0 -96
- package/dist/server/runtime/domain-errors.d.ts +0 -11
- package/dist/server/runtime/effects.d.ts +0 -83
- package/dist/server/runtime/execute.d.ts +0 -13
- package/dist/server/runtime/finalize.d.ts +0 -44
- package/dist/server/runtime/handler.d.ts +0 -106
- package/dist/server/runtime/head.d.ts +0 -22
- package/dist/server/runtime/payload.d.ts +0 -50
- package/dist/server/runtime/pipeline.d.ts +0 -27
- package/dist/server/runtime/plan.d.ts +0 -98
- package/dist/server/runtime/render-document.d.ts +0 -16
- package/dist/server/runtime/startup-error.d.ts +0 -11
- package/dist/server/runtime/transport-type-entries.d.ts +0 -2
- package/dist/server/runtime/vercel-deployment.d.ts +0 -2
- package/dist/server/url-pathname.d.ts +0 -13
- package/dist/static-assets-BrH3O0M8.js +0 -199
- package/dist/universal/generated-types.d.ts +0 -9
- package/dist/universal/href.d.ts +0 -17
- package/dist/universal/http-method.d.ts +0 -4
- package/dist/universal/json-transport.d.ts +0 -14
- package/dist/universal/null-prototype-record.d.ts +0 -7
- package/dist/universal/path-wire.d.ts +0 -71
- package/dist/universal/pattern-language.d.ts +0 -4
- package/dist/universal/protocol-schemas.d.ts +0 -99
- package/dist/universal/protocol.d.ts +0 -162
- package/dist/universal/search-grammar.d.ts +0 -7
- package/dist/universal/search-parse.d.ts +0 -22
- package/dist/universal/search-serialize.d.ts +0 -16
- package/dist/universal/search-shape.d.ts +0 -32
- package/dist/universal/static-assets.d.ts +0 -2
- package/dist/universal/transport-types/big-decimal.d.ts +0 -13
- package/dist/universal/transport-types/chunk.d.ts +0 -8
- package/dist/universal/transport-types/date-time-utc.d.ts +0 -13
- package/dist/universal/transport-types/date-time-zoned.d.ts +0 -13
- package/dist/universal/transport-types/duration.d.ts +0 -13
- package/dist/universal/transport-types/hash-map.d.ts +0 -8
- package/dist/universal/transport-types/hash-set.d.ts +0 -8
- package/dist/universal/transport-types/option.d.ts +0 -10
- package/dist/universal/transport-types/redacted.d.ts +0 -9
- package/dist/universal/value-transport.d.ts +0 -117
- package/dist/value-transport-Bst4Hk-n.js +0 -864
- /package/dist/{universal → build}/content-digest.d.ts +0 -0
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Result } from "effect";
|
|
2
|
-
declare const URL_PATHNAME_BRAND: unique symbol;
|
|
3
|
-
export type UrlPathname = string & {
|
|
4
|
-
readonly [URL_PATHNAME_BRAND]: true;
|
|
5
|
-
};
|
|
6
|
-
export type UrlPathnameParseError = {
|
|
7
|
-
readonly _tag: "UrlPathnameParseError";
|
|
8
|
-
readonly value: string;
|
|
9
|
-
readonly cause?: unknown;
|
|
10
|
-
};
|
|
11
|
-
/** Parses the exact pathname representation used for request classification. */
|
|
12
|
-
export declare function parseUrlPathname(value: string): Result.Result<UrlPathname, UrlPathnameParseError>;
|
|
13
|
-
export {};
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { n as TRANSPORT_MARK_KINDS, p as makeNullPrototypeRecord } from "./value-transport-Bst4Hk-n.js";
|
|
2
|
-
import { Result } from "effect";
|
|
3
|
-
//#region src/universal/json-transport.ts
|
|
4
|
-
/** Captures data properties and checks the detached value is JSON transport data. */
|
|
5
|
-
function parseJsonTransport(input) {
|
|
6
|
-
const captured = Result.try({
|
|
7
|
-
try: () => captureJsonStructure(input),
|
|
8
|
-
catch: (cause) => {
|
|
9
|
-
return {
|
|
10
|
-
_tag: "JsonCaptureFailure",
|
|
11
|
-
cause
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
return Result.flatMap(captured, (snapshot) => snapshot);
|
|
16
|
-
}
|
|
17
|
-
function captureJsonStructure(input) {
|
|
18
|
-
const copies = /* @__PURE__ */ new Map();
|
|
19
|
-
const active = /* @__PURE__ */ new Set();
|
|
20
|
-
function copyValue(value, path) {
|
|
21
|
-
if (value === null || typeof value === "string" || typeof value === "boolean") return Result.succeed(value);
|
|
22
|
-
if (typeof value === "number") return Number.isFinite(value) ? Result.succeed(value) : failStructure({
|
|
23
|
-
path,
|
|
24
|
-
reason: "Numbers must be finite"
|
|
25
|
-
});
|
|
26
|
-
if (typeof value !== "object") return failStructure({
|
|
27
|
-
path,
|
|
28
|
-
reason: `A ${typeof value} has no JSON representation`
|
|
29
|
-
});
|
|
30
|
-
const existing = copies.get(value);
|
|
31
|
-
if (existing !== void 0) return Result.succeed(existing);
|
|
32
|
-
if (active.has(value)) return failStructure({
|
|
33
|
-
path,
|
|
34
|
-
reason: "Cyclic structures are not transport data"
|
|
35
|
-
});
|
|
36
|
-
const isArray = Array.isArray(value);
|
|
37
|
-
if (!isArray) {
|
|
38
|
-
const prototype = Object.getPrototypeOf(value);
|
|
39
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return failStructure({
|
|
40
|
-
path,
|
|
41
|
-
reason: "Expected a plain object or array"
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
active.add(value);
|
|
45
|
-
if (Object.getOwnPropertySymbols(value).length > 0) return failStructure({
|
|
46
|
-
path,
|
|
47
|
-
reason: "Symbol properties have no JSON representation"
|
|
48
|
-
});
|
|
49
|
-
const descriptors = Object.entries(Object.getOwnPropertyDescriptors(value));
|
|
50
|
-
const length = isArray ? value.length : void 0;
|
|
51
|
-
if (isArray && descriptors.length !== value.length + 1) return failStructure({
|
|
52
|
-
path,
|
|
53
|
-
reason: "Arrays must contain every index and no additional properties"
|
|
54
|
-
});
|
|
55
|
-
const target = isArray ? [] : makeNullPrototypeRecord();
|
|
56
|
-
for (const [key, descriptor] of descriptors) {
|
|
57
|
-
if (isArray && key === "length") continue;
|
|
58
|
-
const childPath = {
|
|
59
|
-
parent: path,
|
|
60
|
-
key
|
|
61
|
-
};
|
|
62
|
-
if (!descriptor.enumerable || !("value" in descriptor)) return failStructure({
|
|
63
|
-
path: childPath,
|
|
64
|
-
reason: "JSON properties must be enumerable data properties"
|
|
65
|
-
});
|
|
66
|
-
if (isArray && !(length !== void 0 && String(Number(key)) === key && Number.isInteger(Number(key)) && Number(key) >= 0 && Number(key) < length)) return failStructure({
|
|
67
|
-
path: childPath,
|
|
68
|
-
reason: "Arrays cannot carry non-index properties"
|
|
69
|
-
});
|
|
70
|
-
const child = copyValue(descriptor.value, childPath);
|
|
71
|
-
if (Result.isFailure(child)) return child;
|
|
72
|
-
if (Array.isArray(target)) target[Number(key)] = child.success;
|
|
73
|
-
else target[key] = child.success;
|
|
74
|
-
}
|
|
75
|
-
active.delete(value);
|
|
76
|
-
const copy = target;
|
|
77
|
-
copies.set(value, copy);
|
|
78
|
-
return Result.succeed(copy);
|
|
79
|
-
}
|
|
80
|
-
return copyValue(input, null);
|
|
81
|
-
}
|
|
82
|
-
function failStructure(input) {
|
|
83
|
-
const path = [];
|
|
84
|
-
for (let current = input.path; current !== null; current = current.parent) path.push(current.key);
|
|
85
|
-
return Result.fail({
|
|
86
|
-
_tag: "InvalidJsonStructure",
|
|
87
|
-
path: path.reverse(),
|
|
88
|
-
reason: input.reason
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region src/universal/protocol-schemas.ts
|
|
93
|
-
function failRead(path, expected) {
|
|
94
|
-
return Result.fail({
|
|
95
|
-
_tag: "ProtocolReadError",
|
|
96
|
-
path,
|
|
97
|
-
expected
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function readRecord(value, path) {
|
|
101
|
-
return typeof value === "object" && value !== null && !Array.isArray(value) ? Result.succeed(value) : failRead(path, "an object");
|
|
102
|
-
}
|
|
103
|
-
/** Reads an arbitrary browser value as JSON without loading Effect Schema. */
|
|
104
|
-
function readJsonValue(value) {
|
|
105
|
-
return Result.mapError(parseJsonTransport(value), () => {
|
|
106
|
-
return {
|
|
107
|
-
_tag: "ProtocolReadError",
|
|
108
|
-
path: "$",
|
|
109
|
-
expected: "JSON transport data"
|
|
110
|
-
};
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
function readRedirectStatus(value) {
|
|
114
|
-
return value === 302 || value === 303 || value === 307 || value === 308 ? Result.succeed(value) : failRead("$", "one of 302, 303, 307, or 308");
|
|
115
|
-
}
|
|
116
|
-
function readHandlerErrorWire(value, path = "$") {
|
|
117
|
-
const record = readRecord(value, path);
|
|
118
|
-
if (Result.isFailure(record)) return Result.fail(record.failure);
|
|
119
|
-
const status = record.success["status"];
|
|
120
|
-
if (typeof status !== "number" || !Number.isInteger(status)) return failRead(`${path}.status`, "an integer");
|
|
121
|
-
const clientMessage = record.success["client_message"];
|
|
122
|
-
if (typeof clientMessage !== "string") return failRead(`${path}.client_message`, "a string");
|
|
123
|
-
return Result.succeed({
|
|
124
|
-
status,
|
|
125
|
-
client_message: clientMessage
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
/** Reads a transported value's open-ingress wire shape without restoring it. */
|
|
129
|
-
function readTransportedValue(value) {
|
|
130
|
-
const record = readRecord(value, "$");
|
|
131
|
-
if (Result.isFailure(record)) return Result.fail(record.failure);
|
|
132
|
-
const json = Result.mapError(readJsonValue(record.success["json"]), (error) => {
|
|
133
|
-
return {
|
|
134
|
-
...error,
|
|
135
|
-
path: "$.json"
|
|
136
|
-
};
|
|
137
|
-
});
|
|
138
|
-
if (Result.isFailure(json)) return Result.fail(json.failure);
|
|
139
|
-
const rawMarks = record.success["marks"];
|
|
140
|
-
if (!Array.isArray(rawMarks)) return failRead("$.marks", "an array");
|
|
141
|
-
const marks = [];
|
|
142
|
-
for (const [index, rawMark] of rawMarks.entries()) {
|
|
143
|
-
const markPath = `$.marks[${index}]`;
|
|
144
|
-
const mark = readRecord(rawMark, markPath);
|
|
145
|
-
if (Result.isFailure(mark)) return Result.fail(mark.failure);
|
|
146
|
-
const rawPath = mark.success["path"];
|
|
147
|
-
if (!Array.isArray(rawPath)) return failRead(`${markPath}.path`, "an array");
|
|
148
|
-
const path = [];
|
|
149
|
-
for (const [pathIndex, part] of rawPath.entries()) {
|
|
150
|
-
if (typeof part !== "string" && (typeof part !== "number" || !Number.isFinite(part))) return failRead(`${markPath}.path[${pathIndex}]`, "a string or finite number");
|
|
151
|
-
path.push(part);
|
|
152
|
-
}
|
|
153
|
-
const kind = mark.success["kind"];
|
|
154
|
-
if (typeof kind !== "string" || !TRANSPORT_MARK_KINDS.has(kind)) return failRead(`${markPath}.kind`, "a transport mark kind");
|
|
155
|
-
marks.push({
|
|
156
|
-
path,
|
|
157
|
-
kind
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
return Result.succeed({
|
|
161
|
-
json: json.success,
|
|
162
|
-
marks
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
/** Reads an endpoint's public error envelope without loading Effect Schema. */
|
|
166
|
-
function readEndpointErrorEnvelope(value) {
|
|
167
|
-
const record = readRecord(value, "$");
|
|
168
|
-
if (Result.isFailure(record)) return Result.fail(record.failure);
|
|
169
|
-
const error = readHandlerErrorWire(record.success["error"], "$.error");
|
|
170
|
-
if (Result.isFailure(error)) return Result.fail(error.failure);
|
|
171
|
-
if (!("domain" in record.success)) return Result.succeed({ error: error.success });
|
|
172
|
-
const domain = readRecord(record.success["domain"], "$.domain");
|
|
173
|
-
if (Result.isFailure(domain)) return Result.fail(domain.failure);
|
|
174
|
-
const tag = domain.success["tag"];
|
|
175
|
-
if (typeof tag !== "string") return failRead("$.domain.tag", "a string");
|
|
176
|
-
const data = readTransportedValue(domain.success["data"]);
|
|
177
|
-
if (Result.isFailure(data)) return Result.fail({
|
|
178
|
-
...data.failure,
|
|
179
|
-
path: `$.domain.data${data.failure.path.slice(1)}`
|
|
180
|
-
});
|
|
181
|
-
return Result.succeed({
|
|
182
|
-
error: error.success,
|
|
183
|
-
domain: {
|
|
184
|
-
tag,
|
|
185
|
-
data: data.success
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
//#endregion
|
|
190
|
-
//#region src/universal/static-assets.ts
|
|
191
|
-
/** Native request destinations for the resource formats that browsers render directly. */
|
|
192
|
-
function getStaticAssetDestination(url) {
|
|
193
|
-
const path = url.split(/[?#]/, 1)[0] ?? url;
|
|
194
|
-
if (/\.(avif|bmp|gif|ico|jpe?g|png|svg|webp)$/i.test(path)) return "image";
|
|
195
|
-
if (/\.(woff2?|ttf|otf|ttc)$/i.test(path)) return "font";
|
|
196
|
-
return "fetch";
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
export { readTransportedValue as i, readEndpointErrorEnvelope as n, readRedirectStatus as r, getStaticAssetDestination as t };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** Application-specific typing is unavailable until the configured projects include generated declarations. */
|
|
2
|
-
export type MissingGeneratedApplicationTypes = {
|
|
3
|
-
readonly "Generate Vorma application types and include the entry's _vorma directory in its TypeScript project": never;
|
|
4
|
-
};
|
|
5
|
-
declare const MISSING_GENERATED_KEY: unique symbol;
|
|
6
|
-
export type MissingGeneratedApplicationKey = string & {
|
|
7
|
-
readonly [MISSING_GENERATED_KEY]: MissingGeneratedApplicationTypes;
|
|
8
|
-
};
|
|
9
|
-
export {};
|
package/dist/universal/href.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Result } from "effect";
|
|
2
|
-
import type { TransportTypeEntry } from "./value-transport.ts";
|
|
3
|
-
export type HrefError = {
|
|
4
|
-
readonly _tag: "HrefError";
|
|
5
|
-
readonly reason: string;
|
|
6
|
-
};
|
|
7
|
-
export declare function buildHref(input: {
|
|
8
|
-
/** A UI pattern collapses its index segment; an endpoint pattern keeps a trailing slash. */
|
|
9
|
-
readonly kind: "ui" | "endpoint";
|
|
10
|
-
readonly pattern: string;
|
|
11
|
-
readonly params?: Readonly<Record<string, string>>;
|
|
12
|
-
readonly splatValues?: ReadonlyArray<string>;
|
|
13
|
-
/** Already-serialized search text, or a decoded search value the compact grammar serializes. */
|
|
14
|
-
readonly search?: unknown;
|
|
15
|
-
readonly hash?: string;
|
|
16
|
-
readonly transportTypeEntries: ReadonlyArray<TransportTypeEntry>;
|
|
17
|
-
}): Result.Result<string, HrefError>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as NativeHttpMethod from "effect/unstable/http/HttpMethod";
|
|
2
|
-
/** Methods supported by Vorma's browser-facing endpoint protocol. */
|
|
3
|
-
export type HttpMethod = Exclude<NativeHttpMethod.HttpMethod, "HEAD" | "TRACE">;
|
|
4
|
-
export declare function matchesHttpMethod(method: unknown): method is HttpMethod;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Result } from "effect";
|
|
2
|
-
export type JsonTransportValue = null | boolean | number | string | ReadonlyArray<JsonTransportValue> | {
|
|
3
|
-
readonly [key: string]: JsonTransportValue;
|
|
4
|
-
};
|
|
5
|
-
export type JsonTransportError = {
|
|
6
|
-
readonly _tag: "InvalidJsonStructure";
|
|
7
|
-
readonly path: ReadonlyArray<string | number>;
|
|
8
|
-
readonly reason: string;
|
|
9
|
-
} | {
|
|
10
|
-
readonly _tag: "JsonCaptureFailure";
|
|
11
|
-
readonly cause: unknown;
|
|
12
|
-
};
|
|
13
|
-
/** Captures data properties and checks the detached value is JSON transport data. */
|
|
14
|
-
export declare function parseJsonTransport(input: unknown): Result.Result<JsonTransportValue, JsonTransportError>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A record with no prototype: a key spelled `__proto__` or `constructor` is
|
|
3
|
-
* an own property and nothing else, so a name from the wire can index it
|
|
4
|
-
* without reaching inherited members. `Object.create` is typed as `any`;
|
|
5
|
-
* this function is the one place that typing meets the record's type.
|
|
6
|
-
*/
|
|
7
|
-
export declare function makeNullPrototypeRecord<Value>(): Record<string, Value>;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { type CompiledFlatPattern, type CompiledNestedPattern, type DynamicParams, type PatternCompileError } from "@vorma/primitives/matcher";
|
|
2
|
-
import { Result } from "effect";
|
|
3
|
-
declare const MATCHER_PATH_BRAND: unique symbol;
|
|
4
|
-
declare const MATCHER_PATTERN_BRAND: unique symbol;
|
|
5
|
-
declare const MATCHER_CAPTURE_BRAND: unique symbol;
|
|
6
|
-
/** A request pathname in the one canonical spelling consumed by matchers. */
|
|
7
|
-
export type MatcherPath = string & {
|
|
8
|
-
readonly [MATCHER_PATH_BRAND]: true;
|
|
9
|
-
};
|
|
10
|
-
/** An authored route pattern encoded into the matcher's canonical wire space. */
|
|
11
|
-
export type MatcherPattern = string & {
|
|
12
|
-
readonly [MATCHER_PATTERN_BRAND]: true;
|
|
13
|
-
};
|
|
14
|
-
/** One logical capture encoded as a canonical, separator-free path segment. */
|
|
15
|
-
export type MatcherCapture = string & {
|
|
16
|
-
readonly [MATCHER_CAPTURE_BRAND]: true;
|
|
17
|
-
};
|
|
18
|
-
export type PathWireError = {
|
|
19
|
-
readonly _tag: "PathMustBeAbsolute";
|
|
20
|
-
readonly path: string;
|
|
21
|
-
} | {
|
|
22
|
-
readonly _tag: "MalformedPercentEncoding";
|
|
23
|
-
readonly segment: string;
|
|
24
|
-
readonly offset: number;
|
|
25
|
-
} | {
|
|
26
|
-
readonly _tag: "InvalidPercentEncodedUtf8";
|
|
27
|
-
readonly segment: string;
|
|
28
|
-
} | {
|
|
29
|
-
readonly _tag: "MalformedUnicode";
|
|
30
|
-
readonly value: string;
|
|
31
|
-
readonly offset: number;
|
|
32
|
-
} | {
|
|
33
|
-
readonly _tag: "EmptyPathCapture";
|
|
34
|
-
} | {
|
|
35
|
-
readonly _tag: "DotPathCapture";
|
|
36
|
-
readonly value: "." | "..";
|
|
37
|
-
} | {
|
|
38
|
-
readonly _tag: "PathCaptureContainsSeparator";
|
|
39
|
-
readonly segment: string;
|
|
40
|
-
} | {
|
|
41
|
-
readonly _tag: "StaticDotPathSegment";
|
|
42
|
-
readonly pattern: string;
|
|
43
|
-
readonly segment: "." | "..";
|
|
44
|
-
};
|
|
45
|
-
/** Converts an absolute request pathname to the canonical spelling used for matching. */
|
|
46
|
-
export declare function canonicalizeRequestPathForMatcher(path: string): Result.Result<MatcherPath, PathWireError>;
|
|
47
|
-
/** Encodes a logical authored route pattern without interpreting static percent escapes. */
|
|
48
|
-
export declare function encodeRoutePatternForMatcher(pattern: string): Result.Result<MatcherPattern, PathWireError>;
|
|
49
|
-
/**
|
|
50
|
-
* Compiles an authored UI route pattern: wire encoding first, then the
|
|
51
|
-
* nested pattern language. Every UI pattern enters the matcher through this
|
|
52
|
-
* function, in the graph, the build, and the plan.
|
|
53
|
-
*/
|
|
54
|
-
export declare function compileUiPattern(pattern: string): Result.Result<CompiledNestedPattern, PathWireError | PatternCompileError>;
|
|
55
|
-
/** Compiles an authored endpoint or middleware pattern in the flat pattern language. */
|
|
56
|
-
export declare function compileEndpointPattern(pattern: string): Result.Result<CompiledFlatPattern, PathWireError | PatternCompileError>;
|
|
57
|
-
export type DecodedCaptures = {
|
|
58
|
-
readonly params: Readonly<Record<string, string>>;
|
|
59
|
-
readonly splatValues: ReadonlyArray<string>;
|
|
60
|
-
};
|
|
61
|
-
/** Decodes a match's wire captures to the logical values supplied to application code. */
|
|
62
|
-
export declare function decodeMatchCaptures(match: {
|
|
63
|
-
readonly dynamicParams: DynamicParams;
|
|
64
|
-
readonly splatValues: ReadonlyArray<string>;
|
|
65
|
-
}): Result.Result<DecodedCaptures, PathWireError>;
|
|
66
|
-
/** Encodes one non-empty logical dynamic or splat value as one wire segment. */
|
|
67
|
-
export declare function encodePathCapture(value: string): Result.Result<MatcherCapture, PathWireError>;
|
|
68
|
-
/** Decodes one matched wire segment to the logical value supplied to application code. */
|
|
69
|
-
export declare function decodePathCapture(segment: string): Result.Result<string, PathWireError>;
|
|
70
|
-
export declare function formatPathWireError(error: PathWireError): string;
|
|
71
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type * as Matcher from "@vorma/primitives/matcher";
|
|
2
|
-
/** The pattern language: dynamic segments start with a colon, a lone star is a splat, `_index` names a layout's index. */
|
|
3
|
-
export declare const FLAT_PATTERN_LANGUAGE: Matcher.FlatPatternLanguage;
|
|
4
|
-
export declare const NESTED_PATTERN_LANGUAGE: Matcher.NestedPatternLanguage;
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import type { CompiledNestedPattern } from "@vorma/primitives/matcher";
|
|
2
|
-
import { Result } from "effect";
|
|
3
|
-
import type { SearchShape } from "./search-shape.ts";
|
|
4
|
-
import type { JsonValue, TransportedValue } from "./value-transport.ts";
|
|
5
|
-
export type ProtocolReadError = {
|
|
6
|
-
readonly _tag: "ProtocolReadError";
|
|
7
|
-
readonly path: string;
|
|
8
|
-
readonly expected: string;
|
|
9
|
-
};
|
|
10
|
-
export type RedirectStatus = 302 | 303 | 307 | 308;
|
|
11
|
-
export type HandlerErrorWire = {
|
|
12
|
-
readonly status: number;
|
|
13
|
-
readonly client_message: string;
|
|
14
|
-
};
|
|
15
|
-
export type ServerRouteErrorWire = HandlerErrorWire & {
|
|
16
|
-
readonly index: number;
|
|
17
|
-
};
|
|
18
|
-
/** A declared domain failure on the wire: its literal tag plus its decoded fields, transported by value. */
|
|
19
|
-
export type EndpointDomainErrorWire = {
|
|
20
|
-
readonly tag: string;
|
|
21
|
-
readonly data: TransportedValue;
|
|
22
|
-
};
|
|
23
|
-
export type EndpointErrorEnvelope = {
|
|
24
|
-
readonly error: HandlerErrorWire;
|
|
25
|
-
readonly domain?: EndpointDomainErrorWire;
|
|
26
|
-
};
|
|
27
|
-
/** The successful route's URL parsing description; it contains no schema checks or annotations. */
|
|
28
|
-
export type SearchContractDocument = SearchShape;
|
|
29
|
-
/** One browser-facing head element. Property keys are their wire spellings. */
|
|
30
|
-
export type HeadElementWire = {
|
|
31
|
-
readonly tag: string;
|
|
32
|
-
readonly attrs?: Readonly<Record<string, string | true>>;
|
|
33
|
-
readonly html?: string;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* One matched route on the wire. Records are ordered outermost to innermost
|
|
37
|
-
* and array position is the route index. `compiled_pattern` and
|
|
38
|
-
* `search_contract` are the registration facts the browser learns so that a
|
|
39
|
-
* later navigation can start the route's client loader before the server
|
|
40
|
-
* answers. `search_input` is the search the server parsed and validated for
|
|
41
|
-
* the route's loader; it is absent for a route without a search contract.
|
|
42
|
-
* Only successful positions have route
|
|
43
|
-
* records. A failed position and its descendants disclose no route metadata or
|
|
44
|
-
* module references. The separate server error identifies the first excluded
|
|
45
|
-
* position. A server-only position has a null import URL, and a position without
|
|
46
|
-
* a loader has null loader data.
|
|
47
|
-
*/
|
|
48
|
-
export type RouteRecordWire = {
|
|
49
|
-
readonly pattern: string;
|
|
50
|
-
readonly params?: Readonly<Record<string, string>>;
|
|
51
|
-
readonly splat_values?: ReadonlyArray<string>;
|
|
52
|
-
readonly compiled_pattern: {
|
|
53
|
-
/** Present when matcher encoding changed the authored spelling. */
|
|
54
|
-
readonly pattern?: string;
|
|
55
|
-
readonly segments: CompiledNestedPattern["segments"];
|
|
56
|
-
};
|
|
57
|
-
readonly search_contract?: SearchContractDocument;
|
|
58
|
-
readonly search_input?: TransportedValue;
|
|
59
|
-
readonly loader_data?: TransportedValue | null;
|
|
60
|
-
} & ({
|
|
61
|
-
readonly import_url?: null;
|
|
62
|
-
readonly export_names?: never;
|
|
63
|
-
} | {
|
|
64
|
-
readonly import_url: string;
|
|
65
|
-
readonly export_names: ReadonlyArray<string>;
|
|
66
|
-
});
|
|
67
|
-
/** The route result shared by initial-document and navigation payloads. */
|
|
68
|
-
export type RoutePayloadWire = {
|
|
69
|
-
readonly routes: ReadonlyArray<RouteRecordWire>;
|
|
70
|
-
readonly server_error?: ServerRouteErrorWire;
|
|
71
|
-
};
|
|
72
|
-
/** The three mutable head regions. An absent region has an empty desired state. */
|
|
73
|
-
export type HeadSectionsWire = {
|
|
74
|
-
readonly title?: HeadElementWire;
|
|
75
|
-
readonly meta?: ReadonlyArray<HeadElementWire>;
|
|
76
|
-
readonly rest?: ReadonlyArray<HeadElementWire>;
|
|
77
|
-
};
|
|
78
|
-
/** A browser navigation payload. Property keys are their wire spellings. */
|
|
79
|
-
export type NavigationPayload = RoutePayloadWire & {
|
|
80
|
-
readonly head: HeadSectionsWire;
|
|
81
|
-
readonly deps?: ReadonlyArray<string>;
|
|
82
|
-
readonly css_bundles?: ReadonlyArray<string>;
|
|
83
|
-
readonly static_assets?: ReadonlyArray<string>;
|
|
84
|
-
};
|
|
85
|
-
/** The initial document payload. The document itself carries its head and assets. */
|
|
86
|
-
export type SsrPayload = RoutePayloadWire & {
|
|
87
|
-
readonly client_build_id: string;
|
|
88
|
-
/** Present only in development; absence means production. */
|
|
89
|
-
readonly is_dev?: true;
|
|
90
|
-
readonly deployment_id?: string;
|
|
91
|
-
};
|
|
92
|
-
/** Reads an arbitrary browser value as JSON without loading Effect Schema. */
|
|
93
|
-
export declare function readJsonValue(value: unknown): Result.Result<JsonValue, ProtocolReadError>;
|
|
94
|
-
export declare function readRedirectStatus(value: unknown): Result.Result<RedirectStatus, ProtocolReadError>;
|
|
95
|
-
export declare function readHandlerErrorWire(value: unknown, path?: string): Result.Result<HandlerErrorWire, ProtocolReadError>;
|
|
96
|
-
/** Reads a transported value's open-ingress wire shape without restoring it. */
|
|
97
|
-
export declare function readTransportedValue(value: unknown): Result.Result<TransportedValue, ProtocolReadError>;
|
|
98
|
-
/** Reads an endpoint's public error envelope without loading Effect Schema. */
|
|
99
|
-
export declare function readEndpointErrorEnvelope(value: unknown): Result.Result<EndpointErrorEnvelope, ProtocolReadError>;
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/** Process-environment names consumed as part of a deployment integration. */
|
|
2
|
-
export declare const PROCESS_ENVIRONMENT_PROTOCOL: {
|
|
3
|
-
readonly vercelSkewProtectionEnabledVariable: "VERCEL_SKEW_PROTECTION_ENABLED";
|
|
4
|
-
readonly vercelDeploymentIdVariable: "VERCEL_DEPLOYMENT_ID";
|
|
5
|
-
};
|
|
6
|
-
/** Private development coordination between the launcher and mounted runtime. */
|
|
7
|
-
export declare const DEVELOPMENT_PROTOCOL: {
|
|
8
|
-
readonly serverPortEnvironmentVariable: "PORT";
|
|
9
|
-
readonly readinessPath: "/.vorma/healthz";
|
|
10
|
-
};
|
|
11
|
-
/** Request and response vocabulary shared by the browser and runtime server. */
|
|
12
|
-
export declare const HTTP_PROTOCOL: {
|
|
13
|
-
readonly queryKeys: {
|
|
14
|
-
readonly viewPayload: "vorma-json";
|
|
15
|
-
readonly deployment: "dpl";
|
|
16
|
-
readonly streamResume: "vorma_resume";
|
|
17
|
-
};
|
|
18
|
-
readonly requestHeaders: {
|
|
19
|
-
readonly clientBuildId: "x-vorma-client-build-id";
|
|
20
|
-
readonly clientAcceptsRedirect: "x-accepts-client-redirect";
|
|
21
|
-
readonly vercelDeploymentId: "x-deployment-id";
|
|
22
|
-
};
|
|
23
|
-
readonly responseHeaders: {
|
|
24
|
-
readonly clientBuildId: "x-vorma-client-build-id";
|
|
25
|
-
readonly buildSkew: "x-vorma-build-skew";
|
|
26
|
-
readonly clientRedirect: "x-client-redirect";
|
|
27
|
-
readonly clientRedirectStatus: "x-client-redirect-status";
|
|
28
|
-
};
|
|
29
|
-
readonly buildSkewBody: '{"ok":true}';
|
|
30
|
-
};
|
|
31
|
-
/** Reserved markup names shared by server rendering and browser reconciliation. */
|
|
32
|
-
export declare const DOCUMENT_PROTOCOL: {
|
|
33
|
-
readonly elementIds: {
|
|
34
|
-
readonly root: "vorma-root";
|
|
35
|
-
readonly data: "vorma-data-json";
|
|
36
|
-
readonly criticalCss: "vorma-critical-css";
|
|
37
|
-
};
|
|
38
|
-
readonly attributes: {
|
|
39
|
-
readonly cssBundle: "data-vorma-css-bundle";
|
|
40
|
-
readonly cssPreload: "data-vorma-css-preload";
|
|
41
|
-
readonly staticAsset: "data-vorma-static-asset";
|
|
42
|
-
readonly linkActiveExact: "data-vorma-active-exact";
|
|
43
|
-
readonly linkActiveAncestor: "data-vorma-active-ancestor";
|
|
44
|
-
readonly linkPendingExact: "data-vorma-pending-exact";
|
|
45
|
-
readonly linkPendingAncestor: "data-vorma-pending-ancestor";
|
|
46
|
-
};
|
|
47
|
-
readonly headComments: {
|
|
48
|
-
readonly title: "vorma-head:title";
|
|
49
|
-
readonly meta: "vorma-head:meta";
|
|
50
|
-
readonly rest: "vorma-head:rest";
|
|
51
|
-
readonly assets: "vorma-head:assets";
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
/** Persistent names owned by the browser client. */
|
|
55
|
-
export declare const BROWSER_STATE_PROTOCOL: {
|
|
56
|
-
readonly historyStateFields: {
|
|
57
|
-
readonly userState: "vorma-user-state";
|
|
58
|
-
readonly entryKey: "vorma-entry-key";
|
|
59
|
-
};
|
|
60
|
-
/** Session storage key holding saved scroll positions by history entry key. */
|
|
61
|
-
readonly scrollStorageKey: "vorma-scroll";
|
|
62
|
-
readonly apiIdentityArrayPrefix: "vorma-api";
|
|
63
|
-
};
|
|
64
|
-
/** URL-search escaping and marker vocabulary shared by both runtimes. */
|
|
65
|
-
export declare const SEARCH_PARAMETER_PROTOCOL: {
|
|
66
|
-
readonly escapePrefix: "~";
|
|
67
|
-
readonly keySeparator: ".";
|
|
68
|
-
readonly keySegmentEscapes: {
|
|
69
|
-
readonly tilde: "~0";
|
|
70
|
-
readonly separator: "~1";
|
|
71
|
-
readonly empty: "~2";
|
|
72
|
-
};
|
|
73
|
-
readonly valueMarkers: {
|
|
74
|
-
readonly null: "~n";
|
|
75
|
-
readonly emptyArray: "~a";
|
|
76
|
-
readonly emptyObject: "~o";
|
|
77
|
-
readonly escapedScalarPrefix: "~s";
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
/** Vorma-owned output layout and stable generated names. */
|
|
81
|
-
export declare const ARTIFACT_PROTOCOL: {
|
|
82
|
-
/**
|
|
83
|
-
* The directory Vorma owns beside each configured entry. The name is fixed; applications do not configure it.
|
|
84
|
-
*/
|
|
85
|
-
readonly vormaDirectoryName: "_vorma";
|
|
86
|
-
/** Inside the client entry’s `_vorma`: published public assets. */
|
|
87
|
-
readonly publicDirectoryName: "public";
|
|
88
|
-
/** Inside each entry’s `_vorma`: the ignore file covering its output. */
|
|
89
|
-
readonly ignoreFileName: ".gitignore";
|
|
90
|
-
readonly ignoreFileSource: "*\n";
|
|
91
|
-
/** Inside the server entry's `_vorma`: the registered declarations. */
|
|
92
|
-
readonly generatedBuildFileName: "build.gen.ts";
|
|
93
|
-
readonly compiledServerEntryFileName: "entry.mjs";
|
|
94
|
-
readonly compiledRuntimeFileName: "runtime.gen.mjs";
|
|
95
|
-
readonly productionMetadataFileName: "metadata.gen.json";
|
|
96
|
-
readonly compiledServerModuleExtension: ".mjs";
|
|
97
|
-
/** Inside the client entry's `_vorma`. */
|
|
98
|
-
readonly generatedAssetKeysFileName: "assets.gen.d.ts";
|
|
99
|
-
/** Inside the client entry's `_vorma`: runtime adapters for contract Effect types. */
|
|
100
|
-
readonly generatedClientTransportFileName: "transport.gen.ts";
|
|
101
|
-
/** In both boundaries: the declaration augmenting that boundary's Vorma entry. */
|
|
102
|
-
readonly generatedClientContractsFileName: "client.gen.d.ts";
|
|
103
|
-
readonly generatedServerContractsFileName: "server.gen.d.ts";
|
|
104
|
-
readonly publicOutputFileNamePrefix: "vorma_out_";
|
|
105
|
-
readonly publicModuleFileNamePattern: "vorma_out_[name]-[hash].js";
|
|
106
|
-
readonly publicAssetFileNamePattern: "vorma_out_[name]-[hash][extname]";
|
|
107
|
-
};
|
|
108
|
-
/** Identifiers shared across package entries, discovery, and generated code. */
|
|
109
|
-
export declare const FRAMEWORK_IDENTITY_PROTOCOL: {
|
|
110
|
-
readonly brands: {};
|
|
111
|
-
readonly moduleSpecifiers: {
|
|
112
|
-
readonly build: "vorma/build";
|
|
113
|
-
readonly server: "vorma/server";
|
|
114
|
-
readonly client: "vorma/client";
|
|
115
|
-
readonly clientReact: "vorma/client/react";
|
|
116
|
-
readonly clientTransportTypes: "virtual:vorma/client-transport-types";
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Tags the framework itself reports in command error channels. A declared
|
|
121
|
-
* domain tag must not collide with one: `Effect.catchTag` could not tell
|
|
122
|
-
* them apart. Declaration compilation rejects collisions.
|
|
123
|
-
*/
|
|
124
|
-
export declare const FRAMEWORK_ERROR_TAGS: ReadonlyArray<string>;
|
|
125
|
-
/** One browser module's build-to-runtime projection. */
|
|
126
|
-
export type ClientModule = {
|
|
127
|
-
readonly importUrl: string;
|
|
128
|
-
readonly depUrls: ReadonlyArray<string>;
|
|
129
|
-
readonly cssBundleUrls: ReadonlyArray<string>;
|
|
130
|
-
readonly staticAssetUrls: ReadonlyArray<string>;
|
|
131
|
-
};
|
|
132
|
-
/** A client view: its module and the export that holds the view definition. */
|
|
133
|
-
export type ClientViewModule = ClientModule & {
|
|
134
|
-
readonly exportNames: ReadonlyArray<string>;
|
|
135
|
-
};
|
|
136
|
-
/** Whether the compiled server runs as a production deployment or under the development program. */
|
|
137
|
-
export type RuntimeMode = "production" | "development";
|
|
138
|
-
/** Everything one build determines about its own production artifact. */
|
|
139
|
-
export type ProductionBuildMetadata = {
|
|
140
|
-
readonly clientBuildId: string;
|
|
141
|
-
readonly runtimeMode: RuntimeMode;
|
|
142
|
-
/** Published URLs retain their captured file locations and cache policy. This inventory stays on the server. */
|
|
143
|
-
readonly publicFiles: ReadonlyArray<{
|
|
144
|
-
readonly url: string;
|
|
145
|
-
readonly fileName: string;
|
|
146
|
-
readonly immutable: boolean;
|
|
147
|
-
}>;
|
|
148
|
-
/** Unhashed source key to published public URL path. */
|
|
149
|
-
readonly publicFilemap: Readonly<Record<string, string>>;
|
|
150
|
-
readonly criticalCss: string;
|
|
151
|
-
/** Native development HTML hooks; absent from production metadata. */
|
|
152
|
-
readonly developmentHeadHtml?: string;
|
|
153
|
-
readonly clientEntry: ClientModule;
|
|
154
|
-
readonly clientViews: Readonly<Record<string, ClientViewModule>>;
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* Private build metadata plus the public directory URL resolved by the compiled
|
|
158
|
-
* registration module from its own deployment location.
|
|
159
|
-
*/
|
|
160
|
-
export type ProductionMetadata = ProductionBuildMetadata & {
|
|
161
|
-
readonly publicAssetDirectoryUrl: string;
|
|
162
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const ESCAPE_PREFIX: "~", KEY_SEPARATOR: ".", EMPTY_KEY_SEGMENT: "~2", ESCAPED_KEY_SEPARATOR: "~1", ESCAPED_TILDE: "~0", EMPTY_ARRAY_MARKER: "~a", EMPTY_OBJECT_MARKER: "~o", ESCAPED_SCALAR_PREFIX: "~s", NULL_MARKER: "~n";
|
|
2
|
-
export declare function encodeKeySegment(value: string): string;
|
|
3
|
-
export declare function encodeScalar(value: string): string;
|
|
4
|
-
export declare function appendKey(input: {
|
|
5
|
-
readonly parent: string;
|
|
6
|
-
readonly child: string;
|
|
7
|
-
}): string;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Result } from "effect";
|
|
2
|
-
import type { SearchContractDocument } from "./protocol-schemas.ts";
|
|
3
|
-
import { type TransportTypeEntry } from "./value-transport.ts";
|
|
4
|
-
/** Parses URL fields without importing Effect Schema or its persistence format. */
|
|
5
|
-
export type SearchParamsError = {
|
|
6
|
-
readonly _tag: "MissingSearchParam";
|
|
7
|
-
readonly path: string;
|
|
8
|
-
} | {
|
|
9
|
-
readonly _tag: "InvalidSearchParam";
|
|
10
|
-
readonly path: string;
|
|
11
|
-
readonly expected: string;
|
|
12
|
-
} | {
|
|
13
|
-
readonly _tag: "MalformedSearchSchema";
|
|
14
|
-
readonly path: string;
|
|
15
|
-
};
|
|
16
|
-
type Parsed = Result.Result<unknown, SearchParamsError>;
|
|
17
|
-
export declare function parseSearchParams(input: {
|
|
18
|
-
readonly document: SearchContractDocument;
|
|
19
|
-
readonly params: URLSearchParams;
|
|
20
|
-
readonly typeEntries: ReadonlyArray<TransportTypeEntry>;
|
|
21
|
-
}): Parsed;
|
|
22
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Result } from "effect";
|
|
2
|
-
import { type TransportTypeEntry } from "./value-transport.ts";
|
|
3
|
-
/** The own enumerable entries of an object, typed as unknown values. */
|
|
4
|
-
export declare function getOwnEntries(value: object): ReadonlyArray<readonly [string, unknown]>;
|
|
5
|
-
/** Selects one authored search contract's fields from a composed route value. */
|
|
6
|
-
export declare function projectSearchFields(value: unknown, fields: Iterable<string>): unknown;
|
|
7
|
-
export type SearchParamsSerializeError = {
|
|
8
|
-
readonly _tag: "UnsupportedSearchParam";
|
|
9
|
-
readonly path: string;
|
|
10
|
-
readonly reason: string;
|
|
11
|
-
};
|
|
12
|
-
/** Serializes a decoded search value into the compact search-parameter grammar. */
|
|
13
|
-
export declare function serializeSearchParams(input: {
|
|
14
|
-
readonly value: unknown;
|
|
15
|
-
readonly typeEntries: ReadonlyArray<TransportTypeEntry>;
|
|
16
|
-
}): Result.Result<string, SearchParamsSerializeError>;
|