@tstdl/base 0.78.0-beta8 → 0.78.0-beta80

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 (610) hide show
  1. package/api/client/client.d.ts +2 -1
  2. package/api/client/client.js +38 -16
  3. package/api/client/client.js.map +1 -1
  4. package/api/response.js +3 -2
  5. package/api/response.js.map +1 -1
  6. package/api/server/api-controller.d.ts +3 -1
  7. package/api/server/api-controller.js +7 -2
  8. package/api/server/api-controller.js.map +1 -1
  9. package/api/server/gateway.d.ts +15 -3
  10. package/api/server/gateway.js +53 -37
  11. package/api/server/gateway.js.map +1 -1
  12. package/api/server/middlewares/allowed-methods.middleware.js +1 -1
  13. package/api/server/middlewares/allowed-methods.middleware.js.map +1 -1
  14. package/api/server/middlewares/cors.middleware.d.ts +6 -4
  15. package/api/server/middlewares/cors.middleware.js +30 -30
  16. package/api/server/middlewares/cors.middleware.js.map +1 -1
  17. package/api/types.d.ts +36 -14
  18. package/api/types.js +1 -2
  19. package/api/types.js.map +1 -1
  20. package/api/utils.d.ts +9 -0
  21. package/api/utils.js +15 -0
  22. package/api/utils.js.map +1 -0
  23. package/application/application.d.ts +15 -2
  24. package/application/application.js +89 -42
  25. package/application/application.js.map +1 -1
  26. package/collections/awaitable/awaitable-list.js +10 -11
  27. package/collections/awaitable/awaitable-list.js.map +1 -1
  28. package/collections/observable/observable-array.js +1 -1
  29. package/collections/observable/observable-array.js.map +1 -1
  30. package/collections/observable/observable-collection-base.js +12 -14
  31. package/collections/observable/observable-collection-base.js.map +1 -1
  32. package/collections/observable/observable-list-base.js +6 -8
  33. package/collections/observable/observable-list-base.js.map +1 -1
  34. package/collections/observable/observable-sorted-array-list.js +3 -3
  35. package/collections/observable/observable-sorted-array-list.js.map +1 -1
  36. package/collections/sorted-array-list.js +3 -3
  37. package/collections/sorted-array-list.js.map +1 -1
  38. package/collections/sorted-map.js +1 -1
  39. package/collections/sorted-map.js.map +1 -1
  40. package/container/container.js +19 -21
  41. package/container/container.js.map +1 -1
  42. package/container/decorators.d.ts +1 -1
  43. package/container/decorators.js.map +1 -1
  44. package/container/resolve-chain.d.ts +2 -1
  45. package/container/resolve-chain.js +6 -2
  46. package/container/resolve-chain.js.map +1 -1
  47. package/core.js +2 -2
  48. package/core.js.map +1 -1
  49. package/css/theme/theme.service.js.map +1 -1
  50. package/data-structures/circular-buffer.js +5 -6
  51. package/data-structures/circular-buffer.js.map +1 -1
  52. package/data-structures/collection.js +4 -5
  53. package/data-structures/collection.js.map +1 -1
  54. package/data-structures/index-out-of-bounds.error.d.ts +1 -1
  55. package/data-structures/index-out-of-bounds.error.js +2 -2
  56. package/data-structures/index-out-of-bounds.error.js.map +1 -1
  57. package/data-structures/iterable-weak-map.js +1 -1
  58. package/data-structures/iterable-weak-map.js.map +1 -1
  59. package/data-structures/linked-list.js.map +1 -1
  60. package/data-structures/sorted-array-list.js +2 -2
  61. package/data-structures/sorted-array-list.js.map +1 -1
  62. package/database/mongo/classes.js.map +1 -1
  63. package/database/mongo/mongo-base.repository.js +3 -3
  64. package/database/mongo/mongo-base.repository.js.map +1 -1
  65. package/database/mongo/mongo-entity-repository.js +2 -2
  66. package/database/mongo/mongo-entity-repository.js.map +1 -1
  67. package/distributed-loop/distributed-loop.js.map +1 -1
  68. package/distributed-loop/provider.js.map +1 -1
  69. package/environment.d.ts +10 -0
  70. package/environment.js +26 -0
  71. package/environment.js.map +1 -0
  72. package/error/custom.error.d.ts +7 -3
  73. package/error/custom.error.js +17 -8
  74. package/error/custom.error.js.map +1 -1
  75. package/error/index.d.ts +1 -0
  76. package/error/index.js +1 -0
  77. package/error/index.js.map +1 -1
  78. package/error/max-bytes-exceeded.error.d.ts +1 -0
  79. package/error/max-bytes-exceeded.error.js +3 -0
  80. package/error/max-bytes-exceeded.error.js.map +1 -1
  81. package/error/not-implemented.error.js +1 -1
  82. package/error/not-implemented.error.js.map +1 -1
  83. package/error/not-supported.error.d.ts +7 -0
  84. package/error/not-supported.error.js +17 -0
  85. package/error/not-supported.error.js.map +1 -0
  86. package/error/unsupported-media-type.error.js +1 -1
  87. package/error/unsupported-media-type.error.js.map +1 -1
  88. package/examples/api/basic-overview.js +17 -25
  89. package/examples/api/basic-overview.js.map +1 -1
  90. package/examples/api/streaming.d.ts +1 -0
  91. package/examples/api/streaming.js +79 -0
  92. package/examples/api/streaming.js.map +1 -0
  93. package/examples/mail/basic.js +12 -7
  94. package/examples/mail/basic.js.map +1 -1
  95. package/examples/mail/templates/hello-name.d.ts +2 -0
  96. package/examples/mail/templates/hello-name.js +11 -0
  97. package/examples/mail/templates/hello-name.js.map +1 -0
  98. package/examples/pdf/basic.js +9 -6
  99. package/examples/pdf/basic.js.map +1 -1
  100. package/examples/pdf/templates/hello-name.d.ts +1 -4
  101. package/examples/pdf/templates/hello-name.js +30 -4
  102. package/examples/pdf/templates/hello-name.js.map +1 -1
  103. package/examples/reflection/basic.js +1 -1
  104. package/examples/reflection/basic.js.map +1 -1
  105. package/examples/template/basic.d.ts +1 -0
  106. package/examples/template/basic.js +25 -0
  107. package/examples/template/basic.js.map +1 -0
  108. package/examples/template/templates/hello-name.d.ts +2 -0
  109. package/examples/template/templates/hello-name.js +23 -0
  110. package/examples/template/templates/hello-name.js.map +1 -0
  111. package/http/client/adapters/undici-http-client.adapter.d.ts +1 -2
  112. package/http/client/adapters/undici-http-client.adapter.js +10 -12
  113. package/http/client/adapters/undici-http-client.adapter.js.map +1 -1
  114. package/http/client/http-client-request.d.ts +24 -14
  115. package/http/client/http-client-request.js +4 -2
  116. package/http/client/http-client-request.js.map +1 -1
  117. package/http/client/http-client-response.d.ts +10 -12
  118. package/http/client/http-client-response.js +5 -1
  119. package/http/client/http-client-response.js.map +1 -1
  120. package/http/client/http-client.adapter.d.ts +1 -2
  121. package/http/client/http-client.adapter.js.map +1 -1
  122. package/http/client/http-client.d.ts +30 -31
  123. package/http/client/http-client.js +107 -74
  124. package/http/client/http-client.js.map +1 -1
  125. package/http/http-body.d.ts +19 -0
  126. package/http/http-body.js +52 -0
  127. package/http/http-body.js.map +1 -0
  128. package/http/http-headers.d.ts +3 -0
  129. package/http/http-headers.js +6 -0
  130. package/http/http-headers.js.map +1 -1
  131. package/http/http-value-map.js +2 -2
  132. package/http/http-value-map.js.map +1 -1
  133. package/http/http.error.d.ts +5 -2
  134. package/http/http.error.js +27 -5
  135. package/http/http.error.js.map +1 -1
  136. package/http/index.d.ts +2 -0
  137. package/http/index.js +2 -0
  138. package/http/index.js.map +1 -1
  139. package/http/server/http-server-request.d.ts +5 -10
  140. package/http/server/http-server-request.js +3 -30
  141. package/http/server/http-server-request.js.map +1 -1
  142. package/http/server/http-server-response.d.ts +4 -4
  143. package/http/server/node/node-http-server.js +6 -5
  144. package/http/server/node/node-http-server.js.map +1 -1
  145. package/http/types.d.ts +1 -11
  146. package/http/types.js +1 -2
  147. package/http/types.js.map +1 -1
  148. package/http/utils.d.ts +15 -0
  149. package/http/utils.js +113 -0
  150. package/http/utils.js.map +1 -0
  151. package/image-service/image-service.js.map +1 -1
  152. package/image-service/imgproxy/imgproxy-image-service.js.map +1 -1
  153. package/json-path/json-path.d.ts +8 -5
  154. package/json-path/json-path.js +15 -1
  155. package/json-path/json-path.js.map +1 -1
  156. package/key-value-store/mongo/mongo-key-value-store.provider.js.map +1 -1
  157. package/key-value-store/mongo/mongo-key-value.repository.js.map +1 -1
  158. package/key-value-store/mongo/mongo-key-value.store.js.map +1 -1
  159. package/lock/mongo/lock.js.map +1 -1
  160. package/lock/mongo/mongo-lock-repository.js.map +1 -1
  161. package/lock/mongo/provider.js.map +1 -1
  162. package/logger/console/logger.js +1 -1
  163. package/logger/console/logger.js.map +1 -1
  164. package/logger/logger.d.ts +2 -2
  165. package/mail/clients/nodemailer.mail-client.js.map +1 -1
  166. package/mail/index.d.ts +0 -3
  167. package/mail/index.js +0 -3
  168. package/mail/index.js.map +1 -1
  169. package/mail/mail.service.d.ts +3 -5
  170. package/mail/mail.service.js +8 -14
  171. package/mail/mail.service.js.map +1 -1
  172. package/mail/models/mail-template.model.d.ts +11 -10
  173. package/mail/models/mail-template.model.js +7 -0
  174. package/mail/models/mail-template.model.js.map +1 -1
  175. package/mail/module.d.ts +1 -5
  176. package/mail/module.js +2 -11
  177. package/mail/module.js.map +1 -1
  178. package/mail/repositories/mongo-mail-log.repository.js.map +1 -1
  179. package/mail/tokens.d.ts +0 -3
  180. package/mail/tokens.js +1 -2
  181. package/mail/tokens.js.map +1 -1
  182. package/message-bus/local/local-message-bus-provider.js.map +1 -1
  183. package/message-bus/local/local-message-bus.js.map +1 -1
  184. package/message-bus/message-bus-base.js +1 -2
  185. package/message-bus/message-bus-base.js.map +1 -1
  186. package/migration/migrator.js.map +1 -1
  187. package/migration/mongo/migration-state-repository.js.map +1 -1
  188. package/module/modules/web-server.module.js.map +1 -1
  189. package/notification/api.d.ts +20 -0
  190. package/notification/api.js +35 -0
  191. package/notification/api.js.map +1 -0
  192. package/notification/model.d.ts +18 -0
  193. package/notification/model.js +36 -0
  194. package/notification/model.js.map +1 -0
  195. package/notification/module.d.ts +9 -0
  196. package/notification/module.js +15 -0
  197. package/notification/module.js.map +1 -0
  198. package/object-storage/s3/s3.object-storage-provider.js.map +1 -1
  199. package/object-storage/s3/s3.object-storage.js.map +1 -1
  200. package/openid-connect/cached-oidc-configuration.service.js.map +1 -1
  201. package/openid-connect/mongo-oidc-state.repository.js.map +1 -1
  202. package/openid-connect/oidc-configuration.service.d.ts +2 -1
  203. package/openid-connect/oidc-configuration.service.js +5 -3
  204. package/openid-connect/oidc-configuration.service.js.map +1 -1
  205. package/openid-connect/oidc.service-model.d.ts +11 -3
  206. package/openid-connect/oidc.service.d.ts +6 -3
  207. package/openid-connect/oidc.service.js +72 -25
  208. package/openid-connect/oidc.service.js.map +1 -1
  209. package/package.json +13 -12
  210. package/pdf/pdf.service.d.ts +92 -12
  211. package/pdf/pdf.service.js +234 -34
  212. package/pdf/pdf.service.js.map +1 -1
  213. package/pool/pool.d.ts +23 -4
  214. package/pool/pool.js +76 -40
  215. package/pool/pool.js.map +1 -1
  216. package/promise/deferred-promise.d.ts +2 -15
  217. package/promise/deferred-promise.js +5 -10
  218. package/promise/deferred-promise.js.map +1 -1
  219. package/promise/index.d.ts +1 -0
  220. package/promise/index.js +1 -0
  221. package/promise/index.js.map +1 -1
  222. package/promise/lazy-promise.d.ts +11 -0
  223. package/promise/lazy-promise.js +31 -0
  224. package/promise/lazy-promise.js.map +1 -0
  225. package/queue/mongo/mongo-job.repository.js +1 -1
  226. package/queue/mongo/mongo-job.repository.js.map +1 -1
  227. package/queue/mongo/queue.js.map +1 -1
  228. package/queue/mongo/queue.provider.js.map +1 -1
  229. package/reflection/decorator-data.js +1 -1
  230. package/reflection/decorator-data.js.map +1 -1
  231. package/reflection/decorators.d.ts +2 -2
  232. package/reflection/decorators.js +7 -7
  233. package/reflection/decorators.js.map +1 -1
  234. package/reflection/registry.d.ts +8 -8
  235. package/reflection/registry.js +1 -1
  236. package/reflection/registry.js.map +1 -1
  237. package/reflection/types.d.ts +3 -2
  238. package/reflection/utils.d.ts +7 -2
  239. package/reflection/utils.js +38 -12
  240. package/reflection/utils.js.map +1 -1
  241. package/require.d.ts +1 -0
  242. package/require.js +9 -0
  243. package/require.js.map +1 -0
  244. package/rpc/endpoints/message-port.rpc-endpoint.d.ts +19 -0
  245. package/rpc/endpoints/message-port.rpc-endpoint.js +34 -0
  246. package/rpc/endpoints/message-port.rpc-endpoint.js.map +1 -0
  247. package/rpc/index.d.ts +4 -0
  248. package/rpc/index.js +21 -0
  249. package/rpc/index.js.map +1 -0
  250. package/rpc/model.d.ts +72 -0
  251. package/rpc/model.js +13 -0
  252. package/rpc/model.js.map +1 -0
  253. package/rpc/rpc-endpoint.d.ts +11 -0
  254. package/rpc/rpc-endpoint.js +23 -0
  255. package/rpc/rpc-endpoint.js.map +1 -0
  256. package/rpc/rpc-error.d.ts +8 -0
  257. package/rpc/rpc-error.js +26 -0
  258. package/rpc/rpc-error.js.map +1 -0
  259. package/rpc/rpc.d.ts +19 -0
  260. package/rpc/rpc.js +263 -0
  261. package/rpc/rpc.js.map +1 -0
  262. package/rxjs/retry-backoff.js +4 -5
  263. package/rxjs/retry-backoff.js.map +1 -1
  264. package/schema/array-constraints/maximum-length.d.ts +2 -2
  265. package/schema/array-constraints/maximum-length.js +2 -2
  266. package/schema/array-constraints/maximum-length.js.map +1 -1
  267. package/schema/array-constraints/minimum-length.d.ts +2 -2
  268. package/schema/array-constraints/minimum-length.js +2 -2
  269. package/schema/array-constraints/minimum-length.js.map +1 -1
  270. package/schema/coercers/boolean.coercer.d.ts +2 -2
  271. package/schema/coercers/boolean.coercer.js +2 -2
  272. package/schema/coercers/boolean.coercer.js.map +1 -1
  273. package/schema/coercers/date.coercer.d.ts +2 -2
  274. package/schema/coercers/date.coercer.js +2 -2
  275. package/schema/coercers/date.coercer.js.map +1 -1
  276. package/schema/coercers/number.coercer.d.ts +3 -3
  277. package/schema/coercers/number.coercer.js +2 -2
  278. package/schema/coercers/number.coercer.js.map +1 -1
  279. package/schema/coercers/regexp.coercer.d.ts +2 -2
  280. package/schema/coercers/regexp.coercer.js +2 -2
  281. package/schema/coercers/regexp.coercer.js.map +1 -1
  282. package/schema/coercers/string.coercer.d.ts +3 -3
  283. package/schema/coercers/string.coercer.js +2 -2
  284. package/schema/coercers/string.coercer.js.map +1 -1
  285. package/schema/coercers/uint8-array.coercer.js +2 -2
  286. package/schema/coercers/uint8-array.coercer.js.map +1 -1
  287. package/schema/constraints/enumeration.d.ts +5 -5
  288. package/schema/constraints/enumeration.js +6 -6
  289. package/schema/constraints/enumeration.js.map +1 -1
  290. package/schema/constraints/generic.d.ts +2 -2
  291. package/schema/constraints/generic.js +2 -2
  292. package/schema/constraints/generic.js.map +1 -1
  293. package/schema/constraints/integer.d.ts +2 -2
  294. package/schema/constraints/integer.js +2 -2
  295. package/schema/constraints/integer.js.map +1 -1
  296. package/schema/constraints/literal.d.ts +2 -2
  297. package/schema/constraints/literal.js +2 -2
  298. package/schema/constraints/literal.js.map +1 -1
  299. package/schema/constraints/maximum-date.d.ts +2 -2
  300. package/schema/constraints/maximum-date.js +2 -2
  301. package/schema/constraints/maximum-date.js.map +1 -1
  302. package/schema/constraints/maximum-length.d.ts +3 -3
  303. package/schema/constraints/maximum-length.js +2 -2
  304. package/schema/constraints/maximum-length.js.map +1 -1
  305. package/schema/constraints/maximum.d.ts +2 -2
  306. package/schema/constraints/maximum.js +2 -2
  307. package/schema/constraints/maximum.js.map +1 -1
  308. package/schema/constraints/minimum-date.d.ts +2 -2
  309. package/schema/constraints/minimum-date.js +2 -2
  310. package/schema/constraints/minimum-date.js.map +1 -1
  311. package/schema/constraints/minimum-length.d.ts +3 -3
  312. package/schema/constraints/minimum-length.js +2 -2
  313. package/schema/constraints/minimum-length.js.map +1 -1
  314. package/schema/constraints/minimum.d.ts +2 -2
  315. package/schema/constraints/minimum.js +2 -2
  316. package/schema/constraints/minimum.js.map +1 -1
  317. package/schema/constraints/pattern.d.ts +2 -2
  318. package/schema/constraints/pattern.js +2 -2
  319. package/schema/constraints/pattern.js.map +1 -1
  320. package/schema/decorators/array.d.ts +2 -2
  321. package/schema/decorators/array.js.map +1 -1
  322. package/schema/decorators/defaulted.d.ts +2 -2
  323. package/schema/decorators/defaulted.js.map +1 -1
  324. package/schema/decorators/index.d.ts +1 -0
  325. package/schema/decorators/index.js +1 -0
  326. package/schema/decorators/index.js.map +1 -1
  327. package/schema/decorators/one-or-many.d.ts +6 -0
  328. package/schema/decorators/one-or-many.js +12 -0
  329. package/schema/decorators/one-or-many.js.map +1 -0
  330. package/schema/decorators/optional.d.ts +3 -1
  331. package/schema/decorators/optional.js +2 -2
  332. package/schema/decorators/optional.js.map +1 -1
  333. package/schema/decorators/types.d.ts +3 -3
  334. package/schema/decorators/utils.d.ts +3 -2
  335. package/schema/decorators/utils.js +8 -4
  336. package/schema/decorators/utils.js.map +1 -1
  337. package/schema/schema.d.ts +4 -10
  338. package/schema/schema.error.d.ts +6 -5
  339. package/schema/schema.error.js +13 -10
  340. package/schema/schema.error.js.map +1 -1
  341. package/schema/schema.js +113 -104
  342. package/schema/schema.js.map +1 -1
  343. package/schema/schemas/array.d.ts +3 -3
  344. package/schema/schemas/array.js +1 -1
  345. package/schema/schemas/array.js.map +1 -1
  346. package/schema/schemas/assign.d.ts +6 -6
  347. package/schema/schemas/assign.js +3 -1
  348. package/schema/schemas/assign.js.map +1 -1
  349. package/schema/schemas/constraint.d.ts +3 -2
  350. package/schema/schemas/constraint.js.map +1 -1
  351. package/schema/schemas/defaulted.d.ts +2 -2
  352. package/schema/schemas/defaulted.js.map +1 -1
  353. package/schema/schemas/enumeration.js +1 -1
  354. package/schema/schemas/enumeration.js.map +1 -1
  355. package/schema/schemas/index.d.ts +3 -1
  356. package/schema/schemas/index.js +3 -1
  357. package/schema/schemas/index.js.map +1 -1
  358. package/schema/schemas/nullable.d.ts +2 -2
  359. package/schema/schemas/nullable.js.map +1 -1
  360. package/schema/schemas/number.d.ts +1 -1
  361. package/schema/schemas/number.js +0 -3
  362. package/schema/schemas/number.js.map +1 -1
  363. package/schema/schemas/omit.d.ts +4 -0
  364. package/schema/schemas/{exclude.js → omit.js} +8 -6
  365. package/schema/schemas/omit.js.map +1 -0
  366. package/schema/schemas/one-or-many.d.ts +10 -0
  367. package/schema/schemas/one-or-many.js +12 -0
  368. package/schema/schemas/one-or-many.js.map +1 -0
  369. package/schema/schemas/optional.d.ts +3 -2
  370. package/schema/schemas/optional.js.map +1 -1
  371. package/schema/schemas/partial.d.ts +4 -0
  372. package/schema/schemas/partial.js +22 -0
  373. package/schema/schemas/partial.js.map +1 -0
  374. package/schema/schemas/pick.d.ts +2 -2
  375. package/schema/schemas/pick.js +3 -1
  376. package/schema/schemas/pick.js.map +1 -1
  377. package/schema/schemas/record.d.ts +2 -2
  378. package/schema/schemas/record.js.map +1 -1
  379. package/schema/schemas/union.d.ts +4 -9
  380. package/schema/schemas/union.js.map +1 -1
  381. package/schema/types.d.ts +30 -20
  382. package/schema/types.js +22 -8
  383. package/schema/types.js.map +1 -1
  384. package/schema/utils/schema.d.ts +6 -1
  385. package/schema/utils/schema.js +60 -7
  386. package/schema/utils/schema.js.map +1 -1
  387. package/schema/utils/value-type.d.ts +5 -3
  388. package/schema/utils/value-type.js +22 -7
  389. package/schema/utils/value-type.js.map +1 -1
  390. package/search-index/elastic/config.js.map +1 -1
  391. package/search-index/elastic/model/index-mapping.d.ts +2 -1
  392. package/search-index/elastic/model/index-mapping.js.map +1 -1
  393. package/search-index/elastic/search-index.js +5 -4
  394. package/search-index/elastic/search-index.js.map +1 -1
  395. package/search-index/error.d.ts +1 -1
  396. package/search-index/error.js +2 -2
  397. package/search-index/error.js.map +1 -1
  398. package/serializer/handlers/register.d.ts +2 -2
  399. package/serializer/handlers/register.js +6 -2
  400. package/serializer/handlers/register.js.map +1 -1
  401. package/serializer/serializable.d.ts +11 -8
  402. package/serializer/serializable.js +13 -4
  403. package/serializer/serializable.js.map +1 -1
  404. package/serializer/serializer.js +21 -8
  405. package/serializer/serializer.js.map +1 -1
  406. package/serializer/types.d.ts +21 -6
  407. package/serializer/types.js +2 -1
  408. package/serializer/types.js.map +1 -1
  409. package/supports.d.ts +5 -0
  410. package/supports.js +9 -0
  411. package/supports.js.map +1 -0
  412. package/templates/index.d.ts +2 -0
  413. package/templates/index.js +2 -0
  414. package/templates/index.js.map +1 -1
  415. package/templates/module.d.ts +3 -1
  416. package/templates/module.js +31 -8
  417. package/templates/module.js.map +1 -1
  418. package/templates/providers/file.provider-template.d.ts +16 -0
  419. package/templates/providers/{file-template.provider.js → file.provider-template.js} +22 -15
  420. package/templates/providers/file.provider-template.js.map +1 -0
  421. package/templates/providers/memory.template-provider.d.ts +8 -0
  422. package/templates/providers/{memory-template.provider.base.js → memory.template-provider.js} +8 -6
  423. package/templates/providers/memory.template-provider.js.map +1 -0
  424. package/templates/renderers/handlebars.template-renderer.d.ts +38 -6
  425. package/templates/renderers/handlebars.template-renderer.js +70 -3
  426. package/templates/renderers/handlebars.template-renderer.js.map +1 -1
  427. package/templates/renderers/mjml.template-renderer.d.ts +6 -6
  428. package/templates/renderers/mjml.template-renderer.js +8 -9
  429. package/templates/renderers/mjml.template-renderer.js.map +1 -1
  430. package/templates/renderers/string.template-renderer.d.ts +8 -0
  431. package/{mail/template-providers/memory-mail-template.provider.js → templates/renderers/string.template-renderer.js} +13 -7
  432. package/templates/renderers/string.template-renderer.js.map +1 -0
  433. package/templates/resolvers/file.template-resolver.d.ts +23 -0
  434. package/templates/resolvers/file.template-resolver.js +63 -0
  435. package/templates/resolvers/file.template-resolver.js.map +1 -0
  436. package/templates/resolvers/string.template-resolver.d.ts +13 -0
  437. package/templates/resolvers/string.template-resolver.js +44 -0
  438. package/templates/resolvers/string.template-resolver.js.map +1 -0
  439. package/templates/template-renderer.provider.js +7 -19
  440. package/templates/template-renderer.provider.js.map +1 -1
  441. package/templates/template-resolver.provider.d.ts +8 -0
  442. package/templates/template-resolver.provider.js +48 -0
  443. package/templates/template-resolver.provider.js.map +1 -0
  444. package/templates/template.model.d.ts +15 -4
  445. package/templates/template.model.js +50 -0
  446. package/templates/template.model.js.map +1 -1
  447. package/templates/template.renderer.d.ts +14 -3
  448. package/templates/template.renderer.js +3 -0
  449. package/templates/template.renderer.js.map +1 -1
  450. package/templates/template.resolver.d.ts +5 -0
  451. package/templates/template.resolver.js +7 -0
  452. package/templates/template.resolver.js.map +1 -0
  453. package/templates/template.service.d.ts +10 -4
  454. package/templates/template.service.js +19 -6
  455. package/templates/template.service.js.map +1 -1
  456. package/templates/tokens.d.ts +3 -2
  457. package/templates/tokens.js +2 -1
  458. package/templates/tokens.js.map +1 -1
  459. package/threading/index.d.ts +2 -0
  460. package/{rxjs/compat → threading}/index.js +2 -1
  461. package/threading/index.js.map +1 -0
  462. package/threading/thread-pool.d.ts +20 -0
  463. package/threading/thread-pool.js +50 -0
  464. package/threading/thread-pool.js.map +1 -0
  465. package/threading/thread-worker.d.ts +3 -0
  466. package/threading/thread-worker.js +9 -0
  467. package/threading/thread-worker.js.map +1 -0
  468. package/types.d.ts +27 -9
  469. package/utils/alphabet.d.ts +3 -1
  470. package/utils/alphabet.js +2 -0
  471. package/utils/alphabet.js.map +1 -1
  472. package/utils/array/array.d.ts +1 -2
  473. package/utils/array/array.js.map +1 -1
  474. package/utils/async-iterable-helpers/observable-iterable.js +1 -2
  475. package/utils/async-iterable-helpers/observable-iterable.js.map +1 -1
  476. package/utils/async-iterable-helpers/take-until.js +2 -3
  477. package/utils/async-iterable-helpers/take-until.js.map +1 -1
  478. package/utils/base64.js +3 -2
  479. package/utils/base64.js.map +1 -1
  480. package/utils/binary.js +3 -2
  481. package/utils/binary.js.map +1 -1
  482. package/utils/cancellation-token.d.ts +28 -28
  483. package/utils/cancellation-token.js +14 -14
  484. package/utils/cancellation-token.js.map +1 -1
  485. package/utils/clone.js +4 -0
  486. package/utils/clone.js.map +1 -1
  487. package/utils/compression.d.ts +19 -15
  488. package/utils/compression.js +43 -10
  489. package/utils/compression.js.map +1 -1
  490. package/utils/encoding.d.ts +10 -0
  491. package/utils/encoding.js +20 -4
  492. package/utils/encoding.js.map +1 -1
  493. package/utils/enum.d.ts +5 -8
  494. package/utils/enum.js +15 -13
  495. package/utils/enum.js.map +1 -1
  496. package/utils/feedable-async-iterable.js +1 -2
  497. package/utils/feedable-async-iterable.js.map +1 -1
  498. package/utils/function/memoize.js +4 -4
  499. package/utils/function/memoize.js.map +1 -1
  500. package/utils/helpers.d.ts +0 -2
  501. package/utils/helpers.js +3 -14
  502. package/utils/helpers.js.map +1 -1
  503. package/utils/image.js +7 -8
  504. package/utils/image.js.map +1 -1
  505. package/utils/index.d.ts +2 -0
  506. package/utils/index.js +2 -0
  507. package/utils/index.js.map +1 -1
  508. package/utils/math.d.ts +25 -10
  509. package/utils/math.js +32 -12
  510. package/utils/math.js.map +1 -1
  511. package/utils/object/decycle.js +10 -21
  512. package/utils/object/decycle.js.map +1 -1
  513. package/utils/object/dereference.d.ts +7 -5
  514. package/utils/object/dereference.js +4 -4
  515. package/utils/object/dereference.js.map +1 -1
  516. package/utils/object/forward-ref.js +3 -19
  517. package/utils/object/forward-ref.js.map +1 -1
  518. package/utils/object/merge.js +3 -3
  519. package/utils/object/merge.js.map +1 -1
  520. package/utils/object/object.js +3 -3
  521. package/utils/object/object.js.map +1 -1
  522. package/utils/object/property-name.d.ts +2 -2
  523. package/utils/patch-worker.js +1 -2
  524. package/utils/patch-worker.js.map +1 -1
  525. package/utils/periodic-sampler.js +2 -2
  526. package/utils/periodic-sampler.js.map +1 -1
  527. package/utils/proxy.d.ts +6 -0
  528. package/utils/proxy.js +21 -0
  529. package/utils/proxy.js.map +1 -0
  530. package/utils/stream/finalize-stream.d.ts +1 -0
  531. package/utils/stream/finalize-stream.js +38 -0
  532. package/utils/stream/finalize-stream.js.map +1 -0
  533. package/utils/stream/index.d.ts +4 -3
  534. package/utils/stream/index.js +4 -3
  535. package/utils/stream/index.js.map +1 -1
  536. package/utils/stream/readable-stream-adapter.d.ts +5 -0
  537. package/utils/stream/readable-stream-adapter.js +45 -0
  538. package/utils/stream/readable-stream-adapter.js.map +1 -0
  539. package/utils/stream/readable-stream-from-promise.d.ts +1 -0
  540. package/utils/stream/readable-stream-from-promise.js +12 -0
  541. package/utils/stream/readable-stream-from-promise.js.map +1 -0
  542. package/utils/stream/size-limited-stream.d.ts +2 -0
  543. package/utils/stream/size-limited-stream.js +18 -0
  544. package/utils/stream/size-limited-stream.js.map +1 -0
  545. package/utils/stream/stream-reader.d.ts +2 -1
  546. package/utils/stream/stream-reader.js +7 -10
  547. package/utils/stream/stream-reader.js.map +1 -1
  548. package/utils/throw.d.ts +2 -0
  549. package/utils/throw.js +15 -0
  550. package/utils/throw.js.map +1 -0
  551. package/utils/timing.js +2 -2
  552. package/utils/timing.js.map +1 -1
  553. package/utils/type-guards.d.ts +34 -16
  554. package/utils/type-guards.js +112 -75
  555. package/utils/type-guards.js.map +1 -1
  556. package/web-types.d.ts +28 -0
  557. package/web-types.js +3 -0
  558. package/web-types.js.map +1 -0
  559. package/http/client/adapters/got-http-client.adapter.d.ts +0 -10
  560. package/http/client/adapters/got-http-client.adapter.js +0 -141
  561. package/http/client/adapters/got-http-client.adapter.js.map +0 -1
  562. package/http/client/adapters/utils.d.ts +0 -11
  563. package/http/client/adapters/utils.js +0 -79
  564. package/http/client/adapters/utils.js.map +0 -1
  565. package/mail/mail-template-renderer.provider.d.ts +0 -8
  566. package/mail/mail-template-renderer.provider.js +0 -60
  567. package/mail/mail-template-renderer.provider.js.map +0 -1
  568. package/mail/mail-template.provider.d.ts +0 -4
  569. package/mail/mail-template.provider.js +0 -7
  570. package/mail/mail-template.provider.js.map +0 -1
  571. package/mail/mail-template.renderer.d.ts +0 -10
  572. package/mail/mail-template.renderer.js +0 -7
  573. package/mail/mail-template.renderer.js.map +0 -1
  574. package/mail/template-providers/file-mail-template.provider.d.ts +0 -24
  575. package/mail/template-providers/file-mail-template.provider.js +0 -51
  576. package/mail/template-providers/file-mail-template.provider.js.map +0 -1
  577. package/mail/template-providers/memory-mail-template.provider.d.ts +0 -6
  578. package/mail/template-providers/memory-mail-template.provider.js.map +0 -1
  579. package/mail/template-renderers/handlebars.mail-template-renderer.d.ts +0 -13
  580. package/mail/template-renderers/handlebars.mail-template-renderer.js +0 -49
  581. package/mail/template-renderers/handlebars.mail-template-renderer.js.map +0 -1
  582. package/mail/template-renderers/mjml.mail-template-renderer.d.ts +0 -14
  583. package/mail/template-renderers/mjml.mail-template-renderer.js +0 -63
  584. package/mail/template-renderers/mjml.mail-template-renderer.js.map +0 -1
  585. package/rxjs/compat/first-value-from.d.ts +0 -2
  586. package/rxjs/compat/first-value-from.js +0 -9
  587. package/rxjs/compat/first-value-from.js.map +0 -1
  588. package/rxjs/compat/index.d.ts +0 -1
  589. package/rxjs/compat/index.js.map +0 -1
  590. package/schema/schemas/exclude.d.ts +0 -4
  591. package/schema/schemas/exclude.js.map +0 -1
  592. package/templates/providers/file-template.provider.base.d.ts +0 -12
  593. package/templates/providers/file-template.provider.base.js +0 -50
  594. package/templates/providers/file-template.provider.base.js.map +0 -1
  595. package/templates/providers/file-template.provider.d.ts +0 -22
  596. package/templates/providers/file-template.provider.js.map +0 -1
  597. package/templates/providers/memory-template.provider.base.d.ts +0 -9
  598. package/templates/providers/memory-template.provider.base.js.map +0 -1
  599. package/templates/providers/memory-template.provider.d.ts +0 -4
  600. package/templates/providers/memory-template.provider.js +0 -18
  601. package/templates/providers/memory-template.provider.js.map +0 -1
  602. package/utils/stream/async-iterable-readable.d.ts +0 -13
  603. package/utils/stream/async-iterable-readable.js +0 -40
  604. package/utils/stream/async-iterable-readable.js.map +0 -1
  605. package/utils/stream/async-writable-stream.d.ts +0 -16
  606. package/utils/stream/async-writable-stream.js +0 -41
  607. package/utils/stream/async-writable-stream.js.map +0 -1
  608. package/utils/stream/typed-readable.d.ts +0 -58
  609. package/utils/stream/typed-readable.js +0 -9
  610. package/utils/stream/typed-readable.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import type { JsonPath } from "../../json-path";
