@warlock.js/notifications 5.28.0 → 5.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (530) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/cjs/{channel_api-CBB_XoIl.cjs → channel_api-C5ZZDkgQ.cjs} +21 -21
  3. package/cjs/channel_api-C5ZZDkgQ.cjs.map +1 -0
  4. package/cjs/index.cjs +22 -22
  5. package/cjs/index.cjs.map +1 -1
  6. package/cjs/rabbitmq-driver-BFoWr21L.cjs +3 -0
  7. package/cjs/{src-B6UVThgW.cjs → src-eu2jxS21.cjs} +173 -135
  8. package/cjs/src-eu2jxS21.cjs.map +1 -0
  9. package/esm/channels/database-channel.d.mts +1 -1
  10. package/esm/channels/database-channel.d.mts.map +1 -1
  11. package/esm/channels/database-channel.mjs +1 -1
  12. package/esm/channels/database-channel.mjs.map +1 -1
  13. package/esm/channels/mail-channel.d.mts +1 -1
  14. package/esm/channels/mail-channel.d.mts.map +1 -1
  15. package/esm/channels/mail-channel.mjs +1 -1
  16. package/esm/channels/mail-channel.mjs.map +1 -1
  17. package/esm/config.d.mts +1 -1
  18. package/esm/config.d.mts.map +1 -1
  19. package/esm/config.mjs +1 -1
  20. package/esm/config.mjs.map +1 -1
  21. package/esm/contracts/channel.contract.d.mts +1 -1
  22. package/esm/contracts/channel.contract.d.mts.map +1 -1
  23. package/esm/contracts/notification.contract.d.mts +1 -1
  24. package/esm/contracts/notification.contract.d.mts.map +1 -1
  25. package/esm/contracts/preference-provider.contract.d.mts +1 -1
  26. package/esm/contracts/preference-provider.contract.d.mts.map +1 -1
  27. package/esm/contracts/queue-dispatcher.contract.d.mts +1 -1
  28. package/esm/contracts/queue-dispatcher.contract.d.mts.map +1 -1
  29. package/esm/contracts/rate-limiter.contract.d.mts +1 -1
  30. package/esm/contracts/rate-limiter.contract.d.mts.map +1 -1
  31. package/esm/dispatch/define-channel.d.mts +1 -1
  32. package/esm/dispatch/define-channel.d.mts.map +1 -1
  33. package/esm/dispatch/define-channel.mjs +1 -1
  34. package/esm/dispatch/define-channel.mjs.map +1 -1
  35. package/esm/dispatch/define-notification.d.mts +1 -1
  36. package/esm/dispatch/define-notification.d.mts.map +1 -1
  37. package/esm/dispatch/define-notification.mjs +1 -1
  38. package/esm/dispatch/define-notification.mjs.map +1 -1
  39. package/esm/dispatch/dispatch-id.mjs +1 -1
  40. package/esm/dispatch/dispatch-id.mjs.map +1 -1
  41. package/esm/dispatch/dispatcher.mjs +1 -1
  42. package/esm/dispatch/dispatcher.mjs.map +1 -1
  43. package/esm/dispatch/notifications-event-bus.d.mts +1 -1
  44. package/esm/dispatch/notifications-event-bus.d.mts.map +1 -1
  45. package/esm/dispatch/notifications-event-bus.mjs +1 -1
  46. package/esm/dispatch/notifications-event-bus.mjs.map +1 -1
  47. package/esm/dispatch/notify.d.mts +1 -1
  48. package/esm/dispatch/notify.d.mts.map +1 -1
  49. package/esm/dispatch/notify.mjs +1 -1
  50. package/esm/dispatch/notify.mjs.map +1 -1
  51. package/esm/errors.d.mts +1 -1
  52. package/esm/errors.d.mts.map +1 -1
  53. package/esm/errors.mjs +1 -1
  54. package/esm/errors.mjs.map +1 -1
  55. package/esm/in-app/base-notifications-repository.d.mts +1 -1
  56. package/esm/in-app/base-notifications-repository.d.mts.map +1 -1
  57. package/esm/in-app/base-notifications-repository.mjs +1 -1
  58. package/esm/in-app/base-notifications-repository.mjs.map +1 -1
  59. package/esm/in-app/column-map.d.mts +1 -1
  60. package/esm/in-app/column-map.d.mts.map +1 -1
  61. package/esm/in-app/column-map.mjs +1 -1
  62. package/esm/in-app/column-map.mjs.map +1 -1
  63. package/esm/in-app/database-notification.d.mts +1 -1
  64. package/esm/in-app/database-notification.d.mts.map +1 -1
  65. package/esm/in-app/database-notification.mjs +1 -1
  66. package/esm/in-app/database-notification.mjs.map +1 -1
  67. package/esm/in-app/in-app.d.mts +1 -1
  68. package/esm/in-app/in-app.d.mts.map +1 -1
  69. package/esm/in-app/in-app.mjs +1 -1
  70. package/esm/in-app/in-app.mjs.map +1 -1
  71. package/esm/migration/notification-columns.d.mts +1 -1
  72. package/esm/migration/notification-columns.d.mts.map +1 -1
  73. package/esm/migration/notification-columns.mjs +1 -1
  74. package/esm/migration/notification-columns.mjs.map +1 -1
  75. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/Random/_internal.mjs +1 -1
  76. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/Random/_internal.mjs.map +1 -1
  77. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/mixed/clone/clone.mjs +1 -1
  78. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/mixed/clone/clone.mjs.map +1 -1
  79. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/number/round.mjs +1 -1
  80. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/number/round.mjs.map +1 -1
  81. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/except.mjs +1 -1
  82. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/except.mjs.map +1 -1
  83. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/get.mjs +1 -1
  84. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/get.mjs.map +1 -1
  85. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/omit.mjs +1 -1
  86. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/omit.mjs.map +1 -1
  87. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/unset.mjs +1 -1
  88. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/unset.mjs.map +1 -1
  89. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/capitalize.mjs +1 -1
  90. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/capitalize.mjs.map +1 -1
  91. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/ltrim.mjs +1 -1
  92. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/ltrim.mjs.map +1 -1
  93. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/readMoreChars.mjs +1 -1
  94. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/readMoreChars.mjs.map +1 -1
  95. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/rtrim.mjs +1 -1
  96. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/rtrim.mjs.map +1 -1
  97. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toCamelCase.mjs +1 -1
  98. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toCamelCase.mjs.map +1 -1
  99. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toKebabCase.mjs +1 -1
  100. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toKebabCase.mjs.map +1 -1
  101. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toSnakeCase.mjs +1 -1
  102. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toSnakeCase.mjs.map +1 -1
  103. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toStudlyCase.mjs +1 -1
  104. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toStudlyCase.mjs.map +1 -1
  105. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/trim.mjs +1 -1
  106. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/trim.mjs.map +1 -1
  107. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/ucfirst.mjs +1 -1
  108. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/ucfirst.mjs.map +1 -1
  109. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/words.mjs +1 -1
  110. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/words.mjs.map +1 -1
  111. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/utils/escapeRegex.mjs +1 -1
  112. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/utils/escapeRegex.mjs.map +1 -1
  113. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/utils/lazy.mjs +1 -1
  114. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/utils/lazy.mjs.map +1 -1
  115. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/utils/tap.mjs +1 -1
  116. package/esm/node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/utils/tap.mjs.map +1 -1
  117. package/esm/node_modules/.pnpm/@mongez_supportive-is@3.0.0/node_modules/@mongez/supportive-is/esm/index.mjs +1 -1
  118. package/esm/node_modules/.pnpm/@mongez_supportive-is@3.0.0/node_modules/@mongez/supportive-is/esm/index.mjs.map +1 -1
  119. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/channel_api.mjs +1 -1
  120. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/channel_api.mjs.map +1 -1
  121. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/api_args.mjs +1 -1
  122. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/api_args.mjs.map +1 -1
  123. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/bitset.mjs +1 -1
  124. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/bitset.mjs.map +1 -1
  125. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/channel.mjs +1 -1
  126. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/channel.mjs.map +1 -1
  127. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/channel_model.mjs +1 -1
  128. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/channel_model.mjs.map +1 -1
  129. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/codec.mjs +1 -1
  130. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/codec.mjs.map +1 -1
  131. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/connect.mjs +1 -1
  132. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/connect.mjs.map +1 -1
  133. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/connection.mjs +1 -1
  134. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/connection.mjs.map +1 -1
  135. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/credentials.mjs +1 -1
  136. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/credentials.mjs.map +1 -1
  137. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/defs.mjs +1 -1
  138. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/defs.mjs.map +1 -1
  139. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/error.mjs +1 -1
  140. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/error.mjs.map +1 -1
  141. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/format.mjs +1 -1
  142. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/format.mjs.map +1 -1
  143. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/frame.mjs +1 -1
  144. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/frame.mjs.map +1 -1
  145. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/heartbeat.mjs +1 -1
  146. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/heartbeat.mjs.map +1 -1
  147. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/mux.mjs +1 -1
  148. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/lib/mux.mjs.map +1 -1
  149. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/package.mjs +1 -1
  150. package/esm/node_modules/.pnpm/amqplib@0.10.9/node_modules/amqplib/package.mjs.map +1 -1
  151. package/esm/node_modules/.pnpm/buffer-more-ints@1.0.0/node_modules/buffer-more-ints/buffer-more-ints.mjs +1 -1
  152. package/esm/node_modules/.pnpm/buffer-more-ints@1.0.0/node_modules/buffer-more-ints/buffer-more-ints.mjs.map +1 -1
  153. package/esm/node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/dayjs.min.mjs +1 -1
  154. package/esm/node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/dayjs.min.mjs.map +1 -1
  155. package/esm/node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.mjs +1 -1
  156. package/esm/node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.mjs.map +1 -1
  157. package/esm/node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.mjs +1 -1
  158. package/esm/node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.mjs.map +1 -1
  159. package/esm/node_modules/.pnpm/url-parse@1.5.10/node_modules/url-parse/index.mjs +1 -1
  160. package/esm/node_modules/.pnpm/url-parse@1.5.10/node_modules/url-parse/index.mjs.map +1 -1
  161. package/esm/{herald → packages/herald}/src/communicators/broker-registry.mjs +1 -1
  162. package/esm/packages/herald/src/communicators/broker-registry.mjs.map +1 -0
  163. package/esm/{herald → packages/herald}/src/communicators/broker.mjs +1 -1
  164. package/esm/packages/herald/src/communicators/broker.mjs.map +1 -0
  165. package/esm/{herald → packages/herald}/src/decorators/consumable.mjs +1 -1
  166. package/esm/packages/herald/src/decorators/consumable.mjs.map +1 -0
  167. package/esm/{herald → packages/herald}/src/drivers/rabbitmq/rabbitmq-channel.mjs +1 -1
  168. package/esm/packages/herald/src/drivers/rabbitmq/rabbitmq-channel.mjs.map +1 -0
  169. package/esm/{herald → packages/herald}/src/drivers/rabbitmq/rabbitmq-driver.mjs +3 -3
  170. package/esm/packages/herald/src/drivers/rabbitmq/rabbitmq-driver.mjs.map +1 -0
  171. package/esm/{herald → packages/herald}/src/message-managers/event-consumer.mjs +1 -1
  172. package/esm/packages/herald/src/message-managers/event-consumer.mjs.map +1 -0
  173. package/esm/{herald → packages/herald}/src/message-managers/event-message.mjs +1 -1
  174. package/esm/packages/herald/src/message-managers/event-message.mjs.map +1 -0
  175. package/esm/{herald → packages/herald}/src/message-managers/prepare-consumer-subscription.mjs +1 -1
  176. package/esm/packages/herald/src/message-managers/prepare-consumer-subscription.mjs.map +1 -0
  177. package/esm/{herald → packages/herald}/src/use-case-broadcast.mjs +1 -1
  178. package/esm/packages/herald/src/use-case-broadcast.mjs.map +1 -0
  179. package/esm/{herald → packages/herald}/src/utils/connect-to-broker.mjs +1 -1
  180. package/esm/packages/herald/src/utils/connect-to-broker.mjs.map +1 -0
  181. package/esm/{seal → packages/seal}/src/config.mjs +1 -1
  182. package/esm/packages/seal/src/config.mjs.map +1 -0
  183. package/esm/{seal → packages/seal}/src/factory/validate.mjs +12 -4
  184. package/esm/packages/seal/src/factory/validate.mjs.map +1 -0
  185. package/esm/{seal → packages/seal}/src/factory/validators.mjs +1 -1
  186. package/esm/packages/seal/src/factory/validators.mjs.map +1 -0
  187. package/esm/{seal → packages/seal}/src/helpers/date-helpers.mjs +1 -1
  188. package/esm/packages/seal/src/helpers/date-helpers.mjs.map +1 -0
  189. package/esm/{seal → packages/seal}/src/helpers/get-field-value.mjs +3 -3
  190. package/esm/packages/seal/src/helpers/get-field-value.mjs.map +1 -0
  191. package/esm/packages/seal/src/helpers/is-empty-value.mjs +10 -0
  192. package/esm/packages/seal/src/helpers/is-empty-value.mjs.map +1 -0
  193. package/esm/{seal → packages/seal}/src/helpers/path-helpers.mjs +1 -1
  194. package/esm/packages/seal/src/helpers/path-helpers.mjs.map +1 -0
  195. package/esm/{seal → packages/seal}/src/helpers/validation-helpers.mjs +1 -1
  196. package/esm/packages/seal/src/helpers/validation-helpers.mjs.map +1 -0
  197. package/esm/{seal → packages/seal}/src/mutators/array-mutators.mjs +3 -3
  198. package/esm/packages/seal/src/mutators/array-mutators.mjs.map +1 -0
  199. package/esm/{seal → packages/seal}/src/mutators/boolean-mutators.mjs +1 -1
  200. package/esm/packages/seal/src/mutators/boolean-mutators.mjs.map +1 -0
  201. package/esm/{seal → packages/seal}/src/mutators/date-mutators.mjs +3 -3
  202. package/esm/packages/seal/src/mutators/date-mutators.mjs.map +1 -0
  203. package/esm/{seal → packages/seal}/src/mutators/number-mutators.mjs +4 -4
  204. package/esm/packages/seal/src/mutators/number-mutators.mjs.map +1 -0
  205. package/esm/{seal → packages/seal}/src/mutators/object-mutators.mjs +4 -4
  206. package/esm/packages/seal/src/mutators/object-mutators.mjs.map +1 -0
  207. package/esm/{seal → packages/seal}/src/mutators/scalar-mutators.mjs +1 -1
  208. package/esm/packages/seal/src/mutators/scalar-mutators.mjs.map +1 -0
  209. package/esm/{seal → packages/seal}/src/mutators/string-mutators.mjs +11 -11
  210. package/esm/packages/seal/src/mutators/string-mutators.mjs.map +1 -0
  211. package/esm/{seal → packages/seal}/src/object.mjs +1 -1
  212. package/esm/packages/seal/src/object.mjs.map +1 -0
  213. package/esm/{seal → packages/seal}/src/rules/array/array-rules.mjs +1 -1
  214. package/esm/packages/seal/src/rules/array/array-rules.mjs.map +1 -0
  215. package/esm/{seal → packages/seal}/src/rules/color/color-rules.mjs +1 -1
  216. package/esm/packages/seal/src/rules/color/color-rules.mjs.map +1 -0
  217. package/esm/{seal → packages/seal}/src/rules/common/enum.mjs +1 -1
  218. package/esm/packages/seal/src/rules/common/enum.mjs.map +1 -0
  219. package/esm/{seal → packages/seal}/src/rules/common/equals-field-rules.mjs +1 -1
  220. package/esm/packages/seal/src/rules/common/equals-field-rules.mjs.map +1 -0
  221. package/esm/{seal → packages/seal}/src/rules/common/instanceof.mjs +1 -1
  222. package/esm/packages/seal/src/rules/common/instanceof.mjs.map +1 -0
  223. package/esm/{seal → packages/seal}/src/rules/common/literal.mjs +1 -1
  224. package/esm/packages/seal/src/rules/common/literal.mjs.map +1 -0
  225. package/esm/{seal → packages/seal}/src/rules/common/type-rules.mjs +2 -2
  226. package/esm/packages/seal/src/rules/common/type-rules.mjs.map +1 -0
  227. package/esm/{seal → packages/seal}/src/rules/common/unknown-key.mjs +1 -1
  228. package/esm/packages/seal/src/rules/common/unknown-key.mjs.map +1 -0
  229. package/esm/{seal → packages/seal}/src/rules/conditional/forbidden-if-rules.mjs +1 -1
  230. package/esm/packages/seal/src/rules/conditional/forbidden-if-rules.mjs.map +1 -0
  231. package/esm/{seal → packages/seal}/src/rules/conditional/present-if-rules.mjs +1 -1
  232. package/esm/packages/seal/src/rules/conditional/present-if-rules.mjs.map +1 -0
  233. package/esm/{seal → packages/seal}/src/rules/conditional/present-unless-rules.mjs +1 -1
  234. package/esm/packages/seal/src/rules/conditional/present-unless-rules.mjs.map +1 -0
  235. package/esm/{seal → packages/seal}/src/rules/conditional/present-with-rules.mjs +3 -3
  236. package/esm/packages/seal/src/rules/conditional/present-with-rules.mjs.map +1 -0
  237. package/esm/{seal → packages/seal}/src/rules/conditional/present-without-rules.mjs +3 -3
  238. package/esm/packages/seal/src/rules/conditional/present-without-rules.mjs.map +1 -0
  239. package/esm/{seal → packages/seal}/src/rules/conditional/required-if-rules.mjs +3 -3
  240. package/esm/packages/seal/src/rules/conditional/required-if-rules.mjs.map +1 -0
  241. package/esm/{seal → packages/seal}/src/rules/conditional/required-unless-rules.mjs +1 -1
  242. package/esm/packages/seal/src/rules/conditional/required-unless-rules.mjs.map +1 -0
  243. package/esm/{seal → packages/seal}/src/rules/conditional/required-when-rule.mjs +1 -1
  244. package/esm/packages/seal/src/rules/conditional/required-when-rule.mjs.map +1 -0
  245. package/esm/{seal → packages/seal}/src/rules/conditional/required-with-rules.mjs +3 -3
  246. package/esm/packages/seal/src/rules/conditional/required-with-rules.mjs.map +1 -0
  247. package/esm/{seal → packages/seal}/src/rules/conditional/required-without-rules.mjs +3 -3
  248. package/esm/packages/seal/src/rules/conditional/required-without-rules.mjs.map +1 -0
  249. package/esm/{seal → packages/seal}/src/rules/core/equal.mjs +1 -1
  250. package/esm/packages/seal/src/rules/core/equal.mjs.map +1 -0
  251. package/esm/{seal → packages/seal}/src/rules/core/forbidden.mjs +1 -1
  252. package/esm/packages/seal/src/rules/core/forbidden.mjs.map +1 -0
  253. package/esm/{seal → packages/seal}/src/rules/core/required.mjs +1 -1
  254. package/esm/packages/seal/src/rules/core/required.mjs.map +1 -0
  255. package/esm/{seal → packages/seal}/src/rules/core/union.mjs +3 -1
  256. package/esm/packages/seal/src/rules/core/union.mjs.map +1 -0
  257. package/esm/{seal → packages/seal}/src/rules/core/when.mjs +3 -3
  258. package/esm/packages/seal/src/rules/core/when.mjs.map +1 -0
  259. package/esm/{seal → packages/seal}/src/rules/date/date-comparison-rules.mjs +1 -1
  260. package/esm/packages/seal/src/rules/date/date-comparison-rules.mjs.map +1 -0
  261. package/esm/{seal → packages/seal}/src/rules/date/date-day-rules.mjs +1 -1
  262. package/esm/packages/seal/src/rules/date/date-day-rules.mjs.map +1 -0
  263. package/esm/{seal → packages/seal}/src/rules/date/date-field-comparison-rules.mjs +3 -3
  264. package/esm/packages/seal/src/rules/date/date-field-comparison-rules.mjs.map +1 -0
  265. package/esm/{seal → packages/seal}/src/rules/date/date-period-rules.mjs +3 -3
  266. package/esm/packages/seal/src/rules/date/date-period-rules.mjs.map +1 -0
  267. package/esm/{seal → packages/seal}/src/rules/date/date-relative-rules.mjs +1 -1
  268. package/esm/packages/seal/src/rules/date/date-relative-rules.mjs.map +1 -0
  269. package/esm/{seal → packages/seal}/src/rules/date/date-special-rules.mjs +1 -1
  270. package/esm/packages/seal/src/rules/date/date-special-rules.mjs.map +1 -0
  271. package/esm/{seal → packages/seal}/src/rules/date/date.mjs +3 -3
  272. package/esm/packages/seal/src/rules/date/date.mjs.map +1 -0
  273. package/esm/{seal → packages/seal}/src/rules/length/length-rules.mjs +1 -1
  274. package/esm/packages/seal/src/rules/length/length-rules.mjs.map +1 -0
  275. package/esm/{seal → packages/seal}/src/rules/number/number-rules.mjs +3 -3
  276. package/esm/packages/seal/src/rules/number/number-rules.mjs.map +1 -0
  277. package/esm/{seal → packages/seal}/src/rules/scalar/accepted-rule.mjs +1 -1
  278. package/esm/packages/seal/src/rules/scalar/accepted-rule.mjs.map +1 -0
  279. package/esm/{seal → packages/seal}/src/rules/scalar/declined-rule.mjs +1 -1
  280. package/esm/packages/seal/src/rules/scalar/declined-rule.mjs.map +1 -0
  281. package/esm/{seal → packages/seal}/src/rules/string/alpha.mjs +1 -1
  282. package/esm/packages/seal/src/rules/string/alpha.mjs.map +1 -0
  283. package/esm/{seal → packages/seal}/src/rules/string/credit-card.mjs +1 -1
  284. package/esm/packages/seal/src/rules/string/credit-card.mjs.map +1 -0
  285. package/esm/{seal → packages/seal}/src/rules/string/email.mjs +2 -2
  286. package/esm/packages/seal/src/rules/string/email.mjs.map +1 -0
  287. package/esm/{seal → packages/seal}/src/rules/string/id-formats.mjs +1 -1
  288. package/esm/packages/seal/src/rules/string/id-formats.mjs.map +1 -0
  289. package/esm/{seal → packages/seal}/src/rules/string/ip.mjs +1 -1
  290. package/esm/packages/seal/src/rules/string/ip.mjs.map +1 -0
  291. package/esm/packages/seal/src/rules/string/matches.mjs +4 -0
  292. package/esm/{seal → packages/seal}/src/rules/string/pattern.mjs +1 -1
  293. package/esm/packages/seal/src/rules/string/pattern.mjs.map +1 -0
  294. package/esm/{seal → packages/seal}/src/rules/string/string-comparison.mjs +1 -1
  295. package/esm/packages/seal/src/rules/string/string-comparison.mjs.map +1 -0
  296. package/esm/{seal → packages/seal}/src/rules/string/strong-password-rule.mjs +1 -1
  297. package/esm/packages/seal/src/rules/string/strong-password-rule.mjs.map +1 -0
  298. package/esm/{seal → packages/seal}/src/rules/string/url.mjs +1 -1
  299. package/esm/packages/seal/src/rules/string/url.mjs.map +1 -0
  300. package/esm/{seal → packages/seal}/src/rules/string/without-whitespace.mjs +1 -1
  301. package/esm/packages/seal/src/rules/string/without-whitespace.mjs.map +1 -0
  302. package/esm/{seal → packages/seal}/src/standard-schema/json-schema.mjs +1 -1
  303. package/esm/packages/seal/src/standard-schema/json-schema.mjs.map +1 -0
  304. package/esm/{seal → packages/seal}/src/standard-schema/map-result.mjs +1 -1
  305. package/esm/packages/seal/src/standard-schema/map-result.mjs.map +1 -0
  306. package/esm/{seal → packages/seal}/src/string.mjs +1 -1
  307. package/esm/packages/seal/src/string.mjs.map +1 -0
  308. package/esm/{seal → packages/seal}/src/types/date-types.mjs +1 -1
  309. package/esm/packages/seal/src/types/date-types.mjs.map +1 -0
  310. package/esm/{seal → packages/seal}/src/validators/any-validator.mjs +1 -1
  311. package/esm/packages/seal/src/validators/any-validator.mjs.map +1 -0
  312. package/esm/{seal → packages/seal}/src/validators/array-validator.mjs +1 -1
  313. package/esm/packages/seal/src/validators/array-validator.mjs.map +1 -0
  314. package/esm/{seal → packages/seal}/src/validators/base-validator.mjs +25 -6
  315. package/esm/packages/seal/src/validators/base-validator.mjs.map +1 -0
  316. package/esm/{seal → packages/seal}/src/validators/boolean-validator.mjs +1 -1
  317. package/esm/packages/seal/src/validators/boolean-validator.mjs.map +1 -0
  318. package/esm/{seal → packages/seal}/src/validators/computed-validator.mjs +1 -1
  319. package/esm/packages/seal/src/validators/computed-validator.mjs.map +1 -0
  320. package/esm/{seal → packages/seal}/src/validators/date-validator.mjs +3 -3
  321. package/esm/packages/seal/src/validators/date-validator.mjs.map +1 -0
  322. package/esm/{seal → packages/seal}/src/validators/discriminated-union-validator.mjs +7 -2
  323. package/esm/packages/seal/src/validators/discriminated-union-validator.mjs.map +1 -0
  324. package/esm/{seal → packages/seal}/src/validators/float-validator.mjs +1 -1
  325. package/esm/packages/seal/src/validators/float-validator.mjs.map +1 -0
  326. package/esm/{seal → packages/seal}/src/validators/instanceof-validator.mjs +1 -1
  327. package/esm/packages/seal/src/validators/instanceof-validator.mjs.map +1 -0
  328. package/esm/{seal → packages/seal}/src/validators/int-validator.mjs +1 -1
  329. package/esm/packages/seal/src/validators/int-validator.mjs.map +1 -0
  330. package/esm/{seal → packages/seal}/src/validators/lazy-validator.mjs +1 -1
  331. package/esm/packages/seal/src/validators/lazy-validator.mjs.map +1 -0
  332. package/esm/{seal → packages/seal}/src/validators/literal-validator.mjs +5 -2
  333. package/esm/packages/seal/src/validators/literal-validator.mjs.map +1 -0
  334. package/esm/{seal → packages/seal}/src/validators/managed-validator.mjs +1 -1
  335. package/esm/packages/seal/src/validators/managed-validator.mjs.map +1 -0
  336. package/esm/{seal → packages/seal}/src/validators/methods/equality-conditional-methods.mjs +1 -1
  337. package/esm/packages/seal/src/validators/methods/equality-conditional-methods.mjs.map +1 -0
  338. package/esm/{seal → packages/seal}/src/validators/methods/forbidden-methods.mjs +1 -1
  339. package/esm/packages/seal/src/validators/methods/forbidden-methods.mjs.map +1 -0
  340. package/esm/{seal → packages/seal}/src/validators/methods/present-methods.mjs +1 -1
  341. package/esm/packages/seal/src/validators/methods/present-methods.mjs.map +1 -0
  342. package/esm/{seal → packages/seal}/src/validators/methods/required-methods.mjs +1 -1
  343. package/esm/packages/seal/src/validators/methods/required-methods.mjs.map +1 -0
  344. package/esm/{seal → packages/seal}/src/validators/number-validator.mjs +1 -1
  345. package/esm/packages/seal/src/validators/number-validator.mjs.map +1 -0
  346. package/esm/{seal → packages/seal}/src/validators/numeric-validator.mjs +2 -2
  347. package/esm/packages/seal/src/validators/numeric-validator.mjs.map +1 -0
  348. package/esm/{seal → packages/seal}/src/validators/object-validator.mjs +8 -6
  349. package/esm/packages/seal/src/validators/object-validator.mjs.map +1 -0
  350. package/esm/{seal → packages/seal}/src/validators/primitive-validator.mjs +1 -1
  351. package/esm/packages/seal/src/validators/primitive-validator.mjs.map +1 -0
  352. package/esm/{seal → packages/seal}/src/validators/record-validator.mjs +2 -2
  353. package/esm/packages/seal/src/validators/record-validator.mjs.map +1 -0
  354. package/esm/{seal → packages/seal}/src/validators/scalar-validator.mjs +1 -1
  355. package/esm/packages/seal/src/validators/scalar-validator.mjs.map +1 -0
  356. package/esm/{seal → packages/seal}/src/validators/string-validator.mjs +1 -1
  357. package/esm/packages/seal/src/validators/string-validator.mjs.map +1 -0
  358. package/esm/{seal → packages/seal}/src/validators/tuple-validator.mjs +1 -1
  359. package/esm/packages/seal/src/validators/tuple-validator.mjs.map +1 -0
  360. package/esm/{seal → packages/seal}/src/validators/union-validator.mjs +1 -1
  361. package/esm/packages/seal/src/validators/union-validator.mjs.map +1 -0
  362. package/esm/queue/bullmq-queue.d.mts +1 -1
  363. package/esm/queue/bullmq-queue.d.mts.map +1 -1
  364. package/esm/queue/bullmq-queue.mjs +1 -1
  365. package/esm/queue/bullmq-queue.mjs.map +1 -1
  366. package/esm/queue/herald-queue.d.mts +1 -1
  367. package/esm/queue/herald-queue.d.mts.map +1 -1
  368. package/esm/queue/herald-queue.mjs +1 -1
  369. package/esm/queue/herald-queue.mjs.map +1 -1
  370. package/esm/queue/load-herald.d.mts +1 -1
  371. package/esm/queue/load-herald.d.mts.map +1 -1
  372. package/esm/queue/load-herald.mjs +2 -2
  373. package/esm/queue/load-herald.mjs.map +1 -1
  374. package/esm/queue/load-queue.d.mts +1 -1
  375. package/esm/queue/load-queue.d.mts.map +1 -1
  376. package/esm/queue/load-queue.mjs +1 -1
  377. package/esm/queue/load-queue.mjs.map +1 -1
  378. package/esm/queue/notifications-worker.d.mts +1 -1
  379. package/esm/queue/notifications-worker.d.mts.map +1 -1
  380. package/esm/queue/notifications-worker.mjs +1 -1
  381. package/esm/queue/notifications-worker.mjs.map +1 -1
  382. package/esm/queue/queue-package-not-installed.error.d.mts +1 -1
  383. package/esm/queue/queue-package-not-installed.error.d.mts.map +1 -1
  384. package/esm/queue/queue-package-not-installed.error.mjs +1 -1
  385. package/esm/queue/queue-package-not-installed.error.mjs.map +1 -1
  386. package/esm/types.d.mts +1 -1
  387. package/esm/types.d.mts.map +1 -1
  388. package/llms-full.txt +57 -57
  389. package/llms.txt +8 -8
  390. package/package.json +9 -8
  391. package/skills/configure-notifications/SKILL.md +6 -6
  392. package/skills/define-channel/SKILL.md +6 -6
  393. package/skills/define-notification/SKILL.md +5 -5
  394. package/skills/notifications-basics/SKILL.md +8 -8
  395. package/skills/observe-notifications/SKILL.md +4 -4
  396. package/skills/queue-notifications/SKILL.md +5 -5
  397. package/skills/send-ad-hoc/SKILL.md +8 -8
  398. package/skills/use-in-app/SKILL.md +8 -8
  399. package/skills/write-notification-migration/SKILL.md +7 -7
  400. package/cjs/channel_api-CBB_XoIl.cjs.map +0 -1
  401. package/cjs/rabbitmq-driver-CYeFwv0w.cjs +0 -3
  402. package/cjs/src-B6UVThgW.cjs.map +0 -1
  403. package/esm/herald/src/communicators/broker-registry.mjs.map +0 -1
  404. package/esm/herald/src/communicators/broker.mjs.map +0 -1
  405. package/esm/herald/src/decorators/consumable.mjs.map +0 -1
  406. package/esm/herald/src/drivers/rabbitmq/rabbitmq-channel.mjs.map +0 -1
  407. package/esm/herald/src/drivers/rabbitmq/rabbitmq-driver.mjs.map +0 -1
  408. package/esm/herald/src/message-managers/event-consumer.mjs.map +0 -1
  409. package/esm/herald/src/message-managers/event-message.mjs.map +0 -1
  410. package/esm/herald/src/message-managers/prepare-consumer-subscription.mjs.map +0 -1
  411. package/esm/herald/src/use-case-broadcast.mjs.map +0 -1
  412. package/esm/herald/src/utils/connect-to-broker.mjs.map +0 -1
  413. package/esm/seal/src/config.mjs.map +0 -1
  414. package/esm/seal/src/factory/validate.mjs.map +0 -1
  415. package/esm/seal/src/factory/validators.mjs.map +0 -1
  416. package/esm/seal/src/helpers/date-helpers.mjs.map +0 -1
  417. package/esm/seal/src/helpers/get-field-value.mjs.map +0 -1
  418. package/esm/seal/src/helpers/is-empty-value.mjs +0 -10
  419. package/esm/seal/src/helpers/is-empty-value.mjs.map +0 -1
  420. package/esm/seal/src/helpers/path-helpers.mjs.map +0 -1
  421. package/esm/seal/src/helpers/validation-helpers.mjs.map +0 -1
  422. package/esm/seal/src/mutators/array-mutators.mjs.map +0 -1
  423. package/esm/seal/src/mutators/boolean-mutators.mjs.map +0 -1
  424. package/esm/seal/src/mutators/date-mutators.mjs.map +0 -1
  425. package/esm/seal/src/mutators/number-mutators.mjs.map +0 -1
  426. package/esm/seal/src/mutators/object-mutators.mjs.map +0 -1
  427. package/esm/seal/src/mutators/scalar-mutators.mjs.map +0 -1
  428. package/esm/seal/src/mutators/string-mutators.mjs.map +0 -1
  429. package/esm/seal/src/object.mjs.map +0 -1
  430. package/esm/seal/src/rules/array/array-rules.mjs.map +0 -1
  431. package/esm/seal/src/rules/color/color-rules.mjs.map +0 -1
  432. package/esm/seal/src/rules/common/enum.mjs.map +0 -1
  433. package/esm/seal/src/rules/common/equals-field-rules.mjs.map +0 -1
  434. package/esm/seal/src/rules/common/instanceof.mjs.map +0 -1
  435. package/esm/seal/src/rules/common/literal.mjs.map +0 -1
  436. package/esm/seal/src/rules/common/type-rules.mjs.map +0 -1
  437. package/esm/seal/src/rules/common/unknown-key.mjs.map +0 -1
  438. package/esm/seal/src/rules/conditional/forbidden-if-rules.mjs.map +0 -1
  439. package/esm/seal/src/rules/conditional/present-if-rules.mjs.map +0 -1
  440. package/esm/seal/src/rules/conditional/present-unless-rules.mjs.map +0 -1
  441. package/esm/seal/src/rules/conditional/present-with-rules.mjs.map +0 -1
  442. package/esm/seal/src/rules/conditional/present-without-rules.mjs.map +0 -1
  443. package/esm/seal/src/rules/conditional/required-if-rules.mjs.map +0 -1
  444. package/esm/seal/src/rules/conditional/required-unless-rules.mjs.map +0 -1
  445. package/esm/seal/src/rules/conditional/required-when-rule.mjs.map +0 -1
  446. package/esm/seal/src/rules/conditional/required-with-rules.mjs.map +0 -1
  447. package/esm/seal/src/rules/conditional/required-without-rules.mjs.map +0 -1
  448. package/esm/seal/src/rules/core/equal.mjs.map +0 -1
  449. package/esm/seal/src/rules/core/forbidden.mjs.map +0 -1
  450. package/esm/seal/src/rules/core/required.mjs.map +0 -1
  451. package/esm/seal/src/rules/core/union.mjs.map +0 -1
  452. package/esm/seal/src/rules/core/when.mjs.map +0 -1
  453. package/esm/seal/src/rules/date/date-comparison-rules.mjs.map +0 -1
  454. package/esm/seal/src/rules/date/date-day-rules.mjs.map +0 -1
  455. package/esm/seal/src/rules/date/date-field-comparison-rules.mjs.map +0 -1
  456. package/esm/seal/src/rules/date/date-period-rules.mjs.map +0 -1
  457. package/esm/seal/src/rules/date/date-relative-rules.mjs.map +0 -1
  458. package/esm/seal/src/rules/date/date-special-rules.mjs.map +0 -1
  459. package/esm/seal/src/rules/date/date.mjs.map +0 -1
  460. package/esm/seal/src/rules/length/length-rules.mjs.map +0 -1
  461. package/esm/seal/src/rules/number/number-rules.mjs.map +0 -1
  462. package/esm/seal/src/rules/scalar/accepted-rule.mjs.map +0 -1
  463. package/esm/seal/src/rules/scalar/declined-rule.mjs.map +0 -1
  464. package/esm/seal/src/rules/string/alpha.mjs.map +0 -1
  465. package/esm/seal/src/rules/string/credit-card.mjs.map +0 -1
  466. package/esm/seal/src/rules/string/email.mjs.map +0 -1
  467. package/esm/seal/src/rules/string/id-formats.mjs.map +0 -1
  468. package/esm/seal/src/rules/string/ip.mjs.map +0 -1
  469. package/esm/seal/src/rules/string/matches.mjs +0 -4
  470. package/esm/seal/src/rules/string/pattern.mjs.map +0 -1
  471. package/esm/seal/src/rules/string/string-comparison.mjs.map +0 -1
  472. package/esm/seal/src/rules/string/strong-password-rule.mjs.map +0 -1
  473. package/esm/seal/src/rules/string/url.mjs.map +0 -1
  474. package/esm/seal/src/rules/string/without-whitespace.mjs.map +0 -1
  475. package/esm/seal/src/standard-schema/json-schema.mjs.map +0 -1
  476. package/esm/seal/src/standard-schema/map-result.mjs.map +0 -1
  477. package/esm/seal/src/string.mjs.map +0 -1
  478. package/esm/seal/src/types/date-types.mjs.map +0 -1
  479. package/esm/seal/src/validators/any-validator.mjs.map +0 -1
  480. package/esm/seal/src/validators/array-validator.mjs.map +0 -1
  481. package/esm/seal/src/validators/base-validator.mjs.map +0 -1
  482. package/esm/seal/src/validators/boolean-validator.mjs.map +0 -1
  483. package/esm/seal/src/validators/computed-validator.mjs.map +0 -1
  484. package/esm/seal/src/validators/date-validator.mjs.map +0 -1
  485. package/esm/seal/src/validators/discriminated-union-validator.mjs.map +0 -1
  486. package/esm/seal/src/validators/float-validator.mjs.map +0 -1
  487. package/esm/seal/src/validators/instanceof-validator.mjs.map +0 -1
  488. package/esm/seal/src/validators/int-validator.mjs.map +0 -1
  489. package/esm/seal/src/validators/lazy-validator.mjs.map +0 -1
  490. package/esm/seal/src/validators/literal-validator.mjs.map +0 -1
  491. package/esm/seal/src/validators/managed-validator.mjs.map +0 -1
  492. package/esm/seal/src/validators/methods/equality-conditional-methods.mjs.map +0 -1
  493. package/esm/seal/src/validators/methods/forbidden-methods.mjs.map +0 -1
  494. package/esm/seal/src/validators/methods/present-methods.mjs.map +0 -1
  495. package/esm/seal/src/validators/methods/required-methods.mjs.map +0 -1
  496. package/esm/seal/src/validators/number-validator.mjs.map +0 -1
  497. package/esm/seal/src/validators/numeric-validator.mjs.map +0 -1
  498. package/esm/seal/src/validators/object-validator.mjs.map +0 -1
  499. package/esm/seal/src/validators/primitive-validator.mjs.map +0 -1
  500. package/esm/seal/src/validators/record-validator.mjs.map +0 -1
  501. package/esm/seal/src/validators/scalar-validator.mjs.map +0 -1
  502. package/esm/seal/src/validators/string-validator.mjs.map +0 -1
  503. package/esm/seal/src/validators/tuple-validator.mjs.map +0 -1
  504. package/esm/seal/src/validators/union-validator.mjs.map +0 -1
  505. /package/esm/{herald → packages/herald}/src/communicators/index.mjs +0 -0
  506. /package/esm/{herald → packages/herald}/src/decorators/index.mjs +0 -0
  507. /package/esm/{herald → packages/herald}/src/drivers/index.mjs +0 -0
  508. /package/esm/{herald → packages/herald}/src/drivers/rabbitmq/index.mjs +0 -0
  509. /package/esm/{herald → packages/herald}/src/index.mjs +0 -0
  510. /package/esm/{herald → packages/herald}/src/message-managers/index.mjs +0 -0
  511. /package/esm/{herald → packages/herald}/src/utils/index.mjs +0 -0
  512. /package/esm/{seal → packages/seal}/src/factory/index.mjs +0 -0
  513. /package/esm/{seal → packages/seal}/src/helpers/index.mjs +0 -0
  514. /package/esm/{seal → packages/seal}/src/index.mjs +0 -0
  515. /package/esm/{seal → packages/seal}/src/mutators/index.mjs +0 -0
  516. /package/esm/{seal → packages/seal}/src/rules/array/index.mjs +0 -0
  517. /package/esm/{seal → packages/seal}/src/rules/color/index.mjs +0 -0
  518. /package/esm/{seal → packages/seal}/src/rules/common/index.mjs +0 -0
  519. /package/esm/{seal → packages/seal}/src/rules/conditional/index.mjs +0 -0
  520. /package/esm/{seal → packages/seal}/src/rules/core/index.mjs +0 -0
  521. /package/esm/{seal → packages/seal}/src/rules/date/index.mjs +0 -0
  522. /package/esm/{seal → packages/seal}/src/rules/file/dimensions.mjs +0 -0
  523. /package/esm/{seal → packages/seal}/src/rules/file/file-size.mjs +0 -0
  524. /package/esm/{seal → packages/seal}/src/rules/file/index.mjs +0 -0
  525. /package/esm/{seal → packages/seal}/src/rules/index.mjs +0 -0
  526. /package/esm/{seal → packages/seal}/src/rules/length/index.mjs +0 -0
  527. /package/esm/{seal → packages/seal}/src/rules/number/index.mjs +0 -0
  528. /package/esm/{seal → packages/seal}/src/rules/scalar/index.mjs +0 -0
  529. /package/esm/{seal → packages/seal}/src/rules/string/index.mjs +0 -0
  530. /package/esm/{seal → packages/seal}/src/validators/index.mjs +0 -0
