@daiso-tech/core 0.14.0 → 0.15.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 (499) hide show
  1. package/dist/cjs/_module.js +1 -0
  2. package/dist/cjs/_module.js.map +1 -1
  3. package/dist/cjs/async/_module.js +20 -0
  4. package/dist/cjs/async/_module.js.map +1 -0
  5. package/dist/cjs/{utilities/async/_shared.js → async/async.errors.js} +1 -1
  6. package/dist/cjs/async/async.errors.js.map +1 -0
  7. package/dist/cjs/{utilities → async}/backof-policies/_module.js +4 -4
  8. package/dist/cjs/async/backof-policies/_module.js.map +1 -0
  9. package/dist/cjs/async/backof-policies/_shared.js.map +1 -0
  10. package/dist/cjs/{utilities/async/delay-iterable → async/backof-policies/constant-backoff-policy}/_module.js +1 -1
  11. package/dist/cjs/async/backof-policies/constant-backoff-policy/_module.js.map +1 -0
  12. package/dist/cjs/{utilities → async}/backof-policies/constant-backoff-policy/constant-backoff-policy.js +1 -1
  13. package/dist/cjs/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +1 -0
  14. package/dist/cjs/async/backof-policies/exponential-backoff-policy/_module.js +18 -0
  15. package/dist/cjs/async/backof-policies/exponential-backoff-policy/_module.js.map +1 -0
  16. package/dist/cjs/{utilities → async}/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js +1 -1
  17. package/dist/cjs/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +1 -0
  18. package/dist/cjs/{utilities/async/abortable → async/backof-policies/linear-backoff-policy}/_module.js +1 -1
  19. package/dist/cjs/async/backof-policies/linear-backoff-policy/_module.js.map +1 -0
  20. package/dist/cjs/{utilities → async}/backof-policies/linear-backoff-policy/linear-backoff-policy.js +1 -1
  21. package/dist/cjs/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +1 -0
  22. package/dist/cjs/{utilities/async/abortable-iterable → async/backof-policies/polynomial-backoff-policy}/_module.js +1 -1
  23. package/dist/cjs/async/backof-policies/polynomial-backoff-policy/_module.js.map +1 -0
  24. package/dist/cjs/{utilities → async}/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js +1 -1
  25. package/dist/cjs/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +1 -0
  26. package/dist/cjs/{event-bus/implementations/_shared/test-utilities → async/utilities}/_module.js +2 -1
  27. package/dist/cjs/async/utilities/_module.js.map +1 -0
  28. package/dist/cjs/async/utilities/abort/_module.js +19 -0
  29. package/dist/cjs/async/utilities/abort/_module.js.map +1 -0
  30. package/dist/cjs/async/utilities/abort/abort-and-fail.js +45 -0
  31. package/dist/cjs/async/utilities/abort/abort-and-fail.js.map +1 -0
  32. package/dist/cjs/async/utilities/abort/abort.js +18 -0
  33. package/dist/cjs/async/utilities/abort/abort.js.map +1 -0
  34. package/dist/cjs/{utilities/async/retry → async/utilities/delay}/_module.js +1 -1
  35. package/dist/cjs/async/utilities/delay/_module.js.map +1 -0
  36. package/dist/cjs/async/utilities/delay/delay.js +20 -0
  37. package/dist/cjs/async/utilities/delay/delay.js.map +1 -0
  38. package/dist/cjs/{utilities/async → async/utilities}/lazy-promise/_module.js +1 -1
  39. package/dist/cjs/async/utilities/lazy-promise/_module.js.map +1 -0
  40. package/dist/cjs/async/utilities/lazy-promise/lazy-promise.js +95 -0
  41. package/dist/cjs/async/utilities/lazy-promise/lazy-promise.js.map +1 -0
  42. package/dist/cjs/{utilities/async/delay → async/utilities/retry}/_module.js +2 -1
  43. package/dist/cjs/async/utilities/retry/_module.js.map +1 -0
  44. package/dist/cjs/async/utilities/retry/retry-or-fail.js +36 -0
  45. package/dist/cjs/async/utilities/retry/retry-or-fail.js.map +1 -0
  46. package/dist/cjs/async/utilities/retry/retry.js +18 -0
  47. package/dist/cjs/async/utilities/retry/retry.js.map +1 -0
  48. package/dist/cjs/{utilities/async → async/utilities}/timeout/_module.js +2 -1
  49. package/dist/cjs/async/utilities/timeout/_module.js.map +1 -0
  50. package/dist/cjs/async/utilities/timeout/timeout-and-fail.js +25 -0
  51. package/dist/cjs/async/utilities/timeout/timeout-and-fail.js.map +1 -0
  52. package/dist/cjs/async/utilities/timeout/timeout.js +18 -0
  53. package/dist/cjs/async/utilities/timeout/timeout.js.map +1 -0
  54. package/dist/cjs/cache/contracts/cache.events.js +0 -11
  55. package/dist/cjs/cache/contracts/cache.events.js.map +1 -1
  56. package/dist/cjs/cache/implementations/_shared/cache-adapter.test-suite.js +12 -11
  57. package/dist/cjs/cache/implementations/_shared/cache-adapter.test-suite.js.map +1 -1
  58. package/dist/cjs/cache/implementations/_shared/cache.test-suite.js +36 -35
  59. package/dist/cjs/cache/implementations/_shared/cache.test-suite.js.map +1 -1
  60. package/dist/cjs/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js +1 -1
  61. package/dist/cjs/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js.map +1 -1
  62. package/dist/cjs/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js.map +1 -1
  63. package/dist/cjs/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js +2 -2
  64. package/dist/cjs/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js.map +1 -1
  65. package/dist/cjs/cache/implementations/derivables/base-cache.js +46 -38
  66. package/dist/cjs/cache/implementations/derivables/base-cache.js.map +1 -1
  67. package/dist/cjs/cache/implementations/derivables/cache-factory.js +3 -3
  68. package/dist/cjs/cache/implementations/derivables/cache-factory.js.map +1 -1
  69. package/dist/cjs/cache/implementations/derivables/cache.js +21 -23
  70. package/dist/cjs/cache/implementations/derivables/cache.js.map +1 -1
  71. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/_module.js +4 -1
  72. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/_module.js.map +1 -1
  73. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js +27 -0
  74. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -0
  75. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js +33 -0
  76. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js.map +1 -0
  77. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js +36 -0
  78. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js.map +1 -0
  79. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js +48 -0
  80. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js.map +1 -0
  81. package/dist/cjs/collection/implementations/async-iterable-collection/async-iterable-collection.js +48 -39
  82. package/dist/cjs/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
  83. package/dist/cjs/collection/implementations/iterable-collection/iterable-collection.js +5 -5
  84. package/dist/cjs/collection/implementations/iterable-collection/iterable-collection.js.map +1 -1
  85. package/dist/cjs/collection/implementations/list-collection/list-collection.js +5 -5
  86. package/dist/cjs/collection/implementations/list-collection/list-collection.js.map +1 -1
  87. package/dist/cjs/event-bus/contracts/event-bus.errors.js +3 -3
  88. package/dist/cjs/event-bus/contracts/event-bus.errors.js.map +1 -1
  89. package/dist/cjs/event-bus/implementations/_module.js +1 -1
  90. package/dist/cjs/event-bus/implementations/_module.js.map +1 -1
  91. package/dist/cjs/event-bus/implementations/_shared/_module.js +19 -0
  92. package/dist/cjs/event-bus/implementations/_shared/_module.js.map +1 -0
  93. package/dist/cjs/event-bus/implementations/_shared/{test-utilities/event-bus-adapter.test-suite.js → event-bus-adapter.test-suite.js} +4 -3
  94. package/dist/cjs/event-bus/implementations/_shared/event-bus-adapter.test-suite.js.map +1 -0
  95. package/dist/cjs/event-bus/implementations/_shared/event-bus.test-suite.js +299 -0
  96. package/dist/cjs/event-bus/implementations/_shared/event-bus.test-suite.js.map +1 -0
  97. package/dist/cjs/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js +1 -2
  98. package/dist/cjs/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js.map +1 -1
  99. package/dist/cjs/event-bus/implementations/derivables/base-event-bus.js +13 -13
  100. package/dist/cjs/event-bus/implementations/derivables/base-event-bus.js.map +1 -1
  101. package/dist/cjs/event-bus/implementations/derivables/event-bus-factory.js +3 -3
  102. package/dist/cjs/event-bus/implementations/derivables/event-bus-factory.js.map +1 -1
  103. package/dist/cjs/event-bus/implementations/derivables/event-bus.js +17 -11
  104. package/dist/cjs/event-bus/implementations/derivables/event-bus.js.map +1 -1
  105. package/dist/cjs/utilities/_module.js +5 -4
  106. package/dist/cjs/utilities/_module.js.map +1 -1
  107. package/dist/cjs/utilities/contracts/_module.js +19 -0
  108. package/dist/cjs/utilities/contracts/_module.js.map +1 -0
  109. package/dist/cjs/utilities/contracts/deinitizable.contract.js +3 -0
  110. package/dist/cjs/utilities/contracts/deinitizable.contract.js.map +1 -0
  111. package/dist/cjs/utilities/contracts/initizable.contract.js +3 -0
  112. package/dist/cjs/utilities/contracts/initizable.contract.js.map +1 -0
  113. package/dist/cjs/utilities/{global-errors.js → errors.js} +1 -1
  114. package/dist/cjs/utilities/errors.js.map +1 -0
  115. package/dist/cjs/{_shared/utilities.js → utilities/functions.js} +1 -1
  116. package/dist/cjs/utilities/functions.js.map +1 -0
  117. package/dist/cjs/{_shared → utilities}/kysely/_module.js +1 -1
  118. package/dist/cjs/utilities/kysely/_module.js.map +1 -0
  119. package/dist/cjs/utilities/kysely/kysely-table-name-transformer-plugin.js.map +1 -0
  120. package/dist/cjs/{_shared → utilities}/types.js.map +1 -1
  121. package/dist/esm/_module.js +1 -0
  122. package/dist/esm/_module.js.map +1 -1
  123. package/dist/esm/async/_module.js +4 -0
  124. package/dist/esm/async/_module.js.map +1 -0
  125. package/dist/esm/{utilities/async/_shared.js → async/async.errors.js} +1 -1
  126. package/dist/esm/async/async.errors.js.map +1 -0
  127. package/dist/esm/async/backof-policies/_module.js +5 -0
  128. package/dist/esm/async/backof-policies/_module.js.map +1 -0
  129. package/dist/esm/async/backof-policies/_shared.js.map +1 -0
  130. package/dist/esm/async/backof-policies/constant-backoff-policy/_module.js +2 -0
  131. package/dist/esm/async/backof-policies/constant-backoff-policy/_module.js.map +1 -0
  132. package/dist/esm/{utilities → async}/backof-policies/constant-backoff-policy/constant-backoff-policy.js +1 -1
  133. package/dist/esm/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +1 -0
  134. package/dist/esm/async/backof-policies/exponential-backoff-policy/_module.js +2 -0
  135. package/dist/esm/async/backof-policies/exponential-backoff-policy/_module.js.map +1 -0
  136. package/dist/esm/{utilities → async}/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js +1 -1
  137. package/dist/esm/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +1 -0
  138. package/dist/esm/async/backof-policies/linear-backoff-policy/_module.js +2 -0
  139. package/dist/esm/async/backof-policies/linear-backoff-policy/_module.js.map +1 -0
  140. package/dist/esm/{utilities → async}/backof-policies/linear-backoff-policy/linear-backoff-policy.js +1 -1
  141. package/dist/esm/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +1 -0
  142. package/dist/esm/async/backof-policies/polynomial-backoff-policy/_module.js +2 -0
  143. package/dist/esm/async/backof-policies/polynomial-backoff-policy/_module.js.map +1 -0
  144. package/dist/esm/{utilities → async}/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js +1 -1
  145. package/dist/esm/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +1 -0
  146. package/dist/esm/async/utilities/_module.js +3 -0
  147. package/dist/esm/async/utilities/_module.js.map +1 -0
  148. package/dist/esm/async/utilities/abort/_module.js +3 -0
  149. package/dist/esm/async/utilities/abort/_module.js.map +1 -0
  150. package/dist/esm/{utilities/async/abortable/abortable.js → async/utilities/abort/abort-and-fail.js} +13 -16
  151. package/dist/esm/async/utilities/abort/abort-and-fail.js.map +1 -0
  152. package/dist/esm/async/utilities/abort/abort.js +15 -0
  153. package/dist/esm/async/utilities/abort/abort.js.map +1 -0
  154. package/dist/esm/async/utilities/delay/_module.js +2 -0
  155. package/dist/esm/async/utilities/delay/_module.js.map +1 -0
  156. package/dist/esm/async/utilities/delay/delay.js +17 -0
  157. package/dist/esm/async/utilities/delay/delay.js.map +1 -0
  158. package/dist/esm/async/utilities/lazy-promise/_module.js +2 -0
  159. package/dist/esm/async/utilities/lazy-promise/_module.js.map +1 -0
  160. package/dist/esm/async/utilities/lazy-promise/lazy-promise.js +91 -0
  161. package/dist/esm/async/utilities/lazy-promise/lazy-promise.js.map +1 -0
  162. package/dist/esm/async/utilities/retry/_module.js +3 -0
  163. package/dist/esm/async/utilities/retry/_module.js.map +1 -0
  164. package/dist/esm/async/utilities/retry/retry-or-fail.js +33 -0
  165. package/dist/esm/async/utilities/retry/retry-or-fail.js.map +1 -0
  166. package/dist/esm/async/utilities/retry/retry.js +15 -0
  167. package/dist/esm/async/utilities/retry/retry.js.map +1 -0
  168. package/dist/esm/async/utilities/timeout/_module.js +3 -0
  169. package/dist/esm/async/utilities/timeout/_module.js.map +1 -0
  170. package/dist/esm/async/utilities/timeout/timeout-and-fail.js +22 -0
  171. package/dist/esm/async/utilities/timeout/timeout-and-fail.js.map +1 -0
  172. package/dist/esm/async/utilities/timeout/timeout.js +15 -0
  173. package/dist/esm/async/utilities/timeout/timeout.js.map +1 -0
  174. package/dist/esm/cache/contracts/cache.events.js +0 -10
  175. package/dist/esm/cache/contracts/cache.events.js.map +1 -1
  176. package/dist/esm/cache/implementations/_shared/cache-adapter.test-suite.js +2 -1
  177. package/dist/esm/cache/implementations/_shared/cache-adapter.test-suite.js.map +1 -1
  178. package/dist/esm/cache/implementations/_shared/cache.test-suite.js +2 -1
  179. package/dist/esm/cache/implementations/_shared/cache.test-suite.js.map +1 -1
  180. package/dist/esm/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js +1 -1
  181. package/dist/esm/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js.map +1 -1
  182. package/dist/esm/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js.map +1 -1
  183. package/dist/esm/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js +1 -1
  184. package/dist/esm/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js.map +1 -1
  185. package/dist/esm/cache/implementations/derivables/base-cache.js +37 -29
  186. package/dist/esm/cache/implementations/derivables/base-cache.js.map +1 -1
  187. package/dist/esm/cache/implementations/derivables/cache-factory.js +1 -1
  188. package/dist/esm/cache/implementations/derivables/cache-factory.js.map +1 -1
  189. package/dist/esm/cache/implementations/derivables/cache.js +16 -18
  190. package/dist/esm/cache/implementations/derivables/cache.js.map +1 -1
  191. package/dist/esm/collection/implementations/async-iterable-collection/_shared/_module.js +4 -1
  192. package/dist/esm/collection/implementations/async-iterable-collection/_shared/_module.js.map +1 -1
  193. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js +23 -0
  194. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -0
  195. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js +29 -0
  196. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js.map +1 -0
  197. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js +32 -0
  198. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js.map +1 -0
  199. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js +44 -0
  200. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js.map +1 -0
  201. package/dist/esm/collection/implementations/async-iterable-collection/async-iterable-collection.js +46 -37
  202. package/dist/esm/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
  203. package/dist/esm/collection/implementations/iterable-collection/iterable-collection.js +1 -1
  204. package/dist/esm/collection/implementations/list-collection/list-collection.js +1 -1
  205. package/dist/esm/event-bus/contracts/event-bus.errors.js +3 -3
  206. package/dist/esm/event-bus/contracts/event-bus.errors.js.map +1 -1
  207. package/dist/esm/event-bus/implementations/_module.js +1 -1
  208. package/dist/esm/event-bus/implementations/_module.js.map +1 -1
  209. package/dist/esm/event-bus/implementations/_shared/_module.js +3 -0
  210. package/dist/esm/event-bus/implementations/_shared/_module.js.map +1 -0
  211. package/dist/esm/event-bus/implementations/_shared/{test-utilities/event-bus-adapter.test-suite.js → event-bus-adapter.test-suite.js} +2 -1
  212. package/dist/esm/event-bus/implementations/_shared/event-bus-adapter.test-suite.js.map +1 -0
  213. package/dist/esm/event-bus/implementations/_shared/event-bus.test-suite.js +296 -0
  214. package/dist/esm/event-bus/implementations/_shared/event-bus.test-suite.js.map +1 -0
  215. package/dist/esm/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js +1 -2
  216. package/dist/esm/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js.map +1 -1
  217. package/dist/esm/event-bus/implementations/derivables/base-event-bus.js +13 -13
  218. package/dist/esm/event-bus/implementations/derivables/base-event-bus.js.map +1 -1
  219. package/dist/esm/event-bus/implementations/derivables/event-bus-factory.js +1 -1
  220. package/dist/esm/event-bus/implementations/derivables/event-bus-factory.js.map +1 -1
  221. package/dist/esm/event-bus/implementations/derivables/event-bus.js +15 -9
  222. package/dist/esm/event-bus/implementations/derivables/event-bus.js.map +1 -1
  223. package/dist/esm/utilities/_module.js +5 -4
  224. package/dist/esm/utilities/_module.js.map +1 -1
  225. package/dist/esm/utilities/contracts/_module.js +3 -0
  226. package/dist/esm/utilities/contracts/_module.js.map +1 -0
  227. package/dist/esm/utilities/contracts/deinitizable.contract.js +1 -0
  228. package/dist/esm/utilities/contracts/deinitizable.contract.js.map +1 -0
  229. package/dist/esm/utilities/contracts/initizable.contract.js +1 -0
  230. package/dist/esm/utilities/contracts/initizable.contract.js.map +1 -0
  231. package/dist/esm/utilities/{global-errors.js → errors.js} +1 -1
  232. package/dist/esm/utilities/errors.js.map +1 -0
  233. package/dist/esm/{_shared/utilities.js → utilities/functions.js} +1 -1
  234. package/dist/esm/utilities/functions.js.map +1 -0
  235. package/dist/esm/utilities/kysely/_module.js +2 -0
  236. package/dist/esm/utilities/kysely/_module.js.map +1 -0
  237. package/dist/esm/utilities/kysely/kysely-table-name-transformer-plugin.js.map +1 -0
  238. package/dist/esm/{_shared → utilities}/types.js.map +1 -1
  239. package/dist/types/_module.d.ts +1 -0
  240. package/dist/types/async/_module.d.ts +3 -0
  241. package/dist/types/{utilities/async/_shared.d.ts → async/async.errors.d.ts} +6 -6
  242. package/dist/types/async/backof-policies/_module.d.ts +5 -0
  243. package/dist/types/{utilities → async}/backof-policies/_shared.d.ts +1 -1
  244. package/dist/types/async/backof-policies/constant-backoff-policy/_module.d.ts +1 -0
  245. package/dist/types/{utilities → async}/backof-policies/constant-backoff-policy/constant-backoff-policy.d.ts +2 -2
  246. package/dist/types/async/backof-policies/exponential-backoff-policy/_module.d.ts +1 -0
  247. package/dist/types/{utilities → async}/backof-policies/exponential-backoff-policy/exponential-backoff-policy.d.ts +2 -2
  248. package/dist/types/async/backof-policies/linear-backoff-policy/_module.d.ts +1 -0
  249. package/dist/types/{utilities → async}/backof-policies/linear-backoff-policy/linear-backoff-policy.d.ts +2 -2
  250. package/dist/types/async/backof-policies/polynomial-backoff-policy/_module.d.ts +1 -0
  251. package/dist/types/{utilities → async}/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.d.ts +2 -2
  252. package/dist/types/async/utilities/_module.d.ts +2 -0
  253. package/dist/types/async/utilities/abort/_module.d.ts +2 -0
  254. package/dist/types/async/utilities/abort/abort-and-fail.d.ts +4 -0
  255. package/dist/types/async/utilities/abort/abort.d.ts +9 -0
  256. package/dist/types/async/utilities/delay/_module.d.ts +1 -0
  257. package/dist/types/async/utilities/delay/delay.d.ts +19 -0
  258. package/dist/types/async/utilities/lazy-promise/_module.d.ts +1 -0
  259. package/dist/types/async/utilities/lazy-promise/lazy-promise.d.ts +185 -0
  260. package/dist/types/async/utilities/retry/_module.d.ts +2 -0
  261. package/dist/types/async/utilities/retry/retry-or-fail.d.ts +23 -0
  262. package/dist/types/async/utilities/retry/retry.d.ts +10 -0
  263. package/dist/types/async/utilities/timeout/_module.d.ts +2 -0
  264. package/dist/types/async/utilities/timeout/timeout-and-fail.d.ts +5 -0
  265. package/dist/types/async/utilities/timeout/timeout.d.ts +10 -0
  266. package/dist/types/cache/contracts/cache.contract.d.ts +6 -27
  267. package/dist/types/cache/contracts/cache.events.d.ts +30 -79
  268. package/dist/types/cache/implementations/_shared/cache-adapter.test-suite.d.ts +26 -24
  269. package/dist/types/cache/implementations/_shared/cache.test-suite.d.ts +54 -43
  270. package/dist/types/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.d.ts +1 -1
  271. package/dist/types/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.d.ts +14 -7
  272. package/dist/types/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.d.ts +4 -2
  273. package/dist/types/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.d.ts +7 -2
  274. package/dist/types/cache/implementations/derivables/base-cache.d.ts +14 -13
  275. package/dist/types/cache/implementations/derivables/cache.d.ts +7 -4
  276. package/dist/types/collection/contracts/async-collection.contract.d.ts +10 -6
  277. package/dist/types/collection/contracts/collection.contract.d.ts +1 -1
  278. package/dist/types/collection/implementations/async-iterable-collection/_shared/_module.d.ts +4 -1
  279. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-chunk-iterable.d.ts +1 -1
  280. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-chunk-while-iterable.d.ts +1 -1
  281. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-cross-join-iterable.d.ts +1 -1
  282. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.d.ts +13 -0
  283. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-entries-iterable.d.ts +1 -1
  284. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-group-by-iterable.d.ts +1 -1
  285. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-insert-after-iterable.d.ts +1 -1
  286. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-insert-before-iterable.d.ts +1 -1
  287. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-merge-iterable.d.ts +1 -1
  288. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-pad-end-iterable.d.ts +1 -1
  289. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-pad-start-iterable.d.ts +1 -1
  290. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-partion-iterable.d.ts +1 -1
  291. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-repeat-iterable.d.ts +1 -1
  292. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.d.ts +13 -0
  293. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-reverse-iterable.d.ts +1 -1
  294. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-split-iterable.d.ts +1 -1
  295. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.d.ts +9 -0
  296. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.d.ts +13 -0
  297. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-zip-iterable.d.ts +1 -1
  298. package/dist/types/collection/implementations/async-iterable-collection/async-iterable-collection.d.ts +4 -3
  299. package/dist/types/collection/implementations/iterable-collection/iterable-collection.d.ts +1 -1
  300. package/dist/types/collection/implementations/list-collection/list-collection.d.ts +1 -1
  301. package/dist/types/event-bus/contracts/_shared.d.ts +2 -5
  302. package/dist/types/event-bus/contracts/event-bus-adapter.contract.d.ts +4 -1
  303. package/dist/types/event-bus/contracts/event-bus-factory.contract.d.ts +2 -3
  304. package/dist/types/event-bus/contracts/event-bus.contract.d.ts +24 -16
  305. package/dist/types/event-bus/contracts/event-bus.errors.d.ts +3 -3
  306. package/dist/types/event-bus/implementations/_module.d.ts +1 -1
  307. package/dist/types/event-bus/implementations/_shared/_module.d.ts +2 -0
  308. package/dist/types/event-bus/implementations/_shared/event-bus-adapter.test-suite.d.ts +59 -0
  309. package/dist/types/event-bus/implementations/_shared/event-bus.test-suite.d.ts +72 -0
  310. package/dist/types/event-bus/implementations/derivables/base-event-bus.d.ts +12 -12
  311. package/dist/types/event-bus/implementations/derivables/event-bus-factory.d.ts +4 -4
  312. package/dist/types/event-bus/implementations/derivables/event-bus.d.ts +8 -8
  313. package/dist/types/serializer/implementations/_shared/test-utilities/serializer.test-suite.d.ts +1 -1
  314. package/dist/types/utilities/_module.d.ts +5 -4
  315. package/dist/types/utilities/contracts/_module.d.ts +2 -0
  316. package/dist/types/utilities/contracts/deinitizable.contract.d.ts +9 -0
  317. package/dist/types/utilities/contracts/initizable.contract.d.ts +9 -0
  318. package/dist/types/utilities/{global-errors.d.ts → errors.d.ts} +10 -1
  319. package/dist/types/{_shared/utilities.d.ts → utilities/functions.d.ts} +3 -3
  320. package/dist/types/utilities/kysely/_module.d.ts +1 -0
  321. package/dist/types/{_shared → utilities}/kysely/kysely-table-name-transformer-plugin.d.ts +1 -1
  322. package/dist/types/{_shared → utilities}/types.d.ts +3 -8
  323. package/package.json +1 -1
  324. package/dist/cjs/_shared/kysely/_module.js.map +0 -1
  325. package/dist/cjs/_shared/kysely/kysely-table-name-transformer-plugin.js.map +0 -1
  326. package/dist/cjs/_shared/redis/_module.js +0 -20
  327. package/dist/cjs/_shared/redis/_module.js.map +0 -1
  328. package/dist/cjs/_shared/redis/clear-iterable.js +0 -25
  329. package/dist/cjs/_shared/redis/clear-iterable.js.map +0 -1
  330. package/dist/cjs/_shared/redis/escape-redis-chars.js +0 -41
  331. package/dist/cjs/_shared/redis/escape-redis-chars.js.map +0 -1
  332. package/dist/cjs/_shared/redis/is-redis-type-error.js +0 -9
  333. package/dist/cjs/_shared/redis/is-redis-type-error.js.map +0 -1
  334. package/dist/cjs/_shared/utilities.js.map +0 -1
  335. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js +0 -31
  336. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js.map +0 -1
  337. package/dist/cjs/event-bus/implementations/_shared/test-utilities/_module.js.map +0 -1
  338. package/dist/cjs/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js.map +0 -1
  339. package/dist/cjs/utilities/async/_module.js +0 -29
  340. package/dist/cjs/utilities/async/_module.js.map +0 -1
  341. package/dist/cjs/utilities/async/_shared.js.map +0 -1
  342. package/dist/cjs/utilities/async/abortable/_module.js.map +0 -1
  343. package/dist/cjs/utilities/async/abortable/abortable.js +0 -48
  344. package/dist/cjs/utilities/async/abortable/abortable.js.map +0 -1
  345. package/dist/cjs/utilities/async/abortable-iterable/_module.js.map +0 -1
  346. package/dist/cjs/utilities/async/abortable-iterable/abortable-iterable.js +0 -32
  347. package/dist/cjs/utilities/async/abortable-iterable/abortable-iterable.js.map +0 -1
  348. package/dist/cjs/utilities/async/delay/_module.js.map +0 -1
  349. package/dist/cjs/utilities/async/delay/delay.js +0 -24
  350. package/dist/cjs/utilities/async/delay/delay.js.map +0 -1
  351. package/dist/cjs/utilities/async/delay-iterable/_module.js.map +0 -1
  352. package/dist/cjs/utilities/async/delay-iterable/delay-iterable.js +0 -36
  353. package/dist/cjs/utilities/async/delay-iterable/delay-iterable.js.map +0 -1
  354. package/dist/cjs/utilities/async/lazy-promise/_module.js.map +0 -1
  355. package/dist/cjs/utilities/async/lazy-promise/lazy-promise.js +0 -22
  356. package/dist/cjs/utilities/async/lazy-promise/lazy-promise.js.map +0 -1
  357. package/dist/cjs/utilities/async/retry/_module.js.map +0 -1
  358. package/dist/cjs/utilities/async/retry/retry.js +0 -43
  359. package/dist/cjs/utilities/async/retry/retry.js.map +0 -1
  360. package/dist/cjs/utilities/async/retry-iterable/_module.js +0 -18
  361. package/dist/cjs/utilities/async/retry-iterable/_module.js.map +0 -1
  362. package/dist/cjs/utilities/async/retry-iterable/retry-iterable.js +0 -32
  363. package/dist/cjs/utilities/async/retry-iterable/retry-iterable.js.map +0 -1
  364. package/dist/cjs/utilities/async/timeout/_module.js.map +0 -1
  365. package/dist/cjs/utilities/async/timeout/timeout.js +0 -28
  366. package/dist/cjs/utilities/async/timeout/timeout.js.map +0 -1
  367. package/dist/cjs/utilities/async/timeout-iterable/_module.js +0 -18
  368. package/dist/cjs/utilities/async/timeout-iterable/_module.js.map +0 -1
  369. package/dist/cjs/utilities/async/timeout-iterable/timeout-iterable.js +0 -11
  370. package/dist/cjs/utilities/async/timeout-iterable/timeout-iterable.js.map +0 -1
  371. package/dist/cjs/utilities/backof-policies/_module.js.map +0 -1
  372. package/dist/cjs/utilities/backof-policies/_shared.js.map +0 -1
  373. package/dist/cjs/utilities/backof-policies/constant-backoff-policy/_module.js +0 -18
  374. package/dist/cjs/utilities/backof-policies/constant-backoff-policy/_module.js.map +0 -1
  375. package/dist/cjs/utilities/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +0 -1
  376. package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/_module.js +0 -18
  377. package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/_module.js.map +0 -1
  378. package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +0 -1
  379. package/dist/cjs/utilities/backof-policies/linear-backoff-policy/_module.js +0 -18
  380. package/dist/cjs/utilities/backof-policies/linear-backoff-policy/_module.js.map +0 -1
  381. package/dist/cjs/utilities/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +0 -1
  382. package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/_module.js +0 -18
  383. package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/_module.js.map +0 -1
  384. package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +0 -1
  385. package/dist/cjs/utilities/global-errors.js.map +0 -1
  386. package/dist/cjs/utilities/validation/_module.js +0 -22
  387. package/dist/cjs/utilities/validation/_module.js.map +0 -1
  388. package/dist/esm/_shared/kysely/_module.js +0 -2
  389. package/dist/esm/_shared/kysely/_module.js.map +0 -1
  390. package/dist/esm/_shared/kysely/kysely-table-name-transformer-plugin.js.map +0 -1
  391. package/dist/esm/_shared/redis/_module.js +0 -4
  392. package/dist/esm/_shared/redis/_module.js.map +0 -1
  393. package/dist/esm/_shared/redis/clear-iterable.js +0 -21
  394. package/dist/esm/_shared/redis/clear-iterable.js.map +0 -1
  395. package/dist/esm/_shared/redis/escape-redis-chars.js +0 -38
  396. package/dist/esm/_shared/redis/escape-redis-chars.js.map +0 -1
  397. package/dist/esm/_shared/redis/is-redis-type-error.js +0 -6
  398. package/dist/esm/_shared/redis/is-redis-type-error.js.map +0 -1
  399. package/dist/esm/_shared/utilities.js.map +0 -1
  400. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js +0 -27
  401. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js.map +0 -1
  402. package/dist/esm/event-bus/implementations/_shared/test-utilities/_module.js +0 -2
  403. package/dist/esm/event-bus/implementations/_shared/test-utilities/_module.js.map +0 -1
  404. package/dist/esm/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js.map +0 -1
  405. package/dist/esm/utilities/async/_module.js +0 -11
  406. package/dist/esm/utilities/async/_module.js.map +0 -1
  407. package/dist/esm/utilities/async/_shared.js.map +0 -1
  408. package/dist/esm/utilities/async/abortable/_module.js +0 -2
  409. package/dist/esm/utilities/async/abortable/_module.js.map +0 -1
  410. package/dist/esm/utilities/async/abortable/abortable.js.map +0 -1
  411. package/dist/esm/utilities/async/abortable-iterable/_module.js +0 -2
  412. package/dist/esm/utilities/async/abortable-iterable/_module.js.map +0 -1
  413. package/dist/esm/utilities/async/abortable-iterable/abortable-iterable.js +0 -29
  414. package/dist/esm/utilities/async/abortable-iterable/abortable-iterable.js.map +0 -1
  415. package/dist/esm/utilities/async/delay/_module.js +0 -2
  416. package/dist/esm/utilities/async/delay/_module.js.map +0 -1
  417. package/dist/esm/utilities/async/delay/delay.js +0 -21
  418. package/dist/esm/utilities/async/delay/delay.js.map +0 -1
  419. package/dist/esm/utilities/async/delay-iterable/_module.js +0 -2
  420. package/dist/esm/utilities/async/delay-iterable/_module.js.map +0 -1
  421. package/dist/esm/utilities/async/delay-iterable/delay-iterable.js +0 -33
  422. package/dist/esm/utilities/async/delay-iterable/delay-iterable.js.map +0 -1
  423. package/dist/esm/utilities/async/lazy-promise/_module.js +0 -2
  424. package/dist/esm/utilities/async/lazy-promise/_module.js.map +0 -1
  425. package/dist/esm/utilities/async/lazy-promise/lazy-promise.js +0 -17
  426. package/dist/esm/utilities/async/lazy-promise/lazy-promise.js.map +0 -1
  427. package/dist/esm/utilities/async/retry/_module.js +0 -2
  428. package/dist/esm/utilities/async/retry/_module.js.map +0 -1
  429. package/dist/esm/utilities/async/retry/retry.js +0 -40
  430. package/dist/esm/utilities/async/retry/retry.js.map +0 -1
  431. package/dist/esm/utilities/async/retry-iterable/_module.js +0 -2
  432. package/dist/esm/utilities/async/retry-iterable/_module.js.map +0 -1
  433. package/dist/esm/utilities/async/retry-iterable/retry-iterable.js +0 -29
  434. package/dist/esm/utilities/async/retry-iterable/retry-iterable.js.map +0 -1
  435. package/dist/esm/utilities/async/timeout/_module.js +0 -2
  436. package/dist/esm/utilities/async/timeout/_module.js.map +0 -1
  437. package/dist/esm/utilities/async/timeout/timeout.js +0 -25
  438. package/dist/esm/utilities/async/timeout/timeout.js.map +0 -1
  439. package/dist/esm/utilities/async/timeout-iterable/_module.js +0 -2
  440. package/dist/esm/utilities/async/timeout-iterable/_module.js.map +0 -1
  441. package/dist/esm/utilities/async/timeout-iterable/timeout-iterable.js +0 -8
  442. package/dist/esm/utilities/async/timeout-iterable/timeout-iterable.js.map +0 -1
  443. package/dist/esm/utilities/backof-policies/_module.js +0 -5
  444. package/dist/esm/utilities/backof-policies/_module.js.map +0 -1
  445. package/dist/esm/utilities/backof-policies/_shared.js.map +0 -1
  446. package/dist/esm/utilities/backof-policies/constant-backoff-policy/_module.js +0 -2
  447. package/dist/esm/utilities/backof-policies/constant-backoff-policy/_module.js.map +0 -1
  448. package/dist/esm/utilities/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +0 -1
  449. package/dist/esm/utilities/backof-policies/exponential-backoff-policy/_module.js +0 -2
  450. package/dist/esm/utilities/backof-policies/exponential-backoff-policy/_module.js.map +0 -1
  451. package/dist/esm/utilities/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +0 -1
  452. package/dist/esm/utilities/backof-policies/linear-backoff-policy/_module.js +0 -2
  453. package/dist/esm/utilities/backof-policies/linear-backoff-policy/_module.js.map +0 -1
  454. package/dist/esm/utilities/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +0 -1
  455. package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/_module.js +0 -2
  456. package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/_module.js.map +0 -1
  457. package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +0 -1
  458. package/dist/esm/utilities/global-errors.js.map +0 -1
  459. package/dist/esm/utilities/validation/_module.js +0 -17
  460. package/dist/esm/utilities/validation/_module.js.map +0 -1
  461. package/dist/types/_shared/kysely/_module.d.ts +0 -1
  462. package/dist/types/_shared/redis/_module.d.ts +0 -3
  463. package/dist/types/_shared/redis/clear-iterable.d.ts +0 -13
  464. package/dist/types/_shared/redis/escape-redis-chars.d.ts +0 -7
  465. package/dist/types/_shared/redis/is-redis-type-error.d.ts +0 -7
  466. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.d.ts +0 -12
  467. package/dist/types/event-bus/implementations/_shared/test-utilities/_module.d.ts +0 -1
  468. package/dist/types/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.d.ts +0 -36
  469. package/dist/types/utilities/async/_module.d.ts +0 -10
  470. package/dist/types/utilities/async/abortable/_module.d.ts +0 -1
  471. package/dist/types/utilities/async/abortable/abortable.d.ts +0 -39
  472. package/dist/types/utilities/async/abortable-iterable/_module.d.ts +0 -1
  473. package/dist/types/utilities/async/abortable-iterable/abortable-iterable.d.ts +0 -36
  474. package/dist/types/utilities/async/delay/_module.d.ts +0 -1
  475. package/dist/types/utilities/async/delay/delay.d.ts +0 -38
  476. package/dist/types/utilities/async/delay-iterable/_module.d.ts +0 -1
  477. package/dist/types/utilities/async/delay-iterable/delay-iterable.d.ts +0 -57
  478. package/dist/types/utilities/async/lazy-promise/_module.d.ts +0 -1
  479. package/dist/types/utilities/async/lazy-promise/lazy-promise.d.ts +0 -28
  480. package/dist/types/utilities/async/retry/_module.d.ts +0 -1
  481. package/dist/types/utilities/async/retry/retry.d.ts +0 -89
  482. package/dist/types/utilities/async/retry-iterable/_module.d.ts +0 -1
  483. package/dist/types/utilities/async/retry-iterable/retry-iterable.d.ts +0 -86
  484. package/dist/types/utilities/async/timeout/_module.d.ts +0 -1
  485. package/dist/types/utilities/async/timeout/timeout.d.ts +0 -40
  486. package/dist/types/utilities/async/timeout-iterable/_module.d.ts +0 -1
  487. package/dist/types/utilities/async/timeout-iterable/timeout-iterable.d.ts +0 -64
  488. package/dist/types/utilities/backof-policies/_module.d.ts +0 -5
  489. package/dist/types/utilities/backof-policies/constant-backoff-policy/_module.d.ts +0 -1
  490. package/dist/types/utilities/backof-policies/exponential-backoff-policy/_module.d.ts +0 -1
  491. package/dist/types/utilities/backof-policies/linear-backoff-policy/_module.d.ts +0 -1
  492. package/dist/types/utilities/backof-policies/polynomial-backoff-policy/_module.d.ts +0 -1
  493. package/dist/types/utilities/validation/_module.d.ts +0 -32
  494. /package/dist/cjs/{utilities → async}/backof-policies/_shared.js +0 -0
  495. /package/dist/cjs/{_shared → utilities}/kysely/kysely-table-name-transformer-plugin.js +0 -0
  496. /package/dist/cjs/{_shared → utilities}/types.js +0 -0
  497. /package/dist/esm/{utilities → async}/backof-policies/_shared.js +0 -0
  498. /package/dist/esm/{_shared → utilities}/kysely/kysely-table-name-transformer-plugin.js +0 -0
  499. /package/dist/esm/{_shared → utilities}/types.js +0 -0
