@warlock.js/seal 5.28.0 → 5.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.md +2 -0
- package/cjs/index.cjs +37 -30
- package/cjs/index.cjs.map +1 -1
- package/cjs/{object-DubGC-xu.cjs → object--LXRt5RF.cjs} +10 -8
- package/cjs/object--LXRt5RF.cjs.map +1 -0
- package/cjs/object.cjs +2 -2
- package/cjs/{required-methods-BOVNRtci.cjs → required-methods-DYsRO9aZ.cjs} +97 -68
- package/cjs/required-methods-DYsRO9aZ.cjs.map +1 -0
- package/cjs/{string-DpDpgefH.cjs → string-DsqnKoSB.cjs} +6 -6
- package/cjs/string-DsqnKoSB.cjs.map +1 -0
- package/cjs/string.cjs +2 -2
- package/esm/config.d.mts +2 -1
- package/esm/config.d.mts.map +1 -1
- package/esm/config.mjs +1 -1
- package/esm/config.mjs.map +1 -1
- package/esm/factory/validate.d.mts +9 -6
- package/esm/factory/validate.d.mts.map +1 -1
- package/esm/factory/validate.mjs +12 -4
- package/esm/factory/validate.mjs.map +1 -1
- package/esm/factory/validators.d.mts +5 -5
- package/esm/factory/validators.d.mts.map +1 -1
- package/esm/factory/validators.mjs +1 -1
- package/esm/factory/validators.mjs.map +1 -1
- package/esm/helpers/date-helpers.d.mts +1 -1
- package/esm/helpers/date-helpers.d.mts.map +1 -1
- package/esm/helpers/date-helpers.mjs +1 -1
- package/esm/helpers/date-helpers.mjs.map +1 -1
- package/esm/helpers/file.utils.d.mts +1 -1
- package/esm/helpers/file.utils.d.mts.map +1 -1
- package/esm/helpers/file.utils.mjs +1 -1
- package/esm/helpers/file.utils.mjs.map +1 -1
- package/esm/helpers/get-field-value.d.mts +2 -1
- package/esm/helpers/get-field-value.d.mts.map +1 -1
- package/esm/helpers/get-field-value.mjs +1 -1
- package/esm/helpers/get-field-value.mjs.map +1 -1
- package/esm/helpers/is-empty-value.mjs +1 -1
- package/esm/helpers/is-empty-value.mjs.map +1 -1
- package/esm/helpers/path-helpers.d.mts +1 -1
- package/esm/helpers/path-helpers.d.mts.map +1 -1
- package/esm/helpers/path-helpers.mjs +1 -1
- package/esm/helpers/path-helpers.mjs.map +1 -1
- package/esm/helpers/validation-helpers.d.mts +2 -1
- package/esm/helpers/validation-helpers.d.mts.map +1 -1
- package/esm/helpers/validation-helpers.mjs +1 -1
- package/esm/helpers/validation-helpers.mjs.map +1 -1
- package/esm/index.d.mts +3 -3
- package/esm/mutators/array-mutators.d.mts +2 -1
- package/esm/mutators/array-mutators.d.mts.map +1 -1
- package/esm/mutators/array-mutators.mjs +1 -1
- package/esm/mutators/array-mutators.mjs.map +1 -1
- package/esm/mutators/boolean-mutators.d.mts +2 -1
- package/esm/mutators/boolean-mutators.d.mts.map +1 -1
- package/esm/mutators/boolean-mutators.mjs +1 -1
- package/esm/mutators/boolean-mutators.mjs.map +1 -1
- package/esm/mutators/date-mutators.d.mts +2 -1
- package/esm/mutators/date-mutators.d.mts.map +1 -1
- package/esm/mutators/date-mutators.mjs +1 -1
- package/esm/mutators/date-mutators.mjs.map +1 -1
- package/esm/mutators/number-mutators.d.mts +2 -1
- package/esm/mutators/number-mutators.d.mts.map +1 -1
- package/esm/mutators/number-mutators.mjs +1 -1
- package/esm/mutators/number-mutators.mjs.map +1 -1
- package/esm/mutators/object-mutators.d.mts +2 -1
- package/esm/mutators/object-mutators.d.mts.map +1 -1
- package/esm/mutators/object-mutators.mjs +1 -1
- package/esm/mutators/object-mutators.mjs.map +1 -1
- package/esm/mutators/scalar-mutators.d.mts +2 -1
- package/esm/mutators/scalar-mutators.d.mts.map +1 -1
- package/esm/mutators/scalar-mutators.mjs +1 -1
- package/esm/mutators/scalar-mutators.mjs.map +1 -1
- package/esm/mutators/string-mutators.d.mts +2 -1
- package/esm/mutators/string-mutators.d.mts.map +1 -1
- package/esm/mutators/string-mutators.mjs +1 -1
- package/esm/mutators/string-mutators.mjs.map +1 -1
- package/esm/object.d.mts +1 -1
- package/esm/object.d.mts.map +1 -1
- package/esm/object.mjs +1 -1
- package/esm/object.mjs.map +1 -1
- package/esm/plugins/plugin-system.d.mts +1 -1
- package/esm/plugins/plugin-system.d.mts.map +1 -1
- package/esm/plugins/plugin-system.mjs +1 -1
- package/esm/plugins/plugin-system.mjs.map +1 -1
- package/esm/rules/array/array-rules.d.mts +2 -1
- package/esm/rules/array/array-rules.d.mts.map +1 -1
- package/esm/rules/array/array-rules.mjs +1 -1
- package/esm/rules/array/array-rules.mjs.map +1 -1
- package/esm/rules/color/color-rules.d.mts +2 -1
- package/esm/rules/color/color-rules.d.mts.map +1 -1
- package/esm/rules/color/color-rules.mjs +1 -1
- package/esm/rules/color/color-rules.mjs.map +1 -1
- package/esm/rules/common/enum.d.mts +2 -1
- package/esm/rules/common/enum.d.mts.map +1 -1
- package/esm/rules/common/enum.mjs +1 -1
- package/esm/rules/common/enum.mjs.map +1 -1
- package/esm/rules/common/equals-field-rules.d.mts +2 -1
- package/esm/rules/common/equals-field-rules.d.mts.map +1 -1
- package/esm/rules/common/equals-field-rules.mjs +1 -1
- package/esm/rules/common/equals-field-rules.mjs.map +1 -1
- package/esm/rules/common/instanceof.d.mts +2 -1
- package/esm/rules/common/instanceof.d.mts.map +1 -1
- package/esm/rules/common/instanceof.mjs +1 -1
- package/esm/rules/common/instanceof.mjs.map +1 -1
- package/esm/rules/common/literal.d.mts +2 -1
- package/esm/rules/common/literal.d.mts.map +1 -1
- package/esm/rules/common/literal.mjs +1 -1
- package/esm/rules/common/literal.mjs.map +1 -1
- package/esm/rules/common/type-rules.d.mts +2 -1
- package/esm/rules/common/type-rules.d.mts.map +1 -1
- package/esm/rules/common/type-rules.mjs +1 -1
- package/esm/rules/common/type-rules.mjs.map +1 -1
- package/esm/rules/common/unknown-key.d.mts +2 -1
- package/esm/rules/common/unknown-key.d.mts.map +1 -1
- package/esm/rules/common/unknown-key.mjs +1 -1
- package/esm/rules/common/unknown-key.mjs.map +1 -1
- package/esm/rules/conditional/forbidden-if-rules.d.mts +2 -1
- package/esm/rules/conditional/forbidden-if-rules.d.mts.map +1 -1
- package/esm/rules/conditional/forbidden-if-rules.mjs +1 -1
- package/esm/rules/conditional/forbidden-if-rules.mjs.map +1 -1
- package/esm/rules/conditional/present-if-rules.d.mts +2 -1
- package/esm/rules/conditional/present-if-rules.d.mts.map +1 -1
- package/esm/rules/conditional/present-if-rules.mjs +1 -1
- package/esm/rules/conditional/present-if-rules.mjs.map +1 -1
- package/esm/rules/conditional/present-unless-rules.d.mts +2 -1
- package/esm/rules/conditional/present-unless-rules.d.mts.map +1 -1
- package/esm/rules/conditional/present-unless-rules.mjs +1 -1
- package/esm/rules/conditional/present-unless-rules.mjs.map +1 -1
- package/esm/rules/conditional/present-with-rules.d.mts +2 -1
- package/esm/rules/conditional/present-with-rules.d.mts.map +1 -1
- package/esm/rules/conditional/present-with-rules.mjs +1 -1
- package/esm/rules/conditional/present-with-rules.mjs.map +1 -1
- package/esm/rules/conditional/present-without-rules.d.mts +2 -1
- package/esm/rules/conditional/present-without-rules.d.mts.map +1 -1
- package/esm/rules/conditional/present-without-rules.mjs +1 -1
- package/esm/rules/conditional/present-without-rules.mjs.map +1 -1
- package/esm/rules/conditional/required-if-rules.d.mts +2 -1
- package/esm/rules/conditional/required-if-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-if-rules.mjs +1 -1
- package/esm/rules/conditional/required-if-rules.mjs.map +1 -1
- package/esm/rules/conditional/required-unless-rules.d.mts +2 -1
- package/esm/rules/conditional/required-unless-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-unless-rules.mjs +1 -1
- package/esm/rules/conditional/required-unless-rules.mjs.map +1 -1
- package/esm/rules/conditional/required-when-rule.d.mts +2 -1
- package/esm/rules/conditional/required-when-rule.d.mts.map +1 -1
- package/esm/rules/conditional/required-when-rule.mjs +1 -1
- package/esm/rules/conditional/required-when-rule.mjs.map +1 -1
- package/esm/rules/conditional/required-with-rules.d.mts +2 -1
- package/esm/rules/conditional/required-with-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-with-rules.mjs +1 -1
- package/esm/rules/conditional/required-with-rules.mjs.map +1 -1
- package/esm/rules/conditional/required-without-rules.d.mts +2 -1
- package/esm/rules/conditional/required-without-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-without-rules.mjs +1 -1
- package/esm/rules/conditional/required-without-rules.mjs.map +1 -1
- package/esm/rules/core/equal.d.mts +2 -1
- package/esm/rules/core/equal.d.mts.map +1 -1
- package/esm/rules/core/equal.mjs +1 -1
- package/esm/rules/core/equal.mjs.map +1 -1
- package/esm/rules/core/forbidden.d.mts +2 -1
- package/esm/rules/core/forbidden.d.mts.map +1 -1
- package/esm/rules/core/forbidden.mjs +1 -1
- package/esm/rules/core/forbidden.mjs.map +1 -1
- package/esm/rules/core/required.d.mts +2 -1
- package/esm/rules/core/required.d.mts.map +1 -1
- package/esm/rules/core/required.mjs +1 -1
- package/esm/rules/core/required.mjs.map +1 -1
- package/esm/rules/core/union.d.mts +1 -1
- package/esm/rules/core/union.d.mts.map +1 -1
- package/esm/rules/core/union.mjs +3 -1
- package/esm/rules/core/union.mjs.map +1 -1
- package/esm/rules/core/when.d.mts +2 -1
- package/esm/rules/core/when.d.mts.map +1 -1
- package/esm/rules/core/when.mjs +1 -1
- package/esm/rules/core/when.mjs.map +1 -1
- package/esm/rules/date/date-comparison-rules.d.mts +2 -1
- package/esm/rules/date/date-comparison-rules.d.mts.map +1 -1
- package/esm/rules/date/date-comparison-rules.mjs +1 -1
- package/esm/rules/date/date-comparison-rules.mjs.map +1 -1
- package/esm/rules/date/date-day-rules.d.mts +2 -1
- package/esm/rules/date/date-day-rules.d.mts.map +1 -1
- package/esm/rules/date/date-day-rules.mjs +1 -1
- package/esm/rules/date/date-day-rules.mjs.map +1 -1
- package/esm/rules/date/date-field-comparison-rules.d.mts +2 -1
- package/esm/rules/date/date-field-comparison-rules.d.mts.map +1 -1
- package/esm/rules/date/date-field-comparison-rules.mjs +1 -1
- package/esm/rules/date/date-field-comparison-rules.mjs.map +1 -1
- package/esm/rules/date/date-period-rules.d.mts +2 -1
- package/esm/rules/date/date-period-rules.d.mts.map +1 -1
- package/esm/rules/date/date-period-rules.mjs +1 -1
- package/esm/rules/date/date-period-rules.mjs.map +1 -1
- package/esm/rules/date/date-relative-rules.d.mts +2 -1
- package/esm/rules/date/date-relative-rules.d.mts.map +1 -1
- package/esm/rules/date/date-relative-rules.mjs +1 -1
- package/esm/rules/date/date-relative-rules.mjs.map +1 -1
- package/esm/rules/date/date-special-rules.d.mts +2 -1
- package/esm/rules/date/date-special-rules.d.mts.map +1 -1
- package/esm/rules/date/date-special-rules.mjs +1 -1
- package/esm/rules/date/date-special-rules.mjs.map +1 -1
- package/esm/rules/date/date.d.mts +2 -1
- package/esm/rules/date/date.d.mts.map +1 -1
- package/esm/rules/date/date.mjs +1 -1
- package/esm/rules/date/date.mjs.map +1 -1
- package/esm/rules/file/dimensions.d.mts +2 -1
- package/esm/rules/file/dimensions.d.mts.map +1 -1
- package/esm/rules/file/dimensions.mjs +1 -1
- package/esm/rules/file/dimensions.mjs.map +1 -1
- package/esm/rules/file/file-size.d.mts +2 -1
- package/esm/rules/file/file-size.d.mts.map +1 -1
- package/esm/rules/file/file-size.mjs +1 -1
- package/esm/rules/file/file-size.mjs.map +1 -1
- package/esm/rules/length/length-rules.d.mts +2 -1
- package/esm/rules/length/length-rules.d.mts.map +1 -1
- package/esm/rules/length/length-rules.mjs +1 -1
- package/esm/rules/length/length-rules.mjs.map +1 -1
- package/esm/rules/number/number-rules.d.mts +2 -1
- package/esm/rules/number/number-rules.d.mts.map +1 -1
- package/esm/rules/number/number-rules.mjs +1 -1
- package/esm/rules/number/number-rules.mjs.map +1 -1
- package/esm/rules/scalar/accepted-rule.mjs +1 -1
- package/esm/rules/scalar/accepted-rule.mjs.map +1 -1
- package/esm/rules/scalar/declined-rule.mjs +1 -1
- package/esm/rules/scalar/declined-rule.mjs.map +1 -1
- package/esm/rules/string/alpha.d.mts +2 -1
- package/esm/rules/string/alpha.d.mts.map +1 -1
- package/esm/rules/string/alpha.mjs +1 -1
- package/esm/rules/string/alpha.mjs.map +1 -1
- package/esm/rules/string/credit-card.d.mts +2 -1
- package/esm/rules/string/credit-card.d.mts.map +1 -1
- package/esm/rules/string/credit-card.mjs +1 -1
- package/esm/rules/string/credit-card.mjs.map +1 -1
- package/esm/rules/string/email.d.mts +2 -1
- package/esm/rules/string/email.d.mts.map +1 -1
- package/esm/rules/string/email.mjs +1 -1
- package/esm/rules/string/email.mjs.map +1 -1
- package/esm/rules/string/id-formats.d.mts +2 -1
- package/esm/rules/string/id-formats.d.mts.map +1 -1
- package/esm/rules/string/id-formats.mjs +1 -1
- package/esm/rules/string/id-formats.mjs.map +1 -1
- package/esm/rules/string/ip.d.mts +2 -1
- package/esm/rules/string/ip.d.mts.map +1 -1
- package/esm/rules/string/ip.mjs +1 -1
- package/esm/rules/string/ip.mjs.map +1 -1
- package/esm/rules/string/matches.d.mts +2 -1
- package/esm/rules/string/matches.d.mts.map +1 -1
- package/esm/rules/string/matches.mjs +1 -1
- package/esm/rules/string/matches.mjs.map +1 -1
- package/esm/rules/string/pattern.d.mts +2 -1
- package/esm/rules/string/pattern.d.mts.map +1 -1
- package/esm/rules/string/pattern.mjs +1 -1
- package/esm/rules/string/pattern.mjs.map +1 -1
- package/esm/rules/string/string-comparison.d.mts +2 -1
- package/esm/rules/string/string-comparison.d.mts.map +1 -1
- package/esm/rules/string/string-comparison.mjs +1 -1
- package/esm/rules/string/string-comparison.mjs.map +1 -1
- package/esm/rules/string/strong-password-rule.d.mts +2 -1
- package/esm/rules/string/strong-password-rule.d.mts.map +1 -1
- package/esm/rules/string/strong-password-rule.mjs +1 -1
- package/esm/rules/string/strong-password-rule.mjs.map +1 -1
- package/esm/rules/string/url.d.mts +2 -1
- package/esm/rules/string/url.d.mts.map +1 -1
- package/esm/rules/string/url.mjs +1 -1
- package/esm/rules/string/url.mjs.map +1 -1
- package/esm/rules/string/without-whitespace.d.mts +2 -1
- package/esm/rules/string/without-whitespace.d.mts.map +1 -1
- package/esm/rules/string/without-whitespace.mjs +1 -1
- package/esm/rules/string/without-whitespace.mjs.map +1 -1
- package/esm/standard-schema/json-schema.d.mts +1 -1
- package/esm/standard-schema/json-schema.d.mts.map +1 -1
- package/esm/standard-schema/json-schema.mjs +1 -1
- package/esm/standard-schema/json-schema.mjs.map +1 -1
- package/esm/standard-schema/map-result.d.mts +2 -1
- package/esm/standard-schema/map-result.d.mts.map +1 -1
- package/esm/standard-schema/map-result.mjs +1 -1
- package/esm/standard-schema/map-result.mjs.map +1 -1
- package/esm/standard-schema/types.d.mts +1 -1
- package/esm/standard-schema/types.d.mts.map +1 -1
- package/esm/string.d.mts +1 -1
- package/esm/string.d.mts.map +1 -1
- package/esm/string.mjs +1 -1
- package/esm/string.mjs.map +1 -1
- package/esm/types/conditional-types.d.mts +1 -1
- package/esm/types/conditional-types.d.mts.map +1 -1
- package/esm/types/context-types.d.mts +8 -2
- package/esm/types/context-types.d.mts.map +1 -1
- package/esm/types/data-transformer-types.d.mts +1 -1
- package/esm/types/data-transformer-types.d.mts.map +1 -1
- package/esm/types/date-types.d.mts +1 -1
- package/esm/types/date-types.d.mts.map +1 -1
- package/esm/types/date-types.mjs +1 -1
- package/esm/types/date-types.mjs.map +1 -1
- package/esm/types/file.types.d.mts +1 -1
- package/esm/types/file.types.d.mts.map +1 -1
- package/esm/types/inference-types.d.mts +21 -4
- package/esm/types/inference-types.d.mts.map +1 -1
- package/esm/types/mutator-types.d.mts +1 -1
- package/esm/types/mutator-types.d.mts.map +1 -1
- package/esm/types/result-types.d.mts +26 -2
- package/esm/types/result-types.d.mts.map +1 -1
- package/esm/types/rule-types.d.mts +1 -1
- package/esm/types/rule-types.d.mts.map +1 -1
- package/esm/types/schema-types.d.mts +1 -1
- package/esm/types/schema-types.d.mts.map +1 -1
- package/esm/validators/any-validator.d.mts +1 -1
- package/esm/validators/any-validator.d.mts.map +1 -1
- package/esm/validators/any-validator.mjs +1 -1
- package/esm/validators/any-validator.mjs.map +1 -1
- package/esm/validators/array-validator.d.mts +1 -1
- package/esm/validators/array-validator.d.mts.map +1 -1
- package/esm/validators/array-validator.mjs +1 -1
- package/esm/validators/array-validator.mjs.map +1 -1
- package/esm/validators/base-validator.d.mts +8 -1
- package/esm/validators/base-validator.d.mts.map +1 -1
- package/esm/validators/base-validator.mjs +23 -4
- package/esm/validators/base-validator.mjs.map +1 -1
- package/esm/validators/boolean-validator.d.mts +1 -1
- package/esm/validators/boolean-validator.d.mts.map +1 -1
- package/esm/validators/boolean-validator.mjs +1 -1
- package/esm/validators/boolean-validator.mjs.map +1 -1
- package/esm/validators/computed-validator.d.mts +1 -1
- package/esm/validators/computed-validator.d.mts.map +1 -1
- package/esm/validators/computed-validator.mjs +1 -1
- package/esm/validators/computed-validator.mjs.map +1 -1
- package/esm/validators/date-validator.d.mts +2 -1
- package/esm/validators/date-validator.d.mts.map +1 -1
- package/esm/validators/date-validator.mjs +1 -1
- package/esm/validators/date-validator.mjs.map +1 -1
- package/esm/validators/discriminated-union-validator.d.mts +8 -2
- package/esm/validators/discriminated-union-validator.d.mts.map +1 -1
- package/esm/validators/discriminated-union-validator.mjs +6 -1
- package/esm/validators/discriminated-union-validator.mjs.map +1 -1
- package/esm/validators/float-validator.d.mts +1 -1
- package/esm/validators/float-validator.d.mts.map +1 -1
- package/esm/validators/float-validator.mjs +1 -1
- package/esm/validators/float-validator.mjs.map +1 -1
- package/esm/validators/instanceof-validator.d.mts +1 -1
- package/esm/validators/instanceof-validator.d.mts.map +1 -1
- package/esm/validators/instanceof-validator.mjs +1 -1
- package/esm/validators/instanceof-validator.mjs.map +1 -1
- package/esm/validators/int-validator.d.mts +1 -1
- package/esm/validators/int-validator.d.mts.map +1 -1
- package/esm/validators/int-validator.mjs +1 -1
- package/esm/validators/int-validator.mjs.map +1 -1
- package/esm/validators/lazy-validator.d.mts +1 -1
- package/esm/validators/lazy-validator.d.mts.map +1 -1
- package/esm/validators/lazy-validator.mjs +1 -1
- package/esm/validators/lazy-validator.mjs.map +1 -1
- package/esm/validators/literal-validator.d.mts +1 -1
- package/esm/validators/literal-validator.d.mts.map +1 -1
- package/esm/validators/literal-validator.mjs +5 -2
- package/esm/validators/literal-validator.mjs.map +1 -1
- package/esm/validators/managed-validator.d.mts +1 -1
- package/esm/validators/managed-validator.d.mts.map +1 -1
- package/esm/validators/managed-validator.mjs +1 -1
- package/esm/validators/managed-validator.mjs.map +1 -1
- package/esm/validators/methods/equality-conditional-methods.d.mts +2 -1
- package/esm/validators/methods/equality-conditional-methods.d.mts.map +1 -1
- package/esm/validators/methods/equality-conditional-methods.mjs +1 -1
- package/esm/validators/methods/equality-conditional-methods.mjs.map +1 -1
- package/esm/validators/methods/forbidden-methods.d.mts +1 -1
- package/esm/validators/methods/forbidden-methods.d.mts.map +1 -1
- package/esm/validators/methods/forbidden-methods.mjs +1 -1
- package/esm/validators/methods/forbidden-methods.mjs.map +1 -1
- package/esm/validators/methods/present-methods.d.mts +1 -1
- package/esm/validators/methods/present-methods.d.mts.map +1 -1
- package/esm/validators/methods/present-methods.mjs +1 -1
- package/esm/validators/methods/present-methods.mjs.map +1 -1
- package/esm/validators/methods/required-methods.d.mts +2 -1
- package/esm/validators/methods/required-methods.d.mts.map +1 -1
- package/esm/validators/methods/required-methods.mjs +1 -1
- package/esm/validators/methods/required-methods.mjs.map +1 -1
- package/esm/validators/number-validator.d.mts +1 -1
- package/esm/validators/number-validator.d.mts.map +1 -1
- package/esm/validators/number-validator.mjs +1 -1
- package/esm/validators/number-validator.mjs.map +1 -1
- package/esm/validators/numeric-validator.d.mts +1 -1
- package/esm/validators/numeric-validator.d.mts.map +1 -1
- package/esm/validators/numeric-validator.mjs +1 -1
- package/esm/validators/numeric-validator.mjs.map +1 -1
- package/esm/validators/object-validator.d.mts +1 -1
- package/esm/validators/object-validator.d.mts.map +1 -1
- package/esm/validators/object-validator.mjs +5 -3
- package/esm/validators/object-validator.mjs.map +1 -1
- package/esm/validators/primitive-validator.d.mts +1 -1
- package/esm/validators/primitive-validator.d.mts.map +1 -1
- package/esm/validators/primitive-validator.mjs +1 -1
- package/esm/validators/primitive-validator.mjs.map +1 -1
- package/esm/validators/record-validator.d.mts +1 -1
- package/esm/validators/record-validator.d.mts.map +1 -1
- package/esm/validators/record-validator.mjs +1 -1
- package/esm/validators/record-validator.mjs.map +1 -1
- package/esm/validators/scalar-validator.d.mts +1 -1
- package/esm/validators/scalar-validator.d.mts.map +1 -1
- package/esm/validators/scalar-validator.mjs +1 -1
- package/esm/validators/scalar-validator.mjs.map +1 -1
- package/esm/validators/string-validator.d.mts +1 -1
- package/esm/validators/string-validator.d.mts.map +1 -1
- package/esm/validators/string-validator.mjs +1 -1
- package/esm/validators/string-validator.mjs.map +1 -1
- package/esm/validators/tuple-validator.d.mts +1 -1
- package/esm/validators/tuple-validator.d.mts.map +1 -1
- package/esm/validators/tuple-validator.mjs +1 -1
- package/esm/validators/tuple-validator.mjs.map +1 -1
- package/esm/validators/union-validator.d.mts +1 -1
- package/esm/validators/union-validator.d.mts.map +1 -1
- package/esm/validators/union-validator.mjs +1 -1
- package/esm/validators/union-validator.mjs.map +1 -1
- package/llms-full.txt +49 -47
- package/llms.txt +7 -7
- package/package.json +3 -2
- package/skills/bridge-standard-schema/SKILL.md +1 -1
- package/skills/compose-seal-modifiers/SKILL.md +2 -2
- package/skills/define-structural-shape/SKILL.md +3 -3
- package/skills/define-structural-shape/array-methods.md +1 -1
- package/skills/define-structural-shape/object-methods.md +1 -1
- package/skills/extend-seal-with-plugins/SKILL.md +3 -3
- package/skills/generate-json-schema/SKILL.md +1 -1
- package/skills/handle-seal-errors/SKILL.md +5 -7
- package/skills/overview/SKILL.md +10 -10
- package/skills/pick-seal-primitive/SKILL.md +7 -3
- package/skills/pick-seal-primitive/boolean-methods.md +1 -1
- package/skills/pick-seal-primitive/date-methods.md +1 -1
- package/skills/pick-seal-primitive/number-methods.md +1 -1
- package/skills/pick-seal-primitive/string-methods.md +2 -2
- package/skills/seal-basics/SKILL.md +10 -10
- package/cjs/object-DubGC-xu.cjs.map +0 -1
- package/cjs/required-methods-BOVNRtci.cjs.map +0 -1
- package/cjs/string-DpDpgefH.cjs.map +0 -1
- package/esm/helpers/index.d.mts +0 -5
- package/esm/mutators/index.d.mts +0 -7
- package/esm/rules/array/index.d.mts +0 -1
- package/esm/rules/color/index.d.mts +0 -1
- package/esm/rules/common/index.d.mts +0 -6
- package/esm/rules/conditional/index.d.mts +0 -10
- package/esm/rules/core/index.d.mts +0 -5
- package/esm/rules/date/index.d.mts +0 -7
- package/esm/rules/file/index.d.mts +0 -2
- package/esm/rules/index.d.mts +0 -45
- package/esm/rules/length/index.d.mts +0 -1
- package/esm/rules/number/index.d.mts +0 -1
- package/esm/rules/string/index.d.mts +0 -11
- package/esm/standard-schema/index.d.mts +0 -3
- package/esm/types/index.d.mts +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,40 @@ All notable changes to `@warlock.js/seal` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
+
## 5.30.0 - 2026-10-16
|
|
8
|
+
|
|
9
|
+
### Upgrading
|
|
10
|
+
|
|
11
|
+
- **BREAKING (types only):** `validate()` now returns a result narrowed on `isValid`. On success `data` is `Infer.Output<typeof schema>`, on failure it is `undefined`. Code that read `result.data` without checking `isValid`, or assigned it to an unrelated type, may need a check or a cast. A schema typed as bare `BaseValidator`/`ObjectValidator` keeps `data: any`.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `TypedValidationResult<T>` and `ValidatedOutput<T>` types.
|
|
16
|
+
- `pnpm bench:types` measures inference compile cost on a generated composed-schema project (16 entities, 8 services) and fails when instantiations or types grow more than 5% over `bench/types-baseline.json` (WR-001). It also fails when it cannot read a metric or is given a malformed option, warns when the TypeScript version differs from the baseline's (`--strict` makes that a failure), and removes its temporary project on Ctrl+C.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- `validate()` takes `data: unknown` instead of `any`.
|
|
21
|
+
- `Infer.Input`/`Infer.Output` of an object is one flat object type instead of an intersection of its optional and required halves; the shape is unchanged and compile cost moves by 0.1%.
|
|
22
|
+
- `pnpm typecheck` now also checks the `expectTypeOf` assertions in `tests/unit/types/` (`tsconfig.typecheck.json`); they were never enforced before.
|
|
23
|
+
- `.refine()` callbacks stay `value: any` on purpose: custom rules run before an object or array validates its children, so the value is not the schema output (WR-020).
|
|
24
|
+
- **Behaviour change:** `v.union([...])` now checks a present empty value (`""`) against its members instead of accepting it unchecked; a missing key is still the required/`.optional()` question. `v.union([v.literal("x"), v.int()]).present()` now rejects `""`.
|
|
25
|
+
- `validate()` keeps the typed output of `v.record(...)` (`Record<string, …>`); only an index signature over `any`/`unknown` (the wide `Schema`) stays `any`.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- `v.literal("")` accepts a present `""` again (regressed in 5.25): its default (implicit) required state and `.present()` keep it, `.optional()` and `.nullable()` no longer drop it. An explicit `.required()` or `requiredIf(...)` still rejects `""`. A literal set without a blank value still reads `""` as missing (WR-008).
|
|
30
|
+
- A field with an empty default (`v.string().max(n).default("")`) no longer fails "is required" when the input omits it, sends `null`, or sends a blank string (an untouched HTML input); the output is the default (WR-008).
|
|
31
|
+
- A `null` default no longer satisfies "required" on a field that is not `.nullable()`, and an empty default of the wrong type (`v.int().default("")`) now fails the type rule instead of being returned unchecked.
|
|
32
|
+
- `v.discriminatedUnion(...).optional()` accepts an absent, `undefined` or `null` field, as every other validator does; `.default(...)` replaces `null` too and is validated through its branch. A required union reports a missing or `null` field with the `required` error; `.nullable()` keeps `null` (WR-007).
|
|
33
|
+
- `schema["~standard"].validate(...)` on a discriminated union resolves to the branch output union instead of `unknown` (WR-020).
|
|
34
|
+
|
|
35
|
+
## 5.29.0 - 2026-10-01
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- Lockstep release; package APIs are unchanged. Skills refer to other topics by name instead of file paths, so cross-references keep working after `agent-kit` copies them into an app.
|
|
40
|
+
|
|
7
41
|
## 5.28.0 - 2026-10-01
|
|
8
42
|
|
|
9
43
|
### Fixed
|
package/README.md
CHANGED
|
@@ -192,6 +192,8 @@ v.string().refine(async value => {
|
|
|
192
192
|
});
|
|
193
193
|
```
|
|
194
194
|
|
|
195
|
+
The callback's `value` is typed `any` on purpose: custom rules run before an object or array validates its children, so the value is the (mutated) input, not the schema output. Check the shape you rely on.
|
|
196
|
+
|
|
195
197
|
### ✅ Mutators & Transformers
|
|
196
198
|
|
|
197
199
|
Normalize input and format output:
|
package/cjs/index.cjs
CHANGED
|
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
}) : target, mod));
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
|
-
const require_required_methods = require('./required-methods-
|
|
30
|
-
const require_object = require('./object
|
|
31
|
-
const require_string = require('./string-
|
|
29
|
+
const require_required_methods = require('./required-methods-DYsRO9aZ.cjs');
|
|
30
|
+
const require_object = require('./object--LXRt5RF.cjs');
|
|
31
|
+
const require_string = require('./string-DsqnKoSB.cjs');
|
|
32
32
|
let _mongez_reinforcements = require("@mongez/reinforcements");
|
|
33
33
|
let _mongez_supportive_is = require("@mongez/supportive-is");
|
|
34
34
|
let dayjs = require("dayjs");
|
|
35
35
|
dayjs = __toESM(dayjs, 1);
|
|
36
36
|
|
|
37
|
-
//#region
|
|
37
|
+
//#region ../../packages/seal/src/validators/any-validator.ts
|
|
38
38
|
/**
|
|
39
39
|
* Any validator - accepts any value
|
|
40
40
|
*/
|
|
@@ -64,7 +64,7 @@ var AnyValidator = class extends require_required_methods.BaseValidator {
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
//#endregion
|
|
67
|
-
//#region
|
|
67
|
+
//#region ../../packages/seal/src/mutators/array-mutators.ts
|
|
68
68
|
/** Reverse array order */
|
|
69
69
|
const flipArrayMutator = async (value) => {
|
|
70
70
|
return value.reverse();
|
|
@@ -99,7 +99,7 @@ const removeEmptyArrayElementsMutator = async (value) => {
|
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
//#endregion
|
|
102
|
-
//#region
|
|
102
|
+
//#region ../../packages/seal/src/rules/scalar/accepted-rule.ts
|
|
103
103
|
/**
|
|
104
104
|
* The full set of values treated as "accepted" by `acceptedRule` and its
|
|
105
105
|
* conditional variants. Shared with `formBooleanMutator` (see
|
|
@@ -215,7 +215,7 @@ const acceptedWithoutRule = {
|
|
|
215
215
|
};
|
|
216
216
|
|
|
217
217
|
//#endregion
|
|
218
|
-
//#region
|
|
218
|
+
//#region ../../packages/seal/src/rules/scalar/declined-rule.ts
|
|
219
219
|
/**
|
|
220
220
|
* The full set of values treated as "declined" by `declinedRule` and its
|
|
221
221
|
* conditional variants. Shared with `formBooleanMutator` (see
|
|
@@ -331,7 +331,7 @@ const declinedWithoutRule = {
|
|
|
331
331
|
};
|
|
332
332
|
|
|
333
333
|
//#endregion
|
|
334
|
-
//#region
|
|
334
|
+
//#region ../../packages/seal/src/mutators/boolean-mutators.ts
|
|
335
335
|
/**
|
|
336
336
|
* Coerce a query-string-shaped boolean into a real boolean.
|
|
337
337
|
*
|
|
@@ -366,7 +366,7 @@ const formBooleanMutator = async (value) => {
|
|
|
366
366
|
};
|
|
367
367
|
|
|
368
368
|
//#endregion
|
|
369
|
-
//#region
|
|
369
|
+
//#region ../../packages/seal/src/mutators/date-mutators.ts
|
|
370
370
|
/**
|
|
371
371
|
* Convert value to Date object
|
|
372
372
|
* Returns Invalid Date if value cannot be converted
|
|
@@ -475,7 +475,7 @@ const toEndOfYearMutator = async (value) => {
|
|
|
475
475
|
};
|
|
476
476
|
|
|
477
477
|
//#endregion
|
|
478
|
-
//#region
|
|
478
|
+
//#region ../../packages/seal/src/mutators/number-mutators.ts
|
|
479
479
|
/** Convert value to number */
|
|
480
480
|
const numberMutator = async (value) => {
|
|
481
481
|
if (!value) return value;
|
|
@@ -531,14 +531,14 @@ const toFixedMutator = async (value, context) => {
|
|
|
531
531
|
};
|
|
532
532
|
|
|
533
533
|
//#endregion
|
|
534
|
-
//#region
|
|
534
|
+
//#region ../../packages/seal/src/mutators/scalar-mutators.ts
|
|
535
535
|
const stringMutator = async (value) => {
|
|
536
536
|
if ([void 0, null].includes(value)) return value;
|
|
537
537
|
return String(value);
|
|
538
538
|
};
|
|
539
539
|
|
|
540
540
|
//#endregion
|
|
541
|
-
//#region
|
|
541
|
+
//#region ../../packages/seal/src/validators/array-validator.ts
|
|
542
542
|
/**
|
|
543
543
|
* Array validator class
|
|
544
544
|
*/
|
|
@@ -710,7 +710,7 @@ var ArrayValidator = class extends require_required_methods.BaseValidator {
|
|
|
710
710
|
};
|
|
711
711
|
|
|
712
712
|
//#endregion
|
|
713
|
-
//#region
|
|
713
|
+
//#region ../../packages/seal/src/validators/boolean-validator.ts
|
|
714
714
|
/**
|
|
715
715
|
* Boolean validator class
|
|
716
716
|
*
|
|
@@ -874,7 +874,7 @@ var BooleanValidator = class extends require_string.PrimitiveValidator {
|
|
|
874
874
|
};
|
|
875
875
|
|
|
876
876
|
//#endregion
|
|
877
|
-
//#region
|
|
877
|
+
//#region ../../packages/seal/src/validators/date-validator.ts
|
|
878
878
|
/**
|
|
879
879
|
* Date validator class
|
|
880
880
|
*/
|
|
@@ -1495,7 +1495,7 @@ var DateValidator = class extends require_required_methods.BaseValidator {
|
|
|
1495
1495
|
};
|
|
1496
1496
|
|
|
1497
1497
|
//#endregion
|
|
1498
|
-
//#region
|
|
1498
|
+
//#region ../../packages/seal/src/validators/literal-validator.ts
|
|
1499
1499
|
/**
|
|
1500
1500
|
* Literal validator class
|
|
1501
1501
|
*
|
|
@@ -1513,9 +1513,11 @@ var DateValidator = class extends require_required_methods.BaseValidator {
|
|
|
1513
1513
|
var LiteralValidator = class extends require_required_methods.BaseValidator {
|
|
1514
1514
|
constructor(values, errorMessage) {
|
|
1515
1515
|
super();
|
|
1516
|
-
this.blankIsMissing = true;
|
|
1517
1516
|
this.values = values;
|
|
1518
1517
|
this.addMutableRule(require_required_methods.literalRule, errorMessage, { values });
|
|
1518
|
+
const acceptsBlank = values.some((value) => typeof value === "string" && value.trim() === "");
|
|
1519
|
+
this.blankIsMissing = !acceptsBlank;
|
|
1520
|
+
if (acceptsBlank) this.requiredRule = this.createRule(require_required_methods.presentRule);
|
|
1519
1521
|
}
|
|
1520
1522
|
/**
|
|
1521
1523
|
* Check if value is one of the configured literals
|
|
@@ -1557,7 +1559,7 @@ var LiteralValidator = class extends require_required_methods.BaseValidator {
|
|
|
1557
1559
|
};
|
|
1558
1560
|
|
|
1559
1561
|
//#endregion
|
|
1560
|
-
//#region
|
|
1562
|
+
//#region ../../packages/seal/src/validators/discriminated-union-validator.ts
|
|
1561
1563
|
/** Whether a value read from the payload can be a discriminator key. */
|
|
1562
1564
|
function isDiscriminatorValue(value) {
|
|
1563
1565
|
return typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
@@ -1627,6 +1629,11 @@ var DiscriminatedUnionValidator = class DiscriminatedUnionValidator extends requ
|
|
|
1627
1629
|
errors: [],
|
|
1628
1630
|
data: null
|
|
1629
1631
|
};
|
|
1632
|
+
if (data == null) {
|
|
1633
|
+
const fallback = this.getDefaultValue();
|
|
1634
|
+
if (fallback == null) return super.validate(void 0, context);
|
|
1635
|
+
data = fallback;
|
|
1636
|
+
}
|
|
1630
1637
|
if (!(0, _mongez_supportive_is.isPlainObject)(data)) return {
|
|
1631
1638
|
isValid: false,
|
|
1632
1639
|
errors: [{
|
|
@@ -1679,7 +1686,7 @@ var DiscriminatedUnionValidator = class DiscriminatedUnionValidator extends requ
|
|
|
1679
1686
|
};
|
|
1680
1687
|
|
|
1681
1688
|
//#endregion
|
|
1682
|
-
//#region
|
|
1689
|
+
//#region ../../packages/seal/src/validators/number-validator.ts
|
|
1683
1690
|
/**
|
|
1684
1691
|
* Number validator class - base for Int and Float validators
|
|
1685
1692
|
*/
|
|
@@ -1999,7 +2006,7 @@ var NumberValidator = class extends require_string.PrimitiveValidator {
|
|
|
1999
2006
|
};
|
|
2000
2007
|
|
|
2001
2008
|
//#endregion
|
|
2002
|
-
//#region
|
|
2009
|
+
//#region ../../packages/seal/src/validators/float-validator.ts
|
|
2003
2010
|
/**
|
|
2004
2011
|
* Float validator class
|
|
2005
2012
|
*/
|
|
@@ -2011,7 +2018,7 @@ var FloatValidator = class extends NumberValidator {
|
|
|
2011
2018
|
};
|
|
2012
2019
|
|
|
2013
2020
|
//#endregion
|
|
2014
|
-
//#region
|
|
2021
|
+
//#region ../../packages/seal/src/validators/instanceof-validator.ts
|
|
2015
2022
|
/**
|
|
2016
2023
|
* InstanceOf validator class
|
|
2017
2024
|
*
|
|
@@ -2069,7 +2076,7 @@ var InstanceOfValidator = class extends require_required_methods.BaseValidator {
|
|
|
2069
2076
|
};
|
|
2070
2077
|
|
|
2071
2078
|
//#endregion
|
|
2072
|
-
//#region
|
|
2079
|
+
//#region ../../packages/seal/src/validators/int-validator.ts
|
|
2073
2080
|
/**
|
|
2074
2081
|
* Integer validator class
|
|
2075
2082
|
*/
|
|
@@ -2093,7 +2100,7 @@ var IntValidator = class extends NumberValidator {
|
|
|
2093
2100
|
};
|
|
2094
2101
|
|
|
2095
2102
|
//#endregion
|
|
2096
|
-
//#region
|
|
2103
|
+
//#region ../../packages/seal/src/validators/lazy-validator.ts
|
|
2097
2104
|
/**
|
|
2098
2105
|
* Lazy validator — defers resolution of the inner validator until validate-time.
|
|
2099
2106
|
*
|
|
@@ -2174,7 +2181,7 @@ var LazyValidator = class extends require_required_methods.BaseValidator {
|
|
|
2174
2181
|
};
|
|
2175
2182
|
|
|
2176
2183
|
//#endregion
|
|
2177
|
-
//#region
|
|
2184
|
+
//#region ../../packages/seal/src/validators/managed-validator.ts
|
|
2178
2185
|
/**
|
|
2179
2186
|
* Managed field validator
|
|
2180
2187
|
*
|
|
@@ -2209,7 +2216,7 @@ var ManagedValidator = class extends require_object.ComputedValidator {
|
|
|
2209
2216
|
};
|
|
2210
2217
|
|
|
2211
2218
|
//#endregion
|
|
2212
|
-
//#region
|
|
2219
|
+
//#region ../../packages/seal/src/validators/numeric-validator.ts
|
|
2213
2220
|
/**
|
|
2214
2221
|
* Numeric validator class - base for Int and Float validators either as number or string
|
|
2215
2222
|
*/
|
|
@@ -2230,7 +2237,7 @@ var NumericValidator = class extends NumberValidator {
|
|
|
2230
2237
|
};
|
|
2231
2238
|
|
|
2232
2239
|
//#endregion
|
|
2233
|
-
//#region
|
|
2240
|
+
//#region ../../packages/seal/src/validators/record-validator.ts
|
|
2234
2241
|
/**
|
|
2235
2242
|
* Record validator class - validates objects with dynamic keys and consistent value types
|
|
2236
2243
|
*
|
|
@@ -2331,7 +2338,7 @@ var RecordValidator = class extends require_required_methods.BaseValidator {
|
|
|
2331
2338
|
};
|
|
2332
2339
|
|
|
2333
2340
|
//#endregion
|
|
2334
|
-
//#region
|
|
2341
|
+
//#region ../../packages/seal/src/validators/scalar-validator.ts
|
|
2335
2342
|
/**
|
|
2336
2343
|
* Scalar validator class
|
|
2337
2344
|
*
|
|
@@ -2491,7 +2498,7 @@ var ScalarValidator = class extends require_string.PrimitiveValidator {
|
|
|
2491
2498
|
};
|
|
2492
2499
|
|
|
2493
2500
|
//#endregion
|
|
2494
|
-
//#region
|
|
2501
|
+
//#region ../../packages/seal/src/validators/tuple-validator.ts
|
|
2495
2502
|
/**
|
|
2496
2503
|
* Tuple validator class - validates fixed-length arrays with position-specific types
|
|
2497
2504
|
*
|
|
@@ -2615,7 +2622,7 @@ var TupleValidator = class extends require_required_methods.BaseValidator {
|
|
|
2615
2622
|
};
|
|
2616
2623
|
|
|
2617
2624
|
//#endregion
|
|
2618
|
-
//#region
|
|
2625
|
+
//#region ../../packages/seal/src/validators/union-validator.ts
|
|
2619
2626
|
/**
|
|
2620
2627
|
* Union validator class - validates value against multiple validator types
|
|
2621
2628
|
*
|
|
@@ -2674,7 +2681,7 @@ var UnionValidator = class extends require_required_methods.BaseValidator {
|
|
|
2674
2681
|
};
|
|
2675
2682
|
|
|
2676
2683
|
//#endregion
|
|
2677
|
-
//#region
|
|
2684
|
+
//#region ../../packages/seal/src/factory/validators.ts
|
|
2678
2685
|
/**
|
|
2679
2686
|
* Seal factory object - creates instances of validators
|
|
2680
2687
|
*
|
|
@@ -2778,7 +2785,7 @@ const v = {
|
|
|
2778
2785
|
};
|
|
2779
2786
|
|
|
2780
2787
|
//#endregion
|
|
2781
|
-
//#region
|
|
2788
|
+
//#region ../../packages/seal/src/plugins/plugin-system.ts
|
|
2782
2789
|
/**
|
|
2783
2790
|
* Registry of installed plugins
|
|
2784
2791
|
*/
|