@duplojs/lang 0.0.1-beta.9 → 0.1.0-beta.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/dist/array/concat.d.ts +2 -2
- package/dist/array/flat.d.ts +1 -1
- package/dist/array/flatMap.d.ts +2 -2
- package/dist/array/from.d.ts +1 -1
- package/dist/array/length.d.ts +3 -2
- package/dist/array/push.d.ts +4 -2
- package/dist/chrono/createDate.cjs +1 -1
- package/dist/chrono/createDate.mjs +1 -1
- package/dist/chrono/operators/addTime.d.ts +2 -4
- package/dist/common/constraint/cast/index.d.ts +4 -4
- package/dist/common/constraint/cast/string.d.ts +4 -0
- package/dist/common/constraint/infer/index.d.ts +2 -1
- package/dist/common/constraint/infer/string.d.ts +1 -1
- package/dist/common/constraint/types/index.d.ts +1 -0
- package/dist/common/constraint/types/maybe.d.ts +2 -0
- package/dist/common/formData.d.ts +2 -1
- package/dist/common/memo.cjs +3 -2
- package/dist/common/memo.mjs +3 -2
- package/dist/common/memoPromise.cjs +3 -2
- package/dist/common/memoPromise.mjs +3 -2
- package/dist/common/timeout.cjs +2 -2
- package/dist/common/timeout.d.ts +1 -1
- package/dist/common/timeout.mjs +2 -2
- package/dist/common/types/applyPromiseIf.d.ts +1 -0
- package/dist/common/types/index.d.ts +1 -0
- package/dist/common/types/json.d.ts +12 -1
- package/dist/dataStructure/common/codec/defaults/string.cjs +1 -1
- package/dist/dataStructure/common/codec/defaults/string.d.ts +1 -1
- package/dist/dataStructure/common/codec/defaults/string.mjs +1 -1
- package/dist/dataStructure/common/{error.cjs → error/base.cjs} +18 -3
- package/dist/dataStructure/common/{error.d.ts → error/base.d.ts} +14 -7
- package/dist/dataStructure/common/{error.mjs → error/base.mjs} +17 -4
- package/dist/dataStructure/common/error/defaultInterpreter.cjs +87 -0
- package/dist/dataStructure/common/error/defaultInterpreter.d.ts +60 -0
- package/dist/dataStructure/common/error/defaultInterpreter.mjs +86 -0
- package/dist/dataStructure/common/error/index.d.ts +3 -0
- package/dist/dataStructure/common/{errorInterpreter.cjs → error/interpreter.cjs} +11 -12
- package/dist/dataStructure/common/error/interpreter.d.ts +32 -0
- package/dist/dataStructure/common/{errorInterpreter.mjs → error/interpreter.mjs} +9 -10
- package/dist/dataStructure/common/index.d.ts +0 -1
- package/dist/dataStructure/constraint/types/constraints.d.ts +1 -0
- package/dist/dataStructure/fundamentalType/types/fundamentalTypes.d.ts +1 -0
- package/dist/dataStructure/helpers/extend.cjs +1 -1
- package/dist/dataStructure/helpers/extend.d.ts +1 -1
- package/dist/dataStructure/helpers/extend.mjs +1 -1
- package/dist/dataStructure/helpers/index.d.ts +1 -0
- package/dist/dataStructure/helpers/partial.cjs +1 -1
- package/dist/dataStructure/helpers/partial.mjs +1 -1
- package/dist/dataStructure/helpers/required.cjs +1 -1
- package/dist/dataStructure/helpers/required.mjs +1 -1
- package/dist/dataStructure/helpers/typeStructureIdentifier.cjs +14 -0
- package/dist/dataStructure/helpers/typeStructureIdentifier.d.ts +6 -0
- package/dist/dataStructure/helpers/typeStructureIdentifier.mjs +14 -0
- package/dist/dataStructure/index.cjs +45 -33
- package/dist/dataStructure/index.mjs +10 -3
- package/dist/dataStructure/structure/base.cjs +31 -19
- package/dist/dataStructure/structure/base.d.ts +16 -16
- package/dist/dataStructure/structure/base.mjs +25 -13
- package/dist/dataStructure/structure/defaults/array.cjs +10 -0
- package/dist/dataStructure/structure/defaults/array.mjs +10 -0
- package/dist/dataStructure/structure/defaults/lazy.cjs +1 -0
- package/dist/dataStructure/structure/defaults/lazy.mjs +1 -0
- package/dist/dataStructure/structure/defaults/nonEncodableString.cjs +1 -0
- package/dist/dataStructure/structure/defaults/nonEncodableString.mjs +1 -0
- package/dist/dataStructure/structure/defaults/object.cjs +18 -7
- package/dist/dataStructure/structure/defaults/object.d.ts +2 -1
- package/dist/dataStructure/structure/defaults/object.mjs +18 -7
- package/dist/dataStructure/structure/defaults/record.cjs +20 -7
- package/dist/dataStructure/structure/defaults/record.mjs +20 -7
- package/dist/dataStructure/structure/defaults/type.cjs +1 -0
- package/dist/dataStructure/structure/defaults/type.mjs +1 -0
- package/dist/dataStructure/structure/defaults/union.cjs +26 -6
- package/dist/dataStructure/structure/defaults/union.mjs +21 -1
- package/dist/dataStructure/structure/types/value.d.ts +2 -0
- package/dist/dataStructure/type/types/types.d.ts +1 -0
- package/dist/either/index.cjs +1 -1
- package/dist/either/index.mjs +1 -1
- package/dist/either/left/create.d.ts +2 -1
- package/dist/either/left/none.cjs +2 -2
- package/dist/either/left/none.d.ts +2 -2
- package/dist/either/left/none.mjs +2 -2
- package/dist/either/right/create.d.ts +2 -1
- package/dist/either/types/index.d.ts +1 -0
- package/dist/either/types/mayBe.d.ts +1 -1
- package/dist/invocation/evidence.d.ts +1 -1
- package/dist/invocation/flow/base.cjs +4 -4
- package/dist/invocation/flow/base.d.ts +1 -1
- package/dist/invocation/flow/base.mjs +4 -4
- package/dist/invocation/flow/controller/defaults/debounce.cjs +1 -1
- package/dist/invocation/flow/controller/defaults/debounce.mjs +1 -1
- package/dist/invocation/flow/controller/defaults/throttling.cjs +1 -1
- package/dist/invocation/flow/controller/defaults/throttling.mjs +1 -1
- package/dist/invocation/index.cjs +10 -0
- package/dist/invocation/index.d.ts +2 -0
- package/dist/invocation/index.mjs +7 -1
- package/dist/invocation/reader.cjs +5 -1
- package/dist/invocation/reader.d.ts +5 -3
- package/dist/invocation/reader.mjs +5 -1
- package/dist/invocation/resolver.cjs +31 -0
- package/dist/invocation/resolver.d.ts +14 -0
- package/dist/invocation/resolver.mjs +31 -0
- package/dist/invocation/signature.cjs +8 -0
- package/dist/invocation/signature.d.ts +7 -0
- package/dist/invocation/signature.mjs +8 -0
- package/dist/modeling/entity/base.cjs +19 -25
- package/dist/modeling/entity/base.d.ts +15 -14
- package/dist/modeling/entity/base.mjs +14 -19
- package/dist/modeling/entity/helper.d.ts +6 -8
- package/dist/modeling/entity/namespace.cjs +0 -2
- package/dist/modeling/entity/namespace.d.ts +0 -2
- package/dist/modeling/entity/namespace.mjs +0 -2
- package/dist/modeling/fact/base.cjs +36 -0
- package/dist/modeling/fact/base.d.ts +29 -0
- package/dist/modeling/fact/base.mjs +35 -0
- package/dist/modeling/fact/index.d.ts +1 -0
- package/dist/modeling/flag/base.cjs +1 -1
- package/dist/modeling/flag/base.d.ts +8 -8
- package/dist/modeling/flag/base.mjs +1 -1
- package/dist/modeling/index.cjs +17 -18
- package/dist/modeling/index.d.ts +1 -0
- package/dist/modeling/index.mjs +8 -8
- package/dist/modeling/newType/base.cjs +11 -28
- package/dist/modeling/newType/base.d.ts +8 -15
- package/dist/modeling/newType/base.mjs +5 -20
- package/dist/modeling/taggedObject/base.cjs +19 -25
- package/dist/modeling/taggedObject/base.d.ts +12 -14
- package/dist/modeling/taggedObject/base.mjs +14 -19
- package/dist/object/assign.d.ts +3 -3
- package/dist/object/deepOverride.cjs +33 -0
- package/dist/object/deepOverride.d.ts +20 -0
- package/dist/object/deepOverride.mjs +33 -0
- package/dist/object/entries.d.ts +3 -3
- package/dist/object/index.cjs +4 -1
- package/dist/object/index.d.ts +1 -0
- package/dist/object/index.mjs +4 -2
- package/dist/object/isSimple.cjs +1 -1
- package/dist/object/isSimple.mjs +1 -1
- package/dist/object/keys.d.ts +1 -1
- package/dist/object/override.cjs +1 -1
- package/dist/object/override.d.ts +5 -2
- package/dist/object/override.mjs +1 -1
- package/dist/object/types/assign.d.ts +2 -0
- package/dist/object/types/forbiddenKey.d.ts +1 -1
- package/dist/object/types/hasKeySignature.d.ts +1 -0
- package/dist/object/types/index.d.ts +4 -1
- package/dist/object/types/keyofWithoutSignature.d.ts +3 -0
- package/dist/object/types/override.d.ts +4 -0
- package/dist/object/values.d.ts +1 -1
- package/dist/path/create.cjs +11 -0
- package/dist/path/create.d.ts +3 -0
- package/dist/path/create.mjs +11 -0
- package/dist/path/createAbsolute.cjs +12 -0
- package/dist/path/createAbsolute.d.ts +3 -0
- package/dist/path/createAbsolute.mjs +12 -0
- package/dist/path/createAbsoluteOrThrow.cjs +22 -0
- package/dist/path/createAbsoluteOrThrow.d.ts +9 -0
- package/dist/path/createAbsoluteOrThrow.mjs +21 -0
- package/dist/path/createOrThrow.cjs +22 -0
- package/dist/path/createOrThrow.d.ts +9 -0
- package/dist/path/createOrThrow.mjs +21 -0
- package/dist/path/createSegment.cjs +12 -0
- package/dist/path/createSegment.d.ts +3 -0
- package/dist/path/createSegment.mjs +12 -0
- package/dist/path/createSegmentOrThrow.cjs +22 -0
- package/dist/path/createSegmentOrThrow.d.ts +9 -0
- package/dist/path/createSegmentOrThrow.mjs +21 -0
- package/dist/path/declareAbsolutePath.cjs +6 -0
- package/dist/path/declareAbsolutePath.d.ts +3 -0
- package/dist/path/declareAbsolutePath.mjs +6 -0
- package/dist/path/declarePath.cjs +6 -0
- package/dist/path/declarePath.d.ts +3 -0
- package/dist/path/declarePath.mjs +6 -0
- package/dist/path/declareSegment.cjs +6 -0
- package/dist/path/declareSegment.d.ts +3 -0
- package/dist/path/declareSegment.mjs +6 -0
- package/dist/path/index.cjs +39 -3
- package/dist/path/index.d.ts +10 -0
- package/dist/path/index.mjs +27 -4
- package/dist/path/kind.cjs +4 -0
- package/dist/path/kind.d.ts +2 -0
- package/dist/path/kind.mjs +5 -0
- package/dist/pattern/index.cjs +6 -0
- package/dist/pattern/index.d.ts +2 -0
- package/dist/pattern/index.mjs +5 -1
- package/dist/pattern/match/builder.cjs +1 -1
- package/dist/pattern/match/builder.mjs +1 -1
- package/dist/pattern/matchWithEntityOtherwise.d.ts +2 -2
- package/dist/pattern/matchWithFact.cjs +12 -0
- package/dist/pattern/matchWithFact.d.ts +12 -0
- package/dist/pattern/matchWithFact.mjs +12 -0
- package/dist/pattern/matchWithFactOtherwise.cjs +13 -0
- package/dist/pattern/matchWithFactOtherwise.d.ts +14 -0
- package/dist/pattern/matchWithFactOtherwise.mjs +13 -0
- package/dist/pattern/matchWithNumberOtherwise.d.ts +2 -2
- package/dist/pattern/matchWithStringOtherwise.d.ts +2 -2
- package/dist/pattern/matchWithTaggedObjectOtherwise.d.ts +2 -2
- package/dist/pattern/types/complexUnMatchedValue/getIncompleteUnion.d.ts +8 -8
- package/dist/string/capitalize.d.ts +1 -1
- package/dist/string/concat.d.ts +2 -2
- package/dist/string/prepend.d.ts +2 -2
- package/dist/string/split.cjs +1 -0
- package/dist/string/split.d.ts +3 -3
- package/dist/string/split.mjs +1 -0
- package/dist/string/toLowerCase.d.ts +1 -1
- package/dist/string/toUpperCase.d.ts +1 -1
- package/dist/string/types/IsAllowedString.d.ts +4 -2
- package/dist/string/uncapitalize.d.ts +1 -1
- package/dist/tuple/types/map.d.ts +1 -1
- package/package.json +16 -30
- package/dist/dataStructure/common/errorInterpreter.d.ts +0 -36
- package/dist/object/types/assignObjects.d.ts +0 -2
- /package/{README.md → README} +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as DString from '../../../string';
|
|
2
|
+
export declare const defaultErrorInterpreterDataStructureDictionary: {
|
|
3
|
+
readonly "@DuplojsLangDataStructure/array-structure": () => string;
|
|
4
|
+
readonly "@DuplojsLangDataStructure/lazy-structure": () => string;
|
|
5
|
+
readonly "@DuplojsLangDataStructure/non-encodable-string-structure": (source: import('../..').NonEncodableStringStructure) => string;
|
|
6
|
+
readonly "@DuplojsLangDataStructure/object-structure": () => string;
|
|
7
|
+
readonly "@DuplojsLangDataStructure/record-structure": () => string;
|
|
8
|
+
readonly "@DuplojsLangDataStructure/type-structure": () => string;
|
|
9
|
+
readonly "@DuplojsLangDataStructure/union-structure": () => string;
|
|
10
|
+
readonly "@DuplojsLangDataStructure/bigint-type": () => string;
|
|
11
|
+
readonly "@DuplojsLangDataStructure/bigint-literal-type": (source: import('../..').BigintLiteralType<bigint>) => string;
|
|
12
|
+
readonly "@DuplojsLangDataStructure/boolean-type": () => string;
|
|
13
|
+
readonly "@DuplojsLangDataStructure/boolean-literal-type": (source: import('../..').BooleanLiteralType<boolean>) => string;
|
|
14
|
+
readonly "@DuplojsLangDataStructure/date-type": () => string;
|
|
15
|
+
readonly "@DuplojsLangDataStructure/null-type": () => string;
|
|
16
|
+
readonly "@DuplojsLangDataStructure/number-type": () => string;
|
|
17
|
+
readonly "@DuplojsLangDataStructure/number-literal-type": (source: import('../..').NumberLiteralType<number>) => string;
|
|
18
|
+
readonly "@DuplojsLangDataStructure/string-type": () => string;
|
|
19
|
+
readonly "@DuplojsLangDataStructure/string-literal-type": (source: import('../..').StringLiteralType<string>) => string;
|
|
20
|
+
readonly "@DuplojsLangDataStructure/time-type": () => string;
|
|
21
|
+
readonly "@DuplojsLangDataStructure/undefined-type": () => string;
|
|
22
|
+
readonly "@DuplojsLangDataStructure/absolute-path-constraint": () => string;
|
|
23
|
+
readonly "@DuplojsLangDataStructure/allowed-characters-constraint": (source: import('../..').AllowedCharactersConstraint<DString.CharactersRange>) => string;
|
|
24
|
+
readonly "@DuplojsLangDataStructure/array-length-equal-constraint": (source: import('../..').ArrayLengthEqualConstraint<number>) => string;
|
|
25
|
+
readonly "@DuplojsLangDataStructure/between-than-constraint": (source: import('../..').BetweenThanConstraint<number, number>) => string;
|
|
26
|
+
readonly "@DuplojsLangDataStructure/between-than-or-equal-constraint": (source: import('../..').BetweenThanOrEqualConstraint<number, number>) => string;
|
|
27
|
+
readonly "@DuplojsLangDataStructure/email-constraint": () => string;
|
|
28
|
+
readonly "@DuplojsLangDataStructure/even-constraint": () => string;
|
|
29
|
+
readonly "@DuplojsLangDataStructure/greater-than-constraint": (source: import('../..').GreaterThanConstraint<number>) => string;
|
|
30
|
+
readonly "@DuplojsLangDataStructure/greater-than-or-equal-constraint": (source: import('../..').GreaterThanOrEqualConstraint<number>) => string;
|
|
31
|
+
readonly "@DuplojsLangDataStructure/integer-constraint": () => string;
|
|
32
|
+
readonly "@DuplojsLangDataStructure/less-than-constraint": (source: import('../..').LessThanConstraint<number>) => string;
|
|
33
|
+
readonly "@DuplojsLangDataStructure/less-than-or-equal-constraint": (source: import('../..').LessThanOrEqualConstraint<number>) => string;
|
|
34
|
+
readonly "@DuplojsLangDataStructure/max-characters-constraint": (source: import('../..').MaxCharactersConstraint<number>) => string;
|
|
35
|
+
readonly "@DuplojsLangDataStructure/max-elements-constraint": (source: import('../..').MaxElementsConstraint<number>) => string;
|
|
36
|
+
readonly "@DuplojsLangDataStructure/min-characters-constraint": (source: import('../..').MinCharactersConstraint<number>) => string;
|
|
37
|
+
readonly "@DuplojsLangDataStructure/min-elements-constraint": (source: import('../..').MinElementsConstraint<number>) => string;
|
|
38
|
+
readonly "@DuplojsLangDataStructure/multiple-of-constraint": (source: import('../..').MultipleOfConstraint<number>) => string;
|
|
39
|
+
readonly "@DuplojsLangDataStructure/negative-constraint": () => string;
|
|
40
|
+
readonly "@DuplojsLangDataStructure/not-empty-constraint": () => string;
|
|
41
|
+
readonly "@DuplojsLangDataStructure/not-zero-constraint": () => string;
|
|
42
|
+
readonly "@DuplojsLangDataStructure/number-in-string-constraint": () => string;
|
|
43
|
+
readonly "@DuplojsLangDataStructure/odd-constraint": () => string;
|
|
44
|
+
readonly "@DuplojsLangDataStructure/path-constraint": () => string;
|
|
45
|
+
readonly "@DuplojsLangDataStructure/positive-constraint": () => string;
|
|
46
|
+
readonly "@DuplojsLangDataStructure/refine-constraint": () => string;
|
|
47
|
+
readonly "@DuplojsLangDataStructure/regex-constraint": (source: import('../..').RegexConstraint) => string;
|
|
48
|
+
readonly "@DuplojsLangDataStructure/safe-constraint": () => string;
|
|
49
|
+
readonly "@DuplojsLangDataStructure/segment-path-constraint": () => string;
|
|
50
|
+
readonly "@DuplojsLangDataStructure/strict-negative-constraint": () => string;
|
|
51
|
+
readonly "@DuplojsLangDataStructure/strict-positive-constraint": () => string;
|
|
52
|
+
readonly "@DuplojsLangDataStructure/string-length-equal-constraint": (source: import('../..').StringLengthEqualConstraint<number>) => string;
|
|
53
|
+
readonly "@DuplojsLangDataStructure/trimmed-constraint": () => string;
|
|
54
|
+
readonly "@DuplojsLangDataStructure/url-constraint": () => string;
|
|
55
|
+
readonly "@DuplojsLangDataStructure/uuid-constraint": () => string;
|
|
56
|
+
readonly "@DuplojsLangModeling/entity-structure": () => string;
|
|
57
|
+
readonly "@DuplojsLangModeling/new-type-structure": () => string;
|
|
58
|
+
readonly "@DuplojsLangModeling/tagged-object-structure": (source: import('../../../modeling').TaggedObjectStructure<import('../../../modeling').ObjectTag<string>>) => string;
|
|
59
|
+
};
|
|
60
|
+
export declare const defaultErrorInterpreterCodecDictionary: [[import('../..').Codec<import('../..').TheBigint, string>, (codec: import('../..').Codec, issue: import('../..').EncodeIssue | import('../..').DecodeIssue) => string], [import('../..').Codec<import('../..').TheDate, string>, (codec: import('../..').Codec, issue: import('../..').EncodeIssue | import('../..').DecodeIssue) => string], [import('../..').Codec<import('../..').TheTime, string>, (codec: import('../..').Codec, issue: import('../..').EncodeIssue | import('../..').DecodeIssue) => string], [import('../..').Codec<import('../..').TheBigint, string>, (codec: import('../..').Codec, issue: import('../..').EncodeIssue | import('../..').DecodeIssue) => string], [import('../..').Codec<import('../..').TheBoolean, "true" | "false">, (codec: import('../..').Codec, issue: import('../..').EncodeIssue | import('../..').DecodeIssue) => string], [import('../..').Codec<import('../..').TheDate, string>, (codec: import('../..').Codec, issue: import('../..').EncodeIssue | import('../..').DecodeIssue) => string], [import('../..').Codec<import('../..').TheNull, "null">, (codec: import('../..').Codec, issue: import('../..').EncodeIssue | import('../..').DecodeIssue) => string], [import('../..').Codec<import('../..').TheNumber, string & DString.Number>, (codec: import('../..').Codec, issue: import('../..').EncodeIssue | import('../..').DecodeIssue) => string], [import('../..').Codec<import('../..').TheTime, string>, (codec: import('../..').Codec, issue: import('../..').EncodeIssue | import('../..').DecodeIssue) => string], [import('../..').Codec<import('../..').TheUndefined, "undefined" | undefined>, (codec: import('../..').Codec, issue: import('../..').EncodeIssue | import('../..').DecodeIssue) => string]];
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { coalescing } from "../../../array/coalescing.mjs";
|
|
2
|
+
import { join } from "../../../string/join.mjs";
|
|
3
|
+
import { stringify } from "../../../string/stringify.mjs";
|
|
4
|
+
import { to } from "../../../string/to.mjs";
|
|
5
|
+
import { codecsJson } from "../codec/defaults/json.mjs";
|
|
6
|
+
import { codecsString } from "../codec/defaults/string.mjs";
|
|
7
|
+
import { encodeIssueKind } from "./base.mjs";
|
|
8
|
+
//#region scripts/dataStructure/common/error/defaultInterpreter.ts
|
|
9
|
+
const defaultErrorInterpreterDataStructureDictionary = {
|
|
10
|
+
"@DuplojsLangDataStructure/array-structure": () => "Expected an array.",
|
|
11
|
+
"@DuplojsLangDataStructure/lazy-structure": () => "Expected a value matching the resolved structure.",
|
|
12
|
+
"@DuplojsLangDataStructure/non-encodable-string-structure": (source) => `Expected ${stringify(source.definition.value)}.`,
|
|
13
|
+
"@DuplojsLangDataStructure/object-structure": () => "Expected a plain object containing only the defined properties.",
|
|
14
|
+
"@DuplojsLangDataStructure/record-structure": () => "Expected a plain object matching the record definition.",
|
|
15
|
+
"@DuplojsLangDataStructure/type-structure": () => "Expected a value matching the configured type.",
|
|
16
|
+
"@DuplojsLangDataStructure/union-structure": () => "Expected a value matching at least one union member.",
|
|
17
|
+
"@DuplojsLangDataStructure/bigint-type": () => "Expected a bigint.",
|
|
18
|
+
"@DuplojsLangDataStructure/bigint-literal-type": (source) => `Expected ${to(source.definition.value)}n.`,
|
|
19
|
+
"@DuplojsLangDataStructure/boolean-type": () => "Expected a boolean.",
|
|
20
|
+
"@DuplojsLangDataStructure/boolean-literal-type": (source) => `Expected ${source.definition.value}.`,
|
|
21
|
+
"@DuplojsLangDataStructure/date-type": () => "Expected a DuploJS date.",
|
|
22
|
+
"@DuplojsLangDataStructure/null-type": () => "Expected null.",
|
|
23
|
+
"@DuplojsLangDataStructure/number-type": () => "Expected a finite number.",
|
|
24
|
+
"@DuplojsLangDataStructure/number-literal-type": (source) => `Expected ${source.definition.value}.`,
|
|
25
|
+
"@DuplojsLangDataStructure/string-type": () => "Expected a string.",
|
|
26
|
+
"@DuplojsLangDataStructure/string-literal-type": (source) => `Expected ${stringify(source.definition.value)}.`,
|
|
27
|
+
"@DuplojsLangDataStructure/time-type": () => "Expected a DuploJS time.",
|
|
28
|
+
"@DuplojsLangDataStructure/undefined-type": () => "Expected undefined.",
|
|
29
|
+
"@DuplojsLangDataStructure/absolute-path-constraint": () => "Expected an absolute path.",
|
|
30
|
+
"@DuplojsLangDataStructure/allowed-characters-constraint": (source) => `Expected a string containing only characters from ${join(coalescing(source.definition.charactersRange), ", ")}.`,
|
|
31
|
+
"@DuplojsLangDataStructure/array-length-equal-constraint": (source) => `Expected an array containing exactly ${source.definition.length} elements.`,
|
|
32
|
+
"@DuplojsLangDataStructure/between-than-constraint": (source) => `Expected a number greater than ${source.definition.greater} and less than ${source.definition.less}.`,
|
|
33
|
+
"@DuplojsLangDataStructure/between-than-or-equal-constraint": (source) => `Expected a number greater than or equal to ${source.definition.greater} and less than or equal to ${source.definition.less}.`,
|
|
34
|
+
"@DuplojsLangDataStructure/email-constraint": () => "Expected a valid email address.",
|
|
35
|
+
"@DuplojsLangDataStructure/even-constraint": () => "Expected an even number.",
|
|
36
|
+
"@DuplojsLangDataStructure/greater-than-constraint": (source) => `Expected a number greater than ${source.definition.threshold}.`,
|
|
37
|
+
"@DuplojsLangDataStructure/greater-than-or-equal-constraint": (source) => `Expected a number greater than or equal to ${source.definition.threshold}.`,
|
|
38
|
+
"@DuplojsLangDataStructure/integer-constraint": () => "Expected an integer.",
|
|
39
|
+
"@DuplojsLangDataStructure/less-than-constraint": (source) => `Expected a number less than ${source.definition.threshold}.`,
|
|
40
|
+
"@DuplojsLangDataStructure/less-than-or-equal-constraint": (source) => `Expected a number less than or equal to ${source.definition.threshold}.`,
|
|
41
|
+
"@DuplojsLangDataStructure/max-characters-constraint": (source) => `Expected a string containing at most ${source.definition.max} characters.`,
|
|
42
|
+
"@DuplojsLangDataStructure/max-elements-constraint": (source) => `Expected an array containing at most ${source.definition.max} elements.`,
|
|
43
|
+
"@DuplojsLangDataStructure/min-characters-constraint": (source) => `Expected a string containing at least ${source.definition.min} characters.`,
|
|
44
|
+
"@DuplojsLangDataStructure/min-elements-constraint": (source) => `Expected an array containing at least ${source.definition.min} elements.`,
|
|
45
|
+
"@DuplojsLangDataStructure/multiple-of-constraint": (source) => `Expected a multiple of ${source.definition.multiple}.`,
|
|
46
|
+
"@DuplojsLangDataStructure/negative-constraint": () => "Expected a number less than or equal to zero.",
|
|
47
|
+
"@DuplojsLangDataStructure/not-empty-constraint": () => "Expected a non-empty string.",
|
|
48
|
+
"@DuplojsLangDataStructure/not-zero-constraint": () => "Expected a non-zero number.",
|
|
49
|
+
"@DuplojsLangDataStructure/number-in-string-constraint": () => "Expected a string representing a number.",
|
|
50
|
+
"@DuplojsLangDataStructure/odd-constraint": () => "Expected an odd number.",
|
|
51
|
+
"@DuplojsLangDataStructure/path-constraint": () => "Expected a valid path.",
|
|
52
|
+
"@DuplojsLangDataStructure/positive-constraint": () => "Expected a number greater than or equal to zero.",
|
|
53
|
+
"@DuplojsLangDataStructure/refine-constraint": () => "Expected a value satisfying the custom refinement.",
|
|
54
|
+
"@DuplojsLangDataStructure/regex-constraint": (source) => `Expected a string matching ${source.definition.regex.toString()}.`,
|
|
55
|
+
"@DuplojsLangDataStructure/safe-constraint": () => "Expected a number strictly between Number.MIN_SAFE_INTEGER and Number.MAX_SAFE_INTEGER.",
|
|
56
|
+
"@DuplojsLangDataStructure/segment-path-constraint": () => "Expected a valid path segment.",
|
|
57
|
+
"@DuplojsLangDataStructure/strict-negative-constraint": () => "Expected a number less than zero.",
|
|
58
|
+
"@DuplojsLangDataStructure/strict-positive-constraint": () => "Expected a number greater than zero.",
|
|
59
|
+
"@DuplojsLangDataStructure/string-length-equal-constraint": (source) => `Expected a string containing exactly ${source.definition.length} characters.`,
|
|
60
|
+
"@DuplojsLangDataStructure/trimmed-constraint": () => "Expected a string without leading or trailing whitespace.",
|
|
61
|
+
"@DuplojsLangDataStructure/url-constraint": () => "Expected a valid URL.",
|
|
62
|
+
"@DuplojsLangDataStructure/uuid-constraint": () => "Expected a valid UUID.",
|
|
63
|
+
"@DuplojsLangModeling/entity-structure": () => "Expected a valid entity object.",
|
|
64
|
+
"@DuplojsLangModeling/new-type-structure": () => "Expected a value matching the branded type.",
|
|
65
|
+
"@DuplojsLangModeling/tagged-object-structure": (source) => `Expected a plain object matching one of the tagged variants of ${source.name}.`
|
|
66
|
+
};
|
|
67
|
+
const createDefaultCodecErrorMessage = (codecName, encodedValueDescription, decodedValueDescription) => (_codec, issue) => {
|
|
68
|
+
if (issue.from === "predicate") return encodeIssueKind.has(issue) ? `The ${codecName} codec must produce ${encodedValueDescription}.` : `Expected ${encodedValueDescription} for the ${codecName} codec.`;
|
|
69
|
+
if (issue.from === "encoding") return `The ${codecName} codec could not encode ${decodedValueDescription}.`;
|
|
70
|
+
if (issue.from === "decoding") return `The ${codecName} codec could not decode the value as ${decodedValueDescription}.`;
|
|
71
|
+
return `The ${codecName} codec encountered an external error while ${encodeIssueKind.has(issue) ? "encoding" : "decoding"}.`;
|
|
72
|
+
};
|
|
73
|
+
const defaultErrorInterpreterCodecDictionary = [
|
|
74
|
+
[codecsJson.definition.bigint, createDefaultCodecErrorMessage("JSON bigint", "a string", "a bigint")],
|
|
75
|
+
[codecsJson.definition.date, createDefaultCodecErrorMessage("JSON date", "a string", "a DuploJS date")],
|
|
76
|
+
[codecsJson.definition.time, createDefaultCodecErrorMessage("JSON time", "a string", "a DuploJS time")],
|
|
77
|
+
[codecsString.definition.bigint, createDefaultCodecErrorMessage("string bigint", "a string", "a bigint")],
|
|
78
|
+
[codecsString.definition.boolean, createDefaultCodecErrorMessage("string boolean", "the string \"true\" or \"false\"", "a boolean")],
|
|
79
|
+
[codecsString.definition.date, createDefaultCodecErrorMessage("string date", "a string", "a DuploJS date")],
|
|
80
|
+
[codecsString.definition.null, createDefaultCodecErrorMessage("string null", "the string \"null\"", "null")],
|
|
81
|
+
[codecsString.definition.number, createDefaultCodecErrorMessage("string number", "a string representing a number", "a finite number")],
|
|
82
|
+
[codecsString.definition.time, createDefaultCodecErrorMessage("string time", "a string", "a DuploJS time")],
|
|
83
|
+
[codecsString.definition.undefined, createDefaultCodecErrorMessage("string undefined", "the string \"undefined\"", "undefined")]
|
|
84
|
+
];
|
|
85
|
+
//#endregion
|
|
86
|
+
export { defaultErrorInterpreterCodecDictionary, defaultErrorInterpreterDataStructureDictionary };
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
const require_base = require("
|
|
2
|
-
const require_entries = require("
|
|
3
|
-
const require_entry = require("
|
|
4
|
-
const require_map = require("
|
|
5
|
-
const require_reduce = require("
|
|
6
|
-
const require_pipe = require("
|
|
7
|
-
const
|
|
8
|
-
//#region scripts/dataStructure/common/
|
|
9
|
-
const kindNamespaceName = "DuplojsLangDataStructure";
|
|
1
|
+
const require_base = require("../../../kind/base.cjs");
|
|
2
|
+
const require_entries = require("../../../object/entries.cjs");
|
|
3
|
+
const require_entry = require("../../../object/entry.cjs");
|
|
4
|
+
const require_map = require("../../../array/map.cjs");
|
|
5
|
+
const require_reduce = require("../../../array/reduce.cjs");
|
|
6
|
+
const require_pipe = require("../../../common/pipe.cjs");
|
|
7
|
+
const require_base$1 = require("./base.cjs");
|
|
8
|
+
//#region scripts/dataStructure/common/error/interpreter.ts
|
|
10
9
|
function createErrorInterpreter(structureDictionary = {}, codecDictionary = []) {
|
|
11
|
-
const formattedStructureDictionary = require_pipe.pipe(structureDictionary, require_entries.entries, require_map.map(([key, value]) => require_entry.entry(`${require_base.keyKindPrefix}
|
|
10
|
+
const formattedStructureDictionary = require_pipe.pipe(structureDictionary, require_entries.entries, require_map.map(([key, value]) => require_entry.entry(`${require_base.keyKindPrefix}${key}`, value)));
|
|
12
11
|
const getInterpretedMessageStructure = (structure, issue) => require_reduce.reduce(formattedStructureDictionary, require_reduce.reduceFrom(void 0), ({ element: [key, getMessage], next, exit }) => getMessage && key in structure ? exit(getMessage(structure, issue)) : next(void 0));
|
|
13
12
|
const getInterpretedMessageCodec = (codec, issue) => require_reduce.reduce(codecDictionary, require_reduce.reduceFrom(void 0), ({ element: [currentCodec, message], next, exit }) => currentCodec === codec ? exit(message(codec, issue)) : next(void 0));
|
|
14
13
|
return (error) => require_map.map(error.issues, (issue) => {
|
|
15
|
-
if (
|
|
14
|
+
if (require_base$1.issueKind.has(issue)) {
|
|
16
15
|
const source = issue.getSource();
|
|
17
16
|
const subSource = issue.getSubSource?.();
|
|
18
17
|
return {
|
|
@@ -25,7 +24,7 @@ function createErrorInterpreter(structureDictionary = {}, codecDictionary = [])
|
|
|
25
24
|
}
|
|
26
25
|
};
|
|
27
26
|
}
|
|
28
|
-
if (
|
|
27
|
+
if (require_base$1.encodeIssueKind.has(issue)) return {
|
|
29
28
|
...issue,
|
|
30
29
|
interpretedMessage: {
|
|
31
30
|
source: issue.message,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Structure, Structures } from '../../structure';
|
|
2
|
+
import { Type, Types } from '../../type';
|
|
3
|
+
import { Constraint, Constraints } from '../../constraint';
|
|
4
|
+
import { Error, DecodeIssue, EncodeIssue, Issue } from './base';
|
|
5
|
+
import { Codec } from '../codec';
|
|
6
|
+
import * as DKind from '../../../kind';
|
|
7
|
+
import * as DCommon from '../../../common';
|
|
8
|
+
export interface InterpretedMessage {
|
|
9
|
+
source?: string;
|
|
10
|
+
interpretedSource?: string;
|
|
11
|
+
subSource?: string;
|
|
12
|
+
interpretedSubSource?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface InterpretedIssue extends Issue {
|
|
15
|
+
interpretedMessage: InterpretedMessage;
|
|
16
|
+
}
|
|
17
|
+
export interface InterpretedEncodedIssue extends EncodeIssue {
|
|
18
|
+
interpretedMessage: InterpretedMessage;
|
|
19
|
+
}
|
|
20
|
+
export interface InterpretedDecodedIssue extends DecodeIssue {
|
|
21
|
+
interpretedMessage: InterpretedMessage;
|
|
22
|
+
}
|
|
23
|
+
export type InterpretedIssues = (InterpretedIssue | InterpretedEncodedIssue | InterpretedDecodedIssue);
|
|
24
|
+
export type StructureDictionaryParams = DCommon.SimplifyTopLevel<Omit<{
|
|
25
|
+
[DataStructure in (Types | Structures | Constraints) as DKind.GetName<DataStructure>]?: (structure: DataStructure, issue: Issue) => string;
|
|
26
|
+
}, DKind.GetName<Type> | DKind.GetName<Structure> | DKind.GetName<Constraint>>>;
|
|
27
|
+
export type CodecDictionaryParams = [
|
|
28
|
+
Codec,
|
|
29
|
+
(codec: Codec, issue: EncodeIssue | DecodeIssue) => string
|
|
30
|
+
][];
|
|
31
|
+
export declare function createErrorInterpreter(structureDictionary?: StructureDictionaryParams, codecDictionary?: CodecDictionaryParams): (error: Error) => readonly InterpretedIssues[];
|
|
32
|
+
export type ErrorInterpreter = ReturnType<typeof createErrorInterpreter>;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { keyKindPrefix } from "
|
|
2
|
-
import { entries } from "
|
|
3
|
-
import { entry } from "
|
|
4
|
-
import { map } from "
|
|
5
|
-
import { reduce, reduceFrom } from "
|
|
6
|
-
import { pipe } from "
|
|
7
|
-
import { encodeIssueKind, issueKind } from "./
|
|
8
|
-
//#region scripts/dataStructure/common/
|
|
9
|
-
const kindNamespaceName = "DuplojsLangDataStructure";
|
|
1
|
+
import { keyKindPrefix } from "../../../kind/base.mjs";
|
|
2
|
+
import { entries } from "../../../object/entries.mjs";
|
|
3
|
+
import { entry } from "../../../object/entry.mjs";
|
|
4
|
+
import { map } from "../../../array/map.mjs";
|
|
5
|
+
import { reduce, reduceFrom } from "../../../array/reduce.mjs";
|
|
6
|
+
import { pipe } from "../../../common/pipe.mjs";
|
|
7
|
+
import { encodeIssueKind, issueKind } from "./base.mjs";
|
|
8
|
+
//#region scripts/dataStructure/common/error/interpreter.ts
|
|
10
9
|
function createErrorInterpreter(structureDictionary = {}, codecDictionary = []) {
|
|
11
|
-
const formattedStructureDictionary = pipe(structureDictionary, entries, map(([key, value]) => entry(`${keyKindPrefix}
|
|
10
|
+
const formattedStructureDictionary = pipe(structureDictionary, entries, map(([key, value]) => entry(`${keyKindPrefix}${key}`, value)));
|
|
12
11
|
const getInterpretedMessageStructure = (structure, issue) => reduce(formattedStructureDictionary, reduceFrom(void 0), ({ element: [key, getMessage], next, exit }) => getMessage && key in structure ? exit(getMessage(structure, issue)) : next(void 0));
|
|
13
12
|
const getInterpretedMessageCodec = (codec, issue) => reduce(codecDictionary, reduceFrom(void 0), ({ element: [currentCodec, message], next, exit }) => currentCodec === codec ? exit(message(codec, issue)) : next(void 0));
|
|
14
13
|
return (error) => map(error.issues, (issue) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Constraint } from '../base';
|
|
2
2
|
import type * as DDefaults from "../defaults";
|
|
3
3
|
export interface ConstraintsStore {
|
|
4
|
+
base: Constraint;
|
|
4
5
|
allowedCharacters: DDefaults.AllowedCharactersConstraint;
|
|
5
6
|
email: DDefaults.EmailConstraint;
|
|
6
7
|
url: DDefaults.UrlConstraint;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FundamentalType } from '../base';
|
|
2
2
|
import { TheBigint, TheBoolean, TheDate, TheNull, TheNumber, TheString, TheTime, TheUndefined } from '../defaults';
|
|
3
3
|
export interface FundamentalTypesStore {
|
|
4
|
+
base: FundamentalType;
|
|
4
5
|
bigint: TheBigint;
|
|
5
6
|
boolean: TheBoolean;
|
|
6
7
|
date: TheDate;
|
|
@@ -2,7 +2,7 @@ const require_object = require("../structure/defaults/object.cjs");
|
|
|
2
2
|
//#region scripts/dataStructure/helpers/extend.ts
|
|
3
3
|
function extend(structure, shape) {
|
|
4
4
|
return require_object.ObjectStructure({
|
|
5
|
-
...Object.fromEntries(structure.definition.
|
|
5
|
+
...Object.fromEntries(structure.definition.optimizedShape.value.map((entry) => [entry.key, entry.value])),
|
|
6
6
|
...shape
|
|
7
7
|
}, []);
|
|
8
8
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ObjectStructure, ShapeObjectStructureValue, ShapeObjectStructure, StructureInitialValue } from '../structure';
|
|
2
2
|
import type * as DObject from '../../object';
|
|
3
|
-
export declare function extend<GenericObjectStructure extends ObjectStructure, GenericShape extends ShapeObjectStructure>(structure: GenericObjectStructure, shape: GenericShape): ObjectStructure<DObject.
|
|
3
|
+
export declare function extend<GenericObjectStructure extends ObjectStructure, GenericShape extends ShapeObjectStructure>(structure: GenericObjectStructure, shape: GenericShape): ObjectStructure<DObject.Assign<Extract<StructureInitialValue<GenericObjectStructure>, object>, ShapeObjectStructureValue<GenericShape>>, readonly []>;
|
|
@@ -2,7 +2,7 @@ import { ObjectStructure } from "../structure/defaults/object.mjs";
|
|
|
2
2
|
//#region scripts/dataStructure/helpers/extend.ts
|
|
3
3
|
function extend(structure, shape) {
|
|
4
4
|
return ObjectStructure({
|
|
5
|
-
...Object.fromEntries(structure.definition.
|
|
5
|
+
...Object.fromEntries(structure.definition.optimizedShape.value.map((entry) => [entry.key, entry.value])),
|
|
6
6
|
...shape
|
|
7
7
|
}, []);
|
|
8
8
|
}
|
|
@@ -14,7 +14,7 @@ function partialStructure(structure) {
|
|
|
14
14
|
return require_union$1.union([require_undefined.undefined(), structure]);
|
|
15
15
|
}
|
|
16
16
|
function partial(structure) {
|
|
17
|
-
return require_object.object(Object.fromEntries(structure.definition.
|
|
17
|
+
return require_object.object(Object.fromEntries(structure.definition.optimizedShape.value.map((entry) => [entry.key, require_lazy$1.lazy(() => partialStructure(entry.value))])));
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
20
|
exports.partial = partial;
|
|
@@ -14,7 +14,7 @@ function partialStructure(structure) {
|
|
|
14
14
|
return union([undefinedHelper(), structure]);
|
|
15
15
|
}
|
|
16
16
|
function partial(structure) {
|
|
17
|
-
return object(Object.fromEntries(structure.definition.
|
|
17
|
+
return object(Object.fromEntries(structure.definition.optimizedShape.value.map((entry) => [entry.key, lazy(() => partialStructure(entry.value))])));
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
20
|
export { partial };
|
|
@@ -15,7 +15,7 @@ function requiredStructure(structure) {
|
|
|
15
15
|
return require_union$1.union(values);
|
|
16
16
|
}
|
|
17
17
|
function required(structure) {
|
|
18
|
-
return require_object.object(Object.fromEntries(structure.definition.
|
|
18
|
+
return require_object.object(Object.fromEntries(structure.definition.optimizedShape.value.map((entry) => [entry.key, require_lazy$1.lazy(() => requiredStructure(entry.value))])));
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
exports.required = required;
|
|
@@ -15,7 +15,7 @@ function requiredStructure(structure) {
|
|
|
15
15
|
return union(values);
|
|
16
16
|
}
|
|
17
17
|
function required(structure) {
|
|
18
|
-
return object(Object.fromEntries(structure.definition.
|
|
18
|
+
return object(Object.fromEntries(structure.definition.optimizedShape.value.map((entry) => [entry.key, lazy(() => requiredStructure(entry.value))])));
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
export { required };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const require_identifier = require("../structure/identifier.cjs");
|
|
2
|
+
const require_type = require("../structure/defaults/type.cjs");
|
|
3
|
+
const require_identifier$1 = require("../type/identifier.cjs");
|
|
4
|
+
//#region scripts/dataStructure/helpers/typeStructureIdentifier.ts
|
|
5
|
+
function typeStructureIdentifier(...args) {
|
|
6
|
+
if (args.length === 1) {
|
|
7
|
+
const [typeKind] = args;
|
|
8
|
+
return (structure) => typeStructureIdentifier(structure, typeKind);
|
|
9
|
+
}
|
|
10
|
+
const [structure, typeKind] = args;
|
|
11
|
+
return require_identifier.structureIdentifier(structure, require_type.typeStructureKind) && require_identifier$1.typeIdentifier(structure.definition.type, typeKind);
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
exports.typeStructureIdentifier = typeStructureIdentifier;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TypeStructure, Structure } from '../structure';
|
|
2
|
+
import { TypeValue, typeIdentifier, Types } from '../type';
|
|
3
|
+
import type * as DKind from '../../kind';
|
|
4
|
+
import type * as DArray from '../../array';
|
|
5
|
+
export declare function typeStructureIdentifier<GenericTypeKindHandler extends DArray.Unwrap<Parameters<typeof typeIdentifier>[1]>>(typeKind: GenericTypeKindHandler | GenericTypeKindHandler[]): (structure: Structure) => structure is TypeStructure<TypeValue<Extract<Types, DKind.Kind<GenericTypeKindHandler>>>>;
|
|
6
|
+
export declare function typeStructureIdentifier<GenericTypeKindHandler extends DArray.Unwrap<Parameters<typeof typeIdentifier>[1]>>(structure: Structure, typeKind: GenericTypeKindHandler | GenericTypeKindHandler[]): structure is TypeStructure<TypeValue<Extract<Types, DKind.Kind<GenericTypeKindHandler>>>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { structureIdentifier } from "../structure/identifier.mjs";
|
|
2
|
+
import { typeStructureKind } from "../structure/defaults/type.mjs";
|
|
3
|
+
import { typeIdentifier } from "../type/identifier.mjs";
|
|
4
|
+
//#region scripts/dataStructure/helpers/typeStructureIdentifier.ts
|
|
5
|
+
function typeStructureIdentifier(...args) {
|
|
6
|
+
if (args.length === 1) {
|
|
7
|
+
const [typeKind] = args;
|
|
8
|
+
return (structure) => typeStructureIdentifier(structure, typeKind);
|
|
9
|
+
}
|
|
10
|
+
const [structure, typeKind] = args;
|
|
11
|
+
return structureIdentifier(structure, typeStructureKind) && typeIdentifier(structure.definition.type, typeKind);
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { typeStructureIdentifier };
|
|
@@ -14,9 +14,10 @@ const require_undefined = require("./fundamentalType/defaults/undefined.cjs");
|
|
|
14
14
|
const require_identifier = require("./fundamentalType/identifier.cjs");
|
|
15
15
|
const require_json = require("./common/codec/defaults/json.cjs");
|
|
16
16
|
const require_string$1 = require("./common/codec/defaults/string.cjs");
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
17
|
+
const require_base$2 = require("./common/error/base.cjs");
|
|
18
|
+
const require_interpreter = require("./common/error/interpreter.cjs");
|
|
19
|
+
const require_defaultInterpreter = require("./common/error/defaultInterpreter.cjs");
|
|
20
|
+
const require_base$3 = require("./constraint/base.cjs");
|
|
20
21
|
const require_absolutePath = require("./constraint/defaults/absolutePath.cjs");
|
|
21
22
|
const require_allowedCharacters = require("./constraint/defaults/allowedCharacters.cjs");
|
|
22
23
|
const require_arrayLengthEqual = require("./constraint/defaults/arrayLengthEqual.cjs");
|
|
@@ -54,7 +55,7 @@ const require_regex = require("./constraint/defaults/regex.cjs");
|
|
|
54
55
|
const require_identifier$1 = require("./constraint/identifier.cjs");
|
|
55
56
|
const require_absolutePath$1 = require("./helpers/absolutePath.cjs");
|
|
56
57
|
const require_allowedCharacters$1 = require("./helpers/allowedCharacters.cjs");
|
|
57
|
-
const require_base$
|
|
58
|
+
const require_base$4 = require("./structure/base.cjs");
|
|
58
59
|
const require_array = require("./structure/defaults/array.cjs");
|
|
59
60
|
const require_identifier$2 = require("./structure/identifier.cjs");
|
|
60
61
|
const require_lazy = require("./structure/defaults/lazy.cjs");
|
|
@@ -62,7 +63,7 @@ const require_nonEncodableString = require("./structure/defaults/nonEncodableStr
|
|
|
62
63
|
const require_object = require("./structure/defaults/object.cjs");
|
|
63
64
|
const require_union = require("./structure/defaults/union.cjs");
|
|
64
65
|
const require_type = require("./structure/defaults/type.cjs");
|
|
65
|
-
const require_base$
|
|
66
|
+
const require_base$5 = require("./type/base.cjs");
|
|
66
67
|
const require_bigint$1 = require("./type/defaults/bigint.cjs");
|
|
67
68
|
const require_bigintLiteral = require("./type/defaults/bigintLiteral.cjs");
|
|
68
69
|
const require_boolean$1 = require("./type/defaults/boolean.cjs");
|
|
@@ -130,6 +131,7 @@ const require_string$3 = require("./helpers/string.cjs");
|
|
|
130
131
|
const require_stringLengthEqual$1 = require("./helpers/stringLengthEqual.cjs");
|
|
131
132
|
const require_time$2 = require("./helpers/time.cjs");
|
|
132
133
|
const require_trimmed$1 = require("./helpers/trimmed.cjs");
|
|
134
|
+
const require_typeStructureIdentifier = require("./helpers/typeStructureIdentifier.cjs");
|
|
133
135
|
const require_unwrapLazy = require("./helpers/unwrapLazy.cjs");
|
|
134
136
|
const require_url$1 = require("./helpers/url.cjs");
|
|
135
137
|
const require_uuid$1 = require("./helpers/uuid.cjs");
|
|
@@ -145,9 +147,11 @@ var dataStructure_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
145
147
|
BigintType: () => require_bigint$1.BigintType,
|
|
146
148
|
BooleanLiteralType: () => require_booleanLiteral.BooleanLiteralType,
|
|
147
149
|
BooleanType: () => require_boolean$1.BooleanType,
|
|
148
|
-
ConstraintBase: () => require_base$
|
|
150
|
+
ConstraintBase: () => require_base$3.ConstraintBase,
|
|
149
151
|
DateType: () => require_date$1.DateType,
|
|
150
152
|
EmailConstraint: () => require_email.EmailConstraint,
|
|
153
|
+
Error: () => require_base$2.Error,
|
|
154
|
+
ErrorPromise: () => require_base$2.ErrorPromise,
|
|
151
155
|
ErrorSymbol: () => require_resultSymbol.ErrorSymbol,
|
|
152
156
|
EvenConstraint: () => require_even.EvenConstraint,
|
|
153
157
|
GreaterThanConstraint: () => require_greaterThan.GreaterThanConstraint,
|
|
@@ -183,7 +187,7 @@ var dataStructure_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
183
187
|
StringLengthEqualConstraint: () => require_stringLengthEqual.StringLengthEqualConstraint,
|
|
184
188
|
StringLiteralType: () => require_stringLiteral.StringLiteralType,
|
|
185
189
|
StringType: () => require_string$2.StringType,
|
|
186
|
-
StructureClass: () => require_base$
|
|
190
|
+
StructureClass: () => require_base$4.StructureClass,
|
|
187
191
|
SuccessSymbol: () => require_resultSymbol.SuccessSymbol,
|
|
188
192
|
TheBigint: () => require_bigint.TheBigint,
|
|
189
193
|
TheBoolean: () => require_boolean.TheBoolean,
|
|
@@ -225,24 +229,26 @@ var dataStructure_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
225
229
|
codecsKind: () => require_base.codecsKind,
|
|
226
230
|
codecsString: () => require_string$1.codecsString,
|
|
227
231
|
constraintIdentifier: () => require_identifier$1.constraintIdentifier,
|
|
228
|
-
constraintKind: () => require_base$
|
|
232
|
+
constraintKind: () => require_base$3.constraintKind,
|
|
229
233
|
createCodec: () => require_base.createCodec,
|
|
230
234
|
createCodecs: () => require_base.createCodecs,
|
|
231
|
-
createConstraint: () => require_base$
|
|
232
|
-
createErrorHandler: () =>
|
|
233
|
-
createErrorInterpreter: () =>
|
|
235
|
+
createConstraint: () => require_base$3.createConstraint,
|
|
236
|
+
createErrorHandler: () => require_base$2.createErrorHandler,
|
|
237
|
+
createErrorInterpreter: () => require_interpreter.createErrorInterpreter,
|
|
234
238
|
createFundamentalType: () => require_base$1.createFundamentalType,
|
|
235
|
-
createGetErrorHandler: () =>
|
|
239
|
+
createGetErrorHandler: () => require_base$2.createGetErrorHandler,
|
|
236
240
|
createKind: () => require_kind.createKind,
|
|
237
|
-
createStructure: () => require_base$
|
|
238
|
-
createType: () => require_base$
|
|
241
|
+
createStructure: () => require_base$4.createStructure,
|
|
242
|
+
createType: () => require_base$5.createType,
|
|
239
243
|
date: () => require_date$2.date,
|
|
240
244
|
dateFundamentalTypeKind: () => require_date.dateFundamentalTypeKind,
|
|
241
245
|
dateTypeKind: () => require_date$1.dateTypeKind,
|
|
242
|
-
decodeIssueKind: () =>
|
|
246
|
+
decodeIssueKind: () => require_base$2.decodeIssueKind,
|
|
247
|
+
defaultErrorInterpreterCodecDictionary: () => require_defaultInterpreter.defaultErrorInterpreterCodecDictionary,
|
|
248
|
+
defaultErrorInterpreterDataStructureDictionary: () => require_defaultInterpreter.defaultErrorInterpreterDataStructureDictionary,
|
|
243
249
|
email: () => require_email$1.email,
|
|
244
250
|
emailConstraintKind: () => require_email.emailConstraintKind,
|
|
245
|
-
encodeIssueKind: () =>
|
|
251
|
+
encodeIssueKind: () => require_base$2.encodeIssueKind,
|
|
246
252
|
even: () => require_even$1.even,
|
|
247
253
|
evenConstraintKind: () => require_even.evenConstraintKind,
|
|
248
254
|
extend: () => require_extend.extend,
|
|
@@ -258,7 +264,7 @@ var dataStructure_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
258
264
|
isNullable: () => require_isNullable.isNullable,
|
|
259
265
|
isOptional: () => require_isOptional.isOptional,
|
|
260
266
|
isUndefinedStructure: () => require_isUndefinedStructure.isUndefinedStructure,
|
|
261
|
-
issueKind: () =>
|
|
267
|
+
issueKind: () => require_base$2.issueKind,
|
|
262
268
|
lazy: () => require_lazy$1.lazy,
|
|
263
269
|
lazyStructureKind: () => require_lazy.lazyStructureKind,
|
|
264
270
|
lessThan: () => require_lessThan$1.lessThan,
|
|
@@ -325,14 +331,15 @@ var dataStructure_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
325
331
|
stringLiteralTypeKind: () => require_stringLiteral.stringLiteralTypeKind,
|
|
326
332
|
stringTypeKind: () => require_string$2.stringTypeKind,
|
|
327
333
|
structureIdentifier: () => require_identifier$2.structureIdentifier,
|
|
328
|
-
structureKind: () => require_base$
|
|
334
|
+
structureKind: () => require_base$4.structureKind,
|
|
329
335
|
time: () => require_time$2.time,
|
|
330
336
|
timeFundamentalTypeKind: () => require_time.timeFundamentalTypeKind,
|
|
331
337
|
timeTypeKind: () => require_time$1.timeTypeKind,
|
|
332
338
|
trimmed: () => require_trimmed$1.trimmed,
|
|
333
339
|
trimmedConstraintKind: () => require_trimmed.trimmedConstraintKind,
|
|
334
340
|
typeIdentifier: () => require_identifier$3.typeIdentifier,
|
|
335
|
-
typeKind: () => require_base$
|
|
341
|
+
typeKind: () => require_base$5.typeKind,
|
|
342
|
+
typeStructureIdentifier: () => require_typeStructureIdentifier.typeStructureIdentifier,
|
|
336
343
|
typeStructureKind: () => require_type.typeStructureKind,
|
|
337
344
|
undefined: () => require_undefined$2.undefined,
|
|
338
345
|
undefinedFundamentalTypeKind: () => require_undefined.undefinedFundamentalTypeKind,
|
|
@@ -356,9 +363,11 @@ exports.BigintLiteralType = require_bigintLiteral.BigintLiteralType;
|
|
|
356
363
|
exports.BigintType = require_bigint$1.BigintType;
|
|
357
364
|
exports.BooleanLiteralType = require_booleanLiteral.BooleanLiteralType;
|
|
358
365
|
exports.BooleanType = require_boolean$1.BooleanType;
|
|
359
|
-
exports.ConstraintBase = require_base$
|
|
366
|
+
exports.ConstraintBase = require_base$3.ConstraintBase;
|
|
360
367
|
exports.DateType = require_date$1.DateType;
|
|
361
368
|
exports.EmailConstraint = require_email.EmailConstraint;
|
|
369
|
+
exports.Error = require_base$2.Error;
|
|
370
|
+
exports.ErrorPromise = require_base$2.ErrorPromise;
|
|
362
371
|
exports.ErrorSymbol = require_resultSymbol.ErrorSymbol;
|
|
363
372
|
exports.EvenConstraint = require_even.EvenConstraint;
|
|
364
373
|
exports.GreaterThanConstraint = require_greaterThan.GreaterThanConstraint;
|
|
@@ -394,7 +403,7 @@ exports.StrictPositiveConstraint = require_strictPositive.StrictPositiveConstrai
|
|
|
394
403
|
exports.StringLengthEqualConstraint = require_stringLengthEqual.StringLengthEqualConstraint;
|
|
395
404
|
exports.StringLiteralType = require_stringLiteral.StringLiteralType;
|
|
396
405
|
exports.StringType = require_string$2.StringType;
|
|
397
|
-
exports.StructureClass = require_base$
|
|
406
|
+
exports.StructureClass = require_base$4.StructureClass;
|
|
398
407
|
exports.SuccessSymbol = require_resultSymbol.SuccessSymbol;
|
|
399
408
|
exports.TheBigint = require_bigint.TheBigint;
|
|
400
409
|
exports.TheBoolean = require_boolean.TheBoolean;
|
|
@@ -436,17 +445,17 @@ exports.codecsJson = require_json.codecsJson;
|
|
|
436
445
|
exports.codecsKind = require_base.codecsKind;
|
|
437
446
|
exports.codecsString = require_string$1.codecsString;
|
|
438
447
|
exports.constraintIdentifier = require_identifier$1.constraintIdentifier;
|
|
439
|
-
exports.constraintKind = require_base$
|
|
448
|
+
exports.constraintKind = require_base$3.constraintKind;
|
|
440
449
|
exports.createCodec = require_base.createCodec;
|
|
441
450
|
exports.createCodecs = require_base.createCodecs;
|
|
442
|
-
exports.createConstraint = require_base$
|
|
443
|
-
exports.createErrorHandler =
|
|
444
|
-
exports.createErrorInterpreter =
|
|
451
|
+
exports.createConstraint = require_base$3.createConstraint;
|
|
452
|
+
exports.createErrorHandler = require_base$2.createErrorHandler;
|
|
453
|
+
exports.createErrorInterpreter = require_interpreter.createErrorInterpreter;
|
|
445
454
|
exports.createFundamentalType = require_base$1.createFundamentalType;
|
|
446
|
-
exports.createGetErrorHandler =
|
|
455
|
+
exports.createGetErrorHandler = require_base$2.createGetErrorHandler;
|
|
447
456
|
exports.createKind = require_kind.createKind;
|
|
448
|
-
exports.createStructure = require_base$
|
|
449
|
-
exports.createType = require_base$
|
|
457
|
+
exports.createStructure = require_base$4.createStructure;
|
|
458
|
+
exports.createType = require_base$5.createType;
|
|
450
459
|
Object.defineProperty(exports, "dataStructure_exports", {
|
|
451
460
|
enumerable: true,
|
|
452
461
|
get: function() {
|
|
@@ -456,10 +465,12 @@ Object.defineProperty(exports, "dataStructure_exports", {
|
|
|
456
465
|
exports.date = require_date$2.date;
|
|
457
466
|
exports.dateFundamentalTypeKind = require_date.dateFundamentalTypeKind;
|
|
458
467
|
exports.dateTypeKind = require_date$1.dateTypeKind;
|
|
459
|
-
exports.decodeIssueKind =
|
|
468
|
+
exports.decodeIssueKind = require_base$2.decodeIssueKind;
|
|
469
|
+
exports.defaultErrorInterpreterCodecDictionary = require_defaultInterpreter.defaultErrorInterpreterCodecDictionary;
|
|
470
|
+
exports.defaultErrorInterpreterDataStructureDictionary = require_defaultInterpreter.defaultErrorInterpreterDataStructureDictionary;
|
|
460
471
|
exports.email = require_email$1.email;
|
|
461
472
|
exports.emailConstraintKind = require_email.emailConstraintKind;
|
|
462
|
-
exports.encodeIssueKind =
|
|
473
|
+
exports.encodeIssueKind = require_base$2.encodeIssueKind;
|
|
463
474
|
exports.even = require_even$1.even;
|
|
464
475
|
exports.evenConstraintKind = require_even.evenConstraintKind;
|
|
465
476
|
exports.extend = require_extend.extend;
|
|
@@ -475,7 +486,7 @@ exports.isNullStructure = require_isNullStructure.isNullStructure;
|
|
|
475
486
|
exports.isNullable = require_isNullable.isNullable;
|
|
476
487
|
exports.isOptional = require_isOptional.isOptional;
|
|
477
488
|
exports.isUndefinedStructure = require_isUndefinedStructure.isUndefinedStructure;
|
|
478
|
-
exports.issueKind =
|
|
489
|
+
exports.issueKind = require_base$2.issueKind;
|
|
479
490
|
exports.lazy = require_lazy$1.lazy;
|
|
480
491
|
exports.lazyStructureKind = require_lazy.lazyStructureKind;
|
|
481
492
|
exports.lessThan = require_lessThan$1.lessThan;
|
|
@@ -542,14 +553,15 @@ exports.stringLengthEqualConstraintKind = require_stringLengthEqual.stringLength
|
|
|
542
553
|
exports.stringLiteralTypeKind = require_stringLiteral.stringLiteralTypeKind;
|
|
543
554
|
exports.stringTypeKind = require_string$2.stringTypeKind;
|
|
544
555
|
exports.structureIdentifier = require_identifier$2.structureIdentifier;
|
|
545
|
-
exports.structureKind = require_base$
|
|
556
|
+
exports.structureKind = require_base$4.structureKind;
|
|
546
557
|
exports.time = require_time$2.time;
|
|
547
558
|
exports.timeFundamentalTypeKind = require_time.timeFundamentalTypeKind;
|
|
548
559
|
exports.timeTypeKind = require_time$1.timeTypeKind;
|
|
549
560
|
exports.trimmed = require_trimmed$1.trimmed;
|
|
550
561
|
exports.trimmedConstraintKind = require_trimmed.trimmedConstraintKind;
|
|
551
562
|
exports.typeIdentifier = require_identifier$3.typeIdentifier;
|
|
552
|
-
exports.typeKind = require_base$
|
|
563
|
+
exports.typeKind = require_base$5.typeKind;
|
|
564
|
+
exports.typeStructureIdentifier = require_typeStructureIdentifier.typeStructureIdentifier;
|
|
553
565
|
exports.typeStructureKind = require_type.typeStructureKind;
|
|
554
566
|
exports.undefined = require_undefined$2.undefined;
|
|
555
567
|
exports.undefinedFundamentalTypeKind = require_undefined.undefinedFundamentalTypeKind;
|