@@ -0,0 +1,296 @@
1
+ import { TimeSpan } from "../../../utilities/_module";
2
+ import { delay } from "../../../async/_module";
3
+ export function eventBusTestSuite(settings) {
4
+ const { expect, test, describe, createEventBusA, createEventBusB, beforeEach, } = settings;
5
+ let eventBusA;
6
+ let eventBusB;
7
+ beforeEach(async () => {
8
+ eventBusA = await createEventBusA();
9
+ eventBusB = await createEventBusB();
10
+ });
11
+ describe("Api tests:", () => {
12
+ describe("method: addListener, removeListener, dispatch", () => {
13
+ test("Should be null when listener added and event is not triggered", async () => {
14
+ const TYPE = "type";
15
+ let result = null;
16
+ await eventBusA.addListener(TYPE, (event) => {
17
+ result = event;
18
+ });
19
+ expect(result).toBeNull();
20
+ });
21
+ test("Should be IBaseEvent when listener added and event is triggered", async () => {
22
+ const event = {
23
+ type: "type",
24
+ };
25
+ let result = null;
26
+ await eventBusA.addListener(event.type, (event) => {
27
+ result = event;
28
+ });
29
+ await delay(TimeSpan.fromMilliseconds(50));
30
+ await eventBusA.dispatch([event]);
31
+ expect(result).toEqual(event);
32
+ });
33
+ test("Should be null when listener removed and event is triggered", async () => {
34
+ const event = {
35
+ type: "type",
36
+ };
37
+ let result = null;
38
+ const listener = (event) => {
39
+ result = event;
40
+ };
41
+ await eventBusA.addListener(event.type, listener);
42
+ await eventBusA.removeListener(event.type, listener);
43
+ await delay(TimeSpan.fromMilliseconds(50));
44
+ await eventBusA.dispatch([event]);
45
+ expect(result).toBeNull();
46
+ });
47
+ });
48
+ describe("method: addListenerMany, removeListenerMany, dispatch", () => {
49
+ test("Should be null when listener added and event is not triggered", async () => {
50
+ const TYPE_1 = "type_1";
51
+ const TYPE_2 = "type_2";
52
+ let result = null;
53
+ await eventBusA.addListenerMany([TYPE_1, TYPE_2], (event) => {
54
+ result = event;
55
+ });
56
+ expect(result).toBeNull();
57
+ });
58
+ test("Should be IBaseEvent when listener added and event is triggered", async () => {
59
+ const event_1 = {
60
+ type: "type_1",
61
+ };
62
+ const event_2 = {
63
+ type: "type_2",
64
+ };
65
+ let result_1 = null;
66
+ let result_2 = null;
67
+ await eventBusA.addListenerMany([event_1.type, event_2.type], (eventObj) => {
68
+ if (eventObj.type === event_1.type) {
69
+ result_1 = eventObj;
70
+ }
71
+ if (eventObj.type === event_2.type) {
72
+ result_2 = eventObj;
73
+ }
74
+ });
75
+ await delay(TimeSpan.fromMilliseconds(50));
76
+ await eventBusA.dispatch([event_1, event_2]);
77
+ expect(result_1).toEqual(event_1);
78
+ expect(result_2).toEqual(event_2);
79
+ });
80
+ test("Should be null when listener removed and event is triggered", async () => {
81
+ const event_A = {
82
+ type: "type_a",
83
+ };
84
+ const event_B = {
85
+ type: "type_b",
86
+ };
87
+ let result = null;
88
+ const listener = (event) => {
89
+ result = event;
90
+ };
91
+ await eventBusA.addListenerMany([event_A.type, event_B.type], listener);
92
+ await eventBusA.removeListenerMany([event_A.type, event_B.type], listener);
93
+ await delay(TimeSpan.fromMilliseconds(50));
94
+ await eventBusA.dispatch([event_A, event_B]);
95
+ expect(result).toBeNull();
96
+ });
97
+ });
98
+ describe("method: subscribe", () => {
99
+ test("Should be null when listener added and event is not triggered", async () => {
100
+ const TYPE = "type";
101
+ let result = null;
102
+ await eventBusA.subscribe(TYPE, (event) => {
103
+ result = event;
104
+ });
105
+ expect(result).toBeNull();
106
+ });
107
+ test("Should be IBaseEvent when listener added and event is triggered", async () => {
108
+ const event = {
109
+ type: "type",
110
+ };
111
+ let result = null;
112
+ await eventBusA.subscribe(event.type, (event) => {
113
+ result = event;
114
+ });
115
+ await delay(TimeSpan.fromMilliseconds(50));
116
+ await eventBusA.dispatch([event]);
117
+ expect(result).toEqual(event);
118
+ });
119
+ test("Should be null when listener removed and event is triggered", async () => {
120
+ const event = {
121
+ type: "type",
122
+ };
123
+ let result = null;
124
+ const listener = (event) => {
125
+ result = event;
126
+ };
127
+ const unsubscribe = await eventBusA.subscribe(event.type, listener);
128
+ await unsubscribe();
129
+ await delay(TimeSpan.fromMilliseconds(50));
130
+ await eventBusA.dispatch([event]);
131
+ expect(result).toBeNull();
132
+ });
133
+ });
134
+ describe("method: subscribeMany", () => {
135
+ test("Should be null when listener added and event is not triggered", async () => {
136
+ const TYPE_1 = "type_1";
137
+ const TYPE_2 = "type_2";
138
+ let result = null;
139
+ await eventBusA.subscribeMany([TYPE_1, TYPE_2], (event) => {
140
+ result = event;
141
+ });
142
+ expect(result).toBeNull();
143
+ });
144
+ test("Should be IBaseEvent when listener added and event is triggered", async () => {
145
+ const event_1 = {
146
+ type: "type_1",
147
+ };
148
+ const event_2 = {
149
+ type: "type_2",
150
+ };
151
+ let result_1 = null;
152
+ let result_2 = null;
153
+ await eventBusA.subscribeMany([event_1.type, event_2.type], (eventObj) => {
154
+ if (eventObj.type === event_1.type) {
155
+ result_1 = eventObj;
156
+ }
157
+ if (eventObj.type === event_2.type) {
158
+ result_2 = eventObj;
159
+ }
160
+ });
161
+ await delay(TimeSpan.fromMilliseconds(50));
162
+ await eventBusA.dispatch([event_1, event_2]);
163
+ expect(result_1).toEqual(event_1);
164
+ expect(result_2).toEqual(event_2);
165
+ });
166
+ test("Should be null when listener removed and event is triggered", async () => {
167
+ const event_A = {
168
+ type: "type_a",
169
+ };
170
+ const event_B = {
171
+ type: "type_b",
172
+ };
173
+ let result = null;
174
+ const listener = (event) => {
175
+ result = event;
176
+ };
177
+ const unsubscribe = await eventBusA.subscribeMany([event_A.type, event_B.type], listener);
178
+ await unsubscribe();
179
+ await delay(TimeSpan.fromMilliseconds(50));
180
+ await eventBusA.dispatch([event_A, event_B]);
181
+ expect(result).toBeNull();
182
+ });
183
+ });
184
+ });
185
+ describe("Namespace tests:", () => {
186
+ test("method: addListener / dispatch", async () => {
187
+ const event = {
188
+ type: "type",
189
+ };
190
+ let result_a = null;
191
+ await eventBusA.addListener(event.type, (event) => {
192
+ result_a = event;
193
+ });
194
+ let result_b = null;
195
+ await eventBusB.addListener(event.type, (event) => {
196
+ result_b = event;
197
+ });
198
+ await eventBusA.dispatch([event]);
199
+ expect(result_a).toEqual(event);
200
+ expect(result_b).toBeNull();
201
+ });
202
+ test("method: addListenerMany / dispatch", async () => {
203
+ const event = {
204
+ type: "type",
205
+ };
206
+ let result_a = null;
207
+ await eventBusA.addListenerMany([event.type], (event) => {
208
+ result_a = event;
209
+ });
210
+ let result_b = null;
211
+ await eventBusB.addListenerMany([event.type], (event) => {
212
+ result_b = event;
213
+ });
214
+ await eventBusA.dispatch([event]);
215
+ expect(result_a).toEqual(event);
216
+ expect(result_b).toBeNull();
217
+ });
218
+ test("method: removeListener / addListener / dispatch", async () => {
219
+ const event = {
220
+ type: "type",
221
+ };
222
+ let result_a = null;
223
+ await eventBusA.addListener(event.type, (event) => {
224
+ result_a = event;
225
+ });
226
+ let result_b = null;
227
+ const listenerB = (event) => {
228
+ result_b = event;
229
+ };
230
+ await eventBusB.addListener(event.type, listenerB);
231
+ await eventBusB.removeListener(event.type, listenerB);
232
+ await eventBusA.dispatch([event]);
233
+ await eventBusB.dispatch([event]);
234
+ expect(result_a).toEqual(event);
235
+ expect(result_b).toBeNull();
236
+ });
237
+ test("method: removeListenerMany / addListener / dispatch", async () => {
238
+ const event = {
239
+ type: "type",
240
+ };
241
+ let result_a = null;
242
+ await eventBusA.addListener(event.type, (event) => {
243
+ result_a = event;
244
+ });
245
+ let result_b = null;
246
+ const listenerB = (event) => {
247
+ result_b = event;
248
+ };
249
+ await eventBusB.addListener(event.type, listenerB);
250
+ await eventBusB.removeListenerMany([event.type], listenerB);
251
+ await eventBusA.dispatch([event]);
252
+ await eventBusB.dispatch([event]);
253
+ expect(result_a).toEqual(event);
254
+ expect(result_b).toBeNull();
255
+ });
256
+ test("method: subscribe / dispatch", async () => {
257
+ const event = {
258
+ type: "type",
259
+ };
260
+ let result_a = null;
261
+ await eventBusA.subscribe(event.type, (event) => {
262
+ result_a = event;
263
+ });
264
+ let result_b = null;
265
+ const listenerB = (event) => {
266
+ result_b = event;
267
+ };
268
+ const unsubscribe = await eventBusB.subscribe(event.type, listenerB);
269
+ await unsubscribe();
270
+ await eventBusA.dispatch([event]);
271
+ await eventBusB.dispatch([event]);
272
+ expect(result_a).toEqual(event);
273
+ expect(result_b).toBeNull();
274
+ });
275
+ test("method: subscribeMany / dispatch", async () => {
276
+ const event = {
277
+ type: "type",
278
+ };
279
+ let result_a = null;
280
+ await eventBusA.subscribeMany([event.type], (event) => {
281
+ result_a = event;
282
+ });
283
+ let result_b = null;
284
+ const listenerB = (event) => {
285
+ result_b = event;
286
+ };
287
+ const unsubscribe = await eventBusB.subscribeMany([event.type], listenerB);
288
+ await unsubscribe();
289
+ await eventBusA.dispatch([event]);
290
+ await eventBusB.dispatch([event]);
291
+ expect(result_a).toEqual(event);
292
+ expect(result_b).toBeNull();
293
+ });
294
+ });
295
+ }
296
+ //# sourceMappingURL=event-bus.test-suite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-bus.test-suite.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/_shared/event-bus.test-suite.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAoExC,MAAM,UAAU,iBAAiB,CAAC,QAAmC;IACjE,MAAM,EACF,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,eAAe,EACf,eAAe,EACf,UAAU,GACb,GAAG,QAAQ,CAAC;IACb,IAAI,SAAoB,CAAC;IACzB,IAAI,SAAoB,CAAC;IACzB,UAAU,CAAC,KAAK,IAAI,EAAE;QAClB,SAAS,GAAG,MAAM,eAAe,EAAE,CAAC;QACpC,SAAS,GAAG,MAAM,eAAe,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,YAAY,EAAE,GA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K,CAAC,CAAC;YAChC,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;QAChC,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { RedisSerializer } from "../../../../serializer/implementations/_module";
2
- import { LazyPromise } from "../../../../utilities/_module";
3
2
  import { EventEmitter } from "node:events";
