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