@daiso-tech/core 0.33.0 → 0.35.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 (365) hide show
  1. package/README.md +66 -45
  2. package/dist/async/_module-exports.d.ts +1 -1
  3. package/dist/async/_module-exports.js +1 -1
  4. package/dist/async/_module-exports.js.map +1 -1
  5. package/dist/async/async.errors.d.ts +27 -19
  6. package/dist/async/async.errors.js +33 -20
  7. package/dist/async/async.errors.js.map +1 -1
  8. package/dist/async/backof-policies/_shared.d.ts +6 -2
  9. package/dist/async/backof-policies/_shared.js +1 -0
  10. package/dist/async/backof-policies/_shared.js.map +1 -1
  11. package/dist/async/backof-policies/constant-backoff-policy/constant-backoff-policy.d.ts +2 -2
  12. package/dist/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js +1 -1
  13. package/dist/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.d.ts +2 -2
  14. package/dist/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js +1 -1
  15. package/dist/async/backof-policies/linear-backoff-policy/linear-backoff-policy.d.ts +2 -2
  16. package/dist/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js +1 -1
  17. package/dist/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.d.ts +2 -2
  18. package/dist/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js +1 -1
  19. package/dist/async/middlewares/_module.d.ts +8 -0
  20. package/dist/async/middlewares/_module.js +9 -0
  21. package/dist/async/middlewares/_module.js.map +1 -0
  22. package/dist/async/middlewares/_shared.d.ts +10 -0
  23. package/dist/async/middlewares/_shared.js +5 -0
  24. package/dist/async/middlewares/_shared.js.map +1 -0
  25. package/dist/async/middlewares/bulkhead/_module.d.ts +1 -0
  26. package/dist/async/middlewares/bulkhead/_module.js +2 -0
  27. package/dist/async/middlewares/bulkhead/_module.js.map +1 -0
  28. package/dist/async/middlewares/bulkhead/bulkhead.middleware.d.ts +80 -0
  29. package/dist/async/middlewares/bulkhead/bulkhead.middleware.js +46 -0
  30. package/dist/async/middlewares/bulkhead/bulkhead.middleware.js.map +1 -0
  31. package/dist/async/middlewares/dynamic/_module.d.ts +1 -0
  32. package/dist/async/middlewares/dynamic/_module.js +2 -0
  33. package/dist/async/middlewares/dynamic/_module.js.map +1 -0
  34. package/dist/async/middlewares/dynamic/dynamic.middleware.d.ts +34 -0
  35. package/dist/async/middlewares/dynamic/dynamic.middleware.js +36 -0
  36. package/dist/async/middlewares/dynamic/dynamic.middleware.js.map +1 -0
  37. package/dist/async/middlewares/fallback/_module.d.ts +1 -0
  38. package/dist/async/middlewares/fallback/_module.js +2 -0
  39. package/dist/async/middlewares/fallback/_module.js.map +1 -0
  40. package/dist/async/middlewares/fallback/fallback.middleware.d.ts +78 -0
  41. package/dist/async/middlewares/fallback/fallback.middleware.js +52 -0
  42. package/dist/async/middlewares/fallback/fallback.middleware.js.map +1 -0
  43. package/dist/async/middlewares/hedging/_module.d.ts +2 -0
  44. package/dist/async/middlewares/hedging/_module.js +3 -0
  45. package/dist/async/middlewares/hedging/_module.js.map +1 -0
  46. package/dist/async/middlewares/hedging/_shared.d.ts +93 -0
  47. package/dist/async/middlewares/hedging/_shared.js +5 -0
  48. package/dist/async/middlewares/hedging/_shared.js.map +1 -0
  49. package/dist/async/middlewares/hedging/concurrent-hedging/_module.d.ts +1 -0
  50. package/dist/async/middlewares/hedging/concurrent-hedging/_module.js +2 -0
  51. package/dist/async/middlewares/hedging/concurrent-hedging/_module.js.map +1 -0
  52. package/dist/async/middlewares/hedging/concurrent-hedging/concurrent-hedging.middleware.d.ts +51 -0
  53. package/dist/async/middlewares/hedging/concurrent-hedging/concurrent-hedging.middleware.js +138 -0
  54. package/dist/async/middlewares/hedging/concurrent-hedging/concurrent-hedging.middleware.js.map +1 -0
  55. package/dist/async/middlewares/hedging/sequential-hedging/_module.d.ts +1 -0
  56. package/dist/async/middlewares/hedging/sequential-hedging/_module.js +2 -0
  57. package/dist/async/middlewares/hedging/sequential-hedging/_module.js.map +1 -0
  58. package/dist/async/middlewares/hedging/sequential-hedging/sequential-hedging.middleware.d.ts +51 -0
  59. package/dist/async/middlewares/hedging/sequential-hedging/sequential-hedging.middleware.js +104 -0
  60. package/dist/async/middlewares/hedging/sequential-hedging/sequential-hedging.middleware.js.map +1 -0
  61. package/dist/async/middlewares/observe/_module.d.ts +1 -0
  62. package/dist/async/middlewares/observe/_module.js +2 -0
  63. package/dist/async/middlewares/observe/_module.js.map +1 -0
  64. package/dist/async/middlewares/observe/observe.middleware.d.ts +130 -0
  65. package/dist/async/middlewares/observe/observe.middleware.js +80 -0
  66. package/dist/async/middlewares/observe/observe.middleware.js.map +1 -0
  67. package/dist/async/middlewares/retry/_module.d.ts +1 -0
  68. package/dist/async/middlewares/retry/_module.js +2 -0
  69. package/dist/async/middlewares/retry/_module.js.map +1 -0
  70. package/dist/async/middlewares/retry/retry.middleware.d.ts +117 -0
  71. package/dist/async/middlewares/retry/retry.middleware.js +82 -0
  72. package/dist/async/middlewares/retry/retry.middleware.js.map +1 -0
  73. package/dist/async/middlewares/timeout/_module.d.ts +1 -0
  74. package/dist/async/middlewares/timeout/_module.js +2 -0
  75. package/dist/async/middlewares/timeout/_module.js.map +1 -0
  76. package/dist/async/middlewares/timeout/timeout.middleware.d.ts +83 -0
  77. package/dist/async/middlewares/timeout/timeout.middleware.js +60 -0
  78. package/dist/async/middlewares/timeout/timeout.middleware.js.map +1 -0
  79. package/dist/async/utilities/_module.d.ts +3 -4
  80. package/dist/async/utilities/_module.js +3 -4
  81. package/dist/async/utilities/_module.js.map +1 -1
  82. package/dist/async/utilities/abort-and-fail/_module.d.ts +1 -0
  83. package/dist/async/utilities/abort-and-fail/_module.js +2 -0
  84. package/dist/async/utilities/abort-and-fail/_module.js.map +1 -0
  85. package/dist/async/utilities/abort-and-fail/abort-and-fail.d.ts +7 -0
  86. package/dist/async/utilities/{abort → abort-and-fail}/abort-and-fail.js +6 -6
  87. package/dist/async/utilities/abort-and-fail/abort-and-fail.js.map +1 -0
  88. package/dist/async/utilities/lazy-promise/lazy-promise.d.ts +37 -194
  89. package/dist/async/utilities/lazy-promise/lazy-promise.js +62 -359
  90. package/dist/async/utilities/lazy-promise/lazy-promise.js.map +1 -1
  91. package/dist/async/utilities/promise-queue/_module.d.ts +1 -0
  92. package/dist/async/utilities/promise-queue/_module.js +2 -0
  93. package/dist/async/utilities/promise-queue/_module.js.map +1 -0
  94. package/dist/async/utilities/promise-queue/promise-queue.d.ts +32 -0
  95. package/dist/async/utilities/promise-queue/promise-queue.js +107 -0
  96. package/dist/async/utilities/promise-queue/promise-queue.js.map +1 -0
  97. package/dist/async/utilities/timeout-and-fail/_module.d.ts +1 -0
  98. package/dist/async/utilities/timeout-and-fail/_module.js +2 -0
  99. package/dist/async/utilities/timeout-and-fail/_module.js.map +1 -0
  100. package/dist/async/utilities/timeout-and-fail/timeout-and-fail.d.ts +7 -0
  101. package/dist/async/utilities/timeout-and-fail/timeout-and-fail.js +19 -0
  102. package/dist/async/utilities/timeout-and-fail/timeout-and-fail.js.map +1 -0
  103. package/dist/cache/contracts/cache-adapter.contract.d.ts +14 -14
  104. package/dist/cache/contracts/cache-factory.contract.d.ts +3 -3
  105. package/dist/cache/contracts/cache.contract.d.ts +73 -73
  106. package/dist/cache/contracts/cache.errors.d.ts +7 -7
  107. package/dist/cache/contracts/cache.errors.js +7 -7
  108. package/dist/cache/contracts/cache.events.d.ts +54 -58
  109. package/dist/cache/contracts/cache.events.js +6 -104
  110. package/dist/cache/contracts/cache.events.js.map +1 -1
  111. package/dist/cache/contracts/database-cache-adapter.contract.d.ts +16 -16
  112. package/dist/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.d.ts +3 -3
  113. package/dist/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js +2 -2
  114. package/dist/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.d.ts +3 -9
  115. package/dist/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.js +3 -9
  116. package/dist/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.js.map +1 -1
  117. package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.d.ts +4 -4
  118. package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js +3 -3
  119. package/dist/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.d.ts +2 -2
  120. package/dist/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js +2 -2
  121. package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.d.ts +3 -3
  122. package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js +2 -2
  123. package/dist/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.d.ts +3 -3
  124. package/dist/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js +2 -2
  125. package/dist/cache/implementations/derivables/cache/cache.d.ts +26 -27
  126. package/dist/cache/implementations/derivables/cache/cache.js +102 -91
  127. package/dist/cache/implementations/derivables/cache/cache.js.map +1 -1
  128. package/dist/cache/implementations/derivables/cache-factory/cache-factory.d.ts +5 -4
  129. package/dist/cache/implementations/derivables/cache-factory/cache-factory.js +2 -1
  130. package/dist/cache/implementations/derivables/cache-factory/cache-factory.js.map +1 -1
  131. package/dist/cache/implementations/test-utilities/cache-adapter.test-suite.d.ts +3 -3
  132. package/dist/cache/implementations/test-utilities/cache-adapter.test-suite.js +2 -2
  133. package/dist/cache/implementations/test-utilities/cache.test-suite.d.ts +3 -3
  134. package/dist/cache/implementations/test-utilities/cache.test-suite.js +140 -149
  135. package/dist/cache/implementations/test-utilities/cache.test-suite.js.map +1 -1
  136. package/dist/cache/implementations/test-utilities/database-cache-dapter.test-suite.d.ts +3 -3
  137. package/dist/cache/implementations/test-utilities/database-cache-dapter.test-suite.js +2 -2
  138. package/dist/collection/contracts/_shared/compartor.type.d.ts +1 -1
  139. package/dist/collection/contracts/_shared/cross-join-result.type.d.ts +1 -1
  140. package/dist/collection/contracts/_shared/ensure-map.type.d.ts +1 -1
  141. package/dist/collection/contracts/_shared/ensure-record.type.d.ts +1 -1
  142. package/dist/collection/contracts/_shared/foreach.type.d.ts +2 -2
  143. package/dist/collection/contracts/_shared/map.type.d.ts +2 -2
  144. package/dist/collection/contracts/_shared/modifier.type.d.ts +2 -2
  145. package/dist/collection/contracts/_shared/predicate.type.d.ts +7 -7
  146. package/dist/collection/contracts/_shared/reduce.type.d.ts +2 -2
  147. package/dist/collection/contracts/_shared/tap.type.d.ts +2 -2
  148. package/dist/collection/contracts/_shared/transform.type.d.ts +2 -2
  149. package/dist/collection/contracts/async-collection.contract.d.ts +109 -198
  150. package/dist/collection/contracts/collection.contract.d.ts +103 -103
  151. package/dist/collection/contracts/collection.errors.d.ts +11 -11
  152. package/dist/collection/contracts/collection.errors.js +11 -11
  153. package/dist/collection/implementations/_shared.d.ts +8 -8
  154. package/dist/collection/implementations/_shared.js +8 -8
  155. package/dist/collection/implementations/async-iterable-collection/_shared/_module.d.ts +0 -4
  156. package/dist/collection/implementations/async-iterable-collection/_shared/_module.js +0 -4
  157. package/dist/collection/implementations/async-iterable-collection/_shared/_module.js.map +1 -1
  158. package/dist/collection/implementations/async-iterable-collection/_shared/async-cross-join-iterable.js +21 -19
  159. package/dist/collection/implementations/async-iterable-collection/_shared/async-cross-join-iterable.js.map +1 -1
  160. package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.d.ts +15 -19
  161. package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js +15 -30
  162. package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
  163. package/dist/collection/implementations/iterable-collection/_shared/cross-join-iterable.d.ts +3 -3
  164. package/dist/collection/implementations/iterable-collection/_shared/cross-join-iterable.js +18 -20
  165. package/dist/collection/implementations/iterable-collection/_shared/cross-join-iterable.js.map +1 -1
  166. package/dist/collection/implementations/iterable-collection/iterable-collection.d.ts +11 -12
  167. package/dist/collection/implementations/iterable-collection/iterable-collection.js +11 -12
  168. package/dist/collection/implementations/iterable-collection/iterable-collection.js.map +1 -1
  169. package/dist/collection/implementations/list-collection/list-collection.d.ts +11 -11
  170. package/dist/collection/implementations/list-collection/list-collection.js +24 -30
  171. package/dist/collection/implementations/list-collection/list-collection.js.map +1 -1
  172. package/dist/event-bus/contracts/_module-exports.d.ts +0 -1
  173. package/dist/event-bus/contracts/_module-exports.js +0 -1
  174. package/dist/event-bus/contracts/_module-exports.js.map +1 -1
  175. package/dist/event-bus/contracts/event-bus-adapter.contract.d.ts +13 -8
  176. package/dist/event-bus/contracts/event-bus-factory.contract.d.ts +6 -7
  177. package/dist/event-bus/contracts/event-bus-factory.contract.js.map +1 -1
  178. package/dist/event-bus/contracts/event-bus.contract.d.ts +30 -41
  179. package/dist/event-bus/contracts/event-bus.errors.d.ts +8 -8
  180. package/dist/event-bus/contracts/event-bus.errors.js +8 -8
  181. package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.d.ts +3 -3
  182. package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js +3 -3
  183. package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.d.ts +2 -2
  184. package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.js +2 -2
  185. package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.d.ts +3 -3
  186. package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js +2 -2
  187. package/dist/event-bus/implementations/derivables/event-bus/event-bus.d.ts +15 -15
  188. package/dist/event-bus/implementations/derivables/event-bus/event-bus.js +32 -32
  189. package/dist/event-bus/implementations/derivables/event-bus/event-bus.js.map +1 -1
  190. package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.d.ts +17 -10
  191. package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.js +13 -6
  192. package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.js.map +1 -1
  193. package/dist/event-bus/implementations/test-utilities/event-bus-adapter.test-suite.d.ts +3 -5
  194. package/dist/event-bus/implementations/test-utilities/event-bus-adapter.test-suite.js +15 -22
  195. package/dist/event-bus/implementations/test-utilities/event-bus-adapter.test-suite.js.map +1 -1
  196. package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.d.ts +3 -5
  197. package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.js +189 -209
  198. package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.js.map +1 -1
  199. package/dist/lock/contracts/database-lock-adapter.contract.d.ts +9 -9
  200. package/dist/lock/contracts/lock-adapter.contract.d.ts +7 -7
  201. package/dist/lock/contracts/lock-provider-factory.contract.d.ts +4 -4
  202. package/dist/lock/contracts/lock-provider.contract.d.ts +14 -14
  203. package/dist/lock/contracts/lock.contract.d.ts +22 -22
  204. package/dist/lock/contracts/lock.errors.d.ts +10 -10
  205. package/dist/lock/contracts/lock.errors.js +10 -10
  206. package/dist/lock/contracts/lock.events.d.ts +45 -54
  207. package/dist/lock/contracts/lock.events.js +9 -91
  208. package/dist/lock/contracts/lock.events.js.map +1 -1
  209. package/dist/lock/implementations/adapters/libsql-lock-adapter/libsql-lock-adapter.d.ts +5 -5
  210. package/dist/lock/implementations/adapters/libsql-lock-adapter/libsql-lock-adapter.js +4 -4
  211. package/dist/lock/implementations/adapters/memory-lock-adapter/memory-lock-adapter.d.ts +3 -3
  212. package/dist/lock/implementations/adapters/memory-lock-adapter/memory-lock-adapter.js +3 -3
  213. package/dist/lock/implementations/adapters/mongodb-lock-adapter/mongodb-lock-adapter.d.ts +5 -5
  214. package/dist/lock/implementations/adapters/mongodb-lock-adapter/mongodb-lock-adapter.js +4 -4
  215. package/dist/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.d.ts +2 -2
  216. package/dist/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.js +2 -2
  217. package/dist/lock/implementations/adapters/redis-lock-adapter/redis-lock-adapter.d.ts +3 -3
  218. package/dist/lock/implementations/adapters/redis-lock-adapter/redis-lock-adapter.js +3 -3
  219. package/dist/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.d.ts +5 -5
  220. package/dist/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.js +4 -4
  221. package/dist/lock/implementations/derivables/lock-provider/lock-provider.d.ts +33 -33
  222. package/dist/lock/implementations/derivables/lock-provider/lock-provider.js +30 -30
  223. package/dist/lock/implementations/derivables/lock-provider/lock-provider.js.map +1 -1
  224. package/dist/lock/implementations/derivables/lock-provider/lock-serde-transformer.d.ts +2 -2
  225. package/dist/lock/implementations/derivables/lock-provider/lock-serde-transformer.js.map +1 -1
  226. package/dist/lock/implementations/derivables/lock-provider/lock.d.ts +3 -3
  227. package/dist/lock/implementations/derivables/lock-provider/lock.js +77 -58
  228. package/dist/lock/implementations/derivables/lock-provider/lock.js.map +1 -1
  229. package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.d.ts +5 -4
  230. package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.js +2 -1
  231. package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.js.map +1 -1
  232. package/dist/lock/implementations/test-utilities/database-lock-adapter.test-suite.d.ts +3 -3
  233. package/dist/lock/implementations/test-utilities/database-lock-adapter.test-suite.js +2 -2
  234. package/dist/lock/implementations/test-utilities/lock-adapter.test-suite.d.ts +3 -3
  235. package/dist/lock/implementations/test-utilities/lock-adapter.test-suite.js +2 -2
  236. package/dist/lock/implementations/test-utilities/lock-provider.test-suite.d.ts +3 -3
  237. package/dist/lock/implementations/test-utilities/lock-provider.test-suite.js +214 -214
  238. package/dist/lock/implementations/test-utilities/lock-provider.test-suite.js.map +1 -1
  239. package/dist/serde/contracts/deserializer.contract.d.ts +2 -2
  240. package/dist/serde/contracts/flexible-serde-adapter.contract.d.ts +4 -4
  241. package/dist/serde/contracts/flexible-serde.contract.d.ts +8 -19
  242. package/dist/serde/contracts/serde.contract.d.ts +2 -2
  243. package/dist/serde/contracts/serde.errors.d.ts +4 -4
  244. package/dist/serde/contracts/serde.errors.js +4 -4
  245. package/dist/serde/contracts/serializable.contract.d.ts +2 -2
  246. package/dist/serde/contracts/serializer.contract.d.ts +2 -2
  247. package/dist/serde/implementations/adapters/no-op-serde-adapter/no-op-serde-adapter.d.ts +2 -2
  248. package/dist/serde/implementations/adapters/no-op-serde-adapter/no-op-serde-adapter.js +2 -2
  249. package/dist/serde/implementations/adapters/super-json-serde-adapter/super-json-serde-adapter.d.ts +1 -1
  250. package/dist/serde/implementations/adapters/super-json-serde-adapter/super-json-serde-adapter.js +1 -1
  251. package/dist/serde/implementations/derivables/serde.d.ts +4 -35
  252. package/dist/serde/implementations/derivables/serde.js +2 -47
  253. package/dist/serde/implementations/derivables/serde.js.map +1 -1
  254. package/dist/serde/implementations/test-utilities/flexible-serde-adapter.test-suite.d.ts +3 -3
  255. package/dist/serde/implementations/test-utilities/flexible-serde-adapter.test-suite.js +2 -2
  256. package/dist/serde/implementations/test-utilities/flexible-serde.test-suite.d.ts +3 -3
  257. package/dist/serde/implementations/test-utilities/flexible-serde.test-suite.js +2 -2
  258. package/dist/utilities/classes/_module.d.ts +1 -1
  259. package/dist/utilities/classes/_module.js +1 -1
  260. package/dist/utilities/classes/_module.js.map +1 -1
  261. package/dist/utilities/classes/hooks/_module.d.ts +3 -0
  262. package/dist/utilities/classes/hooks/_module.js +4 -0
  263. package/dist/utilities/classes/hooks/_module.js.map +1 -0
  264. package/dist/utilities/classes/hooks/async-hooks.d.ts +209 -0
  265. package/dist/utilities/classes/hooks/async-hooks.js +145 -0
  266. package/dist/utilities/classes/hooks/async-hooks.js.map +1 -0
  267. package/dist/utilities/classes/hooks/hooks.d.ts +139 -0
  268. package/dist/utilities/classes/hooks/hooks.js +116 -0
  269. package/dist/utilities/classes/hooks/hooks.js.map +1 -0
  270. package/dist/utilities/classes/hooks/types.d.ts +9 -0
  271. package/dist/utilities/classes/hooks/types.js +5 -0
  272. package/dist/utilities/classes/hooks/types.js.map +1 -0
  273. package/dist/utilities/classes/key-prefixer/key-prefixer.d.ts +3 -3
  274. package/dist/utilities/classes/key-prefixer/key-prefixer.js +4 -4
  275. package/dist/utilities/classes/key-prefixer/key-prefixer.js.map +1 -1
  276. package/dist/utilities/classes/time-span/time-span.d.ts +5 -5
  277. package/dist/utilities/classes/time-span/time-span.js +5 -5
  278. package/dist/utilities/contracts/_module.d.ts +0 -1
  279. package/dist/utilities/contracts/_module.js +0 -1
  280. package/dist/utilities/contracts/_module.js.map +1 -1
  281. package/dist/utilities/contracts/deinitizable.contract.d.ts +1 -1
  282. package/dist/utilities/contracts/initizable.contract.d.ts +1 -1
  283. package/dist/utilities/contracts/prunable.contract.d.ts +1 -1
  284. package/dist/utilities/contracts/serialized-error.contract.d.ts +1 -1
  285. package/dist/utilities/contracts/sqlite-database.contract.d.ts +2 -2
  286. package/dist/utilities/errors.d.ts +5 -5
  287. package/dist/utilities/errors.js +5 -5
  288. package/dist/utilities/functions/factory.js +3 -3
  289. package/dist/utilities/functions/factory.js.map +1 -1
  290. package/dist/utilities/functions/invokable.d.ts +9 -5
  291. package/dist/utilities/functions/invokable.js +12 -2
  292. package/dist/utilities/functions/invokable.js.map +1 -1
  293. package/dist/utilities/functions/lazy.d.ts +5 -0
  294. package/dist/utilities/functions/lazy.js +12 -3
  295. package/dist/utilities/functions/lazy.js.map +1 -1
  296. package/dist/utilities/types/async-iterable-value.type.d.ts +1 -1
  297. package/dist/utilities/types/at-least-one.type.d.ts +1 -1
  298. package/dist/utilities/types/factory.type.d.ts +8 -8
  299. package/dist/utilities/types/invokable.type.d.ts +3 -3
  300. package/dist/utilities/types/items.type.d.ts +1 -1
  301. package/dist/utilities/types/lazy.type.d.ts +5 -5
  302. package/dist/utilities/types/none-func.type.d.ts +1 -1
  303. package/dist/utilities/types/one-or-more.type.d.ts +1 -1
  304. package/dist/utilities/types/promiseable.type.d.ts +1 -1
  305. package/dist/utilities/types/result.type.d.ts +1 -1
  306. package/package.json +22 -2
  307. package/dist/async/async.events.d.ts +0 -105
  308. package/dist/async/async.events.js +0 -82
  309. package/dist/async/async.events.js.map +0 -1
  310. package/dist/async/utilities/abort/_module.d.ts +0 -2
  311. package/dist/async/utilities/abort/_module.js +0 -3
  312. package/dist/async/utilities/abort/_module.js.map +0 -1
  313. package/dist/async/utilities/abort/abort-and-fail.d.ts +0 -4
  314. package/dist/async/utilities/abort/abort-and-fail.js.map +0 -1
  315. package/dist/async/utilities/abort/abort.d.ts +0 -9
  316. package/dist/async/utilities/abort/abort.js +0 -18
  317. package/dist/async/utilities/abort/abort.js.map +0 -1
  318. package/dist/async/utilities/delay/_module.d.ts +0 -1
  319. package/dist/async/utilities/delay/_module.js +0 -2
  320. package/dist/async/utilities/delay/_module.js.map +0 -1
  321. package/dist/async/utilities/delay/delay.d.ts +0 -10
  322. package/dist/async/utilities/delay/delay.js +0 -34
  323. package/dist/async/utilities/delay/delay.js.map +0 -1
  324. package/dist/async/utilities/retry/_module.d.ts +0 -2
  325. package/dist/async/utilities/retry/_module.js +0 -3
  326. package/dist/async/utilities/retry/_module.js.map +0 -1
  327. package/dist/async/utilities/retry/retry-or-fail.d.ts +0 -29
  328. package/dist/async/utilities/retry/retry-or-fail.js +0 -39
  329. package/dist/async/utilities/retry/retry-or-fail.js.map +0 -1
  330. package/dist/async/utilities/retry/retry.d.ts +0 -10
  331. package/dist/async/utilities/retry/retry.js +0 -21
  332. package/dist/async/utilities/retry/retry.js.map +0 -1
  333. package/dist/async/utilities/timeout/_module.d.ts +0 -2
  334. package/dist/async/utilities/timeout/_module.js +0 -3
  335. package/dist/async/utilities/timeout/_module.js.map +0 -1
  336. package/dist/async/utilities/timeout/timeout-and-fail.d.ts +0 -5
  337. package/dist/async/utilities/timeout/timeout-and-fail.js +0 -28
  338. package/dist/async/utilities/timeout/timeout-and-fail.js.map +0 -1
  339. package/dist/async/utilities/timeout/timeout.d.ts +0 -10
  340. package/dist/async/utilities/timeout/timeout.js +0 -21
  341. package/dist/async/utilities/timeout/timeout.js.map +0 -1
  342. package/dist/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.d.ts +0 -13
  343. package/dist/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js +0 -30
  344. package/dist/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js.map +0 -1
  345. package/dist/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.d.ts +0 -13
  346. package/dist/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js +0 -36
  347. package/dist/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js.map +0 -1
  348. package/dist/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.d.ts +0 -9
  349. package/dist/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js +0 -39
  350. package/dist/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js.map +0 -1
  351. package/dist/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.d.ts +0 -13
  352. package/dist/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js +0 -52
  353. package/dist/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js.map +0 -1
  354. package/dist/event-bus/contracts/_shared.d.ts +0 -12
  355. package/dist/event-bus/contracts/_shared.js +0 -15
  356. package/dist/event-bus/contracts/_shared.js.map +0 -1
  357. package/dist/utilities/classes/sync-event-bus/_module.d.ts +0 -1
  358. package/dist/utilities/classes/sync-event-bus/_module.js +0 -2
  359. package/dist/utilities/classes/sync-event-bus/_module.js.map +0 -1
  360. package/dist/utilities/classes/sync-event-bus/sync-event-bus.d.ts +0 -16
  361. package/dist/utilities/classes/sync-event-bus/sync-event-bus.js +0 -53
  362. package/dist/utilities/classes/sync-event-bus/sync-event-bus.js.map +0 -1
  363. package/dist/utilities/contracts/sync-event-bus-listenable.d.ts +0 -13
  364. package/dist/utilities/contracts/sync-event-bus-listenable.js +0 -5
  365. package/dist/utilities/contracts/sync-event-bus-listenable.js.map +0 -1
