@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,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: define-structural-shape
|
|
3
|
+
description: 'Compose `v.object` / `v.array` / `v.record` / `v.tuple` / `v.union` / `v.discriminatedUnion` / `v.lazy`. Triggers: `v.object`, `v.array`, `v.record`, `v.tuple`, `v.union`, `v.discriminatedUnion`, `v.lazy`, `ObjectValidator`; "how do I build an object schema", "dynamic-keyed record", "tagged union with discriminator", "recursive schema", "self-referencing schema"; typical import `import { v, type Infer } from "@warlock.js/seal"`. Skip: leaf primitives — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; standard-schema bridge — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing libs `zod`, `valibot`.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Structural validators — picking guide
|
|
7
|
+
|
|
8
|
+
The five structural factories. Each composes — pass leaf primitives or other structural validators inside, infer with `Infer<typeof schema>`. **Method surface for `v.object` and `v.array` lives in `object-methods.md` and `array-methods.md`** — this file is just orientation.
|
|
9
|
+
|
|
10
|
+
## `v.object` — fixed-key records
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
v.object({
|
|
14
|
+
email: v.string().email(),
|
|
15
|
+
age: v.int().min(13).optional(),
|
|
16
|
+
role: v.literal("admin", "user", "guest"),
|
|
17
|
+
})
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- **Required by default.** `.optional()` to opt out — the `{ isOptional: true }` brand makes the key optional in `Infer<>`.
|
|
21
|
+
- **Unknown keys policy.** By default extra keys are silently dropped from `data`. Toggle with `.allowUnknown()` (forward as-is), `.stripUnknown()` (explicit drop), or `.allow(...keys)` (whitelist specific extras). See [`object-methods.md`](./object-methods.md).
|
|
22
|
+
- **Schema composition.** `.extend(schema)`, `.merge(other)`, `.pick(...keys)`, `.without(...keys)`, `.partial(...keys)`, `.requiredFields(...keys)` — all in [`object-methods.md`](./object-methods.md).
|
|
23
|
+
- **Cross-field rules** (`sameAs`, `requiredIf`, `requiredWith`) attach to fields *inside* a `v.object`. Without a parent, sibling resolution silently passes.
|
|
24
|
+
|
|
25
|
+
## `v.array` — homogeneous lists
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
v.array(v.string()) // type: string[]
|
|
29
|
+
v.array(userSchema) // type: User[]
|
|
30
|
+
v.array(v.array(v.int())) // type: number[][] — recursive inference
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The inner validator runs against each element; failure on any element fails the array. Method surface (`.min`, `.max`, `.unique`, `.sorted`, `.flip`, …) in [`array-methods.md`](./array-methods.md).
|
|
34
|
+
|
|
35
|
+
## `v.record` — homogeneous values, dynamic keys
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
v.record(v.int()) // type: Record<string, number>
|
|
39
|
+
v.record(v.object({ count: v.int() })) // type: Record<string, { count: number }>
|
|
40
|
+
v.record() // type: Record<string, any>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Reach for `v.record` when keys are dynamic (user-provided, dictionary-style) but values share a schema. If keys are also constrained (e.g. only `"draft" | "published"`), use `v.object` with literal keys instead — the constraint lives in the type.
|
|
44
|
+
|
|
45
|
+
## `v.tuple` — positional types
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
v.tuple([v.string(), v.int(), v.boolean()]) // type: [string, number, boolean]
|
|
49
|
+
v.tuple([v.literal("ok"), v.string()]) // type: ["ok", string]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Each position has its own validator; the array length must match the tuple length. Pair with `v.literal` at position 0 for result-tuple patterns (`["ok", data]` vs `["error", message]`).
|
|
53
|
+
|
|
54
|
+
## `v.union` — one of N validators (untagged)
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
v.union([v.string(), v.int()]) // type: string | number
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The first type-matching validator wins, picked via each branch's `matchesType()`. Use for unions of **scalar** types (string vs number, etc.) where `matchesType` is enough to disambiguate. For object-vs-object unions, reach for `v.discriminatedUnion` instead — `matchesType` can't distinguish two object branches and you'll get errors from the wrong branch.
|
|
61
|
+
|
|
62
|
+
## `v.discriminatedUnion` — tagged unions (recommended for objects)
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
const email = v.object({ type: v.literal("email"), email: v.string().email() });
|
|
66
|
+
const sms = v.object({ type: v.literal("sms"), phone: v.string() });
|
|
67
|
+
const push = v.object({ type: v.literal("push"), deviceId: v.string() });
|
|
68
|
+
|
|
69
|
+
const notif = v.discriminatedUnion("type", [email, sms, push]);
|
|
70
|
+
|
|
71
|
+
type Notif = Infer<typeof notif>;
|
|
72
|
+
// { type: "email"; email: string }
|
|
73
|
+
// | { type: "sms"; phone: string }
|
|
74
|
+
// | { type: "push"; deviceId: string }
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Routes payloads by reading the discriminator field (here `type`), looking it up in a key→branch map built at construction time, and delegating to the matching branch only. Benefits over plain `v.union`:
|
|
78
|
+
|
|
79
|
+
- **Precise errors.** Failures come from the matched branch, not from every branch.
|
|
80
|
+
- **O(1) routing** instead of trial-and-error.
|
|
81
|
+
- **Exact TS inference** — discriminated union with narrowing inside `if (x.type === "email")` blocks.
|
|
82
|
+
- **Cleaner JSON Schema** — `oneOf` with literal discriminators; OpenAI-strict accepts it.
|
|
83
|
+
|
|
84
|
+
Construction-time validation throws on:
|
|
85
|
+
|
|
86
|
+
- Missing discriminator field in any branch
|
|
87
|
+
- Non-literal discriminator (must be `v.literal(...)`)
|
|
88
|
+
- Duplicate discriminator values across branches
|
|
89
|
+
|
|
90
|
+
So misconfigurations surface at schema-build time, not runtime.
|
|
91
|
+
|
|
92
|
+
## `v.lazy` — recursive and forward-referenced schemas
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
type Category = { name: string; children: Category[] };
|
|
96
|
+
|
|
97
|
+
const categorySchema: ObjectValidator<...> = v.object({
|
|
98
|
+
name: v.string(),
|
|
99
|
+
children: v.array(v.lazy(() => categorySchema)),
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
type T = Infer<typeof categorySchema>;
|
|
103
|
+
// { name: string; children: T[] } ← recursive type
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Defers resolution of the inner validator until validate-time. JavaScript evaluates the object literal before the `const` binding completes, so the inner reference would normally fail with `ReferenceError`. The thunk is invoked only when `validate()` runs, by which time the binding exists.
|
|
107
|
+
|
|
108
|
+
**Memoised.** The thunk fires once on first use; subsequent calls reuse the cached validator.
|
|
109
|
+
|
|
110
|
+
**JSON Schema caveat.** Simple-resolve in v1 — recursive shapes will infinite-loop in `toJsonSchema()`. If you need JSON Schema for a recursive shape, generate it manually with `$defs` + `$ref` until v2 lands.
|
|
111
|
+
|
|
112
|
+
**TS inference requires a recursive type alias.** TS can't infer `Category = { name: string; children: Category[] }` from the schema alone — declare the type explicitly and annotate the schema variable with `ObjectValidator<...>` or similar (same pattern as Zod's `z.ZodType<Category>`).
|
|
113
|
+
|
|
114
|
+
Use for: trees (categories, file systems), threaded data (comment chains), mutually recursive schemas (`A` references `B` references `A`), and forward references (a schema needs to use one defined later in the file).
|
|
115
|
+
|
|
116
|
+
## Quick map
|
|
117
|
+
|
|
118
|
+
| Want | Reach for |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| Fixed-shape record | `v.object({...})` |
|
|
121
|
+
| Dynamic keys, same value shape | `v.record(valueSchema)` |
|
|
122
|
+
| List of items | `v.array(itemSchema)` |
|
|
123
|
+
| Position-typed array | `v.tuple([a, b, c])` |
|
|
124
|
+
| One of N scalar types | `v.union([...])` |
|
|
125
|
+
| One of N object shapes with a tag field | `v.discriminatedUnion(key, [...])` |
|
|
126
|
+
| Self-referencing or forward reference | `v.lazy(() => schema)` |
|
|
127
|
+
| One of N constants | `v.literal(...values)` (not structural — see [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md)) |
|
|
128
|
+
|
|
129
|
+
## A note on cascade Models
|
|
130
|
+
|
|
131
|
+
`@warlock.js/cascade` Models declare `static schema: ObjectValidator<TSchema>`. Passing a `v.object({...})` works directly — the factory return widens to fit the Model's invariant generic without breaking type checking. If TS complains *"`ObjectValidator<{specific}>` is not assignable to `ObjectValidator<TSchema>`"*, that's the variance trap and the answer isn't to widen the schema — it's almost always that `Model<TSchema>` was parameterized with a hand-rolled type that drifted from the schema's inferred shape. Fix the type, not the schema. See [`@warlock.js/seal/bridge-standard-schema/SKILL.md`](@warlock.js/seal/bridge-standard-schema/SKILL.md).
|
|
132
|
+
|
|
133
|
+
## Method-surface reference
|
|
134
|
+
|
|
135
|
+
- [`object-methods.md`](./object-methods.md) — `.extend` / `.merge` / `.pick` / `.without` / `.partial` / `.requiredFields` / `.allowUnknown` / `.stripUnknown` / `.allow` / `.trim`.
|
|
136
|
+
- [`array-methods.md`](./array-methods.md) — `.minLength` / `.maxLength` / `.length` / `.between` / `.unique` / `.sorted` / `.flip` / `.sort` / `.onlyUnique`.
|
|
137
|
+
|
|
138
|
+
`v.record` and `v.tuple` share the array-style length surface. `v.union` and `v.discriminatedUnion` have no chainable methods beyond what's shown above. `v.lazy` is a single-call factory.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# `v.array(itemValidator)` — method reference
|
|
2
|
+
|
|
3
|
+
The inner validator runs against each element. Failure on any element fails the array. Picking guide (array vs tuple vs record) is in [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md).
|
|
4
|
+
|
|
5
|
+
## Length
|
|
6
|
+
|
|
7
|
+
| Method | Args | JSON Schema | Example |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| `.min(n, msg?)` | n/a — see note below | — | use `.minLength(n)` |
|
|
10
|
+
| `.minLength(n, msg?)` | inclusive lower bound | `minItems: n` | `v.array(v.string()).minLength(1)` |
|
|
11
|
+
| `.maxLength(n, msg?)` | inclusive upper bound | `maxItems: n` | `v.array(v.string()).maxLength(10)` |
|
|
12
|
+
| `.length(n, msg?)` | exact length | `minItems=maxItems=n` | `v.array(v.string()).length(3)` |
|
|
13
|
+
| `.between(a, b, msg?)` | inclusive range | `minItems: a, maxItems: b` | `v.array(v.string()).between(1, 10)` |
|
|
14
|
+
| `.lengthBetween(a, b, msg?)` | alias for `.between()` | `minItems: a, maxItems: b` | — |
|
|
15
|
+
|
|
16
|
+
**Note on `.min`/`.max`:** the array validator does not expose `.min`/`.max` directly — use `.minLength`/`.maxLength` (or `.between`/`.length`). This is intentional: `.min`/`.max` would conflict with primitive value-comparison semantics if they ever bled into here.
|
|
17
|
+
|
|
18
|
+
## Uniqueness & sort
|
|
19
|
+
|
|
20
|
+
| Method | Args | Effect |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `.unique(msg?)` | — | every element is distinct |
|
|
23
|
+
| `.sorted(direction?, msg?)` | `"asc"` (default) or `"desc"` | array is monotonically sorted |
|
|
24
|
+
|
|
25
|
+
## Mutators (pre-validation reshape)
|
|
26
|
+
|
|
27
|
+
| Method | Args | Effect |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `.flip()` | — | reverse the array |
|
|
30
|
+
| `.reverse()` | — | alias for `.flip()` |
|
|
31
|
+
| `.onlyUnique()` | — | dedupe before validation |
|
|
32
|
+
| `.sort(direction?, key?)` | `"asc"` (default) or `"desc"`; optional sort key for object items | sort before validation |
|
|
33
|
+
|
|
34
|
+
`onlyUnique()` and `unique()` differ: the mutator silently dedupes; the rule fails when duplicates are present. Pick by intent — coerce vs reject.
|
|
35
|
+
|
|
36
|
+
## Inner validator notes
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
v.array(v.string().email()) // every element must be a valid email
|
|
40
|
+
v.array(userSchema) // every element must satisfy userSchema
|
|
41
|
+
v.array(v.array(v.int())) // matrix-ish — Infer is recursive
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Element validators run with element-level context. `path` becomes `${parent}.${index}` for error messages. Cross-field rules inside element schemas resolve to that element's fields, not the array.
|
|
45
|
+
|
|
46
|
+
## JSON Schema mapping
|
|
47
|
+
|
|
48
|
+
- `v.array(item)` → `{ type: "array", items: <item.toJsonSchema()> }`
|
|
49
|
+
- `.minLength(n)` → `minItems: n`
|
|
50
|
+
- `.maxLength(n)` → `maxItems: n`
|
|
51
|
+
- `.length(n)` → `minItems: n, maxItems: n`
|
|
52
|
+
- `.between(a, b)` → `minItems: a, maxItems: b`
|
|
53
|
+
- `.unique()` and `.sorted()` are NOT representable — silently omitted
|
|
54
|
+
|
|
55
|
+
## Common chains
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
// Tags
|
|
59
|
+
v.array(v.string().min(1)).unique().between(1, 10)
|
|
60
|
+
|
|
61
|
+
// User list
|
|
62
|
+
v.array(userSchema).minLength(1)
|
|
63
|
+
|
|
64
|
+
// Pre-sorted, deduped
|
|
65
|
+
v.array(v.string()).onlyUnique().sort("asc")
|
|
66
|
+
|
|
67
|
+
// Reverse-emit
|
|
68
|
+
v.array(v.string()).flip()
|
|
69
|
+
|
|
70
|
+
// Matrix
|
|
71
|
+
v.array(v.array(v.number())).minLength(1)
|
|
72
|
+
|
|
73
|
+
// Sorted ids
|
|
74
|
+
v.array(v.string().uuid()).sorted("asc").unique()
|
|
75
|
+
|
|
76
|
+
// Optional list with default
|
|
77
|
+
v.array(v.string()).default([]).optional()
|
|
78
|
+
```
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# `v.object({...})` — method reference
|
|
2
|
+
|
|
3
|
+
Picking guide for structural validators is in [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md). For field-level chaining (`.required` / `.optional` / `.attribute`), see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md).
|
|
4
|
+
|
|
5
|
+
## Schema composition
|
|
6
|
+
|
|
7
|
+
These return a new `ObjectValidator` with a transformed schema. The TypeScript inference follows correctly — `Infer<>` reflects the post-composition shape.
|
|
8
|
+
|
|
9
|
+
### `.extend(schemaOrValidator)` — add fields, keep config
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
const baseUser = v.object({
|
|
13
|
+
name: v.string(),
|
|
14
|
+
email: v.string().email(),
|
|
15
|
+
}).allowUnknown();
|
|
16
|
+
|
|
17
|
+
const adminUser = baseUser.extend({
|
|
18
|
+
role: v.string().oneOf(["admin", "superadmin"]),
|
|
19
|
+
});
|
|
20
|
+
// adminUser type: { name; email; role } — keeps allowUnknown()
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Accepts a plain schema object **or** another `ObjectValidator` (only its schema is used — config is ignored). Use for reusable field collections (e.g. timestamp fields).
|
|
24
|
+
|
|
25
|
+
### `.merge(otherValidator)` — combine, override config
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
const base = v.object({ name: v.string() }).allowUnknown();
|
|
29
|
+
const audit = v.object({
|
|
30
|
+
createdAt: v.date(),
|
|
31
|
+
updatedAt: v.date(),
|
|
32
|
+
}).stripUnknown();
|
|
33
|
+
|
|
34
|
+
const merged = base.merge(audit);
|
|
35
|
+
// type: { name; createdAt; updatedAt }
|
|
36
|
+
// config: stripUnknown() from audit (overrides base's allowUnknown)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`.merge` combines schemas **and** configurations — the other validator wins. Rules, mutators, transformers, and attribute display names from both validators are appended.
|
|
40
|
+
|
|
41
|
+
### `.pick(...keys)` — keep only specified fields
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
const fullUser = v.object({
|
|
45
|
+
id: v.int(),
|
|
46
|
+
name: v.string(),
|
|
47
|
+
email: v.string().email(),
|
|
48
|
+
password: v.string(),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const loginSchema = fullUser.pick("email", "password");
|
|
52
|
+
// type: { email; password }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Returns `ObjectValidator<Pick<TSchema, K>>`. Keeps original config (`allowUnknown`, etc.).
|
|
56
|
+
|
|
57
|
+
### `.without(...keys)` — drop specified fields
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
const updateSchema = fullUser.without("id");
|
|
61
|
+
// type: { name; email; password }
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Returns `ObjectValidator<Omit<TSchema, K>>`. Inverse of `.pick`. Keeps original config.
|
|
65
|
+
|
|
66
|
+
### `.partial(...keys?)` — mark fields optional
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
fullUser.partial() // every field becomes optional
|
|
70
|
+
fullUser.partial("password") // only `password` becomes optional
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Walks the schema and applies `.optional()` to each named field (or all if no keys given). `Infer<>` makes those keys optional.
|
|
74
|
+
|
|
75
|
+
### `.requiredFields(...keys?)` — mark fields required
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
const partialUser = fullUser.partial(); // all optional
|
|
79
|
+
const updateUser = partialUser.requiredFields("id", "email");
|
|
80
|
+
// id and email are required again, others stay optional
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Inverse of `.partial`.
|
|
84
|
+
|
|
85
|
+
## Unknown-keys policy
|
|
86
|
+
|
|
87
|
+
By default, extra keys in input are silently dropped from `data` (no error, no forward).
|
|
88
|
+
|
|
89
|
+
| Method | Effect |
|
|
90
|
+
|---|---|
|
|
91
|
+
| `.allowUnknown(allow = true)` | extra **direct-child** keys forward as-is |
|
|
92
|
+
| `.stripUnknown()` | explicit drop (mutator-based — affects `data` shape) |
|
|
93
|
+
| `.allow(...keys)` | whitelist specific extras to forward without validation |
|
|
94
|
+
|
|
95
|
+
`.allowUnknown()` only affects direct children — nested objects keep their own policies. For a fully permissive object including nested children, set `.allowUnknown()` on each level.
|
|
96
|
+
|
|
97
|
+
## Object-level mutators
|
|
98
|
+
|
|
99
|
+
| Method | Args | Effect |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| `.trim(recursive?)` | default `true` | recursively trim string values across the object |
|
|
102
|
+
|
|
103
|
+
For per-field mutators, attach on the field validator instead.
|
|
104
|
+
|
|
105
|
+
## Cross-field rules — context
|
|
106
|
+
|
|
107
|
+
The cross-field methods (`.sameAs`, `.requiredIf`, `.requiredWith`, etc.) are **field-level**, not object-level — you call them on the field validator inside `v.object`. The object validator's job is to hand them the parent context so sibling resolution works:
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
v.object({
|
|
111
|
+
password: v.string(),
|
|
112
|
+
passwordConfirm: v.string().sameAs("password"),
|
|
113
|
+
})
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
If you call cross-field rules outside a `v.object`, sibling resolution silently passes — there's nobody to compare against.
|
|
117
|
+
|
|
118
|
+
## `Infer<>` semantics
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
Infer<typeof userSchema>
|
|
122
|
+
// { reqField: T; optField?: T }
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- Required fields → required keys
|
|
126
|
+
- `.optional()` fields → optional keys (`?:`)
|
|
127
|
+
- `.omit()` / `.exclude()` fields → dropped from the inferred type
|
|
128
|
+
- `v.computed<T>()` / `v.managed<T>()` → present as `T` in inferred output (they produce values)
|
|
129
|
+
|
|
130
|
+
## Common chains
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
// User CRUD trio from one base
|
|
134
|
+
const baseUser = v.object({
|
|
135
|
+
id: v.int(),
|
|
136
|
+
name: v.string(),
|
|
137
|
+
email: v.string().email(),
|
|
138
|
+
password: v.string(),
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
const createUser = baseUser.without("id");
|
|
142
|
+
const updateUser = baseUser.partial().requiredFields("id");
|
|
143
|
+
const loginUser = baseUser.pick("email", "password");
|
|
144
|
+
|
|
145
|
+
// Reusable timestamps
|
|
146
|
+
const timestamps = v.object({
|
|
147
|
+
createdAt: v.date(),
|
|
148
|
+
updatedAt: v.date(),
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
const userWithAudit = baseUser.extend(timestamps);
|
|
152
|
+
|
|
153
|
+
// Permissive container that forwards extras
|
|
154
|
+
const eventEnvelope = v.object({
|
|
155
|
+
type: v.literal("user.created", "user.updated"),
|
|
156
|
+
payload: v.object({}).allowUnknown(),
|
|
157
|
+
}).allowUnknown();
|
|
158
|
+
|
|
159
|
+
// Confirmation pattern with omit
|
|
160
|
+
const signupSchema = v.object({
|
|
161
|
+
password: v.string().strongPassword(),
|
|
162
|
+
passwordConfirm: v.string().sameAs("password").omit(),
|
|
163
|
+
email: v.string().email(),
|
|
164
|
+
});
|
|
165
|
+
// Infer<> = { password; email } — passwordConfirm omitted from output
|
|
166
|
+
```
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: extend-seal-with-plugins
|
|
3
|
+
description: 'Author a custom seal plugin to add validator methods (`.slug`, `.postalCode`, etc) — `SealPlugin` shape, `registerPlugin` lifecycle, TS prototype augmentation. Triggers: `SealPlugin`, `registerPlugin`, `unregisterPlugin`, `hasPlugin`, `getInstalledPlugins`, `StringValidator`, `NumberValidator`, `DateValidator`, `BaseValidator`, `install`, `uninstall`; "how do I add a custom validator method", "write a seal plugin", "extend v.string with .slug", "module augmentation for seal"; typical import `import { StringValidator, registerPlugin, type SealPlugin } from "@warlock.js/seal"`. Skip: built-in primitives — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; bridge typing — `@warlock.js/seal/bridge-standard-schema/SKILL.md`; competing `zod` `.refine`/`.transform`.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Extend seal with plugins
|
|
7
|
+
|
|
8
|
+
Seal exposes a plugin system so you can add validator methods without forking the package. A plugin is an object with `name`, optional `version`/`description`, and an `install` function that runs once when the plugin is registered. The standard pattern is to `Object.assign(StringValidator.prototype, { ... })` to graft new methods onto a validator class.
|
|
9
|
+
|
|
10
|
+
## When to reach for a plugin
|
|
11
|
+
|
|
12
|
+
- The validator method you want **does not exist** in built-in seal — check [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md) and its method references first.
|
|
13
|
+
- The validation is **stable and reusable** across modules — domain-specific formats (IBAN, postal codes, tax IDs, license plates, internal ID schemes).
|
|
14
|
+
- You want the **chainable syntax** — `v.string().slug()` reads better than `v.string().pattern(/.../).addMutator(s => slugify(s))` at every call site.
|
|
15
|
+
|
|
16
|
+
**Don't** reach for a plugin when a one-off `.pattern()` would do. The boilerplate (declare module, register on boot) is justified only when you'll call the new method many times.
|
|
17
|
+
|
|
18
|
+
## The plugin shape
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import type { SealPlugin } from "@warlock.js/seal";
|
|
22
|
+
|
|
23
|
+
type SealPlugin = {
|
|
24
|
+
name: string; // unique identifier — duplicates warn and skip install
|
|
25
|
+
version?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
install: (context: { name: string; version?: string }) => void | Promise<void>;
|
|
28
|
+
uninstall?: () => void | Promise<void>;
|
|
29
|
+
};
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The `install` function is where you add methods. Typically you patch a validator class prototype:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { StringValidator, type SealPlugin } from "@warlock.js/seal";
|
|
36
|
+
|
|
37
|
+
export const slugPlugin: SealPlugin = {
|
|
38
|
+
name: "slug",
|
|
39
|
+
version: "1.0.0",
|
|
40
|
+
description: "Adds .slug() — pattern-only slug validation",
|
|
41
|
+
|
|
42
|
+
install() {
|
|
43
|
+
Object.assign(StringValidator.prototype, {
|
|
44
|
+
slug(this: StringValidator, errorMessage?: string) {
|
|
45
|
+
return this.pattern(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, errorMessage);
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`uninstall` is optional. Provide it when your plugin needs to clean up — e.g. removing prototype methods for hot-reload scenarios. Most production plugins skip it; methods grafted at boot stay for the process lifetime.
|
|
53
|
+
|
|
54
|
+
## Registering plugins
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { registerPlugin, unregisterPlugin, hasPlugin, getInstalledPlugins } from "@warlock.js/seal";
|
|
58
|
+
|
|
59
|
+
await registerPlugin(slugPlugin);
|
|
60
|
+
// console.warn if "slug" is already installed; otherwise install() runs and the plugin is tracked.
|
|
61
|
+
|
|
62
|
+
hasPlugin("slug"); // → true
|
|
63
|
+
getInstalledPlugins(); // → [slugPlugin]
|
|
64
|
+
|
|
65
|
+
await unregisterPlugin("slug");
|
|
66
|
+
// runs slugPlugin.uninstall?.(); removes from registry.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`registerPlugin` is async (the `install` function may be async). Await it during boot so the methods are available before the first request.
|
|
70
|
+
|
|
71
|
+
**Where to register:** the conventional place in a Warlock app is a side-effect file loaded by `warlock.config.ts` — e.g. `src/setup/seal-plugins.ts`:
|
|
72
|
+
|
|
73
|
+
```ts title="src/setup/seal-plugins.ts"
|
|
74
|
+
import { registerPlugin } from "@warlock.js/seal";
|
|
75
|
+
import { slugPlugin } from "./plugins/slug-plugin";
|
|
76
|
+
import { postalCodePlugin } from "./plugins/postal-code-plugin";
|
|
77
|
+
|
|
78
|
+
export async function setupSealPlugins() {
|
|
79
|
+
await registerPlugin(slugPlugin);
|
|
80
|
+
await registerPlugin(postalCodePlugin);
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Then call `setupSealPlugins()` in a bootstrap connector. Registering at top-level module scope works too (it's idempotent — duplicates warn and skip), but explicit setup is clearer.
|
|
85
|
+
|
|
86
|
+
## TypeScript — declare the new methods
|
|
87
|
+
|
|
88
|
+
`Object.assign` on a prototype is invisible to TypeScript. Declare the new methods with module augmentation so call sites compile:
|
|
89
|
+
|
|
90
|
+
```ts title="src/setup/seal-plugins.types.ts"
|
|
91
|
+
import "@warlock.js/seal";
|
|
92
|
+
|
|
93
|
+
declare module "@warlock.js/seal" {
|
|
94
|
+
interface StringValidator {
|
|
95
|
+
/** Pattern-only slug — `"hello-world"`, not `"Hello World"`. */
|
|
96
|
+
slug(errorMessage?: string): StringValidator;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
After this file is included in the project's `tsconfig.json` (via `include` or a side-effect import), `v.string().slug()` autocompletes and type-checks everywhere.
|
|
102
|
+
|
|
103
|
+
**Important.** The augmentation has to declare on the **class** (`StringValidator`), not the factory return type. The factory return widens with `& StandardSchemaV1<...>` (see [`@warlock.js/seal/bridge-standard-schema/SKILL.md`](@warlock.js/seal/bridge-standard-schema/SKILL.md)) — augmentations on the intersection don't propagate. Patch the class, augment the class; the factory return picks up the new methods through structural inference.
|
|
104
|
+
|
|
105
|
+
## Larger example — postal codes per country
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
import { StringValidator, type SealPlugin } from "@warlock.js/seal";
|
|
109
|
+
|
|
110
|
+
const PATTERNS: Record<string, RegExp> = {
|
|
111
|
+
US: /^\d{5}(?:-\d{4})?$/,
|
|
112
|
+
DE: /^\d{5}$/,
|
|
113
|
+
UK: /^[A-Z]{1,2}\d[A-Z\d]? \d[A-Z]{2}$/i,
|
|
114
|
+
EG: /^\d{5}$/,
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export const postalCodePlugin: SealPlugin = {
|
|
118
|
+
name: "postal-code",
|
|
119
|
+
|
|
120
|
+
install() {
|
|
121
|
+
Object.assign(StringValidator.prototype, {
|
|
122
|
+
postalCode(this: StringValidator, country: keyof typeof PATTERNS, errorMessage?: string) {
|
|
123
|
+
const pattern = PATTERNS[country];
|
|
124
|
+
|
|
125
|
+
if (!pattern) {
|
|
126
|
+
throw new Error(`postalCode: unknown country "${country}"`);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return this.pattern(pattern, errorMessage ?? `Invalid ${country} postal code`);
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
// Module augmentation
|
|
138
|
+
declare module "@warlock.js/seal" {
|
|
139
|
+
interface StringValidator {
|
|
140
|
+
postalCode(country: "US" | "DE" | "UK" | "EG", errorMessage?: string): StringValidator;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Use site
|
|
145
|
+
const addressSchema = v.object({
|
|
146
|
+
country: v.literal("US", "DE", "UK", "EG"),
|
|
147
|
+
postal: v.string().postalCode("DE"),
|
|
148
|
+
});
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Patterns beyond `StringValidator`
|
|
152
|
+
|
|
153
|
+
The same approach works on any validator class. Pick the right prototype:
|
|
154
|
+
|
|
155
|
+
- `StringValidator` — string methods (`.slug`, `.postalCode`, `.licensePlate`).
|
|
156
|
+
- `NumberValidator` / `IntValidator` / `FloatValidator` — number methods.
|
|
157
|
+
- `DateValidator` — date methods (`.businessDayInCountry("US")`).
|
|
158
|
+
- `ArrayValidator` / `ObjectValidator` — structural methods (rarer).
|
|
159
|
+
- `BaseValidator` — universal methods (rare — usually a sign you want a separate `v.something()` factory instead).
|
|
160
|
+
|
|
161
|
+
For a method that creates a **new validator** (not chained from an existing one), expose it as a regular function alongside `v` rather than patching the factory. E.g. export `iban()` from your plugin module that returns a configured `v.string()`.
|
|
162
|
+
|
|
163
|
+
## Introspection — checking what's loaded
|
|
164
|
+
|
|
165
|
+
```ts
|
|
166
|
+
hasPlugin("slug"); // boolean
|
|
167
|
+
getInstalledPlugins(); // SealPlugin[]
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Use these in startup diagnostics or in tests that need to assert a plugin is registered before exercising a method that depends on it.
|
|
171
|
+
|
|
172
|
+
## Things NOT to do
|
|
173
|
+
|
|
174
|
+
- Don't `Object.assign(BaseValidator.prototype, ...)` for type-specific methods. The method would exist on every validator (`v.boolean().slug()` typechecks but breaks at runtime). Patch the narrowest class that owns the method.
|
|
175
|
+
- Don't forget the module augmentation. Without it, the new methods exist at runtime but TS rejects every call site.
|
|
176
|
+
- Don't make the plugin's `install` function depend on shared state mutable from elsewhere. Plugins should be idempotent — installing twice (or registering across hot-reloads) should not break anything.
|
|
177
|
+
- Don't ship a plugin that overrides a built-in method without a clear reason. If you must, `uninstall` should restore the original — but the better path is a different method name.
|
|
178
|
+
- Don't author one plugin per method. Group related methods (e.g. "country-specific validators") into one plugin so the install/uninstall lifecycle is coherent.
|