@maroonedog/luq 0.1.2-alpha → 2.0.0
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/LICENSE +9 -9
- package/README.md +389 -215
- package/dist/async/async-context.d.ts +41 -0
- package/dist/async/async-context.js +84 -0
- package/dist/async/async-context.mjs +79 -0
- package/dist/async/async-validator.d.ts +20 -0
- package/dist/async/async-validator.js +52 -0
- package/dist/async/async-validator.mjs +47 -0
- package/dist/async/index.d.ts +4 -0
- package/dist/async/index.js +25 -0
- package/dist/async/index.mjs +16 -0
- package/dist/async.d.ts +1 -0
- package/dist/async.js +2 -0
- package/dist/async.mjs +1 -0
- package/dist/builder/builder-surface.types.d.ts +39 -0
- package/dist/builder/builder-surface.types.js +2 -0
- package/dist/builder/builder-surface.types.mjs +1 -0
- package/dist/builder/compile-declarations.d.ts +4 -0
- package/dist/builder/compile-declarations.js +40 -0
- package/dist/builder/compile-declarations.mjs +37 -0
- package/dist/builder/create-builder.d.ts +16 -0
- package/dist/builder/create-builder.js +98 -0
- package/dist/builder/create-builder.mjs +92 -0
- package/dist/builder/create-field-builder.d.ts +5 -0
- package/dist/builder/create-field-builder.js +47 -0
- package/dist/builder/create-field-builder.mjs +44 -0
- package/dist/builder/create-plan-validator.d.ts +3 -0
- package/dist/builder/create-plan-validator.js +15 -0
- package/dist/builder/create-plan-validator.mjs +12 -0
- package/dist/builder/create-projection-reader.d.ts +3 -0
- package/dist/builder/create-projection-reader.js +44 -0
- package/dist/builder/create-projection-reader.mjs +41 -0
- package/dist/builder/create-subset-validator.d.ts +3 -0
- package/dist/builder/create-subset-validator.js +40 -0
- package/dist/builder/create-subset-validator.mjs +37 -0
- package/dist/builder/field-builder.types.d.ts +43 -0
- package/dist/builder/field-builder.types.js +11 -0
- package/dist/builder/field-builder.types.mjs +8 -0
- package/dist/builder/field-entry.types.d.ts +10 -0
- package/dist/builder/field-entry.types.js +2 -0
- package/dist/builder/field-entry.types.mjs +1 -0
- package/dist/builder/field-options.types.d.ts +11 -0
- package/dist/builder/field-options.types.js +13 -0
- package/dist/builder/field-options.types.mjs +12 -0
- package/dist/builder/global-config-store.d.ts +4 -0
- package/dist/builder/global-config-store.js +29 -0
- package/dist/builder/global-config-store.mjs +24 -0
- package/dist/builder/index.d.ts +6 -0
- package/dist/builder/index.js +17 -0
- package/dist/builder/index.mjs +8 -0
- package/dist/builder/resolve-field-default.d.ts +14 -0
- package/dist/builder/resolve-field-default.js +50 -0
- package/dist/builder/resolve-field-default.mjs +47 -0
- package/dist/builder/validator.types.d.ts +28 -0
- package/dist/builder/validator.types.js +2 -0
- package/dist/builder/validator.types.mjs +1 -0
- package/dist/chain/attach-slot-methods.d.ts +17 -0
- package/dist/chain/attach-slot-methods.js +47 -0
- package/dist/chain/attach-slot-methods.mjs +42 -0
- package/dist/chain/chain-method.types.d.ts +16 -0
- package/dist/chain/chain-method.types.js +2 -0
- package/dist/chain/chain-method.types.mjs +1 -0
- package/dist/chain/chain-state.types.d.ts +47 -0
- package/dist/chain/chain-state.types.js +2 -0
- package/dist/chain/chain-state.types.mjs +1 -0
- package/dist/chain/collect-branch-rules.d.ts +18 -0
- package/dist/chain/collect-branch-rules.js +71 -0
- package/dist/chain/collect-branch-rules.mjs +65 -0
- package/dist/chain/collect-field-rules.d.ts +10 -0
- package/dist/chain/collect-field-rules.js +22 -0
- package/dist/chain/collect-field-rules.mjs +17 -0
- package/dist/chain/create-chain-node.d.ts +26 -0
- package/dist/chain/create-chain-node.js +82 -0
- package/dist/chain/create-chain-node.mjs +77 -0
- package/dist/chain/create-field-slots.d.ts +6 -0
- package/dist/chain/create-field-slots.js +37 -0
- package/dist/chain/create-field-slots.mjs +33 -0
- package/dist/chain/field-chain.types.d.ts +25 -0
- package/dist/chain/field-chain.types.js +2 -0
- package/dist/chain/field-chain.types.mjs +1 -0
- package/dist/chain/field-slots.types.d.ts +18 -0
- package/dist/chain/field-slots.types.js +2 -0
- package/dist/chain/field-slots.types.mjs +1 -0
- package/dist/chain/index.d.ts +13 -0
- package/dist/chain/index.js +26 -0
- package/dist/chain/index.mjs +9 -0
- package/dist/chain/marker-coverage.types.d.ts +56 -0
- package/dist/chain/marker-coverage.types.js +2 -0
- package/dist/chain/marker-coverage.types.mjs +1 -0
- package/dist/chain/plugin-bag.types.d.ts +9 -0
- package/dist/chain/plugin-bag.types.js +2 -0
- package/dist/chain/plugin-bag.types.mjs +1 -0
- package/dist/chain/refine-methods.types.d.ts +33 -0
- package/dist/chain/refine-methods.types.js +14 -0
- package/dist/chain/refine-methods.types.mjs +11 -0
- package/dist/chain/resolve-args.types.d.ts +28 -0
- package/dist/chain/resolve-args.types.js +2 -0
- package/dist/chain/resolve-args.types.mjs +1 -0
- package/dist/chain/slot-value.types.d.ts +14 -0
- package/dist/chain/slot-value.types.js +2 -0
- package/dist/chain/slot-value.types.mjs +1 -0
- package/dist/compile/branch-executor.port.d.ts +6 -0
- package/dist/compile/branch-executor.port.js +2 -0
- package/dist/compile/branch-executor.port.mjs +1 -0
- package/dist/compile/compile-array-node.d.ts +19 -0
- package/dist/compile/compile-array-node.js +50 -0
- package/dist/compile/compile-array-node.mjs +46 -0
- package/dist/compile/compile-composite.d.ts +18 -0
- package/dist/compile/compile-composite.js +30 -0
- package/dist/compile/compile-composite.mjs +27 -0
- package/dist/compile/compile-field.d.ts +31 -0
- package/dist/compile/compile-field.js +67 -0
- package/dist/compile/compile-field.mjs +62 -0
- package/dist/compile/compile-schema.d.ts +8 -0
- package/dist/compile/compile-schema.js +126 -0
- package/dist/compile/compile-schema.mjs +121 -0
- package/dist/compile/declared-child-keys.d.ts +15 -0
- package/dist/compile/declared-child-keys.js +70 -0
- package/dist/compile/declared-child-keys.mjs +66 -0
- package/dist/compile/group-array-fields.d.ts +39 -0
- package/dist/compile/group-array-fields.js +66 -0
- package/dist/compile/group-array-fields.mjs +63 -0
- package/dist/compile/index.d.ts +18 -0
- package/dist/compile/index.js +33 -0
- package/dist/compile/index.mjs +10 -0
- package/dist/compile/resolve-conditional-presence.d.ts +5 -0
- package/dist/compile/resolve-conditional-presence.js +41 -0
- package/dist/compile/resolve-conditional-presence.mjs +37 -0
- package/dist/compile/resolve-presence.d.ts +6 -0
- package/dist/compile/resolve-presence.js +59 -0
- package/dist/compile/resolve-presence.mjs +55 -0
- package/dist/compile/resolve-recursion.d.ts +10 -0
- package/dist/compile/resolve-recursion.js +33 -0
- package/dist/compile/resolve-recursion.mjs +28 -0
- package/dist/compile/split-rules-by-kind.d.ts +16 -0
- package/dist/compile/split-rules-by-kind.js +61 -0
- package/dist/compile/split-rules-by-kind.mjs +56 -0
- package/dist/compile/validation-plan.types.d.ts +113 -0
- package/dist/compile/validation-plan.types.js +2 -0
- package/dist/compile/validation-plan.types.mjs +1 -0
- package/dist/core/type-erasure.d.ts +42 -0
- package/dist/core/type-erasure.js +63 -0
- package/dist/core/type-erasure.mjs +57 -0
- package/dist/field-rule/create-field-rule.d.ts +11 -0
- package/dist/field-rule/create-field-rule.js +50 -0
- package/dist/field-rule/create-field-rule.mjs +46 -0
- package/dist/field-rule/create-plugin-registry.d.ts +2 -0
- package/dist/field-rule/create-plugin-registry.js +60 -0
- package/dist/field-rule/create-plugin-registry.mjs +57 -0
- package/dist/field-rule/field-rule.types.d.ts +38 -0
- package/dist/field-rule/field-rule.types.js +2 -0
- package/dist/field-rule/field-rule.types.mjs +1 -0
- package/dist/field-rule/index.d.ts +5 -0
- package/dist/field-rule/index.js +13 -0
- package/dist/field-rule/index.mjs +6 -0
- package/dist/field-rule/plugin-registry.types.d.ts +17 -0
- package/dist/field-rule/plugin-registry.types.js +2 -0
- package/dist/field-rule/plugin-registry.types.mjs +1 -0
- package/dist/field-rule/use-field.d.ts +6 -0
- package/dist/field-rule/use-field.js +6 -0
- package/dist/field-rule/use-field.mjs +3 -0
- package/dist/field-rule.d.ts +1 -0
- package/dist/field-rule.js +2 -0
- package/dist/field-rule.mjs +1 -0
- package/dist/index.d.ts +14 -72
- package/dist/index.js +48 -2
- package/dist/index.mjs +18 -2
- package/dist/json-schema/apply-keyword-binding.d.ts +20 -0
- package/dist/json-schema/apply-keyword-binding.js +7 -0
- package/dist/json-schema/apply-keyword-binding.mjs +4 -0
- package/dist/json-schema/bind-keyword.d.ts +7 -0
- package/dist/json-schema/bind-keyword.js +21 -0
- package/dist/json-schema/bind-keyword.mjs +16 -0
- package/dist/json-schema/build-from-schema.d.ts +23 -0
- package/dist/json-schema/build-from-schema.js +64 -0
- package/dist/json-schema/build-from-schema.mjs +57 -0
- package/dist/json-schema/collect-definitions.d.ts +21 -0
- package/dist/json-schema/collect-definitions.js +67 -0
- package/dist/json-schema/collect-definitions.mjs +59 -0
- package/dist/json-schema/collect-sub-schema-rules.d.ts +6 -0
- package/dist/json-schema/collect-sub-schema-rules.js +82 -0
- package/dist/json-schema/collect-sub-schema-rules.mjs +78 -0
- package/dist/json-schema/compose-conditional.d.ts +4 -0
- package/dist/json-schema/compose-conditional.js +17 -0
- package/dist/json-schema/compose-conditional.mjs +14 -0
- package/dist/json-schema/compose-keyword.d.ts +7 -0
- package/dist/json-schema/compose-keyword.js +127 -0
- package/dist/json-schema/compose-keyword.mjs +121 -0
- package/dist/json-schema/create-structural-context.d.ts +10 -0
- package/dist/json-schema/create-structural-context.js +51 -0
- package/dist/json-schema/create-structural-context.mjs +48 -0
- package/dist/json-schema/declare-object-keywords.d.ts +24 -0
- package/dist/json-schema/declare-object-keywords.js +140 -0
- package/dist/json-schema/declare-object-keywords.mjs +132 -0
- package/dist/json-schema/declare-presence.d.ts +12 -0
- package/dist/json-schema/declare-presence.js +46 -0
- package/dist/json-schema/declare-presence.mjs +43 -0
- package/dist/json-schema/declare-required-properties.d.ts +18 -0
- package/dist/json-schema/declare-required-properties.js +58 -0
- package/dist/json-schema/declare-required-properties.mjs +55 -0
- package/dist/json-schema/declare-scalar-keywords.d.ts +11 -0
- package/dist/json-schema/declare-scalar-keywords.js +110 -0
- package/dist/json-schema/declare-scalar-keywords.mjs +105 -0
- package/dist/json-schema/declare-value-keywords.d.ts +23 -0
- package/dist/json-schema/declare-value-keywords.js +120 -0
- package/dist/json-schema/declare-value-keywords.mjs +112 -0
- package/dist/json-schema/draft07-keyword-value.types.d.ts +61 -0
- package/dist/json-schema/draft07-keyword-value.types.js +2 -0
- package/dist/json-schema/draft07-keyword-value.types.mjs +1 -0
- package/dist/json-schema/draft07.types.d.ts +57 -0
- package/dist/json-schema/draft07.types.js +28 -0
- package/dist/json-schema/draft07.types.mjs +24 -0
- package/dist/json-schema/extensions/json-schema/index.d.ts +3 -0
- package/dist/json-schema/extensions/json-schema/index.js +27 -0
- package/dist/json-schema/extensions/json-schema/index.mjs +11 -0
- package/dist/json-schema/extensions/json-schema/json-schema.d.ts +18 -0
- package/dist/json-schema/extensions/json-schema/json-schema.js +100 -0
- package/dist/json-schema/extensions/json-schema/json-schema.mjs +96 -0
- package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.d.ts +38 -0
- package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.js +96 -0
- package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.mjs +89 -0
- package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.d.ts +7 -0
- package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.js +107 -0
- package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.mjs +104 -0
- package/dist/json-schema/extensions/json-schema-full-feature/index.d.ts +4 -0
- package/dist/json-schema/extensions/json-schema-full-feature/index.js +25 -0
- package/dist/json-schema/extensions/json-schema-full-feature/index.mjs +14 -0
- package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.d.ts +23 -0
- package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.js +64 -0
- package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.mjs +60 -0
- package/dist/json-schema/flatten-array-schema.d.ts +25 -0
- package/dist/json-schema/flatten-array-schema.js +141 -0
- package/dist/json-schema/flatten-array-schema.mjs +134 -0
- package/dist/json-schema/flatten-schema.d.ts +20 -0
- package/dist/json-schema/flatten-schema.js +162 -0
- package/dist/json-schema/flatten-schema.mjs +157 -0
- package/dist/json-schema/format-map.d.ts +20 -0
- package/dist/json-schema/format-map.js +89 -0
- package/dist/json-schema/format-map.mjs +84 -0
- package/dist/json-schema/index.d.ts +19 -0
- package/dist/json-schema/index.js +57 -0
- package/dist/json-schema/index.mjs +19 -0
- package/dist/json-schema/json-schema-bag.types.d.ts +124 -0
- package/dist/json-schema/json-schema-bag.types.js +2 -0
- package/dist/json-schema/json-schema-bag.types.mjs +1 -0
- package/dist/json-schema/keyword-binding.types.d.ts +50 -0
- package/dist/json-schema/keyword-binding.types.js +2 -0
- package/dist/json-schema/keyword-binding.types.mjs +1 -0
- package/dist/json-schema/keyword-map-array.d.ts +13 -0
- package/dist/json-schema/keyword-map-array.js +37 -0
- package/dist/json-schema/keyword-map-array.mjs +34 -0
- package/dist/json-schema/keyword-map-core.d.ts +8 -0
- package/dist/json-schema/keyword-map-core.js +54 -0
- package/dist/json-schema/keyword-map-core.mjs +51 -0
- package/dist/json-schema/keyword-map-number.d.ts +13 -0
- package/dist/json-schema/keyword-map-number.js +33 -0
- package/dist/json-schema/keyword-map-number.mjs +30 -0
- package/dist/json-schema/keyword-map-object.d.ts +17 -0
- package/dist/json-schema/keyword-map-object.js +51 -0
- package/dist/json-schema/keyword-map-object.mjs +48 -0
- package/dist/json-schema/keyword-map-string.d.ts +20 -0
- package/dist/json-schema/keyword-map-string.js +44 -0
- package/dist/json-schema/keyword-map-string.mjs +41 -0
- package/dist/json-schema/keyword-map.d.ts +32 -0
- package/dist/json-schema/keyword-map.js +93 -0
- package/dist/json-schema/keyword-map.mjs +84 -0
- package/dist/json-schema/resolve-ref.d.ts +16 -0
- package/dist/json-schema/resolve-ref.js +103 -0
- package/dist/json-schema/resolve-ref.mjs +97 -0
- package/dist/json-schema/schema-to-declarations.d.ts +9 -0
- package/dist/json-schema/schema-to-declarations.js +122 -0
- package/dist/json-schema/schema-to-declarations.mjs +116 -0
- package/dist/json-schema/structural-expansion.types.d.ts +83 -0
- package/dist/json-schema/structural-expansion.types.js +22 -0
- package/dist/json-schema/structural-expansion.types.mjs +18 -0
- package/dist/json-schema/unsupported-keyword-error.d.ts +5 -0
- package/dist/json-schema/unsupported-keyword-error.js +24 -0
- package/dist/json-schema/unsupported-keyword-error.mjs +20 -0
- package/dist/path/create-array-reader.d.ts +13 -0
- package/dist/path/create-array-reader.js +22 -0
- package/dist/path/create-array-reader.mjs +19 -0
- package/dist/path/create-value-reader.d.ts +26 -0
- package/dist/path/create-value-reader.js +71 -0
- package/dist/path/create-value-reader.mjs +65 -0
- package/dist/path/create-value-writer.d.ts +5 -0
- package/dist/path/create-value-writer.js +55 -0
- package/dist/path/create-value-writer.mjs +52 -0
- package/dist/path/element-of.types.d.ts +1 -0
- package/dist/path/element-of.types.js +2 -0
- package/dist/path/element-of.types.mjs +1 -0
- package/dist/path/field-path.types.d.ts +13 -0
- package/dist/path/field-path.types.js +2 -0
- package/dist/path/field-path.types.mjs +1 -0
- package/dist/path/format-issue-path.d.ts +15 -0
- package/dist/path/format-issue-path.js +34 -0
- package/dist/path/format-issue-path.mjs +31 -0
- package/dist/path/index.d.ts +18 -0
- package/dist/path/index.js +26 -0
- package/dist/path/index.mjs +7 -0
- package/dist/path/leaf-path.types.d.ts +16 -0
- package/dist/path/leaf-path.types.js +2 -0
- package/dist/path/leaf-path.types.mjs +1 -0
- package/dist/path/match-path-pattern.d.ts +9 -0
- package/dist/path/match-path-pattern.js +66 -0
- package/dist/path/match-path-pattern.mjs +63 -0
- package/dist/path/opaque-object.types.d.ts +5 -0
- package/dist/path/opaque-object.types.js +2 -0
- package/dist/path/opaque-object.types.mjs +1 -0
- package/dist/path/parse-field-path.d.ts +25 -0
- package/dist/path/parse-field-path.js +75 -0
- package/dist/path/parse-field-path.mjs +69 -0
- package/dist/path/path-depth.types.d.ts +4 -0
- package/dist/path/path-depth.types.js +2 -0
- package/dist/path/path-depth.types.mjs +1 -0
- package/dist/path/path-segment.types.d.ts +27 -0
- package/dist/path/path-segment.types.js +2 -0
- package/dist/path/path-segment.types.mjs +1 -0
- package/dist/path/property-value-of.types.d.ts +2 -0
- package/dist/path/property-value-of.types.js +2 -0
- package/dist/path/property-value-of.types.mjs +1 -0
- package/dist/path/reserved-segment.d.ts +28 -0
- package/dist/path/reserved-segment.js +68 -0
- package/dist/path/reserved-segment.mjs +62 -0
- package/dist/path/value-at-path.types.d.ts +25 -0
- package/dist/path/value-at-path.types.js +2 -0
- package/dist/path/value-at-path.types.mjs +1 -0
- package/dist/plugin-kit/compiled-rule.d.ts +99 -0
- package/dist/plugin-kit/compiled-rule.js +2 -0
- package/dist/plugin-kit/compiled-rule.mjs +1 -0
- package/dist/plugin-kit/create-conditional-presence.d.ts +25 -0
- package/dist/plugin-kit/create-conditional-presence.js +32 -0
- package/dist/plugin-kit/create-conditional-presence.mjs +28 -0
- package/dist/plugin-kit/create-rule.d.ts +48 -0
- package/dist/plugin-kit/create-rule.js +67 -0
- package/dist/plugin-kit/create-rule.mjs +57 -0
- package/dist/plugin-kit/external-context.d.ts +2 -0
- package/dist/plugin-kit/external-context.js +25 -0
- package/dist/plugin-kit/external-context.mjs +22 -0
- package/dist/plugin-kit/index.d.ts +11 -0
- package/dist/plugin-kit/index.js +39 -0
- package/dist/plugin-kit/index.mjs +23 -0
- package/dist/plugin-kit/is-json-value-equal.d.ts +10 -0
- package/dist/plugin-kit/is-json-value-equal.js +81 -0
- package/dist/plugin-kit/is-json-value-equal.mjs +77 -0
- package/dist/plugin-kit/marker.types.d.ts +114 -0
- package/dist/plugin-kit/marker.types.js +2 -0
- package/dist/plugin-kit/marker.types.mjs +1 -0
- package/dist/plugin-kit/plugin-definition.d.ts +40 -0
- package/dist/plugin-kit/plugin-definition.js +25 -0
- package/dist/plugin-kit/plugin-definition.mjs +20 -0
- package/dist/plugin-kit/rule-build-context.d.ts +27 -0
- package/dist/plugin-kit/rule-build-context.js +8 -0
- package/dist/plugin-kit/rule-build-context.mjs +5 -0
- package/dist/plugin-kit/runtime-args.types.d.ts +27 -0
- package/dist/plugin-kit/runtime-args.types.js +2 -0
- package/dist/plugin-kit/runtime-args.types.mjs +1 -0
- package/dist/plugin-kit.d.ts +1 -0
- package/dist/plugin-kit.js +2 -0
- package/dist/plugin-kit.mjs +1 -0
- package/dist/plugins/array-contains/array-contains.d.ts +22 -0
- package/dist/plugins/array-contains/array-contains.js +82 -0
- package/dist/plugins/array-contains/array-contains.mjs +79 -0
- package/dist/plugins/array-contains/index.d.ts +2 -0
- package/dist/plugins/array-contains/index.js +5 -0
- package/dist/plugins/array-contains/index.mjs +1 -0
- package/dist/plugins/array-each/array-each.d.ts +14 -0
- package/dist/plugins/array-each/array-each.js +51 -0
- package/dist/plugins/array-each/array-each.mjs +48 -0
- package/dist/plugins/array-each/index.d.ts +1 -0
- package/dist/plugins/array-each/index.js +5 -0
- package/dist/plugins/array-each/index.mjs +1 -0
- package/dist/plugins/array-includes/array-includes.d.ts +9 -0
- package/dist/plugins/array-includes/array-includes.js +26 -0
- package/dist/plugins/array-includes/array-includes.mjs +23 -0
- package/dist/plugins/array-includes/index.d.ts +2 -0
- package/dist/plugins/array-includes/index.js +5 -0
- package/dist/plugins/array-includes/index.mjs +1 -0
- package/dist/plugins/array-max-length/array-max-length.d.ts +10 -0
- package/dist/plugins/array-max-length/array-max-length.js +29 -0
- package/dist/plugins/array-max-length/array-max-length.mjs +26 -0
- package/dist/plugins/array-max-length/index.d.ts +2 -0
- package/dist/plugins/array-max-length/index.js +5 -0
- package/dist/plugins/array-max-length/index.mjs +1 -0
- package/dist/plugins/array-min-length/array-min-length.d.ts +10 -0
- package/dist/plugins/array-min-length/array-min-length.js +29 -0
- package/dist/plugins/array-min-length/array-min-length.mjs +26 -0
- package/dist/plugins/array-min-length/index.d.ts +2 -0
- package/dist/plugins/array-min-length/index.js +5 -0
- package/dist/plugins/array-min-length/index.mjs +1 -0
- package/dist/plugins/array-unique/array-unique.d.ts +7 -0
- package/dist/plugins/array-unique/array-unique.js +54 -0
- package/dist/plugins/array-unique/array-unique.mjs +51 -0
- package/dist/plugins/array-unique/index.d.ts +1 -0
- package/dist/plugins/array-unique/index.js +5 -0
- package/dist/plugins/array-unique/index.mjs +1 -0
- package/dist/plugins/arrayContains.d.ts +1 -37
- package/dist/plugins/arrayContains.js +2 -1
- package/dist/plugins/arrayContains.mjs +1 -1
- package/dist/plugins/arrayEach.d.ts +1 -0
- package/dist/plugins/arrayEach.js +2 -0
- package/dist/plugins/arrayEach.mjs +1 -0
- package/dist/plugins/arrayIncludes.d.ts +1 -42
- package/dist/plugins/arrayIncludes.js +2 -1
- package/dist/plugins/arrayIncludes.mjs +1 -1
- package/dist/plugins/arrayMaxLength.d.ts +1 -43
- package/dist/plugins/arrayMaxLength.js +2 -1
- package/dist/plugins/arrayMaxLength.mjs +1 -1
- package/dist/plugins/arrayMinLength.d.ts +1 -43
- package/dist/plugins/arrayMinLength.js +2 -1
- package/dist/plugins/arrayMinLength.mjs +1 -1
- package/dist/plugins/arrayUnique.d.ts +1 -41
- package/dist/plugins/arrayUnique.js +2 -1
- package/dist/plugins/arrayUnique.mjs +1 -1
- package/dist/plugins/boolean-falsy/boolean-falsy.d.ts +7 -0
- package/dist/plugins/boolean-falsy/boolean-falsy.js +24 -0
- package/dist/plugins/boolean-falsy/boolean-falsy.mjs +21 -0
- package/dist/plugins/boolean-falsy/index.d.ts +1 -0
- package/dist/plugins/boolean-falsy/index.js +5 -0
- package/dist/plugins/boolean-falsy/index.mjs +1 -0
- package/dist/plugins/boolean-truthy/boolean-truthy.d.ts +7 -0
- package/dist/plugins/boolean-truthy/boolean-truthy.js +24 -0
- package/dist/plugins/boolean-truthy/boolean-truthy.mjs +21 -0
- package/dist/plugins/boolean-truthy/index.d.ts +1 -0
- package/dist/plugins/boolean-truthy/index.js +5 -0
- package/dist/plugins/boolean-truthy/index.mjs +1 -0
- package/dist/plugins/booleanFalsy.d.ts +1 -41
- package/dist/plugins/booleanFalsy.js +2 -1
- package/dist/plugins/booleanFalsy.mjs +1 -1
- package/dist/plugins/booleanTruthy.d.ts +1 -38
- package/dist/plugins/booleanTruthy.js +2 -1
- package/dist/plugins/booleanTruthy.mjs +1 -1
- package/dist/plugins/compare-field/compare-field.d.ts +13 -0
- package/dist/plugins/compare-field/compare-field.js +57 -0
- package/dist/plugins/compare-field/compare-field.mjs +54 -0
- package/dist/plugins/compare-field/index.d.ts +2 -0
- package/dist/plugins/compare-field/index.js +5 -0
- package/dist/plugins/compare-field/index.mjs +1 -0
- package/dist/plugins/compareField.d.ts +1 -58
- package/dist/plugins/compareField.js +2 -1
- package/dist/plugins/compareField.mjs +1 -1
- package/dist/plugins/conditional-schema/conditional-schema.d.ts +17 -0
- package/dist/plugins/conditional-schema/conditional-schema.js +87 -0
- package/dist/plugins/conditional-schema/conditional-schema.mjs +84 -0
- package/dist/plugins/conditional-schema/index.d.ts +2 -0
- package/dist/plugins/conditional-schema/index.js +5 -0
- package/dist/plugins/conditional-schema/index.mjs +1 -0
- package/dist/plugins/conditionalSchema.d.ts +1 -0
- package/dist/plugins/conditionalSchema.js +2 -0
- package/dist/plugins/conditionalSchema.mjs +1 -0
- package/dist/plugins/custom/custom.d.ts +12 -0
- package/dist/plugins/custom/custom.js +82 -0
- package/dist/plugins/custom/custom.mjs +79 -0
- package/dist/plugins/custom/index.d.ts +1 -0
- package/dist/plugins/custom/index.js +5 -0
- package/dist/plugins/custom/index.mjs +1 -0
- package/dist/plugins/custom.d.ts +1 -60
- package/dist/plugins/custom.js +2 -1
- package/dist/plugins/custom.mjs +1 -1
- package/dist/plugins/from-context/from-context.d.ts +28 -0
- package/dist/plugins/from-context/from-context.js +84 -0
- package/dist/plugins/from-context/from-context.mjs +81 -0
- package/dist/plugins/from-context/index.d.ts +2 -0
- package/dist/plugins/from-context/index.js +5 -0
- package/dist/plugins/from-context/index.mjs +1 -0
- package/dist/plugins/fromContext.d.ts +1 -0
- package/dist/plugins/fromContext.js +2 -0
- package/dist/plugins/fromContext.mjs +1 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.generated.d.ts +77 -0
- package/dist/plugins/index.generated.js +160 -0
- package/dist/plugins/index.generated.mjs +79 -0
- package/dist/plugins/index.js +2 -0
- package/dist/plugins/index.mjs +1 -0
- package/dist/plugins/jsonSchema.d.ts +1 -11
- package/dist/plugins/jsonSchema.js +2 -1
- package/dist/plugins/jsonSchema.mjs +1 -1
- package/dist/plugins/jsonSchemaFullFeature.d.ts +1 -31
- package/dist/plugins/jsonSchemaFullFeature.js +2 -1
- package/dist/plugins/jsonSchemaFullFeature.mjs +1 -1
- package/dist/plugins/literal/index.d.ts +1 -0
- package/dist/plugins/literal/index.js +5 -0
- package/dist/plugins/literal/index.mjs +1 -0
- package/dist/plugins/literal/literal.d.ts +10 -0
- package/dist/plugins/literal/literal.js +53 -0
- package/dist/plugins/literal/literal.mjs +50 -0
- package/dist/plugins/literal.d.ts +1 -40
- package/dist/plugins/literal.js +2 -1
- package/dist/plugins/literal.mjs +1 -1
- package/dist/plugins/manifest.generated.d.ts +8 -0
- package/dist/plugins/manifest.generated.js +83 -0
- package/dist/plugins/manifest.generated.mjs +80 -0
- package/dist/plugins/nullable/index.d.ts +1 -0
- package/dist/plugins/nullable/index.js +5 -0
- package/dist/plugins/nullable/index.mjs +1 -0
- package/dist/plugins/nullable/nullable.d.ts +7 -0
- package/dist/plugins/nullable/nullable.js +39 -0
- package/dist/plugins/nullable/nullable.mjs +36 -0
- package/dist/plugins/nullable.d.ts +1 -34
- package/dist/plugins/nullable.js +2 -1
- package/dist/plugins/nullable.mjs +1 -1
- package/dist/plugins/number-finite/index.d.ts +1 -0
- package/dist/plugins/number-finite/index.js +5 -0
- package/dist/plugins/number-finite/index.mjs +1 -0
- package/dist/plugins/number-finite/number-finite.d.ts +7 -0
- package/dist/plugins/number-finite/number-finite.js +21 -0
- package/dist/plugins/number-finite/number-finite.mjs +18 -0
- package/dist/plugins/number-integer/index.d.ts +1 -0
- package/dist/plugins/number-integer/index.js +5 -0
- package/dist/plugins/number-integer/index.mjs +1 -0
- package/dist/plugins/number-integer/number-integer.d.ts +7 -0
- package/dist/plugins/number-integer/number-integer.js +21 -0
- package/dist/plugins/number-integer/number-integer.mjs +18 -0
- package/dist/plugins/number-max/index.d.ts +2 -0
- package/dist/plugins/number-max/index.js +5 -0
- package/dist/plugins/number-max/index.mjs +1 -0
- package/dist/plugins/number-max/number-max.d.ts +11 -0
- package/dist/plugins/number-max/number-max.js +36 -0
- package/dist/plugins/number-max/number-max.mjs +33 -0
- package/dist/plugins/number-min/index.d.ts +2 -0
- package/dist/plugins/number-min/index.js +5 -0
- package/dist/plugins/number-min/index.mjs +1 -0
- package/dist/plugins/number-min/number-min.d.ts +11 -0
- package/dist/plugins/number-min/number-min.js +38 -0
- package/dist/plugins/number-min/number-min.mjs +35 -0
- package/dist/plugins/number-multiple-of/index.d.ts +2 -0
- package/dist/plugins/number-multiple-of/index.js +5 -0
- package/dist/plugins/number-multiple-of/index.mjs +1 -0
- package/dist/plugins/number-multiple-of/is-multiple-of.d.ts +7 -0
- package/dist/plugins/number-multiple-of/is-multiple-of.js +61 -0
- package/dist/plugins/number-multiple-of/is-multiple-of.mjs +57 -0
- package/dist/plugins/number-multiple-of/number-multiple-of.d.ts +9 -0
- package/dist/plugins/number-multiple-of/number-multiple-of.js +27 -0
- package/dist/plugins/number-multiple-of/number-multiple-of.mjs +24 -0
- package/dist/plugins/number-negative/index.d.ts +1 -0
- package/dist/plugins/number-negative/index.js +5 -0
- package/dist/plugins/number-negative/index.mjs +1 -0
- package/dist/plugins/number-negative/number-negative.d.ts +7 -0
- package/dist/plugins/number-negative/number-negative.js +21 -0
- package/dist/plugins/number-negative/number-negative.mjs +18 -0
- package/dist/plugins/number-positive/index.d.ts +1 -0
- package/dist/plugins/number-positive/index.js +5 -0
- package/dist/plugins/number-positive/index.mjs +1 -0
- package/dist/plugins/number-positive/number-positive.d.ts +7 -0
- package/dist/plugins/number-positive/number-positive.js +21 -0
- package/dist/plugins/number-positive/number-positive.mjs +18 -0
- package/dist/plugins/number-range/index.d.ts +2 -0
- package/dist/plugins/number-range/index.js +5 -0
- package/dist/plugins/number-range/index.mjs +1 -0
- package/dist/plugins/number-range/number-range.d.ts +11 -0
- package/dist/plugins/number-range/number-range.js +39 -0
- package/dist/plugins/number-range/number-range.mjs +36 -0
- package/dist/plugins/numberFinite.d.ts +1 -0
- package/dist/plugins/numberFinite.js +2 -0
- package/dist/plugins/numberFinite.mjs +1 -0
- package/dist/plugins/numberInteger.d.ts +1 -41
- package/dist/plugins/numberInteger.js +2 -1
- package/dist/plugins/numberInteger.mjs +1 -1
- package/dist/plugins/numberMax.d.ts +1 -49
- package/dist/plugins/numberMax.js +2 -1
- package/dist/plugins/numberMax.mjs +1 -1
- package/dist/plugins/numberMin.d.ts +1 -49
- package/dist/plugins/numberMin.js +2 -1
- package/dist/plugins/numberMin.mjs +1 -1
- package/dist/plugins/numberMultipleOf.d.ts +1 -42
- package/dist/plugins/numberMultipleOf.js +2 -1
- package/dist/plugins/numberMultipleOf.mjs +1 -1
- package/dist/plugins/numberNegative.d.ts +1 -41
- package/dist/plugins/numberNegative.js +2 -1
- package/dist/plugins/numberNegative.mjs +1 -1
- package/dist/plugins/numberPositive.d.ts +1 -41
- package/dist/plugins/numberPositive.js +2 -1
- package/dist/plugins/numberPositive.mjs +1 -1
- package/dist/plugins/numberRange.d.ts +1 -0
- package/dist/plugins/numberRange.js +2 -0
- package/dist/plugins/numberRange.mjs +1 -0
- package/dist/plugins/object/index.d.ts +2 -0
- package/dist/plugins/object/index.js +5 -0
- package/dist/plugins/object/index.mjs +1 -0
- package/dist/plugins/object/object.d.ts +9 -0
- package/dist/plugins/object/object.js +29 -0
- package/dist/plugins/object/object.mjs +26 -0
- package/dist/plugins/object-additional-properties/index.d.ts +3 -0
- package/dist/plugins/object-additional-properties/index.js +11 -0
- package/dist/plugins/object-additional-properties/index.mjs +6 -0
- package/dist/plugins/object-additional-properties/object-additional-properties-schema.d.ts +14 -0
- package/dist/plugins/object-additional-properties/object-additional-properties-schema.js +56 -0
- package/dist/plugins/object-additional-properties/object-additional-properties-schema.mjs +53 -0
- package/dist/plugins/object-additional-properties/object-additional-properties.d.ts +9 -0
- package/dist/plugins/object-additional-properties/object-additional-properties.js +40 -0
- package/dist/plugins/object-additional-properties/object-additional-properties.mjs +37 -0
- package/dist/plugins/object-dependent-required/dependent-required-violation.d.ts +7 -0
- package/dist/plugins/object-dependent-required/dependent-required-violation.js +45 -0
- package/dist/plugins/object-dependent-required/dependent-required-violation.mjs +40 -0
- package/dist/plugins/object-dependent-required/index.d.ts +3 -0
- package/dist/plugins/object-dependent-required/index.js +5 -0
- package/dist/plugins/object-dependent-required/index.mjs +1 -0
- package/dist/plugins/object-dependent-required/object-dependent-required.d.ts +10 -0
- package/dist/plugins/object-dependent-required/object-dependent-required.js +27 -0
- package/dist/plugins/object-dependent-required/object-dependent-required.mjs +24 -0
- package/dist/plugins/object-dependent-schemas/index.d.ts +2 -0
- package/dist/plugins/object-dependent-schemas/index.js +5 -0
- package/dist/plugins/object-dependent-schemas/index.mjs +1 -0
- package/dist/plugins/object-dependent-schemas/object-dependent-schemas.d.ts +16 -0
- package/dist/plugins/object-dependent-schemas/object-dependent-schemas.js +47 -0
- package/dist/plugins/object-dependent-schemas/object-dependent-schemas.mjs +44 -0
- package/dist/plugins/object-max-properties/index.d.ts +2 -0
- package/dist/plugins/object-max-properties/index.js +5 -0
- package/dist/plugins/object-max-properties/index.mjs +1 -0
- package/dist/plugins/object-max-properties/object-max-properties.d.ts +10 -0
- package/dist/plugins/object-max-properties/object-max-properties.js +32 -0
- package/dist/plugins/object-max-properties/object-max-properties.mjs +29 -0
- package/dist/plugins/object-min-properties/index.d.ts +2 -0
- package/dist/plugins/object-min-properties/index.js +5 -0
- package/dist/plugins/object-min-properties/index.mjs +1 -0
- package/dist/plugins/object-min-properties/object-min-properties.d.ts +10 -0
- package/dist/plugins/object-min-properties/object-min-properties.js +32 -0
- package/dist/plugins/object-min-properties/object-min-properties.mjs +29 -0
- package/dist/plugins/object-pattern-properties/index.d.ts +2 -0
- package/dist/plugins/object-pattern-properties/index.js +5 -0
- package/dist/plugins/object-pattern-properties/index.mjs +1 -0
- package/dist/plugins/object-pattern-properties/object-pattern-properties.d.ts +16 -0
- package/dist/plugins/object-pattern-properties/object-pattern-properties.js +57 -0
- package/dist/plugins/object-pattern-properties/object-pattern-properties.mjs +54 -0
- package/dist/plugins/object-property-names/index.d.ts +2 -0
- package/dist/plugins/object-property-names/index.js +5 -0
- package/dist/plugins/object-property-names/index.mjs +1 -0
- package/dist/plugins/object-property-names/object-property-names.d.ts +16 -0
- package/dist/plugins/object-property-names/object-property-names.js +47 -0
- package/dist/plugins/object-property-names/object-property-names.mjs +44 -0
- package/dist/plugins/object-recursively/index.d.ts +2 -0
- package/dist/plugins/object-recursively/index.js +5 -0
- package/dist/plugins/object-recursively/index.mjs +1 -0
- package/dist/plugins/object-recursively/object-recursively.d.ts +11 -0
- package/dist/plugins/object-recursively/object-recursively.js +26 -0
- package/dist/plugins/object-recursively/object-recursively.mjs +23 -0
- package/dist/plugins/object.d.ts +1 -43
- package/dist/plugins/object.js +2 -1
- package/dist/plugins/object.mjs +1 -1
- package/dist/plugins/objectAdditionalProperties.d.ts +1 -51
- package/dist/plugins/objectAdditionalProperties.js +2 -1
- package/dist/plugins/objectAdditionalProperties.mjs +1 -1
- package/dist/plugins/objectDependentRequired.d.ts +1 -42
- package/dist/plugins/objectDependentRequired.js +2 -1
- package/dist/plugins/objectDependentRequired.mjs +1 -1
- package/dist/plugins/objectDependentSchemas.d.ts +1 -40
- package/dist/plugins/objectDependentSchemas.js +2 -1
- package/dist/plugins/objectDependentSchemas.mjs +1 -1
- package/dist/plugins/objectMaxProperties.d.ts +1 -42
- package/dist/plugins/objectMaxProperties.js +2 -1
- package/dist/plugins/objectMaxProperties.mjs +1 -1
- package/dist/plugins/objectMinProperties.d.ts +1 -42
- package/dist/plugins/objectMinProperties.js +2 -1
- package/dist/plugins/objectMinProperties.mjs +1 -1
- package/dist/plugins/objectPatternProperties.d.ts +1 -46
- package/dist/plugins/objectPatternProperties.js +2 -1
- package/dist/plugins/objectPatternProperties.mjs +1 -1
- package/dist/plugins/objectPropertyNames.d.ts +1 -36
- package/dist/plugins/objectPropertyNames.js +2 -1
- package/dist/plugins/objectPropertyNames.mjs +1 -1
- package/dist/plugins/objectRecursively.d.ts +1 -0
- package/dist/plugins/objectRecursively.js +2 -0
- package/dist/plugins/objectRecursively.mjs +1 -0
- package/dist/plugins/one-of/index.d.ts +1 -0
- package/dist/plugins/one-of/index.js +5 -0
- package/dist/plugins/one-of/index.mjs +1 -0
- package/dist/plugins/one-of/one-of.d.ts +7 -0
- package/dist/plugins/one-of/one-of.js +67 -0
- package/dist/plugins/one-of/one-of.mjs +64 -0
- package/dist/plugins/oneOf.d.ts +1 -44
- package/dist/plugins/oneOf.js +2 -1
- package/dist/plugins/oneOf.mjs +1 -1
- package/dist/plugins/optional/index.d.ts +1 -0
- package/dist/plugins/optional/index.js +5 -0
- package/dist/plugins/optional/index.mjs +1 -0
- package/dist/plugins/optional/optional.d.ts +7 -0
- package/dist/plugins/optional/optional.js +42 -0
- package/dist/plugins/optional/optional.mjs +39 -0
- package/dist/plugins/optional-if/index.d.ts +1 -0
- package/dist/plugins/optional-if/index.js +5 -0
- package/dist/plugins/optional-if/index.mjs +1 -0
- package/dist/plugins/optional-if/optional-if.d.ts +11 -0
- package/dist/plugins/optional-if/optional-if.js +31 -0
- package/dist/plugins/optional-if/optional-if.mjs +28 -0
- package/dist/plugins/optional.d.ts +1 -35
- package/dist/plugins/optional.js +2 -1
- package/dist/plugins/optional.mjs +1 -1
- package/dist/plugins/optionalIf.d.ts +1 -0
- package/dist/plugins/optionalIf.js +2 -0
- package/dist/plugins/optionalIf.mjs +1 -0
- package/dist/plugins/or-fail/index.d.ts +1 -0
- package/dist/plugins/or-fail/index.js +5 -0
- package/dist/plugins/or-fail/index.mjs +1 -0
- package/dist/plugins/or-fail/or-fail.d.ts +7 -0
- package/dist/plugins/or-fail/or-fail.js +44 -0
- package/dist/plugins/or-fail/or-fail.mjs +41 -0
- package/dist/plugins/orFail.d.ts +1 -0
- package/dist/plugins/orFail.js +2 -0
- package/dist/plugins/orFail.mjs +1 -0
- package/dist/plugins/read-only/index.d.ts +1 -0
- package/dist/plugins/read-only/index.js +5 -0
- package/dist/plugins/read-only/index.mjs +1 -0
- package/dist/plugins/read-only/read-only.d.ts +7 -0
- package/dist/plugins/read-only/read-only.js +52 -0
- package/dist/plugins/read-only/read-only.mjs +49 -0
- package/dist/plugins/readOnly.d.ts +1 -0
- package/dist/plugins/readOnly.js +2 -0
- package/dist/plugins/readOnly.mjs +1 -0
- package/dist/plugins/readOnlyWriteOnly.d.ts +1 -48
- package/dist/plugins/readOnlyWriteOnly.js +2 -1
- package/dist/plugins/readOnlyWriteOnly.mjs +1 -1
- package/dist/plugins/required/index.d.ts +1 -0
- package/dist/plugins/required/index.js +5 -0
- package/dist/plugins/required/index.mjs +1 -0
- package/dist/plugins/required/required.d.ts +7 -0
- package/dist/plugins/required/required.js +42 -0
- package/dist/plugins/required/required.mjs +39 -0
- package/dist/plugins/required-if/index.d.ts +1 -0
- package/dist/plugins/required-if/index.js +5 -0
- package/dist/plugins/required-if/index.mjs +1 -0
- package/dist/plugins/required-if/required-if.d.ts +11 -0
- package/dist/plugins/required-if/required-if.js +34 -0
- package/dist/plugins/required-if/required-if.mjs +31 -0
- package/dist/plugins/required.d.ts +1 -45
- package/dist/plugins/required.js +2 -1
- package/dist/plugins/required.mjs +1 -1
- package/dist/plugins/requiredIf.d.ts +1 -66
- package/dist/plugins/requiredIf.js +2 -1
- package/dist/plugins/requiredIf.mjs +1 -1
- package/dist/plugins/skip/index.d.ts +1 -0
- package/dist/plugins/skip/index.js +5 -0
- package/dist/plugins/skip/index.mjs +1 -0
- package/dist/plugins/skip/skip.d.ts +7 -0
- package/dist/plugins/skip/skip.js +22 -0
- package/dist/plugins/skip/skip.mjs +19 -0
- package/dist/plugins/skip.d.ts +1 -57
- package/dist/plugins/skip.js +2 -1
- package/dist/plugins/skip.mjs +1 -1
- package/dist/plugins/stitch/index.d.ts +2 -0
- package/dist/plugins/stitch/index.js +5 -0
- package/dist/plugins/stitch/index.mjs +1 -0
- package/dist/plugins/stitch/stitch.d.ts +30 -0
- package/dist/plugins/stitch/stitch.js +72 -0
- package/dist/plugins/stitch/stitch.mjs +69 -0
- package/dist/plugins/stitch.d.ts +1 -0
- package/dist/plugins/stitch.js +2 -0
- package/dist/plugins/stitch.mjs +1 -0
- package/dist/plugins/string-alphanumeric/index.d.ts +1 -0
- package/dist/plugins/string-alphanumeric/index.js +5 -0
- package/dist/plugins/string-alphanumeric/index.mjs +1 -0
- package/dist/plugins/string-alphanumeric/string-alphanumeric.d.ts +8 -0
- package/dist/plugins/string-alphanumeric/string-alphanumeric.js +39 -0
- package/dist/plugins/string-alphanumeric/string-alphanumeric.mjs +36 -0
- package/dist/plugins/string-base64/index.d.ts +1 -0
- package/dist/plugins/string-base64/index.js +5 -0
- package/dist/plugins/string-base64/index.mjs +1 -0
- package/dist/plugins/string-base64/string-base64.d.ts +12 -0
- package/dist/plugins/string-base64/string-base64.js +40 -0
- package/dist/plugins/string-base64/string-base64.mjs +37 -0
- package/dist/plugins/string-content-encoding/content-encoding-checks.d.ts +4 -0
- package/dist/plugins/string-content-encoding/content-encoding-checks.js +67 -0
- package/dist/plugins/string-content-encoding/content-encoding-checks.mjs +64 -0
- package/dist/plugins/string-content-encoding/index.d.ts +2 -0
- package/dist/plugins/string-content-encoding/index.js +5 -0
- package/dist/plugins/string-content-encoding/index.mjs +1 -0
- package/dist/plugins/string-content-encoding/string-content-encoding.d.ts +10 -0
- package/dist/plugins/string-content-encoding/string-content-encoding.js +40 -0
- package/dist/plugins/string-content-encoding/string-content-encoding.mjs +37 -0
- package/dist/plugins/string-content-media-type/index.d.ts +1 -0
- package/dist/plugins/string-content-media-type/index.js +5 -0
- package/dist/plugins/string-content-media-type/index.mjs +1 -0
- package/dist/plugins/string-content-media-type/media-type-checks.d.ts +3 -0
- package/dist/plugins/string-content-media-type/media-type-checks.js +46 -0
- package/dist/plugins/string-content-media-type/media-type-checks.mjs +43 -0
- package/dist/plugins/string-content-media-type/string-content-media-type.d.ts +8 -0
- package/dist/plugins/string-content-media-type/string-content-media-type.js +41 -0
- package/dist/plugins/string-content-media-type/string-content-media-type.mjs +38 -0
- package/dist/plugins/string-date/calendar-date.d.ts +3 -0
- package/dist/plugins/string-date/calendar-date.js +24 -0
- package/dist/plugins/string-date/calendar-date.mjs +20 -0
- package/dist/plugins/string-date/index.d.ts +1 -0
- package/dist/plugins/string-date/index.js +5 -0
- package/dist/plugins/string-date/index.mjs +1 -0
- package/dist/plugins/string-date/string-date.d.ts +7 -0
- package/dist/plugins/string-date/string-date.js +42 -0
- package/dist/plugins/string-date/string-date.mjs +39 -0
- package/dist/plugins/string-datetime/calendar-date.d.ts +2 -0
- package/dist/plugins/string-datetime/calendar-date.js +24 -0
- package/dist/plugins/string-datetime/calendar-date.mjs +20 -0
- package/dist/plugins/string-datetime/index.d.ts +1 -0
- package/dist/plugins/string-datetime/index.js +5 -0
- package/dist/plugins/string-datetime/index.mjs +1 -0
- package/dist/plugins/string-datetime/string-datetime.d.ts +12 -0
- package/dist/plugins/string-datetime/string-datetime.js +67 -0
- package/dist/plugins/string-datetime/string-datetime.mjs +64 -0
- package/dist/plugins/string-duration/index.d.ts +1 -0
- package/dist/plugins/string-duration/index.js +5 -0
- package/dist/plugins/string-duration/index.mjs +1 -0
- package/dist/plugins/string-duration/string-duration.d.ts +7 -0
- package/dist/plugins/string-duration/string-duration.js +31 -0
- package/dist/plugins/string-duration/string-duration.mjs +28 -0
- package/dist/plugins/string-email/index.d.ts +1 -0
- package/dist/plugins/string-email/index.js +5 -0
- package/dist/plugins/string-email/index.mjs +1 -0
- package/dist/plugins/string-email/string-email.d.ts +14 -0
- package/dist/plugins/string-email/string-email.js +58 -0
- package/dist/plugins/string-email/string-email.mjs +55 -0
- package/dist/plugins/string-ends-with/index.d.ts +1 -0
- package/dist/plugins/string-ends-with/index.js +5 -0
- package/dist/plugins/string-ends-with/index.mjs +1 -0
- package/dist/plugins/string-ends-with/string-ends-with.d.ts +8 -0
- package/dist/plugins/string-ends-with/string-ends-with.js +30 -0
- package/dist/plugins/string-ends-with/string-ends-with.mjs +27 -0
- package/dist/plugins/string-exact-length/index.d.ts +1 -0
- package/dist/plugins/string-exact-length/index.js +5 -0
- package/dist/plugins/string-exact-length/index.mjs +1 -0
- package/dist/plugins/string-exact-length/string-exact-length.d.ts +11 -0
- package/dist/plugins/string-exact-length/string-exact-length.js +34 -0
- package/dist/plugins/string-exact-length/string-exact-length.mjs +31 -0
- package/dist/plugins/string-hostname/index.d.ts +1 -0
- package/dist/plugins/string-hostname/index.js +5 -0
- package/dist/plugins/string-hostname/index.mjs +1 -0
- package/dist/plugins/string-hostname/string-hostname.d.ts +7 -0
- package/dist/plugins/string-hostname/string-hostname.js +30 -0
- package/dist/plugins/string-hostname/string-hostname.mjs +27 -0
- package/dist/plugins/string-idn-email/idn-email.d.ts +1 -0
- package/dist/plugins/string-idn-email/idn-email.js +85 -0
- package/dist/plugins/string-idn-email/idn-email.mjs +82 -0
- package/dist/plugins/string-idn-email/index.d.ts +1 -0
- package/dist/plugins/string-idn-email/index.js +5 -0
- package/dist/plugins/string-idn-email/index.mjs +1 -0
- package/dist/plugins/string-idn-email/string-idn-email.d.ts +7 -0
- package/dist/plugins/string-idn-email/string-idn-email.js +29 -0
- package/dist/plugins/string-idn-email/string-idn-email.mjs +26 -0
- package/dist/plugins/string-idn-hostname/idn-hostname.d.ts +1 -0
- package/dist/plugins/string-idn-hostname/idn-hostname.js +72 -0
- package/dist/plugins/string-idn-hostname/idn-hostname.mjs +69 -0
- package/dist/plugins/string-idn-hostname/index.d.ts +1 -0
- package/dist/plugins/string-idn-hostname/index.js +5 -0
- package/dist/plugins/string-idn-hostname/index.mjs +1 -0
- package/dist/plugins/string-idn-hostname/string-idn-hostname.d.ts +7 -0
- package/dist/plugins/string-idn-hostname/string-idn-hostname.js +31 -0
- package/dist/plugins/string-idn-hostname/string-idn-hostname.mjs +28 -0
- package/dist/plugins/string-ipv4/index.d.ts +1 -0
- package/dist/plugins/string-ipv4/index.js +5 -0
- package/dist/plugins/string-ipv4/index.mjs +1 -0
- package/dist/plugins/string-ipv4/string-ipv4.d.ts +7 -0
- package/dist/plugins/string-ipv4/string-ipv4.js +32 -0
- package/dist/plugins/string-ipv4/string-ipv4.mjs +29 -0
- package/dist/plugins/string-ipv6/index.d.ts +1 -0
- package/dist/plugins/string-ipv6/index.js +5 -0
- package/dist/plugins/string-ipv6/index.mjs +1 -0
- package/dist/plugins/string-ipv6/ipv6-address.d.ts +2 -0
- package/dist/plugins/string-ipv6/ipv6-address.js +70 -0
- package/dist/plugins/string-ipv6/ipv6-address.mjs +67 -0
- package/dist/plugins/string-ipv6/string-ipv6.d.ts +7 -0
- package/dist/plugins/string-ipv6/string-ipv6.js +27 -0
- package/dist/plugins/string-ipv6/string-ipv6.mjs +24 -0
- package/dist/plugins/string-iri/control-character.d.ts +1 -0
- package/dist/plugins/string-iri/control-character.js +21 -0
- package/dist/plugins/string-iri/control-character.mjs +18 -0
- package/dist/plugins/string-iri/index.d.ts +1 -0
- package/dist/plugins/string-iri/index.js +5 -0
- package/dist/plugins/string-iri/index.mjs +1 -0
- package/dist/plugins/string-iri/string-iri.d.ts +7 -0
- package/dist/plugins/string-iri/string-iri.js +49 -0
- package/dist/plugins/string-iri/string-iri.mjs +46 -0
- package/dist/plugins/string-iri-reference/control-character.d.ts +1 -0
- package/dist/plugins/string-iri-reference/control-character.js +21 -0
- package/dist/plugins/string-iri-reference/control-character.mjs +18 -0
- package/dist/plugins/string-iri-reference/index.d.ts +1 -0
- package/dist/plugins/string-iri-reference/index.js +5 -0
- package/dist/plugins/string-iri-reference/index.mjs +1 -0
- package/dist/plugins/string-iri-reference/iri-reference.d.ts +1 -0
- package/dist/plugins/string-iri-reference/iri-reference.js +39 -0
- package/dist/plugins/string-iri-reference/iri-reference.mjs +36 -0
- package/dist/plugins/string-iri-reference/string-iri-reference.d.ts +7 -0
- package/dist/plugins/string-iri-reference/string-iri-reference.js +26 -0
- package/dist/plugins/string-iri-reference/string-iri-reference.mjs +23 -0
- package/dist/plugins/string-json-pointer/index.d.ts +1 -0
- package/dist/plugins/string-json-pointer/index.js +5 -0
- package/dist/plugins/string-json-pointer/index.mjs +1 -0
- package/dist/plugins/string-json-pointer/string-json-pointer.d.ts +7 -0
- package/dist/plugins/string-json-pointer/string-json-pointer.js +35 -0
- package/dist/plugins/string-json-pointer/string-json-pointer.mjs +32 -0
- package/dist/plugins/string-max/index.d.ts +1 -0
- package/dist/plugins/string-max/index.js +5 -0
- package/dist/plugins/string-max/index.mjs +1 -0
- package/dist/plugins/string-max/string-max.d.ts +11 -0
- package/dist/plugins/string-max/string-max.js +34 -0
- package/dist/plugins/string-max/string-max.mjs +31 -0
- package/dist/plugins/string-min/index.d.ts +1 -0
- package/dist/plugins/string-min/index.js +5 -0
- package/dist/plugins/string-min/index.mjs +1 -0
- package/dist/plugins/string-min/string-min.d.ts +11 -0
- package/dist/plugins/string-min/string-min.js +37 -0
- package/dist/plugins/string-min/string-min.mjs +34 -0
- package/dist/plugins/string-pattern/index.d.ts +1 -0
- package/dist/plugins/string-pattern/index.js +5 -0
- package/dist/plugins/string-pattern/index.mjs +1 -0
- package/dist/plugins/string-pattern/string-pattern.d.ts +8 -0
- package/dist/plugins/string-pattern/string-pattern.js +49 -0
- package/dist/plugins/string-pattern/string-pattern.mjs +46 -0
- package/dist/plugins/string-regex/index.d.ts +1 -0
- package/dist/plugins/string-regex/index.js +5 -0
- package/dist/plugins/string-regex/index.mjs +1 -0
- package/dist/plugins/string-regex/is-ecma262-regex.d.ts +2 -0
- package/dist/plugins/string-regex/is-ecma262-regex.js +25 -0
- package/dist/plugins/string-regex/is-ecma262-regex.mjs +22 -0
- package/dist/plugins/string-regex/string-regex.d.ts +7 -0
- package/dist/plugins/string-regex/string-regex.js +28 -0
- package/dist/plugins/string-regex/string-regex.mjs +25 -0
- package/dist/plugins/string-relative-json-pointer/index.d.ts +1 -0
- package/dist/plugins/string-relative-json-pointer/index.js +5 -0
- package/dist/plugins/string-relative-json-pointer/index.mjs +1 -0
- package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.d.ts +7 -0
- package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.js +42 -0
- package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.mjs +39 -0
- package/dist/plugins/string-starts-with/index.d.ts +1 -0
- package/dist/plugins/string-starts-with/index.js +5 -0
- package/dist/plugins/string-starts-with/index.mjs +1 -0
- package/dist/plugins/string-starts-with/string-starts-with.d.ts +8 -0
- package/dist/plugins/string-starts-with/string-starts-with.js +30 -0
- package/dist/plugins/string-starts-with/string-starts-with.mjs +27 -0
- package/dist/plugins/string-time/index.d.ts +1 -0
- package/dist/plugins/string-time/index.js +5 -0
- package/dist/plugins/string-time/index.mjs +1 -0
- package/dist/plugins/string-time/string-time.d.ts +12 -0
- package/dist/plugins/string-time/string-time.js +37 -0
- package/dist/plugins/string-time/string-time.mjs +34 -0
- package/dist/plugins/string-uri-reference/index.d.ts +1 -0
- package/dist/plugins/string-uri-reference/index.js +5 -0
- package/dist/plugins/string-uri-reference/index.mjs +1 -0
- package/dist/plugins/string-uri-reference/string-uri-reference.d.ts +7 -0
- package/dist/plugins/string-uri-reference/string-uri-reference.js +28 -0
- package/dist/plugins/string-uri-reference/string-uri-reference.mjs +25 -0
- package/dist/plugins/string-uri-reference/uri-reference.d.ts +1 -0
- package/dist/plugins/string-uri-reference/uri-reference.js +71 -0
- package/dist/plugins/string-uri-reference/uri-reference.mjs +68 -0
- package/dist/plugins/string-uri-template/index.d.ts +1 -0
- package/dist/plugins/string-uri-template/index.js +5 -0
- package/dist/plugins/string-uri-template/index.mjs +1 -0
- package/dist/plugins/string-uri-template/string-uri-template.d.ts +7 -0
- package/dist/plugins/string-uri-template/string-uri-template.js +26 -0
- package/dist/plugins/string-uri-template/string-uri-template.mjs +23 -0
- package/dist/plugins/string-uri-template/uri-template.d.ts +1 -0
- package/dist/plugins/string-uri-template/uri-template.js +59 -0
- package/dist/plugins/string-uri-template/uri-template.mjs +56 -0
- package/dist/plugins/string-url/index.d.ts +1 -0
- package/dist/plugins/string-url/index.js +5 -0
- package/dist/plugins/string-url/index.mjs +1 -0
- package/dist/plugins/string-url/string-url.d.ts +14 -0
- package/dist/plugins/string-url/string-url.js +55 -0
- package/dist/plugins/string-url/string-url.mjs +52 -0
- package/dist/plugins/stringAlphanumeric.d.ts +1 -0
- package/dist/plugins/stringAlphanumeric.js +2 -0
- package/dist/plugins/stringAlphanumeric.mjs +1 -0
- package/dist/plugins/stringBase64.d.ts +1 -119
- package/dist/plugins/stringBase64.js +2 -1
- package/dist/plugins/stringBase64.mjs +1 -1
- package/dist/plugins/stringContentEncoding.d.ts +1 -43
- package/dist/plugins/stringContentEncoding.js +2 -1
- package/dist/plugins/stringContentEncoding.mjs +1 -1
- package/dist/plugins/stringContentMediaType.d.ts +1 -47
- package/dist/plugins/stringContentMediaType.js +2 -1
- package/dist/plugins/stringContentMediaType.mjs +1 -1
- package/dist/plugins/stringDate.d.ts +1 -48
- package/dist/plugins/stringDate.js +2 -1
- package/dist/plugins/stringDate.mjs +1 -1
- package/dist/plugins/stringDatetime.d.ts +1 -108
- package/dist/plugins/stringDatetime.js +2 -1
- package/dist/plugins/stringDatetime.mjs +1 -1
- package/dist/plugins/stringDuration.d.ts +1 -41
- package/dist/plugins/stringDuration.js +2 -1
- package/dist/plugins/stringDuration.mjs +1 -1
- package/dist/plugins/stringEmail.d.ts +1 -81
- package/dist/plugins/stringEmail.js +2 -1
- package/dist/plugins/stringEmail.mjs +1 -1
- package/dist/plugins/stringEndsWith.d.ts +1 -0
- package/dist/plugins/stringEndsWith.js +2 -0
- package/dist/plugins/stringEndsWith.mjs +1 -0
- package/dist/plugins/stringExactLength.d.ts +1 -0
- package/dist/plugins/stringExactLength.js +2 -0
- package/dist/plugins/stringExactLength.mjs +1 -0
- package/dist/plugins/stringHostname.d.ts +1 -104
- package/dist/plugins/stringHostname.js +2 -1
- package/dist/plugins/stringHostname.mjs +1 -1
- package/dist/plugins/stringIdnEmail.d.ts +1 -0
- package/dist/plugins/stringIdnEmail.js +2 -0
- package/dist/plugins/stringIdnEmail.mjs +1 -0
- package/dist/plugins/stringIdnHostname.d.ts +1 -0
- package/dist/plugins/stringIdnHostname.js +2 -0
- package/dist/plugins/stringIdnHostname.mjs +1 -0
- package/dist/plugins/stringIpv4.d.ts +1 -85
- package/dist/plugins/stringIpv4.js +2 -1
- package/dist/plugins/stringIpv4.mjs +1 -1
- package/dist/plugins/stringIpv6.d.ts +1 -104
- package/dist/plugins/stringIpv6.js +2 -1
- package/dist/plugins/stringIpv6.mjs +1 -1
- package/dist/plugins/stringIri.d.ts +1 -117
- package/dist/plugins/stringIri.js +2 -1
- package/dist/plugins/stringIri.mjs +1 -1
- package/dist/plugins/stringIriReference.d.ts +1 -43
- package/dist/plugins/stringIriReference.js +2 -1
- package/dist/plugins/stringIriReference.mjs +1 -1
- package/dist/plugins/stringJsonPointer.d.ts +1 -107
- package/dist/plugins/stringJsonPointer.js +2 -1
- package/dist/plugins/stringJsonPointer.mjs +1 -1
- package/dist/plugins/stringMax.d.ts +1 -43
- package/dist/plugins/stringMax.js +2 -1
- package/dist/plugins/stringMax.mjs +1 -1
- package/dist/plugins/stringMin.d.ts +1 -43
- package/dist/plugins/stringMin.js +2 -1
- package/dist/plugins/stringMin.mjs +1 -1
- package/dist/plugins/stringPattern.d.ts +1 -40
- package/dist/plugins/stringPattern.js +2 -1
- package/dist/plugins/stringPattern.mjs +1 -1
- package/dist/plugins/stringRegex.d.ts +1 -0
- package/dist/plugins/stringRegex.js +2 -0
- package/dist/plugins/stringRegex.mjs +1 -0
- package/dist/plugins/stringRelativeJsonPointer.d.ts +1 -42
- package/dist/plugins/stringRelativeJsonPointer.js +2 -1
- package/dist/plugins/stringRelativeJsonPointer.mjs +1 -1
- package/dist/plugins/stringStartsWith.d.ts +1 -0
- package/dist/plugins/stringStartsWith.js +2 -0
- package/dist/plugins/stringStartsWith.mjs +1 -0
- package/dist/plugins/stringTime.d.ts +1 -39
- package/dist/plugins/stringTime.js +2 -1
- package/dist/plugins/stringTime.mjs +1 -1
- package/dist/plugins/stringUriReference.d.ts +1 -0
- package/dist/plugins/stringUriReference.js +2 -0
- package/dist/plugins/stringUriReference.mjs +1 -0
- package/dist/plugins/stringUriTemplate.d.ts +1 -43
- package/dist/plugins/stringUriTemplate.js +2 -1
- package/dist/plugins/stringUriTemplate.mjs +1 -1
- package/dist/plugins/stringUrl.d.ts +1 -97
- package/dist/plugins/stringUrl.js +2 -1
- package/dist/plugins/stringUrl.mjs +1 -1
- package/dist/plugins/transform/index.d.ts +1 -0
- package/dist/plugins/transform/index.js +5 -0
- package/dist/plugins/transform/index.mjs +1 -0
- package/dist/plugins/transform/transform.d.ts +7 -0
- package/dist/plugins/transform/transform.js +35 -0
- package/dist/plugins/transform/transform.mjs +32 -0
- package/dist/plugins/transform.d.ts +1 -35
- package/dist/plugins/transform.js +2 -1
- package/dist/plugins/transform.mjs +1 -1
- package/dist/plugins/tuple-builder/index.d.ts +2 -0
- package/dist/plugins/tuple-builder/index.js +5 -0
- package/dist/plugins/tuple-builder/index.mjs +1 -0
- package/dist/plugins/tuple-builder/tuple-builder.d.ts +21 -0
- package/dist/plugins/tuple-builder/tuple-builder.js +128 -0
- package/dist/plugins/tuple-builder/tuple-builder.mjs +125 -0
- package/dist/plugins/tupleBuilder.d.ts +1 -66
- package/dist/plugins/tupleBuilder.js +2 -1
- package/dist/plugins/tupleBuilder.mjs +1 -1
- package/dist/plugins/union-guard/index.d.ts +1 -0
- package/dist/plugins/union-guard/index.js +5 -0
- package/dist/plugins/union-guard/index.mjs +1 -0
- package/dist/plugins/union-guard/union-guard.d.ts +14 -0
- package/dist/plugins/union-guard/union-guard.js +56 -0
- package/dist/plugins/union-guard/union-guard.mjs +53 -0
- package/dist/plugins/unionGuard.d.ts +1 -0
- package/dist/plugins/unionGuard.js +2 -0
- package/dist/plugins/unionGuard.mjs +1 -0
- package/dist/plugins/uuid/index.d.ts +1 -0
- package/dist/plugins/uuid/index.js +5 -0
- package/dist/plugins/uuid/index.mjs +1 -0
- package/dist/plugins/uuid/uuid.d.ts +10 -0
- package/dist/plugins/uuid/uuid.js +56 -0
- package/dist/plugins/uuid/uuid.mjs +53 -0
- package/dist/plugins/uuid.d.ts +1 -95
- package/dist/plugins/uuid.js +2 -1
- package/dist/plugins/uuid.mjs +1 -1
- package/dist/plugins/validate-if/index.d.ts +1 -0
- package/dist/plugins/validate-if/index.js +5 -0
- package/dist/plugins/validate-if/index.mjs +1 -0
- package/dist/plugins/validate-if/validate-if.d.ts +7 -0
- package/dist/plugins/validate-if/validate-if.js +22 -0
- package/dist/plugins/validate-if/validate-if.mjs +19 -0
- package/dist/plugins/validateIf.d.ts +1 -57
- package/dist/plugins/validateIf.js +2 -1
- package/dist/plugins/validateIf.mjs +1 -1
- package/dist/plugins/write-only/index.d.ts +1 -0
- package/dist/plugins/write-only/index.js +5 -0
- package/dist/plugins/write-only/index.mjs +1 -0
- package/dist/plugins/write-only/write-only.d.ts +7 -0
- package/dist/plugins/write-only/write-only.js +48 -0
- package/dist/plugins/write-only/write-only.mjs +45 -0
- package/dist/plugins/writeOnly.d.ts +1 -0
- package/dist/plugins/writeOnly.js +2 -0
- package/dist/plugins/writeOnly.mjs +1 -0
- package/dist/result/index.d.ts +18 -0
- package/dist/result/index.js +44 -0
- package/dist/result/index.mjs +36 -0
- package/dist/result.d.ts +1 -0
- package/dist/result.js +2 -0
- package/dist/result.mjs +1 -0
- package/dist/runtime/create-field-validator.d.ts +12 -0
- package/dist/runtime/create-field-validator.js +74 -0
- package/dist/runtime/create-field-validator.mjs +71 -0
- package/dist/runtime/create-issue.d.ts +24 -0
- package/dist/runtime/create-issue.js +34 -0
- package/dist/runtime/create-issue.mjs +30 -0
- package/dist/runtime/create-validator.d.ts +19 -0
- package/dist/runtime/create-validator.js +70 -0
- package/dist/runtime/create-validator.mjs +65 -0
- package/dist/runtime/decide-presence.d.ts +5 -0
- package/dist/runtime/decide-presence.js +47 -0
- package/dist/runtime/decide-presence.mjs +44 -0
- package/dist/runtime/index-stack.d.ts +28 -0
- package/dist/runtime/index-stack.js +68 -0
- package/dist/runtime/index-stack.mjs +63 -0
- package/dist/runtime/index.d.ts +19 -0
- package/dist/runtime/index.js +48 -0
- package/dist/runtime/index.mjs +16 -0
- package/dist/runtime/issue-sink.d.ts +39 -0
- package/dist/runtime/issue-sink.js +61 -0
- package/dist/runtime/issue-sink.mjs +56 -0
- package/dist/runtime/output-writer.d.ts +38 -0
- package/dist/runtime/output-writer.js +59 -0
- package/dist/runtime/output-writer.mjs +52 -0
- package/dist/runtime/run-array-node.d.ts +9 -0
- package/dist/runtime/run-array-node.js +98 -0
- package/dist/runtime/run-array-node.mjs +95 -0
- package/dist/runtime/run-branch.d.ts +14 -0
- package/dist/runtime/run-branch.js +67 -0
- package/dist/runtime/run-branch.mjs +63 -0
- package/dist/runtime/run-field.d.ts +27 -0
- package/dist/runtime/run-field.js +88 -0
- package/dist/runtime/run-field.mjs +84 -0
- package/dist/runtime/run-plan.d.ts +28 -0
- package/dist/runtime/run-plan.js +50 -0
- package/dist/runtime/run-plan.mjs +46 -0
- package/dist/runtime/run-recursion.d.ts +17 -0
- package/dist/runtime/run-recursion.js +119 -0
- package/dist/runtime/run-recursion.mjs +115 -0
- package/dist/subpath-aliases/read-only-write-only.d.ts +2 -0
- package/dist/subpath-aliases/read-only-write-only.js +16 -0
- package/dist/subpath-aliases/read-only-write-only.mjs +11 -0
- package/dist/types/global-config.d.ts +31 -0
- package/dist/types/global-config.js +36 -0
- package/dist/types/global-config.mjs +32 -0
- package/dist/types/index.d.ts +64 -70
- package/dist/types/index.js +28 -0
- package/dist/types/index.mjs +19 -0
- package/dist/types/validation-result.types.d.ts +22 -0
- package/dist/types/validation-result.types.js +2 -0
- package/dist/types/validation-result.types.mjs +1 -0
- package/package.json +516 -353
- package/dist/constants.d.ts +0 -27
- package/dist/core/async.experimental/async-context.d.ts +0 -60
- package/dist/core/builder/array-batch-optimizer.d.ts +0 -66
- package/dist/core/builder/context/field-context.d.ts +0 -31
- package/dist/core/builder/context/field-type-detector.d.ts +0 -19
- package/dist/core/builder/core/builder.d.ts +0 -10
- package/dist/core/builder/core/field-builder.d.ts +0 -13
- package/dist/core/builder/core/index.d.ts +0 -17
- package/dist/core/builder/index.d.ts +0 -24
- package/dist/core/builder/nested-array-processor.d.ts +0 -52
- package/dist/core/builder/plugins/composable-conditional-plugin.d.ts +0 -32
- package/dist/core/builder/plugins/composable-directly-plugin.d.ts +0 -32
- package/dist/core/builder/plugins/composable-plugin.d.ts +0 -242
- package/dist/core/builder/plugins/plugin-creator.d.ts +0 -38
- package/dist/core/builder/plugins/plugin-interfaces.d.ts +0 -343
- package/dist/core/builder/plugins/plugin-types.d.ts +0 -441
- package/dist/core/builder/raw-validator.d.ts +0 -22
- package/dist/core/builder/types/field-options.d.ts +0 -46
- package/dist/core/builder/types/types.d.ts +0 -319
- package/dist/core/builder/ultra-fast-validator.d.ts +0 -30
- package/dist/core/builder/validator-factory.d.ts +0 -29
- package/dist/core/global-config.d.ts +0 -27
- package/dist/core/index.d.ts +0 -36
- package/dist/core/optimization/array-batch-validator.d.ts +0 -68
- package/dist/core/optimization/core/field-utils.d.ts +0 -103
- package/dist/core/optimization/core/strategy-factory.d.ts +0 -84
- package/dist/core/optimization/core/validation-engine.d.ts +0 -107
- package/dist/core/optimization/execution-strategy-selector.d.ts +0 -23
- package/dist/core/optimization/unified-validator.d.ts +0 -45
- package/dist/core/plugin/__tests__/test-utils.d.ts +0 -1
- package/dist/core/plugin/arrayContains.d.ts +0 -37
- package/dist/core/plugin/arrayIncludes.d.ts +0 -42
- package/dist/core/plugin/arrayMaxLength.d.ts +0 -43
- package/dist/core/plugin/arrayMinLength.d.ts +0 -43
- package/dist/core/plugin/arrayUnique.d.ts +0 -41
- package/dist/core/plugin/booleanFalsy.d.ts +0 -41
- package/dist/core/plugin/booleanTruthy.d.ts +0 -38
- package/dist/core/plugin/compareField.d.ts +0 -58
- package/dist/core/plugin/conditionalSchema.d.ts +0 -24
- package/dist/core/plugin/custom.d.ts +0 -60
- package/dist/core/plugin/fromContext.d.ts +0 -150
- package/dist/core/plugin/index.d.ts +0 -71
- package/dist/core/plugin/jsonSchema/dsl-converter.d.ts +0 -22
- package/dist/core/plugin/jsonSchema/error-generation.d.ts +0 -14
- package/dist/core/plugin/jsonSchema/format-validators.d.ts +0 -20
- package/dist/core/plugin/jsonSchema/index.d.ts +0 -11
- package/dist/core/plugin/jsonSchema/plugin.d.ts +0 -35
- package/dist/core/plugin/jsonSchema/ref-resolver.d.ts +0 -14
- package/dist/core/plugin/jsonSchema/types.d.ts +0 -69
- package/dist/core/plugin/jsonSchema/validation-core.d.ts +0 -29
- package/dist/core/plugin/jsonSchemaFullFeature.d.ts +0 -31
- package/dist/core/plugin/literal.d.ts +0 -40
- package/dist/core/plugin/message-factories.d.ts +0 -9
- package/dist/core/plugin/nullable.d.ts +0 -34
- package/dist/core/plugin/numberFinite.d.ts +0 -41
- package/dist/core/plugin/numberInteger.d.ts +0 -41
- package/dist/core/plugin/numberMax.d.ts +0 -49
- package/dist/core/plugin/numberMin.d.ts +0 -49
- package/dist/core/plugin/numberMultipleOf.d.ts +0 -42
- package/dist/core/plugin/numberNegative.d.ts +0 -41
- package/dist/core/plugin/numberPositive.d.ts +0 -41
- package/dist/core/plugin/numberRange.d.ts +0 -48
- package/dist/core/plugin/object.d.ts +0 -43
- package/dist/core/plugin/objectAdditionalProperties.d.ts +0 -51
- package/dist/core/plugin/objectDependentRequired.d.ts +0 -42
- package/dist/core/plugin/objectDependentSchemas.d.ts +0 -40
- package/dist/core/plugin/objectMaxProperties.d.ts +0 -42
- package/dist/core/plugin/objectMinProperties.d.ts +0 -42
- package/dist/core/plugin/objectPatternProperties.d.ts +0 -46
- package/dist/core/plugin/objectPropertyNames.d.ts +0 -36
- package/dist/core/plugin/objectRecursively.d.ts +0 -81
- package/dist/core/plugin/oneOf.d.ts +0 -44
- package/dist/core/plugin/optional.d.ts +0 -35
- package/dist/core/plugin/optionalIf.d.ts +0 -42
- package/dist/core/plugin/orFail.d.ts +0 -132
- package/dist/core/plugin/readOnlyWriteOnly.d.ts +0 -48
- package/dist/core/plugin/required.d.ts +0 -45
- package/dist/core/plugin/requiredIf.d.ts +0 -66
- package/dist/core/plugin/shared-constants.d.ts +0 -45
- package/dist/core/plugin/shared.d.ts +0 -3
- package/dist/core/plugin/skip.d.ts +0 -57
- package/dist/core/plugin/stitch-typed.d.ts +0 -15
- package/dist/core/plugin/stitch.d.ts +0 -1
- package/dist/core/plugin/stitchSimple.d.ts +0 -4
- package/dist/core/plugin/stringAlphanumeric.d.ts +0 -42
- package/dist/core/plugin/stringBase64.d.ts +0 -119
- package/dist/core/plugin/stringContentEncoding.d.ts +0 -43
- package/dist/core/plugin/stringContentMediaType.d.ts +0 -47
- package/dist/core/plugin/stringDate.d.ts +0 -48
- package/dist/core/plugin/stringDatetime.d.ts +0 -108
- package/dist/core/plugin/stringDuration.d.ts +0 -41
- package/dist/core/plugin/stringEmail.d.ts +0 -81
- package/dist/core/plugin/stringEndsWith.d.ts +0 -42
- package/dist/core/plugin/stringExactLength.d.ts +0 -46
- package/dist/core/plugin/stringHostname.d.ts +0 -104
- package/dist/core/plugin/stringIpv4.d.ts +0 -85
- package/dist/core/plugin/stringIpv6.d.ts +0 -104
- package/dist/core/plugin/stringIri.d.ts +0 -117
- package/dist/core/plugin/stringIriReference.d.ts +0 -43
- package/dist/core/plugin/stringJsonPointer.d.ts +0 -107
- package/dist/core/plugin/stringMax.d.ts +0 -43
- package/dist/core/plugin/stringMin.d.ts +0 -43
- package/dist/core/plugin/stringPattern.d.ts +0 -40
- package/dist/core/plugin/stringRelativeJsonPointer.d.ts +0 -42
- package/dist/core/plugin/stringStartsWith.d.ts +0 -42
- package/dist/core/plugin/stringTime.d.ts +0 -39
- package/dist/core/plugin/stringUriTemplate.d.ts +0 -43
- package/dist/core/plugin/stringUrl.d.ts +0 -97
- package/dist/core/plugin/testUtils.d.ts +0 -15
- package/dist/core/plugin/transform-type-restrictions.d.ts +0 -61
- package/dist/core/plugin/transform.d.ts +0 -35
- package/dist/core/plugin/tupleBuilder.d.ts +0 -66
- package/dist/core/plugin/types.d.ts +0 -143
- package/dist/core/plugin/unionGuard.d.ts +0 -50
- package/dist/core/plugin/utils/field-accessor-optimized.d.ts +0 -50
- package/dist/core/plugin/utils/field-accessor.d.ts +0 -107
- package/dist/core/plugin/uuid.d.ts +0 -95
- package/dist/core/plugin/validateIf.d.ts +0 -57
- package/dist/core/registry/plugin-registry.d.ts +0 -116
- package/dist/core/registry.d.ts +0 -6
- package/dist/core/transform/index.d.ts +0 -1
- package/dist/core/transform/string/defaultValue.d.ts +0 -6
- package/dist/core/transform/string/index.d.ts +0 -3
- package/dist/core/transform/string/replace.d.ts +0 -14
- package/dist/core/transform/string/sanitize.d.ts +0 -6
- package/dist/core/utils/type-guards.d.ts +0 -68
- package/dist/index.js.map +0 -7
- package/dist/index.mjs.map +0 -7
- package/dist/types/array-type-analysis.d.ts +0 -115
- package/dist/types/indexed-result.d.ts +0 -44
- package/dist/types/result.d.ts +0 -159
- package/dist/types/stitch-types.d.ts +0 -118
- package/dist/types/util.d.ts +0 -19
- package/dist/types/valitator.d.ts +0 -10
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
function Q(e){if(e!==void 0)return typeof e=="object"&&e!==null&&!Array.isArray(e)&&("default"in e||"description"in e||"deprecated"in e||"metadata"in e)?e:{default:e}}function K(e,t,n){if(!t||!("default"in t)||!(e===void 0||e===null&&t.applyDefaultToNull!==!1))return e;let r=t.default;return typeof r=="function"?r():r}function We(e,t){return{name:"LuqValidationException",message:e,errors:t,toString(){return`${this.name}: ${this.message}`}}}var ze={isValid(){return!0},isError(){return!1},data(){return this._data},unwrap(){return this._data},unwrapOr(e){return this._data},unwrapOrElse(e){return this._data},map(e){return A.ok(e(this._data))},flatMap(e){return e(this._data)},tap(e){return e(this._data),this},tapError(e){return this},onSuccessPostProcess(e){return e(this._data),this},errors(){return[]},toPlainObject(){return{valid:!0,data:this._data,errors:[]}},get valid(){return!0},get value(){return this._data}},A={ok(e){let t=Object.create(ze);return t._data=e,t},error(e){return oe({isValid:!1,data:void 0,errors:e})}};function oe(e){return{isValid(){return e.isValid},isError(){return!e.isValid},unwrap(){if(e.isValid)return e.data;throw We(`Validation failed with ${e.errors.length} error(s)`,e.errors)},unwrapOr(n){return e.isValid?e.data:n},unwrapOrElse(n){return e.isValid?e.data:n(e.errors)},map(n){return e.isValid?A.ok(n(e.data)):A.error(e.errors)},flatMap(n){return e.isValid?n(e.data):A.error(e.errors)},tap(n){return e.isValid&&n(e.data),oe(e)},tapError(n){return e.isValid||n(e.errors),oe(e)},data(){return e.isValid?e.data:void 0},toPlainObject(){return{valid:e.isValid,data:e.isValid?e.data:void 0,errors:e.isValid?[]:e.errors}},get valid(){return e.isValid},get errors(){return e.isValid?[]:e.errors}}}var be;(a=>{function e(r){let s=[],o=r.length;for(let i=0;i<o;i++){let c=r[i];if(c.isError())return A.error(c.errors);s.push(c.unwrap())}return A.ok(s)}a.all=e;function t(r){let s=[],o=r.length;for(let i=0;i<o;i++){let c=r[i];if(c.isValid())return c;s.push(...c.errors)}return A.error(s)}a.any=t;function n(r){let s=[],o=[],i=r.length;for(let c=0;c<i;c++){let l=r[c];l.isValid()?s.push(l.unwrap()):o.push(l.errors)}return{valid:s,invalid:o}}a.partition=n})(be||(be={}));var zt=Object.freeze({valid:!0}),qt=Object.freeze({valid:!1});function Fe(e,t,n,a){let r=t.methodName,s=null,o=null;e[r]=function(...i){if(s||(s=t.createComposer(n,a)),s.add(i),e[r]=s[r],s){o=s.build();let c=e._executionPlan;if(!(c&&o&&typeof o.validate=="function")){if(o&&o._validators)for(let l of o._validators)c.addValidator(l.name,(h,g)=>{let b=l.check(h,h);return{valid:b,message:b?void 0:`Validation failed for ${l.name}`}})}}return e}}function qe(e){switch(e){case"string":return{check:t=>t==null?!0:typeof t=="string",name:"stringType",messageFactory:()=>"Expected string",inputType:"string",outputType:"string",metadata:{severity:"error",async:!1}};case"number":return{check:t=>t==null?!0:typeof t=="number"&&!isNaN(t),name:"numberType",messageFactory:()=>"Expected number",inputType:"number",outputType:"number",metadata:{severity:"error",async:!1}};case"boolean":return{check:t=>t==null?!0:typeof t=="boolean",name:"booleanType",messageFactory:()=>"Expected boolean",inputType:"boolean",outputType:"boolean",metadata:{severity:"error",async:!1}};case"array":return{check:t=>t==null?!0:Array.isArray(t),name:"arrayType",messageFactory:()=>"Expected array",inputType:"array",outputType:"array",metadata:{severity:"error",async:!1}};case"object":return{check:t=>t==null?!0:typeof t=="object"&&t!==null&&!Array.isArray(t),name:"objectType",messageFactory:()=>"Expected object",inputType:"object",outputType:"object",metadata:{severity:"error",async:!1}};case"date":return{check:t=>t==null?!0:t instanceof Date,name:"dateType",messageFactory:()=>"Expected Date",inputType:"date",outputType:"date",metadata:{severity:"error",async:!1}};case"null":return{check:t=>t===null,name:"nullType",messageFactory:()=>"Expected null",inputType:"null",outputType:"null",metadata:{severity:"error",async:!1}};case"any":return{check:()=>!0,name:"anyType",messageFactory:()=>"",inputType:"any",outputType:"any",metadata:{severity:"error",async:!1}};default:return null}}function S(e,t,n,a){let r=a?.validators?[...a.validators]:[];if(!a&&e!=="union"){let i=qe(e);i&&r.push(i)}let s=a?.transforms?[...a.transforms]:[],o={_type:e,_fieldPath:t,_validators:r,_transforms:s,build(){return e==="union"&&r.length===0&&r.push({check:()=>!1,name:"unionGuard",messageFactory:()=>"No union type guards defined",inputType:"union",outputType:"union",metadata:{severity:"error",async:!1}}),{_validators:r,_transforms:s}}};return Ge(o,e,t,n,r,s),o.refineString=()=>S("string",t,n,{validators:r,transforms:s}),o.refineNumber=()=>S("number",t,n,{validators:r,transforms:s}),o.refineBoolean=()=>S("boolean",t,n,{validators:r,transforms:s}),o.refineArray=()=>S("array",t,n,{validators:r,transforms:s}),o.refineObject=()=>S("object",t,n,{validators:r,transforms:s}),o.refineTuple=()=>S("tuple",t,n,{validators:r,transforms:s}),o.refineUnion=()=>S("union",t,n,{validators:r,transforms:s}),o.refineDate=()=>S("date",t,n,{validators:r,transforms:s}),o.refineAny=()=>S("any",t,n,{validators:r,transforms:s}),o}function Ge(e,t,n,a,r,s){let o=Object.entries(a),i=o.length;for(let c=0;c<i;c++){let[,l]=o[c];if(!l||typeof l!="object")continue;if(l.category?.startsWith("composable")){if(l.allowedTypes&&!l.allowedTypes.includes(t))continue;Fe(e,l,n,a);continue}if(typeof l.create!="function"||l.allowedTypes&&!l.allowedTypes.includes(t))continue;let{methodName:h,category:g="standard",name:b}=l,d=l.create();e[h]=function(...u){try{let f=d(...u);if(g==="transform"){let m=He(f,u[0]);s.push(m)}else{let m=Ye(f,n),y=Qe(m,b||h,t,u,f);r.push(y)}}catch{}return e}}}function He(e,t){return typeof e=="function"?t:e?.__isTransform?e.__transformFn:e?.__isCoerce?n=>e.coerce.coerceFn(n):e?.__isDefault?(n,a)=>e.default.applyDefault(n,a):e?.__isPreprocess?(n,a)=>e.preprocess.applyPreprocess(n,a):t||(n=>n)}function Ye(e,t){return typeof e=="function"?(n,a)=>e(n,{path:t,allValues:a}).valid:e?.check?(n,a)=>e.check(n,a):()=>!1}function Qe(e,t,n,a,r){let s={check:e,name:t,code:r?.code||t,pluginName:r?.pluginName||t,getErrorMessage:r?.getErrorMessage,messageFactory:a[a.length-1]?.messageFactory||r?.messageFactory||(()=>"Validation failed"),inputType:n,outputType:n,metadata:r?.metadata||{severity:"error",async:!1}};return r&&(r.shouldSkipAllValidation&&(s.shouldSkipAllValidation=r.shouldSkipAllValidation),r.shouldSkipValidation&&(s.shouldSkipValidation=r.shouldSkipValidation),r.shouldSkipFurtherValidation&&(s.shouldSkipFurtherValidation=r.shouldSkipFurtherValidation),r.skipForNull!==void 0&&(s.skipForNull=r.skipForNull),r.skipForUndefined!==void 0&&(s.skipForUndefined=r.skipForUndefined),r.__isRecursive&&(s.__isRecursive=r.__isRecursive),r.recursive&&(s.recursive=r.recursive)),s}function U(e,t){let n=S("string",e,t),a=S("number",e,t),r=S("boolean",e,t),s=S("array",e,t),o=S("object",e,t),i=S("union",e,t),c=S("tuple",e,t),l=S("date",e,t),h=S("any",e,t);return{string:n,number:a,boolean:r,date:l,array:s,tuple:c,union:i,object:o,any:h}}function Z(e){let t=e.split(".");return{segments:t,isArrayElement:!1,arrayPath:void 0,elementKey:void 0,depth:t.length}}function z(e){let t=Z(e),n;if(t.depth===1){let a=t.segments[0];n=r=>r?.[a]}else if(t.depth===2){let[a,r]=t.segments;n=s=>s?.[a]?.[r]}else if(t.depth===3){let[a,r,s]=t.segments;n=o=>o?.[a]?.[r]?.[s]}else n=a=>{let r=a;for(let s of t.segments){if(r==null)return;r=r[s]}return r};return n}function Ve(e){let t=Z(e),n;if(t.depth===1){let a=t.segments[0];n=(r,s)=>{r!=null&&(r[a]=s)}}else if(t.depth===2){let[a,r]=t.segments;n=(s,o)=>{s!=null&&(s[a]||(s[a]={}),s[a][r]=o)}}else if(t.depth===3){let[a,r,s]=t.segments;n=(o,i)=>{o!=null&&(o[a]||(o[a]={}),o[a][r]||(o[a][r]={}),o[a][r][s]=i)}}else n=(a,r)=>{if(a==null)return;let s=a,o=t.segments;for(let i=0;i<o.length-1;i++){let c=o[i];s[c]||(s[c]={}),s=s[c]}s[o[o.length-1]]=r};return n}function Ze(e,t){return z(t)(e)}function Je(e,t,n){Ve(t)(e,n)}function Pe(e){let t=Z(e);return!t.isArrayElement||!t.arrayPath||!t.elementKey?null:{arrayPath:t.arrayPath,elementPath:t.elementKey,indexPattern:new RegExp(`${t.arrayPath.replace(/\./g,"\\.")}\\[(\\d+)\\]\\.${t.elementKey.replace(/\./g,"\\.")}`)}}function Xe(e){let t=z(e);return n=>{let a=t(n);return Array.isArray(a)?a:[]}}function et(e){let t=new Map;for(let n of e){let a=Pe(n);if(a){let{arrayPath:r,elementPath:s}=a;t.has(r)||t.set(r,{arrayPath:r,elementFields:[]}),t.get(r).elementFields.push(s)}}return t}function tt(e){return e.map(t=>({fieldName:t.split(".").pop()||t,path:t,accessor:z(t)}))}function rt(e){return!e||typeof e!="string"?!1:e.split(".").every(n=>n.length>0&&/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(n))}function nt(e){return e.split(".").filter(t=>t.length>0).join(".")}function at(e,t){let n=e.split("."),a=t.split(".");return n.length!==a.length?n.length-a.length:e.localeCompare(t)}function it(){}function st(){return{pathCacheSize:0,accessorCacheSize:0,setterCacheSize:0}}var Ee={parseFieldPath:Z,createFieldAccessor:z,createFieldSetter:Ve,getNestedValue:Ze,setNestedValue:Je,analyzeArrayField:Pe,createArrayAccessor:Xe,groupArrayFields:et,createBatchAccessors:tt,isValidFieldPath:rt,normalizeFieldPath:nt,compareFieldPaths:at,clearCache:it,getCacheStats:st};function ot(e,t){let n=e.params||[];if(n.length>0){let a=n[0];if(typeof a=="number")return{expected:a,actual:typeof t=="string"?t.length:t};if(typeof a=="string")return{pattern:a,expected:a}}return{}}function J(e,t,n){let a=e.code||e.pluginName||"VALIDATION_ERROR",r="Validation failed";try{if(e.getErrorMessage)r=e.getErrorMessage(t,n.path,n.allValues,n.arrayContext);else if(e.messageFactory){let s={path:n.path,value:t,code:a,...ot(e,t)};r=e.messageFactory(s)}}catch{r=`Validation failed for ${n.path}`}return{path:n.path,code:a,message:r}}function lt(e){if(typeof e=="function")return e;let t=e;if(t.apply&&typeof t.apply=="function")return t.apply;if(t.transformFn&&typeof t.transformFn=="function")return t.transformFn;throw new Error("Invalid transform function")}function Oe(e,t){if(!t.includes("."))return e?.[t];let n=t.indexOf(".");if(n>0&&t.indexOf(".",n+1)===-1){let r=t.substring(0,n),s=t.substring(n+1);return e?.[r]?.[s]}return z(t)(e)}function ce(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let r=e.length,s=new Array(r);for(let o=0;o<r;o++)s[o]=ce(e[o]);return s}let t={},n=Object.keys(e),a=n.length;for(let r=0;r<a;r++){let s=n[r];t[s]=ce(e[s])}return t}function de(e,t,n,a={}){let{abortEarly:r=!0}=a,s=e.validators.length;if(s===0)return{valid:!0,errors:[]};if(s===1){let i=e.validators[0],c=i.check;if(typeof c!="function")throw new Error("Invalid validator: check function is not defined");try{return c(t,n.allValues,n.arrayContext)?{valid:!0,errors:[]}:{valid:!1,errors:[J(i,t,n)]}}catch{return{valid:!1,errors:[J(i,t,n)]}}}let o=[];for(let i=0;i<s;i++){let c=e.validators[i];if(c.metadata?.type==="conditional"&&c.metadata?.category==="skip"){let l=c.check;if(typeof l=="function")try{if(l(t,n.allValues,n.arrayContext))return{valid:!0,errors:[]}}catch{}}}for(let i=0;i<s;i++){let c=e.validators[i],l=c.check;if(typeof l!="function")throw new Error("Invalid validator: check function is not defined");let h=!1;try{h=l(t,n.allValues,n.arrayContext)}catch{h=!1}if(!h&&(o.push(J(c,t,n)),r))break}return{valid:o.length===0,errors:o}}function ct(e,t,n={}){let{abortEarly:a=!1,abortEarlyOnEachField:r=!0}=n,s=[],o=e.length;for(let i=0;i<o;i++){let c=e[i],l=Oe(t,c.path),h={originalValue:l,currentValue:l,allValues:t,path:c.path},g=de(c,l,h,{abortEarly:r});if(!g.valid&&(s.push(...g.errors),a))break}return{valid:s.length===0,errors:s}}function Ae(e,t,n,a={}){let{abortEarly:r=!0}=a,s=de(e,t,n,{abortEarly:r});if(!s.valid)return{valid:!1,errors:s.errors};let o=t;try{o=Re(e.transforms,t,n)}catch(i){return{valid:!1,errors:[{path:n.path,code:"TRANSFORM_ERROR",message:`Transform failed: ${i instanceof Error?i.message:"Unknown error"}`}]}}return{valid:!0,data:o,errors:[]}}function Re(e,t,n){let a=t,r=e.length;for(let s=0;s<r;s++)a=lt(e[s])(a,n);return a}function dt(e,t,n,a=!0,r){let s=e.validators.length;if(s===0)return{valid:!0};if(s===1){let i=e.validators[0].check;if(typeof i!="function")return{valid:!1,errorIndices:[0]};try{return i(t,n,r)?{valid:!0}:{valid:!1,errorIndices:[0]}}catch{return{valid:!1,errorIndices:[0]}}}if(a){for(let i=0;i<s;i++){let c=e.validators[i].check;if(typeof c!="function")return{valid:!1,errorIndices:[i]};let l=!1;try{l=c(t,n,r)}catch{l=!1}if(!l)return{valid:!1,errorIndices:[i]}}return{valid:!0}}let o=[];for(let i=0;i<s;i++){let c=e.validators[i].check;if(typeof c!="function"){o.push(i);continue}let l=!1;try{l=c(t,n,r)}catch{l=!1}l||o.push(i)}return o.length===0?{valid:!0}:{valid:!1,errorIndices:o}}function ut(e,t,n,a,r){let s={originalValue:n,currentValue:n,allValues:a,path:e.path,arrayContext:r};return t.filter(o=>o<e.validators.length).map(o=>{let i=e.validators[o];return J(i,n,s)})}function ft(){let e=new Map,t=r=>{let s=e.get(r);if(!s){if(!r.includes("."))s=(o,i)=>{o!=null&&(o[r]=i)};else{let o=r.split("."),i=o.length-1;s=(c,l)=>{let h=c;for(let g=0;g<i;g++){let b=o[g];h[b]||(h[b]={}),h=h[b]}h[o[i]]=l}}e.set(r,s)}return s},n=(r,s,o)=>{if(!s.includes(".")){r!=null&&(r[s]=o);return}t(s)(r,o)};return{validateField:de,validateBatch:ct,parseField:Ae,parseBatch:(r,s,o={})=>{let{abortEarly:i=!1,abortEarlyOnEachField:c=!0}=o,l=[],h=ce(s),g=r.length;for(let b=0;b<g;b++){let d=r[b],u=Oe(s,d.path),f={originalValue:u,currentValue:u,allValues:s,path:d.path},m=Ae(d,u,f,{abortEarly:c});if(m.valid)m.data!==void 0&&n(h,d.path,m.data);else if(l.push(...m.errors),i)break}return{valid:l.length===0,data:l.length===0?h:void 0,errors:l}},applyTransforms:Re,validateHoisted:dt,reconstructErrors:ut}}var le=null;function xe(){return le||(le=ft()),le}var sr=xe();function ve(e,t){let n=e.length,a=!1,r=!1;for(let c of e)yt(c.builderFunction).some(h=>pt(h,t))&&(a=!0),Ee.parseFieldPath(c.path).isArrayElement&&(r=!0);let s,o,i;return r?(s="array_batch",o="Array fields detected - using batch processing",i=!0):a?(s="definition_order",o="Transforms detected - using definition order",i=!1):(s="fast_separated",o="No transforms or arrays - using fast separated execution",i=!0),{strategy:s,reason:o,canOptimize:i,hasTransforms:a,hasArrayFields:r,fieldCount:n}}function yt(e){let t=e.toString(),n=/\.(\w+)\(/g,a=[],r;for(;(r=n.exec(t))!==null;)a.push(r[1]);return a}function pt(e,t){return Object.values(t).find(a=>a?.methodName===e)?.category==="transform"||e==="transform"||e.startsWith("to")}function ue(e,t){let n=ve(e,t),a=new Map;for(let r of e)a.set(r.path,n);return a}function ke(e){let t=[],n=[];return e.forEach((a,r)=>{a.strategy==="fast_separated"?t.push(r):n.push(r)}),{fastFields:t,slowFields:n}}var _=".",D="validate",k="parse";function G(e,t,n="fast_separated",a){let r=U(e.path,t),s=e.builderFunction(r);s&&typeof s.build=="function"&&(s=s.build());let o=s._validators||[],i=s._transforms||[],c=e.path,l=o.some(T=>T.shouldSkipAllValidation||T.shouldSkipValidation),h=i.length>0;if(!l&&!h&&o.length<=10&&n==="fast_separated")return gt(o,c);if(!l&&h&&o.length<=10&&i.length<=5&&n==="fast_separated")return ht(o,i,c);let d=n==="definition_order"||l;return{validate:d?(T,p,P)=>{let E=P?.abortEarlyOnEachField!==!1,R=je(T,p,o,i,c,E,D);return{valid:R.valid,errors:R.errors}}:(T,p,P={})=>{let E=P.abortEarlyOnEachField!==!1;return Ne(T,p,o,i,c,E,D)},parse:d?(T,p,P)=>{let E=P?.abortEarlyOnEachField!==!1;return je(T,p,o,i,c,E,k)}:(T,p,P={})=>{let E=P.abortEarlyOnEachField!==!1;return Ne(T,p,o,i,c,E,k)},accessor:a}}function je(e,t,n,a,r,s,o=k){let i=[],c=e,l=n.some(b=>b.skipForNull===!0),h=n.some(b=>b.skipForUndefined===!0);if(e===null&&l||e===void 0&&h)return o===k?{valid:!0,data:e,errors:[]}:{valid:!0,data:void 0,errors:[]};let g=n.length;for(let b=0;b<g;b++){let d=n[b];if(d.shouldSkipAllValidation&&typeof d.shouldSkipAllValidation=="function"&&d.shouldSkipAllValidation(c,t))break;let u=d.check||d;if(typeof u=="function"&&!u(c,t)){let f={path:r,code:d.code||d.pluginName||"VALIDATION_ERROR",message:C(d,c,r,t)};if(s)return{valid:!1,data:void 0,errors:[f]};i.push(f)}}if(i.length>0)return{valid:!1,data:void 0,errors:i};if(o===k&&a.length>0){let b=[];for(let u=0;u<a.length;u++){let f=a[u];typeof f=="function"?b.push(f):f&&typeof f.apply=="function"&&b.push(f.apply)}let d=b.length;if(d===1)c=b[0](c);else if(d===2)c=b[0](c),c=b[1](c);else if(d>0)for(let u=0;u<d;u++)c=b[u](c)}return o===D?W:{valid:!0,data:c,errors:[]}}function Ne(e,t,n,a,r,s,o=k){let i=[],c=n.length,l=n.some(d=>d.skipForNull===!0),h=n.some(d=>d.skipForUndefined===!0);if(e===null&&l||e===void 0&&h)return o===k?{valid:!0,data:e,errors:[]}:{valid:!0,data:void 0,errors:[]};for(let d=0;d<c;d++){let u=n[d];if(u.shouldSkipAllValidation&&typeof u.shouldSkipAllValidation=="function"&&u.shouldSkipAllValidation(e,t))break;let f=u.check||u;if(typeof f=="function"&&!f(e,t)){if(s)return{valid:!1,data:void 0,errors:[{path:r,code:u.code||u.pluginName||"VALIDATION_ERROR",message:C(u,e,r,t)}]};i.push({path:r,code:u.code||u.pluginName||"VALIDATION_ERROR",message:C(u,e,r,t)})}}if(o===D)return i.length===0?W:{valid:!1,errors:i};if(i.length>0)return{valid:!1,data:void 0,errors:i};let g=e,b=a.length;if(b>0){let d=[];for(let f=0;f<b;f++){let m=a[f];typeof m=="function"?d.push(m):m&&typeof m.apply=="function"&&d.push(m.apply)}let u=d.length;if(u===1)g=d[0](g);else if(u===2)g=d[0](g),g=d[1](g);else if(u>0)for(let f=0;f<u;f++)g=d[f](g)}return{valid:!0,data:g,errors:[]}}function gt(e,t,n){let a=[],r=[],s=[],o=[],i=e.length;for(let b=0;b<i;b++){let d=e[b];a.push(d.check||d),r.push(d.code||d.pluginName||"VALIDATION_ERROR"),d.getErrorMessage&&typeof d.getErrorMessage=="function"||d.messageFactory?(s.push(""),o.push(!0)):(s.push(`Validation failed for ${t}`),o.push(!1))}let c=a.length,l={path:t,code:"",message:""},h;if(c===1){let b=a[0],d=r[0],u=s[0],f=o[0];h=(m,y,F)=>b(m,y)?W:(l.code=d,l.message=f?C(e[0],m,t,y):u,{valid:!1,errors:[{path:l.path,code:l.code,message:l.message}]})}else if(c===2){let b=a[0],d=a[1],u=r[0],f=r[1],m=s[0],y=s[1],F=o[0],V=o[1];h=(T,p,P)=>{if(!b(T,p)){if(P?.abortEarlyOnEachField!==!1)return l.code=u,l.message=F?C(e[0],T,t,p):m,{valid:!1,errors:[{path:l.path,code:l.code,message:l.message}]};let E=[{path:t,code:u,message:F?C(e[0],T,t,p):m}];return d(T,p)||E.push({path:t,code:f,message:V?C(e[1],T,t,p):y}),{valid:!1,errors:E}}return d(T,p)?W:(l.code=f,l.message=V?C(e[1],T,t,p):y,{valid:!1,errors:[{path:l.path,code:l.code,message:l.message}]})}}else h=(b,d,u)=>{for(let f=0;f<c;f++)if(!a[f](b,d)){if(u?.abortEarlyOnEachField!==!1)return l.code=r[f],l.message=o[f]?C(e[f],b,t,d):s[f],{valid:!1,errors:[{path:l.path,code:l.code,message:l.message}]};let m=[];m.push({path:t,code:r[f],message:o[f]?C(e[f],b,t,d):s[f]});for(let y=f+1;y<c;y++)a[y](b,d)||m.push({path:t,code:r[y],message:o[y]?C(e[y],b,t,d):s[y]});return{valid:!1,errors:m}}return W};return{validate:h,parse:(b,d,u={})=>{let f=h(b,d,u);return f.valid?{valid:!0,data:b,errors:[]}:{valid:!1,data:void 0,errors:f.errors}},accessor:n}}var W=Object.freeze({valid:!0,errors:[]});function C(e,t,n,a){if(e.getErrorMessage)try{return e.getErrorMessage(t,n,a)}catch{return`Validation failed for ${n}`}else if(e.messageFactory)try{let r={path:n,value:t,code:e.code||e.pluginName||"VALIDATION_ERROR"};return e.messageFactory(r)}catch{return`Validation failed for ${n}`}return`Validation failed for ${n}`}function ht(e,t,n,a){let r=e.length,s=t.length,o=new Array(r),i=new Array(r);for(let d=0;d<r;d++){let u=e[d];o[d]=u.check||u,i[d]=u.code||u.pluginName||"VALIDATION_ERROR"}let c=new Array(s),l=0;for(let d=0;d<s;d++){let u=t[d];typeof u=="function"?c[l++]=u:u&&typeof u.apply=="function"&&(c[l++]=u.apply)}if(r===1&&l===1){let d=o[0],u=i[0],f=c[0],m=e[0],y={valid:!1,errors:[{path:n,code:u,message:""}]},F={valid:!1,data:void 0,errors:[{path:n,code:u,message:""}]},V={valid:!0,data:null,errors:[]};return{validate:(T,p,P)=>d(T,p)?W:(y.errors[0].message=C(m,T,n,p),y),parse:(T,p,P)=>d(T,p)?(V.data=f(T),V):(F.errors[0].message=C(m,T,n,p),F)}}if(r===2&&l===1){let d=o[0],u=o[1],f=i[0],m=i[1],y=c[0],F=e[0],V=e[1],T={valid:!1,errors:[{path:n,code:f,message:""}]},p={valid:!1,errors:[{path:n,code:m,message:""}]},P={valid:!1,data:void 0,errors:[{path:n,code:f,message:""}]},E={valid:!1,data:void 0,errors:[{path:n,code:m,message:""}]},R={valid:!0,data:null,errors:[]};return{validate:(x,O,v)=>d(x,O)?u(x,O)?W:(p.errors[0].message=C(V,x,n,O),p):(T.errors[0].message=C(F,x,n,O),T),parse:(x,O,v)=>d(x,O)?u(x,O)?(R.data=y(x),R):(E.errors[0].message=C(V,x,n,O),E):(P.errors[0].message=C(F,x,n,O),P)}}let h={path:n,code:"",message:""};return{validate:(d,u,f={})=>{for(let m=0;m<r;m++)if(!o[m](d,u)){if(f.abortEarlyOnEachField!==!1)return h.code=e[m].code||e[m].pluginName||"VALIDATION_ERROR",h.message=C(e[m],d,n,u),{valid:!1,errors:[{...h}]};let y=[];y.push({path:n,code:e[m].code||e[m].pluginName||"VALIDATION_ERROR",message:C(e[m],d,n,u)});for(let F=m+1;F<r;F++)o[F](d,u)||y.push({path:n,code:e[F].code||e[F].pluginName||"VALIDATION_ERROR",message:C(e[F],d,n,u)});return{valid:!1,errors:y}}return W},parse:(d,u,f={})=>{let m=e.some(V=>V.skipForNull===!0),y=e.some(V=>V.skipForUndefined===!0);if(d===null&&m||d===void 0&&y)return{valid:!0,data:d,errors:[]};for(let V=0;V<r;V++)if(!o[V](d,u)){if(f.abortEarlyOnEachField!==!1)return h.code=e[V].code||e[V].pluginName||"VALIDATION_ERROR",h.message=C(e[V],d,n,u),{valid:!1,data:void 0,errors:[{...h}]};let T=[];T.push({path:n,code:e[V].code||e[V].pluginName||"VALIDATION_ERROR",message:C(e[V],d,n,u)});for(let p=V+1;p<r;p++)o[p](d,u)||T.push({path:n,code:e[p].code||e[p].pluginName||"VALIDATION_ERROR",message:C(e[p],d,n,u)});return{valid:!1,data:void 0,errors:T}}let F=d;if(l===1)F=c[0](F);else if(l===2)F=c[0](F),F=c[1](F);else if(l>0)for(let V=0;V<l;V++)F=c[V](F);return{valid:!0,data:F,errors:[]}},accessor:a}}function ye(e){if(e.length===0)return t=>t;if(e.length===1){let t=e[0];return n=>n?.[t]}if(e.length===2){let[t,n]=e;return a=>a?.[t]?.[n]}if(e.length===3){let[t,n,a]=e;return r=>r?.[t]?.[n]?.[a]}if(e.length===4){let[t,n,a,r]=e;return s=>s?.[t]?.[n]?.[a]?.[r]}if(e.length===5){let[t,n,a,r,s]=e;return o=>o?.[t]?.[n]?.[a]?.[r]?.[s]}return t=>{let n=t,a=e.length;for(let r=0;r<a;r++){let s=e[r];if(n=n?.[s],n===void 0)return}return n}}function fe(e){return ye(e.split(_))}function pe(e){let t=fe(e);return n=>t(n)!==void 0}function X(e){let t=e.split(_);if(t.length===1){let n=t[0];return(a,r)=>{a[n]=r}}if(t.length===2){let[n,a]=t;return(r,s)=>{r[n]||(r[n]={}),r[n][a]=s}}if(t.length===3){let[n,a,r]=t;return(s,o)=>{s[n]||(s[n]={}),s[n][a]||(s[n][a]={}),s[n][a][r]=o}}return(n,a)=>{let r=n;for(let s=0;s<t.length-1;s++){let o=t[s];r[o]||(r[o]={}),r=r[o]}r[t[t.length-1]]=a}}function $(e){if(!e.includes(_))return a=>a[e];let t=e.split(_),n=t.length;if(n===2){let[a,r]=t;return s=>{let o=s[a];return Array.isArray(o)?o:o!=null&&typeof o=="object"?o[r]:void 0}}return a=>{let r=a;for(let s=0;s<n;s++){if(r==null||typeof r!="object")return;let o=t[s],i=r[o];if(Array.isArray(i)&&s<n-1){let c=t.slice(s+1).join(".");return{__isArrayElementField:!0,values:i.map(h=>{if(h==null||typeof h!="object")return;if(c.indexOf(".")===-1)return h[c];let g=h,b=t.slice(s+1),d=b.length;for(let u=0;u<d;u++){if(g==null||typeof g!="object")return;g=g[b[u]]}return g}),arrayPath:t.slice(0,s+1).join(".")}}r=i}return r}}function ee(e){if(!e.includes("[*]"))return{hasArrayElements:!1,segments:e.split(_).map(s=>({name:s,isArrayElement:!1}))};let n=e.split(_),a=[];for(let s of n)if(s.endsWith("[*]")){let o=s.slice(0,-3);a.push({name:o,isArrayElement:!0})}else a.push({name:s,isArrayElement:!1});let r=a.findIndex(s=>s.isArrayElement);if(r!==-1){let s=a.slice(0,r+1).map(i=>i.name).join(_),o=a.slice(r+1).map(i=>i.name).join(_);return{hasArrayElements:!0,segments:a,baseArrayPath:s,elementPath:o||""}}return{hasArrayElements:!0,segments:a}}function ge(e){let t=ee(e);if(!t.hasArrayElements||!t.baseArrayPath)return()=>null;let n=fe(t.baseArrayPath),a=t.elementPath||"";return r=>{let s=n(r);if(!Array.isArray(s))return null;let o;if(a==="")o=s;else{let i=fe(a);o=s.map(c=>i(c))}return{elements:o,basePath:t.baseArrayPath,elementPath:a}}}function te(e){let t=e.match(/^(.+\[\*\])\[\*\]$/);if(t)return{isArrayElementPath:!0,arrayPath:t[1],elementField:""};if(e.match(/^(.+?)(\[\*\]\.(.+))?$/)&&e.includes("[*].")){let o=e.split(/\[\*\]\./);if(o.length>=2){let i=o[o.length-1];if(i.includes("[*]")){let c=i.replace(/\[\*\]$/,"");return{isArrayElementPath:!0,arrayPath:o.slice(0,-1).concat(c).join("."),elementField:""}}else return{isArrayElementPath:!0,arrayPath:o.slice(0,-1).join("."),elementField:i}}}let a=e.match(/^([^\[]+)\[\*\]\.(.+)$/);if(a)return{isArrayElementPath:!0,arrayPath:a[1],elementField:a[2]};let r=e.match(/^([^\[]+)\[\*\]$/);if(r)return{isArrayElementPath:!0,arrayPath:r[1],elementField:""};let s=e.match(/^([^\.]+)\.\*\.(.+)$/);return s?{isArrayElementPath:!0,arrayPath:s[1],elementField:s[2]}:{isArrayElementPath:!1}}function we(e){let t=[],n=new Set;for(let o of e){let i=te(o.path);if(i.isArrayElementPath&&i.arrayPath){if(n.add(i.arrayPath),i.elementField&&i.elementField.includes("[*]")){let c=`${i.arrayPath}.${i.elementField.split("[*]")[0]}`;n.add(c)}t.push({...o,originalPath:o.path})}else t.push(o)}for(let o of n)t.some(i=>i.path===o&&i.isArrayField)||t.push({path:o,isArrayField:!0});let a=new Set;for(let o of t)if(o.originalPath){let i=te(o.originalPath);if(i.isArrayElementPath&&i.elementField&&i.elementField.includes("[*]")){let c=i.elementField.split("[*]")[0],l=`${i.arrayPath}.${c}`;!a.has(l)&&!t.some(h=>h.path===l&&h.isArrayField)&&a.add(l)}}for(let o of a)t.push({path:o,isArrayField:!0});let r=t.filter(o=>o.isArrayField?o.path.includes("[*]")?!!o.path.match(/\[\*\]$/):!0:!1);r.sort((o,i)=>{let c=o.path.split(".").length,l=i.path.split(".").length;return c-l});let s=new Map;for(let o of r){let i=o.path,c=i.split(".").length-1,l;for(let f of s.keys())i.startsWith(f+".")?(!l||f.length>l.length)&&(l=f):i.startsWith(f+"[*]")&&f!==i&&(!l||f.length>l.length)&&(l=f);let h=t.filter(f=>{let m=f.originalPath||f.path,y=te(m);return y.isArrayElementPath&&y.arrayPath===i?!0:m.startsWith(i+".")});if(h.length===0)continue;let g=[],b=[];for(let f of h){let m=f.originalPath||f.path,y=te(m),F;y.isArrayElementPath&&y.arrayPath===i&&y.elementField!==void 0?F=y.elementField:F=m.substring(i.length+1),r.some(T=>T.path!==i&&T.path.startsWith(i+".")&&f.path.startsWith(T.path+"."))||g.push(F),f.isArrayField||b.push(f.originalPath||f.path)}let d=new Map;for(let f of g){let m=f.split(".");d.set(f,ye(m))}let u={arrayPath:i,elementFields:g,fullFieldPaths:b,validators:new Map,accessors:d,childArrays:new Map,depth:c,parentPath:l};s.set(i,u)}for(let[o,i]of s)if(i.parentPath){let c=s.get(i.parentPath);if(c){let l;o.startsWith(i.parentPath+".")?l=o.substring(i.parentPath.length+1):o.startsWith(i.parentPath+"[*]")?l=o.substring(i.parentPath.length):l=o.substring(i.parentPath.length+1),c.childArrays.set(l,i)}}return s}function he(e,t){if(e.validators.size===0)for(let n of e.fullFieldPaths){let a=t.get(n);a&&e.validators.set(n,a)}return function(a,r,s,o=!0,i=D,c=""){let l=[],h=i===k?[...a]:void 0,g=!1;if(!Array.isArray(a))return{errors:l,transformedData:h};for(let b=0;b<a.length;b++){let d=a[b],u=i===k?typeof d=="object"&&d!==null?{...d}:d:void 0,f=!1,m=c?`${c}[${b}]`:`${e.arrayPath}[${b}]`;for(let y of e.elementFields){if(y===""){let O=null,v=`${e.arrayPath}[*]`;if(O=e.validators.get(v),!O)for(let M of e.fullFieldPaths){let q=e.validators.get(M);if(q){O=q;break}}if(!O)continue;let N=u||d,w=m,j;if(i===D)if(O.validate)j=O.validate(N,r,{abortEarlyOnEachField:g});else if(O.validateSlow)j=O.validateSlow(N,r,{abortEarlyOnEachField:g});else if(O.validateFast)j=O.validateFast(N,r);else continue;else if(i===k)if(O.parse)j=O.parse(N,r,{abortEarlyOnEachField:g});else if(O.parseSlow)j=O.parseSlow(N,r,{abortEarlyOnEachField:g});else if(O.parseFast)j=O.parseFast(N,r);else continue;else continue;if(j.valid)i===k&&j.data!==void 0&&h&&(h[b]=j.data);else{if(f=!0,j.errors&&j.errors.length>0)for(let M of j.errors)l.push({path:w,code:M.code||(i===k?"PARSE_ERROR":"VALIDATION_ERROR"),message:M.message||(i===k?"Parse failed":"Validation failed"),paths:()=>[w]});else l.push({path:w,code:i===k?"PARSE_ERROR":"VALIDATION_ERROR",message:i===k?"Parse failed":"Validation failed",paths:()=>[w]});if(g)break}continue}let F=`${e.arrayPath}.${y}`,V=`${e.arrayPath}[*].${y}`,T=`${e.arrayPath}.*.${y}`,p=e.validators.get(F);if(p||(p=e.validators.get(V)),p||(p=e.validators.get(T)),!p)for(let O of e.fullFieldPaths){let v=e.validators.get(O);if(v&&O.includes(y)){p=v;break}}if(!p)continue;let P=e.accessors.get(y),E=P?P(u||d):void 0,R=`${m}.${y}`,x;if(i===D)if(p.validate)x=p.validate(E,r,{abortEarlyOnEachField:g});else if(p.validateSlow)x=p.validateSlow(E,r,{abortEarlyOnEachField:g});else if(p.validateFast)x=p.validateFast(E,r);else continue;else if(i===k)if(p.parse)x=p.parse(E,r,{abortEarlyOnEachField:g});else if(p.parseSlow)x=p.parseSlow(E,r,{abortEarlyOnEachField:g});else if(p.parseFast)x=p.parseFast(E,r);else continue;else continue;if(x.valid)i===k&&x.data!==void 0&&u&&mt(u,y,x.data);else{if(f=!0,x.errors&&x.errors.length>0)for(let O of x.errors)l.push({path:R,code:O.code||(i===k?"PARSE_ERROR":"VALIDATION_ERROR"),message:O.message||(i===k?"Parse failed":"Validation failed"),paths:()=>[R]});else l.push({path:R,code:i===k?"PARSE_ERROR":"VALIDATION_ERROR",message:i===k?"Parse failed":"Validation failed",paths:()=>[R]});if(g)break}}for(let[y,F]of e.childArrays){let V,T;if(y.startsWith("[*]")?(V=u||d,T=m):(V=u?.[y]||d[y],T=`${m}.${y}`),Array.isArray(V)){let P=he(F,t)(V,r,s,o,i,T);P.errors.length>0&&(l.push(...P.errors),f=!0),i===k&&P.transformedData&&u&&(u[y]=P.transformedData)}}if(i===k&&h&&u&&typeof u=="object"&&(h[b]=u),f&&s)return{errors:l,transformedData:h}}return{errors:l,transformedData:h}}}function mt(e,t,n){X(t)(e,n)}function Tt(e){let t=we(e),n=new Map;for(let[a,r]of t)if(!r.parentPath){let s=Ce(r,t),o={arrayPath:r.arrayPath,elementFields:r.elementFields,fullFieldPaths:s,validators:r.validators,accessors:r.accessors,_nestedInfo:r};n.set(a,o)}return n}function Ce(e,t){let n=[];n.push(...e.fullFieldPaths);for(let[a,r]of e.childArrays){let s=Ce(r,t);n.push(...s)}return n}function Me(e){return Tt(e)}function re(e,t){if(e._nestedInfo){for(let a of e.fullFieldPaths){let r=t.get(a);r&&e._nestedInfo.validators.set(a,r)}let n=he(e._nestedInfo,t);return function(r,s,o,i=!0,c=D){let l=n(r,s,o,i,c);return{errors:l.errors,transformedData:l.transformedData}}}for(let n of e.fullFieldPaths){let a=t.get(n);a&&e.validators.set(n,a)}return function(a,r,s,o=!0,i=D){if(e.optimizedValidator&&(e.arrayStructure?.depth??0)>1){let g=e.optimizedValidator(a,r,{abortEarly:s,abortEarlyOnEachField:o,mode:i});return{errors:g.errors,transformedData:g.transformedData}}let l=[];if(!Array.isArray(a))return{errors:l};if(a.length===0)return{errors:l};let h=i===k?[...a]:void 0;for(let g=0;g<a.length;g++){let b=a[g],d=i===k?{...b}:void 0,u=!1;for(let f of e.elementFields){let m=`${e.arrayPath}.${f}`,y=e.validators.get(m);if(!y)continue;let F=e.accessors.get(f),V=F?F(d||b):void 0,T=`${e.arrayPath}[${g}].${f}`,p;if(i===D)p=y.validate(V,r,{abortEarlyOnEachField:!1});else if(i===k)p=y.parse(V,r,{abortEarlyOnEachField:!1});else continue;if(p.isValid())i===k&&p.data!==void 0&&d&&bt(d,f,p.data);else if(u=!0,p.errors&&p.errors.length>0)for(let P of p.errors)l.push({path:T,code:P.code||(i===k?"PARSE_ERROR":"VALIDATION_ERROR"),message:P.message||(i===k?"Parse failed":"Validation failed"),paths:()=>[T]});else l.push({path:T,code:i===k?"PARSE_ERROR":"VALIDATION_ERROR",message:i===k?"Parse failed":"Validation failed",paths:()=>[T]})}if(i===k&&h&&d&&(h[g]=d),u&&s)return{errors:l,transformedData:h}}return{errors:l,transformedData:h}}}function bt(e,t,n){X(t)(e,n)}function Ie(e){return Object.freeze(e.split(_))}function Ft(e){let t=e.length;switch(t){case 0:return y=>y;case 1:let n=e[0];return y=>y?.[n];case 2:let a=e[0],r=e[1];return y=>y?.[a]?.[r];case 3:let s=e[0],o=e[1],i=e[2];return y=>y?.[s]?.[o]?.[i];case 4:let c=e[0],l=e[1],h=e[2],g=e[3];return y=>y?.[c]?.[l]?.[h]?.[g];case 5:let b=e[0],d=e[1],u=e[2],f=e[3],m=e[4];return y=>y?.[b]?.[d]?.[u]?.[f]?.[m];default:return y=>{let F=y;for(let V=0;V<t;V++)if(F=F?.[e[V]],F===void 0)return;return F}}}function ne(e){let t=Ie(e);return Ft(t)}function ae(e){let t=Ie(e),n=t.length,a;switch(n){case 1:let r=t[0];a=(h,g)=>{h[r]=g};break;case 2:let s=t[0],o=t[1];a=(h,g)=>{h[s]||(h[s]={}),h[s][o]=g};break;case 3:let i=t[0],c=t[1],l=t[2];a=(h,g)=>{h[i]||(h[i]={}),h[i][c]||(h[i][c]={}),h[i][c][l]=g};break;default:a=(h,g)=>{let b=h;for(let d=0;d<n-1;d++){let u=t[d];b[u]||(b[u]={}),b=b[u]}b[t[n-1]]=g}}return a}function Se(e){let t=Array.from(e),n=t.length;if(n===0)return{validateRaw:()=>!0,parseRaw:a=>({valid:!0,data:a}),validate:a=>A.ok(a),parse:a=>A.ok(a)};if(n===1){let[a,r]=t[0],s=!a.includes("."),o=s?null:ne(a),i=s?null:ae(a);return{validateRaw:(c,l)=>{if(!c)return!1;let h=s?c[a]:o(c);return r.validate(h,c,l).valid},parseRaw:(c,l)=>{if(!c)return{valid:!1,error:"Value required"};let h=s?c[a]:o(c),g=r.parse(h,c,l);if(!g.valid)return{valid:!1,error:g.errors[0]};if(g.data!==void 0&&g.data!==h){let b={...c};return s?b[a]=g.data:i(b,g.data),{valid:!0,data:b}}return{valid:!0,data:c}},validate:(c,l)=>{if(!c)return A.error([{path:"",message:"Value required",code:"REQUIRED",paths:()=>[""]}]);let h=s?c[a]:o(c),g=r.validate(h,c,l);if(!g.valid){let b=g.errors.map(d=>({path:d.path,code:d.code,message:d.message,paths:()=>[d.path]}));return A.error(b)}return A.ok(c)},parse:function(c,l){let h=this.parseRaw(c,l);return h.valid?A.ok(h.data):A.error([h.error])}}}return n<=3?Vt(t):Pt(t)}function Vt(e){let t=e.map(([n,a])=>({path:n,isSimple:!n.includes("."),accessor:n.includes(".")?ne(n):null,setter:n.includes(".")?ae(n):null,validator:a}));return t.sort((n,a)=>n.isSimple&&!a.isSimple?-1:!n.isSimple&&a.isSimple?1:0),{validateRaw:n=>{if(!n)return!1;if(t.length===2){let r=t[0],s=t[1],o=r.isSimple?n[r.path]:r.accessor(n);if(!r.validator.validate(o,n).valid)return!1;let i=s.isSimple?n[s.path]:s.accessor(n);return!!s.validator.validate(i,n).valid}else if(t.length===3){let r=t[0],s=t[1],o=t[2],i=r.isSimple?n[r.path]:r.accessor(n);if(!r.validator.validate(i,n).valid)return!1;let c=s.isSimple?n[s.path]:s.accessor(n);if(!s.validator.validate(c,n).valid)return!1;let l=o.isSimple?n[o.path]:o.accessor(n);return!!o.validator.validate(l,n).valid}let a=t.length;for(let r=0;r<a;r++){let s=t[r],o=s.isSimple?n[s.path]:s.accessor(n);if(!s.validator.validate(o,n).valid)return!1}return!0},parseRaw:n=>{if(!n)return{valid:!1,error:"Value required"};let a=!1,r=n;if(t.length===2){let s=t[0],o=t[1],i=s.isSimple?r[s.path]:s.accessor(r),c=s.validator.parse(i,r);if(!c.valid)return{valid:!1,error:c.errors[0]};c.data!==void 0&&c.data!==i&&(a||(r={...n},a=!0),s.isSimple?r[s.path]=c.data:s.setter(r,c.data));let l=o.isSimple?r[o.path]:o.accessor(r),h=o.validator.parse(l,r);if(!h.valid)return{valid:!1,error:h.errors[0]};h.data!==void 0&&h.data!==l&&(a||(r={...n},a=!0),o.isSimple?r[o.path]=h.data:o.setter(r,h.data))}else if(t.length===3){let s=t[0],o=t[1],i=t[2],c=s.isSimple?r[s.path]:s.accessor(r),l=s.validator.parse(c,r);if(!l.valid)return{valid:!1,error:l.errors[0]};l.data!==void 0&&l.data!==c&&(a||(r={...n},a=!0),s.isSimple?r[s.path]=l.data:s.setter(r,l.data));let h=o.isSimple?r[o.path]:o.accessor(r),g=o.validator.parse(h,r);if(!g.valid)return{valid:!1,error:g.errors[0]};g.data!==void 0&&g.data!==h&&(a||(r={...n},a=!0),o.isSimple?r[o.path]=g.data:o.setter(r,g.data));let b=i.isSimple?r[i.path]:i.accessor(r),d=i.validator.parse(b,r);if(!d.valid)return{valid:!1,error:d.errors[0]};d.data!==void 0&&d.data!==b&&(a||(r={...n},a=!0),i.isSimple?r[i.path]=d.data:i.setter(r,d.data))}else{let s=t.length;for(let o=0;o<s;o++){let i=t[o],c=i.isSimple?r[i.path]:i.accessor(r),l=i.validator.parse(c,r);if(!l.valid)return{valid:!1,error:l.errors[0]};l.data!==void 0&&l.data!==c&&(a||(r={...n},a=!0),i.isSimple?r[i.path]=l.data:i.setter(r,l.data))}}return{valid:!0,data:r}},validate:function(n){return this.validateRaw(n)?A.ok(n):A.error([{path:"",code:"VALIDATION_ERROR",message:"Validation failed",paths:()=>[""]}])},parse:function(n){let a=this.parseRaw(n);return a.valid?A.ok(a.data):A.error([a.error])}}}function Pt(e){let t=e.map(([n,a])=>({path:n,isSimple:!n.includes("."),accessor:n.includes(".")?ne(n):null,setter:n.includes(".")?ae(n):null,validator:a}));return t.sort((n,a)=>n.isSimple&&!a.isSimple?-1:!n.isSimple&&a.isSimple?1:0),{validateRaw:n=>{if(!n)return!1;let a=t.length;for(let r=0;r<a;r++){let s=t[r],o=s.isSimple?n[s.path]:s.accessor(n);if(!s.validator.validate(o,n).valid)return!1}return!0},parseRaw:n=>{if(!n)return{valid:!1,error:"Value required"};let a=n,r=!1,s=t.length;for(let o=0;o<s;o++){let i=t[o],c=i.isSimple?a[i.path]:i.accessor(a),l=i.validator.parse(c,a);if(!l.valid)return{valid:!1,error:l.errors[0]};l.data!==void 0&&l.data!==c&&(r||(a={...n},r=!0),i.isSimple?a[i.path]=l.data:i.setter(a,l.data))}return{valid:!0,data:a}},validate:function(n){return this.validateRaw(n)?A.ok(n):A.error([{path:"",code:"VALIDATION_ERROR",message:"Validation failed",paths:()=>[""]}])},parse:function(n){let a=this.parseRaw(n);return a.valid?A.ok(a.data):A.error([a.error])}}}var Et=[],qr=Object.freeze({valid:!0,value:null,errors:Et});function $e(e){function t(n){if(n.length===0)return At(e);let a=n.map(p=>{let P=!1,E=!1;if(p.builderFunction)try{let R=U(p.path,e),x=p.builderFunction(R);x?._validators&&(P=x._validators.some(O=>O.name==="optional"),E=x._validators.some(O=>O.name==="required"))}catch{P=!1,E=!1}return{path:p.path,builderFunction:p.builderFunction||(()=>{throw new Error(`Field ${p.path} uses object definition form`)}),isOptional:P,hasRequired:E}}),r=ue(a,e),{fastFields:s,slowFields:o}=ke(r),i=Me(n),c=new Set,l=new Map,h=new Map;for(let[p,P]of i)if(P._nestedInfo){l.set(p,P);for(let E of P.fullFieldPaths)c.add(E);c.add(p)}else{h.set(p,P);for(let E of P.fullFieldPaths)c.add(E)}let g=s.filter(p=>!c.has(p)),b=o.filter(p=>!c.has(p)),d=me(b,n.filter(p=>!c.has(p.path)),e),u=me(g,n.filter(p=>!c.has(p.path)),e),f=new Map,m=n.map(p=>p.path),y=me(m,n,e);for(let[p,P]of y)f.set(p,P);let F=new Map,V=new Map,T=new Map;for(let p of a)p.isOptional&&F.set(p.path,!0),p.hasRequired&&V.set(p.path,!0);for(let p of n)p.metadata?.fieldOptions&&T.set(p.path,p.metadata.fieldOptions);for(let[p,P]of f)p.includes("[*]")&&(u.has(p)&&u.set(p,P),d.has(p)&&d.set(p,P));return Ot(d,u,n,e,l,f,F,V,T)}return{buildOptimizedValidator:t}}function At(e){let t=ie([],e);return{validate:()=>A.ok({}),parse:(n,a)=>A.ok(n),pick:n=>t.createPickedValidator(n)}}function me(e,t,n){let a=new Map,r=new Map,s=new Map;for(let o of e){let i=t.find(c=>c.path===o);if(i&&i.builderFunction){let c=$(o),l=U(o,n),h=i.builderFunction(l);if(h&&typeof h.build=="function"&&(h=h.build()),h._validators?.some?.(d=>d.__isRecursive===!0)){let d=h._validators.find(u=>u.__isRecursive===!0);if(d?.recursive){let u={targetFieldPath:d.recursive.targetFieldPath,maxDepth:d.recursive.maxDepth||10};o.includes("[*]")?s.set(o,u):r.set(o,u)}}let b=G({path:i.path,builderFunction:i.builderFunction||(()=>({}))},n,"fast_separated",c);a.set(o,b)}}for(let[o,i]of r){let c=a.get(o),l=null;if(i.targetFieldPath==="__Self")l=null;else if(i.targetFieldPath==="__Element")l=null;else{let g=t.find(b=>b.path===i.targetFieldPath);g&&g.builderFunction&&(l=a.get(i.targetFieldPath)||null)}let h=jt(c,l,o,i.targetFieldPath,i.maxDepth,t.filter(g=>g.builderFunction).map(g=>({path:g.path,builderFunction:g.builderFunction})),n,a);a.set(o,h)}for(let[o,i]of s){let c=a.get(o),h=ee(o).baseArrayPath+"[*]";if(Array.from(a.keys()).filter(b=>b.startsWith(h)&&b!==o).length>0){let b=Nt(c,o,i.targetFieldPath,i.maxDepth,t.filter(d=>d.builderFunction).map(d=>({path:d.path,builderFunction:d.builderFunction})),n,a);a.set(o,b)}}return a}function Ot(e,t,n,a,r,s,o,i,c){let l=r.size>0,h=e.size>0,g=t.size+e.size,b=!l&&!h&&t.size<=10;if((process.env.LUQ_ULTRA_FAST==="true"||global.__LUQ_ULTRA_FAST__===!0)&&!l&&g<=50){let V=new Map([...t,...e]),T=Se(V),p=ie(n.map(R=>({path:R.path,builderFunction:R.builderFunction||(()=>({})),fieldType:R.fieldType||"unknown"})),a);return{validate:(R,x)=>{if(R==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let O=R;if(c&&c.size>0){let v={...O};for(let[N,w]of c){let j=I(v,N),M=K(j,w,{allValues:v});M!==j&&B(v,N,M)}O=v}return T.validate(O,x)},parse:(R,x)=>{if(R==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let v={...R};if(c&&c.size>0)for(let[N,w]of c){let j=I(v,N),M=K(j,w,{allValues:v});M!==j&&B(v,N,M)}return T.parse(v,x)},pick:R=>p.createPickedValidator(R),validateRaw:T.validateRaw.bind(T),parseRaw:T.parseRaw.bind(T)}}if(b)return Rt(t,n.map(V=>({path:V.path,builderFunction:V.builderFunction||(()=>({}))})),a,c);let f=xt(e,t,r,s,o,i,c),m=n.map(V=>({path:V.path,builderFunction:V.builderFunction||(()=>({})),fieldType:V.fieldType||"unknown"})),y={validate:(V,T)=>f.executeValidate(V,T),parse:(V,T)=>f.executeParse(V,T),pick:null},F=ie(m,a,void 0,y);return y.pick=V=>F.createPickedValidator(V),y}function Rt(e,t,n,a){let r=Array.from(e),s=r.length,o=[];for(let g=0;g<s;g++){let[b,d]=r[g];o.push({path:b,accessor:d.accessor||$(b),validator:d})}let i=t.map(g=>({path:g.path,builderFunction:g.builderFunction||(()=>({})),fieldType:g.fieldType||"unknown"})),c=ie(i,n),l=[],h=A.ok({});if(s===1){let{path:g,accessor:b,validator:d}=o[0];return{validate:(u,f)=>{if(u==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let m=u;if(a&&a.size>0){let V={...m};for(let[T,p]of a){let P=I(V,T),E=K(P,p,{allValues:V});E!==P&&B(V,T,E)}m=V}let y=b(m),F=d.validate(y,m,f);if(!F.valid){let V=F.errors.map(T=>({path:T.path,code:T.code,message:T.message,paths:()=>[T.path]}));return A.error(V)}return A.ok(u)},parse:(u,f)=>{if(u==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let m=u,y={...m};if(a&&a.size>0)for(let[T,p]of a){let P=I(y,T),E=K(P,p,{allValues:y});E!==P&&B(y,T,E)}let F=b(y),V=d.parse(F,m,f);if(!V.valid){let T=V.errors.map(p=>({path:p.path,code:p.code,message:p.message,paths:()=>[p.path]}));return A.error(T)}return V.data!==void 0&&V.data!==F?(B(y,g,V.data),A.ok(y)):A.ok(y)},pick:u=>c.createPickedValidator(u)}}return{validate:(g,b)=>{if(g==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let d=g;if(a&&a.size>0){let m={...d};for(let[y,F]of a){let V=I(m,y),T=K(V,F,{allValues:m});T!==V&&B(m,y,T)}d=m}let u=b?.abortEarly!==!1,f=b?.abortEarlyOnEachField!==!1;l.length=0;for(let m=0;m<s;m++){let{path:y,accessor:F,validator:V}=o[m],T=F(d),p=V.validate(T,d,{abortEarlyOnEachField:f});if(!p.valid){let P=p.errors;for(let E=0;E<P.length;E++){let R=P[E];l.push({path:R.path,code:R.code,message:R.message,paths:()=>[R.path]})}if(u)return A.error(l.slice())}}return l.length>0?A.error(l.slice()):A.ok(g)},parse:(g,b)=>{if(g==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let u={...g};if(a&&a.size>0)for(let[y,F]of a){let V=I(u,y),T=K(V,F,{allValues:u});T!==V&&B(u,y,T)}let f=b?.abortEarly!==!1,m=b?.abortEarlyOnEachField!==!1;l.length=0;for(let y=0;y<s;y++){let{path:F,accessor:V,validator:T}=o[y],p=V(u),P=T.parse(p,u,{abortEarlyOnEachField:m});if(P.valid)P.data!==void 0&&B(u,F,P.data);else{let E=P.errors;for(let R=0;R<E.length;R++){let x=E[R];l.push({path:x.path,code:x.code,message:x.message,paths:()=>[x.path]})}if(f)return A.error(l.slice())}}return l.length>0?A.error(l.slice()):A.ok(u)},pick:g=>c.createPickedValidator(g)}}function xt(e,t,n,a,r,s,o){let i=new Map,c=new Map;for(let[g,b]of t)i.has(g)||(i.set(g,b.accessor||$(g)),c.set(g,pe(g)));for(let[g,b]of e)i.has(g)||(i.set(g,b.accessor||$(g)),c.set(g,pe(g)));function l(g,b){if(g==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let d=[],u=g;if(o&&o.size>0){let y={...u};for(let[F,V]of o){let T=I(y,F),p=K(T,V,{allValues:y});p!==T&&B(y,F,p)}u=y}let f=b?.abortEarly!==!1,m=b?.abortEarlyOnEachField!==!1;for(let[y,F]of n){let V=i.get(y)||$(y);i.has(y)||i.set(y,V);let T=V(u),p=a.get(y);if(p){let P;if(p.validate?P=p.validate(T,u,{abortEarlyOnEachField:m}):p.validateSlow?P=p.validateSlow(T,u,{abortEarlyOnEachField:m}):p.validateFast&&(P=p.validateFast(T,u)),P&&!P.valid){if(P.errors&&P.errors.length>0?d.push(...P.errors):d.push({path:y,code:"VALIDATION_ERROR",message:"Array field validation failed",paths:()=>[y]}),f)return A.error(d);continue}}if(Array.isArray(T)){let E=re(F,a)(T,u,f,m,D);if(E.errors.length>0&&(d.push(...E.errors),f))return A.error(d)}}for(let[y,F]of t){if(y.includes(".")&&!y.includes("[")&&!y.includes("*")){let V=y.split(".");if(V.length>1){let T=!1;for(let p=0;p<V.length-1;p++){let P=V.slice(0,p+1).join("."),E=I(u,P);if(Array.isArray(E)&&E.length===0){T=!0;break}}if(T)continue}}if(!y.includes("[")&&!y.includes("*")){let V=i.get(y),T=V?V(u):I(u,y),p=F.validate(T,u,{abortEarlyOnEachField:m});if(!p.valid){if(p.errors&&p.errors.length>0)for(let P=0;P<p.errors.length;P++)d.push(p.errors[P]);if(f)return A.error(d)}}else{if(y.includes("[*]")||y.includes(".*")){let E=Be(y,F,u,u,f,m);if(E.length>0&&(d.push(...E),f))return A.error(d);continue}let T=i.get(y),p=T?T(u):I(u,y),P=F.validate(p,u,{abortEarlyOnEachField:m});if(!P.valid){if(P.errors&&P.errors.length>0)for(let E=0;E<P.errors.length;E++)d.push(P.errors[E]);if(f)return A.error(d)}}}for(let[y,F]of e){if(y.includes(".")&&!y.includes("[")&&!y.includes("*")){let v=y.split(".");if(v.length>1){let N=!1;for(let w=0;w<v.length-1;w++){let j=v.slice(0,w+1).join("."),M=I(u,j);if(Array.isArray(M)&&M.length===0){N=!0;break}}if(N)continue}}if(y.includes("[*]")||y.includes(".*")){let v=Be(y,F,u,u,f,m);if(v.length>0&&(d.push(...v),f))return A.error(d);continue}let T=c.get(y),p=T?T(u):_e(u,y),P=r.get(y)||!1,E=s.get(y)||!1;if(!p&&P)continue;if(!p&&!P&&!E){if(d.push({path:y,code:"REQUIRED",message:`Field '${y}' is required`,paths:()=>[y]}),f)return A.error(d);continue}let R=i.get(y),x=R?R(u):I(u,y),O=F.validate(x,u,{abortEarlyOnEachField:m});if(!O.valid){if(O.errors&&O.errors.length>0)for(let v=0;v<O.errors.length;v++)d.push(O.errors[v]);if(f)return A.error(d)}}return d.length>0?A.error(d):A.ok(g)}function h(g,b){if(g==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let d=[],f={...g};if(o&&o.size>0)for(let[F,V]of o){let T=I(f,F),p=K(T,V,{allValues:f});p!==T&&B(f,F,p)}let m=b?.abortEarly!==!1,y=b?.abortEarlyOnEachField!==!1;for(let[F,V]of n){let T=i.get(F)||$(F);i.has(F)||i.set(F,T);let p=T(f),P=a.get(F);if(P){let E;if(P.parse?E=P.parse(p,f,{abortEarlyOnEachField:y}):P.parseSlow?E=P.parseSlow(p,f,{abortEarlyOnEachField:y}):P.parseFast&&(E=P.parseFast(p,f)),E&&!E.valid){if(E.errors&&E.errors.length>0?d.push(...E.errors):d.push({path:F,code:"PARSE_ERROR",message:"Array field parsing failed",paths:()=>[F]}),m)return A.error(d);continue}else if(E&&E.data!==void 0){B(f,F,E.data);let R=T(f);if(Array.isArray(R)){let O=re(V,a)(R,f,m,y,k);if(O.errors.length>0&&(d.push(...O.errors),m))return A.error(d);O.transformedData&&B(f,F,O.transformedData)}continue}}if(Array.isArray(p)){let R=re(V,a)(p,f,m,y,k);if(R.errors.length>0&&(d.push(...R.errors),m))return A.error(d);R.transformedData&&B(f,F,R.transformedData)}}for(let[F,V]of t){let T=i.get(F),p=T?T(f):I(f,F),P=V.parse(p,f,{abortEarlyOnEachField:y});if(P.valid)P.data!==void 0&&B(f,F,P.data);else{if(P.errors&&P.errors.length>0)for(let E=0;E<P.errors.length;E++)d.push(P.errors[E]);if(m)return A.error(d)}}for(let[F,V]of e){let T=c.get(F),p=T?T(f):_e(f,F),P=r.get(F)||!1,E=s.get(F)||!1;if(!p&&P)continue;if(!p&&!P&&!E){if(d.push({path:F,code:"REQUIRED",message:`Field '${F}' is required`,paths:()=>[F]}),m)return A.error(d);continue}let R=i.get(F),x=R?R(f):I(f,F),O=V.parse(x,f,{abortEarlyOnEachField:y});if(O.valid)O.data!==void 0&&B(f,F,O.data);else{if(O.errors&&O.errors.length>0)for(let v=0;v<O.errors.length;v++)d.push(O.errors[v]);if(m)return A.error(d)}}return d.length>0?A.error(d):A.ok(f)}return{executeValidate:l,executeParse:h}}function I(e,t){return $(t)(e)}function vt(e){if(e.includes(_)){let t=e.split(_),n=t.length-1;return a=>{let r=a;for(let o=0;o<n;o++){let i=t[o];if(!(i in r)||r[i]==null||typeof r[i]!="object")return!1;r=r[i]}return t[n]in r}}else return t=>e in t}function _e(e,t){return vt(t)(e)}function kt(e){if(e.includes(_)){let t=e.split(_),n=t.length-1;return(a,r)=>{let s=a;for(let o=0;o<n;o++){let i=t[o];(!(i in s)||typeof s[i]!="object")&&(s[i]={}),s=s[i]}s[t[n]]=r}}else return(t,n)=>{t[e]=n}}function B(e,t,n){kt(t)(e,n)}function Be(e,t,n,a,r,s){let o=[],i,c,l=e.match(/^([^\[]+)\[\*\]\.(.+)$/);if(l)i=l[1],c=l[2];else{let g=e.match(/^([^\.]+)\.\*\.(.+)$/);if(g)i=g[1],c=g[2];else{let b=e.match(/^([^\[]+)\[\*\]$/);if(b)i=b[1],c="";else return o}}let h=I(n,i);if(!Array.isArray(h))return o;if(c===""){for(let g=0;g<h.length;g++){let b=h[g],d=`${i}[${g}]`,u=t.validate(b,a,{abortEarlyOnEachField:s});if(!u.valid){if(u.errors&&u.errors.length>0)for(let f of u.errors)o.push({path:f.path?`${d}.${f.path}`:d,code:f.code||"VALIDATION_ERROR",message:f.message||"Validation failed",paths:()=>[f.path?`${d}.${f.path}`:d]});else o.push({path:d,code:"VALIDATION_ERROR",message:"Validation failed",paths:()=>[d]});if(r)break}}return o}if(h.length===0)return o;for(let g=0;g<h.length;g++){let b=h[g];if(!b||typeof b!="object")continue;let d=I(b,c),u=`${i}[${g}].${c}`,f=t.validate(d,a,{abortEarlyOnEachField:s});if(!f.valid){if(f.errors&&f.errors.length>0)for(let m of f.errors)o.push({path:m.path||u,code:m.code||"VALIDATION_ERROR",message:m.message||"Validation failed",paths:()=>[m.path||u]});else o.push({path:u,code:"VALIDATION_ERROR",message:"Validation failed",paths:()=>[u]});if(r)break}}return o}function jt(e,t,n,a,r,s,o,i){let c=(l,h,g,b,d,u)=>{if(g>r)return{valid:!0,errors:[]};if(l&&typeof l=="object"&&d.has(l))return{valid:!0,errors:[]};if(l&&typeof l=="object"&&d.add(l),l==null){let m=e.validate(l,h,u);return m.valid?{valid:!0,errors:[]}:{valid:!1,errors:m.errors.map(F=>({...F,path:b}))}}let f=e.validate(l,h,u);if(!f.valid)return{valid:!1,errors:f.errors.map(y=>({...y,path:b}))};if(a==="__Self"){if(l&&typeof l=="object"&&i){let m=[];for(let[y,F]of i){if(y===n)continue;if(y.includes("[*]")){let E=ge(y)(l);if(E){let{elements:R,basePath:x,elementPath:O}=E;R.forEach((v,N)=>{let w=F.validate(v,h,u);if(!w.valid)for(let j of w.errors){let M=O?`${b}.${x}[${N}].${O}`:`${b}.${x}[${N}]`;m.push({...j,path:M})}})}continue}let T=$(y)(l),p=F.validate(T,h,u);if(!p.valid)for(let P of p.errors)m.push({...P,path:`${b}.${P.path}`})}for(let[y,F]of i){if(y===n)continue;if(y.includes("[*]")){let p=ge(y)(l);if(p){let{elements:P,basePath:E,elementPath:R}=p;P.forEach((x,O)=>{if(x&&typeof x=="object"){let v=s.find(N=>N.path===y);if(v?.builderFunction){let N=U(y,o),w=v.builderFunction(N);if(w?.build&&(w=w.build()),w?._validators?.some?.(M=>M.__isRecursive===!0)){let M=R?`${b}.${E}[${O}].${R}`:`${b}.${E}[${O}]`,q=c(x,h,g+1,M,d,u);q.valid||m.push(...q.errors)}}}})}continue}let V=$(y)(l);if(V&&typeof V=="object"){let T=s.find(E=>E.path===y),p=null;if(T?.builderFunction){let E=U(y,o);p=T.builderFunction(E),p?.build&&(p=p.build())}if(p?._validators?.some?.(E=>E.__isRecursive===!0)){let E=c(V,h,g+1,`${b}.${y}`,d,u);E.valid||m.push(...E.errors)}}}if(m.length>0)return{valid:!1,errors:m}}}else if(a==="__Element"){if(Array.isArray(l)){let m=[];for(let y=0;y<l.length;y++){let F=l[y];if(F&&typeof F=="object"&&i)for(let[V,T]of i){if(V.includes("[*]"))continue;let P=$(V)(F),E=T.validate(P,h,u);if(!E.valid)for(let R of E.errors)m.push({...R,path:`${b}[${y}].${R.path}`})}}if(m.length>0)return{valid:!1,errors:m}}}else if(t&&l&&typeof l=="object"){let m=[],y=u?.abortEarlyOnEachField!==!1,F=a.split("."),V=F[F.length-1];if(Array.isArray(l))for(let T=0;T<l.length;T++){let p=l[T];if(p&&typeof p=="object"&&V in p){let P=p[V],E=`${b}[${T}].${V}`,R=c(P,h,g+1,E,d,u);if(!R.valid&&(m.push(...R.errors),y))return{valid:!1,errors:m}}}else if(V in l){let T=l[V],p=`${b}.${V}`,P=c(T,h,g+1,p,d,u);if(!P.valid&&(m.push(...P.errors),y))return{valid:!1,errors:m}}if(m.length>0)return{valid:!1,errors:m}}return l&&typeof l=="object"&&d.delete(l),{valid:!0,errors:[]}};return{validate:(l,h,g)=>c(l,h,0,n,new WeakSet,g),parse:(l,h,g)=>{let d=c(l,h,0,n,new WeakSet,g);return d.valid?{valid:!0,data:l,errors:[]}:{...d,data:void 0}},accessor:e.accessor}}function Nt(e,t,n,a,r,s,o){let i=ee(t);return{validate:(c,l,h)=>{if(c==null||!Array.isArray(c))return e.validate(c,l,h);let g=[],b=new WeakSet;return c.forEach((d,u)=>{if(d&&typeof d=="object"&&n==="__Self"&&o){for(let[f,m]of o)if(f.includes("[*]")){let y=i.baseArrayPath+"[*]";if(f.startsWith(y)){let F=f.slice(y.length),V,T,p;if(F==="")continue;if(F.startsWith("."))p=F.slice(1),V=$(p)(d),T=i.baseArrayPath?`${i.baseArrayPath}[${u}].${p}`:`[${u}].${p}`;else continue;let P=m.validate(V,l,h);if(!P.valid)for(let E of P.errors)g.push({...E,path:T})}continue}for(let[f,m]of o)if(f.includes("[*]")){let y=i.baseArrayPath+"[*]";if(f.startsWith(y)){let F=f.slice(y.length);if(F.startsWith(".")){let V=F.slice(1),T=$(V)(d);Array.isArray(T)&&T.forEach((p,P)=>{if(p&&typeof p=="object"){for(let[E,R]of o)if(E.includes("[*]")&&E.startsWith(y)){let x=E.slice(y.length);if(x.startsWith(".")&&x!=="."+V){let O=x.slice(1),v=$(O)(p),N=`${i.baseArrayPath}[${u}].${V}[${P}].${O}`,w=R.validate(v,l,h);if(!w.valid)for(let j of w.errors)g.push({...j,path:N})}}}})}}}}}),{valid:g.length===0,errors:g}},parse:(c,l,h)=>e.parse(c,l,h),accessor:e.accessor}}function De(e,t){let n="^"+t.replace(/\[\*\]/g,"\\[\\d+\\]")+"$";return new RegExp(n).test(e)}function ie(e,t,n,a){function r(s){let o=s,i=e.find(f=>f.path===o),c=e.filter(f=>!!(f.path===o||f.path.startsWith(o+"[*]")||f.path.startsWith(o+".*")||f.path.startsWith(o+".")));if(!i&&c.length===0)return{validate:()=>({valid:!0,value:void 0,errors:[]}),parse:()=>({valid:!0,value:void 0,errors:[]})};if(c.length>1){let f=new Set(c.map(m=>m.path));return{validate:(m,y,F)=>{if(a){let T={[o]:m},p=a.validate(T,F),P=p.valid?[]:(p.errors||[]).filter(E=>{for(let R of f)if(De(E.path,R))return!0;return!1});return{valid:P.length===0,value:P.length===0?m:null,errors:P}}let V=[];for(let T of c){let P=G(T,t).validate({[o]:m},{[o]:m},F);!P.valid&&P.errors&&V.push(...P.errors)}return{valid:V.length===0,value:V.length===0?m:null,errors:V}},parse:(m,y,F)=>{if(a){let T={[o]:m},p=a.parse(T,F);if(!p.valid){let R=(p.errors||[]).filter(x=>{for(let O of f)if(De(x.path,O))return!0;return!1});if(R.length>0)return{valid:!1,value:void 0,errors:R}}let P=p.valid?p.value:T;return{valid:!0,value:P&&P[o]!==void 0?P[o]:m,errors:[]}}let V=[];for(let T of c){let P=G(T,t).validate({[o]:m},{[o]:m},F);!P.valid&&P.errors&&V.push(...P.errors)}return{valid:V.length===0,value:V.length===0?m:null,errors:V}}}}if(!i)return{validate:()=>({valid:!0,value:void 0,errors:[]}),parse:()=>({valid:!0,value:void 0,errors:[]})};let l=U(i.path,t);if(!i.builderFunction)throw new Error(`Field definition for path '${i.path}' is missing builderFunction`);let h=i.builderFunction(l),g={path:i.path,builderFunction:i.builderFunction||(()=>{throw new Error(`Field ${i.path} uses object definition form`)})},d=ue([g],t).get(i.path),u;return u=G(i,t),{validate:(f,m,y)=>{let F={...m};B(F,s,f);let V=I(F,s),T=u.validate(V,F,y);return{valid:T.valid,value:T.valid?f??null:null,errors:T.errors||[]}},parse:(f,m,y)=>{let F={...m};B(F,s,f);let V=I(F,s),T=u.parse(V,F,y);return{valid:T.valid,value:T.valid?T.data!==void 0?T.data:f:null,errors:T.errors||[]}}}}return{createPickedValidator:r}}function H(e,t,n=[],a=!1){let r=[...n],s=a,o,i=u=>u.includes(_)?"nested":"scalar",c=(u,f,m)=>{let y=m!==void 0?Q(m):void 0,F={path:u,inferredType:i(u),builderFunction:f,fieldOptions:y,fieldType:{}};return H(e,t,[...r,F],s)},l=c,h=(u,f)=>{let m={path:u,inferredType:i(u),builderFunction:()=>f,fieldOptions:f.fieldOptions,fieldType:{}};return H(e,t,[...r,m],s)},g=()=>H(e,t,r,!0);return{field:c,v:l,useField:h,strict:g,strictOnEditor:g,build:()=>{o||(o=$e(e));let u=r.map(f=>{let m=U(f.path,e),y=f.builderFunction(m);return{path:f.path,builderFunction:f.builderFunction,rules:Array.isArray(y)?y:[y],metadata:{inferredType:f.inferredType,hasTransforms:!1,fieldOptions:f.fieldOptions},fieldType:f.inferredType||"unknown"}});return o.buildOptimizedValidator(u)}}}function wt(){let e={},t={for(){return H(e,t,void 0,!1)},use(...n){if(n.length===0)return t;for(let a=0;a<n.length;a++){let r=n[a];if(!r)continue;if(typeof r!="object"||!r.name)throw console.error("Invalid plugin:",r),new Error(`Invalid plugin at index ${a}: plugin must be an object with a 'name' property`);let s=r.name;e[s]||(e[s]=r,r.category==="builder-extension"&&r.extendBuilder&&typeof r.extendBuilder=="function"&&(r.methodName&&r.impl&&(t[r.methodName]=r.impl),r.extendBuilder(t),r.methodName&&!t[r.methodName]&&console.warn(`BuilderExtensionPlugin ${r.name} did not add ${r.methodName} method`)))}return t}};return t}function Ct(){return wt()}var Te=Ct;function Le(e,t){let n={plugins:e?new Map(e):new Map,pluginsObject:t||{}},a={use(r){n.plugins.set(r.name,r);let s={...n.pluginsObject,[r.name]:r};return Le(n.plugins,s)},createFieldRule(r,s){return Ue(a,n.pluginsObject,r,s)},toBuilder(){let r=Te(),s=Array.from(n.plugins.values()),o=s.length;for(let i=0;i<o;i++){let c=s[i];r=r.use(c)}return r},getPlugins(){let r={},s=Array.from(n.plugins.entries()),o=s.length;for(let i=0;i<o;i++){let[c,l]=s[i];r[c]=l}return r},for(){return Ke(n.plugins,n.pluginsObject,a)}};return a}function Ke(e,t,n){return{use:n.use,toBuilder:n.toBuilder,getPlugins:n.getPlugins,createFieldRule(r,s){return Ue(n,t,r,s)},for(){return Ke(e,t,n)}}}function Ue(e,t,n,a){let r={};a!==void 0&&(typeof a=="object"&&a!==null&&("name"in a||"description"in a||"fieldOptions"in a)?r=a:r={fieldOptions:Q(a)});let s=()=>{let i=`__standalone__${r?.name||Math.random()}`,c=U(i,t),h=n(c).build();return{validate:(g,b,d)=>{let u=g;r?.fieldOptions&&(u=K(g,r.fieldOptions,{allValues:b||{}}));let f=h._validators||[],m=h._transforms||[];for(let F of f)if(F.check&&!F.check(u,b||{})){let V=typeof F.messageFactory=="function"?F.messageFactory({path:i,value:u,context:b||{}}):"Validation failed";return{valid:!1,errors:[{path:i,message:V,code:F.name||"VALIDATION_ERROR",paths:()=>[i]}],data:u}}let y=u;for(let F of m)typeof F=="function"?y=F(y):F&&typeof F.transformFn=="function"&&(y=F.transformFn(y));return{valid:!0,data:y,errors:[]}},_executionPlan:h._executionPlan,_validators:h._validators,_transforms:h._transforms}};return{_phantomType:void 0,name:r?.name,description:r?.description,fieldOptions:r?.fieldOptions,_getInternalValidators:()=>{let i=s();return{validators:i._validators||[],transforms:i._transforms||[],executionPlan:i._executionPlan}},validate(i,c){try{let h=s().validate(i,{},c);return h.valid?A.ok(h.data):A.error(h.errors||[])}catch(l){return A.error([{path:"",message:l instanceof Error?l.message:"Validation failed",code:"FIELD_RULE_ERROR",paths:()=>[""]}])}},parse(i,c){try{let l=i;r?.fieldOptions&&(l=K(i,r.fieldOptions,{allValues:{}}));let h=s();if(h._executionPlan&&typeof h._executionPlan.execute=="function"){let g={originalValue:l,currentValue:l,allValues:{},path:r?.name||"field",reporter:{report:()=>{},getReports:()=>[]}},b=h._executionPlan.execute(l,g);return b.valid?A.ok(b.finalValue):A.error(b.errors||[])}else{let g=l;if(h._transforms)for(let u of h._transforms)typeof u=="function"&&(g=u(g));let b=h._validators||[],d=r?.name||"field";for(let u of b)if(u.check&&!u.check(g,{})){let f=typeof u.messageFactory=="function"?u.messageFactory({path:d,value:g,context:{}}):"Validation failed";return A.error([{path:d,message:f,code:u.name||"VALIDATION_ERROR",paths:()=>[d]}])}return A.ok(g)}}catch(l){return A.error([{path:"",message:l instanceof Error?l.message:"Parse failed",code:"FIELD_RULE_PARSE_ERROR",paths:()=>[""]}])}},getPluginRegistry(){return e}}}function Mt(){return Le()}var It=(e,t,n,a)=>{let s=(o=>(...i)=>{let c=o(...i);return c&&typeof c=="object"&&"check"in c?{...c,pluginName:a}:c})(n);switch(e){case"conditional":return(o,...i)=>s(o,...i);case"fieldReference":return(o,...i)=>s(o,...i);case"multiFieldReference":return s;case"transform":return o=>s(o);case"arrayElement":return(o,...i)=>s(o,...i);case"context":return o=>s(o);default:return s}};function St(e){let{name:t,methodName:n,allowedTypes:a,category:r,impl:s}=e;return{name:t,methodName:n,allowedTypes:a,category:r,create:()=>It(r,n,s,t)}}function _t(e){let{name:t,allowedTypes:n,impl:a}=e,r=()=>a();return{name:t,methodName:t,allowedTypes:n,category:"transform",create:()=>r}}function Bt(e){let{name:t,allowedTypes:n,impl:a}=e,r=(...s)=>a(...s);return{name:t,methodName:t,allowedTypes:n,category:"transform",create:()=>r}}function Dt(e){let{name:t,methodName:n,impl:a,extendBuilder:r}=e;return{name:t,methodName:n,category:"builder-extension",impl:a(),extendBuilder:r}}var Y={messageKeyPrefix:"",toBooleanTruthyValues:["true","1","yes","on"],numberFormat:{decimalSeparator:".",thousandSeparator:","},dateFormat:"YYYY-MM-DD",trimStrings:!1,caseSensitive:!0,customTransforms:{}},L={...Y},se={setConfig(e){L={...L,...e,numberFormat:e.numberFormat?{...L.numberFormat,...e.numberFormat}:L.numberFormat}},getConfig(){return{...L}},get messageKeyPrefix(){return L.messageKeyPrefix||""},get toBooleanTruthyValues(){return[...L.toBooleanTruthyValues||[]]},get numberFormat(){return{...L.numberFormat}},get dateFormat(){return L.dateFormat||"YYYY-MM-DD"},get trimStrings(){return L.trimStrings||!1},get caseSensitive(){return L.caseSensitive!==!1},get customTransforms(){return{...L.customTransforms}},reset(){L={...Y,numberFormat:{...Y.numberFormat},toBooleanTruthyValues:[...Y.toBooleanTruthyValues],customTransforms:{...Y.customTransforms}}}};function $t(e){se.setConfig(e)}function Lt(){return se.getConfig()}function Kt(){se.reset()}export{Te as Builder,A as Result,Mt as createPluginRegistry,Lt as getGlobalConfig,se as globalConfig,St as plugin,Dt as pluginBuilderExtension,Bt as pluginConfigurableTransform,_t as pluginPredefinedTransform,Kt as resetGlobalConfig,$t as setGlobalConfig};
|
|
2
|
-
|
|
1
|
+
// ===========================================================================
|
|
2
|
+
// src/index.ts — THE ROOT SUBPATH. Re-exports only; nothing is defined here.
|
|
3
|
+
//
|
|
4
|
+
// Deliberately absent: every plugin. A plugin reaches a consumer through its
|
|
5
|
+
// own subpath (`@maroonedog/luq/plugins/<name>`), because a barrel that names
|
|
6
|
+
// all of them makes every one of them statically reachable and ends
|
|
7
|
+
// per-plugin tree-shaking. What lives here is the entry point, the vocabulary
|
|
8
|
+
// a caller reads results with, and the surface a PLUGIN AUTHOR writes against.
|
|
9
|
+
// ===========================================================================
|
|
10
|
+
export { Builder, NamelessPluginError, createBuilder, getGlobalConfig, resetGlobalConfig, setGlobalConfig, } from "./builder/index.mjs";
|
|
11
|
+
// ---- L0 vocabulary --------------------------------------------------------
|
|
12
|
+
export { PASS, fail, isArray, isNumber, isPlainObject, isString, isStringArray, } from "./types/index.mjs";
|
|
13
|
+
export { DEFAULT_GLOBAL_CONFIG, resolveGlobalConfig, } from "./types/global-config.mjs";
|
|
14
|
+
// ---- L2 the plugin-author surface -----------------------------------------
|
|
15
|
+
export { PluginArgumentError, definePlugin, } from "./plugin-kit/plugin-definition.mjs";
|
|
16
|
+
export { branch, check, composite, fieldsBranch, gate, presence, recursive, transform, } from "./plugin-kit/create-rule.mjs";
|
|
17
|
+
export { renderMessage } from "./plugin-kit/rule-build-context.mjs";
|
|
18
|
+
export { readExternalContext } from "./plugin-kit/external-context.mjs";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TypeName } from "../types";
|
|
2
|
+
import type { ArgsOf, BindableMethod, BoundMethod, BoundPlugin } from "./json-schema-bag.types";
|
|
3
|
+
import type { KeywordBinding } from "./keyword-binding.types";
|
|
4
|
+
import type { ChainMarks } from "../chain/field-chain.types";
|
|
5
|
+
import type { ChainState } from "../chain/chain-state.types";
|
|
6
|
+
/**
|
|
7
|
+
* The marker-free slice of FieldChain the converter is allowed to drive.
|
|
8
|
+
*
|
|
9
|
+
* `__chain` is carried through deliberately: it is what makes the slice an
|
|
10
|
+
* `AnyChain`, so the value a converter hands back from `.v(path, b => ...)`
|
|
11
|
+
* needs NO cast to be accepted. Drop it and step 25's single call site has to
|
|
12
|
+
* assert its way back onto the builder, which is the sort of hole this layer
|
|
13
|
+
* exists to close.
|
|
14
|
+
*/
|
|
15
|
+
export type ConverterChain<S extends TypeName> = {
|
|
16
|
+
readonly [M in BindableMethod<S> & BoundMethod<S>]: (...args: ArgsOf<BoundPlugin<S, M>>) => ConverterChain<S>;
|
|
17
|
+
} & {
|
|
18
|
+
readonly __chain: ChainMarks<unknown, ChainState>;
|
|
19
|
+
};
|
|
20
|
+
export declare function applyKeywordBinding<S extends TypeName, M extends BindableMethod<S> & BoundMethod<S>, TName extends string, V>(chain: ConverterChain<S>, binding: KeywordBinding<S, M, TName, ArgsOf<BoundPlugin<S, M>>, V>, keywordValue: V): ConverterChain<S>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyKeywordBinding = applyKeywordBinding;
|
|
4
|
+
function applyKeywordBinding(chain, binding, keywordValue) {
|
|
5
|
+
const method = chain[binding.method];
|
|
6
|
+
return method(...binding.toArguments(keywordValue));
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TypeName } from "../types";
|
|
2
|
+
import type { PluginDefinition, PluginSignature } from "../plugin-kit/plugin-definition";
|
|
3
|
+
import type { BoundMethod, MarkerFreeArgs } from "./json-schema-bag.types";
|
|
4
|
+
import type { KeywordBinding, StructuralKeyword, UnsupportedKeyword } from "./keyword-binding.types";
|
|
5
|
+
export declare function bindKeyword<S extends TypeName & TSlots[number], M extends BoundMethod<S> & TMethod, TName extends string, TMethod extends string, TSlots extends readonly TypeName[], TSig extends PluginSignature, V>(slot: S, method: M, plugin: PluginDefinition<TName, TMethod, TSlots, TSig>, toArguments: (keywordValue: V) => MarkerFreeArgs<TSig["args"]>): KeywordBinding<S, M, TName, MarkerFreeArgs<TSig["args"]>, V>;
|
|
6
|
+
export declare function structural(note: string): StructuralKeyword;
|
|
7
|
+
export declare function unsupported(reason: string): UnsupportedKeyword;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bindKeyword = bindKeyword;
|
|
4
|
+
exports.structural = structural;
|
|
5
|
+
exports.unsupported = unsupported;
|
|
6
|
+
function bindKeyword(slot, method, plugin, toArguments) {
|
|
7
|
+
// No registry lookup, no `plugin.method`: every field is already a literal.
|
|
8
|
+
return {
|
|
9
|
+
handling: "bind",
|
|
10
|
+
slot,
|
|
11
|
+
method,
|
|
12
|
+
pluginName: plugin.name,
|
|
13
|
+
toArguments,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function structural(note) {
|
|
17
|
+
return { handling: "structural", note };
|
|
18
|
+
}
|
|
19
|
+
function unsupported(reason) {
|
|
20
|
+
return { handling: "unsupported", reason };
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function bindKeyword(slot, method, plugin, toArguments) {
|
|
2
|
+
// No registry lookup, no `plugin.method`: every field is already a literal.
|
|
3
|
+
return {
|
|
4
|
+
handling: "bind",
|
|
5
|
+
slot,
|
|
6
|
+
method,
|
|
7
|
+
pluginName: plugin.name,
|
|
8
|
+
toArguments,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export function structural(note) {
|
|
12
|
+
return { handling: "structural", note };
|
|
13
|
+
}
|
|
14
|
+
export function unsupported(reason) {
|
|
15
|
+
return { handling: "unsupported", reason };
|
|
16
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { FieldBuilderSurface } from "../builder/builder-surface.types";
|
|
2
|
+
import type { FieldEntry } from "../builder/field-entry.types";
|
|
3
|
+
import type { Validator } from "../builder/validator.types";
|
|
4
|
+
import type { GlobalConfig } from "../types/global-config";
|
|
5
|
+
import type { JsonSchemaBag } from "./json-schema-bag.types";
|
|
6
|
+
/** A value that is not a schema at all. Named, and refused at the boundary. */
|
|
7
|
+
export declare class NotASchemaError extends Error {
|
|
8
|
+
readonly received: unknown;
|
|
9
|
+
constructor(received: unknown);
|
|
10
|
+
}
|
|
11
|
+
/** One pending `.v()` per declared path, with its callback still unrun. */
|
|
12
|
+
export declare function buildFieldEntries(bag: JsonSchemaBag, schema: unknown): readonly FieldEntry[];
|
|
13
|
+
/** The erased front door: the declarations, with nothing compiled yet. */
|
|
14
|
+
export declare function buildFromSchema(bag: JsonSchemaBag, schema: unknown, config?: GlobalConfig): FieldBuilderSurface;
|
|
15
|
+
/**
|
|
16
|
+
* The declared type is put back on by `eraseSchemaValidator`, the fourth
|
|
17
|
+
* function in src/core/type-erasure.ts — the one file the code standard allows
|
|
18
|
+
* to assert. Step 25 expressed this as an OVERLOAD PAIR instead, because
|
|
19
|
+
* type-erasure.ts was not in its produces list; an overload is accepted by
|
|
20
|
+
* TypeScript on lenient compatibility rules and so was never audited anywhere.
|
|
21
|
+
* The call below is, in the file where every escape hatch is reviewed together.
|
|
22
|
+
*/
|
|
23
|
+
export declare function fromJsonSchema<T extends object = Record<string, unknown>>(bag: JsonSchemaBag, schema: unknown, config?: GlobalConfig): Validator<T>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotASchemaError = void 0;
|
|
4
|
+
exports.buildFieldEntries = buildFieldEntries;
|
|
5
|
+
exports.buildFromSchema = buildFromSchema;
|
|
6
|
+
exports.fromJsonSchema = fromJsonSchema;
|
|
7
|
+
const create_field_builder_1 = require("../builder/create-field-builder");
|
|
8
|
+
const type_erasure_1 = require("../core/type-erasure");
|
|
9
|
+
const create_structural_context_1 = require("./create-structural-context");
|
|
10
|
+
const declare_presence_1 = require("./declare-presence");
|
|
11
|
+
const declare_value_keywords_1 = require("./declare-value-keywords");
|
|
12
|
+
const draft07_types_1 = require("./draft07.types");
|
|
13
|
+
const flatten_schema_1 = require("./flatten-schema");
|
|
14
|
+
const schema_to_declarations_1 = require("./schema-to-declarations");
|
|
15
|
+
/** A value that is not a schema at all. Named, and refused at the boundary. */
|
|
16
|
+
class NotASchemaError extends Error {
|
|
17
|
+
constructor(received) {
|
|
18
|
+
super("fromJsonSchema expects a JSON Schema document: an object, or the " +
|
|
19
|
+
`boolean form of Draft-07 §4.4. Received ${typeof received}.`);
|
|
20
|
+
this.name = "NotASchemaError";
|
|
21
|
+
this.received = received;
|
|
22
|
+
Object.setPrototypeOf(this, NotASchemaError.prototype);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.NotASchemaError = NotASchemaError;
|
|
26
|
+
/** The rules ONE declared path carries: its presence policy and its schema. */
|
|
27
|
+
function collectDeclaredRules(declaration, bag, root, chain) {
|
|
28
|
+
const context = (0, create_structural_context_1.createStructuralContext)({ bag, root, chain }, declaration.schema, Object.freeze([]));
|
|
29
|
+
return Object.freeze([
|
|
30
|
+
...(0, declare_presence_1.declarePresenceRules)({
|
|
31
|
+
isRequired: declaration.isRequired,
|
|
32
|
+
allowsNull: (0, declare_value_keywords_1.permitsNull)(declaration.schema),
|
|
33
|
+
severity: chain.config.defaultSeverity,
|
|
34
|
+
}),
|
|
35
|
+
...(0, schema_to_declarations_1.expandSchemaRules)(declaration.schema, context),
|
|
36
|
+
]);
|
|
37
|
+
}
|
|
38
|
+
/** One pending `.v()` per declared path, with its callback still unrun. */
|
|
39
|
+
function buildFieldEntries(bag, schema) {
|
|
40
|
+
if (!(0, draft07_types_1.isDraft07Schema)(schema))
|
|
41
|
+
throw new NotASchemaError(schema);
|
|
42
|
+
return (0, flatten_schema_1.flattenSchema)(schema, schema_to_declarations_1.readChildSchemas).map((declaration) => ({
|
|
43
|
+
path: declaration.path,
|
|
44
|
+
defaultOf: null,
|
|
45
|
+
applyDefaultToNull: false,
|
|
46
|
+
collectRules: (chain) => collectDeclaredRules(declaration, bag, schema, chain),
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
/** The erased front door: the declarations, with nothing compiled yet. */
|
|
50
|
+
function buildFromSchema(bag, schema, config) {
|
|
51
|
+
return (0, create_field_builder_1.createFieldBuilderSurface)(bag, config, buildFieldEntries(bag, schema));
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The declared type is put back on by `eraseSchemaValidator`, the fourth
|
|
55
|
+
* function in src/core/type-erasure.ts — the one file the code standard allows
|
|
56
|
+
* to assert. Step 25 expressed this as an OVERLOAD PAIR instead, because
|
|
57
|
+
* type-erasure.ts was not in its produces list; an overload is accepted by
|
|
58
|
+
* TypeScript on lenient compatibility rules and so was never audited anywhere.
|
|
59
|
+
* The call below is, in the file where every escape hatch is reviewed together.
|
|
60
|
+
*/
|
|
61
|
+
function fromJsonSchema(bag, schema, config) {
|
|
62
|
+
const planBacked = buildFromSchema(bag, schema, config).build();
|
|
63
|
+
return (0, type_erasure_1.eraseSchemaValidator)(planBacked);
|
|
64
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createFieldBuilderSurface } from "../builder/create-field-builder.mjs";
|
|
2
|
+
import { eraseSchemaValidator } from "../core/type-erasure.mjs";
|
|
3
|
+
import { createStructuralContext } from "./create-structural-context.mjs";
|
|
4
|
+
import { declarePresenceRules } from "./declare-presence.mjs";
|
|
5
|
+
import { permitsNull } from "./declare-value-keywords.mjs";
|
|
6
|
+
import { isDraft07Schema } from "./draft07.types.mjs";
|
|
7
|
+
import { flattenSchema } from "./flatten-schema.mjs";
|
|
8
|
+
import { expandSchemaRules, readChildSchemas } from "./schema-to-declarations.mjs";
|
|
9
|
+
/** A value that is not a schema at all. Named, and refused at the boundary. */
|
|
10
|
+
export class NotASchemaError extends Error {
|
|
11
|
+
constructor(received) {
|
|
12
|
+
super("fromJsonSchema expects a JSON Schema document: an object, or the " +
|
|
13
|
+
`boolean form of Draft-07 §4.4. Received ${typeof received}.`);
|
|
14
|
+
this.name = "NotASchemaError";
|
|
15
|
+
this.received = received;
|
|
16
|
+
Object.setPrototypeOf(this, NotASchemaError.prototype);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/** The rules ONE declared path carries: its presence policy and its schema. */
|
|
20
|
+
function collectDeclaredRules(declaration, bag, root, chain) {
|
|
21
|
+
const context = createStructuralContext({ bag, root, chain }, declaration.schema, Object.freeze([]));
|
|
22
|
+
return Object.freeze([
|
|
23
|
+
...declarePresenceRules({
|
|
24
|
+
isRequired: declaration.isRequired,
|
|
25
|
+
allowsNull: permitsNull(declaration.schema),
|
|
26
|
+
severity: chain.config.defaultSeverity,
|
|
27
|
+
}),
|
|
28
|
+
...expandSchemaRules(declaration.schema, context),
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
/** One pending `.v()` per declared path, with its callback still unrun. */
|
|
32
|
+
export function buildFieldEntries(bag, schema) {
|
|
33
|
+
if (!isDraft07Schema(schema))
|
|
34
|
+
throw new NotASchemaError(schema);
|
|
35
|
+
return flattenSchema(schema, readChildSchemas).map((declaration) => ({
|
|
36
|
+
path: declaration.path,
|
|
37
|
+
defaultOf: null,
|
|
38
|
+
applyDefaultToNull: false,
|
|
39
|
+
collectRules: (chain) => collectDeclaredRules(declaration, bag, schema, chain),
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
/** The erased front door: the declarations, with nothing compiled yet. */
|
|
43
|
+
export function buildFromSchema(bag, schema, config) {
|
|
44
|
+
return createFieldBuilderSurface(bag, config, buildFieldEntries(bag, schema));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The declared type is put back on by `eraseSchemaValidator`, the fourth
|
|
48
|
+
* function in src/core/type-erasure.ts — the one file the code standard allows
|
|
49
|
+
* to assert. Step 25 expressed this as an OVERLOAD PAIR instead, because
|
|
50
|
+
* type-erasure.ts was not in its produces list; an overload is accepted by
|
|
51
|
+
* TypeScript on lenient compatibility rules and so was never audited anywhere.
|
|
52
|
+
* The call below is, in the file where every escape hatch is reviewed together.
|
|
53
|
+
*/
|
|
54
|
+
export function fromJsonSchema(bag, schema, config) {
|
|
55
|
+
const planBacked = buildFromSchema(bag, schema, config).build();
|
|
56
|
+
return eraseSchemaValidator(planBacked);
|
|
57
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Draft07Schema, Draft07SchemaObject } from "./draft07.types";
|
|
2
|
+
/** The two container spellings, in the order a pointer would try them. */
|
|
3
|
+
export declare const DEFINITION_CONTAINERS: readonly string[];
|
|
4
|
+
export declare function isDefinitionContainer(keyword: string): boolean;
|
|
5
|
+
/** §4.4: the boolean form as an object, without inventing a rule kind. */
|
|
6
|
+
export declare function toSchemaObject(schema: Draft07Schema): Draft07SchemaObject;
|
|
7
|
+
/**
|
|
8
|
+
* The node a path really carries: `$ref` followed to its target, the boolean
|
|
9
|
+
* form normalised. A `$ref` sibling is DROPPED, which is Draft-07 §8.3: in
|
|
10
|
+
* this draft `$ref` replaces the object it appears in.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveSchemaNode(schema: Draft07Schema, root: Draft07Schema): Draft07SchemaObject;
|
|
13
|
+
/**
|
|
14
|
+
* The pointer a node forwards to, or undefined. Used by the flattener to spot
|
|
15
|
+
* a recursive definition BEFORE it walks into it: `#/definitions/node` inside
|
|
16
|
+
* its own `properties` is a legitimate schema whose declared paths are
|
|
17
|
+
* infinite, and Luq declares finite paths.
|
|
18
|
+
*/
|
|
19
|
+
export declare function readRefPointer(schema: Draft07Schema): string | undefined;
|
|
20
|
+
/** Every definition name the document declares, under either spelling. */
|
|
21
|
+
export declare function collectDefinitionNames(root: Draft07Schema): readonly string[];
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFINITION_CONTAINERS = void 0;
|
|
4
|
+
exports.isDefinitionContainer = isDefinitionContainer;
|
|
5
|
+
exports.toSchemaObject = toSchemaObject;
|
|
6
|
+
exports.resolveSchemaNode = resolveSchemaNode;
|
|
7
|
+
exports.readRefPointer = readRefPointer;
|
|
8
|
+
exports.collectDefinitionNames = collectDefinitionNames;
|
|
9
|
+
const draft07_types_1 = require("./draft07.types");
|
|
10
|
+
const resolve_ref_1 = require("./resolve-ref");
|
|
11
|
+
/** `true`: matches every instance. */
|
|
12
|
+
const ALWAYS_SCHEMA = Object.freeze({});
|
|
13
|
+
/** `false`: matches nothing. `not` of the empty schema, so no new rule kind. */
|
|
14
|
+
const NEVER_SCHEMA = Object.freeze({
|
|
15
|
+
not: ALWAYS_SCHEMA,
|
|
16
|
+
});
|
|
17
|
+
/** The two container spellings, in the order a pointer would try them. */
|
|
18
|
+
exports.DEFINITION_CONTAINERS = Object.freeze([
|
|
19
|
+
"definitions",
|
|
20
|
+
"$defs",
|
|
21
|
+
]);
|
|
22
|
+
function isDefinitionContainer(keyword) {
|
|
23
|
+
return exports.DEFINITION_CONTAINERS.includes(keyword);
|
|
24
|
+
}
|
|
25
|
+
/** §4.4: the boolean form as an object, without inventing a rule kind. */
|
|
26
|
+
function toSchemaObject(schema) {
|
|
27
|
+
if (schema === true)
|
|
28
|
+
return ALWAYS_SCHEMA;
|
|
29
|
+
if (schema === false)
|
|
30
|
+
return NEVER_SCHEMA;
|
|
31
|
+
return schema;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The node a path really carries: `$ref` followed to its target, the boolean
|
|
35
|
+
* form normalised. A `$ref` sibling is DROPPED, which is Draft-07 §8.3: in
|
|
36
|
+
* this draft `$ref` replaces the object it appears in.
|
|
37
|
+
*/
|
|
38
|
+
function resolveSchemaNode(schema, root) {
|
|
39
|
+
const node = toSchemaObject(schema);
|
|
40
|
+
if (node.$ref === undefined)
|
|
41
|
+
return node;
|
|
42
|
+
return toSchemaObject((0, resolve_ref_1.resolveRef)(node.$ref, root));
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The pointer a node forwards to, or undefined. Used by the flattener to spot
|
|
46
|
+
* a recursive definition BEFORE it walks into it: `#/definitions/node` inside
|
|
47
|
+
* its own `properties` is a legitimate schema whose declared paths are
|
|
48
|
+
* infinite, and Luq declares finite paths.
|
|
49
|
+
*/
|
|
50
|
+
function readRefPointer(schema) {
|
|
51
|
+
if (!(0, draft07_types_1.isSchemaObject)(schema))
|
|
52
|
+
return undefined;
|
|
53
|
+
return schema.$ref;
|
|
54
|
+
}
|
|
55
|
+
/** Every definition name the document declares, under either spelling. */
|
|
56
|
+
function collectDefinitionNames(root) {
|
|
57
|
+
if (!(0, draft07_types_1.isSchemaObject)(root))
|
|
58
|
+
return Object.freeze([]);
|
|
59
|
+
const names = new Set();
|
|
60
|
+
for (const container of [root.definitions, root.$defs]) {
|
|
61
|
+
if (container === undefined)
|
|
62
|
+
continue;
|
|
63
|
+
for (const name of Object.keys(container))
|
|
64
|
+
names.add(name);
|
|
65
|
+
}
|
|
66
|
+
return Object.freeze([...names]);
|
|
67
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { isSchemaObject } from "./draft07.types.mjs";
|
|
2
|
+
import { resolveRef } from "./resolve-ref.mjs";
|
|
3
|
+
/** `true`: matches every instance. */
|
|
4
|
+
const ALWAYS_SCHEMA = Object.freeze({});
|
|
5
|
+
/** `false`: matches nothing. `not` of the empty schema, so no new rule kind. */
|
|
6
|
+
const NEVER_SCHEMA = Object.freeze({
|
|
7
|
+
not: ALWAYS_SCHEMA,
|
|
8
|
+
});
|
|
9
|
+
/** The two container spellings, in the order a pointer would try them. */
|
|
10
|
+
export const DEFINITION_CONTAINERS = Object.freeze([
|
|
11
|
+
"definitions",
|
|
12
|
+
"$defs",
|
|
13
|
+
]);
|
|
14
|
+
export function isDefinitionContainer(keyword) {
|
|
15
|
+
return DEFINITION_CONTAINERS.includes(keyword);
|
|
16
|
+
}
|
|
17
|
+
/** §4.4: the boolean form as an object, without inventing a rule kind. */
|
|
18
|
+
export function toSchemaObject(schema) {
|
|
19
|
+
if (schema === true)
|
|
20
|
+
return ALWAYS_SCHEMA;
|
|
21
|
+
if (schema === false)
|
|
22
|
+
return NEVER_SCHEMA;
|
|
23
|
+
return schema;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The node a path really carries: `$ref` followed to its target, the boolean
|
|
27
|
+
* form normalised. A `$ref` sibling is DROPPED, which is Draft-07 §8.3: in
|
|
28
|
+
* this draft `$ref` replaces the object it appears in.
|
|
29
|
+
*/
|
|
30
|
+
export function resolveSchemaNode(schema, root) {
|
|
31
|
+
const node = toSchemaObject(schema);
|
|
32
|
+
if (node.$ref === undefined)
|
|
33
|
+
return node;
|
|
34
|
+
return toSchemaObject(resolveRef(node.$ref, root));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The pointer a node forwards to, or undefined. Used by the flattener to spot
|
|
38
|
+
* a recursive definition BEFORE it walks into it: `#/definitions/node` inside
|
|
39
|
+
* its own `properties` is a legitimate schema whose declared paths are
|
|
40
|
+
* infinite, and Luq declares finite paths.
|
|
41
|
+
*/
|
|
42
|
+
export function readRefPointer(schema) {
|
|
43
|
+
if (!isSchemaObject(schema))
|
|
44
|
+
return undefined;
|
|
45
|
+
return schema.$ref;
|
|
46
|
+
}
|
|
47
|
+
/** Every definition name the document declares, under either spelling. */
|
|
48
|
+
export function collectDefinitionNames(root) {
|
|
49
|
+
if (!isSchemaObject(root))
|
|
50
|
+
return Object.freeze([]);
|
|
51
|
+
const names = new Set();
|
|
52
|
+
for (const container of [root.definitions, root.$defs]) {
|
|
53
|
+
if (container === undefined)
|
|
54
|
+
continue;
|
|
55
|
+
for (const name of Object.keys(container))
|
|
56
|
+
names.add(name);
|
|
57
|
+
}
|
|
58
|
+
return Object.freeze([...names]);
|
|
59
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CompositeBranch, Rule } from "../plugin-kit/compiled-rule";
|
|
2
|
+
import type { Draft07Schema } from "./draft07.types";
|
|
3
|
+
import type { StructuralContext } from "./structural-expansion.types";
|
|
4
|
+
export declare function collectSubSchemaRules(schema: Draft07Schema, context: StructuralContext): readonly Rule[];
|
|
5
|
+
/** Every branch of every composite is built here, so a branch is one shape. */
|
|
6
|
+
export declare function toSchemaBranch(label: string, schema: Draft07Schema, context: StructuralContext): CompositeBranch;
|