typesea 0.2.0 → 0.3.1
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/CHANGELOG.md +40 -0
- package/README.md +104 -41
- package/SECURITY.md +52 -0
- package/dist/aot/index.d.ts +1 -1
- package/dist/aot/index.d.ts.map +1 -1
- package/dist/aot/index.js +22 -3
- package/dist/builders/composite.d.ts +6 -3
- package/dist/builders/composite.d.ts.map +1 -1
- package/dist/builders/composite.js +22 -13
- package/dist/builders/index.d.ts +6 -5
- package/dist/builders/index.d.ts.map +1 -1
- package/dist/builders/index.js +5 -4
- package/dist/builders/modifier.d.ts +6 -0
- package/dist/builders/modifier.d.ts.map +1 -1
- package/dist/builders/modifier.js +14 -0
- package/dist/builders/object/guard.d.ts +54 -2
- package/dist/builders/object/guard.d.ts.map +1 -1
- package/dist/builders/object/guard.js +117 -7
- package/dist/builders/object/index.d.ts +2 -2
- package/dist/builders/object/index.d.ts.map +1 -1
- package/dist/builders/object/index.js +1 -1
- package/dist/builders/object/schema.d.ts +33 -2
- package/dist/builders/object/schema.d.ts.map +1 -1
- package/dist/builders/object/schema.js +198 -8
- package/dist/builders/object/types.d.ts +15 -0
- package/dist/builders/object/types.d.ts.map +1 -1
- package/dist/builders/runtime.d.ts +40 -0
- package/dist/builders/runtime.d.ts.map +1 -0
- package/dist/builders/runtime.js +150 -0
- package/dist/builders/scalar.d.ts +20 -1
- package/dist/builders/scalar.d.ts.map +1 -1
- package/dist/builders/scalar.js +54 -1
- package/dist/builders/table.d.ts +31 -5
- package/dist/builders/table.d.ts.map +1 -1
- package/dist/builders/table.js +31 -5
- package/dist/builders/types.d.ts +6 -0
- package/dist/builders/types.d.ts.map +1 -1
- package/dist/compile/check-composite.d.ts +3 -1
- package/dist/compile/check-composite.d.ts.map +1 -1
- package/dist/compile/check-composite.js +143 -11
- package/dist/compile/check-scalar.d.ts +10 -0
- package/dist/compile/check-scalar.d.ts.map +1 -1
- package/dist/compile/check-scalar.js +138 -2
- package/dist/compile/check.d.ts.map +1 -1
- package/dist/compile/check.js +25 -3
- package/dist/compile/context.d.ts.map +1 -1
- package/dist/compile/context.js +2 -0
- package/dist/compile/first.d.ts +26 -0
- package/dist/compile/first.d.ts.map +1 -0
- package/dist/compile/first.js +850 -0
- package/dist/compile/graph-predicate.d.ts.map +1 -1
- package/dist/compile/graph-predicate.js +389 -18
- package/dist/compile/guard.d.ts +2 -1
- package/dist/compile/guard.d.ts.map +1 -1
- package/dist/compile/guard.js +54 -8
- package/dist/compile/predicate.d.ts.map +1 -1
- package/dist/compile/predicate.js +156 -5
- package/dist/compile/runtime.d.ts +20 -1
- package/dist/compile/runtime.d.ts.map +1 -1
- package/dist/compile/runtime.js +31 -0
- package/dist/compile/source.d.ts.map +1 -1
- package/dist/compile/source.js +27 -3
- package/dist/compile/types.d.ts +2 -0
- package/dist/compile/types.d.ts.map +1 -1
- package/dist/decoder/index.d.ts +60 -0
- package/dist/decoder/index.d.ts.map +1 -1
- package/dist/decoder/index.js +164 -1
- package/dist/evaluate/check-composite.d.ts +52 -2
- package/dist/evaluate/check-composite.d.ts.map +1 -1
- package/dist/evaluate/check-composite.js +193 -6
- package/dist/evaluate/check-scalar.d.ts +9 -0
- package/dist/evaluate/check-scalar.d.ts.map +1 -1
- package/dist/evaluate/check-scalar.js +92 -3
- package/dist/evaluate/check.d.ts.map +1 -1
- package/dist/evaluate/check.js +19 -4
- package/dist/evaluate/shared.d.ts +19 -0
- package/dist/evaluate/shared.d.ts.map +1 -1
- package/dist/evaluate/shared.js +35 -0
- package/dist/guard/array.d.ts +48 -0
- package/dist/guard/array.d.ts.map +1 -0
- package/dist/guard/array.js +84 -0
- package/dist/guard/base.d.ts +32 -2
- package/dist/guard/base.d.ts.map +1 -1
- package/dist/guard/base.js +74 -3
- package/dist/guard/date.d.ts +34 -0
- package/dist/guard/date.d.ts.map +1 -0
- package/dist/guard/date.js +60 -0
- package/dist/guard/index.d.ts +2 -0
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +2 -0
- package/dist/guard/number.d.ts +60 -0
- package/dist/guard/number.d.ts.map +1 -1
- package/dist/guard/number.js +129 -0
- package/dist/guard/read.d.ts +53 -1
- package/dist/guard/read.d.ts.map +1 -1
- package/dist/guard/read.js +102 -0
- package/dist/guard/string.d.ts +82 -0
- package/dist/guard/string.d.ts.map +1 -1
- package/dist/guard/string.js +213 -0
- package/dist/guard/types.d.ts +18 -0
- package/dist/guard/types.d.ts.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/ir/builder.d.ts +3 -3
- package/dist/ir/builder.d.ts.map +1 -1
- package/dist/ir/builder.js +5 -2
- package/dist/ir/freeze.js +7 -0
- package/dist/ir/types.d.ts +4 -1
- package/dist/ir/types.d.ts.map +1 -1
- package/dist/ir/validate.d.ts.map +1 -1
- package/dist/ir/validate.js +35 -1
- package/dist/issue/index.d.ts +1 -1
- package/dist/issue/index.d.ts.map +1 -1
- package/dist/issue/index.js +4 -0
- package/dist/json-schema/emit-composite.d.ts +6 -2
- package/dist/json-schema/emit-composite.d.ts.map +1 -1
- package/dist/json-schema/emit-composite.js +66 -12
- package/dist/json-schema/emit-scalar.d.ts.map +1 -1
- package/dist/json-schema/emit-scalar.js +54 -1
- package/dist/json-schema/emit.d.ts.map +1 -1
- package/dist/json-schema/emit.js +11 -2
- package/dist/json-schema/types.d.ts +7 -1
- package/dist/json-schema/types.d.ts.map +1 -1
- package/dist/kind/index.d.ts +25 -0
- package/dist/kind/index.d.ts.map +1 -1
- package/dist/kind/index.js +26 -3
- package/dist/lower/index.d.ts.map +1 -1
- package/dist/lower/index.js +52 -3
- package/dist/message/index.d.ts +18 -0
- package/dist/message/index.d.ts.map +1 -1
- package/dist/message/index.js +67 -0
- package/dist/optimize/domain.js +6 -2
- package/dist/optimize/map-node.d.ts.map +1 -1
- package/dist/optimize/map-node.js +3 -0
- package/dist/plan/cache.js +13 -1
- package/dist/plan/predicate.d.ts.map +1 -1
- package/dist/plan/predicate.js +33 -3
- package/dist/plan/schema-predicate.d.ts.map +1 -1
- package/dist/plan/schema-predicate.js +267 -8
- package/dist/schema/freeze.js +22 -0
- package/dist/schema/index.d.ts +2 -2
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +1 -1
- package/dist/schema/types.d.ts +89 -4
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +8 -1
- package/dist/schema/undefined.d.ts.map +1 -1
- package/dist/schema/undefined.js +5 -0
- package/dist/schema/validate.d.ts.map +1 -1
- package/dist/schema/validate.js +111 -4
- package/docs/api.md +79 -10
- package/docs/assets/benchmark-headline.svg +33 -33
- package/docs/engine-notes.md +9 -5
- package/docs/index.html +1366 -722
- package/docs/ko/api.md +383 -0
- package/docs/ko/engine-notes.md +156 -0
- package/docs/ko/readme.md +404 -0
- package/package.json +6 -2
package/dist/decoder/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { Guard, Presence, RuntimeValue } from "../guard/index.js";
|
|
2
2
|
import type { CheckResult } from "../issue/index.js";
|
|
3
3
|
type DecodeRunner<TValue> = (value: unknown) => CheckResult<TValue>;
|
|
4
|
+
type EncodeRunner<TValue> = (value: unknown) => CheckResult<TValue>;
|
|
5
|
+
type DefaultInput<TValue> = TValue | (() => TValue);
|
|
4
6
|
/**
|
|
5
7
|
* @brief Private runner slot for decoder instances.
|
|
6
8
|
* @details A symbol slot keeps the public object small while avoiding accidental
|
|
7
9
|
* collision with user-visible properties.
|
|
8
10
|
*/
|
|
9
11
|
declare const DecoderRunSymbol: unique symbol;
|
|
12
|
+
declare const CodecEncodeSymbol: unique symbol;
|
|
10
13
|
export type DecodeSource = Guard<unknown, Presence> | Decoder<unknown>;
|
|
11
14
|
export type InferDecoder<TSource> = TSource extends Decoder<infer TValue> ? TValue : TSource extends Guard<infer TValue, infer TPresence> ? RuntimeValue<TValue, TPresence> : never;
|
|
12
15
|
/**
|
|
@@ -18,6 +21,12 @@ export interface Decoder<TValue> {
|
|
|
18
21
|
decode(value: unknown): CheckResult<TValue>;
|
|
19
22
|
transform<TNext>(mapper: (value: TValue) => TNext): BaseDecoder<TNext>;
|
|
20
23
|
pipe<TNext extends DecodeSource>(next: TNext): BaseDecoder<InferDecoder<TNext>>;
|
|
24
|
+
default(fallback: DefaultInput<TValue>): BaseDecoder<TValue>;
|
|
25
|
+
prefault(fallback: unknown): BaseDecoder<TValue>;
|
|
26
|
+
catch(fallback: DefaultInput<TValue>): BaseDecoder<TValue>;
|
|
27
|
+
}
|
|
28
|
+
export interface Codec<TEncoded, TDecoded> extends Decoder<TDecoded> {
|
|
29
|
+
encode(value: TDecoded): CheckResult<TEncoded>;
|
|
21
30
|
}
|
|
22
31
|
/**
|
|
23
32
|
* @brief Frozen decoder wrapper around one runner function.
|
|
@@ -30,6 +39,19 @@ export declare class BaseDecoder<TValue> implements Decoder<TValue> {
|
|
|
30
39
|
decode(this: unknown, value: unknown): CheckResult<TValue>;
|
|
31
40
|
transform<TNext>(mapper: (value: TValue) => TNext): BaseDecoder<TNext>;
|
|
32
41
|
pipe<TNext extends DecodeSource>(next: TNext): BaseDecoder<InferDecoder<TNext>>;
|
|
42
|
+
default(fallback: DefaultInput<TValue>): BaseDecoder<TValue>;
|
|
43
|
+
prefault(fallback: unknown): BaseDecoder<TValue>;
|
|
44
|
+
catch(fallback: DefaultInput<TValue>): BaseDecoder<TValue>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @brief Frozen bidirectional codec wrapper.
|
|
48
|
+
* @details Decode uses the BaseDecoder runner. Encode has a separate private
|
|
49
|
+
* symbol so detached encode calls fail through the same receiver discipline.
|
|
50
|
+
*/
|
|
51
|
+
export declare class BaseCodec<TEncoded, TDecoded> extends BaseDecoder<TDecoded> implements Codec<TEncoded, TDecoded> {
|
|
52
|
+
private readonly [CodecEncodeSymbol];
|
|
53
|
+
constructor(decodeRun: DecodeRunner<TDecoded>, encodeRun: EncodeRunner<TEncoded>);
|
|
54
|
+
encode(this: unknown, value: TDecoded): CheckResult<TEncoded>;
|
|
33
55
|
}
|
|
34
56
|
/**
|
|
35
57
|
* @brief Wrap a guard or decoder as a synchronous decoder pipeline.
|
|
@@ -58,6 +80,38 @@ export declare function transform<TValue, TNext>(source: Decoder<TValue>, mapper
|
|
|
58
80
|
* @details This helper keeps a local invariant explicit at the module boundary.
|
|
59
81
|
*/
|
|
60
82
|
export declare function pipe<TNext extends DecodeSource>(source: DecodeSource, next: TNext): BaseDecoder<InferDecoder<TNext>>;
|
|
83
|
+
/**
|
|
84
|
+
* @brief Add a short-circuit default output for undefined input.
|
|
85
|
+
* @param source Guard or decoder used for non-undefined input.
|
|
86
|
+
* @param fallback Output value or zero-argument producer.
|
|
87
|
+
* @returns Decoder that returns fallback output when input is undefined.
|
|
88
|
+
*/
|
|
89
|
+
export declare function defaultValue<TSource extends DecodeSource>(source: TSource, fallback: DefaultInput<InferDecoder<TSource>>): BaseDecoder<InferDecoder<TSource>>;
|
|
90
|
+
/**
|
|
91
|
+
* @brief Add a pre-parse fallback input for undefined input.
|
|
92
|
+
* @param source Guard or decoder used for actual validation.
|
|
93
|
+
* @param fallback Input value passed through the source when input is undefined.
|
|
94
|
+
* @returns Decoder that validates fallback input instead of short-circuiting.
|
|
95
|
+
*/
|
|
96
|
+
export declare function prefault<TSource extends DecodeSource>(source: TSource, fallback: unknown): BaseDecoder<InferDecoder<TSource>>;
|
|
97
|
+
/**
|
|
98
|
+
* @brief Add a failure fallback output for decode errors.
|
|
99
|
+
* @param source Guard or decoder used for validation.
|
|
100
|
+
* @param fallback Output value or zero-argument producer returned on failure.
|
|
101
|
+
* @returns Decoder that converts validation failure into fallback success.
|
|
102
|
+
*/
|
|
103
|
+
export declare function catchValue<TSource extends DecodeSource>(source: TSource, fallback: DefaultInput<InferDecoder<TSource>>): BaseDecoder<InferDecoder<TSource>>;
|
|
104
|
+
/**
|
|
105
|
+
* @brief Build a bidirectional codec from input and output validation sources.
|
|
106
|
+
* @param input Source schema for encoded values.
|
|
107
|
+
* @param output Source schema for decoded values.
|
|
108
|
+
* @param mapping Decode and encode mapping functions.
|
|
109
|
+
* @returns Codec that validates both sides of each conversion.
|
|
110
|
+
*/
|
|
111
|
+
export declare function codec<TInput extends DecodeSource, TOutput extends DecodeSource>(input: TInput, output: TOutput, mapping: {
|
|
112
|
+
readonly decode: (value: InferDecoder<TInput>) => InferDecoder<TOutput>;
|
|
113
|
+
readonly encode: (value: InferDecoder<TOutput>) => InferDecoder<TInput>;
|
|
114
|
+
}): BaseCodec<InferDecoder<TInput>, InferDecoder<TOutput>>;
|
|
61
115
|
/**
|
|
62
116
|
* @brief Primitive coercion decoders with explicit failure issues.
|
|
63
117
|
* @details Decoder helpers keep validation failures explicit in Result values while
|
|
@@ -88,5 +142,11 @@ export declare function coerceBoolean(): BaseDecoder<boolean>;
|
|
|
88
142
|
* @details This helper keeps a local invariant explicit at the module boundary.
|
|
89
143
|
*/
|
|
90
144
|
export declare function isDecoderValue(value: unknown): value is Decoder<unknown>;
|
|
145
|
+
/**
|
|
146
|
+
* @brief Check codec value.
|
|
147
|
+
* @param value Candidate runtime value.
|
|
148
|
+
* @returns True when the value is a TypeSea codec.
|
|
149
|
+
*/
|
|
150
|
+
export declare function isCodecValue(value: unknown): value is Codec<unknown, unknown>;
|
|
91
151
|
export {};
|
|
92
152
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decoder/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,mBAAmB,CAAC;AAMhE,KAAK,YAAY,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,OAAO,KAAK,WAAW,CAAC,MAAM,CAAC,CA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AAI,WAAW,CAAC,MAAM,CAAC,CAclD;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,WAAW,CAAC,OAAO,CAAC,CAiBpD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC,CAExE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAE7E"}
|
package/dist/decoder/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { freezeSchema, isSchemaValue } from "../schema/index.js";
|
|
|
9
9
|
* collision with user-visible properties.
|
|
10
10
|
*/
|
|
11
11
|
const DecoderRunSymbol = Symbol("TypeSea.decoder.run");
|
|
12
|
+
const CodecEncodeSymbol = Symbol("TypeSea.codec.encode");
|
|
12
13
|
/**
|
|
13
14
|
* @brief Real decoder instances tracked without extending object lifetime.
|
|
14
15
|
* @details Decoder helpers keep validation failures explicit in Result values while
|
|
@@ -27,7 +28,9 @@ export class BaseDecoder {
|
|
|
27
28
|
}
|
|
28
29
|
defineReadonlyProperty(this, DecoderRunSymbol, run, false);
|
|
29
30
|
constructedDecoders.add(this);
|
|
30
|
-
|
|
31
|
+
if (new.target === BaseDecoder) {
|
|
32
|
+
Object.freeze(this);
|
|
33
|
+
}
|
|
31
34
|
}
|
|
32
35
|
decode(value) {
|
|
33
36
|
return readDecoderRunner(this, "decoder receiver")(value);
|
|
@@ -56,6 +59,47 @@ export class BaseDecoder {
|
|
|
56
59
|
return nextRun(decoded.value);
|
|
57
60
|
});
|
|
58
61
|
}
|
|
62
|
+
default(fallback) {
|
|
63
|
+
const run = readDecoderRunner(this, "decoder default receiver");
|
|
64
|
+
return new BaseDecoder((value) => {
|
|
65
|
+
if (value === undefined) {
|
|
66
|
+
return okResult(resolveDefault(fallback));
|
|
67
|
+
}
|
|
68
|
+
return run(value);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
prefault(fallback) {
|
|
72
|
+
const run = readDecoderRunner(this, "decoder prefault receiver");
|
|
73
|
+
return new BaseDecoder((value) => run(value === undefined ? fallback : value));
|
|
74
|
+
}
|
|
75
|
+
catch(fallback) {
|
|
76
|
+
const run = readDecoderRunner(this, "decoder catch receiver");
|
|
77
|
+
return new BaseDecoder((value) => {
|
|
78
|
+
const decoded = run(value);
|
|
79
|
+
if (decoded.ok) {
|
|
80
|
+
return decoded;
|
|
81
|
+
}
|
|
82
|
+
return okResult(resolveDefault(fallback));
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @brief Frozen bidirectional codec wrapper.
|
|
88
|
+
* @details Decode uses the BaseDecoder runner. Encode has a separate private
|
|
89
|
+
* symbol so detached encode calls fail through the same receiver discipline.
|
|
90
|
+
*/
|
|
91
|
+
export class BaseCodec extends BaseDecoder {
|
|
92
|
+
constructor(decodeRun, encodeRun) {
|
|
93
|
+
super(decodeRun);
|
|
94
|
+
if (typeof encodeRun !== "function") {
|
|
95
|
+
throw new TypeError("codec encode run must be a function");
|
|
96
|
+
}
|
|
97
|
+
defineReadonlyProperty(this, CodecEncodeSymbol, encodeRun, false);
|
|
98
|
+
Object.freeze(this);
|
|
99
|
+
}
|
|
100
|
+
encode(value) {
|
|
101
|
+
return readCodecEncodeRunner(this, "codec receiver")(value);
|
|
102
|
+
}
|
|
59
103
|
}
|
|
60
104
|
/**
|
|
61
105
|
* @brief Execute decoder.
|
|
@@ -86,6 +130,76 @@ export function transform(source, mapper) {
|
|
|
86
130
|
export function pipe(source, next) {
|
|
87
131
|
return makeDecoder(source).pipe(next);
|
|
88
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* @brief Add a short-circuit default output for undefined input.
|
|
135
|
+
* @param source Guard or decoder used for non-undefined input.
|
|
136
|
+
* @param fallback Output value or zero-argument producer.
|
|
137
|
+
* @returns Decoder that returns fallback output when input is undefined.
|
|
138
|
+
*/
|
|
139
|
+
export function defaultValue(source, fallback) {
|
|
140
|
+
const run = readDecodeSourceRunner(source, "default source");
|
|
141
|
+
return new BaseDecoder((value) => {
|
|
142
|
+
if (value === undefined) {
|
|
143
|
+
return okResult(resolveDefault(fallback));
|
|
144
|
+
}
|
|
145
|
+
return run(value);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @brief Add a pre-parse fallback input for undefined input.
|
|
150
|
+
* @param source Guard or decoder used for actual validation.
|
|
151
|
+
* @param fallback Input value passed through the source when input is undefined.
|
|
152
|
+
* @returns Decoder that validates fallback input instead of short-circuiting.
|
|
153
|
+
*/
|
|
154
|
+
export function prefault(source, fallback) {
|
|
155
|
+
const run = readDecodeSourceRunner(source, "prefault source");
|
|
156
|
+
return new BaseDecoder((value) => run(value === undefined ? fallback : value));
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* @brief Add a failure fallback output for decode errors.
|
|
160
|
+
* @param source Guard or decoder used for validation.
|
|
161
|
+
* @param fallback Output value or zero-argument producer returned on failure.
|
|
162
|
+
* @returns Decoder that converts validation failure into fallback success.
|
|
163
|
+
*/
|
|
164
|
+
export function catchValue(source, fallback) {
|
|
165
|
+
const run = readDecodeSourceRunner(source, "catch source");
|
|
166
|
+
return new BaseDecoder((value) => {
|
|
167
|
+
const decoded = run(value);
|
|
168
|
+
if (decoded.ok) {
|
|
169
|
+
return decoded;
|
|
170
|
+
}
|
|
171
|
+
return okResult(resolveDefault(fallback));
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* @brief Build a bidirectional codec from input and output validation sources.
|
|
176
|
+
* @param input Source schema for encoded values.
|
|
177
|
+
* @param output Source schema for decoded values.
|
|
178
|
+
* @param mapping Decode and encode mapping functions.
|
|
179
|
+
* @returns Codec that validates both sides of each conversion.
|
|
180
|
+
*/
|
|
181
|
+
export function codec(input, output, mapping) {
|
|
182
|
+
if (!isRecord(mapping) ||
|
|
183
|
+
typeof mapping.decode !== "function" ||
|
|
184
|
+
typeof mapping.encode !== "function") {
|
|
185
|
+
throw new TypeError("codec mapping must contain decode and encode functions");
|
|
186
|
+
}
|
|
187
|
+
const inputRun = readDecodeSourceRunner(input, "codec input");
|
|
188
|
+
const outputRun = readDecodeSourceRunner(output, "codec output");
|
|
189
|
+
return new BaseCodec((value) => {
|
|
190
|
+
const decodedInput = inputRun(value);
|
|
191
|
+
if (!decodedInput.ok) {
|
|
192
|
+
return decodedInput;
|
|
193
|
+
}
|
|
194
|
+
return outputRun(mapping.decode(decodedInput.value));
|
|
195
|
+
}, (value) => {
|
|
196
|
+
const decodedOutput = outputRun(value);
|
|
197
|
+
if (!decodedOutput.ok) {
|
|
198
|
+
return decodedOutput;
|
|
199
|
+
}
|
|
200
|
+
return inputRun(mapping.encode(decodedOutput.value));
|
|
201
|
+
});
|
|
202
|
+
}
|
|
89
203
|
/**
|
|
90
204
|
* @brief Primitive coercion decoders with explicit failure issues.
|
|
91
205
|
* @details Decoder helpers keep validation failures explicit in Result values while
|
|
@@ -167,6 +281,14 @@ export function coerceBoolean() {
|
|
|
167
281
|
export function isDecoderValue(value) {
|
|
168
282
|
return isConstructedDecoder(value);
|
|
169
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* @brief Check codec value.
|
|
286
|
+
* @param value Candidate runtime value.
|
|
287
|
+
* @returns True when the value is a TypeSea codec.
|
|
288
|
+
*/
|
|
289
|
+
export function isCodecValue(value) {
|
|
290
|
+
return isConstructedCodec(value);
|
|
291
|
+
}
|
|
170
292
|
/**
|
|
171
293
|
* @brief Test decoder identity through the private registry.
|
|
172
294
|
* @details Decoder helpers keep validation failures explicit in Result values while
|
|
@@ -177,6 +299,25 @@ export function isDecoderValue(value) {
|
|
|
177
299
|
function isConstructedDecoder(value) {
|
|
178
300
|
return isRecord(value) && constructedDecoders.has(value);
|
|
179
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* @brief Test codec identity through the private encode slot.
|
|
304
|
+
* @param value Candidate codec.
|
|
305
|
+
* @returns True when TypeSea constructed the codec instance.
|
|
306
|
+
*/
|
|
307
|
+
function isConstructedCodec(value) {
|
|
308
|
+
return isConstructedDecoder(value) &&
|
|
309
|
+
Object.prototype.hasOwnProperty.call(value, CodecEncodeSymbol);
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* @brief Resolve a default value or zero-argument producer.
|
|
313
|
+
* @param fallback Stored fallback value or producer.
|
|
314
|
+
* @returns Concrete fallback output.
|
|
315
|
+
*/
|
|
316
|
+
function resolveDefault(fallback) {
|
|
317
|
+
return typeof fallback === "function"
|
|
318
|
+
? fallback()
|
|
319
|
+
: fallback;
|
|
320
|
+
}
|
|
180
321
|
/**
|
|
181
322
|
* @brief Resolve a decode source into an executable runner.
|
|
182
323
|
* @param source Decoder or guard-like value supplied by the caller.
|
|
@@ -207,6 +348,19 @@ function readDecoderRunner(value, label) {
|
|
|
207
348
|
}
|
|
208
349
|
return value[DecoderRunSymbol];
|
|
209
350
|
}
|
|
351
|
+
/**
|
|
352
|
+
* @brief Read the private encode runner from a constructed codec.
|
|
353
|
+
* @param value Candidate codec object.
|
|
354
|
+
* @param label Message prefix for TypeError diagnostics.
|
|
355
|
+
* @returns Stored encode runner.
|
|
356
|
+
* @throws TypeError when the receiver is not a TypeSea codec.
|
|
357
|
+
*/
|
|
358
|
+
function readCodecEncodeRunner(value, label) {
|
|
359
|
+
if (!isConstructedCodec(value)) {
|
|
360
|
+
throw new TypeError(`${label} must be a TypeSea codec`);
|
|
361
|
+
}
|
|
362
|
+
return value[CodecEncodeSymbol];
|
|
363
|
+
}
|
|
210
364
|
/**
|
|
211
365
|
* @brief Normalize a guard-like value used as a decode source.
|
|
212
366
|
* @param value Candidate guard-like source.
|
|
@@ -267,6 +421,15 @@ function actualType(value) {
|
|
|
267
421
|
if (Array.isArray(value)) {
|
|
268
422
|
return "array";
|
|
269
423
|
}
|
|
424
|
+
if (value instanceof Date) {
|
|
425
|
+
return "date";
|
|
426
|
+
}
|
|
427
|
+
if (value instanceof Map) {
|
|
428
|
+
return "map";
|
|
429
|
+
}
|
|
430
|
+
if (value instanceof Set) {
|
|
431
|
+
return "set";
|
|
432
|
+
}
|
|
270
433
|
if (typeof value === "number" && Number.isNaN(value)) {
|
|
271
434
|
return "nan";
|
|
272
435
|
}
|
|
@@ -26,7 +26,9 @@ export type IssueCollector = (schema: Schema, value: unknown, path: PathSegment[
|
|
|
26
26
|
* @param collectChild Dispatcher for nested schema diagnostics.
|
|
27
27
|
* @post Every pushed path segment is popped before return.
|
|
28
28
|
*/
|
|
29
|
-
export declare function collectArrayIssues(
|
|
29
|
+
export declare function collectArrayIssues(schema: Extract<Schema, {
|
|
30
|
+
readonly tag: typeof SchemaTag.Array;
|
|
31
|
+
}>, value: unknown, path: PathSegment[], issues: Issue[], state: ValidationState, collectChild: IssueCollector): void;
|
|
30
32
|
/**
|
|
31
33
|
* @brief collect tuple issues.
|
|
32
34
|
* @details Interpreter helpers keep safe descriptor-based reads and diagnostic collection
|
|
@@ -39,7 +41,9 @@ export declare function collectArrayIssues(item: Schema, value: unknown, path: P
|
|
|
39
41
|
* @param collectChild Dispatcher for nested schema diagnostics.
|
|
40
42
|
* @post Every pushed tuple index is popped before return.
|
|
41
43
|
*/
|
|
42
|
-
export declare function collectTupleIssues(
|
|
44
|
+
export declare function collectTupleIssues(schema: Extract<Schema, {
|
|
45
|
+
readonly tag: typeof SchemaTag.Tuple;
|
|
46
|
+
}>, value: unknown, path: PathSegment[], issues: Issue[], state: ValidationState, collectChild: IssueCollector): void;
|
|
43
47
|
/**
|
|
44
48
|
* @brief collect record issues.
|
|
45
49
|
* @details Interpreter helpers keep safe descriptor-based reads and diagnostic collection
|
|
@@ -53,6 +57,52 @@ export declare function collectTupleIssues(items: readonly Schema[], value: unkn
|
|
|
53
57
|
* @post Every pushed record key is popped before return.
|
|
54
58
|
*/
|
|
55
59
|
export declare function collectRecordIssues(item: Schema, value: unknown, path: PathSegment[], issues: Issue[], state: ValidationState, collectChild: IssueCollector): void;
|
|
60
|
+
/**
|
|
61
|
+
* @brief collect Map issues.
|
|
62
|
+
* @param schema Map schema with key and value validators.
|
|
63
|
+
* @param value Candidate runtime value.
|
|
64
|
+
* @param path Mutable diagnostic path stack.
|
|
65
|
+
* @param issues Output issue buffer.
|
|
66
|
+
* @param state Shared recursion and cycle state.
|
|
67
|
+
* @param collectChild Dispatcher for nested schema diagnostics.
|
|
68
|
+
*/
|
|
69
|
+
export declare function collectMapIssues(schema: Extract<Schema, {
|
|
70
|
+
readonly tag: typeof SchemaTag.Map;
|
|
71
|
+
}>, value: unknown, path: PathSegment[], issues: Issue[], state: ValidationState, collectChild: IssueCollector): void;
|
|
72
|
+
/**
|
|
73
|
+
* @brief collect Set issues.
|
|
74
|
+
* @param schema Set schema with item validator.
|
|
75
|
+
* @param value Candidate runtime value.
|
|
76
|
+
* @param path Mutable diagnostic path stack.
|
|
77
|
+
* @param issues Output issue buffer.
|
|
78
|
+
* @param state Shared recursion and cycle state.
|
|
79
|
+
* @param collectChild Dispatcher for nested schema diagnostics.
|
|
80
|
+
*/
|
|
81
|
+
export declare function collectSetIssues(schema: Extract<Schema, {
|
|
82
|
+
readonly tag: typeof SchemaTag.Set;
|
|
83
|
+
}>, value: unknown, path: PathSegment[], issues: Issue[], state: ValidationState, collectChild: IssueCollector): void;
|
|
84
|
+
/**
|
|
85
|
+
* @brief collect instanceOf issues.
|
|
86
|
+
* @param schema InstanceOf schema with constructor metadata.
|
|
87
|
+
* @param value Candidate runtime value.
|
|
88
|
+
* @param path Current diagnostic path.
|
|
89
|
+
* @param issues Output issue buffer.
|
|
90
|
+
*/
|
|
91
|
+
export declare function collectInstanceOfIssues(schema: Extract<Schema, {
|
|
92
|
+
readonly tag: typeof SchemaTag.InstanceOf;
|
|
93
|
+
}>, value: unknown, path: PathSegment[], issues: Issue[]): void;
|
|
94
|
+
/**
|
|
95
|
+
* @brief collect property issues.
|
|
96
|
+
* @param schema Property schema with base and own data property validator.
|
|
97
|
+
* @param value Candidate runtime value.
|
|
98
|
+
* @param path Mutable diagnostic path stack.
|
|
99
|
+
* @param issues Output issue buffer.
|
|
100
|
+
* @param state Shared recursion and cycle state.
|
|
101
|
+
* @param collectChild Dispatcher for nested schema diagnostics.
|
|
102
|
+
*/
|
|
103
|
+
export declare function collectPropertyIssues(schema: Extract<Schema, {
|
|
104
|
+
readonly tag: typeof SchemaTag.Property;
|
|
105
|
+
}>, value: unknown, path: PathSegment[], issues: Issue[], state: ValidationState, collectChild: IssueCollector): void;
|
|
56
106
|
/**
|
|
57
107
|
* @brief collect object issues.
|
|
58
108
|
* @details Interpreter helpers keep safe descriptor-based reads and diagnostic collection
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-composite.d.ts","sourceRoot":"","sources":["../../src/evaluate/check-composite.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"check-composite.d.ts","sourceRoot":"","sources":["../../src/evaluate/check-composite.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIH,SAAS,EACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EACR,sBAAsB,EACtB,MAAM,EACT,MAAM,oBAAoB,CAAC;AAgB5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CACzB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,WAAW,EAAE,EACnB,MAAM,EAAE,KAAK,EAAE,EACf,KAAK,EAAE,eAAe,KACrB,IAAI,CAAC;AAEV;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAC9B,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE;IAAE,QAAQ,CAA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