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,720 @@
1
+ import { _ as e, a as t } from "../../../vendor/Package.1.mjs";
2
+
3
+ import r from "events";
4
+
5
+ import { K as s } from "../../../vendor/Package.65.mjs";
6
+
7
+ import { CacherOptions as i } from "./options/CacherOptions.mjs";
8
+
9
+ import { Component as o } from "../../lib/core/Component.mjs";
10
+
11
+ import { Configurable as a } from "../../decorators/di/Configurable.mjs";
12
+
13
+ import { As as n } from "../../lib/helpers/As.mjs";
14
+
15
+ import { CreateFileCacheAdapter as c } from "./adapters/CreateFileCacheAdapter.mjs";
16
+
17
+ import { CreateRedisCacheAdapter as m } from "./adapters/CreateRedisCacheAdapter.mjs";
18
+
19
+ import { CreateMemcacheCacheAdapter as l } from "./adapters/CreateMemcacheCacheAdapter.mjs";
20
+
21
+ import { CreateMongoCacheAdapter as p } from "./adapters/CreateMongoCacheAdapter.mjs";
22
+
23
+ import { CreateSqliteCacheAdapter as h } from "./adapters/CreateSqliteCacheAdapter.mjs";
24
+
25
+ import { CreatePostgresCacheAdapter as u } from "./adapters/CreatePostgresCacheAdapter.mjs";
26
+
27
+ import { CreateMysqlCacheAdapter as d } from "./adapters/CreateMysqlCacheAdapter.mjs";
28
+
29
+ import "buffer";
30
+
31
+ import "../../../vendor/Package.2.mjs";
32
+
33
+ import "../../lib/base/internal/DataValidator.mjs";
34
+
35
+ import "../../../vendor/Package.4.mjs";
36
+
37
+ import "../../../vendor/Package.5.mjs";
38
+
39
+ import "node:util/types";
40
+
41
+ import "../../lib/validation/VLD.mjs";
42
+
43
+ import "../../../vendor/Package.11.mjs";
44
+
45
+ import "url";
46
+
47
+ import "../../../vendor/Package.10.mjs";
48
+
49
+ import "util";
50
+
51
+ import "../../exceptions/dto/InvalidValueException.mjs";
52
+
53
+ import "../../lib/base/abstracts/Exception.mjs";
54
+
55
+ import "../../lib/base/internal/BasicInfo.mjs";
56
+
57
+ import "../../../vendor/Package.6.mjs";
58
+
59
+ import "../../../vendor/Package.7.mjs";
60
+
61
+ import "../../lib/base/internal/ThrowWarning.mjs";
62
+
63
+ import "../../lib/helpers/Templating.mjs";
64
+
65
+ import "../../lib/base/internal/CamelCase.mjs";
66
+
67
+ import "../../lib/helpers/NoCase.mjs";
68
+
69
+ import "../../../vendor/Package.9.mjs";
70
+
71
+ import "../../lib/helpers/IsHtml.mjs";
72
+
73
+ import "../../lib/helpers/IsXML.mjs";
74
+
75
+ import "../../constants/DTOMetadataKey.mjs";
76
+
77
+ import "../../lib/helpers/ObjectConstructor.mjs";
78
+
79
+ import "../../lib/helpers/ObjectParentConstructors.mjs";
80
+
81
+ import "../../lib/helpers/ObjectParentConstructor.mjs";
82
+
83
+ import "../../lib/helpers/ObjectPrototype.mjs";
84
+
85
+ import "../../decorators/dto/Expect.mjs";
86
+
87
+ import "./options/FileCacheOptions.mjs";
88
+
89
+ import "./options/MemcacheCacheOptions.mjs";
90
+
91
+ import "./options/MongoCacheOptions.mjs";
92
+
93
+ import "./options/PostgresCacheOptions.mjs";
94
+
95
+ import "./options/MysqlCacheOptions.mjs";
96
+
97
+ import "./options/SqliteCacheOptions.mjs";
98
+
99
+ import "./options/RedisCacheOptions.mjs";
100
+
101
+ import "../../../vendor/Package.3.mjs";
102
+
103
+ import "../../lib/base/async-constructor/AsyncConstructor.mjs";
104
+
105
+ import "../../lib/base/async-constructor/Append.mjs";
106
+
107
+ import "../../lib/helpers/IsPromiseLike.mjs";
108
+
109
+ import "../../lib/helpers/IsPromise.mjs";
110
+
111
+ import "util/types";
112
+
113
+ import "../../decorators/di/Lifetime.mjs";
114
+
115
+ import "../../lib/base/internal/ObjectLifetime.mjs";
116
+
117
+ import "../../constants/DIMetadataKey.mjs";
118
+
119
+ import "../../exceptions/di/LifetimeLockedException.mjs";
120
+
121
+ import "../../exceptions/MethodNotFoundException.mjs";
122
+
123
+ import "../../lib/ioc/DependencyInjectionContainer.mjs";
124
+
125
+ import "../../lib/ioc/Errors.mjs";
126
+
127
+ import "../../exceptions/di/DependencyInjectionException.mjs";
128
+
129
+ import "../../lib/base/internal/ConstructorSymbol.mjs";
130
+
131
+ import "node:crypto";
132
+
133
+ import "../../lib/ioc/InjectionMode.mjs";
134
+
135
+ import "../../lib/ioc/Lifetime.mjs";
136
+
137
+ import "../../lib/ioc/ListModules.mjs";
138
+
139
+ import "../../../vendor/Package.8.mjs";
140
+
141
+ import "os";
142
+
143
+ import "path";
144
+
145
+ import "stream";
146
+
147
+ import "fs";
148
+
149
+ import "../../lib/ioc/Utils.mjs";
150
+
151
+ import "../../lib/ioc/FunctionTokenizer.mjs";
152
+
153
+ import "../../lib/ioc/LoadModules.mjs";
154
+
155
+ import "../../lib/ioc/Resolvers.mjs";
156
+
157
+ import "../../lib/ioc/ParamParser.mjs";
158
+
159
+ import "../../lib/base/internal/ObjectWeakRefs.mjs";
160
+
161
+ import "../../lib/base/internal/ConfigurableRecordsInjection.mjs";
162
+
163
+ import "../../lib/base/internal/ObjectConfiguration.mjs";
164
+
165
+ import "../../lib/base/internal/ObjectInjection.mjs";
166
+
167
+ import "../../lib/base/internal/ObjectContainer.mjs";
168
+
169
+ import "../../lib/helpers/DevNull.mjs";
170
+
171
+ import "../../decorators/dto/IndexSignature.mjs";
172
+
173
+ import "../../decorators/dto/Accept.mjs";
174
+
175
+ import "../../lib/base/internal/MethodValidation.mjs";
176
+
177
+ import "../../exceptions/dto/InvalidMethodAcceptException.mjs";
178
+
179
+ import "../../exceptions/dto/InvalidMethodReturnException.mjs";
180
+
181
+ import "../../lib/helpers/IsEmptyObject.mjs";
182
+
183
+ import "../../lib/base/EventEmitter.mjs";
184
+
185
+ import "../../lib/core/Provider.mjs";
186
+
187
+ import "../../../vendor/Package.13.mjs";
188
+
189
+ import "../../../vendor/Package.19.mjs";
190
+
191
+ import "constants";
192
+
193
+ import "../../../vendor/Package.17.mjs";
194
+
195
+ import "assert";
196
+
197
+ import "../../../vendor/Package.14.mjs";
198
+
199
+ import "../../lib/helpers/URLBuilder.mjs";
200
+
201
+ var y = new Map;
202
+
203
+ function j(e) {
204
+ return y.has(e);
205
+ }
206
+
207
+ function f(e) {
208
+ y.set(e, []);
209
+ }
210
+
211
+ function b(e) {
212
+ y.delete(e);
213
+ }
214
+
215
+ function v(e, t) {
216
+ const r = g(e);
217
+ r.push(t);
218
+ y.set(e, r);
219
+ }
220
+
221
+ function g(e) {
222
+ return y.get(e) ?? [];
223
+ }
224
+
225
+ async function k(e) {
226
+ return new Promise(((t, r) => {
227
+ const s = {
228
+ resolve: t,
229
+ reject: r
230
+ };
231
+ v(e, s);
232
+ }));
233
+ }
234
+
235
+ function P(e) {
236
+ const t = g(e);
237
+ b(e);
238
+ return t;
239
+ }
240
+
241
+ function w(e) {
242
+ const {key: t, error: r, result: s} = e;
243
+ for (const e of P(t)) {
244
+ if (r) {
245
+ e.reject(r);
246
+ } else {
247
+ e.resolve(s);
248
+ }
249
+ }
250
+ }
251
+
252
+ async function C(e, t) {
253
+ if (!j(e)) {
254
+ f(e);
255
+ try {
256
+ const r = await Promise.resolve(t());
257
+ w({
258
+ key: e,
259
+ result: r
260
+ });
261
+ return r;
262
+ } catch (t) {
263
+ w({
264
+ key: e,
265
+ error: t
266
+ });
267
+ throw t;
268
+ }
269
+ }
270
+ return k(e);
271
+ }
272
+
273
+ function x(e) {
274
+ return e !== null && typeof e === "object" && !Array.isArray(e);
275
+ }
276
+
277
+ function M(e, ...t) {
278
+ return typeof e === "function" ? e(...t) : e;
279
+ }
280
+
281
+ function O(e, t) {
282
+ return typeof e === "number" && typeof t === "number" ? e < t : false;
283
+ }
284
+
285
+ var I = class {
286
+ opts;
287
+ namespace;
288
+ _cache;
289
+ constructor(e) {
290
+ this._cache = e;
291
+ }
292
+ async get(e) {
293
+ const t = await this._cache.get(e);
294
+ if (t !== void 0 && t !== null) {
295
+ return t;
296
+ }
297
+ return void 0;
298
+ }
299
+ async set(e, t, r) {
300
+ await this._cache.set(e, t, r);
301
+ return true;
302
+ }
303
+ async delete(e) {
304
+ await this._cache.del(e);
305
+ return true;
306
+ }
307
+ async clear() {
308
+ return this._cache.reset?.();
309
+ }
310
+ async has(e) {
311
+ const t = await this._cache.get(e);
312
+ if (t) {
313
+ return true;
314
+ }
315
+ return false;
316
+ }
317
+ async getMany(e) {
318
+ return this._cache.mget(...e).then((e => e.map((e => e))));
319
+ }
320
+ async deleteMany(e) {
321
+ await this._cache.mdel(...e);
322
+ return true;
323
+ }
324
+ on(e, t) {
325
+ this._cache.on?.(e, t);
326
+ return this;
327
+ }
328
+ async disconnect() {
329
+ await (this._cache.disconnect?.());
330
+ }
331
+ };
332
+
333
+ var A = e => {
334
+ const t = new r;
335
+ const i = new s;
336
+ i.serialize = void 0;
337
+ i.deserialize = void 0;
338
+ const o = e?.stores?.length ? e.stores : [ i ];
339
+ const a = e?.nonBlocking ?? false;
340
+ const n = e?.cacheId ?? Math.random().toString(36).slice(2);
341
+ const c = async e => {
342
+ let r;
343
+ if (a) {
344
+ try {
345
+ r = await Promise.race(o.map((async t => t.get(e))));
346
+ if (r === void 0) {
347
+ return void 0;
348
+ }
349
+ } catch (r) {
350
+ t.emit("get", {
351
+ key: e,
352
+ error: r
353
+ });
354
+ }
355
+ } else {
356
+ for (const s of o) {
357
+ try {
358
+ const i = await s.get(e);
359
+ if (i !== void 0) {
360
+ r = i;
361
+ t.emit("get", {
362
+ key: e,
363
+ value: r
364
+ });
365
+ break;
366
+ }
367
+ } catch (r) {
368
+ t.emit("get", {
369
+ key: e,
370
+ error: r
371
+ });
372
+ }
373
+ }
374
+ }
375
+ return r;
376
+ };
377
+ const m = async e => {
378
+ const t = [];
379
+ for (const r of e) {
380
+ const e = await c(r);
381
+ t.push(e);
382
+ }
383
+ return t;
384
+ };
385
+ const l = async e => {
386
+ let r;
387
+ if (a) {
388
+ try {
389
+ r = await Promise.race(o.map((async t => t.get(e, {
390
+ raw: true
391
+ }))));
392
+ if (r === void 0) {
393
+ return void 0;
394
+ }
395
+ } catch (r) {
396
+ t.emit("ttl", {
397
+ key: e,
398
+ error: r
399
+ });
400
+ }
401
+ } else {
402
+ for (const s of o) {
403
+ try {
404
+ const i = await s.get(e, {
405
+ raw: true
406
+ });
407
+ if (i !== void 0) {
408
+ r = i;
409
+ t.emit("ttl", {
410
+ key: e,
411
+ value: r
412
+ });
413
+ break;
414
+ }
415
+ } catch (r) {
416
+ t.emit("ttl", {
417
+ key: e,
418
+ error: r
419
+ });
420
+ }
421
+ }
422
+ }
423
+ if (r?.expires) {
424
+ return r.expires;
425
+ }
426
+ return void 0;
427
+ };
428
+ const p = async (r, s, i, o) => {
429
+ try {
430
+ if (a) {
431
+ Promise.all(r.map((async t => t.set(s, i, o ?? e?.ttl))));
432
+ t.emit("set", {
433
+ key: s,
434
+ value: i
435
+ });
436
+ return i;
437
+ }
438
+ await Promise.all(r.map((async t => t.set(s, i, o ?? e?.ttl))));
439
+ t.emit("set", {
440
+ key: s,
441
+ value: i
442
+ });
443
+ return i;
444
+ } catch (e) {
445
+ t.emit("set", {
446
+ key: s,
447
+ value: i,
448
+ error: e
449
+ });
450
+ return Promise.reject(e);
451
+ }
452
+ };
453
+ const h = async (e, r) => {
454
+ const s = r.map((({key: e, value: t, ttl: r}) => ({
455
+ key: e,
456
+ value: t,
457
+ ttl: r
458
+ })));
459
+ try {
460
+ const s = [];
461
+ for (const t of r) {
462
+ s.push(...e.map((async e => e.set(t.key, t.value, t.ttl))));
463
+ }
464
+ if (a) {
465
+ Promise.all(s);
466
+ t.emit("mset", {
467
+ list: r
468
+ });
469
+ return r;
470
+ }
471
+ await Promise.all(s);
472
+ t.emit("mset", {
473
+ list: r
474
+ });
475
+ return r;
476
+ } catch (e) {
477
+ t.emit("mset", {
478
+ list: r,
479
+ error: e
480
+ });
481
+ return Promise.reject(e);
482
+ }
483
+ };
484
+ const u = async e => {
485
+ try {
486
+ if (a) {
487
+ Promise.all(o.map((async t => t.delete(e))));
488
+ t.emit("del", {
489
+ key: e
490
+ });
491
+ return true;
492
+ }
493
+ await Promise.all(o.map((async t => t.delete(e))));
494
+ t.emit("del", {
495
+ key: e
496
+ });
497
+ return true;
498
+ } catch (r) {
499
+ t.emit("del", {
500
+ key: e,
501
+ error: r
502
+ });
503
+ return Promise.reject(r);
504
+ }
505
+ };
506
+ const d = async e => {
507
+ try {
508
+ const r = [];
509
+ for (const t of e) {
510
+ r.push(...o.map((async e => e.delete(t))));
511
+ }
512
+ if (a) {
513
+ Promise.all(r);
514
+ t.emit("mdel", {
515
+ keys: e
516
+ });
517
+ return true;
518
+ }
519
+ await Promise.all(r);
520
+ t.emit("mdel", {
521
+ keys: e
522
+ });
523
+ return true;
524
+ } catch (r) {
525
+ t.emit("mdel", {
526
+ keys: e,
527
+ error: r
528
+ });
529
+ return Promise.reject(r);
530
+ }
531
+ };
532
+ const y = async () => {
533
+ try {
534
+ if (a) {
535
+ Promise.all(o.map((async e => e.clear())));
536
+ t.emit("clear");
537
+ return true;
538
+ }
539
+ await Promise.all(o.map((async e => e.clear())));
540
+ t.emit("clear");
541
+ return true;
542
+ } catch (e) {
543
+ t.emit("clear", e);
544
+ return Promise.reject(e);
545
+ }
546
+ };
547
+ const j = async (r, s, i, a) => C(`${n}::${r}`, (async () => {
548
+ let c;
549
+ let m;
550
+ let l = 0;
551
+ let h;
552
+ const {ttl: u, refreshThreshold: d, raw: y} = x(i) ? i : {
553
+ ttl: i,
554
+ refreshThreshold: a
555
+ };
556
+ const j = t => M(u, t) ?? e?.ttl;
557
+ for (;l < o.length; l++) {
558
+ try {
559
+ const e = await o[l].get(r, {
560
+ raw: true
561
+ });
562
+ if (e !== void 0) {
563
+ c = e.value;
564
+ m = e;
565
+ if (typeof e.expires === "number") {
566
+ h = Math.max(0, e.expires - Date.now());
567
+ }
568
+ break;
569
+ }
570
+ } catch {}
571
+ }
572
+ if (c === void 0) {
573
+ const e = await s();
574
+ const t = j(e);
575
+ await p(o, r, e, t);
576
+ return y ? {
577
+ value: e,
578
+ expires: Date.now() + t
579
+ } : e;
580
+ }
581
+ const f = O(h, M(d, c) ?? e?.refreshThreshold);
582
+ if (f) {
583
+ C(`+++${n}__${r}`, s).then((async s => {
584
+ try {
585
+ await p(e?.refreshAllStores ? o : o.slice(0, l + 1), r, s, j(s));
586
+ t.emit("refresh", {
587
+ key: r,
588
+ value: s
589
+ });
590
+ } catch (e) {
591
+ t.emit("refresh", {
592
+ key: r,
593
+ value: c,
594
+ error: e
595
+ });
596
+ }
597
+ })).catch((e => {
598
+ t.emit("refresh", {
599
+ key: r,
600
+ value: c,
601
+ error: e
602
+ });
603
+ }));
604
+ }
605
+ if (!f && l > 0) {
606
+ await p(o.slice(0, l), r, c, j(c));
607
+ }
608
+ return y ? m : c;
609
+ }));
610
+ const f = (e, r) => t.addListener(e, r);
611
+ const b = (e, r) => t.removeListener(e, r);
612
+ const v = async () => {
613
+ try {
614
+ await Promise.all(o.map((async e => e.disconnect())));
615
+ } catch (e) {
616
+ return Promise.reject(e);
617
+ }
618
+ };
619
+ const g = () => n;
620
+ return {
621
+ get: c,
622
+ mget: m,
623
+ ttl: l,
624
+ set: async (e, t, r) => p(o, e, t, r),
625
+ mset: async e => h(o, e),
626
+ del: u,
627
+ mdel: d,
628
+ clear: y,
629
+ wrap: j,
630
+ on: f,
631
+ off: b,
632
+ disconnect: v,
633
+ cacheId: g,
634
+ stores: o
635
+ };
636
+ };
637
+
638
+ const _ = e => ({
639
+ class: Cacher,
640
+ options: e
641
+ });
642
+
643
+ class Cacher extends o {
644
+ async init() {
645
+ const e = this.options?.stores ? Array.isArray(this.options.stores) ? this.options.stores : [ this.options.stores ] : [];
646
+ const t = await Promise.all(e.map((e => {
647
+ switch (e.type) {
648
+ case "file":
649
+ return c(e);
650
+
651
+ case "redis":
652
+ return m(e);
653
+
654
+ case "memcache":
655
+ return l(e);
656
+
657
+ case "mongo":
658
+ return p(e);
659
+
660
+ case "sqlite":
661
+ return h(e);
662
+
663
+ case "postgres":
664
+ return u(e);
665
+
666
+ case "mysql":
667
+ return d(e);
668
+
669
+ default:
670
+ return undefined;
671
+ }
672
+ })));
673
+ let r = t.filter((e => !!e));
674
+ if (!r.length) r = undefined;
675
+ this.cache = A({
676
+ ...this.options,
677
+ stores: r
678
+ });
679
+ this.cache.on("set", (e => this.emit("set", e)));
680
+ this.cache.on("del", (e => this.emit("del", e)));
681
+ this.cache.on("clear", (e => this.emit("clear", e)));
682
+ this.cache.on("refresh", (e => this.emit("refresh", e)));
683
+ }
684
+ async destroy() {
685
+ await this.cache.disconnect();
686
+ }
687
+ async set(e, t, r) {
688
+ return await this.cache.set(e, t, r);
689
+ }
690
+ async multipleSet(e) {
691
+ return await this.cache.mset(e);
692
+ }
693
+ async get(e) {
694
+ return n(await this.cache.get(e));
695
+ }
696
+ async multipleGet(e) {
697
+ return await this.cache.mget(e);
698
+ }
699
+ async ttl(e) {
700
+ const t = await this.cache.ttl(e);
701
+ if (t === undefined) return -1;
702
+ return t;
703
+ }
704
+ async del(e) {
705
+ return await this.cache.del(e);
706
+ }
707
+ async multipleDel(e) {
708
+ return await this.cache.mdel(e);
709
+ }
710
+ async clear() {
711
+ return await this.cache.clear();
712
+ }
713
+ on(e, t) {
714
+ return super.on(e, t);
715
+ }
716
+ }
717
+
718
+ e([ a(i.optional()), t("design:type", i) ], Cacher.prototype, "options", void 0);
719
+
720
+ export { _ as BuildCacherOptions, Cacher };