2
- import type { CoerceResult } from '../types';
2
+ import type { CoercerContext, CoerceResult } from '../types';
3
3
  import { SchemaValueCoercer } from '../types';
4
4
  export declare class DateCoercer extends SchemaValueCoercer {
5
5
  readonly sourceType: (NumberConstructor | StringConstructor | BigIntConstructor)[];
6
6
  readonly targetType: DateConstructor;
7
- coerce(value: number | string | bigint, path: JsonPath): CoerceResult;
7
+ coerce(value: number | string | bigint, path: JsonPath, context: CoercerContext): CoerceResult;
8
8
  }
9
9
  export declare const dateCoercer: DateCoercer;
@@ -10,11 +10,11 @@ class DateCoercer extends types_1.SchemaValueCoercer {
10
10
  this.sourceType = [Number, String, BigInt];
11
11
  this.targetType = Date;
12
12
  }
13
- coerce(value, path) {
13
+ coerce(value, path, context) {
14
14
  const parseValue = (0, type_guards_1.isBigInt)(value) ? Number(value) : value;
15
15
  const date = new Date(parseValue);
16
16
  if (Number.isNaN(date.getTime())) {
17
- return { success: false, error: schema_error_1.SchemaError.couldNotCoerce(this.targetType, value.toString(), path) };
17
+ return { success: false, error: schema_error_1.SchemaError.couldNotCoerce(this.targetType, value.toString(), path, undefined, { fast: context.options.fastErrors }) };
18
18
  }
19
19
  return { success: true, value: date };
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"date.coercer.js","sourceRoot":"","sources":["../../../source/schema/coercers/date.coercer.ts"],"names":[],"mappings":";;;AACA,yDAA+C;AAC/C,kDAA8C;AAE9C,oCAA8C;AAE9C,MAAa,WAAY,SAAQ,0BAAkB;IAAnD;;QACW,eAAU,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QACtC,eAAU,GAAG,IAAI,CAAC;IAY7B,CAAC;IAVC,MAAM,CAAC,KAA+B,EAAE,IAAc;QACpD,MAAM,UAAU,GAAG,IAAA,sBAAQ,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAC3D,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;QAElC,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE;YAChC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC;SACvG;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACxC,CAAC;CACF;AAdD,kCAcC;AACY,QAAA,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"date.coercer.js","sourceRoot":"","sources":["../../../source/schema/coercers/date.coercer.ts"],"names":[],"mappings":";;;AACA,yDAA+C;AAC/C,kDAA8C;AAE9C,oCAA8C;AAE9C,MAAa,WAAY,SAAQ,0BAAkB;IAAnD;;QACW,eAAU,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QACtC,eAAU,GAAG,IAAI,CAAC;IAY7B,CAAC;IAVC,MAAM,CAAC,KAA+B,EAAE,IAAc,EAAE,OAAuB;QAC7E,MAAM,UAAU,GAAG,IAAA,sBAAQ,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAC3D,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;QAElC,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE;YAChC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SACxJ;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACxC,CAAC;CACF;AAdD,kCAcC;AACY,QAAA,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import type { JsonPath } from "../../json-path";
2
- import type { CoerceResult } from '../types';
2
+ import type { CoercerContext, CoerceResult } from '../types';
3
3
  import { SchemaValueCoercer } from '../types';
4
4
  export declare class NumberCoercer extends SchemaValueCoercer {
5
- readonly sourceType: (StringConstructor | BooleanConstructor | BigIntConstructor)[];
5
+ readonly sourceType: (BooleanConstructor | StringConstructor | BigIntConstructor)[];
6
6
  readonly targetType: NumberConstructor;
7
- coerce(value: string | bigint | boolean, path: JsonPath): CoerceResult;
7
+ coerce(value: string | bigint | boolean, path: JsonPath, context: CoercerContext): CoerceResult;
8
8
  }
9
9
  export declare const numberCoercer: NumberCoercer;
@@ -9,10 +9,10 @@ class NumberCoercer extends types_1.SchemaValueCoercer {
9
9
  this.sourceType = [String, BigInt, Boolean];
10
10
  this.targetType = Number;
11
11
  }
12
- coerce(value, path) {
12
+ coerce(value, path, context) {
13
13
  const result = Number(value);
14
14
  if (Number.isNaN(result)) {
15
- return { success: false, error: schema_error_1.SchemaError.couldNotCoerce(this.targetType, value.toString(), path, 'Value is not a number.') };
15
+ return { success: false, error: schema_error_1.SchemaError.couldNotCoerce(this.targetType, value.toString(), path, 'Value is not a number.', { fast: context.options.fastErrors }) };
16
16
  }
17
17
  return { success: true, value: result };
18
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"number.coercer.js","sourceRoot":"","sources":["../../../source/schema/coercers/number.coercer.ts"],"names":[],"mappings":";;;AACA,kDAA8C;AAE9C,oCAA8C;AAE9C,MAAa,aAAc,SAAQ,0BAAkB;IAArD;;QACW,eAAU,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QACvC,eAAU,GAAG,MAAM,CAAC;IAW/B,CAAC;IATC,MAAM,CAAC,KAAgC,EAAE,IAAc;QACrD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;YACxB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,wBAAwB,CAAC,EAAE,CAAC;SACjI;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC1C,CAAC;CACF;AAbD,sCAaC;AAEY,QAAA,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"number.coercer.js","sourceRoot":"","sources":["../../../source/schema/coercers/number.coercer.ts"],"names":[],"mappings":";;;AACA,kDAA8C;AAE9C,oCAA8C;AAE9C,MAAa,aAAc,SAAQ,0BAAkB;IAArD;;QACW,eAAU,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QACvC,eAAU,GAAG,MAAM,CAAC;IAW/B,CAAC;IATC,MAAM,CAAC,KAAgC,EAAE,IAAc,EAAE,OAAuB;QAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;YACxB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SACvK;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC1C,CAAC;CACF;AAbD,sCAaC;AAEY,QAAA,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import type { JsonPath } from "../../json-path/json-path";
2
- import type { CoerceResult } from '../types';
2
+ import type { CoercerContext, CoerceResult } from '../types';
3
3
  import { SchemaValueCoercer } from '../types';
4
4
  export declare class RegExpCoercer extends SchemaValueCoercer {
5
5
  readonly sourceType: StringConstructor;
6
6
  readonly targetType: RegExpConstructor;
7
7
  readonly flags: string | undefined;
8
8
  constructor(flags?: string);
9
- coerce(value: string, path: JsonPath): CoerceResult;
9
+ coerce(value: string, path: JsonPath, context: CoercerContext): CoerceResult;
10
10
  }
11
11
  export declare const regExpCoercer: RegExpCoercer;
@@ -10,12 +10,12 @@ class RegExpCoercer extends types_1.SchemaValueCoercer {
10
10
  this.targetType = RegExp;
11
11
  this.flags = flags;
12
12
  }
13
- coerce(value, path) {
13
+ coerce(value, path, context) {
14
14
  try {
15
15
  return { success: true, value: RegExp(value, this.flags) };
16
16
  }
17
17
  catch (error) {
18
- return { success: false, error: schema_error_1.SchemaError.couldNotCoerce(this.targetType, 'invalid regexp pattern', path, error.message) };
18
+ return { success: false, error: schema_error_1.SchemaError.couldNotCoerce(this.targetType, 'invalid regexp pattern', path, error.message, { fast: context.options.fastErrors }) };
19
19
  }
20
20
  }
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"regexp.coercer.js","sourceRoot":"","sources":["../../../source/schema/coercers/regexp.coercer.ts"],"names":[],"mappings":";;;AACA,kDAA8C;AAE9C,oCAA8C;AAE9C,MAAa,aAAc,SAAQ,0BAAkB;IAKnD,YAAY,QAAgB,GAAG;QAC7B,KAAK,EAAE,CAAC;QALD,eAAU,GAAG,MAAM,CAAC;QACpB,eAAU,GAAG,MAAM,CAAC;QAM3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,KAAa,EAAE,IAAc;QAClC,IAAI;YACF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;SAC5D;QACD,OAAO,KAAK,EAAE;YACZ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,wBAAwB,EAAE,IAAI,EAAG,KAAe,CAAC,OAAO,CAAC,EAAE,CAAC;SACzI;IACH,CAAC;CACF;AAnBD,sCAmBC;AAEY,QAAA,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"regexp.coercer.js","sourceRoot":"","sources":["../../../source/schema/coercers/regexp.coercer.ts"],"names":[],"mappings":";;;AACA,kDAA8C;AAE9C,oCAA8C;AAE9C,MAAa,aAAc,SAAQ,0BAAkB;IAKnD,YAAY,QAAgB,GAAG;QAC7B,KAAK,EAAE,CAAC;QALD,eAAU,GAAG,MAAM,CAAC;QACpB,eAAU,GAAG,MAAM,CAAC;QAM3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,KAAa,EAAE,IAAc,EAAE,OAAuB;QAC3D,IAAI;YACF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;SAC5D;QACD,OAAO,KAAK,EAAE;YACZ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,wBAAwB,EAAE,IAAI,EAAG,KAAe,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SAC/K;IACH,CAAC;CACF;AAnBD,sCAmBC;AAEY,QAAA,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import type { JsonPath } from "../../json-path";
2
- import type { CoerceResult } from '../types';
2
+ import type { CoercerContext, CoerceResult } from '../types';
3
3
  import { SchemaValueCoercer } from '../types';
4
4
  export declare class StringCoercer extends SchemaValueCoercer {
5
- readonly sourceType: (NumberConstructor | DateConstructor | BooleanConstructor | BigIntConstructor)[];
5
+ readonly sourceType: (DateConstructor | NumberConstructor | BooleanConstructor | BigIntConstructor)[];
6
6
  readonly targetType: StringConstructor;
7
- coerce(value: number | boolean | bigint | Date, path: JsonPath): CoerceResult;
7
+ coerce(value: number | boolean | bigint | Date, path: JsonPath, context: CoercerContext): CoerceResult;
8
8
  }
9
9
  export declare const stringCoercer: StringCoercer;
@@ -10,9 +10,9 @@ class StringCoercer extends types_1.SchemaValueCoercer {
10
10
  this.sourceType = [Number, Boolean, BigInt, Date];
11
11
  this.targetType = String;
12
12
  }
13
- coerce(value, path) {
13
+ coerce(value, path, context) {
14
14
  if ((0, type_guards_1.isDate)(value) && !(0, type_guards_1.isValidDate)(value)) {
15
- return { success: false, error: schema_error_1.SchemaError.couldNotCoerce(this.targetType, 'invalid date', path) };
15
+ return { success: false, error: schema_error_1.SchemaError.couldNotCoerce(this.targetType, 'invalid date', path, undefined, { fast: context.options.fastErrors }) };
16
16
  }
17
17
  return { success: true, value: value.toString() };
18
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"string.coercer.js","sourceRoot":"","sources":["../../../source/schema/coercers/string.coercer.ts"],"names":[],"mappings":";;;AACA,yDAA0D;AAC1D,kDAA8C;AAE9C,oCAA8C;AAE9C,MAAa,aAAc,SAAQ,0BAAkB;IAArD;;QACW,eAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAC7C,eAAU,GAAG,MAAM,CAAC;IAS/B,CAAC;IAPC,MAAM,CAAC,KAAuC,EAAE,IAAc;QAC5D,IAAI,IAAA,oBAAM,EAAC,KAAK,CAAC,IAAI,CAAC,IAAA,yBAAW,EAAC,KAAK,CAAC,EAAE;YACxC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,CAAC;SACrG;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;IACpD,CAAC;CACF;AAXD,sCAWC;AAEY,QAAA,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"string.coercer.js","sourceRoot":"","sources":["../../../source/schema/coercers/string.coercer.ts"],"names":[],"mappings":";;;AACA,yDAA0D;AAC1D,kDAA8C;AAE9C,oCAA8C;AAE9C,MAAa,aAAc,SAAQ,0BAAkB;IAArD;;QACW,eAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAC7C,eAAU,GAAG,MAAM,CAAC;IAS/B,CAAC;IAPC,MAAM,CAAC,KAAuC,EAAE,IAAc,EAAE,OAAuB;QACrF,IAAI,IAAA,oBAAM,EAAC,KAAK,CAAC,IAAI,CAAC,IAAA,yBAAW,EAAC,KAAK,CAAC,EAAE;YACxC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SACtJ;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;IACpD,CAAC;CACF;AAXD,sCAWC;AAEY,QAAA,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC"}
@@ -14,9 +14,9 @@ class Uint8ArrayCoercer extends types_1.SchemaValueCoercer {
14
14
  this.targetType = Uint8Array;
15
15
  }
16
16
  coerce(value, path, { options }) {
17
- const testResult = schema_1.Schema.testWithFastError(byteNumberArraySchema, value, options, path);
17
+ const testResult = (0, schema_1.testWithFastError)(byteNumberArraySchema, value, options, path);
18
18
  if (!testResult.valid) {
19
- return { success: false, error: schema_error_1.SchemaError.couldNotCoerce(Uint8Array, Array, path, undefined, { inner: testResult.error }) };
19
+ return { success: false, error: schema_error_1.SchemaError.couldNotCoerce(Uint8Array, Array, path, undefined, { inner: testResult.error, fast: options.fastErrors }) };
20
20
  }
21
21
  return { success: true, value: Uint8Array.from(testResult.value) };
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"uint8-array.coercer.js","sourceRoot":"","sources":["../../../source/schema/coercers/uint8-array.coercer.ts"],"names":[],"mappings":";;;AACA,sCAAmC;AACnC,kDAA8C;AAC9C,4CAAyC;AACzC,8CAA2C;AAE3C,oCAA8C;AAE9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Q,0BAAkB;IAAzD;;QACW,eAAU,GAAG,KAAK,CAAC;QACnB,eAAU,GAAG,UAAU,CAAC;IAWnC,CAAC;IATC,MAAM,CAAC,KAAY,EAAE,IAAc,EAAE,EAAE,OAAO,EAAkB;QAC9D,MAAM,UAAU,GAAG,IAAA,0BAAiB,EAAC,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QAElF,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;YACrB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SACzJ;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;IACrE,CAAC;CACF;AAbD,8CAaC;AAEY,QAAA,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import type { JsonPath } from "../../json-path/json-path";
2
- import type { Enumeration as EnumerationType, OneOrMany } from "../../types";
3
- import type { ConstraintResult } from '../types';
2
+ import type { Enumeration, OneOrMany } from "../../types";
3
+ import type { ConstraintContext, ConstraintResult } from '../types';
4
4
  import { SchemaValueConstraint } from '../types';
5
5
  export declare class EnumerationConstraint extends SchemaValueConstraint {
6
6
  private readonly allowedValuesSet;
7
7
  private readonly allowedValuesString;
8
- readonly enumeration: EnumerationType;
8
+ readonly enumeration: Enumeration;
9
9
  readonly suitableTypes: SchemaValueConstraint['suitableTypes'];
10
10
  readonly expects: OneOrMany<string>;
11
- constructor(enumeration: EnumerationType);
12
- validate(value: number, path: JsonPath): ConstraintResult;
11
+ constructor(enumeration: Enumeration);
12
+ validate(value: number, path: JsonPath, context: ConstraintContext): ConstraintResult;
13
13
  }
@@ -2,25 +2,25 @@
2
2
  /* eslint-disable @typescript-eslint/naming-convention */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.EnumerationConstraint = void 0;
5
- const utils_1 = require("../../utils");
5
+ const enum_1 = require("../../utils/enum");
6
6
  const iterable_helpers_1 = require("../../utils/iterable-helpers");
7
7
  const type_guards_1 = require("../../utils/type-guards");
8
8
  const schema_error_1 = require("../schema.error");
9
9
  const types_1 = require("../types");
10
- const utils_2 = require("../utils");
10
+ const utils_1 = require("../utils");
11
11
  class EnumerationConstraint extends types_1.SchemaValueConstraint {
12
12
  constructor(enumeration) {
13
13
  super();
14
14
  this.enumeration = enumeration;
15
- const allowedValues = (0, type_guards_1.isArray)(enumeration) ? enumeration : (0, utils_1.enumValues)(enumeration);
15
+ const allowedValues = (0, type_guards_1.isArray)(enumeration) ? enumeration : (0, enum_1.enumValues)(enumeration);
16
16
  this.allowedValuesSet = new Set(allowedValues);
17
17
  this.allowedValuesString = allowedValues.map((value) => ((0, type_guards_1.isString)(value) ? `"${value}"` : value)).join(', ');
18
- this.suitableTypes = [...(0, iterable_helpers_1.distinct)(allowedValues.map((value) => (0, utils_2.getValueType)(value)))];
18
+ this.suitableTypes = [...(0, iterable_helpers_1.distinct)(allowedValues.map((value) => (0, utils_1.getValueType)(value)))];
19
19
  this.expects = `one of [${this.allowedValuesString}]`;
20
20
  }
21
- validate(value, path) {
21
+ validate(value, path, context) {
22
22
  if (!this.allowedValuesSet.has(value)) {
23
- return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toString(), path) };
23
+ return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toString(), path, { fast: context.options.fastErrors }) };
24
24
  }
25
25
  return { valid: true };
26
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"enumeration.js","sourceRoot":"","sources":["../../../source/schema/constraints/enumeration.ts"],"names":[],"mappings":";AAAA,yDAAyD;;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AAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SACxI;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF;AA5BD,sDA4BC"}
@@ -2,7 +2,7 @@ import type { JsonPath } from "../../json-path/json-path";
2
2
  import type { Decorator } from "../../reflection";
3
3
  import type { OneOrMany } from "../../types";
4
4
  import { SchemaError } from '../schema.error';
5
- import type { ConstraintResult } from '../types';
5
+ import type { ConstraintContext, ConstraintResult } from '../types';
6
6
  import { SchemaValueConstraint } from '../types';
7
7
  export declare type GenericConstraintResult = {
8
8
  success: true;
@@ -17,6 +17,6 @@ export declare class GenericConstraint<T> extends SchemaValueConstraint {
17
17
  readonly expects: OneOrMany<string>;
18
18
  readonly constraintFunction: GenericConstraintFunction<T>;
19
19
  constructor(constraintFunction: GenericConstraintFunction<T>, expects?: OneOrMany<string>);
20
- validate(value: T, path: JsonPath): ConstraintResult;
20
+ validate(value: T, path: JsonPath, context: ConstraintContext): ConstraintResult;
21
21
  }
22
22
  export declare function Constraint<T>(constraintFunction: GenericConstraintFunction<T>, expects?: OneOrMany<string>): Decorator<'property' | 'accessor'>;
@@ -13,12 +13,12 @@ class GenericConstraint extends types_1.SchemaValueConstraint {
13
13
  this.constraintFunction = constraintFunction;
14
14
  this.expects = expects;
15
15
  }
16
- validate(value, path) {
16
+ validate(value, path, context) {
17
17
  const result = this.constraintFunction(value, path);
18
18
  if ((0, type_guards_1.isBoolean)(result)) {
19
19
  return result
20
20
  ? { valid: true }
21
- : { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, 'invalid value', path) };
21
+ : { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, 'invalid value', path, { fast: context.options.fastErrors }) };
22
22
  }
23
23
  return result;
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generic.js","sourceRoot":"","sources":["../../../source/schema/constraints/generic.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAKzD,yDAAgD;AAChD,8CAAqE;AACrE,kDAA8C;AAE9C,oCAAiD;AAQjD,MAAa,iBAAqB,SAAQ,6BAAqB;IAK7D,YAAY,kBAAgD,EAAE,UAA6B,aAAa;QACtG,KAAK,EAAE,CAAC;QALD,kBAAa,GAAG,MAAM,CAAC;QAO9B,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ,CAAC,KAAQ,EAAE,IAAc;QAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAEpD,IAAI,IAAA,uBAAS,EAAC,MAAM,CAAC,EAAE;YACrB,OAAO,MAAM;gBACX,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;gBACjB,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,CAAC;SAC9F;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAvBD,8CAuBC;AAED,SAAgB,UAAU,CAAI,kBAAgD,EAAE,OAA2B;IACzG,MAAM,UAAU,GAAG,IAAI,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACtE,OAAO,IAAA,iDAAoC,EAAC,UAAU,CAAC,CAAC;AAC1D,CAAC;AAHD,gCAGC"}
1
+ {"version":3,"file":"generic.js","sourceRoot":"","sources":["../../../source/schema/constraints/generic.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAKzD,yDAAgD;AAChD,8CAAqE;AACrE,kDAA8C;AAE9C,oCAAiD;AAQjD,MAAa,iBAAqB,SAAQ,6BAAqB;IAK7D,YAAY,kBAAgD,EAAE,UAA6B,aAAa;QACtG,KAAK,EAAE,CAAC;QALD,kBAAa,GAAG,MAAM,CAAC;QAO9B,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ,CAAC,KAAQ,EAAE,IAAc,EAAE,OAA0B;QAC3D,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAEpD,IAAI,IAAA,uBAAS,EAAC,MAAM,CAAC,EAAE;YACrB,OAAO,MAAM;gBACX,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;gBACjB,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SACpI;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAvBD,8CAuBC;AAED,SAAgB,UAAU,CAAI,kBAAgD,EAAE,OAA2B;IACzG,MAAM,UAAU,GAAG,IAAI,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACtE,OAAO,IAAA,iDAAoC,EAAC,UAAU,CAAC,CAAC;AAC1D,CAAC;AAHD,gCAGC"}
@@ -1,12 +1,12 @@
1
1
  import type { JsonPath } from "../../json-path/json-path";
2
2
  import type { Decorator } from "../../reflection";
3
- import type { ConstraintResult } from '../types';
3
+ import type { ConstraintContext, ConstraintResult } from '../types';
4
4
  import { SchemaValueConstraint } from '../types';
5
5
  export declare class IntegerConstraint extends SchemaValueConstraint {
6
6
  readonly suitableTypes: NumberConstructor;
7
7
  readonly expects: string;
8
8
  constructor();
9
- validate(value: number, path: JsonPath): ConstraintResult;
9
+ validate(value: number, path: JsonPath, context: ConstraintContext): ConstraintResult;
10
10
  }
11
11
  export declare const integerConstraint: IntegerConstraint;
12
12
  export declare function Integer(): Decorator<'property' | 'accessor'>;
@@ -11,9 +11,9 @@ class IntegerConstraint extends types_1.SchemaValueConstraint {
11
11
  this.suitableTypes = Number;
12
12
  this.expects = 'an integer';
13
13
  }
14
- validate(value, path) {
14
+ validate(value, path, context) {
15
15
  if (!Number.isInteger(value)) {
16
- return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toString(), path) };
16
+ return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toString(), path, { fast: context.options.fastErrors }) };
17
17
  }
18
18
  return { valid: true };
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"integer.js","sourceRoot":"","sources":["../../../source/schema/constraints/integer.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAIzD,+CAA2E;AAC3E,kDAA8C;AAE9C,oCAA6D;AAE7D,MAAa,iBAAkB,SAAQ,6BAAqB;IAI1D;QACE,KAAK,EAAE,CAAC;QAJD,kBAAa,GAAG,MAAM,CAAC;QAM9B,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC;IAC9B,CAAC;IAED,QAAQ,CAAC,KAAa,EAAE,IAAc;QACpC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAC5B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC;SAClG;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF;AAjBD,8CAiBC;AAEY,QAAA,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC;AAEzD,SAAgB,OAAO;IACrB,OAAO,IAAA,4CAAoC,EAAC,yBAAiB,EAAE,EAAE,MAAM,EAAE,IAAA,kBAAU,EAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACjG,CAAC;AAFD,0BAEC"}
1
+ {"version":3,"file":"integer.js","sourceRoot":"","sources":["../../../source/schema/constraints/integer.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAIzD,+CAA2E;AAC3E,kDAA8C;AAE9C,oCAA6D;AAE7D,MAAa,iBAAkB,SAAQ,6BAAqB;IAI1D;QACE,KAAK,EAAE,CAAC;QAJD,kBAAa,GAAG,MAAM,CAAC;QAM9B,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC;IAC9B,CAAC;IAED,QAAQ,CAAC,KAAa,EAAE,IAAc,EAAE,OAA0B;QAChE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAC5B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SACxI;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF;AAjBD,8CAiBC;AAEY,QAAA,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC;AAEzD,SAAgB,OAAO;IACrB,OAAO,IAAA,4CAAoC,EAAC,yBAAiB,EAAE,EAAE,MAAM,EAAE,IAAA,kBAAU,EAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACjG,CAAC;AAFD,0BAEC"}
@@ -1,10 +1,10 @@
1
1
  import type { JsonPath } from "../../json-path/json-path";
2
- import type { ConstraintResult } from '../types';
2
+ import type { ConstraintContext, ConstraintResult } from '../types';
3
3
  import { SchemaValueConstraint } from '../types';
4
4
  export declare class LiteralConstraint extends SchemaValueConstraint {
5
5
  readonly literal: any;
6
6
  readonly suitableTypes: SchemaValueConstraint['suitableTypes'];
7
7
  readonly expects: string;
8
8
  constructor(literal: any);
9
- validate(value: any, path: JsonPath): ConstraintResult;
9
+ validate(value: any, path: JsonPath, context: ConstraintContext): ConstraintResult;
10
10
  }
@@ -14,10 +14,10 @@ class LiteralConstraint extends types_1.SchemaValueConstraint {
14
14
  const literalName = (0, type_guards_1.isPrimitive)(literal) ? String(literal) : (0, utils_1.getValueTypeName)(this.suitableTypes);
15
15
  this.expects = `literal ${literalName}`;
16
16
  }
17
- validate(value, path) {
17
+ validate(value, path, context) {
18
18
  if (value !== this.literal) {
19
19
  const valueType = (0, utils_1.getValueType)(value);
20
- return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, (0, utils_1.getValueTypeName)(valueType), path) };
20
+ return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, (0, utils_1.getValueTypeName)(valueType), path, { fast: context.options.fastErrors }) };
21
21
  }
22
22
  return { valid: true };
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"literal.js","sourceRoot":"","sources":["../../../source/schema/constraints/literal.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAGzD,yDAAkD;AAClD,kDAA8C;AAE9C,oCAAiD;AACjD,oCAA0D;AAE1D,MAAa,iBAAkB,SAAQ,6BAAqB;IAK1D,YAAY,OAAY;QACtB,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,IAAI,CAAC,aAAa,GAAG,IAAA,oBAAY,EAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,WAAW,GAAG,IAAA,yBAAW,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAA,wBAAgB,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAClG,IAAI,CAAC,OAAO,GAAG,WAAW,WAAW,EAAE,CAAC;IAC1C,CAAC;IAED,QAAQ,CAAC,KAAU,EAAE,IAAc;QACjC,IAAI,KAAK,KAAK,IAAI,CAAC,OAAO,EAAE;YAC1B,MAAM,SA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AC,UAAU,EAAE,CAAC,EAAE,CAAC;SACnJ;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF;AAvBD,8CAuBC"}
@@ -1,12 +1,12 @@
1
1
  import type { JsonPath } from "../../json-path/json-path";
2
2
  import type { Decorator } from "../../reflection";
3
- import type { ConstraintResult } from '../types';
3
+ import type { ConstraintContext, ConstraintResult } from '../types';
4
4
  import { SchemaValueConstraint } from '../types';
5
5
  export declare class MaximumDateConstraint extends SchemaValueConstraint {
6
6
  private readonly maximum;
7
7
  readonly suitableTypes: NumberConstructor;
8
8
  readonly expects: string;
9
9
  constructor(maximum: Date | number);
10
- validate(value: Date, path: JsonPath): ConstraintResult;
10
+ validate(value: Date, path: JsonPath, context: ConstraintContext): ConstraintResult;
11
11
  }
12
12
  export declare function MaximumDate(maximum: number): Decorator<'property' | 'accessor'>;
@@ -14,9 +14,9 @@ class MaximumDateConstraint extends types_1.SchemaValueConstraint {
14
14
  this.expects = `<= ${this.maximum.toISOString()}`;
15
15
  (0, type_guards_1.assertValidDate)(this.maximum);
16
16
  }
17
- validate(value, path) {
17
+ validate(value, path, context) {
18
18
  if (value > this.maximum) {
19
- return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toISOString(), path) };
19
+ return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toISOString(), path, { fast: context.options.fastErrors }) };
20
20
  }
21
21
  return { valid: true };
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"maximum-date.js","sourceRoot":"","sources":["../../../source/schema/constraints/maximum-date.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAIzD,yDAAgE;AAChE,8CAAqE;AACrE,kDAA8C;AAE9C,oCAA6D;AAE7D,MAAa,qBAAsB,SAAQ,6BAAqB;IAM9D,YAAY,OAAsB;QAChC,KAAK,EAAE,CAAC;QAJD,kBAAa,GAAG,MAAM,CAAC;QAM9B,IAAI,CAAC,OAAO,GAAG,IAAA,s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AAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;QAElD,IAAA,6BAAe,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED,QAAQ,CAAC,KAAW,EAAE,IAAc,EAAE,OAA0B;QAC9D,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE;YACxB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SAC3I;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF;AAtBD,sDAsBC;AAED,SAAgB,WAAW,CAAC,OAAe;IACzC,OAAO,IAAA,iDAAoC,EAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAA,kBAAU,EAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAClH,CAAC;AAFD,kCAEC"}
@@ -1,12 +1,12 @@
1
1
  import type { JsonPath } from "../../json-path/json-path";
2
2
  import type { Decorator } from "../../reflection";
3
- import type { ConstraintResult } from '../types';
3
+ import type { ConstraintContext, ConstraintResult } from '../types';
4
4
  import { SchemaValueConstraint } from '../types';
5
5
  export declare class MaximumLengthConstraint extends SchemaValueConstraint {
6
6
  private readonly maximumLength;
7
- readonly suitableTypes: (ArrayConstructor | StringConstructor | Uint8ArrayConstructor | Int8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor | BigInt64ArrayConstructor | BigUint64ArrayConstructor | ArrayBufferConstructor)[];
7
+ readonly suitableTypes: (ArrayConstructor | Uint8ArrayConstructor | StringConstructor | Int8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor | BigInt64ArrayConstructor | BigUint64ArrayConstructor | ArrayBufferConstructor)[];
8
8
  readonly expects: string;
9
9
  constructor(maximumLength: number);
10
- validate(value: string, path: JsonPath): ConstraintResult;
10
+ validate(value: string, path: JsonPath, context: ConstraintContext): ConstraintResult;
11
11
  }
12
12
  export declare function MaximumLength(maximumLength: number): Decorator<'property' | 'accessor'>;
@@ -13,10 +13,10 @@ class MaximumLengthConstraint extends types_1.SchemaValueConstraint {
13
13
  this.maximumLength = maximumLength;
14
14
  this.expects = `a maximum length of ${this.maximumLength}`;
15
15
  }
16
- validate(value, path) {
16
+ validate(value, path, context) {
17
17
  const length = (0, type_guards_1.isArrayBuffer)(value) ? value.byteLength : value.length;
18
18
  if (length > this.maximumLength) {
19
- return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, `a length of ${length}`, path) };
19
+ return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, `a length of ${length}`, path, { fast: context.options.fastErrors }) };
20
20
  }
21
21
  return { valid: true };
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"maximum-length.js","sourceRoot":"","sources":["../../../source/schema/constraints/maximum-length.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAIzD,yDAAoD;AACpD,+CAA2E;AAC3E,kDAA8C;AAE9C,oCAAiD;AAEjD,MAAa,uBAAwB,SAAQ,6BAAqB;IAMhE,YAAY,aAAqB;QAC/B,KAAK,EAAE,CAAC;QAJD,kBAAa,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;QAM3M,IAAI,CAAC,aAAa,GAAG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a,EAAE,CAAC;IAC7D,CAAC;IAED,QAAQ,CAAC,KAAa,EAAE,IAAc,EAAE,OAA0B;QAChE,MAAM,MAAM,GAAG,IAAA,2BAAa,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;QAEtE,IAAI,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE;YAC/B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SAC/I;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF;AAtBD,0DAsBC;AAED,SAAgB,aAAa,CAAC,aAAqB;IACjD,OAAO,IAAA,4CAAoC,EAAC,IAAI,uBAAuB,CAAC,aAAa,CAAC,CAAC,CAAC;AAC1F,CAAC;AAFD,sCAEC"}
@@ -1,12 +1,12 @@
1
1
  import type { JsonPath } from "../../json-path/json-path";
2
2
  import type { Decorator } from "../../reflection";
3
- import type { ConstraintResult } from '../types';
3
+ import type { ConstraintContext, ConstraintResult } from '../types';
4
4
  import { SchemaValueConstraint } from '../types';
5
5
  export declare class MaximumConstraint extends SchemaValueConstraint {
6
6
  private readonly maximum;
7
7
  readonly suitableTypes: NumberConstructor;
8
8
  readonly expects: string;
9
9
  constructor(maximum: number);
10
- validate(value: number, path: JsonPath): ConstraintResult;
10
+ validate(value: number, path: JsonPath, context: ConstraintContext): ConstraintResult;
11
11
  }
12
12
  export declare function Maximum(maximum: number): Decorator<'property' | 'accessor'>;
@@ -12,9 +12,9 @@ class MaximumConstraint extends types_1.SchemaValueConstraint {
12
12
  this.maximum = maximum;
13
13
  this.expects = `<= ${this.maximum}`;
14
14
  }
15
- validate(value, path) {
15
+ validate(value, path, context) {
16
16
  if (value > this.maximum) {
17
- return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toString(), path) };
17
+ return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toString(), path, { fast: context.options.fastErrors }) };
18
18
  }
