@warlock.js/seal 4.0.174 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.cjs +8900 -0
- package/cjs/index.cjs.map +1 -0
- package/esm/config.d.mts +47 -0
- package/esm/config.d.mts.map +1 -0
- package/esm/config.mjs +40 -0
- package/esm/config.mjs.map +1 -0
- package/esm/factory/index.d.mts +2 -0
- package/esm/factory/index.mjs +4 -0
- package/esm/factory/validate.d.mts +16 -0
- package/esm/factory/validate.d.mts.map +1 -0
- package/esm/factory/validate.mjs +29 -0
- package/esm/factory/validate.mjs.map +1 -0
- package/esm/factory/validators.d.mts +75 -0
- package/esm/factory/validators.d.mts.map +1 -0
- package/esm/factory/validators.mjs +132 -0
- package/esm/factory/validators.mjs.map +1 -0
- package/esm/helpers/date-helpers.d.mts +19 -0
- package/esm/helpers/date-helpers.d.mts.map +1 -0
- package/esm/helpers/date-helpers.mjs +24 -0
- package/esm/helpers/date-helpers.mjs.map +1 -0
- package/esm/helpers/file.utils.d.mts +12 -0
- package/esm/helpers/file.utils.d.mts.map +1 -0
- package/esm/helpers/file.utils.mjs +33 -0
- package/esm/helpers/file.utils.mjs.map +1 -0
- package/esm/helpers/get-field-value.d.mts +42 -0
- package/esm/helpers/get-field-value.d.mts.map +1 -0
- package/esm/helpers/get-field-value.mjs +45 -0
- package/esm/helpers/get-field-value.mjs.map +1 -0
- package/esm/helpers/index.mjs +7 -0
- package/esm/helpers/is-empty-value.mjs +10 -0
- package/esm/helpers/is-empty-value.mjs.map +1 -0
- package/esm/helpers/path-helpers.d.mts +8 -0
- package/esm/helpers/path-helpers.d.mts.map +1 -0
- package/esm/helpers/path-helpers.mjs +12 -0
- package/esm/helpers/path-helpers.mjs.map +1 -0
- package/esm/helpers/validation-helpers.d.mts +36 -0
- package/esm/helpers/validation-helpers.d.mts.map +1 -0
- package/esm/helpers/validation-helpers.mjs +72 -0
- package/esm/helpers/validation-helpers.mjs.map +1 -0
- package/esm/index.d.mts +96 -0
- package/esm/index.mjs +92 -0
- package/esm/mutators/array-mutators.d.mts +16 -0
- package/esm/mutators/array-mutators.d.mts.map +1 -0
- package/esm/mutators/array-mutators.mjs +40 -0
- package/esm/mutators/array-mutators.mjs.map +1 -0
- package/esm/mutators/date-mutators.d.mts +43 -0
- package/esm/mutators/date-mutators.d.mts.map +1 -0
- package/esm/mutators/date-mutators.mjs +113 -0
- package/esm/mutators/date-mutators.mjs.map +1 -0
- package/esm/mutators/index.mjs +8 -0
- package/esm/mutators/number-mutators.d.mts +26 -0
- package/esm/mutators/number-mutators.d.mts.map +1 -0
- package/esm/mutators/number-mutators.mjs +53 -0
- package/esm/mutators/number-mutators.mjs.map +1 -0
- package/esm/mutators/object-mutators.d.mts +12 -0
- package/esm/mutators/object-mutators.d.mts.map +1 -0
- package/esm/mutators/object-mutators.mjs +37 -0
- package/esm/mutators/object-mutators.mjs.map +1 -0
- package/esm/mutators/scalar-mutators.d.mts +7 -0
- package/esm/mutators/scalar-mutators.d.mts.map +1 -0
- package/esm/mutators/scalar-mutators.mjs +9 -0
- package/esm/mutators/scalar-mutators.mjs.map +1 -0
- package/esm/mutators/string-mutators.d.mts +76 -0
- package/esm/mutators/string-mutators.d.mts.map +1 -0
- package/esm/mutators/string-mutators.mjs +169 -0
- package/esm/mutators/string-mutators.mjs.map +1 -0
- package/esm/plugins/plugin-system.d.mts +71 -0
- package/esm/plugins/plugin-system.d.mts.map +1 -0
- package/esm/plugins/plugin-system.mjs +64 -0
- package/esm/plugins/plugin-system.mjs.map +1 -0
- package/esm/rules/array/array-rules.d.mts +16 -0
- package/esm/rules/array/array-rules.d.mts.map +1 -0
- package/esm/rules/array/array-rules.mjs +41 -0
- package/esm/rules/array/array-rules.mjs.map +1 -0
- package/esm/rules/array/index.mjs +3 -0
- package/esm/rules/color/color-rules.d.mts +34 -0
- package/esm/rules/color/color-rules.d.mts.map +1 -0
- package/esm/rules/color/color-rules.mjs +104 -0
- package/esm/rules/color/color-rules.mjs.map +1 -0
- package/esm/rules/color/index.mjs +3 -0
- package/esm/rules/common/enum.d.mts +30 -0
- package/esm/rules/common/enum.d.mts.map +1 -0
- package/esm/rules/common/enum.mjs +77 -0
- package/esm/rules/common/enum.mjs.map +1 -0
- package/esm/rules/common/equals-field-rules.d.mts +22 -0
- package/esm/rules/common/equals-field-rules.d.mts.map +1 -0
- package/esm/rules/common/equals-field-rules.mjs +42 -0
- package/esm/rules/common/equals-field-rules.mjs.map +1 -0
- package/esm/rules/common/index.mjs +8 -0
- package/esm/rules/common/instanceof.d.mts +16 -0
- package/esm/rules/common/instanceof.d.mts.map +1 -0
- package/esm/rules/common/instanceof.mjs +23 -0
- package/esm/rules/common/instanceof.mjs.map +1 -0
- package/esm/rules/common/literal.d.mts +16 -0
- package/esm/rules/common/literal.d.mts.map +1 -0
- package/esm/rules/common/literal.mjs +29 -0
- package/esm/rules/common/literal.mjs.map +1 -0
- package/esm/rules/common/type-rules.d.mts +42 -0
- package/esm/rules/common/type-rules.d.mts.map +1 -0
- package/esm/rules/common/type-rules.mjs +112 -0
- package/esm/rules/common/type-rules.mjs.map +1 -0
- package/esm/rules/common/unknown-key.d.mts +14 -0
- package/esm/rules/common/unknown-key.d.mts.map +1 -0
- package/esm/rules/common/unknown-key.mjs +25 -0
- package/esm/rules/common/unknown-key.mjs.map +1 -0
- package/esm/rules/conditional/forbidden-if-rules.d.mts +58 -0
- package/esm/rules/conditional/forbidden-if-rules.d.mts.map +1 -0
- package/esm/rules/conditional/forbidden-if-rules.mjs +116 -0
- package/esm/rules/conditional/forbidden-if-rules.mjs.map +1 -0
- package/esm/rules/conditional/index.mjs +12 -0
- package/esm/rules/conditional/present-if-rules.d.mts +49 -0
- package/esm/rules/conditional/present-if-rules.d.mts.map +1 -0
- package/esm/rules/conditional/present-if-rules.mjs +97 -0
- package/esm/rules/conditional/present-if-rules.mjs.map +1 -0
- package/esm/rules/conditional/present-unless-rules.d.mts +15 -0
- package/esm/rules/conditional/present-unless-rules.d.mts.map +1 -0
- package/esm/rules/conditional/present-unless-rules.mjs +30 -0
- package/esm/rules/conditional/present-unless-rules.mjs.map +1 -0
- package/esm/rules/conditional/present-with-rules.d.mts +30 -0
- package/esm/rules/conditional/present-with-rules.d.mts.map +1 -0
- package/esm/rules/conditional/present-with-rules.mjs +75 -0
- package/esm/rules/conditional/present-with-rules.mjs.map +1 -0
- package/esm/rules/conditional/present-without-rules.d.mts +30 -0
- package/esm/rules/conditional/present-without-rules.d.mts.map +1 -0
- package/esm/rules/conditional/present-without-rules.mjs +75 -0
- package/esm/rules/conditional/present-without-rules.mjs.map +1 -0
- package/esm/rules/conditional/required-if-rules.d.mts +81 -0
- package/esm/rules/conditional/required-if-rules.d.mts.map +1 -0
- package/esm/rules/conditional/required-if-rules.mjs +203 -0
- package/esm/rules/conditional/required-if-rules.mjs.map +1 -0
- package/esm/rules/conditional/required-unless-rules.d.mts +15 -0
- package/esm/rules/conditional/required-unless-rules.d.mts.map +1 -0
- package/esm/rules/conditional/required-unless-rules.mjs +31 -0
- package/esm/rules/conditional/required-unless-rules.mjs.map +1 -0
- package/esm/rules/conditional/required-when-rule.d.mts +23 -0
- package/esm/rules/conditional/required-when-rule.d.mts.map +1 -0
- package/esm/rules/conditional/required-when-rule.mjs +32 -0
- package/esm/rules/conditional/required-when-rule.mjs.map +1 -0
- package/esm/rules/conditional/required-with-rules.d.mts +30 -0
- package/esm/rules/conditional/required-with-rules.d.mts.map +1 -0
- package/esm/rules/conditional/required-with-rules.mjs +66 -0
- package/esm/rules/conditional/required-with-rules.mjs.map +1 -0
- package/esm/rules/conditional/required-without-rules.d.mts +30 -0
- package/esm/rules/conditional/required-without-rules.d.mts.map +1 -0
- package/esm/rules/conditional/required-without-rules.mjs +66 -0
- package/esm/rules/conditional/required-without-rules.mjs.map +1 -0
- package/esm/rules/core/equal.d.mts +12 -0
- package/esm/rules/core/equal.d.mts.map +1 -0
- package/esm/rules/core/equal.mjs +22 -0
- package/esm/rules/core/equal.mjs.map +1 -0
- package/esm/rules/core/forbidden.d.mts +10 -0
- package/esm/rules/core/forbidden.d.mts.map +1 -0
- package/esm/rules/core/forbidden.mjs +20 -0
- package/esm/rules/core/forbidden.mjs.map +1 -0
- package/esm/rules/core/index.mjs +7 -0
- package/esm/rules/core/required.d.mts +15 -0
- package/esm/rules/core/required.d.mts.map +1 -0
- package/esm/rules/core/required.mjs +36 -0
- package/esm/rules/core/required.mjs.map +1 -0
- package/esm/rules/core/union.d.mts +13 -0
- package/esm/rules/core/union.d.mts.map +1 -0
- package/esm/rules/core/union.mjs +30 -0
- package/esm/rules/core/union.mjs.map +1 -0
- package/esm/rules/core/when.d.mts +11 -0
- package/esm/rules/core/when.d.mts.map +1 -0
- package/esm/rules/core/when.mjs +36 -0
- package/esm/rules/core/when.mjs.map +1 -0
- package/esm/rules/date/date-comparison-rules.d.mts +29 -0
- package/esm/rules/date/date-comparison-rules.d.mts.map +1 -0
- package/esm/rules/date/date-comparison-rules.mjs +78 -0
- package/esm/rules/date/date-comparison-rules.mjs.map +1 -0
- package/esm/rules/date/date-day-rules.d.mts +25 -0
- package/esm/rules/date/date-day-rules.d.mts.map +1 -0
- package/esm/rules/date/date-day-rules.mjs +61 -0
- package/esm/rules/date/date-day-rules.mjs.map +1 -0
- package/esm/rules/date/date-field-comparison-rules.d.mts +32 -0
- package/esm/rules/date/date-field-comparison-rules.d.mts.map +1 -0
- package/esm/rules/date/date-field-comparison-rules.mjs +81 -0
- package/esm/rules/date/date-field-comparison-rules.mjs.map +1 -0
- package/esm/rules/date/date-period-rules.d.mts +127 -0
- package/esm/rules/date/date-period-rules.d.mts.map +1 -0
- package/esm/rules/date/date-period-rules.mjs +398 -0
- package/esm/rules/date/date-period-rules.mjs.map +1 -0
- package/esm/rules/date/date-relative-rules.d.mts +24 -0
- package/esm/rules/date/date-relative-rules.d.mts.map +1 -0
- package/esm/rules/date/date-relative-rules.mjs +55 -0
- package/esm/rules/date/date-relative-rules.mjs.map +1 -0
- package/esm/rules/date/date-special-rules.d.mts +24 -0
- package/esm/rules/date/date-special-rules.d.mts.map +1 -0
- package/esm/rules/date/date-special-rules.mjs +58 -0
- package/esm/rules/date/date-special-rules.mjs.map +1 -0
- package/esm/rules/date/date.d.mts +97 -0
- package/esm/rules/date/date.d.mts.map +1 -0
- package/esm/rules/date/date.mjs +234 -0
- package/esm/rules/date/date.mjs.map +1 -0
- package/esm/rules/date/index.mjs +9 -0
- package/esm/rules/file/dimensions.d.mts +30 -0
- package/esm/rules/file/dimensions.d.mts.map +1 -0
- package/esm/rules/file/dimensions.mjs +56 -0
- package/esm/rules/file/dimensions.mjs.map +1 -0
- package/esm/rules/file/file-size.d.mts +18 -0
- package/esm/rules/file/file-size.d.mts.map +1 -0
- package/esm/rules/file/file-size.mjs +33 -0
- package/esm/rules/file/file-size.mjs.map +1 -0
- package/esm/rules/file/index.mjs +4 -0
- package/esm/rules/index.mjs +57 -0
- package/esm/rules/length/index.mjs +3 -0
- package/esm/rules/length/length-rules.d.mts +53 -0
- package/esm/rules/length/length-rules.d.mts.map +1 -0
- package/esm/rules/length/length-rules.mjs +98 -0
- package/esm/rules/length/length-rules.mjs.map +1 -0
- package/esm/rules/number/index.mjs +3 -0
- package/esm/rules/number/number-rules.d.mts +69 -0
- package/esm/rules/number/number-rules.d.mts.map +1 -0
- package/esm/rules/number/number-rules.mjs +196 -0
- package/esm/rules/number/number-rules.mjs.map +1 -0
- package/esm/rules/scalar/accepted-rule.mjs +116 -0
- package/esm/rules/scalar/accepted-rule.mjs.map +1 -0
- package/esm/rules/scalar/declined-rule.mjs +116 -0
- package/esm/rules/scalar/declined-rule.mjs.map +1 -0
- package/esm/rules/scalar/index.mjs +4 -0
- package/esm/rules/string/alpha.d.mts +18 -0
- package/esm/rules/string/alpha.d.mts.map +1 -0
- package/esm/rules/string/alpha.mjs +41 -0
- package/esm/rules/string/alpha.mjs.map +1 -0
- package/esm/rules/string/credit-card.d.mts +10 -0
- package/esm/rules/string/credit-card.d.mts.map +1 -0
- package/esm/rules/string/credit-card.mjs +32 -0
- package/esm/rules/string/credit-card.mjs.map +1 -0
- package/esm/rules/string/email.d.mts +10 -0
- package/esm/rules/string/email.d.mts.map +1 -0
- package/esm/rules/string/email.mjs +20 -0
- package/esm/rules/string/email.mjs.map +1 -0
- package/esm/rules/string/id-formats.d.mts +54 -0
- package/esm/rules/string/id-formats.d.mts.map +1 -0
- package/esm/rules/string/id-formats.mjs +104 -0
- package/esm/rules/string/id-formats.mjs.map +1 -0
- package/esm/rules/string/index.mjs +13 -0
- package/esm/rules/string/ip.d.mts +18 -0
- package/esm/rules/string/ip.d.mts.map +1 -0
- package/esm/rules/string/ip.mjs +42 -0
- package/esm/rules/string/ip.mjs.map +1 -0
- package/esm/rules/string/matches.d.mts +12 -0
- package/esm/rules/string/matches.d.mts.map +1 -0
- package/esm/rules/string/matches.mjs +21 -0
- package/esm/rules/string/matches.mjs.map +1 -0
- package/esm/rules/string/pattern.d.mts +12 -0
- package/esm/rules/string/pattern.d.mts.map +1 -0
- package/esm/rules/string/pattern.mjs +20 -0
- package/esm/rules/string/pattern.mjs.map +1 -0
- package/esm/rules/string/string-comparison.d.mts +30 -0
- package/esm/rules/string/string-comparison.d.mts.map +1 -0
- package/esm/rules/string/string-comparison.mjs +56 -0
- package/esm/rules/string/string-comparison.mjs.map +1 -0
- package/esm/rules/string/strong-password-rule.d.mts +18 -0
- package/esm/rules/string/strong-password-rule.d.mts.map +1 -0
- package/esm/rules/string/strong-password-rule.mjs +31 -0
- package/esm/rules/string/strong-password-rule.mjs.map +1 -0
- package/esm/rules/string/url.d.mts +10 -0
- package/esm/rules/string/url.d.mts.map +1 -0
- package/esm/rules/string/url.mjs +23 -0
- package/esm/rules/string/url.mjs.map +1 -0
- package/esm/rules/string/without-whitespace.d.mts +10 -0
- package/esm/rules/string/without-whitespace.d.mts.map +1 -0
- package/esm/rules/string/without-whitespace.mjs +19 -0
- package/esm/rules/string/without-whitespace.mjs.map +1 -0
- package/esm/standard-schema/json-schema.d.mts +65 -0
- package/esm/standard-schema/json-schema.d.mts.map +1 -0
- package/esm/standard-schema/json-schema.mjs +81 -0
- package/esm/standard-schema/json-schema.mjs.map +1 -0
- package/esm/standard-schema/map-result.d.mts +22 -0
- package/esm/standard-schema/map-result.d.mts.map +1 -0
- package/esm/standard-schema/map-result.mjs +26 -0
- package/esm/standard-schema/map-result.mjs.map +1 -0
- package/esm/standard-schema/types.d.mts +96 -0
- package/esm/standard-schema/types.d.mts.map +1 -0
- package/esm/types/conditional-types.d.mts +15 -0
- package/esm/types/conditional-types.d.mts.map +1 -0
- package/esm/types/context-types.d.mts +41 -0
- package/esm/types/context-types.d.mts.map +1 -0
- package/esm/types/data-transformer-types.d.mts +29 -0
- package/esm/types/data-transformer-types.d.mts.map +1 -0
- package/esm/types/date-types.d.mts +12 -0
- package/esm/types/date-types.d.mts.map +1 -0
- package/esm/types/date-types.mjs +17 -0
- package/esm/types/date-types.mjs.map +1 -0
- package/esm/types/file.types.d.mts +8 -0
- package/esm/types/file.types.d.mts.map +1 -0
- package/esm/types/inference-types.d.mts +178 -0
- package/esm/types/inference-types.d.mts.map +1 -0
- package/esm/types/mutator-types.d.mts +27 -0
- package/esm/types/mutator-types.d.mts.map +1 -0
- package/esm/types/result-types.d.mts +16 -0
- package/esm/types/result-types.d.mts.map +1 -0
- package/esm/types/rule-types.d.mts +52 -0
- package/esm/types/rule-types.d.mts.map +1 -0
- package/esm/types/schema-types.d.mts +10 -0
- package/esm/types/schema-types.d.mts.map +1 -0
- package/esm/validators/any-validator.d.mts +33 -0
- package/esm/validators/any-validator.d.mts.map +1 -0
- package/esm/validators/any-validator.mjs +35 -0
- package/esm/validators/any-validator.mjs.map +1 -0
- package/esm/validators/array-validator.d.mts +82 -0
- package/esm/validators/array-validator.d.mts.map +1 -0
- package/esm/validators/array-validator.mjs +176 -0
- package/esm/validators/array-validator.mjs.map +1 -0
- package/esm/validators/base-validator.d.mts +491 -0
- package/esm/validators/base-validator.d.mts.map +1 -0
- package/esm/validators/base-validator.mjs +656 -0
- package/esm/validators/base-validator.mjs.map +1 -0
- package/esm/validators/boolean-validator.d.mts +71 -0
- package/esm/validators/boolean-validator.d.mts.map +1 -0
- package/esm/validators/boolean-validator.mjs +126 -0
- package/esm/validators/boolean-validator.mjs.map +1 -0
- package/esm/validators/computed-validator.d.mts +80 -0
- package/esm/validators/computed-validator.d.mts.map +1 -0
- package/esm/validators/computed-validator.mjs +116 -0
- package/esm/validators/computed-validator.mjs.map +1 -0
- package/esm/validators/date-validator.d.mts +336 -0
- package/esm/validators/date-validator.d.mts.map +1 -0
- package/esm/validators/date-validator.mjs +637 -0
- package/esm/validators/date-validator.mjs.map +1 -0
- package/esm/validators/discriminated-union-validator.d.mts +67 -0
- package/esm/validators/discriminated-union-validator.d.mts.map +1 -0
- package/esm/validators/discriminated-union-validator.mjs +125 -0
- package/esm/validators/discriminated-union-validator.mjs.map +1 -0
- package/esm/validators/float-validator.d.mts +12 -0
- package/esm/validators/float-validator.d.mts.map +1 -0
- package/esm/validators/float-validator.mjs +18 -0
- package/esm/validators/float-validator.mjs.map +1 -0
- package/esm/validators/index.d.mts +22 -0
- package/esm/validators/index.mjs +28 -0
- package/esm/validators/instanceof-validator.d.mts +48 -0
- package/esm/validators/instanceof-validator.d.mts.map +1 -0
- package/esm/validators/instanceof-validator.mjs +63 -0
- package/esm/validators/instanceof-validator.mjs.map +1 -0
- package/esm/validators/int-validator.d.mts +23 -0
- package/esm/validators/int-validator.d.mts.map +1 -0
- package/esm/validators/int-validator.mjs +30 -0
- package/esm/validators/int-validator.mjs.map +1 -0
- package/esm/validators/lazy-validator.d.mts +70 -0
- package/esm/validators/lazy-validator.d.mts.map +1 -0
- package/esm/validators/lazy-validator.mjs +85 -0
- package/esm/validators/lazy-validator.mjs.map +1 -0
- package/esm/validators/literal-validator.d.mts +52 -0
- package/esm/validators/literal-validator.d.mts.map +1 -0
- package/esm/validators/literal-validator.mjs +67 -0
- package/esm/validators/literal-validator.mjs.map +1 -0
- package/esm/validators/managed-validator.d.mts +42 -0
- package/esm/validators/managed-validator.d.mts.map +1 -0
- package/esm/validators/managed-validator.mjs +39 -0
- package/esm/validators/managed-validator.mjs.map +1 -0
- package/esm/validators/methods/equality-conditional-methods.d.mts +90 -0
- package/esm/validators/methods/equality-conditional-methods.d.mts.map +1 -0
- package/esm/validators/methods/equality-conditional-methods.mjs +129 -0
- package/esm/validators/methods/equality-conditional-methods.mjs.map +1 -0
- package/esm/validators/methods/forbidden-methods.d.mts +58 -0
- package/esm/validators/methods/forbidden-methods.d.mts.map +1 -0
- package/esm/validators/methods/forbidden-methods.mjs +131 -0
- package/esm/validators/methods/forbidden-methods.mjs.map +1 -0
- package/esm/validators/methods/present-methods.d.mts +102 -0
- package/esm/validators/methods/present-methods.d.mts.map +1 -0
- package/esm/validators/methods/present-methods.mjs +235 -0
- package/esm/validators/methods/present-methods.mjs.map +1 -0
- package/esm/validators/methods/required-methods.d.mts +193 -0
- package/esm/validators/methods/required-methods.d.mts.map +1 -0
- package/esm/validators/methods/required-methods.mjs +347 -0
- package/esm/validators/methods/required-methods.mjs.map +1 -0
- package/esm/validators/number-validator.d.mts +170 -0
- package/esm/validators/number-validator.d.mts.map +1 -0
- package/esm/validators/number-validator.mjs +303 -0
- package/esm/validators/number-validator.mjs.map +1 -0
- package/esm/validators/numeric-validator.d.mts +19 -0
- package/esm/validators/numeric-validator.d.mts.map +1 -0
- package/esm/validators/numeric-validator.mjs +27 -0
- package/esm/validators/numeric-validator.mjs.map +1 -0
- package/esm/validators/object-validator.d.mts +253 -0
- package/esm/validators/object-validator.d.mts.map +1 -0
- package/esm/validators/object-validator.mjs +440 -0
- package/esm/validators/object-validator.mjs.map +1 -0
- package/esm/validators/primitive-validator.d.mts +74 -0
- package/esm/validators/primitive-validator.d.mts.map +1 -0
- package/esm/validators/primitive-validator.mjs +89 -0
- package/esm/validators/primitive-validator.mjs.map +1 -0
- package/esm/validators/record-validator.d.mts +63 -0
- package/esm/validators/record-validator.d.mts.map +1 -0
- package/esm/validators/record-validator.mjs +111 -0
- package/esm/validators/record-validator.mjs.map +1 -0
- package/esm/validators/scalar-validator.d.mts +97 -0
- package/esm/validators/scalar-validator.d.mts.map +1 -0
- package/esm/validators/scalar-validator.mjs +172 -0
- package/esm/validators/scalar-validator.mjs.map +1 -0
- package/esm/validators/string-validator.d.mts +224 -0
- package/esm/validators/string-validator.d.mts.map +1 -0
- package/esm/validators/string-validator.mjs +443 -0
- package/esm/validators/string-validator.mjs.map +1 -0
- package/esm/validators/tuple-validator.d.mts +66 -0
- package/esm/validators/tuple-validator.d.mts.map +1 -0
- package/esm/validators/tuple-validator.mjs +133 -0
- package/esm/validators/tuple-validator.mjs.map +1 -0
- package/esm/validators/union-validator.d.mts +59 -0
- package/esm/validators/union-validator.d.mts.map +1 -0
- package/esm/validators/union-validator.mjs +66 -0
- package/esm/validators/union-validator.mjs.map +1 -0
- package/llms-full.txt +2175 -0
- package/llms.txt +17 -0
- package/package.json +37 -48
- package/skills/bridge-standard-schema/SKILL.md +138 -0
- package/skills/compose-seal-modifiers/SKILL.md +271 -0
- package/skills/define-structural-shape/SKILL.md +138 -0
- package/skills/define-structural-shape/array-methods.md +78 -0
- package/skills/define-structural-shape/object-methods.md +166 -0
- package/skills/extend-seal-with-plugins/SKILL.md +178 -0
- package/skills/generate-json-schema/SKILL.md +143 -0
- package/skills/handle-seal-errors/SKILL.md +148 -0
- package/skills/overview/SKILL.md +72 -0
- package/skills/pick-seal-primitive/SKILL.md +133 -0
- package/skills/pick-seal-primitive/boolean-methods.md +71 -0
- package/skills/pick-seal-primitive/date-methods.md +175 -0
- package/skills/pick-seal-primitive/number-methods.md +123 -0
- package/skills/pick-seal-primitive/string-methods.md +169 -0
- package/skills/seal-basics/SKILL.md +106 -0
- package/cjs/config.d.ts +0 -48
- package/cjs/config.d.ts.map +0 -1
- package/cjs/config.js +0 -42
- package/cjs/config.js.map +0 -1
- package/cjs/factory/index.d.ts +0 -3
- package/cjs/factory/index.d.ts.map +0 -1
- package/cjs/factory/validate.d.ts +0 -8
- package/cjs/factory/validate.d.ts.map +0 -1
- package/cjs/factory/validate.js +0 -23
- package/cjs/factory/validate.js.map +0 -1
- package/cjs/factory/validators.d.ts +0 -56
- package/cjs/factory/validators.d.ts.map +0 -1
- package/cjs/factory/validators.js +0 -47
- package/cjs/factory/validators.js.map +0 -1
- package/cjs/helpers/date-helpers.d.ts +0 -16
- package/cjs/helpers/date-helpers.d.ts.map +0 -1
- package/cjs/helpers/date-helpers.js +0 -20
- package/cjs/helpers/date-helpers.js.map +0 -1
- package/cjs/helpers/file.utils.d.ts +0 -8
- package/cjs/helpers/file.utils.d.ts.map +0 -1
- package/cjs/helpers/file.utils.js +0 -29
- package/cjs/helpers/file.utils.js.map +0 -1
- package/cjs/helpers/get-field-value.d.ts +0 -37
- package/cjs/helpers/get-field-value.d.ts.map +0 -1
- package/cjs/helpers/get-field-value.js +0 -40
- package/cjs/helpers/get-field-value.js.map +0 -1
- package/cjs/helpers/index.d.ts +0 -6
- package/cjs/helpers/index.d.ts.map +0 -1
- package/cjs/helpers/is-empty-value.d.ts +0 -2
- package/cjs/helpers/is-empty-value.d.ts.map +0 -1
- package/cjs/helpers/is-empty-value.js +0 -3
- package/cjs/helpers/is-empty-value.js.map +0 -1
- package/cjs/helpers/path-helpers.d.ts +0 -5
- package/cjs/helpers/path-helpers.d.ts.map +0 -1
- package/cjs/helpers/path-helpers.js +0 -8
- package/cjs/helpers/path-helpers.js.map +0 -1
- package/cjs/helpers/validation-helpers.d.ts +0 -26
- package/cjs/helpers/validation-helpers.d.ts.map +0 -1
- package/cjs/helpers/validation-helpers.js +0 -74
- package/cjs/helpers/validation-helpers.js.map +0 -1
- package/cjs/index.d.ts +0 -30
- package/cjs/index.d.ts.map +0 -1
- package/cjs/index.js +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/mutators/array-mutators.d.ts +0 -12
- package/cjs/mutators/array-mutators.d.ts.map +0 -1
- package/cjs/mutators/array-mutators.js +0 -37
- package/cjs/mutators/array-mutators.js.map +0 -1
- package/cjs/mutators/date-mutators.d.ts +0 -39
- package/cjs/mutators/date-mutators.d.ts.map +0 -1
- package/cjs/mutators/date-mutators.js +0 -120
- package/cjs/mutators/date-mutators.js.map +0 -1
- package/cjs/mutators/index.d.ts +0 -7
- package/cjs/mutators/index.d.ts.map +0 -1
- package/cjs/mutators/number-mutators.d.ts +0 -22
- package/cjs/mutators/number-mutators.d.ts.map +0 -1
- package/cjs/mutators/number-mutators.js +0 -53
- package/cjs/mutators/number-mutators.js.map +0 -1
- package/cjs/mutators/object-mutators.d.ts +0 -8
- package/cjs/mutators/object-mutators.d.ts.map +0 -1
- package/cjs/mutators/object-mutators.js +0 -48
- package/cjs/mutators/object-mutators.js.map +0 -1
- package/cjs/mutators/scalar-mutators.d.ts +0 -3
- package/cjs/mutators/scalar-mutators.d.ts.map +0 -1
- package/cjs/mutators/scalar-mutators.js +0 -6
- package/cjs/mutators/scalar-mutators.js.map +0 -1
- package/cjs/mutators/string-mutators.d.ts +0 -72
- package/cjs/mutators/string-mutators.d.ts.map +0 -1
- package/cjs/mutators/string-mutators.js +0 -193
- package/cjs/mutators/string-mutators.js.map +0 -1
- package/cjs/plugins/index.d.ts +0 -7
- package/cjs/plugins/index.d.ts.map +0 -1
- package/cjs/plugins/plugin-system.d.ts +0 -71
- package/cjs/plugins/plugin-system.d.ts.map +0 -1
- package/cjs/plugins/plugin-system.js +0 -67
- package/cjs/plugins/plugin-system.js.map +0 -1
- package/cjs/rules/array/array-rules.d.ts +0 -12
- package/cjs/rules/array/array-rules.d.ts.map +0 -1
- package/cjs/rules/array/array-rules.js +0 -45
- package/cjs/rules/array/array-rules.js.map +0 -1
- package/cjs/rules/array/index.d.ts +0 -2
- package/cjs/rules/array/index.d.ts.map +0 -1
- package/cjs/rules/color/color-rules.d.ts +0 -30
- package/cjs/rules/color/color-rules.d.ts.map +0 -1
- package/cjs/rules/color/color-rules.js +0 -120
- package/cjs/rules/color/color-rules.js.map +0 -1
- package/cjs/rules/color/index.d.ts +0 -2
- package/cjs/rules/color/index.d.ts.map +0 -1
- package/cjs/rules/common/enum.d.ts +0 -26
- package/cjs/rules/common/enum.d.ts.map +0 -1
- package/cjs/rules/common/enum.js +0 -69
- package/cjs/rules/common/enum.js.map +0 -1
- package/cjs/rules/common/equals-field-rules.d.ts +0 -18
- package/cjs/rules/common/equals-field-rules.d.ts.map +0 -1
- package/cjs/rules/common/equals-field-rules.js +0 -39
- package/cjs/rules/common/equals-field-rules.js.map +0 -1
- package/cjs/rules/common/index.d.ts +0 -5
- package/cjs/rules/common/index.d.ts.map +0 -1
- package/cjs/rules/common/type-rules.d.ts +0 -38
- package/cjs/rules/common/type-rules.d.ts.map +0 -1
- package/cjs/rules/common/type-rules.js +0 -117
- package/cjs/rules/common/type-rules.js.map +0 -1
- package/cjs/rules/common/unknown-key.d.ts +0 -9
- package/cjs/rules/common/unknown-key.d.ts.map +0 -1
- package/cjs/rules/common/unknown-key.js +0 -17
- package/cjs/rules/common/unknown-key.js.map +0 -1
- package/cjs/rules/conditional/forbidden-if-rules.d.ts +0 -54
- package/cjs/rules/conditional/forbidden-if-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/forbidden-if-rules.js +0 -118
- package/cjs/rules/conditional/forbidden-if-rules.js.map +0 -1
- package/cjs/rules/conditional/index.d.ts +0 -11
- package/cjs/rules/conditional/index.d.ts.map +0 -1
- package/cjs/rules/conditional/present-if-rules.d.ts +0 -45
- package/cjs/rules/conditional/present-if-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-if-rules.js +0 -100
- package/cjs/rules/conditional/present-if-rules.js.map +0 -1
- package/cjs/rules/conditional/present-unless-rules.d.ts +0 -11
- package/cjs/rules/conditional/present-unless-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-unless-rules.js +0 -22
- package/cjs/rules/conditional/present-unless-rules.js.map +0 -1
- package/cjs/rules/conditional/present-with-rules.d.ts +0 -26
- package/cjs/rules/conditional/present-with-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-with-rules.js +0 -70
- package/cjs/rules/conditional/present-with-rules.js.map +0 -1
- package/cjs/rules/conditional/present-without-rules.d.ts +0 -26
- package/cjs/rules/conditional/present-without-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-without-rules.js +0 -70
- package/cjs/rules/conditional/present-without-rules.js.map +0 -1
- package/cjs/rules/conditional/required-if-rules.d.ts +0 -77
- package/cjs/rules/conditional/required-if-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-if-rules.js +0 -205
- package/cjs/rules/conditional/required-if-rules.js.map +0 -1
- package/cjs/rules/conditional/required-unless-rules.d.ts +0 -11
- package/cjs/rules/conditional/required-unless-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-unless-rules.js +0 -22
- package/cjs/rules/conditional/required-unless-rules.js.map +0 -1
- package/cjs/rules/conditional/required-when-rule.d.ts +0 -18
- package/cjs/rules/conditional/required-when-rule.d.ts.map +0 -1
- package/cjs/rules/conditional/required-when-rule.js +0 -26
- package/cjs/rules/conditional/required-when-rule.js.map +0 -1
- package/cjs/rules/conditional/required-with-rules.d.ts +0 -26
- package/cjs/rules/conditional/required-with-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-with-rules.js +0 -64
- package/cjs/rules/conditional/required-with-rules.js.map +0 -1
- package/cjs/rules/conditional/required-without-rules.d.ts +0 -26
- package/cjs/rules/conditional/required-without-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-without-rules.js +0 -64
- package/cjs/rules/conditional/required-without-rules.js.map +0 -1
- package/cjs/rules/core/equal.d.ts +0 -8
- package/cjs/rules/core/equal.d.ts.map +0 -1
- package/cjs/rules/core/equal.js +0 -14
- package/cjs/rules/core/equal.js.map +0 -1
- package/cjs/rules/core/forbidden.d.ts +0 -6
- package/cjs/rules/core/forbidden.d.ts.map +0 -1
- package/cjs/rules/core/forbidden.js +0 -13
- package/cjs/rules/core/forbidden.js.map +0 -1
- package/cjs/rules/core/index.d.ts +0 -6
- package/cjs/rules/core/index.d.ts.map +0 -1
- package/cjs/rules/core/required.d.ts +0 -11
- package/cjs/rules/core/required.d.ts.map +0 -1
- package/cjs/rules/core/required.js +0 -31
- package/cjs/rules/core/required.js.map +0 -1
- package/cjs/rules/core/union.d.ts +0 -9
- package/cjs/rules/core/union.d.ts.map +0 -1
- package/cjs/rules/core/union.js +0 -40
- package/cjs/rules/core/union.js.map +0 -1
- package/cjs/rules/core/when.d.ts +0 -6
- package/cjs/rules/core/when.d.ts.map +0 -1
- package/cjs/rules/core/when.js +0 -40
- package/cjs/rules/core/when.js.map +0 -1
- package/cjs/rules/date/date-comparison-rules.d.ts +0 -25
- package/cjs/rules/date/date-comparison-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-comparison-rules.js +0 -80
- package/cjs/rules/date/date-comparison-rules.js.map +0 -1
- package/cjs/rules/date/date-day-rules.d.ts +0 -21
- package/cjs/rules/date/date-day-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-day-rules.js +0 -68
- package/cjs/rules/date/date-day-rules.js.map +0 -1
- package/cjs/rules/date/date-field-comparison-rules.d.ts +0 -28
- package/cjs/rules/date/date-field-comparison-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-field-comparison-rules.js +0 -94
- package/cjs/rules/date/date-field-comparison-rules.js.map +0 -1
- package/cjs/rules/date/date-period-rules.d.ts +0 -124
- package/cjs/rules/date/date-period-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-period-rules.js +0 -605
- package/cjs/rules/date/date-period-rules.js.map +0 -1
- package/cjs/rules/date/date-relative-rules.d.ts +0 -20
- package/cjs/rules/date/date-relative-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-relative-rules.js +0 -60
- package/cjs/rules/date/date-relative-rules.js.map +0 -1
- package/cjs/rules/date/date-special-rules.d.ts +0 -20
- package/cjs/rules/date/date-special-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-special-rules.js +0 -71
- package/cjs/rules/date/date-special-rules.js.map +0 -1
- package/cjs/rules/date/date.d.ts +0 -93
- package/cjs/rules/date/date.d.ts.map +0 -1
- package/cjs/rules/date/date.js +0 -288
- package/cjs/rules/date/date.js.map +0 -1
- package/cjs/rules/date/index.d.ts +0 -8
- package/cjs/rules/date/index.d.ts.map +0 -1
- package/cjs/rules/file/dimensions.d.ts +0 -26
- package/cjs/rules/file/dimensions.d.ts.map +0 -1
- package/cjs/rules/file/dimensions.js +0 -60
- package/cjs/rules/file/dimensions.js.map +0 -1
- package/cjs/rules/file/file-size.d.ts +0 -14
- package/cjs/rules/file/file-size.d.ts.map +0 -1
- package/cjs/rules/file/file-size.js +0 -30
- package/cjs/rules/file/file-size.js.map +0 -1
- package/cjs/rules/file/index.d.ts +0 -11
- package/cjs/rules/file/index.d.ts.map +0 -1
- package/cjs/rules/index.d.ts +0 -19
- package/cjs/rules/index.d.ts.map +0 -1
- package/cjs/rules/length/index.d.ts +0 -2
- package/cjs/rules/length/index.d.ts.map +0 -1
- package/cjs/rules/length/length-rules.d.ts +0 -49
- package/cjs/rules/length/length-rules.d.ts.map +0 -1
- package/cjs/rules/length/length-rules.js +0 -107
- package/cjs/rules/length/length-rules.js.map +0 -1
- package/cjs/rules/number/index.d.ts +0 -2
- package/cjs/rules/number/index.d.ts.map +0 -1
- package/cjs/rules/number/number-rules.d.ts +0 -65
- package/cjs/rules/number/number-rules.d.ts.map +0 -1
- package/cjs/rules/number/number-rules.js +0 -245
- package/cjs/rules/number/number-rules.js.map +0 -1
- package/cjs/rules/scalar/accepted-rule.d.ts +0 -39
- package/cjs/rules/scalar/accepted-rule.d.ts.map +0 -1
- package/cjs/rules/scalar/accepted-rule.js +0 -117
- package/cjs/rules/scalar/accepted-rule.js.map +0 -1
- package/cjs/rules/scalar/declined-rule.d.ts +0 -39
- package/cjs/rules/scalar/declined-rule.d.ts.map +0 -1
- package/cjs/rules/scalar/declined-rule.js +0 -117
- package/cjs/rules/scalar/declined-rule.js.map +0 -1
- package/cjs/rules/scalar/index.d.ts +0 -3
- package/cjs/rules/scalar/index.d.ts.map +0 -1
- package/cjs/rules/string/alpha.d.ts +0 -14
- package/cjs/rules/string/alpha.d.ts.map +0 -1
- package/cjs/rules/string/alpha.js +0 -39
- package/cjs/rules/string/alpha.js.map +0 -1
- package/cjs/rules/string/credit-card.d.ts +0 -6
- package/cjs/rules/string/credit-card.d.ts.map +0 -1
- package/cjs/rules/string/credit-card.js +0 -31
- package/cjs/rules/string/credit-card.js.map +0 -1
- package/cjs/rules/string/email.d.ts +0 -6
- package/cjs/rules/string/email.d.ts.map +0 -1
- package/cjs/rules/string/email.js +0 -13
- package/cjs/rules/string/email.js.map +0 -1
- package/cjs/rules/string/index.d.ts +0 -17
- package/cjs/rules/string/index.d.ts.map +0 -1
- package/cjs/rules/string/ip.d.ts +0 -14
- package/cjs/rules/string/ip.d.ts.map +0 -1
- package/cjs/rules/string/ip.js +0 -39
- package/cjs/rules/string/ip.js.map +0 -1
- package/cjs/rules/string/matches.d.ts +0 -8
- package/cjs/rules/string/matches.d.ts.map +0 -1
- package/cjs/rules/string/matches.js +0 -15
- package/cjs/rules/string/matches.js.map +0 -1
- package/cjs/rules/string/pattern.d.ts +0 -8
- package/cjs/rules/string/pattern.d.ts.map +0 -1
- package/cjs/rules/string/pattern.js +0 -14
- package/cjs/rules/string/pattern.js.map +0 -1
- package/cjs/rules/string/string-comparison.d.ts +0 -26
- package/cjs/rules/string/string-comparison.d.ts.map +0 -1
- package/cjs/rules/string/string-comparison.js +0 -56
- package/cjs/rules/string/string-comparison.js.map +0 -1
- package/cjs/rules/string/strong-password-rule.d.ts +0 -14
- package/cjs/rules/string/strong-password-rule.d.ts.map +0 -1
- package/cjs/rules/string/strong-password-rule.js +0 -38
- package/cjs/rules/string/strong-password-rule.js.map +0 -1
- package/cjs/rules/string/url.d.ts +0 -6
- package/cjs/rules/string/url.d.ts.map +0 -1
- package/cjs/rules/string/url.js +0 -16
- package/cjs/rules/string/url.js.map +0 -1
- package/cjs/rules/string/without-whitespace.d.ts +0 -6
- package/cjs/rules/string/without-whitespace.d.ts.map +0 -1
- package/cjs/rules/string/without-whitespace.js +0 -13
- package/cjs/rules/string/without-whitespace.js.map +0 -1
- package/cjs/standard-schema/index.d.ts +0 -4
- package/cjs/standard-schema/index.d.ts.map +0 -1
- package/cjs/standard-schema/json-schema.d.ts +0 -61
- package/cjs/standard-schema/json-schema.d.ts.map +0 -1
- package/cjs/standard-schema/json-schema.js +0 -85
- package/cjs/standard-schema/json-schema.js.map +0 -1
- package/cjs/standard-schema/map-result.d.ts +0 -18
- package/cjs/standard-schema/map-result.d.ts.map +0 -1
- package/cjs/standard-schema/map-result.js +0 -27
- package/cjs/standard-schema/map-result.js.map +0 -1
- package/cjs/standard-schema/types.d.ts +0 -93
- package/cjs/standard-schema/types.d.ts.map +0 -1
- package/cjs/types/conditional-types.d.ts +0 -15
- package/cjs/types/conditional-types.d.ts.map +0 -1
- package/cjs/types/context-types.d.ts +0 -47
- package/cjs/types/context-types.d.ts.map +0 -1
- package/cjs/types/data-transformer-types.d.ts +0 -25
- package/cjs/types/data-transformer-types.d.ts.map +0 -1
- package/cjs/types/date-types.d.ts +0 -9
- package/cjs/types/date-types.d.ts.map +0 -1
- package/cjs/types/date-types.js +0 -12
- package/cjs/types/date-types.js.map +0 -1
- package/cjs/types/file.types.d.ts +0 -5
- package/cjs/types/file.types.d.ts.map +0 -1
- package/cjs/types/index.d.ts +0 -11
- package/cjs/types/index.d.ts.map +0 -1
- package/cjs/types/inference-types.d.ts +0 -32
- package/cjs/types/inference-types.d.ts.map +0 -1
- package/cjs/types/mutator-types.d.ts +0 -27
- package/cjs/types/mutator-types.d.ts.map +0 -1
- package/cjs/types/result-types.d.ts +0 -19
- package/cjs/types/result-types.d.ts.map +0 -1
- package/cjs/types/rule-types.d.ts +0 -58
- package/cjs/types/rule-types.d.ts.map +0 -1
- package/cjs/types/schema-types.d.ts +0 -6
- package/cjs/types/schema-types.d.ts.map +0 -1
- package/cjs/validators/any-validator.d.ts +0 -29
- package/cjs/validators/any-validator.d.ts.map +0 -1
- package/cjs/validators/any-validator.js +0 -31
- package/cjs/validators/any-validator.js.map +0 -1
- package/cjs/validators/array-validator.d.ts +0 -72
- package/cjs/validators/array-validator.d.ts.map +0 -1
- package/cjs/validators/array-validator.js +0 -162
- package/cjs/validators/array-validator.js.map +0 -1
- package/cjs/validators/base-validator.d.ts +0 -425
- package/cjs/validators/base-validator.d.ts.map +0 -1
- package/cjs/validators/base-validator.js +0 -637
- package/cjs/validators/base-validator.js.map +0 -1
- package/cjs/validators/boolean-validator.d.ts +0 -67
- package/cjs/validators/boolean-validator.d.ts.map +0 -1
- package/cjs/validators/boolean-validator.js +0 -105
- package/cjs/validators/boolean-validator.js.map +0 -1
- package/cjs/validators/computed-validator.d.ts +0 -75
- package/cjs/validators/computed-validator.d.ts.map +0 -1
- package/cjs/validators/computed-validator.js +0 -124
- package/cjs/validators/computed-validator.js.map +0 -1
- package/cjs/validators/date-validator.d.ts +0 -330
- package/cjs/validators/date-validator.d.ts.map +0 -1
- package/cjs/validators/date-validator.js +0 -614
- package/cjs/validators/date-validator.js.map +0 -1
- package/cjs/validators/float-validator.d.ts +0 -8
- package/cjs/validators/float-validator.d.ts.map +0 -1
- package/cjs/validators/float-validator.js +0 -9
- package/cjs/validators/float-validator.js.map +0 -1
- package/cjs/validators/index.d.ts +0 -31
- package/cjs/validators/index.d.ts.map +0 -1
- package/cjs/validators/int-validator.d.ts +0 -19
- package/cjs/validators/int-validator.d.ts.map +0 -1
- package/cjs/validators/int-validator.js +0 -21
- package/cjs/validators/int-validator.js.map +0 -1
- package/cjs/validators/managed-validator.d.ts +0 -38
- package/cjs/validators/managed-validator.d.ts.map +0 -1
- package/cjs/validators/managed-validator.js +0 -34
- package/cjs/validators/managed-validator.js.map +0 -1
- package/cjs/validators/methods/equality-conditional-methods.d.ts +0 -88
- package/cjs/validators/methods/equality-conditional-methods.d.ts.map +0 -1
- package/cjs/validators/methods/equality-conditional-methods.js +0 -118
- package/cjs/validators/methods/equality-conditional-methods.js.map +0 -1
- package/cjs/validators/methods/forbidden-methods.d.ts +0 -58
- package/cjs/validators/methods/forbidden-methods.d.ts.map +0 -1
- package/cjs/validators/methods/forbidden-methods.js +0 -122
- package/cjs/validators/methods/forbidden-methods.js.map +0 -1
- package/cjs/validators/methods/present-methods.d.ts +0 -102
- package/cjs/validators/methods/present-methods.d.ts.map +0 -1
- package/cjs/validators/methods/present-methods.js +0 -229
- package/cjs/validators/methods/present-methods.js.map +0 -1
- package/cjs/validators/methods/required-methods.d.ts +0 -174
- package/cjs/validators/methods/required-methods.d.ts.map +0 -1
- package/cjs/validators/methods/required-methods.js +0 -246
- package/cjs/validators/methods/required-methods.js.map +0 -1
- package/cjs/validators/number-validator.d.ts +0 -166
- package/cjs/validators/number-validator.d.ts.map +0 -1
- package/cjs/validators/number-validator.js +0 -307
- package/cjs/validators/number-validator.js.map +0 -1
- package/cjs/validators/numeric-validator.d.ts +0 -15
- package/cjs/validators/numeric-validator.d.ts.map +0 -1
- package/cjs/validators/numeric-validator.js +0 -18
- package/cjs/validators/numeric-validator.js.map +0 -1
- package/cjs/validators/object-validator.d.ts +0 -233
- package/cjs/validators/object-validator.d.ts.map +0 -1
- package/cjs/validators/object-validator.js +0 -517
- package/cjs/validators/object-validator.js.map +0 -1
- package/cjs/validators/primitive-validator.d.ts +0 -70
- package/cjs/validators/primitive-validator.d.ts.map +0 -1
- package/cjs/validators/primitive-validator.js +0 -80
- package/cjs/validators/primitive-validator.js.map +0 -1
- package/cjs/validators/record-validator.d.ts +0 -54
- package/cjs/validators/record-validator.d.ts.map +0 -1
- package/cjs/validators/record-validator.js +0 -100
- package/cjs/validators/record-validator.js.map +0 -1
- package/cjs/validators/scalar-validator.d.ts +0 -93
- package/cjs/validators/scalar-validator.d.ts.map +0 -1
- package/cjs/validators/scalar-validator.js +0 -149
- package/cjs/validators/scalar-validator.js.map +0 -1
- package/cjs/validators/string-validator.d.ts +0 -189
- package/cjs/validators/string-validator.d.ts.map +0 -1
- package/cjs/validators/string-validator.js +0 -387
- package/cjs/validators/string-validator.js.map +0 -1
- package/cjs/validators/tuple-validator.d.ts +0 -56
- package/cjs/validators/tuple-validator.d.ts.map +0 -1
- package/cjs/validators/tuple-validator.js +0 -121
- package/cjs/validators/tuple-validator.js.map +0 -1
- package/cjs/validators/union-validator.d.ts +0 -55
- package/cjs/validators/union-validator.d.ts.map +0 -1
- package/cjs/validators/union-validator.js +0 -60
- package/cjs/validators/union-validator.js.map +0 -1
- package/esm/config.d.ts +0 -48
- package/esm/config.d.ts.map +0 -1
- package/esm/config.js +0 -42
- package/esm/config.js.map +0 -1
- package/esm/factory/index.d.ts +0 -3
- package/esm/factory/index.d.ts.map +0 -1
- package/esm/factory/validate.d.ts +0 -8
- package/esm/factory/validate.d.ts.map +0 -1
- package/esm/factory/validate.js +0 -23
- package/esm/factory/validate.js.map +0 -1
- package/esm/factory/validators.d.ts +0 -56
- package/esm/factory/validators.d.ts.map +0 -1
- package/esm/factory/validators.js +0 -47
- package/esm/factory/validators.js.map +0 -1
- package/esm/helpers/date-helpers.d.ts +0 -16
- package/esm/helpers/date-helpers.d.ts.map +0 -1
- package/esm/helpers/date-helpers.js +0 -20
- package/esm/helpers/date-helpers.js.map +0 -1
- package/esm/helpers/file.utils.d.ts +0 -8
- package/esm/helpers/file.utils.d.ts.map +0 -1
- package/esm/helpers/file.utils.js +0 -29
- package/esm/helpers/file.utils.js.map +0 -1
- package/esm/helpers/get-field-value.d.ts +0 -37
- package/esm/helpers/get-field-value.d.ts.map +0 -1
- package/esm/helpers/get-field-value.js +0 -40
- package/esm/helpers/get-field-value.js.map +0 -1
- package/esm/helpers/index.d.ts +0 -6
- package/esm/helpers/index.d.ts.map +0 -1
- package/esm/helpers/is-empty-value.d.ts +0 -2
- package/esm/helpers/is-empty-value.d.ts.map +0 -1
- package/esm/helpers/is-empty-value.js +0 -3
- package/esm/helpers/is-empty-value.js.map +0 -1
- package/esm/helpers/path-helpers.d.ts +0 -5
- package/esm/helpers/path-helpers.d.ts.map +0 -1
- package/esm/helpers/path-helpers.js +0 -8
- package/esm/helpers/path-helpers.js.map +0 -1
- package/esm/helpers/validation-helpers.d.ts +0 -26
- package/esm/helpers/validation-helpers.d.ts.map +0 -1
- package/esm/helpers/validation-helpers.js +0 -74
- package/esm/helpers/validation-helpers.js.map +0 -1
- package/esm/index.d.ts +0 -30
- package/esm/index.d.ts.map +0 -1
- package/esm/index.js +0 -1
- package/esm/index.js.map +0 -1
- package/esm/mutators/array-mutators.d.ts +0 -12
- package/esm/mutators/array-mutators.d.ts.map +0 -1
- package/esm/mutators/array-mutators.js +0 -37
- package/esm/mutators/array-mutators.js.map +0 -1
- package/esm/mutators/date-mutators.d.ts +0 -39
- package/esm/mutators/date-mutators.d.ts.map +0 -1
- package/esm/mutators/date-mutators.js +0 -120
- package/esm/mutators/date-mutators.js.map +0 -1
- package/esm/mutators/index.d.ts +0 -7
- package/esm/mutators/index.d.ts.map +0 -1
- package/esm/mutators/number-mutators.d.ts +0 -22
- package/esm/mutators/number-mutators.d.ts.map +0 -1
- package/esm/mutators/number-mutators.js +0 -53
- package/esm/mutators/number-mutators.js.map +0 -1
- package/esm/mutators/object-mutators.d.ts +0 -8
- package/esm/mutators/object-mutators.d.ts.map +0 -1
- package/esm/mutators/object-mutators.js +0 -48
- package/esm/mutators/object-mutators.js.map +0 -1
- package/esm/mutators/scalar-mutators.d.ts +0 -3
- package/esm/mutators/scalar-mutators.d.ts.map +0 -1
- package/esm/mutators/scalar-mutators.js +0 -6
- package/esm/mutators/scalar-mutators.js.map +0 -1
- package/esm/mutators/string-mutators.d.ts +0 -72
- package/esm/mutators/string-mutators.d.ts.map +0 -1
- package/esm/mutators/string-mutators.js +0 -193
- package/esm/mutators/string-mutators.js.map +0 -1
- package/esm/plugins/index.d.ts +0 -7
- package/esm/plugins/index.d.ts.map +0 -1
- package/esm/plugins/plugin-system.d.ts +0 -71
- package/esm/plugins/plugin-system.d.ts.map +0 -1
- package/esm/plugins/plugin-system.js +0 -67
- package/esm/plugins/plugin-system.js.map +0 -1
- package/esm/rules/array/array-rules.d.ts +0 -12
- package/esm/rules/array/array-rules.d.ts.map +0 -1
- package/esm/rules/array/array-rules.js +0 -45
- package/esm/rules/array/array-rules.js.map +0 -1
- package/esm/rules/array/index.d.ts +0 -2
- package/esm/rules/array/index.d.ts.map +0 -1
- package/esm/rules/color/color-rules.d.ts +0 -30
- package/esm/rules/color/color-rules.d.ts.map +0 -1
- package/esm/rules/color/color-rules.js +0 -120
- package/esm/rules/color/color-rules.js.map +0 -1
- package/esm/rules/color/index.d.ts +0 -2
- package/esm/rules/color/index.d.ts.map +0 -1
- package/esm/rules/common/enum.d.ts +0 -26
- package/esm/rules/common/enum.d.ts.map +0 -1
- package/esm/rules/common/enum.js +0 -69
- package/esm/rules/common/enum.js.map +0 -1
- package/esm/rules/common/equals-field-rules.d.ts +0 -18
- package/esm/rules/common/equals-field-rules.d.ts.map +0 -1
- package/esm/rules/common/equals-field-rules.js +0 -39
- package/esm/rules/common/equals-field-rules.js.map +0 -1
- package/esm/rules/common/index.d.ts +0 -5
- package/esm/rules/common/index.d.ts.map +0 -1
- package/esm/rules/common/type-rules.d.ts +0 -38
- package/esm/rules/common/type-rules.d.ts.map +0 -1
- package/esm/rules/common/type-rules.js +0 -117
- package/esm/rules/common/type-rules.js.map +0 -1
- package/esm/rules/common/unknown-key.d.ts +0 -9
- package/esm/rules/common/unknown-key.d.ts.map +0 -1
- package/esm/rules/common/unknown-key.js +0 -17
- package/esm/rules/common/unknown-key.js.map +0 -1
- package/esm/rules/conditional/forbidden-if-rules.d.ts +0 -54
- package/esm/rules/conditional/forbidden-if-rules.d.ts.map +0 -1
- package/esm/rules/conditional/forbidden-if-rules.js +0 -118
- package/esm/rules/conditional/forbidden-if-rules.js.map +0 -1
- package/esm/rules/conditional/index.d.ts +0 -11
- package/esm/rules/conditional/index.d.ts.map +0 -1
- package/esm/rules/conditional/present-if-rules.d.ts +0 -45
- package/esm/rules/conditional/present-if-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-if-rules.js +0 -100
- package/esm/rules/conditional/present-if-rules.js.map +0 -1
- package/esm/rules/conditional/present-unless-rules.d.ts +0 -11
- package/esm/rules/conditional/present-unless-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-unless-rules.js +0 -22
- package/esm/rules/conditional/present-unless-rules.js.map +0 -1
- package/esm/rules/conditional/present-with-rules.d.ts +0 -26
- package/esm/rules/conditional/present-with-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-with-rules.js +0 -70
- package/esm/rules/conditional/present-with-rules.js.map +0 -1
- package/esm/rules/conditional/present-without-rules.d.ts +0 -26
- package/esm/rules/conditional/present-without-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-without-rules.js +0 -70
- package/esm/rules/conditional/present-without-rules.js.map +0 -1
- package/esm/rules/conditional/required-if-rules.d.ts +0 -77
- package/esm/rules/conditional/required-if-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-if-rules.js +0 -205
- package/esm/rules/conditional/required-if-rules.js.map +0 -1
- package/esm/rules/conditional/required-unless-rules.d.ts +0 -11
- package/esm/rules/conditional/required-unless-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-unless-rules.js +0 -22
- package/esm/rules/conditional/required-unless-rules.js.map +0 -1
- package/esm/rules/conditional/required-when-rule.d.ts +0 -18
- package/esm/rules/conditional/required-when-rule.d.ts.map +0 -1
- package/esm/rules/conditional/required-when-rule.js +0 -26
- package/esm/rules/conditional/required-when-rule.js.map +0 -1
- package/esm/rules/conditional/required-with-rules.d.ts +0 -26
- package/esm/rules/conditional/required-with-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-with-rules.js +0 -64
- package/esm/rules/conditional/required-with-rules.js.map +0 -1
- package/esm/rules/conditional/required-without-rules.d.ts +0 -26
- package/esm/rules/conditional/required-without-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-without-rules.js +0 -64
- package/esm/rules/conditional/required-without-rules.js.map +0 -1
- package/esm/rules/core/equal.d.ts +0 -8
- package/esm/rules/core/equal.d.ts.map +0 -1
- package/esm/rules/core/equal.js +0 -14
- package/esm/rules/core/equal.js.map +0 -1
- package/esm/rules/core/forbidden.d.ts +0 -6
- package/esm/rules/core/forbidden.d.ts.map +0 -1
- package/esm/rules/core/forbidden.js +0 -13
- package/esm/rules/core/forbidden.js.map +0 -1
- package/esm/rules/core/index.d.ts +0 -6
- package/esm/rules/core/index.d.ts.map +0 -1
- package/esm/rules/core/required.d.ts +0 -11
- package/esm/rules/core/required.d.ts.map +0 -1
- package/esm/rules/core/required.js +0 -31
- package/esm/rules/core/required.js.map +0 -1
- package/esm/rules/core/union.d.ts +0 -9
- package/esm/rules/core/union.d.ts.map +0 -1
- package/esm/rules/core/union.js +0 -40
- package/esm/rules/core/union.js.map +0 -1
- package/esm/rules/core/when.d.ts +0 -6
- package/esm/rules/core/when.d.ts.map +0 -1
- package/esm/rules/core/when.js +0 -40
- package/esm/rules/core/when.js.map +0 -1
- package/esm/rules/date/date-comparison-rules.d.ts +0 -25
- package/esm/rules/date/date-comparison-rules.d.ts.map +0 -1
- package/esm/rules/date/date-comparison-rules.js +0 -80
- package/esm/rules/date/date-comparison-rules.js.map +0 -1
- package/esm/rules/date/date-day-rules.d.ts +0 -21
- package/esm/rules/date/date-day-rules.d.ts.map +0 -1
- package/esm/rules/date/date-day-rules.js +0 -68
- package/esm/rules/date/date-day-rules.js.map +0 -1
- package/esm/rules/date/date-field-comparison-rules.d.ts +0 -28
- package/esm/rules/date/date-field-comparison-rules.d.ts.map +0 -1
- package/esm/rules/date/date-field-comparison-rules.js +0 -94
- package/esm/rules/date/date-field-comparison-rules.js.map +0 -1
- package/esm/rules/date/date-period-rules.d.ts +0 -124
- package/esm/rules/date/date-period-rules.d.ts.map +0 -1
- package/esm/rules/date/date-period-rules.js +0 -605
- package/esm/rules/date/date-period-rules.js.map +0 -1
- package/esm/rules/date/date-relative-rules.d.ts +0 -20
- package/esm/rules/date/date-relative-rules.d.ts.map +0 -1
- package/esm/rules/date/date-relative-rules.js +0 -60
- package/esm/rules/date/date-relative-rules.js.map +0 -1
- package/esm/rules/date/date-special-rules.d.ts +0 -20
- package/esm/rules/date/date-special-rules.d.ts.map +0 -1
- package/esm/rules/date/date-special-rules.js +0 -71
- package/esm/rules/date/date-special-rules.js.map +0 -1
- package/esm/rules/date/date.d.ts +0 -93
- package/esm/rules/date/date.d.ts.map +0 -1
- package/esm/rules/date/date.js +0 -288
- package/esm/rules/date/date.js.map +0 -1
- package/esm/rules/date/index.d.ts +0 -8
- package/esm/rules/date/index.d.ts.map +0 -1
- package/esm/rules/file/dimensions.d.ts +0 -26
- package/esm/rules/file/dimensions.d.ts.map +0 -1
- package/esm/rules/file/dimensions.js +0 -60
- package/esm/rules/file/dimensions.js.map +0 -1
- package/esm/rules/file/file-size.d.ts +0 -14
- package/esm/rules/file/file-size.d.ts.map +0 -1
- package/esm/rules/file/file-size.js +0 -30
- package/esm/rules/file/file-size.js.map +0 -1
- package/esm/rules/file/index.d.ts +0 -11
- package/esm/rules/file/index.d.ts.map +0 -1
- package/esm/rules/index.d.ts +0 -19
- package/esm/rules/index.d.ts.map +0 -1
- package/esm/rules/length/index.d.ts +0 -2
- package/esm/rules/length/index.d.ts.map +0 -1
- package/esm/rules/length/length-rules.d.ts +0 -49
- package/esm/rules/length/length-rules.d.ts.map +0 -1
- package/esm/rules/length/length-rules.js +0 -107
- package/esm/rules/length/length-rules.js.map +0 -1
- package/esm/rules/number/index.d.ts +0 -2
- package/esm/rules/number/index.d.ts.map +0 -1
- package/esm/rules/number/number-rules.d.ts +0 -65
- package/esm/rules/number/number-rules.d.ts.map +0 -1
- package/esm/rules/number/number-rules.js +0 -245
- package/esm/rules/number/number-rules.js.map +0 -1
- package/esm/rules/scalar/accepted-rule.d.ts +0 -39
- package/esm/rules/scalar/accepted-rule.d.ts.map +0 -1
- package/esm/rules/scalar/accepted-rule.js +0 -117
- package/esm/rules/scalar/accepted-rule.js.map +0 -1
- package/esm/rules/scalar/declined-rule.d.ts +0 -39
- package/esm/rules/scalar/declined-rule.d.ts.map +0 -1
- package/esm/rules/scalar/declined-rule.js +0 -117
- package/esm/rules/scalar/declined-rule.js.map +0 -1
- package/esm/rules/scalar/index.d.ts +0 -3
- package/esm/rules/scalar/index.d.ts.map +0 -1
- package/esm/rules/string/alpha.d.ts +0 -14
- package/esm/rules/string/alpha.d.ts.map +0 -1
- package/esm/rules/string/alpha.js +0 -39
- package/esm/rules/string/alpha.js.map +0 -1
- package/esm/rules/string/credit-card.d.ts +0 -6
- package/esm/rules/string/credit-card.d.ts.map +0 -1
- package/esm/rules/string/credit-card.js +0 -31
- package/esm/rules/string/credit-card.js.map +0 -1
- package/esm/rules/string/email.d.ts +0 -6
- package/esm/rules/string/email.d.ts.map +0 -1
- package/esm/rules/string/email.js +0 -13
- package/esm/rules/string/email.js.map +0 -1
- package/esm/rules/string/index.d.ts +0 -17
- package/esm/rules/string/index.d.ts.map +0 -1
- package/esm/rules/string/ip.d.ts +0 -14
- package/esm/rules/string/ip.d.ts.map +0 -1
- package/esm/rules/string/ip.js +0 -39
- package/esm/rules/string/ip.js.map +0 -1
- package/esm/rules/string/matches.d.ts +0 -8
- package/esm/rules/string/matches.d.ts.map +0 -1
- package/esm/rules/string/matches.js +0 -15
- package/esm/rules/string/matches.js.map +0 -1
- package/esm/rules/string/pattern.d.ts +0 -8
- package/esm/rules/string/pattern.d.ts.map +0 -1
- package/esm/rules/string/pattern.js +0 -14
- package/esm/rules/string/pattern.js.map +0 -1
- package/esm/rules/string/string-comparison.d.ts +0 -26
- package/esm/rules/string/string-comparison.d.ts.map +0 -1
- package/esm/rules/string/string-comparison.js +0 -56
- package/esm/rules/string/string-comparison.js.map +0 -1
- package/esm/rules/string/strong-password-rule.d.ts +0 -14
- package/esm/rules/string/strong-password-rule.d.ts.map +0 -1
- package/esm/rules/string/strong-password-rule.js +0 -38
- package/esm/rules/string/strong-password-rule.js.map +0 -1
- package/esm/rules/string/url.d.ts +0 -6
- package/esm/rules/string/url.d.ts.map +0 -1
- package/esm/rules/string/url.js +0 -16
- package/esm/rules/string/url.js.map +0 -1
- package/esm/rules/string/without-whitespace.d.ts +0 -6
- package/esm/rules/string/without-whitespace.d.ts.map +0 -1
- package/esm/rules/string/without-whitespace.js +0 -13
- package/esm/rules/string/without-whitespace.js.map +0 -1
- package/esm/standard-schema/index.d.ts +0 -4
- package/esm/standard-schema/index.d.ts.map +0 -1
- package/esm/standard-schema/json-schema.d.ts +0 -61
- package/esm/standard-schema/json-schema.d.ts.map +0 -1
- package/esm/standard-schema/json-schema.js +0 -85
- package/esm/standard-schema/json-schema.js.map +0 -1
- package/esm/standard-schema/map-result.d.ts +0 -18
- package/esm/standard-schema/map-result.d.ts.map +0 -1
- package/esm/standard-schema/map-result.js +0 -27
- package/esm/standard-schema/map-result.js.map +0 -1
- package/esm/standard-schema/types.d.ts +0 -93
- package/esm/standard-schema/types.d.ts.map +0 -1
- package/esm/types/conditional-types.d.ts +0 -15
- package/esm/types/conditional-types.d.ts.map +0 -1
- package/esm/types/context-types.d.ts +0 -47
- package/esm/types/context-types.d.ts.map +0 -1
- package/esm/types/data-transformer-types.d.ts +0 -25
- package/esm/types/data-transformer-types.d.ts.map +0 -1
- package/esm/types/date-types.d.ts +0 -9
- package/esm/types/date-types.d.ts.map +0 -1
- package/esm/types/date-types.js +0 -12
- package/esm/types/date-types.js.map +0 -1
- package/esm/types/file.types.d.ts +0 -5
- package/esm/types/file.types.d.ts.map +0 -1
- package/esm/types/index.d.ts +0 -11
- package/esm/types/index.d.ts.map +0 -1
- package/esm/types/inference-types.d.ts +0 -32
- package/esm/types/inference-types.d.ts.map +0 -1
- package/esm/types/mutator-types.d.ts +0 -27
- package/esm/types/mutator-types.d.ts.map +0 -1
- package/esm/types/result-types.d.ts +0 -19
- package/esm/types/result-types.d.ts.map +0 -1
- package/esm/types/rule-types.d.ts +0 -58
- package/esm/types/rule-types.d.ts.map +0 -1
- package/esm/types/schema-types.d.ts +0 -6
- package/esm/types/schema-types.d.ts.map +0 -1
- package/esm/validators/any-validator.d.ts +0 -29
- package/esm/validators/any-validator.d.ts.map +0 -1
- package/esm/validators/any-validator.js +0 -31
- package/esm/validators/any-validator.js.map +0 -1
- package/esm/validators/array-validator.d.ts +0 -72
- package/esm/validators/array-validator.d.ts.map +0 -1
- package/esm/validators/array-validator.js +0 -162
- package/esm/validators/array-validator.js.map +0 -1
- package/esm/validators/base-validator.d.ts +0 -425
- package/esm/validators/base-validator.d.ts.map +0 -1
- package/esm/validators/base-validator.js +0 -637
- package/esm/validators/base-validator.js.map +0 -1
- package/esm/validators/boolean-validator.d.ts +0 -67
- package/esm/validators/boolean-validator.d.ts.map +0 -1
- package/esm/validators/boolean-validator.js +0 -105
- package/esm/validators/boolean-validator.js.map +0 -1
- package/esm/validators/computed-validator.d.ts +0 -75
- package/esm/validators/computed-validator.d.ts.map +0 -1
- package/esm/validators/computed-validator.js +0 -124
- package/esm/validators/computed-validator.js.map +0 -1
- package/esm/validators/date-validator.d.ts +0 -330
- package/esm/validators/date-validator.d.ts.map +0 -1
- package/esm/validators/date-validator.js +0 -614
- package/esm/validators/date-validator.js.map +0 -1
- package/esm/validators/float-validator.d.ts +0 -8
- package/esm/validators/float-validator.d.ts.map +0 -1
- package/esm/validators/float-validator.js +0 -9
- package/esm/validators/float-validator.js.map +0 -1
- package/esm/validators/index.d.ts +0 -31
- package/esm/validators/index.d.ts.map +0 -1
- package/esm/validators/int-validator.d.ts +0 -19
- package/esm/validators/int-validator.d.ts.map +0 -1
- package/esm/validators/int-validator.js +0 -21
- package/esm/validators/int-validator.js.map +0 -1
- package/esm/validators/managed-validator.d.ts +0 -38
- package/esm/validators/managed-validator.d.ts.map +0 -1
- package/esm/validators/managed-validator.js +0 -34
- package/esm/validators/managed-validator.js.map +0 -1
- package/esm/validators/methods/equality-conditional-methods.d.ts +0 -88
- package/esm/validators/methods/equality-conditional-methods.d.ts.map +0 -1
- package/esm/validators/methods/equality-conditional-methods.js +0 -118
- package/esm/validators/methods/equality-conditional-methods.js.map +0 -1
- package/esm/validators/methods/forbidden-methods.d.ts +0 -58
- package/esm/validators/methods/forbidden-methods.d.ts.map +0 -1
- package/esm/validators/methods/forbidden-methods.js +0 -122
- package/esm/validators/methods/forbidden-methods.js.map +0 -1
- package/esm/validators/methods/present-methods.d.ts +0 -102
- package/esm/validators/methods/present-methods.d.ts.map +0 -1
- package/esm/validators/methods/present-methods.js +0 -229
- package/esm/validators/methods/present-methods.js.map +0 -1
- package/esm/validators/methods/required-methods.d.ts +0 -174
- package/esm/validators/methods/required-methods.d.ts.map +0 -1
- package/esm/validators/methods/required-methods.js +0 -246
- package/esm/validators/methods/required-methods.js.map +0 -1
- package/esm/validators/number-validator.d.ts +0 -166
- package/esm/validators/number-validator.d.ts.map +0 -1
- package/esm/validators/number-validator.js +0 -307
- package/esm/validators/number-validator.js.map +0 -1
- package/esm/validators/numeric-validator.d.ts +0 -15
- package/esm/validators/numeric-validator.d.ts.map +0 -1
- package/esm/validators/numeric-validator.js +0 -18
- package/esm/validators/numeric-validator.js.map +0 -1
- package/esm/validators/object-validator.d.ts +0 -233
- package/esm/validators/object-validator.d.ts.map +0 -1
- package/esm/validators/object-validator.js +0 -517
- package/esm/validators/object-validator.js.map +0 -1
- package/esm/validators/primitive-validator.d.ts +0 -70
- package/esm/validators/primitive-validator.d.ts.map +0 -1
- package/esm/validators/primitive-validator.js +0 -80
- package/esm/validators/primitive-validator.js.map +0 -1
- package/esm/validators/record-validator.d.ts +0 -54
- package/esm/validators/record-validator.d.ts.map +0 -1
- package/esm/validators/record-validator.js +0 -100
- package/esm/validators/record-validator.js.map +0 -1
- package/esm/validators/scalar-validator.d.ts +0 -93
- package/esm/validators/scalar-validator.d.ts.map +0 -1
- package/esm/validators/scalar-validator.js +0 -149
- package/esm/validators/scalar-validator.js.map +0 -1
- package/esm/validators/string-validator.d.ts +0 -189
- package/esm/validators/string-validator.d.ts.map +0 -1
- package/esm/validators/string-validator.js +0 -387
- package/esm/validators/string-validator.js.map +0 -1
- package/esm/validators/tuple-validator.d.ts +0 -56
- package/esm/validators/tuple-validator.d.ts.map +0 -1
- package/esm/validators/tuple-validator.js +0 -121
- package/esm/validators/tuple-validator.js.map +0 -1
- package/esm/validators/union-validator.d.ts +0 -55
- package/esm/validators/union-validator.d.ts.map +0 -1
- package/esm/validators/union-validator.js +0 -60
- package/esm/validators/union-validator.js.map +0 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generate-json-schema
|
|
3
|
+
description: 'Generate JSON Schema via `schema.toJsonSchema(target)` — `draft-2020-12` / `draft-07` / `openapi-3.0` / `openai-strict`. Triggers: `toJsonSchema`, `JsonSchemaTarget`, `draft-2020-12`, `draft-07`, `openapi-3.0`, `openai-strict`, `response_format`, `additionalProperties`, `nullable`; "how do I generate JSON Schema from seal", "OpenAI structured outputs from schema", "OpenAPI 3.0 nullable", "json_schema strict mode"; typical import `import { v } from "@warlock.js/seal"`. Skip: foundations — `@warlock.js/seal/seal-basics/SKILL.md`; bridge typing — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing libs `zod-to-json-schema`, `ajv`, `@anatine/zod-openapi`.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# JSON Schema generation
|
|
7
|
+
|
|
8
|
+
Every seal validator exposes `toJsonSchema(target)`. The result is a plain object — pass it straight to OpenAI's `response_format`, an OpenAPI spec, a UI form builder, or anywhere else JSON Schema is the contract.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
const userSchema = v.object({
|
|
12
|
+
email: v.string().email(),
|
|
13
|
+
age: v.int().min(13).optional(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
userSchema.toJsonSchema("draft-2020-12");
|
|
17
|
+
// {
|
|
18
|
+
// type: "object",
|
|
19
|
+
// properties: {
|
|
20
|
+
// email: { type: "string", format: "email" },
|
|
21
|
+
// age: { type: "integer", minimum: 13 },
|
|
22
|
+
// },
|
|
23
|
+
// required: ["email"],
|
|
24
|
+
// additionalProperties: false,
|
|
25
|
+
// }
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## The four targets
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
type JsonSchemaTarget =
|
|
32
|
+
| "draft-2020-12" // default — modern JSON Schema
|
|
33
|
+
| "draft-07" // older tooling, Swagger 2.0
|
|
34
|
+
| "openapi-3.0" // uses { nullable: true } instead of type unions
|
|
35
|
+
| "openai-strict" // OpenAI Structured Outputs strict mode
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Pick by consumer:
|
|
39
|
+
|
|
40
|
+
| Consumer | Target |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| Modern tooling, no specific reason otherwise | `"draft-2020-12"` |
|
|
43
|
+
| Swagger 2.0 / older OpenAPI / older form builders | `"draft-07"` |
|
|
44
|
+
| OpenAPI 3.0 spec (uses `nullable: true`) | `"openapi-3.0"` |
|
|
45
|
+
| OpenAI `response_format: { type: "json_schema", strict: true }` | `"openai-strict"` |
|
|
46
|
+
|
|
47
|
+
## OpenAI structured outputs (`openai-strict`)
|
|
48
|
+
|
|
49
|
+
This target encodes the quirks of OpenAI's strict mode:
|
|
50
|
+
|
|
51
|
+
- **Every field listed in `required`** — strict mode forbids leaving fields out.
|
|
52
|
+
- **Optional fields encoded as `type: ["T", "null"]`** instead of being omitted from `required`.
|
|
53
|
+
- **`additionalProperties: false` on every object.**
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
const schema = v.object({
|
|
57
|
+
reply: v.string(),
|
|
58
|
+
citations: v.array(v.string()).optional(),
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
schema.toJsonSchema("openai-strict");
|
|
62
|
+
// {
|
|
63
|
+
// type: "object",
|
|
64
|
+
// properties: {
|
|
65
|
+
// reply: { type: "string" },
|
|
66
|
+
// citations: { type: ["array", "null"], items: { type: "string" } },
|
|
67
|
+
// },
|
|
68
|
+
// required: ["reply", "citations"], // every field listed
|
|
69
|
+
// additionalProperties: false,
|
|
70
|
+
// }
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Hand to OpenAI:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import OpenAI from "openai";
|
|
77
|
+
|
|
78
|
+
const completion = await openai.chat.completions.create({
|
|
79
|
+
model: "gpt-4o",
|
|
80
|
+
messages: [...],
|
|
81
|
+
response_format: {
|
|
82
|
+
type: "json_schema",
|
|
83
|
+
json_schema: {
|
|
84
|
+
name: "user_reply",
|
|
85
|
+
strict: true,
|
|
86
|
+
schema: schema.toJsonSchema("openai-strict"),
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
In `@warlock.js/ai`, this happens automatically when you set `output: schema` on a supervisor / agent — the runtime picks `openai-strict` for OpenAI providers. You only call `toJsonSchema()` directly when integrating with a non-warlock OpenAI usage.
|
|
93
|
+
|
|
94
|
+
## OpenAPI 3.0 nullable
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
v.string().nullable().toJsonSchema("openapi-3.0");
|
|
98
|
+
// { type: "string", nullable: true }
|
|
99
|
+
|
|
100
|
+
v.string().nullable().toJsonSchema("draft-2020-12");
|
|
101
|
+
// { type: ["string", "null"] }
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
OpenAPI 3.0 uses the boolean `nullable` keyword instead of a type union. Use this target when generating a `paths.openapi.yaml` consumed by Swagger UI or codegen tools.
|
|
105
|
+
|
|
106
|
+
## What's representable
|
|
107
|
+
|
|
108
|
+
Cleanly mapped:
|
|
109
|
+
|
|
110
|
+
- `v.string()` — `{ type: "string" }` (with `format: email/url/uuid`, `pattern`, `minLength`, `maxLength`, `enum`)
|
|
111
|
+
- `v.int()` / `v.float()` — `{ type: "integer" | "number" }` (with `minimum`, `maximum`, `multipleOf`)
|
|
112
|
+
- `v.boolean()` — `{ type: "boolean" }`
|
|
113
|
+
- `v.date()` — `{ type: "string", format: "date-time" | "date" | "time" }` (format derived from transformer if applicable)
|
|
114
|
+
- `v.literal(values)` — `{ const: value }` (single) or `{ enum: [...] }` (multiple)
|
|
115
|
+
- `v.array(item)` — `{ type: "array", items: ... }` (with `minItems`, `maxItems` from length rules; `.unique()`/`.sorted()` are runtime-only and not emitted)
|
|
116
|
+
- `v.object({...})` — `{ type: "object", properties, required, additionalProperties }`
|
|
117
|
+
- `v.union([...])` — `{ oneOf: [...] }`
|
|
118
|
+
- `v.tuple([...])` — `{ type: "array", prefixItems: [...] }` (draft-2020-12) or `{ type: "array", items: [...] }` (draft-07)
|
|
119
|
+
- `v.nullable()` — type union or `nullable: true` per target
|
|
120
|
+
|
|
121
|
+
## What's silently dropped
|
|
122
|
+
|
|
123
|
+
Some seal constructs have no JSON Schema representation:
|
|
124
|
+
|
|
125
|
+
- **Cross-field rules** (`sameAs`, `requiredIf`, `requiredWith`, etc.) — runtime-only. The generated schema describes the *shape*, not the inter-field invariants.
|
|
126
|
+
- **Transformers and mutators** — output reshaping doesn't appear in the schema; the schema reflects *post-mutator, pre-transformer* shape (since that's what rules see and what the LLM is asked to produce for `openai-strict`).
|
|
127
|
+
- **`v.computed` / `v.managed`** — **skipped** entirely by the parent `v.object`; they never appear in `properties`. They aren't part of the data contract. (Calling `.toJsonSchema()` directly on one throws — the parent object is responsible for skipping them.)
|
|
128
|
+
- **`v.instanceof(Ctor)`** — produces `{}`. Class identity isn't expressible. For `File`, attach `{ type: "string", format: "binary" }` manually after generation if needed for OpenAPI.
|
|
129
|
+
- **`v.any()`** — produces `{}` deliberately (any value is valid).
|
|
130
|
+
|
|
131
|
+
Boolean rules `accepted` / `declined` and similar coercion-style rules are also dropped — JSON Schema doesn't have a notion of "yes/no/on/off" beyond `enum`.
|
|
132
|
+
|
|
133
|
+
## When the generated schema rejects valid data
|
|
134
|
+
|
|
135
|
+
If the schema validator itself accepts data but the *generated* JSON Schema rejects the same data downstream, the cause is usually one of:
|
|
136
|
+
|
|
137
|
+
- **Cross-field rule.** The generated schema doesn't enforce it, but a separate consumer might. (Or the runtime check fired at a different stage.)
|
|
138
|
+
- **Transformer running on the wrong side.** The schema describes the input shape (or strict-mode normalized form). If your transformer reshapes `Date` to ISO string for `data`, the *input* still needs to be a Date-parseable thing.
|
|
139
|
+
- **`openai-strict` quirk.** Optional fields show as `["T", "null"]` rather than omitted — if the model omits them entirely (without sending `null`), strict mode fails. The fix is on the prompt side: tell the model to send `null` for unused fields.
|
|
140
|
+
|
|
141
|
+
## Cost note
|
|
142
|
+
|
|
143
|
+
Generating JSON Schema is cheap (pure-function tree walk), so don't worry about caching the result for schemas that change at startup. For dynamic schemas built per-request, generate per-request — there's no shared mutable state.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: handle-seal-errors
|
|
3
|
+
description: 'Read `ValidationResult` — `isValid`, `errors[]`, `data`. Branch on `error.type`, customize messages, hook translation. Triggers: `ValidationResult`, `ValidationError`, `validate`, `isValid`, `errors`, `data`, `error.type`, `error.input`, `error.error`, `translationParams`, `.attribute`, `SealConfig`; "how to read seal errors", "branch on a specific rule failure", "customize validation error message", "translate seal error", "surface validation errors as 422"; typical import `import { validate, v } from "@warlock.js/seal"`. Skip: modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; structural shapes — `@warlock.js/seal/define-structural-shape/SKILL.md`; competing libs `zod` `.safeParse`, `yup` `ValidationError`, `joi`.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# `ValidationResult` — reading errors
|
|
7
|
+
|
|
8
|
+
`validate(schema, data)` never throws. It returns a `ValidationResult`:
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
type ValidationResult = {
|
|
12
|
+
isValid: boolean;
|
|
13
|
+
data: any; // shape after mutators + transformers (the validated value)
|
|
14
|
+
errors: ValidationError[];
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type ValidationError = {
|
|
18
|
+
type: string; // rule type that failed — "required", "email", "min", "string", ...
|
|
19
|
+
error: string; // resolved message (translated, with attribute substitution)
|
|
20
|
+
input: string; // input field name — "email" or "address.city"
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Branch on `isValid` first; reach for `errors[]` only when you need to act on a specific failure.
|
|
25
|
+
|
|
26
|
+
## Basic flow
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { validate, v } from "@warlock.js/seal";
|
|
30
|
+
|
|
31
|
+
const schema = v.object({
|
|
32
|
+
email: v.string().email(),
|
|
33
|
+
age: v.int().min(13).optional(),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const result = await validate(schema, input);
|
|
37
|
+
|
|
38
|
+
if (result.isValid) {
|
|
39
|
+
return result.data; // typed as the inferred shape (post-transformer)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
status: 422,
|
|
44
|
+
body: { errors: result.errors },
|
|
45
|
+
};
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Branching on a specific rule
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
const result = await validate(schema, input);
|
|
52
|
+
|
|
53
|
+
if (!result.isValid) {
|
|
54
|
+
const emailMissing = result.errors.find(
|
|
55
|
+
e => e.input === "email" && e.type === "required",
|
|
56
|
+
);
|
|
57
|
+
if (emailMissing) {
|
|
58
|
+
return { redirect: "/signup", reason: "no email" };
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const ageInvalid = result.errors.find(
|
|
62
|
+
e => e.input === "age" && (e.type === "int" || e.type === "min"),
|
|
63
|
+
);
|
|
64
|
+
if (ageInvalid) {
|
|
65
|
+
return { error: "Age must be 13 or older" };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The `type` field is the **stable** identifier — the message is human-facing and may be localized. Branch on `type`, never on the message string.
|
|
71
|
+
|
|
72
|
+
## Common rule type names
|
|
73
|
+
|
|
74
|
+
These are the strings you'll see in `error.type`:
|
|
75
|
+
|
|
76
|
+
The `type` is the rule's own `name` field — not the method you called. Several methods map to one shared rule name (e.g. `.min()` / `.minLength()` on a string both surface as `minLength`; `.sameAs()` surfaces as `equalsField`). The table below lists the actual `type` strings:
|
|
77
|
+
|
|
78
|
+
| Type | Produced by |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| `required`, `present` | `.required()`, `.present()` (note: `.optional()` has no error type — it clears the required rule) |
|
|
81
|
+
| `requiredIf`, `requiredWith`, `requiredWithout`, `requiredUnless` | conditional required methods |
|
|
82
|
+
| `string`, `number`, `int`, `float`, `boolean`, `scalar`, `object`, `array`, `date` | type guards from `matchesType` |
|
|
83
|
+
| `minLength`, `maxLength`, `betweenLength`, `length` | string / array length rules (`.min`/`.max` on a string alias to `minLength`/`maxLength`) |
|
|
84
|
+
| `min`, `max`, `betweenNumbers` | number range rules (`.min`/`.max`/`.between` on a number) |
|
|
85
|
+
| `email`, `url`, `uuid`, `pattern`, `matches` | string format rules (`.pattern()` → `pattern`) |
|
|
86
|
+
| `literal`, `enum`, `in`, `allowedValues`, `notAllowedValues` | value-membership rules (`.oneOf` aliases `in`; `.notIn`/`.forbids` → `notAllowedValues`; `.allowsOnly` → `allowedValues`) |
|
|
87
|
+
| `instanceof` | `v.instanceof(Ctor)` |
|
|
88
|
+
| `equalsField`, `notEqualsField` | cross-field equality (`.sameAs` → `equalsField`; `.differentFrom` → `notEqualsField`) |
|
|
89
|
+
| `minDate`, `maxDate`, `beforeField`, `afterField`, `today`, `past`, `future`, `weekDay`, `weekend`, `businessDay`, `birthday` | date rules (`.min`/`.max` → `minDate`/`maxDate`; `.before`/`.after` → `beforeField`/`afterField`) |
|
|
90
|
+
|
|
91
|
+
If you write custom rules, the `type` name you set on the rule object is what shows up here. Pick stable, kebab-or-camel-case names — they become a public API.
|
|
92
|
+
|
|
93
|
+
## Customizing error messages
|
|
94
|
+
|
|
95
|
+
Two layers:
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
v.string().email("Please enter a valid email address").required("Email is required");
|
|
99
|
+
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
|
|
100
|
+
// per-rule override per-rule override
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Each chain method takes an optional `errorMessage` as its last argument. That overrides the rule's `defaultErrorMessage`. Use it when a single rule needs a tailored message in a specific schema.
|
|
104
|
+
|
|
105
|
+
For project-wide message overrides, hook into the translation layer (the framework calls `resolveTranslation` with the rule context — wire up your own `t()` function via `SealConfig`).
|
|
106
|
+
|
|
107
|
+
## Translation params
|
|
108
|
+
|
|
109
|
+
Rules can stash dynamic substitution params on the context. The default messages reference them:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
"The :input must be at least :min characters"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`:input` is the field name (or its translated display name); `:min` and others come from rule-specific metadata. If you need to render the message yourself in a custom UI, the params are available on the rule's context.
|
|
116
|
+
|
|
117
|
+
For attribute display names ("email" → "Email Address"), use `.attributes({ email: "Email Address" })` on the parent `v.object` or pass via the `validate()` options. The `:input` placeholder picks up the configured display name.
|
|
118
|
+
|
|
119
|
+
## When to throw
|
|
120
|
+
|
|
121
|
+
Don't wrap `validate()` in try/catch for *validation* failures — those land in `result.errors`. The only thing that *throws* is a programming bug:
|
|
122
|
+
|
|
123
|
+
- A rule's callback threw (e.g. you wrote `async validate() { throw new Error(...) }`).
|
|
124
|
+
- A transformer threw on output.
|
|
125
|
+
- A mutator threw on input.
|
|
126
|
+
|
|
127
|
+
Those are bugs — fix them. Don't try/catch them in app code as a way to handle bad input.
|
|
128
|
+
|
|
129
|
+
## At the framework boundary
|
|
130
|
+
|
|
131
|
+
If you're surfacing seal errors through HTTP / RPC, the typical shape is:
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
if (!result.isValid) {
|
|
135
|
+
return reply.code(422).send({
|
|
136
|
+
error: "validation_failed",
|
|
137
|
+
fields: result.errors.map(e => ({
|
|
138
|
+
field: e.input,
|
|
139
|
+
type: e.type,
|
|
140
|
+
message: e.error,
|
|
141
|
+
})),
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Avoid leaking `result.data` back to the client when rejecting — it might contain transformed sensitive fields.
|
|
147
|
+
|
|
148
|
+
For server-side logs, log `errors[]` with the field paths and rule types; redact values unless you're certain the field isn't sensitive. The `@warlock.js/logger` redaction layer is the right place to enforce that.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: overview
|
|
3
|
+
description: 'Front-door orientation for `@warlock.js/seal` — framework-agnostic, type-safe validation. The `v` factory builds schemas, `validate(schema, data)` runs them, `Infer<typeof schema>` extracts the type. Primitives, structural shapes (object/array/record/tuple/union/discriminatedUnion/lazy), modifiers, mutators, a plugin system, JSON-Schema export, and a Standard Schema bridge. TRIGGER when: code imports `v`, `validate`, or `Infer` from `@warlock.js/seal`; user asks "what does @warlock.js/seal do", "validation library for Warlock", "compare seal with zod / yup / valibot", "infer a type from a schema", "JSON schema from a validator", "Standard Schema interop"; package.json adds `@warlock.js/seal`. Skip: specific task already known — load the matching task skill directly (`seal-basics`, `pick-seal-primitive`, `define-structural-shape`, `compose-seal-modifiers`, `handle-seal-errors`, `generate-json-schema`, `bridge-standard-schema`, `extend-seal-with-plugins`); framework-specific validators (FileValidator, database rules) live in `@warlock.js/core/v`, not here.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# `@warlock.js/seal` — overview
|
|
7
|
+
|
|
8
|
+
A type-safe, framework-agnostic validation library. You build a schema with the `v` factory, run it with `validate(schema, data)`, and pull the static type out with `Infer<typeof schema>`. One schema is the runtime check *and* the TypeScript type *and* (optionally) a JSON Schema.
|
|
9
|
+
|
|
10
|
+
Standalone — no framework required. Ships built-in with `@warlock.js/core`, which adds framework-specific validators (file uploads, database existence/uniqueness rules) on top.
|
|
11
|
+
|
|
12
|
+
## When to reach for it
|
|
13
|
+
|
|
14
|
+
- You want a single source of truth for a shape — runtime validation, the TS type, and JSON Schema all from one declaration.
|
|
15
|
+
- You'd reach for **zod** / **yup** / **valibot** but want the library the rest of Warlock already speaks (request validation, AI tool inputs, Cascade model schemas).
|
|
16
|
+
- You need **JSON Schema output** for OpenAI structured outputs or an OpenAPI spec.
|
|
17
|
+
|
|
18
|
+
Skip if you only need framework-bound validators (file uploads, DB rules) — those live in `@warlock.js/core/v`, which extends this package.
|
|
19
|
+
|
|
20
|
+
## The mental model in one paragraph
|
|
21
|
+
|
|
22
|
+
`v` is a builder: `v.string()`, `v.int()`, `v.object({...})`, `v.array(...)`, and so on, chained with modifiers (`.optional()`, `.nullable()`, `.default(...)`, `.min(...)`). `validate(schema, data)` returns a `ValidationResult` with `isValid`, `data` (the validated value), and `errors[]`. `Infer<typeof schema>` gives you the static type (with `Infer.Input` / `Infer.Output` distinguishing pre- and post-transform shapes). Because every schema implements Standard Schema, it slots into any `StandardSchemaV1<T>` consumer — and `schema.toJsonSchema(target)` emits JSON Schema for external tools.
|
|
23
|
+
|
|
24
|
+
## Skills index
|
|
25
|
+
|
|
26
|
+
Eight task skills. Most schemas only need `seal-basics` + `pick-seal-primitive` + `define-structural-shape`.
|
|
27
|
+
|
|
28
|
+
### Foundations
|
|
29
|
+
|
|
30
|
+
#### [`seal-basics/`](../seal-basics/SKILL.md)
|
|
31
|
+
Start here. The `v` factory, `validate(schema, data)`, and `Infer<typeof schema>`.
|
|
32
|
+
|
|
33
|
+
### Building schemas
|
|
34
|
+
|
|
35
|
+
#### [`pick-seal-primitive/`](../pick-seal-primitive/SKILL.md)
|
|
36
|
+
Choose the right primitive — `string` / `int` / `literal` / `date` / `enum` / `computed` / `managed` / `instanceof` / `any`. Covers the close calls (`string` vs `scalar`, `int` vs `number`, `literal` vs `enum`).
|
|
37
|
+
|
|
38
|
+
#### [`define-structural-shape/`](../define-structural-shape/SKILL.md)
|
|
39
|
+
Compose `v.object` / `v.array` / `v.record` / `v.tuple` / `v.union` / `v.discriminatedUnion` / `v.lazy` — object schemas, dynamic-keyed records, tagged unions, recursive shapes.
|
|
40
|
+
|
|
41
|
+
#### [`compose-seal-modifiers/`](../compose-seal-modifiers/SKILL.md)
|
|
42
|
+
Cross-cutting modifiers — `.optional` / `.nullable` / `.default` / `.catch` / `.omit` / membership rules — plus the mutator-vs-transformer pipeline and `Infer.Input` vs `Infer.Output`.
|
|
43
|
+
|
|
44
|
+
### Output + interop
|
|
45
|
+
|
|
46
|
+
#### [`handle-seal-errors/`](../handle-seal-errors/SKILL.md)
|
|
47
|
+
Read a `ValidationResult` — `isValid`, `errors[]`, `data`. Branch on `error.type`, customize messages, hook translation.
|
|
48
|
+
|
|
49
|
+
#### [`generate-json-schema/`](../generate-json-schema/SKILL.md)
|
|
50
|
+
`schema.toJsonSchema(target)` — draft-2020-12 / draft-07 / openapi-3.0 / openai-strict. For OpenAI structured outputs, OpenAPI specs, any JSON-Schema consumer.
|
|
51
|
+
|
|
52
|
+
#### [`bridge-standard-schema/`](../bridge-standard-schema/SKILL.md)
|
|
53
|
+
Standard Schema interop — why a `StandardSchemaV1<T>` slot might reject a schema, the phantom-intersection at the `v` factory return, Cascade `Model<TSchema>` variance. For migrating off `as unknown as` casts.
|
|
54
|
+
|
|
55
|
+
#### [`extend-seal-with-plugins/`](../extend-seal-with-plugins/SKILL.md)
|
|
56
|
+
Author a plugin to add validator methods (`.slug`, `.postalCode`, …) — the `SealPlugin` shape, `registerPlugin` lifecycle, TS prototype augmentation.
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
|
|
60
|
+
`configureSeal({ ... })` sets global behavior (translation hooks, first-error-only mode); `getSealConfig()` reads it; `resetSealConfig()` clears it. Most apps call `configureSeal` once at boot to wire i18n.
|
|
61
|
+
|
|
62
|
+
## What this package deliberately doesn't do
|
|
63
|
+
|
|
64
|
+
- **Framework-bound validation.** File-upload and database (exists/unique) rules live in `@warlock.js/core/v`, which builds on this package.
|
|
65
|
+
- **Coercion by default.** Seal validates the shape you declare; reshaping is explicit via mutators/transformers, not silent coercion.
|
|
66
|
+
- **Async-everywhere.** `validate()` is async to support rules that need it, but the core primitives are synchronous checks.
|
|
67
|
+
|
|
68
|
+
## See also
|
|
69
|
+
|
|
70
|
+
- [`@warlock.js/cascade`](../../cascade/skills/overview/SKILL.md) — uses seal schemas as `Model.schema`.
|
|
71
|
+
- [`@warlock.js/core`](../../core/skills/overview/SKILL.md) — re-exports `v` (aliased) and adds framework validators in `core/v`.
|
|
72
|
+
- [`mongez-agent-kit-authoring-skills`](../../../../domains/shared/skills/) (load via agent-kit sync) — how this becomes `.claude/skills/warlock-js-seal-overview/`.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pick-seal-primitive
|
|
3
|
+
description: 'Pick the right `v` factory primitive — string / int / literal / date / enum / computed / managed / instanceof / any. Triggers: `v.string`, `v.email`, `v.number`, `v.int`, `v.float`, `v.numeric`, `v.boolean`, `v.scalar`, `v.date`, `v.literal`, `v.enum`, `v.instanceof`, `v.computed`, `v.managed`, `v.any`; "v.string vs v.scalar", "v.literal vs v.enum", "v.date vs v.instanceof(Date)", "what is v.computed"; typical import `import { v } from "@warlock.js/seal"`. Skip: structural shapes — `@warlock.js/seal/define-structural-shape/SKILL.md`; modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; competing libs `zod`, `valibot`, `yup`.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Picking the right primitive
|
|
7
|
+
|
|
8
|
+
This is the orientation skill — *which* primitive for *which* job. For the chainable methods on each (`.email()`, `.min()`, `.between()`, etc.), load the matching `*-methods.md` reference file in this skill folder.
|
|
9
|
+
|
|
10
|
+
## Strings
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
v.string() // type: string — full surface in string-methods.md
|
|
14
|
+
v.email() // shorthand for v.string().email()
|
|
15
|
+
v.enum(["a", "b"]) // type: "a" | "b" — runs as v.string().oneOf, but the factory overload preserves the literal union
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Reach for `v.string()` for any text input. `v.email()` is just sugar — switch back to `v.string().email().min(...)` when you need extra rules.
|
|
19
|
+
|
|
20
|
+
## Numbers — pick by what you accept
|
|
21
|
+
|
|
22
|
+
| Validator | Accepts | When |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `v.number()` | any finite number | accepts both integers and floats |
|
|
25
|
+
| `v.int()` | integers only | rejects `1.5` |
|
|
26
|
+
| `v.float()` | finite, non-integer | rejects `1` |
|
|
27
|
+
| `v.numeric()` | numeric strings + numbers | form/query inputs that arrive as `"42"` — coerces to number |
|
|
28
|
+
|
|
29
|
+
All four share the same chain surface (see [`number-methods.md`](./number-methods.md)). Picking is about input acceptance, not chain power.
|
|
30
|
+
|
|
31
|
+
## Booleans & scalars
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
v.boolean() // type: boolean — adds .accepted() / .declined() for form-style inputs
|
|
35
|
+
v.scalar() // type: string | number | boolean — usually a smell pointing at a missing discriminator
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Use `v.scalar()` only when the field truly accepts any of the three primitives. If it's "one of N specific values across types", `v.literal(...)` is cleaner.
|
|
39
|
+
|
|
40
|
+
## Dates
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
v.date() // type: Date — normalizes strings/timestamps to Date, rich rule surface
|
|
44
|
+
v.instanceof(Date) // type: Date — raw instanceof, no normalization, no rules
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`v.date()` is the right tool 99% of the time — it ships `.min/.max/.before/.after/.weekDay/.minAge/...` and a built-in mutator that parses strings. `v.instanceof(Date)` is the escape hatch when you specifically need strict instance identity with zero coercion.
|
|
48
|
+
|
|
49
|
+
## Literals & instances
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
v.literal("items") // type: "items"
|
|
53
|
+
v.literal("draft", "published", "archived") // type: "draft" | "published" | "archived"
|
|
54
|
+
v.literal(1, 2, 3) // type: 1 | 2 | 3
|
|
55
|
+
v.literal(true) // type: true
|
|
56
|
+
|
|
57
|
+
v.instanceof(File) // type: File
|
|
58
|
+
v.instanceof(Buffer) // type: Buffer
|
|
59
|
+
v.instanceof(MyClass) // type: MyClass
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**`v.literal` vs `v.string().oneOf([...])` vs `v.enum([...])`:**
|
|
63
|
+
|
|
64
|
+
- `v.literal("a", "b")` infers as `"a" | "b"` (literal narrowing). **Use this for discriminator fields.**
|
|
65
|
+
- `v.string().oneOf(["a", "b"])` infers as `string` (loses literal types). Use when broad type is fine.
|
|
66
|
+
- `v.enum(["a", "b"])` runs the same `oneOf` rule at runtime (it builds a `StringValidator().oneOf(...)`), but the `v.enum` factory overload **preserves the literal union** — it infers `"a" | "b"`, not `string`. Pass a TS enum object (`v.enum(Direction)`) and it uses `Object.values`, inferring `Direction[keyof Direction]`.
|
|
67
|
+
|
|
68
|
+
`v.instanceof(Ctor)` for File/Buffer/Uint8Array/custom classes. Returns `{}` from `toJsonSchema()` (not representable). For OpenAPI `File`, attach `{ type: "string", format: "binary" }` manually after generation.
|
|
69
|
+
|
|
70
|
+
## `v.any` — escape hatch
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
v.any() // type: any — skips validation entirely
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Reach for it when you genuinely don't care about the shape. Usually a smell — search PRs for it and ask whether a real schema would catch a class of bugs.
|
|
77
|
+
|
|
78
|
+
## Derived: `v.computed` and `v.managed`
|
|
79
|
+
|
|
80
|
+
These two **don't validate input** — they produce a value as part of validation.
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
v.object({
|
|
84
|
+
firstName: v.string(),
|
|
85
|
+
lastName: v.string(),
|
|
86
|
+
fullName: v.computed<string>((data) => `${data.firstName} ${data.lastName}`),
|
|
87
|
+
createdAt: v.managed<Date>(() => new Date()),
|
|
88
|
+
createdBy: v.managed<string>((context) => context.context?.userId),
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
- **`v.computed`** runs after sibling validation; callback signature is `(data, context)` — `data` is the validated sibling object. Use for derived values (full name, hash of fields, computed totals). An optional second arg validates the result: `v.computed<string>(cb, v.string().min(3))`.
|
|
93
|
+
- **`v.managed`** runs from `SchemaContext` only — callback signature is `(context)`. Caller-supplied extras passed to `validate(schema, data, { context })` land on `context.context`. Use for framework-injected values — timestamps, current user, request id. The callback is optional (`v.managed()`) for values the framework injects without a generator.
|
|
94
|
+
|
|
95
|
+
Both are **skipped** when their parent `v.object` generates JSON Schema — they never appear in `properties`, since they're runtime-only and not part of the JSON contract an LLM or external API consumer reads. Calling `.toJsonSchema()` *directly* on a `v.computed` / `v.managed` validator **throws** (it's a programming error — let the parent object skip them).
|
|
96
|
+
|
|
97
|
+
## Quick map — "I need to validate…"
|
|
98
|
+
|
|
99
|
+
| Need | Reach for |
|
|
100
|
+
|---|---|
|
|
101
|
+
| Email | `v.string().email()` or `v.email()` |
|
|
102
|
+
| URL | `v.string().url()` |
|
|
103
|
+
| UUID | `v.string().uuid()` (see [`string-methods.md`](./string-methods.md)) |
|
|
104
|
+
| Number 0–100 | `v.number().between(0, 100)` |
|
|
105
|
+
| Positive integer | `v.int().positive()` |
|
|
106
|
+
| One of N constants | `v.literal(...values)` |
|
|
107
|
+
| One of TS enum values | `v.enum(MyEnum)` |
|
|
108
|
+
| Date in the past | `v.date().past()` |
|
|
109
|
+
| File upload | `v.instanceof(File)` |
|
|
110
|
+
| Class instance (not Date) | `v.instanceof(Ctor)` |
|
|
111
|
+
| Discriminated union | see [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md) |
|
|
112
|
+
| Derived value (computed from siblings) | `v.computed<T>(callback)` |
|
|
113
|
+
| Framework-injected value | `v.managed<T>(callback)` |
|
|
114
|
+
| Free-form / pass-through | `v.any()` (only when you've thought about it) |
|
|
115
|
+
|
|
116
|
+
## Method-surface reference
|
|
117
|
+
|
|
118
|
+
Each primitive's full method list lives in a sibling file:
|
|
119
|
+
|
|
120
|
+
- [`string-methods.md`](./string-methods.md) — `.email` / `.url` / `.uuid` / `.pattern` / `.startsWith` / `.alpha` / `.trim` / `.slug` / `.mask` / `.base64Encode` / …
|
|
121
|
+
- [`number-methods.md`](./number-methods.md) — `.min` / `.max` / `.between` / `.greaterThan` / `.positive` / `.even` / `.multipleOf` / `.minSibling` / `.round` / …
|
|
122
|
+
- [`date-methods.md`](./date-methods.md) — `.min` / `.before` / `.after` / `.today` / `.past` / `.future` / `.weekDay` / `.minAge` / `.year` / `.quarter` / `.toISOString` / …
|
|
123
|
+
- [`boolean-methods.md`](./boolean-methods.md) — `.accepted` / `.declined` / `.mustBeTrue` / `.mustBeFalse` / `.acceptedIf` / `.declinedWithout` / …
|
|
124
|
+
|
|
125
|
+
For cross-cutting modifiers (`.optional`/`.nullable`/`.default`/`.catch`/`.in`/`.oneOf`), see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md). For containers (object/array/record/tuple/union), see [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md).
|
|
126
|
+
|
|
127
|
+
## Things NOT to do
|
|
128
|
+
|
|
129
|
+
- Don't `new ObjectValidator()` (or any class) directly — factory returns carry the StandardSchema bridge that bare instantiation loses.
|
|
130
|
+
- Don't pick `v.scalar` because "it's flexible". Flexibility at this layer usually means a missing discriminator — try `v.literal` or `v.union` first.
|
|
131
|
+
- Don't reach for `v.instanceof(Date)` when `v.date()` works. The latter is purpose-built.
|
|
132
|
+
- Don't use `v.string().oneOf(["a", "b"])` for discriminator fields where you need the literal type — use `v.literal("a", "b")`.
|
|
133
|
+
- Don't expect `v.computed` / `v.managed` to validate input — they ignore input shape entirely. Reach for them only when *producing* a value.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# `v.boolean()` — method reference
|
|
2
|
+
|
|
3
|
+
Picking guide is in [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md). Membership rules (`.in`/`.oneOf`) inherited from PrimitiveValidator — see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md).
|
|
4
|
+
|
|
5
|
+
## Strict equality
|
|
6
|
+
|
|
7
|
+
| Method | Effect |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `.mustBeTrue(msg?)` | strictly `=== true` (rejects `"yes"`, `1`, `"on"`) |
|
|
10
|
+
| `.mustBeFalse(msg?)` | strictly `=== false` |
|
|
11
|
+
|
|
12
|
+
Use these when the field is a real boolean checkbox value — e.g. "agree to terms" must be exactly `true`, not a truthy string.
|
|
13
|
+
|
|
14
|
+
## Form-style coercion — `accepted` / `declined`
|
|
15
|
+
|
|
16
|
+
The "accepted" rules treat `true`, `"yes"`, `"on"`, `1`, `"1"`, `"true"` as accepted. "Declined" treats their counterparts (`false`, `"no"`, `"off"`, `0`, etc.) as declined. Designed for form inputs where a checkbox/radio arrives as a string.
|
|
17
|
+
|
|
18
|
+
| Method | Effect |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `.accepted(msg?)` | value must be accepted |
|
|
21
|
+
| `.declined(msg?)` | value must be declined |
|
|
22
|
+
|
|
23
|
+
## Conditional variants — accepted
|
|
24
|
+
|
|
25
|
+
| Method | Args | Effect |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `.acceptedIf(field, value, msg?)` | sibling field equals value | must be accepted in that case |
|
|
28
|
+
| `.acceptedUnless(field, value, msg?)` | sibling field equals value | must be accepted unless that's true |
|
|
29
|
+
| `.acceptedIfRequired(field, msg?)` | sibling field is required | — |
|
|
30
|
+
| `.acceptedIfPresent(field, msg?)` | sibling field is present | — |
|
|
31
|
+
| `.acceptedWithout(field, msg?)` | sibling field is absent | — |
|
|
32
|
+
|
|
33
|
+
## Conditional variants — declined
|
|
34
|
+
|
|
35
|
+
| Method | Args | Effect |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `.declinedIf(field, value, msg?)` | sibling field equals value | must be declined in that case |
|
|
38
|
+
| `.declinedUnless(field, value, msg?)` | sibling field equals value | must be declined unless that's true |
|
|
39
|
+
| `.declinedIfRequired(field, msg?)` | — | — |
|
|
40
|
+
| `.declinedIfPresent(field, msg?)` | — | — |
|
|
41
|
+
| `.declinedWithout(field, msg?)` | — | — |
|
|
42
|
+
|
|
43
|
+
All conditional variants only run inside `v.object` — sibling resolution silently passes otherwise.
|
|
44
|
+
|
|
45
|
+
## JSON Schema mapping
|
|
46
|
+
|
|
47
|
+
- `v.boolean()` → `{ type: "boolean" }`
|
|
48
|
+
- `.mustBeTrue()` / `.mustBeFalse()` — not currently emitted (could add `const: true/false` in the future)
|
|
49
|
+
- `.accepted()` / `.declined()` and their conditional variants — runtime coercion concerns, not representable
|
|
50
|
+
|
|
51
|
+
## Common chains
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// Strict consent checkbox
|
|
55
|
+
v.boolean().mustBeTrue("You must accept the terms")
|
|
56
|
+
|
|
57
|
+
// Form-style "remember me" — accepts "on" / true / 1
|
|
58
|
+
v.boolean().accepted().optional()
|
|
59
|
+
|
|
60
|
+
// Cross-field — newsletter must be accepted if subscriptionType = "premium"
|
|
61
|
+
v.object({
|
|
62
|
+
subscriptionType: v.string().oneOf(["free", "premium"]),
|
|
63
|
+
newsletter: v.boolean().acceptedIf("subscriptionType", "premium"),
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
// Marketing opt-in — declined unless region is GDPR-exempt
|
|
67
|
+
v.object({
|
|
68
|
+
region: v.string(),
|
|
69
|
+
marketingOptIn: v.boolean().declinedUnless("region", "US"),
|
|
70
|
+
})
|
|
71
|
+
```
|