@maroonedog/luq 0.1.2-alpha → 2.1.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 +479 -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 +103 -0
- package/dist/chain/create-chain-node.mjs +98 -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 +42 -0
- package/dist/compile/resolve-conditional-presence.mjs +38 -0
- package/dist/compile/resolve-presence.d.ts +6 -0
- package/dist/compile/resolve-presence.js +63 -0
- package/dist/compile/resolve-presence.mjs +59 -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 +123 -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 +63 -0
- package/dist/json-schema/build-from-schema.mjs +56 -0
- package/dist/json-schema/collect-definitions.d.ts +51 -0
- package/dist/json-schema/collect-definitions.js +111 -0
- package/dist/json-schema/collect-definitions.mjs +101 -0
- package/dist/json-schema/collect-sub-schema-rules.d.ts +17 -0
- package/dist/json-schema/collect-sub-schema-rules.js +112 -0
- package/dist/json-schema/collect-sub-schema-rules.mjs +108 -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 +20 -0
- package/dist/json-schema/create-structural-context.js +117 -0
- package/dist/json-schema/create-structural-context.mjs +113 -0
- package/dist/json-schema/declare-additional-properties.d.ts +19 -0
- package/dist/json-schema/declare-additional-properties.js +42 -0
- package/dist/json-schema/declare-additional-properties.mjs +37 -0
- package/dist/json-schema/declare-object-keywords.d.ts +22 -0
- package/dist/json-schema/declare-object-keywords.js +133 -0
- package/dist/json-schema/declare-object-keywords.mjs +126 -0
- package/dist/json-schema/declare-presence.d.ts +18 -0
- package/dist/json-schema/declare-presence.js +52 -0
- package/dist/json-schema/declare-presence.mjs +49 -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 +4 -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 +33 -0
- package/dist/json-schema/extensions/json-schema/json-schema.js +108 -0
- package/dist/json-schema/extensions/json-schema/json-schema.mjs +104 -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 +5 -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 +24 -0
- package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.js +66 -0
- package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.mjs +62 -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/follow-json-pointer.d.ts +23 -0
- package/dist/json-schema/follow-json-pointer.js +87 -0
- package/dist/json-schema/follow-json-pointer.mjs +82 -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 +24 -0
- package/dist/json-schema/index.js +65 -0
- package/dist/json-schema/index.mjs +22 -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/ref-resolution-error.d.ts +4 -0
- package/dist/json-schema/ref-resolution-error.js +20 -0
- package/dist/json-schema/ref-resolution-error.mjs +16 -0
- package/dist/json-schema/ref-scope.d.ts +18 -0
- package/dist/json-schema/ref-scope.js +37 -0
- package/dist/json-schema/ref-scope.mjs +33 -0
- package/dist/json-schema/resolve-ref.d.ts +21 -0
- package/dist/json-schema/resolve-ref.js +133 -0
- package/dist/json-schema/resolve-ref.mjs +128 -0
- package/dist/json-schema/schema-registry.d.ts +30 -0
- package/dist/json-schema/schema-registry.js +142 -0
- package/dist/json-schema/schema-registry.mjs +139 -0
- package/dist/json-schema/schema-to-declarations.d.ts +9 -0
- package/dist/json-schema/schema-to-declarations.js +123 -0
- package/dist/json-schema/schema-to-declarations.mjs +117 -0
- package/dist/json-schema/structural-expansion.types.d.ts +90 -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/json-schema/uri-reference.d.ts +29 -0
- package/dist/json-schema/uri-reference.js +118 -0
- package/dist/json-schema/uri-reference.mjs +111 -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 +80 -0
- package/dist/path/create-value-writer.mjs +77 -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 +46 -0
- package/dist/path/reserved-segment.js +88 -0
- package/dist/path/reserved-segment.mjs +82 -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 +112 -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 +59 -0
- package/dist/plugin-kit/create-rule.js +68 -0
- package/dist/plugin-kit/create-rule.mjs +58 -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 +55 -0
- package/dist/plugin-kit/plugin-definition.js +26 -0
- package/dist/plugin-kit/plugin-definition.mjs +21 -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 +58 -0
- package/dist/plugins/object-additional-properties/object-additional-properties-schema.mjs +55 -0
- package/dist/plugins/object-additional-properties/object-additional-properties.d.ts +9 -0
- package/dist/plugins/object-additional-properties/object-additional-properties.js +42 -0
- package/dist/plugins/object-additional-properties/object-additional-properties.mjs +39 -0
- package/dist/plugins/object-additional-properties/select-additional-keys.d.ts +15 -0
- package/dist/plugins/object-additional-properties/select-additional-keys.js +51 -0
- package/dist/plugins/object-additional-properties/select-additional-keys.mjs +47 -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 +48 -0
- package/dist/runtime/decide-presence.mjs +45 -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/standard-schema/index.d.ts +6 -0
- package/dist/standard-schema/index.js +7 -0
- package/dist/standard-schema/index.mjs +2 -0
- package/dist/standard-schema/split-issue-path.d.ts +9 -0
- package/dist/standard-schema/split-issue-path.js +66 -0
- package/dist/standard-schema/split-issue-path.mjs +63 -0
- package/dist/standard-schema/standard-schema.types.d.ts +46 -0
- package/dist/standard-schema/standard-schema.types.js +13 -0
- package/dist/standard-schema/standard-schema.types.mjs +12 -0
- package/dist/standard-schema/to-standard-schema.d.ts +41 -0
- package/dist/standard-schema/to-standard-schema.js +60 -0
- package/dist/standard-schema/to-standard-schema.mjs +57 -0
- package/dist/standard-schema.d.ts +1 -0
- package/dist/standard-schema.js +2 -0
- package/dist/standard-schema.mjs +1 -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 +75 -69
- package/dist/types/index.js +46 -0
- package/dist/types/index.mjs +36 -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 +523 -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,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NON_DRAFT07_KEYWORDS = exports.draft07KeywordMap = void 0;
|
|
4
|
+
exports.isDraft07Keyword = isDraft07Keyword;
|
|
5
|
+
exports.listDraft07Keywords = listDraft07Keywords;
|
|
6
|
+
exports.findKeywordHandling = findKeywordHandling;
|
|
7
|
+
exports.assertKeywordSupported = assertKeywordSupported;
|
|
8
|
+
exports.listBoundPluginNames = listBoundPluginNames;
|
|
9
|
+
exports.countKeywordHandlings = countKeywordHandlings;
|
|
10
|
+
const keyword_map_core_1 = require("./keyword-map-core");
|
|
11
|
+
const keyword_map_number_1 = require("./keyword-map-number");
|
|
12
|
+
const keyword_map_string_1 = require("./keyword-map-string");
|
|
13
|
+
const keyword_map_array_1 = require("./keyword-map-array");
|
|
14
|
+
const keyword_map_object_1 = require("./keyword-map-object");
|
|
15
|
+
const format_map_1 = require("./format-map");
|
|
16
|
+
const unsupported_keyword_error_1 = require("./unsupported-keyword-error");
|
|
17
|
+
exports.draft07KeywordMap = {
|
|
18
|
+
...keyword_map_core_1.coreKeywordMap,
|
|
19
|
+
...keyword_map_number_1.numberKeywordMap,
|
|
20
|
+
...keyword_map_string_1.stringKeywordMap,
|
|
21
|
+
...keyword_map_array_1.arrayKeywordMap,
|
|
22
|
+
...keyword_map_object_1.objectKeywordMap,
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Keywords Luq recognises the NAME of but which are not Draft-07. They are
|
|
26
|
+
* listed so that "we did not implement it" and "it is not in this dialect"
|
|
27
|
+
* stay different answers. `$defs` is the one exception that still does
|
|
28
|
+
* something: resolve-ref follows it, because a 2019-09 document's pointers
|
|
29
|
+
* would otherwise dangle.
|
|
30
|
+
*/
|
|
31
|
+
exports.NON_DRAFT07_KEYWORDS = {
|
|
32
|
+
$defs: "2019-09 spelling of `definitions`; resolve-ref follows it anyway",
|
|
33
|
+
$anchor: "2019-09 anchors; resolve-ref resolves JSON Pointers only",
|
|
34
|
+
$dynamicRef: "2020-12 dynamic references",
|
|
35
|
+
$recursiveRef: "2019-09 recursive references",
|
|
36
|
+
dependentRequired: "2019-09 split of `dependencies`; use `dependencies`",
|
|
37
|
+
dependentSchemas: "2019-09 split of `dependencies`; use `dependencies`",
|
|
38
|
+
unevaluatedItems: "2019-09; no annotation-collection model in Luq",
|
|
39
|
+
unevaluatedProperties: "2019-09; no annotation-collection model in Luq",
|
|
40
|
+
contentSchema: "2019-09 companion to contentMediaType",
|
|
41
|
+
deprecated: "2019-09 annotation",
|
|
42
|
+
prefixItems: "2020-12 spelling of the tuple form of `items`",
|
|
43
|
+
};
|
|
44
|
+
function isDraft07Keyword(keyword) {
|
|
45
|
+
return Object.prototype.hasOwnProperty.call(exports.draft07KeywordMap, keyword);
|
|
46
|
+
}
|
|
47
|
+
/** Every keyword the table decides on. No assertion; the guard narrows. */
|
|
48
|
+
function listDraft07Keywords() {
|
|
49
|
+
return Object.keys(exports.draft07KeywordMap).filter(isDraft07Keyword);
|
|
50
|
+
}
|
|
51
|
+
/** `undefined` = not a Draft-07 keyword at all. See NON_DRAFT07_KEYWORDS. */
|
|
52
|
+
function findKeywordHandling(keyword) {
|
|
53
|
+
return isDraft07Keyword(keyword) ? exports.draft07KeywordMap[keyword] : undefined;
|
|
54
|
+
}
|
|
55
|
+
/** Throws for a keyword the table declares out of scope. Never silent. */
|
|
56
|
+
function assertKeywordSupported(keyword) {
|
|
57
|
+
const handling = findKeywordHandling(keyword);
|
|
58
|
+
if (handling === undefined) {
|
|
59
|
+
const note = exports.NON_DRAFT07_KEYWORDS[keyword];
|
|
60
|
+
throw new unsupported_keyword_error_1.UnsupportedKeywordError(keyword, note ?? "not a Draft-07 keyword");
|
|
61
|
+
}
|
|
62
|
+
if (handling.handling === "unsupported") {
|
|
63
|
+
throw new unsupported_keyword_error_1.UnsupportedKeywordError(keyword, handling.reason);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Every plugin the two tables bind, de-duplicated and sorted. Step 26 GENERATES
|
|
68
|
+
* the full-feature bundle's use() list from this, so the bundle cannot name a
|
|
69
|
+
* plugin that is not bound, and cannot omit one that is.
|
|
70
|
+
*/
|
|
71
|
+
function listBoundPluginNames() {
|
|
72
|
+
const names = new Set();
|
|
73
|
+
const handlings = [
|
|
74
|
+
...Object.values(exports.draft07KeywordMap),
|
|
75
|
+
...Object.values(format_map_1.draft07FormatMap),
|
|
76
|
+
];
|
|
77
|
+
for (const handling of handlings) {
|
|
78
|
+
if (handling.handling === "bind")
|
|
79
|
+
names.add(handling.pluginName);
|
|
80
|
+
}
|
|
81
|
+
return [...names].sort();
|
|
82
|
+
}
|
|
83
|
+
/** Counted, never asserted: the published numbers come from this function. */
|
|
84
|
+
function countKeywordHandlings(table) {
|
|
85
|
+
const entries = Object.values(table);
|
|
86
|
+
const countOf = (kind) => entries.filter((handling) => handling.handling === kind).length;
|
|
87
|
+
return {
|
|
88
|
+
bind: countOf("bind"),
|
|
89
|
+
structural: countOf("structural"),
|
|
90
|
+
unsupported: countOf("unsupported"),
|
|
91
|
+
total: entries.length,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { coreKeywordMap } from "./keyword-map-core.mjs";
|
|
2
|
+
import { numberKeywordMap } from "./keyword-map-number.mjs";
|
|
3
|
+
import { stringKeywordMap } from "./keyword-map-string.mjs";
|
|
4
|
+
import { arrayKeywordMap } from "./keyword-map-array.mjs";
|
|
5
|
+
import { objectKeywordMap } from "./keyword-map-object.mjs";
|
|
6
|
+
import { draft07FormatMap } from "./format-map.mjs";
|
|
7
|
+
import { UnsupportedKeywordError } from "./unsupported-keyword-error.mjs";
|
|
8
|
+
export const draft07KeywordMap = {
|
|
9
|
+
...coreKeywordMap,
|
|
10
|
+
...numberKeywordMap,
|
|
11
|
+
...stringKeywordMap,
|
|
12
|
+
...arrayKeywordMap,
|
|
13
|
+
...objectKeywordMap,
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Keywords Luq recognises the NAME of but which are not Draft-07. They are
|
|
17
|
+
* listed so that "we did not implement it" and "it is not in this dialect"
|
|
18
|
+
* stay different answers. `$defs` is the one exception that still does
|
|
19
|
+
* something: resolve-ref follows it, because a 2019-09 document's pointers
|
|
20
|
+
* would otherwise dangle.
|
|
21
|
+
*/
|
|
22
|
+
export const NON_DRAFT07_KEYWORDS = {
|
|
23
|
+
$defs: "2019-09 spelling of `definitions`; resolve-ref follows it anyway",
|
|
24
|
+
$anchor: "2019-09 anchors; resolve-ref resolves JSON Pointers only",
|
|
25
|
+
$dynamicRef: "2020-12 dynamic references",
|
|
26
|
+
$recursiveRef: "2019-09 recursive references",
|
|
27
|
+
dependentRequired: "2019-09 split of `dependencies`; use `dependencies`",
|
|
28
|
+
dependentSchemas: "2019-09 split of `dependencies`; use `dependencies`",
|
|
29
|
+
unevaluatedItems: "2019-09; no annotation-collection model in Luq",
|
|
30
|
+
unevaluatedProperties: "2019-09; no annotation-collection model in Luq",
|
|
31
|
+
contentSchema: "2019-09 companion to contentMediaType",
|
|
32
|
+
deprecated: "2019-09 annotation",
|
|
33
|
+
prefixItems: "2020-12 spelling of the tuple form of `items`",
|
|
34
|
+
};
|
|
35
|
+
export function isDraft07Keyword(keyword) {
|
|
36
|
+
return Object.prototype.hasOwnProperty.call(draft07KeywordMap, keyword);
|
|
37
|
+
}
|
|
38
|
+
/** Every keyword the table decides on. No assertion; the guard narrows. */
|
|
39
|
+
export function listDraft07Keywords() {
|
|
40
|
+
return Object.keys(draft07KeywordMap).filter(isDraft07Keyword);
|
|
41
|
+
}
|
|
42
|
+
/** `undefined` = not a Draft-07 keyword at all. See NON_DRAFT07_KEYWORDS. */
|
|
43
|
+
export function findKeywordHandling(keyword) {
|
|
44
|
+
return isDraft07Keyword(keyword) ? draft07KeywordMap[keyword] : undefined;
|
|
45
|
+
}
|
|
46
|
+
/** Throws for a keyword the table declares out of scope. Never silent. */
|
|
47
|
+
export function assertKeywordSupported(keyword) {
|
|
48
|
+
const handling = findKeywordHandling(keyword);
|
|
49
|
+
if (handling === undefined) {
|
|
50
|
+
const note = NON_DRAFT07_KEYWORDS[keyword];
|
|
51
|
+
throw new UnsupportedKeywordError(keyword, note ?? "not a Draft-07 keyword");
|
|
52
|
+
}
|
|
53
|
+
if (handling.handling === "unsupported") {
|
|
54
|
+
throw new UnsupportedKeywordError(keyword, handling.reason);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Every plugin the two tables bind, de-duplicated and sorted. Step 26 GENERATES
|
|
59
|
+
* the full-feature bundle's use() list from this, so the bundle cannot name a
|
|
60
|
+
* plugin that is not bound, and cannot omit one that is.
|
|
61
|
+
*/
|
|
62
|
+
export function listBoundPluginNames() {
|
|
63
|
+
const names = new Set();
|
|
64
|
+
const handlings = [
|
|
65
|
+
...Object.values(draft07KeywordMap),
|
|
66
|
+
...Object.values(draft07FormatMap),
|
|
67
|
+
];
|
|
68
|
+
for (const handling of handlings) {
|
|
69
|
+
if (handling.handling === "bind")
|
|
70
|
+
names.add(handling.pluginName);
|
|
71
|
+
}
|
|
72
|
+
return [...names].sort();
|
|
73
|
+
}
|
|
74
|
+
/** Counted, never asserted: the published numbers come from this function. */
|
|
75
|
+
export function countKeywordHandlings(table) {
|
|
76
|
+
const entries = Object.values(table);
|
|
77
|
+
const countOf = (kind) => entries.filter((handling) => handling.handling === kind).length;
|
|
78
|
+
return {
|
|
79
|
+
bind: countOf("bind"),
|
|
80
|
+
structural: countOf("structural"),
|
|
81
|
+
unsupported: countOf("unsupported"),
|
|
82
|
+
total: entries.length,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ===========================================================================
|
|
3
|
+
// L8 src/json-schema/ref-resolution-error.ts
|
|
4
|
+
//
|
|
5
|
+
// `$ref` が解けなかったことを表す例外。呼び出し側が **identity で捕まえられる**
|
|
6
|
+
// ことが要件なので、独立したクラスであり、独立したモジュールである
|
|
7
|
+
// (resolve-ref.ts から import すると、その巨大な依存を一緒に引く)。
|
|
8
|
+
// ===========================================================================
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.RefResolutionError = void 0;
|
|
11
|
+
class RefResolutionError extends Error {
|
|
12
|
+
constructor(ref, reason) {
|
|
13
|
+
super(`Cannot resolve $ref "${ref}": ${reason}`);
|
|
14
|
+
this.name = "RefResolutionError";
|
|
15
|
+
this.ref = ref;
|
|
16
|
+
// Without this, `instanceof` fails when the package is compiled to ES5.
|
|
17
|
+
Object.setPrototypeOf(this, RefResolutionError.prototype);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.RefResolutionError = RefResolutionError;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// ===========================================================================
|
|
2
|
+
// L8 src/json-schema/ref-resolution-error.ts
|
|
3
|
+
//
|
|
4
|
+
// `$ref` が解けなかったことを表す例外。呼び出し側が **identity で捕まえられる**
|
|
5
|
+
// ことが要件なので、独立したクラスであり、独立したモジュールである
|
|
6
|
+
// (resolve-ref.ts から import すると、その巨大な依存を一緒に引く)。
|
|
7
|
+
// ===========================================================================
|
|
8
|
+
export class RefResolutionError extends Error {
|
|
9
|
+
constructor(ref, reason) {
|
|
10
|
+
super(`Cannot resolve $ref "${ref}": ${reason}`);
|
|
11
|
+
this.name = "RefResolutionError";
|
|
12
|
+
this.ref = ref;
|
|
13
|
+
// Without this, `instanceof` fails when the package is compiled to ES5.
|
|
14
|
+
Object.setPrototypeOf(this, RefResolutionError.prototype);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Draft07Schema } from "./draft07.types";
|
|
2
|
+
import type { SchemaRegistry } from "./schema-registry";
|
|
3
|
+
export interface RefScope {
|
|
4
|
+
/** The resource a fragment-only reference (`#/definitions/x`) resolves in. */
|
|
5
|
+
readonly document: Draft07Schema;
|
|
6
|
+
/** The base URI in force here, "" for a document that declares no `$id`. */
|
|
7
|
+
readonly baseUri: string;
|
|
8
|
+
/** Everything a URI can name: `$id` bases, anchors, supplied documents. */
|
|
9
|
+
readonly registry: SchemaRegistry;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The scope of a document that declares no `$id` and reaches nothing else.
|
|
13
|
+
* Used by callers that hold a root and nothing more, and by every test that
|
|
14
|
+
* is about pointers rather than about identity.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createLocalScope(root: Draft07Schema): RefScope;
|
|
17
|
+
/** A scope over a root plus the documents the caller already loaded. */
|
|
18
|
+
export declare function createDocumentScope(root: Draft07Schema, externalDocuments: Readonly<Record<string, unknown>>): RefScope;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createLocalScope = createLocalScope;
|
|
4
|
+
exports.createDocumentScope = createDocumentScope;
|
|
5
|
+
const draft07_types_1 = require("./draft07.types");
|
|
6
|
+
const schema_registry_1 = require("./schema-registry");
|
|
7
|
+
const uri_reference_1 = require("./uri-reference");
|
|
8
|
+
/**
|
|
9
|
+
* A document's own `$id` is where its base URI starts. Beginning at "" and
|
|
10
|
+
* ignoring it is how `{"$id":"http://host/a","properties":{"x":{"$ref":"b.json"}}}`
|
|
11
|
+
* ends up looking for a document literally named "b.json".
|
|
12
|
+
*/
|
|
13
|
+
function baseUriOf(root) {
|
|
14
|
+
if (!(0, draft07_types_1.isSchemaObject)(root) || typeof root.$id !== "string")
|
|
15
|
+
return "";
|
|
16
|
+
return (0, uri_reference_1.nextBaseUri)("", root.$id);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The scope of a document that declares no `$id` and reaches nothing else.
|
|
20
|
+
* Used by callers that hold a root and nothing more, and by every test that
|
|
21
|
+
* is about pointers rather than about identity.
|
|
22
|
+
*/
|
|
23
|
+
function createLocalScope(root) {
|
|
24
|
+
return {
|
|
25
|
+
document: root,
|
|
26
|
+
baseUri: baseUriOf(root),
|
|
27
|
+
registry: (0, schema_registry_1.createSchemaRegistry)(root),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/** A scope over a root plus the documents the caller already loaded. */
|
|
31
|
+
function createDocumentScope(root, externalDocuments) {
|
|
32
|
+
return {
|
|
33
|
+
document: root,
|
|
34
|
+
baseUri: baseUriOf(root),
|
|
35
|
+
registry: (0, schema_registry_1.createSchemaRegistry)(root, externalDocuments),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { isSchemaObject } from "./draft07.types.mjs";
|
|
2
|
+
import { createSchemaRegistry } from "./schema-registry.mjs";
|
|
3
|
+
import { nextBaseUri } from "./uri-reference.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* A document's own `$id` is where its base URI starts. Beginning at "" and
|
|
6
|
+
* ignoring it is how `{"$id":"http://host/a","properties":{"x":{"$ref":"b.json"}}}`
|
|
7
|
+
* ends up looking for a document literally named "b.json".
|
|
8
|
+
*/
|
|
9
|
+
function baseUriOf(root) {
|
|
10
|
+
if (!isSchemaObject(root) || typeof root.$id !== "string")
|
|
11
|
+
return "";
|
|
12
|
+
return nextBaseUri("", root.$id);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The scope of a document that declares no `$id` and reaches nothing else.
|
|
16
|
+
* Used by callers that hold a root and nothing more, and by every test that
|
|
17
|
+
* is about pointers rather than about identity.
|
|
18
|
+
*/
|
|
19
|
+
export function createLocalScope(root) {
|
|
20
|
+
return {
|
|
21
|
+
document: root,
|
|
22
|
+
baseUri: baseUriOf(root),
|
|
23
|
+
registry: createSchemaRegistry(root),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** A scope over a root plus the documents the caller already loaded. */
|
|
27
|
+
export function createDocumentScope(root, externalDocuments) {
|
|
28
|
+
return {
|
|
29
|
+
document: root,
|
|
30
|
+
baseUri: baseUriOf(root),
|
|
31
|
+
registry: createSchemaRegistry(root, externalDocuments),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Draft07Schema } from "./draft07.types";
|
|
2
|
+
import type { RefScope } from "./ref-scope";
|
|
3
|
+
/**
|
|
4
|
+
* Resolves `ref` in `scope`, then keeps following `$ref` until it reaches a
|
|
5
|
+
* schema that is not one. `visited` holds the ABSOLUTE URIs already entered on
|
|
6
|
+
* THIS chain, so `a -> b -> a` throws instead of looping forever — absolute,
|
|
7
|
+
* because two different bases can spell the same target differently and a
|
|
8
|
+
* relative comparison would miss the cycle.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveRefInScope(ref: string, scope: RefScope): {
|
|
11
|
+
schema: Draft07Schema;
|
|
12
|
+
scope: RefScope;
|
|
13
|
+
};
|
|
14
|
+
/** The local-only door, kept for callers that have nothing but a root. */
|
|
15
|
+
export declare function resolveRef(ref: string, root: Draft07Schema): Draft07Schema;
|
|
16
|
+
/**
|
|
17
|
+
* True when `ref` resolves without leaving what the caller supplied and
|
|
18
|
+
* without entering a cycle. It answers the question without making the caller
|
|
19
|
+
* catch to find out.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isResolvableRef(ref: string, root: Draft07Schema): boolean;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveRefInScope = resolveRefInScope;
|
|
4
|
+
exports.resolveRef = resolveRef;
|
|
5
|
+
exports.isResolvableRef = isResolvableRef;
|
|
6
|
+
const ref_resolution_error_1 = require("./ref-resolution-error");
|
|
7
|
+
const draft07_types_1 = require("./draft07.types");
|
|
8
|
+
const collect_definitions_1 = require("./collect-definitions");
|
|
9
|
+
const follow_json_pointer_1 = require("./follow-json-pointer");
|
|
10
|
+
const ref_scope_1 = require("./ref-scope");
|
|
11
|
+
const uri_reference_1 = require("./uri-reference");
|
|
12
|
+
/** No legitimate document chains this many `$ref`s. See resolveRef. */
|
|
13
|
+
const MAX_REF_HOPS = 1000;
|
|
14
|
+
function followPointer(ref, fragment, scope) {
|
|
15
|
+
const walked = (0, follow_json_pointer_1.walkPointer)(fragment, scope.document, scope, (at, node) => (0, draft07_types_1.isDraft07Schema)(node) && (0, draft07_types_1.isSchemaObject)(node)
|
|
16
|
+
? (0, collect_definitions_1.advanceBase)(at, node)
|
|
17
|
+
: at, (token) => {
|
|
18
|
+
throw new ref_resolution_error_1.RefResolutionError(ref, `no schema at segment "${token}"`);
|
|
19
|
+
});
|
|
20
|
+
if (!(0, draft07_types_1.isDraft07Schema)(walked.node)) {
|
|
21
|
+
throw new ref_resolution_error_1.RefResolutionError(ref, "the target is not a schema");
|
|
22
|
+
}
|
|
23
|
+
return { schema: walked.node, scope: walked.scope };
|
|
24
|
+
}
|
|
25
|
+
/** True for `#name`: a plain-name fragment, which names rather than locates. */
|
|
26
|
+
function isPlainNameFragment(fragment) {
|
|
27
|
+
return fragment !== "" && !fragment.startsWith("/");
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* One hop. The returned scope's `document` is the RESOURCE the target was
|
|
31
|
+
* found in, never the target itself — otherwise `a -> b` would resolve `b`
|
|
32
|
+
* against the node `a` names, and a two-link chain of local pointers stops
|
|
33
|
+
* finding anything after the first hop.
|
|
34
|
+
*/
|
|
35
|
+
function stepRef(ref, scope) {
|
|
36
|
+
const absolute = (0, uri_reference_1.resolveUriReference)(scope.baseUri, ref);
|
|
37
|
+
const { resource, fragment } = (0, uri_reference_1.splitUri)(absolute);
|
|
38
|
+
if (isPlainNameFragment(fragment)) {
|
|
39
|
+
const named = scope.registry.findIdentified(absolute);
|
|
40
|
+
if (named === undefined) {
|
|
41
|
+
throw new ref_resolution_error_1.RefResolutionError(ref, `no schema is named "${absolute}"`);
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
schema: named.schema,
|
|
45
|
+
scope: {
|
|
46
|
+
registry: scope.registry,
|
|
47
|
+
document: named.document,
|
|
48
|
+
baseUri: named.baseUri,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const target = resolveResource(ref, resource, scope);
|
|
53
|
+
// The RESOURCE's retrieval URI wins over any `$id` the document carries —
|
|
54
|
+
// "retrieved nested refs resolve relative to their URI not $id" in the
|
|
55
|
+
// suite is exactly that. Every `$id` INSIDE it still counts, and
|
|
56
|
+
// followPointer collects them as it walks.
|
|
57
|
+
const landed = {
|
|
58
|
+
registry: scope.registry,
|
|
59
|
+
document: target.document,
|
|
60
|
+
baseUri: target.baseUri,
|
|
61
|
+
};
|
|
62
|
+
return followPointer(ref, fragment, landed);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The DOCUMENT a resource URI names. An empty resource is "the document this
|
|
66
|
+
* reference was written in", which is what makes `#/definitions/x` local.
|
|
67
|
+
*/
|
|
68
|
+
function resolveResource(ref, resource, scope) {
|
|
69
|
+
if (resource === "" || resource === scope.baseUri) {
|
|
70
|
+
return { document: scope.document, baseUri: scope.baseUri };
|
|
71
|
+
}
|
|
72
|
+
const identified = scope.registry.findIdentified(resource);
|
|
73
|
+
if (identified === undefined || !(0, draft07_types_1.isSchemaObject)(identified.document)) {
|
|
74
|
+
// The one place an external reference is refused, and it is refused for
|
|
75
|
+
// ONE reason: nobody handed Luq that document. Luq does not go and get it.
|
|
76
|
+
throw new ref_resolution_error_1.RefResolutionError(ref, `"${resource}" was not supplied. Luq never fetches a schema; pass it ` +
|
|
77
|
+
"in externalDocuments.");
|
|
78
|
+
}
|
|
79
|
+
return { document: identified.document, baseUri: identified.baseUri };
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Resolves `ref` in `scope`, then keeps following `$ref` until it reaches a
|
|
83
|
+
* schema that is not one. `visited` holds the ABSOLUTE URIs already entered on
|
|
84
|
+
* THIS chain, so `a -> b -> a` throws instead of looping forever — absolute,
|
|
85
|
+
* because two different bases can spell the same target differently and a
|
|
86
|
+
* relative comparison would miss the cycle.
|
|
87
|
+
*/
|
|
88
|
+
function resolveRefInScope(ref, scope) {
|
|
89
|
+
const visited = new Set();
|
|
90
|
+
let current = scope;
|
|
91
|
+
let currentRef = ref;
|
|
92
|
+
for (let hop = 0;; hop += 1) {
|
|
93
|
+
// The visited set is the real cycle detector and gives the good message.
|
|
94
|
+
// This bound is the SECOND line: a synchronous infinite loop cannot be
|
|
95
|
+
// interrupted by a test timeout, so a defect in the detector above must
|
|
96
|
+
// still terminate. Measured: removing the visited check without this made
|
|
97
|
+
// the resolver hang the whole test process instead of failing it.
|
|
98
|
+
if (hop > MAX_REF_HOPS) {
|
|
99
|
+
throw new ref_resolution_error_1.RefResolutionError(ref, `more than ${MAX_REF_HOPS} $ref hops`);
|
|
100
|
+
}
|
|
101
|
+
const absolute = (0, uri_reference_1.resolveUriReference)(current.baseUri, currentRef);
|
|
102
|
+
if (visited.has(absolute)) {
|
|
103
|
+
throw new ref_resolution_error_1.RefResolutionError(ref, `circular reference: ${[...visited, absolute].join(" -> ")}`);
|
|
104
|
+
}
|
|
105
|
+
visited.add(absolute);
|
|
106
|
+
const step = stepRef(currentRef, current);
|
|
107
|
+
current = step.scope;
|
|
108
|
+
if (!(0, draft07_types_1.isSchemaObject)(step.schema) || step.schema.$ref === undefined) {
|
|
109
|
+
return { schema: step.schema, scope: current };
|
|
110
|
+
}
|
|
111
|
+
currentRef = step.schema.$ref;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/** The local-only door, kept for callers that have nothing but a root. */
|
|
115
|
+
function resolveRef(ref, root) {
|
|
116
|
+
return resolveRefInScope(ref, (0, ref_scope_1.createLocalScope)(root)).schema;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* True when `ref` resolves without leaving what the caller supplied and
|
|
120
|
+
* without entering a cycle. It answers the question without making the caller
|
|
121
|
+
* catch to find out.
|
|
122
|
+
*/
|
|
123
|
+
function isResolvableRef(ref, root) {
|
|
124
|
+
try {
|
|
125
|
+
resolveRef(ref, root);
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
if (error instanceof ref_resolution_error_1.RefResolutionError)
|
|
130
|
+
return false;
|
|
131
|
+
throw error;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { RefResolutionError } from "./ref-resolution-error.mjs";
|
|
2
|
+
import { isDraft07Schema, isSchemaObject } from "./draft07.types.mjs";
|
|
3
|
+
import { advanceBase } from "./collect-definitions.mjs";
|
|
4
|
+
import { walkPointer } from "./follow-json-pointer.mjs";
|
|
5
|
+
import { createLocalScope } from "./ref-scope.mjs";
|
|
6
|
+
import { resolveUriReference, splitUri } from "./uri-reference.mjs";
|
|
7
|
+
/** No legitimate document chains this many `$ref`s. See resolveRef. */
|
|
8
|
+
const MAX_REF_HOPS = 1000;
|
|
9
|
+
function followPointer(ref, fragment, scope) {
|
|
10
|
+
const walked = walkPointer(fragment, scope.document, scope, (at, node) => isDraft07Schema(node) && isSchemaObject(node)
|
|
11
|
+
? advanceBase(at, node)
|
|
12
|
+
: at, (token) => {
|
|
13
|
+
throw new RefResolutionError(ref, `no schema at segment "${token}"`);
|
|
14
|
+
});
|
|
15
|
+
if (!isDraft07Schema(walked.node)) {
|
|
16
|
+
throw new RefResolutionError(ref, "the target is not a schema");
|
|
17
|
+
}
|
|
18
|
+
return { schema: walked.node, scope: walked.scope };
|
|
19
|
+
}
|
|
20
|
+
/** True for `#name`: a plain-name fragment, which names rather than locates. */
|
|
21
|
+
function isPlainNameFragment(fragment) {
|
|
22
|
+
return fragment !== "" && !fragment.startsWith("/");
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* One hop. The returned scope's `document` is the RESOURCE the target was
|
|
26
|
+
* found in, never the target itself — otherwise `a -> b` would resolve `b`
|
|
27
|
+
* against the node `a` names, and a two-link chain of local pointers stops
|
|
28
|
+
* finding anything after the first hop.
|
|
29
|
+
*/
|
|
30
|
+
function stepRef(ref, scope) {
|
|
31
|
+
const absolute = resolveUriReference(scope.baseUri, ref);
|
|
32
|
+
const { resource, fragment } = splitUri(absolute);
|
|
33
|
+
if (isPlainNameFragment(fragment)) {
|
|
34
|
+
const named = scope.registry.findIdentified(absolute);
|
|
35
|
+
if (named === undefined) {
|
|
36
|
+
throw new RefResolutionError(ref, `no schema is named "${absolute}"`);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
schema: named.schema,
|
|
40
|
+
scope: {
|
|
41
|
+
registry: scope.registry,
|
|
42
|
+
document: named.document,
|
|
43
|
+
baseUri: named.baseUri,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const target = resolveResource(ref, resource, scope);
|
|
48
|
+
// The RESOURCE's retrieval URI wins over any `$id` the document carries —
|
|
49
|
+
// "retrieved nested refs resolve relative to their URI not $id" in the
|
|
50
|
+
// suite is exactly that. Every `$id` INSIDE it still counts, and
|
|
51
|
+
// followPointer collects them as it walks.
|
|
52
|
+
const landed = {
|
|
53
|
+
registry: scope.registry,
|
|
54
|
+
document: target.document,
|
|
55
|
+
baseUri: target.baseUri,
|
|
56
|
+
};
|
|
57
|
+
return followPointer(ref, fragment, landed);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The DOCUMENT a resource URI names. An empty resource is "the document this
|
|
61
|
+
* reference was written in", which is what makes `#/definitions/x` local.
|
|
62
|
+
*/
|
|
63
|
+
function resolveResource(ref, resource, scope) {
|
|
64
|
+
if (resource === "" || resource === scope.baseUri) {
|
|
65
|
+
return { document: scope.document, baseUri: scope.baseUri };
|
|
66
|
+
}
|
|
67
|
+
const identified = scope.registry.findIdentified(resource);
|
|
68
|
+
if (identified === undefined || !isSchemaObject(identified.document)) {
|
|
69
|
+
// The one place an external reference is refused, and it is refused for
|
|
70
|
+
// ONE reason: nobody handed Luq that document. Luq does not go and get it.
|
|
71
|
+
throw new RefResolutionError(ref, `"${resource}" was not supplied. Luq never fetches a schema; pass it ` +
|
|
72
|
+
"in externalDocuments.");
|
|
73
|
+
}
|
|
74
|
+
return { document: identified.document, baseUri: identified.baseUri };
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Resolves `ref` in `scope`, then keeps following `$ref` until it reaches a
|
|
78
|
+
* schema that is not one. `visited` holds the ABSOLUTE URIs already entered on
|
|
79
|
+
* THIS chain, so `a -> b -> a` throws instead of looping forever — absolute,
|
|
80
|
+
* because two different bases can spell the same target differently and a
|
|
81
|
+
* relative comparison would miss the cycle.
|
|
82
|
+
*/
|
|
83
|
+
export function resolveRefInScope(ref, scope) {
|
|
84
|
+
const visited = new Set();
|
|
85
|
+
let current = scope;
|
|
86
|
+
let currentRef = ref;
|
|
87
|
+
for (let hop = 0;; hop += 1) {
|
|
88
|
+
// The visited set is the real cycle detector and gives the good message.
|
|
89
|
+
// This bound is the SECOND line: a synchronous infinite loop cannot be
|
|
90
|
+
// interrupted by a test timeout, so a defect in the detector above must
|
|
91
|
+
// still terminate. Measured: removing the visited check without this made
|
|
92
|
+
// the resolver hang the whole test process instead of failing it.
|
|
93
|
+
if (hop > MAX_REF_HOPS) {
|
|
94
|
+
throw new RefResolutionError(ref, `more than ${MAX_REF_HOPS} $ref hops`);
|
|
95
|
+
}
|
|
96
|
+
const absolute = resolveUriReference(current.baseUri, currentRef);
|
|
97
|
+
if (visited.has(absolute)) {
|
|
98
|
+
throw new RefResolutionError(ref, `circular reference: ${[...visited, absolute].join(" -> ")}`);
|
|
99
|
+
}
|
|
100
|
+
visited.add(absolute);
|
|
101
|
+
const step = stepRef(currentRef, current);
|
|
102
|
+
current = step.scope;
|
|
103
|
+
if (!isSchemaObject(step.schema) || step.schema.$ref === undefined) {
|
|
104
|
+
return { schema: step.schema, scope: current };
|
|
105
|
+
}
|
|
106
|
+
currentRef = step.schema.$ref;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/** The local-only door, kept for callers that have nothing but a root. */
|
|
110
|
+
export function resolveRef(ref, root) {
|
|
111
|
+
return resolveRefInScope(ref, createLocalScope(root)).schema;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* True when `ref` resolves without leaving what the caller supplied and
|
|
115
|
+
* without entering a cycle. It answers the question without making the caller
|
|
116
|
+
* catch to find out.
|
|
117
|
+
*/
|
|
118
|
+
export function isResolvableRef(ref, root) {
|
|
119
|
+
try {
|
|
120
|
+
resolveRef(ref, root);
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
if (error instanceof RefResolutionError)
|
|
125
|
+
return false;
|
|
126
|
+
throw error;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Draft07Schema } from "./draft07.types";
|
|
2
|
+
/**
|
|
3
|
+
* A node the index names, with the base URI in force inside it and the
|
|
4
|
+
* DOCUMENT that base belongs to.
|
|
5
|
+
*
|
|
6
|
+
* The document is not always the node. `$id: "#name"` names a sub-schema
|
|
7
|
+
* without starting a new resource, so a `#/definitions/x` written next to it
|
|
8
|
+
* still has to resolve against the enclosing document — resolving it against
|
|
9
|
+
* the anchored sub-schema instead is how a chain of refs silently stops
|
|
10
|
+
* finding anything after the first hop.
|
|
11
|
+
*/
|
|
12
|
+
export interface RegisteredTarget {
|
|
13
|
+
readonly schema: Draft07Schema;
|
|
14
|
+
readonly baseUri: string;
|
|
15
|
+
readonly document: Draft07Schema;
|
|
16
|
+
}
|
|
17
|
+
export interface SchemaRegistry {
|
|
18
|
+
/** The node this absolute URI NAMES — a document `$id`, or an anchor. */
|
|
19
|
+
findIdentified(uri: string): RegisteredTarget | undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Every `$id` in `root` and in each supplied external document.
|
|
23
|
+
*
|
|
24
|
+
* The external map's KEY is a URI in its own right: the suite (and real
|
|
25
|
+
* callers) fetch `http://host/a.json` into a document that does not repeat its
|
|
26
|
+
* own `$id`, so the key is what a `$ref` will name. A document that DOES carry
|
|
27
|
+
* `$id` registers that too, and the `$id` wins where they disagree — it is the
|
|
28
|
+
* document's own statement about its identity.
|
|
29
|
+
*/
|
|
30
|
+
export declare function createSchemaRegistry(root: Draft07Schema, externalDocuments?: Readonly<Record<string, unknown>>): SchemaRegistry;
|