19
19
  return { valid: true };
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"maximum.js","sourceRoot":"","sources":["../../../source/schema/constraints/maximum.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAIzD,8CAAqE;AACrE,kDAA8C;AAE9C,oCAA6D;AAE7D,MAAa,iBAAkB,SAAQ,6BAAqB;IAM1D,YAAY,OAAe;QACzB,KAAK,EAAE,CAAC;QAJD,kBAAa,GAAG,MAAM,CAAC;QAM9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IACtC,CAAC;IAED,QAAQ,CAAC,KAAa,EAAE,IAAc;QACpC,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE;YACxB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC;SAClG;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF;AApBD,8CAoBC;AAED,SAAgB,OAAO,CAAC,OAAe;IACrC,OAAO,IAAA,iDAAoC,EAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAA,kBAAU,EAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAC9G,CAAC;AAFD,0BAEC"}
1
+ {"version":3,"file":"maximum.js","sourceRoot":"","sources":["../../../source/schema/constraints/maximum.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAIzD,8CAAqE;AACrE,kDAA8C;AAE9C,oCAA6D;AAE7D,MAAa,iBAAkB,SAAQ,6BAAqB;IAM1D,YAAY,OAAe;QACzB,KAAK,EAAE,CAAC;QAJD,kBAAa,GAAG,MAAM,CAAC;QAM9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IACtC,CAAC;IAED,QAAQ,CAAC,KAAa,EAAE,IAAc,EAAE,OAA0B;QAChE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE;YACxB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SACxI;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF;AApBD,8CAoBC;AAED,SAAgB,OAAO,CAAC,OAAe;IACrC,OAAO,IAAA,iDAAoC,EAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAA,kBAAU,EAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAC9G,CAAC;AAFD,0BAEC"}
@@ -1,12 +1,12 @@
1
1
  import type { JsonPath } from "../../json-path/json-path";
2
2
  import type { Decorator } from "../../reflection";
3
- import type { ConstraintResult } from '../types';
3
+ import type { ConstraintContext, ConstraintResult } from '../types';
4
4
  import { SchemaValueConstraint } from '../types';
5
5
  export declare class MinimumDateConstraint extends SchemaValueConstraint {
6
6
  private readonly minimum;
7
7
  readonly suitableTypes: NumberConstructor;
8
8
  readonly expects: string;
9
9
  constructor(minimum: Date | number);
10
- validate(value: Date, path: JsonPath): ConstraintResult;
10
+ validate(value: Date, path: JsonPath, context: ConstraintContext): ConstraintResult;
11
11
  }
12
12
  export declare function MinimumDate(minimum: number): Decorator<'property' | 'accessor'>;
@@ -14,9 +14,9 @@ class MinimumDateConstraint extends types_1.SchemaValueConstraint {
14
14
  this.expects = `>= ${this.minimum.toISOString()}`;
15
15
  (0, type_guards_1.assertValidDate)(this.minimum);
16
16
  }
17
- validate(value, path) {
17
+ validate(value, path, context) {
18
18
  if (value > this.minimum) {
19
- return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toISOString(), path) };
19
+ return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toISOString(), path, { fast: context.options.fastErrors }) };
20
20
  }
