@warlock.js/notifications 5.3.1 → 5.4.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/cjs/{esm-FB2hc0-o.cjs → esm-wqNYY39K.cjs} +99 -99
- package/cjs/{esm-FB2hc0-o.cjs.map → esm-wqNYY39K.cjs.map} +1 -1
- package/cjs/index.cjs +1 -1
- package/cjs/rabbitmq-driver-CikFalFh.cjs +3 -0
- package/esm/index.d.mts +4 -4
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/communicators/broker-registry.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/communicators/broker-registry.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/communicators/broker.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/communicators/broker.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/decorators/consumable.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/decorators/consumable.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-channel.mjs +3 -3
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-channel.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-driver.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-driver.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/message-managers/event-consumer.mjs +3 -3
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/message-managers/event-consumer.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/message-managers/event-message.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/message-managers/event-message.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/message-managers/prepare-consumer-subscription.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/message-managers/prepare-consumer-subscription.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/use-case-broadcast.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/use-case-broadcast.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/utils/connect-to-broker.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/utils/connect-to-broker.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/config.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/config.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/factory/validate.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/factory/validate.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/factory/validators.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/factory/validators.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/helpers/date-helpers.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/helpers/date-helpers.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/helpers/get-field-value.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/helpers/get-field-value.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/helpers/is-empty-value.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/helpers/is-empty-value.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/helpers/path-helpers.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/helpers/path-helpers.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/helpers/validation-helpers.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/helpers/validation-helpers.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/array-mutators.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/array-mutators.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/date-mutators.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/date-mutators.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/number-mutators.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/number-mutators.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/object-mutators.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/object-mutators.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/scalar-mutators.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/scalar-mutators.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/string-mutators.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/string-mutators.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/array/array-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/array/array-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/color/color-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/color/color-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/enum.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/enum.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/equals-field-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/equals-field-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/instanceof.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/instanceof.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/literal.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/literal.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/type-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/type-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/unknown-key.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/unknown-key.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/forbidden-if-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/forbidden-if-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/present-if-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/present-if-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/present-unless-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/present-unless-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/present-with-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/present-with-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/present-without-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/present-without-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/required-if-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/required-if-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/required-unless-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/required-unless-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/required-when-rule.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/required-when-rule.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/required-with-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/required-with-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/required-without-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/required-without-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/core/equal.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/core/equal.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/core/forbidden.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/core/forbidden.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/core/required.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/core/required.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/core/union.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/core/union.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/core/when.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/core/when.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-comparison-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-comparison-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-day-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-day-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-field-comparison-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-field-comparison-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-period-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-period-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-relative-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-relative-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-special-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date-special-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/date.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/length/length-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/length/length-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/number/number-rules.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/number/number-rules.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/scalar/accepted-rule.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/scalar/accepted-rule.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/scalar/declined-rule.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/scalar/declined-rule.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/alpha.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/alpha.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/credit-card.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/credit-card.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/email.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/email.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/id-formats.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/id-formats.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/ip.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/ip.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/pattern.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/pattern.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/string-comparison.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/string-comparison.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/strong-password-rule.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/strong-password-rule.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/url.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/url.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/without-whitespace.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/without-whitespace.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/standard-schema/json-schema.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/standard-schema/json-schema.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/standard-schema/json-schema.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/standard-schema/json-schema.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/standard-schema/map-result.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/standard-schema/map-result.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/standard-schema/types.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/standard-schema/types.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/conditional-types.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/conditional-types.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/context-types.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/context-types.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/data-transformer-types.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/data-transformer-types.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/date-types.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/date-types.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/mutator-types.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/mutator-types.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/result-types.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/result-types.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/rule-types.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/rule-types.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/schema-types.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/types/schema-types.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/any-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/any-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/array-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/array-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/base-validator.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/base-validator.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/base-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/base-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/boolean-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/boolean-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/computed-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/computed-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/date-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/date-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/discriminated-union-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/discriminated-union-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/float-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/float-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/instanceof-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/instanceof-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/int-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/int-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/lazy-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/lazy-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/literal-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/literal-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/managed-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/managed-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/equality-conditional-methods.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/equality-conditional-methods.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/equality-conditional-methods.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/equality-conditional-methods.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/forbidden-methods.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/forbidden-methods.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/forbidden-methods.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/forbidden-methods.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/present-methods.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/present-methods.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/present-methods.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/present-methods.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.d.mts +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.d.mts.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/number-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/number-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/numeric-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/numeric-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/object-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/object-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/primitive-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/primitive-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/record-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/record-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/scalar-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/scalar-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/string-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/string-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/tuple-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/tuple-validator.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/union-validator.mjs +1 -1
- package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/union-validator.mjs.map +1 -1
- package/esm/queue/load-herald.mjs +1 -1
- package/package.json +6 -6
- package/cjs/rabbitmq-driver-CIvkulXX.cjs +0 -3
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/communicators/broker-registry.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/communicators/broker.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/communicators/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/contracts/broker-driver.contract.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/contracts/channel.contract.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/decorators/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/drivers/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-channel.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-driver.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/index.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/message-managers/event-consumer.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/message-managers/event-message.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/message-managers/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/types/channel.types.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/types/registry.types.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/utils/connect-to-broker.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_herald@5.2.4_@s_301a5eb076404f4e7a51af7b45e7e429 → @warlock.js_herald@5.3.1_@s_00df530f11ab3a5e53db46d40b714c55}/node_modules/@warlock.js/herald/esm/utils/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/factory/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/helpers/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/index.d.mts +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/mutators/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/array/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/color/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/common/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/conditional/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/core/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/date/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/file/dimensions.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/file/file-size.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/file/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/length/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/number/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/scalar/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/rules/string/matches.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@warlock.js_seal@5.2.4 → @warlock.js_seal@5.3.1}/node_modules/@warlock.js/seal/esm/validators/index.mjs +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.2.4/node_modules/@warlock.js/seal/esm/validators/base-validator.mjs"],"sourcesContent":["import { validate } from \"../factory/validate.mjs\";\nimport { VALID_RULE, invalidRule } from \"../helpers/validation-helpers.mjs\";\nimport \"../helpers/index.mjs\";\nimport { isEmptyValue } from \"../helpers/is-empty-value.mjs\";\nimport { requiredRule } from \"../rules/core/required.mjs\";\nimport { mapToStandardResult } from \"../standard-schema/map-result.mjs\";\nimport { clone } from \"@mongez/reinforcements\";\n\n//#region ../seal/src/validators/base-validator.ts\n/**\n* Base validator class - foundation for all validators\n*/\nvar BaseValidator = class {\n\tconstructor() {\n\t\tthis.rules = [];\n\t\tthis.mutators = [];\n\t\tthis.shouldOmit = false;\n\t\tthis.isNullable = false;\n\t\tthis.isMutable = false;\n\t\tthis.hasCatch = false;\n\t\tthis.isOptional = false;\n\t\tthis.requiredRule = this.createRule(requiredRule);\n\t\tthis.dataTransformers = [];\n\t\tthis.attributesText = {};\n\t\tthis.translatedAttributes = {};\n\t}\n\t/**\n\t* Mark the validator as mutable\n\t*/\n\tget mutable() {\n\t\tthis.isMutable = true;\n\t\treturn this;\n\t}\n\t/**\n\t* Mark the validator as immutable\n\t*/\n\tget immutable() {\n\t\tthis.isMutable = false;\n\t\treturn this;\n\t}\n\t/**\n\t* Get the instance to apply changes to.\n\t* By default (immutable), returns a clone so the original is unchanged.\n\t* When `.mutable` is set, returns `this` to mutate in place.\n\t*/\n\tget instance() {\n\t\treturn this.isMutable ? this : this.clone();\n\t}\n\t/**\n\t* Get the default value\n\t* Supports lazy evaluation via callbacks\n\t*/\n\tgetDefaultValue() {\n\t\treturn typeof this.defaultValue === \"function\" ? this.defaultValue() : this.defaultValue;\n\t}\n\t/**\n\t* Allow null as a valid value.\n\t*\n\t* Brands the return type with `{ isNullable: true }` so `Infer<>` widens\n\t* the inferred output to include `| null`.\n\t*/\n\tnullable() {\n\t\tconst instance = this.instance;\n\t\tinstance.isNullable = true;\n\t\treturn instance;\n\t}\n\t/**\n\t* Explicitly disallow null values after calling nullable.\n\t*\n\t* Brands the return type with `{ isNullable: false }` to cancel any prior\n\t* `.nullable()` at the type level.\n\t*/\n\tnotNullable() {\n\t\tconst instance = this.instance;\n\t\tinstance.isNullable = false;\n\t\treturn instance;\n\t}\n\t/**\n\t* Add transformer with optional options\n\t*\n\t* @param transform - The transformer callback function\n\t* @param options - Optional options to pass to the transformer\n\t*\n\t* @example\n\t* ```ts\n\t* // Without options\n\t* v.date().addTransformer(data => data.toISOString())\n\t*\n\t* // With options\n\t* v.date().addTransformer(\n\t* (data, { options }) => dayjs(data).format(options.format),\n\t* { format: 'YYYY-MM-DD' }\n\t* )\n\t* ```\n\t*/\n\taddTransformer(transform, options = {}) {\n\t\tconst instance = this.instance;\n\t\tinstance.addMutableTransformer(transform, options);\n\t\treturn instance;\n\t}\n\t/**\n\t* Add transformer with optional options\n\t*\n\t* @param transform - The transformer callback function\n\t* @param options - Optional options to pass to the transformer\n\t*\n\t* @example\n\t* ```ts\n\t* // Without options\n\t* v.date().addTransformer(data => data.toISOString())\n\t*\n\t* // With options\n\t* v.date().addTransformer(\n\t* (data, { options }) => dayjs(data).format(options.format),\n\t* { format: 'YYYY-MM-DD' }\n\t* )\n\t* ```\n\t*/\n\taddMutableTransformer(transform, options = {}) {\n\t\tthis.dataTransformers.push({\n\t\t\ttransform,\n\t\t\toptions\n\t\t});\n\t}\n\t/**\n\t* Transform the output value - simple one-time transformation\n\t*\n\t* @param callback - Simple callback receiving data and context\n\t*\n\t* @example\n\t* ```ts\n\t* // Simple transformation\n\t* v.string().outputAs(data => data.toUpperCase())\n\t*\n\t* // With context\n\t* v.string().outputAs((data, context) => {\n\t* console.log(`Transforming ${context.path}`);\n\t* return data.toLowerCase();\n\t* })\n\t* ```\n\t*/\n\toutputAs(callback) {\n\t\treturn this.addTransformer((data, { context }) => callback(data, context));\n\t}\n\t/**\n\t* Transform output to JSON string\n\t*\n\t* Works with any validator type (string, number, date, object, array, etc.)\n\t*\n\t* @param indent - Optional indentation for pretty printing (default: 0 for compact)\n\t*\n\t* @example\n\t* ```ts\n\t* // Compact JSON\n\t* v.object({ name: v.string() }).toJSON()\n\t* // Output: '{\"name\":\"John\"}'\n\t*\n\t* // Pretty-printed JSON\n\t* v.array(v.object({...})).toJSON(2)\n\t* // Output:\n\t* // [\n\t* // {\n\t* // \"name\": \"John\"\n\t* // }\n\t* // ]\n\t*\n\t* // Works with any type\n\t* v.string().toJSON() // '\"hello\"'\n\t* v.number().toJSON() // '42'\n\t* v.date().toJSON() // '\"2024-10-26T00:00:00.000Z\"'\n\t* ```\n\t*\n\t* @category Transformer\n\t*/\n\ttoJSON(indent) {\n\t\treturn this.addTransformer((data, { options }) => JSON.stringify(data, null, options.indent), { indent: indent ?? 0 });\n\t}\n\t/**\n\t* Start data transformation pipeline\n\t* Context is passed at runtime, not stored\n\t*/\n\tasync startTransformationPipeline(data, context) {\n\t\tfor (const transformer of this.dataTransformers) data = await transformer.transform(data, {\n\t\t\toptions: transformer.options,\n\t\t\tcontext\n\t\t});\n\t\treturn data;\n\t}\n\t/**\n\t* Set attributes text to be replaced on translations\n\t* If the value is an object, it will be used as the attributes list for the rule\n\t* If the value is a string, it will be used as the attributes list for the rule\n\t*\n\t* @example\n\t* v.string().attributes({\n\t* name: \"Name\",\n\t* email: \"Email\",\n\t* });\n\t* // Example 2: Add custom attributes for matches\n\t* v.string().matches(\"confirmPassword\").attributes({\n\t* matches: {\n\t* confirmPassword: \"Confirm Password\",\n\t* },\n\t* });\n\t*/\n\tattributes(attributes) {\n\t\tconst instance = this.instance;\n\t\tfor (const key in attributes) instance.attributesText[key] = attributes[key];\n\t\treturn instance;\n\t}\n\t/**\n\t* Define a lazy getter property for each attribute in the given object and use the config attribute translator\n\t*/\n\ttransAttributes(attributes) {\n\t\tconst instance = this.instance;\n\t\tfor (const key in attributes) instance.translatedAttributes[key] = attributes[key];\n\t\treturn instance;\n\t}\n\t/**\n\t* Add description to the validator\n\t*/\n\tdescribe(description) {\n\t\tconst instance = this.instance;\n\t\tinstance.description = description;\n\t\treturn instance;\n\t}\n\t/**\n\t* Check if this validator can handle the given value's type\n\t* Override this in specific validators to enable type-based routing in union validators\n\t*\n\t* Default: returns true (validator will attempt to validate any type)\n\t*\n\t* @param value - The value to check\n\t* @returns True if this validator can handle this type\n\t*\n\t* @example\n\t* ```ts\n\t* // StringValidator\n\t* public matchesType(value: any): boolean {\n\t* return typeof value === 'string';\n\t* }\n\t*\n\t* // Custom FileValidator\n\t* public matchesType(value: any): boolean {\n\t* return value instanceof UploadedFile;\n\t* }\n\t* ```\n\t*/\n\tmatchesType(_value) {\n\t\treturn true;\n\t}\n\t/**\n\t* Create a copy of this validator with the same configuration\n\t* Copies all rules, mutators, transformers, default values, and settings\n\t*\n\t* @returns A new validator instance with copied configuration\n\t*\n\t* @example\n\t* ```ts\n\t* // Create reusable validator templates\n\t* const baseString = v.string().required().trim().min(3);\n\t* const emailField = baseString.clone().email();\n\t* const usernameField = baseString.clone().alphanumeric().max(20);\n\t*\n\t* // Works with all validators\n\t* const positiveInt = v.int().positive().required();\n\t* const ageField = positiveInt.clone().min(18).max(120);\n\t* ```\n\t*/\n\tclone() {\n\t\tconst Constructor = this.constructor;\n\t\tconst cloned = Object.create(Constructor.prototype);\n\t\tcloned.rules = [...this.rules];\n\t\tcloned.mutators = [...this.mutators];\n\t\tcloned.dataTransformers = [...this.dataTransformers];\n\t\tcloned.defaultValue = this.defaultValue;\n\t\tcloned.shouldOmit = this.shouldOmit;\n\t\tcloned.description = this.description;\n\t\tcloned.attributesText = { ...this.attributesText };\n\t\tcloned.isNullable = this.isNullable;\n\t\tcloned.isOptional = this.isOptional;\n\t\tcloned.requiredRule = this.requiredRule;\n\t\tcloned.catchValue = this.catchValue;\n\t\tcloned.hasCatch = this.hasCatch;\n\t\treturn cloned;\n\t}\n\t/**\n\t* @deprecated This method is no longer needed and does nothing.\n\t* Empty values are now automatically skipped for validation rules by default.\n\t* Only presence validators (required, present, etc.) will check empty values.\n\t* You can safely remove this call from your code.\n\t*/\n\tignoreEmptyValue(_ignoreEmptyValue = true) {\n\t\treturn this;\n\t}\n\t/**\n\t* Omit this field from the validated data output\n\t*\n\t* Field will still be validated but not included in the final result.\n\t* Useful for confirmation fields, captcha, terms acceptance, etc.\n\t*\n\t* @example\n\t* ```ts\n\t* v.object({\n\t* password: v.string().required(),\n\t* confirmPassword: v.string().required().sameAs(\"password\").omit(),\n\t* acceptTerms: v.boolean().required().omit(),\n\t* });\n\t* // Output: { password: \"...\" }\n\t* // confirmPassword and acceptTerms validated but omitted\n\t* ```\n\t*/\n\tomit() {\n\t\tconst instance = this.instance;\n\t\tinstance.shouldOmit = true;\n\t\treturn instance;\n\t}\n\t/**\n\t* @alias omit\n\t*/\n\texclude() {\n\t\treturn this.omit();\n\t}\n\t/**\n\t* Check if this field should be omitted from the output\n\t*/\n\tisOmitted() {\n\t\treturn this.shouldOmit;\n\t}\n\t/**\n\t* Add rule to the validator\n\t*/\n\taddRule(rule, errorMessage, options = {}) {\n\t\tconst instance = this.instance;\n\t\tinstance.addMutableRule(rule, errorMessage, options);\n\t\treturn instance;\n\t}\n\t/**\n\t* Set the required-condition rule for this field.\n\t*\n\t* Unlike addRule(), this does NOT push to rules[]. The rule is stored in the\n\t* dedicated `requiredRule` slot and is prepended to the validation pipeline\n\t* at runtime. Only one required rule can be active per field — this replaces\n\t* any previously set required rule.\n\t*\n\t* Also marks the field as not optional (isOptional = false).\n\t*\n\t* @example\n\t* ```ts\n\t* // Used internally by required(), requiredIf(), requiredWith(), etc.\n\t* BaseValidator.prototype.required = function(msg) {\n\t* return this.setRequiredRule(requiredRule, msg);\n\t* };\n\t* ```\n\t*/\n\tsetRequiredRule(rule, errorMessage, options = {}) {\n\t\tconst instance = this.instance;\n\t\tinstance.isOptional = false;\n\t\tinstance.requiredRule = instance.createRule(rule, errorMessage, options);\n\t\treturn instance;\n\t}\n\t/**\n\t* Add mutable rule\n\t*/\n\taddMutableRule(rule, errorMessage, options = {}) {\n\t\tconst newRule = this.createRule(rule, errorMessage, options);\n\t\tthis.rules.push(newRule);\n\t\treturn newRule;\n\t}\n\t/**\n\t* Create new rule\n\t*/\n\tcreateRule(rule, errorMessage, options = {}) {\n\t\tconst newRule = {\n\t\t\t...clone(rule),\n\t\t\tcontext: {\n\t\t\t\terrorMessage,\n\t\t\t\toptions,\n\t\t\t\tattributesList: this.attributesText,\n\t\t\t\ttranslatedAttributes: this.translatedAttributes,\n\t\t\t\ttranslationParams: {},\n\t\t\t\ttranslatableParams: {}\n\t\t\t}\n\t\t};\n\t\tif (errorMessage) newRule.errorMessage = errorMessage;\n\t\tif (rule.sortOrder === void 0) newRule.sortOrder = this.rules.length + 1;\n\t\treturn newRule;\n\t}\n\t/**\n\t* Use a custom or pre-built validation rule\n\t*\n\t* @param rule - The validation rule to apply\n\t* @param options - Rule options including errorMessage and any rule-specific options\n\t*\n\t* @example\n\t* ```ts\n\t* import { hexColorRule } from \"@warlock.js/seal\";\n\t*\n\t* v.string().useRule(hexColorRule, { errorMessage: \"Invalid color\" });\n\t* ```\n\t*\n\t* @example\n\t* ```ts\n\t* // With rule options\n\t* v.string().useRule(myCustomRule, {\n\t* customOption: true,\n\t* errorMessage: \"Custom validation failed\"\n\t* });\n\t* ```\n\t*/\n\tuseRule(rule, options) {\n\t\tconst { errorMessage, ...ruleOptions } = options || {};\n\t\treturn this.addRule(rule, errorMessage, ruleOptions);\n\t}\n\t/**\n\t* Define custom rule\n\t*/\n\trefine(callback) {\n\t\treturn this.addRule({\n\t\t\tname: \"custom\",\n\t\t\tasync validate(value, context) {\n\t\t\t\tconst result = await callback(value, context);\n\t\t\t\tif (result) {\n\t\t\t\t\tthis.context.errorMessage = result;\n\t\t\t\t\treturn invalidRule(this, context);\n\t\t\t\t}\n\t\t\t\treturn VALID_RULE;\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Add mutator to the validator\n\t*/\n\taddMutator(mutator, options = {}) {\n\t\tconst instance = this.instance;\n\t\tinstance.addMutableMutator(mutator, options);\n\t\treturn instance;\n\t}\n\t/**\n\t* Add mutable mutator\n\t*/\n\taddMutableMutator(mutator, options = {}) {\n\t\tthis.mutators.push({\n\t\t\tmutate: mutator,\n\t\t\tcontext: {\n\t\t\t\toptions,\n\t\t\t\tctx: {}\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Set default value for the field. The default is used when the input is\n\t* absent (`undefined`); it then flows through the rule pipeline.\n\t*\n\t* Brands the return type with `{ hasDefault: true }` so `Infer<>` treats\n\t* the field as guaranteed-present even when chained with `.optional()`.\n\t*/\n\tdefault(value) {\n\t\tconst instance = this.instance;\n\t\tinstance.defaultValue = value;\n\t\treturn instance;\n\t}\n\t/**\n\t* Fallback to a value when validation fails.\n\t*\n\t* Complementary to `.default()`: `.default(x)` fires when input is **absent**,\n\t* `.catch(y)` fires when input is **present but invalid**. Combine them when\n\t* you want both behaviours: `.optional().default(x).catch(y)`.\n\t*\n\t* The fallback can be a value or a callback `(errors, originalInput) => fallback`.\n\t* The callback variant is the only side-channel for the swallowed errors —\n\t* use it to log/alert before the fallback substitutes.\n\t*\n\t* Brands the return type with `{ hasCatch: true }` so `Infer<>` treats the\n\t* field as guaranteed-present (the catch ensures a value will always exist).\n\t*\n\t* **Scope (v1).** Catch is honoured for **leaf validators** (string, number,\n\t* boolean, date, …) and for fields inside containers. It is a **no-op on\n\t* container validators themselves** (`v.object`, `v.array`, `v.record`,\n\t* `v.tuple`, `v.discriminatedUnion`) — those use their own iteration logic\n\t* that bypasses the catch hook in `BaseValidator.validate()`.\n\t*\n\t* @example\n\t* ```ts\n\t* v.int().min(0).catch(3) // bad number → 3\n\t* v.string().in([\"us\", \"eu\"]).catch(\"us\") // unknown enum → \"us\"\n\t* v.string().catch((errors, input) => {\n\t* console.warn(`bad user value: ${JSON.stringify(input)}`, errors);\n\t* return \"anonymous\";\n\t* })\n\t* ```\n\t*/\n\tcatch(fallback) {\n\t\tconst instance = this.instance;\n\t\tinstance.catchValue = fallback;\n\t\tinstance.hasCatch = true;\n\t\treturn instance;\n\t}\n\t/**\n\t* Mutate the data\n\t*/\n\tasync mutate(data, context) {\n\t\tlet mutatedData = data;\n\t\tfor (const mutator of this.mutators) {\n\t\t\tmutator.context.ctx = context;\n\t\t\tmutatedData = await mutator.mutate(mutatedData, mutator.context);\n\t\t}\n\t\treturn mutatedData;\n\t}\n\t/**\n\t* Set the label for the validator that will be matching the :input attribute\n\t*/\n\tlabel(label) {\n\t\tconst instance = this.instance;\n\t\tinstance.attributesText.input = label;\n\t\treturn instance;\n\t}\n\t/**\n\t* Validate the data\n\t*/\n\tasync validate(data, context) {\n\t\tif (data === null && this.isNullable) return {\n\t\t\tisValid: true,\n\t\t\terrors: [],\n\t\t\tdata: null\n\t\t};\n\t\tconst valueForRules = data ?? this.getDefaultValue();\n\t\tconst mutatedData = await this.mutate(valueForRules, context);\n\t\tconst errors = [];\n\t\tlet isValid = true;\n\t\tconst isFirstErrorOnly = context.configurations?.firstErrorOnly ?? true;\n\t\tconst isEmpty = isEmptyValue(valueForRules);\n\t\tconst skipEmptyRules = this.isOptional ? valueForRules === void 0 : isEmpty;\n\t\tconst rulesToRun = this.requiredRule ? [this.requiredRule, ...this.rules] : this.rules;\n\t\tfor (const rule of rulesToRun) {\n\t\t\tif ((rule.requiresValue ?? true) && skipEmptyRules) continue;\n\t\t\tthis.setRuleAttributesList(rule);\n\t\t\tconst result = await rule.validate(mutatedData, context);\n\t\t\tif (result.isValid === false) {\n\t\t\t\tisValid = false;\n\t\t\t\terrors.push({\n\t\t\t\t\ttype: rule.name,\n\t\t\t\t\terror: result.error,\n\t\t\t\t\tinput: result.path ?? context.path\n\t\t\t\t});\n\t\t\t\tif (isFirstErrorOnly) break;\n\t\t\t}\n\t\t}\n\t\tconst result = {\n\t\t\tisValid,\n\t\t\terrors,\n\t\t\tdata: mutatedData !== void 0 ? await this.startTransformationPipeline(mutatedData, context) : void 0\n\t\t};\n\t\tif (result.isValid === false && this.hasCatch) return {\n\t\t\tisValid: true,\n\t\t\terrors: [],\n\t\t\tdata: typeof this.catchValue === \"function\" ? await this.catchValue(result.errors, data) : this.catchValue\n\t\t};\n\t\treturn result;\n\t}\n\t/**\n\t* Set rule attributes list\n\t*/\n\tsetRuleAttributesList(rule) {\n\t\trule.context.attributesList = typeof this.attributesText[rule.name] === \"object\" ? this.attributesText[rule.name] : this.attributesText;\n\t}\n\t/**\n\t* Standard Schema V1 compliance.\n\t*\n\t* Allows this validator to be used with any Standard Schema-aware library\n\t* (OpenAI structured outputs, LangGraph, TanStack Form, Conform, Valibot adapters, etc.)\n\t* without extra adapters.\n\t*\n\t* Delegates to the `validate()` factory so all `configureSeal()` options\n\t* (translations, firstErrorOnly) are picked up automatically at call time.\n\t*\n\t* Includes Standard JSON Schema support via `jsonSchema.input()` / `jsonSchema.output()`.\n\t*\n\t* ## How Standard Schema libraries consume this\n\t*\n\t* You pass the **schema object itself** to the library — they internally read\n\t* `schema[\"~standard\"]`. Do NOT pass `schema[\"~standard\"]` directly.\n\t*\n\t* @example\n\t* ```ts\n\t* const schema = v.object({ name: v.string().required() });\n\t*\n\t* // TanStack Form — pass schema, library reads [\"~standard\"] internally\n\t* const form = useForm({ validators: { onChange: schema } });\n\t*\n\t* // Conform (Remix) — same pattern\n\t* const [form] = useForm({ onValidate({ formData }) {\n\t* return parseWithStandardSchema(formData, { schema });\n\t* }});\n\t*\n\t* // Direct validation (lower level — most apps don't need this)\n\t* const result = await schema[\"~standard\"].validate({ name: \"Hasan\" });\n\t* // → { value: { name: \"Hasan\" } } on success\n\t* // → { issues: [{ message: \"...\", path: [{ key: \"name\" }] }] } on failure\n\t*\n\t* // JSON Schema for OpenAI / LangChain tool calling\n\t* const parameters = schema[\"~standard\"].jsonSchema.input({ target: \"openai-strict\" });\n\t* // → { type: \"object\", properties: {...}, required: [...], additionalProperties: false }\n\t* ```\n\t*\n\t* @note Cross-field rules (sameAs, requiredIf, requiredWith) rely on sibling values\n\t* available in the full validation context. When called on a standalone scalar validator,\n\t* sibling data is absent and those rules will not evaluate correctly.\n\t* Always call on the parent ObjectValidator for full-payload validation.\n\t*/\n\tget [\"~standard\"]() {\n\t\treturn {\n\t\t\tversion: 1,\n\t\t\tvendor: \"seal\",\n\t\t\ttypes: void 0,\n\t\t\tvalidate: async (value) => {\n\t\t\t\treturn mapToStandardResult(await validate(this, value));\n\t\t\t},\n\t\t\tjsonSchema: {\n\t\t\t\tinput: (options) => this.toJsonSchema(options.target),\n\t\t\t\toutput: (options) => this.toJsonSchema(options.target)\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Generate a JSON Schema representation of this validator.\n\t*\n\t* Supports targets: `\"draft-2020-12\"` (default), `\"draft-07\"`, `\"openapi-3.0\"`.\n\t*\n\t* Subclasses override this to describe their specific constraints.\n\t* The base implementation returns `{}` (permissive — accepts anything),\n\t* which is correct for validators with no representable JSON Schema constraints.\n\t*\n\t* @note Rules that cannot be expressed in JSON Schema are silently omitted:\n\t* - Cross-field rules: sameAs, requiredIf, requiredWith, requiredWithout\n\t* - Custom callbacks: refine()\n\t* - Framework-specific runtime rules (core/cascade plugins)\n\t* These rules still run normally at validation time — only absent from JSON Schema.\n\t*\n\t* @example\n\t* ```ts\n\t* v.string().min(3).max(50).toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"string\", minLength: 3, maxLength: 50 }\n\t*\n\t* v.object({ name: v.string().required(), age: v.int().optional() })\n\t* .toJsonSchema(\"draft-07\")\n\t* // → { type: \"object\", properties: { name: { type: \"string\" }, age: { type: \"integer\" } }, required: [\"name\"] }\n\t* ```\n\t*/\n\ttoJsonSchema(_target = \"draft-2020-12\") {\n\t\treturn {};\n\t}\n};\n\n//#endregion\nexport { BaseValidator };\n//# sourceMappingURL=base-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AAYA,IAAI,gBAAgB,MAAM;CACzB,cAAc;EACb,KAAK,QAAQ,CAAC;EACd,KAAK,WAAW,CAAC;EACjB,KAAK,aAAa;EAClB,KAAK,aAAa;EAClB,KAAK,YAAY;EACjB,KAAK,WAAW;EAChB,KAAK,aAAa;EAClB,KAAK,eAAe,KAAK,WAAW,YAAY;EAChD,KAAK,mBAAmB,CAAC;EACzB,KAAK,iBAAiB,CAAC;EACvB,KAAK,uBAAuB,CAAC;CAC9B;;;;CAIA,IAAI,UAAU;EACb,KAAK,YAAY;EACjB,OAAO;CACR;;;;CAIA,IAAI,YAAY;EACf,KAAK,YAAY;EACjB,OAAO;CACR;;;;;;CAMA,IAAI,WAAW;EACd,OAAO,KAAK,YAAY,OAAO,KAAK,MAAM;CAC3C;;;;;CAKA,kBAAkB;EACjB,OAAO,OAAO,KAAK,iBAAiB,aAAa,KAAK,aAAa,IAAI,KAAK;CAC7E;;;;;;;CAOA,WAAW;EACV,MAAM,WAAW,KAAK;EACtB,SAAS,aAAa;EACtB,OAAO;CACR;;;;;;;CAOA,cAAc;EACb,MAAM,WAAW,KAAK;EACtB,SAAS,aAAa;EACtB,OAAO;CACR;;;;;;;;;;;;;;;;;;;CAmBA,eAAe,WAAW,UAAU,CAAC,GAAG;EACvC,MAAM,WAAW,KAAK;EACtB,SAAS,sBAAsB,WAAW,OAAO;EACjD,OAAO;CACR;;;;;;;;;;;;;;;;;;;CAmBA,sBAAsB,WAAW,UAAU,CAAC,GAAG;EAC9C,KAAK,iBAA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AQ,YAAY,KAAK,aAAa,QAAQ,MAAM;IACpD,SAAS,YAAY,KAAK,aAAa,QAAQ,MAAM;GACtD;EACD;CACD;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BA,aAAa,UAAU,iBAAiB;EACvC,OAAO,CAAC;CACT;AACD"}
|
|
1
|
+
{"version":3,"file":"base-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/base-validator.mjs"],"sourcesContent":["import { validate } from \"../factory/validate.mjs\";\nimport { VALID_RULE, invalidRule } from \"../helpers/validation-helpers.mjs\";\nimport \"../helpers/index.mjs\";\nimport { isEmptyValue } from \"../helpers/is-empty-value.mjs\";\nimport { requiredRule } from \"../rules/core/required.mjs\";\nimport { mapToStandardResult } from \"../standard-schema/map-result.mjs\";\nimport { clone } from \"@mongez/reinforcements\";\n\n//#region ../seal/src/validators/base-validator.ts\n/**\n* Base validator class - foundation for all validators\n*/\nvar BaseValidator = class {\n\tconstructor() {\n\t\tthis.rules = [];\n\t\tthis.mutators = [];\n\t\tthis.shouldOmit = false;\n\t\tthis.isNullable = false;\n\t\tthis.isMutable = false;\n\t\tthis.hasCatch = false;\n\t\tthis.isOptional = false;\n\t\tthis.requiredRule = this.createRule(requiredRule);\n\t\tthis.dataTransformers = [];\n\t\tthis.attributesText = {};\n\t\tthis.translatedAttributes = {};\n\t}\n\t/**\n\t* Mark the validator as mutable\n\t*/\n\tget mutable() {\n\t\tthis.isMutable = true;\n\t\treturn this;\n\t}\n\t/**\n\t* Mark the validator as immutable\n\t*/\n\tget immutable() {\n\t\tthis.isMutable = false;\n\t\treturn this;\n\t}\n\t/**\n\t* Get the instance to apply changes to.\n\t* By default (immutable), returns a clone so the original is unchanged.\n\t* When `.mutable` is set, returns `this` to mutate in place.\n\t*/\n\tget instance() {\n\t\treturn this.isMutable ? this : this.clone();\n\t}\n\t/**\n\t* Get the default value\n\t* Supports lazy evaluation via callbacks\n\t*/\n\tgetDefaultValue() {\n\t\treturn typeof this.defaultValue === \"function\" ? this.defaultValue() : this.defaultValue;\n\t}\n\t/**\n\t* Allow null as a valid value.\n\t*\n\t* Brands the return type with `{ isNullable: true }` so `Infer<>` widens\n\t* the inferred output to include `| null`.\n\t*/\n\tnullable() {\n\t\tconst instance = this.instance;\n\t\tinstance.isNullable = true;\n\t\treturn instance;\n\t}\n\t/**\n\t* Explicitly disallow null values after calling nullable.\n\t*\n\t* Brands the return type with `{ isNullable: false }` to cancel any prior\n\t* `.nullable()` at the type level.\n\t*/\n\tnotNullable() {\n\t\tconst instance = this.instance;\n\t\tinstance.isNullable = false;\n\t\treturn instance;\n\t}\n\t/**\n\t* Add transformer with optional options\n\t*\n\t* @param transform - The transformer callback function\n\t* @param options - Optional options to pass to the transformer\n\t*\n\t* @example\n\t* ```ts\n\t* // Without options\n\t* v.date().addTransformer(data => data.toISOString())\n\t*\n\t* // With options\n\t* v.date().addTransformer(\n\t* (data, { options }) => dayjs(data).format(options.format),\n\t* { format: 'YYYY-MM-DD' }\n\t* )\n\t* ```\n\t*/\n\taddTransformer(transform, options = {}) {\n\t\tconst instance = this.instance;\n\t\tinstance.addMutableTransformer(transform, options);\n\t\treturn instance;\n\t}\n\t/**\n\t* Add transformer with optional options\n\t*\n\t* @param transform - The transformer callback function\n\t* @param options - Optional options to pass to the transformer\n\t*\n\t* @example\n\t* ```ts\n\t* // Without options\n\t* v.date().addTransformer(data => data.toISOString())\n\t*\n\t* // With options\n\t* v.date().addTransformer(\n\t* (data, { options }) => dayjs(data).format(options.format),\n\t* { format: 'YYYY-MM-DD' }\n\t* )\n\t* ```\n\t*/\n\taddMutableTransformer(transform, options = {}) {\n\t\tthis.dataTransformers.push({\n\t\t\ttransform,\n\t\t\toptions\n\t\t});\n\t}\n\t/**\n\t* Transform the output value - simple one-time transformation\n\t*\n\t* @param callback - Simple callback receiving data and context\n\t*\n\t* @example\n\t* ```ts\n\t* // Simple transformation\n\t* v.string().outputAs(data => data.toUpperCase())\n\t*\n\t* // With context\n\t* v.string().outputAs((data, context) => {\n\t* console.log(`Transforming ${context.path}`);\n\t* return data.toLowerCase();\n\t* })\n\t* ```\n\t*/\n\toutputAs(callback) {\n\t\treturn this.addTransformer((data, { context }) => callback(data, context));\n\t}\n\t/**\n\t* Transform output to JSON string\n\t*\n\t* Works with any validator type (string, number, date, object, array, etc.)\n\t*\n\t* @param indent - Optional indentation for pretty printing (default: 0 for compact)\n\t*\n\t* @example\n\t* ```ts\n\t* // Compact JSON\n\t* v.object({ name: v.string() }).toJSON()\n\t* // Output: '{\"name\":\"John\"}'\n\t*\n\t* // Pretty-printed JSON\n\t* v.array(v.object({...})).toJSON(2)\n\t* // Output:\n\t* // [\n\t* // {\n\t* // \"name\": \"John\"\n\t* // }\n\t* // ]\n\t*\n\t* // Works with any type\n\t* v.string().toJSON() // '\"hello\"'\n\t* v.number().toJSON() // '42'\n\t* v.date().toJSON() // '\"2024-10-26T00:00:00.000Z\"'\n\t* ```\n\t*\n\t* @category Transformer\n\t*/\n\ttoJSON(indent) {\n\t\treturn this.addTransformer((data, { options }) => JSON.stringify(data, null, options.indent), { indent: indent ?? 0 });\n\t}\n\t/**\n\t* Start data transformation pipeline\n\t* Context is passed at runtime, not stored\n\t*/\n\tasync startTransformationPipeline(data, context) {\n\t\tfor (const transformer of this.dataTransformers) data = await transformer.transform(data, {\n\t\t\toptions: transformer.options,\n\t\t\tcontext\n\t\t});\n\t\treturn data;\n\t}\n\t/**\n\t* Set attributes text to be replaced on translations\n\t* If the value is an object, it will be used as the attributes list for the rule\n\t* If the value is a string, it will be used as the attributes list for the rule\n\t*\n\t* @example\n\t* v.string().attributes({\n\t* name: \"Name\",\n\t* email: \"Email\",\n\t* });\n\t* // Example 2: Add custom attributes for matches\n\t* v.string().matches(\"confirmPassword\").attributes({\n\t* matches: {\n\t* confirmPassword: \"Confirm Password\",\n\t* },\n\t* });\n\t*/\n\tattributes(attributes) {\n\t\tconst instance = this.instance;\n\t\tfor (const key in attributes) instance.attributesText[key] = attributes[key];\n\t\treturn instance;\n\t}\n\t/**\n\t* Define a lazy getter property for each attribute in the given object and use the config attribute translator\n\t*/\n\ttransAttributes(attributes) {\n\t\tconst instance = this.instance;\n\t\tfor (const key in attributes) instance.translatedAttributes[key] = attributes[key];\n\t\treturn instance;\n\t}\n\t/**\n\t* Add description to the validator\n\t*/\n\tdescribe(description) {\n\t\tconst instance = this.instance;\n\t\tinstance.description = description;\n\t\treturn instance;\n\t}\n\t/**\n\t* Check if this validator can handle the given value's type\n\t* Override this in specific validators to enable type-based routing in union validators\n\t*\n\t* Default: returns true (validator will attempt to validate any type)\n\t*\n\t* @param value - The value to check\n\t* @returns True if this validator can handle this type\n\t*\n\t* @example\n\t* ```ts\n\t* // StringValidator\n\t* public matchesType(value: any): boolean {\n\t* return typeof value === 'string';\n\t* }\n\t*\n\t* // Custom FileValidator\n\t* public matchesType(value: any): boolean {\n\t* return value instanceof UploadedFile;\n\t* }\n\t* ```\n\t*/\n\tmatchesType(_value) {\n\t\treturn true;\n\t}\n\t/**\n\t* Create a copy of this validator with the same configuration\n\t* Copies all rules, mutators, transformers, default values, and settings\n\t*\n\t* @returns A new validator instance with copied configuration\n\t*\n\t* @example\n\t* ```ts\n\t* // Create reusable validator templates\n\t* const baseString = v.string().required().trim().min(3);\n\t* const emailField = baseString.clone().email();\n\t* const usernameField = baseString.clone().alphanumeric().max(20);\n\t*\n\t* // Works with all validators\n\t* const positiveInt = v.int().positive().required();\n\t* const ageField = positiveInt.clone().min(18).max(120);\n\t* ```\n\t*/\n\tclone() {\n\t\tconst Constructor = this.constructor;\n\t\tconst cloned = Object.create(Constructor.prototype);\n\t\tcloned.rules = [...this.rules];\n\t\tcloned.mutators = [...this.mutators];\n\t\tcloned.dataTransformers = [...this.dataTransformers];\n\t\tcloned.defaultValue = this.defaultValue;\n\t\tcloned.shouldOmit = this.shouldOmit;\n\t\tcloned.description = this.description;\n\t\tcloned.attributesText = { ...this.attributesText };\n\t\tcloned.isNullable = this.isNullable;\n\t\tcloned.isOptional = this.isOptional;\n\t\tcloned.requiredRule = this.requiredRule;\n\t\tcloned.catchValue = this.catchValue;\n\t\tcloned.hasCatch = this.hasCatch;\n\t\treturn cloned;\n\t}\n\t/**\n\t* @deprecated This method is no longer needed and does nothing.\n\t* Empty values are now automatically skipped for validation rules by default.\n\t* Only presence validators (required, present, etc.) will check empty values.\n\t* You can safely remove this call from your code.\n\t*/\n\tignoreEmptyValue(_ignoreEmptyValue = true) {\n\t\treturn this;\n\t}\n\t/**\n\t* Omit this field from the validated data output\n\t*\n\t* Field will still be validated but not included in the final result.\n\t* Useful for confirmation fields, captcha, terms acceptance, etc.\n\t*\n\t* @example\n\t* ```ts\n\t* v.object({\n\t* password: v.string().required(),\n\t* confirmPassword: v.string().required().sameAs(\"password\").omit(),\n\t* acceptTerms: v.boolean().required().omit(),\n\t* });\n\t* // Output: { password: \"...\" }\n\t* // confirmPassword and acceptTerms validated but omitted\n\t* ```\n\t*/\n\tomit() {\n\t\tconst instance = this.instance;\n\t\tinstance.shouldOmit = true;\n\t\treturn instance;\n\t}\n\t/**\n\t* @alias omit\n\t*/\n\texclude() {\n\t\treturn this.omit();\n\t}\n\t/**\n\t* Check if this field should be omitted from the output\n\t*/\n\tisOmitted() {\n\t\treturn this.shouldOmit;\n\t}\n\t/**\n\t* Add rule to the validator\n\t*/\n\taddRule(rule, errorMessage, options = {}) {\n\t\tconst instance = this.instance;\n\t\tinstance.addMutableRule(rule, errorMessage, options);\n\t\treturn instance;\n\t}\n\t/**\n\t* Set the required-condition rule for this field.\n\t*\n\t* Unlike addRule(), this does NOT push to rules[]. The rule is stored in the\n\t* dedicated `requiredRule` slot and is prepended to the validation pipeline\n\t* at runtime. Only one required rule can be active per field — this replaces\n\t* any previously set required rule.\n\t*\n\t* Also marks the field as not optional (isOptional = false).\n\t*\n\t* @example\n\t* ```ts\n\t* // Used internally by required(), requiredIf(), requiredWith(), etc.\n\t* BaseValidator.prototype.required = function(msg) {\n\t* return this.setRequiredRule(requiredRule, msg);\n\t* };\n\t* ```\n\t*/\n\tsetRequiredRule(rule, errorMessage, options = {}) {\n\t\tconst instance = this.instance;\n\t\tinstance.isOptional = false;\n\t\tinstance.requiredRule = instance.createRule(rule, errorMessage, options);\n\t\treturn instance;\n\t}\n\t/**\n\t* Add mutable rule\n\t*/\n\taddMutableRule(rule, errorMessage, options = {}) {\n\t\tconst newRule = this.createRule(rule, errorMessage, options);\n\t\tthis.rules.push(newRule);\n\t\treturn newRule;\n\t}\n\t/**\n\t* Create new rule\n\t*/\n\tcreateRule(rule, errorMessage, options = {}) {\n\t\tconst newRule = {\n\t\t\t...clone(rule),\n\t\t\tcontext: {\n\t\t\t\terrorMessage,\n\t\t\t\toptions,\n\t\t\t\tattributesList: this.attributesText,\n\t\t\t\ttranslatedAttributes: this.translatedAttributes,\n\t\t\t\ttranslationParams: {},\n\t\t\t\ttranslatableParams: {}\n\t\t\t}\n\t\t};\n\t\tif (errorMessage) newRule.errorMessage = errorMessage;\n\t\tif (rule.sortOrder === void 0) newRule.sortOrder = this.rules.length + 1;\n\t\treturn newRule;\n\t}\n\t/**\n\t* Use a custom or pre-built validation rule\n\t*\n\t* @param rule - The validation rule to apply\n\t* @param options - Rule options including errorMessage and any rule-specific options\n\t*\n\t* @example\n\t* ```ts\n\t* import { hexColorRule } from \"@warlock.js/seal\";\n\t*\n\t* v.string().useRule(hexColorRule, { errorMessage: \"Invalid color\" });\n\t* ```\n\t*\n\t* @example\n\t* ```ts\n\t* // With rule options\n\t* v.string().useRule(myCustomRule, {\n\t* customOption: true,\n\t* errorMessage: \"Custom validation failed\"\n\t* });\n\t* ```\n\t*/\n\tuseRule(rule, options) {\n\t\tconst { errorMessage, ...ruleOptions } = options || {};\n\t\treturn this.addRule(rule, errorMessage, ruleOptions);\n\t}\n\t/**\n\t* Define custom rule\n\t*/\n\trefine(callback) {\n\t\treturn this.addRule({\n\t\t\tname: \"custom\",\n\t\t\tasync validate(value, context) {\n\t\t\t\tconst result = await callback(value, context);\n\t\t\t\tif (result) {\n\t\t\t\t\tthis.context.errorMessage = result;\n\t\t\t\t\treturn invalidRule(this, context);\n\t\t\t\t}\n\t\t\t\treturn VALID_RULE;\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Add mutator to the validator\n\t*/\n\taddMutator(mutator, options = {}) {\n\t\tconst instance = this.instance;\n\t\tinstance.addMutableMutator(mutator, options);\n\t\treturn instance;\n\t}\n\t/**\n\t* Add mutable mutator\n\t*/\n\taddMutableMutator(mutator, options = {}) {\n\t\tthis.mutators.push({\n\t\t\tmutate: mutator,\n\t\t\tcontext: {\n\t\t\t\toptions,\n\t\t\t\tctx: {}\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Set default value for the field. The default is used when the input is\n\t* absent (`undefined`); it then flows through the rule pipeline.\n\t*\n\t* Brands the return type with `{ hasDefault: true }` so `Infer<>` treats\n\t* the field as guaranteed-present even when chained with `.optional()`.\n\t*/\n\tdefault(value) {\n\t\tconst instance = this.instance;\n\t\tinstance.defaultValue = value;\n\t\treturn instance;\n\t}\n\t/**\n\t* Fallback to a value when validation fails.\n\t*\n\t* Complementary to `.default()`: `.default(x)` fires when input is **absent**,\n\t* `.catch(y)` fires when input is **present but invalid**. Combine them when\n\t* you want both behaviours: `.optional().default(x).catch(y)`.\n\t*\n\t* The fallback can be a value or a callback `(errors, originalInput) => fallback`.\n\t* The callback variant is the only side-channel for the swallowed errors —\n\t* use it to log/alert before the fallback substitutes.\n\t*\n\t* Brands the return type with `{ hasCatch: true }` so `Infer<>` treats the\n\t* field as guaranteed-present (the catch ensures a value will always exist).\n\t*\n\t* **Scope (v1).** Catch is honoured for **leaf validators** (string, number,\n\t* boolean, date, …) and for fields inside containers. It is a **no-op on\n\t* container validators themselves** (`v.object`, `v.array`, `v.record`,\n\t* `v.tuple`, `v.discriminatedUnion`) — those use their own iteration logic\n\t* that bypasses the catch hook in `BaseValidator.validate()`.\n\t*\n\t* @example\n\t* ```ts\n\t* v.int().min(0).catch(3) // bad number → 3\n\t* v.string().in([\"us\", \"eu\"]).catch(\"us\") // unknown enum → \"us\"\n\t* v.string().catch((errors, input) => {\n\t* console.warn(`bad user value: ${JSON.stringify(input)}`, errors);\n\t* return \"anonymous\";\n\t* })\n\t* ```\n\t*/\n\tcatch(fallback) {\n\t\tconst instance = this.instance;\n\t\tinstance.catchValue = fallback;\n\t\tinstance.hasCatch = true;\n\t\treturn instance;\n\t}\n\t/**\n\t* Mutate the data\n\t*/\n\tasync mutate(data, context) {\n\t\tlet mutatedData = data;\n\t\tfor (const mutator of this.mutators) {\n\t\t\tmutator.context.ctx = context;\n\t\t\tmutatedData = await mutator.mutate(mutatedData, mutator.context);\n\t\t}\n\t\treturn mutatedData;\n\t}\n\t/**\n\t* Set the label for the validator that will be matching the :input attribute\n\t*/\n\tlabel(label) {\n\t\tconst instance = this.instance;\n\t\tinstance.attributesText.input = label;\n\t\treturn instance;\n\t}\n\t/**\n\t* Validate the data\n\t*/\n\tasync validate(data, context) {\n\t\tif (data === null && this.isNullable) return {\n\t\t\tisValid: true,\n\t\t\terrors: [],\n\t\t\tdata: null\n\t\t};\n\t\tconst valueForRules = data ?? this.getDefaultValue();\n\t\tconst mutatedData = await this.mutate(valueForRules, context);\n\t\tconst errors = [];\n\t\tlet isValid = true;\n\t\tconst isFirstErrorOnly = context.configurations?.firstErrorOnly ?? true;\n\t\tconst isEmpty = isEmptyValue(valueForRules);\n\t\tconst skipEmptyRules = this.isOptional ? valueForRules === void 0 : isEmpty;\n\t\tconst rulesToRun = this.requiredRule ? [this.requiredRule, ...this.rules] : this.rules;\n\t\tfor (const rule of rulesToRun) {\n\t\t\tif ((rule.requiresValue ?? true) && skipEmptyRules) continue;\n\t\t\tthis.setRuleAttributesList(rule);\n\t\t\tconst result = await rule.validate(mutatedData, context);\n\t\t\tif (result.isValid === false) {\n\t\t\t\tisValid = false;\n\t\t\t\terrors.push({\n\t\t\t\t\ttype: rule.name,\n\t\t\t\t\terror: result.error,\n\t\t\t\t\tinput: result.path ?? context.path\n\t\t\t\t});\n\t\t\t\tif (isFirstErrorOnly) break;\n\t\t\t}\n\t\t}\n\t\tconst result = {\n\t\t\tisValid,\n\t\t\terrors,\n\t\t\tdata: mutatedData !== void 0 ? await this.startTransformationPipeline(mutatedData, context) : void 0\n\t\t};\n\t\tif (result.isValid === false && this.hasCatch) return {\n\t\t\tisValid: true,\n\t\t\terrors: [],\n\t\t\tdata: typeof this.catchValue === \"function\" ? await this.catchValue(result.errors, data) : this.catchValue\n\t\t};\n\t\treturn result;\n\t}\n\t/**\n\t* Set rule attributes list\n\t*/\n\tsetRuleAttributesList(rule) {\n\t\trule.context.attributesList = typeof this.attributesText[rule.name] === \"object\" ? this.attributesText[rule.name] : this.attributesText;\n\t}\n\t/**\n\t* Standard Schema V1 compliance.\n\t*\n\t* Allows this validator to be used with any Standard Schema-aware library\n\t* (OpenAI structured outputs, LangGraph, TanStack Form, Conform, Valibot adapters, etc.)\n\t* without extra adapters.\n\t*\n\t* Delegates to the `validate()` factory so all `configureSeal()` options\n\t* (translations, firstErrorOnly) are picked up automatically at call time.\n\t*\n\t* Includes Standard JSON Schema support via `jsonSchema.input()` / `jsonSchema.output()`.\n\t*\n\t* ## How Standard Schema libraries consume this\n\t*\n\t* You pass the **schema object itself** to the library — they internally read\n\t* `schema[\"~standard\"]`. Do NOT pass `schema[\"~standard\"]` directly.\n\t*\n\t* @example\n\t* ```ts\n\t* const schema = v.object({ name: v.string().required() });\n\t*\n\t* // TanStack Form — pass schema, library reads [\"~standard\"] internally\n\t* const form = useForm({ validators: { onChange: schema } });\n\t*\n\t* // Conform (Remix) — same pattern\n\t* const [form] = useForm({ onValidate({ formData }) {\n\t* return parseWithStandardSchema(formData, { schema });\n\t* }});\n\t*\n\t* // Direct validation (lower level — most apps don't need this)\n\t* const result = await schema[\"~standard\"].validate({ name: \"Hasan\" });\n\t* // → { value: { name: \"Hasan\" } } on success\n\t* // → { issues: [{ message: \"...\", path: [{ key: \"name\" }] }] } on failure\n\t*\n\t* // JSON Schema for OpenAI / LangChain tool calling\n\t* const parameters = schema[\"~standard\"].jsonSchema.input({ target: \"openai-strict\" });\n\t* // → { type: \"object\", properties: {...}, required: [...], additionalProperties: false }\n\t* ```\n\t*\n\t* @note Cross-field rules (sameAs, requiredIf, requiredWith) rely on sibling values\n\t* available in the full validation context. When called on a standalone scalar validator,\n\t* sibling data is absent and those rules will not evaluate correctly.\n\t* Always call on the parent ObjectValidator for full-payload validation.\n\t*/\n\tget [\"~standard\"]() {\n\t\treturn {\n\t\t\tversion: 1,\n\t\t\tvendor: \"seal\",\n\t\t\ttypes: void 0,\n\t\t\tvalidate: async (value) => {\n\t\t\t\treturn mapToStandardResult(await validate(this, value));\n\t\t\t},\n\t\t\tjsonSchema: {\n\t\t\t\tinput: (options) => this.toJsonSchema(options.target),\n\t\t\t\toutput: (options) => this.toJsonSchema(options.target)\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Generate a JSON Schema representation of this validator.\n\t*\n\t* Supports targets: `\"draft-2020-12\"` (default), `\"draft-07\"`, `\"openapi-3.0\"`.\n\t*\n\t* Subclasses override this to describe their specific constraints.\n\t* The base implementation returns `{}` (permissive — accepts anything),\n\t* which is correct for validators with no representable JSON Schema constraints.\n\t*\n\t* @note Rules that cannot be expressed in JSON Schema are silently omitted:\n\t* - Cross-field rules: sameAs, requiredIf, requiredWith, requiredWithout\n\t* - Custom callbacks: refine()\n\t* - Framework-specific runtime rules (core/cascade plugins)\n\t* These rules still run normally at validation time — only absent from JSON Schema.\n\t*\n\t* @example\n\t* ```ts\n\t* v.string().min(3).max(50).toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"string\", minLength: 3, maxLength: 50 }\n\t*\n\t* v.object({ name: v.string().required(), age: v.int().optional() })\n\t* .toJsonSchema(\"draft-07\")\n\t* // → { type: \"object\", properties: { name: { type: \"string\" }, age: { type: \"integer\" } }, required: [\"name\"] }\n\t* ```\n\t*/\n\ttoJsonSchema(_target = \"draft-2020-12\") {\n\t\treturn {};\n\t}\n};\n\n//#endregion\nexport { BaseValidator };\n//# sourceMappingURL=base-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AAYA,IAAI,gBAAgB,MAAM;CACzB,cAAc;EACb,KAAK,QAAQ,CAAC;EACd,KAAK,WAAW,CAAC;EACjB,KAAK,aAAa;EAClB,KAAK,aAAa;EAClB,KAAK,YAAY;EACjB,KAAK,WAAW;EAChB,KAAK,aAAa;EAClB,KAAK,eAAe,KAAK,WAAW,YAAY;EAChD,KAAK,mBAAmB,CAAC;EACzB,KAAK,iBAAiB,CAAC;EACvB,KAAK,uBAAuB,CAAC;CAC9B;;;;CAIA,IAAI,UAAU;EACb,KAAK,YAAY;EACjB,OAAO;CACR;;;;CAIA,IAAI,YAAY;EACf,KAAK,YAAY;EACjB,OAAO;CACR;;;;;;CAMA,IAAI,WAAW;EACd,OAAO,KAAK,YAAY,OAAO,KAAK,MAAM;CAC3C;;;;;CAKA,kBAAkB;EACjB,OAAO,OAAO,KAAK,iBAAiB,aAAa,KAAK,aAAa,IAAI,KAAK;CAC7E;;;;;;;CAOA,WAAW;EACV,MAAM,WAAW,KAAK;EACtB,SAAS,aAAa;EACtB,OAAO;CACR;;;;;;;CAOA,cAAc;EACb,MAAM,WAAW,KAAK;EACtB,SAAS,aAAa;EACtB,OAAO;CACR;;;;;;;;;;;;;;;;;;;CAmBA,eAAe,WAAW,UAAU,CAAC,GAAG;EACvC,MAAM,WAAW,KAAK;EACtB,SAAS,sBAAsB,WAAW,OAAO;EACjD,OAAO;CACR;;;;;;;;;;;;;;;;;;;CAmBA,sBAAsB,WAAW,UAAU,CAAC,GAAG;EAC9C,KAAK,iBAAiB,KAAK;GAC1B;GACA;EACD,CAAC;CACF;;;;;;;;;;;;;;;;;;CAkBA,SAAS,UAAU;EAClB,OAAO,KAAK,gBAAgB,MAAM,EAAE,cAAc,SAAS,MAAM,OAAO,CAAC;CA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AiB;EACvC,OAAO,CAAC;CACT;AACD"}
|
|
@@ -6,7 +6,7 @@ import { acceptedIfPresentRule, acceptedIfRequiredRule, acceptedIfRule, accepted
|
|
|
6
6
|
import { declinedIfPresentRule, declinedIfRequiredRule, declinedIfRule, declinedRule, declinedUnlessRule, declinedWithoutRule } from "../rules/scalar/declined-rule.mjs";
|
|
7
7
|
import "../rules/scalar/index.mjs";
|
|
8
8
|
|
|
9
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.
|
|
9
|
+
//#region ../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/boolean-validator.mjs
|
|
10
10
|
/**
|
|
11
11
|
* Boolean validator class
|
|
12
12
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.
|
|
1
|
+
{"version":3,"file":"boolean-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/boolean-validator.mjs"],"sourcesContent":["import { applyNullable } from \"../standard-schema/json-schema.mjs\";\nimport { booleanRule } from \"../rules/common/type-rules.mjs\";\nimport \"../rules/index.mjs\";\nimport { PrimitiveValidator } from \"./primitive-validator.mjs\";\nimport { acceptedIfPresentRule, acceptedIfRequiredRule, acceptedIfRule, acceptedRule, acceptedUnlessRule, acceptedWithoutRule } from \"../rules/scalar/accepted-rule.mjs\";\nimport { declinedIfPresentRule, declinedIfRequiredRule, declinedIfRule, declinedRule, declinedUnlessRule, declinedWithoutRule } from \"../rules/scalar/declined-rule.mjs\";\nimport \"../rules/scalar/index.mjs\";\n\n//#region ../seal/src/validators/boolean-validator.ts\n/**\n* Boolean validator class\n*\n* Extends PrimitiveValidator — inherits enum/in/oneOf/allowsOnly/forbids/notIn.\n* Defines accepted/declined directly as real methods (not ScalarValidator field copies)\n* so they survive cloning correctly.\n*/\nvar BooleanValidator = class extends PrimitiveValidator {\n\tconstructor(errorMessage) {\n\t\tsuper();\n\t\tthis.addMutableRule(booleanRule, errorMessage);\n\t}\n\t/**\n\t* Check if value is a boolean type\n\t*/\n\tmatchesType(value) {\n\t\treturn typeof value === \"boolean\";\n\t}\n\t/** Value must be accepted (true, \"yes\", 1, \"on\", etc.) */\n\taccepted(errorMessage) {\n\t\treturn this.addRule(acceptedRule, errorMessage);\n\t}\n\t/** Value must be accepted if another field equals a value */\n\tacceptedIf(field, value, errorMessage) {\n\t\treturn this.addRule(acceptedIfRule, errorMessage, {\n\t\t\tfield,\n\t\t\tvalue\n\t\t});\n\t}\n\t/** Value must be accepted unless another field equals a value */\n\tacceptedUnless(field, value, errorMessage) {\n\t\treturn this.addRule(acceptedUnlessRule, errorMessage, {\n\t\t\tfield,\n\t\t\tvalue\n\t\t});\n\t}\n\t/** Value must be accepted if another field is required */\n\tacceptedIfRequired(field, errorMessage) {\n\t\treturn this.addRule(acceptedIfRequiredRule, errorMessage, { field });\n\t}\n\t/** Value must be accepted if another field is present */\n\tacceptedIfPresent(field, errorMessage) {\n\t\treturn this.addRule(acceptedIfPresentRule, errorMessage, { field });\n\t}\n\t/** Value must be accepted if another field is missing */\n\tacceptedWithout(field, errorMessage) {\n\t\treturn this.addRule(acceptedWithoutRule, errorMessage, { field });\n\t}\n\t/** Value must be declined (false, \"no\", 0, \"off\", etc.) */\n\tdeclined(errorMessage) {\n\t\treturn this.addRule(declinedRule, errorMessage);\n\t}\n\t/** Value must be declined if another field equals a value */\n\tdeclinedIf(field, value, errorMessage) {\n\t\treturn this.addRule(declinedIfRule, errorMessage, {\n\t\t\tfield,\n\t\t\tvalue\n\t\t});\n\t}\n\t/** Value must be declined unless another field equals a value */\n\tdeclinedUnless(field, value, errorMessage) {\n\t\treturn this.addRule(declinedUnlessRule, errorMessage, {\n\t\t\tfield,\n\t\t\tvalue\n\t\t});\n\t}\n\t/** Value must be declined if another field is required */\n\tdeclinedIfRequired(field, errorMessage) {\n\t\treturn this.addRule(declinedIfRequiredRule, errorMessage, { field });\n\t}\n\t/** Value must be declined if another field is present */\n\tdeclinedIfPresent(field, errorMessage) {\n\t\treturn this.addRule(declinedIfPresentRule, errorMessage, { field });\n\t}\n\t/** Value must be declined if another field is missing */\n\tdeclinedWithout(field, errorMessage) {\n\t\treturn this.addRule(declinedWithoutRule, errorMessage, { field });\n\t}\n\t/**\n\t* Value must be strictly true (not \"yes\", \"on\", 1, etc.)\n\t* @alias accepted - strict version\n\t*/\n\tmustBeTrue(errorMessage) {\n\t\treturn this.equal(true, errorMessage);\n\t}\n\t/**\n\t* Value must be strictly false (not \"no\", \"off\", 0, etc.)\n\t* @alias declined - strict version\n\t*/\n\tmustBeFalse(errorMessage) {\n\t\treturn this.equal(false, errorMessage);\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* @note accepted/declined rules and all cross-field boolean rules\n\t* are not representable in JSON Schema and are silently omitted.\n\t*\n\t* @example\n\t* ```ts\n\t* v.boolean().toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"boolean\" }\n\t*\n\t* v.boolean().nullable().toJsonSchema(\"openapi-3.0\")\n\t* // → { type: \"boolean\", nullable: true }\n\t* ```\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\tconst schema = { type: \"boolean\" };\n\t\tif (this.isNullable) applyNullable(schema, target);\n\t\treturn schema;\n\t}\n};\n\n//#endregion\nexport { BooleanValidator };\n//# sourceMappingURL=boolean-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;AAgBA,IAAI,mBAAmB,cAAc,mBAAmB;CACvD,YAAY,cAAc;EACzB,MAAM;EACN,KAAK,eAAe,aAAa,YAAY;CAC9C;;;;CAIA,YAAY,OAAO;EAClB,OAAO,OAAO,UAAU;CACzB;;CAEA,SAAS,cAAc;EACtB,OAAO,KAAK,QAAQ,cAAc,YAAY;CAC/C;;CAEA,WAAW,OAAO,OAAO,cAA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ACjD,OAAO;CACR;AACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseValidator } from "./base-validator.mjs";
|
|
2
2
|
|
|
3
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.
|
|
3
|
+
//#region ../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/computed-validator.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Computed field validator
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computed-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.
|
|
1
|
+
{"version":3,"file":"computed-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/computed-validator.mjs"],"sourcesContent":["import { BaseValidator } from \"./base-validator.mjs\";\n\n//#region ../seal/src/validators/computed-validator.ts\n/**\n* Computed field validator\n*\n* Computes a value based on other validated fields in the schema.\n* The computed value is persisted and can optionally be validated.\n*\n* @example\n* ```ts\n* // Basic computed field\n* const schema = v.object({\n* title: v.string().required(),\n* slug: v.computed(data => slugify(data.title)),\n* });\n*\n* // With result validation\n* const schema = v.object({\n* title: v.string().required(),\n* slug: v.computed(\n* data => slugify(data.title),\n* v.string().minLength(3)\n* ),\n* });\n*\n* // Async computation\n* const schema = v.object({\n* image: v.string().url(),\n* thumbnail: v.computed(async data => {\n* return await generateThumbnail(data.image);\n* }),\n* });\n* ```\n*/\nvar ComputedValidator = class extends BaseValidator {\n\t/**\n\t* Create a new computed field validator\n\t*\n\t* @param callback - Function to compute the value from validated data\n\t* @param resultValidator - Optional validator to validate the computed result\n\t*/\n\tconstructor(callback, resultValidator) {\n\t\tsuper();\n\t\tthis.callback = callback;\n\t\tthis.resultValidator = resultValidator;\n\t}\n\t/**\n\t* Execute the callback and optionally validate the result\n\t*/\n\tasync validate(data, context) {\n\t\ttry {\n\t\t\tconst result = await this.callback(data, context);\n\t\t\tif (this.resultValidator) {\n\t\t\t\tconst validation = await this.resultValidator.validate(result, context);\n\t\t\t\tif (!validation.isValid) return {\n\t\t\t\t\tisValid: false,\n\t\t\t\t\terrors: validation.errors,\n\t\t\t\t\tdata: void 0\n\t\t\t\t};\n\t\t\t\treturn {\n\t\t\t\t\tisValid: true,\n\t\t\t\t\terrors: [],\n\t\t\t\t\tdata: validation.data\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tisValid: true,\n\t\t\t\terrors: [],\n\t\t\t\tdata: result\n\t\t\t};\n\t\t} catch (error) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terrors: [{\n\t\t\t\t\ttype: \"computed\",\n\t\t\t\t\terror: error instanceof Error ? error.message : \"Computed field callback failed\",\n\t\t\t\t\tinput: context.path\n\t\t\t\t}],\n\t\t\t\tdata: void 0\n\t\t\t};\n\t\t}\n\t}\n\t/**\n\t* Clone this validator with all its configuration\n\t* Critical for ObjectValidator.clone(), extend(), merge(), etc.\n\t*/\n\tclone() {\n\t\tconst cloned = super.clone();\n\t\tcloned.callback = this.callback;\n\t\tcloned.resultValidator = this.resultValidator?.clone();\n\t\treturn cloned;\n\t}\n\t/**\n\t* Computed fields don't have a specific type to match\n\t*/\n\tmatchesType(value) {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* Computed fields are server-side runtime values — they have no input schema\n\t* and cannot be represented in JSON Schema. Calling this method is always a\n\t* programming error.\n\t*\n\t* @throws Error Always throws — computed/managed fields have no JSON Schema representation.\n\t*/\n\ttoJsonSchema(_target = \"draft-2020-12\") {\n\t\tthrow new Error(\"[Seal] toJsonSchema() is not supported on ComputedValidator / ManagedValidator. Computed fields are runtime-only and have no input JSON Schema representation. ObjectValidator.toJsonSchema() automatically skips computed fields — do not call toJsonSchema() on a computed validator directly.\");\n\t}\n};\n\n//#endregion\nexport { ComputedValidator };\n//# sourceMappingURL=computed-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,IAAI,oBAAoB,cAAc,cAAc;;;;;;;CAOnD,YAAY,UAAU,iBAAiB;EACtC,MAAM;EACN,KAAK,WAAW;EAChB,KAAK,kBAAkB;CACxB;;;;CAIA,MAAM,SAAS,MAAM,SAAS;EAC7B,IAAI;GACH,MAAM,SAAS,MAAM,KAAK,SAAS,MAAM,OAAO;GAChD,IAAI,KAAK,iBAAiB;IACzB,MAAM,aAAa,MAAM,KAAK,gBAAgB,SAAS,QAAQ,OAAO;IACtE,IAAI,CAAC,WAAW,SAAS,OAAO;KAC/B,SAAS;KACT,QAAQ,WAAW;KACnB,MAAM,KAAK;IACZ;IACA,OAAO;KACN,SAAS;KACT,QAAQ,CAAC;KACT,MAAM,WAAW;IAClB;GACD;GACA,OAAO;IACN,SAAS;IACT,QAAQ,CAAC;IACT,MAAM;GACP;EACD,SAAS,OAAO;GACf,OAAO;IACN,SAAS;IACT,QAAQ,CAAC;KACR,MAAM;KACN,OAAO,iBAAiB,QAAQ,MAAM,UAAU;KAChD,OAAO,QAAQ;IAChB,CAAC;IACD,MAAM,KAAK;GACZ;EACD;CACD;;;;;CAKA,QAAQ;EACP,MAAM,SAAS,MAAM,MAAM;EAC3B,OAAO,WAAW,KAAK;EACvB,OAAO,kBAAkB,KAAK,iBAAiB,MAAM;EACrD,OAAO;CACR;;;;CAIA,YAAY,OAAO;EAClB,OAAO;CACR;;;;;;;;;;CAUA,aAAa,UAAU,iBAAiB;EACvC,MAAM,IAAI,MAAM,kSAAkS;CACnT;AACD"}
|
|
@@ -14,7 +14,7 @@ import { withinDaysRule, withinFutureDaysRule, withinPastDaysRule } from "../rul
|
|
|
14
14
|
import { betweenAgeRule, birthdayRule, leapYearRule } from "../rules/date/date-special-rules.mjs";
|
|
15
15
|
import "../rules/index.mjs";
|
|
16
16
|
|
|
17
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.
|
|
17
|
+
//#region ../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/date-validator.mjs
|
|
18
18
|
var import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min(), 1);
|
|
19
19
|
/**
|
|
20
20
|
* Date validator class
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.2.4/node_modules/@warlock.js/seal/esm/validators/date-validator.mjs"],"sourcesContent":["import { applyNullable, getRuleOptions } from \"../standard-schema/json-schema.mjs\";\nimport { isDateValue } from \"../helpers/date-helpers.mjs\";\nimport { BaseValidator } from \"./base-validator.mjs\";\nimport { addDaysMutator, addHoursMutator, addMonthsMutator, addYearsMutator, dateMutator, toEndOfDayMutator, toEndOfMonthMutator, toEndOfYearMutator, toStartOfDayMutator, toStartOfMonthMutator, toStartOfYearMutator, toUTCMutator } from \"../mutators/date-mutators.mjs\";\nimport \"../mutators/index.mjs\";\nimport { ageRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenHoursRule, betweenMinutesRule, dateRule, fromHourRule, fromMinuteRule, fromTodayRule, maxAgeRule, maxDateRule, minAgeRule, minDateRule, weekDayRule } from \"../rules/date/date.mjs\";\nimport { afterTodayRule, betweenDatesRule, futureRule, pastRule, todayRule } from \"../rules/date/date-comparison-rules.mjs\";\nimport { businessDayRule, weekdaysRule, weekendRule } from \"../rules/date/date-day-rules.mjs\";\nimport { afterFieldRule, beforeFieldRule, sameAsFieldDateRule } from \"../rules/date/date-field-comparison-rules.mjs\";\nimport { betweenDaysRule, betweenMonthsRule, betweenTimesRule, betweenYearsRule, maxDayRule, maxMonthRule, maxYearRule, minDayRule, minMonthRule, minYearRule, monthRule, quarterRule, yearRule } from \"../rules/date/date-period-rules.mjs\";\nimport { withinDaysRule, withinFutureDaysRule, withinPastDaysRule } from \"../rules/date/date-relative-rules.mjs\";\nimport { betweenAgeRule, birthdayRule, leapYearRule } from \"../rules/date/date-special-rules.mjs\";\nimport \"../rules/index.mjs\";\nimport dayjs from \"dayjs\";\n\n//#region ../seal/src/validators/date-validator.ts\n/**\n* Date validator class\n*/\nvar DateValidator = class extends BaseValidator {\n\tconstructor(errorMessage) {\n\t\tsuper();\n\t\tthis.addMutableMutator(dateMutator);\n\t\tthis.addMutableRule(dateRule, errorMessage);\n\t}\n\t/**\n\t* Check if value is a Date type\n\t*/\n\tmatchesType(value) {\n\t\treturn isDateValue(value);\n\t}\n\t/**\n\t* Convert date to ISO string format\n\t* @category transformer\n\t*/\n\ttoISOString() {\n\t\treturn this.addTransformer((data) => data instanceof Date ? data.toISOString() : data);\n\t}\n\t/** Convert date to Unix timestamp (milliseconds) */\n\ttoTimestamp() {\n\t\treturn this.addTransformer((data) => data instanceof Date ? data.getTime() : data);\n\t}\n\t/** Convert date to specific format using dayjs */\n\ttoFormat(format) {\n\t\treturn this.addTransformer((data, { options }) => data instanceof Date ? dayjs(data).format(options.format) : data, { format });\n\t}\n\t/** Convert to date only (remove time, returns YYYY-MM-DD) */\n\ttoDateOnly() {\n\t\treturn this.addTransformer((data) => data instanceof Date ? dayjs(data).format(\"YYYY-MM-DD\") : data, { __jsonSchemaFormat: \"date\" });\n\t}\n\t/** Convert to time only (returns HH:MM:SS) */\n\ttoTimeOnly() {\n\t\treturn this.addTransformer((data) => data instanceof Date ? dayjs(data).format(\"HH:mm:ss\") : data, { __jsonSchemaFormat: \"time\" });\n\t}\n\t/**\n\t* Convert date to start of day (00:00:00)\n\t* @category mutator\n\t*/\n\ttoStartOfDay() {\n\t\treturn this.addMutator(toStartOfDayMutator);\n\t}\n\t/** Convert date to end of day (23:59:59.999) */\n\ttoEndOfDay() {\n\t\treturn this.addMutator(toEndOfDayMutator);\n\t}\n\t/** Add or subtract days from date */\n\taddDays(days) {\n\t\treturn this.addMutator(addDaysMutator, { days });\n\t}\n\t/** Add or subtract months from date */\n\taddMonths(months) {\n\t\treturn this.addMutator(addMonthsMutator, { months });\n\t}\n\t/** Add or subtract years from date */\n\taddYears(years) {\n\t\treturn this.addMutator(addYearsMutator, { years });\n\t}\n\t/** Add or subtract hours from date */\n\taddHours(hours) {\n\t\treturn this.addMutator(addHoursMutator, { hours });\n\t}\n\t/** Convert date to UTC */\n\ttoUTC() {\n\t\treturn this.addMutator(toUTCMutator);\n\t}\n\t/** Set to start of month */\n\ttoStartOfMonth() {\n\t\treturn this.addMutator(toStartOfMonthMutator);\n\t}\n\t/** Set to end of month */\n\ttoEndOfMonth() {\n\t\treturn this.addMutator(toEndOfMonthMutator);\n\t}\n\t/** Set to start of year */\n\ttoStartOfYear() {\n\t\treturn this.addMutator(toStartOfYearMutator);\n\t}\n\t/** Set to end of year */\n\ttoEndOfYear() {\n\t\treturn this.addMutator(toEndOfYearMutator);\n\t}\n\t/**\n\t* Date must be greater than or equal to the given date or field (inclusive)\n\t*\n\t* Smart detection:\n\t* - Date instance, timestamp, or date string (with - or /) → value comparison\n\t* - Plain string → field comparison\n\t*\n\t* @param dateOrField - Date, timestamp, date string, or field name\n\t*\n\t* @example\n\t* ```ts\n\t* // Value comparison\n\t* v.date().min('2024-01-01')\n\t* v.date().min(new Date())\n\t* v.date().min(1698278400000)\n\t*\n\t* // Field comparison\n\t* v.date().min('startsAt')\n\t* ```\n\t*\n\t* @category Validation Rule\n\t*/\n\tmin(dateOrField, errorMessage) {\n\t\treturn this.addRule(minDateRule, errorMessage, {\n\t\t\tdateOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be less than or equal to the given date or field (inclusive)\n\t*\n\t* Smart detection:\n\t* - Date instance, timestamp, or date string (with - or /) → value comparison\n\t* - Plain string → field comparison\n\t*\n\t* @category Validation Rule\n\t*/\n\tmax(dateOrField, errorMessage) {\n\t\treturn this.addRule(maxDateRule, errorMessage, {\n\t\t\tdateOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be strictly less than the given date or field (exclusive)\n\t*\n\t* Smart detection:\n\t* - Date instance, timestamp, or date string (with - or /) → value comparison\n\t* - Plain string → field comparison\n\t*\n\t* @category Validation Rule\n\t*/\n\tbefore(dateOrField, errorMessage) {\n\t\treturn this.addRule(beforeFieldRule, errorMessage, {\n\t\t\tdateOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be strictly greater than the given date or field (exclusive)\n\t*\n\t* Smart detection:\n\t* - Date instance, timestamp, or date string (with - or /) → value comparison\n\t* - Plain string → field comparison\n\t*\n\t* @category Validation Rule\n\t*/\n\tafter(dateOrField, errorMessage) {\n\t\treturn this.addRule(afterFieldRule, errorMessage, {\n\t\t\tdateOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/** Date must be between start and end dates */\n\tbetween(startDate, endDate, errorMessage) {\n\t\treturn this.addRule(betweenDatesRule, errorMessage, {\n\t\t\tstartDate,\n\t\t\tendDate\n\t\t});\n\t}\n\t/** Date must be exactly today */\n\ttoday(errorMessage) {\n\t\treturn this.addRule(todayRule, errorMessage);\n\t}\n\t/** Date must be today or in the future */\n\tfromToday(errorMessage) {\n\t\treturn this.addRule(fromTodayRule, errorMessage);\n\t}\n\t/** Date must be before today */\n\tbeforeToday(errorMessage) {\n\t\treturn this.addRule(beforeTodayRule, errorMessage);\n\t}\n\t/** Date must be after today (not including today) */\n\tafterToday(errorMessage) {\n\t\treturn this.addRule(afterTodayRule, errorMessage);\n\t}\n\t/** Date must be in the past */\n\tpast(errorMessage) {\n\t\treturn this.addRule(pastRule, errorMessage);\n\t}\n\t/** Date must be in the future */\n\tfuture(errorMessage) {\n\t\treturn this.addRule(futureRule, errorMessage);\n\t}\n\t/**\n\t* Date must be >= sibling field value (inclusive)\n\t* @category Validation Rule\n\t*/\n\tminSibling(field, errorMessage) {\n\t\treturn this.addRule(minDateRule, errorMessage, {\n\t\t\tdateOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Date must be <= sibling field value (inclusive)\n\t* @category Validation Rule\n\t*/\n\tmaxSibling(field, errorMessage) {\n\t\treturn this.addRule(maxDateRule, errorMessage, {\n\t\t\tdateOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Date must be < sibling field value (exclusive)\n\t* @category Validation Rule\n\t*/\n\tbeforeSibling(field, errorMessage) {\n\t\treturn this.addRule(beforeFieldRule, errorMessage, {\n\t\t\tdateOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Date must be > sibling field value (exclusive)\n\t* @category Validation Rule\n\t*/\n\tafterSibling(field, errorMessage) {\n\t\treturn this.addRule(afterFieldRule, errorMessage, {\n\t\t\tdateOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/** Date must be the same as another field's date */\n\tsameAsField(field, errorMessage) {\n\t\treturn this.addRule(sameAsFieldDateRule, errorMessage, {\n\t\t\tfield,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/** Date must be the same as another sibling field's date */\n\tsameAsFieldSibling(field, errorMessage) {\n\t\treturn this.addRule(sameAsFieldDateRule, errorMessage, {\n\t\t\tfield,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/** Time must be from specific hour onwards (0-23) */\n\tfromHour(hour, errorMessage) {\n\t\treturn this.addRule(fromHourRule, errorMessage, { hour });\n\t}\n\t/** Time must be before specific hour (0-23) */\n\tbeforeHour(hour, errorMessage) {\n\t\treturn this.addRule(beforeHourRule, errorMessage, { hour });\n\t}\n\t/** Time must be between start and end hours (0-23) */\n\tbetweenHours(startHour, endHour, errorMessage) {\n\t\treturn this.addRule(betweenHoursRule, errorMessage, {\n\t\t\tstartHour,\n\t\t\tendHour\n\t\t});\n\t}\n\t/** Time must be from specific minute onwards (0-59) */\n\tfromMinute(minute, errorMessage) {\n\t\treturn this.addRule(fromMinuteRule, errorMessage, { minute });\n\t}\n\t/** Time must be before specific minute (0-59) */\n\tbeforeMinute(minute, errorMessage) {\n\t\treturn this.addRule(beforeMinuteRule, errorMessage, { minute });\n\t}\n\t/** Time must be between start and end minutes (0-59) */\n\tbetweenMinutes(startMinute, endMinute, errorMessage) {\n\t\treturn this.addRule(betweenMinutesRule, errorMessage, {\n\t\t\tstartMinute,\n\t\t\tendMinute\n\t\t});\n\t}\n\t/** Time must be between start and end times (HH:MM format) */\n\tbetweenTimes(startTime, endTime, errorMessage) {\n\t\treturn this.addRule(betweenTimesRule, errorMessage, {\n\t\t\tstartTime,\n\t\t\tendTime\n\t\t});\n\t}\n\t/** Age must be exactly the given years */\n\tage(years, errorMessage) {\n\t\treturn this.addRule(ageRule, errorMessage, { years });\n\t}\n\t/** Minimum age requirement */\n\tminAge(years, errorMessage) {\n\t\treturn this.addRule(minAgeRule, errorMessage, { years });\n\t}\n\t/** Maximum age requirement */\n\tmaxAge(years, errorMessage) {\n\t\treturn this.addRule(maxAgeRule, errorMessage, { years });\n\t}\n\t/** Age must be between min and max years */\n\tbetweenAge(minAge, maxAge, errorMessage) {\n\t\treturn this.addRule(betweenAgeRule, errorMessage, {\n\t\t\tminAge,\n\t\t\tmaxAge\n\t\t});\n\t}\n\t/** Date must be specific weekday */\n\tweekDay(day, errorMessage) {\n\t\treturn this.addRule(weekDayRule, errorMessage, { day });\n\t}\n\t/** Date must be one of specified weekdays */\n\tweekdays(days, errorMessage) {\n\t\treturn this.addRule(weekdaysRule, errorMessage, { days });\n\t}\n\t/** Date must be a weekend (Saturday or Sunday) */\n\tweekend(errorMessage) {\n\t\treturn this.addRule(weekendRule, errorMessage);\n\t}\n\t/** Date must be a business day (Monday-Friday) */\n\tbusinessDay(errorMessage) {\n\t\treturn this.addRule(businessDayRule, errorMessage);\n\t}\n\t/** Date must match specific format */\n\tformat(format, errorMessage) {\n\t\treturn this.addRule(dateRule, errorMessage, { format });\n\t}\n\t/** Date must be within X days from now (past or future) */\n\twithinDays(days, errorMessage) {\n\t\treturn this.addRule(withinDaysRule, errorMessage, { days });\n\t}\n\t/** Date must be within X days in the past */\n\twithinPastDays(days, errorMessage) {\n\t\treturn this.addRule(withinPastDaysRule, errorMessage, { days });\n\t}\n\t/** Date must be within X days in the future */\n\twithinFutureDays(days, errorMessage) {\n\t\treturn this.addRule(withinFutureDaysRule, errorMessage, { days });\n\t}\n\t/** Date must be in specific month (1-12) */\n\tmonth(month, errorMessage) {\n\t\treturn this.addRule(monthRule, errorMessage, { month });\n\t}\n\t/** Date must be in specific year */\n\tyear(year, errorMessage) {\n\t\treturn this.addRule(yearRule, errorMessage, { year });\n\t}\n\t/**\n\t* Date must be between start and end years\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tbetweenYears(startYear, endYear, errorMessage) {\n\t\treturn this.addRule(betweenYearsRule, errorMessage, {\n\t\t\tstartYear,\n\t\t\tendYear,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be between start and end months (1-12)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tbetweenMonths(startMonth, endMonth, errorMessage) {\n\t\treturn this.addRule(betweenMonthsRule, errorMessage, {\n\t\t\tstartMonth,\n\t\t\tendMonth,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be between start and end days (1-31)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tbetweenDays(startDay, endDay, errorMessage) {\n\t\treturn this.addRule(betweenDaysRule, errorMessage, {\n\t\t\tstartDay,\n\t\t\tendDay,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be between sibling field years\n\t* @category Validation Rule\n\t*/\n\tbetweenYearsSibling(startYearField, endYearField, errorMessage) {\n\t\treturn this.addRule(betweenYearsRule, errorMessage, {\n\t\t\tstartYear: startYearField,\n\t\t\tendYear: endYearField,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Date must be between sibling field months\n\t* @category Validation Rule\n\t*/\n\tbetweenMonthsSibling(startMonthField, endMonthField, errorMessage) {\n\t\treturn this.addRule(betweenMonthsRule, errorMessage, {\n\t\t\tstartMonth: startMonthField,\n\t\t\tendMonth: endMonthField,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Date must be between sibling field days\n\t* @category Validation Rule\n\t*/\n\tbetweenDaysSibling(startDayField, endDayField, errorMessage) {\n\t\treturn this.addRule(betweenDaysRule, errorMessage, {\n\t\t\tstartDay: startDayField,\n\t\t\tendDay: endDayField,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Year must be >= given year or field\n\t* Smart detection: number or field name\n\t*\n\t* @example\n\t* ```ts\n\t* // Value comparison\n\t* v.date().minYear(2024)\n\t*\n\t* // Field comparison\n\t* v.date().minYear('startYear')\n\t* ```\n\t*\n\t* @category Validation Rule\n\t*/\n\tminYear(yearOrField, errorMessage) {\n\t\treturn this.addRule(minYearRule, errorMessage, {\n\t\t\tyearOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Year must be <= given year or field\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tmaxYear(yearOrField, errorMessage) {\n\t\treturn this.addRule(maxYearRule, errorMessage, {\n\t\t\tyearOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Month must be >= given month or field (1-12)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tminMonth(monthOrField, errorMessage) {\n\t\treturn this.addRule(minMonthRule, errorMessage, {\n\t\t\tmonthOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Month must be <= given month or field (1-12)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tmaxMonth(monthOrField, errorMessage) {\n\t\treturn this.addRule(maxMonthRule, errorMessage, {\n\t\t\tmonthOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Day must be >= given day or field (1-31)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tminDay(dayOrField, errorMessage) {\n\t\treturn this.addRule(minDayRule, errorMessage, {\n\t\t\tdayOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Day must be <= given day or field (1-31)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tmaxDay(dayOrField, errorMessage) {\n\t\treturn this.addRule(maxDayRule, errorMessage, {\n\t\t\tdayOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Year must be >= sibling field year\n\t* @category Validation Rule\n\t*/\n\tminYearSibling(field, errorMessage) {\n\t\treturn this.addRule(minYearRule, errorMessage, {\n\t\t\tyearOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Year must be <= sibling field year\n\t* @category Validation Rule\n\t*/\n\tmaxYearSibling(field, errorMessage) {\n\t\treturn this.addRule(maxYearRule, errorMessage, {\n\t\t\tyearOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Month must be >= sibling field month\n\t* @category Validation Rule\n\t*/\n\tminMonthSibling(field, errorMessage) {\n\t\treturn this.addRule(minMonthRule, errorMessage, {\n\t\t\tmonthOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Month must be <= sibling field month\n\t* @category Validation Rule\n\t*/\n\tmaxMonthSibling(field, errorMessage) {\n\t\treturn this.addRule(maxMonthRule, errorMessage, {\n\t\t\tmonthOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Day must be >= sibling field day\n\t* @category Validation Rule\n\t*/\n\tminDaySibling(field, errorMessage) {\n\t\treturn this.addRule(minDayRule, errorMessage, {\n\t\t\tdayOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Day must be <= sibling field day\n\t* @category Validation Rule\n\t*/\n\tmaxDaySibling(field, errorMessage) {\n\t\treturn this.addRule(maxDayRule, errorMessage, {\n\t\t\tdayOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/** Date must be in specific quarter (1-4) */\n\tquarter(quarter, errorMessage) {\n\t\treturn this.addRule(quarterRule, errorMessage, { quarter });\n\t}\n\t/** Valid birthday (not in future, reasonable age) */\n\tbirthday(minAge, maxAge, errorMessage) {\n\t\treturn this.addRule(birthdayRule, errorMessage, {\n\t\t\tminAge,\n\t\t\tmaxAge\n\t\t});\n\t}\n\t/** Date must be in a leap year */\n\tleapYear(errorMessage) {\n\t\treturn this.addRule(leapYearRule, errorMessage);\n\t}\n\t/**\n\t* Set default value as current time of exeuction\n\t*/\n\tdefaultNow() {\n\t\treturn this.default(() => /* @__PURE__ */ new Date());\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* Maps DateValidator to JSON Schema format keywords.\n\t* Default is `date-time`. If `.toDateOnly()` or `.toTimeOnly()` are used,\n\t* falls back to `date` or `time` formats respectively.\n\t*\n\t* @example\n\t* ```ts\n\t* v.date().toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"string\", format: \"date-time\" }\n\t*\n\t* v.date().toDateOnly().toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"string\", format: \"date\" }\n\t* ```\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\tconst schema = {\n\t\t\ttype: \"string\",\n\t\t\tformat: \"date-time\"\n\t\t};\n\t\tconst dateOpts = getRuleOptions(this.rules, \"date\");\n\t\tif (dateOpts?.format === \"YYYY-MM-DD\") schema.format = \"date\";\n\t\telse if (dateOpts?.format === \"HH:mm:ss\") schema.format = \"time\";\n\t\tif (schema.format === \"date-time\") for (const t of this.dataTransformers) {\n\t\t\tconst hint = t.options?.__jsonSchemaFormat;\n\t\t\tif (hint === \"date\" || hint === \"time\") {\n\t\t\t\tschema.format = hint;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst userFormat = t.options?.format;\n\t\t\tif (userFormat === \"YYYY-MM-DD\") {\n\t\t\t\tschema.format = \"date\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (userFormat === \"HH:mm:ss\") {\n\t\t\t\tschema.format = \"time\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (this.isNullable) applyNullable(schema, target);\n\t\treturn schema;\n\t}\n};\n\n//#endregion\nexport { DateValidator };\n//# sourceMappingURL=date-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmBA,IAAI,gBAAgB,cAAc,cAAc;CAC/C,YAAY,cAAc;EACzB,MAAM;EACN,KAAK,kBAAkB,WAAW;EAClC,KAAK,eAAe,UAAU,YAAY;CAC3C;;;;CAIA,YAAY,OAAO;EAClB,OAAO,YAAY,KAAK;CACzB;;;;;CAKA,cAAc;EACb,OAAO,KAAK,gBAAgB,SAAS,gBAAgB,OAAO,KAAK,YAAY,IAAI,IAAI;CACtF;;CAEA,cAAc;EACb,OAAO,KAAK,gBAAgB,SAAS,gBAAgB,OAAO,KAAK,QAAQ,IAAI,IAAI;CAClF;;CAEA,SAAS,QAAQ;EAChB,OAAO,KAAK,gBAAgB,MAAM,EAAE,cAAc,gBAAgB,qCAAa,IAAI,CAAC,CAAC,OAAO,QAAQ,MAAM,IAAI,MAAM,EAAE,OAAO,CAAC;CAC/H;;CAEA,aAAa;EACZ,OAAO,KAAK,gBAAgB,SAAS,gBAAgB,qCAAa,IAAI,CAAC,CAAC,OAAO,YAAY,IAAI,MAAM,EAAE,oBAAoB,OAAO,CAAC;CACpI;;CAEA,aAAa;EACZ,OAAO,KAAK,gBAAgB,SAAS,gBAAgB,qCAAa,IAAI,CAAC,CAAC,OAAO,UAAU,IAAI,MAAM,EAAE,oBAAoB,OAAO,CAAC;CAClI;;;;;CAKA,eAAe;EACd,OAAO,KAAK,WAAW,mBAAmB;CAC3C;;CAEA,aAAa;EACZ,OAAO,KAAK,WAAW,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c;GAC/C;GACA;EACD,CAAC;CACF;;CAEA,SAAS,cAAc;EACtB,OAAO,KAAK,QAAQ,cAAc,YAAY;CAC/C;;;;CAIA,aAAa;EACZ,OAAO,KAAK,8BAA8B,IAAI,KAAK,CAAC;CACrD;;;;;;;;;;;;;;;;;CAiBA,aAAa,SAAS,iBAAiB;EACtC,MAAM,SAAS;GACd,MAAM;GACN,QAAQ;EACT;EACA,MAAM,WAAW,eAAe,KAAK,OAAO,MAAM;EAClD,IAAI,UAAU,WAAW,cAAc,OAAO,SAAS;OAClD,IAAI,UAAU,WAAW,YAAY,OAAO,SAAS;EAC1D,IAAI,OAAO,WAAW,aAAa,KAAK,MAAM,KAAK,KAAK,kBAAkB;GACzE,MAAM,OAAO,EAAE,SAAS;GACxB,IAAI,SAAS,UAAU,SAAS,QAAQ;IACvC,OAAO,SAAS;IAChB;GACD;GACA,MAAM,aAAa,EAAE,SAAS;GAC9B,IAAI,eAAe,cAAc;IAChC,OAAO,SAAS;IAChB;GACD;GACA,IAAI,eAAe,YAAY;IAC9B,OAAO,SAAS;IAChB;GACD;EACD;EACA,IAAI,KAAK,YAAY,cAAc,QAAQ,MAAM;EACjD,OAAO;CACR;AACD"}
|
|
1
|
+
{"version":3,"file":"date-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/date-validator.mjs"],"sourcesContent":["import { applyNullable, getRuleOptions } from \"../standard-schema/json-schema.mjs\";\nimport { isDateValue } from \"../helpers/date-helpers.mjs\";\nimport { BaseValidator } from \"./base-validator.mjs\";\nimport { addDaysMutator, addHoursMutator, addMonthsMutator, addYearsMutator, dateMutator, toEndOfDayMutator, toEndOfMonthMutator, toEndOfYearMutator, toStartOfDayMutator, toStartOfMonthMutator, toStartOfYearMutator, toUTCMutator } from \"../mutators/date-mutators.mjs\";\nimport \"../mutators/index.mjs\";\nimport { ageRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenHoursRule, betweenMinutesRule, dateRule, fromHourRule, fromMinuteRule, fromTodayRule, maxAgeRule, maxDateRule, minAgeRule, minDateRule, weekDayRule } from \"../rules/date/date.mjs\";\nimport { afterTodayRule, betweenDatesRule, futureRule, pastRule, todayRule } from \"../rules/date/date-comparison-rules.mjs\";\nimport { businessDayRule, weekdaysRule, weekendRule } from \"../rules/date/date-day-rules.mjs\";\nimport { afterFieldRule, beforeFieldRule, sameAsFieldDateRule } from \"../rules/date/date-field-comparison-rules.mjs\";\nimport { betweenDaysRule, betweenMonthsRule, betweenTimesRule, betweenYearsRule, maxDayRule, maxMonthRule, maxYearRule, minDayRule, minMonthRule, minYearRule, monthRule, quarterRule, yearRule } from \"../rules/date/date-period-rules.mjs\";\nimport { withinDaysRule, withinFutureDaysRule, withinPastDaysRule } from \"../rules/date/date-relative-rules.mjs\";\nimport { betweenAgeRule, birthdayRule, leapYearRule } from \"../rules/date/date-special-rules.mjs\";\nimport \"../rules/index.mjs\";\nimport dayjs from \"dayjs\";\n\n//#region ../seal/src/validators/date-validator.ts\n/**\n* Date validator class\n*/\nvar DateValidator = class extends BaseValidator {\n\tconstructor(errorMessage) {\n\t\tsuper();\n\t\tthis.addMutableMutator(dateMutator);\n\t\tthis.addMutableRule(dateRule, errorMessage);\n\t}\n\t/**\n\t* Check if value is a Date type\n\t*/\n\tmatchesType(value) {\n\t\treturn isDateValue(value);\n\t}\n\t/**\n\t* Convert date to ISO string format\n\t* @category transformer\n\t*/\n\ttoISOString() {\n\t\treturn this.addTransformer((data) => data instanceof Date ? data.toISOString() : data);\n\t}\n\t/** Convert date to Unix timestamp (milliseconds) */\n\ttoTimestamp() {\n\t\treturn this.addTransformer((data) => data instanceof Date ? data.getTime() : data);\n\t}\n\t/** Convert date to specific format using dayjs */\n\ttoFormat(format) {\n\t\treturn this.addTransformer((data, { options }) => data instanceof Date ? dayjs(data).format(options.format) : data, { format });\n\t}\n\t/** Convert to date only (remove time, returns YYYY-MM-DD) */\n\ttoDateOnly() {\n\t\treturn this.addTransformer((data) => data instanceof Date ? dayjs(data).format(\"YYYY-MM-DD\") : data, { __jsonSchemaFormat: \"date\" });\n\t}\n\t/** Convert to time only (returns HH:MM:SS) */\n\ttoTimeOnly() {\n\t\treturn this.addTransformer((data) => data instanceof Date ? dayjs(data).format(\"HH:mm:ss\") : data, { __jsonSchemaFormat: \"time\" });\n\t}\n\t/**\n\t* Convert date to start of day (00:00:00)\n\t* @category mutator\n\t*/\n\ttoStartOfDay() {\n\t\treturn this.addMutator(toStartOfDayMutator);\n\t}\n\t/** Convert date to end of day (23:59:59.999) */\n\ttoEndOfDay() {\n\t\treturn this.addMutator(toEndOfDayMutator);\n\t}\n\t/** Add or subtract days from date */\n\taddDays(days) {\n\t\treturn this.addMutator(addDaysMutator, { days });\n\t}\n\t/** Add or subtract months from date */\n\taddMonths(months) {\n\t\treturn this.addMutator(addMonthsMutator, { months });\n\t}\n\t/** Add or subtract years from date */\n\taddYears(years) {\n\t\treturn this.addMutator(addYearsMutator, { years });\n\t}\n\t/** Add or subtract hours from date */\n\taddHours(hours) {\n\t\treturn this.addMutator(addHoursMutator, { hours });\n\t}\n\t/** Convert date to UTC */\n\ttoUTC() {\n\t\treturn this.addMutator(toUTCMutator);\n\t}\n\t/** Set to start of month */\n\ttoStartOfMonth() {\n\t\treturn this.addMutator(toStartOfMonthMutator);\n\t}\n\t/** Set to end of month */\n\ttoEndOfMonth() {\n\t\treturn this.addMutator(toEndOfMonthMutator);\n\t}\n\t/** Set to start of year */\n\ttoStartOfYear() {\n\t\treturn this.addMutator(toStartOfYearMutator);\n\t}\n\t/** Set to end of year */\n\ttoEndOfYear() {\n\t\treturn this.addMutator(toEndOfYearMutator);\n\t}\n\t/**\n\t* Date must be greater than or equal to the given date or field (inclusive)\n\t*\n\t* Smart detection:\n\t* - Date instance, timestamp, or date string (with - or /) → value comparison\n\t* - Plain string → field comparison\n\t*\n\t* @param dateOrField - Date, timestamp, date string, or field name\n\t*\n\t* @example\n\t* ```ts\n\t* // Value comparison\n\t* v.date().min('2024-01-01')\n\t* v.date().min(new Date())\n\t* v.date().min(1698278400000)\n\t*\n\t* // Field comparison\n\t* v.date().min('startsAt')\n\t* ```\n\t*\n\t* @category Validation Rule\n\t*/\n\tmin(dateOrField, errorMessage) {\n\t\treturn this.addRule(minDateRule, errorMessage, {\n\t\t\tdateOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be less than or equal to the given date or field (inclusive)\n\t*\n\t* Smart detection:\n\t* - Date instance, timestamp, or date string (with - or /) → value comparison\n\t* - Plain string → field comparison\n\t*\n\t* @category Validation Rule\n\t*/\n\tmax(dateOrField, errorMessage) {\n\t\treturn this.addRule(maxDateRule, errorMessage, {\n\t\t\tdateOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be strictly less than the given date or field (exclusive)\n\t*\n\t* Smart detection:\n\t* - Date instance, timestamp, or date string (with - or /) → value comparison\n\t* - Plain string → field comparison\n\t*\n\t* @category Validation Rule\n\t*/\n\tbefore(dateOrField, errorMessage) {\n\t\treturn this.addRule(beforeFieldRule, errorMessage, {\n\t\t\tdateOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be strictly greater than the given date or field (exclusive)\n\t*\n\t* Smart detection:\n\t* - Date instance, timestamp, or date string (with - or /) → value comparison\n\t* - Plain string → field comparison\n\t*\n\t* @category Validation Rule\n\t*/\n\tafter(dateOrField, errorMessage) {\n\t\treturn this.addRule(afterFieldRule, errorMessage, {\n\t\t\tdateOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/** Date must be between start and end dates */\n\tbetween(startDate, endDate, errorMessage) {\n\t\treturn this.addRule(betweenDatesRule, errorMessage, {\n\t\t\tstartDate,\n\t\t\tendDate\n\t\t});\n\t}\n\t/** Date must be exactly today */\n\ttoday(errorMessage) {\n\t\treturn this.addRule(todayRule, errorMessage);\n\t}\n\t/** Date must be today or in the future */\n\tfromToday(errorMessage) {\n\t\treturn this.addRule(fromTodayRule, errorMessage);\n\t}\n\t/** Date must be before today */\n\tbeforeToday(errorMessage) {\n\t\treturn this.addRule(beforeTodayRule, errorMessage);\n\t}\n\t/** Date must be after today (not including today) */\n\tafterToday(errorMessage) {\n\t\treturn this.addRule(afterTodayRule, errorMessage);\n\t}\n\t/** Date must be in the past */\n\tpast(errorMessage) {\n\t\treturn this.addRule(pastRule, errorMessage);\n\t}\n\t/** Date must be in the future */\n\tfuture(errorMessage) {\n\t\treturn this.addRule(futureRule, errorMessage);\n\t}\n\t/**\n\t* Date must be >= sibling field value (inclusive)\n\t* @category Validation Rule\n\t*/\n\tminSibling(field, errorMessage) {\n\t\treturn this.addRule(minDateRule, errorMessage, {\n\t\t\tdateOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Date must be <= sibling field value (inclusive)\n\t* @category Validation Rule\n\t*/\n\tmaxSibling(field, errorMessage) {\n\t\treturn this.addRule(maxDateRule, errorMessage, {\n\t\t\tdateOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Date must be < sibling field value (exclusive)\n\t* @category Validation Rule\n\t*/\n\tbeforeSibling(field, errorMessage) {\n\t\treturn this.addRule(beforeFieldRule, errorMessage, {\n\t\t\tdateOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Date must be > sibling field value (exclusive)\n\t* @category Validation Rule\n\t*/\n\tafterSibling(field, errorMessage) {\n\t\treturn this.addRule(afterFieldRule, errorMessage, {\n\t\t\tdateOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/** Date must be the same as another field's date */\n\tsameAsField(field, errorMessage) {\n\t\treturn this.addRule(sameAsFieldDateRule, errorMessage, {\n\t\t\tfield,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/** Date must be the same as another sibling field's date */\n\tsameAsFieldSibling(field, errorMessage) {\n\t\treturn this.addRule(sameAsFieldDateRule, errorMessage, {\n\t\t\tfield,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/** Time must be from specific hour onwards (0-23) */\n\tfromHour(hour, errorMessage) {\n\t\treturn this.addRule(fromHourRule, errorMessage, { hour });\n\t}\n\t/** Time must be before specific hour (0-23) */\n\tbeforeHour(hour, errorMessage) {\n\t\treturn this.addRule(beforeHourRule, errorMessage, { hour });\n\t}\n\t/** Time must be between start and end hours (0-23) */\n\tbetweenHours(startHour, endHour, errorMessage) {\n\t\treturn this.addRule(betweenHoursRule, errorMessage, {\n\t\t\tstartHour,\n\t\t\tendHour\n\t\t});\n\t}\n\t/** Time must be from specific minute onwards (0-59) */\n\tfromMinute(minute, errorMessage) {\n\t\treturn this.addRule(fromMinuteRule, errorMessage, { minute });\n\t}\n\t/** Time must be before specific minute (0-59) */\n\tbeforeMinute(minute, errorMessage) {\n\t\treturn this.addRule(beforeMinuteRule, errorMessage, { minute });\n\t}\n\t/** Time must be between start and end minutes (0-59) */\n\tbetweenMinutes(startMinute, endMinute, errorMessage) {\n\t\treturn this.addRule(betweenMinutesRule, errorMessage, {\n\t\t\tstartMinute,\n\t\t\tendMinute\n\t\t});\n\t}\n\t/** Time must be between start and end times (HH:MM format) */\n\tbetweenTimes(startTime, endTime, errorMessage) {\n\t\treturn this.addRule(betweenTimesRule, errorMessage, {\n\t\t\tstartTime,\n\t\t\tendTime\n\t\t});\n\t}\n\t/** Age must be exactly the given years */\n\tage(years, errorMessage) {\n\t\treturn this.addRule(ageRule, errorMessage, { years });\n\t}\n\t/** Minimum age requirement */\n\tminAge(years, errorMessage) {\n\t\treturn this.addRule(minAgeRule, errorMessage, { years });\n\t}\n\t/** Maximum age requirement */\n\tmaxAge(years, errorMessage) {\n\t\treturn this.addRule(maxAgeRule, errorMessage, { years });\n\t}\n\t/** Age must be between min and max years */\n\tbetweenAge(minAge, maxAge, errorMessage) {\n\t\treturn this.addRule(betweenAgeRule, errorMessage, {\n\t\t\tminAge,\n\t\t\tmaxAge\n\t\t});\n\t}\n\t/** Date must be specific weekday */\n\tweekDay(day, errorMessage) {\n\t\treturn this.addRule(weekDayRule, errorMessage, { day });\n\t}\n\t/** Date must be one of specified weekdays */\n\tweekdays(days, errorMessage) {\n\t\treturn this.addRule(weekdaysRule, errorMessage, { days });\n\t}\n\t/** Date must be a weekend (Saturday or Sunday) */\n\tweekend(errorMessage) {\n\t\treturn this.addRule(weekendRule, errorMessage);\n\t}\n\t/** Date must be a business day (Monday-Friday) */\n\tbusinessDay(errorMessage) {\n\t\treturn this.addRule(businessDayRule, errorMessage);\n\t}\n\t/** Date must match specific format */\n\tformat(format, errorMessage) {\n\t\treturn this.addRule(dateRule, errorMessage, { format });\n\t}\n\t/** Date must be within X days from now (past or future) */\n\twithinDays(days, errorMessage) {\n\t\treturn this.addRule(withinDaysRule, errorMessage, { days });\n\t}\n\t/** Date must be within X days in the past */\n\twithinPastDays(days, errorMessage) {\n\t\treturn this.addRule(withinPastDaysRule, errorMessage, { days });\n\t}\n\t/** Date must be within X days in the future */\n\twithinFutureDays(days, errorMessage) {\n\t\treturn this.addRule(withinFutureDaysRule, errorMessage, { days });\n\t}\n\t/** Date must be in specific month (1-12) */\n\tmonth(month, errorMessage) {\n\t\treturn this.addRule(monthRule, errorMessage, { month });\n\t}\n\t/** Date must be in specific year */\n\tyear(year, errorMessage) {\n\t\treturn this.addRule(yearRule, errorMessage, { year });\n\t}\n\t/**\n\t* Date must be between start and end years\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tbetweenYears(startYear, endYear, errorMessage) {\n\t\treturn this.addRule(betweenYearsRule, errorMessage, {\n\t\t\tstartYear,\n\t\t\tendYear,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be between start and end months (1-12)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tbetweenMonths(startMonth, endMonth, errorMessage) {\n\t\treturn this.addRule(betweenMonthsRule, errorMessage, {\n\t\t\tstartMonth,\n\t\t\tendMonth,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be between start and end days (1-31)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tbetweenDays(startDay, endDay, errorMessage) {\n\t\treturn this.addRule(betweenDaysRule, errorMessage, {\n\t\t\tstartDay,\n\t\t\tendDay,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Date must be between sibling field years\n\t* @category Validation Rule\n\t*/\n\tbetweenYearsSibling(startYearField, endYearField, errorMessage) {\n\t\treturn this.addRule(betweenYearsRule, errorMessage, {\n\t\t\tstartYear: startYearField,\n\t\t\tendYear: endYearField,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Date must be between sibling field months\n\t* @category Validation Rule\n\t*/\n\tbetweenMonthsSibling(startMonthField, endMonthField, errorMessage) {\n\t\treturn this.addRule(betweenMonthsRule, errorMessage, {\n\t\t\tstartMonth: startMonthField,\n\t\t\tendMonth: endMonthField,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Date must be between sibling field days\n\t* @category Validation Rule\n\t*/\n\tbetweenDaysSibling(startDayField, endDayField, errorMessage) {\n\t\treturn this.addRule(betweenDaysRule, errorMessage, {\n\t\t\tstartDay: startDayField,\n\t\t\tendDay: endDayField,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Year must be >= given year or field\n\t* Smart detection: number or field name\n\t*\n\t* @example\n\t* ```ts\n\t* // Value comparison\n\t* v.date().minYear(2024)\n\t*\n\t* // Field comparison\n\t* v.date().minYear('startYear')\n\t* ```\n\t*\n\t* @category Validation Rule\n\t*/\n\tminYear(yearOrField, errorMessage) {\n\t\treturn this.addRule(minYearRule, errorMessage, {\n\t\t\tyearOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Year must be <= given year or field\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tmaxYear(yearOrField, errorMessage) {\n\t\treturn this.addRule(maxYearRule, errorMessage, {\n\t\t\tyearOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Month must be >= given month or field (1-12)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tminMonth(monthOrField, errorMessage) {\n\t\treturn this.addRule(minMonthRule, errorMessage, {\n\t\t\tmonthOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Month must be <= given month or field (1-12)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tmaxMonth(monthOrField, errorMessage) {\n\t\treturn this.addRule(maxMonthRule, errorMessage, {\n\t\t\tmonthOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Day must be >= given day or field (1-31)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tminDay(dayOrField, errorMessage) {\n\t\treturn this.addRule(minDayRule, errorMessage, {\n\t\t\tdayOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Day must be <= given day or field (1-31)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tmaxDay(dayOrField, errorMessage) {\n\t\treturn this.addRule(maxDayRule, errorMessage, {\n\t\t\tdayOrField,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Year must be >= sibling field year\n\t* @category Validation Rule\n\t*/\n\tminYearSibling(field, errorMessage) {\n\t\treturn this.addRule(minYearRule, errorMessage, {\n\t\t\tyearOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Year must be <= sibling field year\n\t* @category Validation Rule\n\t*/\n\tmaxYearSibling(field, errorMessage) {\n\t\treturn this.addRule(maxYearRule, errorMessage, {\n\t\t\tyearOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Month must be >= sibling field month\n\t* @category Validation Rule\n\t*/\n\tminMonthSibling(field, errorMessage) {\n\t\treturn this.addRule(minMonthRule, errorMessage, {\n\t\t\tmonthOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Month must be <= sibling field month\n\t* @category Validation Rule\n\t*/\n\tmaxMonthSibling(field, errorMessage) {\n\t\treturn this.addRule(maxMonthRule, errorMessage, {\n\t\t\tmonthOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Day must be >= sibling field day\n\t* @category Validation Rule\n\t*/\n\tminDaySibling(field, errorMessage) {\n\t\treturn this.addRule(minDayRule, errorMessage, {\n\t\t\tdayOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Day must be <= sibling field day\n\t* @category Validation Rule\n\t*/\n\tmaxDaySibling(field, errorMessage) {\n\t\treturn this.addRule(maxDayRule, errorMessage, {\n\t\t\tdayOrField: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/** Date must be in specific quarter (1-4) */\n\tquarter(quarter, errorMessage) {\n\t\treturn this.addRule(quarterRule, errorMessage, { quarter });\n\t}\n\t/** Valid birthday (not in future, reasonable age) */\n\tbirthday(minAge, maxAge, errorMessage) {\n\t\treturn this.addRule(birthdayRule, errorMessage, {\n\t\t\tminAge,\n\t\t\tmaxAge\n\t\t});\n\t}\n\t/** Date must be in a leap year */\n\tleapYear(errorMessage) {\n\t\treturn this.addRule(leapYearRule, errorMessage);\n\t}\n\t/**\n\t* Set default value as current time of exeuction\n\t*/\n\tdefaultNow() {\n\t\treturn this.default(() => /* @__PURE__ */ new Date());\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* Maps DateValidator to JSON Schema format keywords.\n\t* Default is `date-time`. If `.toDateOnly()` or `.toTimeOnly()` are used,\n\t* falls back to `date` or `time` formats respectively.\n\t*\n\t* @example\n\t* ```ts\n\t* v.date().toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"string\", format: \"date-time\" }\n\t*\n\t* v.date().toDateOnly().toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"string\", format: \"date\" }\n\t* ```\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\tconst schema = {\n\t\t\ttype: \"string\",\n\t\t\tformat: \"date-time\"\n\t\t};\n\t\tconst dateOpts = getRuleOptions(this.rules, \"date\");\n\t\tif (dateOpts?.format === \"YYYY-MM-DD\") schema.format = \"date\";\n\t\telse if (dateOpts?.format === \"HH:mm:ss\") schema.format = \"time\";\n\t\tif (schema.format === \"date-time\") for (const t of this.dataTransformers) {\n\t\t\tconst hint = t.options?.__jsonSchemaFormat;\n\t\t\tif (hint === \"date\" || hint === \"time\") {\n\t\t\t\tschema.format = hint;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst userFormat = t.options?.format;\n\t\t\tif (userFormat === \"YYYY-MM-DD\") {\n\t\t\t\tschema.format = \"date\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (userFormat === \"HH:mm:ss\") {\n\t\t\t\tschema.format = \"time\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (this.isNullable) applyNullable(schema, target);\n\t\treturn schema;\n\t}\n};\n\n//#endregion\nexport { DateValidator };\n//# sourceMappingURL=date-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmBA,IAAI,gBAAgB,cAAc,cAAc;CAC/C,YAAY,cAAc;EACzB,MAAM;EACN,KAAK,kBAAkB,WAAW;EAClC,KAAK,eAAe,UAAU,YAAY;CAC3C;;;;CAIA,YAAY,OAAO;EAClB,OAAO,YAAY,KAAK;CACzB;;;;;CAKA,cAAc;EACb,OAAO,KAAK,gBAAgB,SAAS,gBAAgB,OAAO,KAAK,YAAY,IAAI,IAAI;CACtF;;CAEA,cAAc;EACb,OAAO,KAAK,gBAAgB,SAAS,gBAAgB,OAAO,KAAK,QAAQ,IAAI,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,cAAc,QAAQ,MAAM;EACjD,OAAO;CACR;AACD"}
|
|
@@ -3,7 +3,7 @@ import { isPlainObject } from "../../../../../../@mongez_supportive-is@2.1.4/nod
|
|
|
3
3
|
import { BaseValidator } from "./base-validator.mjs";
|
|
4
4
|
import { LiteralValidator } from "./literal-validator.mjs";
|
|
5
5
|
|
|
6
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.
|
|
6
|
+
//#region ../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/discriminated-union-validator.mjs
|
|
7
7
|
/**
|
|
8
8
|
* Discriminated union validator — routes payloads by a shared discriminator field.
|
|
9
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discriminated-union-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.
|
|
1
|
+
{"version":3,"file":"discriminated-union-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/discriminated-union-validator.mjs"],"sourcesContent":["import { applyNullable, wrapNullableStrict } from \"../standard-schema/json-schema.mjs\";\nimport { BaseValidator } from \"./base-validator.mjs\";\nimport { LiteralValidator } from \"./literal-validator.mjs\";\nimport { isPlainObject } from \"@mongez/supportive-is\";\n\n//#region ../seal/src/validators/discriminated-union-validator.ts\n/**\n* Discriminated union validator — routes payloads by a shared discriminator field.\n*\n* Plain `v.union()` falls back to `matchesType()` to pick a branch, which is\n* coarse for object-vs-object unions (every branch matches \"is plain object\").\n* Discriminated union reads a known field's value and routes directly to the\n* matching branch, producing precise errors instead of confused mash from the\n* wrong branch.\n*\n* **Construction-time validation.** Every branch must:\n* - Be an `ObjectValidator`\n* - Declare the discriminator field\n* - Type the discriminator as `v.literal(...)` (single or multi-literal both work)\n* - Not collide with another branch's literal values\n*\n* Misconfigurations throw eagerly so tests catch them at schema-build time.\n*\n* @example\n* ```ts\n* const email = v.object({ type: v.literal(\"email\"), email: v.string().email() });\n* const sms = v.object({ type: v.literal(\"sms\"), phone: v.string() });\n* const push = v.object({ type: v.literal(\"push\"), deviceId: v.string() });\n*\n* const notif = v.discriminatedUnion(\"type\", [email, sms, push]);\n*\n* await validate(notif, { type: \"sms\", phone: \"555-1234\" });\n* // → routes to sms branch only; errors (if any) come from sms\n* ```\n*\n* @see `domains/seal/plans/2026-05-12-discriminated-union.md`\n*/\nvar DiscriminatedUnionValidator = class DiscriminatedUnionValidator extends BaseValidator {\n\tconstructor(discriminator, validators) {\n\t\tsuper();\n\t\tthis.discriminator = discriminator;\n\t\tthis.validators = validators;\n\t\tthis.branches = DiscriminatedUnionValidator.buildBranchMap(discriminator, validators);\n\t}\n\t/**\n\t* Walk every branch, pull out the discriminator's literal values, and build\n\t* the lookup map. Throws on misconfiguration (missing discriminator,\n\t* non-literal discriminator, duplicate literal value).\n\t*/\n\tstatic buildBranchMap(discriminator, validators) {\n\t\tconst map = /* @__PURE__ */ new Map();\n\t\tfor (const branch of validators) {\n\t\t\tconst discriminatorValidator = branch.schema?.[discriminator];\n\t\t\tif (!discriminatorValidator) throw new Error(`[Seal] discriminatedUnion: branch missing discriminator field \"${discriminator}\"`);\n\t\t\tif (!(discriminatorValidator instanceof LiteralValidator)) throw new Error(`[Seal] discriminatedUnion: discriminator \"${discriminator}\" must be v.literal(...) on every branch`);\n\t\t\tfor (const value of discriminatorValidator.values) {\n\t\t\t\tif (map.has(value)) throw new Error(`[Seal] discriminatedUnion: duplicate discriminator value \"${String(value)}\"`);\n\t\t\t\tmap.set(value, branch);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}\n\tmatchesType(value) {\n\t\treturn isPlainObject(value);\n\t}\n\tasync validate(data, context) {\n\t\tif (data === null && this.isNullable) return {\n\t\t\tisValid: true,\n\t\t\terrors: [],\n\t\t\tdata: null\n\t\t};\n\t\tif (!isPlainObject(data)) return {\n\t\t\tisValid: false,\n\t\t\terrors: [{\n\t\t\t\ttype: \"discriminatedUnion\",\n\t\t\t\terror: `Expected object with discriminator field \"${this.discriminator}\"`,\n\t\t\t\tinput: context.key || context.path || \"value\"\n\t\t\t}],\n\t\t\tdata: void 0\n\t\t};\n\t\tconst discriminatorValue = data[this.discriminator];\n\t\tconst branch = this.branches.get(discriminatorValue);\n\t\tif (!branch) {\n\t\t\tconst allowed = [...this.branches.keys()].map((k) => String(k)).join(\", \");\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terrors: [{\n\t\t\t\t\ttype: \"discriminatedUnion\",\n\t\t\t\t\terror: `Field \"${this.discriminator}\" must be one of: ${allowed}`,\n\t\t\t\t\tinput: this.discriminator\n\t\t\t\t}],\n\t\t\t\tdata: void 0\n\t\t\t};\n\t\t}\n\t\treturn branch.validate(data, context);\n\t}\n\tclone() {\n\t\tconst cloned = super.clone();\n\t\tcloned.discriminator = this.discriminator;\n\t\tcloned.validators = this.validators.map((v) => v.clone());\n\t\tcloned.branches = DiscriminatedUnionValidator.buildBranchMap(cloned.discriminator, cloned.validators);\n\t\treturn cloned;\n\t}\n\t/**\n\t* Emit `oneOf` of branch schemas. Each branch's own `toJsonSchema()` handles\n\t* its `properties.{discriminator}.const` and the surrounding required/optional\n\t* structure — we just enumerate.\n\t*\n\t* For `openai-strict`: the per-branch ObjectValidator already inflates\n\t* `required` to include every field; `oneOf` is OpenAI-accepted as long as\n\t* each branch passes strict rules independently.\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\tconst schema = { oneOf: this.validators.map((v) => v.toJsonSchema(target)) };\n\t\tif (this.isNullable) {\n\t\t\tif (target === \"openai-strict\") return wrapNullableStrict(schema);\n\t\t\tapplyNullable(schema, target);\n\t\t}\n\t\treturn schema;\n\t}\n};\n\n//#endregion\nexport { DiscriminatedUnionValidator };\n//# sourceMappingURL=discriminated-union-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA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AAC;KACR,MAAM;KACN,OAAO,UAAU,KAAK,cAAc,oBAAoB;KACxD,OAAO,KAAK;IACb,CAAC;IACD,MAAM,KAAK;GACZ;EACD;EACA,OAAO,OAAO,SAAS,MAAM,OAAO;CACrC;CACA,QAAQ;EACP,MAAM,SAAS,MAAM,MAAM;EAC3B,OAAO,gBAAgB,KAAK;EAC5B,OAAO,aAAa,KAAK,WAAW,KAAK,MAAM,EAAE,MAAM,CAAC;EACxD,OAAO,WAAW,4BAA4B,eAAe,OAAO,eAAe,OAAO,UAAU;EACpG,OAAO;CACR;;;;;;;;;;CAUA,aAAa,SAAS,iBAAiB;EACtC,MAAM,SAAS,EAAE,OAAO,KAAK,WAAW,KAAK,MAAM,EAAE,aAAa,MAAM,CAAC,EAAE;EAC3E,IAAI,KAAK,YAAY;GACpB,IAAI,WAAW,iBAAiB,OAAO,mBAAmB,MAAM;GAChE,cAAc,QAAQ,MAAM;EAC7B;EACA,OAAO;CACR;AACD"}
|
|
@@ -2,7 +2,7 @@ import { floatRule } from "../rules/common/type-rules.mjs";
|
|
|
2
2
|
import "../rules/index.mjs";
|
|
3
3
|
import { NumberValidator } from "./number-validator.mjs";
|
|
4
4
|
|
|
5
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.
|
|
5
|
+
//#region ../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/float-validator.mjs
|
|
6
6
|
/**
|
|
7
7
|
* Float validator class
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"float-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.
|
|
1
|
+
{"version":3,"file":"float-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/float-validator.mjs"],"sourcesContent":["import { floatRule } from \"../rules/common/type-rules.mjs\";\nimport \"../rules/index.mjs\";\nimport { NumberValidator } from \"./number-validator.mjs\";\n\n//#region ../seal/src/validators/float-validator.ts\n/**\n* Float validator class\n*/\nvar FloatValidator = class extends NumberValidator {\n\tconstructor(errorMessage) {\n\t\tsuper();\n\t\tthis.addMutableRule(floatRule, errorMessage);\n\t}\n};\n\n//#endregion\nexport { FloatValidator };\n//# sourceMappingURL=float-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAQA,IAAI,iBAAiB,cAAc,gBAAgB;CAClD,YAAY,cAAc;EACzB,MAAM;EACN,KAAK,eAAe,WAAW,YAAY;CAC5C;AACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseValidator } from "./base-validator.mjs";
|
|
2
2
|
import { instanceofRule } from "../rules/common/instanceof.mjs";
|
|
3
3
|
|
|
4
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.
|
|
4
|
+
//#region ../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/instanceof-validator.mjs
|
|
5
5
|
/**
|
|
6
6
|
* InstanceOf validator class
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instanceof-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.
|
|
1
|
+
{"version":3,"file":"instanceof-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/instanceof-validator.mjs"],"sourcesContent":["import { BaseValidator } from \"./base-validator.mjs\";\nimport { instanceofRule } from \"../rules/common/instanceof.mjs\";\n\n//#region ../seal/src/validators/instanceof-validator.ts\n/**\n* InstanceOf validator class\n*\n* Validates that the value is an instance of the given constructor (`value instanceof Ctor`).\n* Useful for File uploads, Buffer/Uint8Array payloads, and custom domain classes —\n* anywhere a runtime class identity is the right contract.\n*\n* Note: `Date` is already covered by `v.date()` with richer date-specific rules;\n* reach for `v.instanceof(Date)` only when you specifically want raw `instanceof`\n* semantics with no normalization.\n*\n* @example\n* v.instanceof(File) // type: File\n* v.instanceof(Buffer) // type: Buffer\n* v.instanceof(MyClass) // type: MyClass\n*/\nvar InstanceOfValidator = class extends BaseValidator {\n\tconstructor(ctor, errorMessage) {\n\t\tsuper();\n\t\tthis.ctor = ctor;\n\t\tthis.addMutableRule(instanceofRule, errorMessage, {\n\t\t\tctor,\n\t\t\tname: ctor.name || \"instance\"\n\t\t});\n\t}\n\t/**\n\t* Check if value is an instance of the configured constructor\n\t*/\n\tmatchesType(value) {\n\t\treturn value instanceof this.ctor;\n\t}\n\t/**\n\t* Clone the validator, preserving the target constructor.\n\t*\n\t* The base `clone()` only copies `BaseValidator` fields, so without this\n\t* override a cloned `instanceof` validator loses its `ctor` reference and\n\t* `matchesType()` would throw on the next call.\n\t*/\n\tclone() {\n\t\tconst cloned = super.clone();\n\t\tcloned.ctor = this.ctor;\n\t\treturn cloned;\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* Class instances are not representable in JSON Schema — returns an empty\n\t* schema (permissive). Consumers serializing to OpenAPI should attach an\n\t* appropriate format manually if needed (e.g. `{ type: \"string\", format: \"binary\" }`\n\t* for `File`).\n\t*/\n\ttoJsonSchema(_target = \"draft-2020-12\") {\n\t\treturn {};\n\t}\n};\n\n//#endregion\nexport { InstanceOfValidator };\n//# sourceMappingURL=instanceof-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,IAAI,sBAAsB,cAAc,cAAc;CACrD,YAAY,MAAM,cAAc;EAC/B,MAAM;EACN,KAAK,OAAO;EACZ,KAAK,eAAe,gBAAgB,cAAc;GACjD;GACA,MAAM,KAAK,QAAQ;EACpB,CAAC;CACF;;;;CAIA,YAAY,OAAO;EAClB,OAAO,iBAAiB,KAAK;CAC9B;;;;;;;;CAQA,QAAQ;EACP,MAAM,SAAS,MAAM,MAAM;EAC3B,OAAO,OAAO,KAAK;EACnB,OAAO;CACR;;;;;;;;;CASA,aAAa,UAAU,iBAAiB;EACvC,OAAO,CAAC;CACT;AACD"}
|
|
@@ -2,7 +2,7 @@ import { intRule } from "../rules/common/type-rules.mjs";
|
|
|
2
2
|
import "../rules/index.mjs";
|
|
3
3
|
import { NumberValidator } from "./number-validator.mjs";
|
|
4
4
|
|
|
5
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.
|
|
5
|
+
//#region ../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/int-validator.mjs
|
|
6
6
|
/**
|
|
7
7
|
* Integer validator class
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"int-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.
|
|
1
|
+
{"version":3,"file":"int-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/int-validator.mjs"],"sourcesContent":["import { intRule } from \"../rules/common/type-rules.mjs\";\nimport \"../rules/index.mjs\";\nimport { NumberValidator } from \"./number-validator.mjs\";\n\n//#region ../seal/src/validators/int-validator.ts\n/**\n* Integer validator class\n*/\nvar IntValidator = class extends NumberValidator {\n\tconstructor(errorMessage) {\n\t\tsuper();\n\t\tthis.addMutableRule(intRule, errorMessage);\n\t}\n\t/**\n\t* @inheritdoc — returns `{ type: \"integer\" }` instead of `{ type: \"number\" }`\n\t*\n\t* @example\n\t* ```ts\n\t* v.int().min(1).max(100).toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"integer\", minimum: 1, maximum: 100 }\n\t* ```\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\treturn this.buildNumberJsonSchema(\"integer\", target);\n\t}\n};\n\n//#endregion\nexport { IntValidator };\n//# sourceMappingURL=int-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAQA,IAAI,eAAe,cAAc,gBAAgB;CAChD,YAAY,cAAc;EACzB,MAAM;EACN,KAAK,eAAe,SAAS,YAAY;CAC1C;;;;;;;;;;CAUA,aAAa,SAAS,iBAAiB;EACtC,OAAO,KAAK,sBAAsB,WAAW,MAAM;CACpD;AACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseValidator } from "./base-validator.mjs";
|
|
2
2
|
|
|
3
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.
|
|
3
|
+
//#region ../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/lazy-validator.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Lazy validator — defers resolution of the inner validator until validate-time.
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.
|
|
1
|
+
{"version":3,"file":"lazy-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/lazy-validator.mjs"],"sourcesContent":["import { BaseValidator } from \"./base-validator.mjs\";\n\n//#region ../seal/src/validators/lazy-validator.ts\n/**\n* Lazy validator — defers resolution of the inner validator until validate-time.\n*\n* Solves the chicken-and-egg of self-referencing schemas. JavaScript evaluates\n* an object literal before the `const` binding completes, so this can't work:\n*\n* ```ts\n* const categorySchema = v.object({\n* name: v.string(),\n* children: v.array(categorySchema), // ❌ ReferenceError\n* });\n* ```\n*\n* Wrap the recursive reference in `v.lazy(() => …)` — the thunk isn't invoked\n* during construction, only when `validate()` is called:\n*\n* ```ts\n* type Category = { name: string; children: Category[] };\n*\n* const categorySchema: ObjectValidator<...> = v.object({\n* name: v.string(),\n* children: v.array(v.lazy(() => categorySchema)),\n* });\n*\n* type T = Infer<typeof categorySchema>;\n* // { name: string; children: T[] } ← recursive type\n* ```\n*\n* The thunk is memoized — it's invoked once on the first validate (or\n* `matchesType` / `toJsonSchema`) call and the result is cached. The thunk is\n* expected to return a stable validator; calling it on every validate would be\n* wasteful and could mask bugs where the user accidentally returns a fresh\n* validator each time.\n*\n* **JSON Schema caveat.** v1 uses simple resolve-and-delegate — recursive\n* schemas will infinite-loop in `toJsonSchema()`. If you need JSON Schema for\n* a recursive shape, generate it manually with `$defs` + `$ref` until v2 lands.\n*\n* @see `domains/seal/plans/2026-05-12-lazy-validator.md`\n*/\nvar LazyValidator = class extends BaseValidator {\n\tconstructor(thunk) {\n\t\tsuper();\n\t\tthis.thunk = thunk;\n\t\tthis.requiredRule = null;\n\t\tthis.isOptional = true;\n\t}\n\t/**\n\t* Resolve the inner validator. Memoizes the result so subsequent calls\n\t* don't re-execute the thunk.\n\t*/\n\tresolve() {\n\t\tif (this.resolvedValidator === void 0) this.resolvedValidator = this.thunk();\n\t\treturn this.resolvedValidator;\n\t}\n\tasync validate(data, context) {\n\t\treturn this.resolve().validate(data, context);\n\t}\n\tmatchesType(value) {\n\t\treturn this.resolve().matchesType(value);\n\t}\n\tclone() {\n\t\tconst cloned = super.clone();\n\t\tcloned.thunk = this.thunk;\n\t\tcloned.resolvedValidator = void 0;\n\t\treturn cloned;\n\t}\n\t/**\n\t* JSON Schema generation — simple resolve-and-delegate.\n\t*\n\t* **Recursive schemas will infinite-loop.** Until v2 adds `$ref` + `$defs`\n\t* generation, callers needing JSON Schema for recursive shapes must build\n\t* the schema manually.\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\treturn this.resolve().toJsonSchema(target);\n\t}\n};\n\n//#endregion\nexport { LazyValidator };\n//# sourceMappingURL=lazy-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,IAAI,gBAAgB,cAAc,cAAc;CAC/C,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,QAAQ;EACb,KAAK,eAAe;EACpB,KAAK,aAAa;CACnB;;;;;CAKA,UAAU;EACT,IAAI,KAAK,sBAAsB,KAAK,GAAG,KAAK,oBAAoB,KAAK,MAAM;EAC3E,OAAO,KAAK;CACb;CACA,MAAM,SAAS,MAAM,SAAS;EAC7B,OAAO,KAAK,QAAQ,CAAC,CAAC,SAAS,MAAM,OAAO;CAC7C;CACA,YAAY,OAAO;EAClB,OAAO,KAAK,QAAQ,CAAC,CAAC,YAAY,KAAK;CACxC;CACA,QAAQ;EACP,MAAM,SAAS,MAAM,MAAM;EAC3B,OAAO,QAAQ,KAAK;EACpB,OAAO,oBAAoB,KAAK;EAChC,OAAO;CACR;;;;;;;;CAQA,aAAa,SAAS,iBAAiB;EACtC,OAAO,KAAK,QAAQ,CAAC,CAAC,aAAa,MAAM;CAC1C;AACD"}
|
|
@@ -4,7 +4,7 @@ import { presentRule } from "../rules/core/required.mjs";
|
|
|
4
4
|
import { BaseValidator } from "./base-validator.mjs";
|
|
5
5
|
import { literalRule } from "../rules/common/literal.mjs";
|
|
6
6
|
|
|
7
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.
|
|
7
|
+
//#region ../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/literal-validator.mjs
|
|
8
8
|
/**
|
|
9
9
|
* Literal validator class
|
|
10
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"literal-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.
|
|
1
|
+
{"version":3,"file":"literal-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/literal-validator.mjs"],"sourcesContent":["import { applyNullable } from \"../standard-schema/json-schema.mjs\";\nimport { isEmptyValue } from \"../helpers/is-empty-value.mjs\";\nimport { presentRule } from \"../rules/core/required.mjs\";\nimport { BaseValidator } from \"./base-validator.mjs\";\nimport { literalRule } from \"../rules/common/literal.mjs\";\n\n//#region ../seal/src/validators/literal-validator.ts\n/**\n* Literal validator class\n*\n* Accepts a fixed tuple of primitive literal values (string, number, boolean).\n* The TypeScript type narrows to the union of those literals — `v.literal(\"a\", \"b\")`\n* infers as `\"a\" | \"b\"`, not `string`. Use for discriminator fields, enum-like\n* unions of constants, and any case where `oneOf([...])` would lose literal types.\n*\n* @example\n* v.literal(\"items\") // type: \"items\"\n* v.literal(\"draft\", \"published\") // type: \"draft\" | \"published\"\n* v.literal(1, 2, 3) // type: 1 | 2 | 3\n* v.literal(true) // type: true\n*/\nvar LiteralValidator = class extends BaseValidator {\n\tconstructor(values, errorMessage) {\n\t\tsuper();\n\t\tthis.values = values;\n\t\tthis.addMutableRule(literalRule, errorMessage, { values });\n\t\tif (values.some((value) => isEmptyValue(value))) this.requiredRule = this.createRule(presentRule);\n\t}\n\t/**\n\t* Check if value is one of the configured literals\n\t*/\n\tmatchesType(value) {\n\t\treturn this.values.includes(value);\n\t}\n\t/**\n\t* Clone the validator, preserving the literal `values` set.\n\t*\n\t* The base `clone()` only copies `BaseValidator` fields, so without this\n\t* override a cloned literal loses its public `values` array — which breaks\n\t* any consumer that reads it (e.g. `discriminatedUnion` branch routing).\n\t*/\n\tclone() {\n\t\tconst cloned = super.clone();\n\t\tcloned.values = this.values;\n\t\treturn cloned;\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* Single literal → `{ const: <value> }`. Multiple → `{ enum: [...] }`.\n\t*\n\t* @example\n\t* ```ts\n\t* v.literal(\"items\").toJsonSchema()\n\t* // → { const: \"items\" }\n\t*\n\t* v.literal(\"draft\", \"published\").toJsonSchema()\n\t* // → { enum: [\"draft\", \"published\"] }\n\t* ```\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\tconst schema = this.values.length === 1 ? { const: this.values[0] } : { enum: [...this.values] };\n\t\tif (this.isNullable) applyNullable(schema, target);\n\t\treturn schema;\n\t}\n};\n\n//#endregion\nexport { LiteralValidator };\n//# sourceMappingURL=literal-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,IAAI,mBAAmB,cAAc,cAAc;CAClD,YAAY,QAAQ,cAAc;EACjC,MAAM;EACN,KAAK,SAAS;EACd,KAAK,eAAe,aAAa,cAAc,EAAE,OAAO,CAAC;EACzD,IAAI,OAAO,MAAM,UAAU,aAAa,KAAK,CAAC,GAAG,KAAK,eAAe,KAAK,WAAW,WAAW;CACjG;;;;CAIA,YAAY,OAAO;EAClB,OAAO,KAAK,OAAO,SAAS,KAAK;CAClC;;;;;;;;CAQA,QAAQ;EACP,MAAM,SAAS,MAAM,MAAM;EAC3B,OAAO,SAAS,KAAK;EACrB,OAAO;CACR;;;;;;;;;;;;;;;CAeA,aAAa,SAAS,iBAAiB;EACtC,MAAM,SAAS,KAAK,OAAO,WAAW,IAAI,EAAE,OAAO,KAAK,OAAO,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,KAAK,MAAM,EAAE;EAC/F,IAAI,KAAK,YAAY,cAAc,QAAQ,MAAM;EACjD,OAAO;CACR;AACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComputedValidator } from "./computed-validator.mjs";
|
|
2
2
|
|
|
3
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.
|
|
3
|
+
//#region ../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/managed-validator.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Managed field validator
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"managed-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.
|
|
1
|
+
{"version":3,"file":"managed-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/managed-validator.mjs"],"sourcesContent":["import { ComputedValidator } from \"./computed-validator.mjs\";\n\n//#region ../seal/src/validators/managed-validator.ts\n/**\n* Managed field validator\n*\n* The callback is optional - if not provided, the framework can inject the value.\n* @example\n* ```ts\n* // With callback (framework executes it)\n* const schema = v.object({\n* name: v.string(),\n* createdAt: v.managed(() => new Date()),\n* updatedAt: v.managed(() => new Date()),\n* });\n*\n* // Without callback (framework injects value)\n* const schema = v.object({\n* name: v.string(),\n* id: v.managed(() => 1),\n* });\n* ```\n*/\nvar ManagedValidator = class extends ComputedValidator {\n\t/**\n\t* Create a new managed field validator\n\t*\n\t* @param callback - Optional function to generate the value\n\t* @param resultValidator - Optional validator to validate the generated result\n\t*/\n\tconstructor(callback, resultValidator) {\n\t\tconst computedCallback = (_data, context) => callback(context);\n\t\tsuper(computedCallback, resultValidator);\n\t}\n};\n\n//#endregion\nexport { ManagedValidator };\n//# sourceMappingURL=managed-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAI,mBAAmB,cAAc,kBAAkB;;;;;;;CAOtD,YAAY,UAAU,iBAAiB;EACtC,MAAM,oBAAoB,OAAO,YAAY,SAAS,OAAO;EAC7D,MAAM,kBAAkB,eAAe;CACxC;AACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WhenRuleOptions } from "../../types/conditional-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.
|
|
3
|
+
//#region ../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/methods/equality-conditional-methods.d.mts
|
|
4
4
|
declare module "../base-validator.mjs" {
|
|
5
5
|
interface BaseValidator {
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equality-conditional-methods.d.mts","names":["BaseValidator","equal","value","errorMessage","sameAs","field","sameAsSibling","differentFrom","differentFromSibling","when","Omit","WhenRuleOptions","options","whenSibling","siblingField"],"sources":["../../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.
|
|
1
|
+
{"version":3,"file":"equality-conditional-methods.d.mts","names":["BaseValidator","equal","value","errorMessage","sameAs","field","sameAsSibling","differentFrom","differentFromSibling","when","Omit","WhenRuleOptions","options","whenSibling","siblingField"],"sources":["../../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.3.1/node_modules/@warlock.js/seal/esm/validators/methods/equality-conditional-methods.d.mts"],"x_google_ignoreList":[0],"mappings":";;;;YASYA,aAAAA;IAkFuC;;;IA9E/CC,KAAAA,CAAMC,KAAAA,OAAYC,YAAAA;IAAZD;;;IAINE,MAAAA,CAAOC,KAAAA,UAAeF,YAAAA;IAAAA;;;IAItBG,aAAAA,CAAcD,KAAAA,UAAeF,YAAAA;IAI7BI;;;IAAAA,aAAAA,CAAcF,KAAAA,UAAeF,YAAAA;IAIRE;;;IAArBG,oBAAAA,CAAqBH,KAAAA,UAAeF,YAAAA;IAqCPO;;;;;;;;;;AAyBsD;;;;;;;;;;;;;;;;;;;;;;;;;;IAzBnFD,IAAAA,CAAKJ,KAAAA,UAAeO,OAAAA,EAAS,IAAA,CAAK,eAAA;;;;;;;;;;;;;;;;;;;;;;;;;IAyBlCC,WAAAA,CAAYC,YAAAA,UAAsBF,OAAAA,EAAS,IAAA,CAAK,eAAA;EAAA;AAAA;AAAA"}
|