lakutata 2.0.34 → 2.0.36

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 (360) hide show
  1. package/com/cacher.cjs +229 -0
  2. package/com/cacher.d.ts +514 -0
  3. package/com/cacher.mjs +203 -0
  4. package/com/database.cjs +11 -5
  5. package/com/database.mjs +11 -5
  6. package/com/docker.cjs +26 -18
  7. package/com/docker.mjs +22 -14
  8. package/com/entrypoint.cjs +4 -2
  9. package/com/entrypoint.mjs +4 -2
  10. package/com/logger.cjs +9 -3
  11. package/com/logger.mjs +9 -3
  12. package/decorator/ctrl.cjs +4 -2
  13. package/decorator/ctrl.mjs +4 -2
  14. package/decorator/di.cjs +3 -1
  15. package/decorator/di.mjs +3 -1
  16. package/decorator/dto.cjs +3 -1
  17. package/decorator/dto.mjs +3 -1
  18. package/decorator/orm.cjs +27 -21
  19. package/decorator/orm.mjs +11 -5
  20. package/helper.cjs +17 -15
  21. package/helper.mjs +4 -2
  22. package/lakutata.cjs +14 -8
  23. package/lakutata.mjs +10 -4
  24. package/orm.cjs +25 -19
  25. package/orm.mjs +22 -16
  26. package/package.json +6 -1
  27. package/provider/database.cjs +11 -5
  28. package/provider/database.mjs +11 -5
  29. package/provider/passwordHash.cjs +3 -1
  30. package/provider/passwordHash.mjs +3 -1
  31. package/src/components/Database.cjs +11 -5
  32. package/src/components/Database.mjs +11 -5
  33. package/src/components/Logger.cjs +9 -3
  34. package/src/components/Logger.mjs +9 -3
  35. package/src/components/cacher/Cacher.cjs +734 -0
  36. package/src/components/cacher/Cacher.mjs +720 -0
  37. package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +3094 -0
  38. package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +3066 -0
  39. package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.cjs +33 -0
  40. package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.mjs +35 -0
  41. package/src/components/cacher/adapters/CreateMongoCacheAdapter.cjs +38 -0
  42. package/src/components/cacher/adapters/CreateMongoCacheAdapter.mjs +40 -0
  43. package/src/components/cacher/adapters/CreateMysqlCacheAdapter.cjs +31 -0
  44. package/src/components/cacher/adapters/CreateMysqlCacheAdapter.mjs +33 -0
  45. package/src/components/cacher/adapters/CreatePostgresCacheAdapter.cjs +40 -0
  46. package/src/components/cacher/adapters/CreatePostgresCacheAdapter.mjs +42 -0
  47. package/src/components/cacher/adapters/CreateRedisCacheAdapter.cjs +43 -0
  48. package/src/components/cacher/adapters/CreateRedisCacheAdapter.mjs +45 -0
  49. package/src/components/cacher/adapters/CreateSqliteCacheAdapter.cjs +35 -0
  50. package/src/components/cacher/adapters/CreateSqliteCacheAdapter.mjs +37 -0
  51. package/src/components/cacher/options/CacherOptions.cjs +95 -0
  52. package/src/components/cacher/options/CacherOptions.mjs +89 -0
  53. package/src/components/cacher/options/FileCacheOptions.cjs +79 -0
  54. package/src/components/cacher/options/FileCacheOptions.mjs +73 -0
  55. package/src/components/cacher/options/MemcacheCacheOptions.cjs +81 -0
  56. package/src/components/cacher/options/MemcacheCacheOptions.mjs +75 -0
  57. package/src/components/cacher/options/MongoCacheOptions.cjs +85 -0
  58. package/src/components/cacher/options/MongoCacheOptions.mjs +79 -0
  59. package/src/components/cacher/options/MysqlCacheOptions.cjs +85 -0
  60. package/src/components/cacher/options/MysqlCacheOptions.mjs +79 -0
  61. package/src/components/cacher/options/PostgresCacheOptions.cjs +89 -0
  62. package/src/components/cacher/options/PostgresCacheOptions.mjs +83 -0
  63. package/src/components/cacher/options/RedisCacheOptions.cjs +101 -0
  64. package/src/components/cacher/options/RedisCacheOptions.mjs +95 -0
  65. package/src/components/cacher/options/SqliteCacheOptions.cjs +79 -0
  66. package/src/components/cacher/options/SqliteCacheOptions.mjs +73 -0
  67. package/src/components/cacher/types/CacheStoreOptions.cjs +1 -0
  68. package/src/components/cacher/types/CacheStoreOptions.mjs +1 -0
  69. package/src/components/docker/ConnectionOptionsBuilder.cjs +22 -14
  70. package/src/components/docker/ConnectionOptionsBuilder.mjs +22 -14
  71. package/src/components/docker/Docker.cjs +22 -14
  72. package/src/components/docker/Docker.mjs +22 -14
  73. package/src/components/docker/lib/DockerContainer.cjs +34 -26
  74. package/src/components/docker/lib/DockerContainer.mjs +26 -18
  75. package/src/components/docker/lib/DockerContainerTTY.cjs +18 -10
  76. package/src/components/docker/lib/DockerContainerTTY.mjs +18 -10
  77. package/src/components/docker/lib/DockerImage.cjs +11 -9
  78. package/src/components/docker/lib/DockerImage.mjs +3 -1
  79. package/src/components/docker/options/DockerPruneOptions.cjs +3 -1
  80. package/src/components/docker/options/DockerPruneOptions.mjs +3 -1
  81. package/src/components/docker/options/auth/DockerAuthOptions.cjs +3 -1
  82. package/src/components/docker/options/auth/DockerAuthOptions.mjs +3 -1
  83. package/src/components/docker/options/container/ContainerCommitOptions.cjs +3 -1
  84. package/src/components/docker/options/container/ContainerCommitOptions.mjs +3 -1
  85. package/src/components/docker/options/container/ContainerCreateTTYOptions.cjs +3 -1
  86. package/src/components/docker/options/container/ContainerCreateTTYOptions.mjs +3 -1
  87. package/src/components/docker/options/container/ContainerExecOptions.cjs +3 -1
  88. package/src/components/docker/options/container/ContainerExecOptions.mjs +5 -3
  89. package/src/components/docker/options/container/ContainerExportDirectoryOptions.cjs +3 -1
  90. package/src/components/docker/options/container/ContainerExportDirectoryOptions.mjs +3 -1
  91. package/src/components/docker/options/container/ContainerKillOptions.cjs +3 -1
  92. package/src/components/docker/options/container/ContainerKillOptions.mjs +3 -1
  93. package/src/components/docker/options/container/ContainerLogsOptions.cjs +3 -1
  94. package/src/components/docker/options/container/ContainerLogsOptions.mjs +3 -1
  95. package/src/components/docker/options/container/ContainerRemoveOptions.cjs +3 -1
  96. package/src/components/docker/options/container/ContainerRemoveOptions.mjs +3 -1
  97. package/src/components/docker/options/container/ContainerSettingOptions.cjs +3 -1
  98. package/src/components/docker/options/container/ContainerSettingOptions.mjs +3 -1
  99. package/src/components/docker/options/container/ContainerStopOptions.cjs +3 -1
  100. package/src/components/docker/options/container/ContainerStopOptions.mjs +3 -1
  101. package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.cjs +3 -1
  102. package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.mjs +3 -1
  103. package/src/components/docker/options/image/ImageBuildOptions.cjs +3 -1
  104. package/src/components/docker/options/image/ImageBuildOptions.mjs +5 -3
  105. package/src/components/docker/options/image/ImageExportOptions.cjs +3 -1
  106. package/src/components/docker/options/image/ImageExportOptions.mjs +3 -1
  107. package/src/components/docker/options/image/ImageImportOptions.cjs +3 -1
  108. package/src/components/docker/options/image/ImageImportOptions.mjs +3 -1
  109. package/src/components/docker/options/image/ImagePullOptions.cjs +3 -1
  110. package/src/components/docker/options/image/ImagePullOptions.mjs +3 -1
  111. package/src/components/docker/options/image/ImagePushOptions.cjs +3 -1
  112. package/src/components/docker/options/image/ImagePushOptions.mjs +3 -1
  113. package/src/components/docker/options/image/ImageRemoveOptions.cjs +3 -1
  114. package/src/components/docker/options/image/ImageRemoveOptions.mjs +3 -1
  115. package/src/components/docker/options/image/ImageTagOptions.cjs +3 -1
  116. package/src/components/docker/options/image/ImageTagOptions.mjs +3 -1
  117. package/src/components/docker/options/network/NetworkCreateOptions.cjs +3 -1
  118. package/src/components/docker/options/network/NetworkCreateOptions.mjs +3 -1
  119. package/src/components/entrypoint/Entrypoint.cjs +4 -2
  120. package/src/components/entrypoint/Entrypoint.mjs +49 -47
  121. package/src/components/entrypoint/lib/Controller.cjs +3 -1
  122. package/src/components/entrypoint/lib/Controller.mjs +3 -1
  123. package/src/decorators/ctrl/CLIAction.cjs +6 -4
  124. package/src/decorators/ctrl/CLIAction.mjs +4 -2
  125. package/src/decorators/ctrl/HTTPAction.cjs +4 -2
  126. package/src/decorators/ctrl/HTTPAction.mjs +9 -7
  127. package/src/decorators/ctrl/ServiceAction.cjs +8 -6
  128. package/src/decorators/ctrl/ServiceAction.mjs +4 -2
  129. package/src/decorators/ctrl/http/DELETE.cjs +4 -2
  130. package/src/decorators/ctrl/http/DELETE.mjs +4 -2
  131. package/src/decorators/ctrl/http/GET.cjs +4 -2
  132. package/src/decorators/ctrl/http/GET.mjs +4 -2
  133. package/src/decorators/ctrl/http/HEAD.cjs +4 -2
  134. package/src/decorators/ctrl/http/HEAD.mjs +4 -2
  135. package/src/decorators/ctrl/http/OPTIONS.cjs +4 -2
  136. package/src/decorators/ctrl/http/OPTIONS.mjs +4 -2
  137. package/src/decorators/ctrl/http/PATCH.cjs +4 -2
  138. package/src/decorators/ctrl/http/PATCH.mjs +4 -2
  139. package/src/decorators/ctrl/http/POST.cjs +4 -2
  140. package/src/decorators/ctrl/http/POST.mjs +4 -2
  141. package/src/decorators/ctrl/http/PUT.cjs +4 -2
  142. package/src/decorators/ctrl/http/PUT.mjs +4 -2
  143. package/src/decorators/di/Configurable.cjs +3 -1
  144. package/src/decorators/di/Configurable.mjs +3 -1
  145. package/src/decorators/di/Inject.cjs +11 -9
  146. package/src/decorators/di/Inject.mjs +10 -8
  147. package/src/decorators/dto/Accept.cjs +3 -1
  148. package/src/decorators/dto/Accept.mjs +3 -1
  149. package/src/decorators/dto/Expect.cjs +3 -1
  150. package/src/decorators/dto/Expect.mjs +3 -1
  151. package/src/decorators/dto/IndexSignature.cjs +3 -1
  152. package/src/decorators/dto/IndexSignature.mjs +3 -1
  153. package/src/decorators/dto/Return.cjs +3 -1
  154. package/src/decorators/dto/Return.mjs +3 -1
  155. package/src/decorators/orm/AfterInsert.cjs +11 -5
  156. package/src/decorators/orm/AfterInsert.mjs +17 -11
  157. package/src/decorators/orm/AfterLoad.cjs +15 -9
  158. package/src/decorators/orm/AfterLoad.mjs +20 -14
  159. package/src/decorators/orm/AfterRecover.cjs +15 -9
  160. package/src/decorators/orm/AfterRecover.mjs +16 -10
  161. package/src/decorators/orm/AfterRemove.cjs +15 -9
  162. package/src/decorators/orm/AfterRemove.mjs +16 -10
  163. package/src/decorators/orm/AfterSoftRemove.cjs +11 -5
  164. package/src/decorators/orm/AfterSoftRemove.mjs +16 -10
  165. package/src/decorators/orm/AfterUpdate.cjs +11 -5
  166. package/src/decorators/orm/AfterUpdate.mjs +18 -12
  167. package/src/decorators/orm/BeforeInsert.cjs +17 -11
  168. package/src/decorators/orm/BeforeInsert.mjs +15 -9
  169. package/src/decorators/orm/BeforeRecover.cjs +18 -12
  170. package/src/decorators/orm/BeforeRecover.mjs +13 -7
  171. package/src/decorators/orm/BeforeRemove.cjs +18 -12
  172. package/src/decorators/orm/BeforeRemove.mjs +13 -7
  173. package/src/decorators/orm/BeforeSoftRemove.cjs +17 -11
  174. package/src/decorators/orm/BeforeSoftRemove.mjs +13 -7
  175. package/src/decorators/orm/BeforeUpdate.cjs +15 -9
  176. package/src/decorators/orm/BeforeUpdate.mjs +16 -10
  177. package/src/decorators/orm/Check.cjs +11 -5
  178. package/src/decorators/orm/Check.mjs +11 -5
  179. package/src/decorators/orm/ChildEntity.cjs +16 -10
  180. package/src/decorators/orm/ChildEntity.mjs +13 -7
  181. package/src/decorators/orm/Column.cjs +28 -22
  182. package/src/decorators/orm/Column.mjs +11 -5
  183. package/src/decorators/orm/CreateDateColumn.cjs +13 -7
  184. package/src/decorators/orm/CreateDateColumn.mjs +11 -5
  185. package/src/decorators/orm/DeleteDateColumn.cjs +13 -7
  186. package/src/decorators/orm/DeleteDateColumn.mjs +11 -5
  187. package/src/decorators/orm/Entity.cjs +15 -9
  188. package/src/decorators/orm/Entity.mjs +17 -11
  189. package/src/decorators/orm/EventSubscriber.cjs +11 -5
  190. package/src/decorators/orm/EventSubscriber.mjs +11 -5
  191. package/src/decorators/orm/Exclusion.cjs +11 -5
  192. package/src/decorators/orm/Exclusion.mjs +17 -11
  193. package/src/decorators/orm/Generated.cjs +13 -7
  194. package/src/decorators/orm/Generated.mjs +17 -11
  195. package/src/decorators/orm/Index.cjs +19 -13
  196. package/src/decorators/orm/Index.mjs +29 -23
  197. package/src/decorators/orm/JoinColumn.cjs +15 -9
  198. package/src/decorators/orm/JoinColumn.mjs +11 -5
  199. package/src/decorators/orm/JoinTable.cjs +11 -5
  200. package/src/decorators/orm/JoinTable.mjs +15 -9
  201. package/src/decorators/orm/ManyToMany.cjs +18 -12
  202. package/src/decorators/orm/ManyToMany.mjs +22 -16
  203. package/src/decorators/orm/ManyToOne.cjs +21 -15
  204. package/src/decorators/orm/ManyToOne.mjs +22 -16
  205. package/src/decorators/orm/ObjectIdColumn.cjs +11 -5
  206. package/src/decorators/orm/ObjectIdColumn.mjs +17 -11
  207. package/src/decorators/orm/OneToMany.cjs +19 -13
  208. package/src/decorators/orm/OneToMany.mjs +11 -5
  209. package/src/decorators/orm/OneToOne.cjs +20 -14
  210. package/src/decorators/orm/OneToOne.mjs +18 -12
  211. package/src/decorators/orm/PrimaryColumn.cjs +15 -9
  212. package/src/decorators/orm/PrimaryColumn.mjs +30 -24
  213. package/src/decorators/orm/PrimaryGeneratedColumn.cjs +11 -5
  214. package/src/decorators/orm/PrimaryGeneratedColumn.mjs +13 -7
  215. package/src/decorators/orm/RelationId.cjs +16 -10
  216. package/src/decorators/orm/RelationId.mjs +17 -11
  217. package/src/decorators/orm/TableInheritance.cjs +13 -7
  218. package/src/decorators/orm/TableInheritance.mjs +15 -9
  219. package/src/decorators/orm/Tree.cjs +11 -5
  220. package/src/decorators/orm/Tree.mjs +11 -5
  221. package/src/decorators/orm/TreeChildren.cjs +11 -5
  222. package/src/decorators/orm/TreeChildren.mjs +22 -16
  223. package/src/decorators/orm/TreeLevelColumn.cjs +11 -5
  224. package/src/decorators/orm/TreeLevelColumn.mjs +11 -5
  225. package/src/decorators/orm/TreeParent.cjs +17 -11
  226. package/src/decorators/orm/TreeParent.mjs +11 -5
  227. package/src/decorators/orm/Unique.cjs +18 -12
  228. package/src/decorators/orm/Unique.mjs +11 -5
  229. package/src/decorators/orm/UpdateDateColumn.cjs +13 -7
  230. package/src/decorators/orm/UpdateDateColumn.mjs +17 -11
  231. package/src/decorators/orm/VersionColumn.cjs +11 -5
  232. package/src/decorators/orm/VersionColumn.mjs +11 -5
  233. package/src/decorators/orm/ViewColumn.cjs +11 -5
  234. package/src/decorators/orm/ViewColumn.mjs +11 -5
  235. package/src/decorators/orm/ViewEntity.cjs +13 -7
  236. package/src/decorators/orm/ViewEntity.mjs +11 -5
  237. package/src/decorators/orm/VirtualColumn.cjs +11 -5
  238. package/src/decorators/orm/VirtualColumn.mjs +15 -9
  239. package/src/lib/base/BaseObject.cjs +3 -1
  240. package/src/lib/base/BaseObject.mjs +3 -1
  241. package/src/lib/base/Context.cjs +3 -1
  242. package/src/lib/base/Context.mjs +3 -1
  243. package/src/lib/base/internal/ApplicationConfigLoader.cjs +3 -1
  244. package/src/lib/base/internal/ApplicationConfigLoader.mjs +3 -1
  245. package/src/lib/base/internal/ControllerEntrypoint.cjs +1 -1
  246. package/src/lib/base/internal/ControllerEntrypoint.mjs +1 -1
  247. package/src/lib/base/internal/DataValidator.cjs +16 -14
  248. package/src/lib/base/internal/DataValidator.mjs +3 -1
  249. package/src/lib/base/internal/FlexibleDTO.cjs +3 -1
  250. package/src/lib/base/internal/FlexibleDTO.mjs +3 -1
  251. package/src/lib/base/internal/MethodValidation.cjs +18 -16
  252. package/src/lib/base/internal/MethodValidation.mjs +3 -1
  253. package/src/lib/base/internal/ModuleConfigLoader.cjs +3 -1
  254. package/src/lib/base/internal/ModuleConfigLoader.mjs +24 -22
  255. package/src/lib/base/internal/ObjectConfiguration.cjs +3 -1
  256. package/src/lib/base/internal/ObjectConfiguration.mjs +3 -1
  257. package/src/lib/base/internal/ObjectSchemaValidation.cjs +3 -1
  258. package/src/lib/base/internal/ObjectSchemaValidation.mjs +3 -1
  259. package/src/lib/base/internal/ObjectType.cjs +3 -1
  260. package/src/lib/base/internal/ObjectType.mjs +3 -1
  261. package/src/lib/context/CLIContext.cjs +3 -1
  262. package/src/lib/context/CLIContext.mjs +3 -1
  263. package/src/lib/context/HTTPContext.cjs +3 -1
  264. package/src/lib/context/HTTPContext.mjs +3 -1
  265. package/src/lib/context/ServiceContext.cjs +3 -1
  266. package/src/lib/context/ServiceContext.mjs +3 -1
  267. package/src/lib/core/Application.cjs +19 -13
  268. package/src/lib/core/Application.mjs +15 -9
  269. package/src/lib/core/Component.cjs +3 -1
  270. package/src/lib/core/Component.mjs +3 -1
  271. package/src/lib/core/Container.cjs +2 -0
  272. package/src/lib/core/Container.mjs +2 -0
  273. package/src/lib/core/DTO.cjs +3 -1
  274. package/src/lib/core/DTO.mjs +3 -1
  275. package/src/lib/core/Module.cjs +4 -2
  276. package/src/lib/core/Module.mjs +4 -2
  277. package/src/lib/core/Provider.cjs +3 -1
  278. package/src/lib/core/Provider.mjs +3 -1
  279. package/src/lib/helpers/IsSymbol.cjs +3 -1
  280. package/src/lib/helpers/IsSymbol.mjs +3 -1
  281. package/src/lib/helpers/NonceStr.cjs +1 -1
  282. package/src/lib/helpers/NonceStr.mjs +1 -1
  283. package/src/lib/helpers/ObjectHash.cjs +1 -1
  284. package/src/lib/helpers/ObjectHash.mjs +1 -1
  285. package/src/lib/helpers/RandomString.cjs +1 -1
  286. package/src/lib/helpers/RandomString.mjs +1 -1
  287. package/src/lib/ioc/DependencyInjectionContainer.cjs +3 -1
  288. package/src/lib/ioc/DependencyInjectionContainer.mjs +13 -11
  289. package/src/lib/ioc/Errors.cjs +3 -1
  290. package/src/lib/ioc/Errors.mjs +3 -1
  291. package/src/lib/ioc/ListModules.cjs +104 -102
  292. package/src/lib/ioc/ListModules.mjs +4 -2
  293. package/src/lib/ioc/LoadModules.cjs +2 -0
  294. package/src/lib/ioc/LoadModules.mjs +2 -0
  295. package/src/lib/ioc/Resolvers.cjs +9 -7
  296. package/src/lib/ioc/Resolvers.mjs +3 -1
  297. package/src/lib/ioc/Utils.cjs +3 -1
  298. package/src/lib/ioc/Utils.mjs +3 -1
  299. package/src/lib/validation/VLD.cjs +3 -1
  300. package/src/lib/validation/VLD.mjs +3 -1
  301. package/src/options/ApplicationOptions.cjs +3 -1
  302. package/src/options/ApplicationOptions.mjs +3 -1
  303. package/src/options/LoadAnonymousObjectOptions.cjs +3 -1
  304. package/src/options/LoadAnonymousObjectOptions.mjs +3 -1
  305. package/src/options/LoadNamedObjectOptions.cjs +3 -1
  306. package/src/options/LoadNamedObjectOptions.mjs +3 -1
  307. package/src/options/LoadObjectOptions.cjs +3 -1
  308. package/src/options/LoadObjectOptions.mjs +3 -1
  309. package/src/options/ModuleLoadObjectsOptions.cjs +3 -1
  310. package/src/options/ModuleLoadObjectsOptions.mjs +3 -1
  311. package/src/options/ModuleOptions.cjs +3 -1
  312. package/src/options/ModuleOptions.mjs +3 -1
  313. package/src/options/OverridableNamedObjectOptions.cjs +3 -1
  314. package/src/options/OverridableNamedObjectOptions.mjs +3 -1
  315. package/src/options/OverridableObjectOptions.cjs +3 -1
  316. package/src/options/OverridableObjectOptions.mjs +3 -1
  317. package/src/providers/Database.cjs +11 -5
  318. package/src/providers/Database.mjs +11 -5
  319. package/src/providers/PasswordHash.cjs +17 -15
  320. package/src/providers/PasswordHash.mjs +212 -210
  321. package/vendor/Package.10.cjs +0 -2
  322. package/vendor/Package.10.mjs +0 -2
  323. package/vendor/Package.11.cjs +1 -9
  324. package/vendor/Package.11.mjs +1 -9
  325. package/vendor/Package.12.cjs +5 -79
  326. package/vendor/Package.12.mjs +5 -73
  327. package/vendor/{Package.112.cjs → Package.122.cjs} +5501 -5501
  328. package/vendor/{Package.112.mjs → Package.122.mjs} +5507 -5507
  329. package/vendor/Package.13.cjs +7 -1
  330. package/vendor/Package.13.mjs +7 -1
  331. package/vendor/Package.132.cjs +87 -0
  332. package/vendor/Package.132.mjs +79 -0
  333. package/vendor/Package.14.cjs +1 -14055
  334. package/vendor/Package.14.mjs +1 -14029
  335. package/vendor/Package.15.cjs +1 -48245
  336. package/vendor/Package.15.mjs +1 -48209
  337. package/vendor/Package.16.cjs +14063 -0
  338. package/vendor/Package.16.mjs +14035 -0
  339. package/vendor/Package.17.cjs +3 -0
  340. package/vendor/Package.17.mjs +1 -0
  341. package/vendor/Package.18.cjs +48255 -0
  342. package/vendor/Package.18.mjs +48215 -0
  343. package/vendor/Package.19.cjs +3 -0
  344. package/vendor/Package.19.mjs +1 -0
  345. package/vendor/Package.610.cjs +175 -0
  346. package/vendor/Package.610.mjs +157 -0
  347. package/vendor/Package.611.cjs +196 -0
  348. package/vendor/Package.611.mjs +180 -0
  349. package/vendor/Package.62.cjs +1 -1
  350. package/vendor/Package.62.mjs +1 -1
  351. package/vendor/Package.65.cjs +716 -0
  352. package/vendor/Package.65.mjs +710 -0
  353. package/vendor/Package.66.cjs +680 -0
  354. package/vendor/Package.66.mjs +652 -0
  355. package/vendor/Package.67.cjs +143 -0
  356. package/vendor/Package.67.mjs +127 -0
  357. package/vendor/Package.68.cjs +341 -0
  358. package/vendor/Package.68.mjs +327 -0
  359. package/vendor/Package.69.cjs +157 -0
  360. package/vendor/Package.69.mjs +139 -0