@@ -0,0 +1,10 @@
1
+ import { isEmpty, isObject } from "../../../../node_modules/.pnpm/@mongez_supportive-is@3.0.0/node_modules/@mongez/supportive-is/esm/index.mjs";
2
+
3
+ //#region ../../packages/seal/src/helpers/is-empty-value.ts
4
+ function isEmptyValue(value) {
5
+ return isEmpty(value) && !isObject(value);
6
+ }
7
+
8
+ //#endregion
9
+ export { isEmptyValue };
10
+ //# sourceMappingURL=is-empty-value.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-empty-value.mjs","names":[],"sources":["../../../../../../../../../../../packages/seal/src/helpers/is-empty-value.ts"],"sourcesContent":["import { isEmpty, isObject } from \"@mongez/supportive-is\";\n\nexport function isEmptyValue(value: any) {\n return isEmpty(value) && !isObject(value);\n}\n"],"mappings":";;;AAEA,SAAgB,aAAa,OAAY;CACvC,OAAO,QAAQ,KAAK,KAAK,CAAC,SAAS,KAAK;AAC1C"}
@@ -1,4 +1,4 @@
1
- //#region ../seal/src/helpers/path-helpers.ts
1
+ //#region ../../packages/seal/src/helpers/path-helpers.ts
2
2
  /**
3
3
  * Set the key path for nested validation
4
4
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-helpers.mjs","names":[],"sources":["../../../../../../../../../../../packages/seal/src/helpers/path-helpers.ts"],"sourcesContent":["/**\n * Set the key path for nested validation\n */\nexport const setKeyPath = (path: string, key: string): string => {\n if (!path) return key;\n return `${path}.${key}`;\n};\n"],"mappings":";;;;AAGA,MAAa,cAAc,MAAc,QAAwB;CAC/D,IAAI,CAAC,MAAM,OAAO;CAClB,OAAO,GAAG,KAAK,GAAG;AACpB"}
@@ -1,6 +1,6 @@
1
1
  import { getSealConfig } from "../config.mjs";
