lakutata 2.0.81 → 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/orm.cjs +731 -731
- package/orm.mjs +835 -835
- package/package.json +1 -1
- package/src/components/Database.cjs +2 -2
- package/src/components/Database.mjs +6 -6
- package/src/components/cacher/Cacher.cjs +129 -129
- package/src/components/cacher/Cacher.mjs +117 -117
- package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +94 -94
- package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +100 -100
- 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 +10 -10
- package/src/components/docker/ConnectionOptionsBuilder.mjs +6 -6
- package/src/components/docker/Docker.cjs +1687 -1687
- package/src/components/docker/Docker.mjs +1563 -1563
- 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 +1789 -1789
- package/src/components/entrypoint/Entrypoint.mjs +1632 -1632
- package/src/components/monitor/AliveMonitor.cjs +2 -2
- package/src/components/monitor/AliveMonitor.mjs +2 -2
- package/src/components/monitor/MemoryMonitor.cjs +3 -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 +2 -2
- package/src/decorators/ctrl/CLIAction.mjs +7 -7
- package/src/decorators/ctrl/HTTPAction.cjs +6 -6
- package/src/decorators/ctrl/HTTPAction.mjs +4 -4
- package/src/decorators/ctrl/ServiceAction.cjs +3 -3
- package/src/decorators/ctrl/ServiceAction.mjs +4 -4
- package/src/decorators/ctrl/http/DELETE.cjs +2 -2
- package/src/decorators/ctrl/http/DELETE.mjs +2 -2
- package/src/decorators/ctrl/http/GET.cjs +2 -2
- package/src/decorators/ctrl/http/GET.mjs +2 -2
- package/src/decorators/ctrl/http/HEAD.cjs +2 -2
- package/src/decorators/ctrl/http/HEAD.mjs +2 -2
- package/src/decorators/ctrl/http/OPTIONS.cjs +2 -2
- package/src/decorators/ctrl/http/OPTIONS.mjs +2 -2
- package/src/decorators/ctrl/http/PATCH.cjs +2 -2
- package/src/decorators/ctrl/http/PATCH.mjs +2 -2
- package/src/decorators/ctrl/http/POST.cjs +2 -2
- package/src/decorators/ctrl/http/POST.mjs +2 -2
- package/src/decorators/ctrl/http/PUT.cjs +2 -2
- package/src/decorators/ctrl/http/PUT.mjs +2 -2
- 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/lib/base/EventEmitter.cjs +238 -238
- package/src/lib/base/EventEmitter.mjs +221 -221
- 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/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 +65 -65
- package/src/lib/base/internal/ControllerEntrypoint.mjs +36 -36
- package/src/lib/base/internal/DataValidator.cjs +70 -70
- package/src/lib/base/internal/DataValidator.mjs +137 -137
- 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/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/ObjectWeakRefs.cjs +11 -11
- package/src/lib/base/internal/ObjectWeakRefs.mjs +9 -9
- package/src/lib/base/internal/PatternManager.cjs +235 -235
- package/src/lib/base/internal/PatternManager.mjs +233 -233
- 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 +57 -57
- package/src/lib/core/Application.mjs +63 -63
- 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 +890 -890
- package/src/lib/helpers/Glob.mjs +889 -889
- 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 +23 -7
- package/src/lib/helpers/IsHtml.mjs +23 -7
- 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 +1502 -1650
- package/src/lib/helpers/IsXML.mjs +1500 -1648
- package/src/lib/helpers/MD5.cjs +2 -2
- package/src/lib/helpers/MD5.mjs +2 -2
- 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 +2 -2
- package/src/lib/helpers/NonceStr.mjs +2 -2
- package/src/lib/helpers/ObjectConstructor.cjs +2 -2
- package/src/lib/helpers/ObjectConstructor.mjs +4 -4
- package/src/lib/helpers/ObjectHash.cjs +234 -234
- package/src/lib/helpers/ObjectHash.mjs +227 -227
- 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 +82 -82
- package/src/lib/helpers/RandomString.mjs +67 -67
- package/src/lib/helpers/SHA1.cjs +2 -2
- package/src/lib/helpers/SHA1.mjs +2 -2
- package/src/lib/helpers/SHA256.cjs +2 -2
- package/src/lib/helpers/SHA256.mjs +2 -2
- 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 +16 -16
- package/src/lib/helpers/SortArray.mjs +15 -15
- 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/Templating.cjs +25 -25
- package/src/lib/helpers/Templating.mjs +25 -25
- package/src/lib/helpers/URLBuilder.cjs +234 -234
- package/src/lib/helpers/URLBuilder.mjs +231 -231
- 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 +106 -106
- package/src/lib/ioc/DependencyInjectionContainer.mjs +122 -122
- 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 +3359 -3359
- package/src/lib/ioc/ListModules.mjs +2274 -2274
- 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 +1124 -1124
- package/src/lib/validation/VLD.mjs +1113 -1113
- package/src/providers/Database.cjs +2 -2
- package/src/providers/Database.mjs +7 -7
- package/src/providers/PasswordHash.cjs +330 -330
- package/src/providers/PasswordHash.mjs +397 -397
- package/vendor/Package.1.cjs +256 -256
- package/vendor/Package.1.mjs +254 -254
- package/vendor/Package.112.cjs +32208 -32208
- package/vendor/Package.112.mjs +32111 -32111
- package/vendor/Package.13.cjs +36 -36
- package/vendor/Package.13.mjs +24 -24
- package/vendor/Package.16.cjs +10312 -10312
- package/vendor/Package.16.mjs +10309 -10309
- package/vendor/Package.17.cjs +924 -924
- package/vendor/Package.17.mjs +943 -943
- package/vendor/Package.18.cjs +19 -19
- package/vendor/Package.18.mjs +21 -21
- package/vendor/Package.19.cjs +19 -19
- package/vendor/Package.19.mjs +20 -20
- package/vendor/Package.2.cjs +3913 -3913
- package/vendor/Package.2.mjs +3931 -3931
- package/vendor/Package.20.cjs +16 -16
- package/vendor/Package.20.mjs +12 -12
- package/vendor/Package.21.cjs +19 -19
- package/vendor/Package.21.mjs +17 -17
- package/vendor/Package.22.cjs +11 -11
- package/vendor/Package.22.mjs +12 -12
- package/vendor/Package.23.cjs +8 -8
- package/vendor/Package.23.mjs +12 -12
- package/vendor/Package.24.cjs +16 -16
- package/vendor/Package.24.mjs +14 -14
- package/vendor/Package.25.cjs +11 -11
- package/vendor/Package.25.mjs +12 -12
- package/vendor/Package.26.cjs +19 -19
- package/vendor/Package.26.mjs +12 -12
- package/vendor/Package.27.cjs +16 -16
- package/vendor/Package.27.mjs +6 -6
- package/vendor/Package.28.cjs +19 -19
- package/vendor/Package.28.mjs +17 -17
- package/vendor/Package.29.cjs +15 -15
- package/vendor/Package.29.mjs +13 -13
- package/vendor/Package.3.cjs +60 -60
- package/vendor/Package.3.mjs +85 -85
- package/vendor/Package.30.cjs +9 -9
- package/vendor/Package.30.mjs +9 -9
- package/vendor/Package.31.cjs +14 -14
- package/vendor/Package.31.mjs +27 -27
- package/vendor/Package.32.cjs +11 -11
- package/vendor/Package.32.mjs +11 -11
- package/vendor/Package.33.cjs +4 -4
- package/vendor/Package.33.mjs +6 -6
- package/vendor/Package.34.cjs +10 -10
- package/vendor/Package.34.mjs +23 -23
- package/vendor/Package.35.cjs +6 -6
- package/vendor/Package.35.mjs +16 -16
- package/vendor/Package.36.cjs +17 -17
- package/vendor/Package.36.mjs +21 -21
- package/vendor/Package.37.cjs +15 -15
- package/vendor/Package.37.mjs +17 -17
- package/vendor/Package.38.cjs +12 -12
- package/vendor/Package.38.mjs +16 -16
- package/vendor/Package.39.cjs +17 -17
- package/vendor/Package.39.mjs +13 -13
- package/vendor/Package.4.cjs +412 -412
- package/vendor/Package.4.mjs +537 -537
- package/vendor/Package.40.cjs +5 -5
- package/vendor/Package.40.mjs +6 -6
- package/vendor/Package.41.cjs +18 -18
- package/vendor/Package.41.mjs +17 -17
- package/vendor/Package.42.cjs +24 -24
- package/vendor/Package.42.mjs +17 -17
- package/vendor/Package.43.cjs +5 -5
- package/vendor/Package.43.mjs +19 -19
- package/vendor/Package.44.cjs +16 -16
- package/vendor/Package.44.mjs +13 -13
- package/vendor/Package.45.cjs +21 -21
- package/vendor/Package.45.mjs +22 -22
- package/vendor/Package.46.cjs +6 -6
- package/vendor/Package.46.mjs +22 -22
- package/vendor/Package.47.cjs +16 -16
- package/vendor/Package.47.mjs +29 -29
- package/vendor/Package.48.cjs +8 -8
- package/vendor/Package.48.mjs +16 -16
- package/vendor/Package.49.cjs +6 -6
- package/vendor/Package.49.mjs +20 -20
- package/vendor/Package.5.cjs +10 -10
- package/vendor/Package.5.mjs +9 -9
- package/vendor/Package.50.cjs +13 -13
- package/vendor/Package.50.mjs +14 -14
- package/vendor/Package.51.cjs +18 -18
- package/vendor/Package.51.mjs +23 -23
- package/vendor/Package.52.cjs +4 -4
- package/vendor/Package.52.mjs +5 -5
- package/vendor/Package.53.cjs +6 -6
- package/vendor/Package.53.mjs +8 -8
- package/vendor/Package.54.cjs +30 -30
- package/vendor/Package.54.mjs +29 -29
- package/vendor/Package.55.cjs +16 -16
- package/vendor/Package.55.mjs +20 -20
- package/vendor/Package.56.cjs +14 -14
- package/vendor/Package.56.mjs +18 -18
- package/vendor/Package.57.cjs +6 -6
- package/vendor/Package.57.mjs +17 -17
- package/vendor/Package.58.cjs +22 -22
- package/vendor/Package.58.mjs +19 -19
- package/vendor/Package.59.cjs +18 -18
- package/vendor/Package.59.mjs +13 -13
- package/vendor/Package.6.cjs +1739 -1739
- package/vendor/Package.6.mjs +1739 -1739
- package/vendor/Package.60.cjs +13553 -13553
- package/vendor/Package.60.mjs +13562 -13562
- package/vendor/Package.610.cjs +9 -9
- package/vendor/Package.611.cjs +39 -39
- package/vendor/Package.611.mjs +22 -22
- package/vendor/Package.612.cjs +33 -33
- package/vendor/Package.612.mjs +17 -17
- package/vendor/Package.613.cjs +62 -62
- package/vendor/Package.613.mjs +29 -29
- package/vendor/Package.62.cjs +292 -292
- package/vendor/Package.62.mjs +312 -312
- package/vendor/Package.63.cjs +354 -354
- package/vendor/Package.63.mjs +229 -229
- package/vendor/Package.64.cjs +74 -74
- package/vendor/Package.64.mjs +74 -74
- package/vendor/Package.65.cjs +1833 -1833
- package/vendor/Package.65.mjs +1656 -1656
- package/vendor/Package.66.cjs +16 -16
- package/vendor/Package.66.mjs +16 -16
- package/vendor/Package.67.cjs +87 -87
- package/vendor/Package.67.mjs +85 -85
- package/vendor/Package.68.cjs +115 -256
- package/vendor/Package.68.mjs +134 -268
- package/vendor/Package.69.cjs +8 -8
- package/vendor/Package.7.cjs +3 -3
- package/vendor/Package.7.mjs +3 -3
- package/vendor/Package.9.cjs +45 -45
- package/vendor/Package.9.mjs +79 -79
package/vendor/Package.68.mjs
CHANGED
|
@@ -1,73 +1,27 @@
|
|
|
1
|
-
import { createClient as t,
|
|
1
|
+
import { createClient as t, createCluster as e } from "@redis/client";
|
|
2
2
|
|
|
3
|
-
export { createClient, createCluster
|
|
4
|
-
|
|
5
|
-
import r from "cluster-key-slot";
|
|
3
|
+
export { createClient, createCluster } from "@redis/client";
|
|
6
4
|
|
|
7
5
|
import { H as i } from "./Package.66.mjs";
|
|
8
6
|
|
|
9
|
-
import { K as
|
|
7
|
+
import { K as r } from "./Package.67.mjs";
|
|
8
|
+
|
|
9
|
+
import s from "cluster-key-slot";
|
|
10
10
|
|
|
11
11
|
import "buffer";
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var n = (t => {
|
|
14
14
|
t["RedisClientNotConnectedThrown"] = "Redis client is not connected or has failed to connect. This is thrown because throwOnConnectError is set to true.";
|
|
15
15
|
return t;
|
|
16
|
-
})(
|
|
16
|
+
})(n || {});
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var defaultReconnectStrategy = t => {
|
|
19
19
|
const e = Math.min(2 ** t * 100, 2e3);
|
|
20
|
-
const
|
|
21
|
-
return e +
|
|
20
|
+
const i = (Math.random() - .5) * 100;
|
|
21
|
+
return e + i;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
t ??= "redis://localhost:6379";
|
|
26
|
-
const s = new l(t, e);
|
|
27
|
-
if (e?.namespace) {
|
|
28
|
-
s.namespace = e.namespace;
|
|
29
|
-
const t = new n(s, {
|
|
30
|
-
namespace: e?.namespace,
|
|
31
|
-
useKeyPrefix: false
|
|
32
|
-
});
|
|
33
|
-
if (e?.throwOnConnectError) {
|
|
34
|
-
t.throwOnErrors = true;
|
|
35
|
-
}
|
|
36
|
-
if (e?.throwOnErrors) {
|
|
37
|
-
t.throwOnErrors = true;
|
|
38
|
-
}
|
|
39
|
-
return t;
|
|
40
|
-
}
|
|
41
|
-
const r = new n(s, {
|
|
42
|
-
useKeyPrefix: false
|
|
43
|
-
});
|
|
44
|
-
if (e?.throwOnConnectError) {
|
|
45
|
-
r.throwOnErrors = true;
|
|
46
|
-
}
|
|
47
|
-
if (e?.throwOnErrors) {
|
|
48
|
-
r.throwOnErrors = true;
|
|
49
|
-
}
|
|
50
|
-
r.namespace = void 0;
|
|
51
|
-
return r;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function h(t, e) {
|
|
55
|
-
const s = c(t, e);
|
|
56
|
-
const r = s.store;
|
|
57
|
-
r.throwOnConnectError = false;
|
|
58
|
-
r.throwOnErrors = false;
|
|
59
|
-
const i = r.client;
|
|
60
|
-
if (i.options) {
|
|
61
|
-
i.options.disableOfflineQueue = true;
|
|
62
|
-
if (i.options.socket) {
|
|
63
|
-
i.options.socket.reconnectStrategy = false;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
s.throwOnErrors = false;
|
|
67
|
-
return s;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
var l = class extends i {
|
|
24
|
+
var o = class extends i {
|
|
71
25
|
_client=t();
|
|
72
26
|
_namespace;
|
|
73
27
|
_keyPrefixSeparator="::";
|
|
@@ -75,38 +29,26 @@ var l = class extends i {
|
|
|
75
29
|
_useUnlink=true;
|
|
76
30
|
_noNamespaceAffectsAll=false;
|
|
77
31
|
_throwOnConnectError=true;
|
|
78
|
-
|
|
32
|
+
_throwErrors=false;
|
|
79
33
|
_connectionTimeout;
|
|
80
|
-
constructor(
|
|
34
|
+
constructor(i, r) {
|
|
81
35
|
super();
|
|
82
|
-
const
|
|
83
|
-
reconnectStrategy:
|
|
36
|
+
const s = {
|
|
37
|
+
reconnectStrategy: defaultReconnectStrategy
|
|
84
38
|
};
|
|
85
|
-
if (
|
|
86
|
-
if (typeof
|
|
39
|
+
if (i) {
|
|
40
|
+
if (typeof i === "string") {
|
|
87
41
|
this._client = t({
|
|
88
|
-
url:
|
|
89
|
-
socket:
|
|
42
|
+
url: i,
|
|
43
|
+
socket: s
|
|
90
44
|
});
|
|
91
|
-
} else if (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
this._client = r;
|
|
96
|
-
} else {
|
|
97
|
-
this._client = r;
|
|
98
|
-
}
|
|
99
|
-
} else if (r instanceof Object) {
|
|
100
|
-
if (r.sentinelRootNodes !== void 0) {
|
|
101
|
-
this._client = e(r);
|
|
102
|
-
} else if (r.rootNodes === void 0) {
|
|
103
|
-
this._client = t(r);
|
|
104
|
-
} else {
|
|
105
|
-
this._client = s(r);
|
|
106
|
-
}
|
|
45
|
+
} else if (i.connect !== void 0) {
|
|
46
|
+
this._client = this.isClientCluster(i) ? i : i;
|
|
47
|
+
} else if (i instanceof Object) {
|
|
48
|
+
this._client = i.rootNodes === void 0 ? t(i) : e(i);
|
|
107
49
|
}
|
|
108
50
|
}
|
|
109
|
-
this.setOptions(
|
|
51
|
+
this.setOptions(r);
|
|
110
52
|
this.initClient();
|
|
111
53
|
}
|
|
112
54
|
get client() {
|
|
@@ -131,7 +73,7 @@ var l = class extends i {
|
|
|
131
73
|
noNamespaceAffectsAll: this._noNamespaceAffectsAll,
|
|
132
74
|
useUnlink: this._useUnlink,
|
|
133
75
|
throwOnConnectError: this._throwOnConnectError,
|
|
134
|
-
|
|
76
|
+
throwErrors: this._throwErrors,
|
|
135
77
|
connectionTimeout: this._connectionTimeout,
|
|
136
78
|
dialect: "redis",
|
|
137
79
|
url: t
|
|
@@ -181,11 +123,11 @@ var l = class extends i {
|
|
|
181
123
|
set throwOnConnectError(t) {
|
|
182
124
|
this._throwOnConnectError = t;
|
|
183
125
|
}
|
|
184
|
-
get
|
|
185
|
-
return this.
|
|
126
|
+
get throwErrors() {
|
|
127
|
+
return this._throwErrors;
|
|
186
128
|
}
|
|
187
|
-
set
|
|
188
|
-
this.
|
|
129
|
+
set throwErrors(t) {
|
|
130
|
+
this._throwErrors = t;
|
|
189
131
|
}
|
|
190
132
|
get connectionTimeout() {
|
|
191
133
|
return this._connectionTimeout;
|
|
@@ -205,80 +147,50 @@ var l = class extends i {
|
|
|
205
147
|
}
|
|
206
148
|
} catch (t) {
|
|
207
149
|
this.emit("error", t);
|
|
208
|
-
await this.disconnect(true);
|
|
209
150
|
if (this._throwOnConnectError) {
|
|
210
151
|
throw new Error("Redis client is not connected or has failed to connect. This is thrown because throwOnConnectError is set to true.");
|
|
211
152
|
}
|
|
153
|
+
await this.disconnect(true);
|
|
212
154
|
}
|
|
213
155
|
this.initClient();
|
|
214
156
|
return this._client;
|
|
215
157
|
}
|
|
216
|
-
async set(t, e,
|
|
158
|
+
async set(t, e, i) {
|
|
217
159
|
const r = await this.getClient();
|
|
218
160
|
try {
|
|
219
161
|
t = this.createKeyPrefix(t, this._namespace);
|
|
220
|
-
if (
|
|
162
|
+
if (i) {
|
|
221
163
|
await r.set(t, e, {
|
|
222
|
-
PX:
|
|
164
|
+
PX: i
|
|
223
165
|
});
|
|
224
166
|
} else {
|
|
225
167
|
await r.set(t, e);
|
|
226
168
|
}
|
|
227
169
|
} catch (t) {
|
|
228
170
|
this.emit("error", t);
|
|
229
|
-
if (this.
|
|
171
|
+
if (this._throwErrors) {
|
|
230
172
|
throw t;
|
|
231
173
|
}
|
|
232
174
|
}
|
|
233
175
|
}
|
|
234
176
|
async setMany(t) {
|
|
177
|
+
const e = await this.getClient();
|
|
235
178
|
try {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
await Promise.all(Array.from(e.entries(), (async ([t, e]) => {
|
|
247
|
-
const s = await this.getSlotMaster(t);
|
|
248
|
-
const r = s.multi();
|
|
249
|
-
for (const {key: t, value: s, ttl: i} of e) {
|
|
250
|
-
const e = this.createKeyPrefix(t, this._namespace);
|
|
251
|
-
if (i) {
|
|
252
|
-
r.set(e, s, {
|
|
253
|
-
PX: i
|
|
254
|
-
});
|
|
255
|
-
} else {
|
|
256
|
-
r.set(e, s);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
await r.exec();
|
|
260
|
-
})));
|
|
261
|
-
} else {
|
|
262
|
-
const e = await this.getClient();
|
|
263
|
-
const s = e.multi();
|
|
264
|
-
for (const {key: e, value: r, ttl: i} of t) {
|
|
265
|
-
const t = this.createKeyPrefix(e, this._namespace);
|
|
266
|
-
if (i) {
|
|
267
|
-
s.set(t, r, {
|
|
268
|
-
PX: i
|
|
269
|
-
});
|
|
270
|
-
} else {
|
|
271
|
-
s.set(t, r);
|
|
272
|
-
}
|
|
179
|
+
const i = e.multi();
|
|
180
|
+
for (const {key: e, value: r, ttl: s} of t) {
|
|
181
|
+
const t = this.createKeyPrefix(e, this._namespace);
|
|
182
|
+
if (s) {
|
|
183
|
+
i.set(t, r, {
|
|
184
|
+
PX: s
|
|
185
|
+
});
|
|
186
|
+
} else {
|
|
187
|
+
i.set(t, r);
|
|
273
188
|
}
|
|
274
|
-
await s.exec();
|
|
275
189
|
}
|
|
190
|
+
await i.exec();
|
|
276
191
|
} catch (t) {
|
|
277
192
|
this.emit("error", t);
|
|
278
|
-
if (this.
|
|
279
|
-
throw t;
|
|
280
|
-
}
|
|
281
|
-
if (this._throwOnErrors) {
|
|
193
|
+
if (this._throwErrors) {
|
|
282
194
|
throw t;
|
|
283
195
|
}
|
|
284
196
|
}
|
|
@@ -287,49 +199,29 @@ var l = class extends i {
|
|
|
287
199
|
const e = await this.getClient();
|
|
288
200
|
try {
|
|
289
201
|
t = this.createKeyPrefix(t, this._namespace);
|
|
290
|
-
const
|
|
291
|
-
return
|
|
202
|
+
const i = await e.exists(t);
|
|
203
|
+
return i === 1;
|
|
292
204
|
} catch (t) {
|
|
293
205
|
this.emit("error", t);
|
|
294
|
-
if (this.
|
|
206
|
+
if (this._throwErrors) {
|
|
295
207
|
throw t;
|
|
296
208
|
}
|
|
297
209
|
return false;
|
|
298
210
|
}
|
|
299
211
|
}
|
|
300
212
|
async hasMany(t) {
|
|
213
|
+
const e = await this.getClient();
|
|
301
214
|
try {
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
const t = this.
|
|
305
|
-
|
|
306
|
-
await Promise.all(Array.from(t.entries(), (async ([t, e]) => {
|
|
307
|
-
const r = await this.getSlotMaster(t);
|
|
308
|
-
const i = r.multi();
|
|
309
|
-
for (const t of e) {
|
|
310
|
-
i.exists(t);
|
|
311
|
-
}
|
|
312
|
-
const n = await i.exec();
|
|
313
|
-
for (const [t, r] of n.entries()) {
|
|
314
|
-
s.set(e[t], typeof r === "number" && r === 1);
|
|
315
|
-
}
|
|
316
|
-
})));
|
|
317
|
-
return e.map((t => s.get(t) ?? false));
|
|
318
|
-
} else {
|
|
319
|
-
const t = await this.getClient();
|
|
320
|
-
const s = t.multi();
|
|
321
|
-
for (const t of e) {
|
|
322
|
-
s.exists(t);
|
|
323
|
-
}
|
|
324
|
-
const r = await s.exec();
|
|
325
|
-
return r.map((t => typeof t === "number" && t === 1));
|
|
215
|
+
const i = e.multi();
|
|
216
|
+
for (const e of t) {
|
|
217
|
+
const t = this.createKeyPrefix(e, this._namespace);
|
|
218
|
+
i.exists(t);
|
|
326
219
|
}
|
|
220
|
+
const r = await i.exec();
|
|
221
|
+
return r.map((t => t === 1));
|
|
327
222
|
} catch (e) {
|
|
328
223
|
this.emit("error", e);
|
|
329
|
-
if (this.
|
|
330
|
-
throw e;
|
|
331
|
-
}
|
|
332
|
-
if (this._throwOnErrors) {
|
|
224
|
+
if (this._throwErrors) {
|
|
333
225
|
throw e;
|
|
334
226
|
}
|
|
335
227
|
return Array.from({
|
|
@@ -341,14 +233,14 @@ var l = class extends i {
|
|
|
341
233
|
const e = await this.getClient();
|
|
342
234
|
try {
|
|
343
235
|
t = this.createKeyPrefix(t, this._namespace);
|
|
344
|
-
const
|
|
345
|
-
if (
|
|
236
|
+
const i = await e.get(t);
|
|
237
|
+
if (i === null) {
|
|
346
238
|
return void 0;
|
|
347
239
|
}
|
|
348
|
-
return
|
|
240
|
+
return i;
|
|
349
241
|
} catch (t) {
|
|
350
242
|
this.emit("error", t);
|
|
351
|
-
if (this.
|
|
243
|
+
if (this._throwErrors) {
|
|
352
244
|
throw t;
|
|
353
245
|
}
|
|
354
246
|
return void 0;
|
|
@@ -364,7 +256,7 @@ var l = class extends i {
|
|
|
364
256
|
return e;
|
|
365
257
|
} catch (e) {
|
|
366
258
|
this.emit("error", e);
|
|
367
|
-
if (this.
|
|
259
|
+
if (this._throwErrors) {
|
|
368
260
|
throw e;
|
|
369
261
|
}
|
|
370
262
|
return Array.from({
|
|
@@ -376,12 +268,12 @@ var l = class extends i {
|
|
|
376
268
|
const e = await this.getClient();
|
|
377
269
|
try {
|
|
378
270
|
t = this.createKeyPrefix(t, this._namespace);
|
|
379
|
-
let
|
|
380
|
-
|
|
381
|
-
return
|
|
271
|
+
let i = 0;
|
|
272
|
+
i = await (this._useUnlink ? e.unlink(t) : e.del(t));
|
|
273
|
+
return i > 0;
|
|
382
274
|
} catch (t) {
|
|
383
275
|
this.emit("error", t);
|
|
384
|
-
if (this.
|
|
276
|
+
if (this._throwErrors) {
|
|
385
277
|
throw t;
|
|
386
278
|
}
|
|
387
279
|
return false;
|
|
@@ -389,50 +281,26 @@ var l = class extends i {
|
|
|
389
281
|
}
|
|
390
282
|
async deleteMany(t) {
|
|
391
283
|
let e = false;
|
|
284
|
+
const i = await this.getClient();
|
|
392
285
|
try {
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
const t = this.
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
if (this._useUnlink) {
|
|
401
|
-
i.unlink(t);
|
|
402
|
-
} else {
|
|
403
|
-
i.del(t);
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
const n = await i.exec();
|
|
407
|
-
for (const t of n) {
|
|
408
|
-
if (typeof t === "number" && t > 0) {
|
|
409
|
-
e = true;
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
})));
|
|
413
|
-
} else {
|
|
414
|
-
const t = await this.getClient();
|
|
415
|
-
const r = t.multi();
|
|
416
|
-
for (const t of s) {
|
|
417
|
-
if (this._useUnlink) {
|
|
418
|
-
r.unlink(t);
|
|
419
|
-
} else {
|
|
420
|
-
r.del(t);
|
|
421
|
-
}
|
|
286
|
+
const r = i.multi();
|
|
287
|
+
for (const e of t) {
|
|
288
|
+
const t = this.createKeyPrefix(e, this._namespace);
|
|
289
|
+
if (this._useUnlink) {
|
|
290
|
+
r.unlink(t);
|
|
291
|
+
} else {
|
|
292
|
+
r.del(t);
|
|
422
293
|
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
294
|
+
}
|
|
295
|
+
const s = await r.exec();
|
|
296
|
+
for (const t of s) {
|
|
297
|
+
if (typeof t === "number" && t > 0) {
|
|
298
|
+
e = true;
|
|
428
299
|
}
|
|
429
300
|
}
|
|
430
301
|
} catch (t) {
|
|
431
302
|
this.emit("error", t);
|
|
432
|
-
if (this.
|
|
433
|
-
throw t;
|
|
434
|
-
}
|
|
435
|
-
if (this._throwOnErrors) {
|
|
303
|
+
if (this._throwErrors) {
|
|
436
304
|
throw t;
|
|
437
305
|
}
|
|
438
306
|
}
|
|
@@ -440,7 +308,7 @@ var l = class extends i {
|
|
|
440
308
|
}
|
|
441
309
|
async disconnect(t) {
|
|
442
310
|
if (this._client.isOpen) {
|
|
443
|
-
await (t ? this._client.
|
|
311
|
+
await (t ? this._client.disconnect() : this._client.quit());
|
|
444
312
|
}
|
|
445
313
|
}
|
|
446
314
|
createKeyPrefix(t, e) {
|
|
@@ -458,38 +326,34 @@ var l = class extends i {
|
|
|
458
326
|
isCluster() {
|
|
459
327
|
return this.isClientCluster(this._client);
|
|
460
328
|
}
|
|
461
|
-
isSentinel() {
|
|
462
|
-
return this.isClientSentinel(this._client);
|
|
463
|
-
}
|
|
464
329
|
async getMasterNodes() {
|
|
465
330
|
if (this.isCluster()) {
|
|
466
331
|
const t = await this.getClient();
|
|
467
|
-
|
|
468
|
-
return Promise.all(e);
|
|
332
|
+
return Promise.all(t.masters.map((async e => t.nodeClient(e))));
|
|
469
333
|
}
|
|
470
334
|
return [ await this.getClient() ];
|
|
471
335
|
}
|
|
472
336
|
async* iterator(t) {
|
|
473
337
|
const e = await this.getMasterNodes();
|
|
474
|
-
for (const
|
|
338
|
+
for (const i of e) {
|
|
475
339
|
const e = t ? `${t}${this._keyPrefixSeparator}*` : "*";
|
|
476
340
|
let r = "0";
|
|
477
341
|
do {
|
|
478
|
-
const
|
|
342
|
+
const s = await i.scan(Number.parseInt(r, 10), {
|
|
479
343
|
MATCH: e,
|
|
480
344
|
TYPE: "string"
|
|
481
345
|
});
|
|
482
|
-
r =
|
|
483
|
-
let {keys: n} =
|
|
346
|
+
r = s.cursor.toString();
|
|
347
|
+
let {keys: n} = s;
|
|
484
348
|
if (!t && !this._noNamespaceAffectsAll) {
|
|
485
349
|
n = n.filter((t => !t.includes(this._keyPrefixSeparator)));
|
|
486
350
|
}
|
|
487
351
|
if (n.length > 0) {
|
|
488
352
|
const e = await this.mget(n);
|
|
489
|
-
for (const
|
|
490
|
-
const r = this.getKeyWithoutPrefix(n[
|
|
491
|
-
const
|
|
492
|
-
yield [ r,
|
|
353
|
+
for (const i of n.keys()) {
|
|
354
|
+
const r = this.getKeyWithoutPrefix(n[i], t);
|
|
355
|
+
const s = e[i];
|
|
356
|
+
yield [ r, s ];
|
|
493
357
|
}
|
|
494
358
|
}
|
|
495
359
|
} while (r !== "0");
|
|
@@ -504,13 +368,13 @@ var l = class extends i {
|
|
|
504
368
|
return;
|
|
505
369
|
}
|
|
506
370
|
let e = "0";
|
|
507
|
-
const
|
|
371
|
+
const i = this._clearBatchSize;
|
|
508
372
|
const r = this._namespace ? `${this._namespace}${this._keyPrefixSeparator}*` : "*";
|
|
509
|
-
const
|
|
373
|
+
const s = [];
|
|
510
374
|
do {
|
|
511
|
-
const n = await t.scan(e, {
|
|
375
|
+
const n = await t.scan(Number.parseInt(e, 10), {
|
|
512
376
|
MATCH: r,
|
|
513
|
-
COUNT:
|
|
377
|
+
COUNT: i,
|
|
514
378
|
TYPE: "string"
|
|
515
379
|
});
|
|
516
380
|
e = n.cursor.toString();
|
|
@@ -521,60 +385,52 @@ var l = class extends i {
|
|
|
521
385
|
if (!this._namespace) {
|
|
522
386
|
o = o.filter((t => !t.includes(this._keyPrefixSeparator)));
|
|
523
387
|
}
|
|
524
|
-
|
|
388
|
+
s.push(this.clearWithClusterSupport(o));
|
|
525
389
|
} while (e !== "0");
|
|
526
|
-
await Promise.all(
|
|
390
|
+
await Promise.all(s);
|
|
527
391
|
})));
|
|
528
392
|
} catch (t) {
|
|
529
393
|
this.emit("error", t);
|
|
530
394
|
}
|
|
531
395
|
}
|
|
532
396
|
async mget(t) {
|
|
533
|
-
const e =
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
await
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
e.set(s[t], r ?? void 0);
|
|
541
|
-
}
|
|
542
|
-
})));
|
|
543
|
-
} else {
|
|
544
|
-
const s = await this.getClient();
|
|
545
|
-
const r = await s.mGet(t);
|
|
546
|
-
for (const [s, i] of r.entries()) {
|
|
547
|
-
e.set(t[s], i ?? void 0);
|
|
397
|
+
const e = this.getSlotMap(t);
|
|
398
|
+
const i = new Map;
|
|
399
|
+
await Promise.all(Array.from(e.entries(), (async ([t, e]) => {
|
|
400
|
+
const r = await this.getSlotMaster(t);
|
|
401
|
+
const s = await r.mGet(e);
|
|
402
|
+
for (const [t, r] of s.entries()) {
|
|
403
|
+
i.set(e[t], r ?? void 0);
|
|
548
404
|
}
|
|
549
|
-
}
|
|
550
|
-
return t.map((t =>
|
|
405
|
+
})));
|
|
406
|
+
return t.map((t => i.get(t)));
|
|
551
407
|
}
|
|
552
408
|
async clearWithClusterSupport(t) {
|
|
553
409
|
if (t.length > 0) {
|
|
554
410
|
const e = this.getSlotMap(t);
|
|
555
411
|
await Promise.all(Array.from(e.entries(), (async ([t, e]) => {
|
|
556
|
-
const
|
|
557
|
-
return this._useUnlink ?
|
|
412
|
+
const i = await this.getSlotMaster(t);
|
|
413
|
+
return this._useUnlink ? i.unlink(e) : i.del(e);
|
|
558
414
|
})));
|
|
559
415
|
}
|
|
560
416
|
}
|
|
561
417
|
async getSlotMaster(t) {
|
|
562
418
|
const e = await this.getClient();
|
|
563
419
|
if (this.isCluster()) {
|
|
564
|
-
const
|
|
565
|
-
const r =
|
|
566
|
-
return
|
|
420
|
+
const i = e;
|
|
421
|
+
const r = i.slots[t].master;
|
|
422
|
+
return i.nodeClient(r);
|
|
567
423
|
}
|
|
568
424
|
return e;
|
|
569
425
|
}
|
|
570
426
|
getSlotMap(t) {
|
|
571
427
|
const e = new Map;
|
|
572
428
|
if (this.isCluster()) {
|
|
573
|
-
for (const
|
|
574
|
-
const t =
|
|
575
|
-
const
|
|
576
|
-
|
|
577
|
-
e.set(t,
|
|
429
|
+
for (const i of t) {
|
|
430
|
+
const t = s(i);
|
|
431
|
+
const r = e.get(t) ?? [];
|
|
432
|
+
r.push(i);
|
|
433
|
+
e.set(t, r);
|
|
578
434
|
}
|
|
579
435
|
} else {
|
|
580
436
|
e.set(0, t);
|
|
@@ -582,10 +438,10 @@ var l = class extends i {
|
|
|
582
438
|
return e;
|
|
583
439
|
}
|
|
584
440
|
isClientCluster(t) {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
return
|
|
441
|
+
if (t.options === void 0 && t.scan === void 0) {
|
|
442
|
+
return true;
|
|
443
|
+
}
|
|
444
|
+
return false;
|
|
589
445
|
}
|
|
590
446
|
setOptions(t) {
|
|
591
447
|
if (!t) {
|
|
@@ -609,8 +465,8 @@ var l = class extends i {
|
|
|
609
465
|
if (t.throwOnConnectError !== void 0) {
|
|
610
466
|
this._throwOnConnectError = t.throwOnConnectError;
|
|
611
467
|
}
|
|
612
|
-
if (t.
|
|
613
|
-
this.
|
|
468
|
+
if (t.throwErrors !== void 0) {
|
|
469
|
+
this._throwErrors = t.throwErrors;
|
|
614
470
|
}
|
|
615
471
|
if (t.connectionTimeout !== void 0) {
|
|
616
472
|
this._connectionTimeout = t.connectionTimeout;
|
|
@@ -628,10 +484,20 @@ var l = class extends i {
|
|
|
628
484
|
}));
|
|
629
485
|
}
|
|
630
486
|
async createTimeoutPromise(t) {
|
|
631
|
-
return new Promise(((e,
|
|
632
|
-
|
|
487
|
+
return new Promise(((e, i) => setTimeout((() => {
|
|
488
|
+
i(new Error(`Redis timed out after ${t}ms`));
|
|
633
489
|
}), t)));
|
|
634
490
|
}
|
|
635
491
|
};
|
|
636
492
|
|
|
637
|
-
|
|
493
|
+
function createKeyv(t, e) {
|
|
494
|
+
t ??= "redis://localhost:6379";
|
|
495
|
+
const i = new o(t, e);
|
|
496
|
+
const s = new r(i, {
|
|
497
|
+
namespace: e?.namespace,
|
|
498
|
+
useKeyPrefix: false
|
|
499
|
+
});
|
|
500
|
+
return s;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export { r as Keyv, n as RedisErrorMessages, createKeyv, o as default, defaultReconnectStrategy };
|
package/vendor/Package.69.cjs
CHANGED
|
@@ -12,15 +12,15 @@ const s = require("./Package.67.cjs");
|
|
|
12
12
|
|
|
13
13
|
require("buffer");
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const _interopDefault = e => e && e.__esModule ? e : {
|
|
16
16
|
default: e
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
const
|
|
19
|
+
const r = _interopDefault(e);
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const i = _interopDefault(t);
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var a = class extends r.default {
|
|
24
24
|
ttlSupport=true;
|
|
25
25
|
namespace;
|
|
26
26
|
client;
|
|
@@ -41,7 +41,7 @@ var n = class extends i.default {
|
|
|
41
41
|
t.url = t.uri = e;
|
|
42
42
|
}
|
|
43
43
|
this.opts = t;
|
|
44
|
-
this.client =
|
|
44
|
+
this.client = i.default.Client.create(e, t);
|
|
45
45
|
}
|
|
46
46
|
_getNamespace() {
|
|
47
47
|
return `namespace:${this.namespace}`;
|
|
@@ -136,8 +136,8 @@ var n = class extends i.default {
|
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
var
|
|
139
|
+
var n = a;
|
|
140
140
|
|
|
141
|
-
exports.KeyvMemcache =
|
|
141
|
+
exports.KeyvMemcache = a;
|
|
142
142
|
|
|
143
|
-
exports.default =
|
|
143
|
+
exports.default = n;
|
package/vendor/Package.7.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function
|
|
4
|
-
throw new Error('Could not dynamically require "' +
|
|
3
|
+
function commonjsRequire(o) {
|
|
4
|
+
throw new Error('Could not dynamically require "' + o + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
exports.commonjsRequire =
|
|
7
|
+
exports.commonjsRequire = commonjsRequire;
|