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,143 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, {
4
+ value: "Module"
5
+ });
6
+
7
+ const e = require("events");
8
+
9
+ const t = require("memjs");
10
+
11
+ const s = require("./Package.65.cjs");
12
+
13
+ require("buffer");
14
+
15
+ const r = e => e && e.__esModule ? e : {
16
+ default: e
17
+ };
18
+
19
+ const i = r(e);
20
+
21
+ const a = r(t);
22
+
23
+ var n = class extends i.default {
24
+ ttlSupport=true;
25
+ namespace;
26
+ client;
27
+ opts;
28
+ constructor(e, t) {
29
+ super();
30
+ t = {
31
+ ...typeof e === "string" ? {
32
+ uri: e
33
+ } : e,
34
+ ...t
35
+ };
36
+ if (t.uri && t.url === void 0) {
37
+ t.url = t.uri;
38
+ }
39
+ if (e === void 0) {
40
+ e = "localhost:11211";
41
+ t.url = t.uri = e;
42
+ }
43
+ this.opts = t;
44
+ this.client = a.default.Client.create(e, t);
45
+ }
46
+ _getNamespace() {
47
+ return `namespace:${this.namespace}`;
48
+ }
49
+ async get(e) {
50
+ return new Promise(((t, r) => {
51
+ this.client.get(this.formatKey(e), ((e, i) => {
52
+ if (e) {
53
+ this.emit("error", e);
54
+ r(e);
55
+ } else {
56
+ let e;
57
+ if (i === null) {
58
+ e = {
59
+ value: void 0,
60
+ expires: 0
61
+ };
62
+ } else {
63
+ e = this.opts.deserialize ? this.opts.deserialize(i) : s.defaultDeserialize(i);
64
+ }
65
+ t(e);
66
+ }
67
+ }));
68
+ }));
69
+ }
70
+ async getMany(e) {
71
+ const t = [];
72
+ for (const s of e) {
73
+ t.push(this.get(s));
74
+ }
75
+ return Promise.allSettled(t).then((e => {
76
+ const t = [];
77
+ for (const s of e) {
78
+ t.push(s.value);
79
+ }
80
+ return t;
81
+ }));
82
+ }
83
+ async set(e, t, s) {
84
+ const r = {};
85
+ if (s !== void 0) {
86
+ r.expires = r.ttl = Math.floor(s / 1e3);
87
+ }
88
+ await this.client.set(this.formatKey(e), t, r);
89
+ }
90
+ async delete(e) {
91
+ return new Promise(((t, s) => {
92
+ this.client.delete(this.formatKey(e), ((e, r) => {
93
+ if (e) {
94
+ this.emit("error", e);
95
+ s(e);
96
+ } else {
97
+ t(Boolean(r));
98
+ }
99
+ }));
100
+ }));
101
+ }
102
+ async deleteMany(e) {
103
+ const t = e.map((async e => this.delete(e)));
104
+ const s = await Promise.allSettled(t);
105
+ return s.every((e => e.value === true));
106
+ }
107
+ async clear() {
108
+ return new Promise(((e, t) => {
109
+ this.client.flush((s => {
110
+ if (s) {
111
+ this.emit("error", s);
112
+ t(s);
113
+ } else {
114
+ e(void 0);
115
+ }
116
+ }));
117
+ }));
118
+ }
119
+ formatKey(e) {
120
+ let t = e;
121
+ if (this.namespace) {
122
+ t = this.namespace.trim() + ":" + e.trim();
123
+ }
124
+ return t;
125
+ }
126
+ async has(e) {
127
+ return new Promise((t => {
128
+ this.client.get(this.formatKey(e), ((e, s) => {
129
+ if (e) {
130
+ t(false);
131
+ } else {
132
+ t(s !== null);
133
+ }
134
+ }));
135
+ }));
136
+ }
137
+ };
138
+
139
+ var o = n;
140
+
141
+ exports.KeyvMemcache = n;
142
+
143
+ exports.default = o;
@@ -0,0 +1,127 @@
1
+ import e from "events";
2
+
3
+ import t from "memjs";
4
+
5
+ import { d as s } from "./Package.65.mjs";
6
+
7
+ import "buffer";
8
+
9
+ var r = class extends e {
10
+ ttlSupport=true;
11
+ namespace;
12
+ client;
13
+ opts;
14
+ constructor(e, s) {
15
+ super();
16
+ s = {
17
+ ...typeof e === "string" ? {
18
+ uri: e
19
+ } : e,
20
+ ...s
21
+ };
22
+ if (s.uri && s.url === void 0) {
23
+ s.url = s.uri;
24
+ }
25
+ if (e === void 0) {
26
+ e = "localhost:11211";
27
+ s.url = s.uri = e;
28
+ }
29
+ this.opts = s;
30
+ this.client = t.Client.create(e, s);
31
+ }
32
+ _getNamespace() {
33
+ return `namespace:${this.namespace}`;
34
+ }
35
+ async get(e) {
36
+ return new Promise(((t, r) => {
37
+ this.client.get(this.formatKey(e), ((e, i) => {
38
+ if (e) {
39
+ this.emit("error", e);
40
+ r(e);
41
+ } else {
42
+ let e;
43
+ if (i === null) {
44
+ e = {
45
+ value: void 0,
46
+ expires: 0
47
+ };
48
+ } else {
49
+ e = this.opts.deserialize ? this.opts.deserialize(i) : s(i);
50
+ }
51
+ t(e);
52
+ }
53
+ }));
54
+ }));
55
+ }
56
+ async getMany(e) {
57
+ const t = [];
58
+ for (const s of e) {
59
+ t.push(this.get(s));
60
+ }
61
+ return Promise.allSettled(t).then((e => {
62
+ const t = [];
63
+ for (const s of e) {
64
+ t.push(s.value);
65
+ }
66
+ return t;
67
+ }));
68
+ }
69
+ async set(e, t, s) {
70
+ const r = {};
71
+ if (s !== void 0) {
72
+ r.expires = r.ttl = Math.floor(s / 1e3);
73
+ }
74
+ await this.client.set(this.formatKey(e), t, r);
75
+ }
76
+ async delete(e) {
77
+ return new Promise(((t, s) => {
78
+ this.client.delete(this.formatKey(e), ((e, r) => {
79
+ if (e) {
80
+ this.emit("error", e);
81
+ s(e);
82
+ } else {
83
+ t(Boolean(r));
84
+ }
85
+ }));
86
+ }));
87
+ }
88
+ async deleteMany(e) {
89
+ const t = e.map((async e => this.delete(e)));
90
+ const s = await Promise.allSettled(t);
91
+ return s.every((e => e.value === true));
92
+ }
93
+ async clear() {
94
+ return new Promise(((e, t) => {
95
+ this.client.flush((s => {
96
+ if (s) {
97
+ this.emit("error", s);
98
+ t(s);
99
+ } else {
100
+ e(void 0);
101
+ }
102
+ }));
103
+ }));
104
+ }
105
+ formatKey(e) {
106
+ let t = e;
107
+ if (this.namespace) {
108
+ t = this.namespace.trim() + ":" + e.trim();
109
+ }
110
+ return t;
111
+ }
112
+ async has(e) {
113
+ return new Promise((t => {
114
+ this.client.get(this.formatKey(e), ((e, s) => {
115
+ if (e) {
116
+ t(false);
117
+ } else {
118
+ t(s !== null);
119
+ }
120
+ }));
121
+ }));
122
+ }
123
+ };
124
+
125
+ var i = r;
126
+
127
+ export { r as KeyvMemcache, i as default };
@@ -0,0 +1,341 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, {
4
+ value: "Module"
5
+ });
6
+
7
+ const e = require("events");
8
+
9
+ const t = require("buffer");
10
+
11
+ const n = require("mongodb");
12
+
13
+ const s = e => e && e.__esModule ? e : {
14
+ default: e
15
+ };
16
+
17
+ const o = s(e);
18
+
19
+ var a = new Set([ "url", "collection", "namespace", "serialize", "deserialize", "uri", "useGridFS", "dialect", "db" ]);
20
+
21
+ var i = class extends o.default {
22
+ ttlSupport=false;
23
+ opts;
24
+ connect;
25
+ namespace;
26
+ constructor(e, t) {
27
+ super();
28
+ e ??= {};
29
+ if (typeof e === "string") {
30
+ e = {
31
+ url: e
32
+ };
33
+ }
34
+ if (e.uri) {
35
+ e = {
36
+ url: e.uri,
37
+ ...e
38
+ };
39
+ }
40
+ this.opts = {
41
+ url: "mongodb://127.0.0.1:27017",
42
+ collection: "keyv",
43
+ ...e,
44
+ ...t
45
+ };
46
+ delete this.opts.emitErrors;
47
+ const s = Object.fromEntries(Object.entries(this.opts).filter((([e]) => !a.has(e))));
48
+ this.opts = Object.fromEntries(Object.entries(this.opts).filter((([e]) => a.has(e))));
49
+ this.connect = new Promise((async (e, t) => {
50
+ try {
51
+ let t = "";
52
+ if (this.opts.url) {
53
+ t = this.opts.url;
54
+ }
55
+ const o = new n.MongoClient(t, s);
56
+ await o.connect();
57
+ const a = o.db(this.opts.db);
58
+ if (this.opts.useGridFS) {
59
+ const t = new n.GridFSBucket(a, {
60
+ readPreference: this.opts.readPreference,
61
+ bucketName: this.opts.collection
62
+ });
63
+ const s = a.collection(`${this.opts.collection}.files`);
64
+ await s.createIndex({
65
+ uploadDate: -1
66
+ });
67
+ await s.createIndex({
68
+ "metadata.expiresAt": 1
69
+ });
70
+ await s.createIndex({
71
+ "metadata.lastAccessed": 1
72
+ });
73
+ await s.createIndex({
74
+ "metadata.filename": 1
75
+ });
76
+ e({
77
+ bucket: t,
78
+ store: s,
79
+ db: a,
80
+ mongoClient: o
81
+ });
82
+ } else {
83
+ let t = "keyv";
84
+ if (this.opts.collection) {
85
+ t = this.opts.collection;
86
+ }
87
+ const n = a.collection(t);
88
+ await n.createIndex({
89
+ key: 1
90
+ }, {
91
+ unique: true,
92
+ background: true
93
+ });
94
+ await n.createIndex({
95
+ expiresAt: 1
96
+ }, {
97
+ expireAfterSeconds: 0,
98
+ background: true
99
+ });
100
+ e({
101
+ store: n,
102
+ mongoClient: o
103
+ });
104
+ }
105
+ } catch (e) {
106
+ this.emit("error", e);
107
+ }
108
+ }));
109
+ }
110
+ async get(e) {
111
+ const n = await this.connect;
112
+ if (this.opts.useGridFS) {
113
+ await n.store.updateOne({
114
+ filename: e
115
+ }, {
116
+ $set: {
117
+ "metadata.lastAccessed": new Date
118
+ }
119
+ });
120
+ const s = n.bucket.openDownloadStreamByName(e);
121
+ return new Promise((e => {
122
+ const n = [];
123
+ s.on("error", (() => {
124
+ e(void 0);
125
+ }));
126
+ s.on("end", (() => {
127
+ const s = t.Buffer.concat(n).toString("utf8");
128
+ e(s);
129
+ }));
130
+ s.on("data", (e => {
131
+ n.push(e);
132
+ }));
133
+ }));
134
+ }
135
+ const s = await n.store.findOne({
136
+ key: {
137
+ $eq: e
138
+ }
139
+ });
140
+ if (!s) {
141
+ return void 0;
142
+ }
143
+ return s.value;
144
+ }
145
+ async getMany(e) {
146
+ if (this.opts.useGridFS) {
147
+ const t = [];
148
+ for (const n of e) {
149
+ t.push(this.get(n));
150
+ }
151
+ const n = await Promise.allSettled(t);
152
+ const s = [];
153
+ for (const e of n) {
154
+ s.push(e.value);
155
+ }
156
+ return s;
157
+ }
158
+ const t = await this.connect;
159
+ const n = await t.store.s.db.collection(this.opts.collection).find({
160
+ key: {
161
+ $in: e
162
+ }
163
+ }).project({
164
+ _id: 0,
165
+ value: 1,
166
+ key: 1
167
+ }).toArray();
168
+ const s = [ ...e ];
169
+ let o = 0;
170
+ for (const t of e) {
171
+ const e = n.findIndex((e => e.key === t));
172
+ s[o] = e > -1 ? n[e].value : void 0;
173
+ o++;
174
+ }
175
+ return s;
176
+ }
177
+ async set(e, t, n) {
178
+ const s = typeof n === "number" ? new Date(Date.now() + n) : null;
179
+ if (this.opts.useGridFS) {
180
+ const n = await this.connect;
181
+ const o = n.bucket.openUploadStream(e, {
182
+ metadata: {
183
+ expiresAt: s,
184
+ lastAccessed: new Date
185
+ }
186
+ });
187
+ return new Promise((e => {
188
+ o.on("finish", (() => {
189
+ e(o);
190
+ }));
191
+ o.end(t);
192
+ }));
193
+ }
194
+ const o = await this.connect;
195
+ await o.store.updateOne({
196
+ key: {
197
+ $eq: e
198
+ }
199
+ }, {
200
+ $set: {
201
+ key: e,
202
+ value: t,
203
+ expiresAt: s
204
+ }
205
+ }, {
206
+ upsert: true
207
+ });
208
+ }
209
+ async delete(e) {
210
+ if (typeof e !== "string") {
211
+ return false;
212
+ }
213
+ const t = await this.connect;
214
+ if (this.opts.useGridFS) {
215
+ try {
216
+ const s = t.db;
217
+ const o = new n.GridFSBucket(s, {
218
+ bucketName: this.opts.collection
219
+ });
220
+ const a = await o.find({
221
+ filename: e
222
+ }).toArray();
223
+ await t.bucket.delete(a[0]._id);
224
+ return true;
225
+ } catch {
226
+ return false;
227
+ }
228
+ }
229
+ const s = await t.store.deleteOne({
230
+ key: {
231
+ $eq: e
232
+ }
233
+ });
234
+ return s.deletedCount > 0;
235
+ }
236
+ async deleteMany(e) {
237
+ const t = await this.connect;
238
+ if (this.opts.useGridFS) {
239
+ const s = t.db;
240
+ const o = new n.GridFSBucket(s, {
241
+ bucketName: this.opts.collection
242
+ });
243
+ const a = await o.find({
244
+ filename: {
245
+ $in: e
246
+ }
247
+ }).toArray();
248
+ if (a.length === 0) {
249
+ return false;
250
+ }
251
+ await Promise.all(a.map((async e => t.bucket.delete(e._id))));
252
+ return true;
253
+ }
254
+ const s = await t.store.deleteMany({
255
+ key: {
256
+ $in: e
257
+ }
258
+ });
259
+ return s.deletedCount > 0;
260
+ }
261
+ async clear() {
262
+ const e = await this.connect;
263
+ if (this.opts.useGridFS) {
264
+ try {
265
+ await e.bucket.drop();
266
+ } catch (e) {
267
+ if (!(e instanceof n.MongoServerError && e.code === 26)) {
268
+ throw e;
269
+ }
270
+ }
271
+ }
272
+ await e.store.deleteMany({
273
+ key: {
274
+ $regex: this.namespace ? `^${this.namespace}:*` : ""
275
+ }
276
+ });
277
+ }
278
+ async clearExpired() {
279
+ if (!this.opts.useGridFS) {
280
+ return false;
281
+ }
282
+ return this.connect.then((async e => {
283
+ const t = e.db;
284
+ const s = new n.GridFSBucket(t, {
285
+ bucketName: this.opts.collection
286
+ });
287
+ return s.find({
288
+ "metadata.expiresAt": {
289
+ $lte: new Date(Date.now())
290
+ }
291
+ }).toArray().then((async t => Promise.all(t.map((async t => e.bucket.delete(t._id)))).then((() => true))));
292
+ }));
293
+ }
294
+ async clearUnusedFor(e) {
295
+ if (!this.opts.useGridFS) {
296
+ return false;
297
+ }
298
+ const t = await this.connect;
299
+ const s = t.db;
300
+ const o = new n.GridFSBucket(s, {
301
+ bucketName: this.opts.collection
302
+ });
303
+ const a = await o.find({
304
+ "metadata.lastAccessed": {
305
+ $lte: new Date(Date.now() - e * 1e3)
306
+ }
307
+ }).toArray();
308
+ await Promise.all(a.map((async e => t.bucket.delete(e._id))));
309
+ return true;
310
+ }
311
+ async* iterator(e) {
312
+ const t = await this.connect;
313
+ const n = new RegExp(`^${e ? e + ":" : ".*"}`);
314
+ const s = this.opts.useGridFS ? t.store.find({
315
+ filename: n
316
+ }).map((async e => [ e.filename, await this.get(e.filename) ])) : t.store.find({
317
+ key: n
318
+ }).map((e => [ e.key, e.value ]));
319
+ yield* s;
320
+ }
321
+ async has(e) {
322
+ const t = await this.connect;
323
+ const n = {
324
+ [this.opts.useGridFS ? "filename" : "key"]: {
325
+ $eq: e
326
+ }
327
+ };
328
+ const s = await t.store.count(n);
329
+ return s !== 0;
330
+ }
331
+ async disconnect() {
332
+ const e = await this.connect;
333
+ await e.mongoClient.close();
334
+ }
335
+ };
336
+
337
+ var c = i;
338
+
339
+ exports.KeyvMongo = i;
340
+
341
+ exports.default = c;