2
2
 
3
- //#region ../seal/src/helpers/validation-helpers.ts
3
+ //#region ../../packages/seal/src/helpers/validation-helpers.ts
4
4
  const VALID_RULE = { isValid: true };
5
5
  /**
6
6
  * Resolve a single attribute value through the full translation priority chain:
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation-helpers.mjs","names":[],"sources":["../../../../../../../../../../../packages/seal/src/helpers/validation-helpers.ts"],"sourcesContent":["import { getSealConfig } from \"../config\";\nimport type { ContextualSchemaRule, RuleResult, RuleTranslation, SchemaContext } from \"../types\";\n\nexport const VALID_RULE: RuleResult = {\n isValid: true,\n};\n/**\n * Resolve a single attribute value through the full translation priority chain:\n * 1. attributesList[key] — developer direct text override (highest priority)\n * 2. translatedAttributes[key] — developer explicit translation key\n * 3. translator(rawValue) — auto-translate the raw value (fallback)\n *\n * Use this in rule bodies when you need per-item translation\n * (e.g. translating each enum value before joining them).\n *\n * @example\n * // Translate each enum value individually then join\n * const enumList = enumValues\n * .map(v => resolveTranslation(String(v), String(v), this, context))\n * .join(\", \");\n * this.context.translationParams.enumList = enumList;\n */\nexport const resolveTranslation = ({\n key,\n rawValue,\n rule,\n context,\n}: {\n key: string;\n rawValue: any;\n rule: ContextualSchemaRule;\n context: SchemaContext;\n}): string => {\n const translator = getSealConfig().translateAttribute;\n\n // 1. Direct text override wins\n const direct = rule.context.attributesList?.[key];\n if (direct && typeof direct === \"string\") return direct;\n\n if (!translator) return String(rawValue ?? key);\n\n // 2. Explicit translation key\n const transKey = rule.context.translatedAttributes?.[key];\n if (transKey) return translator({ attribute: transKey, context, rule });\n\n // 3. Auto-translate the raw value (fallback)\n return translator({ attribute: String(rawValue ?? key), context, rule });\n};\n\n// Internal alias — invalidRule uses the same function without re-importing config\nconst resolveAttribute = resolveTranslation;\n\nexport const invalidRule = (rule: ContextualSchemaRule, context: SchemaContext): RuleResult => {\n // `input` is always translatable — rules may add more (e.g., field references in sameAs)\n // Rule-defined translatableParams override the default input if the key matches\n const translatableWithInput: Record<string, string> = {\n // Fall back to \"schema\" when validating at the root level (no key)\n input: context.key || \"schema\",\n ...rule.context.translatableParams,\n };\n\n // Resolve all translatable params through the full priority chain\n const resolvedParams = Object.fromEntries(\n Object.entries(translatableWithInput).map(([key, rawValue]) => [\n key,\n resolveAttribute({ key, rawValue, rule, context }),\n ]),\n );\n const input = resolveAttribute({\n key: \"input\",\n rawValue: translatableWithInput.input ?? \"schema\",\n rule,\n context,\n });\n\n const attributes: RuleTranslation[\"attributes\"] = {\n path: context.path,\n key: context.key,\n // A per-call `redactValue` stands in for the submitted input, so neither a\n // translation nor a custom message can echo it through `:value`\n value: context.configurations?.redactValue ?? context.value,\n // Raw placeholders (:enumList, :min, :max, etc.) — no translation\n ...rule.context.translationParams,\n // Translated placeholders (:input, :field, etc.) — override raws if key collides\n ...resolvedParams,\n // Satisfy TypeScript's required field (always present via resolvedParams)\n input,\n };\n\n const rawError =\n rule.context.errorMessage ||\n rule.errorMessage ||\n context.translateRule?.({ rule, context, attributes }) ||\n rule.defaultErrorMessage!;\n\n // Fallback interpolation: replace :placeholder patterns from attributes\n // This kicks in when translateRule is absent or returns \"\" (not configured)\n const error = rawError.replace(/:([a-zA-Z_]+)/g, (match, key) =>\n key in attributes ? String(attributes[key as keyof typeof attributes]) : match,\n );\n\n return {\n isValid: false,\n error,\n input: attributes.input, // use resolved input, not raw context.key (may be \"\")\n path: context.path,\n };\n};\n"],"mappings":";;;AAGA,MAAa,aAAyB,EACpC,SAAS,KACX;;;;;;;;;;;;;;;;;AAiBA,MAAa,sBAAsB,EACjC,KACA,UACA,MACA,cAMY;CACZ,MAAM,aAAa,cAAc,CAAC,CAAC;CAGnC,MAAM,SAAS,KAAK,QAAQ,iBAAiB;CAC7C,IAAI,UAAU,OAAO,WAAW,UAAU,OAAO;CAEjD,IAAI,CAAC,YAAY,OAAO,OAAO,YAAY,GAAG;CAG9C,MAAM,WAAW,KAAK,QAAQ,uBAAuB;CACrD,IAAI,UAAU,OAAO,WAAW;EAAE,WAAW;EAAU;EAAS;CAAK,CAAC;CAGtE,OAAO,WAAW;EAAE,WAAW,OAAO,YAAY,GAAG;EAAG;EAAS;CAAK,CAAC;AACzE;AAGA,MAAM,mBAAmB;AAEzB,MAAa,eAAe,MAA4B,YAAuC;CAG7F,MAAM,wBAAgD;EAEpD,OAAO,QAAQ,OAAO;EACtB,GAAG,KAAK,QAAQ;CAClB;CAGA,MAAM,iBAAiB,OAAO,YAC5B,OAAO,QAAQ,qBAAqB,CAAC,CAAC,KAAK,CAAC,KAAK,cAAc,CAC7D,KACA,iBAAiB;EAAE;EAAK;EAAU;EAAM;CAAQ,CAAC,CACnD,CAAC,CACH;CACA,MAAM,QAAQ,iBAAiB;EAC7B,KAAK;EACL,UAAU,sBAAsB,SAAS;EACzC;EACA;CACF,CAAC;CAED,MAAM,aAA4C;EAChD,MAAM,QAAQ;EACd,KAAK,QAAQ;EAGb,OAAO,QAAQ,gBAAgB,eAAe,QAAQ;EAEtD,GAAG,KAAK,QAAQ;EAEhB,GAAG;EAEH;CACF;CAcA,OAAO;EACL,SAAS;EACT,QAbA,KAAK,QAAQ,gBACb,KAAK,gBACL,QAAQ,gBAAgB;GAAE;GAAM;GAAS;EAAW,CAAC,KACrD,KAAK,oBAIe,CAAC,QAAQ,mBAAmB,OAAO,QACvD,OAAO,aAAa,OAAO,WAAW,IAA+B,IAAI,KAKrE;EACJ,OAAO,WAAW;EAClB,MAAM,QAAQ;CAChB;AACF"}
@@ -1,7 +1,7 @@
1
- import { get } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/get.mjs";
2
- import "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
1
+ import { get } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/get.mjs";
2
+ import "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
3
3
 
4
- //#region ../seal/src/mutators/array-mutators.ts
4
+ //#region ../../packages/seal/src/mutators/array-mutators.ts
5
5
  /** Reverse array order */
6
6
  const flipArrayMutator = async (value) => {
7
7
  return value.reverse();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array-mutators.mjs","names":[],"sources":["../../../../../../../../../../../packages/seal/src/mutators/array-mutators.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { isEmptyValue } from \"../helpers/is-empty-value\";\nimport type { Mutator } from \"../types\";\n\n/** Reverse array order */\nexport const flipArrayMutator: Mutator = async (value) => {\n return value.reverse();\n};\n\n/** Reverse array order (alias) */\nexport const reverseArrayMutator: Mutator = async (value) => {\n return value.reverse();\n};\n\n/** Sort array */\nexport const sortArrayMutator: Mutator = async (value, context) => {\n if (!Array.isArray(value)) return value;\n\n const sortDirection = context?.options.direction ?? \"asc\";\n const sortByKey = context?.options.key ?? null;\n\n return value.sort((a: any, b: any) => {\n if (sortByKey) {\n const aValue = get(a, sortByKey);\n const bValue = get(b, sortByKey);\n\n if (sortDirection === \"asc\") {\n return aValue - bValue;\n }\n return bValue - aValue;\n }\n\n if (sortDirection === \"asc\") {\n return a - b;\n }\n return b - a;\n });\n};\n\n/** Make array have only unique values */\nexport const uniqueArrayMutator: Mutator = async (value) => {\n return [...new Set(value)];\n};\n\n/** Remove empty elements from array */\nexport const removeEmptyArrayElementsMutator: Mutator = async (value) => {\n return value.filter((item: any) => !isEmptyValue(item));\n};\n"],"mappings":";;;;;AAKA,MAAa,mBAA4B,OAAO,UAAU;CACxD,OAAO,MAAM,QAAQ;AACvB;;AAQA,MAAa,mBAA4B,OAAO,OAAO,YAAY;CACjE,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,OAAO;CAElC,MAAM,gBAAgB,SAAS,QAAQ,aAAa;CACpD,MAAM,YAAY,SAAS,QAAQ,OAAO;CAE1C,OAAO,MAAM,MAAM,GAAQ,MAAW;EACpC,IAAI,WAAW;GACb,MAAM,SAAS,IAAI,GAAG,SAAS;GAC/B,MAAM,SAAS,IAAI,GAAG,SAAS;GAE/B,IAAI,kBAAkB,OACpB,OAAO,SAAS;GAElB,OAAO,SAAS;EAClB;EAEA,IAAI,kBAAkB,OACpB,OAAO,IAAI;EAEb,OAAO,IAAI;CACb,CAAC;AACH;;AAGA,MAAa,qBAA8B,OAAO,UAAU;CAC1D,OAAO,CAAC,GAAG,IAAI,IAAI,KAAK,CAAC;AAC3B"}
