lakutata 2.0.30 → 2.0.32
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/README.md +2 -2
- package/com/database.cjs +17 -17
- package/com/database.mjs +17 -17
- package/com/docker.cjs +14 -14
- package/com/docker.mjs +14 -14
- package/com/entrypoint.cjs +12 -12
- package/com/entrypoint.d.ts +2 -2
- package/com/entrypoint.mjs +12 -12
- package/com/logger.cjs +12 -12
- package/com/logger.mjs +12 -12
- package/decorator/asst.cjs +4 -4
- package/decorator/asst.mjs +4 -4
- package/decorator/ctrl.cjs +41 -13
- package/decorator/ctrl.d.ts +16 -2
- package/decorator/ctrl.mjs +21 -7
- package/decorator/di.cjs +6 -6
- package/decorator/di.mjs +6 -6
- package/decorator/dto.cjs +6 -6
- package/decorator/dto.mjs +6 -6
- package/decorator/orm.cjs +13 -13
- package/decorator/orm.mjs +13 -13
- package/helper.cjs +9 -9
- package/helper.mjs +9 -9
- package/lakutata.cjs +13 -13
- package/lakutata.mjs +13 -13
- package/orm.cjs +14 -14
- package/orm.mjs +15 -15
- package/package.json +6 -1
- package/provider/database.cjs +17 -17
- package/provider/database.mjs +17 -17
- package/provider/passwordHash.cjs +157 -0
- package/provider/passwordHash.d.ts +33 -0
- package/provider/passwordHash.mjs +149 -0
- package/src/components/Database.cjs +16 -16
- package/src/components/Database.mjs +16 -16
- package/src/components/Logger.cjs +12 -12
- package/src/components/Logger.mjs +12 -12
- package/src/components/docker/ConnectionOptionsBuilder.cjs +14 -14
- package/src/components/docker/ConnectionOptionsBuilder.mjs +14 -14
- package/src/components/docker/Docker.cjs +11 -11
- package/src/components/docker/Docker.mjs +11 -11
- package/src/components/docker/exceptions/DockerConnectionException.cjs +3 -3
- package/src/components/docker/exceptions/DockerConnectionException.mjs +3 -3
- package/src/components/docker/exceptions/DockerImageBuildException.cjs +3 -3
- package/src/components/docker/exceptions/DockerImageBuildException.mjs +3 -3
- package/src/components/docker/exceptions/DockerImageImportException.cjs +3 -3
- package/src/components/docker/exceptions/DockerImageImportException.mjs +3 -3
- package/src/components/docker/exceptions/DockerImageNotFoundException.cjs +3 -3
- package/src/components/docker/exceptions/DockerImageNotFoundException.mjs +3 -3
- package/src/components/docker/exceptions/DockerImagePullException.cjs +3 -3
- package/src/components/docker/exceptions/DockerImagePullException.mjs +3 -3
- package/src/components/docker/exceptions/DockerImagePushException.cjs +3 -3
- package/src/components/docker/exceptions/DockerImagePushException.mjs +3 -3
- package/src/components/docker/exceptions/DockerImageRepoTagNotFoundException.cjs +3 -3
- package/src/components/docker/exceptions/DockerImageRepoTagNotFoundException.mjs +3 -3
- package/src/components/docker/exceptions/DockerNetworkNotFoundException.cjs +3 -3
- package/src/components/docker/exceptions/DockerNetworkNotFoundException.mjs +3 -3
- package/src/components/docker/lib/DockerContainer.cjs +14 -14
- package/src/components/docker/lib/DockerContainer.mjs +14 -14
- package/src/components/docker/lib/DockerContainerTTY.cjs +14 -14
- package/src/components/docker/lib/DockerContainerTTY.mjs +14 -14
- package/src/components/docker/lib/DockerImage.cjs +11 -11
- package/src/components/docker/lib/DockerImage.mjs +11 -11
- package/src/components/docker/options/DockerPruneOptions.cjs +6 -6
- package/src/components/docker/options/DockerPruneOptions.mjs +6 -6
- package/src/components/docker/options/auth/DockerAuthOptions.cjs +6 -6
- package/src/components/docker/options/auth/DockerAuthOptions.mjs +6 -6
- package/src/components/docker/options/container/ContainerCommitOptions.cjs +6 -6
- package/src/components/docker/options/container/ContainerCommitOptions.mjs +6 -6
- package/src/components/docker/options/container/ContainerCreateTTYOptions.cjs +6 -6
- package/src/components/docker/options/container/ContainerCreateTTYOptions.mjs +6 -6
- package/src/components/docker/options/container/ContainerExecOptions.cjs +6 -6
- package/src/components/docker/options/container/ContainerExecOptions.mjs +6 -6
- package/src/components/docker/options/container/ContainerExportDirectoryOptions.cjs +6 -6
- package/src/components/docker/options/container/ContainerExportDirectoryOptions.mjs +6 -6
- package/src/components/docker/options/container/ContainerKillOptions.cjs +6 -6
- package/src/components/docker/options/container/ContainerKillOptions.mjs +6 -6
- package/src/components/docker/options/container/ContainerLogsOptions.cjs +6 -6
- package/src/components/docker/options/container/ContainerLogsOptions.mjs +6 -6
- package/src/components/docker/options/container/ContainerRemoveOptions.cjs +6 -6
- package/src/components/docker/options/container/ContainerRemoveOptions.mjs +6 -6
- package/src/components/docker/options/container/ContainerSettingOptions.cjs +6 -6
- package/src/components/docker/options/container/ContainerSettingOptions.mjs +6 -6
- package/src/components/docker/options/container/ContainerStopOptions.cjs +6 -6
- package/src/components/docker/options/container/ContainerStopOptions.mjs +6 -6
- package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.cjs +6 -6
- package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.mjs +6 -6
- package/src/components/docker/options/image/ImageBuildOptions.cjs +6 -6
- package/src/components/docker/options/image/ImageBuildOptions.mjs +6 -6
- package/src/components/docker/options/image/ImageExportOptions.cjs +6 -6
- package/src/components/docker/options/image/ImageExportOptions.mjs +6 -6
- package/src/components/docker/options/image/ImageImportOptions.cjs +6 -6
- package/src/components/docker/options/image/ImageImportOptions.mjs +6 -6
- package/src/components/docker/options/image/ImagePullOptions.cjs +6 -6
- package/src/components/docker/options/image/ImagePullOptions.mjs +6 -6
- package/src/components/docker/options/image/ImagePushOptions.cjs +6 -6
- package/src/components/docker/options/image/ImagePushOptions.mjs +6 -6
- package/src/components/docker/options/image/ImageRemoveOptions.cjs +6 -6
- package/src/components/docker/options/image/ImageRemoveOptions.mjs +6 -6
- package/src/components/docker/options/image/ImageTagOptions.cjs +6 -6
- package/src/components/docker/options/image/ImageTagOptions.mjs +6 -6
- package/src/components/docker/options/network/NetworkCreateOptions.cjs +6 -6
- package/src/components/docker/options/network/NetworkCreateOptions.mjs +6 -6
- package/src/components/entrypoint/Entrypoint.cjs +12 -12
- package/src/components/entrypoint/Entrypoint.mjs +12 -12
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.cjs +3 -3
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.mjs +3 -3
- package/src/components/entrypoint/lib/Controller.cjs +11 -11
- package/src/components/entrypoint/lib/Controller.mjs +11 -11
- package/src/constants/DIMetadataKey.cjs +2 -2
- package/src/constants/DIMetadataKey.mjs +2 -2
- package/src/constants/DTOMetadataKey.cjs +2 -2
- package/src/constants/DTOMetadataKey.mjs +2 -2
- package/src/decorators/asst/After.cjs +3 -3
- package/src/decorators/asst/After.mjs +3 -3
- package/src/decorators/asst/Before.cjs +3 -3
- package/src/decorators/asst/Before.mjs +3 -3
- package/src/decorators/ctrl/CLIAction.cjs +7 -7
- package/src/decorators/ctrl/CLIAction.mjs +7 -7
- package/src/decorators/ctrl/HTTPAction.cjs +7 -7
- package/src/decorators/ctrl/HTTPAction.mjs +7 -7
- package/src/decorators/ctrl/ServiceAction.cjs +7 -7
- package/src/decorators/ctrl/ServiceAction.mjs +7 -7
- package/src/decorators/ctrl/http/DELETE.cjs +85 -0
- package/src/decorators/ctrl/http/DELETE.mjs +79 -0
- package/src/decorators/ctrl/http/GET.cjs +85 -0
- package/src/decorators/ctrl/http/GET.mjs +79 -0
- package/src/decorators/ctrl/http/HEAD.cjs +85 -0
- package/src/decorators/ctrl/http/HEAD.mjs +79 -0
- package/src/decorators/ctrl/http/OPTIONS.cjs +85 -0
- package/src/decorators/ctrl/http/OPTIONS.mjs +79 -0
- package/src/decorators/ctrl/http/PATCH.cjs +85 -0
- package/src/decorators/ctrl/http/PATCH.mjs +79 -0
- package/src/decorators/ctrl/http/POST.cjs +85 -0
- package/src/decorators/ctrl/http/POST.mjs +79 -0
- package/src/decorators/ctrl/http/PUT.cjs +85 -0
- package/src/decorators/ctrl/http/PUT.mjs +79 -0
- package/src/decorators/di/Autoload.cjs +2 -2
- package/src/decorators/di/Autoload.mjs +2 -2
- package/src/decorators/di/Configurable.cjs +6 -6
- package/src/decorators/di/Configurable.mjs +6 -6
- package/src/decorators/di/Inject.cjs +6 -6
- package/src/decorators/di/Inject.mjs +6 -6
- package/src/decorators/di/Lifetime.cjs +4 -4
- package/src/decorators/di/Lifetime.mjs +4 -4
- package/src/decorators/dto/Accept.cjs +6 -6
- package/src/decorators/dto/Accept.mjs +6 -6
- package/src/decorators/dto/Expect.cjs +6 -6
- package/src/decorators/dto/Expect.mjs +6 -6
- package/src/decorators/dto/IndexSignature.cjs +6 -6
- package/src/decorators/dto/IndexSignature.mjs +6 -6
- package/src/decorators/dto/Return.cjs +6 -6
- package/src/decorators/dto/Return.mjs +6 -6
- package/src/decorators/orm/AfterInsert.cjs +12 -12
- package/src/decorators/orm/AfterInsert.mjs +12 -12
- package/src/decorators/orm/AfterLoad.cjs +12 -12
- package/src/decorators/orm/AfterLoad.mjs +12 -12
- package/src/decorators/orm/AfterRecover.cjs +12 -12
- package/src/decorators/orm/AfterRecover.mjs +12 -12
- package/src/decorators/orm/AfterRemove.cjs +12 -12
- package/src/decorators/orm/AfterRemove.mjs +12 -12
- package/src/decorators/orm/AfterSoftRemove.cjs +12 -12
- package/src/decorators/orm/AfterSoftRemove.mjs +12 -12
- package/src/decorators/orm/AfterUpdate.cjs +12 -12
- package/src/decorators/orm/AfterUpdate.mjs +12 -12
- package/src/decorators/orm/BeforeInsert.cjs +12 -12
- package/src/decorators/orm/BeforeInsert.mjs +12 -12
- package/src/decorators/orm/BeforeRecover.cjs +12 -12
- package/src/decorators/orm/BeforeRecover.mjs +12 -12
- package/src/decorators/orm/BeforeRemove.cjs +12 -12
- package/src/decorators/orm/BeforeRemove.mjs +12 -12
- package/src/decorators/orm/BeforeSoftRemove.cjs +12 -12
- package/src/decorators/orm/BeforeSoftRemove.mjs +12 -12
- package/src/decorators/orm/BeforeUpdate.cjs +12 -12
- package/src/decorators/orm/BeforeUpdate.mjs +12 -12
- package/src/decorators/orm/Check.cjs +12 -12
- package/src/decorators/orm/Check.mjs +12 -12
- package/src/decorators/orm/ChildEntity.cjs +12 -12
- package/src/decorators/orm/ChildEntity.mjs +12 -12
- package/src/decorators/orm/Column.cjs +12 -12
- package/src/decorators/orm/Column.mjs +12 -12
- package/src/decorators/orm/CreateDateColumn.cjs +12 -12
- package/src/decorators/orm/CreateDateColumn.mjs +12 -12
- package/src/decorators/orm/DeleteDateColumn.cjs +12 -12
- package/src/decorators/orm/DeleteDateColumn.mjs +12 -12
- package/src/decorators/orm/Entity.cjs +12 -12
- package/src/decorators/orm/Entity.mjs +12 -12
- package/src/decorators/orm/EventSubscriber.cjs +12 -12
- package/src/decorators/orm/EventSubscriber.mjs +12 -12
- package/src/decorators/orm/Exclusion.cjs +12 -12
- package/src/decorators/orm/Exclusion.mjs +12 -12
- package/src/decorators/orm/Generated.cjs +12 -12
- package/src/decorators/orm/Generated.mjs +12 -12
- package/src/decorators/orm/Index.cjs +12 -12
- package/src/decorators/orm/Index.mjs +12 -12
- package/src/decorators/orm/JoinColumn.cjs +12 -12
- package/src/decorators/orm/JoinColumn.mjs +12 -12
- package/src/decorators/orm/JoinTable.cjs +12 -12
- package/src/decorators/orm/JoinTable.mjs +12 -12
- package/src/decorators/orm/ManyToMany.cjs +12 -12
- package/src/decorators/orm/ManyToMany.mjs +12 -12
- package/src/decorators/orm/ManyToOne.cjs +12 -12
- package/src/decorators/orm/ManyToOne.mjs +12 -12
- package/src/decorators/orm/ObjectIdColumn.cjs +12 -12
- package/src/decorators/orm/ObjectIdColumn.mjs +12 -12
- package/src/decorators/orm/OneToMany.cjs +12 -12
- package/src/decorators/orm/OneToMany.mjs +12 -12
- package/src/decorators/orm/OneToOne.cjs +12 -12
- package/src/decorators/orm/OneToOne.mjs +12 -12
- package/src/decorators/orm/PrimaryColumn.cjs +12 -12
- package/src/decorators/orm/PrimaryColumn.mjs +12 -12
- package/src/decorators/orm/PrimaryGeneratedColumn.cjs +12 -12
- package/src/decorators/orm/PrimaryGeneratedColumn.mjs +12 -12
- package/src/decorators/orm/RelationId.cjs +12 -12
- package/src/decorators/orm/RelationId.mjs +12 -12
- package/src/decorators/orm/TableInheritance.cjs +12 -12
- package/src/decorators/orm/TableInheritance.mjs +12 -12
- package/src/decorators/orm/Tree.cjs +12 -12
- package/src/decorators/orm/Tree.mjs +12 -12
- package/src/decorators/orm/TreeChildren.cjs +12 -12
- package/src/decorators/orm/TreeChildren.mjs +12 -12
- package/src/decorators/orm/TreeLevelColumn.cjs +12 -12
- package/src/decorators/orm/TreeLevelColumn.mjs +12 -12
- package/src/decorators/orm/TreeParent.cjs +12 -12
- package/src/decorators/orm/TreeParent.mjs +12 -12
- package/src/decorators/orm/Unique.cjs +12 -12
- package/src/decorators/orm/Unique.mjs +12 -12
- package/src/decorators/orm/UpdateDateColumn.cjs +12 -12
- package/src/decorators/orm/UpdateDateColumn.mjs +12 -12
- package/src/decorators/orm/VersionColumn.cjs +12 -12
- package/src/decorators/orm/VersionColumn.mjs +12 -12
- package/src/decorators/orm/ViewColumn.cjs +12 -12
- package/src/decorators/orm/ViewColumn.mjs +12 -12
- package/src/decorators/orm/ViewEntity.cjs +12 -12
- package/src/decorators/orm/ViewEntity.mjs +12 -12
- package/src/decorators/orm/VirtualColumn.cjs +12 -12
- package/src/decorators/orm/VirtualColumn.mjs +12 -12
- package/src/exceptions/DestroyRuntimeContainerException.cjs +3 -3
- package/src/exceptions/DestroyRuntimeContainerException.mjs +3 -3
- package/src/exceptions/InvalidActionPatternDepthException.cjs +3 -3
- package/src/exceptions/InvalidActionPatternDepthException.mjs +3 -3
- package/src/exceptions/InvalidAssistantFunctionTypeException.cjs +3 -3
- package/src/exceptions/InvalidAssistantFunctionTypeException.mjs +3 -3
- package/src/exceptions/InvalidObjectTypeException.cjs +3 -3
- package/src/exceptions/InvalidObjectTypeException.mjs +3 -3
- package/src/exceptions/MethodNotFoundException.cjs +3 -3
- package/src/exceptions/MethodNotFoundException.mjs +3 -3
- package/src/exceptions/alias/AliasExistsException.cjs +3 -3
- package/src/exceptions/alias/AliasExistsException.mjs +3 -3
- package/src/exceptions/alias/AliasNotFoundException.cjs +3 -3
- package/src/exceptions/alias/AliasNotFoundException.mjs +3 -3
- package/src/exceptions/alias/InvalidAliasNameException.cjs +3 -3
- package/src/exceptions/alias/InvalidAliasNameException.mjs +3 -3
- package/src/exceptions/di/DependencyInjectionException.cjs +3 -3
- package/src/exceptions/di/DependencyInjectionException.mjs +3 -3
- package/src/exceptions/di/LifetimeLockedException.cjs +3 -3
- package/src/exceptions/di/LifetimeLockedException.mjs +3 -3
- package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.cjs +3 -3
- package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.mjs +3 -3
- package/src/exceptions/dto/InvalidMethodAcceptException.cjs +3 -3
- package/src/exceptions/dto/InvalidMethodAcceptException.mjs +3 -3
- package/src/exceptions/dto/InvalidMethodReturnException.cjs +3 -3
- package/src/exceptions/dto/InvalidMethodReturnException.mjs +3 -3
- package/src/exceptions/dto/InvalidValueException.cjs +3 -3
- package/src/exceptions/dto/InvalidValueException.mjs +3 -3
- package/src/lib/base/BaseObject.cjs +11 -11
- package/src/lib/base/BaseObject.mjs +11 -11
- package/src/lib/base/Context.cjs +6 -6
- package/src/lib/base/Context.mjs +6 -6
- package/src/lib/base/EventEmitter.cjs +1 -1
- package/src/lib/base/EventEmitter.mjs +1 -1
- package/src/lib/base/abstracts/Exception.cjs +3 -3
- package/src/lib/base/abstracts/Exception.mjs +3 -3
- package/src/lib/base/internal/ApplicationConfigLoader.cjs +11 -11
- package/src/lib/base/internal/ApplicationConfigLoader.mjs +11 -11
- package/src/lib/base/internal/BasicInfo.cjs +3 -3
- package/src/lib/base/internal/BasicInfo.mjs +3 -3
- package/src/lib/base/internal/ConfigurableRecordsInjection.cjs +2 -2
- package/src/lib/base/internal/ConfigurableRecordsInjection.mjs +2 -2
- package/src/lib/base/internal/ConstructorSymbol.cjs +2 -2
- package/src/lib/base/internal/ConstructorSymbol.mjs +2 -2
- package/src/lib/base/internal/ControllerEntrypoint.cjs +4 -4
- package/src/lib/base/internal/ControllerEntrypoint.mjs +4 -4
- package/src/lib/base/internal/DataValidator.cjs +5 -5
- package/src/lib/base/internal/DataValidator.mjs +5 -5
- package/src/lib/base/internal/FlexibleDTO.cjs +6 -6
- package/src/lib/base/internal/FlexibleDTO.mjs +6 -6
- 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 +6 -6
- package/src/lib/base/internal/MethodValidation.mjs +6 -6
- package/src/lib/base/internal/ModuleConfigLoader.cjs +11 -11
- package/src/lib/base/internal/ModuleConfigLoader.mjs +11 -11
- package/src/lib/base/internal/ObjectConfiguration.cjs +6 -6
- package/src/lib/base/internal/ObjectConfiguration.mjs +6 -6
- package/src/lib/base/internal/ObjectContainer.cjs +2 -2
- package/src/lib/base/internal/ObjectContainer.mjs +2 -2
- package/src/lib/base/internal/ObjectInjection.cjs +30 -21
- package/src/lib/base/internal/ObjectInjection.mjs +19 -10
- 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 +6 -6
- package/src/lib/base/internal/ObjectSchemaValidation.mjs +6 -6
- package/src/lib/base/internal/ObjectType.cjs +11 -11
- package/src/lib/base/internal/ObjectType.mjs +11 -11
- package/src/lib/base/internal/PatternManager.cjs +1 -1
- package/src/lib/base/internal/PatternManager.mjs +1 -1
- package/src/lib/context/CLIContext.cjs +6 -6
- package/src/lib/context/CLIContext.mjs +6 -6
- package/src/lib/context/HTTPContext.cjs +6 -6
- package/src/lib/context/HTTPContext.mjs +6 -6
- package/src/lib/context/ServiceContext.cjs +6 -6
- package/src/lib/context/ServiceContext.mjs +6 -6
- package/src/lib/core/Alias.cjs +3 -3
- package/src/lib/core/Alias.mjs +3 -3
- package/src/lib/core/Application.cjs +13 -13
- package/src/lib/core/Application.mjs +13 -13
- package/src/lib/core/Component.cjs +11 -11
- package/src/lib/core/Component.mjs +11 -11
- package/src/lib/core/Container.cjs +11 -11
- package/src/lib/core/Container.mjs +11 -11
- package/src/lib/core/DTO.cjs +6 -6
- package/src/lib/core/DTO.mjs +6 -6
- package/src/lib/core/Module.cjs +12 -12
- package/src/lib/core/Module.mjs +12 -12
- package/src/lib/core/Provider.cjs +11 -11
- package/src/lib/core/Provider.mjs +11 -11
- package/src/lib/core/Time.cjs +7 -4
- package/src/lib/core/Time.mjs +7 -4
- package/src/lib/helpers/Glob.cjs +2 -2
- package/src/lib/helpers/Glob.mjs +2 -2
- 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/IsSymbol.cjs +6 -6
- package/src/lib/helpers/IsSymbol.mjs +6 -6
- package/src/lib/helpers/IsXML.cjs +1 -1
- package/src/lib/helpers/IsXML.mjs +1 -1
- package/src/lib/helpers/MD5.cjs +3 -3
- package/src/lib/helpers/MD5.mjs +3 -3
- package/src/lib/helpers/NonceStr.cjs +2 -2
- package/src/lib/helpers/NonceStr.mjs +2 -2
- package/src/lib/helpers/ObjectHash.cjs +2 -2
- package/src/lib/helpers/ObjectHash.mjs +2 -2
- package/src/lib/helpers/RandomString.cjs +2 -2
- package/src/lib/helpers/RandomString.mjs +2 -2
- package/src/lib/helpers/SHA1.cjs +3 -3
- package/src/lib/helpers/SHA1.mjs +3 -3
- package/src/lib/helpers/SHA256.cjs +3 -3
- package/src/lib/helpers/SHA256.mjs +3 -3
- package/src/lib/ioc/DependencyInjectionContainer.cjs +10 -10
- package/src/lib/ioc/DependencyInjectionContainer.mjs +10 -10
- package/src/lib/ioc/Errors.cjs +6 -6
- package/src/lib/ioc/Errors.mjs +6 -6
- package/src/lib/ioc/ListModules.cjs +7 -7
- package/src/lib/ioc/ListModules.mjs +7 -7
- package/src/lib/ioc/LoadModules.cjs +6 -6
- package/src/lib/ioc/LoadModules.mjs +6 -6
- package/src/lib/ioc/Resolvers.cjs +6 -6
- package/src/lib/ioc/Resolvers.mjs +6 -6
- package/src/lib/ioc/Utils.cjs +6 -6
- package/src/lib/ioc/Utils.mjs +6 -6
- package/src/lib/validation/VLD.cjs +4 -4
- package/src/lib/validation/VLD.mjs +4 -4
- package/src/options/ApplicationOptions.cjs +11 -11
- package/src/options/ApplicationOptions.mjs +11 -11
- package/src/options/LoadAnonymousObjectOptions.cjs +11 -11
- package/src/options/LoadAnonymousObjectOptions.mjs +11 -11
- package/src/options/LoadNamedObjectOptions.cjs +11 -11
- package/src/options/LoadNamedObjectOptions.mjs +11 -11
- package/src/options/LoadObjectOptions.cjs +11 -11
- package/src/options/LoadObjectOptions.mjs +11 -11
- package/src/options/ModuleLoadObjectsOptions.cjs +11 -11
- package/src/options/ModuleLoadObjectsOptions.mjs +11 -11
- package/src/options/ModuleOptions.cjs +11 -11
- package/src/options/ModuleOptions.mjs +11 -11
- package/src/options/OverridableNamedObjectOptions.cjs +11 -11
- package/src/options/OverridableNamedObjectOptions.mjs +11 -11
- package/src/options/OverridableObjectOptions.cjs +11 -11
- package/src/options/OverridableObjectOptions.mjs +11 -11
- package/src/providers/Database.cjs +16 -16
- package/src/providers/Database.mjs +16 -16
- package/src/providers/PasswordHash.cjs +689 -0
- package/src/providers/PasswordHash.mjs +677 -0
- package/vendor/Package.10.cjs +2 -82
- package/vendor/Package.10.mjs +2 -76
- package/vendor/Package.11.cjs +5 -5
- package/vendor/Package.11.mjs +5 -5
- package/vendor/{Package.22.cjs → Package.112.cjs} +8 -8
- package/vendor/{Package.22.mjs → Package.112.mjs} +8 -8
- package/vendor/Package.12.cjs +83 -1
- package/vendor/Package.12.mjs +77 -1
- package/vendor/Package.13.cjs +1 -478
- package/vendor/Package.13.mjs +1 -460
- package/vendor/Package.14.cjs +5 -5
- package/vendor/Package.14.mjs +5 -5
- package/vendor/Package.15.cjs +204 -193
- package/vendor/Package.15.mjs +195 -184
- package/vendor/Package.2.cjs +7002 -5
- package/vendor/Package.2.mjs +6992 -5
- package/vendor/Package.3.cjs +455 -925
- package/vendor/Package.3.mjs +437 -925
- package/vendor/Package.4.cjs +939 -37
- package/vendor/Package.4.mjs +941 -35
- package/vendor/Package.5.cjs +32 -6992
- package/vendor/Package.5.mjs +30 -6984
- package/vendor/Package.6.cjs +4309 -2
- package/vendor/Package.6.mjs +4309 -2
- package/vendor/{Package.72.cjs → Package.62.cjs} +3 -3
- package/vendor/{Package.72.mjs → Package.62.mjs} +3 -3
- package/vendor/{Package.73.cjs → Package.63.cjs} +1 -1
- package/vendor/{Package.73.mjs → Package.63.mjs} +1 -1
- package/vendor/{Package.74.cjs → Package.64.cjs} +2 -2
- package/vendor/{Package.74.mjs → Package.64.mjs} +2 -2
- package/vendor/Package.7.cjs +3 -4308
- package/vendor/Package.7.mjs +3 -4308
- package/vendor/Package.8.cjs +8 -4
- package/vendor/Package.8.mjs +8 -4
- package/vendor/Package.9.cjs +1 -1
- package/vendor/Package.9.mjs +1 -1
- package/vendor/TypeDef.1.d.ts +4 -0
- package/vendor/TypeDef.13.d.ts +2 -2
package/vendor/Package.3.mjs
CHANGED
|
@@ -1,948 +1,460 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as t, a as e } from "./Package.1.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import { AsyncConstructor as s } from "../src/lib/base/async-constructor/AsyncConstructor.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import { Transient as i } from "../src/decorators/di/Lifetime.mjs";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
(function(r) {
|
|
9
|
-
var n = typeof globalThis === "object" ? globalThis : typeof e === "object" ? e : typeof self === "object" ? self : typeof this === "object" ? this : o();
|
|
10
|
-
var i = a(t);
|
|
11
|
-
if (typeof n.Reflect !== "undefined") {
|
|
12
|
-
i = a(n.Reflect, i);
|
|
13
|
-
}
|
|
14
|
-
r(i, n);
|
|
15
|
-
if (typeof n.Reflect === "undefined") {
|
|
16
|
-
n.Reflect = t;
|
|
17
|
-
}
|
|
18
|
-
function a(e, t) {
|
|
19
|
-
return function(r, n) {
|
|
20
|
-
Object.defineProperty(e, r, {
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true,
|
|
23
|
-
value: n
|
|
24
|
-
});
|
|
25
|
-
if (t) t(r, n);
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function u() {
|
|
29
|
-
try {
|
|
30
|
-
return Function("return this;")();
|
|
31
|
-
} catch (e) {}
|
|
32
|
-
}
|
|
33
|
-
function f() {
|
|
34
|
-
try {
|
|
35
|
-
return (void 0, eval)("(function() { return this; })()");
|
|
36
|
-
} catch (e) {}
|
|
37
|
-
}
|
|
38
|
-
function o() {
|
|
39
|
-
return u() || f();
|
|
40
|
-
}
|
|
41
|
-
})((function(e, t) {
|
|
42
|
-
var r = Object.prototype.hasOwnProperty;
|
|
43
|
-
var n = typeof Symbol === "function";
|
|
44
|
-
var i = n && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
45
|
-
var a = n && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
46
|
-
var u = typeof Object.create === "function";
|
|
47
|
-
var f = {
|
|
48
|
-
__proto__: []
|
|
49
|
-
} instanceof Array;
|
|
50
|
-
var o = !u && !f;
|
|
51
|
-
var s = {
|
|
52
|
-
create: u ? function() {
|
|
53
|
-
return le(Object.create(null));
|
|
54
|
-
} : f ? function() {
|
|
55
|
-
return le({
|
|
56
|
-
__proto__: null
|
|
57
|
-
});
|
|
58
|
-
} : function() {
|
|
59
|
-
return le({});
|
|
60
|
-
},
|
|
61
|
-
has: o ? function(e, t) {
|
|
62
|
-
return r.call(e, t);
|
|
63
|
-
} : function(e, t) {
|
|
64
|
-
return t in e;
|
|
65
|
-
},
|
|
66
|
-
get: o ? function(e, t) {
|
|
67
|
-
return r.call(e, t) ? e[t] : undefined;
|
|
68
|
-
} : function(e, t) {
|
|
69
|
-
return e[t];
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
var c = Object.getPrototypeOf(Function);
|
|
73
|
-
var l = typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : oe();
|
|
74
|
-
var d = typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : se();
|
|
75
|
-
var h = typeof WeakMap === "function" ? WeakMap : ce();
|
|
76
|
-
var y = n ? Symbol.for("@reflect-metadata:registry") : undefined;
|
|
77
|
-
var v = ie();
|
|
78
|
-
var p = ae(v);
|
|
79
|
-
function w(e, t, r, n) {
|
|
80
|
-
if (!D(r)) {
|
|
81
|
-
if (!B(e)) throw new TypeError;
|
|
82
|
-
if (!G(t)) throw new TypeError;
|
|
83
|
-
if (!G(n) && !D(n) && !C(n)) throw new TypeError;
|
|
84
|
-
if (C(n)) n = undefined;
|
|
85
|
-
r = q(r);
|
|
86
|
-
return j(e, t, r, n);
|
|
87
|
-
} else {
|
|
88
|
-
if (!B(e)) throw new TypeError;
|
|
89
|
-
if (!N(t)) throw new TypeError;
|
|
90
|
-
return T(e, t);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
e("decorate", w);
|
|
94
|
-
function _(e, t) {
|
|
95
|
-
function r(r, n) {
|
|
96
|
-
if (!G(r)) throw new TypeError;
|
|
97
|
-
if (!D(n) && !Q(n)) throw new TypeError;
|
|
98
|
-
A(e, t, r, n);
|
|
99
|
-
}
|
|
100
|
-
return r;
|
|
101
|
-
}
|
|
102
|
-
e("metadata", _);
|
|
103
|
-
function g(e, t, r, n) {
|
|
104
|
-
if (!G(r)) throw new TypeError;
|
|
105
|
-
if (!D(n)) n = q(n);
|
|
106
|
-
return A(e, t, r, n);
|
|
107
|
-
}
|
|
108
|
-
e("defineMetadata", g);
|
|
109
|
-
function b(e, t, r) {
|
|
110
|
-
if (!G(t)) throw new TypeError;
|
|
111
|
-
if (!D(r)) r = q(r);
|
|
112
|
-
return x(e, t, r);
|
|
113
|
-
}
|
|
114
|
-
e("hasMetadata", b);
|
|
115
|
-
function O(e, t, r) {
|
|
116
|
-
if (!G(t)) throw new TypeError;
|
|
117
|
-
if (!D(r)) r = q(r);
|
|
118
|
-
return R(e, t, r);
|
|
119
|
-
}
|
|
120
|
-
e("hasOwnMetadata", O);
|
|
121
|
-
function k(e, t, r) {
|
|
122
|
-
if (!G(t)) throw new TypeError;
|
|
123
|
-
if (!D(r)) r = q(r);
|
|
124
|
-
return S(e, t, r);
|
|
125
|
-
}
|
|
126
|
-
e("getMetadata", k);
|
|
127
|
-
function M(e, t, r) {
|
|
128
|
-
if (!G(t)) throw new TypeError;
|
|
129
|
-
if (!D(r)) r = q(r);
|
|
130
|
-
return K(e, t, r);
|
|
131
|
-
}
|
|
132
|
-
e("getOwnMetadata", M);
|
|
133
|
-
function m(e, t) {
|
|
134
|
-
if (!G(e)) throw new TypeError;
|
|
135
|
-
if (!D(t)) t = q(t);
|
|
136
|
-
return I(e, t);
|
|
137
|
-
}
|
|
138
|
-
e("getMetadataKeys", m);
|
|
139
|
-
function E(e, t) {
|
|
140
|
-
if (!G(e)) throw new TypeError;
|
|
141
|
-
if (!D(t)) t = q(t);
|
|
142
|
-
return F(e, t);
|
|
143
|
-
}
|
|
144
|
-
e("getOwnMetadataKeys", E);
|
|
145
|
-
function P(e, t, r) {
|
|
146
|
-
if (!G(t)) throw new TypeError;
|
|
147
|
-
if (!D(r)) r = q(r);
|
|
148
|
-
if (!G(t)) throw new TypeError;
|
|
149
|
-
if (!D(r)) r = q(r);
|
|
150
|
-
var n = fe(t, r, false);
|
|
151
|
-
if (D(n)) return false;
|
|
152
|
-
return n.OrdinaryDeleteMetadata(e, t, r);
|
|
153
|
-
}
|
|
154
|
-
e("deleteMetadata", P);
|
|
155
|
-
function T(e, t) {
|
|
156
|
-
for (var r = e.length - 1; r >= 0; --r) {
|
|
157
|
-
var n = e[r];
|
|
158
|
-
var i = n(t);
|
|
159
|
-
if (!D(i) && !C(i)) {
|
|
160
|
-
if (!N(i)) throw new TypeError;
|
|
161
|
-
t = i;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
return t;
|
|
165
|
-
}
|
|
166
|
-
function j(e, t, r, n) {
|
|
167
|
-
for (var i = e.length - 1; i >= 0; --i) {
|
|
168
|
-
var a = e[i];
|
|
169
|
-
var u = a(t, r, n);
|
|
170
|
-
if (!D(u) && !C(u)) {
|
|
171
|
-
if (!G(u)) throw new TypeError;
|
|
172
|
-
n = u;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return n;
|
|
176
|
-
}
|
|
177
|
-
function x(e, t, r) {
|
|
178
|
-
var n = R(e, t, r);
|
|
179
|
-
if (n) return true;
|
|
180
|
-
var i = re(t);
|
|
181
|
-
if (!C(i)) return x(e, i, r);
|
|
182
|
-
return false;
|
|
183
|
-
}
|
|
184
|
-
function R(e, t, r) {
|
|
185
|
-
var n = fe(t, r, false);
|
|
186
|
-
if (D(n)) return false;
|
|
187
|
-
return V(n.OrdinaryHasOwnMetadata(e, t, r));
|
|
188
|
-
}
|
|
189
|
-
function S(e, t, r) {
|
|
190
|
-
var n = R(e, t, r);
|
|
191
|
-
if (n) return K(e, t, r);
|
|
192
|
-
var i = re(t);
|
|
193
|
-
if (!C(i)) return S(e, i, r);
|
|
194
|
-
return undefined;
|
|
195
|
-
}
|
|
196
|
-
function K(e, t, r) {
|
|
197
|
-
var n = fe(t, r, false);
|
|
198
|
-
if (D(n)) return;
|
|
199
|
-
return n.OrdinaryGetOwnMetadata(e, t, r);
|
|
200
|
-
}
|
|
201
|
-
function A(e, t, r, n) {
|
|
202
|
-
var i = fe(r, n, true);
|
|
203
|
-
i.OrdinaryDefineOwnMetadata(e, t, r, n);
|
|
204
|
-
}
|
|
205
|
-
function I(e, t) {
|
|
206
|
-
var r = F(e, t);
|
|
207
|
-
var n = re(e);
|
|
208
|
-
if (n === null) return r;
|
|
209
|
-
var i = I(n, t);
|
|
210
|
-
if (i.length <= 0) return r;
|
|
211
|
-
if (r.length <= 0) return i;
|
|
212
|
-
var a = new d;
|
|
213
|
-
var u = [];
|
|
214
|
-
for (var f = 0, o = r; f < o.length; f++) {
|
|
215
|
-
var s = o[f];
|
|
216
|
-
var c = a.has(s);
|
|
217
|
-
if (!c) {
|
|
218
|
-
a.add(s);
|
|
219
|
-
u.push(s);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
for (var l = 0, h = i; l < h.length; l++) {
|
|
223
|
-
var s = h[l];
|
|
224
|
-
var c = a.has(s);
|
|
225
|
-
if (!c) {
|
|
226
|
-
a.add(s);
|
|
227
|
-
u.push(s);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
return u;
|
|
231
|
-
}
|
|
232
|
-
function F(e, t) {
|
|
233
|
-
var r = fe(e, t, false);
|
|
234
|
-
if (!r) {
|
|
235
|
-
return [];
|
|
236
|
-
}
|
|
237
|
-
return r.OrdinaryOwnMetadataKeys(e, t);
|
|
238
|
-
}
|
|
239
|
-
function z(e) {
|
|
240
|
-
if (e === null) return 1;
|
|
241
|
-
switch (typeof e) {
|
|
242
|
-
case "undefined":
|
|
243
|
-
return 0;
|
|
7
|
+
import { MethodNotFoundException as r } from "../src/exceptions/MethodNotFoundException.mjs";
|
|
244
8
|
|
|
245
|
-
|
|
246
|
-
return 2;
|
|
9
|
+
import { createContainer as o } from "../src/lib/ioc/DependencyInjectionContainer.mjs";
|
|
247
10
|
|
|
248
|
-
|
|
249
|
-
return 3;
|
|
11
|
+
import { randomUUID as n } from "node:crypto";
|
|
250
12
|
|
|
251
|
-
|
|
252
|
-
return 4;
|
|
13
|
+
import { GetConfigurableRecords as a, SetIdToInstance as c, SetConfigurableRecordsToInstance as l, SetConfigurableRecords as h, GetConfigurableRecordsFromInstance as d, GetIdFromInstance as m } from "../src/lib/base/internal/ConfigurableRecordsInjection.mjs";
|
|
253
14
|
|
|
254
|
-
|
|
255
|
-
return 5;
|
|
15
|
+
import { GetObjectConfigurableProperties as p } from "../src/lib/base/internal/ObjectConfiguration.mjs";
|
|
256
16
|
|
|
257
|
-
|
|
258
|
-
return e === null ? 1 : 6;
|
|
17
|
+
import { GetObjectIsAutoload as u, GetObjectInjectItemsByPrototype as f } from "../src/lib/base/internal/ObjectInjection.mjs";
|
|
259
18
|
|
|
260
|
-
|
|
261
|
-
return 6;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
function D(e) {
|
|
265
|
-
return e === undefined;
|
|
266
|
-
}
|
|
267
|
-
function C(e) {
|
|
268
|
-
return e === null;
|
|
269
|
-
}
|
|
270
|
-
function W(e) {
|
|
271
|
-
return typeof e === "symbol";
|
|
272
|
-
}
|
|
273
|
-
function G(e) {
|
|
274
|
-
return typeof e === "object" ? e !== null : typeof e === "function";
|
|
275
|
-
}
|
|
276
|
-
function H(e, t) {
|
|
277
|
-
switch (z(e)) {
|
|
278
|
-
case 0:
|
|
279
|
-
return e;
|
|
19
|
+
import { SetObjectContainerGetter as b } from "../src/lib/base/internal/ObjectContainer.mjs";
|
|
280
20
|
|
|
281
|
-
|
|
282
|
-
return e;
|
|
21
|
+
import { D as y, I as j } from "./Package.2.mjs";
|
|
283
22
|
|
|
284
|
-
|
|
285
|
-
return e;
|
|
23
|
+
import { ObjectConstructor as g } from "../src/lib/helpers/ObjectConstructor.mjs";
|
|
286
24
|
|
|
287
|
-
|
|
288
|
-
return e;
|
|
25
|
+
import { As as w } from "../src/lib/helpers/As.mjs";
|
|
289
26
|
|
|
290
|
-
|
|
291
|
-
return e;
|
|
27
|
+
import { DevNull as O } from "../src/lib/helpers/DevNull.mjs";
|
|
292
28
|
|
|
293
|
-
|
|
294
|
-
return e;
|
|
295
|
-
}
|
|
296
|
-
var r = t === 3 ? "string" : t === 5 ? "number" : "default";
|
|
297
|
-
var n = Y(e, i);
|
|
298
|
-
if (n !== undefined) {
|
|
299
|
-
var a = n.call(e, r);
|
|
300
|
-
if (G(a)) throw new TypeError;
|
|
301
|
-
return a;
|
|
302
|
-
}
|
|
303
|
-
return U(e, r === "default" ? "number" : r);
|
|
304
|
-
}
|
|
305
|
-
function U(e, t) {
|
|
306
|
-
if (t === "string") {
|
|
307
|
-
var r = e.toString;
|
|
308
|
-
if (J(r)) {
|
|
309
|
-
var n = r.call(e);
|
|
310
|
-
if (!G(n)) return n;
|
|
311
|
-
}
|
|
312
|
-
var i = e.valueOf;
|
|
313
|
-
if (J(i)) {
|
|
314
|
-
var n = i.call(e);
|
|
315
|
-
if (!G(n)) return n;
|
|
316
|
-
}
|
|
317
|
-
} else {
|
|
318
|
-
var i = e.valueOf;
|
|
319
|
-
if (J(i)) {
|
|
320
|
-
var n = i.call(e);
|
|
321
|
-
if (!G(n)) return n;
|
|
322
|
-
}
|
|
323
|
-
var a = e.toString;
|
|
324
|
-
if (J(a)) {
|
|
325
|
-
var n = a.call(e);
|
|
326
|
-
if (!G(n)) return n;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
throw new TypeError;
|
|
330
|
-
}
|
|
331
|
-
function V(e) {
|
|
332
|
-
return !!e;
|
|
333
|
-
}
|
|
334
|
-
function L(e) {
|
|
335
|
-
return "" + e;
|
|
336
|
-
}
|
|
337
|
-
function q(e) {
|
|
338
|
-
var t = H(e, 3);
|
|
339
|
-
if (W(t)) return t;
|
|
340
|
-
return L(t);
|
|
341
|
-
}
|
|
342
|
-
function B(e) {
|
|
343
|
-
return Array.isArray ? Array.isArray(e) : e instanceof Object ? e instanceof Array : Object.prototype.toString.call(e) === "[object Array]";
|
|
344
|
-
}
|
|
345
|
-
function J(e) {
|
|
346
|
-
return typeof e === "function";
|
|
347
|
-
}
|
|
348
|
-
function N(e) {
|
|
349
|
-
return typeof e === "function";
|
|
350
|
-
}
|
|
351
|
-
function Q(e) {
|
|
352
|
-
switch (z(e)) {
|
|
353
|
-
case 3:
|
|
354
|
-
return true;
|
|
29
|
+
import { ObjectParentConstructors as P } from "../src/lib/helpers/ObjectParentConstructors.mjs";
|
|
355
30
|
|
|
356
|
-
|
|
357
|
-
return true;
|
|
31
|
+
import { DependencyInjectionException as C } from "../src/exceptions/di/DependencyInjectionException.mjs";
|
|
358
32
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
return undefined;
|
|
470
|
-
}
|
|
471
|
-
function s(e, t) {
|
|
472
|
-
var r = a.get(e);
|
|
473
|
-
var n;
|
|
474
|
-
if (!D(r)) {
|
|
475
|
-
n = r.get(t);
|
|
476
|
-
}
|
|
477
|
-
if (!D(n)) {
|
|
478
|
-
return n;
|
|
479
|
-
}
|
|
480
|
-
n = o(e, t);
|
|
481
|
-
if (!D(n)) {
|
|
482
|
-
if (D(r)) {
|
|
483
|
-
r = new l;
|
|
484
|
-
a.set(e, r);
|
|
485
|
-
}
|
|
486
|
-
r.set(t, n);
|
|
487
|
-
}
|
|
488
|
-
return n;
|
|
489
|
-
}
|
|
490
|
-
function c(e) {
|
|
491
|
-
if (D(e)) throw new TypeError;
|
|
492
|
-
return r === e || n === e || !D(i) && i.has(e);
|
|
493
|
-
}
|
|
494
|
-
function v(e, t, r) {
|
|
495
|
-
if (!c(r)) {
|
|
496
|
-
throw new Error("Metadata provider not registered.");
|
|
497
|
-
}
|
|
498
|
-
var n = s(e, t);
|
|
499
|
-
if (n !== r) {
|
|
500
|
-
if (!D(n)) {
|
|
501
|
-
return false;
|
|
502
|
-
}
|
|
503
|
-
var i = a.get(e);
|
|
504
|
-
if (D(i)) {
|
|
505
|
-
i = new l;
|
|
506
|
-
a.set(e, i);
|
|
507
|
-
}
|
|
508
|
-
i.set(t, r);
|
|
509
|
-
}
|
|
510
|
-
return true;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
function ie() {
|
|
514
|
-
var e;
|
|
515
|
-
if (!D(y) && G(t.Reflect) && Object.isExtensible(t.Reflect)) {
|
|
516
|
-
e = t.Reflect[y];
|
|
517
|
-
}
|
|
518
|
-
if (D(e)) {
|
|
519
|
-
e = ne();
|
|
520
|
-
}
|
|
521
|
-
if (!D(y) && G(t.Reflect) && Object.isExtensible(t.Reflect)) {
|
|
522
|
-
Object.defineProperty(t.Reflect, y, {
|
|
523
|
-
enumerable: false,
|
|
524
|
-
configurable: false,
|
|
525
|
-
writable: false,
|
|
526
|
-
value: e
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
return e;
|
|
530
|
-
}
|
|
531
|
-
function ae(e) {
|
|
532
|
-
var t = new h;
|
|
533
|
-
var r = {
|
|
534
|
-
isProviderFor: function(e, r) {
|
|
535
|
-
var n = t.get(e);
|
|
536
|
-
if (D(n)) return false;
|
|
537
|
-
return n.has(r);
|
|
538
|
-
},
|
|
539
|
-
OrdinaryDefineOwnMetadata: u,
|
|
540
|
-
OrdinaryHasOwnMetadata: i,
|
|
541
|
-
OrdinaryGetOwnMetadata: a,
|
|
542
|
-
OrdinaryOwnMetadataKeys: f,
|
|
543
|
-
OrdinaryDeleteMetadata: o
|
|
544
|
-
};
|
|
545
|
-
v.registerProvider(r);
|
|
546
|
-
return r;
|
|
547
|
-
function n(n, i, a) {
|
|
548
|
-
var u = t.get(n);
|
|
549
|
-
var f = false;
|
|
550
|
-
if (D(u)) {
|
|
551
|
-
if (!a) return undefined;
|
|
552
|
-
u = new l;
|
|
553
|
-
t.set(n, u);
|
|
554
|
-
f = true;
|
|
555
|
-
}
|
|
556
|
-
var o = u.get(i);
|
|
557
|
-
if (D(o)) {
|
|
558
|
-
if (!a) return undefined;
|
|
559
|
-
o = new l;
|
|
560
|
-
u.set(i, o);
|
|
561
|
-
if (!e.setProvider(n, i, r)) {
|
|
562
|
-
u.delete(i);
|
|
563
|
-
if (f) {
|
|
564
|
-
t.delete(n);
|
|
565
|
-
}
|
|
566
|
-
throw new Error("Wrong provider for target.");
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
return o;
|
|
570
|
-
}
|
|
571
|
-
function i(e, t, r) {
|
|
572
|
-
var i = n(t, r, false);
|
|
573
|
-
if (D(i)) return false;
|
|
574
|
-
return V(i.has(e));
|
|
575
|
-
}
|
|
576
|
-
function a(e, t, r) {
|
|
577
|
-
var i = n(t, r, false);
|
|
578
|
-
if (D(i)) return undefined;
|
|
579
|
-
return i.get(e);
|
|
580
|
-
}
|
|
581
|
-
function u(e, t, r, i) {
|
|
582
|
-
var a = n(r, i, true);
|
|
583
|
-
a.set(e, t);
|
|
584
|
-
}
|
|
585
|
-
function f(e, t) {
|
|
586
|
-
var r = [];
|
|
587
|
-
var i = n(e, t, false);
|
|
588
|
-
if (D(i)) return r;
|
|
589
|
-
var a = i.keys();
|
|
590
|
-
var u = Z(a);
|
|
591
|
-
var f = 0;
|
|
592
|
-
while (true) {
|
|
593
|
-
var o = ee(u);
|
|
594
|
-
if (!o) {
|
|
595
|
-
r.length = f;
|
|
596
|
-
return r;
|
|
597
|
-
}
|
|
598
|
-
var s = $(o);
|
|
599
|
-
try {
|
|
600
|
-
r[f] = s;
|
|
601
|
-
} catch (e) {
|
|
602
|
-
try {
|
|
603
|
-
te(u);
|
|
604
|
-
} finally {
|
|
605
|
-
throw e;
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
f++;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
function o(e, r, i) {
|
|
612
|
-
var a = n(r, i, false);
|
|
613
|
-
if (D(a)) return false;
|
|
614
|
-
if (!a.delete(e)) return false;
|
|
615
|
-
if (a.size === 0) {
|
|
616
|
-
var u = t.get(r);
|
|
617
|
-
if (!D(u)) {
|
|
618
|
-
u.delete(i);
|
|
619
|
-
if (u.size === 0) {
|
|
620
|
-
t.delete(u);
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
return true;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
function ue(e) {
|
|
628
|
-
var t = e.defineMetadata, r = e.hasOwnMetadata, n = e.getOwnMetadata, i = e.getOwnMetadataKeys, a = e.deleteMetadata;
|
|
629
|
-
var u = new h;
|
|
630
|
-
var f = {
|
|
631
|
-
isProviderFor: function(e, t) {
|
|
632
|
-
var r = u.get(e);
|
|
633
|
-
if (!D(r) && r.has(t)) {
|
|
634
|
-
return true;
|
|
635
|
-
}
|
|
636
|
-
if (i(e, t).length) {
|
|
637
|
-
if (D(r)) {
|
|
638
|
-
r = new d;
|
|
639
|
-
u.set(e, r);
|
|
640
|
-
}
|
|
641
|
-
r.add(t);
|
|
642
|
-
return true;
|
|
643
|
-
}
|
|
644
|
-
return false;
|
|
645
|
-
},
|
|
646
|
-
OrdinaryDefineOwnMetadata: t,
|
|
647
|
-
OrdinaryHasOwnMetadata: r,
|
|
648
|
-
OrdinaryGetOwnMetadata: n,
|
|
649
|
-
OrdinaryOwnMetadataKeys: i,
|
|
650
|
-
OrdinaryDeleteMetadata: a
|
|
651
|
-
};
|
|
652
|
-
return f;
|
|
653
|
-
}
|
|
654
|
-
function fe(e, t, r) {
|
|
655
|
-
var n = v.getProvider(e, t);
|
|
656
|
-
if (!D(n)) {
|
|
657
|
-
return n;
|
|
658
|
-
}
|
|
659
|
-
if (r) {
|
|
660
|
-
if (v.setProvider(e, t, p)) {
|
|
661
|
-
return p;
|
|
662
|
-
}
|
|
663
|
-
throw new Error("Illegal state.");
|
|
664
|
-
}
|
|
665
|
-
return undefined;
|
|
666
|
-
}
|
|
667
|
-
function oe() {
|
|
668
|
-
var e = {};
|
|
669
|
-
var t = [];
|
|
670
|
-
var r = function() {
|
|
671
|
-
function e(e, t, r) {
|
|
672
|
-
this._index = 0;
|
|
673
|
-
this._keys = e;
|
|
674
|
-
this._values = t;
|
|
675
|
-
this._selector = r;
|
|
676
|
-
}
|
|
677
|
-
e.prototype["@@iterator"] = function() {
|
|
678
|
-
return this;
|
|
679
|
-
};
|
|
680
|
-
e.prototype[a] = function() {
|
|
681
|
-
return this;
|
|
682
|
-
};
|
|
683
|
-
e.prototype.next = function() {
|
|
684
|
-
var e = this._index;
|
|
685
|
-
if (e >= 0 && e < this._keys.length) {
|
|
686
|
-
var r = this._selector(this._keys[e], this._values[e]);
|
|
687
|
-
if (e + 1 >= this._keys.length) {
|
|
688
|
-
this._index = -1;
|
|
689
|
-
this._keys = t;
|
|
690
|
-
this._values = t;
|
|
33
|
+
import { ConstructorSymbol as R } from "../src/lib/base/internal/ConstructorSymbol.mjs";
|
|
34
|
+
|
|
35
|
+
import { Expect as S } from "../src/decorators/dto/Expect.mjs";
|
|
36
|
+
|
|
37
|
+
import { IndexSignature as N } from "../src/decorators/dto/IndexSignature.mjs";
|
|
38
|
+
|
|
39
|
+
import { asValue as v, asClass as I } from "../src/lib/ioc/Resolvers.mjs";
|
|
40
|
+
|
|
41
|
+
import { GetObjectLifetime as E } from "../src/lib/base/internal/ObjectLifetime.mjs";
|
|
42
|
+
|
|
43
|
+
import { Accept as M } from "../src/decorators/dto/Accept.mjs";
|
|
44
|
+
|
|
45
|
+
import { listModules as A } from "../src/lib/ioc/ListModules.mjs";
|
|
46
|
+
|
|
47
|
+
import { pathToFileURL as T } from "url";
|
|
48
|
+
|
|
49
|
+
import { isClass as L } from "../src/lib/ioc/Utils.mjs";
|
|
50
|
+
|
|
51
|
+
import { IsEmptyObject as k } from "../src/lib/helpers/IsEmptyObject.mjs";
|
|
52
|
+
|
|
53
|
+
import { AppendObjectWeakRefs as D, GetObjectWeakRefs as U, ClearObjectWeakRefs as x } from "../src/lib/base/internal/ObjectWeakRefs.mjs";
|
|
54
|
+
|
|
55
|
+
var B;
|
|
56
|
+
|
|
57
|
+
const _ = Symbol("OBJECT_ID");
|
|
58
|
+
|
|
59
|
+
let F = class LoadObjectOptions extends y {
|
|
60
|
+
static {
|
|
61
|
+
B = _;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
t([ S(y.Alternatives(y.String(), y.Symbol()).optional()), e("design:type", Object) ], F.prototype, B, void 0);
|
|
66
|
+
|
|
67
|
+
t([ S(y.Class((() => tt)).required()), e("design:type", Object) ], F.prototype, "class", void 0);
|
|
68
|
+
|
|
69
|
+
F = t([ N(y.Any()) ], F);
|
|
70
|
+
|
|
71
|
+
const G = Symbol("LAKUTATA.DI.CONTAINER.SYMBOL");
|
|
72
|
+
|
|
73
|
+
const Y = Symbol("LAKUTATA.DI.OWNER.SYMBOL");
|
|
74
|
+
|
|
75
|
+
class Container {
|
|
76
|
+
#t;
|
|
77
|
+
#e;
|
|
78
|
+
#s;
|
|
79
|
+
constructor(t, e) {
|
|
80
|
+
this.#e = new Set;
|
|
81
|
+
this.#s = false;
|
|
82
|
+
this.injectionNames = new Set;
|
|
83
|
+
this.parent = t;
|
|
84
|
+
this.#t = t ? t.#t.createScope() : o({
|
|
85
|
+
injectionMode: "PROXY",
|
|
86
|
+
strict: false
|
|
87
|
+
});
|
|
88
|
+
if (this.parent) this.parent.#e.add(this);
|
|
89
|
+
this.#t.register(G, v(this));
|
|
90
|
+
if (e) this.#t.register(Y, v(new WeakRef(e)));
|
|
91
|
+
}
|
|
92
|
+
async disposer(t) {
|
|
93
|
+
try {
|
|
94
|
+
await t.getMethod(H, false)();
|
|
95
|
+
} catch (t) {
|
|
96
|
+
O(t);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
buildResolverOptions(t) {
|
|
100
|
+
const e = E(t);
|
|
101
|
+
return {
|
|
102
|
+
lifetime: e,
|
|
103
|
+
dispose: t => this.disposer(t)
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
async processResolved(t, e, s = {}) {
|
|
107
|
+
const i = a(w(t.constructor), e);
|
|
108
|
+
const r = y.isValid(t.constructor, y.Class(tt));
|
|
109
|
+
if (r) {
|
|
110
|
+
c(w(t), e);
|
|
111
|
+
l(w(t), {
|
|
112
|
+
...i,
|
|
113
|
+
...s
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return Promise.resolve(t);
|
|
117
|
+
}
|
|
118
|
+
buildNameAndRegistrationPairFromOptions(t) {
|
|
119
|
+
const e = {};
|
|
120
|
+
const s = t[_] ? t[_] : R(t.class);
|
|
121
|
+
const i = {
|
|
122
|
+
...t,
|
|
123
|
+
class: void 0
|
|
124
|
+
};
|
|
125
|
+
delete i.id;
|
|
126
|
+
delete i.class;
|
|
127
|
+
h(t.class, s, i);
|
|
128
|
+
e[s] = I(t.class, this.buildResolverOptions(t.class));
|
|
129
|
+
return e;
|
|
130
|
+
}
|
|
131
|
+
async buildNameAndRegistrationPairFromGlob(t) {
|
|
132
|
+
const e = [];
|
|
133
|
+
A(t).forEach((t => {
|
|
134
|
+
e.push(new Promise((e => {
|
|
135
|
+
import(T(t.path).toString()).then((t => {
|
|
136
|
+
Object.keys(t).forEach((s => {
|
|
137
|
+
const i = t[s];
|
|
138
|
+
if (L(i) && y.isValid(i, y.Class(tt))) {
|
|
139
|
+
const t = i;
|
|
140
|
+
const s = {};
|
|
141
|
+
s[R(t)] = I(t, this.buildResolverOptions(t));
|
|
142
|
+
return e(s);
|
|
691
143
|
} else {
|
|
692
|
-
|
|
693
|
-
}
|
|
694
|
-
return {
|
|
695
|
-
value: r,
|
|
696
|
-
done: false
|
|
697
|
-
};
|
|
698
|
-
}
|
|
699
|
-
return {
|
|
700
|
-
value: undefined,
|
|
701
|
-
done: true
|
|
702
|
-
};
|
|
703
|
-
};
|
|
704
|
-
e.prototype.throw = function(e) {
|
|
705
|
-
if (this._index >= 0) {
|
|
706
|
-
this._index = -1;
|
|
707
|
-
this._keys = t;
|
|
708
|
-
this._values = t;
|
|
709
|
-
}
|
|
710
|
-
throw e;
|
|
711
|
-
};
|
|
712
|
-
e.prototype.return = function(e) {
|
|
713
|
-
if (this._index >= 0) {
|
|
714
|
-
this._index = -1;
|
|
715
|
-
this._keys = t;
|
|
716
|
-
this._values = t;
|
|
717
|
-
}
|
|
718
|
-
return {
|
|
719
|
-
value: e,
|
|
720
|
-
done: true
|
|
721
|
-
};
|
|
722
|
-
};
|
|
723
|
-
return e;
|
|
724
|
-
}();
|
|
725
|
-
var n = function() {
|
|
726
|
-
function t() {
|
|
727
|
-
this._keys = [];
|
|
728
|
-
this._values = [];
|
|
729
|
-
this._cacheKey = e;
|
|
730
|
-
this._cacheIndex = -2;
|
|
731
|
-
}
|
|
732
|
-
Object.defineProperty(t.prototype, "size", {
|
|
733
|
-
get: function() {
|
|
734
|
-
return this._keys.length;
|
|
735
|
-
},
|
|
736
|
-
enumerable: true,
|
|
737
|
-
configurable: true
|
|
738
|
-
});
|
|
739
|
-
t.prototype.has = function(e) {
|
|
740
|
-
return this._find(e, false) >= 0;
|
|
741
|
-
};
|
|
742
|
-
t.prototype.get = function(e) {
|
|
743
|
-
var t = this._find(e, false);
|
|
744
|
-
return t >= 0 ? this._values[t] : undefined;
|
|
745
|
-
};
|
|
746
|
-
t.prototype.set = function(e, t) {
|
|
747
|
-
var r = this._find(e, true);
|
|
748
|
-
this._values[r] = t;
|
|
749
|
-
return this;
|
|
750
|
-
};
|
|
751
|
-
t.prototype.delete = function(t) {
|
|
752
|
-
var r = this._find(t, false);
|
|
753
|
-
if (r >= 0) {
|
|
754
|
-
var n = this._keys.length;
|
|
755
|
-
for (var i = r + 1; i < n; i++) {
|
|
756
|
-
this._keys[i - 1] = this._keys[i];
|
|
757
|
-
this._values[i - 1] = this._values[i];
|
|
758
|
-
}
|
|
759
|
-
this._keys.length--;
|
|
760
|
-
this._values.length--;
|
|
761
|
-
if (X(t, this._cacheKey)) {
|
|
762
|
-
this._cacheKey = e;
|
|
763
|
-
this._cacheIndex = -2;
|
|
144
|
+
return e({});
|
|
764
145
|
}
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
146
|
+
}));
|
|
147
|
+
})).catch((() => e({})));
|
|
148
|
+
})));
|
|
149
|
+
}));
|
|
150
|
+
const s = await Promise.all(e);
|
|
151
|
+
let i = {};
|
|
152
|
+
s.forEach((t => {
|
|
153
|
+
i = {
|
|
154
|
+
...i,
|
|
155
|
+
...t
|
|
156
|
+
};
|
|
157
|
+
}));
|
|
158
|
+
return i;
|
|
159
|
+
}
|
|
160
|
+
owner() {
|
|
161
|
+
const t = this.#t.resolve(Y, {
|
|
162
|
+
allowUnregistered: true
|
|
163
|
+
});
|
|
164
|
+
return t ? t.deref() : undefined;
|
|
165
|
+
}
|
|
166
|
+
async load(t) {
|
|
167
|
+
let e = {};
|
|
168
|
+
const s = [];
|
|
169
|
+
t.forEach((t => {
|
|
170
|
+
if (typeof t === "string") {
|
|
171
|
+
s.push(new Promise(((e, s) => this.buildNameAndRegistrationPairFromGlob(t).then(e).catch(s))));
|
|
172
|
+
} else if (L(w(t))) {
|
|
173
|
+
const s = {
|
|
174
|
+
class: w(t)
|
|
786
175
|
};
|
|
787
|
-
|
|
788
|
-
|
|
176
|
+
e = {
|
|
177
|
+
...e,
|
|
178
|
+
...this.buildNameAndRegistrationPairFromOptions(s)
|
|
789
179
|
};
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
this._cacheIndex = r;
|
|
796
|
-
break;
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
if (this._cacheIndex < 0 && t) {
|
|
801
|
-
this._cacheIndex = this._keys.length;
|
|
802
|
-
this._keys.push(e);
|
|
803
|
-
this._values.push(undefined);
|
|
804
|
-
}
|
|
805
|
-
return this._cacheIndex;
|
|
180
|
+
} else {
|
|
181
|
+
const s = w(t);
|
|
182
|
+
e = {
|
|
183
|
+
...e,
|
|
184
|
+
...this.buildNameAndRegistrationPairFromOptions(s)
|
|
806
185
|
};
|
|
807
|
-
return t;
|
|
808
|
-
}();
|
|
809
|
-
return n;
|
|
810
|
-
function i(e, t) {
|
|
811
|
-
return e;
|
|
812
|
-
}
|
|
813
|
-
function u(e, t) {
|
|
814
|
-
return t;
|
|
815
186
|
}
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
this._map = new l;
|
|
824
|
-
}
|
|
825
|
-
Object.defineProperty(e.prototype, "size", {
|
|
826
|
-
get: function() {
|
|
827
|
-
return this._map.size;
|
|
828
|
-
},
|
|
829
|
-
enumerable: true,
|
|
830
|
-
configurable: true
|
|
831
|
-
});
|
|
832
|
-
e.prototype.has = function(e) {
|
|
833
|
-
return this._map.has(e);
|
|
834
|
-
};
|
|
835
|
-
e.prototype.add = function(e) {
|
|
836
|
-
return this._map.set(e, e), this;
|
|
837
|
-
};
|
|
838
|
-
e.prototype.delete = function(e) {
|
|
839
|
-
return this._map.delete(e);
|
|
840
|
-
};
|
|
841
|
-
e.prototype.clear = function() {
|
|
842
|
-
this._map.clear();
|
|
843
|
-
};
|
|
844
|
-
e.prototype.keys = function() {
|
|
845
|
-
return this._map.keys();
|
|
846
|
-
};
|
|
847
|
-
e.prototype.values = function() {
|
|
848
|
-
return this._map.keys();
|
|
849
|
-
};
|
|
850
|
-
e.prototype.entries = function() {
|
|
851
|
-
return this._map.entries();
|
|
187
|
+
}));
|
|
188
|
+
if (s.length) {
|
|
189
|
+
const t = await Promise.all(s);
|
|
190
|
+
t.forEach((t => {
|
|
191
|
+
e = {
|
|
192
|
+
...t,
|
|
193
|
+
...e
|
|
852
194
|
};
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
function
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
}
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
if (!k(e)) {
|
|
198
|
+
Object.getOwnPropertyNames(e).forEach((t => this.injectionNames.add(t)));
|
|
199
|
+
Object.getOwnPropertySymbols(e).forEach((t => this.injectionNames.add(t)));
|
|
200
|
+
this.#t.register(e);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
async get(t, e = {}) {
|
|
204
|
+
const s = typeof t === "function" ? R(t) : t;
|
|
205
|
+
if (!this.#t.hasRegistration(s) && typeof t === "function" && u(w(t))) {
|
|
206
|
+
await this.load([ {
|
|
207
|
+
id: s,
|
|
208
|
+
class: w(t)
|
|
209
|
+
} ]);
|
|
210
|
+
}
|
|
211
|
+
return (this.#t.getRegistration(s)?.lifetime === "SINGLETON" || this.#t.getRegistration(s)?.lifetime === "MODULE_SINGLETON") && !this.injectionNames.has(s) && this.parent ? await this.parent.get(s, e) : await this.processResolved(this.#t.resolve(s), s, e);
|
|
212
|
+
}
|
|
213
|
+
has(t) {
|
|
214
|
+
if (typeof t === "function") return this.#t.hasRegistration(R(t));
|
|
215
|
+
return this.#t.hasRegistration(t);
|
|
216
|
+
}
|
|
217
|
+
async set(t, e = {}) {
|
|
218
|
+
await this.load([ {
|
|
219
|
+
...e,
|
|
220
|
+
class: t
|
|
221
|
+
} ]);
|
|
222
|
+
return await this.get(t);
|
|
223
|
+
}
|
|
224
|
+
async register(t, e = {}) {
|
|
225
|
+
await this.load([ {
|
|
226
|
+
...e,
|
|
227
|
+
class: t
|
|
228
|
+
} ]);
|
|
229
|
+
}
|
|
230
|
+
async build(t, e = {}) {
|
|
231
|
+
const s = await this.processResolved(this.#t.build(t, this.buildResolverOptions(t)), R(t), e);
|
|
232
|
+
D(this.#t, s);
|
|
233
|
+
return s;
|
|
234
|
+
}
|
|
235
|
+
createScope() {
|
|
236
|
+
return new Container(this, this.owner());
|
|
237
|
+
}
|
|
238
|
+
registerContainerToItsParent() {
|
|
239
|
+
if (this.parent) this.parent.#e.add(this);
|
|
240
|
+
}
|
|
241
|
+
async clear() {
|
|
242
|
+
const t = [];
|
|
243
|
+
this.#e.forEach((e => t.push(new Promise(((t, s) => e.destroy().then(t).catch(s))))));
|
|
244
|
+
await Promise.all(t);
|
|
245
|
+
await this.#t.dispose();
|
|
246
|
+
const e = [];
|
|
247
|
+
U(this.#t).forEach((t => {
|
|
248
|
+
let s = t.deref();
|
|
249
|
+
if (!s) return;
|
|
250
|
+
if (s[H]) {
|
|
251
|
+
e.push(new Promise((t => s ? Promise.resolve(s[H]()).then((() => {
|
|
252
|
+
s = undefined;
|
|
253
|
+
return t();
|
|
254
|
+
})).catch(O) : t())));
|
|
255
|
+
}
|
|
256
|
+
}));
|
|
257
|
+
await Promise.all(e);
|
|
258
|
+
x(this.#t);
|
|
259
|
+
}
|
|
260
|
+
async destroy() {
|
|
261
|
+
if (this.#s) return;
|
|
262
|
+
this.#s = true;
|
|
263
|
+
if (this.parent) this.parent.#e.delete(this);
|
|
264
|
+
await this.clear();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
t([ M(y.Array(y.Alternatives(F.Schema(), y.Class((() => tt)), y.Glob()))), e("design:type", Function), e("design:paramtypes", [ Array ]), e("design:returntype", Promise) ], Container.prototype, "load", null);
|
|
269
|
+
|
|
270
|
+
const $ = Symbol("OBJECT.TYPE");
|
|
271
|
+
|
|
272
|
+
var q;
|
|
273
|
+
|
|
274
|
+
(function(t) {
|
|
275
|
+
t["Unknown"] = "Unknown";
|
|
276
|
+
t["Object"] = "Object";
|
|
277
|
+
t["Provider"] = "Provider";
|
|
278
|
+
t["Controller"] = "Controller";
|
|
279
|
+
t["Component"] = "Component";
|
|
280
|
+
t["Module"] = "Module";
|
|
281
|
+
})(q || (q = {}));
|
|
282
|
+
|
|
283
|
+
function z(t) {
|
|
284
|
+
return e => J(e, t);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
function J(t, e) {
|
|
288
|
+
Reflect.defineMetadata($, y.isValid(t, y.Class(tt)) ? e : q.Unknown, t);
|
|
289
|
+
return t;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function V(t) {
|
|
293
|
+
if (Reflect.hasOwnMetadata($, t)) return Reflect.getOwnMetadata($, t);
|
|
294
|
+
let e = q.Unknown;
|
|
295
|
+
for (const s of P(t)) {
|
|
296
|
+
if (Reflect.hasOwnMetadata($, s)) {
|
|
297
|
+
e = Reflect.getOwnMetadata($, s);
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
J(t, e);
|
|
302
|
+
return V(t);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
var W;
|
|
306
|
+
|
|
307
|
+
var K;
|
|
308
|
+
|
|
309
|
+
const X = Symbol("__init");
|
|
310
|
+
|
|
311
|
+
const H = Symbol("__destroy");
|
|
312
|
+
|
|
313
|
+
const Q = Symbol("anonymous");
|
|
314
|
+
|
|
315
|
+
const Z = Symbol("OBJECT.SYMBOL.PROPERTY");
|
|
316
|
+
|
|
317
|
+
let tt = K = class BaseObject extends s {
|
|
318
|
+
#i;
|
|
319
|
+
#r;
|
|
320
|
+
#o=n();
|
|
321
|
+
#n=false;
|
|
322
|
+
async #a() {
|
|
323
|
+
const t = d(this);
|
|
324
|
+
const e = [];
|
|
325
|
+
p(this).forEach(((s, i) => {
|
|
326
|
+
if (j(i)) return;
|
|
327
|
+
e.push(new Promise(((e, r) => {
|
|
328
|
+
y.validateAsync(t[w(i)], s.schema, {
|
|
329
|
+
targetName: i
|
|
330
|
+
}).then((t => Promise.resolve(s.fn.bind(this)(t)).then((t => {
|
|
331
|
+
this[i] = t;
|
|
332
|
+
return e();
|
|
333
|
+
})).catch(r))).catch(r);
|
|
334
|
+
})));
|
|
335
|
+
}));
|
|
336
|
+
await Promise.all(e);
|
|
337
|
+
}
|
|
338
|
+
async #c() {
|
|
339
|
+
const t = f(this);
|
|
340
|
+
const e = [];
|
|
341
|
+
t.forEach(((t, s) => {
|
|
342
|
+
const i = t.name;
|
|
343
|
+
e.push(new Promise(((e, r) => {
|
|
344
|
+
this.#i.get(i).then((i => {
|
|
345
|
+
Promise.resolve(t.transform(i)).then((t => {
|
|
346
|
+
Reflect.set(this, s, t);
|
|
347
|
+
return e();
|
|
348
|
+
})).catch(r);
|
|
349
|
+
})).catch((t => r(new C("Unable to inject value for property {0} of {1} because: {2}", [ s, this.className, t.message ]))));
|
|
350
|
+
})));
|
|
351
|
+
}));
|
|
352
|
+
await Promise.all(e);
|
|
353
|
+
}
|
|
354
|
+
#l() {
|
|
355
|
+
const t = m(this);
|
|
356
|
+
this.#r = t ? t : Q;
|
|
357
|
+
}
|
|
358
|
+
constructor(t) {
|
|
359
|
+
super((async () => {
|
|
360
|
+
this.#l();
|
|
361
|
+
const t = Object.getOwnPropertyDescriptor(this, "then");
|
|
362
|
+
if (t) Object.defineProperty(this, "then", {
|
|
363
|
+
enumerable: false
|
|
364
|
+
});
|
|
365
|
+
await this[X]();
|
|
366
|
+
}));
|
|
367
|
+
this.#i = new Container(t[G], this);
|
|
368
|
+
b(this, this.#i);
|
|
369
|
+
}
|
|
370
|
+
static get className() {
|
|
371
|
+
return this.name;
|
|
372
|
+
}
|
|
373
|
+
get className() {
|
|
374
|
+
return g(this).name;
|
|
375
|
+
}
|
|
376
|
+
async [X](...t) {
|
|
377
|
+
this.#i.registerContainerToItsParent();
|
|
378
|
+
if (!this.#n) {
|
|
379
|
+
await this.#c();
|
|
380
|
+
await this.#a();
|
|
381
|
+
this.#n = true;
|
|
382
|
+
}
|
|
383
|
+
for (const e of t) await e();
|
|
384
|
+
await this.init();
|
|
385
|
+
}
|
|
386
|
+
async [H](...t) {
|
|
387
|
+
await this.#i.destroy();
|
|
388
|
+
for (const e of t) await e();
|
|
389
|
+
await this.destroy();
|
|
390
|
+
}
|
|
391
|
+
async init() {}
|
|
392
|
+
async destroy() {}
|
|
393
|
+
async getObject(t, e = {}) {
|
|
394
|
+
return await this.#i.get(t, e);
|
|
395
|
+
}
|
|
396
|
+
async buildObject(t, e = {}) {
|
|
397
|
+
return this.#i.build(t, e);
|
|
398
|
+
}
|
|
399
|
+
getParent() {
|
|
400
|
+
return this.#i.parent?.owner();
|
|
401
|
+
}
|
|
402
|
+
getModule() {
|
|
403
|
+
let t = this.getParent();
|
|
404
|
+
while (t && V(w(g(t))) !== q.Module) {
|
|
405
|
+
t = this.getParent();
|
|
406
|
+
}
|
|
407
|
+
return w(t);
|
|
408
|
+
}
|
|
409
|
+
get $uuid() {
|
|
410
|
+
return this.#o;
|
|
411
|
+
}
|
|
412
|
+
get $id() {
|
|
413
|
+
return this.#r;
|
|
414
|
+
}
|
|
415
|
+
get $symbol() {
|
|
416
|
+
if (Reflect.hasOwnMetadata(Z, this)) return Reflect.getOwnMetadata(Z, this);
|
|
417
|
+
Reflect.defineMetadata(Z, Symbol(this.$uuid), this);
|
|
418
|
+
return this.$symbol;
|
|
419
|
+
}
|
|
420
|
+
setProperty(t, e) {
|
|
421
|
+
this[t] = e;
|
|
422
|
+
}
|
|
423
|
+
getProperty(t, e) {
|
|
424
|
+
if (this.hasProperty(t)) return w(this[t]);
|
|
425
|
+
return w(e);
|
|
426
|
+
}
|
|
427
|
+
hasProperty(t) {
|
|
428
|
+
return typeof t === "string" ? this.propertyNames().includes(t) : this.propertySymbols().includes(t);
|
|
429
|
+
}
|
|
430
|
+
propertySymbols() {
|
|
431
|
+
return Object.getOwnPropertySymbols(this);
|
|
432
|
+
}
|
|
433
|
+
propertyNames() {
|
|
434
|
+
return Object.getOwnPropertyNames(this);
|
|
435
|
+
}
|
|
436
|
+
hasMethod(t) {
|
|
437
|
+
const e = this.hasProperty(t);
|
|
438
|
+
if (e) return false;
|
|
439
|
+
return typeof this[t] === "function";
|
|
440
|
+
}
|
|
441
|
+
getMethod(t, e = false) {
|
|
442
|
+
if (this.hasMethod(t)) {
|
|
443
|
+
return (...e) => this[t](...e);
|
|
444
|
+
} else if (e) {
|
|
445
|
+
throw new r('Method "{methodName}" not found in "{className}"', {
|
|
446
|
+
methodName: t,
|
|
447
|
+
className: this.constructor.name
|
|
448
|
+
});
|
|
449
|
+
} else {
|
|
450
|
+
return (...t) => O(...t);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
async dispose() {
|
|
454
|
+
await this.destroy();
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
tt = K = t([ i(), z(q.Object), e("design:paramtypes", [ Object ]) ], tt);
|
|
459
|
+
|
|
460
|
+
export { tt as B, Container as C, z as D, V as G, F as L, q as O, J as S, X as _, H as a, _ as b, G as c, Q as d, Y as o };
|