arktype 3.0.0-beta.2 → 3.0.0-rc.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/README.md +55 -20
- package/out/_internal/regex/quantify.d.ts +17 -1
- package/out/_internal/schema/refinements/range.d.ts +2 -1
- package/out/_internal/schema/roots/domain.d.ts +1 -0
- package/out/_internal/schema/roots/root.d.ts +3 -1
- package/out/_internal/schema/roots/union.d.ts +8 -3
- package/out/_internal/schema/shared/compile.d.ts +2 -0
- package/out/_internal/schema/shared/declare.d.ts +9 -6
- package/out/_internal/schema/shared/errors.d.ts +3 -0
- package/out/_internal/schema/shared/issues.d.ts +5 -1
- package/out/_internal/schema/shared/issuesLean.d.ts +4 -0
- package/out/_internal/schema/shared/issuesNone.d.ts +1 -0
- package/out/_internal/schema/shared/issuesNoneLean.d.ts +1 -0
- package/out/_internal/schema/shared/standardFailure.d.ts +1 -0
- package/out/_internal/schema/shared/toJsonSchema.d.ts +16 -3
- package/out/_internal/schema/shared/transform.d.ts +1 -0
- package/out/_internal/sets/constraint.d.ts +2 -0
- package/out/_internal/sets/fromJsonSchema.d.ts +3 -1
- package/out/_internal/util/registry.d.ts +1 -1
- package/out/attributes.d.ts +12 -8
- package/out/chunk-2FVJ5JBN.js +161 -0
- package/out/{chunk-QBX4MEQR.js → chunk-3HZC67MT.js} +15 -15
- package/out/{chunk-5TN5JRP7.js → chunk-3KBOPH3J.js} +63 -41
- package/out/{chunk-GPNWBJL3.js → chunk-3WYMLH45.js} +17 -11
- package/out/{chunk-NIZDOWFU.js → chunk-46PLKNON.js} +2 -2
- package/out/{chunk-7JXN4WJX.js → chunk-4FTHWK63.js} +1 -1
- package/out/{chunk-EA2DNEDI.js → chunk-4HREHNIV.js} +12 -12
- package/out/{chunk-ZFB6DQWY.js → chunk-4J7H2ELX.js} +6 -11
- package/out/{chunk-7SVIUP6X.js → chunk-4MUH2MO4.js} +2 -2
- package/out/{chunk-J7CKAEDX.js → chunk-4NZCLVBD.js} +1 -1
- package/out/{chunk-RAM6G3F6.js → chunk-54U3D6OV.js} +26 -25
- package/out/{chunk-HA3POWOU.js → chunk-5FNHK7CC.js} +6 -5
- package/out/{chunk-KVQCLBJR.js → chunk-7SUZFAHZ.js} +241 -66
- package/out/{chunk-YMYPW3L5.js → chunk-AMNHRY72.js} +3 -3
- package/out/{chunk-UH6XKS3C.js → chunk-BQR65UPE.js} +30 -9
- package/out/{chunk-V4TZHFNK.js → chunk-BWKJV74G.js} +1 -1
- package/out/{chunk-7N3JEHA4.js → chunk-CXHXN7DF.js} +1 -1
- package/out/{chunk-FY4M7GE7.js → chunk-E4OQHHFS.js} +4 -4
- package/out/{chunk-CGWRW4JZ.js → chunk-ERGIJZFA.js} +4 -4
- package/out/{chunk-OA5Q2JLI.js → chunk-H44UG6HG.js} +8 -4
- package/out/{chunk-A7A6FDBS.js → chunk-I65VSWGS.js} +50 -44
- package/out/{chunk-C5JGK6GT.js → chunk-J2BFVWVY.js} +20 -3
- package/out/{chunk-W77ROLOT.js → chunk-JIILWIU4.js} +1 -1
- package/out/{chunk-5WRZ25AB.js → chunk-LMUBBBHJ.js} +4 -4
- package/out/{chunk-CQU7WIIR.js → chunk-P3HEEGB5.js} +6 -6
- package/out/{chunk-JZ4KBCMM.js → chunk-RKJNLXEQ.js} +21 -13
- package/out/{chunk-XMEK4I7J.js → chunk-TM22D5DL.js} +887 -266
- package/out/{chunk-PIFOURNM.js → chunk-TQYLOZRT.js} +11 -4
- package/out/{chunk-YN3XRJ7H.js → chunk-UJJGG4VQ.js} +1 -1
- package/out/{chunk-NIYAI7AF.js → chunk-US6BWOGJ.js} +3 -3
- package/out/{chunk-57LF5Y5P.js → chunk-W2XOI5DY.js} +1 -1
- package/out/{chunk-KDMHK4KP.js → chunk-XVLEFUSY.js} +2 -2
- package/out/{chunk-SGFGLENC.js → chunk-YPN67JMD.js} +3 -3
- package/out/cli.d.ts +5 -1
- package/out/cli.js +301 -49
- package/out/codecs.d.ts +4 -3
- package/out/codecs.js +18 -18
- package/out/config.js +8 -8
- package/out/declare.d.ts +2 -4
- package/out/errors.js +8 -8
- package/out/fn.d.ts +2 -2
- package/out/fromJsonSchema.d.ts +1 -1
- package/out/generic.d.ts +7 -4
- package/out/i18n.js +5 -5
- package/out/index.js +19 -19
- package/out/internal.js +32 -32
- package/out/island.js +18 -18
- package/out/islandDependency.js +33 -33
- package/out/jsonSchema/infer.d.ts +16 -6
- package/out/jsonSchema/validate.d.ts +16 -4
- package/out/keywords/functions.d.ts +4 -169
- package/out/keywords/keywords.d.ts +1 -1
- package/out/keywords/phrases.d.ts +3 -168
- package/out/keywords/ts.js +14 -14
- package/out/locales/de.js +6 -6
- package/out/locales/en.js +15 -15
- package/out/match.d.ts +12 -9
- package/out/mutatesInput.js +14 -14
- package/out/nary.d.ts +219 -193
- package/out/parser/definition.d.ts +2 -2
- package/out/parser/shift/operator/default.d.ts +2 -2
- package/out/parser/tupleExpressions.d.ts +2 -0
- package/out/precompiled.js +11 -11
- package/out/runtime.d.ts +1 -1
- package/out/runtime.js +5 -5
- package/out/schema.js +11 -11
- package/out/schemaInternal.js +29 -17
- package/out/schemaRuntime.js +4 -4
- package/out/schemaRuntimeLean.js +60 -36
- package/out/schemaRuntimeNone.js +52 -31
- package/out/schemaRuntimeNoneLean.js +52 -31
- package/out/type.d.ts +3 -3
- package/out/util.js +14 -11
- package/out/variants/base.d.ts +9 -8
- package/out/variants/object.d.ts +14 -6
- package/package.json +4 -4
- package/skills/arktype/SKILL.md +17 -17
- package/skills/arktype/references/migrating.md +13 -13
- package/skills/arktype/references/precompile.md +4 -4
- package/out/chunk-CSVAPWDE.js +0 -83
|
@@ -2,7 +2,7 @@ import { BaseRoot, type BaseParseContext, type StandardSchemaV1 } from "../_inte
|
|
|
2
2
|
import { type anyOrNever, type array, type Constructor, type ErrorMessage, type Fn, type ifEmptyObjectLiteral, type inferred, type objectKindOrDomainOf, type Primitive } from "../_internal/util/index.js";
|
|
3
3
|
import type { Out } from "../attributes.ts";
|
|
4
4
|
import type { type } from "../keywords/keywords.ts";
|
|
5
|
-
import type { InnerParseResult } from "../scope.ts";
|
|
5
|
+
import type { bindThis, InnerParseResult } from "../scope.ts";
|
|
6
6
|
import type { instantiateType } from "../variants/instantiate.ts";
|
|
7
7
|
import type { ObjectType } from "../variants/object.ts";
|
|
8
8
|
import type { shallowDefaultableMessage, shallowOptionalMessage, validateString } from "./ast/validate.ts";
|
|
@@ -14,7 +14,7 @@ import { type inferTupleLiteral, type validateTupleLiteral } from "./tupleLitera
|
|
|
14
14
|
export declare const parseInnerDefinition: (def: unknown, ctx: BaseParseContext) => InnerParseResult;
|
|
15
15
|
export declare const parseObject: (def: object, ctx: BaseParseContext) => BaseRoot;
|
|
16
16
|
export declare const writeAsyncStandardSchemaMessage: (vendor: string) => string;
|
|
17
|
-
export type inferDefinition<def,
|
|
17
|
+
export type inferDefinition<def, $ = {}, args = bindThis<def>> = [
|
|
18
18
|
def
|
|
19
19
|
] extends [anyOrNever] ? def : def extends type.cast<infer t> ? def extends {
|
|
20
20
|
[inferred]: infer t;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseRoot } from "../../../_internal/schema/index.js";
|
|
2
2
|
import { type BigintLiteral, type ErrorMessage, type NonFiniteNumberLiteral, type NumberLiteral, type Scanner, type trim } from "../../../_internal/util/index.js";
|
|
3
|
-
import type { type } from "../../../keywords/keywords.ts";
|
|
4
3
|
import type { DateLiteral } from "../../../attributes.ts";
|
|
4
|
+
import type { inferDefinition } from "../../definition.ts";
|
|
5
5
|
import type { RootedRuntimeState } from "../../reduce/dynamic.ts";
|
|
6
6
|
import type { EnclosingLiteralStartToken, EnclosingLiteralTokens, StringLiteral } from "../operand/enclosed.ts";
|
|
7
7
|
type UnitLiteralKeyword = "null" | "undefined" | "true" | "false";
|
|
@@ -15,7 +15,7 @@ export type EnclosedUnitLiteral = StringLiteral | DateLiteral;
|
|
|
15
15
|
*/
|
|
16
16
|
export type EmptyCollectionLiteral = "[]" | "{}";
|
|
17
17
|
export type DefaultLiteral = UnitLiteral | EmptyCollectionLiteral;
|
|
18
|
-
export type inferDefaultLiteral<literal> = literal extends "[]" ? [] : literal extends "{}" ? {} :
|
|
18
|
+
export type inferDefaultLiteral<literal> = literal extends "[]" ? [] : literal extends "{}" ? {} : inferDefinition<literal, {}, {}>;
|
|
19
19
|
export type ParsedDefaultableProperty = readonly [BaseRoot, "=", unknown];
|
|
20
20
|
export declare const parseDefault: (s: RootedRuntimeState) => ParsedDefaultableProperty;
|
|
21
21
|
export type parseDefault<root, unscanned extends string> = trim<unscanned> extends infer defaultExpression extends string ? defaultExpression extends UnenclosedUnitLiteral | EmptyCollectionLiteral ? [
|
|
@@ -24,6 +24,7 @@ export type UnparsedTupleExpressionInput = {
|
|
|
24
24
|
"===": unknown;
|
|
25
25
|
};
|
|
26
26
|
export type UnparsedTupleOperator = show<keyof UnparsedTupleExpressionInput>;
|
|
27
|
+
export declare const assertTupleArity: (def: array, operator: TupleExpressionOperator, min: number, max?: number) => void;
|
|
27
28
|
export declare const parseKeyOfTuple: IndexZeroParser<"keyof">;
|
|
28
29
|
export type inferKeyOfExpression<operandDef, $, args> = show<keyof inferDefinition<operandDef, $, args>>;
|
|
29
30
|
export type TupleExpression = IndexZeroExpression | IndexOneExpression;
|
|
@@ -76,4 +77,5 @@ declare const indexZeroParsers: {
|
|
|
76
77
|
};
|
|
77
78
|
export type IndexZeroOperator = keyof typeof indexZeroParsers;
|
|
78
79
|
export declare const writeInvalidConstructorMessage: <actual extends Domain | BuiltinObjectKind>(actual: actual) => string;
|
|
80
|
+
export declare const writeUnexpectedTupleElementsMessage: (operator: TupleExpressionOperator, expected: number | string, actual: number) => string;
|
|
79
81
|
export {};
|
package/out/precompiled.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "./chunk-LHNEY6QW.js";
|
|
2
|
-
export { registerPrecompiledUnits } from "./chunk-
|
|
2
|
+
export { registerPrecompiledUnits } from "./chunk-7SUZFAHZ.js";
|
|
3
3
|
import "./chunk-CWSF57VM.js";
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
import "./chunk-UJJGG4VQ.js";
|
|
5
|
+
import "./chunk-US6BWOGJ.js";
|
|
6
|
+
import "./chunk-P3HEEGB5.js";
|
|
7
|
+
import "./chunk-W2XOI5DY.js";
|
|
8
8
|
import "./chunk-TACLEIDM.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-ERGIJZFA.js";
|
|
10
|
+
import "./chunk-TQYLOZRT.js";
|
|
11
|
+
import "./chunk-I65VSWGS.js";
|
|
12
|
+
import "./chunk-3KBOPH3J.js";
|
|
13
|
+
import "./chunk-J2BFVWVY.js";
|
|
14
14
|
import "./chunk-3SH2BQ4T.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-3HZC67MT.js";
|
|
16
16
|
import "./chunk-I2KLQ2HA.js";
|
package/out/runtime.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface ValidatorAttributes {
|
|
|
22
22
|
"~standard"?: Pick<StandardJSONSchemaV1.Props, "jsonSchema">;
|
|
23
23
|
}
|
|
24
24
|
export type IntrospectionMember = (typeof introspectionMembers)[number];
|
|
25
|
-
export declare const
|
|
25
|
+
export declare const precompiledForArktype_3_0_0_rc_1 = true;
|
|
26
26
|
export declare const assign: {
|
|
27
27
|
<T extends {}, U>(target: T, source: U): T & U;
|
|
28
28
|
<T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
|
package/out/runtime.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ArkErrors, FirstIssueTraversal, FirstIssues, InternalTraversal, InvalidErrors, TransformErrors, Traversal, TraversalError, Validator, addErrors, addMorphErrs, aliasVisits, aliasedMember, aliasedValue, alikeIssue, allowsAcyclic, allowsInBranch, allowsInBranchBy, allowsInContext, allowsOf, allowsReadingCtx, allowsUntracked, appliesValues, applyCallErrors, applyCyclic, applyElements, applyErrors, applyIssues, applyNodeErrors, applyRejected, arrayCheck, arrayIndexMatcher, arrayOf, assign, bakeInto, bakedJsonSchema, bakedJsonSchemaOptionsMessage, bakedStandardJsonSchema, booleanChecker, callMorph, callingDeferredRootApply, callingRootApply, canParseUrl, check, checkArity, checkDefault, checkDigest, checkFacts, checkFunction, checkHeld, checkHelper, checkIdentity, checkInput, checkProgress, checkerNode, closedProps, codeSiteOf, codedIssue, compiled, computeDefaultValueMorph, configure, configuredFallbackOf, configuredWriterOf, copyDeclared, copyOf, createValidator, createValidatorWith, ctxNode, deepFreeze, deferred, deletingProps, describeCollapsibleDate, describeDomains, describePredicate, describeShape, describeValues, digestOf, disallowed, discriminate, discriminateOr, discriminatesBooleans, divisor, domains, elementsOf, emptyMeta, enInfo, enterApplied, enterResolution, exactLength, execMorph, exitApplied, exitResolution, factOfHole, failingArrayOf, failingBranches, failingClosedProps, failingDeletingProps, failingElementsOf, failingProps, failsAt, failsAtKey, failsAtPath, failsBranches, failsIn, failsInBranches, failsKey, failsKeySite, failsKeyWith, failsListed, failsSite, failsWith, fallbackThrower, firstIssue, fixConfig, fixConfigured, foundErrors, freeze, holdHoles, holdingAlias, holdsOnlyIndices, holesOf, indexed, integerCheck, integerRange, intern, internIn, internTable, interned, internedTable, intersection, is, keepOwn, keySiteOf, lessThan, listedIssue, matchesRepeated, max, maxLength, mergeTransformed, min, minLength, missingTextOf, moreThan, morphing, narrowed, narrowedAfter, narrowedBy, narrowedByEach, narrowedInCtx, narrowedRejecting, narrowedWithCtx, nullable, nullableDescriptionOf, nullableObject, numberCheck, objectCheck, once, optional, own, ownIssue, pattern, pipe, pipeApplied, pipeChecked, pipeTransformed, piped, pipedIntoUndetailed,
|
|
2
|
-
import "./chunk-
|
|
3
|
-
export { capitalizeString, emptyCollectionDefaults, epochDescriptions, isEpochString, isJsonString, isLuhnValid, isParsableDate, isParsableUrl, isRegexPattern, keepFormatted, lowercaseString, maxEpoch, normalizationsByForm, parseDate, parseEpoch, parseFormData, parseInteger, parseIsoDate, parseJson, parseNumeric, parseUrl, parsesFinite, raisedErrorPhrases, stringifyJson, trimString, uppercaseString, writeEpoch, writeIsoDate,
|
|
4
|
-
export { isIpv4, isIpv6, isIso8601, isUuid } from "./chunk-
|
|
5
|
-
export { ParseError, baseNameOf, functionNameOf, isNumericString, isPlainObjectOrArray, isValidDate, isWellFormedInteger, jsTypeOfDescriptions, liftArray, printable, throwParseError, timeOf } from "./chunk-
|
|
1
|
+
export { ArkErrors, FirstIssueTraversal, FirstIssues, InternalTraversal, InvalidErrors, TransformErrors, Traversal, TraversalError, Validator, addErrors, addMorphErrs, aliasVisits, aliasedMember, aliasedValue, alikeIssue, allowsAcyclic, allowsInBranch, allowsInBranchBy, allowsInContext, allowsOf, allowsReadingCtx, allowsUntracked, appliesValues, applyCallErrors, applyCyclic, applyElements, applyErrors, applyIssues, applyNodeErrors, applyRejected, arrayCheck, arrayIndexMatcher, arrayOf, assign, bakeInto, bakedJsonSchema, bakedJsonSchemaOptionsMessage, bakedStandardJsonSchema, booleanChecker, callMorph, callingDeferredRootApply, callingRootApply, canParseUrl, check, checkArity, checkDefault, checkDigest, checkFacts, checkFunction, checkHeld, checkHelper, checkIdentity, checkInput, checkProgress, checkerNode, closedProps, codeSiteOf, codedIssue, compiled, computeDefaultValueMorph, configure, configuredFallbackOf, configuredWriterOf, copyDeclared, copyOf, createValidator, createValidatorWith, ctxNode, deepFreeze, deferred, deletingProps, describeCollapsibleDate, describeDomains, describePredicate, describeShape, describeValues, digestOf, disallowed, discriminate, discriminateOr, discriminatesBooleans, divisor, domains, elementsOf, emptyMeta, enInfo, enterApplied, enterResolution, exactLength, execMorph, exitApplied, exitResolution, factOfHole, failingArrayOf, failingBranches, failingClosedProps, failingDeletingProps, failingElementsOf, failingProps, failsAt, failsAtKey, failsAtPath, failsBranches, failsIn, failsInBranches, failsKey, failsKeySite, failsKeyWith, failsListed, failsSite, failsWith, fallbackThrower, firstIssue, fixConfig, fixConfigured, foundErrors, freeze, holdHoles, holdingAlias, holdsOnlyIndices, holesOf, indexed, integerCheck, integerRange, intern, internIn, internTable, interned, internedTable, intersection, is, keepOwn, keySiteOf, lessThan, listedIssue, matchesRepeated, max, maxLength, mergeTransformed, min, minLength, missingTextOf, moreThan, morphing, narrowed, narrowedAfter, narrowedBy, narrowedByEach, narrowedInCtx, narrowedRejecting, narrowedWithCtx, nullable, nullableDescriptionOf, nullableObject, numberCheck, objectCheck, once, optional, own, ownIssue, pattern, pipe, pipeApplied, pipeChecked, pipeTransformed, piped, pipedIntoUndetailed, precompiledForArktype_3_0_0_rc_1, printKind, props, raisingTraversalOf, readingCtx, readingCtxNode, receiverOf, recordOf, rejected, rejecting, rejects, rejectsWith, rekeyed, replacingUndefined, replayedJsonSchema, required, requiredSiteOf, runtimeConfig, runtimeScope, saying, sayingMissing, setPrototypeOf, silentCtx, siteOf, sited, sitedProps, standardResultOf, standardValidated, stringCheck, stringRange, throwIssues, throwJsonSchemaError, throwOnDefault, throwUnbaked, transformIfAllowed, transformOf, transformResolution, transformed, transformedInApply, transformingClosedProps, transformingElementsOf, transformingNarrowedAfter, transformingProps, transformsBranches, transformsValid, tryMorph, type, typedFn, union, unit, units, unnamed, unreadCallErrors, unreadElements, unreadErrors, withContextOf, writeCreationMismatchMessage, writeDigestMismatchMessage, writeDomainActual, writeIdentityMismatchMessage, writeLengthActual, writeMessage, writeNotEqualActual, writeNullableJsonSchema, writeProtoActual, writeUnbakedMessage, writeUnionJsonSchema, writeUnitActual, writeUnitMessage, writtenBy, writtenSiteOf } from "./chunk-BQR65UPE.js";
|
|
2
|
+
import "./chunk-4FTHWK63.js";
|
|
3
|
+
export { capitalizeString, emptyCollectionDefaults, epochDescriptions, isEpochString, isJsonString, isLuhnValid, isParsableDate, isParsableUrl, isRegexPattern, keepFormatted, lowercaseString, maxEpoch, normalizationsByForm, parseDate, parseEpoch, parseFormData, parseInteger, parseIsoDate, parseJson, parseNumeric, parseUrl, parsesFinite, raisedErrorPhrases, stringifyJson, trimString, uppercaseString, writeEpoch, writeIsoDate, writeUrl } from "./chunk-4HREHNIV.js";
|
|
4
|
+
export { isIpv4, isIpv6, isIso8601, isUuid } from "./chunk-US6BWOGJ.js";
|
|
5
|
+
export { ParseError, baseNameOf, functionNameOf, isNumericString, isPlainObjectOrArray, isValidDate, isWellFormedInteger, jsTypeOfDescriptions, liftArray, printable, throwParseError, timeOf } from "./chunk-3HZC67MT.js";
|
|
6
6
|
import "./chunk-I2KLQ2HA.js";
|
package/out/schema.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { After, AfterNode, Alias, AliasNode, BaseConstraint, BaseNode, BaseProp, BaseRange, BaseRoot, BaseScope, Before, BeforeNode, Disjoint, Divisor, DivisorNode, Domain, DomainNode, ExactLength, ExactLengthNode, GenericRoot, Index, IndexNode, InternalPrimitiveConstraint, Intersection, IntersectionNode, LazyGenericBody, LazyGenericRoot, Max, MaxLength, MaxLengthNode, MaxNode, Min, MinLength, MinLengthNode, MinNode, Morph, MorphNode, NotEqual, NotEqualLength, NotEqualLengthNode, NotEqualNode, Optional, OptionalNode, Pattern, PatternNode, Predicate, PredicateNode, Proto, ProtoNode, Required, RequiredNode, RootModule, SchemaModule, SchemaScope, Sequence, SequenceNode, Structure, StructureNode, TraversalCompiler, Union, UnionNode, Unit, UnitNode, appendUniqueNodes, assertDefaultValueAssignability, assertLengthRule, bindModule, bindPrecompiledUnits, bootstrap, bootstrapRootScope, boundClassesByKind, boundImplementationsByKind, boundKindPairsByLower, checkDefault, compareInnerKeys, compileComparator, compileDefault, compileDomainOf, constraintInputOf, createNode, dateLimitToString, deferAliases, deferredCallable, defineSchema, emptyBrandNameMessage, en, encodeWithoutCodecsMessage, exclusivizeRangeSchema, finalizeExport, flatMorphsAreEqual, flatRef, flatRefsAreEqual, flatRefsAt, forgetReferences, genericNode, hashedPrefixLength, hashesMatch, holdsSameChildren, identityOf, innerHashesMatch, intrinsic, ioOf, isFinalResolution, isMutuallySimulated, isResolvable, jsonLengthOf, lastCreated, madeMorphs, makeMorph, missingSetEngineMessage, node, nodeClassesByKind, nodeImplementationsByKind, normalizeIndex, normalizeOrder, ownKeysOf, parseAsSchema, parseGeneric, parseNode, parseNodeSchema, parseSchema, postfixAfterOptionalOrDefaultableMessage, postfixWithoutVariadicMessage, precompileInPlace, precompileRootUnits, referencesThroughAliases, referencesWithoutCases, registerNodeId, registerPrecompiledUnits, requiredPropOf, resolveAmbient, resolveDescription, resolveReachedAliases, resolveShallowAliases, rootApplyRuntimeOf, rootSchema, rootSchemaScope, schemaKindOf, schemaScope, sets, throwInvalidOperandError, typeKeyToString, typeOrTermExtends, typePathToPropString, uniqueFlatRefs, whileResolvingAmbient, withId, withMeta, withoutUndefined, writeContextAtDefinitionMessage, writeDuplicateAliasError, writeDuplicateKeyMessage, writeEnumerableIndexBranches, writeForeignArkMessage, writeGlobalOnlyConfigMessage, writeIndivisibleMessage, writeInnerJson, writeInvalidKeysMessage, writeInvalidLengthBoundMessage, writeInvalidMergeOperandMessage, writeInvalidOperandMessage, writeInvalidPropertyKeyMessage, writeInvalidSchemaMessage, writeLiteralUnionEntriesMessage, writeMissingImportMessage, writeMissingSubmoduleAccessMessage, writeNonIntegerDivisorMessage, writeNonPrimitiveNonFunctionDefaultValueMessage, writeNonStructuralOperandMessage, writeNonSubmoduleDotMessage, writeNumberIndexMessage, writePrecompiledUnits, writeShallowCycleErrorMessage, writeUnboundableMessage, writeUnclosedGenericCycleMessage, writeUnresolvableMessage, writeUnsatisfiableExpressionError, writeUnsatisfiedParameterConstraintMessage, zeroDivisorMessage } from "./chunk-
|
|
1
|
+
export { After, AfterNode, Alias, AliasNode, BaseConstraint, BaseNode, BaseProp, BaseRange, BaseRoot, BaseScope, Before, BeforeNode, Disjoint, Divisor, DivisorNode, Domain, DomainNode, ExactLength, ExactLengthNode, GenericRoot, Index, IndexNode, InternalPrimitiveConstraint, Intersection, IntersectionNode, LazyGenericBody, LazyGenericRoot, Max, MaxLength, MaxLengthNode, MaxNode, Min, MinLength, MinLengthNode, MinNode, Morph, MorphNode, NotEqual, NotEqualLength, NotEqualLengthNode, NotEqualNode, Optional, OptionalNode, Pattern, PatternNode, Predicate, PredicateNode, Proto, ProtoNode, Required, RequiredNode, RootModule, SchemaModule, SchemaScope, Sequence, SequenceNode, Structure, StructureNode, TraversalCompiler, Union, UnionNode, Unit, UnitNode, appendUniqueNodes, assertDefaultValueAssignability, assertLengthRule, bindModule, bindPrecompiledUnits, bootstrap, bootstrapRootScope, boundClassesByKind, boundImplementationsByKind, boundKindPairsByLower, checkDefault, compareInnerKeys, compileComparator, compileDefault, compileDomainOf, constraintInputOf, createNode, dateLimitToString, deferAliases, deferredCallable, defineSchema, emptyBrandNameMessage, en, encodeWithoutCodecsMessage, exclusivizeRangeSchema, finalizeExport, flatMorphsAreEqual, flatRef, flatRefsAreEqual, flatRefsAt, forgetReferences, genericNode, hashedPrefixLength, hashesMatch, holdsSameChildren, identityOf, innerHashesMatch, intrinsic, ioOf, isFinalResolution, isMutuallySimulated, isResolvable, jsonLengthOf, lastCreated, madeMorphs, makeMorph, missingSetEngineMessage, node, nodeClassesByKind, nodeImplementationsByKind, normalizeIndex, normalizeOrder, ownKeysOf, parseAsSchema, parseGeneric, parseNode, parseNodeSchema, parseSchema, postfixAfterOptionalOrDefaultableMessage, postfixWithoutVariadicMessage, precompileInPlace, precompileRootUnits, referencesThroughAliases, referencesWithoutCases, registerNodeId, registerPrecompiledUnits, requiredPropOf, resolveAmbient, resolveDescription, resolveReachedAliases, resolveShallowAliases, rootApplyRuntimeOf, rootSchema, rootSchemaScope, schemaKindOf, schemaScope, sets, throwInvalidOperandError, typeKeyToString, typeOrTermExtends, typePathToPropString, uniqueFlatRefs, whileResolvingAmbient, withId, withMeta, withoutUndefined, writeContextAtDefinitionMessage, writeDuplicateAliasError, writeDuplicateKeyMessage, writeEnumerableIndexBranches, writeForeignArkMessage, writeGlobalOnlyConfigMessage, writeIndivisibleMessage, writeInnerJson, writeInvalidKeysMessage, writeInvalidLengthBoundMessage, writeInvalidMergeOperandMessage, writeInvalidOperandMessage, writeInvalidPropertyKeyMessage, writeInvalidRangeRuleMessage, writeInvalidSchemaMessage, writeLiteralUnionEntriesMessage, writeMissingImportMessage, writeMissingSubmoduleAccessMessage, writeNonIntegerDivisorMessage, writeNonPrimitiveNonFunctionDefaultValueMessage, writeNonStructuralOperandMessage, writeNonSubmoduleDotMessage, writeNumberIndexMessage, writePrecompiledUnits, writeShallowCycleErrorMessage, writeUnboundableMessage, writeUnclosedGenericCycleMessage, writeUnresolvableMessage, writeUnsatisfiableExpressionError, writeUnsatisfiedParameterConstraintMessage, zeroDivisorMessage } from "./chunk-7SUZFAHZ.js";
|
|
2
2
|
import "./chunk-CWSF57VM.js";
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
export { ToJsonSchema, annotatingFallback, assertNoProblemConfig, assertNodeKind, basisKinds, compileObjectLiteral, configureSchema, constraintKeys, constraintKinds, defaultValueSerializer, foreignTypesByMorph, implementNode, isNodeKind, mergeConfigs, mergeToJsonSchemaConfigs, metaJsonOf, morphChildKinds, nodeKinds, precedenceByKind, precedenceOfKind, prestructuralKinds, refinementKinds, resolveGlobalConfig, rootKinds, schemaKindsRightOf, structuralKinds, structureKeys, unionChildKinds, unionJsonSchemaWritersKey, writeInvalidLocaleMessage, writeInvalidUndeclaredKeyBehaviorMessage, writeUnknownConfigOptionMessage } from "./chunk-
|
|
6
|
-
export { ToJsonSchemaError, openApiNull, supportedJsonSchemaTargets, toJsonSchemaTargets, validateStandardJsonSchemaTarget, validateToJsonSchemaTarget, writeInvalidJsonSchemaTargetMessage, writeNullableJsonSchema, writeUnionJsonSchema } from "./chunk-
|
|
3
|
+
import "./chunk-UJJGG4VQ.js";
|
|
4
|
+
import "./chunk-US6BWOGJ.js";
|
|
5
|
+
export { ToJsonSchema, annotatingFallback, assertNoProblemConfig, assertNodeKind, basisKinds, compileObjectLiteral, configureSchema, constraintKeys, constraintKinds, defaultValueSerializer, foreignTypesByMorph, implementNode, isNodeKind, mergeConfigs, mergeToJsonSchemaConfigs, metaJsonOf, morphChildKinds, nodeKinds, precedenceByKind, precedenceOfKind, prestructuralKinds, refinementKinds, resolveGlobalConfig, rootKinds, schemaKindsRightOf, structuralKinds, structureKeys, unionChildKinds, unionJsonSchemaWritersKey, writeInvalidLocaleMessage, writeInvalidUndeclaredKeyBehaviorMessage, writeUnknownConfigOptionMessage } from "./chunk-P3HEEGB5.js";
|
|
6
|
+
export { ToJsonSchemaError, openApiNull, supportedJsonSchemaTargets, toJsonSchemaTargets, validateStandardJsonSchemaTarget, validateToJsonSchemaTarget, writeInvalidJsonSchemaTargetMessage, writeNullableJsonSchema, writeUnionJsonSchema } from "./chunk-W2XOI5DY.js";
|
|
7
7
|
import "./chunk-TACLEIDM.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
export { CompiledFunction, NodeCompiler, canJit, compileLiteralPropAccess, compileSerializedValue, expectedOf, indexPropAccess, isDecidedByAllows, isRefinedBasis, isRefinedPattern, returnsTransformErrors, serializeLiteralKey, tryJit } from "./chunk-
|
|
10
|
-
export { $ark, ArkErrors, ArkTraversal, SiteTraversal, ThrownErrors as TraversalError, actualAtPathOf, alternativesOf, ambientResolver, applyUnread, asTemplated, byAncestorPath, byPath, configureAfterTypeMessage, configureLocale, configuredMessageOf, copiedErrorMessage, defaultConfig, describeCause, describeMissing, errorFromContext, errorFromNodeAt, errorFromUnion, errorOfIssue, firstIssue, flatByPath, flatMessagesByPath, groupByPath, invalidError, isArkError, isCustom, isCustomError, keywordWriterOf, labelOf, messageIn, namedReference, nodesById, reference, registerBuilderCompiler, registerLocaleRenderer, registeredReference, registryName, siteTraversalOf, suppliedText, unrenderedLocaleMessage, unwrittenError, writeActual, writeKeywordExpected, writeText } from "./chunk-
|
|
11
|
-
export { FirstIssueTraversal, InternalTraversal, TransformErrors, Traversal, addErrors, addMorphErrs, aliasVisits, allowsAcyclic, allowsInBranch, allowsInBranchBy, allowsInContext, allowsUntracked, applyCyclic, applyMember, applyRejected, applyResolution, applyValue, assertUnchecked, callMorph, composing, computeDefaultValueMorph, copyDeclared, copyOf, defining, describeBranches, describeCases, describePredicate, disallowed, elided, enterApplied, enterResolution, errorsOf, execMorph, exitApplied, exitResolution, expressBranches, hasArkKind, holdsOnlyIndices, holeNameMarker, inContext, inProgress, isAbsent, isCustomIssue, isIoFinal, isNode, isResolutionFinal, keepOwn, makeRootAndArrayPropertiesMutable, matchesRepeated, maxAliasDepth, maxAliasVisits, mergeTransformed, pipe, pipeApplied, pipeChecked, pipeOf, pipeTransformed, printSelfAsThis, queueUnchecked, readingContextWith, rejected, rejects, removedProblemMessage, resolving, silentCtx, throwOnDefault, throwOnProblem, transform, transformIfAllowed, transformResolution, transformed, transformedInApply, transformsValid, travKey, tryMorph, valueAtPath, withContextOf, withoutHoleNames } from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-ERGIJZFA.js";
|
|
9
|
+
export { CompiledFunction, NodeCompiler, canJit, compileLiteralPropAccess, compileSerializedValue, expectedOf, indexPropAccess, isDecidedByAllows, isRefinedBasis, isRefinedPattern, returnsTransformErrors, serializeLiteralKey, tryJit } from "./chunk-TQYLOZRT.js";
|
|
10
|
+
export { $ark, ArkErrors, ArkTraversal, SiteTraversal, ThrownErrors as TraversalError, actualAtPathOf, alternativesOf, ambientResolver, applyUnread, asTemplated, byAncestorPath, byPath, configureAfterTypeMessage, configureLocale, configuredMessageOf, copiedErrorMessage, defaultConfig, describeCause, describeMissing, errorFromContext, errorFromNodeAt, errorFromUnion, errorOfIssue, firstIssue, flatByPath, flatMessagesByPath, groupByPath, invalidError, isArkError, isCustom, isCustomError, keywordWriterOf, labelOf, messageIn, namedReference, nodesById, reference, registerBuilderCompiler, registerLocaleRenderer, registeredReference, registryName, serializableErrors, siteTraversalOf, suppliedText, unrenderedLocaleMessage, unwrittenError, writeActual, writeInvalidLocaleObjectMessage, writeKeywordExpected, writeText } from "./chunk-I65VSWGS.js";
|
|
11
|
+
export { FirstIssueTraversal, InternalTraversal, TransformErrors, Traversal, addErrors, addMorphErrs, aliasVisits, allowsAcyclic, allowsInBranch, allowsInBranchBy, allowsInContext, allowsUntracked, applyCyclic, applyMember, applyRejected, applyResolution, applyValue, assertUnchecked, callMorph, composing, computeDefaultValueMorph, copyDeclared, copyOf, defining, describeBranches, describeCases, describePredicate, disallowed, elided, enterApplied, enterResolution, errorsOf, execMorph, exitApplied, exitResolution, expressBranches, hasArkKind, holdsOnlyIndices, holeNameMarker, inContext, inProgress, isAbsent, isCustomIssue, isIoFinal, isNode, isResolutionFinal, keepOwn, makeRootAndArrayPropertiesMutable, matchesRepeated, maxAliasDepth, maxAliasVisits, mergeTransformed, pipe, pipeApplied, pipeChecked, pipeOf, pipeTransformed, printSelfAsThis, queueUnchecked, readingContextWith, rejected, rejects, removedProblemMessage, resolving, setOwnValue, silentCtx, throwOnDefault, throwOnProblem, transform, transformIfAllowed, transformResolution, transformed, transformedInApply, transformsValid, travKey, tryMorph, valueAtPath, withContextOf, withoutHoleNames } from "./chunk-3KBOPH3J.js";
|
|
12
|
+
import "./chunk-J2BFVWVY.js";
|
|
13
13
|
import "./chunk-3SH2BQ4T.js";
|
|
14
|
-
export { ParseError, arkKind } from "./chunk-
|
|
14
|
+
export { ParseError, arkKind } from "./chunk-3HZC67MT.js";
|
|
15
15
|
import "./chunk-I2KLQ2HA.js";
|
package/out/schemaInternal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
internal_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RKJNLXEQ.js";
|
|
4
4
|
import {
|
|
5
5
|
appliesValues,
|
|
6
6
|
configMismatchMessage,
|
|
@@ -24,27 +24,27 @@ import {
|
|
|
24
24
|
traversesUnions,
|
|
25
25
|
writeCreatedBeforeConfigureMessage,
|
|
26
26
|
writtenConfigMessage
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-46PLKNON.js";
|
|
28
28
|
import {
|
|
29
29
|
encode,
|
|
30
30
|
inverses,
|
|
31
31
|
writeMissingInverseMessage
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-2FVJ5JBN.js";
|
|
33
33
|
import {
|
|
34
34
|
ArkFirstIssueTraversal,
|
|
35
35
|
UndetailedErrors,
|
|
36
36
|
UndetailedTraversal,
|
|
37
37
|
errorModes,
|
|
38
38
|
rejectUndetailed
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-5FNHK7CC.js";
|
|
40
40
|
import {
|
|
41
41
|
normalizeLocale
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-H44UG6HG.js";
|
|
43
43
|
import {
|
|
44
44
|
inPlaceTransforms,
|
|
45
45
|
inputOnlyMorphs,
|
|
46
46
|
writesInPlace
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-LMUBBBHJ.js";
|
|
48
48
|
import {
|
|
49
49
|
After,
|
|
50
50
|
AfterNode,
|
|
@@ -212,6 +212,7 @@ import {
|
|
|
212
212
|
writeInvalidMergeOperandMessage,
|
|
213
213
|
writeInvalidOperandMessage,
|
|
214
214
|
writeInvalidPropertyKeyMessage,
|
|
215
|
+
writeInvalidRangeRuleMessage,
|
|
215
216
|
writeInvalidSchemaMessage,
|
|
216
217
|
writeLiteralUnionEntriesMessage,
|
|
217
218
|
writeMissingImportMessage,
|
|
@@ -229,14 +230,14 @@ import {
|
|
|
229
230
|
writeUnsatisfiableExpressionError,
|
|
230
231
|
writeUnsatisfiedParameterConstraintMessage,
|
|
231
232
|
zeroDivisorMessage
|
|
232
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-7SUZFAHZ.js";
|
|
233
234
|
import {
|
|
234
235
|
arrayIndexMatcher,
|
|
235
236
|
arrayIndexSource,
|
|
236
237
|
maxArrayLength
|
|
237
238
|
} from "./chunk-CWSF57VM.js";
|
|
238
|
-
import "./chunk-
|
|
239
|
-
import "./chunk-
|
|
239
|
+
import "./chunk-UJJGG4VQ.js";
|
|
240
|
+
import "./chunk-US6BWOGJ.js";
|
|
240
241
|
import {
|
|
241
242
|
ToJsonSchema,
|
|
242
243
|
annotatingFallback,
|
|
@@ -270,7 +271,7 @@ import {
|
|
|
270
271
|
writeInvalidLocaleMessage,
|
|
271
272
|
writeInvalidUndeclaredKeyBehaviorMessage,
|
|
272
273
|
writeUnknownConfigOptionMessage
|
|
273
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-P3HEEGB5.js";
|
|
274
275
|
import {
|
|
275
276
|
ToJsonSchemaError,
|
|
276
277
|
openApiNull,
|
|
@@ -281,14 +282,14 @@ import {
|
|
|
281
282
|
writeInvalidJsonSchemaTargetMessage,
|
|
282
283
|
writeNullableJsonSchema,
|
|
283
284
|
writeUnionJsonSchema
|
|
284
|
-
} from "./chunk-
|
|
285
|
+
} from "./chunk-W2XOI5DY.js";
|
|
285
286
|
import "./chunk-TACLEIDM.js";
|
|
286
287
|
import {
|
|
287
288
|
rootApplyParams,
|
|
288
289
|
rootApplyParts,
|
|
289
290
|
rootApplyRuntime,
|
|
290
291
|
writeRootApply
|
|
291
|
-
} from "./chunk-
|
|
292
|
+
} from "./chunk-ERGIJZFA.js";
|
|
292
293
|
import {
|
|
293
294
|
CompiledFunction,
|
|
294
295
|
NodeCompiler,
|
|
@@ -303,7 +304,7 @@ import {
|
|
|
303
304
|
returnsTransformErrors,
|
|
304
305
|
serializeLiteralKey,
|
|
305
306
|
tryJit
|
|
306
|
-
} from "./chunk-
|
|
307
|
+
} from "./chunk-TQYLOZRT.js";
|
|
307
308
|
import {
|
|
308
309
|
$ark,
|
|
309
310
|
ArkErrors,
|
|
@@ -351,14 +352,16 @@ import {
|
|
|
351
352
|
registerLocaleRenderer,
|
|
352
353
|
registeredReference,
|
|
353
354
|
registryName,
|
|
355
|
+
serializableErrors,
|
|
354
356
|
siteTraversalOf,
|
|
355
357
|
suppliedText,
|
|
356
358
|
unrenderedLocaleMessage,
|
|
357
359
|
unwrittenError,
|
|
358
360
|
writeActual,
|
|
361
|
+
writeInvalidLocaleObjectMessage,
|
|
359
362
|
writeKeywordExpected,
|
|
360
363
|
writeText
|
|
361
|
-
} from "./chunk-
|
|
364
|
+
} from "./chunk-I65VSWGS.js";
|
|
362
365
|
import {
|
|
363
366
|
FirstIssueTraversal,
|
|
364
367
|
FirstIssues,
|
|
@@ -446,6 +449,7 @@ import {
|
|
|
446
449
|
rejects,
|
|
447
450
|
removedProblemMessage,
|
|
448
451
|
resolving,
|
|
452
|
+
setOwnValue,
|
|
449
453
|
sharedMessageOf,
|
|
450
454
|
silentCtx,
|
|
451
455
|
throwIssues,
|
|
@@ -472,15 +476,15 @@ import {
|
|
|
472
476
|
writeProtoActual,
|
|
473
477
|
writeUnitActual,
|
|
474
478
|
writeUnitMessage
|
|
475
|
-
} from "./chunk-
|
|
476
|
-
import "./chunk-
|
|
479
|
+
} from "./chunk-3KBOPH3J.js";
|
|
480
|
+
import "./chunk-J2BFVWVY.js";
|
|
477
481
|
import "./chunk-3SH2BQ4T.js";
|
|
478
482
|
import {
|
|
479
483
|
ParseError,
|
|
480
484
|
arkKind,
|
|
481
485
|
describeCollapsibleDate,
|
|
482
486
|
printKind
|
|
483
|
-
} from "./chunk-
|
|
487
|
+
} from "./chunk-3HZC67MT.js";
|
|
484
488
|
import {
|
|
485
489
|
__export,
|
|
486
490
|
__reExport
|
|
@@ -838,7 +842,9 @@ __export(schemaInternal_exports, {
|
|
|
838
842
|
schemaKindOf: () => schemaKindOf,
|
|
839
843
|
schemaKindsRightOf: () => schemaKindsRightOf,
|
|
840
844
|
schemaScope: () => schemaScope,
|
|
845
|
+
serializableErrors: () => serializableErrors,
|
|
841
846
|
serializeLiteralKey: () => serializeLiteralKey,
|
|
847
|
+
setOwnValue: () => setOwnValue,
|
|
842
848
|
sets: () => sets,
|
|
843
849
|
shareConfig: () => shareConfig,
|
|
844
850
|
sharedMessageOf: () => sharedMessageOf,
|
|
@@ -898,9 +904,11 @@ __export(schemaInternal_exports, {
|
|
|
898
904
|
writeInvalidKeysMessage: () => writeInvalidKeysMessage,
|
|
899
905
|
writeInvalidLengthBoundMessage: () => writeInvalidLengthBoundMessage,
|
|
900
906
|
writeInvalidLocaleMessage: () => writeInvalidLocaleMessage,
|
|
907
|
+
writeInvalidLocaleObjectMessage: () => writeInvalidLocaleObjectMessage,
|
|
901
908
|
writeInvalidMergeOperandMessage: () => writeInvalidMergeOperandMessage,
|
|
902
909
|
writeInvalidOperandMessage: () => writeInvalidOperandMessage,
|
|
903
910
|
writeInvalidPropertyKeyMessage: () => writeInvalidPropertyKeyMessage,
|
|
911
|
+
writeInvalidRangeRuleMessage: () => writeInvalidRangeRuleMessage,
|
|
904
912
|
writeInvalidSchemaMessage: () => writeInvalidSchemaMessage,
|
|
905
913
|
writeInvalidUndeclaredKeyBehaviorMessage: () => writeInvalidUndeclaredKeyBehaviorMessage,
|
|
906
914
|
writeKeywordExpected: () => writeKeywordExpected,
|
|
@@ -1288,7 +1296,9 @@ export {
|
|
|
1288
1296
|
schemaKindOf,
|
|
1289
1297
|
schemaKindsRightOf,
|
|
1290
1298
|
schemaScope,
|
|
1299
|
+
serializableErrors,
|
|
1291
1300
|
serializeLiteralKey,
|
|
1301
|
+
setOwnValue,
|
|
1292
1302
|
sets,
|
|
1293
1303
|
shareConfig,
|
|
1294
1304
|
sharedMessageOf,
|
|
@@ -1348,9 +1358,11 @@ export {
|
|
|
1348
1358
|
writeInvalidKeysMessage,
|
|
1349
1359
|
writeInvalidLengthBoundMessage,
|
|
1350
1360
|
writeInvalidLocaleMessage,
|
|
1361
|
+
writeInvalidLocaleObjectMessage,
|
|
1351
1362
|
writeInvalidMergeOperandMessage,
|
|
1352
1363
|
writeInvalidOperandMessage,
|
|
1353
1364
|
writeInvalidPropertyKeyMessage,
|
|
1365
|
+
writeInvalidRangeRuleMessage,
|
|
1354
1366
|
writeInvalidSchemaMessage,
|
|
1355
1367
|
writeInvalidUndeclaredKeyBehaviorMessage,
|
|
1356
1368
|
writeKeywordExpected,
|
package/out/schemaRuntime.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { appliesValues, configMismatchMessage, configure, configuredFallbackOf, configuredUnlikeBuildMessage, configuredWriterOf, discriminatesBooleans, failsInBranches, findsOnRead, fingerprintOf, fixConfig, fixConfigured, holdsExpression, listsUnions, reconfiguredMessage, runtimeConfig, runtimeScope, shareConfig, transformsBranches, traversesUnions, writeCreatedBeforeConfigureMessage, writtenConfigMessage } from "./chunk-
|
|
1
|
+
export { appliesValues, configMismatchMessage, configure, configuredFallbackOf, configuredUnlikeBuildMessage, configuredWriterOf, discriminatesBooleans, failsInBranches, findsOnRead, fingerprintOf, fixConfig, fixConfigured, holdsExpression, listsUnions, reconfiguredMessage, runtimeConfig, runtimeScope, shareConfig, transformsBranches, traversesUnions, writeCreatedBeforeConfigureMessage, writtenConfigMessage } from "./chunk-46PLKNON.js";
|
|
2
2
|
export { arrayIndexMatcher } from "./chunk-CWSF57VM.js";
|
|
3
|
-
export { ToJsonSchemaError, supportedJsonSchemaTargets, validateStandardJsonSchemaTarget, writeNullableJsonSchema, writeUnionJsonSchema } from "./chunk-
|
|
4
|
-
export { FirstIssueTraversal, FirstIssues, InternalTraversal, Issues as ArkErrors, ThrownIssues as TraversalError, TransformErrors, Traversal, addErrors, addMorphErrs, aliasVisits, alikeIssue, allowsAcyclic, allowsInBranch, allowsInBranchBy, allowsInContext, allowsUntracked, applyCyclic, applyIssues, applyMember, applyRejected, applyResolution, applyValue, callMorph, codedIssue, computeDefaultValueMorph, copyDeclared, copyOf, describeActual, describePredicate, describeUnwrittenActual, disallowed, enInfo, enterApplied, enterResolution, errorsOf, execMorph, exitApplied, exitResolution, failsKey, failsKeySite, failsSite, foundErrors, holdsOnlyIndices, inContext, isCustomIssue, issueAt, issuesOf, keepOwn, lineOf, listedIssue, matchesRepeated, maxAliasDepth, maxAliasVisits, mergeIssues, mergeTransformed, messageOf, missingTextOf, movedIssue, notedAs, pathOf, pipe, pipeApplied, pipeChecked, pipeOf, pipeTransformed, printedActualOf, readingContextWith, rejected, rejects, sharedMessageOf, silentCtx, throwIssues, throwOnDefault, throwOnProblem, transform, transformIfAllowed, transformResolution, transformed, transformedInApply, transformsValid, travKey, tryMorph, withContextOf, writeDomainActual, writeFromPath, writeLengthActual, writeLine, writeListed, writeMessage, writeNotEqualActual, writeProtoActual, writeUnitActual, writeUnitMessage } from "./chunk-
|
|
3
|
+
export { ToJsonSchemaError, supportedJsonSchemaTargets, validateStandardJsonSchemaTarget, writeNullableJsonSchema, writeUnionJsonSchema } from "./chunk-W2XOI5DY.js";
|
|
4
|
+
export { FirstIssueTraversal, FirstIssues, InternalTraversal, Issues as ArkErrors, ThrownIssues as TraversalError, TransformErrors, Traversal, addErrors, addMorphErrs, aliasVisits, alikeIssue, allowsAcyclic, allowsInBranch, allowsInBranchBy, allowsInContext, allowsUntracked, applyCyclic, applyIssues, applyMember, applyRejected, applyResolution, applyValue, callMorph, codedIssue, computeDefaultValueMorph, copyDeclared, copyOf, describeActual, describePredicate, describeUnwrittenActual, disallowed, enInfo, enterApplied, enterResolution, errorsOf, execMorph, exitApplied, exitResolution, failsKey, failsKeySite, failsSite, foundErrors, holdsOnlyIndices, inContext, isCustomIssue, issueAt, issuesOf, keepOwn, lineOf, listedIssue, matchesRepeated, maxAliasDepth, maxAliasVisits, mergeIssues, mergeTransformed, messageOf, missingTextOf, movedIssue, notedAs, pathOf, pipe, pipeApplied, pipeChecked, pipeOf, pipeTransformed, printedActualOf, readingContextWith, rejected, rejects, setOwnValue, sharedMessageOf, silentCtx, throwIssues, throwOnDefault, throwOnProblem, transform, transformIfAllowed, transformResolution, transformed, transformedInApply, transformsValid, travKey, tryMorph, withContextOf, writeDomainActual, writeFromPath, writeLengthActual, writeLine, writeListed, writeMessage, writeNotEqualActual, writeProtoActual, writeUnitActual, writeUnitMessage } from "./chunk-3KBOPH3J.js";
|
|
5
5
|
import "./chunk-3SH2BQ4T.js";
|
|
6
|
-
export { describeCollapsibleDate, printKind } from "./chunk-
|
|
6
|
+
export { describeCollapsibleDate, printKind } from "./chunk-3HZC67MT.js";
|
|
7
7
|
import "./chunk-I2KLQ2HA.js";
|
package/out/schemaRuntimeLean.js
CHANGED
|
@@ -139,7 +139,7 @@ var objectKindOf = (data) => {
|
|
|
139
139
|
if (prototype === Object.prototype)
|
|
140
140
|
return void 0;
|
|
141
141
|
const constructors = builtinsOf();
|
|
142
|
-
while (prototype?.constructor && (!
|
|
142
|
+
while (prototype?.constructor && (!hasOwn(constructors, prototype.constructor.name) || constructors[prototype.constructor.name]?.prototype !== prototype))
|
|
143
143
|
prototype = Object.getPrototypeOf(prototype);
|
|
144
144
|
const name = prototype?.constructor?.name;
|
|
145
145
|
if (name === void 0 || name === "Object")
|
|
@@ -250,9 +250,9 @@ var _serialize = (data, opts, seen) => {
|
|
|
250
250
|
if (toJson)
|
|
251
251
|
return Reflect.apply(toJson, o, []);
|
|
252
252
|
if (typeof o === "function")
|
|
253
|
-
return printableOpts.onFunction(o);
|
|
253
|
+
return opts.onFunction?.(o) ?? printableOpts.onFunction(o);
|
|
254
254
|
if (seen.includes(o))
|
|
255
|
-
return "(cycle)";
|
|
255
|
+
return opts.onCycle?.(o) ?? "(cycle)";
|
|
256
256
|
const nextSeen = [...seen, o];
|
|
257
257
|
if (isArray(o))
|
|
258
258
|
return o.map((item) => _serialize(item, opts, nextSeen));
|
|
@@ -260,12 +260,13 @@ var _serialize = (data, opts, seen) => {
|
|
|
260
260
|
return o.toDateString();
|
|
261
261
|
const result = {};
|
|
262
262
|
for (const [k, v] of ownEntriesOf(o, opts)) {
|
|
263
|
-
|
|
263
|
+
const key = typeof k === "symbol" ? opts.onSymbol?.(k) ?? k.toString() : k;
|
|
264
|
+
defineValue(result, key, _serialize(v, opts, nextSeen));
|
|
264
265
|
}
|
|
265
266
|
return result;
|
|
266
267
|
}
|
|
267
268
|
case "symbol":
|
|
268
|
-
return printableOpts.onSymbol(data);
|
|
269
|
+
return opts.onSymbol?.(data) ?? printableOpts.onSymbol(data);
|
|
269
270
|
case "bigint":
|
|
270
271
|
return opts.onBigInt?.(data) ?? `${data}n`;
|
|
271
272
|
case "undefined":
|
|
@@ -277,6 +278,8 @@ var _serialize = (data, opts, seen) => {
|
|
|
277
278
|
}
|
|
278
279
|
};
|
|
279
280
|
var describeCollapsibleDate = (date) => {
|
|
281
|
+
if (!isValidDate(date))
|
|
282
|
+
return "Invalid Date";
|
|
280
283
|
const year = date.getUTCFullYear();
|
|
281
284
|
const month = date.getUTCMonth();
|
|
282
285
|
const dayOfMonth = date.getUTCDate();
|
|
@@ -423,6 +426,13 @@ export { appliesValues, discriminatesBooleans, failsInBranches, findsOnRead, hol
|
|
|
423
426
|
|
|
424
427
|
// ../schema/out/shared/issuesLean.js
|
|
425
428
|
import { bracketsKeys, callsSiteText, listsUnions, namesTraversalError, readsErrors, readsSummary, reportsIndices, writesText } from "./shared/issueFeatures.js";
|
|
429
|
+
var refuseLocale = (locale) => {
|
|
430
|
+
if (locale === void 0)
|
|
431
|
+
return;
|
|
432
|
+
if (typeof locale !== "object" || locale === null || Array.isArray(locale))
|
|
433
|
+
throw Error("Expected a Locale object");
|
|
434
|
+
throw Error('import "arktype/i18n" to write errors in locales other than en');
|
|
435
|
+
};
|
|
426
436
|
var ReadIssues = class {
|
|
427
437
|
/** @internal each issue in the order it was added */
|
|
428
438
|
_ = [];
|
|
@@ -438,9 +448,7 @@ var ReadIssues = class {
|
|
|
438
448
|
* Each issue, its message written when they are first read.
|
|
439
449
|
*/
|
|
440
450
|
get issues() {
|
|
441
|
-
|
|
442
|
-
issue.message ??= messageOf(issue);
|
|
443
|
-
return this._;
|
|
451
|
+
return serializableIssues(this._);
|
|
444
452
|
}
|
|
445
453
|
/** @internal takes neither a key nor a site, as issues.ts's */
|
|
446
454
|
_e(data, code, expected, message, text) {
|
|
@@ -468,9 +476,7 @@ var Issues = readsErrors ? class ArkErrors {
|
|
|
468
476
|
return this._.length;
|
|
469
477
|
}
|
|
470
478
|
get issues() {
|
|
471
|
-
|
|
472
|
-
issue.message ??= messageOf(issue);
|
|
473
|
-
return this._;
|
|
479
|
+
return serializableIssues(this._);
|
|
474
480
|
}
|
|
475
481
|
_e(data, code, expected, message, text) {
|
|
476
482
|
this._.push({ code, path: this._p.slice(), data, expected, message });
|
|
@@ -487,6 +493,10 @@ var Issues = readsErrors ? class ArkErrors {
|
|
|
487
493
|
get summary() {
|
|
488
494
|
return this._.map(lineOf).join("\n");
|
|
489
495
|
}
|
|
496
|
+
summaryIn(locale) {
|
|
497
|
+
refuseLocale(locale);
|
|
498
|
+
return this.summary;
|
|
499
|
+
}
|
|
490
500
|
// as issues.ts's, an instance of TraversalError wherever it's kept
|
|
491
501
|
throw() {
|
|
492
502
|
if (namesTraversalError)
|
|
@@ -514,10 +524,22 @@ var Issues = readsErrors ? class ArkErrors {
|
|
|
514
524
|
var jsonIssueOf = (issue) => ({
|
|
515
525
|
code: issue.code,
|
|
516
526
|
path: issue.path.map((k) => typeof k === "symbol" ? String(k) : k),
|
|
517
|
-
expected: issue.expected,
|
|
527
|
+
...issue.expected !== void 0 && { expected: issue.expected },
|
|
518
528
|
message: issue.message ?? messageOf(issue),
|
|
519
|
-
...issue.errors
|
|
529
|
+
...issue.errors?.length ? { errors: issue.errors.map(jsonIssueOf) } : {}
|
|
520
530
|
});
|
|
531
|
+
var issuesToJson = {
|
|
532
|
+
value() {
|
|
533
|
+
return this.map(jsonIssueOf);
|
|
534
|
+
},
|
|
535
|
+
writable: true,
|
|
536
|
+
configurable: true
|
|
537
|
+
};
|
|
538
|
+
var serializableIssues = (issues) => {
|
|
539
|
+
for (const issue of issues)
|
|
540
|
+
issue.message ??= messageOf(issue);
|
|
541
|
+
return issues.toJSON ? issues : Object.defineProperty(issues, "toJSON", issuesToJson);
|
|
542
|
+
};
|
|
521
543
|
var FirstIssues = class extends Issues {
|
|
522
544
|
get failFast() {
|
|
523
545
|
return true;
|
|
@@ -552,14 +574,14 @@ var issueAt = (path, site, data, key) => {
|
|
|
552
574
|
var issuesOf = (apply, data, errors) => {
|
|
553
575
|
apply(data, errors);
|
|
554
576
|
if (!errors._.length)
|
|
555
|
-
errors._e(data, "predicate");
|
|
577
|
+
errors._e(data, "predicate", "valid", "is invalid");
|
|
556
578
|
return errors._;
|
|
557
579
|
};
|
|
558
580
|
var foundErrors = (apply, data, onFail, Ctx = Issues) => {
|
|
559
581
|
const errors = new Ctx();
|
|
560
582
|
apply(data, errors);
|
|
561
583
|
if (!errors._.length)
|
|
562
|
-
errors._e(data, "predicate");
|
|
584
|
+
errors._e(data, "predicate", "valid", "is invalid");
|
|
563
585
|
return onFail ? onFail(errors) : errors;
|
|
564
586
|
};
|
|
565
587
|
var throwIssues = (apply, data) => {
|
|
@@ -598,7 +620,7 @@ var pathOf = (issue) => {
|
|
|
598
620
|
var lineOf = (issue) => {
|
|
599
621
|
const message = issue.message ??= messageOf(issue);
|
|
600
622
|
const path = reportsIndices || bracketsKeys ? pathOf(issue) : issue.path.join(".");
|
|
601
|
-
return listsUnions && issue._l !== void 0 ? issue._l : path ? path + (writesText && !message.startsWith(messageOf(issue)) ? ": " : " ") + message : message;
|
|
623
|
+
return listsUnions && issue._l !== void 0 ? issue._l : path ? path + (writesText && !(message === "is invalid" && issue.expected === "valid") && !message.startsWith(messageOf(issue)) ? ": " : " ") + message : message;
|
|
602
624
|
};
|
|
603
625
|
var messageOf = (issue) => issue.expected !== void 0 ? "must be " + issue.expected + (issue.code === "required" ? " (was missing)" : "") : issue.code === "required" ? "is missing" : "is invalid";
|
|
604
626
|
var definedThrown;
|
|
@@ -804,9 +826,15 @@ var copyOf = (data) => {
|
|
|
804
826
|
return { ...data };
|
|
805
827
|
return Object.prototype.toString.call(data) === "[object Object]" ? Object.setPrototypeOf({ ...data }, prototype) : data;
|
|
806
828
|
};
|
|
829
|
+
var setOwnValue = (out, k, value) => {
|
|
830
|
+
if (k === "__proto__")
|
|
831
|
+
defineValue(out, k, value);
|
|
832
|
+
else
|
|
833
|
+
out[k] = value;
|
|
834
|
+
};
|
|
807
835
|
var keepOwn = (out, data, k) => {
|
|
808
836
|
if (!(k in out) && hasOwn(data, k))
|
|
809
|
-
out
|
|
837
|
+
setOwnValue(out, k, data[k]);
|
|
810
838
|
};
|
|
811
839
|
var copyDeclared = (data, declared, changes) => {
|
|
812
840
|
"use strict";
|
|
@@ -817,7 +845,7 @@ var copyDeclared = (data, declared, changes) => {
|
|
|
817
845
|
continue;
|
|
818
846
|
if (out === data)
|
|
819
847
|
out = copyOf(data);
|
|
820
|
-
out
|
|
848
|
+
setOwnValue(out, changes[i], changes[i + 2]);
|
|
821
849
|
}
|
|
822
850
|
if (out !== data)
|
|
823
851
|
for (const k of declared)
|
|
@@ -846,7 +874,7 @@ var mergeTransformed = (input, l, r) => {
|
|
|
846
874
|
delete merged[k];
|
|
847
875
|
for (const k in r) {
|
|
848
876
|
if (!(k in input) || !Object.is(r[k], input[k]))
|
|
849
|
-
merged
|
|
877
|
+
setOwnValue(merged, k, r[k]);
|
|
850
878
|
}
|
|
851
879
|
return merged;
|
|
852
880
|
};
|
|
@@ -1069,11 +1097,9 @@ var Traversal = class extends InternalTraversal {
|
|
|
1069
1097
|
// a code of its own is written without what its rule describes
|
|
1070
1098
|
expected: supplied.expected ?? supplied.description ?? (code === "predicate" || supplied.morph ? describePredicate(supplied) : "valid")
|
|
1071
1099
|
};
|
|
1072
|
-
if (supplied.message !== void 0)
|
|
1100
|
+
if (supplied.message !== void 0)
|
|
1073
1101
|
issue.message = supplied.message;
|
|
1074
|
-
|
|
1075
|
-
issue.expected = void 0;
|
|
1076
|
-
} else if (supplied.cause !== void 0 && (supplied.meta?.keyword || supplied.morph)) {
|
|
1102
|
+
else if (supplied.cause !== void 0 && supplied.morph) {
|
|
1077
1103
|
try {
|
|
1078
1104
|
issue.message = `must be ${issue.expected} (${String(supplied.cause)})`;
|
|
1079
1105
|
} catch {
|
|
@@ -1589,33 +1615,30 @@ var travKey = (key, fn, ctx) => {
|
|
|
1589
1615
|
};
|
|
1590
1616
|
var computeDefaultValueMorph = (key, value, defaultInput, node = value, isThunkInput = isThunk(defaultInput)) => {
|
|
1591
1617
|
const thunk = isThunkInput ? defaultInput : void 0;
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1618
|
+
const write = (data, v) => {
|
|
1619
|
+
setOwnValue(data, key, v);
|
|
1620
|
+
return data;
|
|
1621
|
+
};
|
|
1622
|
+
if (!thunk && !node.alters && !node.hasAlias)
|
|
1623
|
+
return (data) => write(data, defaultInput);
|
|
1598
1624
|
if (!node.allowsCtx && !node.ctxMorph) {
|
|
1599
1625
|
return (data) => {
|
|
1600
1626
|
const input = thunk ? thunk() : defaultInput;
|
|
1601
1627
|
const output = value.traverse(input);
|
|
1602
1628
|
if (output instanceof Issues)
|
|
1603
1629
|
return new TransformErrors(output, input).addTo(void 0, key);
|
|
1604
|
-
data
|
|
1605
|
-
return data;
|
|
1630
|
+
return write(data, output);
|
|
1606
1631
|
};
|
|
1607
1632
|
}
|
|
1608
1633
|
let transformingDefault = false;
|
|
1609
1634
|
return (data, ctx) => {
|
|
1610
1635
|
if (transformingDefault)
|
|
1611
1636
|
return data;
|
|
1612
|
-
if (!thunk && !node.tfs)
|
|
1613
|
-
data
|
|
1614
|
-
return data;
|
|
1615
|
-
}
|
|
1637
|
+
if (!thunk && !node.tfs)
|
|
1638
|
+
return write(data, defaultInput);
|
|
1616
1639
|
transformingDefault = true;
|
|
1617
1640
|
try {
|
|
1618
|
-
data
|
|
1641
|
+
write(data, travKey(key, () => value(thunk ? thunk() : defaultInput, ctx), ctx));
|
|
1619
1642
|
} finally {
|
|
1620
1643
|
transformingDefault = false;
|
|
1621
1644
|
}
|
|
@@ -1812,6 +1835,7 @@ export {
|
|
|
1812
1835
|
rejects,
|
|
1813
1836
|
runtimeConfig,
|
|
1814
1837
|
runtimeScope,
|
|
1838
|
+
setOwnValue,
|
|
1815
1839
|
shareConfig,
|
|
1816
1840
|
sharedMessageOf,
|
|
1817
1841
|
silentCtx,
|