21
21
  return { valid: true };
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"minimum-date.js","sourceRoot":"","sources":["../../../source/schema/constraints/minimum-date.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAIzD,yDAAgE;AAChE,8CAAqE;AACrE,kDAA8C;AAE9C,oCAA6D;AAE7D,MAAa,qBAAsB,SAAQ,6BAAqB;IAM9D,YAAY,OAAsB;QAChC,KAAK,EAAE,CAAC;QAJD,kBAAa,GAAG,MAAM,CAAC;QAM9B,IAAI,CAAC,OAAO,GAAG,IAAA,sBAAQ,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC/D,IAAI,CAAC,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;QAElD,IAAA,6BAAe,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED,QAAQ,CAAC,KAAW,EAAE,IAAc;QAClC,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE;YACxB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC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CACF;AAtBD,sDAsBC;AAED,SAAgB,WAAW,CAAC,OAAe;IACzC,OAAO,IAAA,iDAAoC,EAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAA,kBAAU,EAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAClH,CAAC;AAFD,kCAEC"}
@@ -1,12 +1,12 @@
1
1
  import type { JsonPath } from "../../json-path/json-path";
2
2
  import type { Decorator } from "../../reflection";
3
- import type { ConstraintResult } from '../types';
3
+ import type { ConstraintContext, ConstraintResult } from '../types';
4
4
  import { SchemaValueConstraint } from '../types';
