@warlock.js/notifications 5.10.0 → 5.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/cjs/index.cjs +1 -1
- package/cjs/rabbitmq-driver-Dn0M0-ln.cjs +3 -0
- package/cjs/{esm-B0CsNLQ7.cjs → src-Cx9y1PWY.cjs} +664 -450
- package/cjs/src-Cx9y1PWY.cjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/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.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/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.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/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.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/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.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/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.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/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.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/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.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/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.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/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.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/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/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.6.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.6.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.6.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.6.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.6.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.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/helpers/validation-helpers.mjs +8 -2
- package/esm/seal/src/helpers/validation-helpers.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm → seal/src}/index.mjs +1 -7
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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/seal/src/mutators/boolean-mutators.mjs +40 -0
- package/esm/seal/src/mutators/boolean-mutators.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/forbidden-if-rules.mjs +1 -1
- 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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/present-if-rules.mjs +1 -1
- package/esm/seal/src/rules/conditional/present-if-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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.6.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.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/required-if-rules.mjs +3 -3
- package/esm/seal/src/rules/conditional/required-if-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/required-unless-rules.mjs +1 -1
- package/esm/seal/src/rules/conditional/required-unless-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/required-when-rule.mjs +1 -1
- package/esm/seal/src/rules/conditional/required-when-rule.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/required-with-rules.mjs +3 -3
- package/esm/seal/src/rules/conditional/required-with-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/conditional/required-without-rules.mjs +3 -3
- package/esm/seal/src/rules/conditional/required-without-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/core/forbidden.mjs +1 -1
- 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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/core/required.mjs +1 -1
- package/esm/seal/src/rules/core/required.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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.6.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.6.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.6.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.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/date/date-period-rules.mjs +5 -3
- package/esm/seal/src/rules/date/date-period-rules.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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.6.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.6.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.6.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.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/scalar/accepted-rule.mjs +21 -14
- package/esm/seal/src/rules/scalar/accepted-rule.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/scalar/declined-rule.mjs +21 -14
- 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.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/string/credit-card.mjs +2 -2
- package/esm/seal/src/rules/string/credit-card.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/base-validator.mjs +51 -18
- package/esm/seal/src/validators/base-validator.mjs.map +1 -0
- package/esm/seal/src/validators/boolean-validator.mjs +174 -0
- package/esm/seal/src/validators/boolean-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/number-validator.mjs +22 -2
- package/esm/seal/src/validators/number-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/object-validator.mjs +16 -17
- package/esm/seal/src/validators/object-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/scalar-validator.mjs +3 -3
- package/esm/seal/src/validators/scalar-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm → seal/src}/validators/string-validator.mjs +1 -1
- package/esm/seal/src/validators/string-validator.mjs.map +1 -0
- package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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.6.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 +6 -6
- package/cjs/esm-B0CsNLQ7.cjs.map +0 -1
- package/cjs/rabbitmq-driver-h0oxJafA.cjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/communicators/broker-registry.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/communicators/broker-registry.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/communicators/broker.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/communicators/broker.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/communicators/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/contracts/broker-driver.contract.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/contracts/channel.contract.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/decorators/consumable.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/decorators/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/drivers/index.mjs +0 -5
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/index.mjs +0 -4
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-channel.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-channel.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-driver.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/drivers/rabbitmq/rabbitmq-driver.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/index.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/message-managers/event-consumer.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/message-managers/event-consumer.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/message-managers/event-message.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/message-managers/event-message.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/message-managers/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/message-managers/prepare-consumer-subscription.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/types/channel.types.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/types/registry.types.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/use-case-broadcast.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/utils/connect-to-broker.d.mts +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/utils/connect-to-broker.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm/utils/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/config.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/factory/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/factory/validate.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/factory/validators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/helpers/date-helpers.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/helpers/get-field-value.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/helpers/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/helpers/is-empty-value.mjs +0 -10
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/helpers/is-empty-value.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/helpers/path-helpers.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/helpers/validation-helpers.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/index.d.mts +0 -10
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/mutators/array-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/mutators/date-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/mutators/index.mjs +0 -7
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/mutators/number-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/mutators/object-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/mutators/scalar-mutators.mjs +0 -9
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/mutators/scalar-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/mutators/string-mutators.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/array/array-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/array/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/color/color-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/color/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/common/enum.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.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.6.0/node_modules/@warlock.js/seal/esm/rules/common/index.mjs +0 -8
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/common/instanceof.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/common/literal.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/common/type-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/common/unknown-key.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.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.6.0/node_modules/@warlock.js/seal/esm/rules/conditional/index.mjs +0 -12
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.0/node_modules/@warlock.js/seal/esm/rules/core/equal.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/core/forbidden.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/core/index.mjs +0 -7
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/core/required.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/core/union.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/core/when.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.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.6.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.6.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.6.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.6.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.6.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.6.0/node_modules/@warlock.js/seal/esm/rules/date/date.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/date/index.mjs +0 -9
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/index.mjs +0 -57
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/length/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/length/length-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/number/index.mjs +0 -3
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/number/number-rules.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/scalar/accepted-rule.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/scalar/declined-rule.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/scalar/index.mjs +0 -4
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/string/alpha.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/string/credit-card.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/string/email.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/string/id-formats.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/string/index.mjs +0 -13
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/string/ip.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/string/matches.mjs +0 -4
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/string/pattern.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/string/string-comparison.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.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.6.0/node_modules/@warlock.js/seal/esm/rules/string/url.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/string/without-whitespace.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/standard-schema/json-schema.d.mts +0 -32
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.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.6.0/node_modules/@warlock.js/seal/esm/standard-schema/json-schema.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/standard-schema/map-result.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/standard-schema/types.d.mts +0 -97
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/standard-schema/types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/conditional-types.d.mts +0 -16
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/conditional-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/context-types.d.mts +0 -42
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/context-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/data-transformer-types.d.mts +0 -30
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.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.6.0/node_modules/@warlock.js/seal/esm/types/date-types.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/mutator-types.d.mts +0 -28
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/mutator-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/result-types.d.mts +0 -17
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/result-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/rule-types.d.mts +0 -53
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/rule-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/schema-types.d.mts +0 -11
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/types/schema-types.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/any-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/array-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/base-validator.d.mts +0 -492
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/base-validator.d.mts.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/base-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/boolean-validator.mjs +0 -126
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/boolean-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/computed-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/date-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/discriminated-union-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/float-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/index.mjs +0 -28
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/instanceof-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/int-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/lazy-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/literal-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/managed-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.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.6.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.6.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.6.0/node_modules/@warlock.js/seal/esm/validators/methods/forbidden-methods.d.mts +0 -59
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.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.6.0/node_modules/@warlock.js/seal/esm/validators/methods/forbidden-methods.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/methods/present-methods.d.mts +0 -103
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.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.6.0/node_modules/@warlock.js/seal/esm/validators/methods/present-methods.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.d.mts +0 -194
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.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.6.0/node_modules/@warlock.js/seal/esm/validators/methods/required-methods.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/number-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/numeric-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/object-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/primitive-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/record-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/scalar-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/string-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/tuple-validator.mjs.map +0 -1
- package/esm/node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/union-validator.mjs.map +0 -1
- /package/esm/{node_modules/.pnpm/@warlock.js_herald@5.6.0_@s_0860c22cdacc649e21c0eaa39aa1c65f/node_modules/@warlock.js/herald/esm → herald/src}/index.mjs +0 -0
- /package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/file/dimensions.mjs +0 -0
- /package/esm/{node_modules/.pnpm/@warlock.js_seal@5.6.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.6.0/node_modules/@warlock.js/seal/esm → seal/src}/rules/file/index.mjs +0 -0
|
@@ -4,7 +4,7 @@ let node_crypto = require("node:crypto");
|
|
|
4
4
|
let node_events = require("node:events");
|
|
5
5
|
let crypto = require("crypto");
|
|
6
6
|
|
|
7
|
-
//#region ../
|
|
7
|
+
//#region ../herald/src/message-managers/prepare-consumer-subscription.ts
|
|
8
8
|
function prepareConsumerSubscription(Consumer, onError) {
|
|
9
9
|
const callback = async (message, ctx) => {
|
|
10
10
|
const envelope = message.payload;
|
|
@@ -44,7 +44,7 @@ function prepareConsumerSubscription(Consumer, onError) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
//#endregion
|
|
47
|
-
//#region ../
|
|
47
|
+
//#region ../seal/src/standard-schema/json-schema.ts
|
|
48
48
|
/**
|
|
49
49
|
* Apply nullable to a JSON Schema object based on the target dialect.
|
|
50
50
|
*
|
|
@@ -122,71 +122,6 @@ function getRuleOptions(rules, ruleName) {
|
|
|
122
122
|
return rules.find((r) => r.name === ruleName)?.context?.options;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.6.0/node_modules/@warlock.js/seal/esm/config.mjs
|
|
127
|
-
/**
|
|
128
|
-
* Global Seal configuration
|
|
129
|
-
*/
|
|
130
|
-
const config = { firstErrorOnly: true };
|
|
131
|
-
/**
|
|
132
|
-
* Get current Seal configuration
|
|
133
|
-
*/
|
|
134
|
-
function getSealConfig() {
|
|
135
|
-
return config;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.6.0/node_modules/@warlock.js/seal/esm/factory/validate.mjs
|
|
140
|
-
/**
|
|
141
|
-
* Validate data against a schema
|
|
142
|
-
*/
|
|
143
|
-
const validate = async (schema, data, { context: extendedContext, ...configurations } = getSealConfig() || {}) => {
|
|
144
|
-
const context = {
|
|
145
|
-
allValues: data,
|
|
146
|
-
parent: null,
|
|
147
|
-
value: data,
|
|
148
|
-
key: "",
|
|
149
|
-
path: "",
|
|
150
|
-
context: extendedContext,
|
|
151
|
-
rootContext: extendedContext,
|
|
152
|
-
translateRule(ruleTranslation) {
|
|
153
|
-
return configurations.translateRule?.(ruleTranslation) ?? "";
|
|
154
|
-
},
|
|
155
|
-
translateAttribute(attributeTranslation) {
|
|
156
|
-
return configurations.translateAttribute?.(attributeTranslation) ?? "";
|
|
157
|
-
},
|
|
158
|
-
configurations
|
|
159
|
-
};
|
|
160
|
-
const result = await schema.validate(data, context);
|
|
161
|
-
if (!result.isValid) return {
|
|
162
|
-
...result,
|
|
163
|
-
data: void 0
|
|
164
|
-
};
|
|
165
|
-
return result;
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
//#endregion
|
|
169
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.6.0/node_modules/@warlock.js/seal/esm/helpers/date-helpers.mjs
|
|
170
|
-
/**
|
|
171
|
-
* Detect if value is a date value or field name
|
|
172
|
-
*
|
|
173
|
-
* Date values:
|
|
174
|
-
* - Date instance
|
|
175
|
-
* - Number (timestamp)
|
|
176
|
-
* - String with date separators (- or /)
|
|
177
|
-
*
|
|
178
|
-
* Field names:
|
|
179
|
-
* - Strings without - or /
|
|
180
|
-
*
|
|
181
|
-
* @param value - Value to check
|
|
182
|
-
* @returns true if it's a date value, false if it's a field name
|
|
183
|
-
*/
|
|
184
|
-
function isDateValue(value) {
|
|
185
|
-
if (value instanceof Date) return true;
|
|
186
|
-
const date = new Date(value);
|
|
187
|
-
return !isNaN(date.getTime());
|
|
188
|
-
}
|
|
189
|
-
|
|
190
125
|
//#endregion
|
|
191
126
|
//#region ../node_modules/.pnpm/@mongez+reinforcements@4.0.1/node_modules/@mongez/reinforcements/esm/object/get.mjs
|
|
192
127
|
function get(object, path, defaultValue) {
|
|
@@ -655,7 +590,72 @@ tap.with = function tapWith(sideEffect) {
|
|
|
655
590
|
};
|
|
656
591
|
|
|
657
592
|
//#endregion
|
|
658
|
-
//#region ../
|
|
593
|
+
//#region ../seal/src/config.ts
|
|
594
|
+
/**
|
|
595
|
+
* Global Seal configuration
|
|
596
|
+
*/
|
|
597
|
+
const config = { firstErrorOnly: true };
|
|
598
|
+
/**
|
|
599
|
+
* Get current Seal configuration
|
|
600
|
+
*/
|
|
601
|
+
function getSealConfig() {
|
|
602
|
+
return config;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
//#endregion
|
|
606
|
+
//#region ../seal/src/factory/validate.ts
|
|
607
|
+
/**
|
|
608
|
+
* Validate data against a schema
|
|
609
|
+
*/
|
|
610
|
+
const validate = async (schema, data, { context: extendedContext, ...configurations } = getSealConfig() || {}) => {
|
|
611
|
+
const context = {
|
|
612
|
+
allValues: data,
|
|
613
|
+
parent: null,
|
|
614
|
+
value: data,
|
|
615
|
+
key: "",
|
|
616
|
+
path: "",
|
|
617
|
+
context: extendedContext,
|
|
618
|
+
rootContext: extendedContext,
|
|
619
|
+
translateRule(ruleTranslation) {
|
|
620
|
+
return configurations.translateRule?.(ruleTranslation) ?? "";
|
|
621
|
+
},
|
|
622
|
+
translateAttribute(attributeTranslation) {
|
|
623
|
+
return configurations.translateAttribute?.(attributeTranslation) ?? "";
|
|
624
|
+
},
|
|
625
|
+
configurations
|
|
626
|
+
};
|
|
627
|
+
const result = await schema.validate(data, context);
|
|
628
|
+
if (!result.isValid) return {
|
|
629
|
+
...result,
|
|
630
|
+
data: void 0
|
|
631
|
+
};
|
|
632
|
+
return result;
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
//#endregion
|
|
636
|
+
//#region ../seal/src/helpers/date-helpers.ts
|
|
637
|
+
/**
|
|
638
|
+
* Detect if value is a date value or field name
|
|
639
|
+
*
|
|
640
|
+
* Date values:
|
|
641
|
+
* - Date instance
|
|
642
|
+
* - Number (timestamp)
|
|
643
|
+
* - String with date separators (- or /)
|
|
644
|
+
*
|
|
645
|
+
* Field names:
|
|
646
|
+
* - Strings without - or /
|
|
647
|
+
*
|
|
648
|
+
* @param value - Value to check
|
|
649
|
+
* @returns true if it's a date value, false if it's a field name
|
|
650
|
+
*/
|
|
651
|
+
function isDateValue(value) {
|
|
652
|
+
if (value instanceof Date) return true;
|
|
653
|
+
const date = new Date(value);
|
|
654
|
+
return !isNaN(date.getTime());
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
//#endregion
|
|
658
|
+
//#region ../seal/src/helpers/get-field-value.ts
|
|
659
659
|
/**
|
|
660
660
|
* Get field value based on scope from rule options
|
|
661
661
|
*
|
|
@@ -696,7 +696,7 @@ function getFieldValue(rule, context, fieldKey = "field") {
|
|
|
696
696
|
}
|
|
697
697
|
|
|
698
698
|
//#endregion
|
|
699
|
-
//#region ../
|
|
699
|
+
//#region ../seal/src/helpers/path-helpers.ts
|
|
700
700
|
/**
|
|
701
701
|
* Set the key path for nested validation
|
|
702
702
|
*/
|
|
@@ -706,7 +706,7 @@ const setKeyPath = (path, key) => {
|
|
|
706
706
|
};
|
|
707
707
|
|
|
708
708
|
//#endregion
|
|
709
|
-
//#region ../
|
|
709
|
+
//#region ../seal/src/helpers/validation-helpers.ts
|
|
710
710
|
const VALID_RULE = { isValid: true };
|
|
711
711
|
/**
|
|
712
712
|
* Resolve a single attribute value through the full translation priority chain:
|
|
@@ -753,13 +753,19 @@ const invalidRule = (rule, context) => {
|
|
|
753
753
|
rule,
|
|
754
754
|
context
|
|
755
755
|
})]));
|
|
756
|
+
const input = resolveAttribute({
|
|
757
|
+
key: "input",
|
|
758
|
+
rawValue: translatableWithInput.input ?? "schema",
|
|
759
|
+
rule,
|
|
760
|
+
context
|
|
761
|
+
});
|
|
756
762
|
const attributes = {
|
|
757
763
|
path: context.path,
|
|
758
764
|
key: context.key,
|
|
759
765
|
value: context.value,
|
|
760
766
|
...rule.context.translationParams,
|
|
761
767
|
...resolvedParams,
|
|
762
|
-
input
|
|
768
|
+
input
|
|
763
769
|
};
|
|
764
770
|
return {
|
|
765
771
|
isValid: false,
|
|
@@ -1125,13 +1131,13 @@ const Is = {
|
|
|
1125
1131
|
};
|
|
1126
1132
|
|
|
1127
1133
|
//#endregion
|
|
1128
|
-
//#region ../
|
|
1134
|
+
//#region ../seal/src/helpers/is-empty-value.ts
|
|
1129
1135
|
function isEmptyValue(value) {
|
|
1130
1136
|
return isEmpty(value) && !isObject(value);
|
|
1131
1137
|
}
|
|
1132
1138
|
|
|
1133
1139
|
//#endregion
|
|
1134
|
-
//#region ../
|
|
1140
|
+
//#region ../seal/src/rules/core/required.ts
|
|
1135
1141
|
/**
|
|
1136
1142
|
* Required rule - value must be present and not empty
|
|
1137
1143
|
*/
|
|
@@ -1161,7 +1167,7 @@ const presentRule = {
|
|
|
1161
1167
|
};
|
|
1162
1168
|
|
|
1163
1169
|
//#endregion
|
|
1164
|
-
//#region ../
|
|
1170
|
+
//#region ../seal/src/standard-schema/map-result.ts
|
|
1165
1171
|
/**
|
|
1166
1172
|
* Maps a Seal ValidationResult to a Standard Schema result shape.
|
|
1167
1173
|
*
|
|
@@ -1185,24 +1191,57 @@ function mapToStandardResult(result) {
|
|
|
1185
1191
|
}
|
|
1186
1192
|
|
|
1187
1193
|
//#endregion
|
|
1188
|
-
//#region ../
|
|
1194
|
+
//#region ../seal/src/validators/base-validator.ts
|
|
1189
1195
|
/**
|
|
1190
1196
|
* Base validator class - foundation for all validators
|
|
1191
1197
|
*/
|
|
1192
1198
|
var BaseValidator = class {
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1199
|
+
rules = [];
|
|
1200
|
+
mutators = [];
|
|
1201
|
+
defaultValue;
|
|
1202
|
+
description;
|
|
1203
|
+
shouldOmit = false;
|
|
1204
|
+
isNullable = false;
|
|
1205
|
+
isMutable = false;
|
|
1206
|
+
/**
|
|
1207
|
+
* Catch state — when `hasCatch` is true and validation fails, `catchValue`
|
|
1208
|
+
* (or its callback result) substitutes for the failed value, and the public
|
|
1209
|
+
* result reports `isValid: true` with no errors.
|
|
1210
|
+
*
|
|
1211
|
+
* See `.catch()` for semantics and the v1 scope (leaf-only).
|
|
1212
|
+
*/
|
|
1213
|
+
catchValue;
|
|
1214
|
+
hasCatch = false;
|
|
1215
|
+
/**
|
|
1216
|
+
* Whether the field is optional.
|
|
1217
|
+
* - false (default): field is required unless a requiredRule governs the condition.
|
|
1218
|
+
* - true: field can be absent or empty — set by calling .optional().
|
|
1219
|
+
*
|
|
1220
|
+
* Also used as a TypeScript literal brand via the optional() return type.
|
|
1221
|
+
*/
|
|
1222
|
+
isOptional = false;
|
|
1223
|
+
/**
|
|
1224
|
+
* The single required-condition rule for this field.
|
|
1225
|
+
* - null: field uses strict default (always required when not optional).
|
|
1226
|
+
* - set: the rule governs when the field is required (e.g., requiredIf).
|
|
1227
|
+
*
|
|
1228
|
+
* Stored separately from rules[] and prepended at validate() time.
|
|
1229
|
+
*/
|
|
1230
|
+
requiredRule = this.createRule(requiredRule);
|
|
1231
|
+
/**
|
|
1232
|
+
* Pipeline to transform the mutated/original data before returning it
|
|
1233
|
+
*/
|
|
1234
|
+
dataTransformers = [];
|
|
1235
|
+
/**
|
|
1236
|
+
* Attributes text to be replaced on translations
|
|
1237
|
+
* If the value is an object, it will be used as the attributes list for the rule
|
|
1238
|
+
* If the value is a string, it will be used as the attributes list for the rule
|
|
1239
|
+
*/
|
|
1240
|
+
attributesText = {};
|
|
1241
|
+
/**
|
|
1242
|
+
* Attributed that will be always using the attribute translator
|
|
1243
|
+
*/
|
|
1244
|
+
translatedAttributes = {};
|
|
1206
1245
|
/**
|
|
1207
1246
|
* Mark the validator as mutable
|
|
1208
1247
|
*/
|
|
@@ -1384,7 +1423,7 @@ var BaseValidator = class {
|
|
|
1384
1423
|
*/
|
|
1385
1424
|
attributes(attributes) {
|
|
1386
1425
|
const instance = this.instance;
|
|
1387
|
-
for (const key
|
|
1426
|
+
for (const [key, value] of Object.entries(attributes)) instance.attributesText[key] = value;
|
|
1388
1427
|
return instance;
|
|
1389
1428
|
}
|
|
1390
1429
|
/**
|
|
@@ -1392,7 +1431,7 @@ var BaseValidator = class {
|
|
|
1392
1431
|
*/
|
|
1393
1432
|
transAttributes(attributes) {
|
|
1394
1433
|
const instance = this.instance;
|
|
1395
|
-
for (const key
|
|
1434
|
+
for (const [key, value] of Object.entries(attributes)) instance.translatedAttributes[key] = value;
|
|
1396
1435
|
return instance;
|
|
1397
1436
|
}
|
|
1398
1437
|
/**
|
|
@@ -1832,16 +1871,19 @@ var BaseValidator = class {
|
|
|
1832
1871
|
};
|
|
1833
1872
|
|
|
1834
1873
|
//#endregion
|
|
1835
|
-
//#region ../
|
|
1874
|
+
//#region ../seal/src/validators/any-validator.ts
|
|
1836
1875
|
/**
|
|
1837
1876
|
* Any validator - accepts any value
|
|
1838
1877
|
*/
|
|
1839
1878
|
var AnyValidator = class extends BaseValidator {
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1879
|
+
/**
|
|
1880
|
+
* Any validator means any value, so we disable the default required requirement.
|
|
1881
|
+
*/
|
|
1882
|
+
requiredRule = null;
|
|
1883
|
+
/**
|
|
1884
|
+
* Set is optional to be true
|
|
1885
|
+
*/
|
|
1886
|
+
isOptional = true;
|
|
1845
1887
|
/**
|
|
1846
1888
|
* @inheritdoc
|
|
1847
1889
|
*
|
|
@@ -1862,7 +1904,7 @@ var AnyValidator = class extends BaseValidator {
|
|
|
1862
1904
|
};
|
|
1863
1905
|
|
|
1864
1906
|
//#endregion
|
|
1865
|
-
//#region ../
|
|
1907
|
+
//#region ../seal/src/mutators/array-mutators.ts
|
|
1866
1908
|
/** Reverse array order */
|
|
1867
1909
|
const flipArrayMutator = async (value) => {
|
|
1868
1910
|
return value.reverse();
|
|
@@ -1888,6 +1930,273 @@ const uniqueArrayMutator = async (value) => {
|
|
|
1888
1930
|
return [...new Set(value)];
|
|
1889
1931
|
};
|
|
1890
1932
|
|
|
1933
|
+
//#endregion
|
|
1934
|
+
//#region ../seal/src/rules/scalar/accepted-rule.ts
|
|
1935
|
+
/**
|
|
1936
|
+
* The full set of values treated as "accepted" by `acceptedRule` and its
|
|
1937
|
+
* conditional variants. Shared with `formBooleanMutator` (see
|
|
1938
|
+
* `../../mutators/boolean-mutators`) so `v.boolean().accepted()` recognizes
|
|
1939
|
+
* exactly this list — single source of truth, no duplicated literals.
|
|
1940
|
+
*/
|
|
1941
|
+
const ACCEPTED_VALUES = [
|
|
1942
|
+
"1",
|
|
1943
|
+
"true",
|
|
1944
|
+
"yes",
|
|
1945
|
+
"y",
|
|
1946
|
+
"on",
|
|
1947
|
+
1,
|
|
1948
|
+
true,
|
|
1949
|
+
"Yes",
|
|
1950
|
+
"Y",
|
|
1951
|
+
"On"
|
|
1952
|
+
];
|
|
1953
|
+
const isAcceptedValue = (value) => {
|
|
1954
|
+
return ACCEPTED_VALUES.includes(value);
|
|
1955
|
+
};
|
|
1956
|
+
/**
|
|
1957
|
+
* Validate value as accepted if it equals:
|
|
1958
|
+
* 1 | "1" | true | "true" | "yes" | "y" | "on"
|
|
1959
|
+
*/
|
|
1960
|
+
const acceptedRule = {
|
|
1961
|
+
name: "accepted",
|
|
1962
|
+
defaultErrorMessage: "The :input must be accepted",
|
|
1963
|
+
description: "The value must be accepted if it equals: 1 | '1' | true | 'true' | 'yes' | 'y' | 'on' | 1 | true | 'Yes' | 'Y' | 'On'",
|
|
1964
|
+
async validate(value, context) {
|
|
1965
|
+
if (isAcceptedValue(value)) return VALID_RULE;
|
|
1966
|
+
return invalidRule(this, context);
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
/**
|
|
1970
|
+
* Accepted value if another field's value equals to a specific value
|
|
1971
|
+
*/
|
|
1972
|
+
const acceptedIfRule = {
|
|
1973
|
+
name: "acceptedIf",
|
|
1974
|
+
description: "The field must be accepted if :field's value equals to :value",
|
|
1975
|
+
defaultErrorMessage: "The :input must be accepted",
|
|
1976
|
+
async validate(value, context) {
|
|
1977
|
+
const fieldValue = getFieldValue(this, context);
|
|
1978
|
+
const { value: expectedValue } = this.context.options;
|
|
1979
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
1980
|
+
this.context.translatableParams.value = this.context.options.value;
|
|
1981
|
+
if (fieldValue !== expectedValue) return invalidRule(this, context);
|
|
1982
|
+
if (!isAcceptedValue(value)) return invalidRule(this, context);
|
|
1983
|
+
return VALID_RULE;
|
|
1984
|
+
}
|
|
1985
|
+
};
|
|
1986
|
+
/**
|
|
1987
|
+
* Accepted if another field is not equal to the given value
|
|
1988
|
+
*/
|
|
1989
|
+
const acceptedUnlessRule = {
|
|
1990
|
+
name: "acceptedUnless",
|
|
1991
|
+
description: "The field must be accepted if :field's value is not equal to :value",
|
|
1992
|
+
defaultErrorMessage: "The :input must be accepted",
|
|
1993
|
+
async validate(value, context) {
|
|
1994
|
+
const fieldValue = getFieldValue(this, context);
|
|
1995
|
+
const { value: expectedValue } = this.context.options;
|
|
1996
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
1997
|
+
this.context.translatableParams.value = this.context.options.value;
|
|
1998
|
+
if (fieldValue === expectedValue) return invalidRule(this, context);
|
|
1999
|
+
if (!isAcceptedValue(value)) return invalidRule(this, context);
|
|
2000
|
+
return VALID_RULE;
|
|
2001
|
+
}
|
|
2002
|
+
};
|
|
2003
|
+
/**
|
|
2004
|
+
* Accepted if another field is required
|
|
2005
|
+
*/
|
|
2006
|
+
const acceptedIfRequiredRule = {
|
|
2007
|
+
name: "acceptedIfRequired",
|
|
2008
|
+
description: "The field must be accepted if :field is required",
|
|
2009
|
+
defaultErrorMessage: "The :input must be accepted",
|
|
2010
|
+
async validate(value, context) {
|
|
2011
|
+
const fieldValue = getFieldValue(this, context);
|
|
2012
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
2013
|
+
if (isEmptyValue(fieldValue)) return invalidRule(this, context);
|
|
2014
|
+
if (!isAcceptedValue(value)) return invalidRule(this, context);
|
|
2015
|
+
return VALID_RULE;
|
|
2016
|
+
}
|
|
2017
|
+
};
|
|
2018
|
+
/**
|
|
2019
|
+
* Accepted if another field is present
|
|
2020
|
+
*/
|
|
2021
|
+
const acceptedIfPresentRule = {
|
|
2022
|
+
name: "acceptedIfPresent",
|
|
2023
|
+
description: "The field must be accepted if :field is present",
|
|
2024
|
+
defaultErrorMessage: "The :input must be accepted",
|
|
2025
|
+
async validate(value, context) {
|
|
2026
|
+
const fieldValue = getFieldValue(this, context);
|
|
2027
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
2028
|
+
if (fieldValue === void 0) return invalidRule(this, context);
|
|
2029
|
+
if (!isAcceptedValue(value)) return invalidRule(this, context);
|
|
2030
|
+
return VALID_RULE;
|
|
2031
|
+
}
|
|
2032
|
+
};
|
|
2033
|
+
/**
|
|
2034
|
+
* Accepted if another field is missing
|
|
2035
|
+
*/
|
|
2036
|
+
const acceptedWithoutRule = {
|
|
2037
|
+
name: "acceptedWithout",
|
|
2038
|
+
description: "The field must be accepted if :field is missing",
|
|
2039
|
+
defaultErrorMessage: "The :input must be accepted",
|
|
2040
|
+
async validate(value, context) {
|
|
2041
|
+
const fieldValue = getFieldValue(this, context);
|
|
2042
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
2043
|
+
if (fieldValue !== void 0) return invalidRule(this, context);
|
|
2044
|
+
if (!isAcceptedValue(value)) return invalidRule(this, context);
|
|
2045
|
+
return VALID_RULE;
|
|
2046
|
+
}
|
|
2047
|
+
};
|
|
2048
|
+
|
|
2049
|
+
//#endregion
|
|
2050
|
+
//#region ../seal/src/rules/scalar/declined-rule.ts
|
|
2051
|
+
/**
|
|
2052
|
+
* The full set of values treated as "declined" by `declinedRule` and its
|
|
2053
|
+
* conditional variants. Shared with `formBooleanMutator` (see
|
|
2054
|
+
* `../../mutators/boolean-mutators`) so `v.boolean().declined()` recognizes
|
|
2055
|
+
* exactly this list — single source of truth, no duplicated literals.
|
|
2056
|
+
*/
|
|
2057
|
+
const DECLINED_VALUES = [
|
|
2058
|
+
"0",
|
|
2059
|
+
"false",
|
|
2060
|
+
"no",
|
|
2061
|
+
"n",
|
|
2062
|
+
"off",
|
|
2063
|
+
0,
|
|
2064
|
+
false,
|
|
2065
|
+
"No",
|
|
2066
|
+
"N",
|
|
2067
|
+
"Off"
|
|
2068
|
+
];
|
|
2069
|
+
const isDeclinedValue = (value) => {
|
|
2070
|
+
return DECLINED_VALUES.includes(value);
|
|
2071
|
+
};
|
|
2072
|
+
/**
|
|
2073
|
+
* Validate value as declined if it equals:
|
|
2074
|
+
* 0 | "0" | false | "false" | "no" | "n" | "off" | 0 | false | "No" | "N" | "Off"
|
|
2075
|
+
*/
|
|
2076
|
+
const declinedRule = {
|
|
2077
|
+
name: "declined",
|
|
2078
|
+
defaultErrorMessage: "The :input must be declined",
|
|
2079
|
+
description: "The value must be declined if it equals: 0 | '0' | false | 'false' | 'no' | 'n' | 'off' | 0 | false | 'No' | 'N' | 'Off'",
|
|
2080
|
+
async validate(value, context) {
|
|
2081
|
+
if (isDeclinedValue(value)) return VALID_RULE;
|
|
2082
|
+
return invalidRule(this, context);
|
|
2083
|
+
}
|
|
2084
|
+
};
|
|
2085
|
+
/**
|
|
2086
|
+
* Declined value if another field's value equals to a specific value
|
|
2087
|
+
*/
|
|
2088
|
+
const declinedIfRule = {
|
|
2089
|
+
name: "declinedIf",
|
|
2090
|
+
description: "The field must be declined if :field's value equals to :value",
|
|
2091
|
+
defaultErrorMessage: "The :input must be declined",
|
|
2092
|
+
async validate(value, context) {
|
|
2093
|
+
const fieldValue = getFieldValue(this, context);
|
|
2094
|
+
const { value: expectedValue } = this.context.options;
|
|
2095
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
2096
|
+
this.context.translatableParams.value = this.context.options.value;
|
|
2097
|
+
if (fieldValue !== expectedValue) return invalidRule(this, context);
|
|
2098
|
+
if (!isDeclinedValue(value)) return invalidRule(this, context);
|
|
2099
|
+
return VALID_RULE;
|
|
2100
|
+
}
|
|
2101
|
+
};
|
|
2102
|
+
/**
|
|
2103
|
+
* Declined if another field is not equal to the given value
|
|
2104
|
+
*/
|
|
2105
|
+
const declinedUnlessRule = {
|
|
2106
|
+
name: "declinedUnless",
|
|
2107
|
+
description: "The field must be declined if :field's value is not equal to :value",
|
|
2108
|
+
defaultErrorMessage: "The :input must be declined",
|
|
2109
|
+
async validate(value, context) {
|
|
2110
|
+
const fieldValue = getFieldValue(this, context);
|
|
2111
|
+
const { value: expectedValue } = this.context.options;
|
|
2112
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
2113
|
+
this.context.translatableParams.value = this.context.options.value;
|
|
2114
|
+
if (fieldValue === expectedValue) return invalidRule(this, context);
|
|
2115
|
+
if (!isDeclinedValue(value)) return invalidRule(this, context);
|
|
2116
|
+
return VALID_RULE;
|
|
2117
|
+
}
|
|
2118
|
+
};
|
|
2119
|
+
/**
|
|
2120
|
+
* Declined if another field is required
|
|
2121
|
+
*/
|
|
2122
|
+
const declinedIfRequiredRule = {
|
|
2123
|
+
name: "declinedIfRequired",
|
|
2124
|
+
description: "The field must be declined if :field is required",
|
|
2125
|
+
defaultErrorMessage: "The :input must be declined",
|
|
2126
|
+
async validate(value, context) {
|
|
2127
|
+
const fieldValue = getFieldValue(this, context);
|
|
2128
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
2129
|
+
if (isEmptyValue(fieldValue)) return invalidRule(this, context);
|
|
2130
|
+
if (!isDeclinedValue(value)) return invalidRule(this, context);
|
|
2131
|
+
return VALID_RULE;
|
|
2132
|
+
}
|
|
2133
|
+
};
|
|
2134
|
+
/**
|
|
2135
|
+
* Declined if another field is present
|
|
2136
|
+
*/
|
|
2137
|
+
const declinedIfPresentRule = {
|
|
2138
|
+
name: "declinedIfPresent",
|
|
2139
|
+
description: "The field must be declined if :field is present",
|
|
2140
|
+
defaultErrorMessage: "The :input must be declined",
|
|
2141
|
+
async validate(value, context) {
|
|
2142
|
+
const fieldValue = getFieldValue(this, context);
|
|
2143
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
2144
|
+
if (fieldValue === void 0) return invalidRule(this, context);
|
|
2145
|
+
if (!isDeclinedValue(value)) return invalidRule(this, context);
|
|
2146
|
+
return VALID_RULE;
|
|
2147
|
+
}
|
|
2148
|
+
};
|
|
2149
|
+
/**
|
|
2150
|
+
* Declined if another field is missing
|
|
2151
|
+
*/
|
|
2152
|
+
const declinedWithoutRule = {
|
|
2153
|
+
name: "declinedWithout",
|
|
2154
|
+
description: "The field must be declined if :field is missing",
|
|
2155
|
+
defaultErrorMessage: "The :input must be declined",
|
|
2156
|
+
async validate(value, context) {
|
|
2157
|
+
const fieldValue = getFieldValue(this, context);
|
|
2158
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
2159
|
+
if (fieldValue !== void 0) return invalidRule(this, context);
|
|
2160
|
+
if (!isDeclinedValue(value)) return invalidRule(this, context);
|
|
2161
|
+
return VALID_RULE;
|
|
2162
|
+
}
|
|
2163
|
+
};
|
|
2164
|
+
|
|
2165
|
+
//#endregion
|
|
2166
|
+
//#region ../seal/src/mutators/boolean-mutators.ts
|
|
2167
|
+
/**
|
|
2168
|
+
* Coerce a query-string-shaped boolean into a real boolean.
|
|
2169
|
+
*
|
|
2170
|
+
* Converts exactly: `"true"` / `"1"` / `1` → `true`, `"false"` / `"0"` / `0` → `false`.
|
|
2171
|
+
* Case-sensitive, no trimming. Any other value (`"yes"`, `"on"`, `"TRUE"`, `""`,
|
|
2172
|
+
* `2`, `null`, etc.) passes through unchanged so the boolean type rule rejects it.
|
|
2173
|
+
*/
|
|
2174
|
+
const booleanCoerceMutator = async (value) => {
|
|
2175
|
+
if (value === "true" || value === "1" || value === 1) return true;
|
|
2176
|
+
if (value === "false" || value === "0" || value === 0) return false;
|
|
2177
|
+
return value;
|
|
2178
|
+
};
|
|
2179
|
+
/**
|
|
2180
|
+
* Parse form-shaped boolean values into a real boolean, ahead of the type
|
|
2181
|
+
* rule.
|
|
2182
|
+
*
|
|
2183
|
+
* Opted into by calling any `accepted*`/`declined*` method on
|
|
2184
|
+
* `v.boolean()` (see `BooleanValidator`'s `withFormBooleanMutator`). Converts
|
|
2185
|
+
* every value in `ACCEPTED_VALUES` (`1`, `"1"`, `true`, `"true"`, `"yes"`,
|
|
2186
|
+
* `"y"`, `"on"`, `"Yes"`, `"Y"`, `"On"`) to `true`, and every value in
|
|
2187
|
+
* `DECLINED_VALUES` (`0`, `"0"`, `false`, `"false"`, `"no"`, `"n"`, `"off"`,
|
|
2188
|
+
* `"No"`, `"N"`, `"Off"`) to `false`. Any other value passes through
|
|
2189
|
+
* unchanged so the boolean type rule still rejects it.
|
|
2190
|
+
*
|
|
2191
|
+
* Named (not anonymous) so callers can detect whether it has already been
|
|
2192
|
+
* added — see the idempotence check in `BooleanValidator`.
|
|
2193
|
+
*/
|
|
2194
|
+
const formBooleanMutator = async (value) => {
|
|
2195
|
+
if (ACCEPTED_VALUES.includes(value)) return true;
|
|
2196
|
+
if (DECLINED_VALUES.includes(value)) return false;
|
|
2197
|
+
return value;
|
|
2198
|
+
};
|
|
2199
|
+
|
|
1891
2200
|
//#endregion
|
|
1892
2201
|
//#region ../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/dayjs.min.js
|
|
1893
2202
|
var require_dayjs_min = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
@@ -2188,7 +2497,7 @@ var require_dayjs_min = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
2188
2497
|
}));
|
|
2189
2498
|
|
|
2190
2499
|
//#endregion
|
|
2191
|
-
//#region ../
|
|
2500
|
+
//#region ../seal/src/mutators/date-mutators.ts
|
|
2192
2501
|
var import_dayjs_min = /* @__PURE__ */ require_chunk.__toESM(require_dayjs_min(), 1);
|
|
2193
2502
|
/**
|
|
2194
2503
|
* Convert value to Date object
|
|
@@ -2277,7 +2586,7 @@ const toEndOfYearMutator = async (value) => {
|
|
|
2277
2586
|
};
|
|
2278
2587
|
|
|
2279
2588
|
//#endregion
|
|
2280
|
-
//#region ../
|
|
2589
|
+
//#region ../seal/src/mutators/number-mutators.ts
|
|
2281
2590
|
/** Convert value to number */
|
|
2282
2591
|
const numberMutator = async (value) => {
|
|
2283
2592
|
if (!value) return value;
|
|
@@ -2323,7 +2632,7 @@ const toFixedMutator = async (value, context) => {
|
|
|
2323
2632
|
};
|
|
2324
2633
|
|
|
2325
2634
|
//#endregion
|
|
2326
|
-
//#region ../
|
|
2635
|
+
//#region ../seal/src/mutators/object-mutators.ts
|
|
2327
2636
|
/** Strip unknown keys from object */
|
|
2328
2637
|
const stripUnknownMutator = async (value, context) => {
|
|
2329
2638
|
const allowedKeys = [...context?.ctx.schema ? Object.keys(context.ctx.schema) : [], ...context?.options.allowedKeys ?? []];
|
|
@@ -2347,14 +2656,14 @@ const objectTrimMutator = async (value, context) => {
|
|
|
2347
2656
|
};
|
|
2348
2657
|
|
|
2349
2658
|
//#endregion
|
|
2350
|
-
//#region ../
|
|
2659
|
+
//#region ../seal/src/mutators/scalar-mutators.ts
|
|
2351
2660
|
const stringMutator = async (value) => {
|
|
2352
2661
|
if ([void 0, null].includes(value)) return value;
|
|
2353
2662
|
return String(value);
|
|
2354
2663
|
};
|
|
2355
2664
|
|
|
2356
2665
|
//#endregion
|
|
2357
|
-
//#region ../
|
|
2666
|
+
//#region ../seal/src/mutators/string-mutators.ts
|
|
2358
2667
|
/** Convert string to lowercase */
|
|
2359
2668
|
const lowercaseMutator = async (value) => {
|
|
2360
2669
|
return value?.toString().toLowerCase();
|
|
@@ -2527,7 +2836,7 @@ const removeNumbersMutator = async (value) => {
|
|
|
2527
2836
|
};
|
|
2528
2837
|
|
|
2529
2838
|
//#endregion
|
|
2530
|
-
//#region ../
|
|
2839
|
+
//#region ../seal/src/rules/core/equal.ts
|
|
2531
2840
|
/**
|
|
2532
2841
|
* Equal rule - value must be equal to a specific value
|
|
2533
2842
|
*/
|
|
@@ -2544,7 +2853,7 @@ const equalRule = {
|
|
|
2544
2853
|
};
|
|
2545
2854
|
|
|
2546
2855
|
//#endregion
|
|
2547
|
-
//#region ../
|
|
2856
|
+
//#region ../seal/src/rules/core/forbidden.ts
|
|
2548
2857
|
/**
|
|
2549
2858
|
* Forbidden rule - value must not be present
|
|
2550
2859
|
*/
|
|
@@ -2558,7 +2867,7 @@ const forbiddenRule = {
|
|
|
2558
2867
|
};
|
|
2559
2868
|
|
|
2560
2869
|
//#endregion
|
|
2561
|
-
//#region ../
|
|
2870
|
+
//#region ../seal/src/rules/core/union.ts
|
|
2562
2871
|
/**
|
|
2563
2872
|
* Union rule - value must match at least one of the provided validators
|
|
2564
2873
|
*/
|
|
@@ -2583,7 +2892,7 @@ const unionRule = {
|
|
|
2583
2892
|
};
|
|
2584
2893
|
|
|
2585
2894
|
//#endregion
|
|
2586
|
-
//#region ../
|
|
2895
|
+
//#region ../seal/src/rules/core/when.ts
|
|
2587
2896
|
/**
|
|
2588
2897
|
* When rule - conditional validation based on another field value
|
|
2589
2898
|
*/
|
|
@@ -2613,7 +2922,7 @@ const whenRule = {
|
|
|
2613
2922
|
};
|
|
2614
2923
|
|
|
2615
2924
|
//#endregion
|
|
2616
|
-
//#region ../
|
|
2925
|
+
//#region ../seal/src/rules/string/alpha.ts
|
|
2617
2926
|
/**
|
|
2618
2927
|
* Alpha rule - allows only alphabetic characters
|
|
2619
2928
|
*/
|
|
@@ -2649,7 +2958,7 @@ const isNumericRule = {
|
|
|
2649
2958
|
};
|
|
2650
2959
|
|
|
2651
2960
|
//#endregion
|
|
2652
|
-
//#region ../
|
|
2961
|
+
//#region ../seal/src/rules/string/credit-card.ts
|
|
2653
2962
|
/**
|
|
2654
2963
|
* Credit card rule - validates credit card number
|
|
2655
2964
|
*/
|
|
@@ -2662,7 +2971,7 @@ const isCreditCardRule = {
|
|
|
2662
2971
|
let sum = 0;
|
|
2663
2972
|
let isEven = false;
|
|
2664
2973
|
for (let i = cardNumber.length - 1; i >= 0; i--) {
|
|
2665
|
-
let digit = parseInt(cardNumber
|
|
2974
|
+
let digit = parseInt(cardNumber.charAt(i), 10);
|
|
2666
2975
|
if (isEven) {
|
|
2667
2976
|
digit *= 2;
|
|
2668
2977
|
if (digit > 9) digit -= 9;
|
|
@@ -2676,7 +2985,7 @@ const isCreditCardRule = {
|
|
|
2676
2985
|
};
|
|
2677
2986
|
|
|
2678
2987
|
//#endregion
|
|
2679
|
-
//#region ../
|
|
2988
|
+
//#region ../seal/src/rules/string/email.ts
|
|
2680
2989
|
/**
|
|
2681
2990
|
* Email rule - validates email format
|
|
2682
2991
|
*/
|
|
@@ -2690,7 +2999,7 @@ const emailRule = {
|
|
|
2690
2999
|
};
|
|
2691
3000
|
|
|
2692
3001
|
//#endregion
|
|
2693
|
-
//#region ../
|
|
3002
|
+
//#region ../seal/src/rules/string/id-formats.ts
|
|
2694
3003
|
/**
|
|
2695
3004
|
* Modern ID format validators — UUID, CUID, ULID, nanoid.
|
|
2696
3005
|
*
|
|
@@ -2789,7 +3098,7 @@ const nanoidRule = {
|
|
|
2789
3098
|
};
|
|
2790
3099
|
|
|
2791
3100
|
//#endregion
|
|
2792
|
-
//#region ../
|
|
3101
|
+
//#region ../seal/src/rules/string/ip.ts
|
|
2793
3102
|
/**
|
|
2794
3103
|
* Pure, dependency-free re-implementation of Node's `net.isIP`/`isIPv4`/`isIPv6`.
|
|
2795
3104
|
* Mirrors the exact regex Node uses internally (lib/internal/net.js) so that
|
|
@@ -2850,7 +3159,7 @@ const ip6Rule = {
|
|
|
2850
3159
|
};
|
|
2851
3160
|
|
|
2852
3161
|
//#endregion
|
|
2853
|
-
//#region ../
|
|
3162
|
+
//#region ../seal/src/rules/string/pattern.ts
|
|
2854
3163
|
/**
|
|
2855
3164
|
* Pattern rule - validates against regex pattern
|
|
2856
3165
|
*/
|
|
@@ -2865,7 +3174,7 @@ const patternRule = {
|
|
|
2865
3174
|
};
|
|
2866
3175
|
|
|
2867
3176
|
//#endregion
|
|
2868
|
-
//#region ../
|
|
3177
|
+
//#region ../seal/src/rules/string/string-comparison.ts
|
|
2869
3178
|
/**
|
|
2870
3179
|
* Starts with rule
|
|
2871
3180
|
*/
|
|
@@ -2916,7 +3225,7 @@ const notContainsRule = {
|
|
|
2916
3225
|
};
|
|
2917
3226
|
|
|
2918
3227
|
//#endregion
|
|
2919
|
-
//#region ../
|
|
3228
|
+
//#region ../seal/src/rules/string/strong-password-rule.ts
|
|
2920
3229
|
/**
|
|
2921
3230
|
* Strong Password rule - validates password strength
|
|
2922
3231
|
* Requirements:
|
|
@@ -2942,7 +3251,7 @@ const strongPasswordRule = {
|
|
|
2942
3251
|
};
|
|
2943
3252
|
|
|
2944
3253
|
//#endregion
|
|
2945
|
-
//#region ../
|
|
3254
|
+
//#region ../seal/src/rules/string/url.ts
|
|
2946
3255
|
/**
|
|
2947
3256
|
* URL rule - validates URL format
|
|
2948
3257
|
*/
|
|
@@ -2960,7 +3269,7 @@ const urlRule = {
|
|
|
2960
3269
|
};
|
|
2961
3270
|
|
|
2962
3271
|
//#endregion
|
|
2963
|
-
//#region ../
|
|
3272
|
+
//#region ../seal/src/rules/string/without-whitespace.ts
|
|
2964
3273
|
/**
|
|
2965
3274
|
* Without whitespace rule - value must not contain whitespace
|
|
2966
3275
|
*/
|
|
@@ -2974,7 +3283,7 @@ const withoutWhitespaceRule = {
|
|
|
2974
3283
|
};
|
|
2975
3284
|
|
|
2976
3285
|
//#endregion
|
|
2977
|
-
//#region ../
|
|
3286
|
+
//#region ../seal/src/rules/number/number-rules.ts
|
|
2978
3287
|
/**
|
|
2979
3288
|
* Min rule - value must be equal or greater than minimum
|
|
2980
3289
|
* Supports field names with sibling scope
|
|
@@ -3164,7 +3473,7 @@ const betweenNumbersRule = {
|
|
|
3164
3473
|
};
|
|
3165
3474
|
|
|
3166
3475
|
//#endregion
|
|
3167
|
-
//#region ../
|
|
3476
|
+
//#region ../seal/src/rules/length/length-rules.ts
|
|
3168
3477
|
/**
|
|
3169
3478
|
* Min length rule - validates minimum length
|
|
3170
3479
|
* Works for any value with a length property (strings, arrays, etc.)
|
|
@@ -3257,7 +3566,7 @@ const wordsRule = {
|
|
|
3257
3566
|
};
|
|
3258
3567
|
|
|
3259
3568
|
//#endregion
|
|
3260
|
-
//#region ../
|
|
3569
|
+
//#region ../seal/src/rules/array/array-rules.ts
|
|
3261
3570
|
/**
|
|
3262
3571
|
* Unique array rule - array must contain unique values
|
|
3263
3572
|
*/
|
|
@@ -3293,7 +3602,7 @@ const sortedArrayRule = {
|
|
|
3293
3602
|
};
|
|
3294
3603
|
|
|
3295
3604
|
//#endregion
|
|
3296
|
-
//#region ../
|
|
3605
|
+
//#region ../seal/src/types/date-types.ts
|
|
3297
3606
|
/**
|
|
3298
3607
|
* Week day numbers mapping
|
|
3299
3608
|
*/
|
|
@@ -3308,7 +3617,7 @@ const WEEK_DAYS = {
|
|
|
3308
3617
|
};
|
|
3309
3618
|
|
|
3310
3619
|
//#endregion
|
|
3311
|
-
//#region ../
|
|
3620
|
+
//#region ../seal/src/rules/date/date.ts
|
|
3312
3621
|
/**
|
|
3313
3622
|
* Date rule - validates date format
|
|
3314
3623
|
*/
|
|
@@ -3534,7 +3843,7 @@ const weekDayRule = {
|
|
|
3534
3843
|
};
|
|
3535
3844
|
|
|
3536
3845
|
//#endregion
|
|
3537
|
-
//#region ../
|
|
3846
|
+
//#region ../seal/src/rules/date/date-comparison-rules.ts
|
|
3538
3847
|
/**
|
|
3539
3848
|
* Between dates rule - date must be between start and end dates
|
|
3540
3849
|
*/
|
|
@@ -3607,7 +3916,7 @@ const afterTodayRule = {
|
|
|
3607
3916
|
};
|
|
3608
3917
|
|
|
3609
3918
|
//#endregion
|
|
3610
|
-
//#region ../
|
|
3919
|
+
//#region ../seal/src/rules/date/date-day-rules.ts
|
|
3611
3920
|
/**
|
|
3612
3921
|
* Weekend rule - date must be Saturday or Sunday
|
|
3613
3922
|
*/
|
|
@@ -3650,7 +3959,7 @@ const businessDayRule = {
|
|
|
3650
3959
|
};
|
|
3651
3960
|
|
|
3652
3961
|
//#endregion
|
|
3653
|
-
//#region ../
|
|
3962
|
+
//#region ../seal/src/rules/date/date-field-comparison-rules.ts
|
|
3654
3963
|
/**
|
|
3655
3964
|
* Before field rule - date must be < given date or field
|
|
3656
3965
|
* Smart detection: date value or field name
|
|
@@ -3724,7 +4033,7 @@ const sameAsFieldDateRule = {
|
|
|
3724
4033
|
};
|
|
3725
4034
|
|
|
3726
4035
|
//#endregion
|
|
3727
|
-
//#region ../
|
|
4036
|
+
//#region ../seal/src/rules/date/date-period-rules.ts
|
|
3728
4037
|
const MONTHS = {
|
|
3729
4038
|
1: "january",
|
|
3730
4039
|
2: "february",
|
|
@@ -3919,8 +4228,10 @@ const betweenTimesRule = {
|
|
|
3919
4228
|
const inputTimeInMinutes = inputHour * 60 + inputMinute;
|
|
3920
4229
|
const { startTime, endTime } = this.context.options;
|
|
3921
4230
|
const [startHour, startMinute] = startTime.split(":").map(Number);
|
|
4231
|
+
if (startHour === void 0 || startMinute === void 0) return invalidRule(this, context);
|
|
3922
4232
|
const startTimeInMinutes = startHour * 60 + startMinute;
|
|
3923
4233
|
const [endHour, endMinute] = endTime.split(":").map(Number);
|
|
4234
|
+
if (endHour === void 0 || endMinute === void 0) return invalidRule(this, context);
|
|
3924
4235
|
const endTimeInMinutes = endHour * 60 + endMinute;
|
|
3925
4236
|
if (inputTimeInMinutes >= startTimeInMinutes && inputTimeInMinutes <= endTimeInMinutes) return VALID_RULE;
|
|
3926
4237
|
this.context.translationParams.startTime = startTime;
|
|
@@ -4116,7 +4427,7 @@ const maxDayRule = {
|
|
|
4116
4427
|
};
|
|
4117
4428
|
|
|
4118
4429
|
//#endregion
|
|
4119
|
-
//#region ../
|
|
4430
|
+
//#region ../seal/src/rules/date/date-relative-rules.ts
|
|
4120
4431
|
/**
|
|
4121
4432
|
* Within days rule - date must be within X days from now (past or future)
|
|
4122
4433
|
*/
|
|
@@ -4166,7 +4477,7 @@ const withinFutureDaysRule = {
|
|
|
4166
4477
|
};
|
|
4167
4478
|
|
|
4168
4479
|
//#endregion
|
|
4169
|
-
//#region ../
|
|
4480
|
+
//#region ../seal/src/rules/date/date-special-rules.ts
|
|
4170
4481
|
/**
|
|
4171
4482
|
* Birthday rule - valid birthday (not in future, reasonable age)
|
|
4172
4483
|
*/
|
|
@@ -4219,7 +4530,7 @@ const leapYearRule = {
|
|
|
4219
4530
|
};
|
|
4220
4531
|
|
|
4221
4532
|
//#endregion
|
|
4222
|
-
//#region ../
|
|
4533
|
+
//#region ../seal/src/rules/color/color-rules.ts
|
|
4223
4534
|
/**
|
|
4224
4535
|
* Color validation regex patterns
|
|
4225
4536
|
*/
|
|
@@ -4318,7 +4629,7 @@ const darkColorRule = {
|
|
|
4318
4629
|
};
|
|
4319
4630
|
|
|
4320
4631
|
//#endregion
|
|
4321
|
-
//#region ../
|
|
4632
|
+
//#region ../seal/src/rules/conditional/required-if-rules.ts
|
|
4322
4633
|
/**
|
|
4323
4634
|
* Required if rule - field is required if another field equals a specific value
|
|
4324
4635
|
* Supports both global and sibling scope
|
|
@@ -4513,7 +4824,7 @@ const requiredIfAnyNotEmptyRule = {
|
|
|
4513
4824
|
};
|
|
4514
4825
|
|
|
4515
4826
|
//#endregion
|
|
4516
|
-
//#region ../
|
|
4827
|
+
//#region ../seal/src/rules/conditional/required-unless-rules.ts
|
|
4517
4828
|
/**
|
|
4518
4829
|
* Required unless rule - field is required unless another field equals a specific value
|
|
4519
4830
|
* Supports both global and sibling scope
|
|
@@ -4537,7 +4848,7 @@ const requiredUnlessRule = {
|
|
|
4537
4848
|
};
|
|
4538
4849
|
|
|
4539
4850
|
//#endregion
|
|
4540
|
-
//#region ../
|
|
4851
|
+
//#region ../seal/src/rules/conditional/required-when-rule.ts
|
|
4541
4852
|
/**
|
|
4542
4853
|
* Required when callback returns true.
|
|
4543
4854
|
*
|
|
@@ -4563,7 +4874,7 @@ const requiredWhenRule = {
|
|
|
4563
4874
|
};
|
|
4564
4875
|
|
|
4565
4876
|
//#endregion
|
|
4566
|
-
//#region ../
|
|
4877
|
+
//#region ../seal/src/rules/conditional/required-with-rules.ts
|
|
4567
4878
|
/**
|
|
4568
4879
|
* Required with rule - field is required if another field is present
|
|
4569
4880
|
* Supports both global and sibling scope
|
|
@@ -4621,7 +4932,7 @@ const requiredWithAnyRule = {
|
|
|
4621
4932
|
};
|
|
4622
4933
|
|
|
4623
4934
|
//#endregion
|
|
4624
|
-
//#region ../
|
|
4935
|
+
//#region ../seal/src/rules/conditional/required-without-rules.ts
|
|
4625
4936
|
/**
|
|
4626
4937
|
* Required without rule - field is required if another field is missing
|
|
4627
4938
|
* Supports both global and sibling scope
|
|
@@ -4679,7 +4990,7 @@ const requiredWithoutAnyRule = {
|
|
|
4679
4990
|
};
|
|
4680
4991
|
|
|
4681
4992
|
//#endregion
|
|
4682
|
-
//#region ../
|
|
4993
|
+
//#region ../seal/src/rules/conditional/present-if-rules.ts
|
|
4683
4994
|
/**
|
|
4684
4995
|
* Present if rule - field must be present if another field equals a specific value
|
|
4685
4996
|
* Supports both global and sibling scope
|
|
@@ -4769,7 +5080,7 @@ const presentIfNotInRule = {
|
|
|
4769
5080
|
};
|
|
4770
5081
|
|
|
4771
5082
|
//#endregion
|
|
4772
|
-
//#region ../
|
|
5083
|
+
//#region ../seal/src/rules/conditional/present-unless-rules.ts
|
|
4773
5084
|
/**
|
|
4774
5085
|
* Present unless rule - field must be present unless another field equals a specific value
|
|
4775
5086
|
* Supports both global and sibling scope
|
|
@@ -4793,7 +5104,7 @@ const presentUnlessRule = {
|
|
|
4793
5104
|
};
|
|
4794
5105
|
|
|
4795
5106
|
//#endregion
|
|
4796
|
-
//#region ../
|
|
5107
|
+
//#region ../seal/src/rules/conditional/present-with-rules.ts
|
|
4797
5108
|
/**
|
|
4798
5109
|
* Present with rule - field must be present if another field is present
|
|
4799
5110
|
* Supports both global and sibling scope
|
|
@@ -4861,7 +5172,7 @@ const presentWithAnyRule = {
|
|
|
4861
5172
|
};
|
|
4862
5173
|
|
|
4863
5174
|
//#endregion
|
|
4864
|
-
//#region ../
|
|
5175
|
+
//#region ../seal/src/rules/conditional/present-without-rules.ts
|
|
4865
5176
|
/**
|
|
4866
5177
|
* Present without rule - field must be present if another field is missing
|
|
4867
5178
|
* Supports both global and sibling scope
|
|
@@ -4929,7 +5240,7 @@ const presentWithoutAnyRule = {
|
|
|
4929
5240
|
};
|
|
4930
5241
|
|
|
4931
5242
|
//#endregion
|
|
4932
|
-
//#region ../
|
|
5243
|
+
//#region ../seal/src/rules/conditional/forbidden-if-rules.ts
|
|
4933
5244
|
/**
|
|
4934
5245
|
* Forbidden if rule - field is forbidden if another field equals a specific value
|
|
4935
5246
|
* Supports both global and sibling scope
|
|
@@ -5038,7 +5349,7 @@ const forbiddenIfNotInRule = {
|
|
|
5038
5349
|
};
|
|
5039
5350
|
|
|
5040
5351
|
//#endregion
|
|
5041
|
-
//#region ../
|
|
5352
|
+
//#region ../seal/src/rules/common/enum.ts
|
|
5042
5353
|
/**
|
|
5043
5354
|
* Enum rule - value must be one of the enum values
|
|
5044
5355
|
*/
|
|
@@ -5110,7 +5421,7 @@ const notAllowedValuesRule = {
|
|
|
5110
5421
|
};
|
|
5111
5422
|
|
|
5112
5423
|
//#endregion
|
|
5113
|
-
//#region ../
|
|
5424
|
+
//#region ../seal/src/rules/common/equals-field-rules.ts
|
|
5114
5425
|
/**
|
|
5115
5426
|
* Equals field rule - value must equal another field's value
|
|
5116
5427
|
* Supports both global and sibling scope
|
|
@@ -5146,7 +5457,7 @@ const notEqualsFieldRule = {
|
|
|
5146
5457
|
};
|
|
5147
5458
|
|
|
5148
5459
|
//#endregion
|
|
5149
|
-
//#region ../
|
|
5460
|
+
//#region ../seal/src/rules/common/instanceof.ts
|
|
5150
5461
|
/**
|
|
5151
5462
|
* InstanceOf rule - value must be an instance of the given constructor.
|
|
5152
5463
|
*
|
|
@@ -5164,7 +5475,7 @@ const instanceofRule = {
|
|
|
5164
5475
|
};
|
|
5165
5476
|
|
|
5166
5477
|
//#endregion
|
|
5167
|
-
//#region ../
|
|
5478
|
+
//#region ../seal/src/rules/common/literal.ts
|
|
5168
5479
|
/**
|
|
5169
5480
|
* Literal rule - value must be strictly equal to one of the literal values.
|
|
5170
5481
|
*
|
|
@@ -5190,7 +5501,7 @@ const literalRule = {
|
|
|
5190
5501
|
};
|
|
5191
5502
|
|
|
5192
5503
|
//#endregion
|
|
5193
|
-
//#region ../
|
|
5504
|
+
//#region ../seal/src/rules/common/type-rules.ts
|
|
5194
5505
|
/**
|
|
5195
5506
|
* String rule - validates string type
|
|
5196
5507
|
*/
|
|
@@ -5281,7 +5592,7 @@ const arrayRule = {
|
|
|
5281
5592
|
};
|
|
5282
5593
|
|
|
5283
5594
|
//#endregion
|
|
5284
|
-
//#region ../
|
|
5595
|
+
//#region ../seal/src/rules/common/unknown-key.ts
|
|
5285
5596
|
/**
|
|
5286
5597
|
* Unknown key rule - validates that object doesn't have unknown keys
|
|
5287
5598
|
*/
|
|
@@ -5301,11 +5612,12 @@ const unknownKeyRule = {
|
|
|
5301
5612
|
};
|
|
5302
5613
|
|
|
5303
5614
|
//#endregion
|
|
5304
|
-
//#region ../
|
|
5615
|
+
//#region ../seal/src/validators/array-validator.ts
|
|
5305
5616
|
/**
|
|
5306
5617
|
* Array validator class
|
|
5307
5618
|
*/
|
|
5308
5619
|
var ArrayValidator = class extends BaseValidator {
|
|
5620
|
+
validator;
|
|
5309
5621
|
constructor(validator, errorMessage) {
|
|
5310
5622
|
super();
|
|
5311
5623
|
this.validator = validator;
|
|
@@ -5464,7 +5776,7 @@ var ArrayValidator = class extends BaseValidator {
|
|
|
5464
5776
|
};
|
|
5465
5777
|
|
|
5466
5778
|
//#endregion
|
|
5467
|
-
//#region ../
|
|
5779
|
+
//#region ../seal/src/validators/methods/equality-conditional-methods.ts
|
|
5468
5780
|
/**
|
|
5469
5781
|
* Value must be equal to the given value
|
|
5470
5782
|
*/
|
|
@@ -5585,7 +5897,7 @@ BaseValidator.prototype.whenSibling = function(siblingField, options) {
|
|
|
5585
5897
|
};
|
|
5586
5898
|
|
|
5587
5899
|
//#endregion
|
|
5588
|
-
//#region ../
|
|
5900
|
+
//#region ../seal/src/validators/methods/forbidden-methods.ts
|
|
5589
5901
|
/**
|
|
5590
5902
|
* Value is forbidden to be present
|
|
5591
5903
|
*/
|
|
@@ -5710,7 +6022,7 @@ BaseValidator.prototype.forbiddenIfNotInSibling = function(field, values, errorM
|
|
|
5710
6022
|
};
|
|
5711
6023
|
|
|
5712
6024
|
//#endregion
|
|
5713
|
-
//#region ../
|
|
6025
|
+
//#region ../seal/src/validators/methods/present-methods.ts
|
|
5714
6026
|
/**
|
|
5715
6027
|
* Field must be present if another field exists
|
|
5716
6028
|
*/
|
|
@@ -5937,7 +6249,7 @@ BaseValidator.prototype.presentWithoutAnySiblings = function(fields, errorMessag
|
|
|
5937
6249
|
};
|
|
5938
6250
|
|
|
5939
6251
|
//#endregion
|
|
5940
|
-
//#region ../
|
|
6252
|
+
//#region ../seal/src/validators/methods/required-methods.ts
|
|
5941
6253
|
/**
|
|
5942
6254
|
* This value must be present and has a value
|
|
5943
6255
|
*/
|
|
@@ -6274,7 +6586,7 @@ BaseValidator.prototype.requiredWhen = function(callback, errorMessage) {
|
|
|
6274
6586
|
};
|
|
6275
6587
|
|
|
6276
6588
|
//#endregion
|
|
6277
|
-
//#region ../
|
|
6589
|
+
//#region ../seal/src/validators/primitive-validator.ts
|
|
6278
6590
|
/**
|
|
6279
6591
|
* Abstract base validator for primitive-typed fields (string, number, boolean).
|
|
6280
6592
|
*
|
|
@@ -6357,225 +6669,7 @@ var PrimitiveValidator = class extends BaseValidator {
|
|
|
6357
6669
|
};
|
|
6358
6670
|
|
|
6359
6671
|
//#endregion
|
|
6360
|
-
//#region ../
|
|
6361
|
-
const isAcceptedValue = (value) => {
|
|
6362
|
-
return [
|
|
6363
|
-
"1",
|
|
6364
|
-
"true",
|
|
6365
|
-
"yes",
|
|
6366
|
-
"y",
|
|
6367
|
-
"on",
|
|
6368
|
-
1,
|
|
6369
|
-
true,
|
|
6370
|
-
"Yes",
|
|
6371
|
-
"Y",
|
|
6372
|
-
"On"
|
|
6373
|
-
].includes(value);
|
|
6374
|
-
};
|
|
6375
|
-
/**
|
|
6376
|
-
* Validate value as accepted if it equals:
|
|
6377
|
-
* 1 | "1" | true | "true" | "yes" | "y" | "on"
|
|
6378
|
-
*/
|
|
6379
|
-
const acceptedRule = {
|
|
6380
|
-
name: "accepted",
|
|
6381
|
-
defaultErrorMessage: "The :input must be accepted",
|
|
6382
|
-
description: "The value must be accepted if it equals: 1 | '1' | true | 'true' | 'yes' | 'y' | 'on' | 1 | true | 'Yes' | 'Y' | 'On'",
|
|
6383
|
-
async validate(value, context) {
|
|
6384
|
-
if (isAcceptedValue(value)) return VALID_RULE;
|
|
6385
|
-
return invalidRule(this, context);
|
|
6386
|
-
}
|
|
6387
|
-
};
|
|
6388
|
-
/**
|
|
6389
|
-
* Accepted value if another field's value equals to a specific value
|
|
6390
|
-
*/
|
|
6391
|
-
const acceptedIfRule = {
|
|
6392
|
-
name: "acceptedIf",
|
|
6393
|
-
description: "The field must be accepted if :field's value equals to :value",
|
|
6394
|
-
defaultErrorMessage: "The :input must be accepted",
|
|
6395
|
-
async validate(value, context) {
|
|
6396
|
-
const fieldValue = getFieldValue(this, context);
|
|
6397
|
-
const { value: expectedValue } = this.context.options;
|
|
6398
|
-
this.context.translatableParams.field = this.context.options.field;
|
|
6399
|
-
this.context.translatableParams.value = this.context.options.value;
|
|
6400
|
-
if (fieldValue !== expectedValue) return invalidRule(this, context);
|
|
6401
|
-
if (!isAcceptedValue(value)) return invalidRule(this, context);
|
|
6402
|
-
return VALID_RULE;
|
|
6403
|
-
}
|
|
6404
|
-
};
|
|
6405
|
-
/**
|
|
6406
|
-
* Accepted if another field is not equal to the given value
|
|
6407
|
-
*/
|
|
6408
|
-
const acceptedUnlessRule = {
|
|
6409
|
-
name: "acceptedUnless",
|
|
6410
|
-
description: "The field must be accepted if :field's value is not equal to :value",
|
|
6411
|
-
defaultErrorMessage: "The :input must be accepted",
|
|
6412
|
-
async validate(value, context) {
|
|
6413
|
-
const fieldValue = getFieldValue(this, context);
|
|
6414
|
-
const { value: expectedValue } = this.context.options;
|
|
6415
|
-
this.context.translatableParams.field = this.context.options.field;
|
|
6416
|
-
this.context.translatableParams.value = this.context.options.value;
|
|
6417
|
-
if (fieldValue === expectedValue) return invalidRule(this, context);
|
|
6418
|
-
if (!isAcceptedValue(value)) return invalidRule(this, context);
|
|
6419
|
-
return VALID_RULE;
|
|
6420
|
-
}
|
|
6421
|
-
};
|
|
6422
|
-
/**
|
|
6423
|
-
* Accepted if another field is required
|
|
6424
|
-
*/
|
|
6425
|
-
const acceptedIfRequiredRule = {
|
|
6426
|
-
name: "acceptedIfRequired",
|
|
6427
|
-
description: "The field must be accepted if :field is required",
|
|
6428
|
-
defaultErrorMessage: "The :input must be accepted",
|
|
6429
|
-
async validate(value, context) {
|
|
6430
|
-
const fieldValue = getFieldValue(this, context);
|
|
6431
|
-
this.context.translatableParams.field = this.context.options.field;
|
|
6432
|
-
if (isEmptyValue(fieldValue)) return invalidRule(this, context);
|
|
6433
|
-
if (!isAcceptedValue(value)) return invalidRule(this, context);
|
|
6434
|
-
return VALID_RULE;
|
|
6435
|
-
}
|
|
6436
|
-
};
|
|
6437
|
-
/**
|
|
6438
|
-
* Accepted if another field is present
|
|
6439
|
-
*/
|
|
6440
|
-
const acceptedIfPresentRule = {
|
|
6441
|
-
name: "acceptedIfPresent",
|
|
6442
|
-
description: "The field must be accepted if :field is present",
|
|
6443
|
-
defaultErrorMessage: "The :input must be accepted",
|
|
6444
|
-
async validate(value, context) {
|
|
6445
|
-
const fieldValue = getFieldValue(this, context);
|
|
6446
|
-
this.context.translatableParams.field = this.context.options.field;
|
|
6447
|
-
if (fieldValue === void 0) return invalidRule(this, context);
|
|
6448
|
-
if (!isAcceptedValue(value)) return invalidRule(this, context);
|
|
6449
|
-
return VALID_RULE;
|
|
6450
|
-
}
|
|
6451
|
-
};
|
|
6452
|
-
/**
|
|
6453
|
-
* Accepted if another field is missing
|
|
6454
|
-
*/
|
|
6455
|
-
const acceptedWithoutRule = {
|
|
6456
|
-
name: "acceptedWithout",
|
|
6457
|
-
description: "The field must be accepted if :field is missing",
|
|
6458
|
-
defaultErrorMessage: "The :input must be accepted",
|
|
6459
|
-
async validate(value, context) {
|
|
6460
|
-
const fieldValue = getFieldValue(this, context);
|
|
6461
|
-
this.context.translatableParams.field = this.context.options.field;
|
|
6462
|
-
if (fieldValue !== void 0) return invalidRule(this, context);
|
|
6463
|
-
if (!isAcceptedValue(value)) return invalidRule(this, context);
|
|
6464
|
-
return VALID_RULE;
|
|
6465
|
-
}
|
|
6466
|
-
};
|
|
6467
|
-
|
|
6468
|
-
//#endregion
|
|
6469
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.6.0/node_modules/@warlock.js/seal/esm/rules/scalar/declined-rule.mjs
|
|
6470
|
-
const isDeclinedValue = (value) => {
|
|
6471
|
-
return [
|
|
6472
|
-
"0",
|
|
6473
|
-
"false",
|
|
6474
|
-
"no",
|
|
6475
|
-
"n",
|
|
6476
|
-
"off",
|
|
6477
|
-
0,
|
|
6478
|
-
false,
|
|
6479
|
-
"No",
|
|
6480
|
-
"N",
|
|
6481
|
-
"Off"
|
|
6482
|
-
].includes(value);
|
|
6483
|
-
};
|
|
6484
|
-
/**
|
|
6485
|
-
* Validate value as declined if it equals:
|
|
6486
|
-
* 0 | "0" | false | "false" | "no" | "n" | "off" | 0 | false | "No" | "N" | "Off"
|
|
6487
|
-
*/
|
|
6488
|
-
const declinedRule = {
|
|
6489
|
-
name: "declined",
|
|
6490
|
-
defaultErrorMessage: "The :input must be declined",
|
|
6491
|
-
description: "The value must be declined if it equals: 0 | '0' | false | 'false' | 'no' | 'n' | 'off' | 0 | false | 'No' | 'N' | 'Off'",
|
|
6492
|
-
async validate(value, context) {
|
|
6493
|
-
if (isDeclinedValue(value)) return VALID_RULE;
|
|
6494
|
-
return invalidRule(this, context);
|
|
6495
|
-
}
|
|
6496
|
-
};
|
|
6497
|
-
/**
|
|
6498
|
-
* Declined value if another field's value equals to a specific value
|
|
6499
|
-
*/
|
|
6500
|
-
const declinedIfRule = {
|
|
6501
|
-
name: "declinedIf",
|
|
6502
|
-
description: "The field must be declined if :field's value equals to :value",
|
|
6503
|
-
defaultErrorMessage: "The :input must be declined",
|
|
6504
|
-
async validate(value, context) {
|
|
6505
|
-
const fieldValue = getFieldValue(this, context);
|
|
6506
|
-
const { value: expectedValue } = this.context.options;
|
|
6507
|
-
this.context.translatableParams.field = this.context.options.field;
|
|
6508
|
-
this.context.translatableParams.value = this.context.options.value;
|
|
6509
|
-
if (fieldValue !== expectedValue) return invalidRule(this, context);
|
|
6510
|
-
if (!isDeclinedValue(value)) return invalidRule(this, context);
|
|
6511
|
-
return VALID_RULE;
|
|
6512
|
-
}
|
|
6513
|
-
};
|
|
6514
|
-
/**
|
|
6515
|
-
* Declined if another field is not equal to the given value
|
|
6516
|
-
*/
|
|
6517
|
-
const declinedUnlessRule = {
|
|
6518
|
-
name: "declinedUnless",
|
|
6519
|
-
description: "The field must be declined if :field's value is not equal to :value",
|
|
6520
|
-
defaultErrorMessage: "The :input must be declined",
|
|
6521
|
-
async validate(value, context) {
|
|
6522
|
-
const fieldValue = getFieldValue(this, context);
|
|
6523
|
-
const { value: expectedValue } = this.context.options;
|
|
6524
|
-
this.context.translatableParams.field = this.context.options.field;
|
|
6525
|
-
this.context.translatableParams.value = this.context.options.value;
|
|
6526
|
-
if (fieldValue === expectedValue) return invalidRule(this, context);
|
|
6527
|
-
if (!isDeclinedValue(value)) return invalidRule(this, context);
|
|
6528
|
-
return VALID_RULE;
|
|
6529
|
-
}
|
|
6530
|
-
};
|
|
6531
|
-
/**
|
|
6532
|
-
* Declined if another field is required
|
|
6533
|
-
*/
|
|
6534
|
-
const declinedIfRequiredRule = {
|
|
6535
|
-
name: "declinedIfRequired",
|
|
6536
|
-
description: "The field must be declined if :field is required",
|
|
6537
|
-
defaultErrorMessage: "The :input must be declined",
|
|
6538
|
-
async validate(value, context) {
|
|
6539
|
-
const fieldValue = getFieldValue(this, context);
|
|
6540
|
-
this.context.translatableParams.field = this.context.options.field;
|
|
6541
|
-
if (isEmptyValue(fieldValue)) return invalidRule(this, context);
|
|
6542
|
-
if (!isDeclinedValue(value)) return invalidRule(this, context);
|
|
6543
|
-
return VALID_RULE;
|
|
6544
|
-
}
|
|
6545
|
-
};
|
|
6546
|
-
/**
|
|
6547
|
-
* Declined if another field is present
|
|
6548
|
-
*/
|
|
6549
|
-
const declinedIfPresentRule = {
|
|
6550
|
-
name: "declinedIfPresent",
|
|
6551
|
-
description: "The field must be declined if :field is present",
|
|
6552
|
-
defaultErrorMessage: "The :input must be declined",
|
|
6553
|
-
async validate(value, context) {
|
|
6554
|
-
const fieldValue = getFieldValue(this, context);
|
|
6555
|
-
this.context.translatableParams.field = this.context.options.field;
|
|
6556
|
-
if (fieldValue === void 0) return invalidRule(this, context);
|
|
6557
|
-
if (!isDeclinedValue(value)) return invalidRule(this, context);
|
|
6558
|
-
return VALID_RULE;
|
|
6559
|
-
}
|
|
6560
|
-
};
|
|
6561
|
-
/**
|
|
6562
|
-
* Declined if another field is missing
|
|
6563
|
-
*/
|
|
6564
|
-
const declinedWithoutRule = {
|
|
6565
|
-
name: "declinedWithout",
|
|
6566
|
-
description: "The field must be declined if :field is missing",
|
|
6567
|
-
defaultErrorMessage: "The :input must be declined",
|
|
6568
|
-
async validate(value, context) {
|
|
6569
|
-
const fieldValue = getFieldValue(this, context);
|
|
6570
|
-
this.context.translatableParams.field = this.context.options.field;
|
|
6571
|
-
if (fieldValue !== void 0) return invalidRule(this, context);
|
|
6572
|
-
if (!isDeclinedValue(value)) return invalidRule(this, context);
|
|
6573
|
-
return VALID_RULE;
|
|
6574
|
-
}
|
|
6575
|
-
};
|
|
6576
|
-
|
|
6577
|
-
//#endregion
|
|
6578
|
-
//#region ../node_modules/.pnpm/@warlock.js+seal@5.6.0/node_modules/@warlock.js/seal/esm/validators/boolean-validator.mjs
|
|
6672
|
+
//#region ../seal/src/validators/boolean-validator.ts
|
|
6579
6673
|
/**
|
|
6580
6674
|
* Boolean validator class
|
|
6581
6675
|
*
|
|
@@ -6594,65 +6688,112 @@ var BooleanValidator = class extends PrimitiveValidator {
|
|
|
6594
6688
|
matchesType(value) {
|
|
6595
6689
|
return typeof value === "boolean";
|
|
6596
6690
|
}
|
|
6597
|
-
/**
|
|
6691
|
+
/**
|
|
6692
|
+
* Add a rule from the accepted/declined family, opting the validator into
|
|
6693
|
+
* form-boolean parsing.
|
|
6694
|
+
*
|
|
6695
|
+
* Calling ANY `accepted*`/`declined*` method on `v.boolean()` adds (once,
|
|
6696
|
+
* idempotently — checked by mutator identity so chaining several of these
|
|
6697
|
+
* methods never stacks duplicates) `formBooleanMutator`, which runs before
|
|
6698
|
+
* the type rule and converts the accepted set (`1`, `"1"`, `true`,
|
|
6699
|
+
* `"true"`, `"yes"`, `"y"`, `"on"`, `"Yes"`, `"Y"`, `"On"`) to `true` and
|
|
6700
|
+
* the declined set (`0`, `"0"`, `false`, `"false"`, `"no"`, `"n"`, `"off"`,
|
|
6701
|
+
* `"No"`, `"N"`, `"Off"`) to `false`; any other value passes through
|
|
6702
|
+
* unchanged and is rejected by the strict type rule as before.
|
|
6703
|
+
*
|
|
6704
|
+
* The mutator and the rule are added to the SAME resolved instance in one
|
|
6705
|
+
* pass — resolving `this.instance` twice (once per `addRule`/`addMutator`
|
|
6706
|
+
* call) would clone twice on an immutable validator and silently drop one
|
|
6707
|
+
* of the two additions.
|
|
6708
|
+
*/
|
|
6709
|
+
addFormBooleanRule(rule, errorMessage, options = {}) {
|
|
6710
|
+
const instance = this.instance;
|
|
6711
|
+
if (!instance.mutators.some((mutator) => mutator.mutate === formBooleanMutator)) instance.addMutableMutator(formBooleanMutator);
|
|
6712
|
+
instance.addMutableRule(rule, errorMessage, options);
|
|
6713
|
+
return instance;
|
|
6714
|
+
}
|
|
6715
|
+
/** Value must be accepted (true, "yes", 1, "on", etc. — form strings are parsed into a real boolean first) */
|
|
6598
6716
|
accepted(errorMessage) {
|
|
6599
|
-
return this.
|
|
6717
|
+
return this.addFormBooleanRule(acceptedRule, errorMessage);
|
|
6600
6718
|
}
|
|
6601
6719
|
/** Value must be accepted if another field equals a value */
|
|
6602
6720
|
acceptedIf(field, value, errorMessage) {
|
|
6603
|
-
return this.
|
|
6721
|
+
return this.addFormBooleanRule(acceptedIfRule, errorMessage, {
|
|
6604
6722
|
field,
|
|
6605
6723
|
value
|
|
6606
6724
|
});
|
|
6607
6725
|
}
|
|
6608
6726
|
/** Value must be accepted unless another field equals a value */
|
|
6609
6727
|
acceptedUnless(field, value, errorMessage) {
|
|
6610
|
-
return this.
|
|
6728
|
+
return this.addFormBooleanRule(acceptedUnlessRule, errorMessage, {
|
|
6611
6729
|
field,
|
|
6612
6730
|
value
|
|
6613
6731
|
});
|
|
6614
6732
|
}
|
|
6615
6733
|
/** Value must be accepted if another field is required */
|
|
6616
6734
|
acceptedIfRequired(field, errorMessage) {
|
|
6617
|
-
return this.
|
|
6735
|
+
return this.addFormBooleanRule(acceptedIfRequiredRule, errorMessage, { field });
|
|
6618
6736
|
}
|
|
6619
6737
|
/** Value must be accepted if another field is present */
|
|
6620
6738
|
acceptedIfPresent(field, errorMessage) {
|
|
6621
|
-
return this.
|
|
6739
|
+
return this.addFormBooleanRule(acceptedIfPresentRule, errorMessage, { field });
|
|
6622
6740
|
}
|
|
6623
6741
|
/** Value must be accepted if another field is missing */
|
|
6624
6742
|
acceptedWithout(field, errorMessage) {
|
|
6625
|
-
return this.
|
|
6743
|
+
return this.addFormBooleanRule(acceptedWithoutRule, errorMessage, { field });
|
|
6626
6744
|
}
|
|
6627
|
-
/** Value must be declined (false, "no", 0, "off", etc.) */
|
|
6745
|
+
/** Value must be declined (false, "no", 0, "off", etc. — form strings are parsed into a real boolean first) */
|
|
6628
6746
|
declined(errorMessage) {
|
|
6629
|
-
return this.
|
|
6747
|
+
return this.addFormBooleanRule(declinedRule, errorMessage);
|
|
6630
6748
|
}
|
|
6631
6749
|
/** Value must be declined if another field equals a value */
|
|
6632
6750
|
declinedIf(field, value, errorMessage) {
|
|
6633
|
-
return this.
|
|
6751
|
+
return this.addFormBooleanRule(declinedIfRule, errorMessage, {
|
|
6634
6752
|
field,
|
|
6635
6753
|
value
|
|
6636
6754
|
});
|
|
6637
6755
|
}
|
|
6638
6756
|
/** Value must be declined unless another field equals a value */
|
|
6639
6757
|
declinedUnless(field, value, errorMessage) {
|
|
6640
|
-
return this.
|
|
6758
|
+
return this.addFormBooleanRule(declinedUnlessRule, errorMessage, {
|
|
6641
6759
|
field,
|
|
6642
6760
|
value
|
|
6643
6761
|
});
|
|
6644
6762
|
}
|
|
6645
6763
|
/** Value must be declined if another field is required */
|
|
6646
6764
|
declinedIfRequired(field, errorMessage) {
|
|
6647
|
-
return this.
|
|
6765
|
+
return this.addFormBooleanRule(declinedIfRequiredRule, errorMessage, { field });
|
|
6648
6766
|
}
|
|
6649
6767
|
/** Value must be declined if another field is present */
|
|
6650
6768
|
declinedIfPresent(field, errorMessage) {
|
|
6651
|
-
return this.
|
|
6769
|
+
return this.addFormBooleanRule(declinedIfPresentRule, errorMessage, { field });
|
|
6652
6770
|
}
|
|
6653
6771
|
/** Value must be declined if another field is missing */
|
|
6654
6772
|
declinedWithout(field, errorMessage) {
|
|
6655
|
-
return this.
|
|
6773
|
+
return this.addFormBooleanRule(declinedWithoutRule, errorMessage, { field });
|
|
6774
|
+
}
|
|
6775
|
+
/**
|
|
6776
|
+
* Opt in to coercion: an exact query-string-shaped boolean is converted to a
|
|
6777
|
+
* real boolean **before** the type rules run; any other value passes through
|
|
6778
|
+
* unchanged so bad input still fails the type rule.
|
|
6779
|
+
*
|
|
6780
|
+
* Converts exactly `"true"` / `"1"` / `1` → `true` and `"false"` / `"0"` / `0`
|
|
6781
|
+
* → `false`. Case-sensitive, no trimming — `"TRUE"`, `"yes"`, `"on"`, `""`, and
|
|
6782
|
+
* `2` all pass through unchanged and fail the type rule. `v.boolean()` does
|
|
6783
|
+
* **not** coerce by default; this only takes effect when explicitly chained.
|
|
6784
|
+
* For form-style truthy strings like `"yes"` / `"on"`, use `.accepted()` /
|
|
6785
|
+
* `.declined()` instead — those methods opt into their own form-boolean
|
|
6786
|
+
* parsing (a wider value set, case-insensitive on a few forms) and then
|
|
6787
|
+
* apply the accepted/declined pass-fail rule on top of the parsed boolean.
|
|
6788
|
+
*
|
|
6789
|
+
* The output type is unchanged (`Infer<>` keys off the validator class), so
|
|
6790
|
+
* `v.boolean().coerce()` still infers `boolean`.
|
|
6791
|
+
*
|
|
6792
|
+
* @example
|
|
6793
|
+
* v.boolean().coerce() // "true" → true; "1" → true; "0" → false; "yes" → invalid
|
|
6794
|
+
*/
|
|
6795
|
+
coerce() {
|
|
6796
|
+
return this.addMutator(booleanCoerceMutator);
|
|
6656
6797
|
}
|
|
6657
6798
|
/**
|
|
6658
6799
|
* Value must be strictly true (not "yes", "on", 1, etc.)
|
|
@@ -6691,7 +6832,7 @@ var BooleanValidator = class extends PrimitiveValidator {
|
|
|
6691
6832
|
};
|
|
6692
6833
|
|
|
6693
6834
|
//#endregion
|
|
6694
|
-
//#region ../
|
|
6835
|
+
//#region ../seal/src/validators/computed-validator.ts
|
|
6695
6836
|
/**
|
|
6696
6837
|
* Computed field validator
|
|
6697
6838
|
*
|
|
@@ -6725,6 +6866,8 @@ var BooleanValidator = class extends PrimitiveValidator {
|
|
|
6725
6866
|
* ```
|
|
6726
6867
|
*/
|
|
6727
6868
|
var ComputedValidator = class extends BaseValidator {
|
|
6869
|
+
callback;
|
|
6870
|
+
resultValidator;
|
|
6728
6871
|
/**
|
|
6729
6872
|
* Create a new computed field validator
|
|
6730
6873
|
*
|
|
@@ -6803,7 +6946,7 @@ var ComputedValidator = class extends BaseValidator {
|
|
|
6803
6946
|
};
|
|
6804
6947
|
|
|
6805
6948
|
//#endregion
|
|
6806
|
-
//#region ../
|
|
6949
|
+
//#region ../seal/src/validators/date-validator.ts
|
|
6807
6950
|
/**
|
|
6808
6951
|
* Date validator class
|
|
6809
6952
|
*/
|
|
@@ -7423,7 +7566,7 @@ var DateValidator = class extends BaseValidator {
|
|
|
7423
7566
|
};
|
|
7424
7567
|
|
|
7425
7568
|
//#endregion
|
|
7426
|
-
//#region ../
|
|
7569
|
+
//#region ../seal/src/validators/literal-validator.ts
|
|
7427
7570
|
/**
|
|
7428
7571
|
* Literal validator class
|
|
7429
7572
|
*
|
|
@@ -7439,6 +7582,7 @@ var DateValidator = class extends BaseValidator {
|
|
|
7439
7582
|
* v.literal(true) // type: true
|
|
7440
7583
|
*/
|
|
7441
7584
|
var LiteralValidator = class extends BaseValidator {
|
|
7585
|
+
values;
|
|
7442
7586
|
constructor(values, errorMessage) {
|
|
7443
7587
|
super();
|
|
7444
7588
|
this.values = values;
|
|
@@ -7485,7 +7629,7 @@ var LiteralValidator = class extends BaseValidator {
|
|
|
7485
7629
|
};
|
|
7486
7630
|
|
|
7487
7631
|
//#endregion
|
|
7488
|
-
//#region ../
|
|
7632
|
+
//#region ../seal/src/validators/discriminated-union-validator.ts
|
|
7489
7633
|
/**
|
|
7490
7634
|
* Discriminated union validator — routes payloads by a shared discriminator field.
|
|
7491
7635
|
*
|
|
@@ -7518,6 +7662,10 @@ var LiteralValidator = class extends BaseValidator {
|
|
|
7518
7662
|
* @see `domains/seal/plans/2026-05-12-discriminated-union.md`
|
|
7519
7663
|
*/
|
|
7520
7664
|
var DiscriminatedUnionValidator = class DiscriminatedUnionValidator extends BaseValidator {
|
|
7665
|
+
discriminator;
|
|
7666
|
+
validators;
|
|
7667
|
+
/** Map from discriminator literal value → matching branch validator. */
|
|
7668
|
+
branches;
|
|
7521
7669
|
constructor(discriminator, validators) {
|
|
7522
7670
|
super();
|
|
7523
7671
|
this.discriminator = discriminator;
|
|
@@ -7603,7 +7751,7 @@ var DiscriminatedUnionValidator = class DiscriminatedUnionValidator extends Base
|
|
|
7603
7751
|
};
|
|
7604
7752
|
|
|
7605
7753
|
//#endregion
|
|
7606
|
-
//#region ../
|
|
7754
|
+
//#region ../seal/src/validators/number-validator.ts
|
|
7607
7755
|
/**
|
|
7608
7756
|
* Number validator class - base for Int and Float validators
|
|
7609
7757
|
*/
|
|
@@ -7849,6 +7997,26 @@ var NumberValidator = class extends PrimitiveValidator {
|
|
|
7849
7997
|
return this.addMutator(toFixedMutator, { decimals });
|
|
7850
7998
|
}
|
|
7851
7999
|
/**
|
|
8000
|
+
* Opt in to coercion: a numeric-shaped string is converted to a number
|
|
8001
|
+
* **before** the type rules run; any other value passes through unchanged
|
|
8002
|
+
* so bad input still fails the type rule.
|
|
8003
|
+
*
|
|
8004
|
+
* Strictness is preserved — coercion only fixes the string *representation*,
|
|
8005
|
+
* not the value's shape. `v.int().coerce()` turns `"5"` into `5` (valid) but
|
|
8006
|
+
* `"5.5"` into `5.5`, which still fails the integer rule. Number validators
|
|
8007
|
+
* do **not** coerce by default; this only takes effect when explicitly chained.
|
|
8008
|
+
*
|
|
8009
|
+
* The output type is unchanged (`Infer<>` keys off the validator class), so
|
|
8010
|
+
* `v.int().coerce()` still infers `number`.
|
|
8011
|
+
*
|
|
8012
|
+
* @example
|
|
8013
|
+
* v.int().coerce() // "5" → 5 (valid); "5.5" → 5.5 (invalid); "abc" → invalid
|
|
8014
|
+
* v.number().coerce() // "5.5" → 5.5 (valid)
|
|
8015
|
+
*/
|
|
8016
|
+
coerce() {
|
|
8017
|
+
return this.addMutator(numericMutator);
|
|
8018
|
+
}
|
|
8019
|
+
/**
|
|
7852
8020
|
* @inheritdoc
|
|
7853
8021
|
*
|
|
7854
8022
|
* Returns `{ type: "number" }` with numeric constraint keywords.
|
|
@@ -7902,7 +8070,7 @@ var NumberValidator = class extends PrimitiveValidator {
|
|
|
7902
8070
|
};
|
|
7903
8071
|
|
|
7904
8072
|
//#endregion
|
|
7905
|
-
//#region ../
|
|
8073
|
+
//#region ../seal/src/validators/float-validator.ts
|
|
7906
8074
|
/**
|
|
7907
8075
|
* Float validator class
|
|
7908
8076
|
*/
|
|
@@ -7914,7 +8082,7 @@ var FloatValidator = class extends NumberValidator {
|
|
|
7914
8082
|
};
|
|
7915
8083
|
|
|
7916
8084
|
//#endregion
|
|
7917
|
-
//#region ../
|
|
8085
|
+
//#region ../seal/src/validators/instanceof-validator.ts
|
|
7918
8086
|
/**
|
|
7919
8087
|
* InstanceOf validator class
|
|
7920
8088
|
*
|
|
@@ -7932,6 +8100,7 @@ var FloatValidator = class extends NumberValidator {
|
|
|
7932
8100
|
* v.instanceof(MyClass) // type: MyClass
|
|
7933
8101
|
*/
|
|
7934
8102
|
var InstanceOfValidator = class extends BaseValidator {
|
|
8103
|
+
ctor;
|
|
7935
8104
|
constructor(ctor, errorMessage) {
|
|
7936
8105
|
super();
|
|
7937
8106
|
this.ctor = ctor;
|
|
@@ -7972,7 +8141,7 @@ var InstanceOfValidator = class extends BaseValidator {
|
|
|
7972
8141
|
};
|
|
7973
8142
|
|
|
7974
8143
|
//#endregion
|
|
7975
|
-
//#region ../
|
|
8144
|
+
//#region ../seal/src/validators/int-validator.ts
|
|
7976
8145
|
/**
|
|
7977
8146
|
* Integer validator class
|
|
7978
8147
|
*/
|
|
@@ -7996,7 +8165,7 @@ var IntValidator = class extends NumberValidator {
|
|
|
7996
8165
|
};
|
|
7997
8166
|
|
|
7998
8167
|
//#endregion
|
|
7999
|
-
//#region ../
|
|
8168
|
+
//#region ../seal/src/validators/lazy-validator.ts
|
|
8000
8169
|
/**
|
|
8001
8170
|
* Lazy validator — defers resolution of the inner validator until validate-time.
|
|
8002
8171
|
*
|
|
@@ -8038,6 +8207,8 @@ var IntValidator = class extends NumberValidator {
|
|
|
8038
8207
|
* @see `domains/seal/plans/2026-05-12-lazy-validator.md`
|
|
8039
8208
|
*/
|
|
8040
8209
|
var LazyValidator = class extends BaseValidator {
|
|
8210
|
+
thunk;
|
|
8211
|
+
resolvedValidator;
|
|
8041
8212
|
constructor(thunk) {
|
|
8042
8213
|
super();
|
|
8043
8214
|
this.thunk = thunk;
|
|
@@ -8077,7 +8248,7 @@ var LazyValidator = class extends BaseValidator {
|
|
|
8077
8248
|
};
|
|
8078
8249
|
|
|
8079
8250
|
//#endregion
|
|
8080
|
-
//#region ../
|
|
8251
|
+
//#region ../seal/src/validators/managed-validator.ts
|
|
8081
8252
|
/**
|
|
8082
8253
|
* Managed field validator
|
|
8083
8254
|
*
|
|
@@ -8112,7 +8283,7 @@ var ManagedValidator = class extends ComputedValidator {
|
|
|
8112
8283
|
};
|
|
8113
8284
|
|
|
8114
8285
|
//#endregion
|
|
8115
|
-
//#region ../
|
|
8286
|
+
//#region ../seal/src/validators/numeric-validator.ts
|
|
8116
8287
|
/**
|
|
8117
8288
|
* Numeric validator class - base for Int and Float validators either as number or string
|
|
8118
8289
|
*/
|
|
@@ -8133,7 +8304,7 @@ var NumericValidator = class extends NumberValidator {
|
|
|
8133
8304
|
};
|
|
8134
8305
|
|
|
8135
8306
|
//#endregion
|
|
8136
|
-
//#region ../
|
|
8307
|
+
//#region ../seal/src/validators/object-validator.ts
|
|
8137
8308
|
/**
|
|
8138
8309
|
* Object validator class with generic schema type for proper type inference.
|
|
8139
8310
|
*
|
|
@@ -8151,12 +8322,13 @@ var NumericValidator = class extends NumberValidator {
|
|
|
8151
8322
|
* brand-aware widening tries to inspect the class type.
|
|
8152
8323
|
*/
|
|
8153
8324
|
var ObjectValidator = class ObjectValidator extends BaseValidator {
|
|
8325
|
+
schema;
|
|
8326
|
+
shouldAllowUnknown = false;
|
|
8327
|
+
allowedKeys = [];
|
|
8328
|
+
hasUnknownKeyRule = false;
|
|
8154
8329
|
constructor(schema, errorMessage) {
|
|
8155
8330
|
super();
|
|
8156
8331
|
this.schema = schema;
|
|
8157
|
-
this.shouldAllowUnknown = false;
|
|
8158
|
-
this.allowedKeys = [];
|
|
8159
|
-
this.hasUnknownKeyRule = false;
|
|
8160
8332
|
this.addMutableRule(objectRule, errorMessage);
|
|
8161
8333
|
}
|
|
8162
8334
|
/**
|
|
@@ -8206,9 +8378,9 @@ var ObjectValidator = class ObjectValidator extends BaseValidator {
|
|
|
8206
8378
|
clone(keys) {
|
|
8207
8379
|
const cloned = super.clone();
|
|
8208
8380
|
const newSchema = {};
|
|
8209
|
-
for (const key
|
|
8381
|
+
for (const [key, validator] of Object.entries(this.schema)) {
|
|
8210
8382
|
if (keys && !keys.includes(key)) continue;
|
|
8211
|
-
newSchema[key] =
|
|
8383
|
+
newSchema[key] = validator.clone();
|
|
8212
8384
|
}
|
|
8213
8385
|
cloned.schema = newSchema;
|
|
8214
8386
|
cloned.shouldAllowUnknown = this.shouldAllowUnknown;
|
|
@@ -8259,7 +8431,7 @@ var ObjectValidator = class ObjectValidator extends BaseValidator {
|
|
|
8259
8431
|
extend(schemaOrValidator) {
|
|
8260
8432
|
const extended = this.clone();
|
|
8261
8433
|
const schemaToAdd = schemaOrValidator instanceof ObjectValidator ? schemaOrValidator.schema : schemaOrValidator;
|
|
8262
|
-
for (const key
|
|
8434
|
+
for (const [key, validator] of Object.entries(schemaToAdd)) extended.schema[key] = validator.clone();
|
|
8263
8435
|
return extended;
|
|
8264
8436
|
}
|
|
8265
8437
|
/**
|
|
@@ -8293,7 +8465,7 @@ var ObjectValidator = class ObjectValidator extends BaseValidator {
|
|
|
8293
8465
|
*/
|
|
8294
8466
|
merge(validator) {
|
|
8295
8467
|
const merged = this.clone();
|
|
8296
|
-
for (const key
|
|
8468
|
+
for (const [key, schemaValidator] of Object.entries(validator.schema)) merged.schema[key] = schemaValidator.clone();
|
|
8297
8469
|
merged.shouldAllowUnknown = validator.shouldAllowUnknown;
|
|
8298
8470
|
merged.allowedKeys = [...merged.allowedKeys, ...validator.allowedKeys];
|
|
8299
8471
|
merged.rules.push(...validator.rules);
|
|
@@ -8350,7 +8522,7 @@ var ObjectValidator = class ObjectValidator extends BaseValidator {
|
|
|
8350
8522
|
partial(...keys) {
|
|
8351
8523
|
const validationSchema = this.clone();
|
|
8352
8524
|
if (keys.length === 0) keys = Object.keys(validationSchema.schema);
|
|
8353
|
-
for (const key of keys) validationSchema.schema[key] =
|
|
8525
|
+
for (const [key, validator] of Object.entries(validationSchema.schema)) if (keys.length === 0 || keys.includes(key)) validationSchema.schema[key] = validator.optional();
|
|
8354
8526
|
return validationSchema;
|
|
8355
8527
|
}
|
|
8356
8528
|
/**
|
|
@@ -8359,7 +8531,7 @@ var ObjectValidator = class ObjectValidator extends BaseValidator {
|
|
|
8359
8531
|
requiredFields(...keys) {
|
|
8360
8532
|
const validationSchema = this.clone();
|
|
8361
8533
|
if (keys.length === 0) keys = Object.keys(validationSchema.schema);
|
|
8362
|
-
for (const key of keys) validationSchema.schema[key] =
|
|
8534
|
+
for (const [key, validator] of Object.entries(validationSchema.schema)) if (keys.length === 0 || keys.includes(key)) validationSchema.schema[key] = validator.required();
|
|
8363
8535
|
return validationSchema;
|
|
8364
8536
|
}
|
|
8365
8537
|
/**
|
|
@@ -8423,8 +8595,7 @@ var ObjectValidator = class ObjectValidator extends BaseValidator {
|
|
|
8423
8595
|
if (data === void 0) return result;
|
|
8424
8596
|
const errors = [];
|
|
8425
8597
|
const validatedData = {};
|
|
8426
|
-
const validationPromises = Object.
|
|
8427
|
-
const validator = this.schema[key];
|
|
8598
|
+
const validationPromises = Object.entries(this.schema).filter(([, validator]) => !this.isComputedValidator(validator)).map(async ([key, validator]) => {
|
|
8428
8599
|
const value = mutatedData?.[key] !== void 0 ? mutatedData[key] : validator.getDefaultValue();
|
|
8429
8600
|
const childContext = {
|
|
8430
8601
|
...context,
|
|
@@ -8444,8 +8615,7 @@ var ObjectValidator = class ObjectValidator extends BaseValidator {
|
|
|
8444
8615
|
data: void 0
|
|
8445
8616
|
};
|
|
8446
8617
|
const computedFields = this.getComputedFields();
|
|
8447
|
-
const computedPromises = Object.
|
|
8448
|
-
const validator = computedFields[key];
|
|
8618
|
+
const computedPromises = Object.entries(computedFields).map(async ([key, validator]) => {
|
|
8449
8619
|
const childContext = {
|
|
8450
8620
|
...context,
|
|
8451
8621
|
parent: validatedData,
|
|
@@ -8558,7 +8728,7 @@ function removeUndefinedValues(obj, visited = /* @__PURE__ */ new WeakMap()) {
|
|
|
8558
8728
|
}
|
|
8559
8729
|
|
|
8560
8730
|
//#endregion
|
|
8561
|
-
//#region ../
|
|
8731
|
+
//#region ../seal/src/validators/record-validator.ts
|
|
8562
8732
|
/**
|
|
8563
8733
|
* Record validator class - validates objects with dynamic keys and consistent value types
|
|
8564
8734
|
*
|
|
@@ -8574,6 +8744,7 @@ function removeUndefinedValues(obj, visited = /* @__PURE__ */ new WeakMap()) {
|
|
|
8574
8744
|
* ```
|
|
8575
8745
|
*/
|
|
8576
8746
|
var RecordValidator = class extends BaseValidator {
|
|
8747
|
+
valueValidator;
|
|
8577
8748
|
constructor(valueValidator, errorMessage) {
|
|
8578
8749
|
super();
|
|
8579
8750
|
this.valueValidator = valueValidator;
|
|
@@ -8659,7 +8830,7 @@ var RecordValidator = class extends BaseValidator {
|
|
|
8659
8830
|
};
|
|
8660
8831
|
|
|
8661
8832
|
//#endregion
|
|
8662
|
-
//#region ../
|
|
8833
|
+
//#region ../seal/src/validators/scalar-validator.ts
|
|
8663
8834
|
/**
|
|
8664
8835
|
* Scalar validator class
|
|
8665
8836
|
*
|
|
@@ -8818,7 +8989,7 @@ var ScalarValidator = class extends PrimitiveValidator {
|
|
|
8818
8989
|
};
|
|
8819
8990
|
|
|
8820
8991
|
//#endregion
|
|
8821
|
-
//#region ../
|
|
8992
|
+
//#region ../seal/src/validators/string-validator.ts
|
|
8822
8993
|
/**
|
|
8823
8994
|
* String validator class
|
|
8824
8995
|
*/
|
|
@@ -9256,7 +9427,7 @@ var StringValidator = class extends PrimitiveValidator {
|
|
|
9256
9427
|
};
|
|
9257
9428
|
|
|
9258
9429
|
//#endregion
|
|
9259
|
-
//#region ../
|
|
9430
|
+
//#region ../seal/src/validators/tuple-validator.ts
|
|
9260
9431
|
/**
|
|
9261
9432
|
* Tuple validator class - validates fixed-length arrays with position-specific types
|
|
9262
9433
|
*
|
|
@@ -9273,6 +9444,7 @@ var StringValidator = class extends PrimitiveValidator {
|
|
|
9273
9444
|
* ```
|
|
9274
9445
|
*/
|
|
9275
9446
|
var TupleValidator = class extends BaseValidator {
|
|
9447
|
+
validators;
|
|
9276
9448
|
constructor(validators, errorMessage) {
|
|
9277
9449
|
super();
|
|
9278
9450
|
this.validators = validators;
|
|
@@ -9380,7 +9552,7 @@ var TupleValidator = class extends BaseValidator {
|
|
|
9380
9552
|
};
|
|
9381
9553
|
|
|
9382
9554
|
//#endregion
|
|
9383
|
-
//#region ../
|
|
9555
|
+
//#region ../seal/src/validators/union-validator.ts
|
|
9384
9556
|
/**
|
|
9385
9557
|
* Union validator class - validates value against multiple validator types
|
|
9386
9558
|
*
|
|
@@ -9439,7 +9611,7 @@ var UnionValidator = class extends BaseValidator {
|
|
|
9439
9611
|
};
|
|
9440
9612
|
|
|
9441
9613
|
//#endregion
|
|
9442
|
-
//#region ../
|
|
9614
|
+
//#region ../seal/src/factory/validators.ts
|
|
9443
9615
|
/**
|
|
9444
9616
|
* Seal factory object - creates instances of validators
|
|
9445
9617
|
*
|
|
@@ -9543,7 +9715,7 @@ const v = {
|
|
|
9543
9715
|
};
|
|
9544
9716
|
|
|
9545
9717
|
//#endregion
|
|
9546
|
-
//#region ../
|
|
9718
|
+
//#region ../herald/src/drivers/rabbitmq/rabbitmq-channel.ts
|
|
9547
9719
|
/**
|
|
9548
9720
|
* RabbitMQ Channel Implementation
|
|
9549
9721
|
*
|
|
@@ -9552,12 +9724,15 @@ const v = {
|
|
|
9552
9724
|
* @template TPayload - The typed payload
|
|
9553
9725
|
*/
|
|
9554
9726
|
var RabbitMQChannel = class {
|
|
9727
|
+
name;
|
|
9728
|
+
options;
|
|
9729
|
+
amqpChannel;
|
|
9730
|
+
subscriptions = /* @__PURE__ */ new Map();
|
|
9731
|
+
asserted = false;
|
|
9555
9732
|
/**
|
|
9556
9733
|
* Create a new RabbitMQ channel
|
|
9557
9734
|
*/
|
|
9558
9735
|
constructor(name, amqpChannel, options) {
|
|
9559
|
-
this.subscriptions = /* @__PURE__ */ new Map();
|
|
9560
|
-
this.asserted = false;
|
|
9561
9736
|
this.name = name;
|
|
9562
9737
|
this.amqpChannel = amqpChannel;
|
|
9563
9738
|
this.options = options ?? {};
|
|
@@ -9908,8 +10083,12 @@ var RabbitMQChannel = class {
|
|
|
9908
10083
|
* RabbitMQ Subscription Implementation
|
|
9909
10084
|
*/
|
|
9910
10085
|
var RabbitMQSubscription = class {
|
|
10086
|
+
id;
|
|
10087
|
+
channel;
|
|
10088
|
+
consumerTag;
|
|
10089
|
+
amqpChannel;
|
|
10090
|
+
_isActive = true;
|
|
9911
10091
|
constructor(id, channel, consumerTag, amqpChannel) {
|
|
9912
|
-
this._isActive = true;
|
|
9913
10092
|
this.id = id;
|
|
9914
10093
|
this.channel = channel;
|
|
9915
10094
|
this.consumerTag = consumerTag;
|
|
@@ -9932,7 +10111,7 @@ var RabbitMQSubscription = class {
|
|
|
9932
10111
|
};
|
|
9933
10112
|
|
|
9934
10113
|
//#endregion
|
|
9935
|
-
//#region ../
|
|
10114
|
+
//#region ../herald/src/drivers/rabbitmq/rabbitmq-driver.ts
|
|
9936
10115
|
/**
|
|
9937
10116
|
* The single amqplib load, shared by every caller.
|
|
9938
10117
|
*
|
|
@@ -10003,19 +10182,20 @@ function loadAmqplibModule() {
|
|
|
10003
10182
|
* ```
|
|
10004
10183
|
*/
|
|
10005
10184
|
var RabbitMQDriver = class {
|
|
10185
|
+
name = "rabbitmq";
|
|
10186
|
+
consumers = [];
|
|
10187
|
+
options;
|
|
10188
|
+
events = new node_events.EventEmitter();
|
|
10189
|
+
channels = /* @__PURE__ */ new Map();
|
|
10190
|
+
connection = null;
|
|
10191
|
+
amqpChannel = null;
|
|
10192
|
+
_isConnected = false;
|
|
10006
10193
|
/**
|
|
10007
10194
|
* Create a new RabbitMQ driver
|
|
10008
10195
|
*
|
|
10009
10196
|
* @param options - RabbitMQ connection options
|
|
10010
10197
|
*/
|
|
10011
10198
|
constructor(options) {
|
|
10012
|
-
this.name = "rabbitmq";
|
|
10013
|
-
this.consumers = [];
|
|
10014
|
-
this.events = new node_events.EventEmitter();
|
|
10015
|
-
this.channels = /* @__PURE__ */ new Map();
|
|
10016
|
-
this.connection = null;
|
|
10017
|
-
this.amqpChannel = null;
|
|
10018
|
-
this._isConnected = false;
|
|
10019
10199
|
this.options = options;
|
|
10020
10200
|
}
|
|
10021
10201
|
/**
|
|
@@ -10227,7 +10407,7 @@ var RabbitMQDriver = class {
|
|
|
10227
10407
|
};
|
|
10228
10408
|
|
|
10229
10409
|
//#endregion
|
|
10230
|
-
//#region ../
|
|
10410
|
+
//#region ../herald/src/communicators/broker.ts
|
|
10231
10411
|
/**
|
|
10232
10412
|
* Broker - wrapper around a driver with metadata
|
|
10233
10413
|
*
|
|
@@ -10246,6 +10426,12 @@ var RabbitMQDriver = class {
|
|
|
10246
10426
|
* ```
|
|
10247
10427
|
*/
|
|
10248
10428
|
var Broker = class {
|
|
10429
|
+
/** Unique name identifying this broker */
|
|
10430
|
+
name;
|
|
10431
|
+
/** The underlying driver */
|
|
10432
|
+
driver;
|
|
10433
|
+
/** Whether this is the default broker */
|
|
10434
|
+
isDefault;
|
|
10249
10435
|
/**
|
|
10250
10436
|
* Create a new Broker
|
|
10251
10437
|
*
|
|
@@ -10329,11 +10515,12 @@ var Broker = class {
|
|
|
10329
10515
|
};
|
|
10330
10516
|
|
|
10331
10517
|
//#endregion
|
|
10332
|
-
//#region ../
|
|
10518
|
+
//#region ../herald/src/communicators/broker-registry.ts
|
|
10333
10519
|
/**
|
|
10334
10520
|
* Error thrown when a broker is not found
|
|
10335
10521
|
*/
|
|
10336
10522
|
var MissingBrokerError = class extends Error {
|
|
10523
|
+
brokerName;
|
|
10337
10524
|
constructor(message, brokerName) {
|
|
10338
10525
|
super(message);
|
|
10339
10526
|
this.name = "MissingBrokerError";
|
|
@@ -10368,10 +10555,9 @@ var MissingBrokerError = class extends Error {
|
|
|
10368
10555
|
* ```
|
|
10369
10556
|
*/
|
|
10370
10557
|
var BrokerRegistry = class {
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
}
|
|
10558
|
+
sources = /* @__PURE__ */ new Map();
|
|
10559
|
+
defaultSource;
|
|
10560
|
+
events = new node_events.EventEmitter();
|
|
10375
10561
|
/**
|
|
10376
10562
|
* Register a new broker
|
|
10377
10563
|
*
|
|
@@ -10528,7 +10714,7 @@ var BrokerRegistry = class {
|
|
|
10528
10714
|
const brokerRegistry = new BrokerRegistry();
|
|
10529
10715
|
|
|
10530
10716
|
//#endregion
|
|
10531
|
-
//#region ../
|
|
10717
|
+
//#region ../herald/src/utils/connect-to-broker.ts
|
|
10532
10718
|
/**
|
|
10533
10719
|
* Connect to a message broker and register it.
|
|
10534
10720
|
*
|
|
@@ -10590,7 +10776,7 @@ async function connectToBroker(options) {
|
|
|
10590
10776
|
switch (driverType) {
|
|
10591
10777
|
case "rabbitmq": {
|
|
10592
10778
|
const rabbitOptions = options;
|
|
10593
|
-
const { RabbitMQDriver } = await Promise.resolve().then(() => require("./rabbitmq-driver-
|
|
10779
|
+
const { RabbitMQDriver } = await Promise.resolve().then(() => require("./rabbitmq-driver-Dn0M0-ln.cjs"));
|
|
10594
10780
|
driver = new RabbitMQDriver(rabbitOptions);
|
|
10595
10781
|
break;
|
|
10596
10782
|
}
|
|
@@ -10691,7 +10877,7 @@ async function subscribeConsumer(Consumer) {
|
|
|
10691
10877
|
}
|
|
10692
10878
|
|
|
10693
10879
|
//#endregion
|
|
10694
|
-
//#region ../
|
|
10880
|
+
//#region ../herald/src/decorators/consumable.ts
|
|
10695
10881
|
const pendingSubscribers = /* @__PURE__ */ new Set();
|
|
10696
10882
|
/**
|
|
10697
10883
|
* Register the consumer to the broker
|
|
@@ -10722,7 +10908,7 @@ brokerRegistry.on("connected", (broker) => {
|
|
|
10722
10908
|
});
|
|
10723
10909
|
|
|
10724
10910
|
//#endregion
|
|
10725
|
-
//#region ../
|
|
10911
|
+
//#region ../herald/src/message-managers/event-consumer.ts
|
|
10726
10912
|
/**
|
|
10727
10913
|
* This class is used to be part of the Herald Event Consumer Manager.
|
|
10728
10914
|
* It should be used to consume events from Either RabbitMQ or Kafka through Herald
|
|
@@ -10730,6 +10916,11 @@ brokerRegistry.on("connected", (broker) => {
|
|
|
10730
10916
|
* It's highly recommended using it instead of declaring manual channel namd and subscribing to event
|
|
10731
10917
|
*/
|
|
10732
10918
|
var EventConsumer = class {
|
|
10919
|
+
/**
|
|
10920
|
+
* Event name
|
|
10921
|
+
*/
|
|
10922
|
+
static eventName;
|
|
10923
|
+
static _consumerId;
|
|
10733
10924
|
static get consumerId() {
|
|
10734
10925
|
if (!this._consumerId) this._consumerId = (0, crypto.randomUUID)();
|
|
10735
10926
|
return this._consumerId;
|
|
@@ -10738,6 +10929,18 @@ var EventConsumer = class {
|
|
|
10738
10929
|
return this.constructor.eventName;
|
|
10739
10930
|
}
|
|
10740
10931
|
/**
|
|
10932
|
+
* Min version accepted to be consumed by this class
|
|
10933
|
+
*/
|
|
10934
|
+
static minVersion;
|
|
10935
|
+
/**
|
|
10936
|
+
* Max version accepted to be consumed by this class
|
|
10937
|
+
*/
|
|
10938
|
+
static maxVersion;
|
|
10939
|
+
/**
|
|
10940
|
+
* Payload validation to auto reject the received event before accessing it in the handle method
|
|
10941
|
+
*/
|
|
10942
|
+
schema;
|
|
10943
|
+
/**
|
|
10741
10944
|
* Determine whether this is accepted version to be used by this consumer
|
|
10742
10945
|
*/
|
|
10743
10946
|
static isAcceptedVersion(version) {
|
|
@@ -10758,13 +10961,8 @@ var EventConsumer = class {
|
|
|
10758
10961
|
*/
|
|
10759
10962
|
function defineConsumer(eventName, options) {
|
|
10760
10963
|
const Class = class AnnouncedConsumer extends EventConsumer {
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
this.schema = options.schema;
|
|
10764
|
-
}
|
|
10765
|
-
static {
|
|
10766
|
-
this.eventName = eventName;
|
|
10767
|
-
}
|
|
10964
|
+
static eventName = eventName;
|
|
10965
|
+
schema = options.schema;
|
|
10768
10966
|
async handle(payload, event) {
|
|
10769
10967
|
if (options.validate) {
|
|
10770
10968
|
const result = await options.validate(payload);
|
|
@@ -10778,8 +10976,25 @@ function defineConsumer(eventName, options) {
|
|
|
10778
10976
|
}
|
|
10779
10977
|
|
|
10780
10978
|
//#endregion
|
|
10781
|
-
//#region ../
|
|
10979
|
+
//#region ../herald/src/message-managers/event-message.ts
|
|
10782
10980
|
var EventMessage = class {
|
|
10981
|
+
data;
|
|
10982
|
+
/**
|
|
10983
|
+
* Event version
|
|
10984
|
+
*/
|
|
10985
|
+
version;
|
|
10986
|
+
/**
|
|
10987
|
+
* Additional metadata (if any)
|
|
10988
|
+
*/
|
|
10989
|
+
metadata;
|
|
10990
|
+
/**
|
|
10991
|
+
* Event Message id
|
|
10992
|
+
*/
|
|
10993
|
+
messageId;
|
|
10994
|
+
/**
|
|
10995
|
+
* Schema of payload that will be used to determine whether this event should be published
|
|
10996
|
+
*/
|
|
10997
|
+
schema;
|
|
10783
10998
|
/**
|
|
10784
10999
|
* Data that will be sent with the event (Payload)
|
|
10785
11000
|
*/
|
|
@@ -10829,10 +11044,10 @@ var EventMessage = class {
|
|
|
10829
11044
|
*/
|
|
10830
11045
|
function defineEvent(eventName, options = {}) {
|
|
10831
11046
|
return class AnnouncedEvent extends EventMessage {
|
|
11047
|
+
eventName = eventName;
|
|
11048
|
+
schema = options.schema;
|
|
10832
11049
|
constructor(data) {
|
|
10833
11050
|
super(data);
|
|
10834
|
-
this.eventName = eventName;
|
|
10835
|
-
this.schema = options.schema;
|
|
10836
11051
|
}
|
|
10837
11052
|
toJSON() {
|
|
10838
11053
|
if (!options.toJSON) return this.data;
|
|
@@ -10842,7 +11057,7 @@ function defineEvent(eventName, options = {}) {
|
|
|
10842
11057
|
}
|
|
10843
11058
|
|
|
10844
11059
|
//#endregion
|
|
10845
|
-
//#region ../
|
|
11060
|
+
//#region ../herald/src/use-case-broadcast.ts
|
|
10846
11061
|
/**
|
|
10847
11062
|
* Channel adapter that publishes use-case broadcast events onto a herald broker.
|
|
10848
11063
|
*
|
|
@@ -10875,7 +11090,6 @@ exports.EventMessage = EventMessage;
|
|
|
10875
11090
|
exports.MissingBrokerError = MissingBrokerError;
|
|
10876
11091
|
exports.RabbitMQChannel = RabbitMQChannel;
|
|
10877
11092
|
exports.RabbitMQDriver = RabbitMQDriver;
|
|
10878
|
-
exports.RabbitMQDriver$1 = RabbitMQDriver;
|
|
10879
11093
|
exports.brokerRegistry = brokerRegistry;
|
|
10880
11094
|
exports.connectToBroker = connectToBroker;
|
|
10881
11095
|
exports.defineConsumer = defineConsumer;
|
|
@@ -10886,4 +11100,4 @@ exports.heraldChannel = heraldChannel;
|
|
|
10886
11100
|
exports.pendingSubscribers = pendingSubscribers;
|
|
10887
11101
|
exports.publishEvent = publishEvent;
|
|
10888
11102
|
exports.subscribeConsumer = subscribeConsumer;
|
|
10889
|
-
//# sourceMappingURL=
|
|
11103
|
+
//# sourceMappingURL=src-Cx9y1PWY.cjs.map
|