lakutata 2.0.80 → 2.0.81

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 (394) hide show
  1. package/com/cacher.cjs +8 -10
  2. package/com/cacher.d.ts +83 -14
  3. package/com/cacher.mjs +8 -10
  4. package/com/database.cjs +11 -11
  5. package/com/database.mjs +11 -11
  6. package/com/docker.cjs +17 -19
  7. package/com/docker.d.ts +3 -141
  8. package/com/docker.mjs +13 -15
  9. package/com/entrypoint.cjs +7 -5
  10. package/com/entrypoint.mjs +7 -5
  11. package/com/logger.cjs +7 -7
  12. package/com/logger.mjs +7 -7
  13. package/com/monitor.cjs +5 -3
  14. package/com/monitor.mjs +5 -3
  15. package/decorator/ctrl.cjs +3 -3
  16. package/decorator/ctrl.mjs +3 -3
  17. package/decorator/orm.cjs +98 -98
  18. package/decorator/orm.mjs +142 -56
  19. package/helper.cjs +9 -11
  20. package/helper.mjs +5 -7
  21. package/lakutata.cjs +23 -30
  22. package/lakutata.mjs +14 -18
  23. package/orm.cjs +1423 -886
  24. package/orm.mjs +1474 -724
  25. package/package.json +1 -1
  26. package/provider/database.cjs +11 -11
  27. package/provider/database.mjs +11 -11
  28. package/provider/passwordHash.cjs +4 -2
  29. package/provider/passwordHash.mjs +4 -2
  30. package/src/components/Database.cjs +11 -11
  31. package/src/components/Database.mjs +11 -11
  32. package/src/components/Logger.cjs +7 -7
  33. package/src/components/Logger.mjs +7 -7
  34. package/src/components/cacher/Cacher.cjs +1178 -264
  35. package/src/components/cacher/Cacher.mjs +1087 -173
  36. package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +479 -2963
  37. package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +469 -2947
  38. package/src/components/docker/ConnectionOptionsBuilder.cjs +15 -17
  39. package/src/components/docker/ConnectionOptionsBuilder.mjs +13 -15
  40. package/src/components/docker/Docker.cjs +4884 -4945
  41. package/src/components/docker/Docker.mjs +4902 -4963
  42. package/src/components/docker/lib/DockerContainer.cjs +23 -25
  43. package/src/components/docker/lib/DockerContainer.mjs +17 -19
  44. package/src/components/docker/lib/DockerContainerTTY.cjs +9 -11
  45. package/src/components/docker/lib/DockerContainerTTY.mjs +9 -11
  46. package/src/components/docker/lib/DockerImage.cjs +4 -2
  47. package/src/components/docker/lib/DockerImage.mjs +4 -2
  48. package/src/components/entrypoint/Entrypoint.cjs +2170 -1678
  49. package/src/components/entrypoint/Entrypoint.mjs +2126 -1634
  50. package/src/components/entrypoint/lib/AccessControl.cjs +4 -2
  51. package/src/components/entrypoint/lib/AccessControl.mjs +4 -2
  52. package/src/components/entrypoint/lib/AccessControlRule.cjs +4 -2
  53. package/src/components/entrypoint/lib/AccessControlRule.mjs +4 -2
  54. package/src/components/entrypoint/lib/Controller.cjs +4 -2
  55. package/src/components/entrypoint/lib/Controller.mjs +4 -2
  56. package/src/components/monitor/AliveMonitor.cjs +4 -2
  57. package/src/components/monitor/AliveMonitor.mjs +4 -2
  58. package/src/components/monitor/CpuMonitor.cjs +5 -3
  59. package/src/components/monitor/CpuMonitor.mjs +5 -3
  60. package/src/components/monitor/EventLoopMonitor.cjs +4 -2
  61. package/src/components/monitor/EventLoopMonitor.mjs +4 -2
  62. package/src/components/monitor/HttpRequestMonitor.cjs +5 -3
  63. package/src/components/monitor/HttpRequestMonitor.mjs +5 -3
  64. package/src/components/monitor/MemoryMonitor.cjs +5 -3
  65. package/src/components/monitor/MemoryMonitor.mjs +5 -3
  66. package/src/decorators/ctrl/CLIAction.cjs +3 -3
  67. package/src/decorators/ctrl/CLIAction.mjs +3 -3
  68. package/src/decorators/ctrl/HTTPAction.cjs +3 -3
  69. package/src/decorators/ctrl/HTTPAction.mjs +3 -3
  70. package/src/decorators/ctrl/ServiceAction.cjs +3 -3
  71. package/src/decorators/ctrl/ServiceAction.mjs +3 -3
  72. package/src/decorators/ctrl/http/DELETE.cjs +3 -3
  73. package/src/decorators/ctrl/http/DELETE.mjs +3 -3
  74. package/src/decorators/ctrl/http/GET.cjs +3 -3
  75. package/src/decorators/ctrl/http/GET.mjs +3 -3
  76. package/src/decorators/ctrl/http/HEAD.cjs +3 -3
  77. package/src/decorators/ctrl/http/HEAD.mjs +3 -3
  78. package/src/decorators/ctrl/http/OPTIONS.cjs +3 -3
  79. package/src/decorators/ctrl/http/OPTIONS.mjs +3 -3
  80. package/src/decorators/ctrl/http/PATCH.cjs +3 -3
  81. package/src/decorators/ctrl/http/PATCH.mjs +3 -3
  82. package/src/decorators/ctrl/http/POST.cjs +3 -3
  83. package/src/decorators/ctrl/http/POST.mjs +3 -3
  84. package/src/decorators/ctrl/http/PUT.cjs +3 -3
  85. package/src/decorators/ctrl/http/PUT.mjs +3 -3
  86. package/src/decorators/orm/AfterInsert.cjs +17 -39
  87. package/src/decorators/orm/AfterInsert.mjs +18 -38
  88. package/src/decorators/orm/AfterLoad.cjs +17 -39
  89. package/src/decorators/orm/AfterLoad.mjs +18 -38
  90. package/src/decorators/orm/AfterRecover.cjs +17 -39
  91. package/src/decorators/orm/AfterRecover.mjs +18 -38
  92. package/src/decorators/orm/AfterRemove.cjs +17 -39
  93. package/src/decorators/orm/AfterRemove.mjs +18 -38
  94. package/src/decorators/orm/AfterSoftRemove.cjs +17 -39
  95. package/src/decorators/orm/AfterSoftRemove.mjs +18 -38
  96. package/src/decorators/orm/AfterUpdate.cjs +17 -39
  97. package/src/decorators/orm/AfterUpdate.mjs +18 -38
  98. package/src/decorators/orm/BeforeInsert.cjs +17 -39
  99. package/src/decorators/orm/BeforeInsert.mjs +18 -38
  100. package/src/decorators/orm/BeforeRecover.cjs +17 -39
  101. package/src/decorators/orm/BeforeRecover.mjs +18 -38
  102. package/src/decorators/orm/BeforeRemove.cjs +17 -39
  103. package/src/decorators/orm/BeforeRemove.mjs +18 -38
  104. package/src/decorators/orm/BeforeSoftRemove.cjs +17 -39
  105. package/src/decorators/orm/BeforeSoftRemove.mjs +18 -38
  106. package/src/decorators/orm/BeforeUpdate.cjs +17 -39
  107. package/src/decorators/orm/BeforeUpdate.mjs +18 -38
  108. package/src/decorators/orm/Check.cjs +17 -42
  109. package/src/decorators/orm/Check.mjs +18 -41
  110. package/src/decorators/orm/ChildEntity.cjs +17 -42
  111. package/src/decorators/orm/ChildEntity.mjs +18 -41
  112. package/src/decorators/orm/Column.cjs +17 -74
  113. package/src/decorators/orm/Column.mjs +19 -74
  114. package/src/decorators/orm/CreateDateColumn.cjs +17 -38
  115. package/src/decorators/orm/CreateDateColumn.mjs +18 -37
  116. package/src/decorators/orm/DeleteDateColumn.cjs +17 -38
  117. package/src/decorators/orm/DeleteDateColumn.mjs +17 -36
  118. package/src/decorators/orm/Entity.cjs +17 -48
  119. package/src/decorators/orm/Entity.mjs +17 -46
  120. package/src/decorators/orm/EventSubscriber.cjs +17 -35
  121. package/src/decorators/orm/EventSubscriber.mjs +18 -34
  122. package/src/decorators/orm/Exclusion.cjs +17 -42
  123. package/src/decorators/orm/Exclusion.mjs +18 -41
  124. package/src/decorators/orm/Generated.cjs +17 -37
  125. package/src/decorators/orm/Generated.mjs +18 -36
  126. package/src/decorators/orm/Index.cjs +17 -54
  127. package/src/decorators/orm/Index.mjs +19 -54
  128. package/src/decorators/orm/JoinColumn.cjs +17 -42
  129. package/src/decorators/orm/JoinColumn.mjs +18 -41
  130. package/src/decorators/orm/JoinTable.cjs +17 -43
  131. package/src/decorators/orm/JoinTable.mjs +17 -41
  132. package/src/decorators/orm/ManyToMany.cjs +17 -55
  133. package/src/decorators/orm/ManyToMany.mjs +17 -53
  134. package/src/decorators/orm/ManyToOne.cjs +17 -55
  135. package/src/decorators/orm/ManyToOne.mjs +17 -53
  136. package/src/decorators/orm/ObjectIdColumn.cjs +17 -41
  137. package/src/decorators/orm/ObjectIdColumn.mjs +18 -40
  138. package/src/decorators/orm/OneToMany.cjs +17 -47
  139. package/src/decorators/orm/OneToMany.mjs +19 -47
  140. package/src/decorators/orm/OneToOne.cjs +17 -55
  141. package/src/decorators/orm/OneToOne.mjs +17 -53
  142. package/src/decorators/orm/PrimaryColumn.cjs +17 -62
  143. package/src/decorators/orm/PrimaryColumn.mjs +19 -62
  144. package/src/decorators/orm/PrimaryGeneratedColumn.cjs +17 -67
  145. package/src/decorators/orm/PrimaryGeneratedColumn.mjs +19 -67
  146. package/src/decorators/orm/RelationId.cjs +17 -39
  147. package/src/decorators/orm/RelationId.mjs +18 -38
  148. package/src/decorators/orm/TableInheritance.cjs +17 -39
  149. package/src/decorators/orm/TableInheritance.mjs +18 -38
  150. package/src/decorators/orm/Tree.cjs +17 -37
  151. package/src/decorators/orm/Tree.mjs +18 -36
  152. package/src/decorators/orm/TreeChildren.cjs +17 -44
  153. package/src/decorators/orm/TreeChildren.mjs +17 -42
  154. package/src/decorators/orm/TreeLevelColumn.cjs +17 -38
  155. package/src/decorators/orm/TreeLevelColumn.mjs +17 -36
  156. package/src/decorators/orm/TreeParent.cjs +17 -44
  157. package/src/decorators/orm/TreeParent.mjs +17 -42
  158. package/src/decorators/orm/Unique.cjs +17 -57
  159. package/src/decorators/orm/Unique.mjs +19 -57
  160. package/src/decorators/orm/UpdateDateColumn.cjs +17 -38
  161. package/src/decorators/orm/UpdateDateColumn.mjs +18 -37
  162. package/src/decorators/orm/VersionColumn.cjs +17 -38
  163. package/src/decorators/orm/VersionColumn.mjs +18 -37
  164. package/src/decorators/orm/ViewColumn.cjs +17 -38
  165. package/src/decorators/orm/ViewColumn.mjs +18 -37
  166. package/src/decorators/orm/ViewEntity.cjs +17 -47
  167. package/src/decorators/orm/ViewEntity.mjs +18 -46
  168. package/src/decorators/orm/VirtualColumn.cjs +17 -55
  169. package/src/decorators/orm/VirtualColumn.mjs +17 -53
  170. package/src/lib/base/BaseObject.cjs +4 -2
  171. package/src/lib/base/BaseObject.mjs +4 -2
  172. package/src/lib/base/EventEmitter.cjs +1200 -1193
  173. package/src/lib/base/EventEmitter.mjs +1201 -1194
  174. package/src/lib/base/internal/ApplicationConfigLoader.cjs +4 -2
  175. package/src/lib/base/internal/ApplicationConfigLoader.mjs +4 -2
  176. package/src/lib/base/internal/ControllerEntrypoint.cjs +3 -3
  177. package/src/lib/base/internal/ControllerEntrypoint.mjs +3 -3
  178. package/src/lib/base/internal/DataValidator.cjs +176 -179
  179. package/src/lib/base/internal/DataValidator.mjs +177 -180
  180. package/src/lib/base/internal/ModuleConfigLoader.cjs +4 -3
  181. package/src/lib/base/internal/ModuleConfigLoader.mjs +4 -3
  182. package/src/lib/base/internal/ObjectType.cjs +4 -2
  183. package/src/lib/base/internal/ObjectType.mjs +4 -2
  184. package/src/lib/base/internal/PatternManager.cjs +740 -735
  185. package/src/lib/base/internal/PatternManager.mjs +745 -740
  186. package/src/lib/base/internal/StringifyPattern.cjs +1 -1
  187. package/src/lib/base/internal/StringifyPattern.mjs +1 -1
  188. package/src/lib/core/Application.cjs +151 -147
  189. package/src/lib/core/Application.mjs +199 -197
  190. package/src/lib/core/Component.cjs +4 -2
  191. package/src/lib/core/Component.mjs +4 -2
  192. package/src/lib/core/Container.cjs +4 -2
  193. package/src/lib/core/Container.mjs +4 -2
  194. package/src/lib/core/Module.cjs +5 -3
  195. package/src/lib/core/Module.mjs +5 -3
  196. package/src/lib/core/Provider.cjs +4 -2
  197. package/src/lib/core/Provider.mjs +4 -2
  198. package/src/lib/helpers/Glob.cjs +970 -721
  199. package/src/lib/helpers/Glob.mjs +1036 -787
  200. package/src/lib/helpers/IsHtml.cjs +7 -13
  201. package/src/lib/helpers/IsHtml.mjs +7 -13
  202. package/src/lib/helpers/IsXML.cjs +1158 -1016
  203. package/src/lib/helpers/IsXML.mjs +871 -729
  204. package/src/lib/helpers/MD5.cjs +1 -1
  205. package/src/lib/helpers/MD5.mjs +1 -1
  206. package/src/lib/helpers/NonceStr.cjs +1 -1
  207. package/src/lib/helpers/NonceStr.mjs +1 -1
  208. package/src/lib/helpers/ObjectHash.cjs +379 -372
  209. package/src/lib/helpers/ObjectHash.mjs +379 -372
  210. package/src/lib/helpers/RandomString.cjs +168 -147
  211. package/src/lib/helpers/RandomString.mjs +167 -146
  212. package/src/lib/helpers/SHA1.cjs +1 -1
  213. package/src/lib/helpers/SHA1.mjs +1 -1
  214. package/src/lib/helpers/SHA256.cjs +1 -1
  215. package/src/lib/helpers/SHA256.mjs +1 -1
  216. package/src/lib/helpers/SortArray.cjs +1 -1
  217. package/src/lib/helpers/SortArray.mjs +1 -1
  218. package/src/lib/helpers/Statistics.cjs +1 -1
  219. package/src/lib/helpers/Statistics.mjs +1 -1
  220. package/src/lib/helpers/URLBuilder.cjs +355 -355
  221. package/src/lib/helpers/URLBuilder.mjs +350 -350
  222. package/src/lib/helpers/UUID.cjs +1 -1
  223. package/src/lib/helpers/UUID.mjs +1 -1
  224. package/src/lib/ioc/DependencyInjectionContainer.cjs +32 -30
  225. package/src/lib/ioc/DependencyInjectionContainer.mjs +12 -10
  226. package/src/lib/ioc/ListModules.cjs +5174 -5249
  227. package/src/lib/ioc/ListModules.mjs +5177 -5252
  228. package/src/lib/validation/VLD.cjs +4080 -3902
  229. package/src/lib/validation/VLD.mjs +2970 -2792
  230. package/src/options/ApplicationOptions.cjs +4 -2
  231. package/src/options/ApplicationOptions.mjs +4 -2
  232. package/src/options/LoadAnonymousObjectOptions.cjs +4 -2
  233. package/src/options/LoadAnonymousObjectOptions.mjs +4 -2
  234. package/src/options/LoadNamedObjectOptions.cjs +4 -2
  235. package/src/options/LoadNamedObjectOptions.mjs +4 -2
  236. package/src/options/LoadObjectOptions.cjs +4 -2
  237. package/src/options/LoadObjectOptions.mjs +4 -2
  238. package/src/options/ModuleLoadObjectsOptions.cjs +4 -2
  239. package/src/options/ModuleLoadObjectsOptions.mjs +4 -2
  240. package/src/options/ModuleOptions.cjs +4 -4
  241. package/src/options/ModuleOptions.mjs +4 -4
  242. package/src/options/OverridableNamedObjectOptions.cjs +4 -2
  243. package/src/options/OverridableNamedObjectOptions.mjs +4 -2
  244. package/src/options/OverridableObjectOptions.cjs +4 -2
  245. package/src/options/OverridableObjectOptions.mjs +4 -2
  246. package/src/providers/Database.cjs +11 -11
  247. package/src/providers/Database.mjs +11 -11
  248. package/src/providers/PasswordHash.cjs +5 -3
  249. package/src/providers/PasswordHash.mjs +190 -188
  250. package/src/providers/migration/GenerateMigration.cjs +15 -19
  251. package/src/providers/migration/GenerateMigration.mjs +15 -19
  252. package/vendor/Package.10.cjs +2 -8
  253. package/vendor/Package.10.mjs +2 -8
  254. package/vendor/Package.11.cjs +5 -83
  255. package/vendor/Package.11.mjs +5 -77
  256. package/vendor/Package.112.cjs +48900 -0
  257. package/vendor/Package.112.mjs +48764 -0
  258. package/vendor/Package.12.cjs +4 -2
  259. package/vendor/Package.12.mjs +6 -4
  260. package/vendor/Package.13.cjs +87 -1
  261. package/vendor/Package.13.mjs +81 -1
  262. package/vendor/Package.14.cjs +1 -14057
  263. package/vendor/Package.14.mjs +1 -14031
  264. package/vendor/Package.15.cjs +1 -1
  265. package/vendor/Package.15.mjs +1 -1
  266. package/vendor/Package.16.cjs +18129 -1935
  267. package/vendor/Package.16.mjs +18115 -1839
  268. package/vendor/Package.17.cjs +1922 -47918
  269. package/vendor/Package.17.mjs +1874 -47937
  270. package/vendor/Package.18.cjs +35 -1
  271. package/vendor/Package.18.mjs +35 -1
  272. package/vendor/Package.19.cjs +37 -0
  273. package/vendor/Package.19.mjs +35 -0
  274. package/vendor/Package.2.cjs +5739 -5710
  275. package/vendor/Package.2.mjs +5733 -5704
  276. package/vendor/Package.20.cjs +37 -0
  277. package/vendor/Package.20.mjs +35 -0
  278. package/vendor/Package.21.cjs +37 -0
  279. package/vendor/Package.21.mjs +35 -0
  280. package/vendor/Package.22.cjs +37 -0
  281. package/vendor/Package.22.mjs +35 -0
  282. package/vendor/Package.23.cjs +37 -0
  283. package/vendor/Package.23.mjs +35 -0
  284. package/vendor/Package.24.cjs +37 -0
  285. package/vendor/Package.24.mjs +35 -0
  286. package/vendor/Package.25.cjs +37 -0
  287. package/vendor/Package.25.mjs +35 -0
  288. package/vendor/Package.26.cjs +37 -0
  289. package/vendor/Package.26.mjs +35 -0
  290. package/vendor/Package.27.cjs +37 -0
  291. package/vendor/Package.27.mjs +35 -0
  292. package/vendor/Package.28.cjs +37 -0
  293. package/vendor/Package.28.mjs +35 -0
  294. package/vendor/Package.29.cjs +40 -0
  295. package/vendor/Package.29.mjs +38 -0
  296. package/vendor/Package.30.cjs +41 -0
  297. package/vendor/Package.30.mjs +39 -0
  298. package/vendor/Package.31.cjs +72 -0
  299. package/vendor/Package.31.mjs +70 -0
  300. package/vendor/Package.32.cjs +37 -0
  301. package/vendor/Package.32.mjs +35 -0
  302. package/vendor/Package.33.cjs +37 -0
  303. package/vendor/Package.33.mjs +35 -0
  304. package/vendor/Package.34.cjs +46 -0
  305. package/vendor/Package.34.mjs +44 -0
  306. package/vendor/Package.35.cjs +34 -0
  307. package/vendor/Package.35.mjs +32 -0
  308. package/vendor/Package.36.cjs +40 -0
  309. package/vendor/Package.36.mjs +38 -0
  310. package/vendor/Package.37.cjs +36 -0
  311. package/vendor/Package.37.mjs +34 -0
  312. package/vendor/Package.38.cjs +52 -0
  313. package/vendor/Package.38.mjs +50 -0
  314. package/vendor/Package.39.cjs +41 -0
  315. package/vendor/Package.39.mjs +39 -0
  316. package/vendor/Package.4.cjs +884 -874
  317. package/vendor/Package.4.mjs +884 -874
  318. package/vendor/Package.40.cjs +42 -0
  319. package/vendor/Package.40.mjs +40 -0
  320. package/vendor/Package.41.cjs +53 -0
  321. package/vendor/Package.41.mjs +51 -0
  322. package/vendor/Package.42.cjs +53 -0
  323. package/vendor/Package.42.mjs +51 -0
  324. package/vendor/Package.43.cjs +40 -0
  325. package/vendor/Package.43.mjs +38 -0
  326. package/vendor/Package.44.cjs +46 -0
  327. package/vendor/Package.44.mjs +44 -0
  328. package/vendor/Package.45.cjs +53 -0
  329. package/vendor/Package.45.mjs +51 -0
  330. package/vendor/Package.46.cjs +59 -0
  331. package/vendor/Package.46.mjs +57 -0
  332. package/vendor/Package.47.cjs +65 -0
  333. package/vendor/Package.47.mjs +63 -0
  334. package/vendor/Package.48.cjs +38 -0
  335. package/vendor/Package.48.mjs +36 -0
  336. package/vendor/Package.49.cjs +38 -0
  337. package/vendor/Package.49.mjs +36 -0
  338. package/vendor/Package.5.cjs +15 -11
  339. package/vendor/Package.5.mjs +11 -7
  340. package/vendor/Package.50.cjs +36 -0
  341. package/vendor/Package.50.mjs +34 -0
  342. package/vendor/Package.51.cjs +43 -0
  343. package/vendor/Package.51.mjs +41 -0
  344. package/vendor/Package.52.cjs +37 -0
  345. package/vendor/Package.52.mjs +35 -0
  346. package/vendor/Package.53.cjs +43 -0
  347. package/vendor/Package.53.mjs +41 -0
  348. package/vendor/Package.54.cjs +55 -0
  349. package/vendor/Package.54.mjs +53 -0
  350. package/vendor/Package.55.cjs +37 -0
  351. package/vendor/Package.55.mjs +35 -0
  352. package/vendor/Package.56.cjs +37 -0
  353. package/vendor/Package.56.mjs +35 -0
  354. package/vendor/Package.57.cjs +37 -0
  355. package/vendor/Package.57.mjs +35 -0
  356. package/vendor/Package.58.cjs +45 -0
  357. package/vendor/Package.58.mjs +43 -0
  358. package/vendor/Package.59.cjs +53 -0
  359. package/vendor/Package.59.mjs +51 -0
  360. package/vendor/Package.6.cjs +520 -511
  361. package/vendor/Package.6.mjs +543 -534
  362. package/vendor/Package.60.cjs +47649 -0
  363. package/vendor/Package.60.mjs +47606 -0
  364. package/vendor/Package.610.cjs +11 -11
  365. package/vendor/Package.610.mjs +11 -11
  366. package/vendor/Package.611.cjs +33 -23
  367. package/vendor/Package.611.mjs +19 -9
  368. package/vendor/Package.612.cjs +42 -36
  369. package/vendor/Package.612.mjs +35 -29
  370. package/vendor/Package.613.cjs +5 -4
  371. package/vendor/Package.613.mjs +5 -4
  372. package/vendor/Package.62.cjs +92 -89
  373. package/vendor/Package.62.mjs +185 -182
  374. package/vendor/Package.63.cjs +509 -166
  375. package/vendor/Package.63.mjs +490 -165
  376. package/vendor/Package.64.cjs +139 -511
  377. package/vendor/Package.64.mjs +139 -491
  378. package/vendor/Package.65.cjs +4135 -150
  379. package/vendor/Package.65.mjs +4143 -150
  380. package/vendor/Package.66.cjs +346 -4150
  381. package/vendor/Package.66.mjs +346 -4158
  382. package/vendor/Package.67.cjs +412 -261
  383. package/vendor/Package.67.mjs +410 -259
  384. package/vendor/Package.68.cjs +397 -405
  385. package/vendor/Package.68.mjs +227 -242
  386. package/vendor/Package.8.cjs +0 -4
  387. package/vendor/Package.8.mjs +0 -4
  388. package/vendor/Package.9.cjs +132 -118
  389. package/vendor/Package.9.mjs +138 -124
  390. package/vendor/TypeDef.internal.3.d.ts +0 -4
  391. package/vendor/Package.102.cjs +0 -48773
  392. package/vendor/Package.102.mjs +0 -48697
  393. package/vendor/Package.122.cjs +0 -3
  394. package/vendor/Package.122.mjs +0 -1