@@ -0,0 +1,680 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, {
4
+ value: "Module"
5
+ });
6
+
7
+ const e = require("@redis/client");
8
+
9
+ const t = require("./Package.65.cjs");
10
+
11
+ const r = require("cluster-key-slot");
12
+
13
+ require("buffer");
14
+
15
+ const s = e => e && e.__esModule ? e : {
16
+ default: e
17
+ };
18
+
19
+ const i = s(r);
20
+
21
+ var n = class {
22
+ _eventListeners;
23
+ _maxListeners;
24
+ _logger;
25
+ constructor(e) {
26
+ this._eventListeners = new Map, this._maxListeners = 100, this._logger = e?.logger;
27
+ }
28
+ once(e, t) {
29
+ let r = (...s) => {
30
+ this.off(e, r), t(...s);
31
+ };
32
+ return this.on(e, r), this;
33
+ }
34
+ listenerCount(e) {
35
+ if (!e) return this.getAllListeners().length;
36
+ let t = this._eventListeners.get(e);
37
+ return t ? t.length : 0;
38
+ }
39
+ eventNames() {
40
+ return [ ...this._eventListeners.keys() ];
41
+ }
42
+ rawListeners(e) {
43
+ return e ? this._eventListeners.get(e) ?? [] : this.getAllListeners();
44
+ }
45
+ prependListener(e, t) {
46
+ let r = this._eventListeners.get(e) ?? [];
47
+ return r.unshift(t), this._eventListeners.set(e, r), this;
48
+ }
49
+ prependOnceListener(e, t) {
50
+ let r = (...s) => {
51
+ this.off(e, r), t(...s);
52
+ };
53
+ return this.prependListener(e, r), this;
54
+ }
55
+ maxListeners() {
56
+ return this._maxListeners;
57
+ }
58
+ addListener(e, t) {
59
+ return this.on(e, t), this;
60
+ }
61
+ on(e, t) {
62
+ this._eventListeners.has(e) || this._eventListeners.set(e, []);
63
+ let r = this._eventListeners.get(e);
64
+ return r && (r.length >= this._maxListeners && console.warn(`MaxListenersExceededWarning: Possible event memory leak detected. ${r.length + 1} ${e} listeners added. Use setMaxListeners() to increase limit.`),
65
+ r.push(t)), this;
66
+ }
67
+ removeListener(e, t) {
68
+ return this.off(e, t), this;
69
+ }
70
+ off(e, t) {
71
+ let r = this._eventListeners.get(e) ?? [], s = r.indexOf(t);
72
+ return s !== -1 && r.splice(s, 1), r.length === 0 && this._eventListeners.delete(e),
73
+ this;
74
+ }
75
+ emit(e, ...t) {
76
+ let r = !1, s = this._eventListeners.get(e);
77
+ if (s && s.length > 0) for (let e of s) e(...t), r = !0;
78
+ return r;
79
+ }
80
+ listeners(e) {
81
+ return this._eventListeners.get(e) ?? [];
82
+ }
83
+ removeAllListeners(e) {
84
+ return e ? this._eventListeners.delete(e) : this._eventListeners.clear(), this;
85
+ }
86
+ setMaxListeners(e) {
87
+ this._maxListeners = e;
88
+ for (let t of this._eventListeners.values()) t.length > e && t.splice(e);
89
+ }
90
+ getAllListeners() {
91
+ let e = new Array;
92
+ for (let t of this._eventListeners.values()) e = [ ...e, ...t ];
93
+ return e;
94
+ }
95
+ };
96
+
97
+ var o = class extends n {
98
+ _hooks;
99
+ _throwHookErrors=!1;
100
+ constructor(e) {
101
+ super({
102
+ logger: e?.logger
103
+ }), this._hooks = new Map, e?.throwHookErrors !== void 0 && (this._throwHookErrors = e.throwHookErrors);
104
+ }
105
+ get hooks() {
106
+ return this._hooks;
107
+ }
108
+ get throwHookErrors() {
109
+ return this._throwHookErrors;
110
+ }
111
+ set throwHookErrors(e) {
112
+ this._throwHookErrors = e;
113
+ }
114
+ get logger() {
115
+ return this._logger;
116
+ }
117
+ set logger(e) {
118
+ this._logger = e;
119
+ }
120
+ onHook(e, t) {
121
+ let r = this._hooks.get(e);
122
+ r ? r.push(t) : this._hooks.set(e, [ t ]);
123
+ }
124
+ addHook(e, t) {
125
+ this.onHook(e, t);
126
+ }
127
+ onHooks(e) {
128
+ for (let t of e) this.onHook(t.event, t.handler);
129
+ }
130
+ prependHook(e, t) {
131
+ let r = this._hooks.get(e);
132
+ r ? r.unshift(t) : this._hooks.set(e, [ t ]);
133
+ }
134
+ prependOnceHook(e, t) {
135
+ let r = async (...s) => (this.removeHook(e, r), t(...s));
136
+ this.prependHook(e, r);
137
+ }
138
+ onceHook(e, t) {
139
+ let r = async (...s) => (this.removeHook(e, r), t(...s));
140
+ this.onHook(e, r);
141
+ }
142
+ removeHook(e, t) {
143
+ let r = this._hooks.get(e);
144
+ if (r) {
145
+ let e = r.indexOf(t);
146
+ e !== -1 && r.splice(e, 1);
147
+ }
148
+ }
149
+ removeHooks(e) {
150
+ for (let t of e) this.removeHook(t.event, t.handler);
151
+ }
152
+ async hook(e, ...t) {
153
+ let r = this._hooks.get(e);
154
+ if (r) for (let s of r) try {
155
+ await s(...t);
156
+ } catch (t) {
157
+ let r = `${e}: ${t.message}`;
158
+ if (this.emit("error", new Error(r)), this._logger && this._logger.error(r), this._throwHookErrors) throw new Error(r);
159
+ }
160
+ }
161
+ async callHook(e, ...t) {
162
+ await this.hook(e, ...t);
163
+ }
164
+ getHooks(e) {
165
+ return this._hooks.get(e);
166
+ }
167
+ clearHooks() {
168
+ this._hooks.clear();
169
+ }
170
+ };
171
+
172
+ var a = (e => {
173
+ e["RedisClientNotConnectedThrown"] = "Redis client is not connected or has failed to connect. This is thrown because throwOnConnectError is set to true.";
174
+ return e;
175
+ })(a || {});
176
+
177
+ var c = e => {
178
+ const t = Math.min(2 ** e * 100, 2e3);
179
+ const r = (Math.random() - .5) * 100;
180
+ return t + r;
181
+ };
182
+
183
+ var h = class extends o {
184
+ _client=e.createClient();
185
+ _namespace;
186
+ _keyPrefixSeparator="::";
187
+ _clearBatchSize=1e3;
188
+ _useUnlink=true;
189
+ _noNamespaceAffectsAll=false;
190
+ _throwOnConnectError=true;
191
+ _throwErrors=false;
192
+ _connectionTimeout;
193
+ constructor(t, r) {
194
+ super();
195
+ const s = {
196
+ reconnectStrategy: c
197
+ };
198
+ if (t) {
199
+ if (typeof t === "string") {
200
+ this._client = e.createClient({
201
+ url: t,
202
+ socket: s
203
+ });
204
+ } else if (t.connect !== void 0) {
205
+ this._client = this.isClientCluster(t) ? t : t;
206
+ } else if (t instanceof Object) {
207
+ this._client = t.rootNodes === void 0 ? e.createClient(t) : e.createCluster(t);
208
+ }
209
+ }
210
+ this.setOptions(r);
211
+ this.initClient();
212
+ }
213
+ get client() {
214
+ return this._client;
215
+ }
216
+ set client(e) {
217
+ this._client = e;
218
+ this.initClient();
219
+ }
220
+ get opts() {
221
+ let e = "redis://localhost:6379";
222
+ if (this._client.options) {
223
+ const t = this._client.options?.url;
224
+ if (t) {
225
+ e = t;
226
+ }
227
+ }
228
+ const t = {
229
+ namespace: this._namespace,
230
+ keyPrefixSeparator: this._keyPrefixSeparator,
231
+ clearBatchSize: this._clearBatchSize,
232
+ noNamespaceAffectsAll: this._noNamespaceAffectsAll,
233
+ useUnlink: this._useUnlink,
234
+ throwOnConnectError: this._throwOnConnectError,
235
+ throwErrors: this._throwErrors,
236
+ connectionTimeout: this._connectionTimeout,
237
+ dialect: "redis",
238
+ url: e
239
+ };
240
+ return t;
241
+ }
242
+ set opts(e) {
243
+ this.setOptions(e);
244
+ }
245
+ get namespace() {
246
+ return this._namespace;
247
+ }
248
+ set namespace(e) {
249
+ this._namespace = e;
250
+ }
251
+ get keyPrefixSeparator() {
252
+ return this._keyPrefixSeparator;
253
+ }
254
+ set keyPrefixSeparator(e) {
255
+ this._keyPrefixSeparator = e;
256
+ }
257
+ get clearBatchSize() {
258
+ return this._clearBatchSize;
259
+ }
260
+ set clearBatchSize(e) {
261
+ if (e > 0) {
262
+ this._clearBatchSize = e;
263
+ } else {
264
+ this.emit("error", "clearBatchSize must be greater than 0");
265
+ }
266
+ }
267
+ get useUnlink() {
268
+ return this._useUnlink;
269
+ }
270
+ set useUnlink(e) {
271
+ this._useUnlink = e;
272
+ }
273
+ get noNamespaceAffectsAll() {
274
+ return this._noNamespaceAffectsAll;
275
+ }
276
+ set noNamespaceAffectsAll(e) {
277
+ this._noNamespaceAffectsAll = e;
278
+ }
279
+ get throwOnConnectError() {
280
+ return this._throwOnConnectError;
281
+ }
282
+ set throwOnConnectError(e) {
283
+ this._throwOnConnectError = e;
284
+ }
285
+ get throwErrors() {
286
+ return this._throwErrors;
287
+ }
288
+ set throwErrors(e) {
289
+ this._throwErrors = e;
290
+ }
291
+ get connectionTimeout() {
292
+ return this._connectionTimeout;
293
+ }
294
+ set connectionTimeout(e) {
295
+ this._connectionTimeout = e;
296
+ }
297
+ async getClient() {
298
+ if (this._client.isOpen) {
299
+ return this._client;
300
+ }
301
+ try {
302
+ if (this._connectionTimeout === void 0) {
303
+ await this._client.connect();
304
+ } else {
305
+ await Promise.race([ this._client.connect(), this.createTimeoutPromise(this._connectionTimeout) ]);
306
+ }
307
+ } catch (e) {
308
+ this.emit("error", e);
309
+ if (this._throwOnConnectError) {
310
+ throw new Error("Redis client is not connected or has failed to connect. This is thrown because throwOnConnectError is set to true.");
311
+ }
312
+ await this.disconnect(true);
313
+ }
314
+ this.initClient();
315
+ return this._client;
316
+ }
317
+ async set(e, t, r) {
318
+ const s = await this.getClient();
319
+ try {
320
+ e = this.createKeyPrefix(e, this._namespace);
321
+ if (r) {
322
+ await s.set(e, t, {
323
+ PX: r
324
+ });
325
+ } else {
326
+ await s.set(e, t);
327
+ }
328
+ } catch (e) {
329
+ this.emit("error", e);
330
+ if (this._throwErrors) {
331
+ throw e;
332
+ }
333
+ }
334
+ }
335
+ async setMany(e) {
336
+ const t = await this.getClient();
337
+ try {
338
+ const r = t.multi();
339
+ for (const {key: t, value: s, ttl: i} of e) {
340
+ const e = this.createKeyPrefix(t, this._namespace);
341
+ if (i) {
342
+ r.set(e, s, {
343
+ PX: i
344
+ });
345
+ } else {
346
+ r.set(e, s);
347
+ }
348
+ }
349
+ await r.exec();
350
+ } catch (e) {
351
+ this.emit("error", e);
352
+ if (this._throwErrors) {
353
+ throw e;
354
+ }
355
+ }
356
+ }
357
+ async has(e) {
358
+ const t = await this.getClient();
359
+ try {
360
+ e = this.createKeyPrefix(e, this._namespace);
361
+ const r = await t.exists(e);
362
+ return r === 1;
363
+ } catch (e) {
364
+ this.emit("error", e);
365
+ if (this._throwErrors) {
366
+ throw e;
367
+ }
368
+ return false;
369
+ }
370
+ }
371
+ async hasMany(e) {
372
+ const t = await this.getClient();
373
+ try {
374
+ const r = t.multi();
375
+ for (const t of e) {
376
+ const e = this.createKeyPrefix(t, this._namespace);
377
+ r.exists(e);
378
+ }
379
+ const s = await r.exec();
380
+ return s.map((e => e === 1));
381
+ } catch (t) {
382
+ this.emit("error", t);
383
+ if (this._throwErrors) {
384
+ throw t;
385
+ }
386
+ return Array.from({
387
+ length: e.length
388
+ }).fill(false);
389
+ }
390
+ }
391
+ async get(e) {
392
+ const t = await this.getClient();
393
+ try {
394
+ e = this.createKeyPrefix(e, this._namespace);
395
+ const r = await t.get(e);
396
+ if (r === null) {
397
+ return void 0;
398
+ }
399
+ return r;
400
+ } catch (e) {
401
+ this.emit("error", e);
402
+ if (this._throwErrors) {
403
+ throw e;
404
+ }
405
+ return void 0;
406
+ }
407
+ }
408
+ async getMany(e) {
409
+ if (e.length === 0) {
410
+ return [];
411
+ }
412
+ e = e.map((e => this.createKeyPrefix(e, this._namespace)));
413
+ try {
414
+ const t = await this.mget(e);
415
+ return t;
416
+ } catch (t) {
417
+ this.emit("error", t);
418
+ if (this._throwErrors) {
419
+ throw t;
420
+ }
421
+ return Array.from({
422
+ length: e.length
423
+ }).fill(void 0);
424
+ }
425
+ }
426
+ async delete(e) {
427
+ const t = await this.getClient();
428
+ try {
429
+ e = this.createKeyPrefix(e, this._namespace);
430
+ let r = 0;
431
+ r = await (this._useUnlink ? t.unlink(e) : t.del(e));
432
+ return r > 0;
433
+ } catch (e) {
434
+ this.emit("error", e);
435
+ if (this._throwErrors) {
436
+ throw e;
437
+ }
438
+ return false;
439
+ }
440
+ }
441
+ async deleteMany(e) {
442
+ let t = false;
443
+ const r = await this.getClient();
444
+ try {
445
+ const s = r.multi();
446
+ for (const t of e) {
447
+ const e = this.createKeyPrefix(t, this._namespace);
448
+ if (this._useUnlink) {
449
+ s.unlink(e);
450
+ } else {
451
+ s.del(e);
452
+ }
453
+ }
454
+ const i = await s.exec();
455
+ for (const e of i) {
456
+ if (typeof e === "number" && e > 0) {
457
+ t = true;
458
+ }
459
+ }
460
+ } catch (e) {
461
+ this.emit("error", e);
462
+ if (this._throwErrors) {
463
+ throw e;
464
+ }
465
+ }
466
+ return t;
467
+ }
468
+ async disconnect(e) {
469
+ if (this._client.isOpen) {
470
+ await (e ? this._client.disconnect() : this._client.quit());
471
+ }
472
+ }
473
+ createKeyPrefix(e, t) {
474
+ if (t) {
475
+ return `${t}${this._keyPrefixSeparator}${e}`;
476
+ }
477
+ return e;
478
+ }
479
+ getKeyWithoutPrefix(e, t) {
480
+ if (t) {
481
+ return e.replace(`${t}${this._keyPrefixSeparator}`, "");
482
+ }
483
+ return e;
484
+ }
485
+ isCluster() {
486
+ return this.isClientCluster(this._client);
487
+ }
488
+ async getMasterNodes() {
489
+ if (this.isCluster()) {
490
+ const e = await this.getClient();
491
+ return Promise.all(e.masters.map((async t => e.nodeClient(t))));
492
+ }
493
+ return [ await this.getClient() ];
494
+ }
495
+ async* iterator(e) {
496
+ const t = await this.getMasterNodes();
497
+ for (const r of t) {
498
+ const t = e ? `${e}${this._keyPrefixSeparator}*` : "*";
499
+ let s = "0";
500
+ do {
501
+ const i = await r.scan(Number.parseInt(s, 10), {
502
+ MATCH: t,
503
+ TYPE: "string"
504
+ });
505
+ s = i.cursor.toString();
506
+ let {keys: n} = i;
507
+ if (!e && !this._noNamespaceAffectsAll) {
508
+ n = n.filter((e => !e.includes(this._keyPrefixSeparator)));
509
+ }
510
+ if (n.length > 0) {
511
+ const t = await this.mget(n);
512
+ for (const r of n.keys()) {
513
+ const s = this.getKeyWithoutPrefix(n[r], e);
514
+ const i = t[r];
515
+ yield [ s, i ];
516
+ }
517
+ }
518
+ } while (s !== "0");
519
+ }
520
+ }
521
+ async clear() {
522
+ try {
523
+ const e = await this.getMasterNodes();
524
+ await Promise.all(e.map((async e => {
525
+ if (!this._namespace && this._noNamespaceAffectsAll) {
526
+ await e.flushDb();
527
+ return;
528
+ }
529
+ let t = "0";
530
+ const r = this._clearBatchSize;
531
+ const s = this._namespace ? `${this._namespace}${this._keyPrefixSeparator}*` : "*";
532
+ const i = [];
533
+ do {
534
+ const n = await e.scan(Number.parseInt(t, 10), {
535
+ MATCH: s,
536
+ COUNT: r,
537
+ TYPE: "string"
538
+ });
539
+ t = n.cursor.toString();
540
+ let {keys: o} = n;
541
+ if (o.length === 0) {
542
+ continue;
543
+ }
544
+ if (!this._namespace) {
545
+ o = o.filter((e => !e.includes(this._keyPrefixSeparator)));
546
+ }
547
+ i.push(this.clearWithClusterSupport(o));
548
+ } while (t !== "0");
549
+ await Promise.all(i);
550
+ })));
551
+ } catch (e) {
552
+ this.emit("error", e);
553
+ }
554
+ }
555
+ async mget(e) {
556
+ const t = this.getSlotMap(e);
557
+ const r = new Map;
558
+ await Promise.all(Array.from(t.entries(), (async ([e, t]) => {
559
+ const s = await this.getSlotMaster(e);
560
+ const i = await s.mGet(t);
561
+ for (const [e, s] of i.entries()) {
562
+ r.set(t[e], s ?? void 0);
563
+ }
564
+ })));
565
+ return e.map((e => r.get(e)));
566
+ }
567
+ async clearWithClusterSupport(e) {
568
+ if (e.length > 0) {
569
+ const t = this.getSlotMap(e);
570
+ await Promise.all(Array.from(t.entries(), (async ([e, t]) => {
571
+ const r = await this.getSlotMaster(e);
572
+ return this._useUnlink ? r.unlink(t) : r.del(t);
573
+ })));
574
+ }
575
+ }
576
+ async getSlotMaster(e) {
577
+ const t = await this.getClient();
578
+ if (this.isCluster()) {
579
+ const r = t;
580
+ const s = r.slots[e].master;
581
+ return r.nodeClient(s);
582
+ }
583
+ return t;
584
+ }
585
+ getSlotMap(e) {
586
+ const t = new Map;
587
+ if (this.isCluster()) {
588
+ for (const r of e) {
589
+ const e = i.default(r);
590
+ const s = t.get(e) ?? [];
591
+ s.push(r);
592
+ t.set(e, s);
593
+ }
594
+ } else {
595
+ t.set(0, e);
596
+ }
597
+ return t;
598
+ }
599
+ isClientCluster(e) {
600
+ if (e.options === void 0 && e.scan === void 0) {
601
+ return true;
602
+ }
603
+ return false;
604
+ }
605
+ setOptions(e) {
606
+ if (!e) {
607
+ return;
608
+ }
609
+ if (e.namespace) {
610
+ this._namespace = e.namespace;
611
+ }
612
+ if (e.keyPrefixSeparator !== void 0) {
613
+ this._keyPrefixSeparator = e.keyPrefixSeparator;
614
+ }
615
+ if (e.clearBatchSize !== void 0 && e.clearBatchSize > 0) {
616
+ this._clearBatchSize = e.clearBatchSize;
617
+ }
618
+ if (e.useUnlink !== void 0) {
619
+ this._useUnlink = e.useUnlink;
620
+ }
621
+ if (e.noNamespaceAffectsAll !== void 0) {
622
+ this._noNamespaceAffectsAll = e.noNamespaceAffectsAll;
623
+ }
624
+ if (e.throwOnConnectError !== void 0) {
625
+ this._throwOnConnectError = e.throwOnConnectError;
626
+ }
627
+ if (e.throwErrors !== void 0) {
628
+ this._throwErrors = e.throwErrors;
629
+ }
630
+ if (e.connectionTimeout !== void 0) {
631
+ this._connectionTimeout = e.connectionTimeout;
632
+ }
633
+ }
634
+ initClient() {
635
+ this._client.on("connect", (() => {
636
+ this.emit("connect", this._client);
637
+ }));
638
+ this._client.on("disconnect", (() => {
639
+ this.emit("disconnect", this._client);
640
+ }));
641
+ this._client.on("reconnecting", (e => {
642
+ this.emit("reconnecting", e);
643
+ }));
644
+ }
645
+ async createTimeoutPromise(e) {
646
+ return new Promise(((t, r) => setTimeout((() => {
647
+ r(new Error(`Redis timed out after ${e}ms`));
648
+ }), e)));
649
+ }
650
+ };
651
+
652
+ function l(e, r) {
653
+ e ??= "redis://localhost:6379";
654
+ const s = new h(e, r);
655
+ const i = new t.Keyv(s, {
656
+ namespace: r?.namespace,
657
+ useKeyPrefix: false
658
+ });
659
+ return i;
660
+ }
661
+
662
+ Object.defineProperty(exports, "createClient", {
663
+ enumerable: true,
664
+ get: () => e.createClient
665
+ });
666
+
667
+ Object.defineProperty(exports, "createCluster", {
668
+ enumerable: true,
669
+ get: () => e.createCluster
670
+ });
671
+
672
+ exports.Keyv = t.Keyv;
673
+
674
+ exports.RedisErrorMessages = a;
675
+
676
+ exports.createKeyv = l;
677
+
678
+ exports.default = h;
679
+
680
+ exports.defaultReconnectStrategy = c;