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,710 @@
1
+ import { Buffer as e } from "buffer";
2
+
3
+ var t = s => {
4
+ if (s === void 0 || s === null) {
5
+ return "null";
6
+ }
7
+ if (typeof s === "string") {
8
+ return JSON.stringify(s.startsWith(":") ? ":" + s : s);
9
+ }
10
+ if (e.isBuffer(s)) {
11
+ return JSON.stringify(":base64:" + s.toString("base64"));
12
+ }
13
+ if (s?.toJSON) {
14
+ s = s.toJSON();
15
+ }
16
+ if (typeof s === "object") {
17
+ let e = "";
18
+ const i = Array.isArray(s);
19
+ e = i ? "[" : "{";
20
+ let r = true;
21
+ for (const o in s) {
22
+ const a = typeof s[o] === "function" || !i && s[o] === void 0;
23
+ if (!Object.hasOwn(s, o) || a) {
24
+ continue;
25
+ }
26
+ if (!r) {
27
+ e += ",";
28
+ }
29
+ r = false;
30
+ if (i) {
31
+ e += t(s[o]);
32
+ } else if (s[o] !== void 0) {
33
+ e += t(o) + ":" + t(s[o]);
34
+ }
35
+ }
36
+ e += i ? "]" : "}";
37
+ return e;
38
+ }
39
+ return JSON.stringify(s);
40
+ };
41
+
42
+ var s = t => JSON.parse(t, ((t, s) => {
43
+ if (typeof s === "string") {
44
+ if (s.startsWith(":base64:")) {
45
+ return e.from(s.slice(8), "base64");
46
+ }
47
+ return s.startsWith(":") ? s.slice(1) : s;
48
+ }
49
+ return s;
50
+ }));
51
+
52
+ var i = class {
53
+ _eventListeners;
54
+ _maxListeners;
55
+ constructor() {
56
+ this._eventListeners = new Map;
57
+ this._maxListeners = 100;
58
+ }
59
+ maxListeners() {
60
+ return this._maxListeners;
61
+ }
62
+ addListener(e, t) {
63
+ this.on(e, t);
64
+ }
65
+ on(e, t) {
66
+ if (!this._eventListeners.has(e)) {
67
+ this._eventListeners.set(e, []);
68
+ }
69
+ const s = this._eventListeners.get(e);
70
+ if (s) {
71
+ if (s.length >= this._maxListeners) {
72
+ console.warn(`MaxListenersExceededWarning: Possible event memory leak detected. ${s.length + 1} ${e} listeners added. Use setMaxListeners() to increase limit.`);
73
+ }
74
+ s.push(t);
75
+ }
76
+ return this;
77
+ }
78
+ removeListener(e, t) {
79
+ this.off(e, t);
80
+ }
81
+ off(e, t) {
82
+ const s = this._eventListeners.get(e) ?? [];
83
+ const i = s.indexOf(t);
84
+ if (i !== -1) {
85
+ s.splice(i, 1);
86
+ }
87
+ if (s.length === 0) {
88
+ this._eventListeners.delete(e);
89
+ }
90
+ }
91
+ once(e, t) {
92
+ const s = (...i) => {
93
+ t(...i);
94
+ this.off(e, s);
95
+ };
96
+ this.on(e, s);
97
+ }
98
+ emit(e, ...t) {
99
+ const s = this._eventListeners.get(e);
100
+ if (s && s.length > 0) {
101
+ for (const e of s) {
102
+ e(...t);
103
+ }
104
+ }
105
+ }
106
+ listeners(e) {
107
+ return this._eventListeners.get(e) ?? [];
108
+ }
109
+ removeAllListeners(e) {
110
+ if (e) {
111
+ this._eventListeners.delete(e);
112
+ } else {
113
+ this._eventListeners.clear();
114
+ }
115
+ }
116
+ setMaxListeners(e) {
117
+ this._maxListeners = e;
118
+ }
119
+ };
120
+
121
+ var r = i;
122
+
123
+ var o = class extends r {
124
+ _hookHandlers;
125
+ constructor() {
126
+ super();
127
+ this._hookHandlers = new Map;
128
+ }
129
+ addHandler(e, t) {
130
+ const s = this._hookHandlers.get(e);
131
+ if (s) {
132
+ s.push(t);
133
+ } else {
134
+ this._hookHandlers.set(e, [ t ]);
135
+ }
136
+ }
137
+ removeHandler(e, t) {
138
+ const s = this._hookHandlers.get(e);
139
+ if (s) {
140
+ const e = s.indexOf(t);
141
+ if (e !== -1) {
142
+ s.splice(e, 1);
143
+ }
144
+ }
145
+ }
146
+ trigger(e, t) {
147
+ const s = this._hookHandlers.get(e);
148
+ if (s) {
149
+ for (const i of s) {
150
+ try {
151
+ i(t);
152
+ } catch (t) {
153
+ this.emit("error", new Error(`Error in hook handler for event "${e}": ${t.message}`));
154
+ }
155
+ }
156
+ }
157
+ }
158
+ get handlers() {
159
+ return new Map(this._hookHandlers);
160
+ }
161
+ };
162
+
163
+ var a = o;
164
+
165
+ var n = class extends r {
166
+ enabled=true;
167
+ hits=0;
168
+ misses=0;
169
+ sets=0;
170
+ deletes=0;
171
+ errors=0;
172
+ constructor(e) {
173
+ super();
174
+ if (e !== void 0) {
175
+ this.enabled = e;
176
+ }
177
+ this.reset();
178
+ }
179
+ hit() {
180
+ if (this.enabled) {
181
+ this.hits++;
182
+ }
183
+ }
184
+ miss() {
185
+ if (this.enabled) {
186
+ this.misses++;
187
+ }
188
+ }
189
+ set() {
190
+ if (this.enabled) {
191
+ this.sets++;
192
+ }
193
+ }
194
+ delete() {
195
+ if (this.enabled) {
196
+ this.deletes++;
197
+ }
198
+ }
199
+ reset() {
200
+ this.hits = 0;
201
+ this.misses = 0;
202
+ this.sets = 0;
203
+ this.deletes = 0;
204
+ this.errors = 0;
205
+ }
206
+ };
207
+
208
+ var h = n;
209
+
210
+ var l = (e => {
211
+ e["PRE_SET"] = "preSet";
212
+ e["POST_SET"] = "postSet";
213
+ e["PRE_GET"] = "preGet";
214
+ e["POST_GET"] = "postGet";
215
+ e["PRE_GET_MANY"] = "preGetMany";
216
+ e["POST_GET_MANY"] = "postGetMany";
217
+ e["PRE_DELETE"] = "preDelete";
218
+ e["POST_DELETE"] = "postDelete";
219
+ return e;
220
+ })(l || {});
221
+
222
+ var c = [ "sqlite", "postgres", "mysql", "mongo", "redis", "valkey", "etcd" ];
223
+
224
+ var f = class extends r {
225
+ opts;
226
+ iterator;
227
+ hooks=new a;
228
+ stats=new h(false);
229
+ _ttl;
230
+ _namespace;
231
+ _store=new Map;
232
+ _serialize=t;
233
+ _deserialize=s;
234
+ _compression;
235
+ _useKeyPrefix=true;
236
+ constructor(e, i) {
237
+ super();
238
+ i ??= {};
239
+ e ??= {};
240
+ this.opts = {
241
+ namespace: "keyv",
242
+ serialize: t,
243
+ deserialize: s,
244
+ emitErrors: true,
245
+ store: new Map,
246
+ ...i
247
+ };
248
+ if (e && e.get) {
249
+ this.opts.store = e;
250
+ } else {
251
+ this.opts = {
252
+ ...this.opts,
253
+ ...e
254
+ };
255
+ }
256
+ this._store = this.opts.store ?? new Map;
257
+ this._compression = this.opts.compression;
258
+ this._serialize = this.opts.serialize;
259
+ this._deserialize = this.opts.deserialize;
260
+ if (this.opts.namespace) {
261
+ this._namespace = this.opts.namespace;
262
+ }
263
+ if (this._store) {
264
+ if (!this._isValidStorageAdapter(this._store)) {
265
+ throw new Error("Invalid storage adapter");
266
+ }
267
+ if (typeof this._store.on === "function") {
268
+ this._store.on("error", (e => this.emit("error", e)));
269
+ }
270
+ this._store.namespace = this._namespace;
271
+ if (typeof this._store[Symbol.iterator] === "function" && this._store instanceof Map) {
272
+ this.iterator = this.generateIterator(this._store);
273
+ } else if ("iterator" in this._store && this._store.opts && this._checkIterableAdapter()) {
274
+ this.iterator = this.generateIterator(this._store.iterator.bind(this._store));
275
+ }
276
+ }
277
+ if (this.opts.stats) {
278
+ this.stats.enabled = this.opts.stats;
279
+ }
280
+ if (this.opts.ttl) {
281
+ this._ttl = this.opts.ttl;
282
+ }
283
+ if (this.opts.useKeyPrefix !== void 0) {
284
+ this._useKeyPrefix = this.opts.useKeyPrefix;
285
+ }
286
+ }
287
+ get store() {
288
+ return this._store;
289
+ }
290
+ set store(e) {
291
+ if (this._isValidStorageAdapter(e)) {
292
+ this._store = e;
293
+ this.opts.store = e;
294
+ if (typeof e.on === "function") {
295
+ e.on("error", (e => this.emit("error", e)));
296
+ }
297
+ if (this._namespace) {
298
+ this._store.namespace = this._namespace;
299
+ }
300
+ if (typeof e[Symbol.iterator] === "function" && e instanceof Map) {
301
+ this.iterator = this.generateIterator(e);
302
+ } else if ("iterator" in e && e.opts && this._checkIterableAdapter()) {
303
+ this.iterator = this.generateIterator(e.iterator.bind(e));
304
+ }
305
+ } else {
306
+ throw new Error("Invalid storage adapter");
307
+ }
308
+ }
309
+ get compression() {
310
+ return this._compression;
311
+ }
312
+ set compression(e) {
313
+ this._compression = e;
314
+ }
315
+ get namespace() {
316
+ return this._namespace;
317
+ }
318
+ set namespace(e) {
319
+ this._namespace = e;
320
+ this.opts.namespace = e;
321
+ this._store.namespace = e;
322
+ if (this.opts.store) {
323
+ this.opts.store.namespace = e;
324
+ }
325
+ }
326
+ get ttl() {
327
+ return this._ttl;
328
+ }
329
+ set ttl(e) {
330
+ this.opts.ttl = e;
331
+ this._ttl = e;
332
+ }
333
+ get serialize() {
334
+ return this._serialize;
335
+ }
336
+ set serialize(e) {
337
+ this.opts.serialize = e;
338
+ this._serialize = e;
339
+ }
340
+ get deserialize() {
341
+ return this._deserialize;
342
+ }
343
+ set deserialize(e) {
344
+ this.opts.deserialize = e;
345
+ this._deserialize = e;
346
+ }
347
+ get useKeyPrefix() {
348
+ return this._useKeyPrefix;
349
+ }
350
+ set useKeyPrefix(e) {
351
+ this._useKeyPrefix = e;
352
+ this.opts.useKeyPrefix = e;
353
+ }
354
+ generateIterator(e) {
355
+ const t = async function*() {
356
+ for await (const [t, s] of typeof e === "function" ? e(this._store.namespace) : e) {
357
+ const e = await this.deserializeData(s);
358
+ if (this._useKeyPrefix && this._store.namespace && !t.includes(this._store.namespace)) {
359
+ continue;
360
+ }
361
+ if (typeof e.expires === "number" && Date.now() > e.expires) {
362
+ this.delete(t);
363
+ continue;
364
+ }
365
+ yield [ this._getKeyUnprefix(t), e.value ];
366
+ }
367
+ };
368
+ return t.bind(this);
369
+ }
370
+ _checkIterableAdapter() {
371
+ return c.includes(this._store.opts.dialect) || c.some((e => this._store.opts.url.includes(e)));
372
+ }
373
+ _getKeyPrefix(e) {
374
+ if (!this._useKeyPrefix) {
375
+ return e;
376
+ }
377
+ if (!this._namespace) {
378
+ return e;
379
+ }
380
+ return `${this._namespace}:${e}`;
381
+ }
382
+ _getKeyPrefixArray(e) {
383
+ if (!this._useKeyPrefix) {
384
+ return e;
385
+ }
386
+ if (!this._namespace) {
387
+ return e;
388
+ }
389
+ return e.map((e => `${this._namespace}:${e}`));
390
+ }
391
+ _getKeyUnprefix(e) {
392
+ if (!this._useKeyPrefix) {
393
+ return e;
394
+ }
395
+ return e.split(":").splice(1).join(":");
396
+ }
397
+ _isValidStorageAdapter(e) {
398
+ return e instanceof Map || typeof e.get === "function" && typeof e.set === "function" && typeof e.delete === "function" && typeof e.clear === "function";
399
+ }
400
+ async get(e, t) {
401
+ const {store: s} = this.opts;
402
+ const i = Array.isArray(e);
403
+ const r = i ? this._getKeyPrefixArray(e) : this._getKeyPrefix(e);
404
+ const o = e => typeof e.expires === "number" && Date.now() > e.expires;
405
+ if (i) {
406
+ if (t?.raw === true) {
407
+ return this.getMany(e, {
408
+ raw: true
409
+ });
410
+ }
411
+ return this.getMany(e, {
412
+ raw: false
413
+ });
414
+ }
415
+ this.hooks.trigger("preGet", {
416
+ key: r
417
+ });
418
+ const a = await s.get(r);
419
+ const n = typeof a === "string" || this.opts.compression ? await this.deserializeData(a) : a;
420
+ if (n === void 0 || n === null) {
421
+ this.stats.miss();
422
+ return void 0;
423
+ }
424
+ if (o(n)) {
425
+ await this.delete(e);
426
+ this.stats.miss();
427
+ return void 0;
428
+ }
429
+ this.hooks.trigger("postGet", {
430
+ key: r,
431
+ value: n
432
+ });
433
+ this.stats.hit();
434
+ return t?.raw ? n : n.value;
435
+ }
436
+ async getMany(e, t) {
437
+ const {store: s} = this.opts;
438
+ const i = this._getKeyPrefixArray(e);
439
+ const r = e => typeof e.expires === "number" && Date.now() > e.expires;
440
+ this.hooks.trigger("preGetMany", {
441
+ keys: i
442
+ });
443
+ if (s.getMany === void 0) {
444
+ const e = i.map((async e => {
445
+ const i = await s.get(e);
446
+ const o = typeof i === "string" || this.opts.compression ? await this.deserializeData(i) : i;
447
+ if (o === void 0 || o === null) {
448
+ return void 0;
449
+ }
450
+ if (r(o)) {
451
+ await this.delete(e);
452
+ return void 0;
453
+ }
454
+ return t?.raw ? o : o.value;
455
+ }));
456
+ const o = await Promise.allSettled(e);
457
+ const a = o.map((e => e.value));
458
+ this.hooks.trigger("postGetMany", a);
459
+ if (a.length > 0) {
460
+ this.stats.hit();
461
+ }
462
+ return a;
463
+ }
464
+ const o = await s.getMany(i);
465
+ const a = [];
466
+ for (const s in o) {
467
+ let i = o[s];
468
+ if (typeof i === "string") {
469
+ i = await this.deserializeData(i);
470
+ }
471
+ if (i === void 0 || i === null) {
472
+ a.push(void 0);
473
+ continue;
474
+ }
475
+ if (r(i)) {
476
+ await this.delete(e[s]);
477
+ a.push(void 0);
478
+ continue;
479
+ }
480
+ const n = t?.raw ? i : i.value;
481
+ a.push(n);
482
+ }
483
+ this.hooks.trigger("postGetMany", a);
484
+ if (a.length > 0) {
485
+ this.stats.hit();
486
+ }
487
+ return a;
488
+ }
489
+ async set(e, t, s) {
490
+ const i = {
491
+ key: e,
492
+ value: t,
493
+ ttl: s
494
+ };
495
+ this.hooks.trigger("preSet", i);
496
+ const r = this._getKeyPrefix(i.key);
497
+ i.ttl ??= this._ttl;
498
+ if (i.ttl === 0) {
499
+ i.ttl = void 0;
500
+ }
501
+ const {store: o} = this.opts;
502
+ const a = typeof i.ttl === "number" ? Date.now() + i.ttl : void 0;
503
+ if (typeof i.value === "symbol") {
504
+ this.emit("error", "symbol cannot be serialized");
505
+ throw new Error("symbol cannot be serialized");
506
+ }
507
+ const n = {
508
+ value: i.value,
509
+ expires: a
510
+ };
511
+ const h = await this.serializeData(n);
512
+ let l = true;
513
+ try {
514
+ const e = await o.set(r, h, i.ttl);
515
+ if (typeof e === "boolean") {
516
+ l = e;
517
+ }
518
+ } catch (e) {
519
+ l = false;
520
+ this.emit("error", e);
521
+ }
522
+ this.hooks.trigger("postSet", {
523
+ key: r,
524
+ value: h,
525
+ ttl: s
526
+ });
527
+ this.stats.set();
528
+ return l;
529
+ }
530
+ async setMany(e) {
531
+ let t = [];
532
+ try {
533
+ if (this._store.setMany !== void 0) {
534
+ const s = await Promise.all(e.map((async ({key: e, value: t, ttl: s}) => {
535
+ s ??= this._ttl;
536
+ if (s === 0) {
537
+ s = void 0;
538
+ }
539
+ const i = typeof s === "number" ? Date.now() + s : void 0;
540
+ if (typeof t === "symbol") {
541
+ this.emit("error", "symbol cannot be serialized");
542
+ throw new Error("symbol cannot be serialized");
543
+ }
544
+ const r = {
545
+ value: t,
546
+ expires: i
547
+ };
548
+ const o = await this.serializeData(r);
549
+ return {
550
+ key: e,
551
+ value: o,
552
+ ttl: s
553
+ };
554
+ })));
555
+ t = await this._store.setMany(s);
556
+ }
557
+ const s = [];
558
+ for (const t of e) {
559
+ s.push(this.set(t.key, t.value, t.ttl));
560
+ }
561
+ const i = await Promise.allSettled(s);
562
+ t = i.map((e => e.value));
563
+ } catch (s) {
564
+ this.emit("error", s);
565
+ t = e.map((() => false));
566
+ }
567
+ return t;
568
+ }
569
+ async delete(e) {
570
+ const {store: t} = this.opts;
571
+ if (Array.isArray(e)) {
572
+ return this.deleteMany(e);
573
+ }
574
+ const s = this._getKeyPrefix(e);
575
+ this.hooks.trigger("preDelete", {
576
+ key: s
577
+ });
578
+ let i = true;
579
+ try {
580
+ const e = await t.delete(s);
581
+ if (typeof e === "boolean") {
582
+ i = e;
583
+ }
584
+ } catch (e) {
585
+ i = false;
586
+ this.emit("error", e);
587
+ }
588
+ this.hooks.trigger("postDelete", {
589
+ key: s,
590
+ value: i
591
+ });
592
+ this.stats.delete();
593
+ return i;
594
+ }
595
+ async deleteMany(e) {
596
+ try {
597
+ const {store: t} = this.opts;
598
+ const s = this._getKeyPrefixArray(e);
599
+ this.hooks.trigger("preDelete", {
600
+ key: s
601
+ });
602
+ if (t.deleteMany !== void 0) {
603
+ return await t.deleteMany(s);
604
+ }
605
+ const i = s.map((async e => t.delete(e)));
606
+ const r = await Promise.allSettled(i);
607
+ const o = r.every((e => e.value === true));
608
+ this.hooks.trigger("postDelete", {
609
+ key: s,
610
+ value: o
611
+ });
612
+ return o;
613
+ } catch (e) {
614
+ this.emit("error", e);
615
+ return false;
616
+ }
617
+ }
618
+ async clear() {
619
+ this.emit("clear");
620
+ const {store: e} = this.opts;
621
+ try {
622
+ await e.clear();
623
+ } catch (e) {
624
+ this.emit("error", e);
625
+ }
626
+ }
627
+ async has(e) {
628
+ if (Array.isArray(e)) {
629
+ return this.hasMany(e);
630
+ }
631
+ const t = this._getKeyPrefix(e);
632
+ const {store: s} = this.opts;
633
+ if (s.has !== void 0 && !(s instanceof Map)) {
634
+ return s.has(t);
635
+ }
636
+ let i;
637
+ try {
638
+ i = await s.get(t);
639
+ } catch (e) {
640
+ this.emit("error", e);
641
+ }
642
+ if (i) {
643
+ const e = await this.deserializeData(i);
644
+ if (e) {
645
+ if (e.expires === void 0 || e.expires === null) {
646
+ return true;
647
+ }
648
+ return e.expires > Date.now();
649
+ }
650
+ }
651
+ return false;
652
+ }
653
+ async hasMany(e) {
654
+ const t = this._getKeyPrefixArray(e);
655
+ const {store: s} = this.opts;
656
+ if (s.hasMany !== void 0) {
657
+ return s.hasMany(t);
658
+ }
659
+ const i = [];
660
+ for (const e of t) {
661
+ i.push(await this.has(e));
662
+ }
663
+ return i;
664
+ }
665
+ async disconnect() {
666
+ const {store: e} = this.opts;
667
+ this.emit("disconnect");
668
+ if (typeof e.disconnect === "function") {
669
+ return e.disconnect();
670
+ }
671
+ }
672
+ emit(e, ...t) {
673
+ if (e === "error" && !this.opts.emitErrors) {
674
+ return;
675
+ }
676
+ super.emit(e, ...t);
677
+ }
678
+ async serializeData(e) {
679
+ if (!this._serialize) {
680
+ return e;
681
+ }
682
+ if (this._compression?.compress) {
683
+ return this._serialize({
684
+ value: await this._compression.compress(e.value),
685
+ expires: e.expires
686
+ });
687
+ }
688
+ return this._serialize(e);
689
+ }
690
+ async deserializeData(e) {
691
+ if (!this._deserialize) {
692
+ return e;
693
+ }
694
+ if (this._compression?.decompress && typeof e === "string") {
695
+ const t = await this._deserialize(e);
696
+ return {
697
+ value: await this._compression.decompress(t?.value),
698
+ expires: t?.expires
699
+ };
700
+ }
701
+ if (typeof e === "string") {
702
+ return this._deserialize(e);
703
+ }
704
+ return void 0;
705
+ }
706
+ };
707
+
708
+ var p = f;
709
+
710
+ export { f as K, s as d, p as i };