@@ -2,43 +2,45 @@ import { _ as e, a as t } from "../../../vendor/Package.1.mjs";
2
2
 
3
3
  import r from "events";
4
4
 
5
- import { K as s } from "../../../vendor/Package.67.mjs";
5
+ import { H as s } from "../../../vendor/Package.66.mjs";
6
6
 
7
- import { Component as o } from "../../lib/core/Component.mjs";
7
+ import { K as i } from "../../../vendor/Package.67.mjs";
8
8
 
9
- import { Configurable as i } from "../../decorators/di/Configurable.mjs";
9
+ import { Component as n } from "../../lib/core/Component.mjs";
10
+
11
+ import { Configurable as o } from "../../decorators/di/Configurable.mjs";
10
12
 
11
13
  import { As as a } from "../../lib/helpers/As.mjs";
12
14
 
13
- import { CreateFileCacheAdapter as n } from "./adapters/CreateFileCacheAdapter.mjs";
15
+ import { CreateFileCacheAdapter as c } from "./adapters/CreateFileCacheAdapter.mjs";
14
16
 
15
- import { CreateRedisCacheAdapter as c } from "./adapters/CreateRedisCacheAdapter.mjs";
17
+ import { CreateRedisCacheAdapter as l } from "./adapters/CreateRedisCacheAdapter.mjs";
16
18
 
