lakutata 2.0.95 → 2.0.97
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 +30 -122
- package/com/cacher.mjs +22 -114
- package/com/database.cjs +24 -166
- package/com/database.mjs +24 -166
- package/com/docker.cjs +94 -276
- package/com/docker.mjs +39 -221
- package/com/entrypoint.cjs +33 -119
- package/com/entrypoint.mjs +20 -106
- package/com/logger.cjs +19 -123
- package/com/logger.mjs +19 -123
- package/com/monitor.cjs +24 -88
- package/com/monitor.mjs +20 -84
- package/decorator/asst.cjs +5 -7
- package/decorator/asst.mjs +5 -7
- package/decorator/ctrl.cjs +22 -58
- package/decorator/ctrl.mjs +10 -46
- package/decorator/di.cjs +12 -42
- package/decorator/di.mjs +8 -38
- package/decorator/dto.cjs +13 -43
- package/decorator/dto.mjs +9 -39
- package/decorator/orm.cjs +116 -112
- package/decorator/orm.mjs +70 -66
- package/dtos.cjs +8 -38
- package/dtos.mjs +8 -38
- package/helper.cjs +73 -127
- package/helper.mjs +12 -66
- package/lakutata.cjs +116 -328
- package/lakutata.mjs +60 -272
- package/orm.cjs +854 -173
- package/orm.mjs +866 -65
- package/package.json +1 -1
- package/provider/database.cjs +26 -166
- package/provider/database.mjs +26 -166
- package/provider/passwordHash.cjs +18 -82
- package/provider/passwordHash.mjs +18 -82
- package/src/components/Database.cjs +36 -178
- package/src/components/Database.mjs +68 -210
- package/src/components/Logger.cjs +50 -191
- package/src/components/Logger.mjs +46 -194
- package/src/components/cacher/Cacher.cjs +513 -164
- package/src/components/cacher/Cacher.mjs +503 -160
- package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +554 -28
- package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +538 -28
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.cjs +17 -47
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.mjs +17 -47
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.cjs +21 -51
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.mjs +22 -52
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.cjs +6 -30
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.mjs +18 -42
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.cjs +20 -50
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.mjs +23 -53
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.cjs +6 -30
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.mjs +27 -51
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.cjs +11 -41
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.mjs +18 -48
- package/src/components/cacher/exceptions/CacheDriverNotFoundException.cjs +4 -6
- package/src/components/cacher/exceptions/CacheDriverNotFoundException.mjs +4 -6
- package/src/components/cacher/interfaces/CacherOptions.cjs +1 -1
- package/src/components/cacher/interfaces/CacherOptions.mjs +1 -1
- package/src/components/cacher/lib/IsDriverPackageInstalled.cjs +4 -6
- package/src/components/cacher/lib/IsDriverPackageInstalled.mjs +4 -6
- package/src/components/cacher/options/FileCacheOptions.cjs +15 -45
- package/src/components/cacher/options/FileCacheOptions.mjs +15 -45
- package/src/components/cacher/options/MemcacheCacheOptions.cjs +16 -46
- package/src/components/cacher/options/MemcacheCacheOptions.mjs +17 -47
- package/src/components/cacher/options/MongoCacheOptions.cjs +9 -39
- package/src/components/cacher/options/MongoCacheOptions.mjs +18 -48
- package/src/components/cacher/options/MysqlCacheOptions.cjs +9 -39
- package/src/components/cacher/options/MysqlCacheOptions.mjs +19 -49
- package/src/components/cacher/options/PostgresCacheOptions.cjs +21 -51
- package/src/components/cacher/options/PostgresCacheOptions.mjs +20 -50
- package/src/components/cacher/options/RedisCacheOptions.cjs +26 -56
- package/src/components/cacher/options/RedisCacheOptions.mjs +9 -39
- package/src/components/cacher/options/SqliteCacheOptions.cjs +15 -45
- package/src/components/cacher/options/SqliteCacheOptions.mjs +14 -44
- package/src/components/cacher/types/CacheStoreOptions.cjs +1 -1
- package/src/components/cacher/types/CacheStoreOptions.mjs +1 -1
- package/src/components/docker/ConnectionOptionsBuilder.cjs +32 -214
- package/src/components/docker/ConnectionOptionsBuilder.mjs +37 -219
- package/src/components/docker/Docker.cjs +8727 -408
- package/src/components/docker/Docker.mjs +8903 -578
- package/src/components/docker/exceptions/DockerConnectionException.cjs +4 -6
- package/src/components/docker/exceptions/DockerConnectionException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImageBuildException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImageBuildException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImageImportException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImageImportException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImageNotFoundException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImageNotFoundException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImagePullException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImagePullException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImagePushException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImagePushException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImageRepoTagNotFoundException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImageRepoTagNotFoundException.mjs +4 -6
- package/src/components/docker/exceptions/DockerNetworkNotFoundException.cjs +4 -6
- package/src/components/docker/exceptions/DockerNetworkNotFoundException.mjs +4 -6
- package/src/components/docker/interfaces/IDockerConnectionOptions.cjs +1 -1
- package/src/components/docker/interfaces/IDockerConnectionOptions.mjs +1 -1
- package/src/components/docker/interfaces/IDockerHttpConnectionOptions.cjs +1 -1
- package/src/components/docker/interfaces/IDockerHttpConnectionOptions.mjs +1 -1
- package/src/components/docker/interfaces/IDockerHttpsConnectionOptions.cjs +1 -1
- package/src/components/docker/interfaces/IDockerHttpsConnectionOptions.mjs +1 -1
- package/src/components/docker/interfaces/IDockerKeyObject.cjs +1 -1
- package/src/components/docker/interfaces/IDockerKeyObject.mjs +1 -1
- package/src/components/docker/interfaces/IDockerSSHConnectionOptions.cjs +1 -1
- package/src/components/docker/interfaces/IDockerSSHConnectionOptions.mjs +1 -1
- package/src/components/docker/interfaces/IDockerSocketConnectionOptions.cjs +1 -1
- package/src/components/docker/interfaces/IDockerSocketConnectionOptions.mjs +1 -1
- package/src/components/docker/lib/DockerContainer.cjs +174 -330
- package/src/components/docker/lib/DockerContainer.mjs +184 -340
- package/src/components/docker/lib/DockerContainerTTY.cjs +52 -260
- package/src/components/docker/lib/DockerContainerTTY.mjs +48 -263
- package/src/components/docker/lib/DockerImage.cjs +69 -131
- package/src/components/docker/lib/DockerImage.mjs +54 -116
- package/src/components/docker/lib/ParseEnvToRecord.cjs +1 -1
- package/src/components/docker/lib/ParseEnvToRecord.mjs +1 -1
- package/src/components/docker/lib/ParseRepositoryTag.cjs +1 -1
- package/src/components/docker/lib/ParseRepositoryTag.mjs +1 -1
- package/src/components/docker/options/DockerPruneOptions.cjs +14 -44
- package/src/components/docker/options/DockerPruneOptions.mjs +15 -45
- package/src/components/docker/options/auth/DockerAuthOptions.cjs +9 -39
- package/src/components/docker/options/auth/DockerAuthOptions.mjs +15 -45
- package/src/components/docker/options/container/ContainerCommitOptions.cjs +12 -42
- package/src/components/docker/options/container/ContainerCommitOptions.mjs +12 -42
- package/src/components/docker/options/container/ContainerCreateTTYOptions.cjs +13 -43
- package/src/components/docker/options/container/ContainerCreateTTYOptions.mjs +12 -42
- package/src/components/docker/options/container/ContainerExecOptions.cjs +9 -39
- package/src/components/docker/options/container/ContainerExecOptions.mjs +11 -41
- package/src/components/docker/options/container/ContainerExportDirectoryOptions.cjs +13 -43
- package/src/components/docker/options/container/ContainerExportDirectoryOptions.mjs +12 -42
- package/src/components/docker/options/container/ContainerKillOptions.cjs +9 -39
- package/src/components/docker/options/container/ContainerKillOptions.mjs +12 -42
- package/src/components/docker/options/container/ContainerLogsOptions.cjs +15 -45
- package/src/components/docker/options/container/ContainerLogsOptions.mjs +15 -45
- package/src/components/docker/options/container/ContainerRemoveOptions.cjs +9 -39
- package/src/components/docker/options/container/ContainerRemoveOptions.mjs +12 -42
- package/src/components/docker/options/container/ContainerSettingOptions.cjs +9 -39
- package/src/components/docker/options/container/ContainerSettingOptions.mjs +43 -73
- package/src/components/docker/options/container/ContainerStopOptions.cjs +12 -42
- package/src/components/docker/options/container/ContainerStopOptions.mjs +9 -39
- package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.cjs +9 -39
- package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.mjs +12 -42
- package/src/components/docker/options/image/ImageBuildOptions.cjs +26 -56
- package/src/components/docker/options/image/ImageBuildOptions.mjs +25 -55
- package/src/components/docker/options/image/ImageExportOptions.cjs +14 -44
- package/src/components/docker/options/image/ImageExportOptions.mjs +14 -44
- package/src/components/docker/options/image/ImageImportOptions.cjs +13 -43
- package/src/components/docker/options/image/ImageImportOptions.mjs +12 -42
- package/src/components/docker/options/image/ImagePullOptions.cjs +9 -39
- package/src/components/docker/options/image/ImagePullOptions.mjs +16 -46
- package/src/components/docker/options/image/ImagePushOptions.cjs +15 -45
- package/src/components/docker/options/image/ImagePushOptions.mjs +15 -45
- package/src/components/docker/options/image/ImageRemoveOptions.cjs +12 -42
- package/src/components/docker/options/image/ImageRemoveOptions.mjs +13 -43
- package/src/components/docker/options/image/ImageTagOptions.cjs +9 -39
- package/src/components/docker/options/image/ImageTagOptions.mjs +12 -42
- package/src/components/docker/options/network/NetworkCreateOptions.cjs +9 -39
- package/src/components/docker/options/network/NetworkCreateOptions.mjs +20 -50
- package/src/components/docker/types/ContainerBind.cjs +1 -1
- package/src/components/docker/types/ContainerBind.mjs +1 -1
- package/src/components/docker/types/ContainerCapability.cjs +1 -1
- package/src/components/docker/types/ContainerCapability.mjs +1 -1
- package/src/components/docker/types/ContainerConfig.cjs +1 -1
- package/src/components/docker/types/ContainerConfig.mjs +1 -1
- package/src/components/docker/types/ContainerDevice.cjs +1 -1
- package/src/components/docker/types/ContainerDevice.mjs +1 -1
- package/src/components/docker/types/ContainerNetwork.cjs +1 -1
- package/src/components/docker/types/ContainerNetwork.mjs +1 -1
- package/src/components/docker/types/ContainerPort.cjs +1 -1
- package/src/components/docker/types/ContainerPort.mjs +1 -1
- package/src/components/docker/types/ContainerRestartPolicy.cjs +1 -1
- package/src/components/docker/types/ContainerRestartPolicy.mjs +1 -1
- package/src/components/docker/types/ContainerState.cjs +1 -1
- package/src/components/docker/types/ContainerState.mjs +1 -1
- package/src/components/docker/types/ContainerStats.cjs +1 -1
- package/src/components/docker/types/ContainerStats.mjs +1 -1
- package/src/components/docker/types/DockerOutputCallback.cjs +1 -1
- package/src/components/docker/types/DockerOutputCallback.mjs +1 -1
- package/src/components/docker/types/ImageConfig.cjs +1 -1
- package/src/components/docker/types/ImageConfig.mjs +1 -1
- package/src/components/docker/types/ImageExposePort.cjs +1 -1
- package/src/components/docker/types/ImageExposePort.mjs +1 -1
- package/src/components/docker/types/NetworkInfo.cjs +1 -1
- package/src/components/docker/types/NetworkInfo.mjs +1 -1
- package/src/components/entrypoint/Entrypoint.cjs +1961 -322
- package/src/components/entrypoint/Entrypoint.mjs +1928 -281
- package/src/components/entrypoint/exceptions/AccessDenyException.cjs +4 -6
- package/src/components/entrypoint/exceptions/AccessDenyException.mjs +4 -6
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.cjs +4 -6
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.mjs +4 -6
- package/src/components/entrypoint/exceptions/DuplicateActionNameException.cjs +4 -6
- package/src/components/entrypoint/exceptions/DuplicateActionNameException.mjs +4 -6
- package/src/components/entrypoint/exceptions/InvalidActionGroupException.cjs +4 -6
- package/src/components/entrypoint/exceptions/InvalidActionGroupException.mjs +4 -6
- package/src/components/entrypoint/lib/AccessControl.cjs +71 -133
- package/src/components/entrypoint/lib/AccessControl.mjs +75 -137
- package/src/components/entrypoint/lib/AccessControlRule.cjs +19 -81
- package/src/components/entrypoint/lib/AccessControlRule.mjs +23 -85
- package/src/components/entrypoint/lib/Controller.cjs +42 -104
- package/src/components/entrypoint/lib/Controller.mjs +43 -105
- package/src/components/monitor/AliveMonitor.cjs +40 -104
- package/src/components/monitor/AliveMonitor.mjs +50 -114
- package/src/components/monitor/CpuMonitor.cjs +40 -104
- package/src/components/monitor/CpuMonitor.mjs +48 -112
- package/src/components/monitor/EventLoopMonitor.cjs +19 -83
- package/src/components/monitor/EventLoopMonitor.mjs +24 -88
- package/src/components/monitor/HttpRequestMonitor.cjs +41 -105
- package/src/components/monitor/HttpRequestMonitor.mjs +45 -109
- package/src/components/monitor/MemoryMonitor.cjs +87 -151
- package/src/components/monitor/MemoryMonitor.mjs +71 -135
- package/src/components/monitor/interfaces/ICpuMonitorStatistics.cjs +1 -1
- package/src/components/monitor/interfaces/ICpuMonitorStatistics.mjs +1 -1
- package/src/components/monitor/interfaces/IEventLoopMonitorStatistics.cjs +1 -1
- package/src/components/monitor/interfaces/IEventLoopMonitorStatistics.mjs +1 -1
- package/src/components/monitor/interfaces/IHttpRequestMonitorStatistics.cjs +1 -1
- package/src/components/monitor/interfaces/IHttpRequestMonitorStatistics.mjs +1 -1
- package/src/components/monitor/interfaces/IMemoryMonitorStatistics.cjs +1 -1
- package/src/components/monitor/interfaces/IMemoryMonitorStatistics.mjs +1 -1
- package/src/components/monitor/interfaces/IMonitor.cjs +1 -1
- package/src/components/monitor/interfaces/IMonitor.mjs +1 -1
- package/src/constants/DIMetadataKey.cjs +3 -3
- package/src/constants/DIMetadataKey.mjs +3 -3
- package/src/constants/DTOMetadataKey.cjs +3 -3
- package/src/constants/DTOMetadataKey.mjs +3 -3
- package/src/decorators/asst/After.cjs +4 -6
- package/src/decorators/asst/After.mjs +5 -7
- package/src/decorators/asst/Before.cjs +4 -6
- package/src/decorators/asst/Before.mjs +5 -7
- package/src/decorators/ctrl/CLIAction.cjs +15 -51
- package/src/decorators/ctrl/CLIAction.mjs +19 -55
- package/src/decorators/ctrl/HTTPAction.cjs +15 -51
- package/src/decorators/ctrl/HTTPAction.mjs +19 -55
- package/src/decorators/ctrl/ServiceAction.cjs +15 -51
- package/src/decorators/ctrl/ServiceAction.mjs +18 -54
- package/src/decorators/ctrl/http/DELETE.cjs +12 -48
- package/src/decorators/ctrl/http/DELETE.mjs +14 -50
- package/src/decorators/ctrl/http/GET.cjs +12 -48
- package/src/decorators/ctrl/http/GET.mjs +14 -50
- package/src/decorators/ctrl/http/HEAD.cjs +12 -48
- package/src/decorators/ctrl/http/HEAD.mjs +14 -50
- package/src/decorators/ctrl/http/OPTIONS.cjs +12 -48
- package/src/decorators/ctrl/http/OPTIONS.mjs +14 -50
- package/src/decorators/ctrl/http/PATCH.cjs +12 -48
- package/src/decorators/ctrl/http/PATCH.mjs +14 -50
- package/src/decorators/ctrl/http/POST.cjs +12 -48
- package/src/decorators/ctrl/http/POST.mjs +14 -50
- package/src/decorators/ctrl/http/PUT.cjs +12 -48
- package/src/decorators/ctrl/http/PUT.mjs +14 -50
- package/src/decorators/di/Autoload.cjs +3 -3
- package/src/decorators/di/Autoload.mjs +3 -3
- package/src/decorators/di/Configurable.cjs +10 -40
- package/src/decorators/di/Configurable.mjs +12 -42
- package/src/decorators/di/Inject.cjs +20 -50
- package/src/decorators/di/Inject.mjs +25 -55
- package/src/decorators/di/Lifetime.cjs +5 -7
- package/src/decorators/di/Lifetime.mjs +15 -17
- package/src/decorators/dto/Accept.cjs +10 -40
- package/src/decorators/dto/Accept.mjs +13 -43
- package/src/decorators/dto/Expect.cjs +11 -41
- package/src/decorators/dto/Expect.mjs +13 -43
- package/src/decorators/dto/IndexSignature.cjs +10 -40
- package/src/decorators/dto/IndexSignature.mjs +13 -43
- package/src/decorators/dto/Return.cjs +10 -40
- package/src/decorators/dto/Return.mjs +13 -43
- package/src/decorators/orm/AfterInsert.cjs +17 -95
- package/src/decorators/orm/AfterInsert.mjs +17 -95
- package/src/decorators/orm/AfterLoad.cjs +17 -95
- package/src/decorators/orm/AfterLoad.mjs +17 -95
- package/src/decorators/orm/AfterRecover.cjs +17 -95
- package/src/decorators/orm/AfterRecover.mjs +17 -95
- package/src/decorators/orm/AfterRemove.cjs +17 -95
- package/src/decorators/orm/AfterRemove.mjs +17 -95
- package/src/decorators/orm/AfterSoftRemove.cjs +17 -95
- package/src/decorators/orm/AfterSoftRemove.mjs +17 -95
- package/src/decorators/orm/AfterUpdate.cjs +17 -95
- package/src/decorators/orm/AfterUpdate.mjs +17 -95
- package/src/decorators/orm/BeforeInsert.cjs +17 -95
- package/src/decorators/orm/BeforeInsert.mjs +17 -95
- package/src/decorators/orm/BeforeRecover.cjs +17 -95
- package/src/decorators/orm/BeforeRecover.mjs +17 -95
- package/src/decorators/orm/BeforeRemove.cjs +17 -95
- package/src/decorators/orm/BeforeRemove.mjs +17 -95
- package/src/decorators/orm/BeforeSoftRemove.cjs +17 -95
- package/src/decorators/orm/BeforeSoftRemove.mjs +17 -95
- package/src/decorators/orm/BeforeUpdate.cjs +17 -95
- package/src/decorators/orm/BeforeUpdate.mjs +17 -95
- package/src/decorators/orm/Check.cjs +17 -95
- package/src/decorators/orm/Check.mjs +17 -95
- package/src/decorators/orm/ChildEntity.cjs +17 -95
- package/src/decorators/orm/ChildEntity.mjs +17 -95
- package/src/decorators/orm/Column.cjs +17 -95
- package/src/decorators/orm/Column.mjs +17 -95
- package/src/decorators/orm/CreateDateColumn.cjs +17 -95
- package/src/decorators/orm/CreateDateColumn.mjs +17 -95
- package/src/decorators/orm/DeleteDateColumn.cjs +17 -95
- package/src/decorators/orm/DeleteDateColumn.mjs +17 -95
- package/src/decorators/orm/Entity.cjs +17 -95
- package/src/decorators/orm/Entity.mjs +17 -95
- package/src/decorators/orm/EventSubscriber.cjs +17 -95
- package/src/decorators/orm/EventSubscriber.mjs +17 -95
- package/src/decorators/orm/Exclusion.cjs +17 -95
- package/src/decorators/orm/Exclusion.mjs +17 -95
- package/src/decorators/orm/Generated.cjs +17 -95
- package/src/decorators/orm/Generated.mjs +17 -95
- package/src/decorators/orm/Index.cjs +17 -95
- package/src/decorators/orm/Index.mjs +17 -95
- package/src/decorators/orm/JoinColumn.cjs +17 -95
- package/src/decorators/orm/JoinColumn.mjs +17 -95
- package/src/decorators/orm/JoinTable.cjs +17 -95
- package/src/decorators/orm/JoinTable.mjs +17 -95
- package/src/decorators/orm/ManyToMany.cjs +17 -95
- package/src/decorators/orm/ManyToMany.mjs +17 -95
- package/src/decorators/orm/ManyToOne.cjs +17 -95
- package/src/decorators/orm/ManyToOne.mjs +17 -95
- package/src/decorators/orm/ObjectIdColumn.cjs +17 -95
- package/src/decorators/orm/ObjectIdColumn.mjs +17 -95
- package/src/decorators/orm/OneToMany.cjs +17 -95
- package/src/decorators/orm/OneToMany.mjs +17 -95
- package/src/decorators/orm/OneToOne.cjs +17 -95
- package/src/decorators/orm/OneToOne.mjs +17 -95
- package/src/decorators/orm/PrimaryColumn.cjs +17 -95
- package/src/decorators/orm/PrimaryColumn.mjs +17 -95
- package/src/decorators/orm/PrimaryGeneratedColumn.cjs +17 -95
- package/src/decorators/orm/PrimaryGeneratedColumn.mjs +17 -95
- package/src/decorators/orm/RelationId.cjs +17 -95
- package/src/decorators/orm/RelationId.mjs +17 -95
- package/src/decorators/orm/TableInheritance.cjs +17 -95
- package/src/decorators/orm/TableInheritance.mjs +17 -95
- package/src/decorators/orm/Tree.cjs +17 -95
- package/src/decorators/orm/Tree.mjs +17 -95
- package/src/decorators/orm/TreeChildren.cjs +17 -95
- package/src/decorators/orm/TreeChildren.mjs +17 -95
- package/src/decorators/orm/TreeLevelColumn.cjs +17 -95
- package/src/decorators/orm/TreeLevelColumn.mjs +17 -95
- package/src/decorators/orm/TreeParent.cjs +17 -95
- package/src/decorators/orm/TreeParent.mjs +17 -95
- package/src/decorators/orm/Unique.cjs +17 -95
- package/src/decorators/orm/Unique.mjs +17 -95
- package/src/decorators/orm/UpdateDateColumn.cjs +17 -95
- package/src/decorators/orm/UpdateDateColumn.mjs +17 -95
- package/src/decorators/orm/VersionColumn.cjs +17 -95
- package/src/decorators/orm/VersionColumn.mjs +17 -95
- package/src/decorators/orm/ViewColumn.cjs +17 -95
- package/src/decorators/orm/ViewColumn.mjs +17 -95
- package/src/decorators/orm/ViewEntity.cjs +17 -95
- package/src/decorators/orm/ViewEntity.mjs +17 -95
- package/src/decorators/orm/VirtualColumn.cjs +17 -95
- package/src/decorators/orm/VirtualColumn.mjs +17 -95
- package/src/dto/PaginationResultDTO.cjs +9 -39
- package/src/dto/PaginationResultDTO.mjs +18 -48
- package/src/dto/PaginationSearchDTO.cjs +9 -39
- package/src/dto/PaginationSearchDTO.mjs +13 -43
- package/src/exceptions/DestroyRuntimeContainerException.cjs +4 -6
- package/src/exceptions/DestroyRuntimeContainerException.mjs +4 -6
- package/src/exceptions/InvalidActionPatternDepthException.cjs +4 -6
- package/src/exceptions/InvalidActionPatternDepthException.mjs +4 -6
- package/src/exceptions/InvalidAssistantFunctionTypeException.cjs +4 -6
- package/src/exceptions/InvalidAssistantFunctionTypeException.mjs +4 -6
- package/src/exceptions/InvalidObjectTypeException.cjs +4 -6
- package/src/exceptions/InvalidObjectTypeException.mjs +4 -6
- package/src/exceptions/MethodNotFoundException.cjs +4 -6
- package/src/exceptions/MethodNotFoundException.mjs +4 -6
- package/src/exceptions/alias/AliasExistsException.cjs +4 -6
- package/src/exceptions/alias/AliasExistsException.mjs +6 -8
- package/src/exceptions/alias/AliasNotFoundException.cjs +4 -6
- package/src/exceptions/alias/AliasNotFoundException.mjs +4 -6
- package/src/exceptions/alias/InvalidAliasNameException.cjs +4 -6
- package/src/exceptions/alias/InvalidAliasNameException.mjs +4 -6
- package/src/exceptions/di/DependencyInjectionException.cjs +4 -6
- package/src/exceptions/di/DependencyInjectionException.mjs +4 -6
- package/src/exceptions/di/LifetimeLockedException.cjs +4 -6
- package/src/exceptions/di/LifetimeLockedException.mjs +4 -6
- package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.cjs +4 -6
- package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.mjs +4 -6
- package/src/exceptions/dto/InvalidMethodAcceptException.cjs +4 -6
- package/src/exceptions/dto/InvalidMethodAcceptException.mjs +4 -6
- package/src/exceptions/dto/InvalidMethodReturnException.cjs +4 -6
- package/src/exceptions/dto/InvalidMethodReturnException.mjs +4 -6
- package/src/exceptions/dto/InvalidValueException.cjs +4 -6
- package/src/exceptions/dto/InvalidValueException.mjs +4 -6
- package/src/interfaces/IBaseObjectConstructor.cjs +1 -1
- package/src/interfaces/IBaseObjectConstructor.mjs +1 -1
- package/src/interfaces/IConstructor.cjs +1 -1
- package/src/interfaces/IConstructor.mjs +1 -1
- package/src/interfaces/IPatRun.cjs +1 -1
- package/src/interfaces/IPatRun.mjs +1 -1
- package/src/lib/base/BaseObject.cjs +51 -259
- package/src/lib/base/BaseObject.mjs +41 -256
- package/src/lib/base/Context.cjs +11 -41
- package/src/lib/base/Context.mjs +23 -53
- package/src/lib/base/EventEmitter.cjs +1398 -47
- package/src/lib/base/EventEmitter.mjs +1397 -46
- package/src/lib/base/abstracts/Exception.cjs +12 -14
- package/src/lib/base/abstracts/Exception.mjs +4 -6
- package/src/lib/base/async-constructor/Append.cjs +1 -1
- package/src/lib/base/async-constructor/Append.mjs +1 -1
- package/src/lib/base/async-constructor/AsyncConstructor.cjs +1 -1
- package/src/lib/base/async-constructor/AsyncConstructor.mjs +1 -1
- package/src/lib/base/internal/ActionOptions.cjs +9 -39
- package/src/lib/base/internal/ActionOptions.mjs +9 -39
- package/src/lib/base/internal/ApplicationConfigLoader.cjs +54 -116
- package/src/lib/base/internal/ApplicationConfigLoader.mjs +54 -116
- package/src/lib/base/internal/BasicInfo.cjs +13 -15
- package/src/lib/base/internal/BasicInfo.mjs +15 -17
- package/src/lib/base/internal/CamelCase.cjs +1 -1
- package/src/lib/base/internal/CamelCase.mjs +1 -1
- package/src/lib/base/internal/ConfigurableRecordsInjection.cjs +3 -3
- package/src/lib/base/internal/ConfigurableRecordsInjection.mjs +3 -3
- package/src/lib/base/internal/ConstructorSymbol.cjs +3 -3
- package/src/lib/base/internal/ConstructorSymbol.mjs +3 -3
- package/src/lib/base/internal/ControllerEntrypoint.cjs +16 -24
- package/src/lib/base/internal/ControllerEntrypoint.mjs +39 -47
- package/src/lib/base/internal/DataValidator.cjs +203 -27
- package/src/lib/base/internal/DataValidator.mjs +203 -27
- package/src/lib/base/internal/DatabaseSymbol.cjs +1 -1
- package/src/lib/base/internal/DatabaseSymbol.mjs +1 -1
- package/src/lib/base/internal/FlexibleDTO.cjs +11 -41
- package/src/lib/base/internal/FlexibleDTO.mjs +13 -43
- package/src/lib/base/internal/GetActionDTOAndOptions.cjs +21 -51
- package/src/lib/base/internal/GetActionDTOAndOptions.mjs +23 -53
- package/src/lib/base/internal/IEEE754.cjs +1 -1
- package/src/lib/base/internal/IEEE754.mjs +1 -1
- package/src/lib/base/internal/MethodAssistantFunction.cjs +15 -17
- package/src/lib/base/internal/MethodAssistantFunction.mjs +8 -10
- package/src/lib/base/internal/MethodValidation.cjs +55 -85
- package/src/lib/base/internal/MethodValidation.mjs +42 -72
- package/src/lib/base/internal/ModuleConfigLoader.cjs +81 -143
- package/src/lib/base/internal/ModuleConfigLoader.mjs +76 -138
- package/src/lib/base/internal/ObjectConfiguration.cjs +26 -56
- package/src/lib/base/internal/ObjectConfiguration.mjs +25 -55
- package/src/lib/base/internal/ObjectContainer.cjs +3 -3
- package/src/lib/base/internal/ObjectContainer.mjs +3 -3
- package/src/lib/base/internal/ObjectInjection.cjs +3 -3
- package/src/lib/base/internal/ObjectInjection.mjs +3 -3
- package/src/lib/base/internal/ObjectLifetime.cjs +5 -7
- package/src/lib/base/internal/ObjectLifetime.mjs +12 -14
- package/src/lib/base/internal/ObjectSchemaValidation.cjs +23 -121
- package/src/lib/base/internal/ObjectSchemaValidation.mjs +14 -114
- package/src/lib/base/internal/ObjectType.cjs +27 -119
- package/src/lib/base/internal/ObjectType.mjs +20 -119
- package/src/lib/base/internal/ObjectWeakRefs.cjs +1 -1
- package/src/lib/base/internal/ObjectWeakRefs.mjs +1 -1
- package/src/lib/base/internal/PatternManager.cjs +831 -7
- package/src/lib/base/internal/PatternManager.mjs +835 -11
- package/src/lib/base/internal/StringifyPattern.cjs +5 -9
- package/src/lib/base/internal/StringifyPattern.mjs +5 -9
- package/src/lib/base/internal/ThrowWarning.cjs +1 -1
- package/src/lib/base/internal/ThrowWarning.mjs +1 -1
- package/src/lib/context/CLIContext.cjs +12 -42
- package/src/lib/context/CLIContext.mjs +15 -45
- package/src/lib/context/HTTPContext.cjs +15 -45
- package/src/lib/context/HTTPContext.mjs +14 -44
- package/src/lib/context/ServiceContext.cjs +12 -42
- package/src/lib/context/ServiceContext.mjs +18 -48
- package/src/lib/core/Alias.cjs +46 -48
- package/src/lib/core/Alias.mjs +24 -26
- package/src/lib/core/Application.cjs +486 -351
- package/src/lib/core/Application.mjs +531 -400
- package/src/lib/core/Component.cjs +24 -88
- package/src/lib/core/Component.mjs +28 -92
- package/src/lib/core/Container.cjs +50 -326
- package/src/lib/core/Container.mjs +45 -323
- package/src/lib/core/DTO.cjs +16 -194
- package/src/lib/core/DTO.mjs +12 -197
- package/src/lib/core/Module.cjs +39 -107
- package/src/lib/core/Module.mjs +53 -121
- package/src/lib/core/Provider.cjs +19 -81
- package/src/lib/core/Provider.mjs +25 -87
- package/src/lib/core/Time.cjs +5 -7
- package/src/lib/core/Time.mjs +5 -7
- package/src/lib/helpers/ArrayToSet.cjs +1 -1
- package/src/lib/helpers/ArrayToSet.mjs +1 -1
- package/src/lib/helpers/As.cjs +1 -1
- package/src/lib/helpers/As.mjs +1 -1
- package/src/lib/helpers/ConvertArrayLikeToIterable.cjs +1 -1
- package/src/lib/helpers/ConvertArrayLikeToIterable.mjs +1 -1
- package/src/lib/helpers/ConvertArrayLikeToStream.cjs +1 -1
- package/src/lib/helpers/ConvertArrayLikeToStream.mjs +1 -1
- package/src/lib/helpers/Delay.cjs +1 -1
- package/src/lib/helpers/Delay.mjs +1 -1
- package/src/lib/helpers/DevNull.cjs +1 -1
- package/src/lib/helpers/DevNull.mjs +1 -1
- package/src/lib/helpers/GetObjectNestingDepth.cjs +1 -1
- package/src/lib/helpers/GetObjectNestingDepth.mjs +1 -1
- package/src/lib/helpers/GetObjectPropertyPaths.cjs +1 -1
- package/src/lib/helpers/GetObjectPropertyPaths.mjs +1 -1
- package/src/lib/helpers/Glob.cjs +5502 -17
- package/src/lib/helpers/Glob.mjs +5472 -17
- package/src/lib/helpers/GraceExit.cjs +1 -1
- package/src/lib/helpers/GraceExit.mjs +1 -1
- package/src/lib/helpers/HexToIEEE754.cjs +1 -1
- package/src/lib/helpers/HexToIEEE754.mjs +1 -1
- package/src/lib/helpers/HexToSigned.cjs +1 -1
- package/src/lib/helpers/HexToSigned.mjs +1 -1
- package/src/lib/helpers/HexToUnsigned.cjs +1 -1
- package/src/lib/helpers/HexToUnsigned.mjs +1 -1
- package/src/lib/helpers/IEEE754ToHex.cjs +1 -1
- package/src/lib/helpers/IEEE754ToHex.mjs +1 -1
- package/src/lib/helpers/IPToolkit.cjs +1 -1
- package/src/lib/helpers/IPToolkit.mjs +1 -1
- package/src/lib/helpers/IsAbortError.cjs +1 -1
- package/src/lib/helpers/IsAbortError.mjs +1 -1
- package/src/lib/helpers/IsEmptyObject.cjs +1 -1
- package/src/lib/helpers/IsEmptyObject.mjs +1 -1
- package/src/lib/helpers/IsExists.cjs +1 -1
- package/src/lib/helpers/IsExists.mjs +1 -1
- package/src/lib/helpers/IsGlobString.cjs +4 -10
- package/src/lib/helpers/IsGlobString.mjs +3 -11
- package/src/lib/helpers/IsHtml.cjs +5 -5
- package/src/lib/helpers/IsHtml.mjs +6 -6
- package/src/lib/helpers/IsNativeFunction.cjs +1 -1
- package/src/lib/helpers/IsNativeFunction.mjs +1 -1
- package/src/lib/helpers/IsPath.cjs +1 -1
- package/src/lib/helpers/IsPath.mjs +1 -1
- package/src/lib/helpers/IsPromise.cjs +1 -1
- package/src/lib/helpers/IsPromise.mjs +1 -1
- package/src/lib/helpers/IsPromiseLike.cjs +1 -1
- package/src/lib/helpers/IsPromiseLike.mjs +1 -1
- package/src/lib/helpers/IsSymbol.cjs +10 -44
- package/src/lib/helpers/IsSymbol.mjs +9 -45
- package/src/lib/helpers/IsXML.cjs +1711 -6
- package/src/lib/helpers/IsXML.mjs +1712 -7
- package/src/lib/helpers/MD5.cjs +4 -4
- package/src/lib/helpers/MD5.mjs +4 -4
- package/src/lib/helpers/MergeArray.cjs +1 -1
- package/src/lib/helpers/MergeArray.mjs +1 -1
- package/src/lib/helpers/MergeMap.cjs +1 -1
- package/src/lib/helpers/MergeMap.mjs +1 -1
- package/src/lib/helpers/MergeSet.cjs +1 -1
- package/src/lib/helpers/MergeSet.mjs +1 -1
- package/src/lib/helpers/NoCase.cjs +1 -1
- package/src/lib/helpers/NoCase.mjs +1 -1
- package/src/lib/helpers/NonceStr.cjs +2 -6
- package/src/lib/helpers/NonceStr.mjs +4 -8
- package/src/lib/helpers/ObjectConstructor.cjs +1 -1
- package/src/lib/helpers/ObjectConstructor.mjs +1 -1
- package/src/lib/helpers/ObjectHash.cjs +405 -7
- package/src/lib/helpers/ObjectHash.mjs +399 -7
- package/src/lib/helpers/ObjectParentConstructor.cjs +1 -1
- package/src/lib/helpers/ObjectParentConstructor.mjs +1 -1
- package/src/lib/helpers/ObjectParentConstructors.cjs +1 -1
- package/src/lib/helpers/ObjectParentConstructors.mjs +1 -1
- package/src/lib/helpers/ObjectPath.cjs +1 -1
- package/src/lib/helpers/ObjectPath.mjs +1 -1
- package/src/lib/helpers/ObjectPrototype.cjs +1 -1
- package/src/lib/helpers/ObjectPrototype.mjs +1 -1
- package/src/lib/helpers/ObjectToMap.cjs +1 -1
- package/src/lib/helpers/ObjectToMap.mjs +1 -1
- package/src/lib/helpers/Paginator.cjs +1 -1
- package/src/lib/helpers/Paginator.mjs +1 -1
- package/src/lib/helpers/RandomString.cjs +172 -11
- package/src/lib/helpers/RandomString.mjs +166 -11
- package/src/lib/helpers/SHA1.cjs +4 -4
- package/src/lib/helpers/SHA1.mjs +4 -4
- package/src/lib/helpers/SHA256.cjs +4 -4
- package/src/lib/helpers/SHA256.mjs +4 -4
- package/src/lib/helpers/SetToArray.cjs +1 -1
- package/src/lib/helpers/SetToArray.mjs +1 -1
- package/src/lib/helpers/SignedToHex.cjs +1 -1
- package/src/lib/helpers/SignedToHex.mjs +1 -1
- package/src/lib/helpers/SortArray.cjs +2 -6
- package/src/lib/helpers/SortArray.mjs +7 -11
- package/src/lib/helpers/SortKeys.cjs +1 -1
- package/src/lib/helpers/SortKeys.mjs +1 -1
- package/src/lib/helpers/SortObject.cjs +1 -1
- package/src/lib/helpers/SortObject.mjs +1 -1
- package/src/lib/helpers/Statistics.cjs +2 -2
- package/src/lib/helpers/Statistics.mjs +2 -2
- package/src/lib/helpers/Templating.cjs +1 -1
- package/src/lib/helpers/Templating.mjs +1 -1
- package/src/lib/helpers/URLBuilder.cjs +417 -38
- package/src/lib/helpers/URLBuilder.mjs +417 -38
- package/src/lib/helpers/UUID.cjs +340 -22
- package/src/lib/helpers/UUID.mjs +340 -22
- package/src/lib/helpers/UniqueArray.cjs +1 -1
- package/src/lib/helpers/UniqueArray.mjs +1 -1
- package/src/lib/helpers/UnsignedToHex.cjs +1 -1
- package/src/lib/helpers/UnsignedToHex.mjs +1 -1
- package/src/lib/ioc/DependencyInjectionContainer.cjs +145 -197
- package/src/lib/ioc/DependencyInjectionContainer.mjs +102 -154
- package/src/lib/ioc/Errors.cjs +27 -57
- package/src/lib/ioc/Errors.mjs +25 -55
- package/src/lib/ioc/FunctionTokenizer.cjs +1 -1
- package/src/lib/ioc/FunctionTokenizer.mjs +1 -1
- package/src/lib/ioc/InjectionMode.cjs +1 -1
- package/src/lib/ioc/InjectionMode.mjs +1 -1
- package/src/lib/ioc/Lifetime.cjs +1 -1
- package/src/lib/ioc/Lifetime.mjs +1 -1
- package/src/lib/ioc/ListModules.cjs +5811 -99
- package/src/lib/ioc/ListModules.mjs +5779 -79
- package/src/lib/ioc/LoadModules.cjs +63 -93
- package/src/lib/ioc/LoadModules.mjs +65 -95
- package/src/lib/ioc/ParamParser.cjs +1 -1
- package/src/lib/ioc/ParamParser.mjs +1 -1
- package/src/lib/ioc/Resolvers.cjs +42 -72
- package/src/lib/ioc/Resolvers.mjs +44 -74
- package/src/lib/ioc/Utils.cjs +28 -58
- package/src/lib/ioc/Utils.mjs +34 -64
- package/src/lib/validation/VLD.cjs +11342 -98
- package/src/lib/validation/VLD.mjs +11298 -80
- package/src/lib/validation/interfaces/AlternativesSchema.cjs +1 -1
- package/src/lib/validation/interfaces/AlternativesSchema.mjs +1 -1
- package/src/lib/validation/interfaces/AnySchema.cjs +1 -1
- package/src/lib/validation/interfaces/AnySchema.mjs +1 -1
- package/src/lib/validation/interfaces/ArraySchema.cjs +1 -1
- package/src/lib/validation/interfaces/ArraySchema.mjs +1 -1
- package/src/lib/validation/interfaces/Base64Options.cjs +1 -1
- package/src/lib/validation/interfaces/Base64Options.mjs +1 -1
- package/src/lib/validation/interfaces/BaseValidationOptions.cjs +1 -1
- package/src/lib/validation/interfaces/BaseValidationOptions.mjs +1 -1
- package/src/lib/validation/interfaces/BigIntSchema.cjs +1 -1
- package/src/lib/validation/interfaces/BigIntSchema.mjs +1 -1
- package/src/lib/validation/interfaces/BinarySchema.cjs +1 -1
- package/src/lib/validation/interfaces/BinarySchema.mjs +1 -1
- package/src/lib/validation/interfaces/BooleanSchema.cjs +1 -1
- package/src/lib/validation/interfaces/BooleanSchema.mjs +1 -1
- package/src/lib/validation/interfaces/CustomHelpers.cjs +1 -1
- package/src/lib/validation/interfaces/CustomHelpers.mjs +1 -1
- package/src/lib/validation/interfaces/DataUriOptions.cjs +1 -1
- package/src/lib/validation/interfaces/DataUriOptions.mjs +1 -1
- package/src/lib/validation/interfaces/DateSchema.cjs +1 -1
- package/src/lib/validation/interfaces/DateSchema.mjs +1 -1
- package/src/lib/validation/interfaces/DependencyOptions.cjs +1 -1
- package/src/lib/validation/interfaces/DependencyOptions.mjs +1 -1
- package/src/lib/validation/interfaces/DomainOptions.cjs +1 -1
- package/src/lib/validation/interfaces/DomainOptions.mjs +1 -1
- package/src/lib/validation/interfaces/EmailOptions.cjs +1 -1
- package/src/lib/validation/interfaces/EmailOptions.mjs +1 -1
- package/src/lib/validation/interfaces/ErrorFormattingOptions.cjs +1 -1
- package/src/lib/validation/interfaces/ErrorFormattingOptions.mjs +1 -1
- package/src/lib/validation/interfaces/ErrorReport.cjs +1 -1
- package/src/lib/validation/interfaces/ErrorReport.mjs +1 -1
- package/src/lib/validation/interfaces/ErrorValidationOptions.cjs +1 -1
- package/src/lib/validation/interfaces/ErrorValidationOptions.mjs +1 -1
- package/src/lib/validation/interfaces/ExtensionFlag.cjs +1 -1
- package/src/lib/validation/interfaces/ExtensionFlag.mjs +1 -1
- package/src/lib/validation/interfaces/ExternalHelpers.cjs +1 -1
- package/src/lib/validation/interfaces/ExternalHelpers.mjs +1 -1
- package/src/lib/validation/interfaces/FunctionSchema.cjs +1 -1
- package/src/lib/validation/interfaces/FunctionSchema.mjs +1 -1
- package/src/lib/validation/interfaces/GuidOptions.cjs +1 -1
- package/src/lib/validation/interfaces/GuidOptions.mjs +1 -1
- package/src/lib/validation/interfaces/HexOptions.cjs +1 -1
- package/src/lib/validation/interfaces/HexOptions.mjs +1 -1
- package/src/lib/validation/interfaces/HierarchySeparatorOptions.cjs +1 -1
- package/src/lib/validation/interfaces/HierarchySeparatorOptions.mjs +1 -1
- package/src/lib/validation/interfaces/IpOptions.cjs +1 -1
- package/src/lib/validation/interfaces/IpOptions.mjs +1 -1
- package/src/lib/validation/interfaces/LanguageMessageTemplate.cjs +1 -1
- package/src/lib/validation/interfaces/LanguageMessageTemplate.mjs +1 -1
- package/src/lib/validation/interfaces/LinkSchema.cjs +1 -1
- package/src/lib/validation/interfaces/LinkSchema.mjs +1 -1
- package/src/lib/validation/interfaces/NumberSchema.cjs +1 -1
- package/src/lib/validation/interfaces/NumberSchema.mjs +1 -1
- package/src/lib/validation/interfaces/ObjectPatternOptions.cjs +1 -1
- package/src/lib/validation/interfaces/ObjectPatternOptions.mjs +1 -1
- package/src/lib/validation/interfaces/ObjectSchema.cjs +1 -1
- package/src/lib/validation/interfaces/ObjectSchema.mjs +1 -1
- package/src/lib/validation/interfaces/Reference.cjs +1 -1
- package/src/lib/validation/interfaces/Reference.mjs +1 -1
- package/src/lib/validation/interfaces/ReferenceOptions.cjs +1 -1
- package/src/lib/validation/interfaces/ReferenceOptions.mjs +1 -1
- package/src/lib/validation/interfaces/RenameOptions.cjs +1 -1
- package/src/lib/validation/interfaces/RenameOptions.mjs +1 -1
- package/src/lib/validation/interfaces/State.cjs +1 -1
- package/src/lib/validation/interfaces/State.mjs +1 -1
- package/src/lib/validation/interfaces/StringRegexOptions.cjs +1 -1
- package/src/lib/validation/interfaces/StringRegexOptions.mjs +1 -1
- package/src/lib/validation/interfaces/StringSchema.cjs +1 -1
- package/src/lib/validation/interfaces/StringSchema.mjs +1 -1
- package/src/lib/validation/interfaces/SwitchCases.cjs +1 -1
- package/src/lib/validation/interfaces/SwitchCases.mjs +1 -1
- package/src/lib/validation/interfaces/SwitchDefault.cjs +1 -1
- package/src/lib/validation/interfaces/SwitchDefault.mjs +1 -1
- package/src/lib/validation/interfaces/SymbolSchema.cjs +1 -1
- package/src/lib/validation/interfaces/SymbolSchema.mjs +1 -1
- package/src/lib/validation/interfaces/TopLevelDomainOptions.cjs +1 -1
- package/src/lib/validation/interfaces/TopLevelDomainOptions.mjs +1 -1
- package/src/lib/validation/interfaces/UriOptions.cjs +1 -1
- package/src/lib/validation/interfaces/UriOptions.mjs +1 -1
- package/src/lib/validation/interfaces/ValidationOptions.cjs +1 -1
- package/src/lib/validation/interfaces/ValidationOptions.mjs +1 -1
- package/src/lib/validation/interfaces/WhenOptions.cjs +1 -1
- package/src/lib/validation/interfaces/WhenOptions.mjs +1 -1
- package/src/lib/validation/interfaces/WhenSchemaOptions.cjs +1 -1
- package/src/lib/validation/interfaces/WhenSchemaOptions.mjs +1 -1
- package/src/lib/validation/types/CustomValidator.cjs +1 -1
- package/src/lib/validation/types/CustomValidator.mjs +1 -1
- package/src/lib/validation/types/ExtensionBoundSchema.cjs +1 -1
- package/src/lib/validation/types/ExtensionBoundSchema.mjs +1 -1
- package/src/lib/validation/types/ExternalValidationFunction.cjs +1 -1
- package/src/lib/validation/types/ExternalValidationFunction.mjs +1 -1
- package/src/lib/validation/types/IsNonPrimitiveSubsetUnion.cjs +1 -1
- package/src/lib/validation/types/IsNonPrimitiveSubsetUnion.mjs +1 -1
- package/src/lib/validation/types/IsPrimitiveSubset.cjs +1 -1
- package/src/lib/validation/types/IsPrimitiveSubset.mjs +1 -1
- package/src/lib/validation/types/IsUnion.cjs +1 -1
- package/src/lib/validation/types/IsUnion.mjs +1 -1
- package/src/lib/validation/types/LanguageMessages.cjs +1 -1
- package/src/lib/validation/types/LanguageMessages.mjs +1 -1
- package/src/lib/validation/types/NoNestedArrays.cjs +1 -1
- package/src/lib/validation/types/NoNestedArrays.mjs +1 -1
- package/src/lib/validation/types/NullableType.cjs +1 -1
- package/src/lib/validation/types/NullableType.mjs +1 -1
- package/src/lib/validation/types/ObjectPropertiesSchema.cjs +1 -1
- package/src/lib/validation/types/ObjectPropertiesSchema.mjs +1 -1
- package/src/lib/validation/types/PartialSchemaMap.cjs +1 -1
- package/src/lib/validation/types/PartialSchemaMap.mjs +1 -1
- package/src/lib/validation/types/PresenceMode.cjs +1 -1
- package/src/lib/validation/types/PresenceMode.mjs +1 -1
- package/src/lib/validation/types/Primitives.cjs +1 -1
- package/src/lib/validation/types/Primitives.mjs +1 -1
- package/src/lib/validation/types/Schema.cjs +1 -1
- package/src/lib/validation/types/Schema.mjs +1 -1
- package/src/lib/validation/types/SchemaFunction.cjs +1 -1
- package/src/lib/validation/types/SchemaFunction.mjs +1 -1
- package/src/lib/validation/types/SchemaLike.cjs +1 -1
- package/src/lib/validation/types/SchemaLike.mjs +1 -1
- package/src/lib/validation/types/SchemaLikeWithoutArray.cjs +1 -1
- package/src/lib/validation/types/SchemaLikeWithoutArray.mjs +1 -1
- package/src/lib/validation/types/SchemaMap.cjs +1 -1
- package/src/lib/validation/types/SchemaMap.mjs +1 -1
- package/src/lib/validation/types/StrictSchemaMap.cjs +1 -1
- package/src/lib/validation/types/StrictSchemaMap.mjs +1 -1
- package/src/lib/validation/types/Types.cjs +1 -1
- package/src/lib/validation/types/Types.mjs +1 -1
- package/src/lib/validation/types/UnwrapSchemaLikeWithoutArray.cjs +1 -1
- package/src/lib/validation/types/UnwrapSchemaLikeWithoutArray.mjs +1 -1
- package/src/options/ApplicationOptions.cjs +22 -84
- package/src/options/ApplicationOptions.mjs +25 -87
- package/src/options/LoadAnonymousObjectOptions.cjs +20 -82
- package/src/options/LoadAnonymousObjectOptions.mjs +22 -84
- package/src/options/LoadNamedObjectOptions.cjs +20 -82
- package/src/options/LoadNamedObjectOptions.mjs +22 -84
- package/src/options/LoadObjectOptions.cjs +23 -96
- package/src/options/LoadObjectOptions.mjs +18 -98
- package/src/options/ModuleLoadObjectsOptions.cjs +20 -82
- package/src/options/ModuleLoadObjectsOptions.mjs +20 -82
- package/src/options/ModuleOptions.cjs +26 -88
- package/src/options/ModuleOptions.mjs +25 -87
- package/src/options/OverridableNamedObjectOptions.cjs +20 -82
- package/src/options/OverridableNamedObjectOptions.mjs +23 -85
- package/src/options/OverridableObjectOptions.cjs +20 -82
- package/src/options/OverridableObjectOptions.mjs +22 -84
- package/src/providers/Database.cjs +41 -181
- package/src/providers/Database.mjs +74 -214
- package/src/providers/PasswordHash.cjs +541 -89
- package/src/providers/PasswordHash.mjs +535 -89
- package/src/providers/migration/GenerateMigration.cjs +37 -389
- package/src/providers/migration/GenerateMigration.mjs +33 -386
- package/src/types/ActionPattern.cjs +1 -1
- package/src/types/ActionPattern.mjs +1 -1
- package/src/types/ClassDecorator.cjs +1 -1
- package/src/types/ClassDecorator.mjs +1 -1
- package/src/types/ComponentOptions.cjs +1 -1
- package/src/types/ComponentOptions.mjs +1 -1
- package/src/types/JSONSchema.cjs +1 -1
- package/src/types/JSONSchema.mjs +1 -1
- package/src/types/MethodDecorator.cjs +1 -1
- package/src/types/MethodDecorator.mjs +1 -1
- package/src/types/ModuleOptions.cjs +1 -1
- package/src/types/ModuleOptions.mjs +1 -1
- package/src/types/ObjectOptions.cjs +1 -1
- package/src/types/ObjectOptions.mjs +1 -1
- package/src/types/ParameterDecorator.cjs +1 -1
- package/src/types/ParameterDecorator.mjs +1 -1
- package/src/types/PropertyDecorator.cjs +1 -1
- package/src/types/PropertyDecorator.mjs +1 -1
- package/src/types/ProviderOptions.cjs +1 -1
- package/src/types/ProviderOptions.mjs +1 -1
- package/vendor/Package.internal.1.cjs +938 -206
- package/vendor/Package.internal.1.mjs +938 -202
- package/vendor/Package.internal.10.cjs +17 -227
- package/vendor/Package.internal.10.mjs +18 -226
- package/vendor/Package.internal.11.cjs +15 -1610
- package/vendor/Package.internal.11.mjs +16 -1579
- package/vendor/Package.internal.12.cjs +22 -357
- package/vendor/Package.internal.12.mjs +23 -358
- package/vendor/Package.internal.13.cjs +17 -786
- package/vendor/Package.internal.13.mjs +18 -787
- package/vendor/Package.internal.14.cjs +13 -977
- package/vendor/Package.internal.14.mjs +14 -966
- package/vendor/Package.internal.15.cjs +19 -43
- package/vendor/Package.internal.15.mjs +20 -44
- package/vendor/Package.internal.16.cjs +16 -262
- package/vendor/Package.internal.16.mjs +17 -263
- package/vendor/Package.internal.17.cjs +16 -428
- package/vendor/Package.internal.17.mjs +17 -429
- package/vendor/Package.internal.18.cjs +15 -556
- package/vendor/Package.internal.18.mjs +16 -551
- package/vendor/Package.internal.19.cjs +16 -218
- package/vendor/Package.internal.19.mjs +19 -221
- package/vendor/Package.internal.2.cjs +29 -86
- package/vendor/Package.internal.2.mjs +30 -83
- package/vendor/Package.internal.20.cjs +19 -989
- package/vendor/Package.internal.20.mjs +20 -990
- package/vendor/Package.internal.21.cjs +26 -9
- package/vendor/Package.internal.21.mjs +27 -8
- package/vendor/Package.internal.22.cjs +53 -120
- package/vendor/Package.internal.22.mjs +54 -119
- package/vendor/Package.internal.23.cjs +15 -140
- package/vendor/Package.internal.23.mjs +16 -139
- package/vendor/Package.internal.24.cjs +22 -5
- package/vendor/Package.internal.24.mjs +23 -4
- package/vendor/Package.internal.25.cjs +30 -19
- package/vendor/Package.internal.25.mjs +31 -18
- package/vendor/Package.internal.26.cjs +13 -472
- package/vendor/Package.internal.26.mjs +14 -467
- package/vendor/Package.internal.27.cjs +19 -73
- package/vendor/Package.internal.27.mjs +19 -67
- package/vendor/Package.internal.28.cjs +22 -2
- package/vendor/Package.internal.28.mjs +24 -2
- package/vendor/Package.internal.29.cjs +35 -37
- package/vendor/Package.internal.29.mjs +36 -36
- package/vendor/Package.internal.3.cjs +532 -14232
- package/vendor/Package.internal.3.mjs +529 -14211
- package/vendor/Package.internal.30.cjs +21 -21
- package/vendor/Package.internal.30.mjs +22 -20
- package/vendor/Package.internal.31.cjs +25 -10
- package/vendor/Package.internal.31.mjs +26 -9
- package/vendor/Package.internal.310.cjs +10 -0
- package/vendor/Package.internal.310.mjs +8 -0
- package/vendor/Package.internal.32.cjs +39 -188
- package/vendor/Package.internal.32.mjs +42 -191
- package/vendor/Package.internal.33.cjs +35 -58
- package/vendor/Package.internal.33.mjs +36 -57
- package/vendor/Package.internal.34.cjs +20 -161
- package/vendor/Package.internal.34.mjs +26 -167
- package/vendor/Package.internal.35.cjs +32 -2075
- package/vendor/Package.internal.35.mjs +28 -2065
- package/vendor/Package.internal.36.cjs +30 -510
- package/vendor/Package.internal.36.mjs +31 -503
- package/vendor/Package.internal.37.cjs +36 -408
- package/vendor/Package.internal.37.mjs +37 -403
- package/vendor/Package.internal.38.cjs +37 -2349
- package/vendor/Package.internal.38.mjs +38 -2338
- package/vendor/Package.internal.39.cjs +18 -56
- package/vendor/Package.internal.39.mjs +19 -63
- package/vendor/Package.internal.4.cjs +463 -961
- package/vendor/Package.internal.4.mjs +444 -960
- package/vendor/Package.internal.40.cjs +20 -146
- package/vendor/Package.internal.40.mjs +21 -145
- package/vendor/Package.internal.41.cjs +15 -630
- package/vendor/Package.internal.41.mjs +16 -631
- package/vendor/Package.internal.42.cjs +22 -238
- package/vendor/Package.internal.42.mjs +28 -244
- package/vendor/Package.internal.43.cjs +16 -220
- package/vendor/Package.internal.43.mjs +17 -215
- package/vendor/Package.internal.44.cjs +29 -2
- package/vendor/Package.internal.44.mjs +31 -2
- package/vendor/Package.internal.45.cjs +32 -353
- package/vendor/Package.internal.45.mjs +35 -350
- package/vendor/Package.internal.46.cjs +17 -34
- package/vendor/Package.internal.46.mjs +18 -33
- package/vendor/Package.internal.47.cjs +16 -49
- package/vendor/Package.internal.47.mjs +17 -48
- package/vendor/Package.internal.48.cjs +20 -20
- package/vendor/Package.internal.48.mjs +21 -19
- package/vendor/Package.internal.49.cjs +24 -88
- package/vendor/Package.internal.49.mjs +31 -87
- package/vendor/Package.internal.5.cjs +4275 -340
- package/vendor/Package.internal.5.mjs +4274 -341
- package/vendor/Package.internal.50.cjs +34 -80
- package/vendor/Package.internal.50.mjs +35 -79
- package/vendor/Package.internal.51.cjs +48306 -57
- package/vendor/Package.internal.51.mjs +48272 -51
- package/vendor/Package.internal.510.cjs +154 -0
- package/vendor/Package.internal.510.mjs +142 -0
- package/vendor/Package.internal.511.cjs +168 -0
- package/vendor/Package.internal.511.mjs +156 -0
- package/vendor/Package.internal.512.cjs +6 -0
- package/vendor/Package.internal.512.mjs +6 -0
- package/vendor/Package.internal.513.cjs +192 -0
- package/vendor/Package.internal.513.mjs +180 -0
- package/vendor/Package.internal.52.cjs +675 -18
- package/vendor/Package.internal.52.mjs +670 -17
- package/vendor/{Package.internal.176.cjs → Package.internal.522.cjs} +1 -1
- package/vendor/{Package.internal.176.mjs → Package.internal.522.mjs} +2 -2
- package/vendor/Package.internal.53.cjs +7095 -321
- package/vendor/Package.internal.53.mjs +7063 -319
- package/vendor/Package.internal.54.cjs +192 -2
- package/vendor/Package.internal.54.mjs +192 -2
- package/vendor/Package.internal.542.cjs +171 -0
- package/vendor/Package.internal.542.mjs +153 -0
- package/vendor/Package.internal.55.cjs +3945 -127
- package/vendor/Package.internal.55.mjs +3958 -126
- package/vendor/Package.internal.552.cjs +49615 -0
- package/vendor/Package.internal.552.mjs +49572 -0
- package/vendor/Package.internal.56.cjs +837 -18
- package/vendor/Package.internal.56.mjs +838 -19
- package/vendor/Package.internal.57.cjs +14793 -2
- package/vendor/Package.internal.57.mjs +14768 -2
- package/vendor/Package.internal.58.cjs +113 -175
- package/vendor/Package.internal.58.mjs +110 -184
- package/vendor/Package.internal.59.cjs +307 -3990
- package/vendor/Package.internal.59.mjs +307 -4008
- package/vendor/Package.internal.6.cjs +4 -6109
- package/vendor/Package.internal.6.mjs +4 -6103
- package/vendor/Package.internal.7.cjs +6543 -494
- package/vendor/Package.internal.7.mjs +6531 -494
- package/vendor/Package.internal.8.cjs +152 -33
- package/vendor/Package.internal.8.mjs +152 -31
- package/vendor/Package.internal.9.cjs +16 -2160
- package/vendor/Package.internal.9.mjs +17 -2133
- package/vendor/Package.internal.100.cjs +0 -4
- package/vendor/Package.internal.100.mjs +0 -2
- package/vendor/Package.internal.101.cjs +0 -112
- package/vendor/Package.internal.101.mjs +0 -98
- package/vendor/Package.internal.102.cjs +0 -88
- package/vendor/Package.internal.102.mjs +0 -84
- package/vendor/Package.internal.103.cjs +0 -58
- package/vendor/Package.internal.103.mjs +0 -52
- package/vendor/Package.internal.104.cjs +0 -20
- package/vendor/Package.internal.104.mjs +0 -18
- package/vendor/Package.internal.105.cjs +0 -96
- package/vendor/Package.internal.105.mjs +0 -96
- package/vendor/Package.internal.106.cjs +0 -113
- package/vendor/Package.internal.106.mjs +0 -113
- package/vendor/Package.internal.107.cjs +0 -2176
- package/vendor/Package.internal.107.mjs +0 -2174
- package/vendor/Package.internal.108.cjs +0 -2466
- package/vendor/Package.internal.108.mjs +0 -2434
- package/vendor/Package.internal.109.cjs +0 -1306
- package/vendor/Package.internal.109.mjs +0 -1292
- package/vendor/Package.internal.110.cjs +0 -33
- package/vendor/Package.internal.110.mjs +0 -31
- package/vendor/Package.internal.111.cjs +0 -20
- package/vendor/Package.internal.111.mjs +0 -18
- package/vendor/Package.internal.112.cjs +0 -21
- package/vendor/Package.internal.112.mjs +0 -21
- package/vendor/Package.internal.113.cjs +0 -52
- package/vendor/Package.internal.113.mjs +0 -52
- package/vendor/Package.internal.114.cjs +0 -141
- package/vendor/Package.internal.114.mjs +0 -141
- package/vendor/Package.internal.115.cjs +0 -2
- package/vendor/Package.internal.115.mjs +0 -1
- package/vendor/Package.internal.116.cjs +0 -6
- package/vendor/Package.internal.116.mjs +0 -4
- package/vendor/Package.internal.117.cjs +0 -4
- package/vendor/Package.internal.117.mjs +0 -2
- package/vendor/Package.internal.118.cjs +0 -4
- package/vendor/Package.internal.118.mjs +0 -2
- package/vendor/Package.internal.119.cjs +0 -4
- package/vendor/Package.internal.119.mjs +0 -2
- package/vendor/Package.internal.120.cjs +0 -49
- package/vendor/Package.internal.120.mjs +0 -47
- package/vendor/Package.internal.121.cjs +0 -14
- package/vendor/Package.internal.121.mjs +0 -14
- package/vendor/Package.internal.122.cjs +0 -12
- package/vendor/Package.internal.122.mjs +0 -12
- package/vendor/Package.internal.123.cjs +0 -20
- package/vendor/Package.internal.123.mjs +0 -18
- package/vendor/Package.internal.124.cjs +0 -118
- package/vendor/Package.internal.124.mjs +0 -116
- package/vendor/Package.internal.125.cjs +0 -18
- package/vendor/Package.internal.125.mjs +0 -16
- package/vendor/Package.internal.126.cjs +0 -19
- package/vendor/Package.internal.126.mjs +0 -17
- package/vendor/Package.internal.127.cjs +0 -8876
- package/vendor/Package.internal.127.mjs +0 -8874
- package/vendor/Package.internal.128.cjs +0 -899
- package/vendor/Package.internal.128.mjs +0 -897
- package/vendor/Package.internal.129.cjs +0 -6769
- package/vendor/Package.internal.129.mjs +0 -6775
- package/vendor/Package.internal.130.cjs +0 -473
- package/vendor/Package.internal.130.mjs +0 -459
- package/vendor/Package.internal.131.cjs +0 -617
- package/vendor/Package.internal.131.mjs +0 -611
- package/vendor/Package.internal.132.cjs +0 -97
- package/vendor/Package.internal.132.mjs +0 -89
- package/vendor/Package.internal.133.cjs +0 -4
- package/vendor/Package.internal.133.mjs +0 -2
- package/vendor/Package.internal.134.cjs +0 -3753
- package/vendor/Package.internal.134.mjs +0 -3751
- package/vendor/Package.internal.135.cjs +0 -561
- package/vendor/Package.internal.135.mjs +0 -559
- package/vendor/Package.internal.136.cjs +0 -4
- package/vendor/Package.internal.136.mjs +0 -2
- package/vendor/Package.internal.137.cjs +0 -4
- package/vendor/Package.internal.137.mjs +0 -2
- package/vendor/Package.internal.138.cjs +0 -4
- package/vendor/Package.internal.138.mjs +0 -2
- package/vendor/Package.internal.139.cjs +0 -4
- package/vendor/Package.internal.139.mjs +0 -2
- package/vendor/Package.internal.140.cjs +0 -4
- package/vendor/Package.internal.140.mjs +0 -2
- package/vendor/Package.internal.141.cjs +0 -4
- package/vendor/Package.internal.141.mjs +0 -2
- package/vendor/Package.internal.142.cjs +0 -4
- package/vendor/Package.internal.142.mjs +0 -2
- package/vendor/Package.internal.143.cjs +0 -4
- package/vendor/Package.internal.143.mjs +0 -2
- package/vendor/Package.internal.144.cjs +0 -4
- package/vendor/Package.internal.144.mjs +0 -2
- package/vendor/Package.internal.145.cjs +0 -4
- package/vendor/Package.internal.145.mjs +0 -2
- package/vendor/Package.internal.146.cjs +0 -4
- package/vendor/Package.internal.146.mjs +0 -2
- package/vendor/Package.internal.147.cjs +0 -408
- package/vendor/Package.internal.147.mjs +0 -400
- package/vendor/Package.internal.148.cjs +0 -104
- package/vendor/Package.internal.148.mjs +0 -104
- package/vendor/Package.internal.149.cjs +0 -27
- package/vendor/Package.internal.149.mjs +0 -27
- package/vendor/Package.internal.150.cjs +0 -4
- package/vendor/Package.internal.150.mjs +0 -2
- package/vendor/Package.internal.151.cjs +0 -4
- package/vendor/Package.internal.151.mjs +0 -2
- package/vendor/Package.internal.152.cjs +0 -723
- package/vendor/Package.internal.152.mjs +0 -723
- package/vendor/Package.internal.153.cjs +0 -1548
- package/vendor/Package.internal.153.mjs +0 -1540
- package/vendor/Package.internal.154.cjs +0 -364
- package/vendor/Package.internal.154.mjs +0 -364
- package/vendor/Package.internal.155.cjs +0 -107
- package/vendor/Package.internal.155.mjs +0 -107
- package/vendor/Package.internal.156.cjs +0 -636
- package/vendor/Package.internal.156.mjs +0 -622
- package/vendor/Package.internal.157.cjs +0 -543
- package/vendor/Package.internal.157.mjs +0 -533
- package/vendor/Package.internal.158.cjs +0 -605
- package/vendor/Package.internal.158.mjs +0 -605
- package/vendor/Package.internal.159.cjs +0 -139
- package/vendor/Package.internal.159.mjs +0 -131
- package/vendor/Package.internal.160.cjs +0 -119
- package/vendor/Package.internal.160.mjs +0 -111
- package/vendor/Package.internal.161.cjs +0 -1224
- package/vendor/Package.internal.161.mjs +0 -1214
- package/vendor/Package.internal.162.cjs +0 -90
- package/vendor/Package.internal.162.mjs +0 -98
- package/vendor/Package.internal.163.cjs +0 -4
- package/vendor/Package.internal.163.mjs +0 -2
- package/vendor/Package.internal.164.cjs +0 -4
- package/vendor/Package.internal.164.mjs +0 -2
- package/vendor/Package.internal.165.cjs +0 -55
- package/vendor/Package.internal.165.mjs +0 -55
- package/vendor/Package.internal.166.cjs +0 -10
- package/vendor/Package.internal.166.mjs +0 -10
- package/vendor/Package.internal.167.cjs +0 -12
- package/vendor/Package.internal.167.mjs +0 -6
- package/vendor/Package.internal.168.cjs +0 -165
- package/vendor/Package.internal.168.mjs +0 -163
- package/vendor/Package.internal.169.cjs +0 -23
- package/vendor/Package.internal.169.mjs +0 -15
- package/vendor/Package.internal.170.cjs +0 -251
- package/vendor/Package.internal.170.mjs +0 -249
- package/vendor/Package.internal.171.cjs +0 -949
- package/vendor/Package.internal.171.mjs +0 -947
- package/vendor/Package.internal.172.cjs +0 -27
- package/vendor/Package.internal.172.mjs +0 -27
- package/vendor/Package.internal.173.cjs +0 -80
- package/vendor/Package.internal.173.mjs +0 -72
- package/vendor/Package.internal.174.cjs +0 -655
- package/vendor/Package.internal.174.mjs +0 -653
- package/vendor/Package.internal.175.cjs +0 -77
- package/vendor/Package.internal.175.mjs +0 -75
- package/vendor/Package.internal.177.cjs +0 -70
- package/vendor/Package.internal.177.mjs +0 -68
- package/vendor/Package.internal.178.cjs +0 -112
- package/vendor/Package.internal.178.mjs +0 -110
- package/vendor/Package.internal.179.cjs +0 -102
- package/vendor/Package.internal.179.mjs +0 -100
- package/vendor/Package.internal.180.cjs +0 -45450
- package/vendor/Package.internal.180.mjs +0 -45432
- package/vendor/Package.internal.181.cjs +0 -8
- package/vendor/Package.internal.181.mjs +0 -6
- package/vendor/Package.internal.182.cjs +0 -30
- package/vendor/Package.internal.182.mjs +0 -28
- package/vendor/Package.internal.183.cjs +0 -317
- package/vendor/Package.internal.183.mjs +0 -315
- package/vendor/Package.internal.184.cjs +0 -943
- package/vendor/Package.internal.184.mjs +0 -951
- package/vendor/Package.internal.185.cjs +0 -1090
- package/vendor/Package.internal.185.mjs +0 -1090
- package/vendor/Package.internal.186.cjs +0 -165
- package/vendor/Package.internal.186.mjs +0 -165
- package/vendor/Package.internal.187.cjs +0 -15
- package/vendor/Package.internal.187.mjs +0 -13
- package/vendor/Package.internal.188.cjs +0 -14
- package/vendor/Package.internal.188.mjs +0 -12
- package/vendor/Package.internal.189.cjs +0 -49
- package/vendor/Package.internal.189.mjs +0 -47
- package/vendor/Package.internal.190.cjs +0 -493
- package/vendor/Package.internal.190.mjs +0 -471
- package/vendor/Package.internal.191.cjs +0 -4
- package/vendor/Package.internal.191.mjs +0 -2
- package/vendor/Package.internal.192.cjs +0 -4
- package/vendor/Package.internal.192.mjs +0 -2
- package/vendor/Package.internal.193.cjs +0 -4
- package/vendor/Package.internal.193.mjs +0 -2
- package/vendor/Package.internal.194.cjs +0 -4
- package/vendor/Package.internal.194.mjs +0 -2
- package/vendor/Package.internal.195.cjs +0 -4
- package/vendor/Package.internal.195.mjs +0 -2
- package/vendor/Package.internal.196.cjs +0 -4
- package/vendor/Package.internal.196.mjs +0 -2
- package/vendor/Package.internal.197.cjs +0 -4
- package/vendor/Package.internal.197.mjs +0 -2
- package/vendor/Package.internal.198.cjs +0 -4
- package/vendor/Package.internal.198.mjs +0 -2
- package/vendor/Package.internal.60.cjs +0 -4
- package/vendor/Package.internal.60.mjs +0 -2
- package/vendor/Package.internal.61.cjs +0 -321
- package/vendor/Package.internal.61.mjs +0 -321
- package/vendor/Package.internal.62.cjs +0 -365
- package/vendor/Package.internal.62.mjs +0 -363
- package/vendor/Package.internal.63.cjs +0 -403
- package/vendor/Package.internal.63.mjs +0 -395
- package/vendor/Package.internal.64.cjs +0 -127
- package/vendor/Package.internal.64.mjs +0 -125
- package/vendor/Package.internal.65.cjs +0 -31
- package/vendor/Package.internal.65.mjs +0 -29
- package/vendor/Package.internal.66.cjs +0 -87
- package/vendor/Package.internal.66.mjs +0 -85
- package/vendor/Package.internal.67.cjs +0 -61
- package/vendor/Package.internal.67.mjs +0 -59
- package/vendor/Package.internal.68.cjs +0 -34
- package/vendor/Package.internal.68.mjs +0 -32
- package/vendor/Package.internal.69.cjs +0 -4
- package/vendor/Package.internal.69.mjs +0 -2
- package/vendor/Package.internal.70.cjs +0 -684
- package/vendor/Package.internal.70.mjs +0 -662
- package/vendor/Package.internal.71.cjs +0 -13896
- package/vendor/Package.internal.71.mjs +0 -13870
- package/vendor/Package.internal.72.cjs +0 -37
- package/vendor/Package.internal.72.mjs +0 -31
- package/vendor/Package.internal.73.cjs +0 -4077
- package/vendor/Package.internal.73.mjs +0 -4077
- package/vendor/Package.internal.74.cjs +0 -1664
- package/vendor/Package.internal.74.mjs +0 -1664
- package/vendor/Package.internal.75.cjs +0 -259
- package/vendor/Package.internal.75.mjs +0 -257
- package/vendor/Package.internal.76.cjs +0 -4964
- package/vendor/Package.internal.76.mjs +0 -4948
- package/vendor/Package.internal.77.cjs +0 -1239
- package/vendor/Package.internal.77.mjs +0 -1225
- package/vendor/Package.internal.78.cjs +0 -340
- package/vendor/Package.internal.78.mjs +0 -326
- package/vendor/Package.internal.79.cjs +0 -34
- package/vendor/Package.internal.79.mjs +0 -32
- package/vendor/Package.internal.80.cjs +0 -88
- package/vendor/Package.internal.80.mjs +0 -88
- package/vendor/Package.internal.81.cjs +0 -55
- package/vendor/Package.internal.81.mjs +0 -55
- package/vendor/Package.internal.82.cjs +0 -15
- package/vendor/Package.internal.82.mjs +0 -13
- package/vendor/Package.internal.83.cjs +0 -1355
- package/vendor/Package.internal.83.mjs +0 -1355
- package/vendor/Package.internal.84.cjs +0 -12
- package/vendor/Package.internal.84.mjs +0 -6
- package/vendor/Package.internal.85.cjs +0 -4
- package/vendor/Package.internal.85.mjs +0 -2
- package/vendor/Package.internal.86.cjs +0 -351
- package/vendor/Package.internal.86.mjs +0 -351
- package/vendor/Package.internal.87.cjs +0 -80
- package/vendor/Package.internal.87.mjs +0 -80
- package/vendor/Package.internal.88.cjs +0 -1445
- package/vendor/Package.internal.88.mjs +0 -1433
- package/vendor/Package.internal.89.cjs +0 -144
- package/vendor/Package.internal.89.mjs +0 -142
- package/vendor/Package.internal.90.cjs +0 -1822
- package/vendor/Package.internal.90.mjs +0 -1814
- package/vendor/Package.internal.91.cjs +0 -130
- package/vendor/Package.internal.91.mjs +0 -124
- package/vendor/Package.internal.92.cjs +0 -208
- package/vendor/Package.internal.92.mjs +0 -208
- package/vendor/Package.internal.93.cjs +0 -1641
- package/vendor/Package.internal.93.mjs +0 -1641
- package/vendor/Package.internal.94.cjs +0 -74
- package/vendor/Package.internal.94.mjs +0 -74
- package/vendor/Package.internal.95.cjs +0 -28
- package/vendor/Package.internal.95.mjs +0 -28
- package/vendor/Package.internal.96.cjs +0 -69
- package/vendor/Package.internal.96.mjs +0 -67
- package/vendor/Package.internal.97.cjs +0 -123
- package/vendor/Package.internal.97.mjs +0 -121
- package/vendor/Package.internal.98.cjs +0 -16
- package/vendor/Package.internal.98.mjs +0 -8
- package/vendor/Package.internal.99.cjs +0 -4
- package/vendor/Package.internal.99.mjs +0 -2
|
@@ -1,1621 +1,26 @@
|
|
|
1
|
-
/* Build Date: Mon Nov 24 2025
|
|
1
|
+
/* Build Date: Mon Nov 24 2025 18:10:51 GMT+0800 (China Standard Time) */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const e = require("./Package.internal.51.cjs");
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
var t = {};
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const i = require("./Package.internal.13.cjs");
|
|
11
|
-
|
|
12
|
-
const r = require("cluster-key-slot");
|
|
13
|
-
|
|
14
|
-
const n = require("events");
|
|
15
|
-
|
|
16
|
-
const a = require("memjs");
|
|
17
|
-
|
|
18
|
-
const o = require("mongodb");
|
|
19
|
-
|
|
20
|
-
const c = require("util");
|
|
21
|
-
|
|
22
|
-
const l = require("sqlite3");
|
|
23
|
-
|
|
24
|
-
const u = require("pg");
|
|
25
|
-
|
|
26
|
-
const h = require("mysql2");
|
|
27
|
-
|
|
28
|
-
const f = t => t && t.__esModule ? t : {
|
|
29
|
-
default: t
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const y = f(t);
|
|
33
|
-
|
|
34
|
-
const p = f(r);
|
|
35
|
-
|
|
36
|
-
const d = f(n);
|
|
37
|
-
|
|
38
|
-
const m = f(a);
|
|
39
|
-
|
|
40
|
-
const E = f(l);
|
|
41
|
-
|
|
42
|
-
const w = f(u);
|
|
43
|
-
|
|
44
|
-
const S = f(h);
|
|
45
|
-
|
|
46
|
-
var v = (e, s = true) => {
|
|
47
|
-
if (e === void 0 || e === null) {
|
|
48
|
-
return "null";
|
|
49
|
-
}
|
|
50
|
-
if (typeof e === "string") {
|
|
51
|
-
return JSON.stringify(s && e.startsWith(":") ? `:${e}` : e);
|
|
52
|
-
}
|
|
53
|
-
if (t.Buffer.isBuffer(e)) {
|
|
54
|
-
return JSON.stringify(`:base64:${e.toString("base64")}`);
|
|
55
|
-
}
|
|
56
|
-
if (e?.toJSON) {
|
|
57
|
-
e = e.toJSON();
|
|
58
|
-
}
|
|
59
|
-
if (typeof e === "object") {
|
|
60
|
-
let t = "";
|
|
61
|
-
const i = Array.isArray(e);
|
|
62
|
-
t = i ? "[" : "{";
|
|
63
|
-
let r = true;
|
|
64
|
-
for (const n in e) {
|
|
65
|
-
const a = typeof e[n] === "function" || !i && e[n] === void 0;
|
|
66
|
-
if (!Object.hasOwn(e, n) || a) {
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
if (!r) {
|
|
70
|
-
t += ",";
|
|
71
|
-
}
|
|
72
|
-
r = false;
|
|
73
|
-
if (i) {
|
|
74
|
-
t += v(e[n], s);
|
|
75
|
-
} else if (e[n] !== void 0) {
|
|
76
|
-
t += `${v(n, false)}:${v(e[n], s)}`;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
t += i ? "]" : "}";
|
|
80
|
-
return t;
|
|
81
|
-
}
|
|
82
|
-
return JSON.stringify(e);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
exports.defaultSerialize = t => v(t, true);
|
|
86
|
-
|
|
87
|
-
exports.defaultDeserialize = e => JSON.parse(e, (e, s) => {
|
|
88
|
-
if (typeof s === "string") {
|
|
89
|
-
if (s.startsWith(":base64:")) {
|
|
90
|
-
return t.Buffer.from(s.slice(8), "base64");
|
|
91
|
-
}
|
|
92
|
-
return s.startsWith(":") ? s.slice(1) : s;
|
|
93
|
-
}
|
|
94
|
-
return s;
|
|
8
|
+
Object.defineProperty(t, "__esModule", {
|
|
9
|
+
value: true
|
|
95
10
|
});
|
|
96
11
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
var b;
|
|
100
|
-
|
|
101
|
-
function _() {
|
|
102
|
-
if (b) return g;
|
|
103
|
-
b = 1;
|
|
104
|
-
var t = Object.defineProperty;
|
|
105
|
-
var e = Object.getOwnPropertyDescriptor;
|
|
106
|
-
var s = Object.getOwnPropertyNames;
|
|
107
|
-
var i = Object.prototype.hasOwnProperty;
|
|
108
|
-
var r = (e, s) => {
|
|
109
|
-
for (var i in s) t(e, i, {
|
|
110
|
-
get: s[i],
|
|
111
|
-
enumerable: true
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
var n = (r, n, a, o) => {
|
|
115
|
-
if (n && typeof n === "object" || typeof n === "function") {
|
|
116
|
-
for (let c of s(n)) if (!i.call(r, c) && c !== a) t(r, c, {
|
|
117
|
-
get: () => n[c],
|
|
118
|
-
enumerable: !(o = e(n, c)) || o.enumerable
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
return r;
|
|
122
|
-
};
|
|
123
|
-
var a = e => n(t({}, "__esModule", {
|
|
124
|
-
value: true
|
|
125
|
-
}), e);
|
|
126
|
-
var o = {};
|
|
127
|
-
r(o, {
|
|
128
|
-
defaultDeserialize: () => h,
|
|
129
|
-
defaultSerialize: () => u
|
|
130
|
-
});
|
|
131
|
-
g = a(o);
|
|
132
|
-
var c = y.default;
|
|
133
|
-
var l = (t, e = true) => {
|
|
134
|
-
if (t === void 0 || t === null) {
|
|
135
|
-
return "null";
|
|
136
|
-
}
|
|
137
|
-
if (typeof t === "string") {
|
|
138
|
-
return JSON.stringify(e && t.startsWith(":") ? `:${t}` : t);
|
|
139
|
-
}
|
|
140
|
-
if (c.Buffer.isBuffer(t)) {
|
|
141
|
-
return JSON.stringify(`:base64:${t.toString("base64")}`);
|
|
142
|
-
}
|
|
143
|
-
if (t?.toJSON) {
|
|
144
|
-
t = t.toJSON();
|
|
145
|
-
}
|
|
146
|
-
if (typeof t === "object") {
|
|
147
|
-
let s = "";
|
|
148
|
-
const i = Array.isArray(t);
|
|
149
|
-
s = i ? "[" : "{";
|
|
150
|
-
let r = true;
|
|
151
|
-
for (const n in t) {
|
|
152
|
-
const a = typeof t[n] === "function" || !i && t[n] === void 0;
|
|
153
|
-
if (!Object.hasOwn(t, n) || a) {
|
|
154
|
-
continue;
|
|
155
|
-
}
|
|
156
|
-
if (!r) {
|
|
157
|
-
s += ",";
|
|
158
|
-
}
|
|
159
|
-
r = false;
|
|
160
|
-
if (i) {
|
|
161
|
-
s += l(t[n], e);
|
|
162
|
-
} else if (t[n] !== void 0) {
|
|
163
|
-
s += `${l(n, false)}:${l(t[n], e)}`;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
s += i ? "]" : "}";
|
|
167
|
-
return s;
|
|
168
|
-
}
|
|
169
|
-
return JSON.stringify(t);
|
|
170
|
-
};
|
|
171
|
-
var u = t => l(t, true);
|
|
172
|
-
var h = t => JSON.parse(t, (t, e) => {
|
|
173
|
-
if (typeof e === "string") {
|
|
174
|
-
if (e.startsWith(":base64:")) {
|
|
175
|
-
return c.Buffer.from(e.slice(8), "base64");
|
|
176
|
-
}
|
|
177
|
-
return e.startsWith(":") ? e.slice(1) : e;
|
|
178
|
-
}
|
|
179
|
-
return e;
|
|
180
|
-
});
|
|
181
|
-
return g;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
var O = t => {
|
|
185
|
-
const e = Math.min(2 ** t * 100, 2e3);
|
|
186
|
-
const s = (Math.random() - .5) * 100;
|
|
187
|
-
return e + s;
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
var T = class extends s.Hookified {
|
|
191
|
-
_client=e.createClient();
|
|
192
|
-
_namespace;
|
|
193
|
-
_keyPrefixSeparator="::";
|
|
194
|
-
_clearBatchSize=1e3;
|
|
195
|
-
_useUnlink=true;
|
|
196
|
-
_noNamespaceAffectsAll=false;
|
|
197
|
-
_throwOnConnectError=true;
|
|
198
|
-
_throwErrors=false;
|
|
199
|
-
_connectionTimeout;
|
|
200
|
-
constructor(t, s) {
|
|
201
|
-
super();
|
|
202
|
-
const i = {
|
|
203
|
-
reconnectStrategy: O
|
|
204
|
-
};
|
|
205
|
-
if (t) {
|
|
206
|
-
if (typeof t === "string") {
|
|
207
|
-
this._client = e.createClient({
|
|
208
|
-
url: t,
|
|
209
|
-
socket: i
|
|
210
|
-
});
|
|
211
|
-
} else if (t.connect !== void 0) {
|
|
212
|
-
this._client = this.isClientCluster(t) ? t : t;
|
|
213
|
-
} else if (t instanceof Object) {
|
|
214
|
-
this._client = t.rootNodes === void 0 ? e.createClient(t) : e.createCluster(t);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
this.setOptions(s);
|
|
218
|
-
this.initClient();
|
|
219
|
-
}
|
|
220
|
-
get client() {
|
|
221
|
-
return this._client;
|
|
222
|
-
}
|
|
223
|
-
set client(t) {
|
|
224
|
-
this._client = t;
|
|
225
|
-
this.initClient();
|
|
226
|
-
}
|
|
227
|
-
get opts() {
|
|
228
|
-
let t = "redis://localhost:6379";
|
|
229
|
-
if (this._client.options) {
|
|
230
|
-
const e = this._client.options?.url;
|
|
231
|
-
if (e) {
|
|
232
|
-
t = e;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
const e = {
|
|
236
|
-
namespace: this._namespace,
|
|
237
|
-
keyPrefixSeparator: this._keyPrefixSeparator,
|
|
238
|
-
clearBatchSize: this._clearBatchSize,
|
|
239
|
-
noNamespaceAffectsAll: this._noNamespaceAffectsAll,
|
|
240
|
-
useUnlink: this._useUnlink,
|
|
241
|
-
throwOnConnectError: this._throwOnConnectError,
|
|
242
|
-
throwErrors: this._throwErrors,
|
|
243
|
-
connectionTimeout: this._connectionTimeout,
|
|
244
|
-
dialect: "redis",
|
|
245
|
-
url: t
|
|
246
|
-
};
|
|
247
|
-
return e;
|
|
248
|
-
}
|
|
249
|
-
set opts(t) {
|
|
250
|
-
this.setOptions(t);
|
|
251
|
-
}
|
|
252
|
-
get namespace() {
|
|
253
|
-
return this._namespace;
|
|
254
|
-
}
|
|
255
|
-
set namespace(t) {
|
|
256
|
-
this._namespace = t;
|
|
257
|
-
}
|
|
258
|
-
get keyPrefixSeparator() {
|
|
259
|
-
return this._keyPrefixSeparator;
|
|
260
|
-
}
|
|
261
|
-
set keyPrefixSeparator(t) {
|
|
262
|
-
this._keyPrefixSeparator = t;
|
|
263
|
-
}
|
|
264
|
-
get clearBatchSize() {
|
|
265
|
-
return this._clearBatchSize;
|
|
266
|
-
}
|
|
267
|
-
set clearBatchSize(t) {
|
|
268
|
-
if (t > 0) {
|
|
269
|
-
this._clearBatchSize = t;
|
|
270
|
-
} else {
|
|
271
|
-
this.emit("error", "clearBatchSize must be greater than 0");
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
get useUnlink() {
|
|
275
|
-
return this._useUnlink;
|
|
276
|
-
}
|
|
277
|
-
set useUnlink(t) {
|
|
278
|
-
this._useUnlink = t;
|
|
279
|
-
}
|
|
280
|
-
get noNamespaceAffectsAll() {
|
|
281
|
-
return this._noNamespaceAffectsAll;
|
|
282
|
-
}
|
|
283
|
-
set noNamespaceAffectsAll(t) {
|
|
284
|
-
this._noNamespaceAffectsAll = t;
|
|
285
|
-
}
|
|
286
|
-
get throwOnConnectError() {
|
|
287
|
-
return this._throwOnConnectError;
|
|
288
|
-
}
|
|
289
|
-
set throwOnConnectError(t) {
|
|
290
|
-
this._throwOnConnectError = t;
|
|
291
|
-
}
|
|
292
|
-
get throwErrors() {
|
|
293
|
-
return this._throwErrors;
|
|
294
|
-
}
|
|
295
|
-
set throwErrors(t) {
|
|
296
|
-
this._throwErrors = t;
|
|
297
|
-
}
|
|
298
|
-
get connectionTimeout() {
|
|
299
|
-
return this._connectionTimeout;
|
|
300
|
-
}
|
|
301
|
-
set connectionTimeout(t) {
|
|
302
|
-
this._connectionTimeout = t;
|
|
303
|
-
}
|
|
304
|
-
async getClient() {
|
|
305
|
-
if (this._client.isOpen) {
|
|
306
|
-
return this._client;
|
|
307
|
-
}
|
|
308
|
-
try {
|
|
309
|
-
if (this._connectionTimeout === void 0) {
|
|
310
|
-
await this._client.connect();
|
|
311
|
-
} else {
|
|
312
|
-
await Promise.race([ this._client.connect(), this.createTimeoutPromise(this._connectionTimeout) ]);
|
|
313
|
-
}
|
|
314
|
-
} catch (t) {
|
|
315
|
-
this.emit("error", t);
|
|
316
|
-
if (this._throwOnConnectError) {
|
|
317
|
-
throw new Error("Redis client is not connected or has failed to connect. This is thrown because throwOnConnectError is set to true.");
|
|
318
|
-
}
|
|
319
|
-
await this.disconnect(true);
|
|
320
|
-
}
|
|
321
|
-
this.initClient();
|
|
322
|
-
return this._client;
|
|
323
|
-
}
|
|
324
|
-
async set(t, e, s) {
|
|
325
|
-
const i = await this.getClient();
|
|
326
|
-
try {
|
|
327
|
-
t = this.createKeyPrefix(t, this._namespace);
|
|
328
|
-
if (s) {
|
|
329
|
-
await i.set(t, e, {
|
|
330
|
-
PX: s
|
|
331
|
-
});
|
|
332
|
-
} else {
|
|
333
|
-
await i.set(t, e);
|
|
334
|
-
}
|
|
335
|
-
} catch (t) {
|
|
336
|
-
this.emit("error", t);
|
|
337
|
-
if (this._throwErrors) {
|
|
338
|
-
throw t;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
async setMany(t) {
|
|
343
|
-
const e = await this.getClient();
|
|
344
|
-
try {
|
|
345
|
-
const s = e.multi();
|
|
346
|
-
for (const {key: e, value: i, ttl: r} of t) {
|
|
347
|
-
const t = this.createKeyPrefix(e, this._namespace);
|
|
348
|
-
if (r) {
|
|
349
|
-
s.set(t, i, {
|
|
350
|
-
PX: r
|
|
351
|
-
});
|
|
352
|
-
} else {
|
|
353
|
-
s.set(t, i);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
await s.exec();
|
|
357
|
-
} catch (t) {
|
|
358
|
-
this.emit("error", t);
|
|
359
|
-
if (this._throwErrors) {
|
|
360
|
-
throw t;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
async has(t) {
|
|
365
|
-
const e = await this.getClient();
|
|
366
|
-
try {
|
|
367
|
-
t = this.createKeyPrefix(t, this._namespace);
|
|
368
|
-
const s = await e.exists(t);
|
|
369
|
-
return s === 1;
|
|
370
|
-
} catch (t) {
|
|
371
|
-
this.emit("error", t);
|
|
372
|
-
if (this._throwErrors) {
|
|
373
|
-
throw t;
|
|
374
|
-
}
|
|
375
|
-
return false;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
async hasMany(t) {
|
|
379
|
-
const e = await this.getClient();
|
|
380
|
-
try {
|
|
381
|
-
const s = e.multi();
|
|
382
|
-
for (const e of t) {
|
|
383
|
-
const t = this.createKeyPrefix(e, this._namespace);
|
|
384
|
-
s.exists(t);
|
|
385
|
-
}
|
|
386
|
-
const i = await s.exec();
|
|
387
|
-
return i.map(t => t === 1);
|
|
388
|
-
} catch (e) {
|
|
389
|
-
this.emit("error", e);
|
|
390
|
-
if (this._throwErrors) {
|
|
391
|
-
throw e;
|
|
392
|
-
}
|
|
393
|
-
return Array.from({
|
|
394
|
-
length: t.length
|
|
395
|
-
}).fill(false);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
async get(t) {
|
|
399
|
-
const e = await this.getClient();
|
|
400
|
-
try {
|
|
401
|
-
t = this.createKeyPrefix(t, this._namespace);
|
|
402
|
-
const s = await e.get(t);
|
|
403
|
-
if (s === null) {
|
|
404
|
-
return void 0;
|
|
405
|
-
}
|
|
406
|
-
return s;
|
|
407
|
-
} catch (t) {
|
|
408
|
-
this.emit("error", t);
|
|
409
|
-
if (this._throwErrors) {
|
|
410
|
-
throw t;
|
|
411
|
-
}
|
|
412
|
-
return void 0;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
async getMany(t) {
|
|
416
|
-
if (t.length === 0) {
|
|
417
|
-
return [];
|
|
418
|
-
}
|
|
419
|
-
t = t.map(t => this.createKeyPrefix(t, this._namespace));
|
|
420
|
-
try {
|
|
421
|
-
const e = await this.mget(t);
|
|
422
|
-
return e;
|
|
423
|
-
} catch (e) {
|
|
424
|
-
this.emit("error", e);
|
|
425
|
-
if (this._throwErrors) {
|
|
426
|
-
throw e;
|
|
427
|
-
}
|
|
428
|
-
return Array.from({
|
|
429
|
-
length: t.length
|
|
430
|
-
}).fill(void 0);
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
async delete(t) {
|
|
434
|
-
const e = await this.getClient();
|
|
435
|
-
try {
|
|
436
|
-
t = this.createKeyPrefix(t, this._namespace);
|
|
437
|
-
let s = 0;
|
|
438
|
-
s = await (this._useUnlink ? e.unlink(t) : e.del(t));
|
|
439
|
-
return s > 0;
|
|
440
|
-
} catch (t) {
|
|
441
|
-
this.emit("error", t);
|
|
442
|
-
if (this._throwErrors) {
|
|
443
|
-
throw t;
|
|
444
|
-
}
|
|
445
|
-
return false;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
async deleteMany(t) {
|
|
449
|
-
let e = false;
|
|
450
|
-
const s = await this.getClient();
|
|
451
|
-
try {
|
|
452
|
-
const i = s.multi();
|
|
453
|
-
for (const e of t) {
|
|
454
|
-
const t = this.createKeyPrefix(e, this._namespace);
|
|
455
|
-
if (this._useUnlink) {
|
|
456
|
-
i.unlink(t);
|
|
457
|
-
} else {
|
|
458
|
-
i.del(t);
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
const r = await i.exec();
|
|
462
|
-
for (const t of r) {
|
|
463
|
-
if (typeof t === "number" && t > 0) {
|
|
464
|
-
e = true;
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
} catch (t) {
|
|
468
|
-
this.emit("error", t);
|
|
469
|
-
if (this._throwErrors) {
|
|
470
|
-
throw t;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
return e;
|
|
474
|
-
}
|
|
475
|
-
async disconnect(t) {
|
|
476
|
-
if (this._client.isOpen) {
|
|
477
|
-
await (t ? this._client.disconnect() : this._client.quit());
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
createKeyPrefix(t, e) {
|
|
481
|
-
if (e) {
|
|
482
|
-
return `${e}${this._keyPrefixSeparator}${t}`;
|
|
483
|
-
}
|
|
484
|
-
return t;
|
|
485
|
-
}
|
|
486
|
-
getKeyWithoutPrefix(t, e) {
|
|
487
|
-
if (e) {
|
|
488
|
-
return t.replace(`${e}${this._keyPrefixSeparator}`, "");
|
|
489
|
-
}
|
|
490
|
-
return t;
|
|
491
|
-
}
|
|
492
|
-
isCluster() {
|
|
493
|
-
return this.isClientCluster(this._client);
|
|
494
|
-
}
|
|
495
|
-
async getMasterNodes() {
|
|
496
|
-
if (this.isCluster()) {
|
|
497
|
-
const t = await this.getClient();
|
|
498
|
-
return Promise.all(t.masters.map(async e => t.nodeClient(e)));
|
|
499
|
-
}
|
|
500
|
-
return [ await this.getClient() ];
|
|
501
|
-
}
|
|
502
|
-
async* iterator(t) {
|
|
503
|
-
const e = await this.getMasterNodes();
|
|
504
|
-
for (const s of e) {
|
|
505
|
-
const e = t ? `${t}${this._keyPrefixSeparator}*` : "*";
|
|
506
|
-
let i = "0";
|
|
507
|
-
do {
|
|
508
|
-
const r = await s.scan(Number.parseInt(i, 10), {
|
|
509
|
-
MATCH: e,
|
|
510
|
-
TYPE: "string"
|
|
511
|
-
});
|
|
512
|
-
i = r.cursor.toString();
|
|
513
|
-
let {keys: n} = r;
|
|
514
|
-
if (!t && !this._noNamespaceAffectsAll) {
|
|
515
|
-
n = n.filter(t => !t.includes(this._keyPrefixSeparator));
|
|
516
|
-
}
|
|
517
|
-
if (n.length > 0) {
|
|
518
|
-
const e = await this.mget(n);
|
|
519
|
-
for (const s of n.keys()) {
|
|
520
|
-
const i = this.getKeyWithoutPrefix(n[s], t);
|
|
521
|
-
const r = e[s];
|
|
522
|
-
yield [ i, r ];
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
} while (i !== "0");
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
async clear() {
|
|
529
|
-
try {
|
|
530
|
-
const t = await this.getMasterNodes();
|
|
531
|
-
await Promise.all(t.map(async t => {
|
|
532
|
-
if (!this._namespace && this._noNamespaceAffectsAll) {
|
|
533
|
-
await t.flushDb();
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
536
|
-
let e = "0";
|
|
537
|
-
const s = this._clearBatchSize;
|
|
538
|
-
const i = this._namespace ? `${this._namespace}${this._keyPrefixSeparator}*` : "*";
|
|
539
|
-
const r = [];
|
|
540
|
-
do {
|
|
541
|
-
const n = await t.scan(Number.parseInt(e, 10), {
|
|
542
|
-
MATCH: i,
|
|
543
|
-
COUNT: s,
|
|
544
|
-
TYPE: "string"
|
|
545
|
-
});
|
|
546
|
-
e = n.cursor.toString();
|
|
547
|
-
let {keys: a} = n;
|
|
548
|
-
if (a.length === 0) {
|
|
549
|
-
continue;
|
|
550
|
-
}
|
|
551
|
-
if (!this._namespace) {
|
|
552
|
-
a = a.filter(t => !t.includes(this._keyPrefixSeparator));
|
|
553
|
-
}
|
|
554
|
-
r.push(this.clearWithClusterSupport(a));
|
|
555
|
-
} while (e !== "0");
|
|
556
|
-
await Promise.all(r);
|
|
557
|
-
}));
|
|
558
|
-
} catch (t) {
|
|
559
|
-
this.emit("error", t);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
async mget(t) {
|
|
563
|
-
const e = this.getSlotMap(t);
|
|
564
|
-
const s = new Map;
|
|
565
|
-
await Promise.all(Array.from(e.entries(), async ([t, e]) => {
|
|
566
|
-
const i = await this.getSlotMaster(t);
|
|
567
|
-
const r = await i.mGet(e);
|
|
568
|
-
for (const [t, i] of r.entries()) {
|
|
569
|
-
s.set(e[t], i ?? void 0);
|
|
570
|
-
}
|
|
571
|
-
}));
|
|
572
|
-
return t.map(t => s.get(t));
|
|
573
|
-
}
|
|
574
|
-
async clearWithClusterSupport(t) {
|
|
575
|
-
if (t.length > 0) {
|
|
576
|
-
const e = this.getSlotMap(t);
|
|
577
|
-
await Promise.all(Array.from(e.entries(), async ([t, e]) => {
|
|
578
|
-
const s = await this.getSlotMaster(t);
|
|
579
|
-
return this._useUnlink ? s.unlink(e) : s.del(e);
|
|
580
|
-
}));
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
async getSlotMaster(t) {
|
|
584
|
-
const e = await this.getClient();
|
|
585
|
-
if (this.isCluster()) {
|
|
586
|
-
const s = e;
|
|
587
|
-
const i = s.slots[t].master;
|
|
588
|
-
return s.nodeClient(i);
|
|
589
|
-
}
|
|
590
|
-
return e;
|
|
591
|
-
}
|
|
592
|
-
getSlotMap(t) {
|
|
593
|
-
const e = new Map;
|
|
594
|
-
if (this.isCluster()) {
|
|
595
|
-
for (const s of t) {
|
|
596
|
-
const t = p.default(s);
|
|
597
|
-
const i = e.get(t) ?? [];
|
|
598
|
-
i.push(s);
|
|
599
|
-
e.set(t, i);
|
|
600
|
-
}
|
|
601
|
-
} else {
|
|
602
|
-
e.set(0, t);
|
|
603
|
-
}
|
|
604
|
-
return e;
|
|
605
|
-
}
|
|
606
|
-
isClientCluster(t) {
|
|
607
|
-
if (t.options === void 0 && t.scan === void 0) {
|
|
608
|
-
return true;
|
|
609
|
-
}
|
|
610
|
-
return false;
|
|
611
|
-
}
|
|
612
|
-
setOptions(t) {
|
|
613
|
-
if (!t) {
|
|
614
|
-
return;
|
|
615
|
-
}
|
|
616
|
-
if (t.namespace) {
|
|
617
|
-
this._namespace = t.namespace;
|
|
618
|
-
}
|
|
619
|
-
if (t.keyPrefixSeparator !== void 0) {
|
|
620
|
-
this._keyPrefixSeparator = t.keyPrefixSeparator;
|
|
621
|
-
}
|
|
622
|
-
if (t.clearBatchSize !== void 0 && t.clearBatchSize > 0) {
|
|
623
|
-
this._clearBatchSize = t.clearBatchSize;
|
|
624
|
-
}
|
|
625
|
-
if (t.useUnlink !== void 0) {
|
|
626
|
-
this._useUnlink = t.useUnlink;
|
|
627
|
-
}
|
|
628
|
-
if (t.noNamespaceAffectsAll !== void 0) {
|
|
629
|
-
this._noNamespaceAffectsAll = t.noNamespaceAffectsAll;
|
|
630
|
-
}
|
|
631
|
-
if (t.throwOnConnectError !== void 0) {
|
|
632
|
-
this._throwOnConnectError = t.throwOnConnectError;
|
|
633
|
-
}
|
|
634
|
-
if (t.throwErrors !== void 0) {
|
|
635
|
-
this._throwErrors = t.throwErrors;
|
|
636
|
-
}
|
|
637
|
-
if (t.connectionTimeout !== void 0) {
|
|
638
|
-
this._connectionTimeout = t.connectionTimeout;
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
initClient() {
|
|
642
|
-
this._client.on("connect", () => {
|
|
643
|
-
this.emit("connect", this._client);
|
|
644
|
-
});
|
|
645
|
-
this._client.on("disconnect", () => {
|
|
646
|
-
this.emit("disconnect", this._client);
|
|
647
|
-
});
|
|
648
|
-
this._client.on("reconnecting", t => {
|
|
649
|
-
this.emit("reconnecting", t);
|
|
650
|
-
});
|
|
651
|
-
}
|
|
652
|
-
async createTimeoutPromise(t) {
|
|
653
|
-
return new Promise((e, s) => setTimeout(() => {
|
|
654
|
-
s(new Error(`Redis timed out after ${t}ms`));
|
|
655
|
-
}, t));
|
|
656
|
-
}
|
|
657
|
-
};
|
|
658
|
-
|
|
659
|
-
const k = Object.freeze(Object.defineProperty({
|
|
660
|
-
__proto__: null,
|
|
661
|
-
get Keyv() {
|
|
662
|
-
return i.Keyv;
|
|
663
|
-
},
|
|
664
|
-
createClient: e.createClient,
|
|
665
|
-
createCluster: e.createCluster,
|
|
666
|
-
get default() {
|
|
667
|
-
return T;
|
|
668
|
-
},
|
|
669
|
-
get defaultReconnectStrategy() {
|
|
670
|
-
return O;
|
|
671
|
-
}
|
|
672
|
-
}, Symbol.toStringTag, {
|
|
673
|
-
value: "Module"
|
|
674
|
-
}));
|
|
675
|
-
|
|
676
|
-
var $ = class extends d.default {
|
|
677
|
-
ttlSupport=true;
|
|
678
|
-
namespace;
|
|
679
|
-
client;
|
|
680
|
-
opts;
|
|
681
|
-
constructor(t, e) {
|
|
682
|
-
super();
|
|
683
|
-
e = {
|
|
684
|
-
...typeof t === "string" ? {
|
|
685
|
-
uri: t
|
|
686
|
-
} : t,
|
|
687
|
-
...e
|
|
688
|
-
};
|
|
689
|
-
if (e.uri && e.url === void 0) {
|
|
690
|
-
e.url = e.uri;
|
|
691
|
-
}
|
|
692
|
-
if (t === void 0) {
|
|
693
|
-
t = "localhost:11211";
|
|
694
|
-
e.url = e.uri = t;
|
|
695
|
-
}
|
|
696
|
-
this.opts = e;
|
|
697
|
-
this.client = m.default.Client.create(t, e);
|
|
698
|
-
}
|
|
699
|
-
_getNamespace() {
|
|
700
|
-
return `namespace:${this.namespace}`;
|
|
701
|
-
}
|
|
702
|
-
async get(t) {
|
|
703
|
-
return new Promise((e, s) => {
|
|
704
|
-
this.client.get(this.formatKey(t), (t, i) => {
|
|
705
|
-
if (t) {
|
|
706
|
-
this.emit("error", t);
|
|
707
|
-
s(t);
|
|
708
|
-
} else {
|
|
709
|
-
let t;
|
|
710
|
-
if (i === null) {
|
|
711
|
-
t = {
|
|
712
|
-
value: void 0,
|
|
713
|
-
expires: 0
|
|
714
|
-
};
|
|
715
|
-
} else {
|
|
716
|
-
t = this.opts.deserialize ? this.opts.deserialize(i) : exports.defaultDeserialize(i);
|
|
717
|
-
}
|
|
718
|
-
e(t);
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
|
-
});
|
|
722
|
-
}
|
|
723
|
-
async getMany(t) {
|
|
724
|
-
const e = [];
|
|
725
|
-
for (const s of t) {
|
|
726
|
-
e.push(this.get(s));
|
|
727
|
-
}
|
|
728
|
-
return Promise.allSettled(e).then(t => {
|
|
729
|
-
const e = [];
|
|
730
|
-
for (const s of t) {
|
|
731
|
-
e.push(s.value);
|
|
732
|
-
}
|
|
733
|
-
return e;
|
|
734
|
-
});
|
|
735
|
-
}
|
|
736
|
-
async set(t, e, s) {
|
|
737
|
-
const i = {};
|
|
738
|
-
if (s !== void 0) {
|
|
739
|
-
i.expires = i.ttl = Math.floor(s / 1e3);
|
|
740
|
-
}
|
|
741
|
-
await this.client.set(this.formatKey(t), e, i);
|
|
742
|
-
}
|
|
743
|
-
async delete(t) {
|
|
744
|
-
return new Promise((e, s) => {
|
|
745
|
-
this.client.delete(this.formatKey(t), (t, i) => {
|
|
746
|
-
if (t) {
|
|
747
|
-
this.emit("error", t);
|
|
748
|
-
s(t);
|
|
749
|
-
} else {
|
|
750
|
-
e(Boolean(i));
|
|
751
|
-
}
|
|
752
|
-
});
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
async deleteMany(t) {
|
|
756
|
-
const e = t.map(async t => this.delete(t));
|
|
757
|
-
const s = await Promise.allSettled(e);
|
|
758
|
-
return s.every(t => t.value === true);
|
|
759
|
-
}
|
|
760
|
-
async clear() {
|
|
761
|
-
return new Promise((t, e) => {
|
|
762
|
-
this.client.flush(s => {
|
|
763
|
-
if (s) {
|
|
764
|
-
this.emit("error", s);
|
|
765
|
-
e(s);
|
|
766
|
-
} else {
|
|
767
|
-
t(void 0);
|
|
768
|
-
}
|
|
769
|
-
});
|
|
770
|
-
});
|
|
771
|
-
}
|
|
772
|
-
formatKey(t) {
|
|
773
|
-
let e = t;
|
|
774
|
-
if (this.namespace) {
|
|
775
|
-
e = this.namespace.trim() + ":" + t.trim();
|
|
776
|
-
}
|
|
777
|
-
return e;
|
|
778
|
-
}
|
|
779
|
-
async has(t) {
|
|
780
|
-
return new Promise(e => {
|
|
781
|
-
this.client.get(this.formatKey(t), (t, s) => {
|
|
782
|
-
if (t) {
|
|
783
|
-
e(false);
|
|
784
|
-
} else {
|
|
785
|
-
e(s !== null);
|
|
786
|
-
}
|
|
787
|
-
});
|
|
788
|
-
});
|
|
789
|
-
}
|
|
790
|
-
};
|
|
791
|
-
|
|
792
|
-
const C = Object.freeze(Object.defineProperty({
|
|
793
|
-
__proto__: null,
|
|
794
|
-
get KeyvMemcache() {
|
|
795
|
-
return $;
|
|
796
|
-
}
|
|
797
|
-
}, Symbol.toStringTag, {
|
|
798
|
-
value: "Module"
|
|
799
|
-
}));
|
|
12
|
+
exports.AfterInsert_2 = t.AfterInsert = s;
|
|
800
13
|
|
|
801
|
-
|
|
14
|
+
const r = e.requireGlobals();
|
|
802
15
|
|
|
803
|
-
|
|
804
|
-
ttlSupport=false;
|
|
805
|
-
opts;
|
|
806
|
-
connect;
|
|
807
|
-
namespace;
|
|
808
|
-
constructor(t, e) {
|
|
809
|
-
super();
|
|
810
|
-
t ??= {};
|
|
811
|
-
if (typeof t === "string") {
|
|
812
|
-
t = {
|
|
813
|
-
url: t
|
|
814
|
-
};
|
|
815
|
-
}
|
|
816
|
-
if (t.uri) {
|
|
817
|
-
t = {
|
|
818
|
-
url: t.uri,
|
|
819
|
-
...t
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
this.opts = {
|
|
823
|
-
url: "mongodb://127.0.0.1:27017",
|
|
824
|
-
collection: "keyv",
|
|
825
|
-
...t,
|
|
826
|
-
...e
|
|
827
|
-
};
|
|
828
|
-
delete this.opts.emitErrors;
|
|
829
|
-
const s = Object.fromEntries(Object.entries(this.opts).filter(([t]) => !N.has(t)));
|
|
830
|
-
this.opts = Object.fromEntries(Object.entries(this.opts).filter(([t]) => N.has(t)));
|
|
831
|
-
this.connect = new Promise(async (t, e) => {
|
|
832
|
-
try {
|
|
833
|
-
let e = "";
|
|
834
|
-
if (this.opts.url) {
|
|
835
|
-
e = this.opts.url;
|
|
836
|
-
}
|
|
837
|
-
const i = new o.MongoClient(e, s);
|
|
838
|
-
await i.connect();
|
|
839
|
-
const r = i.db(this.opts.db);
|
|
840
|
-
if (this.opts.useGridFS) {
|
|
841
|
-
const e = new o.GridFSBucket(r, {
|
|
842
|
-
readPreference: this.opts.readPreference,
|
|
843
|
-
bucketName: this.opts.collection
|
|
844
|
-
});
|
|
845
|
-
const s = r.collection(`${this.opts.collection}.files`);
|
|
846
|
-
await s.createIndex({
|
|
847
|
-
uploadDate: -1
|
|
848
|
-
});
|
|
849
|
-
await s.createIndex({
|
|
850
|
-
"metadata.expiresAt": 1
|
|
851
|
-
});
|
|
852
|
-
await s.createIndex({
|
|
853
|
-
"metadata.lastAccessed": 1
|
|
854
|
-
});
|
|
855
|
-
await s.createIndex({
|
|
856
|
-
"metadata.filename": 1
|
|
857
|
-
});
|
|
858
|
-
t({
|
|
859
|
-
bucket: e,
|
|
860
|
-
store: s,
|
|
861
|
-
db: r,
|
|
862
|
-
mongoClient: i
|
|
863
|
-
});
|
|
864
|
-
} else {
|
|
865
|
-
let e = "keyv";
|
|
866
|
-
if (this.opts.collection) {
|
|
867
|
-
e = this.opts.collection;
|
|
868
|
-
}
|
|
869
|
-
const s = r.collection(e);
|
|
870
|
-
await s.createIndex({
|
|
871
|
-
key: 1
|
|
872
|
-
}, {
|
|
873
|
-
unique: true,
|
|
874
|
-
background: true
|
|
875
|
-
});
|
|
876
|
-
await s.createIndex({
|
|
877
|
-
expiresAt: 1
|
|
878
|
-
}, {
|
|
879
|
-
expireAfterSeconds: 0,
|
|
880
|
-
background: true
|
|
881
|
-
});
|
|
882
|
-
t({
|
|
883
|
-
store: s,
|
|
884
|
-
mongoClient: i
|
|
885
|
-
});
|
|
886
|
-
}
|
|
887
|
-
} catch (t) {
|
|
888
|
-
this.emit("error", t);
|
|
889
|
-
}
|
|
890
|
-
});
|
|
891
|
-
}
|
|
892
|
-
async get(e) {
|
|
893
|
-
const s = await this.connect;
|
|
894
|
-
if (this.opts.useGridFS) {
|
|
895
|
-
await s.store.updateOne({
|
|
896
|
-
filename: String(e)
|
|
897
|
-
}, {
|
|
898
|
-
$set: {
|
|
899
|
-
"metadata.lastAccessed": new Date
|
|
900
|
-
}
|
|
901
|
-
});
|
|
902
|
-
const i = s.bucket.openDownloadStreamByName(e);
|
|
903
|
-
return new Promise(e => {
|
|
904
|
-
const s = [];
|
|
905
|
-
i.on("error", () => {
|
|
906
|
-
e(void 0);
|
|
907
|
-
});
|
|
908
|
-
i.on("end", () => {
|
|
909
|
-
const i = t.Buffer.concat(s).toString("utf8");
|
|
910
|
-
e(i);
|
|
911
|
-
});
|
|
912
|
-
i.on("data", t => {
|
|
913
|
-
s.push(t);
|
|
914
|
-
});
|
|
915
|
-
});
|
|
916
|
-
}
|
|
917
|
-
const i = await s.store.findOne({
|
|
918
|
-
key: {
|
|
919
|
-
$eq: e
|
|
920
|
-
}
|
|
921
|
-
});
|
|
922
|
-
if (!i) {
|
|
923
|
-
return void 0;
|
|
924
|
-
}
|
|
925
|
-
return i.value;
|
|
926
|
-
}
|
|
927
|
-
async getMany(t) {
|
|
928
|
-
if (this.opts.useGridFS) {
|
|
929
|
-
const e = [];
|
|
930
|
-
for (const s of t) {
|
|
931
|
-
e.push(this.get(s));
|
|
932
|
-
}
|
|
933
|
-
const s = await Promise.allSettled(e);
|
|
934
|
-
const i = [];
|
|
935
|
-
for (const t of s) {
|
|
936
|
-
i.push(t.value);
|
|
937
|
-
}
|
|
938
|
-
return i;
|
|
939
|
-
}
|
|
940
|
-
const e = await this.connect;
|
|
941
|
-
const s = await e.store.s.db.collection(this.opts.collection).find({
|
|
942
|
-
key: {
|
|
943
|
-
$in: t
|
|
944
|
-
}
|
|
945
|
-
}).project({
|
|
946
|
-
_id: 0,
|
|
947
|
-
value: 1,
|
|
948
|
-
key: 1
|
|
949
|
-
}).toArray();
|
|
950
|
-
const i = [ ...t ];
|
|
951
|
-
let r = 0;
|
|
952
|
-
for (const e of t) {
|
|
953
|
-
const t = s.findIndex(t => t.key === e);
|
|
954
|
-
i[r] = t > -1 ? s[t].value : void 0;
|
|
955
|
-
r++;
|
|
956
|
-
}
|
|
957
|
-
return i;
|
|
958
|
-
}
|
|
959
|
-
async set(t, e, s) {
|
|
960
|
-
const i = typeof s === "number" ? new Date(Date.now() + s) : null;
|
|
961
|
-
if (this.opts.useGridFS) {
|
|
962
|
-
const s = await this.connect;
|
|
963
|
-
const r = s.bucket.openUploadStream(t, {
|
|
964
|
-
metadata: {
|
|
965
|
-
expiresAt: i,
|
|
966
|
-
lastAccessed: new Date
|
|
967
|
-
}
|
|
968
|
-
});
|
|
969
|
-
return new Promise(t => {
|
|
970
|
-
r.on("finish", () => {
|
|
971
|
-
t(r);
|
|
972
|
-
});
|
|
973
|
-
r.end(e);
|
|
974
|
-
});
|
|
975
|
-
}
|
|
976
|
-
const r = await this.connect;
|
|
977
|
-
await r.store.updateOne({
|
|
978
|
-
key: {
|
|
979
|
-
$eq: t
|
|
980
|
-
}
|
|
981
|
-
}, {
|
|
982
|
-
$set: {
|
|
983
|
-
key: t,
|
|
984
|
-
value: e,
|
|
985
|
-
expiresAt: i
|
|
986
|
-
}
|
|
987
|
-
}, {
|
|
988
|
-
upsert: true
|
|
989
|
-
});
|
|
990
|
-
}
|
|
991
|
-
async delete(t) {
|
|
992
|
-
if (typeof t !== "string") {
|
|
993
|
-
return false;
|
|
994
|
-
}
|
|
995
|
-
const e = await this.connect;
|
|
996
|
-
if (this.opts.useGridFS) {
|
|
997
|
-
try {
|
|
998
|
-
const s = e.db;
|
|
999
|
-
const i = new o.GridFSBucket(s, {
|
|
1000
|
-
bucketName: this.opts.collection
|
|
1001
|
-
});
|
|
1002
|
-
const r = await i.find({
|
|
1003
|
-
filename: t
|
|
1004
|
-
}).toArray();
|
|
1005
|
-
await e.bucket.delete(r[0]._id);
|
|
1006
|
-
return true;
|
|
1007
|
-
} catch {
|
|
1008
|
-
return false;
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
const s = await e.store.deleteOne({
|
|
1012
|
-
key: {
|
|
1013
|
-
$eq: t
|
|
1014
|
-
}
|
|
1015
|
-
});
|
|
1016
|
-
return s.deletedCount > 0;
|
|
1017
|
-
}
|
|
1018
|
-
async deleteMany(t) {
|
|
1019
|
-
const e = await this.connect;
|
|
1020
|
-
if (this.opts.useGridFS) {
|
|
1021
|
-
const s = e.db;
|
|
1022
|
-
const i = new o.GridFSBucket(s, {
|
|
1023
|
-
bucketName: this.opts.collection
|
|
1024
|
-
});
|
|
1025
|
-
const r = await i.find({
|
|
1026
|
-
filename: {
|
|
1027
|
-
$in: t
|
|
1028
|
-
}
|
|
1029
|
-
}).toArray();
|
|
1030
|
-
if (r.length === 0) {
|
|
1031
|
-
return false;
|
|
1032
|
-
}
|
|
1033
|
-
await Promise.all(r.map(async t => e.bucket.delete(t._id)));
|
|
1034
|
-
return true;
|
|
1035
|
-
}
|
|
1036
|
-
const s = await e.store.deleteMany({
|
|
1037
|
-
key: {
|
|
1038
|
-
$in: t
|
|
1039
|
-
}
|
|
1040
|
-
});
|
|
1041
|
-
return s.deletedCount > 0;
|
|
1042
|
-
}
|
|
1043
|
-
async clear() {
|
|
1044
|
-
const t = await this.connect;
|
|
1045
|
-
if (this.opts.useGridFS) {
|
|
1046
|
-
try {
|
|
1047
|
-
await t.bucket.drop();
|
|
1048
|
-
} catch (t) {
|
|
1049
|
-
if (!(t instanceof o.MongoServerError && t.code === 26)) {
|
|
1050
|
-
throw t;
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
await t.store.deleteMany({
|
|
1055
|
-
key: {
|
|
1056
|
-
$regex: this.namespace ? `^${this.namespace}:*` : ""
|
|
1057
|
-
}
|
|
1058
|
-
});
|
|
1059
|
-
}
|
|
1060
|
-
async clearExpired() {
|
|
1061
|
-
if (!this.opts.useGridFS) {
|
|
1062
|
-
return false;
|
|
1063
|
-
}
|
|
1064
|
-
return this.connect.then(async t => {
|
|
1065
|
-
const e = t.db;
|
|
1066
|
-
const s = new o.GridFSBucket(e, {
|
|
1067
|
-
bucketName: this.opts.collection
|
|
1068
|
-
});
|
|
1069
|
-
return s.find({
|
|
1070
|
-
"metadata.expiresAt": {
|
|
1071
|
-
$lte: new Date(Date.now())
|
|
1072
|
-
}
|
|
1073
|
-
}).toArray().then(async e => Promise.all(e.map(async e => t.bucket.delete(e._id))).then(() => true));
|
|
1074
|
-
});
|
|
1075
|
-
}
|
|
1076
|
-
async clearUnusedFor(t) {
|
|
1077
|
-
if (!this.opts.useGridFS) {
|
|
1078
|
-
return false;
|
|
1079
|
-
}
|
|
1080
|
-
const e = await this.connect;
|
|
1081
|
-
const s = e.db;
|
|
1082
|
-
const i = new o.GridFSBucket(s, {
|
|
1083
|
-
bucketName: this.opts.collection
|
|
1084
|
-
});
|
|
1085
|
-
const r = await i.find({
|
|
1086
|
-
"metadata.lastAccessed": {
|
|
1087
|
-
$lte: new Date(Date.now() - t * 1e3)
|
|
1088
|
-
}
|
|
1089
|
-
}).toArray();
|
|
1090
|
-
await Promise.all(r.map(async t => e.bucket.delete(t._id)));
|
|
1091
|
-
return true;
|
|
1092
|
-
}
|
|
1093
|
-
async* iterator(t) {
|
|
1094
|
-
const e = await this.connect;
|
|
1095
|
-
const s = new RegExp(`^${t ? t + ":" : ".*"}`);
|
|
1096
|
-
const i = this.opts.useGridFS ? e.store.find({
|
|
1097
|
-
filename: s
|
|
1098
|
-
}).map(async t => [ t.filename, await this.get(t.filename) ]) : e.store.find({
|
|
1099
|
-
key: s
|
|
1100
|
-
}).map(t => [ t.key, t.value ]);
|
|
1101
|
-
yield* i;
|
|
1102
|
-
}
|
|
1103
|
-
async has(t) {
|
|
1104
|
-
const e = await this.connect;
|
|
1105
|
-
const s = {
|
|
1106
|
-
[this.opts.useGridFS ? "filename" : "key"]: {
|
|
1107
|
-
$eq: t
|
|
1108
|
-
}
|
|
1109
|
-
};
|
|
1110
|
-
const i = await e.store.count(s);
|
|
1111
|
-
return i !== 0;
|
|
1112
|
-
}
|
|
1113
|
-
async disconnect() {
|
|
1114
|
-
const t = await this.connect;
|
|
1115
|
-
await t.mongoClient.close();
|
|
1116
|
-
}
|
|
1117
|
-
};
|
|
1118
|
-
|
|
1119
|
-
const R = Object.freeze(Object.defineProperty({
|
|
1120
|
-
__proto__: null,
|
|
1121
|
-
get KeyvMongo() {
|
|
1122
|
-
return x;
|
|
1123
|
-
}
|
|
1124
|
-
}, Symbol.toStringTag, {
|
|
1125
|
-
value: "Module"
|
|
1126
|
-
}));
|
|
1127
|
-
|
|
1128
|
-
var M = t => {
|
|
1129
|
-
const e = String(t).replace(/[^a-zA-Z0-9_]/g, "");
|
|
1130
|
-
if (e.length === 0) {
|
|
1131
|
-
throw new Error("Invalid table name: must contain alphanumeric characters");
|
|
1132
|
-
}
|
|
1133
|
-
return /^[a-zA-Z]/.test(e) ? e : `_${e}`;
|
|
1134
|
-
};
|
|
16
|
+
const n = e.EventListenerTypes;
|
|
1135
17
|
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
constructor(t) {
|
|
1143
|
-
super();
|
|
1144
|
-
this.ttlSupport = false;
|
|
1145
|
-
let e = {
|
|
1146
|
-
dialect: "sqlite",
|
|
1147
|
-
uri: "sqlite://:memory:"
|
|
1148
|
-
};
|
|
1149
|
-
if (typeof t === "string") {
|
|
1150
|
-
e.uri = t;
|
|
1151
|
-
} else {
|
|
1152
|
-
e = {
|
|
1153
|
-
...e,
|
|
1154
|
-
...t
|
|
1155
|
-
};
|
|
1156
|
-
}
|
|
1157
|
-
e.db = e.uri.replace(/^sqlite:\/\//, "");
|
|
1158
|
-
e.connect = async () => new Promise((t, s) => {
|
|
1159
|
-
const i = new E.default.Database(e.db, r => {
|
|
1160
|
-
if (r) {
|
|
1161
|
-
s(r);
|
|
1162
|
-
} else {
|
|
1163
|
-
if (e.busyTimeout) {
|
|
1164
|
-
i.configure("busyTimeout", e.busyTimeout);
|
|
1165
|
-
}
|
|
1166
|
-
t(i);
|
|
1167
|
-
}
|
|
1168
|
-
});
|
|
1169
|
-
}).then(t => ({
|
|
1170
|
-
query: c.promisify(t.all).bind(t),
|
|
1171
|
-
close: c.promisify(t.close).bind(t)
|
|
1172
|
-
}));
|
|
1173
|
-
this.opts = {
|
|
1174
|
-
table: "keyv",
|
|
1175
|
-
keySize: 255,
|
|
1176
|
-
...e
|
|
1177
|
-
};
|
|
1178
|
-
this.opts.table = M(this.opts.table);
|
|
1179
|
-
const s = Number(this.opts.keySize);
|
|
1180
|
-
if (!Number.isFinite(s) || s <= 0 || s > 65535) {
|
|
1181
|
-
throw new Error("Invalid keySize: must be a positive number between 1 and 65535");
|
|
1182
|
-
}
|
|
1183
|
-
const i = `CREATE TABLE IF NOT EXISTS ${this.opts.table}(key VARCHAR(${s}) PRIMARY KEY, value TEXT )`;
|
|
1184
|
-
const r = this.opts.connect().then(async t => t.query(i).then(() => t)).catch(t => this.emit("error", t));
|
|
1185
|
-
this.query = async (t, ...e) => r.then(async s => s.query(t, ...e));
|
|
1186
|
-
this.close = async () => r.then(t => t.close());
|
|
1187
|
-
}
|
|
1188
|
-
async get(t) {
|
|
1189
|
-
const e = `SELECT * FROM ${this.opts.table} WHERE key = ?`;
|
|
1190
|
-
const s = await this.query(e, t);
|
|
1191
|
-
const i = s[0];
|
|
1192
|
-
if (i === void 0) {
|
|
1193
|
-
return void 0;
|
|
1194
|
-
}
|
|
1195
|
-
return i.value;
|
|
1196
|
-
}
|
|
1197
|
-
async getMany(t) {
|
|
1198
|
-
const e = `SELECT * FROM ${this.opts.table} WHERE key IN (SELECT value FROM json_each(?))`;
|
|
1199
|
-
const s = await this.query(e, JSON.stringify(t));
|
|
1200
|
-
return t.map(t => {
|
|
1201
|
-
const e = s.find(e => e.key === t);
|
|
1202
|
-
return e ? e.value : void 0;
|
|
18
|
+
function s() {
|
|
19
|
+
return function(e, t) {
|
|
20
|
+
(0, r.getMetadataArgsStorage)().entityListeners.push({
|
|
21
|
+
target: e.constructor,
|
|
22
|
+
propertyName: t,
|
|
23
|
+
type: n.EventListenerTypes.AFTER_INSERT
|
|
1203
24
|
});
|
|
1204
|
-
}
|
|
1205
|
-
async set(t, e) {
|
|
1206
|
-
const s = `INSERT INTO ${this.opts.table} (key, value)\n\t\t\tVALUES(?, ?) \n\t\t\tON CONFLICT(key) \n\t\t\tDO UPDATE SET value=excluded.value;`;
|
|
1207
|
-
return this.query(s, t, e);
|
|
1208
|
-
}
|
|
1209
|
-
async delete(t) {
|
|
1210
|
-
const e = `SELECT * FROM ${this.opts.table} WHERE key = ?`;
|
|
1211
|
-
const s = `DELETE FROM ${this.opts.table} WHERE key = ?`;
|
|
1212
|
-
const i = await this.query(e, t);
|
|
1213
|
-
const r = i[0];
|
|
1214
|
-
if (r === void 0) {
|
|
1215
|
-
return false;
|
|
1216
|
-
}
|
|
1217
|
-
await this.query(s, t);
|
|
1218
|
-
return true;
|
|
1219
|
-
}
|
|
1220
|
-
async deleteMany(t) {
|
|
1221
|
-
const e = `DELETE FROM ${this.opts.table} WHERE key IN (SELECT value FROM json_each(?))`;
|
|
1222
|
-
const s = await this.getMany(t);
|
|
1223
|
-
if (s.every(t => t === void 0)) {
|
|
1224
|
-
return false;
|
|
1225
|
-
}
|
|
1226
|
-
await this.query(e, JSON.stringify(t));
|
|
1227
|
-
return true;
|
|
1228
|
-
}
|
|
1229
|
-
async clear() {
|
|
1230
|
-
const t = `DELETE FROM ${this.opts.table} WHERE key LIKE ?`;
|
|
1231
|
-
await this.query(t, this.namespace ? `${this.namespace}:%` : "%");
|
|
1232
|
-
}
|
|
1233
|
-
async* iterator(t) {
|
|
1234
|
-
const e = Number.parseInt(this.opts.iterationLimit, 10) || 10;
|
|
1235
|
-
async function* s(i, r, n) {
|
|
1236
|
-
const a = `SELECT * FROM ${r.table} WHERE key LIKE ? LIMIT ? OFFSET ?`;
|
|
1237
|
-
const o = await n(a, [ `${t ? t + ":" : ""}%`, e, i ]);
|
|
1238
|
-
const c = [ ...o ];
|
|
1239
|
-
if (c.length === 0) {
|
|
1240
|
-
return;
|
|
1241
|
-
}
|
|
1242
|
-
for (const t of c) {
|
|
1243
|
-
i += 1;
|
|
1244
|
-
yield [ t.key, t.value ];
|
|
1245
|
-
}
|
|
1246
|
-
yield* s(i, r, n);
|
|
1247
|
-
}
|
|
1248
|
-
yield* s(0, this.opts, this.query);
|
|
1249
|
-
}
|
|
1250
|
-
async has(t) {
|
|
1251
|
-
const e = `SELECT EXISTS ( SELECT * FROM ${this.opts.table} WHERE key = ? )`;
|
|
1252
|
-
const s = await this.query(e, t);
|
|
1253
|
-
return Object.values(s[0])[0] === 1;
|
|
1254
|
-
}
|
|
1255
|
-
async disconnect() {
|
|
1256
|
-
await this.close();
|
|
1257
|
-
}
|
|
1258
|
-
};
|
|
1259
|
-
|
|
1260
|
-
const P = Object.freeze(Object.defineProperty({
|
|
1261
|
-
__proto__: null,
|
|
1262
|
-
get KeyvSqlite() {
|
|
1263
|
-
return A;
|
|
1264
|
-
}
|
|
1265
|
-
}, Symbol.toStringTag, {
|
|
1266
|
-
value: "Module"
|
|
1267
|
-
}));
|
|
1268
|
-
|
|
1269
|
-
var q;
|
|
1270
|
-
|
|
1271
|
-
var I;
|
|
1272
|
-
|
|
1273
|
-
var F = (t, e = {}) => {
|
|
1274
|
-
if (I !== t) {
|
|
1275
|
-
q = void 0;
|
|
1276
|
-
I = t;
|
|
1277
|
-
}
|
|
1278
|
-
q ??= new w.default.Pool({
|
|
1279
|
-
connectionString: t,
|
|
1280
|
-
...e
|
|
1281
|
-
});
|
|
1282
|
-
return q;
|
|
1283
|
-
};
|
|
1284
|
-
|
|
1285
|
-
var L = async () => {
|
|
1286
|
-
await (q?.end());
|
|
1287
|
-
I = void 0;
|
|
1288
|
-
};
|
|
1289
|
-
|
|
1290
|
-
var D = class extends d.default {
|
|
1291
|
-
ttlSupport;
|
|
1292
|
-
opts;
|
|
1293
|
-
query;
|
|
1294
|
-
namespace;
|
|
1295
|
-
constructor(t) {
|
|
1296
|
-
super();
|
|
1297
|
-
this.ttlSupport = false;
|
|
1298
|
-
if (typeof t === "string") {
|
|
1299
|
-
const e = t;
|
|
1300
|
-
t = {
|
|
1301
|
-
dialect: "postgres",
|
|
1302
|
-
uri: e
|
|
1303
|
-
};
|
|
1304
|
-
} else {
|
|
1305
|
-
t = {
|
|
1306
|
-
dialect: "postgres",
|
|
1307
|
-
uri: "postgresql://localhost:5432",
|
|
1308
|
-
...t
|
|
1309
|
-
};
|
|
1310
|
-
}
|
|
1311
|
-
this.opts = {
|
|
1312
|
-
table: "keyv",
|
|
1313
|
-
schema: "public",
|
|
1314
|
-
keySize: 255,
|
|
1315
|
-
...t
|
|
1316
|
-
};
|
|
1317
|
-
let e = `CREATE${this.opts.useUnloggedTable ? " UNLOGGED " : " "}TABLE IF NOT EXISTS ${this.opts.schema}.${this.opts.table}(key VARCHAR(${Number(this.opts.keySize)}) PRIMARY KEY, value TEXT )`;
|
|
1318
|
-
if (this.opts.schema !== "public") {
|
|
1319
|
-
e = `CREATE SCHEMA IF NOT EXISTS ${this.opts.schema}; ${e}`;
|
|
1320
|
-
}
|
|
1321
|
-
const s = this.connect().then(async t => {
|
|
1322
|
-
try {
|
|
1323
|
-
await t(e);
|
|
1324
|
-
} catch (e) {
|
|
1325
|
-
if (e.code !== "23505") {
|
|
1326
|
-
this.emit("error", e);
|
|
1327
|
-
}
|
|
1328
|
-
return t;
|
|
1329
|
-
}
|
|
1330
|
-
return t;
|
|
1331
|
-
}).catch(t => this.emit("error", t));
|
|
1332
|
-
this.query = async (t, e) => s.then(s => s(t, e));
|
|
1333
|
-
}
|
|
1334
|
-
async get(t) {
|
|
1335
|
-
const e = `SELECT * FROM ${this.opts.schema}.${this.opts.table} WHERE key = $1`;
|
|
1336
|
-
const s = await this.query(e, [ t ]);
|
|
1337
|
-
const i = s[0];
|
|
1338
|
-
return i === void 0 ? void 0 : i.value;
|
|
1339
|
-
}
|
|
1340
|
-
async getMany(t) {
|
|
1341
|
-
const e = `SELECT * FROM ${this.opts.schema}.${this.opts.table} WHERE key = ANY($1)`;
|
|
1342
|
-
const s = await this.query(e, [ t ]);
|
|
1343
|
-
const i = new Map(s.map(t => [ t.key, t ]));
|
|
1344
|
-
return t.map(t => i.get(t)?.value);
|
|
1345
|
-
}
|
|
1346
|
-
async set(t, e) {
|
|
1347
|
-
const s = `INSERT INTO ${this.opts.schema}.${this.opts.table} (key, value)\n VALUES($1, $2) \n ON CONFLICT(key) \n DO UPDATE SET value=excluded.value;`;
|
|
1348
|
-
await this.query(s, [ t, e ]);
|
|
1349
|
-
}
|
|
1350
|
-
async setMany(t) {
|
|
1351
|
-
const e = [];
|
|
1352
|
-
const s = [];
|
|
1353
|
-
for (const {key: i, value: r} of t) {
|
|
1354
|
-
e.push(i);
|
|
1355
|
-
s.push(r);
|
|
1356
|
-
}
|
|
1357
|
-
const i = `INSERT INTO ${this.opts.schema}.${this.opts.table} (key, value)\n SELECT * FROM UNNEST($1::text[], $2::text[])\n ON CONFLICT(key)\n DO UPDATE SET value=excluded.value;`;
|
|
1358
|
-
await this.query(i, [ e, s ]);
|
|
1359
|
-
}
|
|
1360
|
-
async delete(t) {
|
|
1361
|
-
const e = `SELECT * FROM ${this.opts.schema}.${this.opts.table} WHERE key = $1`;
|
|
1362
|
-
const s = `DELETE FROM ${this.opts.schema}.${this.opts.table} WHERE key = $1`;
|
|
1363
|
-
const i = await this.query(e, [ t ]);
|
|
1364
|
-
if (i[0] === void 0) {
|
|
1365
|
-
return false;
|
|
1366
|
-
}
|
|
1367
|
-
await this.query(s, [ t ]);
|
|
1368
|
-
return true;
|
|
1369
|
-
}
|
|
1370
|
-
async deleteMany(t) {
|
|
1371
|
-
const e = `SELECT * FROM ${this.opts.schema}.${this.opts.table} WHERE key = ANY($1)`;
|
|
1372
|
-
const s = `DELETE FROM ${this.opts.schema}.${this.opts.table} WHERE key = ANY($1)`;
|
|
1373
|
-
const i = await this.query(e, [ t ]);
|
|
1374
|
-
if (i[0] === void 0) {
|
|
1375
|
-
return false;
|
|
1376
|
-
}
|
|
1377
|
-
await this.query(s, [ t ]);
|
|
1378
|
-
return true;
|
|
1379
|
-
}
|
|
1380
|
-
async clear() {
|
|
1381
|
-
const t = `DELETE FROM ${this.opts.schema}.${this.opts.table} WHERE key LIKE $1`;
|
|
1382
|
-
await this.query(t, [ this.namespace ? `${this.namespace}:%` : "%" ]);
|
|
1383
|
-
}
|
|
1384
|
-
async* iterator(t) {
|
|
1385
|
-
const e = Number.parseInt(String(this.opts.iterationLimit), 10) || 10;
|
|
1386
|
-
async function* s(i, r, n) {
|
|
1387
|
-
const a = `SELECT * FROM ${r.schema}.${r.table} WHERE key LIKE $1 LIMIT $2 OFFSET $3`;
|
|
1388
|
-
const o = await n(a, [ `${t ? t + ":" : ""}%`, e, i ]);
|
|
1389
|
-
if (o.length === 0) {
|
|
1390
|
-
return;
|
|
1391
|
-
}
|
|
1392
|
-
for (const t of o) {
|
|
1393
|
-
i += 1;
|
|
1394
|
-
yield [ t.key, t.value ];
|
|
1395
|
-
}
|
|
1396
|
-
yield* s(i, r, n);
|
|
1397
|
-
}
|
|
1398
|
-
yield* s(0, this.opts, this.query);
|
|
1399
|
-
}
|
|
1400
|
-
async has(t) {
|
|
1401
|
-
const e = `SELECT EXISTS ( SELECT * FROM ${this.opts.schema}.${this.opts.table} WHERE key = $1 )`;
|
|
1402
|
-
const s = await this.query(e, [ t ]);
|
|
1403
|
-
return s[0].exists;
|
|
1404
|
-
}
|
|
1405
|
-
async connect() {
|
|
1406
|
-
const t = F(this.opts.uri, this.opts);
|
|
1407
|
-
return async (e, s) => {
|
|
1408
|
-
const i = await t.query(e, s);
|
|
1409
|
-
return i.rows;
|
|
1410
|
-
};
|
|
1411
|
-
}
|
|
1412
|
-
async disconnect() {
|
|
1413
|
-
await L();
|
|
1414
|
-
}
|
|
1415
|
-
};
|
|
1416
|
-
|
|
1417
|
-
const z = Object.freeze(Object.defineProperty({
|
|
1418
|
-
__proto__: null,
|
|
1419
|
-
get KeyvPostgres() {
|
|
1420
|
-
return D;
|
|
1421
|
-
}
|
|
1422
|
-
}, Symbol.toStringTag, {
|
|
1423
|
-
value: "Module"
|
|
1424
|
-
}));
|
|
1425
|
-
|
|
1426
|
-
var W;
|
|
1427
|
-
|
|
1428
|
-
var j;
|
|
1429
|
-
|
|
1430
|
-
var H = t => {
|
|
1431
|
-
t = t.replace(/#/g, "%23");
|
|
1432
|
-
const e = new URL(t);
|
|
1433
|
-
const s = {
|
|
1434
|
-
user: decodeURIComponent(e.username),
|
|
1435
|
-
password: decodeURIComponent(e.password) || void 0,
|
|
1436
|
-
host: e.hostname,
|
|
1437
|
-
port: e.port ? Number.parseInt(e.port, 10) : void 0,
|
|
1438
|
-
database: decodeURIComponent(e.pathname.slice(1))
|
|
1439
25
|
};
|
|
1440
|
-
|
|
1441
|
-
if (s[t] === void 0) {
|
|
1442
|
-
delete s[t];
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
return s;
|
|
1446
|
-
};
|
|
1447
|
-
|
|
1448
|
-
var U = (t, e = {}) => {
|
|
1449
|
-
if (j !== t) {
|
|
1450
|
-
W = void 0;
|
|
1451
|
-
j = t;
|
|
1452
|
-
}
|
|
1453
|
-
const s = H(t);
|
|
1454
|
-
const i = {
|
|
1455
|
-
...s,
|
|
1456
|
-
...e
|
|
1457
|
-
};
|
|
1458
|
-
W ??= S.default.createPool(i);
|
|
1459
|
-
return W.promise();
|
|
1460
|
-
};
|
|
1461
|
-
|
|
1462
|
-
var K = () => {
|
|
1463
|
-
if (W) {
|
|
1464
|
-
W.end();
|
|
1465
|
-
}
|
|
1466
|
-
j = void 0;
|
|
1467
|
-
};
|
|
1468
|
-
|
|
1469
|
-
var B = new Set([ "adapter", "compression", "connect", "dialect", "keySize", "table", "ttl", "uri" ]);
|
|
1470
|
-
|
|
1471
|
-
var G = class extends d.default {
|
|
1472
|
-
ttlSupport=false;
|
|
1473
|
-
opts;
|
|
1474
|
-
namespace;
|
|
1475
|
-
query;
|
|
1476
|
-
constructor(t) {
|
|
1477
|
-
super();
|
|
1478
|
-
let e = {
|
|
1479
|
-
dialect: "mysql",
|
|
1480
|
-
uri: "mysql://localhost"
|
|
1481
|
-
};
|
|
1482
|
-
if (typeof t === "string") {
|
|
1483
|
-
e.uri = t;
|
|
1484
|
-
} else {
|
|
1485
|
-
e = {
|
|
1486
|
-
...e,
|
|
1487
|
-
...t
|
|
1488
|
-
};
|
|
1489
|
-
}
|
|
1490
|
-
if (e.intervalExpiration !== void 0 && e.intervalExpiration > 0) {
|
|
1491
|
-
this.ttlSupport = true;
|
|
1492
|
-
}
|
|
1493
|
-
const s = Object.fromEntries(Object.entries(e).filter(([t]) => !B.has(t)));
|
|
1494
|
-
delete s.namespace;
|
|
1495
|
-
delete s.serialize;
|
|
1496
|
-
delete s.deserialize;
|
|
1497
|
-
const i = async () => {
|
|
1498
|
-
const t = U(e.uri, s);
|
|
1499
|
-
return async e => {
|
|
1500
|
-
const s = await t.query(e);
|
|
1501
|
-
return s[0];
|
|
1502
|
-
};
|
|
1503
|
-
};
|
|
1504
|
-
this.opts = {
|
|
1505
|
-
table: "keyv",
|
|
1506
|
-
keySize: 255,
|
|
1507
|
-
...e
|
|
1508
|
-
};
|
|
1509
|
-
const r = `CREATE TABLE IF NOT EXISTS ${this.opts.table}(id VARCHAR(${Number(this.opts.keySize)}) PRIMARY KEY, value TEXT)`;
|
|
1510
|
-
const n = i().then(async t => {
|
|
1511
|
-
await t(r);
|
|
1512
|
-
if (this.opts.intervalExpiration !== void 0 && this.opts.intervalExpiration > 0) {
|
|
1513
|
-
await t("SET GLOBAL event_scheduler = ON;");
|
|
1514
|
-
await t("DROP EVENT IF EXISTS keyv_delete_expired_keys;");
|
|
1515
|
-
await t(`CREATE EVENT IF NOT EXISTS keyv_delete_expired_keys ON SCHEDULE EVERY ${this.opts.intervalExpiration} SECOND\n\t\t\t\t\tDO DELETE FROM ${this.opts.table}\n\t\t\t\t\tWHERE CAST(value->'$.expires' AS UNSIGNED) BETWEEN 1 AND UNIX_TIMESTAMP(NOW(3)) * 1000;`);
|
|
1516
|
-
}
|
|
1517
|
-
return t;
|
|
1518
|
-
}).catch(t => this.emit("error", t));
|
|
1519
|
-
this.query = async t => {
|
|
1520
|
-
const e = await n;
|
|
1521
|
-
return e(t);
|
|
1522
|
-
};
|
|
1523
|
-
}
|
|
1524
|
-
async get(t) {
|
|
1525
|
-
const e = `SELECT * FROM ${this.opts.table} WHERE id = ?`;
|
|
1526
|
-
const s = S.default.format(e, [ t ]);
|
|
1527
|
-
const i = await this.query(s);
|
|
1528
|
-
const r = i[0];
|
|
1529
|
-
return r?.value;
|
|
1530
|
-
}
|
|
1531
|
-
async getMany(t) {
|
|
1532
|
-
const e = `SELECT * FROM ${this.opts.table} WHERE id IN (?)`;
|
|
1533
|
-
const s = S.default.format(e, [ t ]);
|
|
1534
|
-
const i = await this.query(s);
|
|
1535
|
-
const r = [];
|
|
1536
|
-
for (const e of t) {
|
|
1537
|
-
const t = i.findIndex(t => t.id === e);
|
|
1538
|
-
r.push(t === -1 ? void 0 : i[t].value);
|
|
1539
|
-
}
|
|
1540
|
-
return r;
|
|
1541
|
-
}
|
|
1542
|
-
async set(t, e) {
|
|
1543
|
-
const s = `INSERT INTO ${this.opts.table} (id, value)\n\t\t\tVALUES(?, ?)\n\t\t\tON DUPLICATE KEY UPDATE value=?;`;
|
|
1544
|
-
const i = [ t, e, e ];
|
|
1545
|
-
const r = S.default.format(s, i);
|
|
1546
|
-
return this.query(r);
|
|
1547
|
-
}
|
|
1548
|
-
async delete(t) {
|
|
1549
|
-
const e = `SELECT * FROM ${this.opts.table} WHERE id = ?`;
|
|
1550
|
-
const s = S.default.format(e, [ t ]);
|
|
1551
|
-
const i = `DELETE FROM ${this.opts.table} WHERE id = ?`;
|
|
1552
|
-
const r = S.default.format(i, [ t ]);
|
|
1553
|
-
const n = await this.query(s);
|
|
1554
|
-
const a = n[0];
|
|
1555
|
-
if (a === void 0) {
|
|
1556
|
-
return false;
|
|
1557
|
-
}
|
|
1558
|
-
await this.query(r);
|
|
1559
|
-
return true;
|
|
1560
|
-
}
|
|
1561
|
-
async deleteMany(t) {
|
|
1562
|
-
const e = `DELETE FROM ${this.opts.table} WHERE id IN (?)`;
|
|
1563
|
-
const s = S.default.format(e, [ t ]);
|
|
1564
|
-
const i = await this.query(s);
|
|
1565
|
-
return i.affectedRows !== 0;
|
|
1566
|
-
}
|
|
1567
|
-
async clear() {
|
|
1568
|
-
const t = `DELETE FROM ${this.opts.table} WHERE id LIKE ?`;
|
|
1569
|
-
const e = S.default.format(t, [ this.namespace ? `${this.namespace}:%` : "%" ]);
|
|
1570
|
-
await this.query(e);
|
|
1571
|
-
}
|
|
1572
|
-
async* iterator(t) {
|
|
1573
|
-
const e = Number.parseInt(this.opts.iterationLimit, 10) || 10;
|
|
1574
|
-
async function* s(i, r, n) {
|
|
1575
|
-
const a = `SELECT * FROM ${r.table} WHERE id LIKE ? LIMIT ? OFFSET ?`;
|
|
1576
|
-
const o = S.default.format(a, [ `${t ? t + ":" : ""}%`, e, i ]);
|
|
1577
|
-
const c = await n(o);
|
|
1578
|
-
if (c.length === 0) {
|
|
1579
|
-
return;
|
|
1580
|
-
}
|
|
1581
|
-
for (const t of c) {
|
|
1582
|
-
i += 1;
|
|
1583
|
-
yield [ t.id, t.value ];
|
|
1584
|
-
}
|
|
1585
|
-
yield* s(i, r, n);
|
|
1586
|
-
}
|
|
1587
|
-
yield* s(0, this.opts, this.query);
|
|
1588
|
-
}
|
|
1589
|
-
async has(t) {
|
|
1590
|
-
const e = `SELECT EXISTS ( SELECT * FROM ${this.opts.table} WHERE id = ? )`;
|
|
1591
|
-
const s = S.default.format(e, [ t ]);
|
|
1592
|
-
const i = await this.query(s);
|
|
1593
|
-
return Object.values(i[0])[0] === 1;
|
|
1594
|
-
}
|
|
1595
|
-
async disconnect() {
|
|
1596
|
-
K();
|
|
1597
|
-
}
|
|
1598
|
-
};
|
|
1599
|
-
|
|
1600
|
-
const X = Object.freeze(Object.defineProperty({
|
|
1601
|
-
__proto__: null,
|
|
1602
|
-
get KeyvMysql() {
|
|
1603
|
-
return G;
|
|
1604
|
-
}
|
|
1605
|
-
}, Symbol.toStringTag, {
|
|
1606
|
-
value: "Module"
|
|
1607
|
-
}));
|
|
1608
|
-
|
|
1609
|
-
exports.index = k;
|
|
1610
|
-
|
|
1611
|
-
exports.index$1 = C;
|
|
1612
|
-
|
|
1613
|
-
exports.index$2 = R;
|
|
1614
|
-
|
|
1615
|
-
exports.index$3 = P;
|
|
1616
|
-
|
|
1617
|
-
exports.index$4 = z;
|
|
1618
|
-
|
|
1619
|
-
exports.index$5 = X;
|
|
1620
|
-
|
|
1621
|
-
exports.requireDist = _;
|
|
26
|
+
}
|