lakutata 2.0.79 → 2.0.81
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 +1423 -886
- 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 +11 -11
- package/src/components/Database.mjs +11 -11
- package/src/components/Logger.cjs +7 -7
- package/src/components/Logger.mjs +7 -7
- package/src/components/cacher/Cacher.cjs +1178 -264
- package/src/components/cacher/Cacher.mjs +1087 -173
- package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +479 -2963
- package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +469 -2947
- package/src/components/docker/ConnectionOptionsBuilder.cjs +15 -17
- package/src/components/docker/ConnectionOptionsBuilder.mjs +13 -15
- package/src/components/docker/Docker.cjs +4884 -4945
- package/src/components/docker/Docker.mjs +4902 -4963
- 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/entrypoint/Entrypoint.cjs +2170 -1678
- package/src/components/entrypoint/Entrypoint.mjs +2126 -1634
- 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 +4 -2
- package/src/components/monitor/AliveMonitor.mjs +4 -2
- 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 +5 -3
- package/src/components/monitor/MemoryMonitor.mjs +5 -3
- package/src/decorators/ctrl/CLIAction.cjs +3 -3
- package/src/decorators/ctrl/CLIAction.mjs +3 -3
- package/src/decorators/ctrl/HTTPAction.cjs +3 -3
- package/src/decorators/ctrl/HTTPAction.mjs +3 -3
- package/src/decorators/ctrl/ServiceAction.cjs +3 -3
- package/src/decorators/ctrl/ServiceAction.mjs +3 -3
- package/src/decorators/ctrl/http/DELETE.cjs +3 -3
- package/src/decorators/ctrl/http/DELETE.mjs +3 -3
- package/src/decorators/ctrl/http/GET.cjs +3 -3
- package/src/decorators/ctrl/http/GET.mjs +3 -3
- package/src/decorators/ctrl/http/HEAD.cjs +3 -3
- package/src/decorators/ctrl/http/HEAD.mjs +3 -3
- package/src/decorators/ctrl/http/OPTIONS.cjs +3 -3
- package/src/decorators/ctrl/http/OPTIONS.mjs +3 -3
- package/src/decorators/ctrl/http/PATCH.cjs +3 -3
- package/src/decorators/ctrl/http/PATCH.mjs +3 -3
- package/src/decorators/ctrl/http/POST.cjs +3 -3
- package/src/decorators/ctrl/http/POST.mjs +3 -3
- package/src/decorators/ctrl/http/PUT.cjs +3 -3
- package/src/decorators/ctrl/http/PUT.mjs +3 -3
- 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 +1200 -1193
- package/src/lib/base/EventEmitter.mjs +1201 -1194
- package/src/lib/base/internal/ApplicationConfigLoader.cjs +4 -2
- package/src/lib/base/internal/ApplicationConfigLoader.mjs +4 -2
- package/src/lib/base/internal/ControllerEntrypoint.cjs +3 -3
- package/src/lib/base/internal/ControllerEntrypoint.mjs +3 -3
- package/src/lib/base/internal/DataValidator.cjs +176 -179
- package/src/lib/base/internal/DataValidator.mjs +177 -180
- package/src/lib/base/internal/ModuleConfigLoader.cjs +4 -3
- package/src/lib/base/internal/ModuleConfigLoader.mjs +4 -3
- package/src/lib/base/internal/ObjectType.cjs +4 -2
- package/src/lib/base/internal/ObjectType.mjs +4 -2
- package/src/lib/base/internal/PatternManager.cjs +740 -735
- package/src/lib/base/internal/PatternManager.mjs +745 -740
- package/src/lib/base/internal/StringifyPattern.cjs +1 -1
- package/src/lib/base/internal/StringifyPattern.mjs +1 -1
- package/src/lib/core/Application.cjs +154 -146
- package/src/lib/core/Application.mjs +203 -197
- 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/Glob.cjs +970 -721
- package/src/lib/helpers/Glob.mjs +1036 -787
- package/src/lib/helpers/IsHtml.cjs +7 -13
- package/src/lib/helpers/IsHtml.mjs +7 -13
- package/src/lib/helpers/IsXML.cjs +1158 -1016
- package/src/lib/helpers/IsXML.mjs +871 -729
- package/src/lib/helpers/MD5.cjs +1 -1
- package/src/lib/helpers/MD5.mjs +1 -1
- package/src/lib/helpers/NonceStr.cjs +1 -1
- package/src/lib/helpers/NonceStr.mjs +1 -1
- package/src/lib/helpers/ObjectHash.cjs +379 -372
- package/src/lib/helpers/ObjectHash.mjs +379 -372
- package/src/lib/helpers/RandomString.cjs +168 -147
- package/src/lib/helpers/RandomString.mjs +167 -146
- package/src/lib/helpers/SHA1.cjs +1 -1
- package/src/lib/helpers/SHA1.mjs +1 -1
- package/src/lib/helpers/SHA256.cjs +1 -1
- package/src/lib/helpers/SHA256.mjs +1 -1
- package/src/lib/helpers/SortArray.cjs +1 -1
- package/src/lib/helpers/SortArray.mjs +1 -1
- package/src/lib/helpers/Statistics.cjs +1 -1
- package/src/lib/helpers/Statistics.mjs +1 -1
- package/src/lib/helpers/URLBuilder.cjs +355 -355
- package/src/lib/helpers/URLBuilder.mjs +350 -350
- package/src/lib/helpers/UUID.cjs +1 -1
- package/src/lib/helpers/UUID.mjs +1 -1
- package/src/lib/ioc/DependencyInjectionContainer.cjs +32 -30
- package/src/lib/ioc/DependencyInjectionContainer.mjs +12 -10
- package/src/lib/ioc/ListModules.cjs +5174 -5249
- package/src/lib/ioc/ListModules.mjs +5177 -5252
- package/src/lib/validation/VLD.cjs +4080 -3902
- package/src/lib/validation/VLD.mjs +2970 -2792
- 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 +11 -11
- package/src/providers/Database.mjs +11 -11
- package/src/providers/PasswordHash.cjs +5 -3
- package/src/providers/PasswordHash.mjs +190 -188
- package/src/providers/migration/GenerateMigration.cjs +15 -19
- package/src/providers/migration/GenerateMigration.mjs +15 -19
- 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 +18129 -1935
- package/vendor/Package.16.mjs +18115 -1839
- package/vendor/Package.17.cjs +1922 -47929
- package/vendor/Package.17.mjs +1874 -47948
- 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 +5739 -5710
- package/vendor/Package.2.mjs +5733 -5704
- 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.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 +884 -874
- 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 +15 -11
- package/vendor/Package.5.mjs +11 -7
- 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 +520 -511
- package/vendor/Package.6.mjs +543 -534
- package/vendor/Package.60.cjs +47649 -0
- package/vendor/Package.60.mjs +47606 -0
- package/vendor/Package.610.cjs +11 -11
- package/vendor/Package.610.mjs +11 -11
- package/vendor/Package.611.cjs +33 -23
- package/vendor/Package.611.mjs +19 -9
- package/vendor/Package.612.cjs +42 -36
- package/vendor/Package.612.mjs +35 -29
- package/vendor/Package.613.cjs +5 -4
- package/vendor/Package.613.mjs +5 -4
- package/vendor/Package.62.cjs +92 -89
- package/vendor/Package.62.mjs +185 -182
- package/vendor/Package.63.cjs +509 -166
- 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 +412 -261
- package/vendor/Package.67.mjs +410 -259
- package/vendor/Package.68.cjs +397 -405
- package/vendor/Package.68.mjs +227 -242
- package/vendor/Package.8.cjs +0 -4
- package/vendor/Package.8.mjs +0 -4
- package/vendor/Package.9.cjs +132 -118
- package/vendor/Package.9.mjs +138 -124
- 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
|
@@ -6,45 +6,47 @@ Object.defineProperty(exports, Symbol.toStringTag, {
|
|
|
6
6
|
|
|
7
7
|
const e = require("../../../vendor/Package.1.cjs");
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const t = require("events");
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const r = require("../../../vendor/Package.66.cjs");
|
|
12
12
|
|
|
13
|
-
const s = require("
|
|
13
|
+
const s = require("../../../vendor/Package.67.cjs");
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const i = require("../../lib/core/Component.cjs");
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const n = require("../../decorators/di/Configurable.cjs");
|
|
18
18
|
|
|
19
|
-
const a = require("
|
|
19
|
+
const a = require("../../lib/helpers/As.cjs");
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const o = require("./adapters/CreateFileCacheAdapter.cjs");
|
|
22
22
|
|
|
23
|
-
const
|
|
23
|
+
const c = require("./adapters/CreateRedisCacheAdapter.cjs");
|
|
24
24
|
|
|
25
|
-
const l = require("./adapters/
|
|
25
|
+
const l = require("./adapters/CreateMemcacheCacheAdapter.cjs");
|
|
26
|
+
|
|
27
|
+
const h = require("./adapters/CreateMongoCacheAdapter.cjs");
|
|
26
28
|
|
|
27
29
|
const u = require("./adapters/CreateSqliteCacheAdapter.cjs");
|
|
28
30
|
|
|
29
|
-
const
|
|
31
|
+
const d = require("./adapters/CreatePostgresCacheAdapter.cjs");
|
|
30
32
|
|
|
31
|
-
const
|
|
33
|
+
const f = require("./adapters/CreateMysqlCacheAdapter.cjs");
|
|
32
34
|
|
|
33
|
-
const
|
|
35
|
+
const m = require("../../../vendor/Package.2.cjs");
|
|
34
36
|
|
|
35
|
-
const
|
|
37
|
+
const g = require("./options/FileCacheOptions.cjs");
|
|
36
38
|
|
|
37
39
|
const y = require("./options/RedisCacheOptions.cjs");
|
|
38
40
|
|
|
39
|
-
const
|
|
41
|
+
const p = require("./options/MemcacheCacheOptions.cjs");
|
|
40
42
|
|
|
41
|
-
const
|
|
43
|
+
const b = require("./options/MongoCacheOptions.cjs");
|
|
42
44
|
|
|
43
|
-
const
|
|
45
|
+
const _ = require("./options/SqliteCacheOptions.cjs");
|
|
44
46
|
|
|
45
|
-
const
|
|
47
|
+
const v = require("./options/PostgresCacheOptions.cjs");
|
|
46
48
|
|
|
47
|
-
const
|
|
49
|
+
const j = require("./options/MysqlCacheOptions.cjs");
|
|
48
50
|
|
|
49
51
|
require("buffer");
|
|
50
52
|
|
|
@@ -140,10 +142,12 @@ require("os");
|
|
|
140
142
|
|
|
141
143
|
require("path");
|
|
142
144
|
|
|
143
|
-
require("stream");
|
|
144
|
-
|
|
145
145
|
require("fs");
|
|
146
146
|
|
|
147
|
+
require("../../../vendor/Package.10.cjs");
|
|
148
|
+
|
|
149
|
+
require("stream");
|
|
150
|
+
|
|
147
151
|
require("../../lib/ioc/Utils.cjs");
|
|
148
152
|
|
|
149
153
|
require("../../lib/ioc/FunctionTokenizer.cjs");
|
|
@@ -186,15 +190,9 @@ require("../../lib/core/Provider.cjs");
|
|
|
186
190
|
|
|
187
191
|
require("../../../vendor/Package.12.cjs");
|
|
188
192
|
|
|
189
|
-
require("
|
|
190
|
-
|
|
191
|
-
require("constants");
|
|
192
|
-
|
|
193
|
-
require("../../../vendor/Package.15.cjs");
|
|
193
|
+
require("fs/promises");
|
|
194
194
|
|
|
195
|
-
require("
|
|
196
|
-
|
|
197
|
-
require("../../../vendor/Package.122.cjs");
|
|
195
|
+
require("../../../vendor/Package.14.cjs");
|
|
198
196
|
|
|
199
197
|
require("./lib/IsDriverPackageInstalled.cjs");
|
|
200
198
|
|
|
@@ -202,97 +200,967 @@ require("./exceptions/CacheDriverNotFoundException.cjs");
|
|
|
202
200
|
|
|
203
201
|
require("../../lib/helpers/URLBuilder.cjs");
|
|
204
202
|
|
|
205
|
-
const
|
|
203
|
+
const w = e => e && e.__esModule ? e : {
|
|
206
204
|
default: e
|
|
207
205
|
};
|
|
208
206
|
|
|
209
|
-
const
|
|
207
|
+
const q = w(t);
|
|
208
|
+
|
|
209
|
+
var S = class {
|
|
210
|
+
get name() {
|
|
211
|
+
return "crc32";
|
|
212
|
+
}
|
|
213
|
+
toHashSync(e) {
|
|
214
|
+
let t;
|
|
215
|
+
if (e instanceof Uint8Array) {
|
|
216
|
+
t = e;
|
|
217
|
+
} else if (e instanceof ArrayBuffer) {
|
|
218
|
+
t = new Uint8Array(e);
|
|
219
|
+
} else if (e instanceof DataView) {
|
|
220
|
+
t = new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
|
|
221
|
+
} else {
|
|
222
|
+
const r = e;
|
|
223
|
+
t = new Uint8Array(r.buffer, r.byteOffset, r.byteLength);
|
|
224
|
+
}
|
|
225
|
+
const r = 3988292384;
|
|
226
|
+
let s = 4294967295;
|
|
227
|
+
for (let e = 0; e < t.length; e++) {
|
|
228
|
+
s = s ^ t[e];
|
|
229
|
+
for (let e = 0; e < 8; e++) {
|
|
230
|
+
s = s >>> 1 ^ r & -(s & 1);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
s = (s ^ 4294967295) >>> 0;
|
|
234
|
+
const i = s.toString(16).padStart(8, "0");
|
|
235
|
+
return i;
|
|
236
|
+
}
|
|
237
|
+
async toHash(e) {
|
|
238
|
+
return this.toHashSync(e);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
var A = class {
|
|
243
|
+
_algorithm="SHA-256";
|
|
244
|
+
constructor(e) {
|
|
245
|
+
if (e?.algorithm) {
|
|
246
|
+
this._algorithm = e?.algorithm;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
get name() {
|
|
250
|
+
return this._algorithm;
|
|
251
|
+
}
|
|
252
|
+
async toHash(e) {
|
|
253
|
+
const t = await crypto.subtle.digest(this._algorithm, e);
|
|
254
|
+
const r = Array.from(new Uint8Array(t));
|
|
255
|
+
const s = r.map((e => e.toString(16).padStart(2, "0"))).join("");
|
|
256
|
+
return s;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
var C = class {
|
|
261
|
+
get name() {
|
|
262
|
+
return "djb2";
|
|
263
|
+
}
|
|
264
|
+
toHashSync(e) {
|
|
265
|
+
let t;
|
|
266
|
+
if (e instanceof Uint8Array) {
|
|
267
|
+
t = e;
|
|
268
|
+
} else if (e instanceof ArrayBuffer) {
|
|
269
|
+
t = new Uint8Array(e);
|
|
270
|
+
} else if (e instanceof DataView) {
|
|
271
|
+
t = new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
|
|
272
|
+
} else {
|
|
273
|
+
const r = e;
|
|
274
|
+
t = new Uint8Array(r.buffer, r.byteOffset, r.byteLength);
|
|
275
|
+
}
|
|
276
|
+
let r = 5381;
|
|
277
|
+
for (let e = 0; e < t.length; e++) {
|
|
278
|
+
r = (r << 5) + r + t[e];
|
|
279
|
+
r = r >>> 0;
|
|
280
|
+
}
|
|
281
|
+
const s = r.toString(16).padStart(8, "0");
|
|
282
|
+
return s;
|
|
283
|
+
}
|
|
284
|
+
async toHash(e) {
|
|
285
|
+
return this.toHashSync(e);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
var k = class {
|
|
290
|
+
get name() {
|
|
291
|
+
return "fnv1";
|
|
292
|
+
}
|
|
293
|
+
toHashSync(e) {
|
|
294
|
+
let t;
|
|
295
|
+
if (e instanceof Uint8Array) {
|
|
296
|
+
t = e;
|
|
297
|
+
} else if (e instanceof ArrayBuffer) {
|
|
298
|
+
t = new Uint8Array(e);
|
|
299
|
+
} else if (e instanceof DataView) {
|
|
300
|
+
t = new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
|
|
301
|
+
} else {
|
|
302
|
+
const r = e;
|
|
303
|
+
t = new Uint8Array(r.buffer, r.byteOffset, r.byteLength);
|
|
304
|
+
}
|
|
305
|
+
const r = 2166136261;
|
|
306
|
+
const s = 16777619;
|
|
307
|
+
let i = r;
|
|
308
|
+
for (let e = 0; e < t.length; e++) {
|
|
309
|
+
i = i * s;
|
|
310
|
+
i = i ^ t[e];
|
|
311
|
+
i = i >>> 0;
|
|
312
|
+
}
|
|
313
|
+
const n = i.toString(16).padStart(8, "0");
|
|
314
|
+
return n;
|
|
315
|
+
}
|
|
316
|
+
async toHash(e) {
|
|
317
|
+
return this.toHashSync(e);
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
var O = class {
|
|
322
|
+
_seed;
|
|
323
|
+
constructor(e = 0) {
|
|
324
|
+
this._seed = e >>> 0;
|
|
325
|
+
}
|
|
326
|
+
get name() {
|
|
327
|
+
return "murmer";
|
|
328
|
+
}
|
|
329
|
+
get seed() {
|
|
330
|
+
return this._seed;
|
|
331
|
+
}
|
|
332
|
+
toHashSync(e) {
|
|
333
|
+
let t;
|
|
334
|
+
if (e instanceof Uint8Array) {
|
|
335
|
+
t = e;
|
|
336
|
+
} else if (e instanceof ArrayBuffer) {
|
|
337
|
+
t = new Uint8Array(e);
|
|
338
|
+
} else if (e instanceof DataView) {
|
|
339
|
+
t = new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
|
|
340
|
+
} else {
|
|
341
|
+
const r = e;
|
|
342
|
+
t = new Uint8Array(r.buffer, r.byteOffset, r.byteLength);
|
|
343
|
+
}
|
|
344
|
+
const r = 3432918353;
|
|
345
|
+
const s = 461845907;
|
|
346
|
+
const i = t.length;
|
|
347
|
+
const n = Math.floor(i / 4);
|
|
348
|
+
let a = this._seed;
|
|
349
|
+
for (let e = 0; e < n; e++) {
|
|
350
|
+
const i = e * 4;
|
|
351
|
+
let n = t[i] & 255 | (t[i + 1] & 255) << 8 | (t[i + 2] & 255) << 16 | (t[i + 3] & 255) << 24;
|
|
352
|
+
n = this._imul(n, r);
|
|
353
|
+
n = this._rotl32(n, 15);
|
|
354
|
+
n = this._imul(n, s);
|
|
355
|
+
a ^= n;
|
|
356
|
+
a = this._rotl32(a, 13);
|
|
357
|
+
a = this._imul(a, 5) + 3864292196;
|
|
358
|
+
}
|
|
359
|
+
const o = n * 4;
|
|
360
|
+
let c = 0;
|
|
361
|
+
switch (i & 3) {
|
|
362
|
+
case 3:
|
|
363
|
+
c ^= (t[o + 2] & 255) << 16;
|
|
364
|
+
|
|
365
|
+
case 2:
|
|
366
|
+
c ^= (t[o + 1] & 255) << 8;
|
|
367
|
+
|
|
368
|
+
case 1:
|
|
369
|
+
c ^= t[o] & 255;
|
|
370
|
+
c = this._imul(c, r);
|
|
371
|
+
c = this._rotl32(c, 15);
|
|
372
|
+
c = this._imul(c, s);
|
|
373
|
+
a ^= c;
|
|
374
|
+
}
|
|
375
|
+
a ^= i;
|
|
376
|
+
a ^= a >>> 16;
|
|
377
|
+
a = this._imul(a, 2246822507);
|
|
378
|
+
a ^= a >>> 13;
|
|
379
|
+
a = this._imul(a, 3266489909);
|
|
380
|
+
a ^= a >>> 16;
|
|
381
|
+
a = a >>> 0;
|
|
382
|
+
const l = a.toString(16).padStart(8, "0");
|
|
383
|
+
return l;
|
|
384
|
+
}
|
|
385
|
+
async toHash(e) {
|
|
386
|
+
return this.toHashSync(e);
|
|
387
|
+
}
|
|
388
|
+
_imul(e, t) {
|
|
389
|
+
if (Math.imul) {
|
|
390
|
+
return Math.imul(e, t);
|
|
391
|
+
}
|
|
392
|
+
const r = e >>> 16 & 65535;
|
|
393
|
+
const s = e & 65535;
|
|
394
|
+
const i = t >>> 16 & 65535;
|
|
395
|
+
const n = t & 65535;
|
|
396
|
+
return s * n + (r * n + s * i << 16 >>> 0) | 0;
|
|
397
|
+
}
|
|
398
|
+
_rotl32(e, t) {
|
|
399
|
+
return e << t | e >>> 32 - t;
|
|
400
|
+
}
|
|
401
|
+
};
|
|
210
402
|
|
|
211
|
-
var
|
|
403
|
+
var x = class {
|
|
404
|
+
_providers=new Map;
|
|
405
|
+
_getFuzzy=true;
|
|
406
|
+
constructor(e) {
|
|
407
|
+
if (e?.providers) {
|
|
408
|
+
this.loadProviders(e?.providers);
|
|
409
|
+
}
|
|
410
|
+
if (e?.getFuzzy !== void 0) {
|
|
411
|
+
this._getFuzzy = Boolean(e?.getFuzzy);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
loadProviders(e) {
|
|
415
|
+
for (const t of e) {
|
|
416
|
+
this._providers.set(t.name, t);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
get providers() {
|
|
420
|
+
return this._providers;
|
|
421
|
+
}
|
|
422
|
+
set providers(e) {
|
|
423
|
+
this._providers = e;
|
|
424
|
+
}
|
|
425
|
+
get names() {
|
|
426
|
+
return Array.from(this._providers.keys());
|
|
427
|
+
}
|
|
428
|
+
get(e, t) {
|
|
429
|
+
const r = t?.fuzzy ?? this._getFuzzy;
|
|
430
|
+
e = e.trim();
|
|
431
|
+
let s = this._providers.get(e);
|
|
432
|
+
if (s === void 0 && r === true) {
|
|
433
|
+
e = e.toLowerCase();
|
|
434
|
+
s = this._providers.get(e);
|
|
435
|
+
}
|
|
436
|
+
if (s === void 0 && r === true) {
|
|
437
|
+
e = e.replaceAll("-", "");
|
|
438
|
+
s = this._providers.get(e);
|
|
439
|
+
}
|
|
440
|
+
return s;
|
|
441
|
+
}
|
|
442
|
+
add(e) {
|
|
443
|
+
this._providers.set(e.name, e);
|
|
444
|
+
}
|
|
445
|
+
remove(e) {
|
|
446
|
+
return this._providers.delete(e);
|
|
447
|
+
}
|
|
448
|
+
};
|
|
212
449
|
|
|
213
|
-
|
|
214
|
-
|
|
450
|
+
var P = class extends r.Hookified {
|
|
451
|
+
_parse=JSON.parse;
|
|
452
|
+
_stringify=JSON.stringify;
|
|
453
|
+
_providers=new x;
|
|
454
|
+
_defaultAlgorithm="SHA-256";
|
|
455
|
+
_defaultAlgorithmSync="djb2";
|
|
456
|
+
constructor(e) {
|
|
457
|
+
super(e);
|
|
458
|
+
if (e?.parse) {
|
|
459
|
+
this._parse = e.parse;
|
|
460
|
+
}
|
|
461
|
+
if (e?.stringify) {
|
|
462
|
+
this._stringify = e.stringify;
|
|
463
|
+
}
|
|
464
|
+
if (e?.defaultAlgorithm) {
|
|
465
|
+
this._defaultAlgorithm = e.defaultAlgorithm;
|
|
466
|
+
}
|
|
467
|
+
if (e?.defaultAlgorithmSync) {
|
|
468
|
+
this._defaultAlgorithmSync = e.defaultAlgorithmSync;
|
|
469
|
+
}
|
|
470
|
+
this.loadProviders(e?.providers, {
|
|
471
|
+
includeBase: e?.includeBase ?? true
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
get parse() {
|
|
475
|
+
return this._parse;
|
|
476
|
+
}
|
|
477
|
+
set parse(e) {
|
|
478
|
+
this._parse = e;
|
|
479
|
+
}
|
|
480
|
+
get stringify() {
|
|
481
|
+
return this._stringify;
|
|
482
|
+
}
|
|
483
|
+
set stringify(e) {
|
|
484
|
+
this._stringify = e;
|
|
485
|
+
}
|
|
486
|
+
get providers() {
|
|
487
|
+
return this._providers;
|
|
488
|
+
}
|
|
489
|
+
set providers(e) {
|
|
490
|
+
this._providers = e;
|
|
491
|
+
}
|
|
492
|
+
get names() {
|
|
493
|
+
return this._providers.names;
|
|
494
|
+
}
|
|
495
|
+
get defaultAlgorithm() {
|
|
496
|
+
return this._defaultAlgorithm;
|
|
497
|
+
}
|
|
498
|
+
set defaultAlgorithm(e) {
|
|
499
|
+
this._defaultAlgorithm = e;
|
|
500
|
+
}
|
|
501
|
+
get defaultAlgorithmSync() {
|
|
502
|
+
return this._defaultAlgorithmSync;
|
|
503
|
+
}
|
|
504
|
+
set defaultAlgorithmSync(e) {
|
|
505
|
+
this._defaultAlgorithmSync = e;
|
|
506
|
+
}
|
|
507
|
+
async toHash(e, t) {
|
|
508
|
+
const r = {
|
|
509
|
+
data: e,
|
|
510
|
+
algorithm: t?.algorithm ?? this._defaultAlgorithm,
|
|
511
|
+
maxLength: t?.maxLength
|
|
512
|
+
};
|
|
513
|
+
await this.beforeHook("toHash", r);
|
|
514
|
+
const s = this._stringify(r.data);
|
|
515
|
+
const i = new TextEncoder;
|
|
516
|
+
const n = i.encode(s);
|
|
517
|
+
let a = this._providers.get(r.algorithm);
|
|
518
|
+
if (!a) {
|
|
519
|
+
a = new A({
|
|
520
|
+
algorithm: this._defaultAlgorithm
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
let o = await a.toHash(n);
|
|
524
|
+
if (t?.maxLength && o.length > t?.maxLength) {
|
|
525
|
+
o = o.substring(0, t.maxLength);
|
|
526
|
+
}
|
|
527
|
+
const c = {
|
|
528
|
+
hash: o,
|
|
529
|
+
data: r.data,
|
|
530
|
+
algorithm: r.algorithm
|
|
531
|
+
};
|
|
532
|
+
await this.afterHook("toHash", c);
|
|
533
|
+
return c.hash;
|
|
534
|
+
}
|
|
535
|
+
async toNumber(e, t = {}) {
|
|
536
|
+
const {min: r = 0, max: s = 100, algorithm: i = this._defaultAlgorithm, hashLength: n = 16} = t;
|
|
537
|
+
if (r > s) {
|
|
538
|
+
throw new Error("min cannot be greater than max");
|
|
539
|
+
}
|
|
540
|
+
const a = await this.toHash(e, {
|
|
541
|
+
algorithm: i,
|
|
542
|
+
maxLength: n
|
|
543
|
+
});
|
|
544
|
+
const o = Number.parseInt(a, 16);
|
|
545
|
+
const c = s - r + 1;
|
|
546
|
+
const l = r + o % c;
|
|
547
|
+
return l;
|
|
548
|
+
}
|
|
549
|
+
toHashSync(e, t) {
|
|
550
|
+
const r = {
|
|
551
|
+
data: e,
|
|
552
|
+
algorithm: t?.algorithm ?? this._defaultAlgorithmSync,
|
|
553
|
+
maxLength: t?.maxLength
|
|
554
|
+
};
|
|
555
|
+
this.beforeHook("toHashSync", r);
|
|
556
|
+
const s = r.algorithm;
|
|
557
|
+
const i = this._stringify(r.data);
|
|
558
|
+
const n = new TextEncoder;
|
|
559
|
+
const a = n.encode(i);
|
|
560
|
+
const o = this._providers.get(s);
|
|
561
|
+
if (!o) {
|
|
562
|
+
throw new Error(`Hash provider '${s}' not found`);
|
|
563
|
+
}
|
|
564
|
+
if (!o.toHashSync) {
|
|
565
|
+
throw new Error(`Hash provider '${s}' does not support synchronous hashing. Use toHash() instead or choose a different algorithm (djb2, fnv1, murmer, crc32).`);
|
|
566
|
+
}
|
|
567
|
+
let c = o.toHashSync(a);
|
|
568
|
+
if (t?.maxLength && c.length > t?.maxLength) {
|
|
569
|
+
c = c.substring(0, t.maxLength);
|
|
570
|
+
}
|
|
571
|
+
const l = {
|
|
572
|
+
hash: c,
|
|
573
|
+
data: r.data,
|
|
574
|
+
algorithm: r.algorithm
|
|
575
|
+
};
|
|
576
|
+
this.afterHook("toHashSync", l);
|
|
577
|
+
return l.hash;
|
|
578
|
+
}
|
|
579
|
+
toNumberSync(e, t = {}) {
|
|
580
|
+
const {min: r = 0, max: s = 100, algorithm: i = this._defaultAlgorithmSync, hashLength: n = 16} = t;
|
|
581
|
+
if (r > s) {
|
|
582
|
+
throw new Error("min cannot be greater than max");
|
|
583
|
+
}
|
|
584
|
+
const a = this.toHashSync(e, {
|
|
585
|
+
algorithm: i,
|
|
586
|
+
maxLength: n
|
|
587
|
+
});
|
|
588
|
+
const o = Number.parseInt(a, 16);
|
|
589
|
+
const c = s - r + 1;
|
|
590
|
+
const l = r + o % c;
|
|
591
|
+
return l;
|
|
592
|
+
}
|
|
593
|
+
loadProviders(e, t = {
|
|
594
|
+
includeBase: true
|
|
595
|
+
}) {
|
|
596
|
+
if (e) {
|
|
597
|
+
for (const t of e) {
|
|
598
|
+
this._providers.add(t);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
if (t.includeBase) {
|
|
602
|
+
this.providers.add(new A({
|
|
603
|
+
algorithm: "SHA-256"
|
|
604
|
+
}));
|
|
605
|
+
this.providers.add(new A({
|
|
606
|
+
algorithm: "SHA-384"
|
|
607
|
+
}));
|
|
608
|
+
this.providers.add(new A({
|
|
609
|
+
algorithm: "SHA-512"
|
|
610
|
+
}));
|
|
611
|
+
this.providers.add(new S);
|
|
612
|
+
this.providers.add(new C);
|
|
613
|
+
this.providers.add(new k);
|
|
614
|
+
this.providers.add(new O);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
var z = e => {
|
|
620
|
+
let t;
|
|
621
|
+
if (e === void 0) {
|
|
622
|
+
return void 0;
|
|
623
|
+
}
|
|
624
|
+
if (typeof e === "number") {
|
|
625
|
+
t = e;
|
|
626
|
+
} else {
|
|
627
|
+
if (typeof e !== "string") {
|
|
628
|
+
return void 0;
|
|
629
|
+
}
|
|
630
|
+
e = e.trim();
|
|
631
|
+
if (Number.isNaN(Number(e))) {
|
|
632
|
+
const r = /^([\d.]+)\s*(ms|s|m|h|hr|d)$/i.exec(e);
|
|
633
|
+
if (!r) {
|
|
634
|
+
throw new Error(`Unsupported time format: "${e}". Use 'ms', 's', 'm', 'h', 'hr', or 'd'.`);
|
|
635
|
+
}
|
|
636
|
+
const [, s, i] = r;
|
|
637
|
+
const n = Number.parseFloat(s);
|
|
638
|
+
const a = i.toLowerCase();
|
|
639
|
+
switch (a) {
|
|
640
|
+
case "ms":
|
|
641
|
+
{
|
|
642
|
+
t = n;
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
case "s":
|
|
647
|
+
{
|
|
648
|
+
t = n * 1e3;
|
|
649
|
+
break;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
case "m":
|
|
653
|
+
{
|
|
654
|
+
t = n * 1e3 * 60;
|
|
655
|
+
break;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
case "h":
|
|
659
|
+
{
|
|
660
|
+
t = n * 1e3 * 60 * 60;
|
|
661
|
+
break;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
case "hr":
|
|
665
|
+
{
|
|
666
|
+
t = n * 1e3 * 60 * 60;
|
|
667
|
+
break;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
case "d":
|
|
671
|
+
{
|
|
672
|
+
t = n * 1e3 * 60 * 60 * 24;
|
|
673
|
+
break;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
default:
|
|
677
|
+
{
|
|
678
|
+
t = Number(e);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
} else {
|
|
682
|
+
t = Number(e);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
return t;
|
|
686
|
+
};
|
|
687
|
+
|
|
688
|
+
var H = (e, t) => {
|
|
689
|
+
t ??= new Date;
|
|
690
|
+
const r = z(e);
|
|
691
|
+
if (r === void 0) {
|
|
692
|
+
return t.getTime();
|
|
693
|
+
}
|
|
694
|
+
return t.getTime() + r;
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
var M = new Map;
|
|
698
|
+
|
|
699
|
+
function L(e) {
|
|
700
|
+
return M.has(e);
|
|
215
701
|
}
|
|
216
702
|
|
|
217
|
-
function
|
|
218
|
-
|
|
703
|
+
function I(e) {
|
|
704
|
+
M.set(e, []);
|
|
219
705
|
}
|
|
220
706
|
|
|
221
|
-
function
|
|
222
|
-
|
|
707
|
+
function N(e) {
|
|
708
|
+
M.delete(e);
|
|
223
709
|
}
|
|
224
710
|
|
|
225
|
-
function
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
|
|
711
|
+
function D(e, t) {
|
|
712
|
+
const r = T(e);
|
|
713
|
+
r.push(t);
|
|
714
|
+
M.set(e, r);
|
|
229
715
|
}
|
|
230
716
|
|
|
231
|
-
function
|
|
232
|
-
return
|
|
717
|
+
function T(e) {
|
|
718
|
+
return M.get(e) ?? [];
|
|
233
719
|
}
|
|
234
720
|
|
|
235
|
-
async function
|
|
236
|
-
return new Promise(((
|
|
721
|
+
async function E(e) {
|
|
722
|
+
return new Promise(((t, r) => {
|
|
237
723
|
const s = {
|
|
238
|
-
resolve:
|
|
239
|
-
reject:
|
|
724
|
+
resolve: t,
|
|
725
|
+
reject: r
|
|
240
726
|
};
|
|
241
|
-
|
|
727
|
+
D(e, s);
|
|
242
728
|
}));
|
|
243
729
|
}
|
|
244
730
|
|
|
245
|
-
function
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
return
|
|
731
|
+
function B(e) {
|
|
732
|
+
const t = T(e);
|
|
733
|
+
N(e);
|
|
734
|
+
return t;
|
|
249
735
|
}
|
|
250
736
|
|
|
251
|
-
function
|
|
252
|
-
const {key:
|
|
253
|
-
for (const e of
|
|
254
|
-
if (
|
|
255
|
-
e.reject(
|
|
737
|
+
function U(e) {
|
|
738
|
+
const {key: t, error: r, result: s} = e;
|
|
739
|
+
for (const e of B(t)) {
|
|
740
|
+
if (r) {
|
|
741
|
+
e.reject(r);
|
|
256
742
|
} else {
|
|
257
743
|
e.resolve(s);
|
|
258
744
|
}
|
|
259
745
|
}
|
|
260
746
|
}
|
|
261
747
|
|
|
262
|
-
async function
|
|
263
|
-
if (!
|
|
264
|
-
|
|
748
|
+
async function $(e, t) {
|
|
749
|
+
if (!L(e)) {
|
|
750
|
+
I(e);
|
|
265
751
|
try {
|
|
266
|
-
const
|
|
267
|
-
|
|
752
|
+
const r = await Promise.resolve(t());
|
|
753
|
+
U({
|
|
268
754
|
key: e,
|
|
269
|
-
result:
|
|
755
|
+
result: r
|
|
270
756
|
});
|
|
271
|
-
return
|
|
272
|
-
} catch (
|
|
273
|
-
|
|
757
|
+
return r;
|
|
758
|
+
} catch (t) {
|
|
759
|
+
U({
|
|
274
760
|
key: e,
|
|
275
|
-
error:
|
|
761
|
+
error: t
|
|
276
762
|
});
|
|
277
|
-
throw
|
|
763
|
+
throw t;
|
|
278
764
|
}
|
|
279
765
|
}
|
|
280
|
-
return
|
|
766
|
+
return E(e);
|
|
281
767
|
}
|
|
282
768
|
|
|
283
|
-
|
|
769
|
+
var F = (e => {
|
|
770
|
+
e["SHA256"] = "SHA-256";
|
|
771
|
+
e["SHA384"] = "SHA-384";
|
|
772
|
+
e["SHA512"] = "SHA-512";
|
|
773
|
+
e["DJB2"] = "djb2";
|
|
774
|
+
e["FNV1"] = "fnv1";
|
|
775
|
+
e["MURMER"] = "murmer";
|
|
776
|
+
e["CRC32"] = "crc32";
|
|
777
|
+
return e;
|
|
778
|
+
})(F || {});
|
|
779
|
+
|
|
780
|
+
async function R(e, t = {
|
|
781
|
+
algorithm: "SHA-256",
|
|
782
|
+
serialize: JSON.stringify
|
|
783
|
+
}) {
|
|
784
|
+
const r = t?.algorithm ?? "SHA-256";
|
|
785
|
+
const s = t?.serialize ?? JSON.stringify;
|
|
786
|
+
const i = s(e);
|
|
787
|
+
const n = new P;
|
|
788
|
+
return n.toHash(i, {
|
|
789
|
+
algorithm: r
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
function V(e, t = {
|
|
794
|
+
algorithm: "djb2",
|
|
795
|
+
serialize: JSON.stringify
|
|
796
|
+
}) {
|
|
797
|
+
const r = t?.algorithm ?? "djb2";
|
|
798
|
+
const s = t?.serialize ?? JSON.stringify;
|
|
799
|
+
const i = s(e);
|
|
800
|
+
const n = new P;
|
|
801
|
+
return n.toHashSync(i, {
|
|
802
|
+
algorithm: r
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
async function J(e, t = {
|
|
807
|
+
min: 0,
|
|
808
|
+
max: 10,
|
|
809
|
+
algorithm: "SHA-256",
|
|
810
|
+
serialize: JSON.stringify
|
|
811
|
+
}) {
|
|
812
|
+
const r = t?.min ?? 0;
|
|
813
|
+
const s = t?.max ?? 10;
|
|
814
|
+
const i = t?.algorithm ?? "SHA-256";
|
|
815
|
+
const n = t?.serialize ?? JSON.stringify;
|
|
816
|
+
const a = t?.hashLength ?? 16;
|
|
817
|
+
if (r >= s) {
|
|
818
|
+
throw new Error(`Invalid range: min (${r}) must be less than max (${s})`);
|
|
819
|
+
}
|
|
820
|
+
const o = n(e);
|
|
821
|
+
const c = new P;
|
|
822
|
+
return c.toNumber(o, {
|
|
823
|
+
algorithm: i,
|
|
824
|
+
min: r,
|
|
825
|
+
max: s,
|
|
826
|
+
hashLength: a
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
function K(e, t = {
|
|
831
|
+
min: 0,
|
|
832
|
+
max: 10,
|
|
833
|
+
algorithm: "djb2",
|
|
834
|
+
serialize: JSON.stringify
|
|
835
|
+
}) {
|
|
836
|
+
const r = t?.min ?? 0;
|
|
837
|
+
const s = t?.max ?? 10;
|
|
838
|
+
const i = t?.algorithm ?? "djb2";
|
|
839
|
+
const n = t?.serialize ?? JSON.stringify;
|
|
840
|
+
const a = t?.hashLength ?? 16;
|
|
841
|
+
if (r >= s) {
|
|
842
|
+
throw new Error(`Invalid range: min (${r}) must be less than max (${s})`);
|
|
843
|
+
}
|
|
844
|
+
const o = n(e);
|
|
845
|
+
const c = new P;
|
|
846
|
+
return c.toNumberSync(o, {
|
|
847
|
+
algorithm: i,
|
|
848
|
+
min: r,
|
|
849
|
+
max: s,
|
|
850
|
+
hashLength: a
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
function G(e) {
|
|
855
|
+
if (e === null || e === void 0) {
|
|
856
|
+
return false;
|
|
857
|
+
}
|
|
858
|
+
if (e instanceof s.Keyv) {
|
|
859
|
+
return true;
|
|
860
|
+
}
|
|
861
|
+
const t = [ "generateIterator", "get", "getMany", "set", "setMany", "delete", "deleteMany", "has", "hasMany", "clear", "disconnect", "serialize", "deserialize" ];
|
|
862
|
+
return t.every((t => typeof e[t] === "function"));
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
function W(e) {
|
|
284
866
|
return e !== null && typeof e === "object" && !Array.isArray(e);
|
|
285
867
|
}
|
|
286
868
|
|
|
287
|
-
function
|
|
288
|
-
return typeof e === "
|
|
869
|
+
function X(e, t) {
|
|
870
|
+
return typeof e === "number" && typeof t === "number" ? e < t : false;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
function Q(e, t) {
|
|
874
|
+
const {ttl: r, keyPrefix: s, cache: i, serialize: n} = t;
|
|
875
|
+
return (...a) => {
|
|
876
|
+
let o = ee(e, a, {
|
|
877
|
+
keyPrefix: s,
|
|
878
|
+
serialize: n
|
|
879
|
+
});
|
|
880
|
+
if (t.createKey) {
|
|
881
|
+
o = t.createKey(e, a, t);
|
|
882
|
+
}
|
|
883
|
+
let c = i.get(o);
|
|
884
|
+
if (c === void 0) {
|
|
885
|
+
try {
|
|
886
|
+
c = e(...a);
|
|
887
|
+
i.set(o, c, r);
|
|
888
|
+
} catch (e) {
|
|
889
|
+
i.emit("error", e);
|
|
890
|
+
if (t.cacheErrors) {
|
|
891
|
+
i.set(o, e, r);
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
return c;
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
async function Y(e, t, r) {
|
|
900
|
+
const s = typeof e === "function" ? e(r) : e;
|
|
901
|
+
let i = await r.cache.get(s);
|
|
902
|
+
if (i === void 0) {
|
|
903
|
+
const e = r.cacheId ?? "default";
|
|
904
|
+
const n = `${e}::${s}`;
|
|
905
|
+
i = await $(n, (async () => {
|
|
906
|
+
try {
|
|
907
|
+
const e = await t();
|
|
908
|
+
await r.cache.set(s, e, r.ttl);
|
|
909
|
+
return e;
|
|
910
|
+
} catch (e) {
|
|
911
|
+
r.cache.emit("error", e);
|
|
912
|
+
if (r.cacheErrors) {
|
|
913
|
+
await r.cache.set(s, e, r.ttl);
|
|
914
|
+
}
|
|
915
|
+
if (r.throwErrors) {
|
|
916
|
+
throw e;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}));
|
|
920
|
+
}
|
|
921
|
+
return i;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
function Z(e, t) {
|
|
925
|
+
const {keyPrefix: r, serialize: s} = t;
|
|
926
|
+
return async (...i) => {
|
|
927
|
+
let n = ee(e, i, {
|
|
928
|
+
keyPrefix: r,
|
|
929
|
+
serialize: s
|
|
930
|
+
});
|
|
931
|
+
if (t.createKey) {
|
|
932
|
+
n = t.createKey(e, i, t);
|
|
933
|
+
}
|
|
934
|
+
return Y(n, (async () => e(...i)), t);
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
function ee(e, t, r) {
|
|
939
|
+
const {keyPrefix: s, serialize: i} = r || {};
|
|
940
|
+
if (!s) {
|
|
941
|
+
return `${e.name}::${V(t, {
|
|
942
|
+
serialize: i
|
|
943
|
+
})}`;
|
|
944
|
+
}
|
|
945
|
+
return `${s}::${e.name}::${V(t, {
|
|
946
|
+
serialize: i
|
|
947
|
+
})}`;
|
|
289
948
|
}
|
|
290
949
|
|
|
291
|
-
function
|
|
292
|
-
return typeof e === "
|
|
950
|
+
function te(e, ...t) {
|
|
951
|
+
return typeof e === "function" ? e(...t) : e;
|
|
293
952
|
}
|
|
294
953
|
|
|
295
|
-
var
|
|
954
|
+
var re = async e => new Promise((t => setTimeout(t, e)));
|
|
955
|
+
|
|
956
|
+
var se = class {
|
|
957
|
+
_hits=0;
|
|
958
|
+
_misses=0;
|
|
959
|
+
_gets=0;
|
|
960
|
+
_sets=0;
|
|
961
|
+
_deletes=0;
|
|
962
|
+
_clears=0;
|
|
963
|
+
_vsize=0;
|
|
964
|
+
_ksize=0;
|
|
965
|
+
_count=0;
|
|
966
|
+
_enabled=false;
|
|
967
|
+
constructor(e) {
|
|
968
|
+
if (e?.enabled) {
|
|
969
|
+
this._enabled = e.enabled;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
get enabled() {
|
|
973
|
+
return this._enabled;
|
|
974
|
+
}
|
|
975
|
+
set enabled(e) {
|
|
976
|
+
this._enabled = e;
|
|
977
|
+
}
|
|
978
|
+
get hits() {
|
|
979
|
+
return this._hits;
|
|
980
|
+
}
|
|
981
|
+
get misses() {
|
|
982
|
+
return this._misses;
|
|
983
|
+
}
|
|
984
|
+
get gets() {
|
|
985
|
+
return this._gets;
|
|
986
|
+
}
|
|
987
|
+
get sets() {
|
|
988
|
+
return this._sets;
|
|
989
|
+
}
|
|
990
|
+
get deletes() {
|
|
991
|
+
return this._deletes;
|
|
992
|
+
}
|
|
993
|
+
get clears() {
|
|
994
|
+
return this._clears;
|
|
995
|
+
}
|
|
996
|
+
get vsize() {
|
|
997
|
+
return this._vsize;
|
|
998
|
+
}
|
|
999
|
+
get ksize() {
|
|
1000
|
+
return this._ksize;
|
|
1001
|
+
}
|
|
1002
|
+
get count() {
|
|
1003
|
+
return this._count;
|
|
1004
|
+
}
|
|
1005
|
+
incrementHits() {
|
|
1006
|
+
if (!this._enabled) {
|
|
1007
|
+
return;
|
|
1008
|
+
}
|
|
1009
|
+
this._hits++;
|
|
1010
|
+
}
|
|
1011
|
+
incrementMisses() {
|
|
1012
|
+
if (!this._enabled) {
|
|
1013
|
+
return;
|
|
1014
|
+
}
|
|
1015
|
+
this._misses++;
|
|
1016
|
+
}
|
|
1017
|
+
incrementGets() {
|
|
1018
|
+
if (!this._enabled) {
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
this._gets++;
|
|
1022
|
+
}
|
|
1023
|
+
incrementSets() {
|
|
1024
|
+
if (!this._enabled) {
|
|
1025
|
+
return;
|
|
1026
|
+
}
|
|
1027
|
+
this._sets++;
|
|
1028
|
+
}
|
|
1029
|
+
incrementDeletes() {
|
|
1030
|
+
if (!this._enabled) {
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
this._deletes++;
|
|
1034
|
+
}
|
|
1035
|
+
incrementClears() {
|
|
1036
|
+
if (!this._enabled) {
|
|
1037
|
+
return;
|
|
1038
|
+
}
|
|
1039
|
+
this._clears++;
|
|
1040
|
+
}
|
|
1041
|
+
incrementVSize(e) {
|
|
1042
|
+
if (!this._enabled) {
|
|
1043
|
+
return;
|
|
1044
|
+
}
|
|
1045
|
+
this._vsize += this.roughSizeOfObject(e);
|
|
1046
|
+
}
|
|
1047
|
+
decreaseVSize(e) {
|
|
1048
|
+
if (!this._enabled) {
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
this._vsize -= this.roughSizeOfObject(e);
|
|
1052
|
+
}
|
|
1053
|
+
incrementKSize(e) {
|
|
1054
|
+
if (!this._enabled) {
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1057
|
+
this._ksize += this.roughSizeOfString(e);
|
|
1058
|
+
}
|
|
1059
|
+
decreaseKSize(e) {
|
|
1060
|
+
if (!this._enabled) {
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1063
|
+
this._ksize -= this.roughSizeOfString(e);
|
|
1064
|
+
}
|
|
1065
|
+
incrementCount() {
|
|
1066
|
+
if (!this._enabled) {
|
|
1067
|
+
return;
|
|
1068
|
+
}
|
|
1069
|
+
this._count++;
|
|
1070
|
+
}
|
|
1071
|
+
decreaseCount() {
|
|
1072
|
+
if (!this._enabled) {
|
|
1073
|
+
return;
|
|
1074
|
+
}
|
|
1075
|
+
this._count--;
|
|
1076
|
+
}
|
|
1077
|
+
setCount(e) {
|
|
1078
|
+
if (!this._enabled) {
|
|
1079
|
+
return;
|
|
1080
|
+
}
|
|
1081
|
+
this._count = e;
|
|
1082
|
+
}
|
|
1083
|
+
roughSizeOfString(e) {
|
|
1084
|
+
return e.length * 2;
|
|
1085
|
+
}
|
|
1086
|
+
roughSizeOfObject(e) {
|
|
1087
|
+
const t = [];
|
|
1088
|
+
const r = [ e ];
|
|
1089
|
+
let s = 0;
|
|
1090
|
+
while (r.length > 0) {
|
|
1091
|
+
const e = r.pop();
|
|
1092
|
+
if (typeof e === "boolean") {
|
|
1093
|
+
s += 4;
|
|
1094
|
+
} else if (typeof e === "string") {
|
|
1095
|
+
s += e.length * 2;
|
|
1096
|
+
} else if (typeof e === "number") {
|
|
1097
|
+
s += 8;
|
|
1098
|
+
} else {
|
|
1099
|
+
if (e === null || e === void 0) {
|
|
1100
|
+
s += 4;
|
|
1101
|
+
continue;
|
|
1102
|
+
}
|
|
1103
|
+
if (t.includes(e)) {
|
|
1104
|
+
continue;
|
|
1105
|
+
}
|
|
1106
|
+
t.push(e);
|
|
1107
|
+
for (const t in e) {
|
|
1108
|
+
s += t.length * 2;
|
|
1109
|
+
r.push(e[t]);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
return s;
|
|
1114
|
+
}
|
|
1115
|
+
reset() {
|
|
1116
|
+
this._hits = 0;
|
|
1117
|
+
this._misses = 0;
|
|
1118
|
+
this._gets = 0;
|
|
1119
|
+
this._sets = 0;
|
|
1120
|
+
this._deletes = 0;
|
|
1121
|
+
this._clears = 0;
|
|
1122
|
+
this._vsize = 0;
|
|
1123
|
+
this._ksize = 0;
|
|
1124
|
+
this._count = 0;
|
|
1125
|
+
}
|
|
1126
|
+
resetStoreValues() {
|
|
1127
|
+
this._vsize = 0;
|
|
1128
|
+
this._ksize = 0;
|
|
1129
|
+
this._count = 0;
|
|
1130
|
+
}
|
|
1131
|
+
};
|
|
1132
|
+
|
|
1133
|
+
function ie(e) {
|
|
1134
|
+
if (e === void 0 || e === null) {
|
|
1135
|
+
return void 0;
|
|
1136
|
+
}
|
|
1137
|
+
const t = Date.now();
|
|
1138
|
+
if (e < t) {
|
|
1139
|
+
return void 0;
|
|
1140
|
+
}
|
|
1141
|
+
return e - t;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
function ne(e, t, r) {
|
|
1145
|
+
return r ?? t ?? z(e);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
function ae(e, t) {
|
|
1149
|
+
const r = ie(t);
|
|
1150
|
+
const s = e ? Date.now() + e : void 0;
|
|
1151
|
+
if (r === void 0) {
|
|
1152
|
+
return e;
|
|
1153
|
+
}
|
|
1154
|
+
if (s === void 0) {
|
|
1155
|
+
return r;
|
|
1156
|
+
}
|
|
1157
|
+
if (t && t > s) {
|
|
1158
|
+
return e;
|
|
1159
|
+
}
|
|
1160
|
+
return r;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
var oe = class {
|
|
296
1164
|
opts;
|
|
297
1165
|
namespace;
|
|
298
1166
|
_cache;
|
|
@@ -300,14 +1168,14 @@ var B = class {
|
|
|
300
1168
|
this._cache = e;
|
|
301
1169
|
}
|
|
302
1170
|
async get(e) {
|
|
303
|
-
const
|
|
304
|
-
if (
|
|
305
|
-
return
|
|
1171
|
+
const t = await this._cache.get(e);
|
|
1172
|
+
if (t !== void 0 && t !== null) {
|
|
1173
|
+
return t;
|
|
306
1174
|
}
|
|
307
1175
|
return void 0;
|
|
308
1176
|
}
|
|
309
|
-
async set(e,
|
|
310
|
-
await this._cache.set(e,
|
|
1177
|
+
async set(e, t, r) {
|
|
1178
|
+
await this._cache.set(e, t, r);
|
|
311
1179
|
return true;
|
|
312
1180
|
}
|
|
313
1181
|
async delete(e) {
|
|
@@ -318,8 +1186,8 @@ var B = class {
|
|
|
318
1186
|
return this._cache.reset?.();
|
|
319
1187
|
}
|
|
320
1188
|
async has(e) {
|
|
321
|
-
const
|
|
322
|
-
if (
|
|
1189
|
+
const t = await this._cache.get(e);
|
|
1190
|
+
if (t) {
|
|
323
1191
|
return true;
|
|
324
1192
|
}
|
|
325
1193
|
return false;
|
|
@@ -331,8 +1199,8 @@ var B = class {
|
|
|
331
1199
|
await this._cache.mdel(...e);
|
|
332
1200
|
return true;
|
|
333
1201
|
}
|
|
334
|
-
on(e,
|
|
335
|
-
this._cache.on?.(e,
|
|
1202
|
+
on(e, t) {
|
|
1203
|
+
this._cache.on?.(e, t);
|
|
336
1204
|
return this;
|
|
337
1205
|
}
|
|
338
1206
|
async disconnect() {
|
|
@@ -340,152 +1208,198 @@ var B = class {
|
|
|
340
1208
|
}
|
|
341
1209
|
};
|
|
342
1210
|
|
|
343
|
-
var
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
1211
|
+
var ce = e => e === 0 ? "primary" : `secondary:${e - 1}`;
|
|
1212
|
+
|
|
1213
|
+
var le = e => {
|
|
1214
|
+
const t = new q.default;
|
|
1215
|
+
const r = new s.Keyv;
|
|
1216
|
+
r.serialize = void 0;
|
|
1217
|
+
r.deserialize = void 0;
|
|
1218
|
+
const i = e?.stores?.length ? e.stores : [ r ];
|
|
1219
|
+
const n = e?.nonBlocking ?? false;
|
|
350
1220
|
const a = e?.cacheId ?? Math.random().toString(36).slice(2);
|
|
351
|
-
const
|
|
352
|
-
let
|
|
353
|
-
if (
|
|
1221
|
+
const o = async e => {
|
|
1222
|
+
let r;
|
|
1223
|
+
if (n) {
|
|
354
1224
|
try {
|
|
355
|
-
|
|
356
|
-
if (
|
|
1225
|
+
r = await Promise.race(i.map((async t => t.get(e))));
|
|
1226
|
+
if (r === void 0) {
|
|
357
1227
|
return void 0;
|
|
358
1228
|
}
|
|
359
|
-
} catch (
|
|
360
|
-
|
|
1229
|
+
} catch (r) {
|
|
1230
|
+
t.emit("get", {
|
|
361
1231
|
key: e,
|
|
362
|
-
error:
|
|
1232
|
+
error: r
|
|
363
1233
|
});
|
|
364
1234
|
}
|
|
365
1235
|
} else {
|
|
366
|
-
for (
|
|
1236
|
+
for (let s = 0; s < i.length; s++) {
|
|
1237
|
+
const n = i[s];
|
|
367
1238
|
try {
|
|
368
|
-
const
|
|
369
|
-
if (
|
|
370
|
-
|
|
371
|
-
|
|
1239
|
+
const i = await n.get(e);
|
|
1240
|
+
if (i !== void 0) {
|
|
1241
|
+
r = i;
|
|
1242
|
+
t.emit("get", {
|
|
372
1243
|
key: e,
|
|
373
|
-
value:
|
|
1244
|
+
value: r,
|
|
1245
|
+
store: ce(s)
|
|
374
1246
|
});
|
|
375
1247
|
break;
|
|
376
1248
|
}
|
|
377
|
-
} catch (
|
|
378
|
-
|
|
1249
|
+
} catch (r) {
|
|
1250
|
+
t.emit("get", {
|
|
379
1251
|
key: e,
|
|
380
|
-
error:
|
|
1252
|
+
error: r,
|
|
1253
|
+
store: ce(s)
|
|
381
1254
|
});
|
|
382
1255
|
}
|
|
383
1256
|
}
|
|
384
1257
|
}
|
|
385
|
-
return
|
|
1258
|
+
return r;
|
|
386
1259
|
};
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
1260
|
+
const c = async e => {
|
|
1261
|
+
let r = e.map((() => void 0));
|
|
1262
|
+
if (n) {
|
|
1263
|
+
try {
|
|
1264
|
+
r = await Promise.race(i.map((async t => t.getMany(e))));
|
|
1265
|
+
} catch (r) {
|
|
1266
|
+
t.emit("mget", {
|
|
1267
|
+
keys: e,
|
|
1268
|
+
error: r
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1271
|
+
} else {
|
|
1272
|
+
for (const s of i) {
|
|
1273
|
+
try {
|
|
1274
|
+
const t = r.map(((t, r) => t === void 0 ? {
|
|
1275
|
+
originalIndex: r,
|
|
1276
|
+
key: e[r]
|
|
1277
|
+
} : void 0)).filter((e => e !== void 0));
|
|
1278
|
+
if (t.length === 0) {
|
|
1279
|
+
break;
|
|
1280
|
+
}
|
|
1281
|
+
const i = t.map((e => e.key));
|
|
1282
|
+
const n = await s.getMany(i);
|
|
1283
|
+
for (const [e, s] of n.entries()) {
|
|
1284
|
+
if (s === void 0) {
|
|
1285
|
+
continue;
|
|
1286
|
+
}
|
|
1287
|
+
const {originalIndex: i} = t[e];
|
|
1288
|
+
r[i] = s;
|
|
1289
|
+
}
|
|
1290
|
+
} catch (r) {
|
|
1291
|
+
t.emit("mget", {
|
|
1292
|
+
keys: e,
|
|
1293
|
+
error: r
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
392
1297
|
}
|
|
1298
|
+
t.emit("mget", {
|
|
1299
|
+
keys: e,
|
|
1300
|
+
values: r
|
|
1301
|
+
});
|
|
393
1302
|
return r;
|
|
394
1303
|
};
|
|
395
1304
|
const l = async e => {
|
|
396
|
-
let
|
|
397
|
-
if (
|
|
1305
|
+
let r;
|
|
1306
|
+
if (n) {
|
|
398
1307
|
try {
|
|
399
|
-
|
|
1308
|
+
r = await Promise.race(i.map((async t => t.get(e, {
|
|
400
1309
|
raw: true
|
|
401
1310
|
}))));
|
|
402
|
-
if (
|
|
1311
|
+
if (r === void 0) {
|
|
403
1312
|
return void 0;
|
|
404
1313
|
}
|
|
405
|
-
} catch (
|
|
406
|
-
|
|
1314
|
+
} catch (r) {
|
|
1315
|
+
t.emit("ttl", {
|
|
407
1316
|
key: e,
|
|
408
|
-
error:
|
|
1317
|
+
error: r
|
|
409
1318
|
});
|
|
410
1319
|
}
|
|
411
1320
|
} else {
|
|
412
|
-
for (const s of
|
|
1321
|
+
for (const s of i) {
|
|
413
1322
|
try {
|
|
414
|
-
const
|
|
1323
|
+
const i = await s.get(e, {
|
|
415
1324
|
raw: true
|
|
416
1325
|
});
|
|
417
|
-
if (
|
|
418
|
-
|
|
419
|
-
|
|
1326
|
+
if (i !== void 0) {
|
|
1327
|
+
r = i;
|
|
1328
|
+
t.emit("ttl", {
|
|
420
1329
|
key: e,
|
|
421
|
-
value:
|
|
1330
|
+
value: r
|
|
422
1331
|
});
|
|
423
1332
|
break;
|
|
424
1333
|
}
|
|
425
|
-
} catch (
|
|
426
|
-
|
|
1334
|
+
} catch (r) {
|
|
1335
|
+
t.emit("ttl", {
|
|
427
1336
|
key: e,
|
|
428
|
-
error:
|
|
1337
|
+
error: r
|
|
429
1338
|
});
|
|
430
1339
|
}
|
|
431
1340
|
}
|
|
432
1341
|
}
|
|
433
|
-
if (
|
|
434
|
-
return
|
|
1342
|
+
if (r?.expires) {
|
|
1343
|
+
return r.expires;
|
|
435
1344
|
}
|
|
436
1345
|
return void 0;
|
|
437
1346
|
};
|
|
438
|
-
const
|
|
1347
|
+
const h = async (r, s, i, a) => {
|
|
439
1348
|
try {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
1349
|
+
const o = r.map((async (r, n) => {
|
|
1350
|
+
await r.set(s, i, a ?? e?.ttl);
|
|
1351
|
+
t.emit("set", {
|
|
1352
|
+
key: s,
|
|
1353
|
+
value: i,
|
|
1354
|
+
store: ce(n)
|
|
1355
|
+
});
|
|
1356
|
+
}));
|
|
1357
|
+
if (n) {
|
|
1358
|
+
Promise.all(o);
|
|
1359
|
+
t.emit("set", {
|
|
443
1360
|
key: s,
|
|
444
|
-
value:
|
|
1361
|
+
value: i
|
|
445
1362
|
});
|
|
446
|
-
return
|
|
1363
|
+
return i;
|
|
447
1364
|
}
|
|
448
|
-
await Promise.all(
|
|
449
|
-
|
|
1365
|
+
await Promise.all(o);
|
|
1366
|
+
t.emit("set", {
|
|
450
1367
|
key: s,
|
|
451
|
-
value:
|
|
1368
|
+
value: i
|
|
452
1369
|
});
|
|
453
|
-
return
|
|
1370
|
+
return i;
|
|
454
1371
|
} catch (e) {
|
|
455
|
-
|
|
1372
|
+
t.emit("set", {
|
|
456
1373
|
key: s,
|
|
457
|
-
value:
|
|
1374
|
+
value: i,
|
|
458
1375
|
error: e
|
|
459
1376
|
});
|
|
460
1377
|
return Promise.reject(e);
|
|
461
1378
|
}
|
|
462
1379
|
};
|
|
463
|
-
const
|
|
464
|
-
const
|
|
465
|
-
key:
|
|
1380
|
+
const u = async (r, s) => {
|
|
1381
|
+
const i = s.map((({key: t, value: r, ttl: s}) => ({
|
|
1382
|
+
key: t,
|
|
466
1383
|
value: r,
|
|
467
|
-
ttl:
|
|
1384
|
+
ttl: s ?? e?.ttl
|
|
468
1385
|
})));
|
|
469
1386
|
try {
|
|
470
|
-
const
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
Promise.all(s);
|
|
476
|
-
r.emit("mset", {
|
|
477
|
-
list: t
|
|
1387
|
+
const e = r.map((async e => e.setMany(i)));
|
|
1388
|
+
if (n) {
|
|
1389
|
+
Promise.all(e);
|
|
1390
|
+
t.emit("mset", {
|
|
1391
|
+
list: i
|
|
478
1392
|
});
|
|
479
|
-
return
|
|
1393
|
+
return i;
|
|
480
1394
|
}
|
|
481
|
-
await Promise.all(
|
|
482
|
-
|
|
483
|
-
list:
|
|
1395
|
+
await Promise.all(e);
|
|
1396
|
+
t.emit("mset", {
|
|
1397
|
+
list: i
|
|
484
1398
|
});
|
|
485
|
-
return
|
|
1399
|
+
return i;
|
|
486
1400
|
} catch (e) {
|
|
487
|
-
|
|
488
|
-
list:
|
|
1401
|
+
t.emit("mset", {
|
|
1402
|
+
list: i,
|
|
489
1403
|
error: e
|
|
490
1404
|
});
|
|
491
1405
|
return Promise.reject(e);
|
|
@@ -493,84 +1407,84 @@ var E = e => {
|
|
|
493
1407
|
};
|
|
494
1408
|
const d = async e => {
|
|
495
1409
|
try {
|
|
496
|
-
if (
|
|
497
|
-
Promise.all(
|
|
498
|
-
|
|
1410
|
+
if (n) {
|
|
1411
|
+
Promise.all(i.map((async t => t.delete(e))));
|
|
1412
|
+
t.emit("del", {
|
|
499
1413
|
key: e
|
|
500
1414
|
});
|
|
501
1415
|
return true;
|
|
502
1416
|
}
|
|
503
|
-
await Promise.all(
|
|
504
|
-
|
|
1417
|
+
await Promise.all(i.map((async t => t.delete(e))));
|
|
1418
|
+
t.emit("del", {
|
|
505
1419
|
key: e
|
|
506
1420
|
});
|
|
507
1421
|
return true;
|
|
508
|
-
} catch (
|
|
509
|
-
|
|
1422
|
+
} catch (r) {
|
|
1423
|
+
t.emit("del", {
|
|
510
1424
|
key: e,
|
|
511
|
-
error:
|
|
1425
|
+
error: r
|
|
512
1426
|
});
|
|
513
|
-
return Promise.reject(
|
|
1427
|
+
return Promise.reject(r);
|
|
514
1428
|
}
|
|
515
1429
|
};
|
|
516
|
-
const
|
|
1430
|
+
const f = async e => {
|
|
517
1431
|
try {
|
|
518
|
-
const
|
|
519
|
-
for (const
|
|
520
|
-
|
|
1432
|
+
const r = [];
|
|
1433
|
+
for (const t of e) {
|
|
1434
|
+
r.push(...i.map((async e => e.delete(t))));
|
|
521
1435
|
}
|
|
522
|
-
if (
|
|
523
|
-
Promise.all(
|
|
524
|
-
|
|
1436
|
+
if (n) {
|
|
1437
|
+
Promise.all(r);
|
|
1438
|
+
t.emit("mdel", {
|
|
525
1439
|
keys: e
|
|
526
1440
|
});
|
|
527
1441
|
return true;
|
|
528
1442
|
}
|
|
529
|
-
await Promise.all(
|
|
530
|
-
|
|
1443
|
+
await Promise.all(r);
|
|
1444
|
+
t.emit("mdel", {
|
|
531
1445
|
keys: e
|
|
532
1446
|
});
|
|
533
1447
|
return true;
|
|
534
|
-
} catch (
|
|
535
|
-
|
|
1448
|
+
} catch (r) {
|
|
1449
|
+
t.emit("mdel", {
|
|
536
1450
|
keys: e,
|
|
537
|
-
error:
|
|
1451
|
+
error: r
|
|
538
1452
|
});
|
|
539
|
-
return Promise.reject(
|
|
1453
|
+
return Promise.reject(r);
|
|
540
1454
|
}
|
|
541
1455
|
};
|
|
542
1456
|
const m = async () => {
|
|
543
1457
|
try {
|
|
544
|
-
if (
|
|
545
|
-
Promise.all(
|
|
546
|
-
|
|
1458
|
+
if (n) {
|
|
1459
|
+
Promise.all(i.map((async e => e.clear())));
|
|
1460
|
+
t.emit("clear");
|
|
547
1461
|
return true;
|
|
548
1462
|
}
|
|
549
|
-
await Promise.all(
|
|
550
|
-
|
|
1463
|
+
await Promise.all(i.map((async e => e.clear())));
|
|
1464
|
+
t.emit("clear");
|
|
551
1465
|
return true;
|
|
552
1466
|
} catch (e) {
|
|
553
|
-
|
|
1467
|
+
t.emit("clear", e);
|
|
554
1468
|
return Promise.reject(e);
|
|
555
1469
|
}
|
|
556
1470
|
};
|
|
557
|
-
const
|
|
558
|
-
let
|
|
1471
|
+
const g = async (r, s, n, o) => $(`${a}::${r}`, (async () => {
|
|
1472
|
+
let c;
|
|
559
1473
|
let l;
|
|
560
|
-
let
|
|
1474
|
+
let u = 0;
|
|
561
1475
|
let d;
|
|
562
|
-
const {ttl:
|
|
563
|
-
ttl:
|
|
564
|
-
refreshThreshold:
|
|
1476
|
+
const {ttl: f, refreshThreshold: m, raw: g} = W(n) ? n : {
|
|
1477
|
+
ttl: n,
|
|
1478
|
+
refreshThreshold: o
|
|
565
1479
|
};
|
|
566
|
-
const
|
|
567
|
-
for (;
|
|
1480
|
+
const y = t => te(f, t) ?? e?.ttl;
|
|
1481
|
+
for (;u < i.length; u++) {
|
|
568
1482
|
try {
|
|
569
|
-
const e = await
|
|
1483
|
+
const e = await i[u].get(r, {
|
|
570
1484
|
raw: true
|
|
571
1485
|
});
|
|
572
1486
|
if (e !== void 0) {
|
|
573
|
-
|
|
1487
|
+
c = e.value;
|
|
574
1488
|
l = e;
|
|
575
1489
|
if (typeof e.expires === "number") {
|
|
576
1490
|
d = Math.max(0, e.expires - Date.now());
|
|
@@ -579,73 +1493,73 @@ var E = e => {
|
|
|
579
1493
|
}
|
|
580
1494
|
} catch {}
|
|
581
1495
|
}
|
|
582
|
-
if (
|
|
1496
|
+
if (c === void 0) {
|
|
583
1497
|
const e = await s();
|
|
584
|
-
const
|
|
585
|
-
await
|
|
586
|
-
return
|
|
1498
|
+
const t = y(e);
|
|
1499
|
+
await h(i, r, e, t);
|
|
1500
|
+
return g ? {
|
|
587
1501
|
value: e,
|
|
588
|
-
expires: Date.now() +
|
|
1502
|
+
expires: Date.now() + t
|
|
589
1503
|
} : e;
|
|
590
1504
|
}
|
|
591
|
-
const
|
|
592
|
-
if (
|
|
593
|
-
|
|
1505
|
+
const p = X(d, te(m, c) ?? e?.refreshThreshold);
|
|
1506
|
+
if (p) {
|
|
1507
|
+
$(`+++${a}__${r}`, s).then((async s => {
|
|
594
1508
|
try {
|
|
595
|
-
await
|
|
596
|
-
|
|
597
|
-
key:
|
|
1509
|
+
await h(e?.refreshAllStores ? i : i.slice(0, u + 1), r, s, y(s));
|
|
1510
|
+
t.emit("refresh", {
|
|
1511
|
+
key: r,
|
|
598
1512
|
value: s
|
|
599
1513
|
});
|
|
600
1514
|
} catch (e) {
|
|
601
|
-
|
|
602
|
-
key:
|
|
603
|
-
value:
|
|
1515
|
+
t.emit("refresh", {
|
|
1516
|
+
key: r,
|
|
1517
|
+
value: c,
|
|
604
1518
|
error: e
|
|
605
1519
|
});
|
|
606
1520
|
}
|
|
607
1521
|
})).catch((e => {
|
|
608
|
-
|
|
609
|
-
key:
|
|
610
|
-
value:
|
|
1522
|
+
t.emit("refresh", {
|
|
1523
|
+
key: r,
|
|
1524
|
+
value: c,
|
|
611
1525
|
error: e
|
|
612
1526
|
});
|
|
613
1527
|
}));
|
|
614
1528
|
}
|
|
615
|
-
if (!
|
|
616
|
-
await
|
|
1529
|
+
if (!p && u > 0) {
|
|
1530
|
+
await h(i.slice(0, u), r, c, y(c));
|
|
617
1531
|
}
|
|
618
|
-
return
|
|
1532
|
+
return g ? l : c;
|
|
619
1533
|
}));
|
|
620
|
-
const
|
|
621
|
-
const
|
|
622
|
-
const
|
|
1534
|
+
const y = (e, r) => t.addListener(e, r);
|
|
1535
|
+
const p = (e, r) => t.removeListener(e, r);
|
|
1536
|
+
const b = async () => {
|
|
623
1537
|
try {
|
|
624
|
-
await Promise.all(
|
|
1538
|
+
await Promise.all(i.map((async e => e.disconnect())));
|
|
625
1539
|
} catch (e) {
|
|
626
1540
|
return Promise.reject(e);
|
|
627
1541
|
}
|
|
628
1542
|
};
|
|
629
|
-
const
|
|
1543
|
+
const _ = () => a;
|
|
630
1544
|
return {
|
|
631
|
-
get:
|
|
632
|
-
mget:
|
|
1545
|
+
get: o,
|
|
1546
|
+
mget: c,
|
|
633
1547
|
ttl: l,
|
|
634
|
-
set: async (e,
|
|
635
|
-
mset: async e =>
|
|
1548
|
+
set: async (e, t, r) => h(i, e, t, r),
|
|
1549
|
+
mset: async e => u(i, e),
|
|
636
1550
|
del: d,
|
|
637
|
-
mdel:
|
|
1551
|
+
mdel: f,
|
|
638
1552
|
clear: m,
|
|
639
|
-
wrap:
|
|
640
|
-
on:
|
|
641
|
-
off:
|
|
642
|
-
disconnect:
|
|
643
|
-
cacheId:
|
|
644
|
-
stores:
|
|
1553
|
+
wrap: g,
|
|
1554
|
+
on: y,
|
|
1555
|
+
off: p,
|
|
1556
|
+
disconnect: b,
|
|
1557
|
+
cacheId: _,
|
|
1558
|
+
stores: i
|
|
645
1559
|
};
|
|
646
1560
|
};
|
|
647
1561
|
|
|
648
|
-
const
|
|
1562
|
+
const he = e => ({
|
|
649
1563
|
class: Cacher,
|
|
650
1564
|
stores: e?.stores,
|
|
651
1565
|
ttl: e?.ttl,
|
|
@@ -655,39 +1569,39 @@ const R = e => ({
|
|
|
655
1569
|
cacheId: e?.cacheId
|
|
656
1570
|
});
|
|
657
1571
|
|
|
658
|
-
class Cacher extends
|
|
1572
|
+
class Cacher extends i.Component {
|
|
659
1573
|
async init() {
|
|
660
1574
|
const e = this.stores ? Array.isArray(this.stores) ? this.stores : [ this.stores ] : [];
|
|
661
|
-
const
|
|
1575
|
+
const t = await Promise.all(e.map((e => {
|
|
662
1576
|
switch (e.type) {
|
|
663
1577
|
case "file":
|
|
664
|
-
return
|
|
1578
|
+
return o.CreateFileCacheAdapter(e);
|
|
665
1579
|
|
|
666
1580
|
case "redis":
|
|
667
|
-
return
|
|
1581
|
+
return c.CreateRedisCacheAdapter(e);
|
|
668
1582
|
|
|
669
1583
|
case "memcache":
|
|
670
|
-
return
|
|
1584
|
+
return l.CreateMemcacheCacheAdapter(e);
|
|
671
1585
|
|
|
672
1586
|
case "mongo":
|
|
673
|
-
return
|
|
1587
|
+
return h.CreateMongoCacheAdapter(e);
|
|
674
1588
|
|
|
675
1589
|
case "sqlite":
|
|
676
1590
|
return u.CreateSqliteCacheAdapter(e);
|
|
677
1591
|
|
|
678
1592
|
case "postgres":
|
|
679
|
-
return
|
|
1593
|
+
return d.CreatePostgresCacheAdapter(e);
|
|
680
1594
|
|
|
681
1595
|
case "mysql":
|
|
682
|
-
return
|
|
1596
|
+
return f.CreateMysqlCacheAdapter(e);
|
|
683
1597
|
|
|
684
1598
|
default:
|
|
685
1599
|
return undefined;
|
|
686
1600
|
}
|
|
687
1601
|
})));
|
|
688
|
-
const
|
|
689
|
-
this.cache =
|
|
690
|
-
stores:
|
|
1602
|
+
const r = t.filter((e => !!e));
|
|
1603
|
+
this.cache = le({
|
|
1604
|
+
stores: r.length ? r : undefined,
|
|
691
1605
|
ttl: this.ttl,
|
|
692
1606
|
refreshThreshold: this.refreshThreshold,
|
|
693
1607
|
refreshAllStores: this.refreshAllStores,
|
|
@@ -702,22 +1616,22 @@ class Cacher extends s.Component {
|
|
|
702
1616
|
async destroy() {
|
|
703
1617
|
await this.cache.disconnect();
|
|
704
1618
|
}
|
|
705
|
-
async set(e,
|
|
706
|
-
return await this.cache.set(e,
|
|
1619
|
+
async set(e, t, r) {
|
|
1620
|
+
return await this.cache.set(e, t, r);
|
|
707
1621
|
}
|
|
708
1622
|
async multipleSet(e) {
|
|
709
1623
|
return await this.cache.mset(e);
|
|
710
1624
|
}
|
|
711
1625
|
async get(e) {
|
|
712
|
-
return
|
|
1626
|
+
return a.As(await this.cache.get(e));
|
|
713
1627
|
}
|
|
714
1628
|
async multipleGet(e) {
|
|
715
1629
|
return await this.cache.mget(e);
|
|
716
1630
|
}
|
|
717
1631
|
async getTTL(e) {
|
|
718
|
-
const
|
|
719
|
-
if (
|
|
720
|
-
return
|
|
1632
|
+
const t = await this.cache.ttl(e);
|
|
1633
|
+
if (t === undefined) return -1;
|
|
1634
|
+
return t;
|
|
721
1635
|
}
|
|
722
1636
|
async del(e) {
|
|
723
1637
|
return await this.cache.del(e);
|
|
@@ -728,23 +1642,23 @@ class Cacher extends s.Component {
|
|
|
728
1642
|
async clear() {
|
|
729
1643
|
return await this.cache.clear();
|
|
730
1644
|
}
|
|
731
|
-
on(e,
|
|
732
|
-
return super.on(e,
|
|
1645
|
+
on(e, t) {
|
|
1646
|
+
return super.on(e, t);
|
|
733
1647
|
}
|
|
734
1648
|
}
|
|
735
1649
|
|
|
736
|
-
e.__decorate([
|
|
1650
|
+
e.__decorate([ n.Configurable(m.DTO.Alternatives(m.DTO.Array(m.DTO.Alternatives(g.FileCacheOptions.Schema(), y.RedisCacheOptions.Schema(), p.MemcacheCacheOptions.Schema(), b.MongoCacheOptions.Schema(), _.SqliteCacheOptions.Schema(), v.PostgresCacheOptions.Schema(), j.MysqlCacheOptions.Schema())), g.FileCacheOptions.Schema(), y.RedisCacheOptions.Schema(), p.MemcacheCacheOptions.Schema(), b.MongoCacheOptions.Schema(), _.SqliteCacheOptions.Schema(), v.PostgresCacheOptions.Schema(), j.MysqlCacheOptions.Schema()).optional()), e.__metadata("design:type", Object) ], Cacher.prototype, "stores", void 0);
|
|
737
1651
|
|
|
738
|
-
e.__decorate([
|
|
1652
|
+
e.__decorate([ n.Configurable(m.DTO.Number().positive().integer().optional()), e.__metadata("design:type", Number) ], Cacher.prototype, "ttl", void 0);
|
|
739
1653
|
|
|
740
|
-
e.__decorate([
|
|
1654
|
+
e.__decorate([ n.Configurable(m.DTO.Number().positive().integer().optional()), e.__metadata("design:type", Number) ], Cacher.prototype, "refreshThreshold", void 0);
|
|
741
1655
|
|
|
742
|
-
e.__decorate([
|
|
1656
|
+
e.__decorate([ n.Configurable(m.DTO.Boolean().optional()), e.__metadata("design:type", Boolean) ], Cacher.prototype, "refreshAllStores", void 0);
|
|
743
1657
|
|
|
744
|
-
e.__decorate([
|
|
1658
|
+
e.__decorate([ n.Configurable(m.DTO.Boolean().optional()), e.__metadata("design:type", Boolean) ], Cacher.prototype, "nonBlocking", void 0);
|
|
745
1659
|
|
|
746
|
-
e.__decorate([
|
|
1660
|
+
e.__decorate([ n.Configurable(m.DTO.String().optional()), e.__metadata("design:type", String) ], Cacher.prototype, "cacheId", void 0);
|
|
747
1661
|
|
|
748
|
-
exports.BuildCacherOptions =
|
|
1662
|
+
exports.BuildCacherOptions = he;
|
|
749
1663
|
|
|
750
1664
|
exports.Cacher = Cacher;
|