lakutata 2.0.80 → 2.0.82
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.
- package/com/cacher.cjs +8 -10
- package/com/cacher.d.ts +83 -14
- package/com/cacher.mjs +8 -10
- package/com/database.cjs +11 -11
- package/com/database.mjs +11 -11
- package/com/docker.cjs +17 -19
- package/com/docker.d.ts +3 -141
- package/com/docker.mjs +13 -15
- package/com/entrypoint.cjs +7 -5
- package/com/entrypoint.mjs +7 -5
- package/com/logger.cjs +7 -7
- package/com/logger.mjs +7 -7
- package/com/monitor.cjs +5 -3
- package/com/monitor.mjs +5 -3
- package/decorator/ctrl.cjs +3 -3
- package/decorator/ctrl.mjs +3 -3
- package/decorator/orm.cjs +98 -98
- package/decorator/orm.mjs +142 -56
- package/helper.cjs +9 -11
- package/helper.mjs +5 -7
- package/lakutata.cjs +23 -30
- package/lakutata.mjs +14 -18
- package/orm.cjs +1421 -884
- package/orm.mjs +1474 -724
- package/package.json +1 -1
- package/provider/database.cjs +11 -11
- package/provider/database.mjs +11 -11
- package/provider/passwordHash.cjs +4 -2
- package/provider/passwordHash.mjs +4 -2
- package/src/components/Database.cjs +13 -13
- package/src/components/Database.mjs +17 -17
- package/src/components/Logger.cjs +7 -7
- package/src/components/Logger.mjs +7 -7
- package/src/components/cacher/Cacher.cjs +1186 -272
- package/src/components/cacher/Cacher.mjs +1094 -180
- package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +478 -2962
- package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +468 -2946
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.cjs +12 -12
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.mjs +11 -11
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.cjs +16 -16
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.mjs +14 -14
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.cjs +11 -11
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.mjs +11 -11
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.cjs +12 -12
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.mjs +13 -13
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.cjs +2 -2
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.mjs +2 -2
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.cjs +10 -10
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.mjs +10 -10
- package/src/components/cacher/lib/IsDriverPackageInstalled.cjs +2 -2
- package/src/components/cacher/lib/IsDriverPackageInstalled.mjs +5 -5
- package/src/components/docker/ConnectionOptionsBuilder.cjs +23 -25
- package/src/components/docker/ConnectionOptionsBuilder.mjs +19 -21
- package/src/components/docker/Docker.cjs +5035 -5096
- package/src/components/docker/Docker.mjs +4955 -5016
- package/src/components/docker/lib/DockerContainer.cjs +23 -25
- package/src/components/docker/lib/DockerContainer.mjs +17 -19
- package/src/components/docker/lib/DockerContainerTTY.cjs +9 -11
- package/src/components/docker/lib/DockerContainerTTY.mjs +9 -11
- package/src/components/docker/lib/DockerImage.cjs +4 -2
- package/src/components/docker/lib/DockerImage.mjs +4 -2
- package/src/components/docker/lib/ParseEnvToRecord.cjs +2 -2
- package/src/components/docker/lib/ParseEnvToRecord.mjs +12 -12
- package/src/components/docker/lib/ParseRepositoryTag.cjs +9 -9
- package/src/components/docker/lib/ParseRepositoryTag.mjs +11 -11
- package/src/components/entrypoint/Entrypoint.cjs +2179 -1687
- package/src/components/entrypoint/Entrypoint.mjs +2182 -1690
- package/src/components/entrypoint/lib/AccessControl.cjs +4 -2
- package/src/components/entrypoint/lib/AccessControl.mjs +4 -2
- package/src/components/entrypoint/lib/AccessControlRule.cjs +4 -2
- package/src/components/entrypoint/lib/AccessControlRule.mjs +4 -2
- package/src/components/entrypoint/lib/Controller.cjs +4 -2
- package/src/components/entrypoint/lib/Controller.mjs +4 -2
- package/src/components/monitor/AliveMonitor.cjs +6 -4
- package/src/components/monitor/AliveMonitor.mjs +6 -4
- package/src/components/monitor/CpuMonitor.cjs +5 -3
- package/src/components/monitor/CpuMonitor.mjs +5 -3
- package/src/components/monitor/EventLoopMonitor.cjs +4 -2
- package/src/components/monitor/EventLoopMonitor.mjs +4 -2
- package/src/components/monitor/HttpRequestMonitor.cjs +5 -3
- package/src/components/monitor/HttpRequestMonitor.mjs +5 -3
- package/src/components/monitor/MemoryMonitor.cjs +8 -6
- package/src/components/monitor/MemoryMonitor.mjs +5 -3
- package/src/decorators/asst/After.cjs +3 -3
- package/src/decorators/asst/After.mjs +2 -2
- package/src/decorators/asst/Before.cjs +2 -2
- package/src/decorators/asst/Before.mjs +4 -4
- package/src/decorators/ctrl/CLIAction.cjs +5 -5
- package/src/decorators/ctrl/CLIAction.mjs +10 -10
- package/src/decorators/ctrl/HTTPAction.cjs +9 -9
- package/src/decorators/ctrl/HTTPAction.mjs +7 -7
- package/src/decorators/ctrl/ServiceAction.cjs +6 -6
- package/src/decorators/ctrl/ServiceAction.mjs +7 -7
- package/src/decorators/ctrl/http/DELETE.cjs +5 -5
- package/src/decorators/ctrl/http/DELETE.mjs +5 -5
- package/src/decorators/ctrl/http/GET.cjs +5 -5
- package/src/decorators/ctrl/http/GET.mjs +5 -5
- package/src/decorators/ctrl/http/HEAD.cjs +5 -5
- package/src/decorators/ctrl/http/HEAD.mjs +5 -5
- package/src/decorators/ctrl/http/OPTIONS.cjs +5 -5
- package/src/decorators/ctrl/http/OPTIONS.mjs +5 -5
- package/src/decorators/ctrl/http/PATCH.cjs +5 -5
- package/src/decorators/ctrl/http/PATCH.mjs +5 -5
- package/src/decorators/ctrl/http/POST.cjs +5 -5
- package/src/decorators/ctrl/http/POST.mjs +5 -5
- package/src/decorators/ctrl/http/PUT.cjs +5 -5
- package/src/decorators/ctrl/http/PUT.mjs +5 -5
- package/src/decorators/di/Autoload.cjs +2 -2
- package/src/decorators/di/Autoload.mjs +2 -2
- package/src/decorators/di/Configurable.cjs +3 -3
- package/src/decorators/di/Configurable.mjs +2 -2
- package/src/decorators/di/Inject.cjs +6 -6
- package/src/decorators/di/Inject.mjs +11 -11
- package/src/decorators/di/Lifetime.cjs +18 -18
- package/src/decorators/di/Lifetime.mjs +13 -13
- package/src/decorators/dto/Accept.cjs +3 -3
- package/src/decorators/dto/Accept.mjs +2 -2
- package/src/decorators/dto/Expect.cjs +2 -2
- package/src/decorators/dto/Expect.mjs +3 -3
- package/src/decorators/dto/IndexSignature.cjs +2 -2
- package/src/decorators/dto/IndexSignature.mjs +3 -3
- package/src/decorators/dto/Return.cjs +3 -3
- package/src/decorators/dto/Return.mjs +2 -2
- package/src/decorators/orm/AfterInsert.cjs +17 -39
- package/src/decorators/orm/AfterInsert.mjs +18 -38
- package/src/decorators/orm/AfterLoad.cjs +17 -39
- package/src/decorators/orm/AfterLoad.mjs +18 -38
- package/src/decorators/orm/AfterRecover.cjs +17 -39
- package/src/decorators/orm/AfterRecover.mjs +18 -38
- package/src/decorators/orm/AfterRemove.cjs +17 -39
- package/src/decorators/orm/AfterRemove.mjs +18 -38
- package/src/decorators/orm/AfterSoftRemove.cjs +17 -39
- package/src/decorators/orm/AfterSoftRemove.mjs +18 -38
- package/src/decorators/orm/AfterUpdate.cjs +17 -39
- package/src/decorators/orm/AfterUpdate.mjs +18 -38
- package/src/decorators/orm/BeforeInsert.cjs +17 -39
- package/src/decorators/orm/BeforeInsert.mjs +18 -38
- package/src/decorators/orm/BeforeRecover.cjs +17 -39
- package/src/decorators/orm/BeforeRecover.mjs +18 -38
- package/src/decorators/orm/BeforeRemove.cjs +17 -39
- package/src/decorators/orm/BeforeRemove.mjs +18 -38
- package/src/decorators/orm/BeforeSoftRemove.cjs +17 -39
- package/src/decorators/orm/BeforeSoftRemove.mjs +18 -38
- package/src/decorators/orm/BeforeUpdate.cjs +17 -39
- package/src/decorators/orm/BeforeUpdate.mjs +18 -38
- package/src/decorators/orm/Check.cjs +17 -42
- package/src/decorators/orm/Check.mjs +18 -41
- package/src/decorators/orm/ChildEntity.cjs +17 -42
- package/src/decorators/orm/ChildEntity.mjs +18 -41
- package/src/decorators/orm/Column.cjs +17 -74
- package/src/decorators/orm/Column.mjs +19 -74
- package/src/decorators/orm/CreateDateColumn.cjs +17 -38
- package/src/decorators/orm/CreateDateColumn.mjs +18 -37
- package/src/decorators/orm/DeleteDateColumn.cjs +17 -38
- package/src/decorators/orm/DeleteDateColumn.mjs +17 -36
- package/src/decorators/orm/Entity.cjs +17 -48
- package/src/decorators/orm/Entity.mjs +17 -46
- package/src/decorators/orm/EventSubscriber.cjs +17 -35
- package/src/decorators/orm/EventSubscriber.mjs +18 -34
- package/src/decorators/orm/Exclusion.cjs +17 -42
- package/src/decorators/orm/Exclusion.mjs +18 -41
- package/src/decorators/orm/Generated.cjs +17 -37
- package/src/decorators/orm/Generated.mjs +18 -36
- package/src/decorators/orm/Index.cjs +17 -54
- package/src/decorators/orm/Index.mjs +19 -54
- package/src/decorators/orm/JoinColumn.cjs +17 -42
- package/src/decorators/orm/JoinColumn.mjs +18 -41
- package/src/decorators/orm/JoinTable.cjs +17 -43
- package/src/decorators/orm/JoinTable.mjs +17 -41
- package/src/decorators/orm/ManyToMany.cjs +17 -55
- package/src/decorators/orm/ManyToMany.mjs +17 -53
- package/src/decorators/orm/ManyToOne.cjs +17 -55
- package/src/decorators/orm/ManyToOne.mjs +17 -53
- package/src/decorators/orm/ObjectIdColumn.cjs +17 -41
- package/src/decorators/orm/ObjectIdColumn.mjs +18 -40
- package/src/decorators/orm/OneToMany.cjs +17 -47
- package/src/decorators/orm/OneToMany.mjs +19 -47
- package/src/decorators/orm/OneToOne.cjs +17 -55
- package/src/decorators/orm/OneToOne.mjs +17 -53
- package/src/decorators/orm/PrimaryColumn.cjs +17 -62
- package/src/decorators/orm/PrimaryColumn.mjs +19 -62
- package/src/decorators/orm/PrimaryGeneratedColumn.cjs +17 -67
- package/src/decorators/orm/PrimaryGeneratedColumn.mjs +19 -67
- package/src/decorators/orm/RelationId.cjs +17 -39
- package/src/decorators/orm/RelationId.mjs +18 -38
- package/src/decorators/orm/TableInheritance.cjs +17 -39
- package/src/decorators/orm/TableInheritance.mjs +18 -38
- package/src/decorators/orm/Tree.cjs +17 -37
- package/src/decorators/orm/Tree.mjs +18 -36
- package/src/decorators/orm/TreeChildren.cjs +17 -44
- package/src/decorators/orm/TreeChildren.mjs +17 -42
- package/src/decorators/orm/TreeLevelColumn.cjs +17 -38
- package/src/decorators/orm/TreeLevelColumn.mjs +17 -36
- package/src/decorators/orm/TreeParent.cjs +17 -44
- package/src/decorators/orm/TreeParent.mjs +17 -42
- package/src/decorators/orm/Unique.cjs +17 -57
- package/src/decorators/orm/Unique.mjs +19 -57
- package/src/decorators/orm/UpdateDateColumn.cjs +17 -38
- package/src/decorators/orm/UpdateDateColumn.mjs +18 -37
- package/src/decorators/orm/VersionColumn.cjs +17 -38
- package/src/decorators/orm/VersionColumn.mjs +18 -37
- package/src/decorators/orm/ViewColumn.cjs +17 -38
- package/src/decorators/orm/ViewColumn.mjs +18 -37
- package/src/decorators/orm/ViewEntity.cjs +17 -47
- package/src/decorators/orm/ViewEntity.mjs +18 -46
- package/src/decorators/orm/VirtualColumn.cjs +17 -55
- package/src/decorators/orm/VirtualColumn.mjs +17 -53
- package/src/lib/base/BaseObject.cjs +4 -2
- package/src/lib/base/BaseObject.mjs +4 -2
- package/src/lib/base/EventEmitter.cjs +1202 -1195
- package/src/lib/base/EventEmitter.mjs +1202 -1195
- package/src/lib/base/async-constructor/Append.cjs +11 -11
- package/src/lib/base/async-constructor/Append.mjs +7 -7
- package/src/lib/base/internal/ApplicationConfigLoader.cjs +4 -2
- package/src/lib/base/internal/ApplicationConfigLoader.mjs +4 -2
- package/src/lib/base/internal/BasicInfo.cjs +10 -10
- package/src/lib/base/internal/BasicInfo.mjs +9 -9
- package/src/lib/base/internal/CamelCase.cjs +4 -4
- package/src/lib/base/internal/CamelCase.mjs +11 -11
- package/src/lib/base/internal/ConfigurableRecordsInjection.cjs +19 -19
- package/src/lib/base/internal/ConfigurableRecordsInjection.mjs +18 -18
- package/src/lib/base/internal/ConstructorSymbol.cjs +10 -10
- package/src/lib/base/internal/ConstructorSymbol.mjs +8 -8
- package/src/lib/base/internal/ControllerEntrypoint.cjs +67 -67
- package/src/lib/base/internal/ControllerEntrypoint.mjs +38 -38
- package/src/lib/base/internal/DataValidator.cjs +176 -179
- package/src/lib/base/internal/DataValidator.mjs +221 -224
- package/src/lib/base/internal/GetActionDTOAndOptions.cjs +9 -9
- package/src/lib/base/internal/GetActionDTOAndOptions.mjs +10 -10
- package/src/lib/base/internal/IEEE754.cjs +74 -74
- package/src/lib/base/internal/IEEE754.mjs +70 -70
- package/src/lib/base/internal/MethodAssistantFunction.cjs +28 -28
- package/src/lib/base/internal/MethodAssistantFunction.mjs +38 -38
- package/src/lib/base/internal/MethodValidation.cjs +25 -25
- package/src/lib/base/internal/MethodValidation.mjs +20 -20
- package/src/lib/base/internal/ModuleConfigLoader.cjs +4 -3
- package/src/lib/base/internal/ModuleConfigLoader.mjs +4 -3
- package/src/lib/base/internal/ObjectConfiguration.cjs +10 -10
- package/src/lib/base/internal/ObjectConfiguration.mjs +15 -15
- package/src/lib/base/internal/ObjectContainer.cjs +7 -7
- package/src/lib/base/internal/ObjectContainer.mjs +6 -6
- package/src/lib/base/internal/ObjectInjection.cjs +16 -16
- package/src/lib/base/internal/ObjectInjection.mjs +13 -13
- package/src/lib/base/internal/ObjectLifetime.cjs +10 -10
- package/src/lib/base/internal/ObjectLifetime.mjs +9 -9
- package/src/lib/base/internal/ObjectType.cjs +4 -2
- package/src/lib/base/internal/ObjectType.mjs +4 -2
- package/src/lib/base/internal/ObjectWeakRefs.cjs +11 -11
- package/src/lib/base/internal/ObjectWeakRefs.mjs +9 -9
- package/src/lib/base/internal/PatternManager.cjs +744 -739
- package/src/lib/base/internal/PatternManager.mjs +748 -743
- package/src/lib/base/internal/StringifyPattern.cjs +26 -26
- package/src/lib/base/internal/StringifyPattern.mjs +26 -26
- package/src/lib/base/internal/ThrowWarning.cjs +2 -2
- package/src/lib/base/internal/ThrowWarning.mjs +2 -2
- package/src/lib/core/Alias.cjs +5 -5
- package/src/lib/core/Application.cjs +146 -142
- package/src/lib/core/Application.mjs +204 -202
- package/src/lib/core/Component.cjs +4 -2
- package/src/lib/core/Component.mjs +4 -2
- package/src/lib/core/Container.cjs +4 -2
- package/src/lib/core/Container.mjs +4 -2
- package/src/lib/core/Module.cjs +5 -3
- package/src/lib/core/Module.mjs +5 -3
- package/src/lib/core/Provider.cjs +4 -2
- package/src/lib/core/Provider.mjs +4 -2
- package/src/lib/helpers/ArrayToSet.cjs +2 -2
- package/src/lib/helpers/ArrayToSet.mjs +3 -3
- package/src/lib/helpers/As.cjs +2 -2
- package/src/lib/helpers/As.mjs +2 -2
- package/src/lib/helpers/ConvertArrayLikeToIterable.cjs +3 -3
- package/src/lib/helpers/ConvertArrayLikeToIterable.mjs +3 -3
- package/src/lib/helpers/ConvertArrayLikeToStream.cjs +2 -2
- package/src/lib/helpers/ConvertArrayLikeToStream.mjs +2 -2
- package/src/lib/helpers/Delay.cjs +2 -2
- package/src/lib/helpers/Delay.mjs +2 -2
- package/src/lib/helpers/DevNull.cjs +2 -2
- package/src/lib/helpers/DevNull.mjs +2 -2
- package/src/lib/helpers/GetObjectNestingDepth.cjs +12 -12
- package/src/lib/helpers/GetObjectNestingDepth.mjs +11 -11
- package/src/lib/helpers/GetObjectPropertyPaths.cjs +7 -7
- package/src/lib/helpers/GetObjectPropertyPaths.mjs +9 -9
- package/src/lib/helpers/Glob.cjs +1192 -943
- package/src/lib/helpers/Glob.mjs +1256 -1007
- package/src/lib/helpers/GraceExit.cjs +3 -3
- package/src/lib/helpers/GraceExit.mjs +7 -7
- package/src/lib/helpers/HexToIEEE754.cjs +4 -4
- package/src/lib/helpers/HexToIEEE754.mjs +2 -2
- package/src/lib/helpers/HexToSigned.cjs +5 -5
- package/src/lib/helpers/HexToSigned.mjs +4 -4
- package/src/lib/helpers/HexToUnsigned.cjs +2 -2
- package/src/lib/helpers/HexToUnsigned.mjs +2 -2
- package/src/lib/helpers/IEEE754ToHex.cjs +5 -5
- package/src/lib/helpers/IEEE754ToHex.mjs +5 -5
- package/src/lib/helpers/IsAbortError.cjs +2 -2
- package/src/lib/helpers/IsAbortError.mjs +3 -3
- package/src/lib/helpers/IsEmptyObject.cjs +3 -3
- package/src/lib/helpers/IsEmptyObject.mjs +3 -3
- package/src/lib/helpers/IsExists.cjs +5 -5
- package/src/lib/helpers/IsExists.mjs +4 -4
- package/src/lib/helpers/IsHtml.cjs +18 -8
- package/src/lib/helpers/IsHtml.mjs +18 -8
- package/src/lib/helpers/IsNativeFunction.cjs +2 -2
- package/src/lib/helpers/IsNativeFunction.mjs +2 -2
- package/src/lib/helpers/IsPath.cjs +2 -2
- package/src/lib/helpers/IsPath.mjs +5 -5
- package/src/lib/helpers/IsPromise.cjs +2 -2
- package/src/lib/helpers/IsPromise.mjs +2 -2
- package/src/lib/helpers/IsPromiseLike.cjs +5 -5
- package/src/lib/helpers/IsPromiseLike.mjs +6 -6
- package/src/lib/helpers/IsXML.cjs +1525 -1531
- package/src/lib/helpers/IsXML.mjs +1521 -1527
- package/src/lib/helpers/MD5.cjs +3 -3
- package/src/lib/helpers/MD5.mjs +3 -3
- package/src/lib/helpers/MergeArray.cjs +3 -3
- package/src/lib/helpers/MergeArray.mjs +3 -3
- package/src/lib/helpers/MergeMap.cjs +3 -3
- package/src/lib/helpers/MergeMap.mjs +3 -3
- package/src/lib/helpers/MergeSet.cjs +2 -2
- package/src/lib/helpers/MergeSet.mjs +3 -3
- package/src/lib/helpers/NoCase.cjs +27 -27
- package/src/lib/helpers/NoCase.mjs +24 -24
- package/src/lib/helpers/NonceStr.cjs +3 -3
- package/src/lib/helpers/NonceStr.mjs +3 -3
- package/src/lib/helpers/ObjectConstructor.cjs +2 -2
- package/src/lib/helpers/ObjectConstructor.mjs +4 -4
- package/src/lib/helpers/ObjectHash.cjs +385 -378
- package/src/lib/helpers/ObjectHash.mjs +381 -374
- package/src/lib/helpers/ObjectParentConstructor.cjs +2 -2
- package/src/lib/helpers/ObjectParentConstructor.mjs +5 -5
- package/src/lib/helpers/ObjectParentConstructors.cjs +6 -6
- package/src/lib/helpers/ObjectParentConstructors.mjs +2 -2
- package/src/lib/helpers/ObjectPrototype.cjs +2 -2
- package/src/lib/helpers/ObjectPrototype.mjs +2 -2
- package/src/lib/helpers/ObjectToMap.cjs +2 -2
- package/src/lib/helpers/ObjectToMap.mjs +3 -3
- package/src/lib/helpers/Paginator.cjs +2 -2
- package/src/lib/helpers/Paginator.mjs +6 -6
- package/src/lib/helpers/RandomString.cjs +170 -149
- package/src/lib/helpers/RandomString.mjs +167 -146
- package/src/lib/helpers/SHA1.cjs +3 -3
- package/src/lib/helpers/SHA1.mjs +3 -3
- package/src/lib/helpers/SHA256.cjs +3 -3
- package/src/lib/helpers/SHA256.mjs +3 -3
- package/src/lib/helpers/SetToArray.cjs +2 -2
- package/src/lib/helpers/SetToArray.mjs +2 -2
- package/src/lib/helpers/SignedToHex.cjs +4 -4
- package/src/lib/helpers/SignedToHex.mjs +4 -4
- package/src/lib/helpers/SortArray.cjs +17 -17
- package/src/lib/helpers/SortArray.mjs +16 -16
- package/src/lib/helpers/SortKeys.cjs +41 -41
- package/src/lib/helpers/SortKeys.mjs +41 -41
- package/src/lib/helpers/SortObject.cjs +2 -2
- package/src/lib/helpers/SortObject.mjs +2 -2
- package/src/lib/helpers/Statistics.cjs +1 -1
- package/src/lib/helpers/Statistics.mjs +1 -1
- package/src/lib/helpers/Templating.cjs +25 -25
- package/src/lib/helpers/Templating.mjs +25 -25
- package/src/lib/helpers/URLBuilder.cjs +355 -355
- package/src/lib/helpers/URLBuilder.mjs +349 -349
- package/src/lib/helpers/UUID.cjs +1 -1
- package/src/lib/helpers/UUID.mjs +1 -1
- package/src/lib/helpers/UniqueArray.cjs +3 -3
- package/src/lib/helpers/UniqueArray.mjs +2 -2
- package/src/lib/helpers/UnsignedToHex.cjs +3 -3
- package/src/lib/helpers/UnsignedToHex.mjs +3 -3
- package/src/lib/ioc/DependencyInjectionContainer.cjs +111 -109
- package/src/lib/ioc/DependencyInjectionContainer.mjs +123 -121
- package/src/lib/ioc/FunctionTokenizer.cjs +115 -115
- package/src/lib/ioc/FunctionTokenizer.mjs +102 -102
- package/src/lib/ioc/Lifetime.cjs +5 -5
- package/src/lib/ioc/Lifetime.mjs +5 -5
- package/src/lib/ioc/ListModules.cjs +5222 -5297
- package/src/lib/ioc/ListModules.mjs +5187 -5262
- package/src/lib/ioc/LoadModules.cjs +56 -56
- package/src/lib/ioc/LoadModules.mjs +69 -69
- package/src/lib/ioc/ParamParser.cjs +30 -30
- package/src/lib/ioc/ParamParser.mjs +41 -41
- package/src/lib/ioc/Resolvers.cjs +87 -87
- package/src/lib/ioc/Resolvers.mjs +109 -109
- package/src/lib/ioc/Utils.cjs +12 -12
- package/src/lib/ioc/Utils.mjs +18 -18
- package/src/lib/validation/VLD.cjs +4198 -4020
- package/src/lib/validation/VLD.mjs +3137 -2959
- package/src/options/ApplicationOptions.cjs +4 -2
- package/src/options/ApplicationOptions.mjs +4 -2
- package/src/options/LoadAnonymousObjectOptions.cjs +4 -2
- package/src/options/LoadAnonymousObjectOptions.mjs +4 -2
- package/src/options/LoadNamedObjectOptions.cjs +4 -2
- package/src/options/LoadNamedObjectOptions.mjs +4 -2
- package/src/options/LoadObjectOptions.cjs +4 -2
- package/src/options/LoadObjectOptions.mjs +4 -2
- package/src/options/ModuleLoadObjectsOptions.cjs +4 -2
- package/src/options/ModuleLoadObjectsOptions.mjs +4 -2
- package/src/options/ModuleOptions.cjs +4 -4
- package/src/options/ModuleOptions.mjs +4 -4
- package/src/options/OverridableNamedObjectOptions.cjs +4 -2
- package/src/options/OverridableNamedObjectOptions.mjs +4 -2
- package/src/options/OverridableObjectOptions.cjs +4 -2
- package/src/options/OverridableObjectOptions.mjs +4 -2
- package/src/providers/Database.cjs +13 -13
- package/src/providers/Database.mjs +18 -18
- package/src/providers/PasswordHash.cjs +334 -332
- package/src/providers/PasswordHash.mjs +389 -387
- package/src/providers/migration/GenerateMigration.cjs +15 -19
- package/src/providers/migration/GenerateMigration.mjs +15 -19
- package/vendor/Package.1.cjs +256 -256
- package/vendor/Package.1.mjs +254 -254
- package/vendor/Package.10.cjs +2 -8
- package/vendor/Package.10.mjs +2 -8
- package/vendor/Package.11.cjs +5 -83
- package/vendor/Package.11.mjs +5 -77
- package/vendor/Package.112.cjs +48900 -0
- package/vendor/Package.112.mjs +48764 -0
- package/vendor/Package.12.cjs +4 -2
- package/vendor/Package.12.mjs +6 -4
- package/vendor/Package.13.cjs +87 -1
- package/vendor/Package.13.mjs +81 -1
- package/vendor/Package.14.cjs +1 -14057
- package/vendor/Package.14.mjs +1 -14031
- package/vendor/Package.15.cjs +1 -1
- package/vendor/Package.15.mjs +1 -1
- package/vendor/Package.16.cjs +18115 -1921
- package/vendor/Package.16.mjs +18115 -1839
- package/vendor/Package.17.cjs +1926 -47922
- package/vendor/Package.17.mjs +1852 -47915
- package/vendor/Package.18.cjs +35 -1
- package/vendor/Package.18.mjs +35 -1
- package/vendor/Package.19.cjs +37 -0
- package/vendor/Package.19.mjs +35 -0
- package/vendor/Package.2.cjs +5856 -5827
- package/vendor/Package.2.mjs +5854 -5825
- package/vendor/Package.20.cjs +37 -0
- package/vendor/Package.20.mjs +35 -0
- package/vendor/Package.21.cjs +37 -0
- package/vendor/Package.21.mjs +35 -0
- package/vendor/Package.22.cjs +37 -0
- package/vendor/Package.22.mjs +35 -0
- package/vendor/Package.23.cjs +37 -0
- package/vendor/Package.23.mjs +35 -0
- package/vendor/Package.24.cjs +37 -0
- package/vendor/Package.24.mjs +35 -0
- package/vendor/Package.25.cjs +37 -0
- package/vendor/Package.25.mjs +35 -0
- package/vendor/Package.26.cjs +37 -0
- package/vendor/Package.26.mjs +35 -0
- package/vendor/Package.27.cjs +37 -0
- package/vendor/Package.27.mjs +35 -0
- package/vendor/Package.28.cjs +37 -0
- package/vendor/Package.28.mjs +35 -0
- package/vendor/Package.29.cjs +40 -0
- package/vendor/Package.29.mjs +38 -0
- package/vendor/Package.3.cjs +60 -60
- package/vendor/Package.3.mjs +85 -85
- package/vendor/Package.30.cjs +41 -0
- package/vendor/Package.30.mjs +39 -0
- package/vendor/Package.31.cjs +72 -0
- package/vendor/Package.31.mjs +70 -0
- package/vendor/Package.32.cjs +37 -0
- package/vendor/Package.32.mjs +35 -0
- package/vendor/Package.33.cjs +37 -0
- package/vendor/Package.33.mjs +35 -0
- package/vendor/Package.34.cjs +46 -0
- package/vendor/Package.34.mjs +44 -0
- package/vendor/Package.35.cjs +34 -0
- package/vendor/Package.35.mjs +32 -0
- package/vendor/Package.36.cjs +40 -0
- package/vendor/Package.36.mjs +38 -0
- package/vendor/Package.37.cjs +36 -0
- package/vendor/Package.37.mjs +34 -0
- package/vendor/Package.38.cjs +52 -0
- package/vendor/Package.38.mjs +50 -0
- package/vendor/Package.39.cjs +41 -0
- package/vendor/Package.39.mjs +39 -0
- package/vendor/Package.4.cjs +884 -874
- package/vendor/Package.4.mjs +887 -877
- package/vendor/Package.40.cjs +42 -0
- package/vendor/Package.40.mjs +40 -0
- package/vendor/Package.41.cjs +53 -0
- package/vendor/Package.41.mjs +51 -0
- package/vendor/Package.42.cjs +53 -0
- package/vendor/Package.42.mjs +51 -0
- package/vendor/Package.43.cjs +40 -0
- package/vendor/Package.43.mjs +38 -0
- package/vendor/Package.44.cjs +46 -0
- package/vendor/Package.44.mjs +44 -0
- package/vendor/Package.45.cjs +53 -0
- package/vendor/Package.45.mjs +51 -0
- package/vendor/Package.46.cjs +59 -0
- package/vendor/Package.46.mjs +57 -0
- package/vendor/Package.47.cjs +65 -0
- package/vendor/Package.47.mjs +63 -0
- package/vendor/Package.48.cjs +38 -0
- package/vendor/Package.48.mjs +36 -0
- package/vendor/Package.49.cjs +38 -0
- package/vendor/Package.49.mjs +36 -0
- package/vendor/Package.5.cjs +19 -15
- package/vendor/Package.5.mjs +14 -10
- package/vendor/Package.50.cjs +36 -0
- package/vendor/Package.50.mjs +34 -0
- package/vendor/Package.51.cjs +43 -0
- package/vendor/Package.51.mjs +41 -0
- package/vendor/Package.52.cjs +37 -0
- package/vendor/Package.52.mjs +35 -0
- package/vendor/Package.53.cjs +43 -0
- package/vendor/Package.53.mjs +41 -0
- package/vendor/Package.54.cjs +55 -0
- package/vendor/Package.54.mjs +53 -0
- package/vendor/Package.55.cjs +37 -0
- package/vendor/Package.55.mjs +35 -0
- package/vendor/Package.56.cjs +37 -0
- package/vendor/Package.56.mjs +35 -0
- package/vendor/Package.57.cjs +37 -0
- package/vendor/Package.57.mjs +35 -0
- package/vendor/Package.58.cjs +45 -0
- package/vendor/Package.58.mjs +43 -0
- package/vendor/Package.59.cjs +53 -0
- package/vendor/Package.59.mjs +51 -0
- package/vendor/Package.6.cjs +2067 -2058
- package/vendor/Package.6.mjs +2073 -2064
- package/vendor/Package.60.cjs +47649 -0
- package/vendor/Package.60.mjs +47606 -0
- package/vendor/Package.610.cjs +19 -19
- package/vendor/Package.610.mjs +11 -11
- package/vendor/Package.611.cjs +40 -30
- package/vendor/Package.611.mjs +30 -20
- package/vendor/Package.612.cjs +48 -42
- package/vendor/Package.612.mjs +39 -33
- package/vendor/Package.613.cjs +64 -63
- package/vendor/Package.613.mjs +34 -33
- package/vendor/Package.62.cjs +300 -297
- package/vendor/Package.62.mjs +283 -280
- package/vendor/Package.63.cjs +511 -168
- package/vendor/Package.63.mjs +490 -165
- package/vendor/Package.64.cjs +139 -511
- package/vendor/Package.64.mjs +139 -491
- package/vendor/Package.65.cjs +4135 -150
- package/vendor/Package.65.mjs +4143 -150
- package/vendor/Package.66.cjs +346 -4150
- package/vendor/Package.66.mjs +346 -4158
- package/vendor/Package.67.cjs +433 -282
- package/vendor/Package.67.mjs +431 -280
- package/vendor/Package.68.cjs +248 -397
- package/vendor/Package.68.mjs +81 -230
- package/vendor/Package.69.cjs +8 -8
- package/vendor/Package.7.cjs +3 -3
- package/vendor/Package.7.mjs +3 -3
- package/vendor/Package.8.cjs +0 -4
- package/vendor/Package.8.mjs +0 -4
- package/vendor/Package.9.cjs +138 -124
- package/vendor/Package.9.mjs +135 -121
- package/vendor/TypeDef.internal.3.d.ts +0 -4
- package/vendor/Package.102.cjs +0 -48773
- package/vendor/Package.102.mjs +0 -48697
- package/vendor/Package.122.cjs +0 -3
- package/vendor/Package.122.mjs +0 -1
package/vendor/Package.612.mjs
CHANGED
|
@@ -10,7 +10,7 @@ var a;
|
|
|
10
10
|
|
|
11
11
|
var i;
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var pool = (t, s = {}) => {
|
|
14
14
|
if (i !== t) {
|
|
15
15
|
a = void 0;
|
|
16
16
|
i = t;
|
|
@@ -22,12 +22,12 @@ var o = (t, s = {}) => {
|
|
|
22
22
|
return a;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
var
|
|
26
|
-
await a
|
|
25
|
+
var endPool = async () => {
|
|
26
|
+
await (a?.end());
|
|
27
27
|
i = void 0;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var o = class extends t {
|
|
31
31
|
ttlSupport;
|
|
32
32
|
opts;
|
|
33
33
|
query;
|
|
@@ -48,26 +48,19 @@ var n = class extends t {
|
|
|
48
48
|
...t
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
const s = async () => {
|
|
52
|
-
const s = o(t.uri, t);
|
|
53
|
-
return async (t, e) => {
|
|
54
|
-
const a = await s.query(t, e);
|
|
55
|
-
return a.rows;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
51
|
this.opts = {
|
|
59
52
|
table: "keyv",
|
|
60
53
|
schema: "public",
|
|
61
54
|
keySize: 255,
|
|
62
55
|
...t
|
|
63
56
|
};
|
|
64
|
-
let
|
|
57
|
+
let s = `CREATE${this.opts.useUnloggedTable ? " UNLOGGED " : " "}TABLE IF NOT EXISTS ${this.opts.schema}.${this.opts.table}(key VARCHAR(${Number(this.opts.keySize)}) PRIMARY KEY, value TEXT )`;
|
|
65
58
|
if (this.opts.schema !== "public") {
|
|
66
|
-
|
|
59
|
+
s = `CREATE SCHEMA IF NOT EXISTS ${this.opts.schema}; ${s}`;
|
|
67
60
|
}
|
|
68
|
-
const
|
|
61
|
+
const e = this.connect().then((async t => {
|
|
69
62
|
try {
|
|
70
|
-
await t(
|
|
63
|
+
await t(s);
|
|
71
64
|
} catch (s) {
|
|
72
65
|
if (s.code !== "23505") {
|
|
73
66
|
this.emit("error", s);
|
|
@@ -76,7 +69,7 @@ var n = class extends t {
|
|
|
76
69
|
}
|
|
77
70
|
return t;
|
|
78
71
|
})).catch((t => this.emit("error", t)));
|
|
79
|
-
this.query = async (t, s) =>
|
|
72
|
+
this.query = async (t, s) => e.then((e => e(t, s)));
|
|
80
73
|
}
|
|
81
74
|
async get(t) {
|
|
82
75
|
const s = `SELECT * FROM ${this.opts.schema}.${this.opts.table} WHERE key = $1`;
|
|
@@ -87,17 +80,23 @@ var n = class extends t {
|
|
|
87
80
|
async getMany(t) {
|
|
88
81
|
const s = `SELECT * FROM ${this.opts.schema}.${this.opts.table} WHERE key = ANY($1)`;
|
|
89
82
|
const e = await this.query(s, [ t ]);
|
|
90
|
-
const a = [];
|
|
91
|
-
|
|
92
|
-
const t = e?.findIndex((t => t.key === s));
|
|
93
|
-
a.push(t > -1 ? e[t].value : void 0);
|
|
94
|
-
}
|
|
95
|
-
return a;
|
|
83
|
+
const a = new Map(e.map((t => [ t.key, t ])));
|
|
84
|
+
return t.map((t => a.get(t)?.value));
|
|
96
85
|
}
|
|
97
86
|
async set(t, s) {
|
|
98
87
|
const e = `INSERT INTO ${this.opts.schema}.${this.opts.table} (key, value)\n VALUES($1, $2) \n ON CONFLICT(key) \n DO UPDATE SET value=excluded.value;`;
|
|
99
88
|
await this.query(e, [ t, s ]);
|
|
100
89
|
}
|
|
90
|
+
async setMany(t) {
|
|
91
|
+
const s = [];
|
|
92
|
+
const e = [];
|
|
93
|
+
for (const {key: a, value: i} of t) {
|
|
94
|
+
s.push(a);
|
|
95
|
+
e.push(i);
|
|
96
|
+
}
|
|
97
|
+
const a = `INSERT INTO ${this.opts.schema}.${this.opts.table} (key, value)\n SELECT * FROM UNNEST($1::text[], $2::text[])\n ON CONFLICT(key)\n DO UPDATE SET value=excluded.value;`;
|
|
98
|
+
await this.query(a, [ s, e ]);
|
|
99
|
+
}
|
|
101
100
|
async delete(t) {
|
|
102
101
|
const s = `SELECT * FROM ${this.opts.schema}.${this.opts.table} WHERE key = $1`;
|
|
103
102
|
const e = `DELETE FROM ${this.opts.schema}.${this.opts.table} WHERE key = $1`;
|
|
@@ -124,34 +123,41 @@ var n = class extends t {
|
|
|
124
123
|
}
|
|
125
124
|
async* iterator(t) {
|
|
126
125
|
const s = Number.parseInt(String(this.opts.iterationLimit), 10) || 10;
|
|
127
|
-
async function* e
|
|
128
|
-
const
|
|
129
|
-
const n = await o
|
|
126
|
+
async function* iterate(e, a, i) {
|
|
127
|
+
const o = `SELECT * FROM ${a.schema}.${a.table} WHERE key LIKE $1 LIMIT $2 OFFSET $3`;
|
|
128
|
+
const n = await i(o, [ `${t ? t + ":" : ""}%`, s, e ]);
|
|
130
129
|
if (n.length === 0) {
|
|
131
130
|
return;
|
|
132
131
|
}
|
|
133
132
|
for (const t of n) {
|
|
134
|
-
|
|
133
|
+
e += 1;
|
|
135
134
|
yield [ t.key, t.value ];
|
|
136
135
|
}
|
|
137
|
-
yield* e
|
|
136
|
+
yield* iterate(e, a, i);
|
|
138
137
|
}
|
|
139
|
-
yield*
|
|
138
|
+
yield* iterate(0, this.opts, this.query);
|
|
140
139
|
}
|
|
141
140
|
async has(t) {
|
|
142
141
|
const s = `SELECT EXISTS ( SELECT * FROM ${this.opts.schema}.${this.opts.table} WHERE key = $1 )`;
|
|
143
142
|
const e = await this.query(s, [ t ]);
|
|
144
143
|
return e[0].exists;
|
|
145
144
|
}
|
|
145
|
+
async connect() {
|
|
146
|
+
const t = pool(this.opts.uri, this.opts);
|
|
147
|
+
return async (s, e) => {
|
|
148
|
+
const a = await t.query(s, e);
|
|
149
|
+
return a.rows;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
146
152
|
async disconnect() {
|
|
147
|
-
await
|
|
153
|
+
await endPool();
|
|
148
154
|
}
|
|
149
155
|
};
|
|
150
156
|
|
|
151
|
-
var
|
|
152
|
-
store: new
|
|
157
|
+
var createKeyv = t => new s({
|
|
158
|
+
store: new o(t)
|
|
153
159
|
});
|
|
154
160
|
|
|
155
|
-
var
|
|
161
|
+
var n = o;
|
|
156
162
|
|
|
157
|
-
export {
|
|
163
|
+
export { o as KeyvPostgres, createKeyv, n as default };
|
package/vendor/Package.613.cjs
CHANGED
|
@@ -8,19 +8,19 @@ const t = require("events");
|
|
|
8
8
|
|
|
9
9
|
const e = require("mysql2");
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const _interopDefault = t => t && t.__esModule ? t : {
|
|
12
12
|
default: t
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const s = _interopDefault(t);
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const a = _interopDefault(e);
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var o;
|
|
20
20
|
|
|
21
21
|
var i;
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var parseConnectionString = t => {
|
|
24
24
|
t = t.replace(/#/g, "%23");
|
|
25
25
|
const e = new URL(t);
|
|
26
26
|
const s = {
|
|
@@ -38,30 +38,30 @@ var r = t => {
|
|
|
38
38
|
return s;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var pool = (t, e = {}) => {
|
|
42
42
|
if (i !== t) {
|
|
43
|
-
|
|
43
|
+
o = void 0;
|
|
44
44
|
i = t;
|
|
45
45
|
}
|
|
46
|
-
const s =
|
|
47
|
-
const
|
|
46
|
+
const s = parseConnectionString(t);
|
|
47
|
+
const n = {
|
|
48
48
|
...s,
|
|
49
49
|
...e
|
|
50
50
|
};
|
|
51
|
-
|
|
52
|
-
return
|
|
51
|
+
o ??= a.default.createPool(n);
|
|
52
|
+
return o.promise();
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
var
|
|
56
|
-
if (
|
|
57
|
-
|
|
55
|
+
var endPool = () => {
|
|
56
|
+
if (o) {
|
|
57
|
+
o.end();
|
|
58
58
|
}
|
|
59
59
|
i = void 0;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var n = new Set([ "adapter", "compression", "connect", "dialect", "keySize", "table", "ttl", "uri" ]);
|
|
63
63
|
|
|
64
|
-
var
|
|
64
|
+
var r = class extends s.default {
|
|
65
65
|
ttlSupport=false;
|
|
66
66
|
opts;
|
|
67
67
|
namespace;
|
|
@@ -83,12 +83,12 @@ var u = class extends a.default {
|
|
|
83
83
|
if (e.intervalExpiration !== void 0 && e.intervalExpiration > 0) {
|
|
84
84
|
this.ttlSupport = true;
|
|
85
85
|
}
|
|
86
|
-
const s = Object.fromEntries(Object.entries(e).filter((([t]) => !
|
|
86
|
+
const s = Object.fromEntries(Object.entries(e).filter((([t]) => !n.has(t))));
|
|
87
87
|
delete s.namespace;
|
|
88
88
|
delete s.serialize;
|
|
89
89
|
delete s.deserialize;
|
|
90
|
-
const
|
|
91
|
-
const t =
|
|
90
|
+
const connection = async () => {
|
|
91
|
+
const t = pool(e.uri, s);
|
|
92
92
|
return async e => {
|
|
93
93
|
const s = await t.query(e);
|
|
94
94
|
return s[0];
|
|
@@ -99,9 +99,9 @@ var u = class extends a.default {
|
|
|
99
99
|
keySize: 255,
|
|
100
100
|
...e
|
|
101
101
|
};
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
await t(
|
|
102
|
+
const a = `CREATE TABLE IF NOT EXISTS ${this.opts.table}(id VARCHAR(${Number(this.opts.keySize)}) PRIMARY KEY, value TEXT)`;
|
|
103
|
+
const o = connection().then((async t => {
|
|
104
|
+
await t(a);
|
|
105
105
|
if (this.opts.intervalExpiration !== void 0 && this.opts.intervalExpiration > 0) {
|
|
106
106
|
await t("SET GLOBAL event_scheduler = ON;");
|
|
107
107
|
await t("DROP EVENT IF EXISTS keyv_delete_expired_keys;");
|
|
@@ -110,87 +110,88 @@ var u = class extends a.default {
|
|
|
110
110
|
return t;
|
|
111
111
|
})).catch((t => this.emit("error", t)));
|
|
112
112
|
this.query = async t => {
|
|
113
|
-
const e = await
|
|
113
|
+
const e = await o;
|
|
114
114
|
return e(t);
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
async get(t) {
|
|
118
118
|
const e = `SELECT * FROM ${this.opts.table} WHERE id = ?`;
|
|
119
|
-
const s =
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
return
|
|
119
|
+
const s = a.default.format(e, [ t ]);
|
|
120
|
+
const o = await this.query(s);
|
|
121
|
+
const i = o[0];
|
|
122
|
+
return i?.value;
|
|
123
123
|
}
|
|
124
124
|
async getMany(t) {
|
|
125
125
|
const e = `SELECT * FROM ${this.opts.table} WHERE id IN (?)`;
|
|
126
|
-
const s =
|
|
127
|
-
const
|
|
128
|
-
const
|
|
126
|
+
const s = a.default.format(e, [ t ]);
|
|
127
|
+
const o = await this.query(s);
|
|
128
|
+
const i = [];
|
|
129
129
|
for (const e of t) {
|
|
130
|
-
const t =
|
|
131
|
-
|
|
130
|
+
const t = o.findIndex((t => t.id === e));
|
|
131
|
+
i.push(t === -1 ? void 0 : o[t].value);
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return i;
|
|
134
134
|
}
|
|
135
135
|
async set(t, e) {
|
|
136
|
-
const s = `INSERT INTO ${this.opts.table} (id, value)\n\t\t\tVALUES(?, ?)
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
return this.query(
|
|
136
|
+
const s = `INSERT INTO ${this.opts.table} (id, value)\n\t\t\tVALUES(?, ?)\n\t\t\tON DUPLICATE KEY UPDATE value=?;`;
|
|
137
|
+
const o = [ t, e, e ];
|
|
138
|
+
const i = a.default.format(s, o);
|
|
139
|
+
return this.query(i);
|
|
140
140
|
}
|
|
141
141
|
async delete(t) {
|
|
142
142
|
const e = `SELECT * FROM ${this.opts.table} WHERE id = ?`;
|
|
143
|
-
const s =
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
const r =
|
|
143
|
+
const s = a.default.format(e, [ t ]);
|
|
144
|
+
const o = `DELETE FROM ${this.opts.table} WHERE id = ?`;
|
|
145
|
+
const i = a.default.format(o, [ t ]);
|
|
146
|
+
const n = await this.query(s);
|
|
147
|
+
const r = n[0];
|
|
148
148
|
if (r === void 0) {
|
|
149
149
|
return false;
|
|
150
150
|
}
|
|
151
|
-
await this.query(
|
|
151
|
+
await this.query(i);
|
|
152
152
|
return true;
|
|
153
153
|
}
|
|
154
154
|
async deleteMany(t) {
|
|
155
155
|
const e = `DELETE FROM ${this.opts.table} WHERE id IN (?)`;
|
|
156
|
-
const s =
|
|
157
|
-
const
|
|
158
|
-
return
|
|
156
|
+
const s = a.default.format(e, [ t ]);
|
|
157
|
+
const o = await this.query(s);
|
|
158
|
+
return o.affectedRows !== 0;
|
|
159
159
|
}
|
|
160
160
|
async clear() {
|
|
161
161
|
const t = `DELETE FROM ${this.opts.table} WHERE id LIKE ?`;
|
|
162
|
-
const e =
|
|
162
|
+
const e = a.default.format(t, [ this.namespace ? `${this.namespace}:%` : "%" ]);
|
|
163
163
|
await this.query(e);
|
|
164
164
|
}
|
|
165
165
|
async* iterator(t) {
|
|
166
166
|
const e = Number.parseInt(this.opts.iterationLimit, 10) || 10;
|
|
167
|
-
async function* s
|
|
168
|
-
const
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
if (
|
|
167
|
+
async function* iterate(s, o, i) {
|
|
168
|
+
const n = `SELECT * FROM ${o.table} WHERE id LIKE ? LIMIT ? OFFSET ?`;
|
|
169
|
+
const r = a.default.format(n, [ `${t ? t + ":" : ""}%`, e, s ]);
|
|
170
|
+
const c = await i(r);
|
|
171
|
+
if (c.length === 0) {
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
174
|
-
for (const t of
|
|
175
|
-
|
|
174
|
+
for (const t of c) {
|
|
175
|
+
s += 1;
|
|
176
176
|
yield [ t.id, t.value ];
|
|
177
177
|
}
|
|
178
|
-
yield* s
|
|
178
|
+
yield* iterate(s, o, i);
|
|
179
179
|
}
|
|
180
|
-
yield*
|
|
180
|
+
yield* iterate(0, this.opts, this.query);
|
|
181
181
|
}
|
|
182
182
|
async has(t) {
|
|
183
|
-
const e = `SELECT EXISTS ( SELECT * FROM ${this.opts.table} WHERE id =
|
|
184
|
-
const s =
|
|
185
|
-
|
|
183
|
+
const e = `SELECT EXISTS ( SELECT * FROM ${this.opts.table} WHERE id = ? )`;
|
|
184
|
+
const s = a.default.format(e, [ t ]);
|
|
185
|
+
const o = await this.query(s);
|
|
186
|
+
return Object.values(o[0])[0] === 1;
|
|
186
187
|
}
|
|
187
188
|
async disconnect() {
|
|
188
|
-
|
|
189
|
+
endPool();
|
|
189
190
|
}
|
|
190
191
|
};
|
|
191
192
|
|
|
192
|
-
var
|
|
193
|
+
var c = r;
|
|
193
194
|
|
|
194
|
-
exports.KeyvMysql =
|
|
195
|
+
exports.KeyvMysql = r;
|
|
195
196
|
|
|
196
|
-
exports.default =
|
|
197
|
+
exports.default = c;
|
package/vendor/Package.613.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var s;
|
|
|
6
6
|
|
|
7
7
|
var a;
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var parseConnectionString = t => {
|
|
10
10
|
t = t.replace(/#/g, "%23");
|
|
11
11
|
const e = new URL(t);
|
|
12
12
|
const s = {
|
|
@@ -24,30 +24,30 @@ var o = t => {
|
|
|
24
24
|
return s;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var pool = (t, o = {}) => {
|
|
28
28
|
if (a !== t) {
|
|
29
29
|
s = void 0;
|
|
30
30
|
a = t;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
...
|
|
35
|
-
...
|
|
32
|
+
const i = parseConnectionString(t);
|
|
33
|
+
const n = {
|
|
34
|
+
...i,
|
|
35
|
+
...o
|
|
36
36
|
};
|
|
37
|
-
s ??= e.createPool(
|
|
37
|
+
s ??= e.createPool(n);
|
|
38
38
|
return s.promise();
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var endPool = () => {
|
|
42
42
|
if (s) {
|
|
43
43
|
s.end();
|
|
44
44
|
}
|
|
45
45
|
a = void 0;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
var
|
|
48
|
+
var o = new Set([ "adapter", "compression", "connect", "dialect", "keySize", "table", "ttl", "uri" ]);
|
|
49
49
|
|
|
50
|
-
var
|
|
50
|
+
var i = class extends t {
|
|
51
51
|
ttlSupport=false;
|
|
52
52
|
opts;
|
|
53
53
|
namespace;
|
|
@@ -69,12 +69,12 @@ var c = class extends t {
|
|
|
69
69
|
if (e.intervalExpiration !== void 0 && e.intervalExpiration > 0) {
|
|
70
70
|
this.ttlSupport = true;
|
|
71
71
|
}
|
|
72
|
-
const s = Object.fromEntries(Object.entries(e).filter((([t]) => !
|
|
72
|
+
const s = Object.fromEntries(Object.entries(e).filter((([t]) => !o.has(t))));
|
|
73
73
|
delete s.namespace;
|
|
74
74
|
delete s.serialize;
|
|
75
75
|
delete s.deserialize;
|
|
76
|
-
const
|
|
77
|
-
const t =
|
|
76
|
+
const connection = async () => {
|
|
77
|
+
const t = pool(e.uri, s);
|
|
78
78
|
return async e => {
|
|
79
79
|
const s = await t.query(e);
|
|
80
80
|
return s[0];
|
|
@@ -85,9 +85,9 @@ var c = class extends t {
|
|
|
85
85
|
keySize: 255,
|
|
86
86
|
...e
|
|
87
87
|
};
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
await t(
|
|
88
|
+
const a = `CREATE TABLE IF NOT EXISTS ${this.opts.table}(id VARCHAR(${Number(this.opts.keySize)}) PRIMARY KEY, value TEXT)`;
|
|
89
|
+
const i = connection().then((async t => {
|
|
90
|
+
await t(a);
|
|
91
91
|
if (this.opts.intervalExpiration !== void 0 && this.opts.intervalExpiration > 0) {
|
|
92
92
|
await t("SET GLOBAL event_scheduler = ON;");
|
|
93
93
|
await t("DROP EVENT IF EXISTS keyv_delete_expired_keys;");
|
|
@@ -96,7 +96,7 @@ var c = class extends t {
|
|
|
96
96
|
return t;
|
|
97
97
|
})).catch((t => this.emit("error", t)));
|
|
98
98
|
this.query = async t => {
|
|
99
|
-
const e = await
|
|
99
|
+
const e = await i;
|
|
100
100
|
return e(t);
|
|
101
101
|
};
|
|
102
102
|
}
|
|
@@ -119,7 +119,7 @@ var c = class extends t {
|
|
|
119
119
|
return i;
|
|
120
120
|
}
|
|
121
121
|
async set(t, s) {
|
|
122
|
-
const a = `INSERT INTO ${this.opts.table} (id, value)\n\t\t\tVALUES(?, ?)
|
|
122
|
+
const a = `INSERT INTO ${this.opts.table} (id, value)\n\t\t\tVALUES(?, ?)\n\t\t\tON DUPLICATE KEY UPDATE value=?;`;
|
|
123
123
|
const o = [ t, s, s ];
|
|
124
124
|
const i = e.format(a, o);
|
|
125
125
|
return this.query(i);
|
|
@@ -150,31 +150,32 @@ var c = class extends t {
|
|
|
150
150
|
}
|
|
151
151
|
async* iterator(t) {
|
|
152
152
|
const s = Number.parseInt(this.opts.iterationLimit, 10) || 10;
|
|
153
|
-
async function* a
|
|
154
|
-
const
|
|
155
|
-
const
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
153
|
+
async function* iterate(a, o, i) {
|
|
154
|
+
const n = `SELECT * FROM ${o.table} WHERE id LIKE ? LIMIT ? OFFSET ?`;
|
|
155
|
+
const r = e.format(n, [ `${t ? t + ":" : ""}%`, s, a ]);
|
|
156
|
+
const c = await i(r);
|
|
157
|
+
if (c.length === 0) {
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
for (const t of
|
|
161
|
-
|
|
160
|
+
for (const t of c) {
|
|
161
|
+
a += 1;
|
|
162
162
|
yield [ t.id, t.value ];
|
|
163
163
|
}
|
|
164
|
-
yield* a
|
|
164
|
+
yield* iterate(a, o, i);
|
|
165
165
|
}
|
|
166
|
-
yield*
|
|
166
|
+
yield* iterate(0, this.opts, this.query);
|
|
167
167
|
}
|
|
168
168
|
async has(t) {
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
|
|
169
|
+
const s = `SELECT EXISTS ( SELECT * FROM ${this.opts.table} WHERE id = ? )`;
|
|
170
|
+
const a = e.format(s, [ t ]);
|
|
171
|
+
const o = await this.query(a);
|
|
172
|
+
return Object.values(o[0])[0] === 1;
|
|
172
173
|
}
|
|
173
174
|
async disconnect() {
|
|
174
|
-
|
|
175
|
+
endPool();
|
|
175
176
|
}
|
|
176
177
|
};
|
|
177
178
|
|
|
178
|
-
var
|
|
179
|
+
var n = i;
|
|
179
180
|
|
|
180
|
-
export {
|
|
181
|
+
export { i as KeyvMysql, n as default };
|