@@ -0,0 +1,139 @@
1
+ /**
2
+ * @module Utilities
3
+ */
4
+ import { type IInvokableObject, type Invokable, type InvokableFn, type OneOrMore } from "../../../utilities/_module-exports.js";
5
+ import type { HookContext } from "../../../utilities/classes/hooks/types.js";
6
+ /**
7
+ *
8
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
9
+ * @group Hooks
10
+ */
11
+ export type NextFunc<TParameters extends unknown[] = unknown[], TReturn = unknown> = InvokableFn<TParameters, TReturn>;
12
+ /**
13
+ *
14
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
15
+ * @group Hooks
16
+ */
17
+ export type Context<TContext extends HookContext = HookContext> = {
18
+ name: string;
19
+ context: TContext;
20
+ };
21
+ /**
22
+ *
23
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
24
+ * @group Hooks
25
+ */
26
+ export type MiddlewareFn<TParameters extends unknown[] = unknown[], TReturn = unknown, TContext extends HookContext = HookContext> = InvokableFn<[
27
+ arguments_: TParameters,
28
+ next: NextFunc<TParameters, TReturn>,
29
+ settings: Context<TContext>
30
+ ], TReturn>;
31
+ /**
32
+ *
33
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
34
+ * @group Hooks
35
+ */
36
+ export type IMiddlewareObject<TParameters extends unknown[] = unknown[], TReturn = unknown, TContext extends HookContext = HookContext> = IInvokableObject<[
37
+ arguments_: TParameters,
38
+ next: NextFunc<TParameters, TReturn>,
39
+ settings: Context<TContext>
40
+ ], TReturn>;
41
+ /**
42
+ *
43
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
44
+ * @group Hooks
45
+ */
46
+ export type Middleware<TParameters extends unknown[] = unknown[], TReturn = unknown, TContext extends HookContext = HookContext> = IMiddlewareObject<TParameters, TReturn, TContext> | MiddlewareFn<TParameters, TReturn, TContext>;
47
+ /**
48
+ *
49
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
50
+ * @group Hooks
51
+ */
52
+ export type HooksSettings<TContext extends HookContext = HookContext> = {
53
+ /**
54
+ * The name of the function which can be used for logging inside the middleware.
55
+ * By default, it takes the function or method name. If an anonymous function is provided, the name defaults to "func".
56
+ */
57
+ name?: string;
58
+ /**
59
+ * You can provide addtional context that can be used in the middleware.
60
+ */
61
+ context?: TContext;
62
+ };
63
+ /**
64
+ * The `Hooks` class provides a convenient way to change and inspect arguments and return value of both only sync functions.
65
+ * For example `Hooks` class can be used to log function arguments and return values. Note this class will always return promise and is immutable.
66
+ *
67
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
68
+ * @group Hooks
69
+ */
70
+ export declare class Hooks<TParameters extends unknown[] = unknown[], TReturn = unknown, TContext extends HookContext = HookContext> implements IInvokableObject<TParameters, TReturn> {
71
+ private readonly invokable;
72
+ private readonly middlewares;
73
+ private readonly settings;
74
+ private static init;
75
+ private readonly func;
76
+ /**
77
+ * @example
78
+ * ```ts
79
+ * import { Hooks, type MiddlewareFn } from "@daiso-tech/core/utilities";
80
+ *
81
+ * function log<TParameters extends unknown[], TReturn>(): MiddlewareFn<TParameters, TReturn, { funcName: string; }> {
82
+ * return (args, next, { name: funcName }) => {
83
+ * console.log("FUNCTION_NAME:", funcName);
84
+ * console.log("ARGUMENTS:", args);
85
+ * const value = next(...args);
86
+ * console.log("RETURN:", value);
87
+ * return value;
88
+ * }
89
+ * }
90
+ *
91
+ * function time<TParameters extends unknown[], TReturn>(): MiddlewareFn<TParameters, TReturn> {
92
+ * return (args, next) => {
93
+ * const start = performance.now();
94
+ * const value = next(...args);
95
+ * const end = performance.now();
96
+ * const time = end - start;
97
+ * console.log("TIME:", `${String(time)}ms`);
98
+ * return value;
99
+ * }
100
+ * }
101
+ *
102
+ * function add(a: number, b: number): number {
103
+ * return a + b;
104
+ * }
105
+ *
106
+ * const enhancedAdd = new Hooks(add, [
107
+ * log(),
108
+ * time()
109
+ * ], {
110
+ * // You can provide addtional data to be used the middleware.
111
+ * context: {},
112
+ * });
113
+ *
114
+ * // Will log the function name, arguments and return value.
115
+ * // Will also log the execution time.
116
+ * const result = enhancedAdd.invoke(1, 2);
117
+ *
118
+ * // Will be 3.
119
+ * console.log(result);
120
+ * ```
121
+ */
122
+ constructor(invokable: Invokable<TParameters, TReturn>, middlewares: NoInfer<OneOrMore<Middleware<TParameters, TReturn, TContext>>>, settings?: HooksSettings<TContext>);
123
+ /**
124
+ * The `pipe` method returns a new `Hooks` instance with the additional `middlewares` applied.
125
+ */
126
+ pipe(middlewares: OneOrMore<Middleware<TParameters, TReturn, TContext>>): Hooks<TParameters, TReturn, TContext>;
127
+ /**
128
+ * The `pipeWhen` method conditionally applies additional `middlewares`, returning a new `Hooks` instance only if the specified condition is met.
129
+ */
130
+ pipeWhen(condition: boolean, middlewares: OneOrMore<Middleware<TParameters, TReturn, TContext>>): Hooks<TParameters, TReturn, TContext>;
131
+ /**
132
+ * The `toFunc` will return the function with all middlewares applied.
133
+ */
134
+ toFunc(): InvokableFn<TParameters, TReturn>;
135
+ /**
136
+ * The `invoke` method executes the constructor's input function, applying all middlewares.
137
+ */
138
+ invoke(...arguments_: TParameters): TReturn;
139
+ }
@@ -0,0 +1,116 @@
1
+ /**
2
+ * @module Utilities
3
+ */
4
+ import { getInvokableName, resolveInvokable, resolveOneOrMore, } from "../../../utilities/_module-exports.js";
5
+ /**
6
+ * The `Hooks` class provides a convenient way to change and inspect arguments and return value of both only sync functions.
7
+ * For example `Hooks` class can be used to log function arguments and return values. Note this class will always return promise and is immutable.
8
+ *
9
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
10
+ * @group Hooks
11
+ */
12
+ export class Hooks {
13
+ invokable;
14
+ middlewares;
15
+ settings;
16
+ static init(invokable, middlewares, { name = getInvokableName(invokable), context = {}, }) {
17
+ let func = resolveInvokable(invokable);
18
+ for (const hook of resolveOneOrMore(middlewares)
19
+ .map(resolveInvokable)
20
+ .reverse()) {
21
+ const prevFunc = func;
22
+ const next = (...arguments_) => prevFunc(...arguments_);
23
+ func = (...arguments_) => {
24
+ return hook(arguments_, next, {
25
+ name,
26
+ context,
27
+ });
28
+ };
29
+ }
30
+ return func;
31
+ }
32
+ func;
33
+ /**
34
+ * @example
35
+ * ```ts
36
+ * import { Hooks, type MiddlewareFn } from "@daiso-tech/core/utilities";
37
+ *
38
+ * function log<TParameters extends unknown[], TReturn>(): MiddlewareFn<TParameters, TReturn, { funcName: string; }> {
39
+ * return (args, next, { name: funcName }) => {
40
+ * console.log("FUNCTION_NAME:", funcName);
41
+ * console.log("ARGUMENTS:", args);
42
+ * const value = next(...args);
43
+ * console.log("RETURN:", value);
44
+ * return value;
45
+ * }
46
+ * }
47
+ *
48
+ * function time<TParameters extends unknown[], TReturn>(): MiddlewareFn<TParameters, TReturn> {
49
+ * return (args, next) => {
50
+ * const start = performance.now();
51
+ * const value = next(...args);
52
+ * const end = performance.now();
53
+ * const time = end - start;
54
+ * console.log("TIME:", `${String(time)}ms`);
55
+ * return value;
56
+ * }
57
+ * }
58
+ *
59
+ * function add(a: number, b: number): number {
60
+ * return a + b;
61
+ * }
62
+ *
63
+ * const enhancedAdd = new Hooks(add, [
64
+ * log(),
65
+ * time()
66
+ * ], {
67
+ * // You can provide addtional data to be used the middleware.
68
+ * context: {},
69
+ * });
70
+ *
71
+ * // Will log the function name, arguments and return value.
72
+ * // Will also log the execution time.
73
+ * const result = enhancedAdd.invoke(1, 2);
74
+ *
75
+ * // Will be 3.
76
+ * console.log(result);
77
+ * ```
78
+ */
79
+ constructor(invokable, middlewares, settings = {}) {
80
+ this.invokable = invokable;
81
+ this.middlewares = middlewares;
82
+ this.settings = settings;
83
+ this.func = Hooks.init(invokable, middlewares, this.settings);
84
+ }
85
+ /**
86
+ * The `pipe` method returns a new `Hooks` instance with the additional `middlewares` applied.
87
+ */
88
+ pipe(middlewares) {
89
+ return new Hooks(this.invokable, [
90
+ ...resolveOneOrMore(this.middlewares),
91
+ ...resolveOneOrMore(middlewares),
92
+ ], this.settings);
93
+ }
94
+ /**
95
+ * The `pipeWhen` method conditionally applies additional `middlewares`, returning a new `Hooks` instance only if the specified condition is met.
96
+ */
97
+ pipeWhen(condition, middlewares) {
98
+ if (condition) {
99
+ return this.pipe(middlewares);
100
+ }
101
+ return this;
102
+ }
103
+ /**
104
+ * The `toFunc` will return the function with all middlewares applied.
105
+ */
106
+ toFunc() {
107
+ return (...args) => this.invoke(...args);
108
+ }
109
+ /**
110
+ * The `invoke` method executes the constructor's input function, applying all middlewares.
111
+ */
112
+ invoke(...arguments_) {
113
+ return this.func(...arguments_);
114
+ }
115
+ }
116
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../src/utilities/classes/hooks/hooks.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAKnB,MAAM,gCAAgC,CAAC;AA0FxC;;;;;;GAMG;AACH,MAAM,OAAO,KAAK;IAoFO;IACA;IAGA;IAlFb,MAAM,CAAC,IAAI,CAKf,SAA0C,EAC1C,WAAkE,EAClE,EACI,IAAI,GAAG,gBAAgB,CAAC,SAAS,CAAC,EAClC,OAAO,GAAG,EAAc,GACF;QAE1B,IAAI,IAAI,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;QACvC,KAAK,MAAM,IAAI,IAAI,gBAAgB,CAAC,WAAW,CAAC;aAC3C,GAAG,CAAC,gBAAgB,CAAC;aACrB,OAAO,EAAE,EAAE,CAAC;YACb,MAAM,QAAQ,GAAG,IAAI,CAAC;YACtB,MAAM,IAAI,GAAG,CAAC,GAAG,UAAuB,EAAE,EAAE,CACxC,QAAQ,CAAC,GAAG,UAAU,CAAC,CAAC;YAC5B,IAAI,GAAG,CAAC,GAAG,UAAuB,EAAE,EAAE;gBAClC,OAAO,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE;oBAC1B,IAAI;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@group Hooks
8
+ */
9
+ export type HookContext = Partial<Record<string | symbol, unknown>>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @module Utilities
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/utilities/classes/hooks/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -13,7 +13,7 @@ type KeySettings = {
13
13
  };