5
5
  export declare class MinimumLengthConstraint extends SchemaValueConstraint {
6
6
  private readonly minimumLength;
7
- readonly suitableTypes: (ArrayConstructor | StringConstructor | Uint8ArrayConstructor | Int8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor | BigInt64ArrayConstructor | BigUint64ArrayConstructor | ArrayBufferConstructor)[];
7
+ readonly suitableTypes: (ArrayConstructor | Uint8ArrayConstructor | StringConstructor | Int8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor | BigInt64ArrayConstructor | BigUint64ArrayConstructor | ArrayBufferConstructor)[];
8
8
  readonly expects: string;
9
9
  constructor(minimumLength: number);
10
- validate(value: string | ArrayLike<any> | ArrayBuffer, path: JsonPath): ConstraintResult;
10
+ validate(value: string | ArrayLike<any> | ArrayBuffer, path: JsonPath, context: ConstraintContext): ConstraintResult;
11
11
  }
12
12
  export declare function MinimumLength(minimumLength: number): Decorator<'property' | 'accessor'>;
@@ -13,10 +13,10 @@ class MinimumLengthConstraint extends types_1.SchemaValueConstraint {
13
13
  this.minimumLength = minimumLength;
14
14
  this.expects = `a minimum length of ${this.minimumLength}`;
15
15
  }