@@ -1,7 +1,7 @@
1
1
  import { ACCEPTED_VALUES } from "../rules/scalar/accepted-rule.mjs";
2
2
  import { DECLINED_VALUES } from "../rules/scalar/declined-rule.mjs";
3
3
 
4
- //#region ../seal/src/mutators/boolean-mutators.ts
4
+ //#region ../../packages/seal/src/mutators/boolean-mutators.ts
5
5
  /**
6
6
  * Coerce a query-string-shaped boolean into a real boolean.
7
7
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boolean-mutators.mjs","names":[],"sources":["../../../../../../../../../../../packages/seal/src/mutators/boolean-mutators.ts"],"sourcesContent":["import { ACCEPTED_VALUES } from \"../rules/scalar/accepted-rule\";\nimport { DECLINED_VALUES } from \"../rules/scalar/declined-rule\";\nimport type { Mutator } from \"../types\";\n\n/**\n * Coerce a query-string-shaped boolean into a real boolean.\n *\n * Converts exactly: `\"true\"` / `\"1\"` / `1` → `true`, `\"false\"` / `\"0\"` / `0` → `false`.\n * Case-sensitive, no trimming. Any other value (`\"yes\"`, `\"on\"`, `\"TRUE\"`, `\"\"`,\n * `2`, `null`, etc.) passes through unchanged so the boolean type rule rejects it.\n */\nexport const booleanCoerceMutator: Mutator = async (value) => {\n if (value === \"true\" || value === \"1\" || value === 1) {\n return true;\n }\n\n if (value === \"false\" || value === \"0\" || value === 0) {\n return false;\n }\n\n return value;\n};\n\n/**\n * Parse form-shaped boolean values into a real boolean, ahead of the type\n * rule.\n *\n * Opted into by calling any `accepted*`/`declined*` method on\n * `v.boolean()` (see `BooleanValidator`'s `withFormBooleanMutator`). Converts\n * every value in `ACCEPTED_VALUES` (`1`, `\"1\"`, `true`, `\"true\"`, `\"yes\"`,\n * `\"y\"`, `\"on\"`, `\"Yes\"`, `\"Y\"`, `\"On\"`) to `true`, and every value in\n * `DECLINED_VALUES` (`0`, `\"0\"`, `false`, `\"false\"`, `\"no\"`, `\"n\"`, `\"off\"`,\n * `\"No\"`, `\"N\"`, `\"Off\"`) to `false`. Any other value passes through\n * unchanged so the boolean type rule still rejects it.\n *\n * Named (not anonymous) so callers can detect whether it has already been\n * added — see the idempotence check in `BooleanValidator`.\n */\nexport const formBooleanMutator: Mutator = async (value) => {\n if (ACCEPTED_VALUES.includes(value)) {\n return true;\n }\n\n if (DECLINED_VALUES.includes(value)) {\n return false;\n }\n\n return value;\n};\n"],"mappings":";;;;;;;;;;;AAWA,MAAa,uBAAgC,OAAO,UAAU;CAC5D,IAAI,UAAU,UAAU,UAAU,OAAO,UAAU,GACjD,OAAO;CAGT,IAAI,UAAU,WAAW,UAAU,OAAO,UAAU,GAClD,OAAO;CAGT,OAAO;AACT;;;;;;;;;;;;;;;;AAiBA,MAAa,qBAA8B,OAAO,UAAU;CAC1D,IAAI,gBAAgB,SAAS,KAAK,GAChC,OAAO;CAGT,IAAI,gBAAgB,SAAS,KAAK,GAChC,OAAO;CAGT,OAAO;AACT"}
@@ -1,7 +1,7 @@
1
- import { __toESM } from "../../../_virtual/_rolldown/runtime.mjs";
2
- import { require_dayjs_min } from "../../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/dayjs.min.mjs";
1
+ import { __toESM } from "../../../../_virtual/_rolldown/runtime.mjs";
2
+ import { require_dayjs_min } from "../../../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/dayjs.min.mjs";
3
3
 
4
- //#region ../seal/src/mutators/date-mutators.ts
4
+ //#region ../../packages/seal/src/mutators/date-mutators.ts
5
5
  var import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min(), 1);
6
6
  /**
7
7
  * Convert value to Date object
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-mutators.mjs","names":[],"sources":["../../../../../../../../../../../packages/seal/src/mutators/date-mutators.ts"],"sourcesContent":["import dayjs from \"dayjs\";\nimport type { Mutator } from \"../types\";\n\n/**\n * Convert value to Date object\n * Returns Invalid Date if value cannot be converted\n */\nexport const dateMutator: Mutator = async (value) => {\n // Handle null/undefined\n if (!value) {\n return;\n }\n\n // Already a Date object\n if (value instanceof Date) {\n return value;\n }\n\n // Try to convert to Date\n const date = new Date(value);\n\n // Return the date (valid or Invalid Date)\n // dateRule will validate and fail if invalid\n return date;\n};\n\n/** Convert date to ISO string format */\nexport const toISOStringMutator: Mutator = async (value) => {\n const date = new Date(value);\n return date.toISOString();\n};\n\n/** Convert date to Unix timestamp (milliseconds) */\nexport const toTimestampMutator: Mutator = async (value) => {\n const date = new Date(value);\n return date.getTime();\n};\n\n/** Convert date to start of day (00:00:00) */\nexport const toStartOfDayMutator: Mutator = async (value) => {\n const date = new Date(value);\n date.setHours(0, 0, 0, 0);\n return date;\n};\n\n/** Convert date to end of day (23:59:59.999) */\nexport const toEndOfDayMutator: Mutator = async (value) => {\n const date = new Date(value);\n date.setHours(23, 59, 59, 999);\n return date;\n};\n\n/** Add or subtract days from date */\nexport const addDaysMutator: Mutator = async (value, context) => {\n const date = new Date(value);\n const days = context?.options.days ?? 0;\n date.setDate(date.getDate() + days);\n return date;\n};\n\n/** Add or subtract months from date */\nexport const addMonthsMutator: Mutator = async (value, context) => {\n const date = new Date(value);\n const months = context?.options.months ?? 0;\n date.setMonth(date.getMonth() + months);\n return date;\n};\n\n/** Add or subtract years from date */\nexport const addYearsMutator: Mutator = async (value, context) => {\n const date = new Date(value);\n const years = context?.options.years ?? 0;\n date.setFullYear(date.getFullYear() + years);\n return date;\n};\n\n/** Add or subtract hours from date */\nexport const addHoursMutator: Mutator = async (value, context) => {\n const date = new Date(value);\n const hours = context?.options.hours ?? 0;\n date.setHours(date.getHours() + hours);\n return date;\n};\n\n/** Convert date to UTC */\nexport const toUTCMutator: Mutator = async (value) => {\n const date = new Date(value);\n return new Date(date.toUTCString());\n};\n\n/** Convert date to specific format using dayjs */\nexport const toFormatMutator: Mutator = async (value, context) => {\n const format = context?.options.format ?? \"YYYY-MM-DD\";\n return dayjs(value).format(format);\n};\n\n/** Convert to date only (remove time) */\nexport const toDateOnlyMutator: Mutator = async (value) => {\n const date = new Date(value);\n return date.toISOString().split(\"T\")[0];\n};\n\n/** Convert to time only (HH:MM:SS) */\nexport const toTimeOnlyMutator: Mutator = async (value) => {\n const date = new Date(value);\n return date.toTimeString().split(\" \")[0];\n};\n\n/** Set to start of month */\nexport const toStartOfMonthMutator: Mutator = async (value) => {\n const date = new Date(value);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n};\n\n/** Set to end of month */\nexport const toEndOfMonthMutator: Mutator = async (value) => {\n const date = new Date(value);\n date.setMonth(date.getMonth() + 1);\n date.setDate(0);\n date.setHours(23, 59, 59, 999);\n return date;\n};\n\n/** Set to start of year */\nexport const toStartOfYearMutator: Mutator = async (value) => {\n const date = new Date(value);\n date.setMonth(0);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n};\n\n/** Set to end of year */\nexport const toEndOfYearMutator: Mutator = async (value) => {\n const date = new Date(value);\n date.setMonth(11);\n date.setDate(31);\n date.setHours(23, 59, 59, 999);\n return date;\n};\n"],"mappings":";;;;;;;;;AAOA,MAAa,cAAuB,OAAO,UAAU;CAEnD,IAAI,CAAC,OACH;CAIF,IAAI,iBAAiB,MACnB,OAAO;CAQT,OAAO,IAJU,KAAK,KAIZ;AACZ;;AAeA,MAAa,sBAA+B,OAAO,UAAU;CAC3D,MAAM,OAAO,IAAI,KAAK,KAAK;CAC3B,KAAK,SAAS,GAAG,GAAG,GAAG,CAAC;CACxB,OAAO;AACT;;AAGA,MAAa,oBAA6B,OAAO,UAAU;CACzD,MAAM,OAAO,IAAI,KAAK,KAAK;CAC3B,KAAK,SAAS,IAAI,IAAI,IAAI,GAAG;CAC7B,OAAO;AACT;;AAGA,MAAa,iBAA0B,OAAO,OAAO,YAAY;CAC/D,MAAM,OAAO,IAAI,KAAK,KAAK;CAC3B,MAAM,OAAO,SAAS,QAAQ,QAAQ;CACtC,KAAK,QAAQ,KAAK,QAAQ,IAAI,IAAI;CAClC,OAAO;AACT;;AAGA,MAAa,mBAA4B,OAAO,OAAO,YAAY;CACjE,MAAM,OAAO,IAAI,KAAK,KAAK;CAC3B,MAAM,SAAS,SAAS,QAAQ,UAAU;CAC1C,KAAK,SAAS,KAAK,SAAS,IAAI,MAAM;CACtC,OAAO;AACT;;AAGA,MAAa,kBAA2B,OAAO,OAAO,YAAY;CAChE,MAAM,OAAO,IAAI,KAAK,KAAK;CAC3B,MAAM,QAAQ,SAAS,QAAQ,SAAS;CACxC,KAAK,YAAY,KAAK,YAAY,IAAI,KAAK;CAC3C,OAAO;AACT;;AAGA,MAAa,kBAA2B,OAAO,OAAO,YAAY;CAChE,MAAM,OAAO,IAAI,KAAK,KAAK;CAC3B,MAAM,QAAQ,SAAS,QAAQ,SAAS;CACxC,KAAK,SAAS,KAAK,SAAS,IAAI,KAAK;CACrC,OAAO;AACT;;AAGA,MAAa,eAAwB,OAAO,UAAU;CACpD,MAAM,OAAO,IAAI,KAAK,KAAK;CAC3B,OAAO,IAAI,KAAK,KAAK,YAAY,CAAC;AACpC;;AAqBA,MAAa,wBAAiC,OAAO,UAAU;CAC7D,MAAM,OAAO,IAAI,KAAK,KAAK;CAC3B,KAAK,QAAQ,CAAC;CACd,KAAK,SAAS,GAAG,GAAG,GAAG,CAAC;CACxB,OAAO;AACT;;AAGA,MAAa,sBAA+B,OAAO,UAAU;CAC3D,MAAM,OAAO,IAAI,KAAK,KAAK;CAC3B,KAAK,SAAS,KAAK,SAAS,IAAI,CAAC;CACjC,KAAK,QAAQ,CAAC;CACd,KAAK,SAAS,IAAI,IAAI,IAAI,GAAG;CAC7B,OAAO;AACT;;AAGA,MAAa,uBAAgC,OAAO,UAAU;CAC5D,MAAM,OAAO,IAAI,KAAK,KAAK;CAC3B,KAAK,SAAS,CAAC;CACf,KAAK,QAAQ,CAAC;CACd,KAAK,SAAS,GAAG,GAAG,GAAG,CAAC;CACxB,OAAO;AACT;;AAGA,MAAa,qBAA8B,OAAO,UAAU;CAC1D,MAAM,OAAO,IAAI,KAAK,KAAK;CAC3B,KAAK,SAAS,EAAE;CAChB,KAAK,QAAQ,EAAE;CACf,KAAK,SAAS,IAAI,IAAI,IAAI,GAAG;CAC7B,OAAO;AACT"}
@@ -1,8 +1,8 @@
1
- import { round } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/number/round.mjs";
2
- import "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
3
- import { isNumeric } from "../../../node_modules/.pnpm/@mongez_supportive-is@3.0.0/node_modules/@mongez/supportive-is/esm/index.mjs";
1
+ import { round } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/number/round.mjs";
2
+ import "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
3
+ import { isNumeric } from "../../../../node_modules/.pnpm/@mongez_supportive-is@3.0.0/node_modules/@mongez/supportive-is/esm/index.mjs";
4
4
 
5
- //#region ../seal/src/mutators/number-mutators.ts
5
+ //#region ../../packages/seal/src/mutators/number-mutators.ts
6
6
  /** Convert value to number */
7
7
  const numberMutator = async (value) => {
8
8
  if (!value) return value;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-mutators.mjs","names":[],"sources":["../../../../../../../../../../../packages/seal/src/mutators/number-mutators.ts"],"sourcesContent":["import { round } from \"@mongez/reinforcements\";\nimport { isNumeric } from \"@mongez/supportive-is\";\nimport type { Mutator } from \"../types\";\n\n/** Convert value to number */\nexport const numberMutator: Mutator = async (value) => {\n if (!value) return value;\n return Number(value);\n};\n\n/** Round number to specified decimals */\nexport const roundNumberMutator: Mutator = async (value, context) => {\n return round(value, context?.options?.decimals ?? 2);\n};\n\n/** Convert to boolean */\nexport const booleanMutator: Mutator = async (value) => {\n if (value === \"true\") return true;\n if (value === \"false\") return false;\n return Boolean(value);\n};\n\nexport const numericMutator: Mutator = async (value) => {\n if (!isNumeric(value)) return value;\n return Number(value);\n};\n\n/** Absolute value mutator */\nexport const absMutator: Mutator = async (value) => {\n return Math.abs(Number(value));\n};\n\n/** Ceil mutator */\nexport const ceilMutator: Mutator = async (value) => {\n return Math.ceil(Number(value));\n};\n\n/** Floor mutator */\nexport const floorMutator: Mutator = async (value) => {\n return Math.floor(Number(value));\n};\n\n/**\n * Round mutator\n * Supports decimal precision via options.decimals\n */\nexport const roundMutator: Mutator = async (value, context) => {\n const decimals = context?.options?.decimals ?? 0;\n // If decimals is 0, use standard Math.round for integers\n if (decimals === 0) {\n return Math.round(Number(value));\n }\n // Otherwise use reinforcements round helper for precision\n return round(Number(value), decimals);\n};\n\n/**\n * To fixed mutator — rounds to a fixed number of decimal places, as a number.\n *\n * `Number.prototype.toFixed` returns a *string*, which the number validator's\n * own type rule then rejected: `v.number().toFixed(2)` could never produce a\n * valid result. Coercing back to a number keeps the method usable where it\n * lives. For the fixed-point string form, format at the edge instead of asking\n * a number schema to output a string.\n */\nexport const toFixedMutator: Mutator = async (value, context) => {\n const decimals = context?.options?.decimals ?? 2;\n return Number(Number(value).toFixed(decimals));\n};\n"],"mappings":";;;;;;AAKA,MAAa,gBAAyB,OAAO,UAAU;CACrD,IAAI,CAAC,OAAO,OAAO;CACnB,OAAO,OAAO,KAAK;AACrB;AAcA,MAAa,iBAA0B,OAAO,UAAU;CACtD,IAAI,CAAC,UAAU,KAAK,GAAG,OAAO;CAC9B,OAAO,OAAO,KAAK;AACrB;;AAGA,MAAa,aAAsB,OAAO,UAAU;CAClD,OAAO,KAAK,IAAI,OAAO,KAAK,CAAC;AAC/B;;AAGA,MAAa,cAAuB,OAAO,UAAU;CACnD,OAAO,KAAK,KAAK,OAAO,KAAK,CAAC;AAChC;;AAGA,MAAa,eAAwB,OAAO,UAAU;CACpD,OAAO,KAAK,MAAM,OAAO,KAAK,CAAC;AACjC;;;;;AAMA,MAAa,eAAwB,OAAO,OAAO,YAAY;CAC7D,MAAM,WAAW,SAAS,SAAS,YAAY;CAE/C,IAAI,aAAa,GACf,OAAO,KAAK,MAAM,OAAO,KAAK,CAAC;CAGjC,OAAO,MAAM,OAAO,KAAK,GAAG,QAAQ;AACtC;;;;;;;;;;AAWA,MAAa,iBAA0B,OAAO,OAAO,YAAY;CAC/D,MAAM,WAAW,SAAS,SAAS,YAAY;CAC/C,OAAO,OAAO,OAAO,KAAK,CAAC,CAAC,QAAQ,QAAQ,CAAC;AAC/C"}