17
- import { CreateMemcacheCacheAdapter as m } from "./adapters/CreateMemcacheCacheAdapter.mjs";
19
+ import { CreateMemcacheCacheAdapter as h } from "./adapters/CreateMemcacheCacheAdapter.mjs";
18
20
 
19
- import { CreateMongoCacheAdapter as l } from "./adapters/CreateMongoCacheAdapter.mjs";
21
+ import { CreateMongoCacheAdapter as m } from "./adapters/CreateMongoCacheAdapter.mjs";
20
22
 
21
- import { CreateSqliteCacheAdapter as p } from "./adapters/CreateSqliteCacheAdapter.mjs";
23
+ import { CreateSqliteCacheAdapter as u } from "./adapters/CreateSqliteCacheAdapter.mjs";
22
24
 
23
- import { CreatePostgresCacheAdapter as h } from "./adapters/CreatePostgresCacheAdapter.mjs";
25
+ import { CreatePostgresCacheAdapter as f } from "./adapters/CreatePostgresCacheAdapter.mjs";
24
26
 
25
27
  import { CreateMysqlCacheAdapter as d } from "./adapters/CreateMysqlCacheAdapter.mjs";
26
28
 
27
- import { D as u } from "../../../vendor/Package.2.mjs";
29
+ import { D as p } from "../../../vendor/Package.2.mjs";
28
30
 
29
31
  import { FileCacheOptions as y } from "./options/FileCacheOptions.mjs";
30
32
 
31
- import { RedisCacheOptions as f } from "./options/RedisCacheOptions.mjs";
33
+ import { RedisCacheOptions as g } from "./options/RedisCacheOptions.mjs";
32
34
 
33
- import { MemcacheCacheOptions as j } from "./options/MemcacheCacheOptions.mjs";
35
+ import { MemcacheCacheOptions as b } from "./options/MemcacheCacheOptions.mjs";
34
36
 
35
- import { MongoCacheOptions as b } from "./options/MongoCacheOptions.mjs";
37
+ import { MongoCacheOptions as v } from "./options/MongoCacheOptions.mjs";
36
38
 
37
- import { SqliteCacheOptions as v } from "./options/SqliteCacheOptions.mjs";
39
+ import { SqliteCacheOptions as _ } from "./options/SqliteCacheOptions.mjs";
38
40
 
39
- import { PostgresCacheOptions as g } from "./options/PostgresCacheOptions.mjs";
41
+ import { PostgresCacheOptions as j } from "./options/PostgresCacheOptions.mjs";
40
42
 
41
- import { MysqlCacheOptions as k } from "./options/MysqlCacheOptions.mjs";
43
+ import { MysqlCacheOptions as w } from "./options/MysqlCacheOptions.mjs";
42
44
 
