@daiso-tech/core 0.13.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 (534) 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/_module.js +1 -0
  61. package/dist/cjs/cache/implementations/adapters/_module.js.map +1 -1
  62. package/dist/cjs/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js +3 -3
  63. package/dist/cjs/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js.map +1 -1
  64. package/dist/cjs/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.js.map +1 -1
  65. package/dist/cjs/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js +1 -1
  66. package/dist/cjs/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js.map +1 -1
  67. package/dist/cjs/cache/implementations/adapters/no-op-cache-adapter/_module.js +18 -0
  68. package/dist/cjs/cache/implementations/adapters/no-op-cache-adapter/_module.js.map +1 -0
  69. package/dist/cjs/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js +28 -0
  70. package/dist/cjs/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js.map +1 -0
  71. package/dist/cjs/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js +1 -1
  72. package/dist/cjs/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js.map +1 -1
  73. package/dist/cjs/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js +3 -3
  74. package/dist/cjs/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js.map +1 -1
  75. package/dist/cjs/cache/implementations/derivables/base-cache.js +46 -38
  76. package/dist/cjs/cache/implementations/derivables/base-cache.js.map +1 -1
  77. package/dist/cjs/cache/implementations/derivables/cache-factory.js +3 -3
  78. package/dist/cjs/cache/implementations/derivables/cache-factory.js.map +1 -1
  79. package/dist/cjs/cache/implementations/derivables/cache.js +21 -23
  80. package/dist/cjs/cache/implementations/derivables/cache.js.map +1 -1
  81. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/_module.js +4 -1
  82. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/_module.js.map +1 -1
  83. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js +27 -0
  84. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -0
  85. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js +33 -0
  86. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js.map +1 -0
  87. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js +36 -0
  88. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js.map +1 -0
  89. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js +48 -0
  90. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js.map +1 -0
  91. package/dist/cjs/collection/implementations/async-iterable-collection/async-iterable-collection.js +48 -39
  92. package/dist/cjs/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
  93. package/dist/cjs/collection/implementations/iterable-collection/iterable-collection.js +5 -5
  94. package/dist/cjs/collection/implementations/iterable-collection/iterable-collection.js.map +1 -1
  95. package/dist/cjs/collection/implementations/list-collection/list-collection.js +5 -5
  96. package/dist/cjs/collection/implementations/list-collection/list-collection.js.map +1 -1
  97. package/dist/cjs/event-bus/contracts/event-bus.errors.js +3 -3
  98. package/dist/cjs/event-bus/contracts/event-bus.errors.js.map +1 -1
  99. package/dist/cjs/event-bus/implementations/_module.js +1 -1
  100. package/dist/cjs/event-bus/implementations/_module.js.map +1 -1
  101. package/dist/cjs/event-bus/implementations/_shared/_module.js +19 -0
  102. package/dist/cjs/event-bus/implementations/_shared/_module.js.map +1 -0
  103. package/dist/cjs/event-bus/implementations/_shared/{test-utilities/event-bus-adapter.test-suite.js → event-bus-adapter.test-suite.js} +4 -3
  104. package/dist/cjs/event-bus/implementations/_shared/event-bus-adapter.test-suite.js.map +1 -0
  105. package/dist/cjs/event-bus/implementations/_shared/event-bus.test-suite.js +299 -0
  106. package/dist/cjs/event-bus/implementations/_shared/event-bus.test-suite.js.map +1 -0
  107. package/dist/cjs/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js.map +1 -1
  108. package/dist/cjs/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js +2 -3
  109. package/dist/cjs/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js.map +1 -1
  110. package/dist/cjs/event-bus/implementations/derivables/base-event-bus.js +47 -0
  111. package/dist/cjs/event-bus/implementations/derivables/base-event-bus.js.map +1 -0
  112. package/dist/cjs/event-bus/implementations/derivables/event-bus-factory.js +3 -9
  113. package/dist/cjs/event-bus/implementations/derivables/event-bus-factory.js.map +1 -1
  114. package/dist/cjs/event-bus/implementations/derivables/event-bus.js +20 -55
  115. package/dist/cjs/event-bus/implementations/derivables/event-bus.js.map +1 -1
  116. package/dist/cjs/utilities/_module.js +5 -4
  117. package/dist/cjs/utilities/_module.js.map +1 -1
  118. package/dist/cjs/utilities/contracts/_module.js +19 -0
  119. package/dist/cjs/utilities/contracts/_module.js.map +1 -0
  120. package/dist/cjs/utilities/contracts/deinitizable.contract.js +3 -0
  121. package/dist/cjs/utilities/contracts/deinitizable.contract.js.map +1 -0
  122. package/dist/cjs/utilities/contracts/initizable.contract.js +3 -0
  123. package/dist/cjs/utilities/contracts/initizable.contract.js.map +1 -0
  124. package/dist/cjs/utilities/{global-errors.js → errors.js} +1 -1
  125. package/dist/cjs/utilities/errors.js.map +1 -0
  126. package/dist/cjs/{_shared/utilities.js → utilities/functions.js} +1 -1
  127. package/dist/cjs/utilities/functions.js.map +1 -0
  128. package/dist/cjs/{_shared → utilities}/kysely/_module.js +1 -1
  129. package/dist/cjs/utilities/kysely/_module.js.map +1 -0
  130. package/dist/cjs/utilities/kysely/kysely-table-name-transformer-plugin.js.map +1 -0
  131. package/dist/cjs/{_shared → utilities}/types.js.map +1 -1
  132. package/dist/esm/_module.js +1 -0
  133. package/dist/esm/_module.js.map +1 -1
  134. package/dist/esm/async/_module.js +4 -0
  135. package/dist/esm/async/_module.js.map +1 -0
  136. package/dist/esm/{utilities/async/_shared.js → async/async.errors.js} +1 -1
  137. package/dist/esm/async/async.errors.js.map +1 -0
  138. package/dist/esm/async/backof-policies/_module.js +5 -0
  139. package/dist/esm/async/backof-policies/_module.js.map +1 -0
  140. package/dist/esm/async/backof-policies/_shared.js.map +1 -0
  141. package/dist/esm/async/backof-policies/constant-backoff-policy/_module.js +2 -0
  142. package/dist/esm/async/backof-policies/constant-backoff-policy/_module.js.map +1 -0
  143. package/dist/esm/{utilities → async}/backof-policies/constant-backoff-policy/constant-backoff-policy.js +1 -1
  144. package/dist/esm/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +1 -0
  145. package/dist/esm/async/backof-policies/exponential-backoff-policy/_module.js +2 -0
  146. package/dist/esm/async/backof-policies/exponential-backoff-policy/_module.js.map +1 -0
  147. package/dist/esm/{utilities → async}/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js +1 -1
  148. package/dist/esm/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +1 -0
  149. package/dist/esm/async/backof-policies/linear-backoff-policy/_module.js +2 -0
  150. package/dist/esm/async/backof-policies/linear-backoff-policy/_module.js.map +1 -0
  151. package/dist/esm/{utilities → async}/backof-policies/linear-backoff-policy/linear-backoff-policy.js +1 -1
  152. package/dist/esm/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +1 -0
  153. package/dist/esm/async/backof-policies/polynomial-backoff-policy/_module.js +2 -0
  154. package/dist/esm/async/backof-policies/polynomial-backoff-policy/_module.js.map +1 -0
  155. package/dist/esm/{utilities → async}/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js +1 -1
  156. package/dist/esm/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +1 -0
  157. package/dist/esm/async/utilities/_module.js +3 -0
  158. package/dist/esm/async/utilities/_module.js.map +1 -0
  159. package/dist/esm/async/utilities/abort/_module.js +3 -0
  160. package/dist/esm/async/utilities/abort/_module.js.map +1 -0
  161. package/dist/esm/{utilities/async/abortable/abortable.js → async/utilities/abort/abort-and-fail.js} +13 -16
  162. package/dist/esm/async/utilities/abort/abort-and-fail.js.map +1 -0
  163. package/dist/esm/async/utilities/abort/abort.js +15 -0
  164. package/dist/esm/async/utilities/abort/abort.js.map +1 -0
  165. package/dist/esm/async/utilities/delay/_module.js +2 -0
  166. package/dist/esm/async/utilities/delay/_module.js.map +1 -0
  167. package/dist/esm/async/utilities/delay/delay.js +17 -0
  168. package/dist/esm/async/utilities/delay/delay.js.map +1 -0
  169. package/dist/esm/async/utilities/lazy-promise/_module.js +2 -0
  170. package/dist/esm/async/utilities/lazy-promise/_module.js.map +1 -0
  171. package/dist/esm/async/utilities/lazy-promise/lazy-promise.js +91 -0
  172. package/dist/esm/async/utilities/lazy-promise/lazy-promise.js.map +1 -0
  173. package/dist/esm/async/utilities/retry/_module.js +3 -0
  174. package/dist/esm/async/utilities/retry/_module.js.map +1 -0
  175. package/dist/esm/async/utilities/retry/retry-or-fail.js +33 -0
  176. package/dist/esm/async/utilities/retry/retry-or-fail.js.map +1 -0
  177. package/dist/esm/async/utilities/retry/retry.js +15 -0
  178. package/dist/esm/async/utilities/retry/retry.js.map +1 -0
  179. package/dist/esm/async/utilities/timeout/_module.js +3 -0
  180. package/dist/esm/async/utilities/timeout/_module.js.map +1 -0
  181. package/dist/esm/async/utilities/timeout/timeout-and-fail.js +22 -0
  182. package/dist/esm/async/utilities/timeout/timeout-and-fail.js.map +1 -0
  183. package/dist/esm/async/utilities/timeout/timeout.js +15 -0
  184. package/dist/esm/async/utilities/timeout/timeout.js.map +1 -0
  185. package/dist/esm/cache/contracts/cache.events.js +0 -10
  186. package/dist/esm/cache/contracts/cache.events.js.map +1 -1
  187. package/dist/esm/cache/implementations/_shared/cache-adapter.test-suite.js +2 -1
  188. package/dist/esm/cache/implementations/_shared/cache-adapter.test-suite.js.map +1 -1
  189. package/dist/esm/cache/implementations/_shared/cache.test-suite.js +2 -1
  190. package/dist/esm/cache/implementations/_shared/cache.test-suite.js.map +1 -1
  191. package/dist/esm/cache/implementations/adapters/_module.js +1 -0
  192. package/dist/esm/cache/implementations/adapters/_module.js.map +1 -1
  193. package/dist/esm/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js +4 -4
  194. package/dist/esm/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js.map +1 -1
  195. package/dist/esm/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.js.map +1 -1
  196. package/dist/esm/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js +2 -2
  197. package/dist/esm/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js.map +1 -1
  198. package/dist/esm/cache/implementations/adapters/no-op-cache-adapter/_module.js +2 -0
  199. package/dist/esm/cache/implementations/adapters/no-op-cache-adapter/_module.js.map +1 -0
  200. package/dist/esm/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js +24 -0
  201. package/dist/esm/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js.map +1 -0
  202. package/dist/esm/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js +2 -2
  203. package/dist/esm/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js.map +1 -1
  204. package/dist/esm/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js +3 -3
  205. package/dist/esm/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js.map +1 -1
  206. package/dist/esm/cache/implementations/derivables/base-cache.js +37 -29
  207. package/dist/esm/cache/implementations/derivables/base-cache.js.map +1 -1
  208. package/dist/esm/cache/implementations/derivables/cache-factory.js +1 -1
  209. package/dist/esm/cache/implementations/derivables/cache-factory.js.map +1 -1
  210. package/dist/esm/cache/implementations/derivables/cache.js +16 -18
  211. package/dist/esm/cache/implementations/derivables/cache.js.map +1 -1
  212. package/dist/esm/collection/implementations/async-iterable-collection/_shared/_module.js +4 -1
  213. package/dist/esm/collection/implementations/async-iterable-collection/_shared/_module.js.map +1 -1
  214. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js +23 -0
  215. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -0
  216. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js +29 -0
  217. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js.map +1 -0
  218. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js +32 -0
  219. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js.map +1 -0
  220. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js +44 -0
  221. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js.map +1 -0
  222. package/dist/esm/collection/implementations/async-iterable-collection/async-iterable-collection.js +46 -37
  223. package/dist/esm/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
  224. package/dist/esm/collection/implementations/iterable-collection/iterable-collection.js +1 -1
  225. package/dist/esm/collection/implementations/list-collection/list-collection.js +1 -1
  226. package/dist/esm/event-bus/contracts/event-bus.errors.js +3 -3
  227. package/dist/esm/event-bus/contracts/event-bus.errors.js.map +1 -1
  228. package/dist/esm/event-bus/implementations/_module.js +1 -1
  229. package/dist/esm/event-bus/implementations/_module.js.map +1 -1
  230. package/dist/esm/event-bus/implementations/_shared/_module.js +3 -0
  231. package/dist/esm/event-bus/implementations/_shared/_module.js.map +1 -0
  232. package/dist/esm/event-bus/implementations/_shared/{test-utilities/event-bus-adapter.test-suite.js → event-bus-adapter.test-suite.js} +2 -1
  233. package/dist/esm/event-bus/implementations/_shared/event-bus-adapter.test-suite.js.map +1 -0
  234. package/dist/esm/event-bus/implementations/_shared/event-bus.test-suite.js +296 -0
  235. package/dist/esm/event-bus/implementations/_shared/event-bus.test-suite.js.map +1 -0
  236. package/dist/esm/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js.map +1 -1
  237. package/dist/esm/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js +3 -4
  238. package/dist/esm/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js.map +1 -1
  239. package/dist/esm/event-bus/implementations/derivables/base-event-bus.js +43 -0
  240. package/dist/esm/event-bus/implementations/derivables/base-event-bus.js.map +1 -0
  241. package/dist/esm/event-bus/implementations/derivables/event-bus-factory.js +1 -7
  242. package/dist/esm/event-bus/implementations/derivables/event-bus-factory.js.map +1 -1
  243. package/dist/esm/event-bus/implementations/derivables/event-bus.js +18 -53
  244. package/dist/esm/event-bus/implementations/derivables/event-bus.js.map +1 -1
  245. package/dist/esm/utilities/_module.js +5 -4
  246. package/dist/esm/utilities/_module.js.map +1 -1
  247. package/dist/esm/utilities/contracts/_module.js +3 -0
  248. package/dist/esm/utilities/contracts/_module.js.map +1 -0
  249. package/dist/esm/utilities/contracts/deinitizable.contract.js +1 -0
  250. package/dist/esm/utilities/contracts/deinitizable.contract.js.map +1 -0
  251. package/dist/esm/utilities/contracts/initizable.contract.js +1 -0
  252. package/dist/esm/utilities/contracts/initizable.contract.js.map +1 -0
  253. package/dist/esm/utilities/{global-errors.js → errors.js} +1 -1
  254. package/dist/esm/utilities/errors.js.map +1 -0
  255. package/dist/esm/{_shared/utilities.js → utilities/functions.js} +1 -1
  256. package/dist/esm/utilities/functions.js.map +1 -0
  257. package/dist/esm/utilities/kysely/_module.js +2 -0
  258. package/dist/esm/utilities/kysely/_module.js.map +1 -0
  259. package/dist/esm/utilities/kysely/kysely-table-name-transformer-plugin.js.map +1 -0
  260. package/dist/esm/{_shared → utilities}/types.js.map +1 -1
  261. package/dist/types/_module.d.ts +1 -0
  262. package/dist/types/async/_module.d.ts +3 -0
  263. package/dist/types/{utilities/async/_shared.d.ts → async/async.errors.d.ts} +6 -6
  264. package/dist/types/async/backof-policies/_module.d.ts +5 -0
  265. package/dist/types/{utilities → async}/backof-policies/_shared.d.ts +1 -1
  266. package/dist/types/async/backof-policies/constant-backoff-policy/_module.d.ts +1 -0
  267. package/dist/types/{utilities → async}/backof-policies/constant-backoff-policy/constant-backoff-policy.d.ts +2 -2
  268. package/dist/types/async/backof-policies/exponential-backoff-policy/_module.d.ts +1 -0
  269. package/dist/types/{utilities → async}/backof-policies/exponential-backoff-policy/exponential-backoff-policy.d.ts +2 -2
  270. package/dist/types/async/backof-policies/linear-backoff-policy/_module.d.ts +1 -0
  271. package/dist/types/{utilities → async}/backof-policies/linear-backoff-policy/linear-backoff-policy.d.ts +2 -2
  272. package/dist/types/async/backof-policies/polynomial-backoff-policy/_module.d.ts +1 -0
  273. package/dist/types/{utilities → async}/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.d.ts +2 -2
  274. package/dist/types/async/utilities/_module.d.ts +2 -0
  275. package/dist/types/async/utilities/abort/_module.d.ts +2 -0
  276. package/dist/types/async/utilities/abort/abort-and-fail.d.ts +4 -0
  277. package/dist/types/async/utilities/abort/abort.d.ts +9 -0
  278. package/dist/types/async/utilities/delay/_module.d.ts +1 -0
  279. package/dist/types/async/utilities/delay/delay.d.ts +19 -0
  280. package/dist/types/async/utilities/lazy-promise/_module.d.ts +1 -0
  281. package/dist/types/async/utilities/lazy-promise/lazy-promise.d.ts +185 -0
  282. package/dist/types/async/utilities/retry/_module.d.ts +2 -0
  283. package/dist/types/async/utilities/retry/retry-or-fail.d.ts +23 -0
  284. package/dist/types/async/utilities/retry/retry.d.ts +10 -0
  285. package/dist/types/async/utilities/timeout/_module.d.ts +2 -0
  286. package/dist/types/async/utilities/timeout/timeout-and-fail.d.ts +5 -0
  287. package/dist/types/async/utilities/timeout/timeout.d.ts +10 -0
  288. package/dist/types/cache/contracts/cache-adapter.contract.d.ts +1 -1
  289. package/dist/types/cache/contracts/cache.contract.d.ts +7 -28
  290. package/dist/types/cache/contracts/cache.events.d.ts +30 -79
  291. package/dist/types/cache/implementations/_shared/cache-adapter.test-suite.d.ts +26 -24
  292. package/dist/types/cache/implementations/_shared/cache.test-suite.d.ts +54 -43
  293. package/dist/types/cache/implementations/adapters/_module.d.ts +1 -0
  294. package/dist/types/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.d.ts +1 -1
  295. package/dist/types/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.d.ts +23 -4
  296. package/dist/types/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.d.ts +15 -0
  297. package/dist/types/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.d.ts +20 -4
  298. package/dist/types/cache/implementations/adapters/no-op-cache-adapter/_module.d.ts +1 -0
  299. package/dist/types/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.d.ts +18 -0
  300. package/dist/types/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.d.ts +14 -2
  301. package/dist/types/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.d.ts +20 -3
  302. package/dist/types/cache/implementations/derivables/base-cache.d.ts +15 -14
  303. package/dist/types/cache/implementations/derivables/cache.d.ts +7 -4
  304. package/dist/types/collection/contracts/async-collection.contract.d.ts +10 -6
  305. package/dist/types/collection/contracts/collection.contract.d.ts +1 -1
  306. package/dist/types/collection/implementations/async-iterable-collection/_shared/_module.d.ts +4 -1
  307. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-chunk-iterable.d.ts +1 -1
  308. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-chunk-while-iterable.d.ts +1 -1
  309. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-cross-join-iterable.d.ts +1 -1
  310. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.d.ts +13 -0
  311. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-entries-iterable.d.ts +1 -1
  312. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-group-by-iterable.d.ts +1 -1
  313. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-insert-after-iterable.d.ts +1 -1
  314. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-insert-before-iterable.d.ts +1 -1
  315. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-merge-iterable.d.ts +1 -1
  316. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-pad-end-iterable.d.ts +1 -1
  317. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-pad-start-iterable.d.ts +1 -1
  318. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-partion-iterable.d.ts +1 -1
  319. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-repeat-iterable.d.ts +1 -1
  320. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.d.ts +13 -0
  321. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-reverse-iterable.d.ts +1 -1
  322. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-split-iterable.d.ts +1 -1
  323. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.d.ts +9 -0
  324. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.d.ts +13 -0
  325. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-zip-iterable.d.ts +1 -1
  326. package/dist/types/collection/implementations/async-iterable-collection/async-iterable-collection.d.ts +4 -3
  327. package/dist/types/collection/implementations/iterable-collection/iterable-collection.d.ts +1 -1
  328. package/dist/types/collection/implementations/list-collection/list-collection.d.ts +1 -1
  329. package/dist/types/event-bus/contracts/_shared.d.ts +2 -5
  330. package/dist/types/event-bus/contracts/event-bus-adapter.contract.d.ts +4 -1
  331. package/dist/types/event-bus/contracts/event-bus-factory.contract.d.ts +3 -28
  332. package/dist/types/event-bus/contracts/event-bus.contract.d.ts +24 -16
  333. package/dist/types/event-bus/contracts/event-bus.errors.d.ts +3 -3
  334. package/dist/types/event-bus/implementations/_module.d.ts +1 -1
  335. package/dist/types/event-bus/implementations/_shared/_module.d.ts +2 -0
  336. package/dist/types/event-bus/implementations/_shared/event-bus-adapter.test-suite.d.ts +59 -0
  337. package/dist/types/event-bus/implementations/_shared/event-bus.test-suite.d.ts +72 -0
  338. package/dist/types/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.d.ts +16 -0
  339. package/dist/types/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.d.ts +16 -1
  340. package/dist/types/event-bus/implementations/derivables/base-event-bus.d.ts +23 -0
  341. package/dist/types/event-bus/implementations/derivables/event-bus-factory.d.ts +4 -7
  342. package/dist/types/event-bus/implementations/derivables/event-bus.d.ts +11 -53
  343. package/dist/types/serializer/implementations/_shared/test-utilities/serializer.test-suite.d.ts +1 -1
  344. package/dist/types/utilities/_module.d.ts +5 -4
  345. package/dist/types/utilities/contracts/_module.d.ts +2 -0
  346. package/dist/types/utilities/contracts/deinitizable.contract.d.ts +9 -0
  347. package/dist/types/utilities/contracts/initizable.contract.d.ts +9 -0
  348. package/dist/types/utilities/{global-errors.d.ts → errors.d.ts} +10 -1
  349. package/dist/types/{_shared/utilities.d.ts → utilities/functions.d.ts} +3 -3
  350. package/dist/types/utilities/kysely/_module.d.ts +1 -0
  351. package/dist/types/{_shared → utilities}/kysely/kysely-table-name-transformer-plugin.d.ts +1 -1
  352. package/dist/types/{_shared → utilities}/types.d.ts +3 -8
  353. package/package.json +1 -1
  354. package/dist/cjs/_shared/kysely/_module.js.map +0 -1
  355. package/dist/cjs/_shared/kysely/kysely-table-name-transformer-plugin.js.map +0 -1
  356. package/dist/cjs/_shared/redis/_module.js +0 -20
  357. package/dist/cjs/_shared/redis/_module.js.map +0 -1
  358. package/dist/cjs/_shared/redis/clear-iterable.js +0 -25
  359. package/dist/cjs/_shared/redis/clear-iterable.js.map +0 -1
  360. package/dist/cjs/_shared/redis/escape-redis-chars.js +0 -41
  361. package/dist/cjs/_shared/redis/escape-redis-chars.js.map +0 -1
  362. package/dist/cjs/_shared/redis/is-redis-type-error.js +0 -9
  363. package/dist/cjs/_shared/redis/is-redis-type-error.js.map +0 -1
  364. package/dist/cjs/_shared/utilities.js.map +0 -1
  365. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js +0 -31
  366. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js.map +0 -1
  367. package/dist/cjs/event-bus/implementations/_shared/test-utilities/_module.js.map +0 -1
  368. package/dist/cjs/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js.map +0 -1
  369. package/dist/cjs/event-bus/implementations/derivables/with-validation-event-bus-adapter.js +0 -35
  370. package/dist/cjs/event-bus/implementations/derivables/with-validation-event-bus-adapter.js.map +0 -1
  371. package/dist/cjs/utilities/async/_module.js +0 -29
  372. package/dist/cjs/utilities/async/_module.js.map +0 -1
  373. package/dist/cjs/utilities/async/_shared.js.map +0 -1
  374. package/dist/cjs/utilities/async/abortable/_module.js.map +0 -1
  375. package/dist/cjs/utilities/async/abortable/abortable.js +0 -48
  376. package/dist/cjs/utilities/async/abortable/abortable.js.map +0 -1
  377. package/dist/cjs/utilities/async/abortable-iterable/_module.js.map +0 -1
  378. package/dist/cjs/utilities/async/abortable-iterable/abortable-iterable.js +0 -32
  379. package/dist/cjs/utilities/async/abortable-iterable/abortable-iterable.js.map +0 -1
  380. package/dist/cjs/utilities/async/delay/_module.js.map +0 -1
  381. package/dist/cjs/utilities/async/delay/delay.js +0 -24
  382. package/dist/cjs/utilities/async/delay/delay.js.map +0 -1
  383. package/dist/cjs/utilities/async/delay-iterable/_module.js.map +0 -1
  384. package/dist/cjs/utilities/async/delay-iterable/delay-iterable.js +0 -36
  385. package/dist/cjs/utilities/async/delay-iterable/delay-iterable.js.map +0 -1
  386. package/dist/cjs/utilities/async/lazy-promise/_module.js.map +0 -1
  387. package/dist/cjs/utilities/async/lazy-promise/lazy-promise.js +0 -22
  388. package/dist/cjs/utilities/async/lazy-promise/lazy-promise.js.map +0 -1
  389. package/dist/cjs/utilities/async/retry/_module.js.map +0 -1
  390. package/dist/cjs/utilities/async/retry/retry.js +0 -43
  391. package/dist/cjs/utilities/async/retry/retry.js.map +0 -1
  392. package/dist/cjs/utilities/async/retry-iterable/_module.js +0 -18
  393. package/dist/cjs/utilities/async/retry-iterable/_module.js.map +0 -1
  394. package/dist/cjs/utilities/async/retry-iterable/retry-iterable.js +0 -32
  395. package/dist/cjs/utilities/async/retry-iterable/retry-iterable.js.map +0 -1
  396. package/dist/cjs/utilities/async/timeout/_module.js.map +0 -1
  397. package/dist/cjs/utilities/async/timeout/timeout.js +0 -28
  398. package/dist/cjs/utilities/async/timeout/timeout.js.map +0 -1
  399. package/dist/cjs/utilities/async/timeout-iterable/_module.js +0 -18
  400. package/dist/cjs/utilities/async/timeout-iterable/_module.js.map +0 -1
  401. package/dist/cjs/utilities/async/timeout-iterable/timeout-iterable.js +0 -11
  402. package/dist/cjs/utilities/async/timeout-iterable/timeout-iterable.js.map +0 -1
  403. package/dist/cjs/utilities/backof-policies/_module.js.map +0 -1
  404. package/dist/cjs/utilities/backof-policies/_shared.js.map +0 -1
  405. package/dist/cjs/utilities/backof-policies/constant-backoff-policy/_module.js +0 -18
  406. package/dist/cjs/utilities/backof-policies/constant-backoff-policy/_module.js.map +0 -1
  407. package/dist/cjs/utilities/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +0 -1
  408. package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/_module.js +0 -18
  409. package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/_module.js.map +0 -1
  410. package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +0 -1
  411. package/dist/cjs/utilities/backof-policies/linear-backoff-policy/_module.js +0 -18
  412. package/dist/cjs/utilities/backof-policies/linear-backoff-policy/_module.js.map +0 -1
  413. package/dist/cjs/utilities/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +0 -1
  414. package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/_module.js +0 -18
  415. package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/_module.js.map +0 -1
  416. package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +0 -1
  417. package/dist/cjs/utilities/global-errors.js.map +0 -1
  418. package/dist/cjs/utilities/validation/_module.js +0 -22
  419. package/dist/cjs/utilities/validation/_module.js.map +0 -1
  420. package/dist/esm/_shared/kysely/_module.js +0 -2
  421. package/dist/esm/_shared/kysely/_module.js.map +0 -1
  422. package/dist/esm/_shared/kysely/kysely-table-name-transformer-plugin.js.map +0 -1
  423. package/dist/esm/_shared/redis/_module.js +0 -4
  424. package/dist/esm/_shared/redis/_module.js.map +0 -1
  425. package/dist/esm/_shared/redis/clear-iterable.js +0 -21
  426. package/dist/esm/_shared/redis/clear-iterable.js.map +0 -1
  427. package/dist/esm/_shared/redis/escape-redis-chars.js +0 -38
  428. package/dist/esm/_shared/redis/escape-redis-chars.js.map +0 -1
  429. package/dist/esm/_shared/redis/is-redis-type-error.js +0 -6
  430. package/dist/esm/_shared/redis/is-redis-type-error.js.map +0 -1
  431. package/dist/esm/_shared/utilities.js.map +0 -1
  432. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js +0 -27
  433. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js.map +0 -1
  434. package/dist/esm/event-bus/implementations/_shared/test-utilities/_module.js +0 -2
  435. package/dist/esm/event-bus/implementations/_shared/test-utilities/_module.js.map +0 -1
  436. package/dist/esm/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js.map +0 -1
  437. package/dist/esm/event-bus/implementations/derivables/with-validation-event-bus-adapter.js +0 -31
  438. package/dist/esm/event-bus/implementations/derivables/with-validation-event-bus-adapter.js.map +0 -1
  439. package/dist/esm/utilities/async/_module.js +0 -11
  440. package/dist/esm/utilities/async/_module.js.map +0 -1
  441. package/dist/esm/utilities/async/_shared.js.map +0 -1
  442. package/dist/esm/utilities/async/abortable/_module.js +0 -2
  443. package/dist/esm/utilities/async/abortable/_module.js.map +0 -1
  444. package/dist/esm/utilities/async/abortable/abortable.js.map +0 -1
  445. package/dist/esm/utilities/async/abortable-iterable/_module.js +0 -2
  446. package/dist/esm/utilities/async/abortable-iterable/_module.js.map +0 -1
  447. package/dist/esm/utilities/async/abortable-iterable/abortable-iterable.js +0 -29
  448. package/dist/esm/utilities/async/abortable-iterable/abortable-iterable.js.map +0 -1
  449. package/dist/esm/utilities/async/delay/_module.js +0 -2
  450. package/dist/esm/utilities/async/delay/_module.js.map +0 -1
  451. package/dist/esm/utilities/async/delay/delay.js +0 -21
  452. package/dist/esm/utilities/async/delay/delay.js.map +0 -1
  453. package/dist/esm/utilities/async/delay-iterable/_module.js +0 -2
  454. package/dist/esm/utilities/async/delay-iterable/_module.js.map +0 -1
  455. package/dist/esm/utilities/async/delay-iterable/delay-iterable.js +0 -33
  456. package/dist/esm/utilities/async/delay-iterable/delay-iterable.js.map +0 -1
  457. package/dist/esm/utilities/async/lazy-promise/_module.js +0 -2
  458. package/dist/esm/utilities/async/lazy-promise/_module.js.map +0 -1
  459. package/dist/esm/utilities/async/lazy-promise/lazy-promise.js +0 -17
  460. package/dist/esm/utilities/async/lazy-promise/lazy-promise.js.map +0 -1
  461. package/dist/esm/utilities/async/retry/_module.js +0 -2
  462. package/dist/esm/utilities/async/retry/_module.js.map +0 -1
  463. package/dist/esm/utilities/async/retry/retry.js +0 -40
  464. package/dist/esm/utilities/async/retry/retry.js.map +0 -1
  465. package/dist/esm/utilities/async/retry-iterable/_module.js +0 -2
  466. package/dist/esm/utilities/async/retry-iterable/_module.js.map +0 -1
  467. package/dist/esm/utilities/async/retry-iterable/retry-iterable.js +0 -29
  468. package/dist/esm/utilities/async/retry-iterable/retry-iterable.js.map +0 -1
  469. package/dist/esm/utilities/async/timeout/_module.js +0 -2
  470. package/dist/esm/utilities/async/timeout/_module.js.map +0 -1
  471. package/dist/esm/utilities/async/timeout/timeout.js +0 -25
  472. package/dist/esm/utilities/async/timeout/timeout.js.map +0 -1
  473. package/dist/esm/utilities/async/timeout-iterable/_module.js +0 -2
  474. package/dist/esm/utilities/async/timeout-iterable/_module.js.map +0 -1
  475. package/dist/esm/utilities/async/timeout-iterable/timeout-iterable.js +0 -8
  476. package/dist/esm/utilities/async/timeout-iterable/timeout-iterable.js.map +0 -1
  477. package/dist/esm/utilities/backof-policies/_module.js +0 -5
  478. package/dist/esm/utilities/backof-policies/_module.js.map +0 -1
  479. package/dist/esm/utilities/backof-policies/_shared.js.map +0 -1
  480. package/dist/esm/utilities/backof-policies/constant-backoff-policy/_module.js +0 -2
  481. package/dist/esm/utilities/backof-policies/constant-backoff-policy/_module.js.map +0 -1
  482. package/dist/esm/utilities/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +0 -1
  483. package/dist/esm/utilities/backof-policies/exponential-backoff-policy/_module.js +0 -2
  484. package/dist/esm/utilities/backof-policies/exponential-backoff-policy/_module.js.map +0 -1
  485. package/dist/esm/utilities/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +0 -1
  486. package/dist/esm/utilities/backof-policies/linear-backoff-policy/_module.js +0 -2
  487. package/dist/esm/utilities/backof-policies/linear-backoff-policy/_module.js.map +0 -1
  488. package/dist/esm/utilities/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +0 -1
  489. package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/_module.js +0 -2
  490. package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/_module.js.map +0 -1
  491. package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +0 -1
  492. package/dist/esm/utilities/global-errors.js.map +0 -1
  493. package/dist/esm/utilities/validation/_module.js +0 -17
  494. package/dist/esm/utilities/validation/_module.js.map +0 -1
  495. package/dist/types/_shared/kysely/_module.d.ts +0 -1
  496. package/dist/types/_shared/redis/_module.d.ts +0 -3
  497. package/dist/types/_shared/redis/clear-iterable.d.ts +0 -13
  498. package/dist/types/_shared/redis/escape-redis-chars.d.ts +0 -7
  499. package/dist/types/_shared/redis/is-redis-type-error.d.ts +0 -7
  500. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.d.ts +0 -12
  501. package/dist/types/event-bus/implementations/_shared/test-utilities/_module.d.ts +0 -1
  502. package/dist/types/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.d.ts +0 -36
  503. package/dist/types/event-bus/implementations/derivables/with-validation-event-bus-adapter.d.ts +0 -17
  504. package/dist/types/utilities/async/_module.d.ts +0 -10
  505. package/dist/types/utilities/async/abortable/_module.d.ts +0 -1
  506. package/dist/types/utilities/async/abortable/abortable.d.ts +0 -39
  507. package/dist/types/utilities/async/abortable-iterable/_module.d.ts +0 -1
  508. package/dist/types/utilities/async/abortable-iterable/abortable-iterable.d.ts +0 -36
  509. package/dist/types/utilities/async/delay/_module.d.ts +0 -1
  510. package/dist/types/utilities/async/delay/delay.d.ts +0 -38
  511. package/dist/types/utilities/async/delay-iterable/_module.d.ts +0 -1
  512. package/dist/types/utilities/async/delay-iterable/delay-iterable.d.ts +0 -57
  513. package/dist/types/utilities/async/lazy-promise/_module.d.ts +0 -1
  514. package/dist/types/utilities/async/lazy-promise/lazy-promise.d.ts +0 -28
  515. package/dist/types/utilities/async/retry/_module.d.ts +0 -1
  516. package/dist/types/utilities/async/retry/retry.d.ts +0 -89
  517. package/dist/types/utilities/async/retry-iterable/_module.d.ts +0 -1
  518. package/dist/types/utilities/async/retry-iterable/retry-iterable.d.ts +0 -86
  519. package/dist/types/utilities/async/timeout/_module.d.ts +0 -1
  520. package/dist/types/utilities/async/timeout/timeout.d.ts +0 -40
  521. package/dist/types/utilities/async/timeout-iterable/_module.d.ts +0 -1
  522. package/dist/types/utilities/async/timeout-iterable/timeout-iterable.d.ts +0 -64
  523. package/dist/types/utilities/backof-policies/_module.d.ts +0 -5
  524. package/dist/types/utilities/backof-policies/constant-backoff-policy/_module.d.ts +0 -1
  525. package/dist/types/utilities/backof-policies/exponential-backoff-policy/_module.d.ts +0 -1
  526. package/dist/types/utilities/backof-policies/linear-backoff-policy/_module.d.ts +0 -1
  527. package/dist/types/utilities/backof-policies/polynomial-backoff-policy/_module.d.ts +0 -1
  528. package/dist/types/utilities/validation/_module.d.ts +0 -32
  529. /package/dist/cjs/{utilities → async}/backof-policies/_shared.js +0 -0
  530. /package/dist/cjs/{_shared → utilities}/kysely/kysely-table-name-transformer-plugin.js +0 -0
  531. /package/dist/cjs/{_shared → utilities}/types.js +0 -0
  532. /package/dist/esm/{utilities → async}/backof-policies/_shared.js +0 -0
  533. /package/dist/esm/{_shared → utilities}/kysely/kysely-table-name-transformer-plugin.js +0 -0
  534. /package/dist/esm/{_shared → utilities}/types.js +0 -0