@@ -1,8 +1,8 @@
1
- import { trim } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/trim.mjs";
2
- import "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
3
- import { isPlainObject } from "../../../node_modules/.pnpm/@mongez_supportive-is@3.0.0/node_modules/@mongez/supportive-is/esm/index.mjs";
1
+ import { trim } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/trim.mjs";
2
+ import "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
3
+ import { isPlainObject } from "../../../../node_modules/.pnpm/@mongez_supportive-is@3.0.0/node_modules/@mongez/supportive-is/esm/index.mjs";
4
4
 
5
- //#region ../seal/src/mutators/object-mutators.ts
5
+ //#region ../../packages/seal/src/mutators/object-mutators.ts
6
6
  /** Strip unknown keys from object */
7
7
  const stripUnknownMutator = async (value, context) => {
8
8
  const allowedKeys = [...context?.ctx.schema ? Object.keys(context.ctx.schema) : [], ...context?.options.allowedKeys ?? []];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object-mutators.mjs","names":[],"sources":["../../../../../../../../../../../packages/seal/src/mutators/object-mutators.ts"],"sourcesContent":["import { trim } from \"@mongez/reinforcements\";\nimport { isPlainObject } from \"@mongez/supportive-is\";\nimport type { Mutator } from \"../types\";\n\n/** Strip unknown keys from object */\nexport const stripUnknownMutator: Mutator = async (value, context) => {\n const allowedKeys = [\n ...(context?.ctx.schema ? Object.keys(context.ctx.schema) : []),\n ...(context?.options.allowedKeys ?? []),\n ];\n\n const result: Record<string, any> = {};\n\n for (const key in value) {\n if (allowedKeys.includes(key)) {\n result[key] = value[key];\n }\n }\n\n return result;\n};\n\n/** Trim all string values in object */\nexport const objectTrimMutator: Mutator = async (value, context) => {\n if (!isPlainObject(value)) return value;\n\n const result: Record<string, any> = {};\n const recursive = context?.options.recursive ?? false;\n\n for (const key in value) {\n const item = value[key];\n\n if (recursive) {\n if (Array.isArray(item)) {\n result[key] = await Promise.all(\n item.map(async (i: any) =>\n typeof i === \"string\" ? trim(i) : await objectTrimMutator(i, context),\n ),\n );\n } else if (isPlainObject(item)) {\n result[key] = await objectTrimMutator(item, context);\n } else {\n result[key] = typeof item === \"string\" ? trim(item) : item;\n }\n } else {\n result[key] = typeof item === \"string\" ? trim(item) : item;\n }\n }\n\n return result;\n};\n\n/** Parse JSON string */\nexport const jsonMutator: Mutator = async (value) => {\n try {\n return JSON.parse(value);\n } catch {\n return value;\n }\n};\n"],"mappings":";;;;;;AAKA,MAAa,sBAA+B,OAAO,OAAO,YAAY;CACpE,MAAM,cAAc,CAClB,GAAI,SAAS,IAAI,SAAS,OAAO,KAAK,QAAQ,IAAI,MAAM,IAAI,CAAC,GAC7D,GAAI,SAAS,QAAQ,eAAe,CAAC,CACvC;CAEA,MAAM,SAA8B,CAAC;CAErC,KAAK,MAAM,OAAO,OAChB,IAAI,YAAY,SAAS,GAAG,GAC1B,OAAO,OAAO,MAAM;CAIxB,OAAO;AACT;;AAGA,MAAa,oBAA6B,OAAO,OAAO,YAAY;CAClE,IAAI,CAAC,cAAc,KAAK,GAAG,OAAO;CAElC,MAAM,SAA8B,CAAC;CACrC,MAAM,YAAY,SAAS,QAAQ,aAAa;CAEhD,KAAK,MAAM,OAAO,OAAO;EACvB,MAAM,OAAO,MAAM;EAEnB,IAAI,WACF,IAAI,MAAM,QAAQ,IAAI,GACpB,OAAO,OAAO,MAAM,QAAQ,IAC1B,KAAK,IAAI,OAAO,MACd,OAAO,MAAM,WAAW,KAAK,CAAC,IAAI,MAAM,kBAAkB,GAAG,OAAO,CACtE,CACF;OACK,IAAI,cAAc,IAAI,GAC3B,OAAO,OAAO,MAAM,kBAAkB,MAAM,OAAO;OAEnD,OAAO,OAAO,OAAO,SAAS,WAAW,KAAK,IAAI,IAAI;OAGxD,OAAO,OAAO,OAAO,SAAS,WAAW,KAAK,IAAI,IAAI;CAE1D;CAEA,OAAO;AACT"}
@@ -1,4 +1,4 @@
1
- //#region ../seal/src/mutators/scalar-mutators.ts
1
+ //#region ../../packages/seal/src/mutators/scalar-mutators.ts
2
2
  const stringMutator = async (value) => {
3
3
  if ([void 0, null].includes(value)) return value;
4
4
  return String(value);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scalar-mutators.mjs","names":[],"sources":["../../../../../../../../../../../packages/seal/src/mutators/scalar-mutators.ts"],"sourcesContent":["import type { Mutator } from \"../types\";\n\nexport const stringMutator: Mutator = async (value) => {\n if ([undefined, null].includes(value)) {\n return value;\n }\n\n return String(value);\n};\n"],"mappings":";AAEA,MAAa,gBAAyB,OAAO,UAAU;CACrD,IAAI,CAAC,QAAW,IAAI,CAAC,CAAC,SAAS,KAAK,GAClC,OAAO;CAGT,OAAO,OAAO,KAAK;AACrB"}
@@ -1,15 +1,15 @@
1
- import { capitalize } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/capitalize.mjs";
2
- import { trim } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/trim.mjs";
3
- import { ltrim } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/ltrim.mjs";
4
- import { readMoreChars } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/readMoreChars.mjs";
5
- import { rtrim } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/rtrim.mjs";
6
- import { toCamelCase } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toCamelCase.mjs";
7
- import { toSnakeCase } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toSnakeCase.mjs";
8
- import { toKebabCase } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toKebabCase.mjs";
9
- import { toStudlyCase } from "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toStudlyCase.mjs";
10
- import "../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
1
+ import { capitalize } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/capitalize.mjs";
2
+ import { trim } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/trim.mjs";
3
+ import { ltrim } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/ltrim.mjs";
4
+ import { readMoreChars } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/readMoreChars.mjs";
5
+ import { rtrim } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/rtrim.mjs";
6
+ import { toCamelCase } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toCamelCase.mjs";
7
+ import { toSnakeCase } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toSnakeCase.mjs";
8
+ import { toKebabCase } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toKebabCase.mjs";
9
+ import { toStudlyCase } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/string/toStudlyCase.mjs";
10
+ import "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
11
11
 
12
- //#region ../seal/src/mutators/string-mutators.ts
12
+ //#region ../../packages/seal/src/mutators/string-mutators.ts
13
13
  /** Convert string to lowercase */