43
45
  import "buffer";
44
46
 
@@ -134,10 +136,12 @@ import "os";
134
136
 
135
137
  import "path";
136
138
 
137
- import "stream";
138
-
139
139
  import "fs";
140
140
 
141
+ import "../../../vendor/Package.10.mjs";
142
+
143
+ import "stream";
144
+
141
145
  import "../../lib/ioc/Utils.mjs";
142
146
 
143
147
  import "../../lib/ioc/FunctionTokenizer.mjs";
@@ -180,15 +184,9 @@ import "../../lib/core/Provider.mjs";
180
184
 
181
185
  import "../../../vendor/Package.12.mjs";
182
186
 
183
- import "../../../vendor/Package.18.mjs";
184
-
185
- import "constants";
186
-
187
- import "../../../vendor/Package.15.mjs";
187
+ import "fs/promises";
188
188
 
189
- import "assert";
190
-
191
- import "../../../vendor/Package.122.mjs";
189
+ import "../../../vendor/Package.14.mjs";
192
190
 
193
191
  import "./lib/IsDriverPackageInstalled.mjs";
194
192
 
@@ -196,49 +194,537 @@ import "./exceptions/CacheDriverNotFoundException.mjs";
196
194
 
197
195
  import "../../lib/helpers/URLBuilder.mjs";
198
196
 
199
- var w = new Map;
197
+ var S = class {
198
+ get name() {
199
+ return "crc32";
200
+ }
201
+ toHashSync(e) {
202
+ let t;
203
+ if (e instanceof Uint8Array) {
204
+ t = e;
205
+ } else if (e instanceof ArrayBuffer) {
206
+ t = new Uint8Array(e);
207
+ } else if (e instanceof DataView) {
208
+ t = new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
209
+ } else {
210
+ const r = e;
211
+ t = new Uint8Array(r.buffer, r.byteOffset, r.byteLength);
212
+ }
213
+ const r = 3988292384;
214
+ let s = 4294967295;
215
+ for (let e = 0; e < t.length; e++) {
216
+ s = s ^ t[e];
217
+ for (let e = 0; e < 8; e++) {
218
+ s = s >>> 1 ^ r & -(s & 1);
219
+ }
220
+ }
221
+ s = (s ^ 4294967295) >>> 0;
222
+ const i = s.toString(16).padStart(8, "0");
223
+ return i;
224
+ }
225
+ async toHash(e) {
226
+ return this.toHashSync(e);
227
+ }
228
+ };
229
+
230
+ var A = class {
231
+ _algorithm="SHA-256";
232
+ constructor(e) {
233
+ if (e?.algorithm) {
234
+ this._algorithm = e?.algorithm;
235
+ }
236
+ }
237
+ get name() {
238
+ return this._algorithm;
239
+ }
240
+ async toHash(e) {
241
+ const t = await crypto.subtle.digest(this._algorithm, e);
242
+ const r = Array.from(new Uint8Array(t));
243
+ const s = r.map((e => e.toString(16).padStart(2, "0"))).join("");
244
+ return s;
245
+ }
246
+ };
247
+
248
+ var k = class {
249
+ get name() {
250
+ return "djb2";
251
+ }
252
+ toHashSync(e) {
253
+ let t;
254
+ if (e instanceof Uint8Array) {
255
+ t = e;
256
+ } else if (e instanceof ArrayBuffer) {
257
+ t = new Uint8Array(e);
258
+ } else if (e instanceof DataView) {
259
+ t = new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
260
+ } else {
261
+ const r = e;
262
+ t = new Uint8Array(r.buffer, r.byteOffset, r.byteLength);
263
+ }
264
+ let r = 5381;
265
+ for (let e = 0; e < t.length; e++) {
266
+ r = (r << 5) + r + t[e];
267
+ r = r >>> 0;
268
+ }
269
+ const s = r.toString(16).padStart(8, "0");
270
+ return s;
271
+ }
272
+ async toHash(e) {
273
+ return this.toHashSync(e);
274
+ }
275
+ };
276
+
277
+ var x = class {
278
+ get name() {
279
+ return "fnv1";
280
+ }
281
+ toHashSync(e) {
282
+ let t;
283
+ if (e instanceof Uint8Array) {
284
+ t = e;
285
+ } else if (e instanceof ArrayBuffer) {
286
+ t = new Uint8Array(e);
287
+ } else if (e instanceof DataView) {
288
+ t = new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
289
+ } else {
290
+ const r = e;
291
+ t = new Uint8Array(r.buffer, r.byteOffset, r.byteLength);
292
+ }
293
+ const r = 2166136261;
294
+ const s = 16777619;
295
+ let i = r;
296
+ for (let e = 0; e < t.length; e++) {
297
+ i = i * s;
298
+ i = i ^ t[e];
299
+ i = i >>> 0;
300
+ }
301
+ const n = i.toString(16).padStart(8, "0");
302
+ return n;
303
+ }
304
+ async toHash(e) {
305
+ return this.toHashSync(e);
306
+ }
307
+ };
308
+
309
+ var P = class {
310
+ _seed;
311
+ constructor(e = 0) {
312
+ this._seed = e >>> 0;
313
+ }
314
+ get name() {
315
+ return "murmer";
316
+ }
317
+ get seed() {
318
+ return this._seed;
319
+ }
320
+ toHashSync(e) {
321
+ let t;
322
+ if (e instanceof Uint8Array) {
323
+ t = e;
324
+ } else if (e instanceof ArrayBuffer) {
325
+ t = new Uint8Array(e);
326
+ } else if (e instanceof DataView) {
327
+ t = new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
328
+ } else {
329
+ const r = e;
330
+ t = new Uint8Array(r.buffer, r.byteOffset, r.byteLength);
331
+ }
332
+ const r = 3432918353;
333
+ const s = 461845907;
334
+ const i = t.length;
335
+ const n = Math.floor(i / 4);
336
+ let o = this._seed;
337
+ for (let e = 0; e < n; e++) {
338
+ const i = e * 4;
339
+ let n = t[i] & 255 | (t[i + 1] & 255) << 8 | (t[i + 2] & 255) << 16 | (t[i + 3] & 255) << 24;
340
+ n = this._imul(n, r);
341
+ n = this._rotl32(n, 15);
342
+ n = this._imul(n, s);
343
+ o ^= n;
344
+ o = this._rotl32(o, 13);
345
+ o = this._imul(o, 5) + 3864292196;
346
+ }
347
+ const a = n * 4;
348
+ let c = 0;
349
+ switch (i & 3) {
350
+ case 3:
351
+ c ^= (t[a + 2] & 255) << 16;
352
+
353
+ case 2:
354
+ c ^= (t[a + 1] & 255) << 8;
355
+
356
+ case 1:
357
+ c ^= t[a] & 255;
358
+ c = this._imul(c, r);
359
+ c = this._rotl32(c, 15);
360
+ c = this._imul(c, s);
361
+ o ^= c;
362
+ }
363
+ o ^= i;
364
+ o ^= o >>> 16;
365
+ o = this._imul(o, 2246822507);
366
+ o ^= o >>> 13;
367
+ o = this._imul(o, 3266489909);
368
+ o ^= o >>> 16;
369
+ o = o >>> 0;
370
+ const l = o.toString(16).padStart(8, "0");
371
+ return l;
372
+ }
373
+ async toHash(e) {
374
+ return this.toHashSync(e);
375
+ }
376
+ _imul(e, t) {
377
+ if (Math.imul) {
378
+ return Math.imul(e, t);
379
+ }
380
+ const r = e >>> 16 & 65535;
381
+ const s = e & 65535;
382
+ const i = t >>> 16 & 65535;
383
+ const n = t & 65535;
384
+ return s * n + (r * n + s * i << 16 >>> 0) | 0;
385
+ }
386
+ _rotl32(e, t) {
387
+ return e << t | e >>> 32 - t;
388
+ }
389
+ };
390
+
391
+ var z = class {
392
+ _providers=new Map;
393
+ _getFuzzy=true;
394
+ constructor(e) {
395
+ if (e?.providers) {
396
+ this.loadProviders(e?.providers);
397
+ }
398
+ if (e?.getFuzzy !== void 0) {
399
+ this._getFuzzy = Boolean(e?.getFuzzy);
400
+ }
401
+ }
402
+ loadProviders(e) {
403
+ for (const t of e) {
404
+ this._providers.set(t.name, t);
405
+ }
406
+ }
407
+ get providers() {
408
+ return this._providers;
409
+ }
410
+ set providers(e) {
411
+ this._providers = e;
412
+ }
413
+ get names() {
414
+ return Array.from(this._providers.keys());
415
+ }
416
+ get(e, t) {
417
+ const r = t?.fuzzy ?? this._getFuzzy;
418
+ e = e.trim();
419
+ let s = this._providers.get(e);
420
+ if (s === void 0 && r === true) {
421
+ e = e.toLowerCase();
422
+ s = this._providers.get(e);
423
+ }
424
+ if (s === void 0 && r === true) {
425
+ e = e.replaceAll("-", "");
426
+ s = this._providers.get(e);
427
+ }
428
+ return s;
429
+ }
430
+ add(e) {
431
+ this._providers.set(e.name, e);
432
+ }
433
+ remove(e) {
434
+ return this._providers.delete(e);
435
+ }
436
+ };
437
+
438
+ var C = class extends s {
439
+ _parse=JSON.parse;
440
+ _stringify=JSON.stringify;
441
+ _providers=new z;
442
+ _defaultAlgorithm="SHA-256";
443
+ _defaultAlgorithmSync="djb2";
444
+ constructor(e) {
445
+ super(e);
446
+ if (e?.parse) {
447
+ this._parse = e.parse;
448
+ }
449
+ if (e?.stringify) {
450
+ this._stringify = e.stringify;
451
+ }
452
+ if (e?.defaultAlgorithm) {
453
+ this._defaultAlgorithm = e.defaultAlgorithm;
454
+ }
455
+ if (e?.defaultAlgorithmSync) {
456
+ this._defaultAlgorithmSync = e.defaultAlgorithmSync;
457
+ }
458
+ this.loadProviders(e?.providers, {
459
+ includeBase: e?.includeBase ?? true
460
+ });
461
+ }
462
+ get parse() {
463
+ return this._parse;
464
+ }
465
+ set parse(e) {
466
+ this._parse = e;
467
+ }
468
+ get stringify() {
469
+ return this._stringify;
470
+ }
471
+ set stringify(e) {
472
+ this._stringify = e;
473
+ }
474
+ get providers() {
475
+ return this._providers;
476
+ }
477
+ set providers(e) {
478
+ this._providers = e;
479
+ }
480
+ get names() {
481
+ return this._providers.names;
482
+ }
483
+ get defaultAlgorithm() {
484
+ return this._defaultAlgorithm;
485
+ }
486
+ set defaultAlgorithm(e) {
487
+ this._defaultAlgorithm = e;
488
+ }
489
+ get defaultAlgorithmSync() {
490
+ return this._defaultAlgorithmSync;
491
+ }
492
+ set defaultAlgorithmSync(e) {
493
+ this._defaultAlgorithmSync = e;
494
+ }
495
+ async toHash(e, t) {
496
+ const r = {
497
+ data: e,
498
+ algorithm: t?.algorithm ?? this._defaultAlgorithm,
499
+ maxLength: t?.maxLength
500
+ };
501
+ await this.beforeHook("toHash", r);
502
+ const s = this._stringify(r.data);
503
+ const i = new TextEncoder;
504
+ const n = i.encode(s);
505
+ let o = this._providers.get(r.algorithm);
506
+ if (!o) {
507
+ o = new A({
508
+ algorithm: this._defaultAlgorithm
509
+ });
510
+ }
511
+ let a = await o.toHash(n);
512
+ if (t?.maxLength && a.length > t?.maxLength) {
513
+ a = a.substring(0, t.maxLength);
514
+ }
515
+ const c = {
516
+ hash: a,
517
+ data: r.data,
518
+ algorithm: r.algorithm
519
+ };
520
+ await this.afterHook("toHash", c);
521
+ return c.hash;
522
+ }
523
+ async toNumber(e, t = {}) {
524
+ const {min: r = 0, max: s = 100, algorithm: i = this._defaultAlgorithm, hashLength: n = 16} = t;
525
+ if (r > s) {
526
+ throw new Error("min cannot be greater than max");
527
+ }
528
+ const o = await this.toHash(e, {
529
+ algorithm: i,
530
+ maxLength: n
531
+ });
532
+ const a = Number.parseInt(o, 16);
533
+ const c = s - r + 1;
534
+ const l = r + a % c;
535
+ return l;
536
+ }
537
+ toHashSync(e, t) {
538
+ const r = {
539
+ data: e,
540
+ algorithm: t?.algorithm ?? this._defaultAlgorithmSync,
541
+ maxLength: t?.maxLength
542
+ };
543
+ this.beforeHook("toHashSync", r);
544
+ const s = r.algorithm;
545
+ const i = this._stringify(r.data);
546
+ const n = new TextEncoder;
547
+ const o = n.encode(i);
548
+ const a = this._providers.get(s);
549
+ if (!a) {
550
+ throw new Error(`Hash provider '${s}' not found`);
551
+ }
552
+ if (!a.toHashSync) {
553
+ throw new Error(`Hash provider '${s}' does not support synchronous hashing. Use toHash() instead or choose a different algorithm (djb2, fnv1, murmer, crc32).`);
554
+ }
555
+ let c = a.toHashSync(o);
556
+ if (t?.maxLength && c.length > t?.maxLength) {
557
+ c = c.substring(0, t.maxLength);
558
+ }
559
+ const l = {
560
+ hash: c,
561
+ data: r.data,
562
+ algorithm: r.algorithm
563
+ };
564
+ this.afterHook("toHashSync", l);
565
+ return l.hash;
566
+ }
567
+ toNumberSync(e, t = {}) {
568
+ const {min: r = 0, max: s = 100, algorithm: i = this._defaultAlgorithmSync, hashLength: n = 16} = t;
569
+ if (r > s) {
570
+ throw new Error("min cannot be greater than max");
571
+ }
572
+ const o = this.toHashSync(e, {
573
+ algorithm: i,
574
+ maxLength: n
575
+ });
576
+ const a = Number.parseInt(o, 16);
577
+ const c = s - r + 1;
578
+ const l = r + a % c;
579
+ return l;
580
+ }
581
+ loadProviders(e, t = {
582
+ includeBase: true
583
+ }) {
584
+ if (e) {
585
+ for (const t of e) {
586
+ this._providers.add(t);
587
+ }
588
+ }
589
+ if (t.includeBase) {
590
+ this.providers.add(new A({
591
+ algorithm: "SHA-256"
592
+ }));
593
+ this.providers.add(new A({
594
+ algorithm: "SHA-384"
595
+ }));
596
+ this.providers.add(new A({
597
+ algorithm: "SHA-512"
598
+ }));
599
+ this.providers.add(new S);
600
+ this.providers.add(new k);
601
+ this.providers.add(new x);
602
+ this.providers.add(new P);
603
+ }
604
+ }
605
+ };
606
+
607
+ var H = e => {
608
+ let t;
609
+ if (e === void 0) {
610
+ return void 0;
611
+ }
612
+ if (typeof e === "number") {
613
+ t = e;
614
+ } else {
615
+ if (typeof e !== "string") {
616
+ return void 0;
617
+ }
618
+ e = e.trim();
619
+ if (Number.isNaN(Number(e))) {
620
+ const r = /^([\d.]+)\s*(ms|s|m|h|hr|d)$/i.exec(e);
621
+ if (!r) {
622
+ throw new Error(`Unsupported time format: "${e}". Use 'ms', 's', 'm', 'h', 'hr', or 'd'.`);
623
+ }
624
+ const [, s, i] = r;
625
+ const n = Number.parseFloat(s);
626
+ const o = i.toLowerCase();
627
+ switch (o) {
628
+ case "ms":
629
+ {
630
+ t = n;
631
+ break;
632
+ }
633
+
634
+ case "s":
635
+ {
636
+ t = n * 1e3;
637
+ break;
638
+ }
639
+
640
+ case "m":
641
+ {
642
+ t = n * 1e3 * 60;
643
+ break;
644
+ }
645
+
646
+ case "h":
647
+ {
648
+ t = n * 1e3 * 60 * 60;
649
+ break;
650
+ }
651
+
652
+ case "hr":
653
+ {
654
+ t = n * 1e3 * 60 * 60;
655
+ break;
656
+ }
657
+
658
+ case "d":
659
+ {
660
+ t = n * 1e3 * 60 * 60 * 24;
661
+ break;
662
+ }
663
+
664
+ default:
665
+ {
666
+ t = Number(e);
667
+ }
668
+ }
669
+ } else {
670
+ t = Number(e);
671
+ }
672
+ }
673
+ return t;
674
+ };
675
+
676
+ var O = (e, t) => {
677
+ t ??= new Date;
678
+ const r = H(e);
679
+ if (r === void 0) {
680
+ return t.getTime();
681
+ }
682
+ return t.getTime() + r;
683
+ };
684
+
685
+ var L = new Map;
200
686
 
