@warlock.js/notifications 5.21.0 → 5.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/cjs/index.cjs +1 -1
- package/cjs/rabbitmq-driver-DsJYFQr3.cjs +3 -0
- package/cjs/{esm-BxeBV3ce.cjs → src-DDFfLj-d.cjs} +435 -343
- package/cjs/src-DDFfLj-d.cjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm → herald/src}/communicators/broker-registry.mjs +5 -5
- package/esm/herald/src/communicators/broker-registry.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm → herald/src}/communicators/broker.mjs +7 -1
- package/esm/herald/src/communicators/broker.mjs.map +1 -0
- package/esm/herald/src/communicators/index.mjs +4 -0
- package/esm/{node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm → herald/src}/decorators/consumable.mjs +1 -1
- package/esm/herald/src/decorators/consumable.mjs.map +1 -0
- package/esm/herald/src/decorators/index.mjs +3 -0
- package/esm/herald/src/drivers/index.mjs +5 -0
- package/esm/herald/src/drivers/rabbitmq/index.mjs +4 -0
- package/esm/{node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm → herald/src}/drivers/rabbitmq/rabbitmq-channel.mjs +13 -6
- package/esm/herald/src/drivers/rabbitmq/rabbitmq-channel.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm → herald/src}/drivers/rabbitmq/rabbitmq-driver.mjs +11 -10
- package/esm/herald/src/drivers/rabbitmq/rabbitmq-driver.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm → herald/src}/message-managers/event-consumer.mjs +22 -10
- package/esm/herald/src/message-managers/event-consumer.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm → herald/src}/message-managers/event-message.mjs +20 -3
- package/esm/herald/src/message-managers/event-message.mjs.map +1 -0
- package/esm/herald/src/message-managers/index.mjs +4 -0
- package/esm/{node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm → herald/src}/message-managers/prepare-consumer-subscription.mjs +1 -1
- package/esm/herald/src/message-managers/prepare-consumer-subscription.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm → herald/src}/use-case-broadcast.mjs +1 -1
- package/esm/herald/src/use-case-broadcast.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm → herald/src}/utils/connect-to-broker.mjs +1 -1
- package/esm/herald/src/utils/connect-to-broker.mjs.map +1 -0
- package/esm/herald/src/utils/index.mjs +3 -0
- package/esm/index.d.mts +0 -4
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/_internal.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/_internal.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/mixed/clone/clone.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/mixed/clone/clone.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/number/round.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/number/round.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/object/except.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/object/except.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/object/get.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/object/get.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/object/omit.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/object/omit.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/object/unset.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/object/unset.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/capitalize.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/capitalize.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/ltrim.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/ltrim.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/readMoreChars.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/readMoreChars.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/rtrim.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/rtrim.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/toCamelCase.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/toCamelCase.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/toKebabCase.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/toKebabCase.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/toSnakeCase.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/toSnakeCase.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/toStudlyCase.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/toStudlyCase.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/trim.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/trim.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/ucfirst.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/ucfirst.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/words.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/string/words.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/utils/escapeRegex.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/utils/escapeRegex.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/utils/lazy.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/utils/lazy.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/utils/tap.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/utils/tap.mjs.map +1 -1
- package/esm/node_modules/.pnpm/{@mongez_supportive-is@2.1.4 → @mongez_supportive-is@2.1.5}/node_modules/@mongez/supportive-is/esm/index.mjs +1 -1
- package/esm/node_modules/.pnpm/{@mongez_supportive-is@2.1.4 → @mongez_supportive-is@2.1.5}/node_modules/@mongez/supportive-is/esm/index.mjs.map +1 -1
- package/esm/queue/load-herald.d.mts.map +1 -1
- package/esm/queue/load-herald.mjs +1 -1
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/config.mjs +1 -1
- package/esm/seal/src/config.mjs.map +1 -0
- package/esm/seal/src/factory/index.mjs +4 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/factory/validate.mjs +1 -1
- package/esm/seal/src/factory/validate.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/factory/validators.mjs +1 -1
- package/esm/seal/src/factory/validators.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/helpers/date-helpers.mjs +1 -1
- package/esm/seal/src/helpers/date-helpers.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/helpers/get-field-value.mjs +3 -3
- package/esm/seal/src/helpers/get-field-value.mjs.map +1 -0
- package/esm/seal/src/helpers/index.mjs +6 -0
- package/esm/seal/src/helpers/is-empty-value.mjs +10 -0
- package/esm/seal/src/helpers/is-empty-value.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/helpers/path-helpers.mjs +1 -1
- package/esm/seal/src/helpers/path-helpers.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/helpers/validation-helpers.mjs +1 -1
- package/esm/seal/src/helpers/validation-helpers.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/index.mjs +0 -7
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/mutators/array-mutators.mjs +3 -3
- package/esm/seal/src/mutators/array-mutators.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/mutators/boolean-mutators.mjs +1 -1
- package/esm/seal/src/mutators/boolean-mutators.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/mutators/date-mutators.mjs +3 -3
- package/esm/seal/src/mutators/date-mutators.mjs.map +1 -0
- package/esm/seal/src/mutators/index.mjs +9 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/mutators/number-mutators.mjs +4 -4
- package/esm/seal/src/mutators/number-mutators.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/mutators/object-mutators.mjs +4 -4
- package/esm/seal/src/mutators/object-mutators.mjs.map +1 -0
- package/esm/seal/src/mutators/scalar-mutators.mjs +9 -0
- package/esm/seal/src/mutators/scalar-mutators.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/mutators/string-mutators.mjs +11 -11
- package/esm/seal/src/mutators/string-mutators.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/object.mjs +1 -1
- package/esm/seal/src/object.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/array/array-rules.mjs +1 -1
- package/esm/seal/src/rules/array/array-rules.mjs.map +1 -0
- package/esm/seal/src/rules/array/index.mjs +3 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/color/color-rules.mjs +1 -1
- package/esm/seal/src/rules/color/color-rules.mjs.map +1 -0
- package/esm/seal/src/rules/color/index.mjs +3 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/common/enum.mjs +1 -1
- package/esm/seal/src/rules/common/enum.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/common/equals-field-rules.mjs +1 -1
- package/esm/seal/src/rules/common/equals-field-rules.mjs.map +1 -0
- package/esm/seal/src/rules/common/index.mjs +8 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/common/instanceof.mjs +1 -1
- package/esm/seal/src/rules/common/instanceof.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/common/literal.mjs +1 -1
- package/esm/seal/src/rules/common/literal.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/common/type-rules.mjs +2 -2
- package/esm/seal/src/rules/common/type-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/common/unknown-key.mjs +1 -1
- package/esm/seal/src/rules/common/unknown-key.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/forbidden-if-rules.mjs +2 -2
- package/esm/seal/src/rules/conditional/forbidden-if-rules.mjs.map +1 -0
- package/esm/seal/src/rules/conditional/index.mjs +12 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/present-if-rules.mjs +2 -2
- package/esm/seal/src/rules/conditional/present-if-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/present-unless-rules.mjs +1 -1
- package/esm/seal/src/rules/conditional/present-unless-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/present-with-rules.mjs +3 -3
- package/esm/seal/src/rules/conditional/present-with-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/present-without-rules.mjs +3 -3
- package/esm/seal/src/rules/conditional/present-without-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/required-if-rules.mjs +4 -4
- package/esm/seal/src/rules/conditional/required-if-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/required-unless-rules.mjs +2 -2
- package/esm/seal/src/rules/conditional/required-unless-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/required-when-rule.mjs +2 -2
- package/esm/seal/src/rules/conditional/required-when-rule.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/required-with-rules.mjs +4 -4
- package/esm/seal/src/rules/conditional/required-with-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/required-without-rules.mjs +4 -4
- package/esm/seal/src/rules/conditional/required-without-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/core/equal.mjs +1 -1
- package/esm/seal/src/rules/core/equal.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/core/forbidden.mjs +2 -2
- package/esm/seal/src/rules/core/forbidden.mjs.map +1 -0
- package/esm/seal/src/rules/core/index.mjs +7 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/core/required.mjs +2 -2
- package/esm/seal/src/rules/core/required.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/core/union.mjs +1 -1
- package/esm/seal/src/rules/core/union.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/core/when.mjs +3 -3
- package/esm/seal/src/rules/core/when.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/date/date-comparison-rules.mjs +1 -1
- package/esm/seal/src/rules/date/date-comparison-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/date/date-day-rules.mjs +1 -1
- package/esm/seal/src/rules/date/date-day-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/date/date-field-comparison-rules.mjs +3 -3
- package/esm/seal/src/rules/date/date-field-comparison-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/date/date-period-rules.mjs +3 -3
- package/esm/seal/src/rules/date/date-period-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/date/date-relative-rules.mjs +1 -1
- package/esm/seal/src/rules/date/date-relative-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/date/date-special-rules.mjs +1 -1
- package/esm/seal/src/rules/date/date-special-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/date/date.mjs +3 -3
- package/esm/seal/src/rules/date/date.mjs.map +1 -0
- package/esm/seal/src/rules/date/index.mjs +9 -0
- package/esm/seal/src/rules/index.mjs +54 -0
- package/esm/seal/src/rules/length/index.mjs +3 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/length/length-rules.mjs +1 -1
- package/esm/seal/src/rules/length/length-rules.mjs.map +1 -0
- package/esm/seal/src/rules/number/index.mjs +3 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/number/number-rules.mjs +3 -3
- package/esm/seal/src/rules/number/number-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/scalar/accepted-rule.mjs +2 -2
- package/esm/seal/src/rules/scalar/accepted-rule.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/scalar/declined-rule.mjs +2 -2
- package/esm/seal/src/rules/scalar/declined-rule.mjs.map +1 -0
- package/esm/seal/src/rules/scalar/index.mjs +4 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/string/alpha.mjs +1 -1
- package/esm/seal/src/rules/string/alpha.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/string/credit-card.mjs +1 -1
- package/esm/seal/src/rules/string/credit-card.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/string/email.mjs +2 -2
- package/esm/seal/src/rules/string/email.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/string/id-formats.mjs +1 -1
- package/esm/seal/src/rules/string/id-formats.mjs.map +1 -0
- package/esm/seal/src/rules/string/index.mjs +13 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/string/ip.mjs +1 -1
- package/esm/seal/src/rules/string/ip.mjs.map +1 -0
- package/esm/seal/src/rules/string/matches.mjs +4 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/string/pattern.mjs +1 -1
- package/esm/seal/src/rules/string/pattern.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/string/string-comparison.mjs +1 -1
- package/esm/seal/src/rules/string/string-comparison.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/string/strong-password-rule.mjs +1 -1
- package/esm/seal/src/rules/string/strong-password-rule.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/string/url.mjs +1 -1
- package/esm/seal/src/rules/string/url.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/string/without-whitespace.mjs +1 -1
- package/esm/seal/src/rules/string/without-whitespace.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/standard-schema/json-schema.mjs +1 -1
- package/esm/seal/src/standard-schema/json-schema.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/standard-schema/map-result.mjs +1 -1
- package/esm/seal/src/standard-schema/map-result.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/string.mjs +1 -1
- package/esm/seal/src/string.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/types/date-types.mjs +1 -1
- package/esm/seal/src/types/date-types.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/any-validator.mjs +9 -6
- package/esm/seal/src/validators/any-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/array-validator.mjs +2 -1
- package/esm/seal/src/validators/array-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/base-validator.mjs +49 -16
- package/esm/seal/src/validators/base-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/boolean-validator.mjs +1 -1
- package/esm/seal/src/validators/boolean-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/computed-validator.mjs +3 -1
- package/esm/seal/src/validators/computed-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/date-validator.mjs +3 -3
- package/esm/seal/src/validators/date-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/discriminated-union-validator.mjs +6 -2
- package/esm/seal/src/validators/discriminated-union-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/float-validator.mjs +1 -1
- package/esm/seal/src/validators/float-validator.mjs.map +1 -0
- package/esm/seal/src/validators/index.mjs +28 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/instanceof-validator.mjs +2 -1
- package/esm/seal/src/validators/instanceof-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/int-validator.mjs +1 -1
- package/esm/seal/src/validators/int-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/lazy-validator.mjs +3 -1
- package/esm/seal/src/validators/lazy-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/literal-validator.mjs +2 -1
- package/esm/seal/src/validators/literal-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/managed-validator.mjs +1 -1
- package/esm/seal/src/validators/managed-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/methods/equality-conditional-methods.mjs +1 -1
- package/esm/seal/src/validators/methods/equality-conditional-methods.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/methods/forbidden-methods.mjs +1 -1
- package/esm/seal/src/validators/methods/forbidden-methods.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/methods/present-methods.mjs +1 -1
- package/esm/seal/src/validators/methods/present-methods.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/methods/required-methods.mjs +1 -1
- package/esm/seal/src/validators/methods/required-methods.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/number-validator.mjs +1 -1
- package/esm/seal/src/validators/number-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/numeric-validator.mjs +2 -2
- package/esm/seal/src/validators/numeric-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/object-validator.mjs +8 -7
- package/esm/seal/src/validators/object-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/primitive-validator.mjs +1 -1
- package/esm/seal/src/validators/primitive-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/record-validator.mjs +3 -2
- package/esm/seal/src/validators/record-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/scalar-validator.mjs +1 -1
- package/esm/seal/src/validators/scalar-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/string-validator.mjs +3 -3
- package/esm/seal/src/validators/string-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/tuple-validator.mjs +2 -1
- package/esm/seal/src/validators/tuple-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/union-validator.mjs +1 -1
- package/esm/seal/src/validators/union-validator.mjs.map +1 -0
- package/package.json +7 -7
- package/cjs/esm-BxeBV3ce.cjs.map +0 -1
- package/cjs/rabbitmq-driver-ii7OCEmF.cjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/communicators/broker-registry.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/communicators/broker-registry.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/communicators/broker.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/communicators/broker.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/communicators/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/contracts/broker-driver.contract.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/contracts/channel.contract.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/decorators/consumable.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/decorators/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/drivers/index.mjs +0 -5
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/index.mjs +0 -4
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-channel.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-channel.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-driver.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-driver.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/index.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/message-managers/event-consumer.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/message-managers/event-consumer.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/message-managers/event-message.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/message-managers/event-message.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/message-managers/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/message-managers/prepare-consumer-subscription.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/types/channel.types.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/types/registry.types.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/use-case-broadcast.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/utils/connect-to-broker.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/utils/connect-to-broker.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm/utils/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/config.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/factory/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/factory/validate.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/factory/validators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/helpers/date-helpers.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/helpers/get-field-value.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/helpers/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/helpers/is-empty-value.mjs +0 -10
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/helpers/is-empty-value.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/helpers/path-helpers.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/helpers/validation-helpers.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/index.d.mts +0 -10
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/mutators/array-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/mutators/boolean-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/mutators/date-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/mutators/index.mjs +0 -8
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/mutators/number-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/mutators/object-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/mutators/scalar-mutators.mjs +0 -9
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/mutators/scalar-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/mutators/string-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/object.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/array/array-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/array/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/color/color-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/color/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/common/enum.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/common/equals-field-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/common/index.mjs +0 -8
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/common/instanceof.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/common/literal.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/common/type-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/common/unknown-key.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/conditional/forbidden-if-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/conditional/index.mjs +0 -12
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/conditional/present-if-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/conditional/present-unless-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/conditional/present-with-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/conditional/present-without-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/conditional/required-if-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/conditional/required-unless-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/conditional/required-when-rule.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/conditional/required-with-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/conditional/required-without-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/core/equal.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/core/forbidden.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/core/index.mjs +0 -7
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/core/required.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/core/union.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/core/when.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/date/date-comparison-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/date/date-day-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/date/date-field-comparison-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/date/date-period-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/date/date-relative-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/date/date-special-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/date/date.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/date/index.mjs +0 -9
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/index.mjs +0 -57
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/length/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/length/length-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/number/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/number/number-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/scalar/accepted-rule.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/scalar/declined-rule.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/scalar/index.mjs +0 -4
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/alpha.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/credit-card.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/email.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/id-formats.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/index.mjs +0 -13
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/ip.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/matches.mjs +0 -4
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/pattern.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/string-comparison.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/strong-password-rule.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/url.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/rules/string/without-whitespace.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/standard-schema/json-schema.d.mts +0 -32
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/standard-schema/json-schema.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/standard-schema/json-schema.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/standard-schema/map-result.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/standard-schema/types.d.mts +0 -97
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/standard-schema/types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/string.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/conditional-types.d.mts +0 -16
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/conditional-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/context-types.d.mts +0 -43
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/context-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/data-transformer-types.d.mts +0 -30
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/data-transformer-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/date-types.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/mutator-types.d.mts +0 -28
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/mutator-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/result-types.d.mts +0 -17
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/result-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/rule-types.d.mts +0 -53
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/rule-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/schema-types.d.mts +0 -11
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/types/schema-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/any-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/array-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/base-validator.d.mts +0 -492
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/base-validator.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/base-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/boolean-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/computed-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/date-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/discriminated-union-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/float-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/index.mjs +0 -28
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/instanceof-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/int-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/lazy-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/literal-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/managed-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/equality-conditional-methods.d.mts +0 -91
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/equality-conditional-methods.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/equality-conditional-methods.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/forbidden-methods.d.mts +0 -59
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/forbidden-methods.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/forbidden-methods.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/present-methods.d.mts +0 -103
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/present-methods.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/present-methods.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.d.mts +0 -194
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/number-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/numeric-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/object-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/primitive-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/record-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/scalar-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/string-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/tuple-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/union-validator.mjs.map +0 -1
- /package/esm/{node_modules/.pnpm/@warlock.js_herald@5.18.0_@_cff41be99df8cf0240c0ee463e185280/node_modules/@warlock.js/herald/esm → herald/src}/index.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/bool.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/color.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/date.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/float.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/id.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/int.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/nanoid.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/pick.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/random.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/sample.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/string.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/token.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/uuid.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/Random/weighted.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/async/retry.mjs +0 -0
- /package/esm/node_modules/.pnpm/{@mongez_reinforcements@4.0.1 → @mongez_reinforcements@4.0.2}/node_modules/@mongez/reinforcements/esm/index.mjs +0 -0
- /package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/file/dimensions.mjs +0 -0
- /package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/file/file-size.mjs +0 -0
- /package/esm/{node_modules/.pnpm/@warlock.js_seal@5.18.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/file/index.mjs +0 -0
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { SchemaContext } from "../../types/context-types.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.d.mts
|
|
4
|
-
declare module "../base-validator.mjs" {
|
|
5
|
-
interface BaseValidator {
|
|
6
|
-
/**
|
|
7
|
-
* This value must be present and has a value
|
|
8
|
-
*/
|
|
9
|
-
required(errorMessage?: string): this;
|
|
10
|
-
/**
|
|
11
|
-
* Value must be present but not necessarily has a value
|
|
12
|
-
*/
|
|
13
|
-
present(errorMessage?: string): this;
|
|
14
|
-
/**
|
|
15
|
-
* Mark the field as optional, so pass it if it has no value or has a value
|
|
16
|
-
* Because this is the default behavior, this method is just syntactic sugar
|
|
17
|
-
*/
|
|
18
|
-
optional(): this & {
|
|
19
|
-
isOptional: true;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Sugar for `.optional().nullable()` — the field may be absent OR null.
|
|
23
|
-
*
|
|
24
|
-
* Brands the return type with both `{ isOptional: true }` and `{ isNullable: true }`
|
|
25
|
-
* so `Infer<>` produces `{ field?: T | null }`.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* v.string().nullish()
|
|
29
|
-
* // type: string | null | undefined
|
|
30
|
-
* // absent → key omitted
|
|
31
|
-
* // null → null
|
|
32
|
-
* // "x" → "x"
|
|
33
|
-
*/
|
|
34
|
-
nullish(): this & {
|
|
35
|
-
isOptional: true;
|
|
36
|
-
isNullable: true;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Value is required if another field exists
|
|
40
|
-
*/
|
|
41
|
-
requiredWith(field: string, errorMessage?: string): this;
|
|
42
|
-
/**
|
|
43
|
-
* Value is required if another sibling field exists
|
|
44
|
-
*/
|
|
45
|
-
requiredWithSibling(field: string, errorMessage?: string): this;
|
|
46
|
-
/**
|
|
47
|
-
* Value is required if another field is missing
|
|
48
|
-
*/
|
|
49
|
-
requiredWithout(field: string, errorMessage?: string): this;
|
|
50
|
-
/**
|
|
51
|
-
* Value is required if another sibling field is missing
|
|
52
|
-
*/
|
|
53
|
-
requiredWithoutSibling(field: string, errorMessage?: string): this;
|
|
54
|
-
/**
|
|
55
|
-
* Value is required if another field equals a specific value
|
|
56
|
-
*/
|
|
57
|
-
requiredIf(field: string, value: any, errorMessage?: string): this;
|
|
58
|
-
/**
|
|
59
|
-
* Value is required if another sibling field equals a specific value
|
|
60
|
-
*/
|
|
61
|
-
requiredIfSibling(field: string, value: any, errorMessage?: string): this;
|
|
62
|
-
/**
|
|
63
|
-
* Value is required unless another field equals a specific value
|
|
64
|
-
*/
|
|
65
|
-
requiredUnless(field: string, value: any, errorMessage?: string): this;
|
|
66
|
-
/**
|
|
67
|
-
* Value is required unless another sibling field equals a specific value
|
|
68
|
-
*/
|
|
69
|
-
requiredUnlessSibling(field: string, value: any, errorMessage?: string): this;
|
|
70
|
-
/**
|
|
71
|
-
* Value is required if another field is empty
|
|
72
|
-
*/
|
|
73
|
-
requiredIfEmpty(field: string, errorMessage?: string): this;
|
|
74
|
-
/**
|
|
75
|
-
* Value is required if another sibling field is empty
|
|
76
|
-
*/
|
|
77
|
-
requiredIfEmptySibling(field: string, errorMessage?: string): this;
|
|
78
|
-
/**
|
|
79
|
-
* Value is required if another field is not empty
|
|
80
|
-
*/
|
|
81
|
-
requiredIfNotEmpty(field: string, errorMessage?: string): this;
|
|
82
|
-
/**
|
|
83
|
-
* Value is required if another sibling field is not empty
|
|
84
|
-
*/
|
|
85
|
-
requiredIfNotEmptySibling(field: string, errorMessage?: string): this;
|
|
86
|
-
/**
|
|
87
|
-
* Value is required if ALL specified fields are empty
|
|
88
|
-
*/
|
|
89
|
-
requiredIfAllEmpty(fields: string[], errorMessage?: string): this;
|
|
90
|
-
/**
|
|
91
|
-
* Value is required if ALL specified sibling fields are empty
|
|
92
|
-
*/
|
|
93
|
-
requiredIfAllEmptySiblings(fields: string[], errorMessage?: string): this;
|
|
94
|
-
/**
|
|
95
|
-
* Value is required if ANY of the specified fields is empty
|
|
96
|
-
*/
|
|
97
|
-
requiredIfAnyEmpty(fields: string[], errorMessage?: string): this;
|
|
98
|
-
/**
|
|
99
|
-
* Value is required if ANY of the specified sibling fields is empty
|
|
100
|
-
*/
|
|
101
|
-
requiredIfAnyEmptySiblings(fields: string[], errorMessage?: string): this;
|
|
102
|
-
/**
|
|
103
|
-
* Value is required if ALL specified fields are NOT empty
|
|
104
|
-
*/
|
|
105
|
-
requiredIfAllNotEmpty(fields: string[], errorMessage?: string): this;
|
|
106
|
-
/**
|
|
107
|
-
* Value is required if ALL specified sibling fields are NOT empty
|
|
108
|
-
*/
|
|
109
|
-
requiredIfAllNotEmptySiblings(fields: string[], errorMessage?: string): this;
|
|
110
|
-
/**
|
|
111
|
-
* Value is required if ANY of the specified fields is NOT empty
|
|
112
|
-
*/
|
|
113
|
-
requiredIfAnyNotEmpty(fields: string[], errorMessage?: string): this;
|
|
114
|
-
/**
|
|
115
|
-
* Value is required if ANY of the specified sibling fields is NOT empty
|
|
116
|
-
*/
|
|
117
|
-
requiredIfAnyNotEmptySiblings(fields: string[], errorMessage?: string): this;
|
|
118
|
-
/**
|
|
119
|
-
* Value is required if another field's value is in the given array
|
|
120
|
-
*/
|
|
121
|
-
requiredIfIn(field: string, values: any[], errorMessage?: string): this;
|
|
122
|
-
/**
|
|
123
|
-
* Value is required if another sibling field's value is in the given array
|
|
124
|
-
*/
|
|
125
|
-
requiredIfInSibling(field: string, values: any[], errorMessage?: string): this;
|
|
126
|
-
/**
|
|
127
|
-
* Value is required if another field's value is NOT in the given array
|
|
128
|
-
*/
|
|
129
|
-
requiredIfNotIn(field: string, values: any[], errorMessage?: string): this;
|
|
130
|
-
/**
|
|
131
|
-
* Value is required if another sibling field's value is NOT in the given array
|
|
132
|
-
*/
|
|
133
|
-
requiredIfNotInSibling(field: string, values: any[], errorMessage?: string): this;
|
|
134
|
-
/**
|
|
135
|
-
* Value is required if all specified fields exist
|
|
136
|
-
*/
|
|
137
|
-
requiredWithAll(fields: string[], errorMessage?: string): this;
|
|
138
|
-
/**
|
|
139
|
-
* Value is required if all specified sibling fields exist
|
|
140
|
-
*/
|
|
141
|
-
requiredWithAllSiblings(fields: string[], errorMessage?: string): this;
|
|
142
|
-
/**
|
|
143
|
-
* Value is required if all specified fields are missing
|
|
144
|
-
*/
|
|
145
|
-
requiredWithoutAll(fields: string[], errorMessage?: string): this;
|
|
146
|
-
/**
|
|
147
|
-
* Value is required if all specified sibling fields are missing
|
|
148
|
-
*/
|
|
149
|
-
requiredWithoutAllSiblings(fields: string[], errorMessage?: string): this;
|
|
150
|
-
/**
|
|
151
|
-
* Value is required if any of the specified fields exists
|
|
152
|
-
*/
|
|
153
|
-
requiredWithAny(fields: string[], errorMessage?: string): this;
|
|
154
|
-
/**
|
|
155
|
-
* Value is required if any of the specified sibling fields exists
|
|
156
|
-
*/
|
|
157
|
-
requiredWithAnySiblings(fields: string[], errorMessage?: string): this;
|
|
158
|
-
/**
|
|
159
|
-
* Value is required if any of the specified fields is missing
|
|
160
|
-
*/
|
|
161
|
-
requiredWithoutAny(fields: string[], errorMessage?: string): this;
|
|
162
|
-
/**
|
|
163
|
-
* Value is required if any of the specified sibling fields is missing
|
|
164
|
-
*/
|
|
165
|
-
requiredWithoutAnySiblings(fields: string[], errorMessage?: string): this;
|
|
166
|
-
/**
|
|
167
|
-
* Make this field required based on a custom callback.
|
|
168
|
-
*
|
|
169
|
-
* The callback receives only the `SchemaContext` (not the value),
|
|
170
|
-
* because "required" is about surrounding conditions, not the field itself.
|
|
171
|
-
* Return `true` if the field should be required.
|
|
172
|
-
*
|
|
173
|
-
* @param callback - Receives SchemaContext, returns boolean
|
|
174
|
-
* @param errorMessage - Optional custom error message
|
|
175
|
-
*
|
|
176
|
-
* @example
|
|
177
|
-
* ```ts
|
|
178
|
-
* // Required when email notification is enabled
|
|
179
|
-
* v.string().requiredWhen((context) => {
|
|
180
|
-
* return context.allData.notificationMethod === 'email';
|
|
181
|
-
* })
|
|
182
|
-
*
|
|
183
|
-
* // Required based on multiple conditions
|
|
184
|
-
* v.string().requiredWhen((context) => {
|
|
185
|
-
* const { role, department } = context.allData;
|
|
186
|
-
* return role === 'manager' && department === 'finance';
|
|
187
|
-
* })
|
|
188
|
-
* ```
|
|
189
|
-
*/
|
|
190
|
-
requiredWhen(callback: (context: SchemaContext) => boolean | Promise<boolean>, errorMessage?: string): this;
|
|
191
|
-
}
|
|
192
|
-
} //# sourceMappingURL=required-methods.d.ts.map
|
|
193
|
-
//#endregion
|
|
194
|
-
//# sourceMappingURL=required-methods.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"required-methods.d.mts","names":["BaseValidator","required","errorMessage","present","optional","isOptional","nullish","isNullable","requiredWith","field","requiredWithSibling","requiredWithout","requiredWithoutSibling","requiredIf","value","requiredIfSibling","requiredUnless","requiredUnlessSibling","requiredIfEmpty","requiredIfEmptySibling","requiredIfNotEmpty","requiredIfNotEmptySibling","requiredIfAllEmpty","fields","requiredIfAllEmptySiblings","requiredIfAnyEmpty","requiredIfAnyEmptySiblings","requiredIfAllNotEmpty","requiredIfAllNotEmptySiblings","requiredIfAnyNotEmpty","requiredIfAnyNotEmptySiblings","requiredIfIn","values","requiredIfInSibling","requiredIfNotIn","requiredIfNotInSibling","requiredWithAll","requiredWithAllSiblings","requiredWithoutAll","requiredWithoutAllSiblings","requiredWithAny","requiredWithAnySiblings","requiredWithoutAny","requiredWithoutAnySiblings","requiredWhen","SchemaContext","context","Promise","callback"],"sources":["../../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.d.mts"],"x_google_ignoreList":[0],"mappings":";;;;YAUYA,aAAAA;IAQAE;;;IAJRD,QAAAA,CAASC,YAAAA;IA0BPG;;;IAtBFF,OAAAA,CAAQD,YAAAA;IA4BoBA;;;;IAvB5BE,QAAAA;MACEC,UAAAA;IAAAA;IAkCFO;;;;;;;;;;;;;IAnBAN,OAAAA;MACED,UAAAA;MACAE,UAAAA;IAAAA;IAiCmCO;;;IA5BrCN,YAAAA,CAAaC,KAAAA,UAAeP,YAAAA;IAgCGA;;;IA5B/BQ,mBAAAA,CAAoBD,KAAAA,UAAeP,YAAAA;IAoCnCkB;;;IAhCAT,eAAAA,CAAgBF,KAAAA,UAAeP,YAAAA;IAoCLO;;;IAhC1BG,sBAAAA,CAAuBH,KAAAA,UAAeP,YAAAA;IAoCDA;;;IAhCrCW,UAAAA,CAAWJ,KAAAA,UAAeK,KAAAA,OAAYZ,YAAAA;IAwCtCuB;;;IApCAV,iBAAAA,CAAkBN,KAAAA,UAAeK,KAAAA,OAAYZ,YAAAA;IAwClBqB;;;IApC3BP,cAAAA,CAAeP,KAAAA,UAAeK,KAAAA,OAAYZ,YAAAA;IAwCFA;;;IApCxCe,qBAAAA,CAAsBR,KAA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A;;;;IAIrCqC,0BAAAA,CAA2BhB,MAAAA,YAAkBrB,YAAAA;;;;IAI7CsC,eAAAA,CAAgBjB,MAAAA,YAAkBrB,YAAAA;;;;IAIlCuC,uBAAAA,CAAwBlB,MAAAA,YAAkBrB,YAAAA;;;;IAI1CwC,kBAAAA,CAAmBnB,MAAAA,YAAkBrB,YAAAA;;;;IAIrCyC,0BAAAA,CAA2BpB,MAAAA,YAAkBrB,YAAAA;;;;;;;;;;;;;;;;;;;;;;;;;IAyB7C0C,YAAAA,CAAaI,QAAAA,GAAWF,OAAAA,EAAS,aAAA,eAA4B,OAAO,WAAW5C,YAAAA;EAAAA;AAAAA;AAAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"required-methods.mjs","names":[],"sources":["../../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.mjs"],"sourcesContent":["import { presentRule, requiredRule } from \"../../rules/core/required.mjs\";\nimport { BaseValidator } from \"../base-validator.mjs\";\nimport { requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule } from \"../../rules/conditional/required-if-rules.mjs\";\nimport { requiredUnlessRule } from \"../../rules/conditional/required-unless-rules.mjs\";\nimport { requiredWhenRule } from \"../../rules/conditional/required-when-rule.mjs\";\nimport { requiredWithAllRule, requiredWithAnyRule, requiredWithRule } from \"../../rules/conditional/required-with-rules.mjs\";\nimport { requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule } from \"../../rules/conditional/required-without-rules.mjs\";\n\n//#region ../seal/src/validators/methods/required-methods.ts\n/**\n* Marker re-exported by the validators barrel so the dts bundler keeps this\n* module (and its `declare module` augmentation) in the bundled `.d.ts`.\n* Without a real export, side-effect-only augmentation modules get tree-shaken\n* out of the published types, dropping every chainable rule method.\n*/\nconst requiredMethodsApplied = true;\n/**\n* This value must be present and has a value\n*/\nBaseValidator.prototype.required = function(errorMessage) {\n\treturn this.setRequiredRule(requiredRule, errorMessage);\n};\n/**\n* Value must be present but not necessarily has a value\n*/\nBaseValidator.prototype.present = function(errorMessage) {\n\treturn this.setRequiredRule(presentRule, errorMessage);\n};\n/**\n* Mark the field as optional — it may be absent or empty without validation errors.\n* Clears any previously set required rule.\n*\n* The return type is branded with `{ isOptional: true }` so schema inference\n* can mark this key as optional in the inferred TypeScript type.\n*/\nBaseValidator.prototype.optional = function() {\n\tconst instance = this.instance;\n\tinstance.isOptional = true;\n\tinstance.requiredRule = null;\n\treturn instance;\n};\n/**\n* Sugar — equivalent to `.optional().nullable()`.\n*/\nBaseValidator.prototype.nullish = function() {\n\treturn this.optional().nullable();\n};\n/**\n* Value is required if another field exists\n*/\nBaseValidator.prototype.requiredWith = function(field, errorMessage) {\n\treturn this.setRequiredRule(requiredWithRule, errorMessage, {\n\t\tfield,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if another sibling field exists\n*/\nBaseValidator.prototype.requiredWithSibling = function(field, errorMessage) {\n\treturn this.setRequiredRule(requiredWithRule, errorMessage, {\n\t\tfield,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if another field is missing\n*/\nBaseValidator.prototype.requiredWithout = function(field, errorMessage) {\n\treturn this.setRequiredRule(requiredWithoutRule, errorMessage, {\n\t\tfield,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if another sibling field is missing\n*/\nBaseValidator.prototype.requiredWithoutSibling = function(field, errorMessage) {\n\treturn this.setRequiredRule(requiredWithoutRule, errorMessage, {\n\t\tfield,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if another field equals a specific value\n*/\nBaseValidator.prototype.requiredIf = function(field, value, errorMessage) {\n\treturn this.setRequiredRule(requiredIfRule, errorMessage, {\n\t\tfield,\n\t\tvalue,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if another sibling field equals a specific value\n*/\nBaseValidator.prototype.requiredIfSibling = function(field, value, errorMessage) {\n\treturn this.setRequiredRule(requiredIfRule, errorMessage, {\n\t\tfield,\n\t\tvalue,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required unless another field equals a specific value\n*/\nBaseValidator.prototype.requiredUnless = function(field, value, errorMessage) {\n\treturn this.setRequiredRule(requiredUnlessRule, errorMessage, {\n\t\tfield,\n\t\tvalue,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required unless another sibling field equals a specific value\n*/\nBaseValidator.prototype.requiredUnlessSibling = function(field, value, errorMessage) {\n\treturn this.setRequiredRule(requiredUnlessRule, errorMessage, {\n\t\tfield,\n\t\tvalue,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if another field is empty\n*/\nBaseValidator.prototype.requiredIfEmpty = function(field, errorMessage) {\n\treturn this.setRequiredRule(requiredIfEmptyRule, errorMessage, {\n\t\tfield,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if another sibling field is empty\n*/\nBaseValidator.prototype.requiredIfEmptySibling = function(field, errorMessage) {\n\treturn this.setRequiredRule(requiredIfEmptyRule, errorMessage, {\n\t\tfield,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if another field is not empty\n*/\nBaseValidator.prototype.requiredIfNotEmpty = function(field, errorMessage) {\n\treturn this.setRequiredRule(requiredIfNotEmptyRule, errorMessage, {\n\t\tfield,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if another sibling field is not empty\n*/\nBaseValidator.prototype.requiredIfNotEmptySibling = function(field, errorMessage) {\n\treturn this.setRequiredRule(requiredIfNotEmptyRule, errorMessage, {\n\t\tfield,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if ALL specified fields are empty\n*/\nBaseValidator.prototype.requiredIfAllEmpty = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredIfAllEmptyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if ALL specified sibling fields are empty\n*/\nBaseValidator.prototype.requiredIfAllEmptySiblings = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredIfAllEmptyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if ANY of the specified fields is empty\n*/\nBaseValidator.prototype.requiredIfAnyEmpty = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredIfAnyEmptyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if ANY of the specified sibling fields is empty\n*/\nBaseValidator.prototype.requiredIfAnyEmptySiblings = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredIfAnyEmptyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if ALL specified fields are NOT empty\n*/\nBaseValidator.prototype.requiredIfAllNotEmpty = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredIfAllNotEmptyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if ALL specified sibling fields are NOT empty\n*/\nBaseValidator.prototype.requiredIfAllNotEmptySiblings = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredIfAllNotEmptyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if ANY of the specified fields is NOT empty\n*/\nBaseValidator.prototype.requiredIfAnyNotEmpty = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredIfAnyNotEmptyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if ANY of the specified sibling fields is NOT empty\n*/\nBaseValidator.prototype.requiredIfAnyNotEmptySiblings = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredIfAnyNotEmptyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if another field's value is in the given array\n*/\nBaseValidator.prototype.requiredIfIn = function(field, values, errorMessage) {\n\treturn this.setRequiredRule(requiredIfInRule, errorMessage, {\n\t\tfield,\n\t\tvalues,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if another sibling field's value is in the given array\n*/\nBaseValidator.prototype.requiredIfInSibling = function(field, values, errorMessage) {\n\treturn this.setRequiredRule(requiredIfInRule, errorMessage, {\n\t\tfield,\n\t\tvalues,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if another field's value is NOT in the given array\n*/\nBaseValidator.prototype.requiredIfNotIn = function(field, values, errorMessage) {\n\treturn this.setRequiredRule(requiredIfNotInRule, errorMessage, {\n\t\tfield,\n\t\tvalues,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if another sibling field's value is NOT in the given array\n*/\nBaseValidator.prototype.requiredIfNotInSibling = function(field, values, errorMessage) {\n\treturn this.setRequiredRule(requiredIfNotInRule, errorMessage, {\n\t\tfield,\n\t\tvalues,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if all specified fields exist\n*/\nBaseValidator.prototype.requiredWithAll = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredWithAllRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if all specified sibling fields exist\n*/\nBaseValidator.prototype.requiredWithAllSiblings = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredWithAllRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if all specified fields are missing\n*/\nBaseValidator.prototype.requiredWithoutAll = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredWithoutAllRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if all specified sibling fields are missing\n*/\nBaseValidator.prototype.requiredWithoutAllSiblings = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredWithoutAllRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if any of the specified fields exists\n*/\nBaseValidator.prototype.requiredWithAny = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredWithAnyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if any of the specified sibling fields exists\n*/\nBaseValidator.prototype.requiredWithAnySiblings = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredWithAnyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Value is required if any of the specified fields is missing\n*/\nBaseValidator.prototype.requiredWithoutAny = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredWithoutAnyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"global\"\n\t});\n};\n/**\n* Value is required if any of the specified sibling fields is missing\n*/\nBaseValidator.prototype.requiredWithoutAnySiblings = function(fields, errorMessage) {\n\treturn this.setRequiredRule(requiredWithoutAnyRule, errorMessage, {\n\t\tfields,\n\t\tscope: \"sibling\"\n\t});\n};\n/**\n* Make this field required based on a custom callback.\n* Callback receives only SchemaContext — the framework handles empty-value checking.\n*/\nBaseValidator.prototype.requiredWhen = function(callback, errorMessage) {\n\treturn this.setRequiredRule(requiredWhenRule, errorMessage, { callback });\n};\n\n//#endregion\nexport { requiredMethodsApplied };\n//# sourceMappingURL=required-methods.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAmBA,cAAc,UAAU,WAAW,SAAS,cAAc;CACzD,OAAO,KAAK,gBAAgB,cAAc,YAAY;AACvD;;;;AAIA,cAAc,UAAU,UAAU,SAAS,cAAc;CACxD,OAAO,KAAK,gBAAgB,aAAa,YAAY;AACtD;;;;;;;;AAQA,cAAc,UAAU,WAAW,WAAW;CAC7C,MAAM,WAAW,KAAK;CACtB,SAAS,aAAa;CACtB,SAAS,eAAe;CACxB,OAAO;AACR;;;;AAIA,cAAc,UAAU,UAAU,WAAW;CA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C;AACF;;;;AAIA,cAAc,UAAU,0BAA0B,SAAS,QAAQ,cAAc;CAChF,OAAO,KAAK,gBAAgB,qBAAqB,cAAc;EAC9D;EACA,OAAO;CACR,CAAC;AACF;;;;AAIA,cAAc,UAAU,qBAAqB,SAAS,QAAQ,cAAc;CAC3E,OAAO,KAAK,gBAAgB,wBAAwB,cAAc;EACjE;EACA,OAAO;CACR,CAAC;AACF;;;;AAIA,cAAc,UAAU,6BAA6B,SAAS,QAAQ,cAAc;CACnF,OAAO,KAAK,gBAAgB,wBAAwB,cAAc;EACjE;EACA,OAAO;CACR,CAAC;AACF;;;;;AAKA,cAAc,UAAU,eAAe,SAAS,UAAU,cAAc;CACvE,OAAO,KAAK,gBAAgB,kBAAkB,cAAc,EAAE,SAAS,CAAC;AACzE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/number-validator.mjs"],"sourcesContent":["import { applyNullable, getRuleOptions } from \"../standard-schema/json-schema.mjs\";\nimport { absMutator, ceilMutator, floorMutator, numericMutator, roundMutator, toFixedMutator } from \"../mutators/number-mutators.mjs\";\nimport \"../mutators/index.mjs\";\nimport { betweenNumbersRule, evenRule, greaterThanRule, lessThanRule, maxRule, minRule, moduloRule, negativeRule, oddRule, positiveRule } from \"../rules/number/number-rules.mjs\";\nimport { lengthRule, maxLengthRule, minLengthRule } from \"../rules/length/length-rules.mjs\";\nimport { numberRule } from \"../rules/common/type-rules.mjs\";\nimport \"../rules/index.mjs\";\nimport { PrimitiveValidator } from \"./primitive-validator.mjs\";\n\n//#region ../seal/src/validators/number-validator.ts\n/**\n* Number validator class - base for Int and Float validators\n*/\nvar NumberValidator = class extends PrimitiveValidator {\n\tconstructor(errorMessage) {\n\t\tsuper();\n\t\tthis.addMutableRule(numberRule, errorMessage);\n\t}\n\t/**\n\t* Check if value is a number type\n\t*/\n\tmatchesType(value) {\n\t\treturn typeof value === \"number\" && !isNaN(value);\n\t}\n\t/**\n\t* Value must be equal or higher than the given number or field\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tmin(min, errorMessage) {\n\t\treturn this.addRule(minRule, errorMessage, {\n\t\t\tmin,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Value must be equal or less than the given number or field\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tmax(max, errorMessage) {\n\t\treturn this.addRule(maxRule, errorMessage, {\n\t\t\tmax,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Value must be >= sibling field value\n\t* @category Validation Rule\n\t*/\n\tminSibling(field, errorMessage) {\n\t\treturn this.addRule(minRule, errorMessage, {\n\t\t\tmin: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Value must be <= sibling field value\n\t* @category Validation Rule\n\t*/\n\tmaxSibling(field, errorMessage) {\n\t\treturn this.addRule(maxRule, errorMessage, {\n\t\t\tmax: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Value must be strictly greater than the given number or field (>)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tgreaterThan(value, errorMessage) {\n\t\treturn this.addRule(greaterThanRule, errorMessage, {\n\t\t\tvalue,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Value must be strictly less than the given number or field (<)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tlessThan(value, errorMessage) {\n\t\treturn this.addRule(lessThanRule, errorMessage, {\n\t\t\tvalue,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Alias for greaterThan() - shorter syntax\n\t* @category Validation Rule\n\t*/\n\tgt(value, errorMessage) {\n\t\treturn this.greaterThan(value, errorMessage);\n\t}\n\t/**\n\t* Alias for lessThan() - shorter syntax\n\t* @category Validation Rule\n\t*/\n\tlt(value, errorMessage) {\n\t\treturn this.lessThan(value, errorMessage);\n\t}\n\t/**\n\t* Value must be > sibling field value\n\t* @category Validation Rule\n\t*/\n\tgreaterThanSibling(field, errorMessage) {\n\t\treturn this.addRule(greaterThanRule, errorMessage, {\n\t\t\tvalue: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Alias for greaterThanSibling() - shorter syntax\n\t* @category Validation Rule\n\t*/\n\tgtSibling(field, errorMessage) {\n\t\treturn this.greaterThanSibling(field, errorMessage);\n\t}\n\t/**\n\t* Value must be < sibling field value\n\t* @category Validation Rule\n\t*/\n\tlessThanSibling(field, errorMessage) {\n\t\treturn this.addRule(lessThanRule, errorMessage, {\n\t\t\tvalue: field,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Alias for lessThanSibling() - shorter syntax\n\t* @category Validation Rule\n\t*/\n\tltSibling(field, errorMessage) {\n\t\treturn this.lessThanSibling(field, errorMessage);\n\t}\n\t/** Value must be a modulo of the given number */\n\tmodulo(value, errorMessage) {\n\t\treturn this.addRule(moduloRule, errorMessage, { value });\n\t}\n\t/**\n\t* Alias for modulo() - Value must be divisible by the given number\n\t*/\n\tdivisibleBy(value, errorMessage) {\n\t\treturn this.modulo(value, errorMessage);\n\t}\n\t/**\n\t* Alias for modulo() - Value must be a multiple of the given number\n\t*/\n\tmultipleOf(value, errorMessage) {\n\t\treturn this.modulo(value, errorMessage);\n\t}\n\t/**\n\t* Alias for modulo() - Value must be a multiple of the given number\n\t*/\n\tmodulusOf(value, errorMessage) {\n\t\treturn this.modulo(value, errorMessage);\n\t}\n\t/** Accept only numbers higher than 0 */\n\tpositive(errorMessage) {\n\t\treturn this.addRule(positiveRule, errorMessage);\n\t}\n\t/** Accept only negative numbers */\n\tnegative(errorMessage) {\n\t\treturn this.addRule(negativeRule, errorMessage);\n\t}\n\t/** Accept only odd numbers */\n\todd(errorMessage) {\n\t\treturn this.addRule(oddRule, errorMessage);\n\t}\n\t/** Accept only even numbers */\n\teven(errorMessage) {\n\t\treturn this.addRule(evenRule, errorMessage);\n\t}\n\t/**\n\t* Accept only numbers between the given two numbers or fields (Inclusive)\n\t* Smart detection: number or field name\n\t*\n\t* @category Validation Rule\n\t*/\n\tbetween(min, max, errorMessage) {\n\t\treturn this.addRule(betweenNumbersRule, errorMessage, {\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tscope: \"global\"\n\t\t});\n\t}\n\t/**\n\t* Value must be between sibling field values\n\t* @category Validation Rule\n\t*/\n\tbetweenSibling(minField, maxField, errorMessage) {\n\t\treturn this.addRule(betweenNumbersRule, errorMessage, {\n\t\t\tmin: minField,\n\t\t\tmax: maxField,\n\t\t\tscope: \"sibling\"\n\t\t});\n\t}\n\t/**\n\t* Value (as a string) must be exactly this many characters.\n\t* Useful for fixed-format numeric codes (e.g. 4-digit PIN).\n\t*/\n\tlength(length, errorMessage) {\n\t\treturn this.addRule(lengthRule, errorMessage, { length });\n\t}\n\t/** Value (as string representation) length must be ≥ min */\n\tminLength(length, errorMessage) {\n\t\treturn this.addRule(minLengthRule, errorMessage, { minLength: length });\n\t}\n\t/** Value (as string representation) length must be ≤ max */\n\tmaxLength(length, errorMessage) {\n\t\treturn this.addRule(maxLengthRule, errorMessage, { maxLength: length });\n\t}\n\t/**\n\t* Convert value to its absolute value\n\t*/\n\tabs() {\n\t\treturn this.addMutator(absMutator);\n\t}\n\t/**\n\t* Round value up to the nearest integer\n\t*/\n\tceil() {\n\t\treturn this.addMutator(ceilMutator);\n\t}\n\t/**\n\t* Round value down to the nearest integer\n\t*/\n\tfloor() {\n\t\treturn this.addMutator(floorMutator);\n\t}\n\t/**\n\t* Round value to the nearest integer or specified decimals\n\t*/\n\tround(decimals = 0) {\n\t\treturn this.addMutator(roundMutator, { decimals });\n\t}\n\t/**\n\t* Round to a fixed number of decimal places, keeping the value a **number**.\n\t*\n\t* `v.number().toFixed(2)` on `3.14159` yields `3.14`, not `\"3.14\"` — a number\n\t* schema has to output a number, or its own type rule rejects the result.\n\t* Format to a fixed-point *string* at the presentation edge instead.\n\t*\n\t* @example\n\t* v.number().toFixed(2) // 3.14159 → 3.14\n\t*/\n\ttoFixed(decimals = 2) {\n\t\treturn this.addMutator(toFixedMutator, { decimals });\n\t}\n\t/**\n\t* Opt in to coercion: a numeric-shaped string is converted to a number\n\t* **before** the type rules run; any other value passes through unchanged\n\t* so bad input still fails the type rule.\n\t*\n\t* Strictness is preserved — coercion only fixes the string *representation*,\n\t* not the value's shape. `v.int().coerce()` turns `\"5\"` into `5` (valid) but\n\t* `\"5.5\"` into `5.5`, which still fails the integer rule. Number validators\n\t* do **not** coerce by default; this only takes effect when explicitly chained.\n\t*\n\t* The output type is unchanged (`Infer<>` keys off the validator class), so\n\t* `v.int().coerce()` still infers `number`.\n\t*\n\t* @example\n\t* v.int().coerce() // \"5\" → 5 (valid); \"5.5\" → 5.5 (invalid); \"abc\" → invalid\n\t* v.number().coerce() // \"5.5\" → 5.5 (valid)\n\t*/\n\tcoerce() {\n\t\treturn this.addMutator(numericMutator);\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* Returns `{ type: \"number\" }` with numeric constraint keywords.\n\t* IntValidator overrides `type` to `\"integer\"`.\n\t*\n\t* @note Sibling-scoped rules (minSibling, maxSibling, etc.) are not representable\n\t* in JSON Schema and are silently omitted.\n\t*\n\t* @example\n\t* ```ts\n\t* v.number().min(0).max(100).toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"number\", minimum: 0, maximum: 100 }\n\t* ```\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\treturn this.buildNumberJsonSchema(\"number\", target);\n\t}\n\t/**\n\t* Shared logic for number/integer JSON Schema generation.\n\t* Called by NumberValidator.toJsonSchema() (→ type: \"number\")\n\t* and IntValidator.toJsonSchema() (→ type: \"integer\").\n\t*/\n\tbuildNumberJsonSchema(type, target) {\n\t\tconst schema = { type };\n\t\tconst minOpts = getRuleOptions(this.rules, \"min\");\n\t\tif (minOpts?.min !== void 0 && typeof minOpts.min === \"number\") schema.minimum = minOpts.min;\n\t\tconst maxOpts = getRuleOptions(this.rules, \"max\");\n\t\tif (maxOpts?.max !== void 0 && typeof maxOpts.max === \"number\") schema.maximum = maxOpts.max;\n\t\tconst betweenOpts = getRuleOptions(this.rules, \"betweenNumbers\");\n\t\tif (betweenOpts) {\n\t\t\tif (typeof betweenOpts.min === \"number\") schema.minimum = betweenOpts.min;\n\t\t\tif (typeof betweenOpts.max === \"number\") schema.maximum = betweenOpts.max;\n\t\t}\n\t\tconst gtOpts = getRuleOptions(this.rules, \"greaterThan\");\n\t\tif (gtOpts?.value !== void 0 && typeof gtOpts.value === \"number\") if (target === \"draft-07\") {\n\t\t\tschema.minimum = gtOpts.value;\n\t\t\tschema.exclusiveMinimum = true;\n\t\t} else schema.exclusiveMinimum = gtOpts.value;\n\t\tconst ltOpts = getRuleOptions(this.rules, \"lessThan\");\n\t\tif (ltOpts?.value !== void 0 && typeof ltOpts.value === \"number\") if (target === \"draft-07\") {\n\t\t\tschema.maximum = ltOpts.value;\n\t\t\tschema.exclusiveMaximum = true;\n\t\t} else schema.exclusiveMaximum = ltOpts.value;\n\t\tconst moduloOpts = getRuleOptions(this.rules, \"modulo\");\n\t\tif (moduloOpts?.value !== void 0 && typeof moduloOpts.value === \"number\") schema.multipleOf = moduloOpts.value;\n\t\tconst inOpts = getRuleOptions(this.rules, \"in\");\n\t\tif (inOpts?.values && Array.isArray(inOpts.values)) schema.enum = inOpts.values;\n\t\tif (this.isNullable) applyNullable(schema, target);\n\t\treturn schema;\n\t}\n};\n\n//#endregion\nexport { NumberValidator };\n//# sourceMappingURL=number-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AAaA,IAAI,kBAAkB,cAAc,mBAAmB;CACtD,YAAY,cAAc;EACzB,MAAM;EACN,KAAK,eAAe,YAAY,YAAY;CAC7C;;;;CAIA,YAAY,OAAO;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tD,IAAI,YAAY,UAAU,KAAK,KAAK,OAAO,WAAW,UAAU,UAAU,OAAO,aAAa,WAAW;EACzG,MAAM,SAAS,eAAe,KAAK,OAAO,IAAI;EAC9C,IAAI,QAAQ,UAAU,MAAM,QAAQ,OAAO,MAAM,GAAG,OAAO,OAAO,OAAO;EACzE,IAAI,KAAK,YAAY,cAAc,QAAQ,MAAM;EACjD,OAAO;CACR;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"numeric-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/numeric-validator.mjs"],"sourcesContent":["import { numericMutator } from \"../mutators/number-mutators.mjs\";\nimport { NumberValidator } from \"./number-validator.mjs\";\nimport { isNumeric } from \"@mongez/supportive-is\";\n\n//#region ../seal/src/validators/numeric-validator.ts\n/**\n* Numeric validator class - base for Int and Float validators either as number or string\n*/\nvar NumericValidator = class extends NumberValidator {\n\t/**\n\t* Constructor\n\t*/\n\tconstructor(errorMessage) {\n\t\tsuper(errorMessage);\n\t\tthis.addMutableMutator(numericMutator);\n\t}\n\t/**\n\t* Check if value is a numeric type\n\t*/\n\tmatchesType(value) {\n\t\treturn isNumeric(value);\n\t}\n};\n\n//#endregion\nexport { NumericValidator };\n//# sourceMappingURL=numeric-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAQA,IAAI,mBAAmB,cAAc,gBAAgB;;;;CAIpD,YAAY,cAAc;EACzB,MAAM,YAAY;EAClB,KAAK,kBAAkB,cAAc;CACtC;;;;CAIA,YAAY,OAAO;EAClB,OAAO,UAAU,KAAK;CACvB;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/object-validator.mjs"],"sourcesContent":["import { applyNullable, wrapNullableStrict } from \"../standard-schema/json-schema.mjs\";\nimport { setKeyPath } from \"../helpers/path-helpers.mjs\";\nimport { BaseValidator } from \"./base-validator.mjs\";\nimport { objectTrimMutator, stripUnknownMutator } from \"../mutators/object-mutators.mjs\";\nimport { objectRule } from \"../rules/common/type-rules.mjs\";\nimport { unknownKeyRule } from \"../rules/common/unknown-key.mjs\";\nimport { ComputedValidator } from \"./computed-validator.mjs\";\nimport { except } from \"@mongez/reinforcements\";\nimport { isPlainObject } from \"@mongez/supportive-is\";\n\n//#region ../seal/src/validators/object-validator.ts\n/**\n* Object validator class with generic schema type for proper type inference.\n*\n* Threads two distinct inferred shapes into `BaseValidator`'s `TInput`/`TOutput`:\n*\n* - `TInput` = `InferInputObjectShape<TSchema>` — what `~standard.validate()`\n* accepts (caller's pre-validation payload; defaults/catches make\n* keys optional)\n* - `TOutput` = `InferOutputObjectShape<TSchema>` — what `~standard.validate()`\n* returns on success (post-default, post-catch shape; guaranteed\n* keys are required)\n*\n* Both helpers are used directly (not the full `Infer.*` walker) to avoid a\n* recursive class-base evaluation that would otherwise occur when the\n* brand-aware widening tries to inspect the class type.\n*/\nvar ObjectValidator = class ObjectValidator extends BaseValidator {\n\tconstructor(schema, errorMessage) {\n\t\tsuper();\n\t\tthis.schema = schema;\n\t\tthis.shouldAllowUnknown = false;\n\t\tthis.allowedKeys = [];\n\t\tthis.hasUnknownKeyRule = false;\n\t\tthis.addMutableRule(objectRule, errorMessage);\n\t}\n\t/**\n\t* Check if value is an object type (plain object, not array or date)\n\t*/\n\tmatchesType(value) {\n\t\treturn isPlainObject(value);\n\t}\n\t/** Strip unknown keys from the data */\n\tstripUnknown() {\n\t\tconst validator = this.instance;\n\t\treturn validator.addMutator(stripUnknownMutator, { get allowedKeys() {\n\t\t\treturn validator.allowedKeys;\n\t\t} });\n\t}\n\t/** Add list of allowed keys that could be in the data but not necessarily validated */\n\tallow(...keys) {\n\t\tconst validator = this.instance;\n\t\tvalidator.allowedKeys.push(...keys);\n\t\treturn validator;\n\t}\n\t/** Trim values of the object properties */\n\ttrim(recursive = true) {\n\t\treturn this.instance.addMutator(objectTrimMutator, { recursive });\n\t}\n\t/** Whether to allow unknown properties\n\t* Please note it will allow only unknown direct children keys, not nested children keys\n\t*/\n\tallowUnknown(allow = true) {\n\t\tconst validator = this.instance;\n\t\tvalidator.shouldAllowUnknown = allow;\n\t\treturn validator;\n\t}\n\t/**\n\t* Create a copy of this object validator with the same configuration\n\t* Copies schema, rules, mutators, transformers, and object-specific settings\n\t*\n\t* @returns A new ObjectValidator instance with copied configuration\n\t*\n\t* @example\n\t* ```ts\n\t* const baseUser = v.object({ name: v.string() }).allowUnknown();\n\t* const userCopy = baseUser.clone();\n\t* // userCopy has the same schema and allowUnknown setting\n\t* ```\n\t*/\n\tclone(keys) {\n\t\tconst cloned = super.clone();\n\t\tconst newSchema = {};\n\t\tfor (const [key, validator] of Object.entries(this.schema)) {\n\t\t\tif (keys && !keys.includes(key)) continue;\n\t\t\tnewSchema[key] = validator.clone();\n\t\t}\n\t\tcloned.schema = newSchema;\n\t\tcloned.shouldAllowUnknown = this.shouldAllowUnknown;\n\t\tcloned.allowedKeys = [...this.allowedKeys];\n\t\treturn cloned;\n\t}\n\t/**\n\t* Extend this schema with additional fields\n\t* Clones the current validator and adds new fields to the schema\n\t* **Keeps original configuration** (allowUnknown, stripUnknown, etc.)\n\t*\n\t* If an ObjectValidator is provided, only its schema is used - its configuration is ignored.\n\t* This is useful for creating reusable field collections that can be added to different schemas.\n\t*\n\t* @param schemaOrValidator - Plain schema object or ObjectValidator to extend with\n\t* @returns A new ObjectValidator with merged schema and original configuration\n\t*\n\t* @example\n\t* ```ts\n\t* // Extend with plain schema\n\t* const baseUser = v.object({\n\t* name: v.string().required(),\n\t* email: v.string().email().required()\n\t* }).allowUnknown();\n\t*\n\t* const adminUser = baseUser.extend({\n\t* role: v.string().in(['admin', 'superadmin']).required()\n\t* });\n\t* // adminUser has: name, email, role\n\t* // adminUser keeps: allowUnknown() from base ✅\n\t*\n\t* // Extend with ObjectValidator (only schema is used)\n\t* const auditFields = v.object({\n\t* createdAt: v.date().required(),\n\t* updatedAt: v.date().required()\n\t* }).stripUnknown(); // This config is ignored!\n\t*\n\t* const fullUser = baseUser.extend(auditFields);\n\t* // fullUser has: name, email, createdAt, updatedAt\n\t* // fullUser keeps: allowUnknown() from base (NOT stripUnknown from auditFields) ✅\n\t*\n\t* // Chain multiple extends\n\t* const complexSchema = baseUser\n\t* .extend(auditFields)\n\t* .extend({ metadata: v.object({}) });\n\t* ```\n\t*/\n\textend(schemaOrValidator) {\n\t\tconst extended = this.clone();\n\t\tconst schemaToAdd = schemaOrValidator instanceof ObjectValidator ? schemaOrValidator.schema : schemaOrValidator;\n\t\tfor (const [key, validator] of Object.entries(schemaToAdd)) extended.schema[key] = validator.clone();\n\t\treturn extended;\n\t}\n\t/**\n\t* Merge with another ObjectValidator\n\t* Clones current validator, merges schemas, and **overrides configuration** with other validator's config\n\t*\n\t* Unlike extend(), merge() combines both schemas AND configurations.\n\t* The other validator's configuration (allowUnknown, stripUnknown, etc.) takes precedence.\n\t*\n\t* @param validator - Another ObjectValidator to merge with\n\t* @returns A new ObjectValidator with merged schema and configuration\n\t*\n\t* @example\n\t* ```ts\n\t* const baseUser = v.object({\n\t* name: v.string().required()\n\t* }).allowUnknown();\n\t*\n\t* const timestamps = v.object({\n\t* createdAt: v.date().required(),\n\t* updatedAt: v.date().required()\n\t* }).stripUnknown();\n\t*\n\t* const merged = baseUser.merge(timestamps);\n\t* // merged has: name, createdAt, updatedAt\n\t* // merged config: stripUnknown() from timestamps (overrides allowUnknown) ✅\n\t*\n\t* // Chain multiple merges\n\t* const full = baseUser.merge(timestamps).merge(softDeleteSchema);\n\t* ```\n\t*/\n\tmerge(validator) {\n\t\tconst merged = this.clone();\n\t\tfor (const [key, schemaValidator] of Object.entries(validator.schema)) merged.schema[key] = schemaValidator.clone();\n\t\tmerged.shouldAllowUnknown = validator.shouldAllowUnknown;\n\t\tmerged.allowedKeys = [...merged.allowedKeys, ...validator.allowedKeys];\n\t\tmerged.rules.push(...validator.rules);\n\t\tmerged.mutators.push(...validator.mutators);\n\t\tmerged.dataTransformers.push(...validator.dataTransformers);\n\t\tmerged.attributesText = {\n\t\t\t...merged.attributesText,\n\t\t\t...validator.attributesText\n\t\t};\n\t\tmerged.translatedAttributes = {\n\t\t\t...merged.translatedAttributes,\n\t\t\t...validator.translatedAttributes\n\t\t};\n\t\treturn merged;\n\t}\n\t/**\n\t* Create a new schema with only the specified fields\n\t* Clones the current validator and keeps only the selected fields\n\t* **Preserves all configuration** (allowUnknown, stripUnknown, etc.)\n\t*\n\t* @param keys - Field names to keep in the schema\n\t* @returns A new ObjectValidator with only the picked fields\n\t*\n\t* @example\n\t* ```ts\n\t* const fullUser = v.object({\n\t* id: v.int().required(),\n\t* name: v.string().required(),\n\t* email: v.string().email().required(),\n\t* password: v.string().required(),\n\t* role: v.string()\n\t* }).allowUnknown();\n\t*\n\t* // For login - only need email and password\n\t* const loginSchema = fullUser.pick('email', 'password');\n\t* // loginSchema has: { email, password }\n\t* // loginSchema keeps: allowUnknown() ✅\n\t*\n\t* // For public profile\n\t* const publicSchema = fullUser.pick('id', 'name', 'role');\n\t* // publicSchema has: { id, name, role }\n\t* ```\n\t*/\n\tpick(...keys) {\n\t\tconst picked = this.clone();\n\t\tconst newSchema = {};\n\t\tfor (const key of keys) if (key in picked.schema) newSchema[key] = picked.schema[key];\n\t\tpicked.schema = newSchema;\n\t\treturn picked;\n\t}\n\t/**\n\t* Mark all or the given schema fields as optional\n\t*/\n\tpartial(...keys) {\n\t\tconst validationSchema = this.clone();\n\t\tif (keys.length === 0) keys = Object.keys(validationSchema.schema);\n\t\tfor (const [key, validator] of Object.entries(validationSchema.schema)) if (keys.length === 0 || keys.includes(key)) validationSchema.schema[key] = validator.optional();\n\t\treturn validationSchema;\n\t}\n\t/**\n\t* Make the all or the given fields as required\n\t*/\n\trequiredFields(...keys) {\n\t\tconst validationSchema = this.clone();\n\t\tif (keys.length === 0) keys = Object.keys(validationSchema.schema);\n\t\tfor (const [key, validator] of Object.entries(validationSchema.schema)) if (keys.length === 0 || keys.includes(key)) validationSchema.schema[key] = validator.required();\n\t\treturn validationSchema;\n\t}\n\t/**\n\t* Create a new schema excluding the specified fields\n\t* Clones the current validator and removes the specified fields\n\t* **Preserves all configuration** (allowUnknown, stripUnknown, etc.)\n\t*\n\t* @param keys - Field names to exclude from the schema\n\t* @returns A new ObjectValidator without the excluded fields\n\t*\n\t* @example\n\t* ```ts\n\t* const fullUser = v.object({\n\t* id: v.int().required(),\n\t* name: v.string().required(),\n\t* email: v.string().email().required(),\n\t* password: v.string().required(),\n\t* role: v.string()\n\t* }).allowUnknown();\n\t*\n\t* // For updates - exclude id\n\t* const updateSchema = fullUser.without('id');\n\t* // updateSchema has: { name, email, password, role }\n\t* // updateSchema keeps: allowUnknown() ✅\n\t*\n\t* // For public API - exclude sensitive fields\n\t* const publicSchema = fullUser.without('password', 'role');\n\t* // publicSchema has: { id, name, email }\n\t*\n\t* // Combine with other methods\n\t* const patchSchema = fullUser.without('id', 'password');\n\t* // patchSchema has: { name, email, role }\n\t* ```\n\t*/\n\twithout(...keys) {\n\t\tconst filtered = this.clone();\n\t\tconst newSchema = {};\n\t\tfor (const key in filtered.schema) if (!keys.includes(key)) newSchema[key] = filtered.schema[key];\n\t\tfiltered.schema = newSchema;\n\t\treturn filtered;\n\t}\n\t/** Mutate the data */\n\tmutate(data, context) {\n\t\tif (!isPlainObject(data)) return data;\n\t\treturn super.mutate({ ...data }, context);\n\t}\n\t/** Validate the data */\n\tasync validate(data, context = { path: \"\" }) {\n\t\tcontext.schema = this.schema;\n\t\tconst mutatedData = await this.mutate(data, context);\n\t\tif (this.shouldAllowUnknown === false && !this.hasUnknownKeyRule) {\n\t\t\tthis.hasUnknownKeyRule = true;\n\t\t\tconst rule = this.addMutableRule(unknownKeyRule, void 0, {\n\t\t\t\tallowedKeys: this.allowedKeys,\n\t\t\t\tschema: this.schema\n\t\t\t});\n\t\t\tthis.setRuleAttributesList(rule);\n\t\t}\n\t\tconst result = await super.validate(mutatedData, context);\n\t\tif (result.isValid === false) return result;\n\t\tif (data === void 0) return result;\n\t\tconst errors = [];\n\t\tconst validatedData = {};\n\t\tconst validationPromises = Object.entries(this.schema).filter(([, validator]) => !this.isComputedValidator(validator)).map(async ([key, validator]) => {\n\t\t\tconst value = mutatedData?.[key] !== void 0 ? mutatedData[key] : validator.getDefaultValue();\n\t\t\tconst childContext = {\n\t\t\t\t...context,\n\t\t\t\tparent: mutatedData,\n\t\t\t\tvalue,\n\t\t\t\tkey,\n\t\t\t\tpath: setKeyPath(context.path, key)\n\t\t\t};\n\t\t\tconst childResult = await validator.validate(value, childContext);\n\t\t\tif (childResult.data !== void 0 && !validator.isOmitted()) validatedData[key] = childResult.data;\n\t\t\tif (childResult.isValid === false) errors.push(...childResult.errors);\n\t\t});\n\t\tawait Promise.all(validationPromises);\n\t\tif (errors.length > 0) return {\n\t\t\tisValid: false,\n\t\t\terrors,\n\t\t\tdata: void 0\n\t\t};\n\t\tconst computedFields = this.getComputedFields();\n\t\tconst computedPromises = Object.entries(computedFields).map(async ([key, validator]) => {\n\t\t\tconst childContext = {\n\t\t\t\t...context,\n\t\t\t\tparent: validatedData,\n\t\t\t\tvalue: void 0\n\t\t\t};\n\t\t\tconst childResult = await validator.validate(validatedData, childContext);\n\t\t\tif (childResult.data !== void 0 && !validator.isOmitted()) validatedData[key] = childResult.data;\n\t\t\tif (childResult.isValid === false) errors.push(...childResult.errors);\n\t\t});\n\t\tawait Promise.all(computedPromises);\n\t\tif (errors.length > 0) return {\n\t\t\tisValid: false,\n\t\t\terrors,\n\t\t\tdata: void 0\n\t\t};\n\t\tconst cleanedData = removeUndefinedValues(validatedData);\n\t\tconst transformedData = await this.startTransformationPipeline(cleanedData, context);\n\t\treturn {\n\t\t\tisValid: true,\n\t\t\terrors: [],\n\t\t\tdata: this.shouldAllowUnknown === false ? transformedData : {\n\t\t\t\t...transformedData,\n\t\t\t\t...except(mutatedData, Object.keys(this.schema))\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Check if a validator is a computed or managed field\n\t* ManagedValidator extends ComputedValidator, so instanceof catches both\n\t*/\n\tisComputedValidator(validator) {\n\t\treturn validator instanceof ComputedValidator;\n\t}\n\t/**\n\t* Get all computed/managed fields from the schema\n\t*/\n\tgetComputedFields() {\n\t\tconst computed = {};\n\t\tfor (const [key, validator] of Object.entries(this.schema)) if (validator instanceof ComputedValidator) computed[key] = validator;\n\t\treturn computed;\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* Recursively generates JSON Schema for all input fields in the schema.\n\t* Computed/managed fields are skipped — they have no input representation.\n\t*\n\t* **Standard targets** (`draft-2020-12`, `draft-07`, `openapi-3.0`):\n\t* - Fields marked `.optional()` are excluded from `required`.\n\t*\n\t* **`openai-strict` target** (OpenAI Structured Outputs):\n\t* - ALL fields appear in `required` — OpenAI rejects schemas with optional fields.\n\t* - Optional fields are instead expressed as nullable types:\n\t* `{ type: [\"string\", \"null\"] }` so the model can output `null` for them.\n\t* - Recursively applies `openai-strict` to all nested objects.\n\t*\n\t* @example\n\t* ```ts\n\t* v.object({\n\t* name: v.string().required(),\n\t* age: v.int().optional(),\n\t* }).toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"object\",\n\t* // properties: { name: { type: \"string\" }, age: { type: \"integer\" } },\n\t* // required: [\"name\"], additionalProperties: false }\n\t*\n\t* v.object({\n\t* name: v.string().required(),\n\t* age: v.int().optional(),\n\t* }).toJsonSchema(\"openai-strict\")\n\t* // → { type: \"object\",\n\t* // properties: { name: { type: \"string\" }, age: { type: [\"integer\", \"null\"] } },\n\t* // required: [\"name\", \"age\"], ← all fields\n\t* // additionalProperties: false }\n\t* ```\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\tconst properties = {};\n\t\tconst required = [];\n\t\tconst isOpenAIStrict = target === \"openai-strict\";\n\t\tfor (const [key, validator] of Object.entries(this.schema)) {\n\t\t\tif (validator instanceof ComputedValidator) continue;\n\t\t\tlet fieldSchema = validator.toJsonSchema(target);\n\t\t\tif (isOpenAIStrict) {\n\t\t\t\tif (validator.isOptional) fieldSchema = wrapNullableStrict(fieldSchema);\n\t\t\t\trequired.push(key);\n\t\t\t} else if (!validator.isOptional) required.push(key);\n\t\t\tproperties[key] = fieldSchema;\n\t\t}\n\t\tconst schema = {\n\t\t\ttype: \"object\",\n\t\t\tproperties\n\t\t};\n\t\tif (required.length > 0) schema.required = required;\n\t\tif (!this.shouldAllowUnknown) schema.additionalProperties = false;\n\t\tif (this.isNullable) applyNullable(schema, target);\n\t\treturn schema;\n\t}\n};\n/** Recursively remove undefined values from an object */\nfunction removeUndefinedValues(obj, visited = /* @__PURE__ */ new WeakMap()) {\n\tif (obj === null) return obj;\n\tif (Array.isArray(obj)) return obj.map((item) => removeUndefinedValues(item, visited));\n\tif (!isPlainObject(obj)) return obj;\n\tif (visited.has(obj)) return visited.get(obj);\n\tconst result = {};\n\tvisited.set(obj, result);\n\tfor (const [key, value] of Object.entries(obj)) if (value !== void 0) result[key] = removeUndefinedValues(value, visited);\n\treturn result;\n}\n\n//#endregion\nexport { ObjectValidator };\n//# sourceMappingURL=object-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAI,kBAAkB,MAAM,wBAAwB,cAAc;CACjE,YAAY,QAAQ,cAAc;EACjC,MAAM;EACN,KAAK,SAAS;EACd,KAAK,qBAAqB;EAC1B,KAAK,cAAc,CAAC;EACpB,KAAK,oBAAoB;EACzB,KAAK,eAAe,YAAY,YAAY;CAC7C;;;;CAIA,YAAY,OAAO;EAClB,OAAO,cAAc,KAAK;CAC3B;;CAEA,eAAe;EACd,MAAM,YAAY,KAAK;EACvB,OAAO,UAAU,WAAW,qBAAqB,EAAE,IAAI,cAAc;GACpE,OAAO,UAAU;EAClB,EAAE,CAAC;CACJ;;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BAAqB,mBAAmB;GAC5C,IAAI,cAAc,UAAU,aAAa,MAAM;GAC/C,IAAI,gBAAgB;IACnB,IAAI,UAAU,YAAY,cAAc,mBAAmB,WAAW;IACtE,SAAS,KAAK,GAAG;GAClB,OAAO,IAAI,CAAC,UAAU,YAAY,SAAS,KAAK,GAAG;GACnD,WAAW,OAAO;EACnB;EACA,MAAM,SAAS;GACd,MAAM;GACN;EACD;EACA,IAAI,SAAS,SAAS,GAAG,OAAO,WAAW;EAC3C,IAAI,CAAC,KAAK,oBAAoB,OAAO,uBAAuB;EAC5D,IAAI,KAAK,YAAY,cAAc,QAAQ,MAAM;EACjD,OAAO;CACR;AACD;;AAEA,SAAS,sBAAsB,KAAK,0BAA0B,IAAI,QAAQ,GAAG;CAC5E,IAAI,QAAQ,MAAM,OAAO;CACzB,IAAI,MAAM,QAAQ,GAAG,GAAG,OAAO,IAAI,KAAK,SAAS,sBAAsB,MAAM,OAAO,CAAC;CACrF,IAAI,CAAC,cAAc,GAAG,GAAG,OAAO;CAChC,IAAI,QAAQ,IAAI,GAAG,GAAG,OAAO,QAAQ,IAAI,GAAG;CAC5C,MAAM,SAAS,CAAC;CAChB,QAAQ,IAAI,KAAK,MAAM;CACvB,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,GAAG,GAAG,IAAI,UAAU,KAAK,GAAG,OAAO,OAAO,sBAAsB,OAAO,OAAO;CACxH,OAAO;AACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"primitive-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/primitive-validator.mjs"],"sourcesContent":["import { BaseValidator } from \"./base-validator.mjs\";\nimport { allowedValuesRule, enumRule, inRule, notAllowedValuesRule } from \"../rules/common/enum.mjs\";\n\n//#region ../seal/src/validators/primitive-validator.ts\n/**\n* Abstract base validator for primitive-typed fields (string, number, boolean).\n*\n* Provides value-membership rules that are meaningful for any single primitive value\n* but not for complex structures (object, array).\n*\n* Do NOT expose this on the `v` factory — it is an inheritance-only base class.\n*\n* Hierarchy:\n* BaseValidator\n* └── PrimitiveValidator ← enum, in, oneOf, allowsOnly, forbids, notIn\n* ├── StringValidator\n* ├── NumberValidator\n* │ └── FloatValidator\n* ├── BooleanValidator\n* └── ScalarValidator (extends PrimitiveValidator, adds asNumber/asString/accepted/declined)\n*\n* @example\n* class MyValidator extends PrimitiveValidator {\n* // inherits: in(), forbids(), enum(), oneOf(), allowsOnly(), notIn()\n* }\n*/\nvar PrimitiveValidator = class extends BaseValidator {\n\t/**\n\t* Value must be one of the enum's values\n\t*\n\t* @example\n\t* v.string().enum(Direction) // Direction is a TS enum\n\t*/\n\tenum(values, errorMessage) {\n\t\treturn this.addRule(enumRule, errorMessage, { enum: Object.values(values) });\n\t}\n\t/**\n\t* Value must be one of the given values\n\t*\n\t* @example\n\t* v.string().in([\"admin\", \"user\", \"guest\"])\n\t* v.number().in([1, 2, 3])\n\t*/\n\tin(values, errorMessage) {\n\t\treturn this.addRule(inRule, errorMessage, { values });\n\t}\n\t/**\n\t* Alias for `in()`\n\t*\n\t* @example\n\t* v.string().oneOf([\"active\", \"inactive\"])\n\t*/\n\toneOf(values, errorMessage) {\n\t\treturn this.in(values, errorMessage);\n\t}\n\t/**\n\t* Value must be one of the allowed values (stricter variant)\n\t*\n\t* @example\n\t* v.string().allowsOnly([\"yes\", \"no\"])\n\t*/\n\tallowsOnly(values, errorMessage) {\n\t\treturn this.addRule(allowedValuesRule, errorMessage, { allowedValues: values });\n\t}\n\t/**\n\t* Value must NOT be one of the given values\n\t*\n\t* @example\n\t* v.string().forbids([\"banned\", \"blacklisted\"])\n\t* v.number().forbids([0, -1])\n\t*/\n\tforbids(values, errorMessage) {\n\t\treturn this.addRule(notAllowedValuesRule, errorMessage, { notAllowedValues: values });\n\t}\n\t/**\n\t* Alias for `forbids()`\n\t*\n\t* @example\n\t* v.string().notIn([\"OK\", \"NOT OK\"])\n\t*/\n\tnotIn(values, errorMessage) {\n\t\treturn this.forbids(values, errorMessage);\n\t}\n};\n\n//#endregion\nexport { PrimitiveValidator };\n//# sourceMappingURL=primitive-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAI,qBAAqB,cAAc,cAAc;;;;;;;CAOpD,KAAK,QAAQ,cAAc;EAC1B,OAAO,KAAK,QAAQ,UAAU,cAAc,EAAE,MAAM,OAAO,OAAO,MAAM,EAAE,CAAC;CAC5E;;;;;;;;CAQA,GAAG,QAAQ,cAAc;EACxB,OAAO,KAAK,QAAQ,QAAQ,cAAc,EAAE,OAAO,CAAC;CACrD;;;;;;;CAOA,MAAM,QAAQ,cAAc;EAC3B,OAAO,KAAK,GAAG,QAAQ,YAAY;CACpC;;;;;;;CAOA,WAAW,QAAQ,cAAc;EAChC,OAAO,KAAK,QAAQ,mBAAmB,cAAc,EAAE,eAAe,OAAO,CAAC;CAC/E;;;;;;;;CAQA,QAAQ,QAAQ,cAAc;EAC7B,OAAO,KAAK,QAAQ,sBAAsB,cAAc,EAAE,kBAAkB,OAAO,CAAC;CACrF;;;;;;;CAOA,MAAM,QAAQ,cAAc;EAC3B,OAAO,KAAK,QAAQ,QAAQ,YAAY;CACzC;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"record-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/record-validator.mjs"],"sourcesContent":["import { applyNullable } from \"../standard-schema/json-schema.mjs\";\nimport { setKeyPath } from \"../helpers/path-helpers.mjs\";\nimport \"../helpers/index.mjs\";\nimport { BaseValidator } from \"./base-validator.mjs\";\nimport { objectRule, plainObjectRule } from \"../rules/common/type-rules.mjs\";\nimport \"../rules/index.mjs\";\nimport { isPlainObject } from \"@mongez/supportive-is\";\n\n//#region ../seal/src/validators/record-validator.ts\n/**\n* Record validator class - validates objects with dynamic keys and consistent value types\n*\n* @example\n* ```ts\n* // Translations object\n* v.record(v.string())\n* // Valid: { en: \"Hello\", ar: \"مرحبا\", fr: \"Bonjour\" }\n*\n* // User preferences\n* v.record(v.union([v.string(), v.number(), v.boolean()]))\n* // Valid: { theme: \"dark\", fontSize: 16, notifications: true }\n* ```\n*/\nvar RecordValidator = class extends BaseValidator {\n\tconstructor(valueValidator, errorMessage) {\n\t\tsuper();\n\t\tthis.valueValidator = valueValidator;\n\t\tthis.addMutableRule(objectRule, errorMessage);\n\t}\n\t/**\n\t* Validate it as plain object\n\t*/\n\tplainObject(errorMessage) {\n\t\treturn this.addRule(plainObjectRule, errorMessage);\n\t}\n\t/**\n\t* Check if value is a plain object type\n\t*/\n\tmatchesType(value) {\n\t\treturn isPlainObject(value);\n\t}\n\t/**\n\t* Clone the validator\n\t*/\n\tclone() {\n\t\tconst cloned = super.clone();\n\t\tcloned.valueValidator = this.valueValidator.clone();\n\t\treturn cloned;\n\t}\n\t/**\n\t* Validate record - iterate all keys and validate each value\n\t*\n\t* Absent input (and absent without `.default()`) propagates as `data: undefined`\n\t* so the parent ObjectValidator can omit the key. Without this, optional record\n\t* fields would silently materialise as `{}` in the validated output.\n\t*/\n\tasync validate(data, context) {\n\t\tconst valueForRules = data ?? this.getDefaultValue();\n\t\tconst mutatedData = await this.mutate(valueForRules, context);\n\t\tconst result = await super.validate(data, context);\n\t\tif (result.isValid === false) return result;\n\t\tif (mutatedData === void 0 || mutatedData === null) return result;\n\t\tif (!isPlainObject(mutatedData)) return result;\n\t\tconst errors = [];\n\t\tconst validationPromises = Object.keys(mutatedData).map(async (key) => {\n\t\t\tconst childContext = {\n\t\t\t\t...context,\n\t\t\t\tparent: mutatedData,\n\t\t\t\tvalue: mutatedData[key],\n\t\t\t\tkey,\n\t\t\t\tpath: setKeyPath(context.path, key)\n\t\t\t};\n\t\t\tconst childResult = await this.valueValidator.validate(mutatedData[key], childContext);\n\t\t\tmutatedData[key] = childResult.data;\n\t\t\tif (childResult.isValid === false) errors.push(...childResult.errors);\n\t\t});\n\t\tawait Promise.all(validationPromises);\n\t\treturn {\n\t\t\tisValid: errors.length === 0,\n\t\t\terrors,\n\t\t\tdata: await this.startTransformationPipeline(mutatedData, context)\n\t\t};\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* Generates `{ type: \"object\", additionalProperties: <valueSchema> }` —\n\t* the standard JSON Schema for a dictionary/map with homogeneous values.\n\t*\n\t* @example\n\t* ```ts\n\t* v.record(v.string()).toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"object\", additionalProperties: { type: \"string\" } }\n\t*\n\t* v.record(v.union([v.string(), v.number()])).toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"object\", additionalProperties: { oneOf: [{ type: \"string\" }, { type: \"number\" }] } }\n\t* ```\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\tconst schema = {\n\t\t\ttype: \"object\",\n\t\t\tadditionalProperties: this.valueValidator.toJsonSchema(target)\n\t\t};\n\t\tif (this.isNullable) applyNullable(schema, target);\n\t\treturn schema;\n\t}\n};\n\n//#endregion\nexport { RecordValidator };\n//# sourceMappingURL=record-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAI,kBAAkB,cAAc,cAAc;CACjD,YAAY,gBAAgB,cAAc;EACzC,MAAM;EACN,KAAK,iBAAiB;EACtB,KAAK,eAAe,YAAY,YAAY;CAC7C;;;;CAIA,YAAY,cAAc;EACzB,OAAO,KAAK,QAAQ,iBAAiB,YAAY;CAClD;;;;CAIA,YAAY,OAAO;EAClB,OAAO,cAAc,KAAK;CAC3B;;;;CAIA,QAAQ;EACP,MAAM,SAAS,MAAM,MAAM;EAC3B,OAAO,iBAAiB,KAAK,eAAe,MAAM;EAClD,OAAO;CACR;;;;;;;;CAQA,MAAM,SAAS,MAAM,SAAS;EAC7B,MAAM,gBAAgB,QAAQ,KAAK,gBAAgB;EACnD,MAAM,cAAc,MAAM,KAAK,OAAO,eAAe,OAAO;EAC5D,MAAM,SAAS,MAAM,MAAM,SAAS,MAAM,OAAO;EACjD,IAAI,OAAO,YAAY,OAAO,OAAO;EACrC,IAAI,gBAAgB,KAAK,KAAK,gBAAgB,MAAM,OAAO;EAC3D,IAAI,CAAC,cAAc,WAAW,GAAG,OAAO;EACxC,MAAM,SAAS,CAAC;EAChB,MAAM,qBAAqB,OAAO,KAAK,WAAW,CAAC,CAAC,IAAI,OAAO,QAAQ;GACtE,MAAM,eAAe;IACpB,GAAG;IACH,QAAQ;IACR,OAAO,YAAY;IACnB;IACA,MAAM,WAAW,QAAQ,MAAM,GAAG;GACnC;GACA,MAAM,cAAc,MAAM,KAAK,eAAe,SAAS,YAAY,MAAM,YAAY;GACrF,YAAY,OAAO,YAAY;GAC/B,IAAI,YAAY,YAAY,OAAO,OAAO,KAAK,GAAG,YAAY,MAAM;EACrE,CAAC;EACD,MAAM,QAAQ,IAAI,kBAAkB;EACpC,OAAO;GACN,SAAS,OAAO,WAAW;GAC3B;GACA,MAAM,MAAM,KAAK,4BAA4B,aAAa,OAAO;EAClE;CACD;;;;;;;;;;;;;;;;CAgBA,aAAa,SAAS,iBAAiB;EACtC,MAAM,SAAS;GACd,MAAM;GACN,sBAAsB,KAAK,eAAe,aAAa,MAAM;EAC9D;EACA,IAAI,KAAK,YAAY,cAAc,QAAQ,MAAM;EACjD,OAAO;CACR;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scalar-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/scalar-validator.mjs"],"sourcesContent":["import { getRuleOptions } from \"../standard-schema/json-schema.mjs\";\nimport { VALID_RULE, invalidRule } from \"../helpers/validation-helpers.mjs\";\nimport \"../helpers/index.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 { numberMutator } from \"../mutators/number-mutators.mjs\";\nimport { stringMutator } from \"../mutators/scalar-mutators.mjs\";\nimport \"../mutators/index.mjs\";\nimport { PrimitiveValidator } from \"./primitive-validator.mjs\";\nimport \"../rules/scalar/index.mjs\";\n\n//#region ../seal/src/validators/scalar-validator.ts\n/**\n* Scalar validator class\n*\n* Core validator for scalar values (string, number, boolean).\n* Extends PrimitiveValidator (inherits enum/in/oneOf/allowsOnly/forbids/notIn)\n* and additionally provides type-coercion mutators and accepted/declined rules.\n*\n* Database methods (unique, exists, etc.) are injected by the framework\n*/\nvar ScalarValidator = class extends PrimitiveValidator {\n\tconstructor(errorMessage) {\n\t\tsuper();\n\t\tthis.addMutableRule({\n\t\t\tname: \"scalar\",\n\t\t\tdefaultErrorMessage: \"The :input must be a scalar value\",\n\t\t\tasync validate(value, context) {\n\t\t\t\tif ([\n\t\t\t\t\t\"string\",\n\t\t\t\t\t\"number\",\n\t\t\t\t\t\"boolean\"\n\t\t\t\t].includes(typeof value)) return VALID_RULE;\n\t\t\t\treturn invalidRule(this, context);\n\t\t\t}\n\t\t}, errorMessage);\n\t}\n\t/**\n\t* Add matches type\n\t*/\n\tmatchesType(value) {\n\t\treturn typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\";\n\t}\n\t/**\n\t* Mutate the scalar value to be number\n\t*/\n\tasNumber() {\n\t\treturn this.addMutator(numberMutator);\n\t}\n\t/**\n\t* Mutate the scalar value to be string\n\t*/\n\tasString() {\n\t\treturn this.addMutator(stringMutator);\n\t}\n\t/**\n\t* Accepted value\n\t* The value will be valid if it equals 1 | \"1\" | true | \"true\" | \"yes\" | \"y\" | \"on\"\n\t*/\n\taccepted(errorMessage) {\n\t\treturn this.addRule(acceptedRule, errorMessage);\n\t}\n\t/**\n\t* Accepted value if another field's value equals to a specific value\n\t*/\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/**\n\t* Accepted value if another field's value is not equal to the given value\n\t*/\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/**\n\t* Accepted value if another field is required\n\t*/\n\tacceptedIfRequired(field, errorMessage) {\n\t\treturn this.addRule(acceptedIfRequiredRule, errorMessage, { field });\n\t}\n\t/**\n\t* Accepted value if another field is present\n\t*/\n\tacceptedIfPresent(field, errorMessage) {\n\t\treturn this.addRule(acceptedIfPresentRule, errorMessage, { field });\n\t}\n\t/**\n\t* Accepted value if another field is missing\n\t*/\n\tacceptedWithout(field, errorMessage) {\n\t\treturn this.addRule(acceptedWithoutRule, errorMessage, { field });\n\t}\n\t/**\n\t* Declined value\n\t* The value will be valid if it equals 0 | \"0\" | false | \"false\" | \"no\" | \"n\" | \"off\"\n\t*/\n\tdeclined(errorMessage) {\n\t\treturn this.addRule(declinedRule, errorMessage);\n\t}\n\t/**\n\t* Declined value if another field's value equals to a specific value\n\t*/\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/**\n\t* Declined value if another field's value is not equal to the given value\n\t*/\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/**\n\t* Declined value if another field is required\n\t*/\n\tdeclinedIfRequired(field, errorMessage) {\n\t\treturn this.addRule(declinedIfRequiredRule, errorMessage, { field });\n\t}\n\t/**\n\t* Declined value if another field is present\n\t*/\n\tdeclinedIfPresent(field, errorMessage) {\n\t\treturn this.addRule(declinedIfPresentRule, errorMessage, { field });\n\t}\n\t/**\n\t* Declined value if another field is missing\n\t*/\n\tdeclinedWithout(field, errorMessage) {\n\t\treturn this.addRule(declinedWithoutRule, errorMessage, { field });\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* A scalar accepts string | number | boolean. If `.in()` / `.enum()` is used,\n\t* output collapses to a simple `enum` list instead.\n\t*\n\t* @example\n\t* ```ts\n\t* v.scalar().toJsonSchema(\"draft-2020-12\")\n\t* // → { oneOf: [{ type: \"string\" }, { type: \"number\" }, { type: \"boolean\" }] }\n\t*\n\t* v.scalar().in([\"active\", \"inactive\"]).toJsonSchema(\"draft-2020-12\")\n\t* // → { enum: [\"active\", \"inactive\"] }\n\t* ```\n\t*/\n\ttoJsonSchema(_target = \"draft-2020-12\") {\n\t\tconst inOpts = getRuleOptions(this.rules, \"in\");\n\t\tif (inOpts?.values && Array.isArray(inOpts.values)) return { enum: inOpts.values };\n\t\tconst enumOpts = getRuleOptions(this.rules, \"enum\");\n\t\tif (enumOpts?.enum && Array.isArray(enumOpts.enum)) return { enum: enumOpts.enum };\n\t\treturn { oneOf: [\n\t\t\t{ type: \"string\" },\n\t\t\t{ type: \"number\" },\n\t\t\t{ type: \"boolean\" }\n\t\t] };\n\t}\n};\n\n//#endregion\nexport { ScalarValidator };\n//# sourceMappingURL=scalar-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,IAAI,kBAAkB,cAAc,mBAAmB;CACtD,YAAY,cAAc;EACzB,MAAM;EACN,KAAK,eAAe;GACnB,MAAM;GACN,qBAAqB;GACrB,MAAM,SAAS,OAAO,SAAS;IAC9B,IAAI;KACH;KACA;KACA;IACD,CAAC,CAAC,SAAS,OAAO,KAAK,GAAG,OAAO;IACjC,OAAO,YAAY,MAAM,OAAO;GACjC;EACD,GAAG,YAAY;CAChB;;;;CAIA,YAAY,OAAO;EAClB,OAAO,OA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E,MAAM,CAAC;CACjE;;;;;;;;;;;;;;;;CAgBA,aAAa,UAAU,iBAAiB;EACvC,MAAM,SAAS,eAAe,KAAK,OAAO,IAAI;EAC9C,IAAI,QAAQ,UAAU,MAAM,QAAQ,OAAO,MAAM,GAAG,OAAO,EAAE,MAAM,OAAO,OAAO;EACjF,MAAM,WAAW,eAAe,KAAK,OAAO,MAAM;EAClD,IAAI,UAAU,QAAQ,MAAM,QAAQ,SAAS,IAAI,GAAG,OAAO,EAAE,MAAM,SAAS,KAAK;EACjF,OAAO,EAAE,OAAO;GACf,EAAE,MAAM,SAAS;GACjB,EAAE,MAAM,SAAS;GACjB,EAAE,MAAM,UAAU;EACnB,EAAE;CACH;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/string-validator.mjs"],"sourcesContent":["import { applyNullable, getRuleOptions } from \"../standard-schema/json-schema.mjs\";\nimport { alphaOnlyMutator, alphanumericOnlyMutator, appendMutator, base64DecodeMutator, base64EncodeMutator, camelCaseMutator, capitalizeMutator, htmlEscapeMutator, kebabCaseMutator, lowercaseMutator, ltrimMutator, maskMutator, padEndMutator, padStartMutator, pascalCaseMutator, prependMutator, removeNumbersMutator, removeSpecialCharactersMutator, repeatMutator, replaceAllMutator, replaceMutator, reverseMutator, rtrimMutator, slugMutator, snakeCaseMutator, stringifyMutator, stripTagsMutator, titleCaseMutator, trimMultipleWhitespaceMutator, trimMutator, truncateMutator, unescapeHtmlMutator, uppercaseMutator, urlDecodeMutator, urlEncodeMutator } from \"../mutators/string-mutators.mjs\";\nimport { alphaNumericRule, alphaRule, isNumericRule } from \"../rules/string/alpha.mjs\";\nimport { isCreditCardRule } from \"../rules/string/credit-card.mjs\";\nimport { emailRule } from \"../rules/string/email.mjs\";\nimport { cuidRule, nanoidRule, ulidRule, uuidRule } from \"../rules/string/id-formats.mjs\";\nimport { ip4Rule, ip6Rule, ipRule } from \"../rules/string/ip.mjs\";\nimport { patternRule } from \"../rules/string/pattern.mjs\";\nimport { containsRule, endsWithRule, notContainsRule, startsWithRule } from \"../rules/string/string-comparison.mjs\";\nimport { strongPasswordRule } from \"../rules/string/strong-password-rule.mjs\";\nimport { urlRule } from \"../rules/string/url.mjs\";\nimport { withoutWhitespaceRule } from \"../rules/string/without-whitespace.mjs\";\nimport { betweenLengthRule, lengthRule, maxLengthRule, maxWordsRule, minLengthRule, minWordsRule, wordsRule } from \"../rules/length/length-rules.mjs\";\nimport \"../rules/length/index.mjs\";\nimport { colorRule, darkColorRule, hexColorRule, hslColorRule, lightColorRule, rgbColorRule, rgbaColorRule } from \"../rules/color/color-rules.mjs\";\nimport \"../rules/color/index.mjs\";\nimport { stringRule } from \"../rules/common/type-rules.mjs\";\nimport { PrimitiveValidator } from \"./primitive-validator.mjs\";\n\n//#region ../seal/src/validators/string-validator.ts\n/**\n* String validator class\n*/\nvar StringValidator = class extends PrimitiveValidator {\n\tconstructor(errorMessage) {\n\t\tsuper();\n\t\tthis.addMutableRule(stringRule, errorMessage);\n\t}\n\t/**\n\t* Check if value is a string type\n\t*/\n\tmatchesType(value) {\n\t\treturn typeof value === \"string\";\n\t}\n\t/**\n\t* Stringify the value if not a string\n\t*/\n\ttoString() {\n\t\treturn this.addMutator(stringifyMutator);\n\t}\n\t/** Convert string to uppercase */\n\tuppercase() {\n\t\treturn this.addMutator(uppercaseMutator);\n\t}\n\t/** Convert string to lowercase */\n\tlowercase() {\n\t\treturn this.addMutator(lowercaseMutator);\n\t}\n\t/** Capitalize only the first letter of the string */\n\tcapitalize() {\n\t\treturn this.addMutator(capitalizeMutator);\n\t}\n\t/** Capitalize the first letter of each word (Title Case) */\n\ttitleCase() {\n\t\treturn this.addMutator(titleCaseMutator);\n\t}\n\t/** Convert to camelCase */\n\tcamelCase() {\n\t\treturn this.addMutator(camelCaseMutator);\n\t}\n\t/** Convert to PascalCase */\n\tpascalCase() {\n\t\treturn this.addMutator(pascalCaseMutator);\n\t}\n\t/** Convert to snake_case */\n\tsnakeCase() {\n\t\treturn this.addMutator(snakeCaseMutator);\n\t}\n\t/** Convert to kebab-case */\n\tkebabCase() {\n\t\treturn this.addMutator(kebabCaseMutator);\n\t}\n\t/**\n\t* Trim the given needle from the string\n\t* If no needle is provided, the default is a single space\n\t*/\n\ttrim(needle) {\n\t\treturn this.addMutator(trimMutator, { needle });\n\t}\n\t/** Trim from the left/start */\n\tltrim(needle) {\n\t\treturn this.addMutator(ltrimMutator, { needle });\n\t}\n\t/** Trim from the right/end */\n\trtrim(needle) {\n\t\treturn this.addMutator(rtrimMutator, { needle });\n\t}\n\t/** Trim multiple whitespace into single space */\n\ttrimMultipleWhitespace() {\n\t\treturn this.addMutator(trimMultipleWhitespaceMutator);\n\t}\n\t/** Pad string from the start to reach target length */\n\tpadStart(length, char = \" \") {\n\t\treturn this.addMutator(padStartMutator, {\n\t\t\tlength,\n\t\t\tchar\n\t\t});\n\t}\n\t/** Pad string from the end to reach target length */\n\tpadEnd(length, char = \" \") {\n\t\treturn this.addMutator(padEndMutator, {\n\t\t\tlength,\n\t\t\tchar\n\t\t});\n\t}\n\t/**\n\t* Strip HTML tags with a naive `<...>` regex.\n\t*\n\t* This is a **tag stripper, not an XSS sanitizer**: it is not a parser,\n\t* so malformed/nested markup or content re-introduced later in a\n\t* pipeline can defeat it. Do not rely on this alone to make untrusted\n\t* rich text safe to render — use a real parser-based sanitizer (e.g.\n\t* DOMPurify / sanitize-html) for that.\n\t*/\n\tstripTags() {\n\t\treturn this.addMutator(stripTagsMutator);\n\t}\n\t/**\n\t* @deprecated Renamed to {@link StringValidator.stripTags} — the old\n\t* name implied XSS safety this tag-stripping regex does not provide.\n\t* Kept as an alias for backward compatibility; switch to `.stripTags()`.\n\t*/\n\tsafeHtml() {\n\t\treturn this.stripTags();\n\t}\n\t/** HTML escape special characters */\n\thtmlEscape() {\n\t\treturn this.addMutator(htmlEscapeMutator);\n\t}\n\t/** Unescape HTML entities */\n\tunescapeHtml() {\n\t\treturn this.addMutator(unescapeHtmlMutator);\n\t}\n\t/**\n\t* Remove special characters\n\t* This will remove all characters that are not alphanumeric or whitespace\n\t*/\n\tremoveSpecialCharacters() {\n\t\treturn this.addMutator(removeSpecialCharactersMutator);\n\t}\n\t/** Convert to only alphabetic characters */\n\ttoAlpha() {\n\t\treturn this.addMutator(alphaOnlyMutator);\n\t}\n\t/** Convert to only alphanumeric characters */\n\ttoAlphanumeric() {\n\t\treturn this.addMutator(alphanumericOnlyMutator);\n\t}\n\t/** Remove all numeric characters */\n\tremoveNumbers() {\n\t\treturn this.addMutator(removeNumbersMutator);\n\t}\n\t/** URL decode */\n\turlDecode() {\n\t\treturn this.addMutator(urlDecodeMutator);\n\t}\n\t/** URL encode */\n\turlEncode() {\n\t\treturn this.addMutator(urlEncodeMutator);\n\t}\n\t/** Convert to URL-friendly slug */\n\tslug() {\n\t\treturn this.addMutator(slugMutator);\n\t}\n\t/** Base64 encode */\n\tbase64Encode() {\n\t\treturn this.addMutator(base64EncodeMutator);\n\t}\n\t/** Base64 decode */\n\tbase64Decode() {\n\t\treturn this.addMutator(base64DecodeMutator);\n\t}\n\t/** Replace substring or pattern */\n\treplace(search, replace) {\n\t\treturn this.addMutator(replaceMutator, {\n\t\t\tsearch,\n\t\t\treplace\n\t\t});\n\t}\n\t/** Replace all occurrences of substring or pattern */\n\treplaceAll(search, replace) {\n\t\treturn this.addMutator(replaceAllMutator, {\n\t\t\tsearch,\n\t\t\treplace\n\t\t});\n\t}\n\t/** Append/suffix text to the end */\n\tappend(suffix) {\n\t\treturn this.addMutator(appendMutator, { suffix });\n\t}\n\t/** Prepend/prefix text to the beginning */\n\tprepend(prefix) {\n\t\treturn this.addMutator(prependMutator, { prefix });\n\t}\n\t/** Reverse the string */\n\treverse() {\n\t\treturn this.addMutator(reverseMutator);\n\t}\n\t/** Truncate to a maximum length */\n\ttruncate(maxLength, suffix = \"...\") {\n\t\treturn this.addMutator(truncateMutator, {\n\t\t\tmaxLength,\n\t\t\tsuffix\n\t\t});\n\t}\n\t/** Repeat string N times */\n\trepeat(count) {\n\t\treturn this.addMutator(repeatMutator, { count });\n\t}\n\t/** Mask part of string */\n\tmask(start, end, char = \"*\") {\n\t\treturn this.addMutator(maskMutator, {\n\t\t\tstart,\n\t\t\tend,\n\t\t\tchar\n\t\t});\n\t}\n\t/** Value must be a valid email */\n\temail(errorMessage) {\n\t\treturn this.addRule(emailRule, errorMessage);\n\t}\n\t/** Value must be a valid URL */\n\turl(errorMessage) {\n\t\treturn this.addRule(urlRule, errorMessage);\n\t}\n\t/** Value can not have whitespace */\n\twithoutWhitespace(errorMessage) {\n\t\treturn this.addRule(withoutWhitespaceRule, errorMessage);\n\t}\n\t/** Value must match the given pattern */\n\tpattern(pattern, errorMessage) {\n\t\treturn this.addRule(patternRule, errorMessage, { pattern });\n\t}\n\t/**\n\t* Value must be a strong password\n\t* Requirements:\n\t* - At least 8 characters\n\t* - At least 1 uppercase letter\n\t* - At least 1 lowercase letter\n\t* - At least 1 number\n\t* - At least 1 special character\n\t*/\n\tstrongPassword(minLength, errorMessage) {\n\t\treturn this.addRule(strongPasswordRule, errorMessage, { minLength });\n\t}\n\t/** Value must be exactly the given number of words */\n\twords(words, errorMessage) {\n\t\treturn this.addRule(wordsRule, errorMessage, { words });\n\t}\n\t/** Value must be at least the given number of words */\n\tminWords(words, errorMessage) {\n\t\treturn this.addRule(minWordsRule, errorMessage, { minWords: words });\n\t}\n\t/** Value must be at most the given number of words */\n\tmaxWords(words, errorMessage) {\n\t\treturn this.addRule(maxWordsRule, errorMessage, { maxWords: words });\n\t}\n\t/** Value length must be greater than the given length */\n\tminLength(length, errorMessage) {\n\t\treturn this.addRule(minLengthRule, errorMessage, { minLength: length });\n\t}\n\t/** @alias minLength */\n\tmin(min, errorMessage) {\n\t\treturn this.minLength(min, errorMessage);\n\t}\n\t/** Value length must be less than the given length */\n\tmaxLength(length, errorMessage) {\n\t\treturn this.addRule(maxLengthRule, errorMessage, { maxLength: length });\n\t}\n\t/** @alias maxLength */\n\tmax(max, errorMessage) {\n\t\treturn this.maxLength(max, errorMessage);\n\t}\n\t/** Value must be of the given length */\n\tlength(length, errorMessage) {\n\t\treturn this.addRule(lengthRule, errorMessage, { length });\n\t}\n\t/**\n\t* String length must be between min and max (inclusive)\n\t*\n\t* @param min - Minimum length (inclusive)\n\t* @param max - Maximum length (inclusive)\n\t*\n\t* @example\n\t* ```ts\n\t* v.string().between(5, 10) // Length: 5 to 10 characters\n\t* v.string().lengthBetween(8, 20) // Same using alias\n\t* ```\n\t*\n\t* @category Validation Rule\n\t*/\n\tlengthBetween(min, max, errorMessage) {\n\t\treturn this.addRule(betweenLengthRule, errorMessage, {\n\t\t\tminLength: min,\n\t\t\tmaxLength: max\n\t\t});\n\t}\n\t/** Allow only alphabetic characters */\n\talpha(errorMessage) {\n\t\treturn this.addRule(alphaRule, errorMessage);\n\t}\n\t/** Allow only alphanumeric characters */\n\talphanumeric(errorMessage) {\n\t\treturn this.addRule(alphaNumericRule, errorMessage);\n\t}\n\t/** Allow only numeric characters */\n\tnumeric(errorMessage) {\n\t\treturn this.addRule(isNumericRule, errorMessage);\n\t}\n\t/** Value must starts with the given string */\n\tstartsWith(value, errorMessage) {\n\t\treturn this.addRule(startsWithRule, errorMessage, { value });\n\t}\n\t/** Value must ends with the given string */\n\tendsWith(value, errorMessage) {\n\t\treturn this.addRule(endsWithRule, errorMessage, { value });\n\t}\n\t/** Value must contain the given string */\n\tcontains(value, errorMessage) {\n\t\treturn this.addRule(containsRule, errorMessage, { value });\n\t}\n\t/** Value must not contain the given string */\n\tnotContains(value, errorMessage) {\n\t\treturn this.addRule(notContainsRule, errorMessage, { value });\n\t}\n\t/** Value must be a valid IP address */\n\tip(errorMessage) {\n\t\treturn this.addRule(ipRule, errorMessage);\n\t}\n\t/** Value must be a valid IPv4 address */\n\tip4(errorMessage) {\n\t\treturn this.addRule(ip4Rule, errorMessage);\n\t}\n\t/** Value must be a valid IPv6 address */\n\tip6(errorMessage) {\n\t\treturn this.addRule(ip6Rule, errorMessage);\n\t}\n\t/** Check if the string matches a credit card number */\n\tcreditCard(errorMessage) {\n\t\treturn this.addRule(isCreditCardRule, errorMessage);\n\t}\n\t/** Determine if the value is a valid color */\n\tcolor(errorMessage) {\n\t\treturn this.addRule(colorRule, errorMessage);\n\t}\n\t/** Determine if the value is a valid hex color */\n\thexColor(errorMessage) {\n\t\treturn this.addRule(hexColorRule, errorMessage);\n\t}\n\t/** Determine if the value is a valid HSL color */\n\thslColor(errorMessage) {\n\t\treturn this.addRule(hslColorRule, errorMessage);\n\t}\n\t/** Determine if the value is a valid RGB color */\n\trgbColor(errorMessage) {\n\t\treturn this.addRule(rgbColorRule, errorMessage);\n\t}\n\t/** Determine if the value is a valid RGBA color */\n\trgbaColor(errorMessage) {\n\t\treturn this.addRule(rgbaColorRule, errorMessage);\n\t}\n\t/** Determine if the value is a valid light color */\n\tlightColor(errorMessage) {\n\t\treturn this.addRule(lightColorRule, errorMessage);\n\t}\n\t/** Determine if the value is a valid dark color */\n\tdarkColor(errorMessage) {\n\t\treturn this.addRule(darkColorRule, errorMessage);\n\t}\n\t/**\n\t* Value must be a valid UUID. Optionally restrict to a specific version.\n\t*\n\t* @example\n\t* v.string().uuid() // any RFC 4122 UUID\n\t* v.string().uuid(4) // only v4 (random)\n\t* v.string().uuid(7) // only v7 (timestamp-ordered)\n\t*/\n\tuuid(version, errorMessage) {\n\t\treturn this.addRule(uuidRule, errorMessage, { version });\n\t}\n\t/**\n\t* Value must be a valid CUID. Defaults to CUID2; pass `{ version: 1 }` for legacy.\n\t*\n\t* @example\n\t* v.string().cuid() // CUID2\n\t* v.string().cuid({ version: 1 }) // legacy CUID1\n\t*/\n\tcuid(options) {\n\t\tconst { errorMessage, version } = options ?? {};\n\t\treturn this.addRule(cuidRule, errorMessage, { version });\n\t}\n\t/** Value must be a valid ULID (26 chars, Crockford base32). */\n\tulid(errorMessage) {\n\t\treturn this.addRule(ulidRule, errorMessage);\n\t}\n\t/**\n\t* Value must be a valid nanoid string. Default length is 21.\n\t*\n\t* @example\n\t* v.string().nanoid() // 21 chars (default)\n\t* v.string().nanoid(10) // 10 chars\n\t*/\n\tnanoid(length, errorMessage) {\n\t\treturn this.addRule(nanoidRule, errorMessage, { length });\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* Maps String-specific rule options to JSON Schema keywords.\n\t* Non-representable rules (cross-field, refine, color rules, etc.) are silently omitted.\n\t*\n\t* @example\n\t* ```ts\n\t* v.string().min(2).max(100).email().toJsonSchema(\"draft-2020-12\")\n\t* // → { type: \"string\", minLength: 2, maxLength: 100, format: \"email\" }\n\t* ```\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\tconst schema = { type: \"string\" };\n\t\tconst minOpts = getRuleOptions(this.rules, \"minLength\");\n\t\tif (minOpts?.minLength !== void 0) schema.minLength = minOpts.minLength;\n\t\tconst maxOpts = getRuleOptions(this.rules, \"maxLength\");\n\t\tif (maxOpts?.maxLength !== void 0) schema.maxLength = maxOpts.maxLength;\n\t\tconst betweenOpts = getRuleOptions(this.rules, \"betweenLength\");\n\t\tif (betweenOpts) {\n\t\t\tif (betweenOpts.minLength !== void 0) schema.minLength = betweenOpts.minLength;\n\t\t\tif (betweenOpts.maxLength !== void 0) schema.maxLength = betweenOpts.maxLength;\n\t\t}\n\t\tconst lengthOpts = getRuleOptions(this.rules, \"length\");\n\t\tif (lengthOpts?.length !== void 0) {\n\t\t\tschema.minLength = lengthOpts.length;\n\t\t\tschema.maxLength = lengthOpts.length;\n\t\t}\n\t\tconst patternOpts = getRuleOptions(this.rules, \"pattern\");\n\t\tif (patternOpts?.pattern instanceof RegExp) schema.pattern = patternOpts.pattern.source;\n\t\tif (getRuleOptions(this.rules, \"email\") !== void 0 || this.rules.some((r) => r.name === \"email\")) schema.format = \"email\";\n\t\telse if (this.rules.some((r) => r.name === \"url\")) schema.format = \"uri\";\n\t\telse if (this.rules.some((r) => r.name === \"ip\")) schema.format = \"ipv4\";\n\t\telse if (this.rules.some((r) => r.name === \"ip4\")) schema.format = \"ipv4\";\n\t\telse if (this.rules.some((r) => r.name === \"ip6\")) schema.format = \"ipv6\";\n\t\telse if (this.rules.some((r) => r.name === \"uuid\")) schema.format = \"uuid\";\n\t\telse if (this.rules.some((r) => r.name === \"hexColor\")) schema.format = \"color\";\n\t\tif (!schema.format) {\n\t\t\tconst cuidOpts = getRuleOptions(this.rules, \"cuid\");\n\t\t\tif (cuidOpts) schema.pattern = cuidOpts.version === 1 ? \"^c[a-z0-9]{24,}$\" : \"^[a-z][a-z0-9]{23}$\";\n\t\t\tif (this.rules.some((r) => r.name === \"ulid\")) schema.pattern = \"^[0-9A-HJKMNP-TV-Z]{26}$\";\n\t\t\tconst nanoidOpts = getRuleOptions(this.rules, \"nanoid\");\n\t\t\tif (nanoidOpts) schema.pattern = `^[A-Za-z0-9_-]{${nanoidOpts.length ?? 21}}$`;\n\t\t}\n\t\tconst inOpts = getRuleOptions(this.rules, \"in\");\n\t\tif (inOpts?.values && Array.isArray(inOpts.values)) schema.enum = inOpts.values;\n\t\tif (this.isNullable) applyNullable(schema, target);\n\t\treturn schema;\n\t}\n};\n\n//#endregion\nexport { StringValidator };\n//# sourceMappingURL=string-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAI,kBAAkB,cAAc,mBAAmB;CACtD,YAAY,cAAc;EACzB,MAAM;EACN,KAAK,eAAe,YAAY,YAAY;CAC7C;;;;CAIA,YAAY,OAAO;EAClB,OAAO,OAAO,UAAU;CACzB;;;;CAIA,WAAW;EACV,OAAO,KAAK,WAAW,gBAAgB;CACxC;;CAEA,YAAY;EACX,OAAO,KAAK,WAAW,gBAAgB;CACxC;;CAEA,YAAY;EACX,OAAO,KAAK,WAAW,gBAAgB;CACxC;;CAEA,aAAa;EACZ,OAAO,KAAK,WAAW,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;GACnB,MAAM,WAAW,eAAe,KAAK,OAAO,MAAM;GAClD,IAAI,UAAU,OAAO,UAAU,SAAS,YAAY,IAAI,qBAAqB;GAC7E,IAAI,KAAK,MAAM,MAAM,MAAM,EAAE,SAAS,MAAM,GAAG,OAAO,UAAU;GAChE,MAAM,aAAa,eAAe,KAAK,OAAO,QAAQ;GACtD,IAAI,YAAY,OAAO,UAAU,kBAAkB,WAAW,UAAU,GAAG;EAC5E;EACA,MAAM,SAAS,eAAe,KAAK,OAAO,IAAI;EAC9C,IAAI,QAAQ,UAAU,MAAM,QAAQ,OAAO,MAAM,GAAG,OAAO,OAAO,OAAO;EACzE,IAAI,KAAK,YAAY,cAAc,QAAQ,MAAM;EACjD,OAAO;CACR;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tuple-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/tuple-validator.mjs"],"sourcesContent":["import { applyNullable } from \"../standard-schema/json-schema.mjs\";\nimport { setKeyPath } from \"../helpers/path-helpers.mjs\";\nimport \"../helpers/index.mjs\";\nimport { BaseValidator } from \"./base-validator.mjs\";\nimport { arrayRule } from \"../rules/common/type-rules.mjs\";\nimport \"../rules/index.mjs\";\n\n//#region ../seal/src/validators/tuple-validator.ts\n/**\n* Tuple validator class - validates fixed-length arrays with position-specific types\n*\n* @example\n* ```ts\n* // RGB color tuple\n* v.tuple([v.number(), v.number(), v.number()])\n* // Valid: [255, 128, 0]\n* // Invalid: [255, 128] (too short)\n*\n* // Mixed types\n* v.tuple([v.string(), v.int(), v.boolean()])\n* // Valid: [\"John\", 25, true]\n* ```\n*/\nvar TupleValidator = class extends BaseValidator {\n\tconstructor(validators, errorMessage) {\n\t\tsuper();\n\t\tthis.validators = validators;\n\t\tthis.addMutableRule(arrayRule, errorMessage);\n\t}\n\t/**\n\t* Check if value is an array type\n\t*/\n\tmatchesType(value) {\n\t\treturn Array.isArray(value);\n\t}\n\t/**\n\t* Clone the validator\n\t*/\n\tclone() {\n\t\tconst cloned = super.clone();\n\t\tcloned.validators = this.validators.map((v) => v.clone());\n\t\treturn cloned;\n\t}\n\t/**\n\t* Validate tuple - check length then validate each position\n\t*\n\t* Absent input (and absent without `.default()`) propagates as `data: undefined`\n\t* so the parent ObjectValidator can omit the key. Without this, optional tuple\n\t* fields would silently materialise as `[]` in the validated output and then\n\t* fail the length check.\n\t*/\n\tasync validate(data, context) {\n\t\tconst valueForRules = data ?? this.getDefaultValue();\n\t\tconst mutatedData = await this.mutate(valueForRules, context);\n\t\tconst result = await super.validate(data, context);\n\t\tif (result.isValid === false) return result;\n\t\tif (mutatedData === void 0 || mutatedData === null) return result;\n\t\tif (!Array.isArray(mutatedData)) return result;\n\t\tconst errors = [];\n\t\tif (mutatedData.length !== this.validators.length) {\n\t\t\terrors.push({\n\t\t\t\ttype: \"tuple\",\n\t\t\t\tinput: context.key || \"value\",\n\t\t\t\terror: `Expected exactly ${this.validators.length} items, but got ${mutatedData.length}`\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terrors,\n\t\t\t\tdata: mutatedData\n\t\t\t};\n\t\t}\n\t\tconst validationPromises = this.validators.map(async (validator, index) => {\n\t\t\tconst childContext = {\n\t\t\t\t...context,\n\t\t\t\tparent: mutatedData,\n\t\t\t\tvalue: mutatedData[index],\n\t\t\t\tkey: index.toString(),\n\t\t\t\tpath: setKeyPath(context.path, index.toString())\n\t\t\t};\n\t\t\tconst childResult = await validator.validate(mutatedData[index], childContext);\n\t\t\tmutatedData[index] = childResult.data;\n\t\t\tif (childResult.isValid === false) errors.push(...childResult.errors);\n\t\t});\n\t\tawait Promise.all(validationPromises);\n\t\treturn {\n\t\t\tisValid: errors.length === 0,\n\t\t\terrors,\n\t\t\tdata: await this.startTransformationPipeline(mutatedData, context)\n\t\t};\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* Tuple keyword diverges between targets:\n\t* - `draft-2020-12` → `prefixItems` + `items: false` (exact length enforced)\n\t* - `draft-07` → `items` as array + `additionalItems: false`\n\t* - `openapi-3.0` → same as draft-07 (OpenAPI 3.0 is based on draft-07)\n\t*\n\t* @example\n\t* ```ts\n\t* v.tuple([v.string(), v.int(), v.boolean()]).toJsonSchema(\"draft-2020-12\")\n\t* // → {\n\t* // type: \"array\",\n\t* // prefixItems: [{ type: \"string\" }, { type: \"integer\" }, { type: \"boolean\" }],\n\t* // items: false,\n\t* // minItems: 3,\n\t* // maxItems: 3\n\t* // }\n\t* ```\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\tconst itemSchemas = this.validators.map((v) => v.toJsonSchema(target));\n\t\tconst length = this.validators.length;\n\t\tconst schema = {\n\t\t\ttype: \"array\",\n\t\t\tminItems: length,\n\t\t\tmaxItems: length\n\t\t};\n\t\tif (target === \"draft-2020-12\") {\n\t\t\tschema.prefixItems = itemSchemas;\n\t\t\tschema.items = false;\n\t\t} else {\n\t\t\tschema.items = itemSchemas;\n\t\t\tschema.additionalItems = false;\n\t\t}\n\t\tif (this.isNullable) applyNullable(schema, target);\n\t\treturn schema;\n\t}\n};\n\n//#endregion\nexport { TupleValidator };\n//# sourceMappingURL=tuple-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAI,iBAAiB,cAAc,cAAc;CAChD,YAAY,YAAY,cAAc;EACrC,MAAM;EACN,KAAK,aAAa;EAClB,KAAK,eAAe,WAAW,YAAY;CAC5C;;;;CAIA,YAAY,OAAO;EAClB,OAAO,MAAM,QAAQ,KAAK;CAC3B;;;;CAIA,QAAQ;EACP,MAAM,SAAS,MAAM,MAAM;EAC3B,OAAO,aAAa,KAAK,WAAW,KAAK,MAAM,EAAE,MAAM,CAAC;EACxD,OAAO;CACR;;;;;;;;;CASA,MAAM,SAAS,MAAM,SAAS;EAC7B,MAAM,gBAAgB,QAAQ,KAAK,gB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ACN,OAAO,QAAQ;GACf,OAAO,kBAAkB;EAC1B;EACA,IAAI,KAAK,YAAY,cAAc,QAAQ,MAAM;EACjD,OAAO;CACR;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"union-validator.mjs","names":[],"sources":["../../../../../../../../../../../../../../node_modules/.pnpm/@warlock.js+seal@5.18.0/node_modules/@warlock.js/seal/esm/validators/union-validator.mjs"],"sourcesContent":["import { getRuleOptions } from \"../standard-schema/json-schema.mjs\";\nimport { BaseValidator } from \"./base-validator.mjs\";\nimport { unionRule } from \"../rules/core/union.mjs\";\nimport \"../rules/index.mjs\";\n\n//#region ../seal/src/validators/union-validator.ts\n/**\n* Union validator class - validates value against multiple validator types\n*\n* Tries each validator in order until one passes. If a validator's matchesType()\n* returns false, it's skipped for optimization. First validator that both matches\n* the type and passes validation wins.\n*\n* @example\n* ```ts\n* // Accept email or username\n* const identifier = v.union([\n* v.string().email(),\n* v.string().alphanumeric().min(3).max(20)\n* ]);\n*\n* // Accept different types\n* const customValue = v.union([\n* v.string().required(),\n* v.number().required(),\n* v.boolean().required(),\n* v.file().required()\n* ]);\n* ```\n*/\nvar UnionValidator = class extends BaseValidator {\n\t/**\n\t* Set the validators to try for union validation\n\t*\n\t* @param validators - Array of validators to try\n\t* @param errorMessage - Optional custom error message if all validators fail\n\t* @returns This validator for chaining\n\t*\n\t* @example\n\t* ```ts\n\t* new UnionValidator()\n\t* .union([v.string(), v.number()], 'Must be string or number');\n\t* ```\n\t*/\n\tunion(validators, errorMessage) {\n\t\treturn this.addRule(unionRule, errorMessage, { validators });\n\t}\n\t/**\n\t* @inheritdoc\n\t*\n\t* Generates `{ oneOf: [...] }` by mapping each sub-validator to its JSON Schema.\n\t*\n\t* @example\n\t* ```ts\n\t* v.union([v.string(), v.number()]).toJsonSchema(\"draft-2020-12\")\n\t* // → { oneOf: [{ type: \"string\" }, { type: \"number\" }] }\n\t* ```\n\t*/\n\ttoJsonSchema(target = \"draft-2020-12\") {\n\t\treturn { oneOf: (getRuleOptions(this.rules, \"union\")?.validators ?? []).map((v) => v.toJsonSchema(target)) };\n\t}\n};\n\n//#endregion\nexport { UnionValidator };\n//# sourceMappingURL=union-validator.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAI,iBAAiB,cAAc,cAAc;;;;;;;;;;;;;;CAchD,MAAM,YAAY,cAAc;EAC/B,OAAO,KAAK,QAAQ,WAAW,cAAc,EAAE,WAAW,CAAC;CAC5D;;;;;;;;;;;;CAYA,aAAa,SAAS,iBAAiB;EACtC,OAAO,EAAE,QAAQ,eAAe,KAAK,OAAO,OAAO,CAAC,EAAE,cAAc,CAAC,EAAC,CAAE,KAAK,MAAM,EAAE,aAAa,MAAM,CAAC,EAAE;CAC5G;AACD"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|