14
14
  const lowercaseMutator = async (value) => {
15
15
  return value?.toString().toLowerCase();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-mutators.mjs","names":[],"sources":["../../../../../../../../../../../packages/seal/src/mutators/string-mutators.ts"],"sourcesContent":["import {\n capitalize,\n ltrim,\n readMoreChars,\n rtrim,\n toCamelCase,\n toKebabCase,\n toSnakeCase,\n toStudlyCase,\n trim,\n} from \"@mongez/reinforcements\";\nimport type { Mutator } from \"../types\";\n\n/** Convert string to lowercase */\nexport const lowercaseMutator: Mutator = async (value) => {\n return value?.toString().toLowerCase();\n};\n\n/** Convert string to uppercase */\nexport const uppercaseMutator: Mutator = async (value) => {\n return value?.toString().toUpperCase();\n};\n\n/** Capitalize only the first letter of the string */\nexport const capitalizeMutator: Mutator = async (value) => {\n const str = value?.toString();\n return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();\n};\n\n/** Capitalize the first letter of each word (Title Case) */\nexport const titleCaseMutator: Mutator = async (value) => {\n return capitalize(value?.toString());\n};\n\n/** Convert value to string */\nexport const stringifyMutator: Mutator = async (value) => {\n if (!value && value !== 0) return \"\";\n // only convert numbers, boolean and strings\n\n // Handle strings (pass through)\n if (typeof value === \"string\") return value;\n\n // Handle scalar types (number, boolean)\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n};\n\n/** Trim whitespace */\nexport const trimMutator: Mutator = async (value, context) => {\n return trim(value?.toString(), context?.options?.needle ?? \" \");\n};\n\n/**\n * Strip HTML tags with a naive `<...>` regex.\n *\n * This is a **tag stripper, not an XSS sanitizer**: it is not a parser, so\n * malformed/nested markup, attribute payloads, or content re-introduced\n * later in a pipeline can defeat it. Do not rely on this alone to make\n * untrusted rich text safe to render — use a real parser-based sanitizer\n * (e.g. DOMPurify / sanitize-html) for that.\n */\nexport const stripTagsMutator: Mutator = async (value) => {\n return value?.toString().replace(/<[^>]*>?/gm, \"\");\n};\n\n/**\n * @deprecated Renamed to {@link stripTagsMutator} — the old name implied\n * XSS safety this tag-stripping regex does not provide. Kept as an alias\n * for backward compatibility; switch to `stripTagsMutator`.\n */\nexport const safeHtmlMutator: Mutator = stripTagsMutator;\n\n/** HTML escape */\nexport const htmlEscapeMutator: Mutator = async (value) => {\n return value\n ?.toString()\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n .replace(/\"/g, \"&quot;\")\n .replace(/'/g, \"&#039;\");\n};\n\n/** Remove special characters */\nexport const removeSpecialCharactersMutator: Mutator = async (value) => {\n return value?.toString().replace(/[^a-zA-Z0-9]/g, \"\");\n};\n\n/** URL decode */\nexport const urlDecodeMutator: Mutator = async (value) => {\n return decodeURIComponent(value);\n};\n\n/** URL encode */\nexport const urlEncodeMutator: Mutator = async (value) => {\n return encodeURIComponent(value);\n};\n\n/** Convert to camelCase */\nexport const camelCaseMutator: Mutator = async (value) => {\n return toCamelCase(value?.toString());\n};\n\n/** Convert to PascalCase */\nexport const pascalCaseMutator: Mutator = async (value) => {\n return toStudlyCase(value?.toString());\n};\n\n/** Convert to snake_case */\nexport const snakeCaseMutator: Mutator = async (value) => {\n return toSnakeCase(value?.toString());\n};\n\n/** Convert to kebab-case */\nexport const kebabCaseMutator: Mutator = async (value) => {\n return toKebabCase(value?.toString());\n};\n\n/** Convert to URL-friendly slug */\nexport const slugMutator: Mutator = async (value) => {\n return value\n ?.toString()\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_]+/g, \"-\")\n .replace(/--+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n};\n\n/** Trim from the left/start */\nexport const ltrimMutator: Mutator = async (value, context) => {\n return ltrim(value?.toString(), context?.options?.needle ?? \" \");\n};\n\n/** Trim from the right/end */\nexport const rtrimMutator: Mutator = async (value, context) => {\n return rtrim(value?.toString(), context?.options?.needle ?? \" \");\n};\n\n/** Base64 encode */\nexport const base64EncodeMutator: Mutator = async (value) => {\n return Buffer.from(value?.toString()).toString(\"base64\");\n};\n\n/** Base64 decode */\nexport const base64DecodeMutator: Mutator = async (value) => {\n return Buffer.from(value?.toString(), \"base64\").toString(\"utf-8\");\n};\n\n/** Replace substring or pattern */\nexport const replaceMutator: Mutator = async (value, context) => {\n const { search, replace } = context?.options;\n if (!search) return value?.toString();\n return value?.toString().replace(search, replace ?? \"\");\n};\n\n/** Replace all occurrences of substring or pattern */\nexport const replaceAllMutator: Mutator = async (value, context) => {\n const { search, replace } = context?.options;\n if (!search) return value?.toString();\n const searchValue = typeof search === \"string\" ? new RegExp(search, \"g\") : search;\n return value?.toString().replace(searchValue, replace ?? \"\");\n};\n\n/** Append/suffix text to the end */\nexport const appendMutator: Mutator = async (value, context) => {\n const suffix = context?.options?.suffix ?? \"\";\n return value?.toString() + suffix;\n};\n\n/** Prepend/prefix text to the beginning */\nexport const prependMutator: Mutator = async (value, context) => {\n const prefix = context?.options?.prefix ?? \"\";\n return prefix + value?.toString();\n};\n\n/** Reverse the string */\nexport const reverseMutator: Mutator = async (value) => {\n return value?.toString().split(\"\").reverse().join(\"\");\n};\n\n/** Truncate to a maximum length */\nexport const truncateMutator: Mutator = async (value, context) => {\n const str = value?.toString();\n const maxLength = context?.options?.maxLength ?? 100;\n const suffix = context?.options?.suffix ?? \"...\";\n return readMoreChars(str, maxLength, suffix);\n};\n\n/** Trim multiple whitespace into single space */\nexport const trimMultipleWhitespaceMutator: Mutator = async (value) => {\n return value?.toString().replace(/\\s+/g, \" \");\n};\n\n/** Pad string from the start to reach target length */\nexport const padStartMutator: Mutator = async (value, context) => {\n const length = context?.options?.length ?? 0;\n const char = context?.options?.char ?? \" \";\n return value?.toString().padStart(length, char);\n};\n\n/** Pad string from the end to reach target length */\nexport const padEndMutator: Mutator = async (value, context) => {\n const length = context?.options?.length ?? 0;\n const char = context?.options?.char ?? \" \";\n return value?.toString().padEnd(length, char);\n};\n\n/** Repeat string N times */\nexport const repeatMutator: Mutator = async (value, context) => {\n const count = context?.options?.count ?? 1;\n return value?.toString()?.repeat(count);\n};\n\n/** Mask part of string */\nexport const maskMutator: Mutator = async (value, context) => {\n const str = value?.toString();\n const maskChar = context?.options?.char ?? \"*\";\n const start = context?.options?.start ?? 0;\n const end = context?.options?.end ?? str?.length;\n const visibleStart = str?.substring(0, start);\n const visibleEnd = str?.substring(end);\n const maskedLength = end - start;\n return visibleStart + maskChar.repeat(maskedLength) + visibleEnd;\n};\n\n/** Unescape HTML entities */\nexport const unescapeHtmlMutator: Mutator = async (value) => {\n return value\n ?.toString()\n .replace(/&amp;/g, \"&\")\n .replace(/&lt;/g, \"<\")\n .replace(/&gt;/g, \">\")\n .replace(/&quot;/g, '\"')\n .replace(/&#039;/g, \"'\");\n};\n\n/** Keep only alphabetic characters */\nexport const alphaOnlyMutator: Mutator = async (value) => {\n return value.toString().replace(/[^a-zA-Z]/g, \"\");\n};\n\n/** Keep only alphanumeric characters */\nexport const alphanumericOnlyMutator: Mutator = async (value) => {\n return value.toString().replace(/[^a-zA-Z0-9]/g, \"\");\n};\n\n/** Remove all numeric characters */\nexport const removeNumbersMutator: Mutator = async (value) => {\n return value.toString().replace(/[0-9]/g, \"\");\n};\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAa,mBAA4B,OAAO,UAAU;CACxD,OAAO,OAAO,SAAS,CAAC,CAAC,YAAY;AACvC;;AAGA,MAAa,mBAA4B,OAAO,UAAU;CACxD,OAAO,OAAO,SAAS,CAAC,CAAC,YAAY;AACvC;;AAGA,MAAa,oBAA6B,OAAO,UAAU;CACzD,MAAM,MAAM,OAAO,SAAS;CAC5B,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,YAAY;AAChE;;AAGA,MAAa,mBAA4B,OAAO,UAAU;CACxD,OAAO,WAAW,OAAO,SAAS,CAAC;AACrC;;AAGA,MAAa,mBAA4B,OAAO,UAAU;CACxD,IAAI,CAAC,SAAS,UAAU,GAAG,OAAO;CAIlC,IAAI,OAAO,UAAU,UAAU,OAAO;CAGtC,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAChD,OAAO,OAAO,KAAK;AAEvB;;AAGA,MAAa,cAAuB,OAAO,OAAO,YAAY;CAC5D,OAAO,KAAK,OAAO,SAAS,GAAG,SAAS,SAAS,UAAU,GAAG;AAChE;;;;;;;;;;AAWA,MAAa,mBAA4B,OAAO,UAAU;CACxD,OAAO,OAAO,SAAS,CAAC,CAAC,QAAQ,cAAc,EAAE;AACnD;;AAUA,MAAa,oBAA6B,OAAO,UAAU;CACzD,OAAO,OACH,SAAS,CAAC,CACX,QAAQ,MAAM,OAAO,CAAC,CACtB,QAAQ,MAAM,MAAM,CAAC,CACrB,QAAQ,MAAM,MAAM,CAAC,CACrB,QAAQ,MAAM,QAAQ,CAAC,CACvB,QAAQ,MAAM,QAAQ;AAC3B;;AAGA,MAAa,iCAA0C,OAAO,UAAU;CACtE,OAAO,OAAO,SAAS,CAAC,CAAC,QAAQ,iBAAiB,EAAE;AACtD;;AAGA,MAAa,mBAA4B,OAAO,UAAU;CACxD,OAAO,mBAAmB,KAAK;AACjC;;AAGA,MAAa,mBAA4B,OAAO,UAAU;CACxD,OAAO,mBAAmB,KAAK;AACjC;;AAGA,MAAa,mBAA4B,OAAO,UAAU;CACxD,OAAO,YAAY,OAAO,SAAS,CAAC;AACtC;;AAGA,MAAa,oBAA6B,OAAO,UAAU;CACzD,OAAO,aAAa,OAAO,SAAS,CAAC;AACvC;;AAGA,MAAa,mBAA4B,OAAO,UAAU;CACxD,OAAO,YAAY,OAAO,SAAS,CAAC;AACtC;;AAGA,MAAa,mBAA4B,OAAO,UAAU;CACxD,OAAO,YAAY,OAAO,SAAS,CAAC;AACtC;;AAGA,MAAa,cAAuB,OAAO,UAAU;CACnD,OAAO,OACH,SAAS,CAAC,CACX,YAAY,CAAC,CACb,KAAK,CAAC,CACN,QAAQ,aAAa,EAAE,CAAC,CACxB,QAAQ,WAAW,GAAG,CAAC,CACvB,QAAQ,QAAQ,GAAG,CAAC,CACpB,QAAQ,YAAY,EAAE;AAC3B;;AAGA,MAAa,eAAwB,OAAO,OAAO,YAAY;CAC7D,OAAO,MAAM,OAAO,SAAS,GAAG,SAAS,SAAS,UAAU,GAAG;AACjE;;AAGA,MAAa,eAAwB,OAAO,OAAO,YAAY;CAC7D,OAAO,MAAM,OAAO,SAAS,GAAG,SAAS,SAAS,UAAU,GAAG;AACjE;;AAGA,MAAa,sBAA+B,OAAO,UAAU;CAC3D,OAAO,OAAO,KAAK,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,QAAQ;AACzD;;AAGA,MAAa,sBAA+B,OAAO,UAAU;CAC3D,OAAO,OAAO,KAAK,OAAO,SAAS,GAAG,QAAQ,CAAC,CAAC,SAAS,OAAO;AAClE;;AAGA,MAAa,iBAA0B,OAAO,OAAO,YAAY;CAC/D,MAAM,EAAE,QAAQ,YAAY,SAAS;CACrC,IAAI,CAAC,QAAQ,OAAO,OAAO,SAAS;CACpC,OAAO,OAAO,SAAS,CAAC,CAAC,QAAQ,QAAQ,WAAW,EAAE;AACxD;;AAGA,MAAa,oBAA6B,OAAO,OAAO,YAAY;CAClE,MAAM,EAAE,QAAQ,YAAY,SAAS;CACrC,IAAI,CAAC,QAAQ,OAAO,OAAO,SAAS;CACpC,MAAM,cAAc,OAAO,WAAW,WAAW,IAAI,OAAO,QAAQ,GAAG,IAAI;CAC3E,OAAO,OAAO,SAAS,CAAC,CAAC,QAAQ,aAAa,WAAW,EAAE;AAC7D;;AAGA,MAAa,gBAAyB,OAAO,OAAO,YAAY;CAC9D,MAAM,SAAS,SAAS,SAAS,UAAU;CAC3C,OAAO,OAAO,SAAS,IAAI;AAC7B;;AAGA,MAAa,iBAA0B,OAAO,OAAO,YAAY;CAE/D,QADe,SAAS,SAAS,UAAU,MAC3B,OAAO,SAAS;AAClC;;AAGA,MAAa,iBAA0B,OAAO,UAAU;CACtD,OAAO,OAAO,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE;AACtD;;AAGA,MAAa,kBAA2B,OAAO,OAAO,YAAY;CAChE,MAAM,MAAM,OAAO,SAAS;CAG5B,OAAO,cAAc,KAFH,SAAS,SAAS,aAAa,KAClC,SAAS,SAAS,UAAU,KACA;AAC7C;;AAGA,MAAa,gCAAyC,OAAO,UAAU;CACrE,OAAO,OAAO,SAAS,CAAC,CAAC,QAAQ,QAAQ,GAAG;AAC9C;;AAGA,MAAa,kBAA2B,OAAO,OAAO,YAAY;CAChE,MAAM,SAAS,SAAS,SAAS,UAAU;CAC3C,MAAM,OAAO,SAAS,SAAS,QAAQ;CACvC,OAAO,OAAO,SAAS,CAAC,CAAC,SAAS,QAAQ,IAAI;AAChD;;AAGA,MAAa,gBAAyB,OAAO,OAAO,YAAY;CAC9D,MAAM,SAAS,SAAS,SAAS,UAAU;CAC3C,MAAM,OAAO,SAAS,SAAS,QAAQ;CACvC,OAAO,OAAO,SAAS,CAAC,CAAC,OAAO,QAAQ,IAAI;AAC9C;;AAGA,MAAa,gBAAyB,OAAO,OAAO,YAAY;CAC9D,MAAM,QAAQ,SAAS,SAAS,SAAS;CACzC,OAAO,OAAO,SAAS,CAAC,EAAE,OAAO,KAAK;AACxC;;AAGA,MAAa,cAAuB,OAAO,OAAO,YAAY;CAC5D,MAAM,MAAM,OAAO,SAAS;CAC5B,MAAM,WAAW,SAAS,SAAS,QAAQ;CAC3C,MAAM,QAAQ,SAAS,SAAS,SAAS;CACzC,MAAM,MAAM,SAAS,SAAS,OAAO,KAAK;CAC1C,MAAM,eAAe,KAAK,UAAU,GAAG,KAAK;CAC5C,MAAM,aAAa,KAAK,UAAU,GAAG;CACrC,MAAM,eAAe,MAAM;CAC3B,OAAO,eAAe,SAAS,OAAO,YAAY,IAAI;AACxD;;AAGA,MAAa,sBAA+B,OAAO,UAAU;CAC3D,OAAO,OACH,SAAS,CAAC,CACX,QAAQ,UAAU,GAAG,CAAC,CACtB,QAAQ,SAAS,GAAG,CAAC,CACrB,QAAQ,SAAS,GAAG,CAAC,CACrB,QAAQ,WAAW,IAAG,CAAC,CACvB,QAAQ,WAAW,GAAG;AAC3B;;AAGA,MAAa,mBAA4B,OAAO,UAAU;CACxD,OAAO,MAAM,SAAS,CAAC,CAAC,QAAQ,cAAc,EAAE;AAClD;;AAGA,MAAa,0BAAmC,OAAO,UAAU;CAC/D,OAAO,MAAM,SAAS,CAAC,CAAC,QAAQ,iBAAiB,EAAE;AACrD;;AAGA,MAAa,uBAAgC,OAAO,UAAU;CAC5D,OAAO,MAAM,SAAS,CAAC,CAAC,QAAQ,UAAU,EAAE;AAC9C"}
@@ -4,7 +4,7 @@ import "./validators/methods/present-methods.mjs";
4
4
  import "./validators/methods/required-methods.mjs";
5
5
  import { ObjectValidator } from "./validators/object-validator.mjs";
6
6
 
7
- //#region ../seal/src/object.ts
7
+ //#region ../../packages/seal/src/object.ts
8
8
  /** Create an object schema without importing the complete `v` factory. */
9
9
  const object = (schema, errorMessage) => new ObjectValidator(schema, errorMessage);
10
10
 
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.mjs","names":[],"sources":["../../../../../../../../../../packages/seal/src/object.ts"],"sourcesContent":["import type { StandardSchemaV1 } from \"./standard-schema/types\";\nimport type { Schema } from \"./types\";\nimport type { Infer } from \"./types/inference-types\";\nimport { ObjectValidator } from \"./validators/object-validator\";\n\n// Keep both runtime chain methods and their declaration augmentations in\n// this standalone entry, without loading the complete validator factory.\nexport { equalityConditionalMethodsApplied } from \"./validators/methods/equality-conditional-methods\";\nexport { forbiddenMethodsApplied } from \"./validators/methods/forbidden-methods\";\nexport { presentMethodsApplied } from \"./validators/methods/present-methods\";\nexport { requiredMethodsApplied } from \"./validators/methods/required-methods\";\nexport { ObjectValidator };\n\n/** Create an object schema without importing the complete `v` factory. */\nexport const object = <T extends Schema>(schema: T, errorMessage?: string) =>\n new ObjectValidator<T>(schema, errorMessage) as ObjectValidator<T> &\n StandardSchemaV1<Infer<ObjectValidator<T>>>;\n"],"mappings":";;;;;;;;AAcA,MAAa,UAA4B,QAAW,iBAClD,IAAI,gBAAmB,QAAQ,YAAY"}
@@ -1,7 +1,7 @@
1
1
  import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
 
4
- //#region ../seal/src/rules/array/array-rules.ts
4
+ //#region ../../packages/seal/src/rules/array/array-rules.ts
5
5
  /**
6
6
  * Unique array rule - array must contain unique values
7
7
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array-rules.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/array/array-rules.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Unique array rule - array must contain unique values\n */\nexport const uniqueArrayRule: SchemaRule = {\n name: \"uniqueArray\",\n description: \"The array must contain unique values\",\n defaultErrorMessage: \"The :input must contain unique values\",\n async validate(value: any, context) {\n const uniqueValues = new Set(value);\n\n if (uniqueValues.size === value.length) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Sorted array rule - array must be sorted\n */\nexport const sortedArrayRule: SchemaRule<{\n direction?: \"asc\" | \"desc\";\n}> = {\n name: \"sortedArray\",\n description: \"The array must be sorted\",\n defaultErrorMessage: \"The :input must be sorted\",\n async validate(value: any[], context) {\n if (!Array.isArray(value) || value.length <= 1) {\n return VALID_RULE;\n }\n\n const direction = this.context.options.direction ?? \"asc\";\n this.context.translatableParams.direction = direction;\n\n for (let i = 0; i < value.length - 1; i++) {\n const current = value[i];\n const next = value[i + 1];\n\n if (direction === \"asc\") {\n if (current > next) {\n return invalidRule(this, context);\n }\n } else {\n if (current < next) {\n return invalidRule(this, context);\n }\n }\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,kBAA8B;CACzC,MAAM;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAGlC,IAAI,IAFqB,IAAI,KAEd,CAAC,CAAC,SAAS,MAAM,QAC9B,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,kBAER;CACH,MAAM;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAc,SAAS;EACpC,IAAI,CAAC,MAAM,QAAQ,KAAK,KAAK,MAAM,UAAU,GAC3C,OAAO;EAGT,MAAM,YAAY,KAAK,QAAQ,QAAQ,aAAa;EACpD,KAAK,QAAQ,mBAAmB,YAAY;EAE5C,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,SAAS,GAAG,KAAK;GACzC,MAAM,UAAU,MAAM;GACtB,MAAM,OAAO,MAAM,IAAI;GAEvB,IAAI,cAAc,OAChB;QAAI,UAAU,MACZ,OAAO,YAAY,MAAM,OAAO;GAClC,OAEA,IAAI,UAAU,MACZ,OAAO,YAAY,MAAM,OAAO;EAGtC;EAEA,OAAO;CACT;AACF"}
@@ -1,7 +1,7 @@
1
1
  import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
 