201
- function P(e) {
202
- return w.has(e);
687
+ function M(e) {
688
+ return L.has(e);
203
689
  }
204
690
 
205
- function C(e) {
206
- w.set(e, []);
691
+ function I(e) {
692
+ L.set(e, []);
207
693
  }
208
694
 
209
- function S(e) {
210
- w.delete(e);
695
+ function N(e) {
696
+ L.delete(e);
211
697
  }
212
698
 
213
- function x(e, t) {
214
- const r = A(e);
699
+ function E(e, t) {
700
+ const r = U(e);
215
701
  r.push(t);
216
- w.set(e, r);
702
+ L.set(e, r);
217
703
  }
218
704
 
219
- function A(e) {
220
- return w.get(e) ?? [];
705
+ function U(e) {
706
+ return L.get(e) ?? [];
221
707
  }
222
708
 
223
- async function I(e) {
709
+ async function B(e) {
224
710
  return new Promise(((t, r) => {
225
711
  const s = {
226
712
  resolve: t,
227
713
  reject: r
228
714
  };
229
- x(e, s);
715
+ E(e, s);
230
716
  }));
231
717
  }
232
718
 
233
- function M(e) {
234
- const t = A(e);
235
- S(e);
719
+ function D(e) {
720
+ const t = U(e);
721
+ N(e);
236
722
  return t;
237
723
  }
238
724
 
239
- function O(e) {
725
+ function $(e) {
240
726
  const {key: t, error: r, result: s} = e;
241
- for (const e of M(t)) {
727
+ for (const e of D(t)) {
242
728
  if (r) {
243
729
  e.reject(r);
244
730
  } else {
@@ -247,40 +733,422 @@ function O(e) {
247
733
  }
248
734
  }
249
735
 
250
- async function L(e, t) {
251
- if (!P(e)) {
252
- C(e);
736
+ async function T(e, t) {
737
+ if (!M(e)) {
738
+ I(e);
253
739
  try {
254
740
  const r = await Promise.resolve(t());
255
- O({
741
+ $({
256
742
  key: e,
257
743
  result: r
258
744
  });
259
745
  return r;
260
746
  } catch (t) {
261
- O({
747
+ $({
262
748
  key: e,
263
749
  error: t
264
750
  });
265
751
  throw t;
266
752
  }
267
753
  }
268
- return I(e);
754
+ return B(e);
755
+ }
756
+
757
+ var F = (e => {
758
+ e["SHA256"] = "SHA-256";
759
+ e["SHA384"] = "SHA-384";
760
+ e["SHA512"] = "SHA-512";
761
+ e["DJB2"] = "djb2";
762
+ e["FNV1"] = "fnv1";
763
+ e["MURMER"] = "murmer";
764
+ e["CRC32"] = "crc32";
765
+ return e;
766
+ })(F || {});
767
+
768
+ async function V(e, t = {
769
+ algorithm: "SHA-256",
770
+ serialize: JSON.stringify
771
+ }) {
772
+ const r = t?.algorithm ?? "SHA-256";
773
+ const s = t?.serialize ?? JSON.stringify;
774
+ const i = s(e);
775
+ const n = new C;
776
+ return n.toHash(i, {
777
+ algorithm: r
778
+ });
779
+ }
780
+
781
+ function J(e, t = {
782
+ algorithm: "djb2",
783
+ serialize: JSON.stringify
784
+ }) {
785
+ const r = t?.algorithm ?? "djb2";
786
+ const s = t?.serialize ?? JSON.stringify;
787
+ const i = s(e);
788
+ const n = new C;
789
+ return n.toHashSync(i, {
790
+ algorithm: r
791
+ });
792
+ }
793
+
794
+ async function R(e, t = {
795
+ min: 0,
796
+ max: 10,
797
+ algorithm: "SHA-256",
798
+ serialize: JSON.stringify
799
+ }) {
800
+ const r = t?.min ?? 0;
801
+ const s = t?.max ?? 10;
802
+ const i = t?.algorithm ?? "SHA-256";
803
+ const n = t?.serialize ?? JSON.stringify;
804
+ const o = t?.hashLength ?? 16;
805
+ if (r >= s) {
806
+ throw new Error(`Invalid range: min (${r}) must be less than max (${s})`);
807
+ }
808
+ const a = n(e);
809
+ const c = new C;
810
+ return c.toNumber(a, {
811
+ algorithm: i,
812
+ min: r,
813
+ max: s,
814
+ hashLength: o
815
+ });
269
816
  }
270
817
 
271
- function T(e) {
818
+ function K(e, t = {
819
+ min: 0,
820
+ max: 10,
821
+ algorithm: "djb2",
822
+ serialize: JSON.stringify
823
+ }) {
824
+ const r = t?.min ?? 0;
825
+ const s = t?.max ?? 10;
826
+ const i = t?.algorithm ?? "djb2";
827
+ const n = t?.serialize ?? JSON.stringify;
828
+ const o = t?.hashLength ?? 16;
829
+ if (r >= s) {
830
+ throw new Error(`Invalid range: min (${r}) must be less than max (${s})`);
831
+ }
832
+ const a = n(e);
833
+ const c = new C;
834
+ return c.toNumberSync(a, {
835
+ algorithm: i,
836
+ min: r,
837
+ max: s,
838
+ hashLength: o
839
+ });
840
+ }
841
+
842
+ function q(e) {
843
+ if (e === null || e === void 0) {
844
+ return false;
845
+ }
846
+ if (e instanceof i) {
847
+ return true;
848
+ }
849
+ const t = [ "generateIterator", "get", "getMany", "set", "setMany", "delete", "deleteMany", "has", "hasMany", "clear", "disconnect", "serialize", "deserialize" ];
850
+ return t.every((t => typeof e[t] === "function"));
851
+ }
852
+
853
+ function G(e) {
272
854
  return e !== null && typeof e === "object" && !Array.isArray(e);
273
855
  }
274
856
 
275
- function _(e, ...t) {
857
+ function W(e, t) {
858
+ return typeof e === "number" && typeof t === "number" ? e < t : false;
859
+ }
860
+
861
+ function X(e, t) {
862
+ const {ttl: r, keyPrefix: s, cache: i, serialize: n} = t;
863
+ return (...o) => {
864
+ let a = Z(e, o, {
865
+ keyPrefix: s,
866
+ serialize: n
867
+ });
868
+ if (t.createKey) {
869
+ a = t.createKey(e, o, t);
870
+ }
871
+ let c = i.get(a);
872
+ if (c === void 0) {
873
+ try {
874
+ c = e(...o);
875
+ i.set(a, c, r);
876
+ } catch (e) {
877
+ i.emit("error", e);
878
+ if (t.cacheErrors) {
879
+ i.set(a, e, r);
880
+ }
881
+ }
882
+ }
883
+ return c;
884
+ };
885
+ }
886
+
887
+ async function Q(e, t, r) {
888
+ const s = typeof e === "function" ? e(r) : e;
889
+ let i = await r.cache.get(s);
890
+ if (i === void 0) {
891
+ const e = r.cacheId ?? "default";
892
+ const n = `${e}::${s}`;
893
+ i = await T(n, (async () => {
894
+ try {
895
+ const e = await t();
896
+ await r.cache.set(s, e, r.ttl);
897
+ return e;
898
+ } catch (e) {
899
+ r.cache.emit("error", e);
900
+ if (r.cacheErrors) {
901
+ await r.cache.set(s, e, r.ttl);
902
+ }
903
+ if (r.throwErrors) {
904
+ throw e;
905
+ }
906
+ }
907
+ }));
908
+ }
909
+ return i;
910
+ }
911
+
912
+ function Y(e, t) {
913
+ const {keyPrefix: r, serialize: s} = t;
914
+ return async (...i) => {
915
+ let n = Z(e, i, {
916
+ keyPrefix: r,
917
+ serialize: s
918
+ });
919
+ if (t.createKey) {
920
+ n = t.createKey(e, i, t);
921
+ }
922
+ return Q(n, (async () => e(...i)), t);
923
+ };
924
+ }
925
+
926
+ function Z(e, t, r) {
927
+ const {keyPrefix: s, serialize: i} = r || {};
928
+ if (!s) {
929
+ return `${e.name}::${J(t, {
930
+ serialize: i
931
+ })}`;
932
+ }
933
+ return `${s}::${e.name}::${J(t, {
934
+ serialize: i
935
+ })}`;
936
+ }
937
+
938
+ function ee(e, ...t) {
276
939
  return typeof e === "function" ? e(...t) : e;
277
940
  }
278
941
 
279
- function D(e, t) {
280
- return typeof e === "number" && typeof t === "number" ? e < t : false;
942
+ var te = async e => new Promise((t => setTimeout(t, e)));
943
+
944
+ var re = class {
945
+ _hits=0;
946
+ _misses=0;
947
+ _gets=0;
948
+ _sets=0;
949
+ _deletes=0;
950
+ _clears=0;
951
+ _vsize=0;
952
+ _ksize=0;
953
+ _count=0;
954
+ _enabled=false;
955
+ constructor(e) {
956
+ if (e?.enabled) {
957
+ this._enabled = e.enabled;
958
+ }
959
+ }
960
+ get enabled() {
961
+ return this._enabled;
962
+ }
963
+ set enabled(e) {
964
+ this._enabled = e;
965
+ }
966
+ get hits() {
967
+ return this._hits;
968
+ }
969
+ get misses() {
970
+ return this._misses;
971
+ }
972
+ get gets() {
973
+ return this._gets;
974
+ }
975
+ get sets() {
976
+ return this._sets;
977
+ }
978
+ get deletes() {
979
+ return this._deletes;
980
+ }
981
+ get clears() {
982
+ return this._clears;
983
+ }
984
+ get vsize() {
985
+ return this._vsize;
986
+ }
987
+ get ksize() {
988
+ return this._ksize;
989
+ }
990
+ get count() {
991
+ return this._count;
992
+ }
993
+ incrementHits() {
994
+ if (!this._enabled) {
995
+ return;
996
+ }
997
+ this._hits++;
998
+ }
999
+ incrementMisses() {
1000
+ if (!this._enabled) {
1001
+ return;
1002
+ }
1003
+ this._misses++;
1004
+ }
1005
+ incrementGets() {
1006
+ if (!this._enabled) {
1007
+ return;
1008
+ }
1009
+ this._gets++;
1010
+ }
1011
+ incrementSets() {
1012
+ if (!this._enabled) {
1013
+ return;
1014
+ }
1015
+ this._sets++;
1016
+ }
1017
+ incrementDeletes() {
1018
+ if (!this._enabled) {
1019
+ return;
1020
+ }
1021
+ this._deletes++;
1022
+ }
1023
+ incrementClears() {
1024
+ if (!this._enabled) {
1025
+ return;
1026
+ }
1027
+ this._clears++;
1028
+ }
1029
+ incrementVSize(e) {
1030
+ if (!this._enabled) {
1031
+ return;
1032
+ }
1033
+ this._vsize += this.roughSizeOfObject(e);
1034
+ }
1035
+ decreaseVSize(e) {
1036
+ if (!this._enabled) {
1037
+ return;
1038
+ }
1039
+ this._vsize -= this.roughSizeOfObject(e);
1040
+ }
1041
+ incrementKSize(e) {
1042
+ if (!this._enabled) {
1043
+ return;
1044
+ }
1045
+ this._ksize += this.roughSizeOfString(e);
1046
+ }
1047
+ decreaseKSize(e) {
1048
+ if (!this._enabled) {
1049
+ return;
1050
+ }
1051
+ this._ksize -= this.roughSizeOfString(e);
1052
+ }
1053
+ incrementCount() {
1054
+ if (!this._enabled) {
1055
+ return;
1056
+ }
1057
+ this._count++;
1058
+ }
1059
+ decreaseCount() {
1060
+ if (!this._enabled) {
1061
+ return;
1062
+ }
1063
+ this._count--;
1064
+ }
1065
+ setCount(e) {
1066
+ if (!this._enabled) {
1067
+ return;
1068
+ }
1069
+ this._count = e;
1070
+ }
1071
+ roughSizeOfString(e) {
1072
+ return e.length * 2;
1073
+ }
1074
+ roughSizeOfObject(e) {
1075
+ const t = [];
1076
+ const r = [ e ];
1077
+ let s = 0;
1078
+ while (r.length > 0) {
1079
+ const e = r.pop();
1080
+ if (typeof e === "boolean") {
1081
+ s += 4;
1082
+ } else if (typeof e === "string") {
1083
+ s += e.length * 2;
1084
+ } else if (typeof e === "number") {
1085
+ s += 8;
1086
+ } else {
1087
+ if (e === null || e === void 0) {
1088
+ s += 4;
1089
+ continue;
1090
+ }
1091
+ if (t.includes(e)) {
1092
+ continue;
1093
+ }
1094
+ t.push(e);
1095
+ for (const t in e) {
1096
+ s += t.length * 2;
1097
+ r.push(e[t]);
1098
+ }
1099
+ }
1100
+ }
1101
+ return s;
1102
+ }
1103
+ reset() {
1104
+ this._hits = 0;
1105
+ this._misses = 0;
1106
+ this._gets = 0;
1107
+ this._sets = 0;
1108
+ this._deletes = 0;
1109
+ this._clears = 0;
1110
+ this._vsize = 0;
1111
+ this._ksize = 0;
1112
+ this._count = 0;
1113
+ }
1114
+ resetStoreValues() {
1115
+ this._vsize = 0;
1116
+ this._ksize = 0;
1117
+ this._count = 0;
1118
+ }
1119
+ };
1120
+
1121
+ function se(e) {
1122
+ if (e === void 0 || e === null) {
1123
+ return void 0;
1124
+ }
1125
+ const t = Date.now();
1126
+ if (e < t) {
1127
+ return void 0;
1128
+ }
1129
+ return e - t;
1130
+ }
1131
+
1132
+ function ie(e, t, r) {
1133
+ return r ?? t ?? H(e);
281
1134
  }
282
1135
 
283
- var E = class {
1136
+ function ne(e, t) {
1137
+ const r = se(t);
1138
+ const s = e ? Date.now() + e : void 0;
1139
+ if (r === void 0) {
1140
+ return e;
1141
+ }
1142
+ if (s === void 0) {
1143
+ return r;
1144
+ }
1145
+ if (t && t > s) {
1146
+ return e;
1147
+ }
1148
+ return r;
1149
+ }
1150
+
1151
+ var oe = class {
284
1152
  opts;
285
1153
  namespace;
286
1154
  _cache;
@@ -328,19 +1196,21 @@ var E = class {
328
1196
  }
329
1197
  };
330
1198
 
331
- var B = e => {
1199
+ var ae = e => e === 0 ? "primary" : `secondary:${e - 1}`;
1200
+
1201
+ var ce = e => {
332
1202
  const t = new r;
333
- const o = new s;
334
- o.serialize = void 0;
335
- o.deserialize = void 0;
336
- const i = e?.stores?.length ? e.stores : [ o ];
337
- const a = e?.nonBlocking ?? false;
338
- const n = e?.cacheId ?? Math.random().toString(36).slice(2);
1203
+ const s = new i;
1204
+ s.serialize = void 0;
1205
+ s.deserialize = void 0;
1206
+ const n = e?.stores?.length ? e.stores : [ s ];
1207
+ const o = e?.nonBlocking ?? false;
1208
+ const a = e?.cacheId ?? Math.random().toString(36).slice(2);
339
1209
  const c = async e => {
340
1210
  let r;
341
- if (a) {
1211
+ if (o) {
342
1212
  try {
343
- r = await Promise.race(i.map((async t => t.get(e))));
1213
+ r = await Promise.race(n.map((async t => t.get(e))));
344
1214
  if (r === void 0) {
345
1215
  return void 0;
346
1216
  }
@@ -351,40 +1221,79 @@ var B = e => {
351
1221
  });
352
1222
  }
353
1223
  } else {
354
- for (const s of i) {
1224
+ for (let s = 0; s < n.length; s++) {
1225
+ const i = n[s];
355
1226
  try {
356
- const o = await s.get(e);
357
- if (o !== void 0) {
358
- r = o;
1227
+ const n = await i.get(e);
1228
+ if (n !== void 0) {
1229
+ r = n;
359
1230
  t.emit("get", {
360
1231
  key: e,
361
- value: r
1232
+ value: r,
1233
+ store: ae(s)
362
1234
  });
363
1235
  break;
364
1236
  }
365
1237
  } catch (r) {
366
1238
  t.emit("get", {
367
1239
  key: e,
368
- error: r
1240
+ error: r,
1241
+ store: ae(s)
369
1242
  });
370
1243
  }
371
1244
  }
372
1245
  }
373
1246
  return r;
374
1247
  };
375
- const m = async e => {
376
- const t = [];
377
- for (const r of e) {
378
- const e = await c(r);
379
- t.push(e);
1248
+ const l = async e => {
1249
+ let r = e.map((() => void 0));
1250
+ if (o) {
1251
+ try {
1252
+ r = await Promise.race(n.map((async t => t.getMany(e))));
1253
+ } catch (r) {
1254
+ t.emit("mget", {
1255
+ keys: e,
1256
+ error: r
1257
+ });
1258
+ }
1259
+ } else {
1260
+ for (const s of n) {
1261
+ try {
1262
+ const t = r.map(((t, r) => t === void 0 ? {
1263
+ originalIndex: r,
1264
+ key: e[r]
1265
+ } : void 0)).filter((e => e !== void 0));
1266
+ if (t.length === 0) {
1267
+ break;
1268
+ }
1269
+ const i = t.map((e => e.key));
1270
+ const n = await s.getMany(i);
1271
+ for (const [e, s] of n.entries()) {
1272
+ if (s === void 0) {
1273
+ continue;
1274
+ }
1275
+ const {originalIndex: i} = t[e];
1276
+ r[i] = s;
1277
+ }
1278
+ } catch (r) {
1279
+ t.emit("mget", {
1280
+ keys: e,
1281
+ error: r
1282
+ });
1283
+ }
1284
+ }
380
1285
  }
381
- return t;
1286
+ t.emit("mget", {
1287
+ keys: e,
1288
+ values: r
1289
+ });
1290
+ return r;
382
1291
  };
383
- const l = async e => {
1292
+ const h = async e => {
384
1293
  let r;
385
- if (a) {
1294
+ if (o) {
386
1295
  try {
387
- r = await Promise.race(i.map((async t => t.get(e, {
1296
+ r = await Promise.race(n.map((async t => t.get(e, {
388
1297
  raw: true
389
1298
  }))));
390
1299
  if (r === void 0) {
@@ -397,13 +1306,13 @@ var B = e => {
397
1306
  });
398
1307
  }
399
1308
  } else {
400
- for (const s of i) {
1309
+ for (const s of n) {
401
1310
  try {
402
- const o = await s.get(e, {
1311
+ const i = await s.get(e, {
403
1312
  raw: true
404
1313
  });
405
- if (o !== void 0) {
406
- r = o;
1314
+ if (i !== void 0) {
1315
+ r = i;
407
1316
  t.emit("ttl", {
408
1317
  key: e,
409
1318
  value: r
@@ -423,72 +1332,77 @@ var B = e => {
423
1332
  }
424
1333
  return void 0;
425
1334
  };
426
- const p = async (r, s, o, i) => {
1335
+ const m = async (r, s, i, n) => {
427
1336
  try {
428
- if (a) {
429
- Promise.all(r.map((async t => t.set(s, o, i ?? e?.ttl))));
1337
+ const a = r.map((async (r, o) => {
1338
+ await r.set(s, i, n ?? e?.ttl);
430
1339
  t.emit("set", {
431
1340
  key: s,
432
- value: o
1341
+ value: i,
1342
+ store: ae(o)
433
1343
  });
434
- return o;
1344
+ }));
1345
+ if (o) {
1346
+ Promise.all(a);
1347
+ t.emit("set", {
1348
+ key: s,
1349
+ value: i
1350
+ });
1351
+ return i;
435
1352
  }
436
- await Promise.all(r.map((async t => t.set(s, o, i ?? e?.ttl))));
1353
+ await Promise.all(a);
437
1354
  t.emit("set", {
438
1355
  key: s,
439
- value: o
1356
+ value: i
440
1357
  });
441
- return o;
1358
+ return i;
442
1359
  } catch (e) {
443
1360
  t.emit("set", {
444
1361
  key: s,
445
- value: o,
1362
+ value: i,
446
1363
  error: e
447
1364
  });
448
1365
  return Promise.reject(e);
449
1366
  }
450
1367
  };
451
- const h = async (e, r) => {
452
- const s = r.map((({key: e, value: t, ttl: r}) => ({
453
- key: e,
454
- value: t,
455
- ttl: r
1368
+ const u = async (r, s) => {
1369
+ const i = s.map((({key: t, value: r, ttl: s}) => ({
1370
+ key: t,
1371
+ value: r,
1372
+ ttl: s ?? e?.ttl
456
1373
  })));
457
1374
  try {
458
- const s = [];
459
- for (const t of r) {
460
- s.push(...e.map((async e => e.set(t.key, t.value, t.ttl))));
461
- }
462
- if (a) {
463
- Promise.all(s);
1375
+ const e = r.map((async e => e.setMany(i)));
1376
+ if (o) {
1377
+ Promise.all(e);
464
1378
  t.emit("mset", {
465
- list: r
1379
+ list: i
466
1380
  });
467
- return r;
1381
+ return i;
468
1382
  }
469
- await Promise.all(s);
1383
+ await Promise.all(e);
470
1384
  t.emit("mset", {
471
- list: r
1385
+ list: i
472
1386
  });
473
- return r;
1387
+ return i;
474
1388
  } catch (e) {
475
1389
  t.emit("mset", {
476
- list: r,
1390
+ list: i,
477
1391
  error: e
478
1392
  });
479
1393
  return Promise.reject(e);
480
1394
  }
481
1395
  };
482
- const d = async e => {
1396
+ const f = async e => {
483
1397
  try {
484
- if (a) {
485
- Promise.all(i.map((async t => t.delete(e))));
1398
+ if (o) {
1399
+ Promise.all(n.map((async t => t.delete(e))));
486
1400
  t.emit("del", {
487
1401
  key: e
488
1402
  });
489
1403
  return true;
490
1404
  }
491
- await Promise.all(i.map((async t => t.delete(e))));
1405
+ await Promise.all(n.map((async t => t.delete(e))));
492
1406
  t.emit("del", {
493
1407
  key: e
494
1408
  });
@@ -501,13 +1415,13 @@ var B = e => {
501
1415
  return Promise.reject(r);
502
1416
  }
503
1417
  };
504
- const u = async e => {
1418
+ const d = async e => {
505
1419
  try {
506
1420
  const r = [];
507
1421
  for (const t of e) {
508
- r.push(...i.map((async e => e.delete(t))));
1422
+ r.push(...n.map((async e => e.delete(t))));
509
1423
  }
510
- if (a) {
1424
+ if (o) {
511
1425
  Promise.all(r);
512
1426
  t.emit("mdel", {
513
1427
  keys: e
@@ -527,14 +1441,14 @@ var B = e => {
527
1441
  return Promise.reject(r);
528
1442
  }
529
1443
  };
530
- const y = async () => {
1444
+ const p = async () => {
531
1445
  try {
532
- if (a) {
533
- Promise.all(i.map((async e => e.clear())));
1446
+ if (o) {
1447
+ Promise.all(n.map((async e => e.clear())));
534
1448
  t.emit("clear");
535
1449
  return true;
536
1450
  }
537
- await Promise.all(i.map((async e => e.clear())));
1451
+ await Promise.all(n.map((async e => e.clear())));
538
1452
  t.emit("clear");
539
1453
  return true;
540
1454
  } catch (e) {
@@ -542,26 +1456,26 @@ var B = e => {
542
1456
  return Promise.reject(e);
543
1457
  }
544
1458
  };
545
- const f = async (r, s, o, a) => L(`${n}::${r}`, (async () => {
1459
+ const y = async (r, s, i, o) => T(`${a}::${r}`, (async () => {
546
1460
  let c;
547
- let m;
548
- let l = 0;
549
- let h;
550
- const {ttl: d, refreshThreshold: u, raw: y} = T(o) ? o : {
551
- ttl: o,
552
- refreshThreshold: a
1461
+ let l;
1462
+ let h = 0;
1463
+ let u;
1464
+ const {ttl: f, refreshThreshold: d, raw: p} = G(i) ? i : {
1465
+ ttl: i,
1466
+ refreshThreshold: o
553
1467
  };
554
- const f = t => _(d, t) ?? e?.ttl;
555
- for (;l < i.length; l++) {
1468
+ const y = t => ee(f, t) ?? e?.ttl;
1469
+ for (;h < n.length; h++) {
556
1470
  try {
557
- const e = await i[l].get(r, {
1471
+ const e = await n[h].get(r, {
558
1472
  raw: true
559
1473
  });
560
1474
  if (e !== void 0) {
561
1475
  c = e.value;
562
- m = e;
1476
+ l = e;
563
1477
  if (typeof e.expires === "number") {
564
- h = Math.max(0, e.expires - Date.now());
1478
+ u = Math.max(0, e.expires - Date.now());
565
1479
  }
566
1480
  break;
567
1481
  }
@@ -569,18 +1483,18 @@ var B = e => {
569
1483
  }
570
1484
  if (c === void 0) {
571
1485
  const e = await s();
572
- const t = f(e);
573
- await p(i, r, e, t);
574
- return y ? {
1486
+ const t = y(e);
1487
+ await m(n, r, e, t);
1488
+ return p ? {
575
1489
  value: e,
576
1490
  expires: Date.now() + t
577
1491
  } : e;
578
1492
  }
579
- const j = D(h, _(u, c) ?? e?.refreshThreshold);
580
- if (j) {
581
- L(`+++${n}__${r}`, s).then((async s => {
1493
+ const g = W(u, ee(d, c) ?? e?.refreshThreshold);
1494
+ if (g) {
1495
+ T(`+++${a}__${r}`, s).then((async s => {
582
1496
  try {
583
- await p(e?.refreshAllStores ? i : i.slice(0, l + 1), r, s, f(s));
1497
+ await m(e?.refreshAllStores ? n : n.slice(0, h + 1), r, s, y(s));
584
1498
  t.emit("refresh", {
585
1499
  key: r,
586
1500
  value: s
@@ -600,40 +1514,40 @@ var B = e => {
600
1514
  });
601
1515
  }));
602
1516
  }
603
- if (!j && l > 0) {
604
- await p(i.slice(0, l), r, c, f(c));
1517
+ if (!g && h > 0) {
1518
+ await m(n.slice(0, h), r, c, y(c));
605
1519
  }
606
- return y ? m : c;
1520
+ return p ? l : c;
607
1521
  }));
608
- const j = (e, r) => t.addListener(e, r);
1522
+ const g = (e, r) => t.addListener(e, r);
609
1523
  const b = (e, r) => t.removeListener(e, r);
610
1524
  const v = async () => {
611
1525
  try {
612
- await Promise.all(i.map((async e => e.disconnect())));
1526
+ await Promise.all(n.map((async e => e.disconnect())));
613
1527
  } catch (e) {
614
1528
  return Promise.reject(e);
615
1529
  }
616
1530
  };
617
- const g = () => n;
1531
+ const _ = () => a;
618
1532
  return {
619
1533
  get: c,
620
- mget: m,
621
- ttl: l,
622
- set: async (e, t, r) => p(i, e, t, r),
623
- mset: async e => h(i, e),
624
- del: d,
625
- mdel: u,
626
- clear: y,
627
- wrap: f,
628
- on: j,
1534
+ mget: l,
1535
+ ttl: h,
1536
+ set: async (e, t, r) => m(n, e, t, r),
1537
+ mset: async e => u(n, e),
1538
+ del: f,
1539
+ mdel: d,
1540
+ clear: p,
1541
+ wrap: y,
1542
+ on: g,
629
1543
  off: b,
630
1544
  disconnect: v,
631
- cacheId: g,
632
- stores: i
1545
+ cacheId: _,
1546
+ stores: n
633
1547
  };
634
1548
  };
635
1549
 
636
- const N = e => ({
1550
+ const le = e => ({
637
1551
  class: Cacher,
638
1552
  stores: e?.stores,
639
1553
  ttl: e?.ttl,
@@ -643,28 +1557,28 @@ const N = e => ({
643
1557
  cacheId: e?.cacheId
644
1558
  });
645
1559
 
646
- class Cacher extends o {
1560
+ class Cacher extends n {
647
1561
  async init() {
648
1562
  const e = this.stores ? Array.isArray(this.stores) ? this.stores : [ this.stores ] : [];
649
1563
  const t = await Promise.all(e.map((e => {
650
1564
  switch (e.type) {
651
1565
  case "file":
652
- return n(e);
1566
+ return c(e);
653
1567
 
654
1568
  case "redis":
655
- return c(e);
1569
+ return l(e);
656
1570
 
657
1571
  case "memcache":
658
- return m(e);
1572
+ return h(e);
659
1573
 
660
1574
  case "mongo":
661
- return l(e);
1575
+ return m(e);
662
1576
 
663
1577
  case "sqlite":
664
- return p(e);
1578
+ return u(e);
665
1579
 
666
1580
  case "postgres":
667
- return h(e);
1581
+ return f(e);
668
1582
 
669
1583
  case "mysql":
670
1584
  return d(e);
@@ -674,7 +1588,7 @@ class Cacher extends o {
674
1588
  }
675
1589
  })));
676
1590
  const r = t.filter((e => !!e));
677
- this.cache = B({
1591
+ this.cache = ce({
678
1592
  stores: r.length ? r : undefined,
679
1593
  ttl: this.ttl,
680
1594
  refreshThreshold: this.refreshThreshold,
@@ -721,16 +1635,16 @@ class Cacher extends o {
721
1635
  }
722
1636
  }
723
1637
 
724
- e([ i(u.Alternatives(u.Array(u.Alternatives(y.Schema(), f.Schema(), j.Schema(), b.Schema(), v.Schema(), g.Schema(), k.Schema())), y.Schema(), f.Schema(), j.Schema(), b.Schema(), v.Schema(), g.Schema(), k.Schema()).optional()), t("design:type", Object) ], Cacher.prototype, "stores", void 0);
1638
+ e([ o(p.Alternatives(p.Array(p.Alternatives(y.Schema(), g.Schema(), b.Schema(), v.Schema(), _.Schema(), j.Schema(), w.Schema())), y.Schema(), g.Schema(), b.Schema(), v.Schema(), _.Schema(), j.Schema(), w.Schema()).optional()), t("design:type", Object) ], Cacher.prototype, "stores", void 0);
725
1639
 
726
- e([ i(u.Number().positive().integer().optional()), t("design:type", Number) ], Cacher.prototype, "ttl", void 0);
1640
+ e([ o(p.Number().positive().integer().optional()), t("design:type", Number) ], Cacher.prototype, "ttl", void 0);
727
1641
 
728
- e([ i(u.Number().positive().integer().optional()), t("design:type", Number) ], Cacher.prototype, "refreshThreshold", void 0);
1642
+ e([ o(p.Number().positive().integer().optional()), t("design:type", Number) ], Cacher.prototype, "refreshThreshold", void 0);
729
1643
 
730
- e([ i(u.Boolean().optional()), t("design:type", Boolean) ], Cacher.prototype, "refreshAllStores", void 0);
1644
+ e([ o(p.Boolean().optional()), t("design:type", Boolean) ], Cacher.prototype, "refreshAllStores", void 0);
731
1645
 
732
- e([ i(u.Boolean().optional()), t("design:type", Boolean) ], Cacher.prototype, "nonBlocking", void 0);
1646
+ e([ o(p.Boolean().optional()), t("design:type", Boolean) ], Cacher.prototype, "nonBlocking", void 0);
733
1647
 
734
- e([ i(u.String().optional()), t("design:type", String) ], Cacher.prototype, "cacheId", void 0);
1648
+ e([ o(p.String().optional()), t("design:type", String) ], Cacher.prototype, "cacheId", void 0);
735
1649
 
736
- export { N as BuildCacherOptions, Cacher };
1650
+ export { le as BuildCacherOptions, Cacher };