@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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decidePresence = decidePresence;
|
|
4
|
+
const create_issue_1 = require("./create-issue");
|
|
5
|
+
/** True when the field should go on to its gates, checks and transforms. */
|
|
6
|
+
function decidePresence(field, value, ruleContext, sink) {
|
|
7
|
+
const policy = selectPolicy(field, ruleContext);
|
|
8
|
+
const isMissing = value === undefined || (policy.emptyStringIsMissing && value === "");
|
|
9
|
+
if (!isMissing && value !== null)
|
|
10
|
+
return true;
|
|
11
|
+
const isAllowed = isMissing ? policy.allowUndefined : policy.allowNull;
|
|
12
|
+
return reportUnlessAllowed(policy, isAllowed, value, ruleContext.path, sink);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The merged static policy, then every conditional override that applies, in
|
|
16
|
+
* declaration order — so a later `.optionalIf(...)` wins over an earlier
|
|
17
|
+
* `.requiredIf(...)` on the same field, the way a later assignment wins.
|
|
18
|
+
*
|
|
19
|
+
* The empty case costs one length test and returns the policy the compiler
|
|
20
|
+
* already built. Nothing here inspects a rule or builds a policy.
|
|
21
|
+
*/
|
|
22
|
+
function selectPolicy(field, ruleContext) {
|
|
23
|
+
const overrides = field.presenceOverrides;
|
|
24
|
+
if (overrides.length === 0)
|
|
25
|
+
return field.presence;
|
|
26
|
+
let policy = field.presence;
|
|
27
|
+
for (const override of overrides) {
|
|
28
|
+
const side = override.when(ruleContext.root, ruleContext.item)
|
|
29
|
+
? override.whenMet
|
|
30
|
+
: override.whenUnmet;
|
|
31
|
+
if (side !== null)
|
|
32
|
+
policy = side;
|
|
33
|
+
}
|
|
34
|
+
return policy;
|
|
35
|
+
}
|
|
36
|
+
function reportUnlessAllowed(policy, isAllowed, value, path, sink) {
|
|
37
|
+
if (!isAllowed) {
|
|
38
|
+
sink.add((0, create_issue_1.createIssue)({
|
|
39
|
+
path,
|
|
40
|
+
code: policy.code,
|
|
41
|
+
severity: policy.severity,
|
|
42
|
+
value,
|
|
43
|
+
render: (ctx) => policy.describe(ctx),
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createIssue } from "./create-issue.mjs";
|
|
2
|
+
/** True when the field should go on to its gates, checks and transforms. */
|
|
3
|
+
export function decidePresence(field, value, ruleContext, sink) {
|
|
4
|
+
const policy = selectPolicy(field, ruleContext);
|
|
5
|
+
const isMissing = value === undefined || (policy.emptyStringIsMissing && value === "");
|
|
6
|
+
if (!isMissing && value !== null)
|
|
7
|
+
return true;
|
|
8
|
+
const isAllowed = isMissing ? policy.allowUndefined : policy.allowNull;
|
|
9
|
+
return reportUnlessAllowed(policy, isAllowed, value, ruleContext.path, sink);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The merged static policy, then every conditional override that applies, in
|
|
13
|
+
* declaration order — so a later `.optionalIf(...)` wins over an earlier
|
|
14
|
+
* `.requiredIf(...)` on the same field, the way a later assignment wins.
|
|
15
|
+
*
|
|
16
|
+
* The empty case costs one length test and returns the policy the compiler
|
|
17
|
+
* already built. Nothing here inspects a rule or builds a policy.
|
|
18
|
+
*/
|
|
19
|
+
function selectPolicy(field, ruleContext) {
|
|
20
|
+
const overrides = field.presenceOverrides;
|
|
21
|
+
if (overrides.length === 0)
|
|
22
|
+
return field.presence;
|
|
23
|
+
let policy = field.presence;
|
|
24
|
+
for (const override of overrides) {
|
|
25
|
+
const side = override.when(ruleContext.root, ruleContext.item)
|
|
26
|
+
? override.whenMet
|
|
27
|
+
: override.whenUnmet;
|
|
28
|
+
if (side !== null)
|
|
29
|
+
policy = side;
|
|
30
|
+
}
|
|
31
|
+
return policy;
|
|
32
|
+
}
|
|
33
|
+
function reportUnlessAllowed(policy, isAllowed, value, path, sink) {
|
|
34
|
+
if (!isAllowed) {
|
|
35
|
+
sink.add(createIssue({
|
|
36
|
+
path,
|
|
37
|
+
code: policy.code,
|
|
38
|
+
severity: policy.severity,
|
|
39
|
+
value,
|
|
40
|
+
render: (ctx) => policy.describe(ctx),
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PathSegment } from "../path/path-segment.types";
|
|
2
|
+
export declare class IndexStack {
|
|
3
|
+
private readonly prefixes;
|
|
4
|
+
private readonly openIndices;
|
|
5
|
+
/** How many array levels are currently open. */
|
|
6
|
+
get depth(): number;
|
|
7
|
+
/** The open indices, outermost first: `[0, 2]` inside `grid[0][2]`. */
|
|
8
|
+
get indices(): readonly number[];
|
|
9
|
+
/** `""` at the root, `items[0]` inside the first element of `items`. */
|
|
10
|
+
get prefix(): string;
|
|
11
|
+
/**
|
|
12
|
+
* Enters element `index` of an array node. `nodePath` is the node's own path
|
|
13
|
+
* relative to the subject it was read from, already rendered — the runner
|
|
14
|
+
* renders it once per NODE, never once per element.
|
|
15
|
+
*
|
|
16
|
+
* A non-integer or negative index is a bug in the runner, not a data
|
|
17
|
+
* condition: it would render `items[-1]`, a path no declaration can produce
|
|
18
|
+
* and no consumer can match. It throws where the caller is still on the
|
|
19
|
+
* stack rather than surfacing as a wrong path much later.
|
|
20
|
+
*/
|
|
21
|
+
push(nodePath: string, index: number): void;
|
|
22
|
+
/** An unbalanced pop means a runner lost track of its own nesting. */
|
|
23
|
+
pop(): void;
|
|
24
|
+
/** The issue path of a field read from the subject at the current level. */
|
|
25
|
+
renderFieldPath(template: readonly PathSegment[]): string;
|
|
26
|
+
}
|
|
27
|
+
/** `""` is the root path, so it never contributes a separator dot. */
|
|
28
|
+
export declare function joinIssuePath(prefix: string, own: string): string;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IndexStack = void 0;
|
|
4
|
+
exports.joinIssuePath = joinIssuePath;
|
|
5
|
+
const format_issue_path_1 = require("../path/format-issue-path");
|
|
6
|
+
/**
|
|
7
|
+
* A compiled template never contains a wildcard (createValueReader rejects
|
|
8
|
+
* one), so rendering it needs no index. Passing none is what makes a stray
|
|
9
|
+
* wildcard template throw here instead of silently rendering a second copy of
|
|
10
|
+
* an index this stack has already written into the prefix.
|
|
11
|
+
*/
|
|
12
|
+
const NO_INDICES = Object.freeze([]);
|
|
13
|
+
class IndexStack {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.prefixes = [];
|
|
16
|
+
this.openIndices = [];
|
|
17
|
+
}
|
|
18
|
+
/** How many array levels are currently open. */
|
|
19
|
+
get depth() {
|
|
20
|
+
return this.openIndices.length;
|
|
21
|
+
}
|
|
22
|
+
/** The open indices, outermost first: `[0, 2]` inside `grid[0][2]`. */
|
|
23
|
+
get indices() {
|
|
24
|
+
return this.openIndices;
|
|
25
|
+
}
|
|
26
|
+
/** `""` at the root, `items[0]` inside the first element of `items`. */
|
|
27
|
+
get prefix() {
|
|
28
|
+
return this.prefixes[this.prefixes.length - 1] ?? "";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Enters element `index` of an array node. `nodePath` is the node's own path
|
|
32
|
+
* relative to the subject it was read from, already rendered — the runner
|
|
33
|
+
* renders it once per NODE, never once per element.
|
|
34
|
+
*
|
|
35
|
+
* A non-integer or negative index is a bug in the runner, not a data
|
|
36
|
+
* condition: it would render `items[-1]`, a path no declaration can produce
|
|
37
|
+
* and no consumer can match. It throws where the caller is still on the
|
|
38
|
+
* stack rather than surfacing as a wrong path much later.
|
|
39
|
+
*/
|
|
40
|
+
push(nodePath, index) {
|
|
41
|
+
if (!Number.isInteger(index) || index < 0) {
|
|
42
|
+
throw new RangeError(`an array index must be a non-negative integer, received ${String(index)}`);
|
|
43
|
+
}
|
|
44
|
+
this.prefixes.push(`${joinIssuePath(this.prefix, nodePath)}[${index}]`);
|
|
45
|
+
this.openIndices.push(index);
|
|
46
|
+
}
|
|
47
|
+
/** An unbalanced pop means a runner lost track of its own nesting. */
|
|
48
|
+
pop() {
|
|
49
|
+
if (this.openIndices.length === 0) {
|
|
50
|
+
throw new RangeError("popped an array index that was never pushed");
|
|
51
|
+
}
|
|
52
|
+
this.prefixes.pop();
|
|
53
|
+
this.openIndices.pop();
|
|
54
|
+
}
|
|
55
|
+
/** The issue path of a field read from the subject at the current level. */
|
|
56
|
+
renderFieldPath(template) {
|
|
57
|
+
return joinIssuePath(this.prefix, (0, format_issue_path_1.formatIssuePath)(template, NO_INDICES));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.IndexStack = IndexStack;
|
|
61
|
+
/** `""` is the root path, so it never contributes a separator dot. */
|
|
62
|
+
function joinIssuePath(prefix, own) {
|
|
63
|
+
if (prefix === "")
|
|
64
|
+
return own;
|
|
65
|
+
if (own === "")
|
|
66
|
+
return prefix;
|
|
67
|
+
return `${prefix}.${own}`;
|
|
68
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { formatIssuePath } from "../path/format-issue-path.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* A compiled template never contains a wildcard (createValueReader rejects
|
|
4
|
+
* one), so rendering it needs no index. Passing none is what makes a stray
|
|
5
|
+
* wildcard template throw here instead of silently rendering a second copy of
|
|
6
|
+
* an index this stack has already written into the prefix.
|
|
7
|
+
*/
|
|
8
|
+
const NO_INDICES = Object.freeze([]);
|
|
9
|
+
export class IndexStack {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.prefixes = [];
|
|
12
|
+
this.openIndices = [];
|
|
13
|
+
}
|
|
14
|
+
/** How many array levels are currently open. */
|
|
15
|
+
get depth() {
|
|
16
|
+
return this.openIndices.length;
|
|
17
|
+
}
|
|
18
|
+
/** The open indices, outermost first: `[0, 2]` inside `grid[0][2]`. */
|
|
19
|
+
get indices() {
|
|
20
|
+
return this.openIndices;
|
|
21
|
+
}
|
|
22
|
+
/** `""` at the root, `items[0]` inside the first element of `items`. */
|
|
23
|
+
get prefix() {
|
|
24
|
+
return this.prefixes[this.prefixes.length - 1] ?? "";
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Enters element `index` of an array node. `nodePath` is the node's own path
|
|
28
|
+
* relative to the subject it was read from, already rendered — the runner
|
|
29
|
+
* renders it once per NODE, never once per element.
|
|
30
|
+
*
|
|
31
|
+
* A non-integer or negative index is a bug in the runner, not a data
|
|
32
|
+
* condition: it would render `items[-1]`, a path no declaration can produce
|
|
33
|
+
* and no consumer can match. It throws where the caller is still on the
|
|
34
|
+
* stack rather than surfacing as a wrong path much later.
|
|
35
|
+
*/
|
|
36
|
+
push(nodePath, index) {
|
|
37
|
+
if (!Number.isInteger(index) || index < 0) {
|
|
38
|
+
throw new RangeError(`an array index must be a non-negative integer, received ${String(index)}`);
|
|
39
|
+
}
|
|
40
|
+
this.prefixes.push(`${joinIssuePath(this.prefix, nodePath)}[${index}]`);
|
|
41
|
+
this.openIndices.push(index);
|
|
42
|
+
}
|
|
43
|
+
/** An unbalanced pop means a runner lost track of its own nesting. */
|
|
44
|
+
pop() {
|
|
45
|
+
if (this.openIndices.length === 0) {
|
|
46
|
+
throw new RangeError("popped an array index that was never pushed");
|
|
47
|
+
}
|
|
48
|
+
this.prefixes.pop();
|
|
49
|
+
this.openIndices.pop();
|
|
50
|
+
}
|
|
51
|
+
/** The issue path of a field read from the subject at the current level. */
|
|
52
|
+
renderFieldPath(template) {
|
|
53
|
+
return joinIssuePath(this.prefix, formatIssuePath(template, NO_INDICES));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** `""` is the root path, so it never contributes a separator dot. */
|
|
57
|
+
export function joinIssuePath(prefix, own) {
|
|
58
|
+
if (prefix === "")
|
|
59
|
+
return own;
|
|
60
|
+
if (own === "")
|
|
61
|
+
return prefix;
|
|
62
|
+
return `${prefix}.${own}`;
|
|
63
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { ARRAY_ELEMENTS_ABORT_ON_EACH_FIELD, DEFAULT_ABORT_EARLY, DEFAULT_ABORT_EARLY_ON_EACH_FIELD, IssueSink, resolveAbortPolicy, } from "./issue-sink";
|
|
2
|
+
export type { AbortPolicy } from "./issue-sink";
|
|
3
|
+
export { IndexStack, joinIssuePath } from "./index-stack";
|
|
4
|
+
export { createIssue, renderFallbackMessage } from "./create-issue";
|
|
5
|
+
export type { IssueRequest } from "./create-issue";
|
|
6
|
+
export { decidePresence } from "./decide-presence";
|
|
7
|
+
export { FIELD_VALUE_UNCHANGED, runField } from "./run-field";
|
|
8
|
+
export type { FieldRunContext, FieldRunOutcome, RecursionRunner, } from "./run-field";
|
|
9
|
+
export { NO_WRITE_TARGETS, createArrayWriteTargets, createPlanWriteTargets, replaceElement, writeFieldValue, } from "./output-writer";
|
|
10
|
+
export type { ArrayWriteTarget } from "./output-writer";
|
|
11
|
+
export { runArrayNodes } from "./run-array-node";
|
|
12
|
+
export { prefixIssuePaths, runPlan } from "./run-plan";
|
|
13
|
+
export { RECURSION_ABORT_POLICY, createRecursionRunner } from "./run-recursion";
|
|
14
|
+
export type { RecursionHost } from "./run-recursion";
|
|
15
|
+
export { BRANCH_ABORT_POLICY, createBranchExecutor } from "./run-branch";
|
|
16
|
+
export { ROOT_MISSING_CODE, ROOT_MISSING_MESSAGE, createValidator, hasRejectingIssue, } from "./create-validator";
|
|
17
|
+
export type { PlanValidator } from "./create-validator";
|
|
18
|
+
export { createFieldValidator } from "./create-field-validator";
|
|
19
|
+
export type { PlanFieldValidator } from "./create-field-validator";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createFieldValidator = exports.hasRejectingIssue = exports.createValidator = exports.ROOT_MISSING_MESSAGE = exports.ROOT_MISSING_CODE = exports.createBranchExecutor = exports.BRANCH_ABORT_POLICY = exports.createRecursionRunner = exports.RECURSION_ABORT_POLICY = exports.runPlan = exports.prefixIssuePaths = exports.runArrayNodes = exports.writeFieldValue = exports.replaceElement = exports.createPlanWriteTargets = exports.createArrayWriteTargets = exports.NO_WRITE_TARGETS = exports.runField = exports.FIELD_VALUE_UNCHANGED = exports.decidePresence = exports.renderFallbackMessage = exports.createIssue = exports.joinIssuePath = exports.IndexStack = exports.resolveAbortPolicy = exports.IssueSink = exports.DEFAULT_ABORT_EARLY_ON_EACH_FIELD = exports.DEFAULT_ABORT_EARLY = exports.ARRAY_ELEMENTS_ABORT_ON_EACH_FIELD = void 0;
|
|
4
|
+
// ===========================================================================
|
|
5
|
+
// L5 src/runtime/index.ts — re-exports only. The engine: one plan in, issues
|
|
6
|
+
// and (for parse) a copy-on-write output out. Nothing is defined in this file.
|
|
7
|
+
// ===========================================================================
|
|
8
|
+
var issue_sink_1 = require("./issue-sink");
|
|
9
|
+
Object.defineProperty(exports, "ARRAY_ELEMENTS_ABORT_ON_EACH_FIELD", { enumerable: true, get: function () { return issue_sink_1.ARRAY_ELEMENTS_ABORT_ON_EACH_FIELD; } });
|
|
10
|
+
Object.defineProperty(exports, "DEFAULT_ABORT_EARLY", { enumerable: true, get: function () { return issue_sink_1.DEFAULT_ABORT_EARLY; } });
|
|
11
|
+
Object.defineProperty(exports, "DEFAULT_ABORT_EARLY_ON_EACH_FIELD", { enumerable: true, get: function () { return issue_sink_1.DEFAULT_ABORT_EARLY_ON_EACH_FIELD; } });
|
|
12
|
+
Object.defineProperty(exports, "IssueSink", { enumerable: true, get: function () { return issue_sink_1.IssueSink; } });
|
|
13
|
+
Object.defineProperty(exports, "resolveAbortPolicy", { enumerable: true, get: function () { return issue_sink_1.resolveAbortPolicy; } });
|
|
14
|
+
var index_stack_1 = require("./index-stack");
|
|
15
|
+
Object.defineProperty(exports, "IndexStack", { enumerable: true, get: function () { return index_stack_1.IndexStack; } });
|
|
16
|
+
Object.defineProperty(exports, "joinIssuePath", { enumerable: true, get: function () { return index_stack_1.joinIssuePath; } });
|
|
17
|
+
var create_issue_1 = require("./create-issue");
|
|
18
|
+
Object.defineProperty(exports, "createIssue", { enumerable: true, get: function () { return create_issue_1.createIssue; } });
|
|
19
|
+
Object.defineProperty(exports, "renderFallbackMessage", { enumerable: true, get: function () { return create_issue_1.renderFallbackMessage; } });
|
|
20
|
+
var decide_presence_1 = require("./decide-presence");
|
|
21
|
+
Object.defineProperty(exports, "decidePresence", { enumerable: true, get: function () { return decide_presence_1.decidePresence; } });
|
|
22
|
+
var run_field_1 = require("./run-field");
|
|
23
|
+
Object.defineProperty(exports, "FIELD_VALUE_UNCHANGED", { enumerable: true, get: function () { return run_field_1.FIELD_VALUE_UNCHANGED; } });
|
|
24
|
+
Object.defineProperty(exports, "runField", { enumerable: true, get: function () { return run_field_1.runField; } });
|
|
25
|
+
var output_writer_1 = require("./output-writer");
|
|
26
|
+
Object.defineProperty(exports, "NO_WRITE_TARGETS", { enumerable: true, get: function () { return output_writer_1.NO_WRITE_TARGETS; } });
|
|
27
|
+
Object.defineProperty(exports, "createArrayWriteTargets", { enumerable: true, get: function () { return output_writer_1.createArrayWriteTargets; } });
|
|
28
|
+
Object.defineProperty(exports, "createPlanWriteTargets", { enumerable: true, get: function () { return output_writer_1.createPlanWriteTargets; } });
|
|
29
|
+
Object.defineProperty(exports, "replaceElement", { enumerable: true, get: function () { return output_writer_1.replaceElement; } });
|
|
30
|
+
Object.defineProperty(exports, "writeFieldValue", { enumerable: true, get: function () { return output_writer_1.writeFieldValue; } });
|
|
31
|
+
var run_array_node_1 = require("./run-array-node");
|
|
32
|
+
Object.defineProperty(exports, "runArrayNodes", { enumerable: true, get: function () { return run_array_node_1.runArrayNodes; } });
|
|
33
|
+
var run_plan_1 = require("./run-plan");
|
|
34
|
+
Object.defineProperty(exports, "prefixIssuePaths", { enumerable: true, get: function () { return run_plan_1.prefixIssuePaths; } });
|
|
35
|
+
Object.defineProperty(exports, "runPlan", { enumerable: true, get: function () { return run_plan_1.runPlan; } });
|
|
36
|
+
var run_recursion_1 = require("./run-recursion");
|
|
37
|
+
Object.defineProperty(exports, "RECURSION_ABORT_POLICY", { enumerable: true, get: function () { return run_recursion_1.RECURSION_ABORT_POLICY; } });
|
|
38
|
+
Object.defineProperty(exports, "createRecursionRunner", { enumerable: true, get: function () { return run_recursion_1.createRecursionRunner; } });
|
|
39
|
+
var run_branch_1 = require("./run-branch");
|
|
40
|
+
Object.defineProperty(exports, "BRANCH_ABORT_POLICY", { enumerable: true, get: function () { return run_branch_1.BRANCH_ABORT_POLICY; } });
|
|
41
|
+
Object.defineProperty(exports, "createBranchExecutor", { enumerable: true, get: function () { return run_branch_1.createBranchExecutor; } });
|
|
42
|
+
var create_validator_1 = require("./create-validator");
|
|
43
|
+
Object.defineProperty(exports, "ROOT_MISSING_CODE", { enumerable: true, get: function () { return create_validator_1.ROOT_MISSING_CODE; } });
|
|
44
|
+
Object.defineProperty(exports, "ROOT_MISSING_MESSAGE", { enumerable: true, get: function () { return create_validator_1.ROOT_MISSING_MESSAGE; } });
|
|
45
|
+
Object.defineProperty(exports, "createValidator", { enumerable: true, get: function () { return create_validator_1.createValidator; } });
|
|
46
|
+
Object.defineProperty(exports, "hasRejectingIssue", { enumerable: true, get: function () { return create_validator_1.hasRejectingIssue; } });
|
|
47
|
+
var create_field_validator_1 = require("./create-field-validator");
|
|
48
|
+
Object.defineProperty(exports, "createFieldValidator", { enumerable: true, get: function () { return create_field_validator_1.createFieldValidator; } });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// ===========================================================================
|
|
2
|
+
// L5 src/runtime/index.ts — re-exports only. The engine: one plan in, issues
|
|
3
|
+
// and (for parse) a copy-on-write output out. Nothing is defined in this file.
|
|
4
|
+
// ===========================================================================
|
|
5
|
+
export { ARRAY_ELEMENTS_ABORT_ON_EACH_FIELD, DEFAULT_ABORT_EARLY, DEFAULT_ABORT_EARLY_ON_EACH_FIELD, IssueSink, resolveAbortPolicy, } from "./issue-sink.mjs";
|
|
6
|
+
export { IndexStack, joinIssuePath } from "./index-stack.mjs";
|
|
7
|
+
export { createIssue, renderFallbackMessage } from "./create-issue.mjs";
|
|
8
|
+
export { decidePresence } from "./decide-presence.mjs";
|
|
9
|
+
export { FIELD_VALUE_UNCHANGED, runField } from "./run-field.mjs";
|
|
10
|
+
export { NO_WRITE_TARGETS, createArrayWriteTargets, createPlanWriteTargets, replaceElement, writeFieldValue, } from "./output-writer.mjs";
|
|
11
|
+
export { runArrayNodes } from "./run-array-node.mjs";
|
|
12
|
+
export { prefixIssuePaths, runPlan } from "./run-plan.mjs";
|
|
13
|
+
export { RECURSION_ABORT_POLICY, createRecursionRunner } from "./run-recursion.mjs";
|
|
14
|
+
export { BRANCH_ABORT_POLICY, createBranchExecutor } from "./run-branch.mjs";
|
|
15
|
+
export { ROOT_MISSING_CODE, ROOT_MISSING_MESSAGE, createValidator, hasRejectingIssue, } from "./create-validator.mjs";
|
|
16
|
+
export { createFieldValidator } from "./create-field-validator.mjs";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ValidationIssue } from "../types";
|
|
2
|
+
import type { ValidateOptions } from "../types/validation-result.types";
|
|
3
|
+
export interface AbortPolicy {
|
|
4
|
+
readonly abortEarly: boolean;
|
|
5
|
+
readonly abortEarlyOnEachField: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const DEFAULT_ABORT_EARLY = true;
|
|
8
|
+
export declare const DEFAULT_ABORT_EARLY_ON_EACH_FIELD = true;
|
|
9
|
+
/**
|
|
10
|
+
* Inside an array element every field is validated to completion whatever the
|
|
11
|
+
* caller asked for. Legacy hard-coded `effectiveAbortEarlyOnEachField = false`
|
|
12
|
+
* in two places and forgot it in a third; here it is one named constant that
|
|
13
|
+
* `forArrayElements()` is the only consumer of.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ARRAY_ELEMENTS_ABORT_ON_EACH_FIELD = false;
|
|
16
|
+
export declare function resolveAbortPolicy(options?: ValidateOptions): AbortPolicy;
|
|
17
|
+
export declare class IssueSink {
|
|
18
|
+
private readonly policy;
|
|
19
|
+
private collected;
|
|
20
|
+
constructor(policy: AbortPolicy);
|
|
21
|
+
/** The mark a field captures before it runs its own rules. */
|
|
22
|
+
get count(): number;
|
|
23
|
+
/** The live buffer. runPlan freezes it once, at the end of the call. */
|
|
24
|
+
get issues(): readonly ValidationIssue[];
|
|
25
|
+
add(issue: ValidationIssue): void;
|
|
26
|
+
/**
|
|
27
|
+
* Any issue counts, whatever its severity. Severity labels an issue for the
|
|
28
|
+
* consumer; it does not make the issue conditional, and a sink that skipped
|
|
29
|
+
* warnings here would make abortEarly mean something different depending on
|
|
30
|
+
* which plugin happened to fail first.
|
|
31
|
+
*/
|
|
32
|
+
shouldStopPlan(): boolean;
|
|
33
|
+
shouldStopField(mark: number): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* A sink for the fields of one array element: the same issue buffer, so
|
|
36
|
+
* abortEarly still sees everything, with the field-level abort disabled.
|
|
37
|
+
*/
|
|
38
|
+
forArrayElements(): IssueSink;
|
|
39
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IssueSink = exports.ARRAY_ELEMENTS_ABORT_ON_EACH_FIELD = exports.DEFAULT_ABORT_EARLY_ON_EACH_FIELD = exports.DEFAULT_ABORT_EARLY = void 0;
|
|
4
|
+
exports.resolveAbortPolicy = resolveAbortPolicy;
|
|
5
|
+
exports.DEFAULT_ABORT_EARLY = true;
|
|
6
|
+
exports.DEFAULT_ABORT_EARLY_ON_EACH_FIELD = true;
|
|
7
|
+
/**
|
|
8
|
+
* Inside an array element every field is validated to completion whatever the
|
|
9
|
+
* caller asked for. Legacy hard-coded `effectiveAbortEarlyOnEachField = false`
|
|
10
|
+
* in two places and forgot it in a third; here it is one named constant that
|
|
11
|
+
* `forArrayElements()` is the only consumer of.
|
|
12
|
+
*/
|
|
13
|
+
exports.ARRAY_ELEMENTS_ABORT_ON_EACH_FIELD = false;
|
|
14
|
+
function resolveAbortPolicy(options) {
|
|
15
|
+
return {
|
|
16
|
+
abortEarly: options?.abortEarly ?? exports.DEFAULT_ABORT_EARLY,
|
|
17
|
+
abortEarlyOnEachField: options?.abortEarlyOnEachField ?? exports.DEFAULT_ABORT_EARLY_ON_EACH_FIELD,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
class IssueSink {
|
|
21
|
+
constructor(policy) {
|
|
22
|
+
this.policy = policy;
|
|
23
|
+
this.collected = [];
|
|
24
|
+
}
|
|
25
|
+
/** The mark a field captures before it runs its own rules. */
|
|
26
|
+
get count() {
|
|
27
|
+
return this.collected.length;
|
|
28
|
+
}
|
|
29
|
+
/** The live buffer. runPlan freezes it once, at the end of the call. */
|
|
30
|
+
get issues() {
|
|
31
|
+
return this.collected;
|
|
32
|
+
}
|
|
33
|
+
add(issue) {
|
|
34
|
+
this.collected.push(issue);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Any issue counts, whatever its severity. Severity labels an issue for the
|
|
38
|
+
* consumer; it does not make the issue conditional, and a sink that skipped
|
|
39
|
+
* warnings here would make abortEarly mean something different depending on
|
|
40
|
+
* which plugin happened to fail first.
|
|
41
|
+
*/
|
|
42
|
+
shouldStopPlan() {
|
|
43
|
+
return this.policy.abortEarly && this.collected.length > 0;
|
|
44
|
+
}
|
|
45
|
+
shouldStopField(mark) {
|
|
46
|
+
return this.policy.abortEarlyOnEachField && this.collected.length > mark;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A sink for the fields of one array element: the same issue buffer, so
|
|
50
|
+
* abortEarly still sees everything, with the field-level abort disabled.
|
|
51
|
+
*/
|
|
52
|
+
forArrayElements() {
|
|
53
|
+
const derived = new IssueSink({
|
|
54
|
+
abortEarly: this.policy.abortEarly,
|
|
55
|
+
abortEarlyOnEachField: exports.ARRAY_ELEMENTS_ABORT_ON_EACH_FIELD,
|
|
56
|
+
});
|
|
57
|
+
derived.collected = this.collected;
|
|
58
|
+
return derived;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.IssueSink = IssueSink;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export const DEFAULT_ABORT_EARLY = true;
|
|
2
|
+
export const DEFAULT_ABORT_EARLY_ON_EACH_FIELD = true;
|
|
3
|
+
/**
|
|
4
|
+
* Inside an array element every field is validated to completion whatever the
|
|
5
|
+
* caller asked for. Legacy hard-coded `effectiveAbortEarlyOnEachField = false`
|
|
6
|
+
* in two places and forgot it in a third; here it is one named constant that
|
|
7
|
+
* `forArrayElements()` is the only consumer of.
|
|
8
|
+
*/
|
|
9
|
+
export const ARRAY_ELEMENTS_ABORT_ON_EACH_FIELD = false;
|
|
10
|
+
export function resolveAbortPolicy(options) {
|
|
11
|
+
return {
|
|
12
|
+
abortEarly: options?.abortEarly ?? DEFAULT_ABORT_EARLY,
|
|
13
|
+
abortEarlyOnEachField: options?.abortEarlyOnEachField ?? DEFAULT_ABORT_EARLY_ON_EACH_FIELD,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export class IssueSink {
|
|
17
|
+
constructor(policy) {
|
|
18
|
+
this.policy = policy;
|
|
19
|
+
this.collected = [];
|
|
20
|
+
}
|
|
21
|
+
/** The mark a field captures before it runs its own rules. */
|
|
22
|
+
get count() {
|
|
23
|
+
return this.collected.length;
|
|
24
|
+
}
|
|
25
|
+
/** The live buffer. runPlan freezes it once, at the end of the call. */
|
|
26
|
+
get issues() {
|
|
27
|
+
return this.collected;
|
|
28
|
+
}
|
|
29
|
+
add(issue) {
|
|
30
|
+
this.collected.push(issue);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Any issue counts, whatever its severity. Severity labels an issue for the
|
|
34
|
+
* consumer; it does not make the issue conditional, and a sink that skipped
|
|
35
|
+
* warnings here would make abortEarly mean something different depending on
|
|
36
|
+
* which plugin happened to fail first.
|
|
37
|
+
*/
|
|
38
|
+
shouldStopPlan() {
|
|
39
|
+
return this.policy.abortEarly && this.collected.length > 0;
|
|
40
|
+
}
|
|
41
|
+
shouldStopField(mark) {
|
|
42
|
+
return this.policy.abortEarlyOnEachField && this.collected.length > mark;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A sink for the fields of one array element: the same issue buffer, so
|
|
46
|
+
* abortEarly still sees everything, with the field-level abort disabled.
|
|
47
|
+
*/
|
|
48
|
+
forArrayElements() {
|
|
49
|
+
const derived = new IssueSink({
|
|
50
|
+
abortEarly: this.policy.abortEarly,
|
|
51
|
+
abortEarlyOnEachField: ARRAY_ELEMENTS_ABORT_ON_EACH_FIELD,
|
|
52
|
+
});
|
|
53
|
+
derived.collected = this.collected;
|
|
54
|
+
return derived;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ArrayNode, CompiledField, ValidationPlan } from "../compile/validation-plan.types";
|
|
2
|
+
import type { ValueWriter } from "../path/create-value-writer";
|
|
3
|
+
import type { FieldRunOutcome } from "./run-field";
|
|
4
|
+
/** The write-back companion of one ArrayNode, plus those of its nested nodes. */
|
|
5
|
+
export interface ArrayWriteTarget {
|
|
6
|
+
/** Puts a rebuilt array back at the node's own path in its subject. */
|
|
7
|
+
readonly write: ValueWriter;
|
|
8
|
+
readonly nested: readonly ArrayWriteTarget[];
|
|
9
|
+
}
|
|
10
|
+
/** Shared and frozen: a validate() run allocates no target at all. */
|
|
11
|
+
export declare const NO_WRITE_TARGETS: readonly ArrayWriteTarget[];
|
|
12
|
+
export declare function createArrayWriteTargets(nodes: readonly ArrayNode[]): readonly ArrayWriteTarget[];
|
|
13
|
+
/**
|
|
14
|
+
* null when the plan writes nothing at all — no transform anywhere and no
|
|
15
|
+
* default anywhere. createValidator turns that null into "parse() runs exactly
|
|
16
|
+
* the validate() path", which is the whole of "hasTransforms === false skips
|
|
17
|
+
* the writer entirely": no target is built, no writer is called, and parse()
|
|
18
|
+
* hands back the very object it was given.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createPlanWriteTargets(plan: ValidationPlan): readonly ArrayWriteTarget[] | null;
|
|
21
|
+
/**
|
|
22
|
+
* `shouldWrite` is the parse/validate decision, taken by the caller and passed
|
|
23
|
+
* down rather than re-derived here. validate() must not write even though a
|
|
24
|
+
* default DID produce a new value for the rules to judge: legacy computed
|
|
25
|
+
* defaults into a copy and threw the copy away, and that is the behaviour the
|
|
26
|
+
* two entry points still share.
|
|
27
|
+
*
|
|
28
|
+
* `field.write` is null exactly when the field declared neither a transform
|
|
29
|
+
* nor a default, so the null test is not a rule-kind decision — it is the
|
|
30
|
+
* compiled answer to "does this field have an output at all".
|
|
31
|
+
*/
|
|
32
|
+
export declare function writeFieldValue(field: CompiledField, subject: unknown, outcome: FieldRunOutcome, shouldWrite: boolean): unknown;
|
|
33
|
+
/**
|
|
34
|
+
* One element replaced, copy-on-write. An element that came back by identity
|
|
35
|
+
* costs nothing: a 10k-element array with no transform is never copied, which
|
|
36
|
+
* is why the identity test comes before the slice.
|
|
37
|
+
*/
|
|
38
|
+
export declare function replaceElement(array: readonly unknown[], index: number, element: unknown): readonly unknown[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NO_WRITE_TARGETS = void 0;
|
|
4
|
+
exports.createArrayWriteTargets = createArrayWriteTargets;
|
|
5
|
+
exports.createPlanWriteTargets = createPlanWriteTargets;
|
|
6
|
+
exports.writeFieldValue = writeFieldValue;
|
|
7
|
+
exports.replaceElement = replaceElement;
|
|
8
|
+
const create_value_writer_1 = require("../path/create-value-writer");
|
|
9
|
+
/** Shared and frozen: a validate() run allocates no target at all. */
|
|
10
|
+
exports.NO_WRITE_TARGETS = Object.freeze([]);
|
|
11
|
+
function createArrayWriteTargets(nodes) {
|
|
12
|
+
if (nodes.length === 0)
|
|
13
|
+
return exports.NO_WRITE_TARGETS;
|
|
14
|
+
return Object.freeze(nodes.map((node) => Object.freeze({
|
|
15
|
+
write: (0, create_value_writer_1.createValueWriter)(node.template),
|
|
16
|
+
nested: createArrayWriteTargets(node.nested),
|
|
17
|
+
})));
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* null when the plan writes nothing at all — no transform anywhere and no
|
|
21
|
+
* default anywhere. createValidator turns that null into "parse() runs exactly
|
|
22
|
+
* the validate() path", which is the whole of "hasTransforms === false skips
|
|
23
|
+
* the writer entirely": no target is built, no writer is called, and parse()
|
|
24
|
+
* hands back the very object it was given.
|
|
25
|
+
*/
|
|
26
|
+
function createPlanWriteTargets(plan) {
|
|
27
|
+
if (!plan.hasTransforms && !plan.hasDefaults)
|
|
28
|
+
return null;
|
|
29
|
+
return createArrayWriteTargets(plan.arrays);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* `shouldWrite` is the parse/validate decision, taken by the caller and passed
|
|
33
|
+
* down rather than re-derived here. validate() must not write even though a
|
|
34
|
+
* default DID produce a new value for the rules to judge: legacy computed
|
|
35
|
+
* defaults into a copy and threw the copy away, and that is the behaviour the
|
|
36
|
+
* two entry points still share.
|
|
37
|
+
*
|
|
38
|
+
* `field.write` is null exactly when the field declared neither a transform
|
|
39
|
+
* nor a default, so the null test is not a rule-kind decision — it is the
|
|
40
|
+
* compiled answer to "does this field have an output at all".
|
|
41
|
+
*/
|
|
42
|
+
function writeFieldValue(field, subject, outcome, shouldWrite) {
|
|
43
|
+
if (!shouldWrite || !outcome.hasWriteBack || field.write === null) {
|
|
44
|
+
return subject;
|
|
45
|
+
}
|
|
46
|
+
return field.write(subject, outcome.value);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* One element replaced, copy-on-write. An element that came back by identity
|
|
50
|
+
* costs nothing: a 10k-element array with no transform is never copied, which
|
|
51
|
+
* is why the identity test comes before the slice.
|
|
52
|
+
*/
|
|
53
|
+
function replaceElement(array, index, element) {
|
|
54
|
+
if (array[index] === element)
|
|
55
|
+
return array;
|
|
56
|
+
const copy = array.slice();
|
|
57
|
+
copy[index] = element;
|
|
58
|
+
return copy;
|
|
59
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createValueWriter } from "../path/create-value-writer.mjs";
|
|
2
|
+
/** Shared and frozen: a validate() run allocates no target at all. */
|
|
3
|
+
export const NO_WRITE_TARGETS = Object.freeze([]);
|
|
4
|
+
export function createArrayWriteTargets(nodes) {
|
|
5
|
+
if (nodes.length === 0)
|
|
6
|
+
return NO_WRITE_TARGETS;
|
|
7
|
+
return Object.freeze(nodes.map((node) => Object.freeze({
|
|
8
|
+
write: createValueWriter(node.template),
|
|
9
|
+
nested: createArrayWriteTargets(node.nested),
|
|
10
|
+
})));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* null when the plan writes nothing at all — no transform anywhere and no
|
|
14
|
+
* default anywhere. createValidator turns that null into "parse() runs exactly
|
|
15
|
+
* the validate() path", which is the whole of "hasTransforms === false skips
|
|
16
|
+
* the writer entirely": no target is built, no writer is called, and parse()
|
|
17
|
+
* hands back the very object it was given.
|
|
18
|
+
*/
|
|
19
|
+
export function createPlanWriteTargets(plan) {
|
|
20
|
+
if (!plan.hasTransforms && !plan.hasDefaults)
|
|
21
|
+
return null;
|
|
22
|
+
return createArrayWriteTargets(plan.arrays);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* `shouldWrite` is the parse/validate decision, taken by the caller and passed
|
|
26
|
+
* down rather than re-derived here. validate() must not write even though a
|
|
27
|
+
* default DID produce a new value for the rules to judge: legacy computed
|
|
28
|
+
* defaults into a copy and threw the copy away, and that is the behaviour the
|
|
29
|
+
* two entry points still share.
|
|
30
|
+
*
|
|
31
|
+
* `field.write` is null exactly when the field declared neither a transform
|
|
32
|
+
* nor a default, so the null test is not a rule-kind decision — it is the
|
|
33
|
+
* compiled answer to "does this field have an output at all".
|
|
34
|
+
*/
|
|
35
|
+
export function writeFieldValue(field, subject, outcome, shouldWrite) {
|
|
36
|
+
if (!shouldWrite || !outcome.hasWriteBack || field.write === null) {
|
|
37
|
+
return subject;
|
|
38
|
+
}
|
|
39
|
+
return field.write(subject, outcome.value);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* One element replaced, copy-on-write. An element that came back by identity
|
|
43
|
+
* costs nothing: a 10k-element array with no transform is never copied, which
|
|
44
|
+
* is why the identity test comes before the slice.
|
|
45
|
+
*/
|
|
46
|
+
export function replaceElement(array, index, element) {
|
|
47
|
+
if (array[index] === element)
|
|
48
|
+
return array;
|
|
49
|
+
const copy = array.slice();
|
|
50
|
+
copy[index] = element;
|
|
51
|
+
return copy;
|
|
52
|
+
}
|