4
- //#region ../seal/src/rules/color/color-rules.ts
4
+ //#region ../../packages/seal/src/rules/color/color-rules.ts
5
5
  /**
6
6
  * Color validation regex patterns
7
7
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-rules.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/color/color-rules.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Color validation regex patterns\n */\nconst colorValidationRegex = {\n hex: /^#([0-9a-f]{3}){1,2}$/i,\n rgb: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n rgba: /^rgba\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*(0?\\.\\d+|1)\\)$/,\n hsl: /^hsl\\((\\d{1,3}),\\s*(\\d{1,3})%?,\\s*(\\d{1,3})%?\\)$/,\n};\n\n/**\n * Generic color rule - validates any color format\n */\nexport const colorRule: SchemaRule = {\n name: \"color\",\n defaultErrorMessage: \"The :input must be a valid color\",\n async validate(value: any, context) {\n const isValidColor =\n colorValidationRegex.hex.test(value) ||\n colorValidationRegex.rgb.test(value) ||\n colorValidationRegex.rgba.test(value) ||\n colorValidationRegex.hsl.test(value);\n\n if (isValidColor) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Hex color rule\n */\nexport const hexColorRule: SchemaRule = {\n name: \"hexColor\",\n defaultErrorMessage: \"The :input must be a valid hex color\",\n async validate(value: any, context) {\n if (colorValidationRegex.hex.test(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * RGB color rule\n */\nexport const rgbColorRule: SchemaRule = {\n name: \"rgbColor\",\n defaultErrorMessage: \"The :input must be a valid RGB color\",\n async validate(value: any, context) {\n if (colorValidationRegex.rgb.test(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * RGBA color rule\n */\nexport const rgbaColorRule: SchemaRule = {\n name: \"rgbaColor\",\n defaultErrorMessage: \"The :input must be a valid RGBA color\",\n async validate(value: any, context) {\n if (colorValidationRegex.rgba.test(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * HSL color rule\n */\nexport const hslColorRule: SchemaRule = {\n name: \"hslColor\",\n defaultErrorMessage: \"The :input must be a valid HSL color\",\n async validate(value: any, context) {\n if (colorValidationRegex.hsl.test(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Light color rule\n */\nexport const lightColorRule: SchemaRule = {\n name: \"lightColor\",\n defaultErrorMessage: \"The :input must be a light color\",\n async validate(value: any, context) {\n if (!colorValidationRegex.hex.test(value)) {\n return invalidRule(this, context);\n }\n\n const hex = value.replace(\"#\", \"\");\n const r = parseInt(hex.substring(0, 2), 16);\n const g = parseInt(hex.substring(2, 4), 16);\n const b = parseInt(hex.substring(4, 6), 16);\n const brightness = (r * 299 + g * 587 + b * 114) / 1000;\n\n if (brightness > 155) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Dark color rule\n */\nexport const darkColorRule: SchemaRule = {\n name: \"darkColor\",\n defaultErrorMessage: \"The :input must be a dark color\",\n async validate(value: any, context) {\n if (!colorValidationRegex.hex.test(value)) {\n return invalidRule(this, context);\n }\n\n const hex = value.replace(\"#\", \"\");\n const r = parseInt(hex.substring(0, 2), 16);\n const g = parseInt(hex.substring(2, 4), 16);\n const b = parseInt(hex.substring(4, 6), 16);\n const brightness = (r * 299 + g * 587 + b * 114) / 1000;\n\n if (brightness <= 155) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAM,uBAAuB;CAC3B,KAAK;CACL,KAAK;CACL,MAAM;CACN,KAAK;AACP;;;;AAKA,MAAa,YAAwB;CACnC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAOlC,IALE,qBAAqB,IAAI,KAAK,KAAK,KACnC,qBAAqB,IAAI,KAAK,KAAK,KACnC,qBAAqB,KAAK,KAAK,KAAK,KACpC,qBAAqB,IAAI,KAAK,KAAK,GAGnC,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,eAA2B;CACtC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,qBAAqB,IAAI,KAAK,KAAK,GACrC,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,eAA2B;CACtC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,qBAAqB,IAAI,KAAK,KAAK,GACrC,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,gBAA4B;CACvC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,qBAAqB,KAAK,KAAK,KAAK,GACtC,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,eAA2B;CACtC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,qBAAqB,IAAI,KAAK,KAAK,GACrC,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,iBAA6B;CACxC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,CAAC,qBAAqB,IAAI,KAAK,KAAK,GACtC,OAAO,YAAY,MAAM,OAAO;EAGlC,MAAM,MAAM,MAAM,QAAQ,KAAK,EAAE;EACjC,MAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;EAC1C,MAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;EAC1C,MAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;EAG1C,KAFoB,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,MAElC,KACf,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,gBAA4B;CACvC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,CAAC,qBAAqB,IAAI,KAAK,KAAK,GACtC,OAAO,YAAY,MAAM,OAAO;EAGlC,MAAM,MAAM,MAAM,QAAQ,KAAK,EAAE;EACjC,MAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;EAC1C,MAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;EAC1C,MAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;EAG1C,KAFoB,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,OAEjC,KAChB,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,7 +1,7 @@
1
1
  import { VALID_RULE, invalidRule, resolveTranslation } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
 
4
- //#region ../seal/src/rules/common/enum.ts
4
+ //#region ../../packages/seal/src/rules/common/enum.ts
5
5
  /**
6
6
  * Enum rule - value must be one of the enum values
7
7
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/common/enum.ts"],"sourcesContent":["import { invalidRule, resolveTranslation, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Enum rule - value must be one of the enum values\n */\nexport const enumRule: SchemaRule<{ enum: any }> = {\n name: \"enum\",\n defaultErrorMessage: \"The :input must be one of the following values: :enum\",\n async validate(value: any, context) {\n const enumValues = this.context.options.enum;\n\n if (enumValues.includes(value)) {\n return VALID_RULE;\n }\n\n // Translate each enum value individually, then join into a display string\n this.context.translationParams.enum = enumValues\n .map((v: any) =>\n resolveTranslation({ key: String(v), rawValue: String(v), rule: this, context }),\n )\n .join(\", \");\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * In rule - value must be in the given array\n */\nexport const inRule: SchemaRule<{ values: any[] }> = {\n name: \"in\",\n defaultErrorMessage: \"The :input must be one of the following values: :values\",\n async validate(value: any, context) {\n if (this.context.options.values.includes(value)) {\n return VALID_RULE;\n }\n\n // Translate each value individually, then join\n this.context.translationParams.values = this.context.options.values\n .map((v: any) =>\n resolveTranslation({ key: String(v), rawValue: String(v), rule: this, context }),\n )\n .join(\", \");\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Allowed values rule - value must be one of allowed values\n */\nexport const allowedValuesRule: SchemaRule<{ allowedValues: any[] }> = {\n name: \"allowedValues\",\n defaultErrorMessage: \"The :input must be one of the allowed values\",\n async validate(value: any, context) {\n if (this.context.options.allowedValues.includes(value)) {\n return VALID_RULE;\n }\n\n // Translate each value individually, then join\n this.context.translationParams.allowedValues = this.context.options.allowedValues\n .map((v: any) =>\n resolveTranslation({ key: String(v), rawValue: String(v), rule: this, context }),\n )\n .join(\", \");\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Not allowed values rule - value must not be in forbidden list\n */\nexport const notAllowedValuesRule: SchemaRule<{ notAllowedValues: any[] }> = {\n name: \"notAllowedValues\",\n defaultErrorMessage: \"The :input contains a forbidden value\",\n async validate(value: any, context) {\n if (!this.context.options.notAllowedValues.includes(value)) {\n return VALID_RULE;\n }\n\n // Translate each value individually, then join\n this.context.translationParams.notAllowedValues = this.context.options.notAllowedValues\n .map((v: any) =>\n resolveTranslation({ key: String(v), rawValue: String(v), rule: this, context }),\n )\n .join(\", \");\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,WAAsC;CACjD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,KAAK,QAAQ,QAAQ;EAExC,IAAI,WAAW,SAAS,KAAK,GAC3B,OAAO;EAIT,KAAK,QAAQ,kBAAkB,OAAO,WACnC,KAAK,MACJ,mBAAmB;GAAE,KAAK,OAAO,CAAC;GAAG,UAAU,OAAO,CAAC;GAAG,MAAM;GAAM;EAAQ,CAAC,CACjF,CAAC,CACA,KAAK,IAAI;EAEZ,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,SAAwC;CACnD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,KAAK,QAAQ,QAAQ,OAAO,SAAS,KAAK,GAC5C,OAAO;EAIT,KAAK,QAAQ,kBAAkB,SAAS,KAAK,QAAQ,QAAQ,OAC1D,KAAK,MACJ,mBAAmB;GAAE,KAAK,OAAO,CAAC;GAAG,UAAU,OAAO,CAAC;GAAG,MAAM;GAAM;EAAQ,CAAC,CACjF,CAAC,CACA,KAAK,IAAI;EAEZ,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,oBAA0D;CACrE,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,KAAK,QAAQ,QAAQ,cAAc,SAAS,KAAK,GACnD,OAAO;EAIT,KAAK,QAAQ,kBAAkB,gBAAgB,KAAK,QAAQ,QAAQ,cACjE,KAAK,MACJ,mBAAmB;GAAE,KAAK,OAAO,CAAC;GAAG,UAAU,OAAO,CAAC;GAAG,MAAM;GAAM;EAAQ,CAAC,CACjF,CAAC,CACA,KAAK,IAAI;EAEZ,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,uBAAgE;CAC3E,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,CAAC,KAAK,QAAQ,QAAQ,iBAAiB,SAAS,KAAK,GACvD,OAAO;EAIT,KAAK,QAAQ,kBAAkB,mBAAmB,KAAK,QAAQ,QAAQ,iBACpE,KAAK,MACJ,mBAAmB;GAAE,KAAK,OAAO,CAAC;GAAG,UAAU,OAAO,CAAC;GAAG,MAAM;GAAM;EAAQ,CAAC,CACjF,CAAC,CACA,KAAK,IAAI;EAEZ,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import { getFieldValue } from "../../helpers/get-field-value.mjs";
3
3
  import "../../helpers/index.mjs";
4
4
 
5
- //#region ../seal/src/rules/common/equals-field-rules.ts
5
+ //#region ../../packages/seal/src/rules/common/equals-field-rules.ts
6
6
  /**
7
7
  * Equals field rule - value must equal another field's value
8
8
  * Supports both global and sibling scope
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equals-field-rules.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/common/equals-field-rules.ts"],"sourcesContent":["import { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Equals field rule - value must equal another field's value\n * Supports both global and sibling scope\n */\nexport const equalsFieldRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"equalsField\",\n description: \"The value must equal another field's value\",\n sortOrder: -1,\n requiresValue: true,\n defaultErrorMessage: \"The :input must match the :field field\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Value must equal the other field's value\n if (value !== fieldValue) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Not equals field rule - value must NOT equal another field's value\n * Supports both global and sibling scope\n */\nexport const notEqualsFieldRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"notEqualsField\",\n description: \"The value must NOT equal another field's value\",\n sortOrder: -1,\n requiresValue: true,\n defaultErrorMessage: \"The :input must not match the :field field\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Value must NOT equal the other field's value\n if (value === fieldValue) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;AAOA,MAAa,kBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAIlC,IAAI,UAHe,cAAc,MAAM,OAGhB,GAAG;GACxB,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,qBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAIlC,IAAI,UAHe,cAAc,MAAM,OAGhB,GACrB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
@@ -1,7 +1,7 @@
1
1
  import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
 
4
- //#region ../seal/src/rules/common/instanceof.ts
4
+ //#region ../../packages/seal/src/rules/common/instanceof.ts
5
5
  /**
6
6
  * InstanceOf rule - value must be an instance of the given constructor.
7
7
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instanceof.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/common/instanceof.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * InstanceOf rule - value must be an instance of the given constructor.\n *\n * Uses the `instanceof` operator at runtime. Useful for class instances\n * not representable in JSON Schema (File, Buffer, custom domain classes).\n */\nexport const instanceofRule: SchemaRule<{ ctor: new (...args: any[]) => any; name: string }> = {\n name: \"instanceof\",\n defaultErrorMessage: \"The :input must be an instance of :name\",\n async validate(value: any, context) {\n if (value instanceof this.context.options.ctor) {\n return VALID_RULE;\n }\n\n this.context.translationParams.name = this.context.options.name;\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;;;AASA,MAAa,iBAAkF;CAC7F,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,iBAAiB,KAAK,QAAQ,QAAQ,MACxC,OAAO;EAGT,KAAK,QAAQ,kBAAkB,OAAO,KAAK,QAAQ,QAAQ;EAE3D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,7 +1,7 @@
1
1
  import { VALID_RULE, invalidRule, resolveTranslation } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
 
4
- //#region ../seal/src/rules/common/literal.ts
4
+ //#region ../../packages/seal/src/rules/common/literal.ts
5
5
  /**
6
6
  * Literal rule - value must be strictly equal to one of the literal values.
7
7
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literal.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/common/literal.ts"],"sourcesContent":["import { invalidRule, resolveTranslation, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Literal rule - value must be strictly equal to one of the literal values.\n *\n * Uses === (referential / strict equality), so distinguishes 1 from \"1\",\n * true from \"true\", etc. Mirrors `v.string().oneOf([...])` but at the\n * literal type level (TypeScript narrows to the union of literals).\n */\nexport const literalRule: SchemaRule<{ values: readonly (string | number | boolean)[] }> = {\n name: \"literal\",\n // Runs even on \"empty\" values. A literal set is an exact-match whitelist, so\n // there is no value it cannot safely be asked about — and `\"\"` is one of the\n // values callers most want to pin (`alt=\"\"` for a decorative image). Left at\n // the default, the empty string would skip this check entirely, which made\n // `v.literal(\"\").optional()` accept `\"\"`, `null` AND a missing key alike.\n requiresValue: false,\n defaultErrorMessage: \"The :input must be one of the following values: :values\",\n async validate(value: any, context) {\n // Absence is the required/present rule's question, not this one. Without\n // this, `requiresValue: false` above would make the literal check fire on a\n // missing key and defeat `.optional()`, which works by removing that rule.\n if (value === undefined) {\n return VALID_RULE;\n }\n\n if (this.context.options.values.includes(value)) {\n return VALID_RULE;\n }\n\n this.context.translationParams.values = this.context.options.values\n .map(v =>\n resolveTranslation({ key: String(v), rawValue: String(v), rule: this, context }),\n )\n .join(\", \");\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,cAA8E;CACzF,MAAM;CAMN,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAIlC,IAAI,UAAU,QACZ,OAAO;EAGT,IAAI,KAAK,QAAQ,QAAQ,OAAO,SAAS,KAAK,GAC5C,OAAO;EAGT,KAAK,QAAQ,kBAAkB,SAAS,KAAK,QAAQ,QAAQ,OAC1D,KAAI,MACH,mBAAmB;GAAE,KAAK,OAAO,CAAC;GAAG,UAAU,OAAO,CAAC;GAAG,MAAM;GAAM;EAAQ,CAAC,CACjF,CAAC,CACA,KAAK,IAAI;EAEZ,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,8 +1,8 @@
1
1
  import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
- import { isObject, isPlainObject } from "../../../../node_modules/.pnpm/@mongez_supportive-is@3.0.0/node_modules/@mongez/supportive-is/esm/index.mjs";
2
+ import { isObject, isPlainObject } from "../../../../../node_modules/.pnpm/@mongez_supportive-is@3.0.0/node_modules/@mongez/supportive-is/esm/index.mjs";
3
3
  import "../../helpers/index.mjs";
4
4
 
5
- //#region ../seal/src/rules/common/type-rules.ts
5
+ //#region ../../packages/seal/src/rules/common/type-rules.ts
6
6
  /**
7
7
  * String rule - validates string type
8
8
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-rules.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/common/type-rules.ts"],"sourcesContent":["import { isObject, isPlainObject } from \"@mongez/supportive-is\";\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * String rule - validates string type\n */\nexport const stringRule: SchemaRule = {\n name: \"string\",\n defaultErrorMessage: \"The :input must be a string\",\n async validate(value: any, context) {\n if (typeof value === \"string\") {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Number rule - validates number type\n */\nexport const numberRule: SchemaRule = {\n name: \"number\",\n defaultErrorMessage: \"The :input must be a number\",\n async validate(value: any, context) {\n if (typeof value === \"number\") {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Boolean rule - validates boolean type\n */\nexport const booleanRule: SchemaRule = {\n name: \"boolean\",\n defaultErrorMessage: \"The :input must be a boolean\",\n async validate(value: any, context) {\n if (typeof value === \"boolean\") {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Int rule - validates integer type\n */\nexport const intRule: SchemaRule = {\n name: \"int\",\n defaultErrorMessage: \"The :input must be an integer\",\n async validate(value: any, context) {\n if (Number.isInteger(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Float rule - validates float type\n */\nexport const floatRule: SchemaRule = {\n name: \"float\",\n defaultErrorMessage: \"The :input must be a float\",\n async validate(value: any, context) {\n if (Number.isFinite(value) && !Number.isInteger(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Scalar rule - validates scalar value (string, number, or boolean)\n */\nexport const scalarRule: SchemaRule = {\n name: \"scalar\",\n defaultErrorMessage: \"The :input must be a scalar value\",\n async validate(value: any, context) {\n if ([\"string\", \"number\", \"boolean\"].includes(typeof value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Object rule - validates object type\n */\nexport const objectRule: SchemaRule = {\n name: \"object\",\n defaultErrorMessage: \"The :input must be an object\",\n async validate(value: any, context) {\n if (!!isObject(value) && value !== null) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Object rule - validates object type\n */\nexport const plainObjectRule: SchemaRule = {\n name: \"plainObject\",\n defaultErrorMessage: \"The :input must be an object\",\n async validate(value: any, context) {\n if (!!isPlainObject(value) && value !== null) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Array rule - validates array type\n */\nexport const arrayRule: SchemaRule = {\n name: \"array\",\n defaultErrorMessage: \"The :input must be an array\",\n async validate(value: any, context) {\n if (Array.isArray(value)) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,aAAyB;CACpC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,OAAO,UAAU,UACnB,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,aAAyB;CACpC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,OAAO,UAAU,UACnB,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,cAA0B;CACrC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,OAAO,UAAU,WACnB,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,UAAsB;CACjC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,OAAO,UAAU,KAAK,GACxB,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,YAAwB;CACnC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,OAAO,SAAS,KAAK,KAAK,CAAC,OAAO,UAAU,KAAK,GACnD,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAmBA,MAAa,aAAyB;CACpC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,CAAC,CAAC,SAAS,KAAK,KAAK,UAAU,MACjC,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,kBAA8B;CACzC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,CAAC,CAAC,cAAc,KAAK,KAAK,UAAU,MACtC,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,YAAwB;CACnC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,7 +1,7 @@
1
1
  import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
 
4
- //#region ../seal/src/rules/common/unknown-key.ts
4
+ //#region ../../packages/seal/src/rules/common/unknown-key.ts
5
5
  /**
6
6
  * Unknown key rule - validates that object doesn't have unknown keys
7
7
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unknown-key.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/common/unknown-key.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { Schema, SchemaRule } from \"../../types\";\n\n/**\n * Unknown key rule - validates that object doesn't have unknown keys\n */\nexport const unknownKeyRule: SchemaRule<{\n schema: Schema;\n allowedKeys: string[];\n}> = {\n name: \"unknownKeys\",\n defaultErrorMessage: \"The :input contains unknown keys: :unknownKeys\",\n async validate(value: any, context) {\n const schema = this.context.options.schema;\n const allowedKeys = [...Object.keys(schema), ...(this.context.options.allowedKeys || [])];\n\n const unknownKeys = Object.keys(value).filter((key) => !allowedKeys.includes(key));\n\n if (unknownKeys.length > 0) {\n this.context.translationParams.unknownKeys = unknownKeys.join(\", \");\n\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,iBAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,SAAS,KAAK,QAAQ,QAAQ;EACpC,MAAM,cAAc,CAAC,GAAG,OAAO,KAAK,MAAM,GAAG,GAAI,KAAK,QAAQ,QAAQ,eAAe,CAAC,CAAE;EAExF,MAAM,cAAc,OAAO,KAAK,KAAK,CAAC,CAAC,QAAQ,QAAQ,CAAC,YAAY,SAAS,GAAG,CAAC;EAEjF,IAAI,YAAY,SAAS,GAAG;GAC1B,KAAK,QAAQ,kBAAkB,cAAc,YAAY,KAAK,IAAI;GAElE,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF"}
@@ -3,7 +3,7 @@ import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
3
3
  import { getFieldValue } from "../../helpers/get-field-value.mjs";
4
4
  import "../../helpers/index.mjs";
5
5
 
6
- //#region ../seal/src/rules/conditional/forbidden-if-rules.ts
6
+ //#region ../../packages/seal/src/rules/conditional/forbidden-if-rules.ts
7
7
  /**
8
8
  * Forbidden if rule - field is forbidden if another field equals a specific value
9
9
  * Supports both global and sibling scope
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forbidden-if-rules.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/conditional/forbidden-if-rules.ts"],"sourcesContent":["import { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Forbidden if rule - field is forbidden if another field equals a specific value\n * Supports both global and sibling scope\n */\nexport const forbiddenIfRule: SchemaRule<{\n field: string;\n value: any;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"forbiddenIf\",\n description: \"The field is forbidden if another field equals a specific value\",\n sortOrder: -2,\n defaultErrorMessage: \"The :input is forbidden\",\n async validate(value: any, context) {\n const { value: expectedValue } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is forbidden if it has a value and the other field equals the expected value\n if (!isEmptyValue(value) && fieldValue === expectedValue) {\n this.context.translatableParams.field = this.context.options.field;\n this.context.translationParams.value = expectedValue;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Forbidden if not rule - field is forbidden if another field does NOT equal a specific value\n * Supports both global and sibling scope\n */\nexport const forbiddenIfNotRule: SchemaRule<{\n field: string;\n value: any;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"forbiddenIfNot\",\n description: \"The field is forbidden if another field does NOT equal a specific value\",\n sortOrder: -2,\n defaultErrorMessage: \"The :input is forbidden\",\n async validate(value: any, context) {\n const { value: expectedValue } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is forbidden if it has a value and the other field does NOT equal the expected value\n if (!isEmptyValue(value) && fieldValue !== expectedValue) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Forbidden if empty rule - field is forbidden if another field is empty\n * Supports both global and sibling scope\n */\nexport const forbiddenIfEmptyRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"forbiddenIfEmpty\",\n description: \"The field is forbidden if another field is empty\",\n sortOrder: -2,\n defaultErrorMessage: \"The :input is forbidden\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field is forbidden if it has a value and the other field is empty\n if (!isEmptyValue(value) && isEmptyValue(fieldValue)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Forbidden if not empty rule - field is forbidden if another field is not empty\n * Supports both global and sibling scope\n */\nexport const forbiddenIfNotEmptyRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"forbiddenIfNotEmpty\",\n description: \"The field is forbidden if another field is not empty\",\n sortOrder: -2,\n defaultErrorMessage: \"The :input is forbidden\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field is forbidden if it has a value and the other field is not empty\n if (!isEmptyValue(value) && !isEmptyValue(fieldValue)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Forbidden if in rule - field is forbidden if another field's value is in the given array\n * Supports both global and sibling scope\n */\nexport const forbiddenIfInRule: SchemaRule<{\n field: string;\n values: any[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"forbiddenIfIn\",\n description: \"The field is forbidden if another field's value is in the given array\",\n sortOrder: -2,\n defaultErrorMessage: \"The :input is forbidden\",\n async validate(value: any, context) {\n const { values } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is forbidden if it has a value and the other field's value is in the array\n if (!isEmptyValue(value) && values.includes(fieldValue)) {\n this.context.translationParams.values = values.join(\", \");\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Forbidden if not in rule - field is forbidden if another field's value is NOT in the given array\n * Supports both global and sibling scope\n */\nexport const forbiddenIfNotInRule: SchemaRule<{\n field: string;\n values: any[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"forbiddenIfNotIn\",\n description: \"The field is forbidden if another field's value is NOT in the given array\",\n sortOrder: -2,\n defaultErrorMessage: \"The :input is forbidden\",\n async validate(value: any, context) {\n const { values } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is forbidden if it has a value and the other field's value is NOT in the array\n if (!isEmptyValue(value) && !values.includes(fieldValue)) {\n this.context.translationParams.values = values.join(\", \");\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;AAQA,MAAa,kBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,OAAO,kBAAkB,KAAK,QAAQ;EAC9C,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,CAAC,aAAa,KAAK,KAAK,eAAe,eAAe;GACxD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,KAAK,QAAQ,kBAAkB,QAAQ;GACvC,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,qBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,OAAO,kBAAkB,KAAK,QAAQ;EAC9C,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,CAAC,aAAa,KAAK,KAAK,eAAe,eACzC,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,uBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,CAAC,aAAa,KAAK,KAAK,aAAa,UAAU,GACjD,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,0BAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa,UAAU,GAClD,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,oBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,WAAW,KAAK,QAAQ;EAChC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,CAAC,aAAa,KAAK,KAAK,OAAO,SAAS,UAAU,GAAG;GACvD,KAAK,QAAQ,kBAAkB,SAAS,OAAO,KAAK,IAAI;GACxD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,uBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,WAAW,KAAK,QAAQ;EAChC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,OAAO,SAAS,UAAU,GAAG;GACxD,KAAK,QAAQ,kBAAkB,SAAS,OAAO,KAAK,IAAI;GACxD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF"}
@@ -3,7 +3,7 @@ import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
3
3
  import { getFieldValue } from "../../helpers/get-field-value.mjs";
4
4
  import "../../helpers/index.mjs";
5
5
 
6
- //#region ../seal/src/rules/conditional/present-if-rules.ts
6
+ //#region ../../packages/seal/src/rules/conditional/present-if-rules.ts
7
7
  /**
8
8
  * Present if rule - field must be present if another field equals a specific value
9
9
  * Supports both global and sibling scope
@@ -0,0 +1 @@
1
+ {"version":3,"file":"present-if-rules.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/conditional/present-if-rules.ts"],"sourcesContent":["import { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\nimport { isEmptyValue } from \"./../../helpers/is-empty-value\";\n\n/**\n * Present if rule - field must be present if another field equals a specific value\n * Supports both global and sibling scope\n */\nexport const presentIfRule: SchemaRule<{\n field: string;\n value: any;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentIf\",\n description: \"The field must be present if another field equals a specific value\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const { value: expectedValue } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field must be present if the other field equals the expected value\n if (value === undefined && fieldValue === expectedValue) {\n this.context.translationParams.value = expectedValue;\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Present if empty rule - field must be present if another field is empty\n * Supports both global and sibling scope\n */\nexport const presentIfEmptyRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentIfEmpty\",\n description: \"The field must be present if another field is empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field must be present if the other field is empty\n if (value === undefined && isEmptyValue(fieldValue)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Present if not empty rule - field must be present if another field is not empty\n * Supports both global and sibling scope\n */\nexport const presentIfNotEmptyRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentIfNotEmpty\",\n description: \"The field must be present if another field is not empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field must be present if the other field is not empty\n if (value === undefined && !isEmptyValue(fieldValue)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Present if in rule - field must be present if another field's value is in the given array\n * Supports both global and sibling scope\n */\nexport const presentIfInRule: SchemaRule<{\n field: string;\n values: any[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentIfIn\",\n description: \"The field must be present if another field's value is in the given array\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const { values } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field must be present if the other field's value is in the array\n if (value === undefined && values.includes(fieldValue)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Present if not in rule - field must be present if another field's value is NOT in the given array\n * Supports both global and sibling scope\n */\nexport const presentIfNotInRule: SchemaRule<{\n field: string;\n values: any[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentIfNotIn\",\n description: \"The field must be present if another field's value is NOT in the given array\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const { values } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field must be present if the other field's value is NOT in the array\n if (value === undefined && !values.includes(fieldValue)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;AAQA,MAAa,gBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,OAAO,kBAAkB,KAAK,QAAQ;EAC9C,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,UAAU,UAAa,eAAe,eAAe;GACvD,KAAK,QAAQ,kBAAkB,QAAQ;GACvC,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,qBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,UAAU,UAAa,aAAa,UAAU,GAChD,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,wBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,UAAU,UAAa,CAAC,aAAa,UAAU,GACjD,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,kBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,WAAW,KAAK,QAAQ;EAChC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,UAAU,UAAa,OAAO,SAAS,UAAU,GACnD,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,qBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,WAAW,KAAK,QAAQ;EAChC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,UAAU,UAAa,CAAC,OAAO,SAAS,UAAU,GACpD,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import { getFieldValue } from "../../helpers/get-field-value.mjs";
3
3
  import "../../helpers/index.mjs";
4
4
 
5
- //#region ../seal/src/rules/conditional/present-unless-rules.ts
5
+ //#region ../../packages/seal/src/rules/conditional/present-unless-rules.ts
6
6
  /**
7
7
  * Present unless rule - field must be present unless another field equals a specific value
8
8
  * Supports both global and sibling scope
@@ -0,0 +1 @@
1
+ {"version":3,"file":"present-unless-rules.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/conditional/present-unless-rules.ts"],"sourcesContent":["import { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Present unless rule - field must be present unless another field equals a specific value\n * Supports both global and sibling scope\n */\nexport const presentUnlessRule: SchemaRule<{\n field: string;\n value: any;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentUnless\",\n description: \"The field must be present unless another field equals a specific value\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const { value: expectedValue } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field must be present unless the other field equals the expected value\n if (value === undefined && fieldValue !== expectedValue) {\n this.context.translationParams.value = expectedValue;\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;AAOA,MAAa,oBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,OAAO,kBAAkB,KAAK,QAAQ;EAC9C,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,UAAU,UAAa,eAAe,eAAe;GACvD,KAAK,QAAQ,kBAAkB,QAAQ;GACvC,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF"}
@@ -1,10 +1,10 @@
1
- import { get } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/get.mjs";
2
- import "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
1
+ import { get } from "../../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/get.mjs";
2
+ import "../../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
3
3
  import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
4
4
  import { getFieldValue } from "../../helpers/get-field-value.mjs";
5
5
  import "../../helpers/index.mjs";
6
6
 
7
- //#region ../seal/src/rules/conditional/present-with-rules.ts
7
+ //#region ../../packages/seal/src/rules/conditional/present-with-rules.ts
8
8
  /**
9
9
  * Present with rule - field must be present if another field is present
10
10
  * Supports both global and sibling scope
@@ -0,0 +1 @@
1
+ {"version":3,"file":"present-with-rules.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/conditional/present-with-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Present with rule - field must be present if another field is present\n * Supports both global and sibling scope\n */\nexport const presentWithRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentWith\",\n description: \"The field must be present if another field is present\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // The field must be present if the other field is present\n if (value === undefined && fieldValue !== undefined) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Present with all rule - field must be present if all specified fields are present\n * Supports both global and sibling scope\n */\nexport const presentWithAllRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentWithAll\",\n description: \"The field must be present if all specified fields are present\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if all fields are present\n const allPresent = fields.every((field) => get(source, field) !== undefined);\n\n // Field must be present if all other fields are present\n if (value === undefined && allPresent) {\n fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Present with any rule - field must be present if any of the specified fields is present\n * Supports both global and sibling scope\n */\nexport const presentWithAnyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentWithAny\",\n description: \"The field must be present if any of the specified fields is present\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if any field is present\n const anyPresent = fields.some((field) => get(source, field) !== undefined);\n\n // Field must be present if any other field is present\n if (value === undefined && anyPresent) {\n fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,kBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,UAAU,UAAa,eAAe,QAAW;GACnD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,qBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,OAAO,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG3E,IAAI,UAAU,UAAa,YAAY;GACrC,OAAO,SAAS,UAAU;IACxB,KAAK,QAAQ,mBAAmB,QAAQ;GAC1C,CAAC;GAED,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,qBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,MAAM,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG1E,IAAI,UAAU,UAAa,YAAY;GACrC,OAAO,SAAS,UAAU;IACxB,KAAK,QAAQ,mBAAmB,QAAQ;GAC1C,CAAC;GAED,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF"}
@@ -1,10 +1,10 @@
1
- import { get } from "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/get.mjs";
2
- import "../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
1
+ import { get } from "../../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/object/get.mjs";
2
+ import "../../../../../node_modules/.pnpm/@mongez_reinforcements@4.0.2/node_modules/@mongez/reinforcements/esm/index.mjs";
3
3
  import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
4
4
  import { getFieldValue } from "../../helpers/get-field-value.mjs";
5
5
  import "../../helpers/index.mjs";
6
6
 
7
- //#region ../seal/src/rules/conditional/present-without-rules.ts
7
+ //#region ../../packages/seal/src/rules/conditional/present-without-rules.ts
8
8
  /**
9
9
  * Present without rule - field must be present if another field is missing
10
10
  * Supports both global and sibling scope
@@ -0,0 +1 @@
1
+ {"version":3,"file":"present-without-rules.mjs","names":[],"sources":["../../../../../../../../../../../../packages/seal/src/rules/conditional/present-without-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Present without rule - field must be present if another field is missing\n * Supports both global and sibling scope\n */\nexport const presentWithoutRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentWithout\",\n description: \"The field must be present if another field is missing\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field must be present if the other field is missing\n if (value === undefined && fieldValue === undefined) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Present without all rule - field must be present if all specified fields are missing\n * Supports both global and sibling scope\n */\nexport const presentWithoutAllRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentWithoutAll\",\n description: \"The field must be present if all specified fields are missing\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if all fields are missing\n const allMissing = fields.every((field) => get(source, field) === undefined);\n\n // Field must be present if all other fields are missing\n if (value === undefined && allMissing) {\n fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Present without any rule - field must be present if any of the specified fields is missing\n * Supports both global and sibling scope\n */\nexport const presentWithoutAnyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"presentWithoutAny\",\n description: \"The field must be present if any of the specified fields is missing\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input field must be present\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if any field is missing\n const anyMissing = fields.some((field) => get(source, field) === undefined);\n\n // Field must be present if any other field is missing\n if (value === undefined && anyMissing) {\n fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,qBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,UAAU,UAAa,eAAe,QAAW;GACnD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,wBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,OAAO,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG3E,IAAI,UAAU,UAAa,YAAY;GACrC,OAAO,SAAS,UAAU;IACxB,KAAK,QAAQ,mBAAmB,QAAQ;GAC1C,CAAC;GAED,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,wBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,MAAM,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG1E,IAAI,UAAU,UAAa,YAAY;GACrC,OAAO,SAAS,UAAU;IACxB,KAAK,QAAQ,mBAAmB,QAAQ;GAC1C,CAAC;GAED,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF"}