lakutata 2.0.98 → 2.0.100
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 +5 -7
- package/com/cacher.mjs +5 -7
- package/com/database.cjs +4 -6
- package/com/database.mjs +4 -6
- package/com/docker.cjs +18 -20
- package/com/docker.mjs +6 -8
- package/com/entrypoint.cjs +6 -8
- package/com/entrypoint.mjs +6 -8
- package/com/logger.cjs +5 -7
- package/com/logger.mjs +5 -7
- package/com/monitor.cjs +5 -7
- package/com/monitor.mjs +5 -7
- package/decorator/asst.cjs +4 -4
- package/decorator/asst.mjs +4 -4
- package/decorator/ctrl.cjs +5 -5
- package/decorator/ctrl.mjs +5 -5
- package/decorator/di.cjs +4 -4
- package/decorator/di.mjs +4 -4
- package/decorator/dto.cjs +4 -4
- package/decorator/dto.mjs +4 -4
- package/decorator/orm.cjs +1 -1
- package/decorator/orm.mjs +1 -1
- package/dtos.cjs +4 -4
- package/dtos.mjs +4 -4
- package/helper.cjs +21 -23
- package/helper.mjs +5 -7
- package/lakutata.cjs +7 -9
- package/lakutata.mjs +7 -9
- package/orm.cjs +1 -1
- package/orm.mjs +1 -1
- package/package.json +1 -1
- package/provider/database.cjs +4 -6
- package/provider/database.mjs +4 -6
- package/provider/passwordHash.cjs +4 -6
- package/provider/passwordHash.mjs +4 -6
- package/src/components/Database.cjs +4 -6
- package/src/components/Database.mjs +4 -6
- package/src/components/Logger.cjs +4 -6
- package/src/components/Logger.mjs +4 -6
- package/src/components/cacher/Cacher.cjs +10 -12
- package/src/components/cacher/Cacher.mjs +4 -6
- package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +2 -2
- package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +2 -2
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.cjs +6 -6
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.mjs +6 -6
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.cjs +19 -19
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.mjs +16 -16
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.cjs +6 -6
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.mjs +17 -17
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.cjs +14 -14
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.mjs +6 -6
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.cjs +6 -6
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.mjs +26 -26
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.cjs +10 -10
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.mjs +10 -10
- package/src/components/cacher/exceptions/CacheDriverNotFoundException.cjs +4 -4
- package/src/components/cacher/exceptions/CacheDriverNotFoundException.mjs +4 -4
- 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 +5 -5
- package/src/components/cacher/lib/IsDriverPackageInstalled.mjs +5 -5
- package/src/components/cacher/options/FileCacheOptions.cjs +4 -4
- package/src/components/cacher/options/FileCacheOptions.mjs +4 -4
- package/src/components/cacher/options/MemcacheCacheOptions.cjs +4 -4
- package/src/components/cacher/options/MemcacheCacheOptions.mjs +4 -4
- package/src/components/cacher/options/MongoCacheOptions.cjs +4 -4
- package/src/components/cacher/options/MongoCacheOptions.mjs +4 -4
- package/src/components/cacher/options/MysqlCacheOptions.cjs +4 -4
- package/src/components/cacher/options/MysqlCacheOptions.mjs +15 -15
- package/src/components/cacher/options/PostgresCacheOptions.cjs +4 -4
- package/src/components/cacher/options/PostgresCacheOptions.mjs +4 -4
- package/src/components/cacher/options/RedisCacheOptions.cjs +4 -4
- package/src/components/cacher/options/RedisCacheOptions.mjs +4 -4
- package/src/components/cacher/options/SqliteCacheOptions.cjs +4 -4
- package/src/components/cacher/options/SqliteCacheOptions.mjs +10 -10
- package/src/components/cacher/types/CacheStoreOptions.cjs +1 -1
- package/src/components/cacher/types/CacheStoreOptions.mjs +1 -1
- package/src/components/docker/ConnectionOptionsBuilder.cjs +6 -8
- package/src/components/docker/ConnectionOptionsBuilder.mjs +6 -8
- package/src/components/docker/Docker.cjs +3 -5
- package/src/components/docker/Docker.mjs +3 -5
- package/src/components/docker/exceptions/DockerConnectionException.cjs +4 -4
- package/src/components/docker/exceptions/DockerConnectionException.mjs +4 -4
- package/src/components/docker/exceptions/DockerImageBuildException.cjs +4 -4
- package/src/components/docker/exceptions/DockerImageBuildException.mjs +4 -4
- package/src/components/docker/exceptions/DockerImageImportException.cjs +4 -4
- package/src/components/docker/exceptions/DockerImageImportException.mjs +4 -4
- package/src/components/docker/exceptions/DockerImageNotFoundException.cjs +4 -4
- package/src/components/docker/exceptions/DockerImageNotFoundException.mjs +4 -4
- package/src/components/docker/exceptions/DockerImagePullException.cjs +4 -4
- package/src/components/docker/exceptions/DockerImagePullException.mjs +4 -4
- package/src/components/docker/exceptions/DockerImagePushException.cjs +4 -4
- package/src/components/docker/exceptions/DockerImagePushException.mjs +4 -4
- package/src/components/docker/exceptions/DockerImageRepoTagNotFoundException.cjs +4 -4
- package/src/components/docker/exceptions/DockerImageRepoTagNotFoundException.mjs +4 -4
- package/src/components/docker/exceptions/DockerNetworkNotFoundException.cjs +4 -4
- package/src/components/docker/exceptions/DockerNetworkNotFoundException.mjs +4 -4
- 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 +9 -11
- package/src/components/docker/lib/DockerContainer.mjs +9 -11
- package/src/components/docker/lib/DockerContainerTTY.cjs +5 -7
- package/src/components/docker/lib/DockerContainerTTY.mjs +5 -7
- package/src/components/docker/lib/DockerImage.cjs +3 -5
- package/src/components/docker/lib/DockerImage.mjs +7 -9
- 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 +4 -4
- package/src/components/docker/options/DockerPruneOptions.mjs +4 -4
- package/src/components/docker/options/auth/DockerAuthOptions.cjs +4 -4
- package/src/components/docker/options/auth/DockerAuthOptions.mjs +4 -4
- package/src/components/docker/options/container/ContainerCommitOptions.cjs +4 -4
- package/src/components/docker/options/container/ContainerCommitOptions.mjs +4 -4
- package/src/components/docker/options/container/ContainerCreateTTYOptions.cjs +4 -4
- package/src/components/docker/options/container/ContainerCreateTTYOptions.mjs +4 -4
- package/src/components/docker/options/container/ContainerExecOptions.cjs +4 -4
- package/src/components/docker/options/container/ContainerExecOptions.mjs +4 -4
- package/src/components/docker/options/container/ContainerExportDirectoryOptions.cjs +4 -4
- package/src/components/docker/options/container/ContainerExportDirectoryOptions.mjs +4 -4
- package/src/components/docker/options/container/ContainerKillOptions.cjs +4 -4
- package/src/components/docker/options/container/ContainerKillOptions.mjs +8 -8
- package/src/components/docker/options/container/ContainerLogsOptions.cjs +4 -4
- package/src/components/docker/options/container/ContainerLogsOptions.mjs +4 -4
- package/src/components/docker/options/container/ContainerRemoveOptions.cjs +4 -4
- package/src/components/docker/options/container/ContainerRemoveOptions.mjs +8 -8
- package/src/components/docker/options/container/ContainerSettingOptions.cjs +4 -4
- package/src/components/docker/options/container/ContainerSettingOptions.mjs +4 -4
- package/src/components/docker/options/container/ContainerStopOptions.cjs +4 -4
- package/src/components/docker/options/container/ContainerStopOptions.mjs +7 -7
- package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.cjs +4 -4
- package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.mjs +4 -4
- package/src/components/docker/options/image/ImageBuildOptions.cjs +21 -21
- package/src/components/docker/options/image/ImageBuildOptions.mjs +4 -4
- package/src/components/docker/options/image/ImageExportOptions.cjs +4 -4
- package/src/components/docker/options/image/ImageExportOptions.mjs +10 -10
- package/src/components/docker/options/image/ImageImportOptions.cjs +4 -4
- package/src/components/docker/options/image/ImageImportOptions.mjs +4 -4
- package/src/components/docker/options/image/ImagePullOptions.cjs +4 -4
- package/src/components/docker/options/image/ImagePullOptions.mjs +4 -4
- package/src/components/docker/options/image/ImagePushOptions.cjs +4 -4
- package/src/components/docker/options/image/ImagePushOptions.mjs +4 -4
- package/src/components/docker/options/image/ImageRemoveOptions.cjs +4 -4
- package/src/components/docker/options/image/ImageRemoveOptions.mjs +4 -4
- package/src/components/docker/options/image/ImageTagOptions.cjs +4 -4
- package/src/components/docker/options/image/ImageTagOptions.mjs +4 -4
- package/src/components/docker/options/network/NetworkCreateOptions.cjs +4 -4
- package/src/components/docker/options/network/NetworkCreateOptions.mjs +11 -11
- 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 +57 -59
- package/src/components/entrypoint/Entrypoint.mjs +5 -7
- package/src/components/entrypoint/exceptions/AccessDenyException.cjs +4 -4
- package/src/components/entrypoint/exceptions/AccessDenyException.mjs +4 -4
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.cjs +4 -4
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.mjs +4 -4
- package/src/components/entrypoint/exceptions/DuplicateActionNameException.cjs +4 -4
- package/src/components/entrypoint/exceptions/DuplicateActionNameException.mjs +4 -4
- package/src/components/entrypoint/exceptions/InvalidActionGroupException.cjs +4 -4
- package/src/components/entrypoint/exceptions/InvalidActionGroupException.mjs +4 -4
- package/src/components/entrypoint/lib/AccessControl.cjs +10 -12
- package/src/components/entrypoint/lib/AccessControl.mjs +16 -18
- package/src/components/entrypoint/lib/AccessControlRule.cjs +4 -6
- package/src/components/entrypoint/lib/AccessControlRule.mjs +4 -6
- package/src/components/entrypoint/lib/Controller.cjs +4 -6
- package/src/components/entrypoint/lib/Controller.mjs +4 -6
- package/src/components/monitor/AliveMonitor.cjs +4 -6
- package/src/components/monitor/AliveMonitor.mjs +4 -6
- package/src/components/monitor/CpuMonitor.cjs +5 -7
- package/src/components/monitor/CpuMonitor.mjs +5 -7
- package/src/components/monitor/EventLoopMonitor.cjs +4 -6
- package/src/components/monitor/EventLoopMonitor.mjs +4 -6
- package/src/components/monitor/HttpRequestMonitor.cjs +5 -7
- package/src/components/monitor/HttpRequestMonitor.mjs +5 -7
- package/src/components/monitor/MemoryMonitor.cjs +5 -7
- package/src/components/monitor/MemoryMonitor.mjs +5 -7
- 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 +1 -1
- package/src/constants/DIMetadataKey.mjs +1 -1
- package/src/constants/DTOMetadataKey.cjs +1 -1
- package/src/constants/DTOMetadataKey.mjs +1 -1
- package/src/decorators/asst/After.cjs +5 -5
- package/src/decorators/asst/After.mjs +8 -8
- package/src/decorators/asst/Before.cjs +5 -5
- package/src/decorators/asst/Before.mjs +8 -8
- package/src/decorators/ctrl/CLIAction.cjs +5 -5
- package/src/decorators/ctrl/CLIAction.mjs +11 -11
- package/src/decorators/ctrl/HTTPAction.cjs +5 -5
- package/src/decorators/ctrl/HTTPAction.mjs +9 -9
- package/src/decorators/ctrl/ServiceAction.cjs +7 -7
- package/src/decorators/ctrl/ServiceAction.mjs +9 -9
- package/src/decorators/ctrl/http/DELETE.cjs +5 -5
- package/src/decorators/ctrl/http/DELETE.mjs +5 -5
- package/src/decorators/ctrl/http/GET.cjs +5 -5
- package/src/decorators/ctrl/http/GET.mjs +5 -5
- package/src/decorators/ctrl/http/HEAD.cjs +5 -5
- package/src/decorators/ctrl/http/HEAD.mjs +5 -5
- package/src/decorators/ctrl/http/OPTIONS.cjs +5 -5
- package/src/decorators/ctrl/http/OPTIONS.mjs +8 -8
- package/src/decorators/ctrl/http/PATCH.cjs +5 -5
- package/src/decorators/ctrl/http/PATCH.mjs +8 -8
- package/src/decorators/ctrl/http/POST.cjs +5 -5
- package/src/decorators/ctrl/http/POST.mjs +8 -8
- package/src/decorators/ctrl/http/PUT.cjs +5 -5
- package/src/decorators/ctrl/http/PUT.mjs +8 -8
- package/src/decorators/di/Autoload.cjs +1 -1
- package/src/decorators/di/Autoload.mjs +1 -1
- package/src/decorators/di/Configurable.cjs +3 -3
- package/src/decorators/di/Configurable.mjs +3 -3
- package/src/decorators/di/Inject.cjs +9 -9
- package/src/decorators/di/Inject.mjs +14 -14
- package/src/decorators/di/Lifetime.cjs +4 -4
- package/src/decorators/di/Lifetime.mjs +10 -10
- package/src/decorators/dto/Accept.cjs +4 -4
- package/src/decorators/dto/Accept.mjs +4 -4
- package/src/decorators/dto/Expect.cjs +4 -4
- package/src/decorators/dto/Expect.mjs +8 -8
- package/src/decorators/dto/IndexSignature.cjs +4 -4
- package/src/decorators/dto/IndexSignature.mjs +8 -8
- package/src/decorators/dto/Return.cjs +4 -4
- package/src/decorators/dto/Return.mjs +4 -4
- package/src/decorators/orm/AfterInsert.cjs +1 -1
- package/src/decorators/orm/AfterInsert.mjs +1 -1
- package/src/decorators/orm/AfterLoad.cjs +1 -1
- package/src/decorators/orm/AfterLoad.mjs +1 -1
- package/src/decorators/orm/AfterRecover.cjs +1 -1
- package/src/decorators/orm/AfterRecover.mjs +1 -1
- package/src/decorators/orm/AfterRemove.cjs +1 -1
- package/src/decorators/orm/AfterRemove.mjs +1 -1
- package/src/decorators/orm/AfterSoftRemove.cjs +1 -1
- package/src/decorators/orm/AfterSoftRemove.mjs +1 -1
- package/src/decorators/orm/AfterUpdate.cjs +1 -1
- package/src/decorators/orm/AfterUpdate.mjs +1 -1
- package/src/decorators/orm/BeforeInsert.cjs +1 -1
- package/src/decorators/orm/BeforeInsert.mjs +1 -1
- package/src/decorators/orm/BeforeRecover.cjs +1 -1
- package/src/decorators/orm/BeforeRecover.mjs +1 -1
- package/src/decorators/orm/BeforeRemove.cjs +1 -1
- package/src/decorators/orm/BeforeRemove.mjs +1 -1
- package/src/decorators/orm/BeforeSoftRemove.cjs +1 -1
- package/src/decorators/orm/BeforeSoftRemove.mjs +1 -1
- package/src/decorators/orm/BeforeUpdate.cjs +1 -1
- package/src/decorators/orm/BeforeUpdate.mjs +1 -1
- package/src/decorators/orm/Check.cjs +1 -1
- package/src/decorators/orm/Check.mjs +1 -1
- package/src/decorators/orm/ChildEntity.cjs +1 -1
- package/src/decorators/orm/ChildEntity.mjs +1 -1
- package/src/decorators/orm/Column.cjs +1 -1
- package/src/decorators/orm/Column.mjs +1 -1
- package/src/decorators/orm/CreateDateColumn.cjs +1 -1
- package/src/decorators/orm/CreateDateColumn.mjs +1 -1
- package/src/decorators/orm/DeleteDateColumn.cjs +1 -1
- package/src/decorators/orm/DeleteDateColumn.mjs +1 -1
- package/src/decorators/orm/Entity.cjs +1 -1
- package/src/decorators/orm/Entity.mjs +1 -1
- package/src/decorators/orm/EventSubscriber.cjs +1 -1
- package/src/decorators/orm/EventSubscriber.mjs +1 -1
- package/src/decorators/orm/Exclusion.cjs +1 -1
- package/src/decorators/orm/Exclusion.mjs +1 -1
- package/src/decorators/orm/Generated.cjs +1 -1
- package/src/decorators/orm/Generated.mjs +1 -1
- package/src/decorators/orm/Index.cjs +1 -1
- package/src/decorators/orm/Index.mjs +1 -1
- package/src/decorators/orm/JoinColumn.cjs +1 -1
- package/src/decorators/orm/JoinColumn.mjs +1 -1
- package/src/decorators/orm/JoinTable.cjs +1 -1
- package/src/decorators/orm/JoinTable.mjs +1 -1
- package/src/decorators/orm/ManyToMany.cjs +1 -1
- package/src/decorators/orm/ManyToMany.mjs +1 -1
- package/src/decorators/orm/ManyToOne.cjs +1 -1
- package/src/decorators/orm/ManyToOne.mjs +1 -1
- package/src/decorators/orm/ObjectIdColumn.cjs +1 -1
- package/src/decorators/orm/ObjectIdColumn.mjs +1 -1
- package/src/decorators/orm/OneToMany.cjs +1 -1
- package/src/decorators/orm/OneToMany.mjs +1 -1
- package/src/decorators/orm/OneToOne.cjs +1 -1
- package/src/decorators/orm/OneToOne.mjs +1 -1
- package/src/decorators/orm/PrimaryColumn.cjs +1 -1
- package/src/decorators/orm/PrimaryColumn.mjs +1 -1
- package/src/decorators/orm/PrimaryGeneratedColumn.cjs +1 -1
- package/src/decorators/orm/PrimaryGeneratedColumn.mjs +1 -1
- package/src/decorators/orm/RelationId.cjs +1 -1
- package/src/decorators/orm/RelationId.mjs +1 -1
- package/src/decorators/orm/TableInheritance.cjs +1 -1
- package/src/decorators/orm/TableInheritance.mjs +1 -1
- package/src/decorators/orm/Tree.cjs +1 -1
- package/src/decorators/orm/Tree.mjs +1 -1
- package/src/decorators/orm/TreeChildren.cjs +1 -1
- package/src/decorators/orm/TreeChildren.mjs +1 -1
- package/src/decorators/orm/TreeLevelColumn.cjs +1 -1
- package/src/decorators/orm/TreeLevelColumn.mjs +1 -1
- package/src/decorators/orm/TreeParent.cjs +1 -1
- package/src/decorators/orm/TreeParent.mjs +1 -1
- package/src/decorators/orm/Unique.cjs +1 -1
- package/src/decorators/orm/Unique.mjs +1 -1
- package/src/decorators/orm/UpdateDateColumn.cjs +1 -1
- package/src/decorators/orm/UpdateDateColumn.mjs +1 -1
- package/src/decorators/orm/VersionColumn.cjs +1 -1
- package/src/decorators/orm/VersionColumn.mjs +1 -1
- package/src/decorators/orm/ViewColumn.cjs +1 -1
- package/src/decorators/orm/ViewColumn.mjs +1 -1
- package/src/decorators/orm/ViewEntity.cjs +1 -1
- package/src/decorators/orm/ViewEntity.mjs +1 -1
- package/src/decorators/orm/VirtualColumn.cjs +1 -1
- package/src/decorators/orm/VirtualColumn.mjs +1 -1
- package/src/dto/PaginationResultDTO.cjs +4 -4
- package/src/dto/PaginationResultDTO.mjs +13 -13
- package/src/dto/PaginationSearchDTO.cjs +4 -4
- package/src/dto/PaginationSearchDTO.mjs +9 -9
- package/src/exceptions/DestroyRuntimeContainerException.cjs +4 -4
- package/src/exceptions/DestroyRuntimeContainerException.mjs +4 -4
- package/src/exceptions/InvalidActionPatternDepthException.cjs +4 -4
- package/src/exceptions/InvalidActionPatternDepthException.mjs +4 -4
- package/src/exceptions/InvalidAssistantFunctionTypeException.cjs +4 -4
- package/src/exceptions/InvalidAssistantFunctionTypeException.mjs +4 -4
- package/src/exceptions/InvalidObjectTypeException.cjs +4 -4
- package/src/exceptions/InvalidObjectTypeException.mjs +4 -4
- package/src/exceptions/MethodNotFoundException.cjs +4 -4
- package/src/exceptions/MethodNotFoundException.mjs +4 -4
- package/src/exceptions/alias/AliasExistsException.cjs +4 -4
- package/src/exceptions/alias/AliasExistsException.mjs +6 -6
- package/src/exceptions/alias/AliasNotFoundException.cjs +4 -4
- package/src/exceptions/alias/AliasNotFoundException.mjs +4 -4
- package/src/exceptions/alias/InvalidAliasNameException.cjs +4 -4
- package/src/exceptions/alias/InvalidAliasNameException.mjs +4 -4
- package/src/exceptions/di/DependencyInjectionException.cjs +4 -4
- package/src/exceptions/di/DependencyInjectionException.mjs +4 -4
- package/src/exceptions/di/LifetimeLockedException.cjs +4 -4
- package/src/exceptions/di/LifetimeLockedException.mjs +4 -4
- package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.cjs +4 -4
- package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.mjs +4 -4
- package/src/exceptions/dto/InvalidMethodAcceptException.cjs +4 -4
- package/src/exceptions/dto/InvalidMethodAcceptException.mjs +4 -4
- package/src/exceptions/dto/InvalidMethodReturnException.cjs +4 -4
- package/src/exceptions/dto/InvalidMethodReturnException.mjs +4 -4
- package/src/exceptions/dto/InvalidValueException.cjs +4 -4
- package/src/exceptions/dto/InvalidValueException.mjs +4 -4
- 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 +1 -3
- package/src/lib/base/BaseObject.mjs +1 -3
- package/src/lib/base/Context.cjs +4 -4
- package/src/lib/base/Context.mjs +11 -11
- package/src/lib/base/EventEmitter.cjs +1 -1
- package/src/lib/base/EventEmitter.mjs +1 -1
- package/src/lib/base/abstracts/Exception.cjs +119 -9
- package/src/lib/base/abstracts/Exception.mjs +124 -14
- 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 +4 -4
- package/src/lib/base/internal/ActionOptions.mjs +4 -4
- package/src/lib/base/internal/ApplicationConfigLoader.cjs +3 -5
- package/src/lib/base/internal/ApplicationConfigLoader.mjs +3 -5
- package/src/lib/base/internal/BasicInfo.cjs +7 -35
- package/src/lib/base/internal/BasicInfo.mjs +4 -34
- 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 +1 -1
- package/src/lib/base/internal/ConfigurableRecordsInjection.mjs +1 -1
- package/src/lib/base/internal/ConstructorSymbol.cjs +1 -1
- package/src/lib/base/internal/ConstructorSymbol.mjs +1 -1
- package/src/lib/base/internal/ControllerEntrypoint.cjs +14 -14
- package/src/lib/base/internal/ControllerEntrypoint.mjs +5 -5
- package/src/lib/base/internal/DataValidator.cjs +3 -3
- package/src/lib/base/internal/DataValidator.mjs +12 -12
- 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 +4 -4
- package/src/lib/base/internal/FlexibleDTO.mjs +8 -8
- package/src/lib/base/internal/GetActionDTOAndOptions.cjs +4 -4
- package/src/lib/base/internal/GetActionDTOAndOptions.mjs +4 -4
- 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 +3 -3
- package/src/lib/base/internal/MethodAssistantFunction.mjs +3 -3
- package/src/lib/base/internal/MethodValidation.cjs +3 -3
- package/src/lib/base/internal/MethodValidation.mjs +3 -3
- package/src/lib/base/internal/ModuleConfigLoader.cjs +3 -5
- package/src/lib/base/internal/ModuleConfigLoader.mjs +19 -21
- package/src/lib/base/internal/ObjectConfiguration.cjs +3 -3
- package/src/lib/base/internal/ObjectConfiguration.mjs +3 -3
- package/src/lib/base/internal/ObjectContainer.cjs +1 -1
- package/src/lib/base/internal/ObjectContainer.mjs +1 -1
- package/src/lib/base/internal/ObjectInjection.cjs +1 -1
- package/src/lib/base/internal/ObjectInjection.mjs +1 -1
- package/src/lib/base/internal/ObjectLifetime.cjs +4 -4
- package/src/lib/base/internal/ObjectLifetime.mjs +4 -4
- package/src/lib/base/internal/ObjectSchemaValidation.cjs +3 -3
- package/src/lib/base/internal/ObjectSchemaValidation.mjs +3 -3
- package/src/lib/base/internal/ObjectType.cjs +4 -6
- package/src/lib/base/internal/ObjectType.mjs +4 -6
- 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 +1 -1
- package/src/lib/base/internal/PatternManager.mjs +1 -1
- package/src/lib/base/internal/StringifyPattern.cjs +2 -2
- package/src/lib/base/internal/StringifyPattern.mjs +2 -2
- package/src/lib/base/internal/ThrowWarning.cjs +1 -1
- package/src/lib/base/internal/ThrowWarning.mjs +1 -1
- package/src/lib/context/CLIContext.cjs +4 -4
- package/src/lib/context/CLIContext.mjs +4 -4
- package/src/lib/context/HTTPContext.cjs +4 -4
- package/src/lib/context/HTTPContext.mjs +9 -9
- package/src/lib/context/ServiceContext.cjs +4 -4
- package/src/lib/context/ServiceContext.mjs +4 -4
- package/src/lib/core/Alias.cjs +46 -46
- package/src/lib/core/Alias.mjs +32 -32
- package/src/lib/core/Application.cjs +6 -8
- package/src/lib/core/Application.mjs +6 -8
- package/src/lib/core/Component.cjs +4 -6
- package/src/lib/core/Component.mjs +4 -6
- package/src/lib/core/Container.cjs +1 -3
- package/src/lib/core/Container.mjs +1 -3
- package/src/lib/core/DTO.cjs +3 -3
- package/src/lib/core/DTO.mjs +3 -3
- package/src/lib/core/Module.cjs +8 -10
- package/src/lib/core/Module.mjs +3 -5
- package/src/lib/core/Provider.cjs +4 -6
- package/src/lib/core/Provider.mjs +4 -6
- package/src/lib/core/Time.cjs +52 -5
- package/src/lib/core/Time.mjs +52 -5
- 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 +1 -1
- package/src/lib/helpers/Glob.mjs +1 -1
- 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 +1 -1
- package/src/lib/helpers/IsGlobString.mjs +1 -1
- package/src/lib/helpers/IsHtml.cjs +1 -1
- package/src/lib/helpers/IsHtml.mjs +1 -1
- 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 +4 -4
- package/src/lib/helpers/IsSymbol.mjs +4 -4
- package/src/lib/helpers/IsXML.cjs +1 -1
- package/src/lib/helpers/IsXML.mjs +1 -1
- package/src/lib/helpers/MD5.cjs +2 -2
- package/src/lib/helpers/MD5.mjs +2 -2
- 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 +1 -1
- package/src/lib/helpers/NonceStr.mjs +1 -1
- package/src/lib/helpers/ObjectConstructor.cjs +1 -1
- package/src/lib/helpers/ObjectConstructor.mjs +1 -1
- package/src/lib/helpers/ObjectHash.cjs +1 -1
- package/src/lib/helpers/ObjectHash.mjs +1 -1
- 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 +1 -1
- package/src/lib/helpers/RandomString.mjs +1 -1
- package/src/lib/helpers/SHA1.cjs +2 -2
- package/src/lib/helpers/SHA1.mjs +2 -2
- package/src/lib/helpers/SHA256.cjs +2 -2
- package/src/lib/helpers/SHA256.mjs +2 -2
- package/src/lib/helpers/SetToArray.cjs +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 -2
- package/src/lib/helpers/SortArray.mjs +2 -2
- 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 +1 -1
- package/src/lib/helpers/URLBuilder.mjs +1 -1
- package/src/lib/helpers/UUID.cjs +2 -2
- package/src/lib/helpers/UUID.mjs +2 -2
- 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 +12 -12
- package/src/lib/ioc/DependencyInjectionContainer.mjs +7 -7
- package/src/lib/ioc/Errors.cjs +3 -3
- package/src/lib/ioc/Errors.mjs +8 -8
- 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 +107 -107
- package/src/lib/ioc/ListModules.mjs +4 -4
- package/src/lib/ioc/LoadModules.cjs +3 -3
- package/src/lib/ioc/LoadModules.mjs +39 -39
- package/src/lib/ioc/ParamParser.cjs +1 -1
- package/src/lib/ioc/ParamParser.mjs +1 -1
- package/src/lib/ioc/Resolvers.cjs +4 -4
- package/src/lib/ioc/Resolvers.mjs +7 -7
- package/src/lib/ioc/Utils.cjs +7 -7
- package/src/lib/ioc/Utils.mjs +3 -3
- package/src/lib/validation/VLD.cjs +3 -3
- package/src/lib/validation/VLD.mjs +3 -3
- 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 +4 -6
- package/src/options/ApplicationOptions.mjs +4 -6
- package/src/options/LoadAnonymousObjectOptions.cjs +4 -6
- package/src/options/LoadAnonymousObjectOptions.mjs +4 -6
- package/src/options/LoadNamedObjectOptions.cjs +4 -6
- package/src/options/LoadNamedObjectOptions.mjs +4 -6
- package/src/options/LoadObjectOptions.cjs +4 -6
- package/src/options/LoadObjectOptions.mjs +4 -6
- package/src/options/ModuleLoadObjectsOptions.cjs +4 -6
- package/src/options/ModuleLoadObjectsOptions.mjs +4 -6
- package/src/options/ModuleOptions.cjs +4 -6
- package/src/options/ModuleOptions.mjs +4 -6
- package/src/options/OverridableNamedObjectOptions.cjs +4 -6
- package/src/options/OverridableNamedObjectOptions.mjs +8 -10
- package/src/options/OverridableObjectOptions.cjs +4 -6
- package/src/options/OverridableObjectOptions.mjs +4 -6
- package/src/providers/Database.cjs +3 -5
- package/src/providers/Database.mjs +3 -5
- package/src/providers/PasswordHash.cjs +8 -10
- package/src/providers/PasswordHash.mjs +180 -182
- package/src/providers/migration/GenerateMigration.cjs +7 -9
- package/src/providers/migration/GenerateMigration.mjs +7 -9
- 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 +1 -1
- package/vendor/Package.internal.1.mjs +1 -1
- package/vendor/Package.internal.10.cjs +1 -1
- package/vendor/Package.internal.10.mjs +1 -1
- package/vendor/Package.internal.11.cjs +1 -1
- package/vendor/Package.internal.11.mjs +1 -1
- package/vendor/Package.internal.12.cjs +1 -1
- package/vendor/Package.internal.12.mjs +1 -1
- package/vendor/Package.internal.13.cjs +1 -1
- package/vendor/Package.internal.13.mjs +1 -1
- package/vendor/Package.internal.14.cjs +1 -1
- package/vendor/Package.internal.14.mjs +1 -1
- package/vendor/Package.internal.15.cjs +1 -1
- package/vendor/Package.internal.15.mjs +1 -1
- package/vendor/Package.internal.16.cjs +1 -1
- package/vendor/Package.internal.16.mjs +1 -1
- package/vendor/Package.internal.17.cjs +1 -1
- package/vendor/Package.internal.17.mjs +1 -1
- package/vendor/Package.internal.18.cjs +1 -1
- package/vendor/Package.internal.18.mjs +1 -1
- package/vendor/Package.internal.19.cjs +1 -1
- package/vendor/Package.internal.19.mjs +1 -1
- package/vendor/Package.internal.2.cjs +1 -1
- package/vendor/Package.internal.2.mjs +1 -1
- package/vendor/Package.internal.20.cjs +1 -1
- package/vendor/Package.internal.20.mjs +1 -1
- package/vendor/Package.internal.21.cjs +1 -1
- package/vendor/Package.internal.21.mjs +1 -1
- package/vendor/Package.internal.22.cjs +1 -1
- package/vendor/Package.internal.22.mjs +1 -1
- package/vendor/Package.internal.23.cjs +1 -1
- package/vendor/Package.internal.23.mjs +1 -1
- package/vendor/Package.internal.24.cjs +1 -1
- package/vendor/Package.internal.24.mjs +1 -1
- package/vendor/Package.internal.25.cjs +1 -1
- package/vendor/Package.internal.25.mjs +1 -1
- package/vendor/Package.internal.26.cjs +1 -1
- package/vendor/Package.internal.26.mjs +1 -1
- package/vendor/Package.internal.27.cjs +1 -1
- package/vendor/Package.internal.27.mjs +1 -1
- package/vendor/Package.internal.28.cjs +1 -1
- package/vendor/Package.internal.28.mjs +1 -1
- package/vendor/Package.internal.29.cjs +1 -1
- package/vendor/Package.internal.29.mjs +1 -1
- package/vendor/Package.internal.3.cjs +1 -1
- package/vendor/Package.internal.3.mjs +1 -1
- package/vendor/Package.internal.30.cjs +1 -1
- package/vendor/Package.internal.30.mjs +1 -1
- package/vendor/Package.internal.31.cjs +1 -1
- package/vendor/Package.internal.31.mjs +1 -1
- package/vendor/Package.internal.310.cjs +1 -1
- package/vendor/Package.internal.310.mjs +1 -1
- package/vendor/Package.internal.32.cjs +1 -1
- package/vendor/Package.internal.32.mjs +1 -1
- package/vendor/Package.internal.33.cjs +1 -1
- package/vendor/Package.internal.33.mjs +1 -1
- package/vendor/Package.internal.34.cjs +1 -1
- package/vendor/Package.internal.34.mjs +1 -1
- package/vendor/Package.internal.35.cjs +1 -1
- package/vendor/Package.internal.35.mjs +1 -1
- package/vendor/Package.internal.36.cjs +1 -1
- package/vendor/Package.internal.36.mjs +1 -1
- package/vendor/Package.internal.37.cjs +1 -1
- package/vendor/Package.internal.37.mjs +1 -1
- package/vendor/Package.internal.38.cjs +1 -1
- package/vendor/Package.internal.38.mjs +1 -1
- package/vendor/Package.internal.39.cjs +1 -1
- package/vendor/Package.internal.39.mjs +1 -1
- package/vendor/Package.internal.4.cjs +1 -1
- package/vendor/Package.internal.4.mjs +1 -1
- package/vendor/Package.internal.40.cjs +1 -1
- package/vendor/Package.internal.40.mjs +1 -1
- package/vendor/Package.internal.41.cjs +1 -1
- package/vendor/Package.internal.41.mjs +1 -1
- package/vendor/Package.internal.42.cjs +1 -1
- package/vendor/Package.internal.42.mjs +1 -1
- package/vendor/Package.internal.43.cjs +1 -1
- package/vendor/Package.internal.43.mjs +1 -1
- package/vendor/Package.internal.44.cjs +1 -1
- package/vendor/Package.internal.44.mjs +1 -1
- package/vendor/Package.internal.45.cjs +1 -1
- package/vendor/Package.internal.45.mjs +1 -1
- package/vendor/Package.internal.46.cjs +1 -1
- package/vendor/Package.internal.46.mjs +1 -1
- package/vendor/Package.internal.47.cjs +1 -1
- package/vendor/Package.internal.47.mjs +1 -1
- package/vendor/Package.internal.48.cjs +1 -1
- package/vendor/Package.internal.48.mjs +1 -1
- package/vendor/Package.internal.49.cjs +1 -1
- package/vendor/Package.internal.49.mjs +1 -1
- package/vendor/Package.internal.5.cjs +192 -156
- package/vendor/Package.internal.5.mjs +283 -251
- package/vendor/Package.internal.50.cjs +1 -1
- package/vendor/Package.internal.50.mjs +1 -1
- package/vendor/Package.internal.51.cjs +1 -1
- package/vendor/Package.internal.51.mjs +1 -1
- package/vendor/Package.internal.512.cjs +1 -1
- package/vendor/Package.internal.512.mjs +1 -1
- package/vendor/Package.internal.52.cjs +1 -1
- package/vendor/Package.internal.52.mjs +1 -1
- package/vendor/{Package.internal.513.cjs → Package.internal.5210.cjs} +1 -1
- package/vendor/{Package.internal.513.mjs → Package.internal.5210.mjs} +1 -1
- package/vendor/Package.internal.522.cjs +132 -1079
- package/vendor/Package.internal.522.mjs +132 -973
- package/vendor/Package.internal.523.cjs +4019 -0
- package/vendor/Package.internal.523.mjs +4027 -0
- package/vendor/Package.internal.524.cjs +846 -0
- package/vendor/Package.internal.524.mjs +846 -0
- package/vendor/{Package.internal.57.cjs → Package.internal.525.cjs} +2 -2
- package/vendor/{Package.internal.57.mjs → Package.internal.525.mjs} +2 -2
- package/vendor/{Package.internal.58.cjs → Package.internal.526.cjs} +2 -2
- package/vendor/{Package.internal.58.mjs → Package.internal.526.mjs} +2 -2
- package/vendor/{Package.internal.59.cjs → Package.internal.527.cjs} +1 -1
- package/vendor/{Package.internal.59.mjs → Package.internal.527.mjs} +1 -1
- package/vendor/{Package.internal.510.cjs → Package.internal.528.cjs} +1 -1
- package/vendor/{Package.internal.510.mjs → Package.internal.528.mjs} +1 -1
- package/vendor/{Package.internal.511.cjs → Package.internal.529.cjs} +1 -1
- package/vendor/{Package.internal.511.mjs → Package.internal.529.mjs} +1 -1
- package/vendor/Package.internal.53.cjs +878 -6866
- package/vendor/Package.internal.53.mjs +836 -6900
- package/vendor/Package.internal.54.cjs +7080 -145
- package/vendor/Package.internal.54.mjs +7050 -145
- package/vendor/Package.internal.55.cjs +129 -3977
- package/vendor/Package.internal.55.mjs +121 -3995
- package/vendor/Package.internal.56.cjs +49496 -727
- package/vendor/Package.internal.56.mjs +49453 -727
- package/vendor/Package.internal.6.cjs +1 -1
- package/vendor/Package.internal.6.mjs +1 -1
- package/vendor/Package.internal.7.cjs +1 -1
- package/vendor/Package.internal.7.mjs +1 -1
- package/vendor/Package.internal.8.cjs +1 -1
- package/vendor/Package.internal.8.mjs +1 -1
- package/vendor/Package.internal.9.cjs +1 -1
- package/vendor/Package.internal.9.mjs +1 -1
- package/vendor/TypeDef.internal.102.d.ts +1 -1
- package/vendor/Package.internal.542.cjs +0 -171
- package/vendor/Package.internal.542.mjs +0 -153
- package/vendor/Package.internal.552.cjs +0 -49615
- package/vendor/Package.internal.552.mjs +0 -49572
|
@@ -0,0 +1,846 @@
|
|
|
1
|
+
/* Build Date: Wed Nov 26 2025 14:26:45 GMT+0800 (China Standard Time) */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const t = require("buffer");
|
|
5
|
+
|
|
6
|
+
var e = (s, i = true) => {
|
|
7
|
+
if (s === void 0 || s === null) {
|
|
8
|
+
return "null";
|
|
9
|
+
}
|
|
10
|
+
if (typeof s === "string") {
|
|
11
|
+
return JSON.stringify(i && s.startsWith(":") ? `:${s}` : s);
|
|
12
|
+
}
|
|
13
|
+
if (t.Buffer.isBuffer(s)) {
|
|
14
|
+
return JSON.stringify(`:base64:${s.toString("base64")}`);
|
|
15
|
+
}
|
|
16
|
+
if (s?.toJSON) {
|
|
17
|
+
s = s.toJSON();
|
|
18
|
+
}
|
|
19
|
+
if (typeof s === "object") {
|
|
20
|
+
let t = "";
|
|
21
|
+
const r = Array.isArray(s);
|
|
22
|
+
t = r ? "[" : "{";
|
|
23
|
+
let o = true;
|
|
24
|
+
for (const a in s) {
|
|
25
|
+
const n = typeof s[a] === "function" || !r && s[a] === void 0;
|
|
26
|
+
if (!Object.hasOwn(s, a) || n) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (!o) {
|
|
30
|
+
t += ",";
|
|
31
|
+
}
|
|
32
|
+
o = false;
|
|
33
|
+
if (r) {
|
|
34
|
+
t += e(s[a], i);
|
|
35
|
+
} else if (s[a] !== void 0) {
|
|
36
|
+
t += `${e(a, false)}:${e(s[a], i)}`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
t += r ? "]" : "}";
|
|
40
|
+
return t;
|
|
41
|
+
}
|
|
42
|
+
return JSON.stringify(s);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var s = t => e(t, true);
|
|
46
|
+
|
|
47
|
+
exports.defaultDeserialize = e => JSON.parse(e, (e, s) => {
|
|
48
|
+
if (typeof s === "string") {
|
|
49
|
+
if (s.startsWith(":base64:")) {
|
|
50
|
+
return t.Buffer.from(s.slice(8), "base64");
|
|
51
|
+
}
|
|
52
|
+
return s.startsWith(":") ? s.slice(1) : s;
|
|
53
|
+
}
|
|
54
|
+
return s;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
var i = class {
|
|
58
|
+
_eventListeners;
|
|
59
|
+
_maxListeners;
|
|
60
|
+
constructor() {
|
|
61
|
+
this._eventListeners = new Map;
|
|
62
|
+
this._maxListeners = 100;
|
|
63
|
+
}
|
|
64
|
+
maxListeners() {
|
|
65
|
+
return this._maxListeners;
|
|
66
|
+
}
|
|
67
|
+
addListener(t, e) {
|
|
68
|
+
this.on(t, e);
|
|
69
|
+
}
|
|
70
|
+
on(t, e) {
|
|
71
|
+
if (!this._eventListeners.has(t)) {
|
|
72
|
+
this._eventListeners.set(t, []);
|
|
73
|
+
}
|
|
74
|
+
const s = this._eventListeners.get(t);
|
|
75
|
+
if (s) {
|
|
76
|
+
if (s.length >= this._maxListeners) {
|
|
77
|
+
console.warn(`MaxListenersExceededWarning: Possible event memory leak detected. ${s.length + 1} ${t} listeners added. Use setMaxListeners() to increase limit.`);
|
|
78
|
+
}
|
|
79
|
+
s.push(e);
|
|
80
|
+
}
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
removeListener(t, e) {
|
|
84
|
+
this.off(t, e);
|
|
85
|
+
}
|
|
86
|
+
off(t, e) {
|
|
87
|
+
const s = this._eventListeners.get(t) ?? [];
|
|
88
|
+
const i = s.indexOf(e);
|
|
89
|
+
if (i !== -1) {
|
|
90
|
+
s.splice(i, 1);
|
|
91
|
+
}
|
|
92
|
+
if (s.length === 0) {
|
|
93
|
+
this._eventListeners.delete(t);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
once(t, e) {
|
|
97
|
+
const s = (...i) => {
|
|
98
|
+
e(...i);
|
|
99
|
+
this.off(t, s);
|
|
100
|
+
};
|
|
101
|
+
this.on(t, s);
|
|
102
|
+
}
|
|
103
|
+
emit(t, ...e) {
|
|
104
|
+
const s = this._eventListeners.get(t);
|
|
105
|
+
if (s && s.length > 0) {
|
|
106
|
+
for (const t of s) {
|
|
107
|
+
t(...e);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
listeners(t) {
|
|
112
|
+
return this._eventListeners.get(t) ?? [];
|
|
113
|
+
}
|
|
114
|
+
removeAllListeners(t) {
|
|
115
|
+
if (t) {
|
|
116
|
+
this._eventListeners.delete(t);
|
|
117
|
+
} else {
|
|
118
|
+
this._eventListeners.clear();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
setMaxListeners(t) {
|
|
122
|
+
this._maxListeners = t;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
var r = i;
|
|
127
|
+
|
|
128
|
+
var o = class extends r {
|
|
129
|
+
_hookHandlers;
|
|
130
|
+
constructor() {
|
|
131
|
+
super();
|
|
132
|
+
this._hookHandlers = new Map;
|
|
133
|
+
}
|
|
134
|
+
addHandler(t, e) {
|
|
135
|
+
const s = this._hookHandlers.get(t);
|
|
136
|
+
if (s) {
|
|
137
|
+
s.push(e);
|
|
138
|
+
} else {
|
|
139
|
+
this._hookHandlers.set(t, [ e ]);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
removeHandler(t, e) {
|
|
143
|
+
const s = this._hookHandlers.get(t);
|
|
144
|
+
if (s) {
|
|
145
|
+
const t = s.indexOf(e);
|
|
146
|
+
if (t !== -1) {
|
|
147
|
+
s.splice(t, 1);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
trigger(t, e) {
|
|
152
|
+
const s = this._hookHandlers.get(t);
|
|
153
|
+
if (s) {
|
|
154
|
+
for (const i of s) {
|
|
155
|
+
try {
|
|
156
|
+
i(e);
|
|
157
|
+
} catch (e) {
|
|
158
|
+
this.emit("error", new Error(`Error in hook handler for event "${t}": ${e.message}`));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
get handlers() {
|
|
164
|
+
return new Map(this._hookHandlers);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
var a = o;
|
|
169
|
+
|
|
170
|
+
var n = class extends r {
|
|
171
|
+
enabled=true;
|
|
172
|
+
hits=0;
|
|
173
|
+
misses=0;
|
|
174
|
+
sets=0;
|
|
175
|
+
deletes=0;
|
|
176
|
+
errors=0;
|
|
177
|
+
constructor(t) {
|
|
178
|
+
super();
|
|
179
|
+
if (t !== void 0) {
|
|
180
|
+
this.enabled = t;
|
|
181
|
+
}
|
|
182
|
+
this.reset();
|
|
183
|
+
}
|
|
184
|
+
hit() {
|
|
185
|
+
if (this.enabled) {
|
|
186
|
+
this.hits++;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
miss() {
|
|
190
|
+
if (this.enabled) {
|
|
191
|
+
this.misses++;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
set() {
|
|
195
|
+
if (this.enabled) {
|
|
196
|
+
this.sets++;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
delete() {
|
|
200
|
+
if (this.enabled) {
|
|
201
|
+
this.deletes++;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
hitsOrMisses(t) {
|
|
205
|
+
for (const e of t) {
|
|
206
|
+
if (e === void 0) {
|
|
207
|
+
this.miss();
|
|
208
|
+
} else {
|
|
209
|
+
this.hit();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
reset() {
|
|
214
|
+
this.hits = 0;
|
|
215
|
+
this.misses = 0;
|
|
216
|
+
this.sets = 0;
|
|
217
|
+
this.deletes = 0;
|
|
218
|
+
this.errors = 0;
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
var h = n;
|
|
223
|
+
|
|
224
|
+
var l = [ "sqlite", "postgres", "mysql", "mongo", "redis", "valkey", "etcd" ];
|
|
225
|
+
|
|
226
|
+
exports.Keyv = class Keyv extends r {
|
|
227
|
+
opts;
|
|
228
|
+
iterator;
|
|
229
|
+
hooks=new a;
|
|
230
|
+
stats=new h(false);
|
|
231
|
+
_ttl;
|
|
232
|
+
_namespace;
|
|
233
|
+
_store=new Map;
|
|
234
|
+
_serialize=s;
|
|
235
|
+
_deserialize=exports.defaultDeserialize;
|
|
236
|
+
_compression;
|
|
237
|
+
_useKeyPrefix=true;
|
|
238
|
+
_throwOnErrors=false;
|
|
239
|
+
constructor(t, e) {
|
|
240
|
+
super();
|
|
241
|
+
e ??= {};
|
|
242
|
+
t ??= {};
|
|
243
|
+
this.opts = {
|
|
244
|
+
namespace: "keyv",
|
|
245
|
+
serialize: s,
|
|
246
|
+
deserialize: exports.defaultDeserialize,
|
|
247
|
+
emitErrors: true,
|
|
248
|
+
store: new Map,
|
|
249
|
+
...e
|
|
250
|
+
};
|
|
251
|
+
if (t && t.get) {
|
|
252
|
+
this.opts.store = t;
|
|
253
|
+
} else {
|
|
254
|
+
this.opts = {
|
|
255
|
+
...this.opts,
|
|
256
|
+
...t
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
this._store = this.opts.store ?? new Map;
|
|
260
|
+
this._compression = this.opts.compression;
|
|
261
|
+
this._serialize = this.opts.serialize;
|
|
262
|
+
this._deserialize = this.opts.deserialize;
|
|
263
|
+
if (this.opts.namespace) {
|
|
264
|
+
this._namespace = this.opts.namespace;
|
|
265
|
+
}
|
|
266
|
+
if (this._store) {
|
|
267
|
+
if (!this._isValidStorageAdapter(this._store)) {
|
|
268
|
+
throw new Error("Invalid storage adapter");
|
|
269
|
+
}
|
|
270
|
+
if (typeof this._store.on === "function") {
|
|
271
|
+
this._store.on("error", t => this.emit("error", t));
|
|
272
|
+
}
|
|
273
|
+
this._store.namespace = this._namespace;
|
|
274
|
+
if (typeof this._store[Symbol.iterator] === "function" && this._store instanceof Map) {
|
|
275
|
+
this.iterator = this.generateIterator(this._store);
|
|
276
|
+
} else if ("iterator" in this._store && this._store.opts && this._checkIterableAdapter()) {
|
|
277
|
+
this.iterator = this.generateIterator(this._store.iterator.bind(this._store));
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
if (this.opts.stats) {
|
|
281
|
+
this.stats.enabled = this.opts.stats;
|
|
282
|
+
}
|
|
283
|
+
if (this.opts.ttl) {
|
|
284
|
+
this._ttl = this.opts.ttl;
|
|
285
|
+
}
|
|
286
|
+
if (this.opts.useKeyPrefix !== void 0) {
|
|
287
|
+
this._useKeyPrefix = this.opts.useKeyPrefix;
|
|
288
|
+
}
|
|
289
|
+
if (this.opts.throwOnErrors !== void 0) {
|
|
290
|
+
this._throwOnErrors = this.opts.throwOnErrors;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
get store() {
|
|
294
|
+
return this._store;
|
|
295
|
+
}
|
|
296
|
+
set store(t) {
|
|
297
|
+
if (this._isValidStorageAdapter(t)) {
|
|
298
|
+
this._store = t;
|
|
299
|
+
this.opts.store = t;
|
|
300
|
+
if (typeof t.on === "function") {
|
|
301
|
+
t.on("error", t => this.emit("error", t));
|
|
302
|
+
}
|
|
303
|
+
if (this._namespace) {
|
|
304
|
+
this._store.namespace = this._namespace;
|
|
305
|
+
}
|
|
306
|
+
if (typeof t[Symbol.iterator] === "function" && t instanceof Map) {
|
|
307
|
+
this.iterator = this.generateIterator(t);
|
|
308
|
+
} else if ("iterator" in t && t.opts && this._checkIterableAdapter()) {
|
|
309
|
+
this.iterator = this.generateIterator(t.iterator?.bind(t));
|
|
310
|
+
}
|
|
311
|
+
} else {
|
|
312
|
+
throw new Error("Invalid storage adapter");
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
get compression() {
|
|
316
|
+
return this._compression;
|
|
317
|
+
}
|
|
318
|
+
set compression(t) {
|
|
319
|
+
this._compression = t;
|
|
320
|
+
}
|
|
321
|
+
get namespace() {
|
|
322
|
+
return this._namespace;
|
|
323
|
+
}
|
|
324
|
+
set namespace(t) {
|
|
325
|
+
this._namespace = t;
|
|
326
|
+
this.opts.namespace = t;
|
|
327
|
+
this._store.namespace = t;
|
|
328
|
+
if (this.opts.store) {
|
|
329
|
+
this.opts.store.namespace = t;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
get ttl() {
|
|
333
|
+
return this._ttl;
|
|
334
|
+
}
|
|
335
|
+
set ttl(t) {
|
|
336
|
+
this.opts.ttl = t;
|
|
337
|
+
this._ttl = t;
|
|
338
|
+
}
|
|
339
|
+
get serialize() {
|
|
340
|
+
return this._serialize;
|
|
341
|
+
}
|
|
342
|
+
set serialize(t) {
|
|
343
|
+
this.opts.serialize = t;
|
|
344
|
+
this._serialize = t;
|
|
345
|
+
}
|
|
346
|
+
get deserialize() {
|
|
347
|
+
return this._deserialize;
|
|
348
|
+
}
|
|
349
|
+
set deserialize(t) {
|
|
350
|
+
this.opts.deserialize = t;
|
|
351
|
+
this._deserialize = t;
|
|
352
|
+
}
|
|
353
|
+
get useKeyPrefix() {
|
|
354
|
+
return this._useKeyPrefix;
|
|
355
|
+
}
|
|
356
|
+
set useKeyPrefix(t) {
|
|
357
|
+
this._useKeyPrefix = t;
|
|
358
|
+
this.opts.useKeyPrefix = t;
|
|
359
|
+
}
|
|
360
|
+
get throwOnErrors() {
|
|
361
|
+
return this._throwOnErrors;
|
|
362
|
+
}
|
|
363
|
+
set throwOnErrors(t) {
|
|
364
|
+
this._throwOnErrors = t;
|
|
365
|
+
this.opts.throwOnErrors = t;
|
|
366
|
+
}
|
|
367
|
+
generateIterator(t) {
|
|
368
|
+
const e = async function*() {
|
|
369
|
+
for await (const [e, s] of typeof t === "function" ? t(this._store.namespace) : t) {
|
|
370
|
+
const t = await this.deserializeData(s);
|
|
371
|
+
if (this._useKeyPrefix && this._store.namespace && !e.includes(this._store.namespace)) {
|
|
372
|
+
continue;
|
|
373
|
+
}
|
|
374
|
+
if (typeof t.expires === "number" && Date.now() > t.expires) {
|
|
375
|
+
this.delete(e);
|
|
376
|
+
continue;
|
|
377
|
+
}
|
|
378
|
+
yield [ this._getKeyUnprefix(e), t.value ];
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
return e.bind(this);
|
|
382
|
+
}
|
|
383
|
+
_checkIterableAdapter() {
|
|
384
|
+
return l.includes(this._store.opts.dialect) || l.some(t => this._store.opts.url.includes(t));
|
|
385
|
+
}
|
|
386
|
+
_getKeyPrefix(t) {
|
|
387
|
+
if (!this._useKeyPrefix) {
|
|
388
|
+
return t;
|
|
389
|
+
}
|
|
390
|
+
if (!this._namespace) {
|
|
391
|
+
return t;
|
|
392
|
+
}
|
|
393
|
+
return `${this._namespace}:${t}`;
|
|
394
|
+
}
|
|
395
|
+
_getKeyPrefixArray(t) {
|
|
396
|
+
if (!this._useKeyPrefix) {
|
|
397
|
+
return t;
|
|
398
|
+
}
|
|
399
|
+
if (!this._namespace) {
|
|
400
|
+
return t;
|
|
401
|
+
}
|
|
402
|
+
return t.map(t => `${this._namespace}:${t}`);
|
|
403
|
+
}
|
|
404
|
+
_getKeyUnprefix(t) {
|
|
405
|
+
if (!this._useKeyPrefix) {
|
|
406
|
+
return t;
|
|
407
|
+
}
|
|
408
|
+
return t.split(":").splice(1).join(":");
|
|
409
|
+
}
|
|
410
|
+
_isValidStorageAdapter(t) {
|
|
411
|
+
return t instanceof Map || typeof t.get === "function" && typeof t.set === "function" && typeof t.delete === "function" && typeof t.clear === "function";
|
|
412
|
+
}
|
|
413
|
+
async get(t, e) {
|
|
414
|
+
const {store: s} = this.opts;
|
|
415
|
+
const i = Array.isArray(t);
|
|
416
|
+
const r = i ? this._getKeyPrefixArray(t) : this._getKeyPrefix(t);
|
|
417
|
+
const o = t => typeof t.expires === "number" && Date.now() > t.expires;
|
|
418
|
+
if (i) {
|
|
419
|
+
if (e?.raw === true) {
|
|
420
|
+
return this.getMany(t, {
|
|
421
|
+
raw: true
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
return this.getMany(t, {
|
|
425
|
+
raw: false
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
this.hooks.trigger("preGet", {
|
|
429
|
+
key: r
|
|
430
|
+
});
|
|
431
|
+
let a;
|
|
432
|
+
try {
|
|
433
|
+
a = await s.get(r);
|
|
434
|
+
} catch (t) {
|
|
435
|
+
if (this.throwOnErrors) {
|
|
436
|
+
throw t;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
const n = typeof a === "string" || this.opts.compression ? await this.deserializeData(a) : a;
|
|
440
|
+
if (n === void 0 || n === null) {
|
|
441
|
+
this.hooks.trigger("postGet", {
|
|
442
|
+
key: r,
|
|
443
|
+
value: void 0
|
|
444
|
+
});
|
|
445
|
+
this.stats.miss();
|
|
446
|
+
return void 0;
|
|
447
|
+
}
|
|
448
|
+
if (o(n)) {
|
|
449
|
+
await this.delete(t);
|
|
450
|
+
this.hooks.trigger("postGet", {
|
|
451
|
+
key: r,
|
|
452
|
+
value: void 0
|
|
453
|
+
});
|
|
454
|
+
this.stats.miss();
|
|
455
|
+
return void 0;
|
|
456
|
+
}
|
|
457
|
+
this.hooks.trigger("postGet", {
|
|
458
|
+
key: r,
|
|
459
|
+
value: n
|
|
460
|
+
});
|
|
461
|
+
this.stats.hit();
|
|
462
|
+
return e?.raw ? n : n.value;
|
|
463
|
+
}
|
|
464
|
+
async getMany(t, e) {
|
|
465
|
+
const {store: s} = this.opts;
|
|
466
|
+
const i = this._getKeyPrefixArray(t);
|
|
467
|
+
const r = t => typeof t.expires === "number" && Date.now() > t.expires;
|
|
468
|
+
this.hooks.trigger("preGetMany", {
|
|
469
|
+
keys: i
|
|
470
|
+
});
|
|
471
|
+
if (s.getMany === void 0) {
|
|
472
|
+
const t = i.map(async t => {
|
|
473
|
+
const i = await s.get(t);
|
|
474
|
+
const o = typeof i === "string" || this.opts.compression ? await this.deserializeData(i) : i;
|
|
475
|
+
if (o === void 0 || o === null) {
|
|
476
|
+
return void 0;
|
|
477
|
+
}
|
|
478
|
+
if (r(o)) {
|
|
479
|
+
await this.delete(t);
|
|
480
|
+
return void 0;
|
|
481
|
+
}
|
|
482
|
+
return e?.raw ? o : o.value;
|
|
483
|
+
});
|
|
484
|
+
const o = await Promise.allSettled(t);
|
|
485
|
+
const a = o.map(t => t.value);
|
|
486
|
+
this.hooks.trigger("postGetMany", a);
|
|
487
|
+
if (a.length > 0) {
|
|
488
|
+
this.stats.hit();
|
|
489
|
+
}
|
|
490
|
+
return a;
|
|
491
|
+
}
|
|
492
|
+
const o = await s.getMany(i);
|
|
493
|
+
const a = [];
|
|
494
|
+
const n = [];
|
|
495
|
+
for (const s in o) {
|
|
496
|
+
let i = o[s];
|
|
497
|
+
if (typeof i === "string") {
|
|
498
|
+
i = await this.deserializeData(i);
|
|
499
|
+
}
|
|
500
|
+
if (i === void 0 || i === null) {
|
|
501
|
+
a.push(void 0);
|
|
502
|
+
continue;
|
|
503
|
+
}
|
|
504
|
+
if (r(i)) {
|
|
505
|
+
n.push(t[s]);
|
|
506
|
+
a.push(void 0);
|
|
507
|
+
continue;
|
|
508
|
+
}
|
|
509
|
+
const h = e?.raw ? i : i.value;
|
|
510
|
+
a.push(h);
|
|
511
|
+
}
|
|
512
|
+
if (n.length > 0) {
|
|
513
|
+
await this.deleteMany(n);
|
|
514
|
+
}
|
|
515
|
+
this.hooks.trigger("postGetMany", a);
|
|
516
|
+
if (a.length > 0) {
|
|
517
|
+
this.stats.hit();
|
|
518
|
+
}
|
|
519
|
+
return a;
|
|
520
|
+
}
|
|
521
|
+
async getRaw(t) {
|
|
522
|
+
const {store: e} = this.opts;
|
|
523
|
+
const s = this._getKeyPrefix(t);
|
|
524
|
+
this.hooks.trigger("preGetRaw", {
|
|
525
|
+
key: s
|
|
526
|
+
});
|
|
527
|
+
const i = await e.get(s);
|
|
528
|
+
if (i === void 0 || i === null) {
|
|
529
|
+
this.hooks.trigger("postGetRaw", {
|
|
530
|
+
key: s,
|
|
531
|
+
value: void 0
|
|
532
|
+
});
|
|
533
|
+
this.stats.miss();
|
|
534
|
+
return void 0;
|
|
535
|
+
}
|
|
536
|
+
const r = typeof i === "string" || this.opts.compression ? await this.deserializeData(i) : i;
|
|
537
|
+
if (r !== void 0 && r.expires !== void 0 && r.expires !== null && r.expires < Date.now()) {
|
|
538
|
+
this.hooks.trigger("postGetRaw", {
|
|
539
|
+
key: s,
|
|
540
|
+
value: void 0
|
|
541
|
+
});
|
|
542
|
+
this.stats.miss();
|
|
543
|
+
await this.delete(t);
|
|
544
|
+
return void 0;
|
|
545
|
+
}
|
|
546
|
+
this.stats.hit();
|
|
547
|
+
this.hooks.trigger("postGetRaw", {
|
|
548
|
+
key: s,
|
|
549
|
+
value: r
|
|
550
|
+
});
|
|
551
|
+
return r;
|
|
552
|
+
}
|
|
553
|
+
async getManyRaw(t) {
|
|
554
|
+
const {store: e} = this.opts;
|
|
555
|
+
const s = this._getKeyPrefixArray(t);
|
|
556
|
+
if (t.length === 0) {
|
|
557
|
+
const e = Array.from({
|
|
558
|
+
length: t.length
|
|
559
|
+
}).fill(void 0);
|
|
560
|
+
this.stats.misses += t.length;
|
|
561
|
+
this.hooks.trigger("postGetManyRaw", {
|
|
562
|
+
keys: s,
|
|
563
|
+
values: e
|
|
564
|
+
});
|
|
565
|
+
return e;
|
|
566
|
+
}
|
|
567
|
+
let i = [];
|
|
568
|
+
if (e.getMany === void 0) {
|
|
569
|
+
const t = s.map(async t => {
|
|
570
|
+
const s = await e.get(t);
|
|
571
|
+
if (s !== void 0 && s !== null) {
|
|
572
|
+
return this.deserializeData(s);
|
|
573
|
+
}
|
|
574
|
+
return void 0;
|
|
575
|
+
});
|
|
576
|
+
const r = await Promise.allSettled(t);
|
|
577
|
+
i = r.map(t => t.value);
|
|
578
|
+
} else {
|
|
579
|
+
const t = await e.getMany(s);
|
|
580
|
+
for (const e of t) {
|
|
581
|
+
if (e !== void 0 && e !== null) {
|
|
582
|
+
i.push(await this.deserializeData(e));
|
|
583
|
+
} else {
|
|
584
|
+
i.push(void 0);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
const r = [];
|
|
589
|
+
const o = t => typeof t.expires === "number" && Date.now() > t.expires;
|
|
590
|
+
for (const [t, e] of i.entries()) {
|
|
591
|
+
if (e !== void 0 && o(e)) {
|
|
592
|
+
r.push(s[t]);
|
|
593
|
+
i[t] = void 0;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (r.length > 0) {
|
|
597
|
+
await this.deleteMany(r);
|
|
598
|
+
}
|
|
599
|
+
this.stats.hitsOrMisses(i);
|
|
600
|
+
this.hooks.trigger("postGetManyRaw", {
|
|
601
|
+
keys: s,
|
|
602
|
+
values: i
|
|
603
|
+
});
|
|
604
|
+
return i;
|
|
605
|
+
}
|
|
606
|
+
async set(t, e, s) {
|
|
607
|
+
const i = {
|
|
608
|
+
key: t,
|
|
609
|
+
value: e,
|
|
610
|
+
ttl: s
|
|
611
|
+
};
|
|
612
|
+
this.hooks.trigger("preSet", i);
|
|
613
|
+
const r = this._getKeyPrefix(i.key);
|
|
614
|
+
i.ttl ??= this._ttl;
|
|
615
|
+
if (i.ttl === 0) {
|
|
616
|
+
i.ttl = void 0;
|
|
617
|
+
}
|
|
618
|
+
const {store: o} = this.opts;
|
|
619
|
+
const a = typeof i.ttl === "number" ? Date.now() + i.ttl : void 0;
|
|
620
|
+
if (typeof i.value === "symbol") {
|
|
621
|
+
this.emit("error", "symbol cannot be serialized");
|
|
622
|
+
throw new Error("symbol cannot be serialized");
|
|
623
|
+
}
|
|
624
|
+
const n = {
|
|
625
|
+
value: i.value,
|
|
626
|
+
expires: a
|
|
627
|
+
};
|
|
628
|
+
const h = await this.serializeData(n);
|
|
629
|
+
let l = true;
|
|
630
|
+
try {
|
|
631
|
+
const t = await o.set(r, h, i.ttl);
|
|
632
|
+
if (typeof t === "boolean") {
|
|
633
|
+
l = t;
|
|
634
|
+
}
|
|
635
|
+
} catch (t) {
|
|
636
|
+
l = false;
|
|
637
|
+
this.emit("error", t);
|
|
638
|
+
if (this._throwOnErrors) {
|
|
639
|
+
throw t;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
this.hooks.trigger("postSet", {
|
|
643
|
+
key: r,
|
|
644
|
+
value: h,
|
|
645
|
+
ttl: s
|
|
646
|
+
});
|
|
647
|
+
this.stats.set();
|
|
648
|
+
return l;
|
|
649
|
+
}
|
|
650
|
+
async setMany(t) {
|
|
651
|
+
let e = [];
|
|
652
|
+
try {
|
|
653
|
+
if (this._store.setMany === void 0) {
|
|
654
|
+
const s = [];
|
|
655
|
+
for (const e of t) {
|
|
656
|
+
s.push(this.set(e.key, e.value, e.ttl));
|
|
657
|
+
}
|
|
658
|
+
const i = await Promise.all(s);
|
|
659
|
+
e = i;
|
|
660
|
+
} else {
|
|
661
|
+
const s = await Promise.all(t.map(async ({key: t, value: e, ttl: s}) => {
|
|
662
|
+
s ??= this._ttl;
|
|
663
|
+
if (s === 0) {
|
|
664
|
+
s = void 0;
|
|
665
|
+
}
|
|
666
|
+
const i = typeof s === "number" ? Date.now() + s : void 0;
|
|
667
|
+
if (typeof e === "symbol") {
|
|
668
|
+
this.emit("error", "symbol cannot be serialized");
|
|
669
|
+
throw new Error("symbol cannot be serialized");
|
|
670
|
+
}
|
|
671
|
+
const r = {
|
|
672
|
+
value: e,
|
|
673
|
+
expires: i
|
|
674
|
+
};
|
|
675
|
+
const o = await this.serializeData(r);
|
|
676
|
+
const a = this._getKeyPrefix(t);
|
|
677
|
+
return {
|
|
678
|
+
key: a,
|
|
679
|
+
value: o,
|
|
680
|
+
ttl: s
|
|
681
|
+
};
|
|
682
|
+
}));
|
|
683
|
+
e = await this._store.setMany(s);
|
|
684
|
+
}
|
|
685
|
+
} catch (s) {
|
|
686
|
+
this.emit("error", s);
|
|
687
|
+
if (this._throwOnErrors) {
|
|
688
|
+
throw s;
|
|
689
|
+
}
|
|
690
|
+
e = t.map(() => false);
|
|
691
|
+
}
|
|
692
|
+
return e;
|
|
693
|
+
}
|
|
694
|
+
async delete(t) {
|
|
695
|
+
const {store: e} = this.opts;
|
|
696
|
+
if (Array.isArray(t)) {
|
|
697
|
+
return this.deleteMany(t);
|
|
698
|
+
}
|
|
699
|
+
const s = this._getKeyPrefix(t);
|
|
700
|
+
this.hooks.trigger("preDelete", {
|
|
701
|
+
key: s
|
|
702
|
+
});
|
|
703
|
+
let i = true;
|
|
704
|
+
try {
|
|
705
|
+
const t = await e.delete(s);
|
|
706
|
+
if (typeof t === "boolean") {
|
|
707
|
+
i = t;
|
|
708
|
+
}
|
|
709
|
+
} catch (t) {
|
|
710
|
+
i = false;
|
|
711
|
+
this.emit("error", t);
|
|
712
|
+
if (this._throwOnErrors) {
|
|
713
|
+
throw t;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
this.hooks.trigger("postDelete", {
|
|
717
|
+
key: s,
|
|
718
|
+
value: i
|
|
719
|
+
});
|
|
720
|
+
this.stats.delete();
|
|
721
|
+
return i;
|
|
722
|
+
}
|
|
723
|
+
async deleteMany(t) {
|
|
724
|
+
try {
|
|
725
|
+
const {store: e} = this.opts;
|
|
726
|
+
const s = this._getKeyPrefixArray(t);
|
|
727
|
+
this.hooks.trigger("preDelete", {
|
|
728
|
+
key: s
|
|
729
|
+
});
|
|
730
|
+
if (e.deleteMany !== void 0) {
|
|
731
|
+
return await e.deleteMany(s);
|
|
732
|
+
}
|
|
733
|
+
const i = s.map(async t => e.delete(t));
|
|
734
|
+
const r = await Promise.all(i);
|
|
735
|
+
const o = r.every(Boolean);
|
|
736
|
+
this.hooks.trigger("postDelete", {
|
|
737
|
+
key: s,
|
|
738
|
+
value: o
|
|
739
|
+
});
|
|
740
|
+
return o;
|
|
741
|
+
} catch (t) {
|
|
742
|
+
this.emit("error", t);
|
|
743
|
+
if (this._throwOnErrors) {
|
|
744
|
+
throw t;
|
|
745
|
+
}
|
|
746
|
+
return false;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
async clear() {
|
|
750
|
+
this.emit("clear");
|
|
751
|
+
const {store: t} = this.opts;
|
|
752
|
+
try {
|
|
753
|
+
await t.clear();
|
|
754
|
+
} catch (t) {
|
|
755
|
+
this.emit("error", t);
|
|
756
|
+
if (this._throwOnErrors) {
|
|
757
|
+
throw t;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
async has(t) {
|
|
762
|
+
if (Array.isArray(t)) {
|
|
763
|
+
return this.hasMany(t);
|
|
764
|
+
}
|
|
765
|
+
const e = this._getKeyPrefix(t);
|
|
766
|
+
const {store: s} = this.opts;
|
|
767
|
+
if (s.has !== void 0 && !(s instanceof Map)) {
|
|
768
|
+
return s.has(e);
|
|
769
|
+
}
|
|
770
|
+
let i;
|
|
771
|
+
try {
|
|
772
|
+
i = await s.get(e);
|
|
773
|
+
} catch (t) {
|
|
774
|
+
this.emit("error", t);
|
|
775
|
+
if (this._throwOnErrors) {
|
|
776
|
+
throw t;
|
|
777
|
+
}
|
|
778
|
+
return false;
|
|
779
|
+
}
|
|
780
|
+
if (i) {
|
|
781
|
+
const t = await this.deserializeData(i);
|
|
782
|
+
if (t) {
|
|
783
|
+
if (t.expires === void 0 || t.expires === null) {
|
|
784
|
+
return true;
|
|
785
|
+
}
|
|
786
|
+
return t.expires > Date.now();
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
return false;
|
|
790
|
+
}
|
|
791
|
+
async hasMany(t) {
|
|
792
|
+
const e = this._getKeyPrefixArray(t);
|
|
793
|
+
const {store: s} = this.opts;
|
|
794
|
+
if (s.hasMany !== void 0) {
|
|
795
|
+
return s.hasMany(e);
|
|
796
|
+
}
|
|
797
|
+
const i = [];
|
|
798
|
+
for (const e of t) {
|
|
799
|
+
i.push(await this.has(e));
|
|
800
|
+
}
|
|
801
|
+
return i;
|
|
802
|
+
}
|
|
803
|
+
async disconnect() {
|
|
804
|
+
const {store: t} = this.opts;
|
|
805
|
+
this.emit("disconnect");
|
|
806
|
+
if (typeof t.disconnect === "function") {
|
|
807
|
+
return t.disconnect();
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
emit(t, ...e) {
|
|
811
|
+
if (t === "error" && !this.opts.emitErrors) {
|
|
812
|
+
return;
|
|
813
|
+
}
|
|
814
|
+
super.emit(t, ...e);
|
|
815
|
+
}
|
|
816
|
+
async serializeData(t) {
|
|
817
|
+
if (!this._serialize) {
|
|
818
|
+
return t;
|
|
819
|
+
}
|
|
820
|
+
if (this._compression?.compress) {
|
|
821
|
+
return this._serialize({
|
|
822
|
+
value: await this._compression.compress(t.value),
|
|
823
|
+
expires: t.expires
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
return this._serialize(t);
|
|
827
|
+
}
|
|
828
|
+
async deserializeData(t) {
|
|
829
|
+
if (!this._deserialize) {
|
|
830
|
+
return t;
|
|
831
|
+
}
|
|
832
|
+
if (this._compression?.decompress && typeof t === "string") {
|
|
833
|
+
const e = await this._deserialize(t);
|
|
834
|
+
return {
|
|
835
|
+
value: await this._compression.decompress(e?.value),
|
|
836
|
+
expires: e?.expires
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
if (typeof t === "string") {
|
|
840
|
+
return this._deserialize(t);
|
|
841
|
+
}
|
|
842
|
+
return void 0;
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
exports.index_default = exports.Keyv;
|