16
- validate(value, path) {
16
+ validate(value, path, context) {
17
17
  const length = (0, type_guards_1.isArrayBuffer)(value) ? value.byteLength : value.length;
18
18
  if (length < this.minimumLength) {
19
- return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, `a length of ${length}`, path) };
19
+ return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, `a length of ${length}`, path, { fast: context.options.fastErrors }) };
20
20
  }
21
21
  return { valid: true };
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"minimum-length.js","sourceRoot":"","sources":["../../../source/schema/constraints/minimum-length.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAIzD,yDAAoD;AACpD,+CAA2E;AAC3E,kDAA8C;AAE9C,oCAAiD;AAEjD,MAAa,uBAAwB,SAAQ,6BAAqB;IAMhE,YAAY,aAAqB;QAC/B,KAAK,EAAE,CAAC;QAJD,kBAAa,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;QAM3M,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,uBAAuB,IAAI,CAAC,aAAa,EAAE,CAAC;IAC7D,CAAC;IAED,QAAQ,CAAC,KAA4C,EAAE,IAAc;QACnE,MAAM,MAAM,GAAG,IAAA,2BAAa,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;QAEtE,IAAI,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE;YAC/B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAAW,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,MAAM,EAAE,EAAE,IAAI,C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,EAAE,CAAC,EAAE,CAAC;SAC/I;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF;AAtBD,0DAsBC;AAED,SAAgB,aAAa,CAAC,aAAqB;IACjD,OAAO,IAAA,4CAAoC,EAAC,IAAI,uBAAuB,CAAC,aAAa,CAAC,CAAC,CAAC;AAC1F,CAAC;AAFD,sCAEC"}
@@ -1,12 +1,12 @@
1
1
  import type { JsonPath } from "../../json-path/json-path";