4
3
  export class RedisEventBusAdapter {
5
4
  serializer;
@@ -33,7 +32,7 @@ export class RedisEventBusAdapter {
33
32
  async dispatch(events) {
34
33
  const promises = [];
35
34
  for (const event of events) {
36
- promises.push(new LazyPromise(async () => this.dispatcherClient.publish(event.type, await this.serializer.serialize(event))));
35
+ promises.push(this.dispatcherClient.publish(event.type, await this.serializer.serialize(event)));
37
36
  }
38
37
  await Promise.all(promises);
39
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"redis-event-bus-adapter.js","sourceRoot":"","sources":["../../../../../../src/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAOvE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA6B3C,MAAM,OAAO,oBAAoB;IACZ,UAAU,CAAsB;IAChC,gBAAgB,CAAQ;IACxB,cAAc,CAAQ;IACtB,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;IAEnD,YAAY,EACR,gBAAgB,EAChB,cAAc,EACd,UAAU,GACiB;QAC3B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;IAEO,aAAa,GAAG,KAAK,EAAE,OAAe,EAAE,OAAe,EAAE,EAAE;QAC/D,IAAI,CA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AC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CACzC,CACJ,CACJ,CAAC;QACN,CAAC;QACD,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACJ"}
1
+ {"version":3,"file":"redis-event-bus-adapter.js","sourceRoot":"","sources":["../../../../../../src/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAOvE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA6B3C,MAAM,OAAO,oBAAoB;IACZ,UAAU,CAAsB;IAChC,gBAAgB,CAAQ;IACxB,cAAc,CAAQ;IACtB,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;IAEnD,YAAY,EACR,gBAAgB,EAChB,cAAc,EACd,UAAU,GACiB;QAC3B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;IAEO,aAAa,GAAG,KAAK,EAAE,OAAe,EAAE,OAAe,EAAE,EAAE;QAC/D,IAAI,CAAC,YAAY,CAAC,IAAI,CAClB,OAAO,EACP,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAC7C,CAAC;IACN,CAAC,CAAC;IAEF,KAAK,CAAC,WAAW,CACb,KAAa,EACb,QAA8B;QAE9B,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAG3C,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAGtD,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,cAAc,CAChB,KAAa,EACb,QAA8B;QAE9B,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAE7C,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAEvC,IAAI,kBAAkB,GAAG,CAAC,CAAC;QAC3B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC;YACjD,kBAAkB,IAAI,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACjE,CAAC;QAED,IAAI,kBAAkB,KAAK,CAAC,EAAE,CAAC;YAE3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3D,CAAC;IACL,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAoB;QAC/B,MAAM,QAAQ,GAA0B,EAAE,CAAC;QAC3C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YACzB,QAAQ,CAAC,IAAI,CACT,IAAI,CAAC,gBAAgB,CAAC,OAAO,CACzB,KAAK,CAAC,IAAI,EACV,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CACzC,CACJ,CAAC;QACN,CAAC;QACD,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACJ"}
@@ -1,39 +1,39 @@
1
- import { LazyPromise } from "../../../utilities/_module";
2
- import { isArrayEmpty } from "../../../_shared/utilities";
1
+ import { LazyPromise } from "../../../async/_module";
2
+ import { isArrayEmpty } from "../../../utilities/_module";
3
3
  export class BaseEventBus {
4
- addListenerMany(events, listener) {
4
+ addListenerMany(eventNames, listener) {
5
5
  return new LazyPromise(async () => {
6
- if (isArrayEmpty(events)) {
6
+ if (isArrayEmpty(eventNames)) {
7
7
  return;
8
8
  }
9
9
  const promises = [];
10
- for (const event of events) {
10
+ for (const event of eventNames) {
11
11
  promises.push(this.addListener(event, listener));
12
12
  }
13
13
  await Promise.all(promises);
14
14
  });
15
15
  }
16
- removeListenerMany(events, listener) {
16
+ removeListenerMany(eventNames, listener) {
17
17
  return new LazyPromise(async () => {
18
- if (isArrayEmpty(events)) {
18
+ if (isArrayEmpty(eventNames)) {
19
19
  return;
20
20
  }
21
21
  const promises = [];
22
- for (const event of events) {
22
+ for (const event of eventNames) {
23
23
  promises.push(this.removeListener(event, listener));
24
24
  }
25
25
  await Promise.all(promises);
26
26
  });
27
27
  }
28
- subscribe(event, listener) {
29
- return this.subscribeMany([event], listener);
28
+ subscribe(eventName, listener) {
29
+ return this.subscribeMany([eventName], listener);
30
30
  }
31
- subscribeMany(events, listener) {
31
+ subscribeMany(eventNames, listener) {
32
32
  return new LazyPromise(async () => {
33
- await this.addListenerMany(events, listener);
33
+ await this.addListenerMany(eventNames, listener);
34
34
  const unsubscribe = () => {
35
35
  return new LazyPromise(async () => {
36
- await this.removeListenerMany(events, listener);
36
+ await this.removeListenerMany(eventNames, listener);
37
37
  });
38
38
  };
39
39
  return unsubscribe;
@@ -1 +1 @@
1
- {"version":3,"file":"base-event-bus.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/base-event-bus.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAYlD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAOnD,MAAM,OAAgB,YAAY;IAY9B,eAAe,CACX,MAAoB,EACpB,QAAoD;QAEpD,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;YAC9B,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;gBACvB,OAAO;YACX,CAAC;YACD,MAAM,QAAQ,GAAwB,EAAE,CAAC;YACzC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;gBACzB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;YACrD,CAAC;YACD,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACP,CAAC;IAOD,kBAAkB,CACd,MAAoB,EACpB,QAAoD;QAEpD,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;YAC9B,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;gBACvB,OAAO;YACX,CAAC;YACD,MAAM,QAAQ,GAAwB,EAAE,CAAC;YACzC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;gBACzB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;YACxD,CAAC;YACD,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACP,CAAC;IAED,SAAS,CACL,KAAiB,EACjB,QAAoD;QAEpD,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC;IACjD,CAAC;IAED,aAAa,CACT,MAAoB,EACpB,QAAoD;QAEpD,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;YAC9B,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC7C,MAAM,WAAW,GAAG,GAAG,EAAE;gBACrB,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;oBAC9B,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;gBACpD,CAAC,CAAC,CAAC;YACP,CAAC,CAAC;YACF,OAAO,WAAW,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;CAGJ"}
1
+ {"version":3,"file":"base-event-bus.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/base-event-bus.ts"],"names":[],"mappings":"A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YAC9B,MAAM,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;YACjD,MAAM,WAAW,GAAG,GAAG,EAAE;gBACrB,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;oBAC9B,MAAM,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;gBACxD,CAAC,CAAC,CAAC;YACP,CAAC,CAAC;YACF,OAAO,WAAW,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;CAGJ"}
@@ -1,5 +1,5 @@
1
1
  import { EventBus } from "../../../event-bus/implementations/derivables/event-bus";
2
- import { DefaultDriverNotDefinedError, UnregisteredDriverError, } from "../../../utilities/global-errors";
2
+ import { DefaultDriverNotDefinedError, UnregisteredDriverError, } from "../../../utilities/_module";
3
3
  export class EventBusFactory {
4
4
  drivers;
5
5
  defaultDriver;
@@ -1 +1 @@
1
- {"version":3,"file":"event-bus-factory.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/event-bus-factory.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AAC5E,OAAO,EACH,4BAA4B,EAC5B,uBAAuB,GAC1B,MAAM,2BAA2B,CAAC;AAsCnC,MAAM,OAAO,eAAe;IAKP,OAAO,CAA6B;IACpC,aAAa,CAAa;IAC1B,aAAa,CAAU;IAExC,YAAY,QAA4C;QACpD,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,QAAQ,CAAC;QAC3D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;IAED,GAAG,CACC,aAAoC,IAAI,CAAC,aAAa;QAEtD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,4BAA4B,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACjE,CAAC;QACD,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACjD,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,IAAI,QAAQ,CAAC,eAAe,EAAE;YACjC,aAAa,EAAE,IAAI,CAAC,aAAa;SACpC,CAAC,CAAC;IACP,CAAC;IAED,QAAQ;QAKJ,OAAO,IAAW,CAAC;IACvB,CAAC;CACJ"}
1
+ {"version":3,"file":"event-bus-factory.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/event-bus-factory.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AAC5E,OAAO,EACH,4BAA4B,EAC5B,uBAAuB,GAC1B,MAAM,qBAAqB,CAAC;AAsC7B,MAAM,OAAO,eAAe;IAKP,OAAO,CAA6B;IACpC,aAAa,CAAa;IAC1B,aAAa,CAAU;IAExC,YAAY,QAA4C;QACpD,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,QAAQ,CAAC;QAC3D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;IAED,GAAG,CACC,aAAoC,IAAI,CAAC,aAAa;QAEtD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,4BAA4B,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACjE,CAAC;QACD,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACjD,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,IAAI,QAAQ,CAAC,eAAe,EAAE;YACjC,aAAa,EAAE,IAAI,CAAC,aAAa;SACpC,CAAC,CAAC;IACP,CAAC;IAED,QAAQ;QAKJ,OAAO,IAAW,CAAC;IACvB,CAAC;CACJ"}
@@ -1,7 +1,7 @@
1
- import { LazyPromise } from "../../../utilities/_module";
2
- import { DispatchEventBusError, RemoveListenerEventBusError, AddListenerEventBusError, } from "../../../event-bus/contracts/_module";
1
+ import { LazyPromise } from "../../../async/_module";
2
+ import { DispatchEventBusError, RemoveListenerEventBusError, AddListenerEventBusError, UnexpectedEventBusError, } from "../../../event-bus/contracts/_module";
3
3
  import { WithNamespaceEventBusAdapter } from "../../../event-bus/implementations/derivables/with-namespace-event-bus-adapter";
4
- import { simplifyNamespace, isArrayEmpty } from "../../../_shared/utilities";
4
+ import { simplifyNamespace, isArrayEmpty } from "../../../utilities/_module";
5
5
  import { BaseEventBus } from "../../../event-bus/implementations/derivables/base-event-bus";
6
6
  export class EventBus extends BaseEventBus {
7
7
  eventBusAdapter;
@@ -22,23 +22,29 @@ export class EventBus extends BaseEventBus {
22
22
  getNamespace() {
23
23
  return this.namespace;
24
24
  }
25
- addListener(event, listener) {
25
+ addListener(eventName, listener) {
26
26
  return new LazyPromise(async () => {
27
27
  try {
28
- await this.eventBusAdapter.addListener(event, listener);
28
+ if (typeof eventName !== "string") {
29
+ throw new UnexpectedEventBusError(`The event name "${String(eventName)}" must be of string name`);
30
+ }
31
+ await this.eventBusAdapter.addListener(eventName, listener);
29
32
  }
30
33
  catch (error) {
31
- throw new AddListenerEventBusError(`A listener with name of "${listener.name}" could not added for "${String(event)}" event`, error);
34
+ throw new AddListenerEventBusError(`A listener with name of "${listener.name}" could not added for "${String(eventName)}" event`, error);
32
35
  }
33
36
  });
34
37
  }
35
- removeListener(event, listener) {
38
+ removeListener(eventName, listener) {
36
39
  return new LazyPromise(async () => {
40
+ if (typeof eventName !== "string") {
41
+ throw new UnexpectedEventBusError(`The event name "${String(eventName)}" must be of string name`);
42
+ }
37
43
  try {
38
- await this.eventBusAdapter.removeListener(event, listener);
44
+ await this.eventBusAdapter.removeListener(eventName, listener);
39
45
  }
40
46
  catch (error) {
41
- throw new RemoveListenerEventBusError(`A listener with name of "${listener.name}" could not removed of "${String(event)}" event`, error);
47
+ throw new RemoveListenerEventBusError(`A listener with name of "${listener.name}" could not removed of "${String(eventName)}" event`, error);
42
48
  }
43
49
  });
44
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"event-bus.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/event-bus.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAMH,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,GAC3B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,yEAAyE,CAAC;AAEvH,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,uDAAuD,CAAC;AA8CrF,MAAM,OAAO,QACT,SAAQ,YAAqB;IAGZ,eAAe,CAAmB;IAClC,SAAS,CAAS;IAEnC,YACI,eAAiC,EACjC,WAA6B,EAAE;QAE/B,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,aAAa,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,QAAQ,CAAC;QACjD,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,IAAI,4BAA4B,CACnD,eAAe,EACf,IAAI,CAAC,SAAS,CACjB,CAAC;IACN,CAAC;IAED,aAAa,CAAC,SAA4B;QACtC,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACzC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE;YACtC,aA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C,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAChD,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACtB,MAAM,IAAI,qBAAqB,CAC3B,WAAW,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAClF,KAAK,CACR,CAAC;YACN,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
1
+ {"version":3,"file":"event-bus.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/event-bus.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAM9C,OAAO,EAMH,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,GAC1B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,yEAAyE,CAAC;AAEvH,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,uDAAuD,CAAC;AA8CrF,MAAM,OAAO,QACT,SAAQ,YAAqB;IAGZ,eAAe,CAAmB;IAClC,SAAS,CAAS;IAEnC,YACI,eAAiC,EACjC,WAA6B,EAAE;QAE/B,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,aAAa,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,QAAQ,CAAC;QACjD,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,IAAI,4BAA4B,CACnD,eAAe,EACf,IAAI,CAAC,SAAS,CACjB,CAAC;IACN,CAAC;IAED,aAAa,CAAC,SAA4B;QACtC,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACzC,OAAO,IAA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AAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAED,QAAQ,CAAC,MAAqC;QAC1C,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;YAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBACzB,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;YACtB,CAAC;YACD,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;gBACvB,OAAO;YACX,CAAC;YACD,IAAI,CAAC;gBACD,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,MAAsB,CAAC,CAAC;YAChE,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACtB,MAAM,IAAI,qBAAqB,CAC3B,WAAW,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAClF,KAAK,CACR,CAAC;YACN,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -1,6 +1,7 @@
1
- export * from "../utilities/async/_module";
2
- export * from "../utilities/backof-policies/_module";
1
+ export * from "../utilities/contracts/_module";
2
+ export * from "../utilities/kysely/_module";
3
3
  export * from "../utilities/time-span/_module";
4
- export * from "../utilities/validation/_module";
5
- export * from "../utilities/global-errors";
4
+ export * from "../utilities/errors";
5
+ export * from "../utilities/types";
6
+ export * from "../utilities/functions";
6
7
  //# sourceMappingURL=_module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../src/utilities/_module.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../src/utilities/_module.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "../../utilities/contracts/deinitizable.contract";
2
+ export * from "../../utilities/contracts/initizable.contract";
3
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/utilities/contracts/_module.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=deinitizable.contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deinitizable.contract.js","sourceRoot":"","sources":["../../../../src/utilities/contracts/deinitizable.contract.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=initizable.contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initizable.contract.js","sourceRoot":"","sources":["../../../../src/utilities/contracts/initizable.contract.ts"],"names":[],"mappings":""}
@@ -16,4 +16,4 @@ export class UnregisteredDriverError extends FactoryError {
16
16
  this.name = UnregisteredDriverError.name;
17
17
  }
18
18
  }
19
- //# sourceMappingURL=global-errors.js.map
19
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/utilities/errors.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,YAAa,SAAQ,KAAK;IACnC,YAAY,OAAe,EAAE,KAAe;QACxC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;IAClC,CAAC;CACJ;AAKD,MAAM,OAAO,4BAA6B,SAAQ,YAAY;IAC1D,YAAY,WAAmB;QAC3B,KAAK,CAAC,uCAAuC,WAAW,GAAG,CAAC,CAAC;QAC7D,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC,IAAI,CAAC;IAClD,CAAC;CACJ;AAKD,MAAM,OAAO,uBAAwB,SAAQ,YAAY;IACrD,YAAY,UAAkB;QAC1B,KAAK,CAAC,wBAAwB,UAAU,GAAG,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC,IAAI,CAAC;IAC7C,CAAC;CACJ"}
@@ -25,4 +25,4 @@ export function simplifyNamespace(namepsace) {
25
25
  }
26
26
  return namepsace;
27
27
  }
28
- //# sourceMappingURL=utilities.js.map
28
+ //# sourceMappingURL=functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/utilities/functions.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,gBAAgB,CAAS,QAA0B;IAC/D,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,QAAwB,CAAC;QAC1C,OAAO,QAAQ,EAAE,CAAC;IACtB,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAID,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACvC,QAA+B;IAE/B,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,QAAiC,CAAC;QACnD,OAAO,QAAQ,EAAE,CAAC;IACtB,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAKD,MAAM,UAAU,YAAY,CAAC,KAAY;IACrC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AAC9B,CAAC;AAID,MAAM,UAAU,aAAa,CAEzB,MAA6C;IAE7C,OAAO,CAEH,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC;SAC5D,MAAM,KAAK,CAAC,CACpB,CAAC;AACN,CAAC;AAKD,MAAM,UAAU,iBAAiB,CAAC,SAA4B;IAC1D,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "../../utilities/kysely/kysely-table-name-transformer-plugin";
2
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/utilities/kysely/_module.ts"],"names":[],"mappings":"AAAA,cAAc,yDAAyD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kysely-table-name-transformer-plugin.js","sourceRoot":"","sources":["../../../../src/utilities/kysely/kysely-table-name-transformer-plugin.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAKlD,MAAM,oBAAqB,SAAQ,wBAAwB;IAC1B;IAA7B,YAA6B,YAAoC;QAC7D,KAAK,EAAE,CAAC;QADiB,iBAAY,GAAZ,YAAY,CAAwB;IAEjE,CAAC;IAEkB,cAAc,CAAC,IAAe;QAC7C,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACnD,OAAO;YACH,GAAG,eAAe;YAClB,KAAK,EAAE;gBACH,GAAG,eAAe,CAAC,KAAK;gBACxB,UAAU,EAAE;oBACR,GAAG,eAAe,CAAC,KAAK,CAAC,UAAU;oBACnC,IAAI,EAAE,CAAC,GAAG,EAAE;wBACR,MAAM,YAAY,GACd,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;wBAC1C,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;wBACvD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;4BAC/B,MAAM,IAAI,KAAK,CACX,yBAAyB,YAAY,GAAG,CAC3C,CAAC;wBACN,CAAC;wBACD,OAAO,cAAc,CAAC;oBAC1B,CAAC,CAAC,EAAE;iBACP;aACJ;SACJ,CAAC;IACN,CAAC;CACJ;AAKD,MAAM,OAAO,gCAAgC;IACxB,WAAW,CAAuB;IAEnD,YAAY,YAAoC;QAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAC9D,CAAC;IAED,cAAc,CAAC,IAA8B;QACzC,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,eAAe,CACX,IAA+B;QAE/B,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;CACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/_shared/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utilities/types.ts"],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+ export * from "./async/_module";
1
2
  export * from "./cache/implementations/_module";
2
3
  export * from "./cache/contracts/_module";
3
4
  export * from "./collection/implementations/_module";
@@ -0,0 +1,3 @@
1
+ export * from "../async/utilities/_module";
2
+ export * from "../async/backof-policies/_module";
3
+ export * from "../async/async.errors";
@@ -1,33 +1,33 @@
1
1
  /**
2
- * @module Utilities
2
+ * @module Async
3
3
  */
4
4
  /**
5
- * @group Async
5
+ * @group Errors
6
6
  */
7
7
  export declare class AsyncError extends Error {
8
8
  constructor(message: string, cause?: unknown);
9
9
  }
10
10
  /**
11
- * @group Async
11
+ * @group Errors
12
12
  */
13
13
  export declare class AbortAsyncError extends AsyncError {
14
14
  constructor(message: string, cause?: unknown);
15
15
  }
16
16
  /**
17
- * @group Async
17
+ * @group Errors
18
18
  */
19
19
  export declare class TimeoutAsyncError extends AsyncError {
20
20
  constructor(message: string, cause?: unknown);
21
21
  }
22
22
  /**
23
- * @group Async
23
+ * @group Errors
24
24
  */
25
25
  export type RetryAsyncErrorData = {
26
26
  cause?: unknown;
27
27
  maxAttempts: number;
28
28
  };
29
29
  /**
30
- * @group Async
30
+ * @group Errors
31
31
  */
32
32
  export declare class RetryAsyncError extends AsyncError {
33
33
  readonly maxAttempts: number;
@@ -0,0 +1,5 @@
1
+ export { type BackoffPolicy } from "../../async/backof-policies/_shared";
2
+ export * from "../../async/backof-policies/constant-backoff-policy/_module";
3
+ export * from "../../async/backof-policies/exponential-backoff-policy/_module";
4
+ export * from "../../async/backof-policies/linear-backoff-policy/_module";
5
+ export * from "../../async/backof-policies/polynomial-backoff-policy/_module";