14
14
  /**
15
15
  *
16
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
16
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
17
17
  * @group KeyPrefixer
18
18
  */
19
19
  export declare class Key {
@@ -32,7 +32,7 @@ export declare class Key {
32
32
  }
33
33
  /**
34
34
  *
35
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
35
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
36
36
  * @group KeyPrefixer
37
37
  */
38
38
  export type KeyPrefixerSettings = {
@@ -44,7 +44,7 @@ export type KeyPrefixerSettings = {
44
44
  };
45
45
  /**
46
46
  *
47
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
47
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
48
48
  * @group KeyPrefixer
49
49
  */
50
50
  export declare class KeyPrefixer {
@@ -4,7 +4,7 @@
4
4
  import { resolveOneOrMoreStr } from "../../../utilities/_module-exports.js";
5
5
  /**
6
6
  *
7
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
7
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
8
8
  * @group KeyPrefixer
9
9
  */
10
10
  export class Key {
@@ -38,7 +38,7 @@ export class Key {
38
38
  }
39
39
  /**
40
40
  *
41
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
41
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
42
42
  * @group KeyPrefixer
43
43
  */
44
44
  export class KeyPrefixer {
@@ -65,10 +65,10 @@ export class KeyPrefixer {
65
65
  validate(key) {
66
66
  const resolvedKey = resolveOneOrMoreStr(key);
67
67
  if (resolvedKey.includes(this.rootIdentifier)) {
68
- throw new Error("!!__MESSAGE__!!");
68
+ throw new Error(`Resolved key "${resolvedKey}" cannot not include "${this.rootIdentifier}"`);
69
69
  }
70
70
  if (resolvedKey.includes(this.keyIdentifier)) {
71
- throw new Error("!!__MESSAGE__!!");
71
+ throw new Error(`Resolved key "${resolvedKey}" cannot not include "${this.keyIdentifier}"`);
72
72
  }
73
73
  }
74
74
  getKeyPrefixArray() {
@@ -1 +1 @@
1
- {"version":3,"file":"key-prefixer.js","sourceRoot":"","sources":["../../../../src/utilities/classes/key-prefixer/key-prefixer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAatE;;;;GAIG;AACH,MAAM,OAAO,GAAG;IACK,SAAS,CAAqB;IAC9B,GAAG,CAAoB;IACvB,mBAAmB,CAAS;IAC5B,YAAY,CAAS;IAEtC;;;OAGG;IACH,YAAY,QAAqB;QAC7B,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,mBAAmB,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC;QACvE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,mBAAmB,CACtB;YACI,GAAG,IAAI,CAAC,SAAS;YACjB,mBAAmB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC;SACn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I,CAAC,YAAY,CAAC;YACxD,IAAI,CAAC,cAAc;SACtB,CAAC;IACN,CAAC;IAED,IAAI,SAAS;QACT,OAAO,mBAAmB,CACtB,IAAI,CAAC,iBAAiB,EAAE,EACxB,IAAI,CAAC,mBAAmB,CAC3B,CAAC;IACN,CAAC;IAED,MAAM,CAAC,GAAsB;QACzB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,IAAI,GAAG,CAAC;YACX,GAAG;YACH,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE;SACtC,CAAC,CAAC;IACP,CAAC;CACJ"}
1
+ {"version":3,"file":"key-prefixer.js","sourceRoot":"","sources":["../../../../src/utilities/classes/key-prefixer/key-prefixer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAatE;;;;GAIG;AACH,MAAM,OAAO,GAAG;IACK,SAAS,CAAqB;IAC9B,GAAG,CAAoB;IACvB,mBAAmB,CAAS;IAC5B,YAAY,CAAS;IAEtC;;;OAGG;IACH,YAAY,QAAqB;QAC7B,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,mBAAmB,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC;QACvE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,mBAAm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AC3C,MAAM,IAAI,KAAK,CACX,iBAAiB,WAAW,yBAAyB,IAAI,CAAC,aAAa,GAAG,CAC7E,CAAC;QACN,CAAC;IACL,CAAC;IAEO,iBAAiB;QACrB,OAAO;YACH,mBAAmB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC;YACxD,IAAI,CAAC,cAAc;SACtB,CAAC;IACN,CAAC;IAED,IAAI,SAAS;QACT,OAAO,mBAAmB,CACtB,IAAI,CAAC,iBAAiB,EAAE,EACxB,IAAI,CAAC,mBAAmB,CAC3B,CAAC;IACN,CAAC;IAED,MAAM,CAAC,GAAsB;QACzB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,IAAI,GAAG,CAAC;YACX,GAAG;YACH,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE;SACtC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -3,10 +3,10 @@
3
3
  */
4
4
  import type { ISerializable } from "../../../serde/contracts/_module-exports.js";
5
5
  /**
6
- * The <i>TimeSpan</i> class is used for representing time interval that is the difference between two times measured in a number of days, hours, minutes, and seconds.
7
- * <i>TimeSpan</i> cannot be negative.
6
+ * The `TimeSpan` class is used for representing time interval that is the difference between two times measured in a number of days, hours, minutes, and seconds.
7
+ * `TimeSpan` cannot be negative.
8
8
  *
9
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
9
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
10
10
  * @group TimeSpan
11
11
  */
12
12
  export declare class TimeSpan implements ISerializable<number> {
@@ -46,12 +46,12 @@ export declare class TimeSpan implements ISerializable<number> {
46
46
  toDays(): number;
47
47
  toUTCTimestamp(): number;
48
48
  /**
49
- * Will return endDate relative to a given <i>startDate</i> argument.
49
+ * Will return endDate relative to a given `startDate` argument.
50
50
  * @default {new Date()} - current date
51
51
  */
52
52
  toEndDate(startDate?: Date): Date;
53
53
  /**
54
- * Will return startDate relative to a given <i>endDate</i> argument.
54
+ * Will return startDate relative to a given `endDate` argument.
55
55
  * @default {new Date()} - current date
56
56
  */
57
57
  toStartDate(endDate?: Date): Date;
@@ -2,10 +2,10 @@
2
2
  * @module Utilities
3
3
  */
4
4
  /**
5
- * The <i>TimeSpan</i> class is used for representing time interval that is the difference between two times measured in a number of days, hours, minutes, and seconds.
6
- * <i>TimeSpan</i> cannot be negative.
5
+ * The `TimeSpan` class is used for representing time interval that is the difference between two times measured in a number of days, hours, minutes, and seconds.
6
+ * `TimeSpan` cannot be negative.
7
7
  *
8
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
8
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
9
9
  * @group TimeSpan
10
10
  */
11
11
  export class TimeSpan {
@@ -106,14 +106,14 @@ export class TimeSpan {
106
106
  return Math.round(this.toMilliseconds() / 1000);
107
107
  }
108
108
  /**
109
- * Will return endDate relative to a given <i>startDate</i> argument.
109
+ * Will return endDate relative to a given `startDate` argument.
110
110
  * @default {new Date()} - current date
111
111
  */
112
112
  toEndDate(startDate = new Date()) {
113
113
  return new Date(startDate.getTime() + this.toMilliseconds());
114
114
  }
115
115
  /**
116
- * Will return startDate relative to a given <i>endDate</i> argument.
116
+ * Will return startDate relative to a given `endDate` argument.
117
117
  * @default {new Date()} - current date
118
118
  */
119
119
  toStartDate(endDate = new Date()) {
@@ -3,4 +3,3 @@ export * from "../../utilities/contracts/initizable.contract.js";
3
3
  export * from "../../utilities/contracts/prunable.contract.js";
4
4
  export * from "../../utilities/contracts/serialized-error.contract.js";
5
5
  export * from "../../utilities/contracts/sqlite-database.contract.js";
6
- export * from "../../utilities/contracts/sync-event-bus-listenable.js";
@@ -3,5 +3,4 @@ export * from "../../utilities/contracts/initizable.contract.js";
3
3
  export * from "../../utilities/contracts/prunable.contract.js";
4
4
  export * from "../../utilities/contracts/serialized-error.contract.js";
5
5
  export * from "../../utilities/contracts/sqlite-database.contract.js";
6
- export * from "../../utilities/contracts/sync-event-bus-listenable.js";
7
6
  //# sourceMappingURL=_module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../src/utilities/contracts/_module.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oDAAoD,CAAC;AACnE,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC"}
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../src/utilities/contracts/_module.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oDAAoD,CAAC;AACnE,cAAc,mDAAmD,CAAC"}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /**
5
5
  *
6
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
6
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
7
7
  * @group Contracts
8
8
  */
9
9
  export type IDeinitizable = {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /**
5
5
  *
6
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
6
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
7
7
  * @group Contracts
8
8
  */
9
9
  export type IInitizable = {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /**
5
5
  *
6
- * IMPORT_PATH: ```"@daiso-tech/core/utilities/contracts"```
6
+ * IMPORT_PATH: `"@daiso-tech/core/utilities/contracts"`
7
7
  * @group Contracts
8
8
  */
9
9
  export type IPrunable = {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /**
5
5
  *
6
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
6
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
7
7
  * @group Contracts
8
8
  */
9
9
  export type ISerializedError = {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /**
5
5
  *
6
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
6
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
7
7
  * @group Contracts
8
8
  */
9
9
  export type ISqliteStatement = {
@@ -17,7 +17,7 @@ export type ISqliteStatement = {
17
17
  };
18
18
  /**
19
19
  *
20
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
20
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
21
21
  * @group Contracts
22
22
  */
23
23
  export type ISqliteDatabase = {
@@ -3,25 +3,25 @@
3
3
  */
4
4
  /**
5
5
  *
6
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
6
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
7
7
  * @group Errors
8
8
  */
9
9
  export declare class FactoryError extends Error {
10
10
  constructor(message: string, cause?: unknown);
11
11
  }
12
12
  /**
13
- * The error occurs when attempting to access the default adapter of the <i>Factory</i> class instance, which has not been defined.
13
+ * The error occurs when attempting to access the default adapter of the `Factory` class instance, which has not been defined.
14
14
  *
15
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
15
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
16
16
  * @group Errors
17
17
  */
18
18
  export declare class DefaultAdapterNotDefinedError extends FactoryError {
19
19
  constructor(factoryName: string);
20
20
  }
21
21
  /**
22
- * The error occurs when attempting to access the an adapter of the <i>Factory</i> class instance, which has not been registered.
22
+ * The error occurs when attempting to access the an adapter of the `Factory` class instance, which has not been registered.
23
23
  *
24
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
24
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
25
25
  * @group Errors
26
26
  */
27
27
  export declare class UnregisteredAdapterError extends FactoryError {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /**
5
5
  *
6
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
6
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
7
7
  * @group Errors
8
8
  */
9
9
  export class FactoryError extends Error {
@@ -13,9 +13,9 @@ export class FactoryError extends Error {
13
13
  }
14
14
  }
15
15
  /**
16
- * The error occurs when attempting to access the default adapter of the <i>Factory</i> class instance, which has not been defined.
16
+ * The error occurs when attempting to access the default adapter of the `Factory` class instance, which has not been defined.
17
17
  *
18
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
18
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
19
19
  * @group Errors
20
20
  */
21
21
  export class DefaultAdapterNotDefinedError extends FactoryError {
@@ -25,9 +25,9 @@ export class DefaultAdapterNotDefinedError extends FactoryError {
25
25
  }
26
26
  }
27
27
  /**
28
- * The error occurs when attempting to access the an adapter of the <i>Factory</i> class instance, which has not been registered.
28
+ * The error occurs when attempting to access the an adapter of the `Factory` class instance, which has not been registered.
29
29
  *
30
- * IMPORT_PATH: ```"@daiso-tech/core/utilities"```
30
+ * IMPORT_PATH: `"@daiso-tech/core/utilities"`
31
31
  * @group Errors
32
32
  */
33
33
  export class UnregisteredAdapterError extends FactoryError {
@@ -46,7 +46,7 @@ export function isAsyncFactory(factoryable) {
46
46
  */
47
47
  export function resolveFactory(factory) {
48
48
  if (isFactoryObject(factory)) {
49
- return factory.use.bind(factory);
49
+ return (value) => factory.use(value);
50
50
  }
51
51
  return factory;
52
52
  }
@@ -55,9 +55,9 @@ export function resolveFactory(factory) {
55
55
  */
56
56
  export function resolveAsyncFactory(factory) {
57
57
  if (isAsyncFactoryObject(factory)) {
58
- return factory.use.bind(factory);
58
+ return (value) => factory.use(value);
59
59
  }
60
- return factory;
60
+ return (value) => factory(value);
61
61
  }
62
62
  /**
63
63
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../src/utilities/functions/factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH;;GAEG;AACH,MAAM,UAAU,WAAW,CACvB,OAAqC;IAErC,OAA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CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAC9B,WAAyC,EACzC,KAAa;IAEb,IAAI,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;QACzB,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,WAAW,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CACzC,WAA8C,EAC9C,KAAa;IAEb,IAAI,cAAc,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9B,OAAO,MAAM,mBAAmB,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,WAAW,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../src/utilities/functions/factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH;;GAEG;AACH,MAAM,UAAU,WAAW,CACvB,OAAqC;IAErC,OAAO,OAAO,OAAO,KAAK,UAAU,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAC3B,OAAqC;IAErC,OAAO,CACH,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,OAAQ,OAA+B,CAAC,KAAK,CAAC,KAAK,UAAU,CAChE,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CACrB,WAAyC;IAEzC,OAAO,WAAW,CAAC,WAAW,CAAC,IAAI,eAAe,CAAC,WAAW,CAAC,CAAC;AACpE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC5B,OAA0C;IAE1C,OAAO,OAAO,OAAO,KAAK,UAAU,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAChC,OAA0C;IAE1C,OAAO,CACH,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,OAAQ,OAA+B,C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
  /**
6
6
  * @internal
7
7
  */
8
- export declare function isInvokableObject<TValue, TArgs extends unknown[], TReturn>(invokable: TValue | Invokable<TArgs, TReturn>): invokable is IInvokableObject<TArgs, TReturn>;
8
+ export declare function isInvokableObject<TValue, TParameters extends unknown[], TReturn>(invokable: TValue | Invokable<TParameters, TReturn>): invokable is IInvokableObject<TParameters, TReturn>;
9
9
  /**
10
10
  * @internal
11
11
  */
12
- export declare function isInvokableFn<TValue, TArgs extends unknown[], TReturn>(invokable: TValue | Invokable<TArgs, TReturn>): invokable is InvokableFn<TArgs, TReturn>;
12
+ export declare function isInvokableFn<TValue, TParameters extends unknown[], TReturn>(invokable: TValue | Invokable<TParameters, TReturn>): invokable is InvokableFn<TParameters, TReturn>;
13
13
  /**
14
14
  * @internal
15
15
  */
16
- export declare function isInvokable<TValue, TArgs extends unknown[], TReturn>(invokable: TValue | Invokable<TArgs, TReturn>): invokable is Invokable<TArgs, TReturn>;
16
+ export declare function isInvokable<TValue, TParameters extends unknown[], TReturn>(invokable: TValue | Invokable<TParameters, TReturn>): invokable is Invokable<TParameters, TReturn>;
17
17
  /**
18
18
  * @internal
19
19
  */
20
- export declare function resolveInvokable<TArgs extends unknown[], TReturn>(invokable: Invokable<TArgs, TReturn>): InvokableFn<TArgs, TReturn>;
20
+ export declare function resolveInvokable<TParameters extends unknown[], TReturn>(invokable: Invokable<TParameters, TReturn>): InvokableFn<TParameters, TReturn>;
21
21
  /**
22
22
  * @internal
23
23
  */
24
- export declare function callInvokable<TArgs extends unknown[], TReturn>(invokable: Invokable<TArgs, TReturn>, ...args: TArgs): TReturn;
24
+ export declare function callInvokable<TParameters extends unknown[], TReturn>(invokable: Invokable<TParameters, TReturn>, ...args: TParameters): TReturn;
25
+ /**
26
+ * @internal
27
+ */
28
+ export declare function getInvokableName<TParameters extends unknown[], TReturn>(invokable: Invokable<TParameters, TReturn>): string;