@@ -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";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @module Utilities
2
+ * @module Async
3
3
  */
4
4
  /**
5
5
  * @returns Amount milliseconds to wait
@@ -0,0 +1 @@
1
+ export * from "../../../async/backof-policies/constant-backoff-policy/constant-backoff-policy";
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @module Utilities
2
+ * @module Async
3
3
  */
4
4
  import { TimeSpan } from "../../../utilities/_module";
5
- import { type BackoffPolicy } from "../../../utilities/backof-policies/_shared";
5
+ import { type BackoffPolicy } from "../../../async/backof-policies/_shared";
6
6
  /**
7
7
  * @group Backoff policies
8
8
  */
@@ -0,0 +1 @@
1
+ export * from "../../../async/backof-policies/exponential-backoff-policy/exponential-backoff-policy";
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @module Utilities
2
+ * @module Async
3
3
  */
4
4
  import { TimeSpan } from "../../../utilities/_module";
5
- import type { BackoffPolicy } from "../../../utilities/backof-policies/_shared";
5
+ import type { BackoffPolicy } from "../../../async/backof-policies/_shared";
6
6
  /**
7
7
  * @group Backoff policies
8
8
  */
@@ -0,0 +1 @@
1
+ export * from "../../../async/backof-policies/linear-backoff-policy/linear-backoff-policy";
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @module Utilities
2
+ * @module Async
3
3
  */