2
2
  import type { Decorator } from "../../reflection";
3
- import type { ConstraintResult } from '../types';
3
+ import type { ConstraintContext, ConstraintResult } from '../types';
4
4
  import { SchemaValueConstraint } from '../types';
5
5
  export declare class MinimumConstraint extends SchemaValueConstraint {
6
6
  private readonly minimum;
7
7
  readonly suitableTypes: NumberConstructor;
8
8
  readonly expects: string;
9
9
  constructor(minimum: number);
10
- validate(value: number, path: JsonPath): ConstraintResult;
10
+ validate(value: number, path: JsonPath, context: ConstraintContext): ConstraintResult;
11
11
  }
12
12
  export declare function Minimum(minimum: number): Decorator<'property' | 'accessor'>;
@@ -12,9 +12,9 @@ class MinimumConstraint extends types_1.SchemaValueConstraint {
12
12
  this.minimum = minimum;
13
13
  this.expects = `>= ${this.minimum}`;
14
14
  }
15
- validate(value, path) {
15
+ validate(value, path, context) {
16
16
  if (value < this.minimum) {
17
- return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toString(), path) };
17
+ return { valid: false, error: schema_error_1.SchemaError.expectedButGot(this.expects, value.toString(), path, { fast: context.options.fastErrors }) };
18
18
  }