4
4
  import { TimeSpan } from "../../../utilities/_module";
5
- import type { BackoffPolicy } from "../../../utilities/backof-policies/_shared";
5
+ import type { BackoffPolicy } from "../../../async/backof-policies/_shared";
6
6
  /**
7
7
  * @group Backoff policies
8
8
  */
@@ -0,0 +1 @@
1
+ export * from "../../../async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy";
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @module Utilities
2
+ * @module Async
3
3
  */
4
4
  import { TimeSpan } from "../../../utilities/_module";
5
- import type { BackoffPolicy } from "../../../utilities/backof-policies/_shared";
5
+ import type { BackoffPolicy } from "../../../async/backof-policies/_shared";
6
6
  /**
7
7
  * @group Backoff policies
8
8
  */
@@ -0,0 +1,2 @@
1
+ export * from "../../async/utilities/delay/_module";
2
+ export * from "../../async/utilities/lazy-promise/_module";
@@ -0,0 +1,2 @@
1
+ export * from "../../../async/utilities/abort/abort-and-fail";
2
+ export * from "../../../async/utilities/abort/abort";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare function abortAndFail<TValue>(asyncFn: () => PromiseLike<TValue>, abortSignal: AbortSignal): Promise<TValue>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @module Async
3
+ */
4
+ import type { Result } from "../../../utilities/types";
5
+ import { AbortAsyncError } from "../../../async/async.errors";
6
+ /**
7
+ * @internal
8
+ */
9
+ export declare function abort<TValue>(asyncFn: () => PromiseLike<TValue>, abortSignal: AbortSignal): Promise<Result<TValue, AbortAsyncError>>;
@@ -0,0 +1 @@
1
+ export * from "../../../async/utilities/delay/delay";
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @module Async
3
+ */
4
+ import { type TimeSpan } from "../../../utilities/_module";
5
+ /**
6
+ * The <i>delay</i> function creates a promise that will be fulfilled after given <i>time</i> and can be aborted by providing <i>abortSignal</i>.
7
+ * @group Utilities
8
+ * @throws {AsyncError} {@link AsyncError}
9
+ * @throws {AbortAsyncError} {@link AbortAsyncError}
10
+ * @example
11
+ * ```ts
12
+ * import { delay, TimeSpan } from "@daiso-tech/core";
13
+ * (async () => {
14
+ * console.log("a");
15
+ * await delay(TimeSpan.fromSeconds(2));
16
+ * console.log("b");
17
+ * })();
18
+ */
19
+ export declare function delay(time: TimeSpan, abortSignal?: AbortSignal): Promise<void>;
@@ -0,0 +1 @@
1
+ export * from "../../../async/utilities/lazy-promise/lazy-promise";
@@ -0,0 +1,185 @@
1
+ /**
2
+ * @module Async
3
+ */
4
+ import type { BackoffPolicy } from "../../../async/backof-policies/_module";
5
+ import type { TimeSpan } from "../../../utilities/time-span/_module";
6
+ import type { RetryPolicy } from "../../../async/utilities/retry/_module";
7
+ /**
8
+ * @group Utilities
9
+ */
10
+ export type LazyPromiseSettings = {
11
+ retryAttempts?: number | null;
12
+ backoffPolicy?: BackoffPolicy | null;
13
+ retryPolicy?: RetryPolicy | null;
14
+ abortSignal?: AbortSignal | null;
15
+ time?: TimeSpan | null;
16
+ };
17
+ /**
18
+ * The <i>LazyPromise</i> class is used for creating lazy <i>{@link PromiseLike}<i> object that will only execute when awaited or when then method is called.
19
+ * The class includes helpful methods
20
+ * - <i>defer</i>
21
+ * - <i>retryAttempts</i>
22
+ * - <i>retryPolicy</i>
23
+ * - <i>backoffPolicy</i>
24
+ * - <i>abort</i>
25
+ * - <i>timeout</i>
26
+ *
27
+ * The order in which these methods are called does not affect their functionality. Internally, the following execution order is applied:
28
+ * 1. <i>timeout</i>
29
+ * 2. <i>retryAttempts</i>
30
+ * 3. <i>abort</i>
31
+ *
32
+ * This means that combining all methods ensures the <i>retryAttempts</i> method will continue retrying even if the timeout is triggered,
33
+ * while the <i>abort</i> method takes priority to cancel all operations if activated.
34
+ * @group Utilities
35
+ * @example
36
+ * ```ts
37
+ * (async () => {
38
+ * const promise = new LazyPromise(async () => {
39
+ * console.log("I am lazy");
40
+ * });
41
+ * // "I am lazy" will only logged when awaited or then method i called.
42
+ * await promise;
43
+ * })();
44
+ * ```
45
+ */
46
+ export declare class LazyPromise<TValue> implements PromiseLike<TValue> {
47
+ private asyncFn;
48
+ private promise;
49
+ private attempts;
50
+ private backoffPolicy_;
51
+ private retryPolicy_;
52
+ private abortSignal;
53
+ private time;
54
+ constructor(asyncFn: () => PromiseLike<TValue>, settings?: LazyPromiseSettings);
55
+ private applyTimeout;
56
+ private applyRetry;
57
+ private applyAbort;
58
+ private applySettings;
59
+ /**
60
+ * @throws {AbortAsyncError} {@link AbortAsyncError}
61
+ * @throws {TimeoutAsyncError} {@link TimeoutAsyncError}
62
+ * @throws {RetryAsyncError} {@link RetryAsyncError}
63
+ */
64
+ then<TResult1 = TValue, TResult2 = never>(onfulfilled?: ((value: TValue) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): PromiseLike<TResult1 | TResult2>;
65
+ /**
66
+ * The <i>retryAttempts</i> method is used for setting max retry attempts.
67
+ * @example
68
+ * ```ts
69
+ * import { LazyPromise } from "@daiso-tech/core";
70
+ *
71
+ * const promise =
72
+ * new LazyPromise(async () => {
73
+ * console.log("A");
74
+ * throw new Error("Error occured!");
75
+ * })
76
+ * .retryAttempts(3)
77
+ * (async () => {
78
+ * // Will log "A" 3 times and then retry error will be thrown.
79
+ * await promise;
80
+ * })();
81
+ * ```
82
+ */
83
+ retryAttempts(attempts: number): this;
84
+ /**
85
+ * The <i>backoffPolicy</i> method is used for setting a custom <i>{@link BackoffPolicy}</i>.
86
+ * @example
87
+ * ```ts
88
+ * import { LazyPromise, linearBackoffPolicy } from "@daiso-tech/core";
89
+ *
90
+ * const promise =
91
+ * new LazyPromise(async () => {
92
+ * console.log("A");
93
+ * throw new Error("Error occured!");
94
+ * })
95
+ * .retryAttempts(3)
96
+ * .backoffPolicy(linearBackoffPolicy())
97
+ * (async () => {
98
+ * // Will log "A" 3 times and then retry error will be thrown.
99
+ * await promise;
100
+ * })();
101
+ * ```
102
+ */
103
+ backoffPolicy(policy: BackoffPolicy): this;
104
+ /**
105
+ * The <i>backoffPolicy</i> method is used for setting a custom <i>{@link BackoffPolicy}</i>.
106
+ * @example
107
+ * ```ts
108
+ * import { LazyPromise } from "@daiso-tech/core";
109
+ *
110
+ * class ErrorA extends Error {}
111
+ *
112
+ * const promise =
113
+ * new LazyPromise(async () => {
114
+ * console.log("A");
115
+ * throw new Error("Error occured!");
116
+ * })
117
+ * .retryAttempts(3)
118
+ * // Will only retry an error that is instance ErrorA
119
+ * .retryPolicy(error => error instanceof ErrorA)
120
+ * (async () => {
121
+ * // Will log "A" 1 time and then error will be thrown.
122
+ * await promise;
123
+ * })();
124
+ * ```
125
+ */
126
+ retryPolicy(policy: RetryPolicy): this;
127
+ /**
128
+ * The <i>timeout</i> method aborts the <i>LazyPromise</i> if it exceeds the given <i>time</i> by throwning an error.
129
+ * @example
130
+ * ```ts
131
+ * import { LazyPromise, delay, TimeSpan } from "@daiso-tech/core";
132
+ *
133
+ * const promise =
134
+ * new LazyPromise(async () => {
135
+ * await delay(TimeSpan.fromMinutes(1));
136
+ * })
137
+ * .timeout(TimeSpan.fromSeconds(1));
138
+ * (async () => {
139
+ * // An timeout error will be thrown.
140
+ * await promise;
141
+ * })();
142
+ * ```
143
+ */
144
+ timeout(time: TimeSpan): this;
145
+ /**
146
+ * The <i>abort</i> method aborts the <i>LazyPromise</i> by the passed in <i>abortSignal</i>.
147
+ * @example
148
+ * ```ts
149
+ * import { LazyPromise, delay, TimeSpan } from "@daiso-tech/core";
150
+ *
151
+ * const abortController = new AbortController();
152
+ * const promise =
153
+ * new LazyPromise(async () => {
154
+ * await delay(TimeSpan.fromMinutes(1));
155
+ * })
156
+ * .abort(abortController.signal);
157
+ * (async () => {
158
+ * setTimeout(() => {
159
+ * abortController.abort();
160
+ * }, 1000);
161
+ * // An timeout error will be thrown.
162
+ * await promise;
163
+ * })();
164
+ * ```
165
+ */
166
+ abort(abortSignal: AbortSignal): this;
167
+ /**
168
+ * The <i>defer</i> method executes the <i>LazyPromise</i> without awaiting it.
169
+ * @example
170
+ * ```ts
171
+ * import { LazyPromise, delay, TimeSpan } from "@daiso-tech/core";
172
+ *
173
+ * const promise =
174
+ * new LazyPromise(async () => {
175
+ * await delay(TimeSpan.fromSeconds(1));
176
+ * // Will be loged after one second
177
+ * console.log("Done !");
178
+ * });
179
+ * promise.defer();
180
+ * // Will be logged immediately
181
+ * console.log("Hello");
182
+ * ```
183
+ */
184
+ defer(): void;
185
+ }
@@ -0,0 +1,2 @@
1
+ export * from "../../../async/utilities/retry/retry-or-fail";
2
+ export * from "../../../async/utilities/retry/retry";
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @module Async
3
+ */
4
+ import type { BackoffPolicy } from "../../../async/backof-policies/_module";
5
+ /**
6
+ * @group Utilities
7
+ */
8
+ export type RetryPolicy = (error: unknown) => boolean;
9
+ /**
10
+ * @group Utilities
11
+ */
12
+ export type RetrySettings = {
13
+ /**
14
+ * @default {4}
15
+ */
16
+ maxAttempts?: number;
17
+ backoffPolicy?: BackoffPolicy;
18
+ retryPolicy?: RetryPolicy;
19
+ };
20
+ /**
21
+ * @internal
22
+ */
23
+ export declare function retryOrFail<TValue = void>(asyncFn: () => PromiseLike<TValue>, settings?: RetrySettings): Promise<TValue>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @module Async
3
+ */
4
+ import { RetryAsyncError } from "../../../async/async.errors";
5
+ import type { Result } from "../../../utilities/types";
6
+ import type { RetrySettings } from "../../../async/utilities/retry/retry-or-fail";
7
+ /**
8
+ * @internal
9
+ */
10
+ export declare function retry<TValue = void>(asyncFn: () => PromiseLike<TValue>, settings?: RetrySettings): Promise<Result<TValue, RetryAsyncError>>;
@@ -0,0 +1,2 @@
1
+ export * from "../../../async/utilities/timeout/timeout-and-fail";
2
+ export * from "../../../async/utilities/timeout/timeout";
@@ -0,0 +1,5 @@
1
+ import type { TimeSpan } from "../../../utilities/_module";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare function timeoutAndFail<TValue>(asyncFn: () => PromiseLike<TValue>, time: TimeSpan): Promise<TValue>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @module Async
3
+ */
4
+ import { TimeoutAsyncError } from "../../../async/async.errors";
5
+ import type { TimeSpan } from "../../../utilities/_module";
6
+ import type { Result } from "../../../utilities/types";
7
+ /**
8
+ * @internal
9
+ */
10
+ export declare function timeout<TValue>(asyncFn: () => PromiseLike<TValue>, time: TimeSpan): Promise<Result<TValue, TimeoutAsyncError>>;
@@ -22,7 +22,7 @@ export type ICacheAdapter<TType = unknown> = {
22
22
  */
23
23
  update(key: string, value: TType): PromiseLike<boolean>;
24
24
  /**
25
- * The <i>put</i> method replaces a <i>key</i> that exists or adds <i>key</i> that do not exists. Return true if the <i>key</i> where updated otherwise false is returned.
25
+ * The <i>put</i> method replaces a <i>key</i> that exists or adds <i>key</i> that do not exists. Returns true if the <i>key</i> where updated otherwise false is returned.
26
26
  * You can provide a <i>ttl</i> value. If null is passed, the item will not expire.
27
27
  */
28
28
  put(key: string, value: TType, ttl: TimeSpan | null): PromiseLike<boolean>;
@@ -2,15 +2,16 @@
2
2
  * @module Cache
3
3
  */
4
4
  import type { IListenable } from "../../event-bus/contracts/_module";
5
- import type { OneOrMore } from "../../_shared/types";
6
- import { type AsyncLazyable, type GetOrAddValue } from "../../_shared/types";
7
- import type { AllCacheEvents } from "../../cache/contracts/_module";
8
- import type { LazyPromise, TimeSpan } from "../../utilities/_module";
5
+ import type { OneOrMore } from "../../utilities/_module";
6
+ import { type AsyncLazyable, type GetOrAddValue } from "../../utilities/_module";
7
+ import type { CacheEvents } from "../../cache/contracts/_module";
8
+ import type { TimeSpan } from "../../utilities/_module";
9
+ import type { LazyPromise } from "../../async/_module";
9
10
  /**
10
11
  * The <i>ICacheListenable</i> contract defines a way for listening <i>{@link ICache}</i> crud operations.
11
12
  * @group Contracts
12
13
  */
13
- export type ICacheListenable<TType = unknown> = IListenable<AllCacheEvents<TType>>;
14
+ export type ICacheListenable<TType = unknown> = IListenable<CacheEvents<TType>>;
14
15
  /**
15
16
  * @group Contracts
16
17
  */
@@ -29,107 +30,87 @@ export type WithTtlValue<TType> = {
29
30
  export type ICache<TType = unknown> = ICacheListenable & {
30
31
  /**
31
32
  * The <i>exists</i> method returns true when <i>key</i> is found otherwise false will be returned.
32
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
33
33
  */
34
34
  exists(key: string): LazyPromise<boolean>;
35
35
  /**
36
36
  * The <i>existsMany</i> method returns true for the <i>keys</i> that are found otherwise false will be returned.
37
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
38
37
  */
39
38
  existsMany<TKeys extends string>(keys: TKeys[]): LazyPromise<Record<TKeys, boolean>>;
40
39
  /**
41
40
  * The <i>missing</i> method returns true when <i>key</i> is not found otherwise false will be returned.
42
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
43
41
  */
44
42
  missing(key: string): LazyPromise<boolean>;
45
43
  /**
46
44
  * The <i>missingMany</i> method returns true for the <i>keys</i> that are not found otherwise false will be returned.
47
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
48
45
  */
49
46
  missingMany<TKeys extends string>(keys: TKeys[]): LazyPromise<Record<TKeys, boolean>>;
50
47
  /**
51
48
  * The <i>get</i> method returns the value when <i>key</i> is found otherwise null will be returned.
52
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
53
49
  */
54
50
  get(key: string): LazyPromise<TType | null>;
55
51
  /**
56
52
  * The <i>getMany</i> returns the value for the <i>keys</i> that are found otherwise null will be returned.
57
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
58
53
  */
59
54
  getMany<TKeys extends string>(keys: TKeys[]): LazyPromise<Record<TKeys, TType | null>>;
60
55
  /**
61
56
  * The <i>getOr</i> method returns the value when <i>key</i> is found otherwise <i>defaultValue</i> will be returned.
62
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
63
57
  */
64
58
  getOr(key: string, defaultValue: AsyncLazyable<TType>): LazyPromise<TType>;
65
59
  /**
66
60
  * The <i>getOrMany</i> method returns the value for the keys that are found otherwise defaultValue will be returned.
67
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
68
61
  */
69
62
  getOrMany<TKeys extends string>(keysWithDefaults: Record<TKeys, AsyncLazyable<TType>>): LazyPromise<Record<TKeys, TType>>;
70
63
  /**
71
64
  * The <i>getOrFail</i> method returns the value when <i>key</i> is found otherwise an error will be thrown.
72
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
73
65
  * @throws {KeyNotFoundCacheError} {@link KeyNotFoundCacheError}
74
66
  */
75
67
  getOrFail(key: string): LazyPromise<TType>;
76
68
  /**
77
69
  * The <i>add</i> method adds a <i>key</i> with given <i>value</i> when key doesn't exists. Returns true when key doesn't exists otherwise false will be returned.
78
70
  * You can provide a <i>ttl</i> value. If null is passed, the item will not expire.
79
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
80
71
  */
81
72
  add(key: string, value: TType, ttl?: TimeSpan | null): LazyPromise<boolean>;
82
73
  /**
83
74
  * The <i>addMany</i> method adds new keys. Returns true for the keys that where added otherwise false will be returned.
84
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
85
75
  */
86
76
  addMany<TKeys extends string>(values: Record<TKeys, WithTtlValue<TType>>): LazyPromise<Record<TKeys, boolean>>;
87
77
  /**
88
78
  * The <i>update</i> method updates the given <i>key</i> with given <i>value</i>. Returns true when key otherwise false will be returned.
89
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
90
79
  */
91
80
  update(key: string, value: TType): LazyPromise<boolean>;
92
81
  /**
93
82
  * The <i>updateMany</i> method updates the given keys. Returns true for the keys that where updated otherwise false will be returned.
94
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
95
83
  */
96
84
  updateMany<TKeys extends string>(values: Record<TKeys, TType>): LazyPromise<Record<TKeys, boolean>>;
97
85
  /**
98
86
  * The <i>put</i> method replaces the key with given <i>value</i> if found. If the <i>key</i> is not found it will just be added. True is returned if the key is found otherwise false will be returned.
99
87
  * You can provide a <i>ttl</i> value. If null is passed, the item will not expire.
100
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
101
88
  */
102
89
  put(key: string, value: TType, ttl?: TimeSpan | null): LazyPromise<boolean>;
103
90
  /**
104
- * The <i>putMany</i> method replaces the keys that exists. Adds keys that do not exists. Return true for all the keys that where updated otherwise false is returned.
105
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
91
+ * The <i>putMany</i> method replaces the keys that exists. Adds keys that do not exists. Returns true for all the keys that where updated otherwise false is returned.
106
92
  */
107
93
  putMany<TKeys extends string>(values: Record<TKeys, WithTtlValue<TType>>): LazyPromise<Record<TKeys, boolean>>;
108
94
  /**
109
95
  * The <i>remove</i> method removes the given <i>key</i> when found. Returns true if the key is found otherwise false is returned.
110
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
111
96
  */
112
97
  remove(key: string): LazyPromise<boolean>;
113
98
  /**
114
99
  * The <i>removeMany</i> method removes keys. Returns true for the keys that are removed otherwise false is returned.
115
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
116
100
  */
117
101
  removeMany<TKeys extends string>(keys: TKeys[]): LazyPromise<Record<TKeys, boolean>>;
118
102
  /**
119
103
  * The <i>getAndRemove</i> method removes the given <i>key</i> and returns it when found otherwise null will be returned.
120
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
121
104
  */
122
105
  getAndRemove(key: string): LazyPromise<TType | null>;
123
106
  /**
124
107
  * The <i>getOrAdd</i> method will retrieve the given <i>key</i> if found otherwise <i>valueToAdd</i> will be added and returned.
125
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
126
108
  */
127
109
  getOrAdd(key: string, valueToAdd: AsyncLazyable<GetOrAddValue<TType>>, ttl?: TimeSpan | null): LazyPromise<TType>;
128
110
  /**
129
111
  * The <i>increment</i> method will increment the given <i>key</i> if found otherwise nonthing will occur.
130
112
  * Returns true if key is incremented otherwise false will be returned.
131
113
  * An error will thrown if the key is not a number.
132
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
133
114
  * @throws {TypeCacheError} {@link TypeCacheError}
134
115
  */
135
116
  increment(key: string, value?: Extract<TType, number>): LazyPromise<boolean>;
@@ -137,14 +118,12 @@ export type ICache<TType = unknown> = ICacheListenable & {
137
118
  * The <i>decrement</i> method will decrement the given <i>key</i> if found otherwise nonthing will occur.
138
119
  * Returns true if key exists otherwise false will be returned.
139
120
  * An error will thrown if the key is not a number.
140
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
141
121
  * @throws {TypeCacheError} {@link TypeCacheError}
142
122
  * An error will thrown if the key is not a number.
143
123
  */
144
124
  decrement(key: string, value?: Extract<TType, number>): LazyPromise<boolean>;
145
125
  /**
146
126
  * The <i>clear</i> method removes all the keys in the cache.
147
- * @throws {UnexpectedCacheError} {@link UnexpectedCacheError}
148
127
  */
149
128
  clear(): LazyPromise<void>;
150
129
  /**