19
19
  return { valid: true };
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"minimum.js","sourceRoot":"","sources":["../../../source/schema/constraints/minimum.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAIzD,+CAA2E;AAC3E,kDAA8C;AAE9C,oCAA6D;AAE7D,MAAa,iBAAkB,SAAQ,6BAAqB;IAM1D,YAAY,OAAe;QACzB,KAAK,EAAE,CAAC;QAJD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AC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;SACxI;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;CACF;AApBD,8CAoBC;AAED,SAAgB,OAAO,CAAC,OAAe;IACrC,OAAO,IAAA,4CAAoC,EAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAA,kBAAU,EAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAC9G,CAAC;AAFD,0BAEC"}
@@ -1,6 +1,6 @@
1
1
  import type { JsonPath } from "../../json-path/json-path";
2
2
  import type { Decorator } from "../../reflection";
3
- import type { ConstraintResult } from '../types';
3
+ import type { ConstraintContext, ConstraintResult } from '../types';
4
4
  import { SchemaValueConstraint } from '../types';
5
5
  export declare class PatternConstraint extends SchemaValueConstraint {
6
6
  private readonly pattern;
@@ -8,6 +8,6 @@ export declare class PatternConstraint extends SchemaValueConstraint {
8
8
  readonly suitableTypes: StringConstructor;
9
9
  readonly expects: string;
10
10
  constructor(pattern: RegExp, patternName?: string);
11
- validate(value: string, path: JsonPath): ConstraintResult;
11
+ validate(value: string, path: JsonPath, context: ConstraintContext): ConstraintResult;
12
12
  }
13
13
  export declare function Pattern(pattern: RegExp, patternName?: string): Decorator<'property' | 'accessor'>;