lakutata 0.1.49 → 0.2.1-proto.3
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/binding.gyp +41 -0
- package/package.json +39 -42
- package/src/Lakutata.d.ts +54 -0
- package/src/Lakutata.js +1 -0
- package/src/components/Database.d.ts +231 -0
- package/src/components/Database.js +198 -0
- package/src/components/Entrypoint.d.ts +142 -0
- package/src/components/Entrypoint.js +584 -0
- package/src/constants/MetadataKey.d.ts +10 -0
- package/src/constants/MetadataKey.js +6 -0
- package/src/constants/event-names/ModuleEventName.d.ts +3 -0
- package/src/constants/event-names/ModuleEventName.js +1 -0
- package/src/constants/metadata-keys/DIMetadataKey.d.ts +13 -0
- package/src/constants/metadata-keys/DIMetadataKey.js +9 -0
- package/src/constants/metadata-keys/DTOMetadataKey.d.ts +7 -0
- package/src/constants/metadata-keys/DTOMetadataKey.js +3 -0
- package/src/cpp/hello.cc +17 -0
- package/src/cpp/hello1.cc +14 -0
- package/src/decorators/asst/After.d.ts +11 -0
- package/src/decorators/asst/After.js +8 -0
- package/src/decorators/asst/Before.d.ts +11 -0
- package/src/decorators/asst/Before.js +8 -0
- package/src/decorators/ctrl/CLIAction.d.ts +66 -0
- package/src/decorators/ctrl/CLIAction.js +11 -0
- package/src/decorators/ctrl/HTTPAction.d.ts +83 -0
- package/src/decorators/ctrl/HTTPAction.js +13 -0
- package/src/decorators/ctrl/ServiceAction.d.ts +66 -0
- package/src/decorators/ctrl/ServiceAction.js +11 -0
- package/src/decorators/di/Autoload.d.ts +57 -0
- package/src/decorators/di/Autoload.js +7 -0
- package/src/decorators/di/Configurable.d.ts +60 -0
- package/src/decorators/di/Configurable.js +9 -0
- package/src/decorators/di/Inject.d.ts +59 -0
- package/src/decorators/di/Inject.js +8 -0
- package/src/decorators/di/Lifetime.d.ts +77 -0
- package/src/decorators/di/Lifetime.js +33 -0
- package/src/decorators/dto/Accept.d.ts +45 -0
- package/src/decorators/dto/Accept.js +8 -0
- package/src/decorators/dto/Expect.d.ts +45 -0
- package/src/decorators/dto/Expect.js +8 -0
- package/src/decorators/dto/IndexSignature.d.ts +46 -0
- package/src/decorators/dto/IndexSignature.js +8 -0
- package/src/decorators/dto/Return.d.ts +45 -0
- package/src/decorators/dto/Return.js +8 -0
- package/src/decorators/orm/AfterInsert.d.ts +6 -0
- package/src/decorators/orm/AfterInsert.js +18 -0
- package/src/decorators/orm/AfterLoad.d.ts +6 -0
- package/src/decorators/orm/AfterLoad.js +18 -0
- package/src/decorators/orm/AfterRecover.d.ts +6 -0
- package/src/decorators/orm/AfterRecover.js +18 -0
- package/src/decorators/orm/AfterRemove.d.ts +6 -0
- package/src/decorators/orm/AfterRemove.js +18 -0
- package/src/decorators/orm/AfterSoftRemove.d.ts +6 -0
- package/src/decorators/orm/AfterSoftRemove.js +18 -0
- package/src/decorators/orm/AfterUpdate.d.ts +6 -0
- package/src/decorators/orm/AfterUpdate.js +18 -0
- package/src/decorators/orm/BeforeInsert.d.ts +6 -0
- package/src/decorators/orm/BeforeInsert.js +18 -0
- package/src/decorators/orm/BeforeRecover.d.ts +6 -0
- package/src/decorators/orm/BeforeRecover.js +18 -0
- package/src/decorators/orm/BeforeRemove.d.ts +6 -0
- package/src/decorators/orm/BeforeRemove.js +18 -0
- package/src/decorators/orm/BeforeSoftRemove.d.ts +6 -0
- package/src/decorators/orm/BeforeSoftRemove.js +18 -0
- package/src/decorators/orm/BeforeUpdate.d.ts +6 -0
- package/src/decorators/orm/BeforeUpdate.js +18 -0
- package/src/decorators/orm/Check.d.ts +14 -0
- package/src/decorators/orm/Check.js +26 -0
- package/src/decorators/orm/ChildEntity.d.ts +6 -0
- package/src/decorators/orm/ChildEntity.js +24 -0
- package/src/decorators/orm/Column.d.ts +169 -0
- package/src/decorators/orm/Column.js +77 -0
- package/src/decorators/orm/CreateDateColumn.d.ts +12 -0
- package/src/decorators/orm/CreateDateColumn.js +20 -0
- package/src/decorators/orm/DeleteDateColumn.d.ts +11 -0
- package/src/decorators/orm/DeleteDateColumn.js +19 -0
- package/src/decorators/orm/Entity.d.ts +15 -0
- package/src/decorators/orm/Entity.js +30 -0
- package/src/decorators/orm/EventSubscriber.d.ts +7 -0
- package/src/decorators/orm/EventSubscriber.js +16 -0
- package/src/decorators/orm/Exclusion.d.ts +14 -0
- package/src/decorators/orm/Exclusion.js +26 -0
- package/src/decorators/orm/Generated.d.ts +12 -0
- package/src/decorators/orm/Generated.js +23 -0
- package/src/decorators/orm/Index.d.ts +52 -0
- package/src/decorators/orm/Index.js +55 -0
- package/src/decorators/orm/JoinColumn.d.ts +22 -0
- package/src/decorators/orm/JoinColumn.js +26 -0
- package/src/decorators/orm/JoinTable.d.ts +20 -0
- package/src/decorators/orm/JoinTable.js +33 -0
- package/src/decorators/orm/ManyToMany.d.ts +18 -0
- package/src/decorators/orm/ManyToMany.js +45 -0
- package/src/decorators/orm/ManyToOne.d.ts +18 -0
- package/src/decorators/orm/ManyToOne.js +45 -0
- package/src/decorators/orm/ObjectIdColumn.d.ts +11 -0
- package/src/decorators/orm/ObjectIdColumn.js +26 -0
- package/src/decorators/orm/OneToMany.d.ts +12 -0
- package/src/decorators/orm/OneToMany.js +36 -0
- package/src/decorators/orm/OneToOne.d.ts +16 -0
- package/src/decorators/orm/OneToOne.js +44 -0
- package/src/decorators/orm/PrimaryColumn.d.ts +25 -0
- package/src/decorators/orm/PrimaryColumn.js +62 -0
- package/src/decorators/orm/PrimaryGeneratedColumn.d.ts +100 -0
- package/src/decorators/orm/PrimaryGeneratedColumn.js +58 -0
- package/src/decorators/orm/RelationId.d.ts +27 -0
- package/src/decorators/orm/RelationId.js +21 -0
- package/src/decorators/orm/TableInheritance.d.ts +13 -0
- package/src/decorators/orm/TableInheritance.js +21 -0
- package/src/decorators/orm/Tree.d.ts +28 -0
- package/src/decorators/orm/Tree.js +20 -0
- package/src/decorators/orm/TreeChildren.d.ts +9 -0
- package/src/decorators/orm/TreeChildren.js +33 -0
- package/src/decorators/orm/TreeLevelColumn.d.ts +6 -0
- package/src/decorators/orm/TreeLevelColumn.js +18 -0
- package/src/decorators/orm/TreeParent.d.ts +11 -0
- package/src/decorators/orm/TreeParent.js +32 -0
- package/src/decorators/orm/Unique.d.ts +34 -0
- package/src/decorators/orm/Unique.js +49 -0
- package/src/decorators/orm/UpdateDateColumn.d.ts +11 -0
- package/src/decorators/orm/UpdateDateColumn.js +19 -0
- package/src/decorators/orm/VersionColumn.d.ts +12 -0
- package/src/decorators/orm/VersionColumn.js +20 -0
- package/src/decorators/orm/ViewColumn.d.ts +23 -0
- package/src/decorators/orm/ViewColumn.js +18 -0
- package/src/decorators/orm/ViewEntity.d.ts +71 -0
- package/src/decorators/orm/ViewEntity.js +31 -0
- package/src/decorators/orm/VirtualColumn.d.ts +39 -0
- package/src/decorators/orm/VirtualColumn.js +48 -0
- package/src/exceptions/ControllerActionNotFoundException.d.ts +7 -0
- package/src/exceptions/ControllerActionNotFoundException.js +6 -0
- package/src/exceptions/DestroyRuntimeContainerException.d.ts +7 -0
- package/src/exceptions/DestroyRuntimeContainerException.js +6 -0
- package/src/exceptions/InvalidActionPatternDepthException.d.ts +7 -0
- package/src/exceptions/InvalidActionPatternDepthException.js +6 -0
- package/src/exceptions/InvalidAssistantFunctionTypeException.d.ts +7 -0
- package/src/exceptions/InvalidAssistantFunctionTypeException.js +6 -0
- package/src/exceptions/InvalidObjectTypeException.d.ts +7 -0
- package/src/exceptions/InvalidObjectTypeException.js +6 -0
- package/src/exceptions/MethodNotFoundException.d.ts +7 -0
- package/src/exceptions/MethodNotFoundException.js +6 -0
- package/src/exceptions/alias/AliasExistsException.d.ts +7 -0
- package/src/exceptions/alias/AliasExistsException.js +6 -0
- package/src/exceptions/alias/AliasNotFoundException.d.ts +7 -0
- package/src/exceptions/alias/AliasNotFoundException.js +6 -0
- package/src/exceptions/alias/InvalidAliasNameException.d.ts +7 -0
- package/src/exceptions/alias/InvalidAliasNameException.js +6 -0
- package/src/exceptions/di/DependencyInjectionException.d.ts +7 -0
- package/src/exceptions/di/DependencyInjectionException.js +6 -0
- package/src/exceptions/di/LifetimeLockedException.d.ts +7 -0
- package/src/exceptions/di/LifetimeLockedException.js +6 -0
- package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.d.ts +7 -0
- package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.js +6 -0
- package/src/exceptions/dto/InvalidMethodAcceptException.d.ts +7 -0
- package/src/exceptions/dto/InvalidMethodAcceptException.js +6 -0
- package/src/exceptions/dto/InvalidMethodReturnException.d.ts +7 -0
- package/src/exceptions/dto/InvalidMethodReturnException.js +6 -0
- package/src/exceptions/dto/InvalidValueException.d.ts +7 -0
- package/src/exceptions/dto/InvalidValueException.js +6 -0
- package/src/interfaces/IBaseObjectConstructor.d.ts +49 -0
- package/src/interfaces/IBaseObjectConstructor.js +0 -0
- package/src/interfaces/IConstructor.d.ts +6 -0
- package/src/interfaces/IConstructor.js +0 -0
- package/src/interfaces/IPatRun.d.ts +12 -0
- package/src/interfaces/IPatRun.js +0 -0
- package/src/lib/base/BaseObject.d.ts +49 -0
- package/src/lib/base/BaseObject.js +1 -0
- package/src/lib/base/Context.d.ts +56 -0
- package/src/lib/base/Context.js +29 -0
- package/src/lib/base/EventEmitter.d.ts +1 -0
- package/src/lib/base/EventEmitter.js +1850 -0
- package/src/lib/base/abstracts/Exception.d.ts +21 -0
- package/src/lib/base/abstracts/Exception.js +46 -0
- package/src/lib/base/async-constructor/Append.d.ts +3 -0
- package/src/lib/base/async-constructor/Append.js +17 -0
- package/src/lib/base/async-constructor/AsyncConstructor.d.ts +5 -0
- package/src/lib/base/async-constructor/AsyncConstructor.js +6 -0
- package/src/lib/base/internal/ApplicationConfigLoader.d.ts +52 -0
- package/src/lib/base/internal/ApplicationConfigLoader.js +18 -0
- package/src/lib/base/internal/BasicInfo.d.ts +19 -0
- package/src/lib/base/internal/BasicInfo.js +24 -0
- package/src/lib/base/internal/CamelCase.d.ts +11 -0
- package/src/lib/base/internal/CamelCase.js +20 -0
- package/src/lib/base/internal/ConfigurableRecordsInjection.d.ts +92 -0
- package/src/lib/base/internal/ConfigurableRecordsInjection.js +65 -0
- package/src/lib/base/internal/ConstructorSymbol.d.ts +54 -0
- package/src/lib/base/internal/ConstructorSymbol.js +15 -0
- package/src/lib/base/internal/ControllerEntrypoint.d.ts +123 -0
- package/src/lib/base/internal/ControllerEntrypoint.js +151 -0
- package/src/lib/base/internal/DataValidator.d.ts +154 -0
- package/src/lib/base/internal/DataValidator.js +369 -0
- package/src/lib/base/internal/FlexibleDTO.d.ts +41 -0
- package/src/lib/base/internal/FlexibleDTO.js +5 -0
- package/src/lib/base/internal/MethodAssistantFunction.d.ts +22 -0
- package/src/lib/base/internal/MethodAssistantFunction.js +103 -0
- package/src/lib/base/internal/MethodValidation.d.ts +56 -0
- package/src/lib/base/internal/MethodValidation.js +97 -0
- package/src/lib/base/internal/ModuleConfigLoader.d.ts +49 -0
- package/src/lib/base/internal/ModuleConfigLoader.js +86 -0
- package/src/lib/base/internal/ObjectConfiguration.d.ts +71 -0
- package/src/lib/base/internal/ObjectConfiguration.js +40 -0
- package/src/lib/base/internal/ObjectContainer.d.ts +65 -0
- package/src/lib/base/internal/ObjectContainer.js +18 -0
- package/src/lib/base/internal/ObjectInjection.d.ts +88 -0
- package/src/lib/base/internal/ObjectInjection.js +65 -0
- package/src/lib/base/internal/ObjectLifetime.d.ts +72 -0
- package/src/lib/base/internal/ObjectLifetime.js +31 -0
- package/src/lib/base/internal/ObjectSchemaValidation.d.ts +96 -0
- package/src/lib/base/internal/ObjectSchemaValidation.js +1 -0
- package/src/lib/base/internal/ObjectType.d.ts +49 -0
- package/src/lib/base/internal/ObjectType.js +1 -0
- package/src/lib/base/internal/ObjectWeakRefs.d.ts +71 -0
- package/src/lib/base/internal/ObjectWeakRefs.js +41 -0
- package/src/lib/base/internal/PatternManager.d.ts +53 -0
- package/src/lib/base/internal/PatternManager.js +954 -0
- package/src/lib/context/CLIContext.d.ts +48 -0
- package/src/lib/context/CLIContext.js +13 -0
- package/src/lib/context/HTTPContext.d.ts +55 -0
- package/src/lib/context/HTTPContext.js +25 -0
- package/src/lib/context/ServiceContext.d.ts +47 -0
- package/src/lib/context/ServiceContext.js +14 -0
- package/src/lib/core/Alias.d.ts +50 -0
- package/src/lib/core/Alias.js +81 -0
- package/src/lib/core/Application.d.ts +52 -0
- package/src/lib/core/Application.js +120 -0
- package/src/lib/core/Component.d.ts +49 -0
- package/src/lib/core/Component.js +234 -0
- package/src/lib/core/Container.d.ts +49 -0
- package/src/lib/core/Container.js +1 -0
- package/src/lib/core/Controller.d.ts +49 -0
- package/src/lib/core/Controller.js +13 -0
- package/src/lib/core/DTO.d.ts +172 -0
- package/src/lib/core/DTO.js +1 -0
- package/src/lib/core/Module.d.ts +49 -0
- package/src/lib/core/Module.js +133 -0
- package/{ORM.d.ts → src/lib/core/ORM.d.ts} +158 -971
- package/src/lib/core/ORM.js +1 -0
- package/src/lib/core/Provider.d.ts +49 -0
- package/src/lib/core/Provider.js +9 -0
- package/src/lib/core/Time.d.ts +275 -0
- package/src/lib/core/Time.js +7599 -0
- package/src/lib/functions/ArrayToSet.d.ts +8 -0
- package/src/lib/functions/ArrayToSet.js +8 -0
- package/src/lib/functions/As.d.ts +8 -0
- package/src/lib/functions/As.js +8 -0
- package/src/lib/functions/Delay.d.ts +8 -0
- package/src/lib/functions/Delay.js +8 -0
- package/src/lib/functions/DevNull.d.ts +8 -0
- package/src/lib/functions/DevNull.js +9 -0
- package/src/lib/functions/GetObjectNestingDepth.d.ts +8 -0
- package/src/lib/functions/GetObjectNestingDepth.js +20 -0
- package/src/lib/functions/GetObjectPropertyPaths.d.ts +9 -0
- package/src/lib/functions/GetObjectPropertyPaths.js +19 -0
- package/src/lib/functions/GraceExit.d.ts +9 -0
- package/src/lib/functions/GraceExit.js +19 -0
- package/src/lib/functions/IsEmptyObject.d.ts +8 -0
- package/src/lib/functions/IsEmptyObject.js +8 -0
- package/src/lib/functions/IsGlobString.d.ts +8 -0
- package/src/lib/functions/IsGlobString.js +1 -0
- package/src/lib/functions/IsHtml.d.ts +8 -0
- package/src/lib/functions/IsHtml.js +133 -0
- package/src/lib/functions/IsNativeFunction.d.ts +8 -0
- package/src/lib/functions/IsNativeFunction.js +33 -0
- package/src/lib/functions/IsPromise.d.ts +7 -0
- package/src/lib/functions/IsPromise.js +7 -0
- package/src/lib/functions/IsPromiseLike.d.ts +8 -0
- package/src/lib/functions/IsPromiseLike.js +11 -0
- package/src/lib/functions/IsSymbol.d.ts +8 -0
- package/src/lib/functions/IsSymbol.js +1 -0
- package/src/lib/functions/IsXML.d.ts +8 -0
- package/src/lib/functions/IsXML.js +2045 -0
- package/src/lib/functions/NoCase.d.ts +19 -0
- package/src/lib/functions/NoCase.js +52 -0
- package/src/lib/functions/ObjectConstructor.d.ts +10 -0
- package/src/lib/functions/ObjectConstructor.js +8 -0
- package/src/lib/functions/ObjectHash.d.ts +54 -0
- package/src/lib/functions/ObjectHash.js +468 -0
- package/src/lib/functions/ObjectParentConstructor.d.ts +11 -0
- package/src/lib/functions/ObjectParentConstructor.js +6 -0
- package/src/lib/functions/ObjectParentConstructors.d.ts +11 -0
- package/src/lib/functions/ObjectParentConstructors.js +9 -0
- package/src/lib/functions/ObjectPrototype.d.ts +9 -0
- package/src/lib/functions/ObjectPrototype.js +8 -0
- package/src/lib/functions/SetToArray.d.ts +8 -0
- package/src/lib/functions/SetToArray.js +8 -0
- package/src/lib/functions/Templating.d.ts +14 -0
- package/src/lib/functions/Templating.js +53 -0
- package/src/lib/functions/UniqueArray.d.ts +8 -0
- package/src/lib/functions/UniqueArray.js +8 -0
- package/src/lib/ioc/DependencyInjectionContainer.d.ts +3 -0
- package/src/lib/ioc/DependencyInjectionContainer.js +398 -0
- package/src/lib/ioc/Errors.d.ts +65 -0
- package/src/lib/ioc/Errors.js +104 -0
- package/src/lib/ioc/FunctionTokenizer.d.ts +32 -0
- package/src/lib/ioc/FunctionTokenizer.js +265 -0
- package/src/lib/ioc/InjectionMode.d.ts +10 -0
- package/src/lib/ioc/InjectionMode.js +17 -0
- package/src/lib/ioc/Lifetime.d.ts +14 -0
- package/src/lib/ioc/Lifetime.js +27 -0
- package/src/lib/ioc/ListModules.d.ts +3 -0
- package/src/lib/ioc/ListModules.js +1 -0
- package/src/lib/ioc/LoadModules.d.ts +3 -0
- package/src/lib/ioc/LoadModules.js +158 -0
- package/src/lib/ioc/ParamParser.d.ts +16 -0
- package/src/lib/ioc/ParamParser.js +125 -0
- package/src/lib/ioc/Resolvers.d.ts +3 -0
- package/src/lib/ioc/Resolvers.js +322 -0
- package/src/lib/ioc/Utils.d.ts +38 -0
- package/src/lib/ioc/Utils.js +66 -0
- package/src/lib/validation/VLD.d.ts +261 -0
- package/src/lib/validation/VLD.js +14994 -0
- package/src/lib/validation/interfaces/AlternativesSchema.d.ts +31 -0
- package/src/lib/validation/interfaces/AlternativesSchema.js +0 -0
- package/src/lib/validation/interfaces/AnySchema.d.ts +31 -0
- package/src/lib/validation/interfaces/AnySchema.js +0 -0
- package/src/lib/validation/interfaces/ArraySchema.d.ts +31 -0
- package/src/lib/validation/interfaces/ArraySchema.js +0 -0
- package/src/lib/validation/interfaces/Base64Options.d.ts +12 -0
- package/src/lib/validation/interfaces/Base64Options.js +0 -0
- package/src/lib/validation/interfaces/BaseValidationOptions.d.ts +4 -0
- package/src/lib/validation/interfaces/BaseValidationOptions.js +0 -0
- package/src/lib/validation/interfaces/BinarySchema.d.ts +31 -0
- package/src/lib/validation/interfaces/BinarySchema.js +0 -0
- package/src/lib/validation/interfaces/BooleanSchema.d.ts +31 -0
- package/src/lib/validation/interfaces/BooleanSchema.js +0 -0
- package/src/lib/validation/interfaces/CustomHelpers.d.ts +31 -0
- package/src/lib/validation/interfaces/CustomHelpers.js +0 -0
- package/src/lib/validation/interfaces/DataUriOptions.d.ts +10 -0
- package/src/lib/validation/interfaces/DataUriOptions.js +0 -0
- package/src/lib/validation/interfaces/DateSchema.d.ts +31 -0
- package/src/lib/validation/interfaces/DateSchema.js +0 -0
- package/src/lib/validation/interfaces/DependencyOptions.d.ts +12 -0
- package/src/lib/validation/interfaces/DependencyOptions.js +0 -0
- package/src/lib/validation/interfaces/DomainOptions.d.ts +36 -0
- package/src/lib/validation/interfaces/DomainOptions.js +0 -0
- package/src/lib/validation/interfaces/EmailOptions.d.ts +54 -0
- package/src/lib/validation/interfaces/EmailOptions.js +0 -0
- package/src/lib/validation/interfaces/ErrorFormattingOptions.d.ts +63 -0
- package/src/lib/validation/interfaces/ErrorFormattingOptions.js +0 -0
- package/src/lib/validation/interfaces/ErrorReport.d.ts +21 -0
- package/src/lib/validation/interfaces/ErrorReport.js +0 -0
- package/src/lib/validation/interfaces/ErrorValidationOptions.d.ts +11 -0
- package/src/lib/validation/interfaces/ErrorValidationOptions.js +0 -0
- package/src/lib/validation/interfaces/ExtensionFlag.d.ts +6 -0
- package/src/lib/validation/interfaces/ExtensionFlag.js +0 -0
- package/src/lib/validation/interfaces/ExternalHelpers.d.ts +31 -0
- package/src/lib/validation/interfaces/ExternalHelpers.js +0 -0
- package/src/lib/validation/interfaces/FunctionSchema.d.ts +31 -0
- package/src/lib/validation/interfaces/FunctionSchema.js +0 -0
- package/src/lib/validation/interfaces/GuidOptions.d.ts +7 -0
- package/src/lib/validation/interfaces/GuidOptions.js +0 -0
- package/src/lib/validation/interfaces/HexOptions.d.ts +18 -0
- package/src/lib/validation/interfaces/HexOptions.js +0 -0
- package/src/lib/validation/interfaces/HierarchySeparatorOptions.d.ts +10 -0
- package/src/lib/validation/interfaces/HierarchySeparatorOptions.js +0 -0
- package/src/lib/validation/interfaces/IpOptions.d.ts +14 -0
- package/src/lib/validation/interfaces/IpOptions.js +0 -0
- package/src/lib/validation/interfaces/LanguageMessageTemplate.d.ts +6 -0
- package/src/lib/validation/interfaces/LanguageMessageTemplate.js +0 -0
- package/src/lib/validation/interfaces/LinkSchema.d.ts +31 -0
- package/src/lib/validation/interfaces/LinkSchema.js +0 -0
- package/src/lib/validation/interfaces/NumberSchema.d.ts +31 -0
- package/src/lib/validation/interfaces/NumberSchema.js +0 -0
- package/src/lib/validation/interfaces/ObjectPatternOptions.d.ts +31 -0
- package/src/lib/validation/interfaces/ObjectPatternOptions.js +0 -0
- package/src/lib/validation/interfaces/ObjectSchema.d.ts +31 -0
- package/src/lib/validation/interfaces/ObjectSchema.js +0 -0
- package/src/lib/validation/interfaces/Reference.d.ts +14 -0
- package/src/lib/validation/interfaces/Reference.js +0 -0
- package/src/lib/validation/interfaces/ReferenceOptions.d.ts +62 -0
- package/src/lib/validation/interfaces/ReferenceOptions.js +0 -0
- package/src/lib/validation/interfaces/RenameOptions.d.ts +28 -0
- package/src/lib/validation/interfaces/RenameOptions.js +0 -0
- package/src/lib/validation/interfaces/State.d.ts +10 -0
- package/src/lib/validation/interfaces/State.js +0 -0
- package/src/lib/validation/interfaces/StringRegexOptions.d.ts +14 -0
- package/src/lib/validation/interfaces/StringRegexOptions.js +0 -0
- package/src/lib/validation/interfaces/StringSchema.d.ts +31 -0
- package/src/lib/validation/interfaces/StringSchema.js +0 -0
- package/src/lib/validation/interfaces/SwitchCases.d.ts +31 -0
- package/src/lib/validation/interfaces/SwitchCases.js +0 -0
- package/src/lib/validation/interfaces/SwitchDefault.d.ts +31 -0
- package/src/lib/validation/interfaces/SwitchDefault.js +0 -0
- package/src/lib/validation/interfaces/SymbolSchema.d.ts +31 -0
- package/src/lib/validation/interfaces/SymbolSchema.js +0 -0
- package/src/lib/validation/interfaces/TopLevelDomainOptions.d.ts +14 -0
- package/src/lib/validation/interfaces/TopLevelDomainOptions.js +0 -0
- package/src/lib/validation/interfaces/UriOptions.d.ts +35 -0
- package/src/lib/validation/interfaces/UriOptions.js +0 -0
- package/src/lib/validation/interfaces/ValidationOptions.d.ts +21 -0
- package/src/lib/validation/interfaces/ValidationOptions.js +0 -0
- package/src/lib/validation/interfaces/WhenOptions.d.ts +31 -0
- package/src/lib/validation/interfaces/WhenOptions.js +0 -0
- package/src/lib/validation/interfaces/WhenSchemaOptions.d.ts +31 -0
- package/src/lib/validation/interfaces/WhenSchemaOptions.js +0 -0
- package/src/lib/validation/types/CustomValidator.d.ts +31 -0
- package/src/lib/validation/types/CustomValidator.js +0 -0
- package/src/lib/validation/types/ExtensionBoundSchema.d.ts +31 -0
- package/src/lib/validation/types/ExtensionBoundSchema.js +0 -0
- package/src/lib/validation/types/ExternalValidationFunction.d.ts +31 -0
- package/src/lib/validation/types/ExternalValidationFunction.js +0 -0
- package/src/lib/validation/types/IsNonPrimitiveSubsetUnion.d.ts +6 -0
- package/src/lib/validation/types/IsNonPrimitiveSubsetUnion.js +0 -0
- package/src/lib/validation/types/IsPrimitiveSubset.d.ts +5 -0
- package/src/lib/validation/types/IsPrimitiveSubset.js +0 -0
- package/src/lib/validation/types/IsUnion.d.ts +3 -0
- package/src/lib/validation/types/IsUnion.js +0 -0
- package/src/lib/validation/types/LanguageMessages.d.ts +3 -0
- package/src/lib/validation/types/LanguageMessages.js +0 -0
- package/src/lib/validation/types/NullableType.d.ts +3 -0
- package/src/lib/validation/types/NullableType.js +0 -0
- package/src/lib/validation/types/ObjectPropertiesSchema.d.ts +31 -0
- package/src/lib/validation/types/ObjectPropertiesSchema.js +0 -0
- package/src/lib/validation/types/PartialSchemaMap.d.ts +31 -0
- package/src/lib/validation/types/PartialSchemaMap.js +0 -0
- package/src/lib/validation/types/PresenceMode.d.ts +3 -0
- package/src/lib/validation/types/PresenceMode.js +0 -0
- package/src/lib/validation/types/Schema.d.ts +31 -0
- package/src/lib/validation/types/Schema.js +0 -0
- package/src/lib/validation/types/SchemaFunction.d.ts +31 -0
- package/src/lib/validation/types/SchemaFunction.js +0 -0
- package/src/lib/validation/types/SchemaLike.d.ts +31 -0
- package/src/lib/validation/types/SchemaLike.js +0 -0
- package/src/lib/validation/types/SchemaLikeWithoutArray.d.ts +31 -0
- package/src/lib/validation/types/SchemaLikeWithoutArray.js +0 -0
- package/src/lib/validation/types/SchemaMap.d.ts +31 -0
- package/src/lib/validation/types/SchemaMap.js +0 -0
- package/src/lib/validation/types/StrictSchemaMap.d.ts +31 -0
- package/src/lib/validation/types/StrictSchemaMap.js +0 -0
- package/src/lib/validation/types/Types.d.ts +3 -0
- package/src/lib/validation/types/Types.js +0 -0
- package/src/options/ApplicationOptions.d.ts +74 -0
- package/src/options/ApplicationOptions.js +30 -0
- package/src/options/LoadAnonymousObjectOptions.d.ts +49 -0
- package/src/options/LoadAnonymousObjectOptions.js +9 -0
- package/src/options/LoadNamedObjectOptions.d.ts +49 -0
- package/src/options/LoadNamedObjectOptions.js +5 -0
- package/src/options/LoadObjectOptions.d.ts +49 -0
- package/src/options/LoadObjectOptions.js +1 -0
- package/src/options/ModuleLoadObjectsOptions.d.ts +49 -0
- package/src/options/ModuleLoadObjectsOptions.js +12 -0
- package/src/options/ModuleOptions.d.ts +49 -0
- package/src/options/ModuleOptions.js +37 -0
- package/src/options/OverridableNamedObjectOptions.d.ts +49 -0
- package/src/options/OverridableNamedObjectOptions.js +5 -0
- package/src/options/OverridableObjectOptions.d.ts +49 -0
- package/src/options/OverridableObjectOptions.js +9 -0
- package/src/tests/App.spec.d.ts +2 -0
- package/src/tests/App.spec.js +79801 -0
- package/src/tests/UnitTest.spec.d.ts +2 -0
- package/src/tests/UnitTest.spec.js +5 -0
- package/src/tests/components/TestComponent.d.ts +59 -0
- package/src/tests/components/TestComponent.js +10 -0
- package/src/tests/controllers/TestController1.d.ts +67 -0
- package/src/tests/controllers/TestController1.js +80 -0
- package/src/tests/modules/TestModule.d.ts +55 -0
- package/src/tests/modules/TestModule.js +6 -0
- package/src/tests/providers/TestProvider.d.ts +57 -0
- package/src/tests/providers/TestProvider.js +15 -0
- package/src/tests/unit/BaseObject.spec.d.ts +2 -0
- package/src/tests/unit/BaseObject.spec.js +70 -0
- package/src/tests/unit/DI.spec.d.ts +2 -0
- package/src/tests/unit/DI.spec.js +77 -0
- package/src/tests/unit/DTO.spec.d.ts +2 -0
- package/src/tests/unit/DTO.spec.js +223 -0
- package/src/tests/unit/resources/glob-modules/Test2Obj.d.ts +54 -0
- package/src/tests/unit/resources/glob-modules/Test2Obj.js +2 -0
- package/src/tests/unit/resources/glob-modules/TestObj.d.ts +55 -0
- package/src/tests/unit/resources/glob-modules/TestObj.js +5 -0
- package/src/types/ActionPattern.d.ts +3 -0
- package/src/types/ActionPattern.js +0 -0
- package/src/types/ClassDecorator.d.ts +5 -0
- package/src/types/ClassDecorator.js +0 -0
- package/src/types/JSONSchema.d.ts +52 -0
- package/src/types/JSONSchema.js +0 -0
- package/src/types/MethodDecorator.d.ts +3 -0
- package/src/types/MethodDecorator.js +0 -0
- package/src/types/ParameterDecorator.d.ts +3 -0
- package/src/types/ParameterDecorator.js +0 -0
- package/src/types/PropertyDecorator.d.ts +3 -0
- package/src/types/PropertyDecorator.js +0 -0
- package/tsconfig.json +34 -0
- package/vendor/Package.1.js +1410 -0
- package/vendor/Package.10.js +1 -0
- package/vendor/Package.11.js +1 -0
- package/vendor/Package.12.js +1170 -0
- package/vendor/Package.13.js +681 -0
- package/vendor/Package.14.js +128359 -0
- package/vendor/Package.2.js +19080 -0
- package/vendor/Package.3.js +548 -0
- package/vendor/Package.4.js +38 -0
- package/vendor/Package.5.js +370 -0
- package/vendor/Package.6.js +1 -0
- package/vendor/Package.7.js +180 -0
- package/vendor/Package.8.js +3 -0
- package/vendor/Package.9.js +6504 -0
- package/vendor/TypeDef.10.d.ts +49 -0
- package/vendor/TypeDef.11.d.ts +19 -0
- package/vendor/TypeDef.12.d.ts +15 -0
- package/vendor/TypeDef.13.d.ts +27 -0
- package/vendor/TypeDef.14.d.ts +6 -0
- package/vendor/TypeDef.15.d.ts +6 -0
- package/vendor/TypeDef.16.d.ts +217 -0
- package/{QueryResultCache.d-3950e3fe.d.ts → vendor/TypeDef.17.d.ts} +12892 -12080
- package/vendor/TypeDef.18.d.ts +78 -0
- package/vendor/TypeDef.19.d.ts +105 -0
- package/vendor/TypeDef.2.d.ts +623 -0
- package/vendor/TypeDef.20.d.ts +73 -0
- package/vendor/TypeDef.3.d.ts +62 -0
- package/vendor/TypeDef.4.d.ts +915 -0
- package/vendor/TypeDef.5.d.ts +2458 -0
- package/vendor/TypeDef.6.d.ts +415 -0
- package/vendor/TypeDef.7.d.ts +184 -0
- package/vendor/TypeDef.8.d.ts +59 -0
- package/vendor/TypeDef.9.d.ts +19 -0
- package/CLI.d.ts +0 -1
- package/CLI.js +0 -69740
- package/Crypto.d.ts +0 -502
- package/Crypto.js +0 -3802
- package/Hash.d.ts +0 -535
- package/Hash.js +0 -114
- package/Helper.d.ts +0 -270
- package/Helper.js +0 -66
- package/Lakutata.d.ts +0 -7176
- package/Lakutata.js +0 -175
- package/ORM.js +0 -380
- package/ProcessContainer.d.ts +0 -2
- package/ProcessContainer.js +0 -90
- package/README.md +0 -44
- package/ReflectMetadata.js +0 -5
- package/ThreadContainer.d.ts +0 -3
- package/ThreadContainer.js +0 -89
- package/chunk-4SKY6EUL.js +0 -1154
- package/chunk-BSM5H2JD.js +0 -915
- package/chunk-FTN4TYKA.js +0 -56
- package/chunk-KJWPUZI3.js +0 -191
- package/chunk-LZVLY7LZ.js +0 -51
- package/chunk-OLR6HAYL.js +0 -120897
- package/chunk-OZVHXOZU.js +0 -102775
- package/chunk-PMMOEENZ.js +0 -6364
- package/chunk-VLCBJ6IF.js +0 -249
- package/worker.d.ts +0 -2
- package/worker.js +0 -417
- /package/{ReflectMetadata.d.ts → vendor/TypeDef.1.d.ts} +0 -0
package/binding.gyp
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
""
|
|
3
|
+
"targets": [
|
|
4
|
+
{
|
|
5
|
+
"target_name": "lakutata",
|
|
6
|
+
'cflags!': [ '-fno-exceptions' ],
|
|
7
|
+
'cflags_cc!': [ '-fno-exceptions' ],
|
|
8
|
+
'xcode_settings': {
|
|
9
|
+
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
|
|
10
|
+
'CLANG_CXX_LIBRARY': 'libc++',
|
|
11
|
+
'MACOSX_DEPLOYMENT_TARGET': '10.7',
|
|
12
|
+
},
|
|
13
|
+
'msvs_settings': {
|
|
14
|
+
'VCCLCompilerTool': { 'ExceptionHandling': 1 },
|
|
15
|
+
},
|
|
16
|
+
"sources": [ "src/cpp/hello.cc" ],
|
|
17
|
+
"include_dirs": [
|
|
18
|
+
"<!@(node -p \"require('node-addon-api').include\")"
|
|
19
|
+
],
|
|
20
|
+
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"target_name": "lakutata1",
|
|
24
|
+
'cflags!': [ '-fno-exceptions' ],
|
|
25
|
+
'cflags_cc!': [ '-fno-exceptions' ],
|
|
26
|
+
'xcode_settings': {
|
|
27
|
+
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
|
|
28
|
+
'CLANG_CXX_LIBRARY': 'libc++',
|
|
29
|
+
'MACOSX_DEPLOYMENT_TARGET': '10.7',
|
|
30
|
+
},
|
|
31
|
+
'msvs_settings': {
|
|
32
|
+
'VCCLCompilerTool': { 'ExceptionHandling': 1 },
|
|
33
|
+
},
|
|
34
|
+
"sources": [ "src/cpp/hello1.cc" ],
|
|
35
|
+
"include_dirs": [
|
|
36
|
+
"<!@(node -p \"require('node-addon-api').include\")"
|
|
37
|
+
],
|
|
38
|
+
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
package/package.json
CHANGED
|
@@ -1,46 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lakutata",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.2.1-proto.3",
|
|
4
4
|
"description": "An IoC-based universal application framework.",
|
|
5
|
-
"
|
|
6
|
-
"types": "./Lakutata.d.ts",
|
|
5
|
+
"type": "module",
|
|
7
6
|
"exports": {
|
|
8
7
|
".": {
|
|
9
|
-
"import": "./Lakutata.js",
|
|
10
|
-
"
|
|
11
|
-
"types": "./Lakutata.d.ts"
|
|
8
|
+
"import": "./src/Lakutata.js",
|
|
9
|
+
"types": "./src/Lakutata.d.ts"
|
|
12
10
|
},
|
|
13
|
-
"./
|
|
14
|
-
"import": "./ORM.js",
|
|
15
|
-
"
|
|
16
|
-
"types": "./ORM.d.ts"
|
|
11
|
+
"./orm": {
|
|
12
|
+
"import": "./src/lib/core/ORM.js",
|
|
13
|
+
"types": "./src/lib/core/ORM.d.ts"
|
|
17
14
|
},
|
|
18
|
-
"./
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
"./decorator/asst": "./src/decorators/asst",
|
|
16
|
+
"./decorator/ctrl": "./src/decorators/ctrl",
|
|
17
|
+
"./decorator/di": "./src/decorators/di",
|
|
18
|
+
"./decorator/dto": "./src/decorators/dto",
|
|
19
|
+
"./decorator/orm": "./src/decorators/orm",
|
|
20
|
+
"./function": {
|
|
21
|
+
"import": "./src/lib/functions/*.js",
|
|
22
|
+
"types": "./src/lib/functions/*.d.ts"
|
|
22
23
|
},
|
|
23
|
-
"./
|
|
24
|
-
"import": "./
|
|
25
|
-
"
|
|
26
|
-
"types": "./Hash.d.ts"
|
|
24
|
+
"./interface": {
|
|
25
|
+
"import": "./src/interfaces/*.js",
|
|
26
|
+
"types": "./src/interfaces/*.d.ts"
|
|
27
27
|
},
|
|
28
|
-
"./
|
|
29
|
-
"import": "./
|
|
30
|
-
"
|
|
31
|
-
"types": "./Helper.d.ts"
|
|
28
|
+
"./type": {
|
|
29
|
+
"import": "./src/types/*.js",
|
|
30
|
+
"types": "./src/types/*.d.ts"
|
|
32
31
|
},
|
|
33
|
-
"./
|
|
34
|
-
|
|
35
|
-
"require": "./ReflectMetadata.js",
|
|
36
|
-
"types": "./ReflectMetadata.d.ts"
|
|
37
|
-
}
|
|
32
|
+
"./tsconfig": "./tsconfig.json",
|
|
33
|
+
"./package.json": "./package.json"
|
|
38
34
|
},
|
|
39
|
-
"
|
|
40
|
-
"
|
|
35
|
+
"release-it": {
|
|
36
|
+
"npm": {
|
|
37
|
+
"publish": false
|
|
38
|
+
},
|
|
39
|
+
"git": {
|
|
40
|
+
"requireCleanWorkingDir": true,
|
|
41
|
+
"requireBranch": false,
|
|
42
|
+
"commitMessage": "chore: release v${version}",
|
|
43
|
+
"push": false
|
|
44
|
+
},
|
|
45
|
+
"github": {
|
|
46
|
+
"release": true,
|
|
47
|
+
"autoGenerate": true
|
|
48
|
+
}
|
|
41
49
|
},
|
|
42
50
|
"engines": {
|
|
43
|
-
"node": ">=
|
|
51
|
+
"node": ">=20"
|
|
44
52
|
},
|
|
45
53
|
"author": "alex.ma",
|
|
46
54
|
"license": "MIT",
|
|
@@ -60,17 +68,6 @@
|
|
|
60
68
|
"keywords": [
|
|
61
69
|
"lakutata",
|
|
62
70
|
"framework",
|
|
63
|
-
"typescript"
|
|
64
|
-
"alias",
|
|
65
|
-
"cjs",
|
|
66
|
-
"ioc",
|
|
67
|
-
"di",
|
|
68
|
-
"process",
|
|
69
|
-
"thread",
|
|
70
|
-
"worker",
|
|
71
|
-
"daemon",
|
|
72
|
-
"rbac",
|
|
73
|
-
"casbin",
|
|
74
|
-
"typeorm"
|
|
71
|
+
"typescript"
|
|
75
72
|
]
|
|
76
73
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import '../vendor/TypeDef.1.js';
|
|
2
|
+
export { Exception } from './lib/base/abstracts/Exception.js';
|
|
3
|
+
export { DTO } from './lib/core/DTO.js';
|
|
4
|
+
export { Time } from './lib/core/Time.js';
|
|
5
|
+
export { B as BaseObject, a as Component, C as Container, b as Controller, L as LoadAnonymousObjectOptions, c as LoadNamedObjectOptions, d as LoadObjectOptions, M as Module, e as ModuleLoadObjectsOptions, f as ModuleOptions, O as OverridableNamedObjectOptions, g as OverridableObjectOptions, P as Provider } from '../vendor/TypeDef.2.js';
|
|
6
|
+
export { A as Application } from '../vendor/TypeDef.3.js';
|
|
7
|
+
export { ApplicationOptions } from './options/ApplicationOptions.js';
|
|
8
|
+
import './lib/base/internal/DataValidator.js';
|
|
9
|
+
import '../vendor/TypeDef.4.js';
|
|
10
|
+
import '../vendor/TypeDef.5.js';
|
|
11
|
+
import './lib/validation/interfaces/ErrorFormattingOptions.js';
|
|
12
|
+
import './lib/validation/types/LanguageMessages.js';
|
|
13
|
+
import './lib/validation/types/PresenceMode.js';
|
|
14
|
+
import './lib/validation/types/Types.js';
|
|
15
|
+
import './lib/validation/interfaces/State.js';
|
|
16
|
+
import './lib/validation/interfaces/ErrorReport.js';
|
|
17
|
+
import './lib/validation/interfaces/ErrorValidationOptions.js';
|
|
18
|
+
import './lib/validation/interfaces/LanguageMessageTemplate.js';
|
|
19
|
+
import './lib/validation/interfaces/ExtensionFlag.js';
|
|
20
|
+
import './lib/validation/interfaces/Reference.js';
|
|
21
|
+
import './lib/validation/interfaces/ReferenceOptions.js';
|
|
22
|
+
import './lib/validation/interfaces/HierarchySeparatorOptions.js';
|
|
23
|
+
import './lib/validation/interfaces/Base64Options.js';
|
|
24
|
+
import './lib/validation/interfaces/DataUriOptions.js';
|
|
25
|
+
import './lib/validation/interfaces/DomainOptions.js';
|
|
26
|
+
import './lib/validation/interfaces/TopLevelDomainOptions.js';
|
|
27
|
+
import './lib/validation/interfaces/EmailOptions.js';
|
|
28
|
+
import './lib/validation/interfaces/GuidOptions.js';
|
|
29
|
+
import './lib/validation/interfaces/HexOptions.js';
|
|
30
|
+
import './lib/validation/interfaces/IpOptions.js';
|
|
31
|
+
import './lib/validation/interfaces/UriOptions.js';
|
|
32
|
+
import './lib/validation/interfaces/StringRegexOptions.js';
|
|
33
|
+
import './lib/validation/interfaces/DependencyOptions.js';
|
|
34
|
+
import './lib/validation/interfaces/RenameOptions.js';
|
|
35
|
+
import './lib/validation/types/IsNonPrimitiveSubsetUnion.js';
|
|
36
|
+
import './lib/validation/types/IsUnion.js';
|
|
37
|
+
import './lib/validation/types/IsPrimitiveSubset.js';
|
|
38
|
+
import './lib/validation/types/NullableType.js';
|
|
39
|
+
import './lib/validation/interfaces/ValidationOptions.js';
|
|
40
|
+
import './types/JSONSchema.js';
|
|
41
|
+
import '../vendor/TypeDef.6.js';
|
|
42
|
+
import './lib/ioc/InjectionMode.js';
|
|
43
|
+
import './lib/ioc/Lifetime.js';
|
|
44
|
+
import './lib/base/async-constructor/AsyncConstructor.js';
|
|
45
|
+
import '../vendor/TypeDef.7.js';
|
|
46
|
+
import './lib/context/CLIContext.js';
|
|
47
|
+
import './lib/base/Context.js';
|
|
48
|
+
import './types/ActionPattern.js';
|
|
49
|
+
import './lib/context/HTTPContext.js';
|
|
50
|
+
import 'node:http';
|
|
51
|
+
import './lib/context/ServiceContext.js';
|
|
52
|
+
import './types/ClassDecorator.js';
|
|
53
|
+
import './interfaces/IConstructor.js';
|
|
54
|
+
import './lib/core/Alias.js';
|
package/src/Lakutata.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import'../vendor/Package.1.js';export{Exception}from'./lib/base/abstracts/Exception.js';export{D as DTO}from'../vendor/Package.2.js';export{Time}from'./lib/core/Time.js';export{B as BaseObject,C as Container,L as LoadObjectOptions}from'../vendor/Package.3.js';export{Provider}from'./lib/core/Provider.js';export{Component}from'./lib/core/Component.js';export{Controller}from'./lib/core/Controller.js';export{Module}from'./lib/core/Module.js';export{Application}from'./lib/core/Application.js';export{ApplicationOptions}from'./options/ApplicationOptions.js';export{LoadAnonymousObjectOptions}from'./options/LoadAnonymousObjectOptions.js';export{LoadNamedObjectOptions}from'./options/LoadNamedObjectOptions.js';export{ModuleLoadObjectsOptions}from'./options/ModuleLoadObjectsOptions.js';export{ModuleOptions}from'./options/ModuleOptions.js';export{OverridableNamedObjectOptions}from'./options/OverridableNamedObjectOptions.js';export{OverridableObjectOptions}from'./options/OverridableObjectOptions.js';import'../vendor/Package.4.js';import'./lib/base/internal/BasicInfo.js';import'./lib/functions/As.js';import'./lib/functions/Templating.js';import'./lib/base/internal/CamelCase.js';import'./lib/functions/NoCase.js';import'../vendor/Package.5.js';import'./lib/base/internal/DataValidator.js';import'node:util/types';import'./lib/validation/VLD.js';import'../vendor/Package.6.js';import'url';import'util';import'./exceptions/dto/InvalidValueException.js';import'../vendor/Package.7.js';import'./lib/functions/IsHtml.js';import'./lib/functions/IsXML.js';import'./constants/metadata-keys/DTOMetadataKey.js';import'./lib/functions/ObjectConstructor.js';import'./lib/functions/ObjectParentConstructors.js';import'./lib/functions/ObjectParentConstructor.js';import'./lib/functions/ObjectPrototype.js';import'../vendor/Package.8.js';import'./lib/ioc/DependencyInjectionContainer.js';import'./lib/ioc/Errors.js';import'./exceptions/di/DependencyInjectionException.js';import'./lib/base/internal/ConstructorSymbol.js';import'./constants/metadata-keys/DIMetadataKey.js';import'node:crypto';import'./lib/ioc/InjectionMode.js';import'./lib/ioc/Lifetime.js';import'../vendor/Package.9.js';import'../vendor/Package.10.js';import'os';import'path';import'stream';import'events';import'fs';import'./lib/ioc/Utils.js';import'./lib/ioc/FunctionTokenizer.js';import'./lib/ioc/LoadModules.js';import'./lib/ioc/Resolvers.js';import'./lib/ioc/ParamParser.js';import'./lib/base/internal/ObjectLifetime.js';import'./exceptions/di/LifetimeLockedException.js';import'./lib/base/internal/ObjectWeakRefs.js';import'./lib/base/async-constructor/AsyncConstructor.js';import'./lib/base/async-constructor/Append.js';import'./lib/functions/IsPromiseLike.js';import'./lib/functions/IsPromise.js';import'util/types';import'./decorators/di/Lifetime.js';import'./exceptions/MethodNotFoundException.js';import'./decorators/dto/Expect.js';import'./decorators/dto/IndexSignature.js';import'./lib/base/internal/ConfigurableRecordsInjection.js';import'./lib/base/internal/ObjectInjection.js';import'./decorators/dto/Accept.js';import'./lib/base/internal/MethodValidation.js';import'./exceptions/dto/InvalidMethodAcceptException.js';import'./exceptions/dto/InvalidMethodReturnException.js';import'./lib/functions/DevNull.js';import'./lib/functions/IsEmptyObject.js';import'./lib/base/internal/ObjectConfiguration.js';import'./lib/base/internal/ObjectContainer.js';import'./lib/base/EventEmitter.js';import'./lib/context/CLIContext.js';import'./lib/base/Context.js';import'./lib/context/HTTPContext.js';import'node:http';import'./lib/context/ServiceContext.js';import'./decorators/di/Configurable.js';import'./lib/base/internal/ModuleConfigLoader.js';import'./exceptions/di/OverridableObjectTargetConfigNotFoundException.js';import'./exceptions/InvalidObjectTypeException.js';import'./lib/functions/ArrayToSet.js';import'./lib/functions/SetToArray.js';import'./lib/base/internal/ControllerEntrypoint.js';import'./lib/functions/ObjectHash.js';import'../vendor/Package.11.js';import'crypto';import'./lib/functions/GetObjectNestingDepth.js';import'./exceptions/InvalidActionPatternDepthException.js';import'./constants/event-names/ModuleEventName.js';import'./lib/base/internal/ApplicationConfigLoader.js';import'./lib/core/Alias.js';import'./exceptions/alias/InvalidAliasNameException.js';import'./exceptions/alias/AliasExistsException.js';import'./exceptions/alias/AliasNotFoundException.js';import'./components/Entrypoint.js';import'./lib/base/internal/PatternManager.js';import'./exceptions/ControllerActionNotFoundException.js';import'./exceptions/DestroyRuntimeContainerException.js';import'./lib/functions/GetObjectPropertyPaths.js';import'./lib/functions/UniqueArray.js';
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { a as Component } from '../../vendor/TypeDef.2.js';
|
|
2
|
+
import { D as DataSourceOptions, a as DataSource, b as Driver, E as EntityManager, N as NamingStrategyInterface, c as EntitySubscriberInterface, d as EntityMetadata, e as EntityTarget, Q as QueryResultCache, M as Migration, O as ObjectLiteral, R as Repository, f as TreeRepository, g as MongoRepository, I as IsolationLevel, h as QueryRunner, S as SelectQueryBuilder, i as ReplicationMode } from '../../vendor/TypeDef.17.js';
|
|
3
|
+
import '../../vendor/TypeDef.1.js';
|
|
4
|
+
import '../../vendor/TypeDef.6.js';
|
|
5
|
+
import '../lib/ioc/InjectionMode.js';
|
|
6
|
+
import '../lib/ioc/Lifetime.js';
|
|
7
|
+
import '../lib/base/async-constructor/AsyncConstructor.js';
|
|
8
|
+
import '../../vendor/TypeDef.7.js';
|
|
9
|
+
import '../lib/core/DTO.js';
|
|
10
|
+
import '../lib/base/internal/DataValidator.js';
|
|
11
|
+
import '../../vendor/TypeDef.4.js';
|
|
12
|
+
import '../../vendor/TypeDef.5.js';
|
|
13
|
+
import '../lib/validation/interfaces/ErrorFormattingOptions.js';
|
|
14
|
+
import '../lib/validation/types/LanguageMessages.js';
|
|
15
|
+
import '../lib/validation/types/PresenceMode.js';
|
|
16
|
+
import '../lib/validation/types/Types.js';
|
|
17
|
+
import '../lib/validation/interfaces/State.js';
|
|
18
|
+
import '../lib/validation/interfaces/ErrorReport.js';
|
|
19
|
+
import '../lib/validation/interfaces/ErrorValidationOptions.js';
|
|
20
|
+
import '../lib/validation/interfaces/LanguageMessageTemplate.js';
|
|
21
|
+
import '../lib/validation/interfaces/ExtensionFlag.js';
|
|
22
|
+
import '../lib/validation/interfaces/Reference.js';
|
|
23
|
+
import '../lib/validation/interfaces/ReferenceOptions.js';
|
|
24
|
+
import '../lib/validation/interfaces/HierarchySeparatorOptions.js';
|
|
25
|
+
import '../lib/validation/interfaces/Base64Options.js';
|
|
26
|
+
import '../lib/validation/interfaces/DataUriOptions.js';
|
|
27
|
+
import '../lib/validation/interfaces/DomainOptions.js';
|
|
28
|
+
import '../lib/validation/interfaces/TopLevelDomainOptions.js';
|
|
29
|
+
import '../lib/validation/interfaces/EmailOptions.js';
|
|
30
|
+
import '../lib/validation/interfaces/GuidOptions.js';
|
|
31
|
+
import '../lib/validation/interfaces/HexOptions.js';
|
|
32
|
+
import '../lib/validation/interfaces/IpOptions.js';
|
|
33
|
+
import '../lib/validation/interfaces/UriOptions.js';
|
|
34
|
+
import '../lib/validation/interfaces/StringRegexOptions.js';
|
|
35
|
+
import '../lib/validation/interfaces/DependencyOptions.js';
|
|
36
|
+
import '../lib/validation/interfaces/RenameOptions.js';
|
|
37
|
+
import '../lib/validation/types/IsNonPrimitiveSubsetUnion.js';
|
|
38
|
+
import '../lib/validation/types/IsUnion.js';
|
|
39
|
+
import '../lib/validation/types/IsPrimitiveSubset.js';
|
|
40
|
+
import '../lib/validation/types/NullableType.js';
|
|
41
|
+
import '../lib/validation/interfaces/ValidationOptions.js';
|
|
42
|
+
import '../types/JSONSchema.js';
|
|
43
|
+
import '../lib/context/CLIContext.js';
|
|
44
|
+
import '../lib/base/Context.js';
|
|
45
|
+
import '../types/ActionPattern.js';
|
|
46
|
+
import '../lib/context/HTTPContext.js';
|
|
47
|
+
import 'node:http';
|
|
48
|
+
import '../lib/context/ServiceContext.js';
|
|
49
|
+
import '../types/ClassDecorator.js';
|
|
50
|
+
import '../interfaces/IConstructor.js';
|
|
51
|
+
import '../../vendor/TypeDef.13.js';
|
|
52
|
+
import '../../vendor/TypeDef.14.js';
|
|
53
|
+
import '../../vendor/TypeDef.15.js';
|
|
54
|
+
import '../../vendor/TypeDef.18.js';
|
|
55
|
+
import '../../vendor/TypeDef.11.js';
|
|
56
|
+
import '../../vendor/TypeDef.12.js';
|
|
57
|
+
import '../../vendor/TypeDef.19.js';
|
|
58
|
+
import '../../vendor/TypeDef.9.js';
|
|
59
|
+
import '../../vendor/TypeDef.20.js';
|
|
60
|
+
import '../../vendor/TypeDef.16.js';
|
|
61
|
+
import 'fs';
|
|
62
|
+
import 'tls';
|
|
63
|
+
import 'net';
|
|
64
|
+
import 'dns';
|
|
65
|
+
import 'events';
|
|
66
|
+
import 'stream';
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Database component
|
|
70
|
+
*/
|
|
71
|
+
declare class Database extends Component {
|
|
72
|
+
#private;
|
|
73
|
+
/**
|
|
74
|
+
* Connection options
|
|
75
|
+
*/
|
|
76
|
+
protected readonly options: DataSourceOptions;
|
|
77
|
+
/**
|
|
78
|
+
* Datasource instance
|
|
79
|
+
* @protected
|
|
80
|
+
*/
|
|
81
|
+
protected get datasource(): DataSource;
|
|
82
|
+
/**
|
|
83
|
+
* Connection driver
|
|
84
|
+
*/
|
|
85
|
+
get driver(): Driver;
|
|
86
|
+
/**
|
|
87
|
+
* EntityManager of this connection.
|
|
88
|
+
*/
|
|
89
|
+
get manager(): EntityManager;
|
|
90
|
+
/**
|
|
91
|
+
* Set naming strategy used in the connection.
|
|
92
|
+
* @param instance
|
|
93
|
+
*/
|
|
94
|
+
set namingStrategy(instance: NamingStrategyInterface);
|
|
95
|
+
/**
|
|
96
|
+
* Get naming strategy used in the connection.
|
|
97
|
+
*/
|
|
98
|
+
get namingStrategy(): NamingStrategyInterface;
|
|
99
|
+
/**
|
|
100
|
+
* Entity subscriber instances that are registered for this connection.
|
|
101
|
+
*/
|
|
102
|
+
get subscribers(): EntitySubscriberInterface<any>[];
|
|
103
|
+
/**
|
|
104
|
+
* All entity metadatas that are registered for this connection.
|
|
105
|
+
*/
|
|
106
|
+
get entityMetadatas(): EntityMetadata[];
|
|
107
|
+
/**
|
|
108
|
+
* All entity metadatas that are registered for this connection.
|
|
109
|
+
* This is a copy of #.entityMetadatas property -> used for more performant searches.
|
|
110
|
+
*/
|
|
111
|
+
get entityMetadatasMap(): Map<EntityTarget<any>, EntityMetadata>;
|
|
112
|
+
/**
|
|
113
|
+
* Used to work with query result cache.
|
|
114
|
+
*/
|
|
115
|
+
get queryResultCache(): QueryResultCache | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Initializer
|
|
118
|
+
* @protected
|
|
119
|
+
*/
|
|
120
|
+
protected init(): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* Destroyer
|
|
123
|
+
* @protected
|
|
124
|
+
*/
|
|
125
|
+
protected destroy(): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* Creates database schema for all entities registered in this connection.
|
|
128
|
+
* Can be used only after connection to the database is established.
|
|
129
|
+
*
|
|
130
|
+
* @param dropBeforeSync If set to true then it drops the database with all its tables and data
|
|
131
|
+
*/
|
|
132
|
+
synchronize(dropBeforeSync?: boolean): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Runs all pending migrations.
|
|
135
|
+
* Can be used only after connection to the database is established.
|
|
136
|
+
* @param options
|
|
137
|
+
*/
|
|
138
|
+
runMigrations(options?: {
|
|
139
|
+
transaction?: 'all' | 'none' | 'each';
|
|
140
|
+
fake?: boolean;
|
|
141
|
+
}): Promise<Migration[]>;
|
|
142
|
+
/**
|
|
143
|
+
* Reverts last executed migration.
|
|
144
|
+
* Can be used only after connection to the database is established.
|
|
145
|
+
* @param options
|
|
146
|
+
*/
|
|
147
|
+
undoLastMigration(options?: {
|
|
148
|
+
transaction?: 'all' | 'none' | 'each';
|
|
149
|
+
fake?: boolean;
|
|
150
|
+
}): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* Lists all migrations and whether they have been run.
|
|
153
|
+
* Returns true if there are pending migrations
|
|
154
|
+
*/
|
|
155
|
+
showMigrations(): Promise<boolean>;
|
|
156
|
+
/**
|
|
157
|
+
* Checks if entity metadata exist for the given entity class, target name or table name.
|
|
158
|
+
* @param target
|
|
159
|
+
*/
|
|
160
|
+
hasMetadata(target: EntityTarget<any>): boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Gets entity metadata for the given entity class or schema name.
|
|
163
|
+
* @param target
|
|
164
|
+
*/
|
|
165
|
+
getMetadata(target: EntityTarget<any>): EntityMetadata;
|
|
166
|
+
/**
|
|
167
|
+
* Gets repository for the given entity.
|
|
168
|
+
* @param target
|
|
169
|
+
*/
|
|
170
|
+
getRepository<Entity extends ObjectLiteral>(target: EntityTarget<Entity>): Repository<Entity>;
|
|
171
|
+
/**
|
|
172
|
+
* Gets tree repository for the given entity class or name.
|
|
173
|
+
* Only tree-type entities can have a TreeRepository, like ones decorated with @Tree decorator.
|
|
174
|
+
* @param target
|
|
175
|
+
*/
|
|
176
|
+
getTreeRepository<Entity extends ObjectLiteral>(target: EntityTarget<Entity>): TreeRepository<Entity>;
|
|
177
|
+
/**
|
|
178
|
+
* Gets mongodb-specific repository for the given entity class or name.
|
|
179
|
+
* Works only if connection is mongodb-specific.
|
|
180
|
+
* @param target
|
|
181
|
+
*/
|
|
182
|
+
getMongoRepository<Entity extends ObjectLiteral>(target: EntityTarget<Entity>): MongoRepository<Entity>;
|
|
183
|
+
/**
|
|
184
|
+
* Wraps given function execution (and all operations made there) into a transaction.
|
|
185
|
+
* All database operations must be executed using provided entity manager.
|
|
186
|
+
* @param runInTransaction
|
|
187
|
+
*/
|
|
188
|
+
transaction<T>(runInTransaction: (entityManager: EntityManager) => Promise<T>): Promise<T>;
|
|
189
|
+
transaction<T>(isolationLevel: IsolationLevel, runInTransaction: (entityManager: EntityManager) => Promise<T>): Promise<T>;
|
|
190
|
+
/**
|
|
191
|
+
* Executes raw SQL query and returns raw database results.
|
|
192
|
+
* @param query
|
|
193
|
+
* @param parameters
|
|
194
|
+
* @param queryRunner
|
|
195
|
+
*/
|
|
196
|
+
query<T = any>(query: string, parameters?: any[], queryRunner?: QueryRunner): Promise<T>;
|
|
197
|
+
/**
|
|
198
|
+
* Creates a new query builder that can be used to build a SQL query.
|
|
199
|
+
* @param entityClass
|
|
200
|
+
* @param alias
|
|
201
|
+
* @param queryRunner
|
|
202
|
+
*/
|
|
203
|
+
createQueryBuilder<Entity extends ObjectLiteral>(entityClass: EntityTarget<Entity>, alias: string, queryRunner?: QueryRunner): SelectQueryBuilder<Entity>;
|
|
204
|
+
createQueryBuilder(queryRunner?: QueryRunner): SelectQueryBuilder<any>;
|
|
205
|
+
/**
|
|
206
|
+
* Creates a query runner used for perform queries on a single database connection.
|
|
207
|
+
* Using query runners you can control your queries to execute using single database connection and
|
|
208
|
+
* manually control your database transaction.
|
|
209
|
+
*
|
|
210
|
+
* Mode is used in replication mode and indicates whatever you want to connect
|
|
211
|
+
* to master database or any of slave databases.
|
|
212
|
+
* If you perform writes you must use master database,
|
|
213
|
+
* if you perform reads you can use slave databases.
|
|
214
|
+
*
|
|
215
|
+
* @param mode
|
|
216
|
+
*/
|
|
217
|
+
createQueryRunner(mode?: ReplicationMode): QueryRunner;
|
|
218
|
+
/**
|
|
219
|
+
* Gets entity metadata of the junction table (many-to-many table).
|
|
220
|
+
* @param entityTarget
|
|
221
|
+
* @param relationPropertyPath
|
|
222
|
+
*/
|
|
223
|
+
getManyToManyMetadata(entityTarget: EntityTarget<any>, relationPropertyPath: string): EntityMetadata | undefined;
|
|
224
|
+
/**
|
|
225
|
+
* Creates an Entity Manager for the current connection with the help of the EntityManagerFactory.
|
|
226
|
+
* @param queryRunner
|
|
227
|
+
*/
|
|
228
|
+
createEntityManager(queryRunner?: QueryRunner): EntityManager;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export { Database };
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import {_ as __decorate,a as __metadata}from'../../vendor/Package.5.js';import {Configurable}from'../decorators/di/Configurable.js';import {Component}from'../lib/core/Component.js';import {D as DataSourceExports}from'../../vendor/Package.13.js';import {Singleton}from'../decorators/di/Lifetime.js';import'../lib/base/internal/ObjectConfiguration.js';import'../constants/metadata-keys/DIMetadataKey.js';import'../../vendor/Package.1.js';import'../../vendor/Package.4.js';import'../../vendor/Package.2.js';import'../lib/base/internal/DataValidator.js';import'node:util/types';import'../lib/validation/VLD.js';import'../../vendor/Package.6.js';import'url';import'util';import'../exceptions/dto/InvalidValueException.js';import'../lib/base/abstracts/Exception.js';import'../lib/base/internal/BasicInfo.js';import'../lib/functions/As.js';import'../lib/functions/Templating.js';import'../lib/base/internal/CamelCase.js';import'../lib/functions/NoCase.js';import'../../vendor/Package.7.js';import'../lib/functions/IsHtml.js';import'../lib/functions/IsXML.js';import'../constants/metadata-keys/DTOMetadataKey.js';import'../lib/functions/ObjectConstructor.js';import'../lib/functions/ObjectParentConstructors.js';import'../lib/functions/ObjectParentConstructor.js';import'../lib/functions/ObjectPrototype.js';import'../../vendor/Package.3.js';import'../lib/ioc/DependencyInjectionContainer.js';import'../lib/ioc/Errors.js';import'../exceptions/di/DependencyInjectionException.js';import'../lib/base/internal/ConstructorSymbol.js';import'node:crypto';import'../lib/ioc/InjectionMode.js';import'../lib/ioc/Lifetime.js';import'../../vendor/Package.9.js';import'../../vendor/Package.10.js';import'os';import'path';import'stream';import'events';import'fs';import'../lib/ioc/Utils.js';import'../lib/ioc/FunctionTokenizer.js';import'../lib/ioc/LoadModules.js';import'../lib/ioc/Resolvers.js';import'../lib/ioc/ParamParser.js';import'../lib/base/internal/ObjectLifetime.js';import'../exceptions/di/LifetimeLockedException.js';import'../lib/base/internal/ObjectWeakRefs.js';import'../lib/base/async-constructor/AsyncConstructor.js';import'../lib/base/async-constructor/Append.js';import'../lib/functions/IsPromiseLike.js';import'../lib/functions/IsPromise.js';import'util/types';import'../exceptions/MethodNotFoundException.js';import'../decorators/dto/Expect.js';import'../decorators/dto/IndexSignature.js';import'../lib/base/internal/ConfigurableRecordsInjection.js';import'../lib/base/internal/ObjectInjection.js';import'../decorators/dto/Accept.js';import'../lib/base/internal/MethodValidation.js';import'../exceptions/dto/InvalidMethodAcceptException.js';import'../exceptions/dto/InvalidMethodReturnException.js';import'../lib/functions/DevNull.js';import'../lib/functions/IsEmptyObject.js';import'../lib/base/internal/ObjectContainer.js';import'../lib/base/EventEmitter.js';import'../lib/core/Provider.js';import'../../vendor/Package.14.js';import'../../vendor/Package.8.js';import'../../vendor/Package.11.js';import'crypto';import'../../vendor/Package.12.js';import'module';import'buffer';import'tty';import'fs/promises';import'string_decoder';/**
|
|
2
|
+
* Database component
|
|
3
|
+
*/
|
|
4
|
+
let Database = class Database extends Component {
|
|
5
|
+
#datasource;
|
|
6
|
+
/**
|
|
7
|
+
* Datasource instance
|
|
8
|
+
* @protected
|
|
9
|
+
*/
|
|
10
|
+
get datasource() {
|
|
11
|
+
return this.#datasource;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Connection driver
|
|
15
|
+
*/
|
|
16
|
+
get driver() {
|
|
17
|
+
return this.datasource.driver;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* EntityManager of this connection.
|
|
21
|
+
*/
|
|
22
|
+
get manager() {
|
|
23
|
+
return this.datasource.manager;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Set naming strategy used in the connection.
|
|
27
|
+
* @param instance
|
|
28
|
+
*/
|
|
29
|
+
set namingStrategy(instance) {
|
|
30
|
+
this.datasource.namingStrategy = instance;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get naming strategy used in the connection.
|
|
34
|
+
*/
|
|
35
|
+
get namingStrategy() {
|
|
36
|
+
return this.datasource.namingStrategy;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Entity subscriber instances that are registered for this connection.
|
|
40
|
+
*/
|
|
41
|
+
get subscribers() {
|
|
42
|
+
return this.datasource.subscribers;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* All entity metadatas that are registered for this connection.
|
|
46
|
+
*/
|
|
47
|
+
get entityMetadatas() {
|
|
48
|
+
return this.datasource.entityMetadatas;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* All entity metadatas that are registered for this connection.
|
|
52
|
+
* This is a copy of #.entityMetadatas property -> used for more performant searches.
|
|
53
|
+
*/
|
|
54
|
+
get entityMetadatasMap() {
|
|
55
|
+
return this.datasource.entityMetadatasMap;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Used to work with query result cache.
|
|
59
|
+
*/
|
|
60
|
+
get queryResultCache() {
|
|
61
|
+
return this.datasource.queryResultCache;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Initializer
|
|
65
|
+
* @protected
|
|
66
|
+
*/
|
|
67
|
+
async init() {
|
|
68
|
+
this.#datasource = await (new DataSourceExports.DataSource(this.options)).initialize();
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Destroyer
|
|
72
|
+
* @protected
|
|
73
|
+
*/
|
|
74
|
+
async destroy() {
|
|
75
|
+
await this.datasource.destroy();
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Creates database schema for all entities registered in this connection.
|
|
79
|
+
* Can be used only after connection to the database is established.
|
|
80
|
+
*
|
|
81
|
+
* @param dropBeforeSync If set to true then it drops the database with all its tables and data
|
|
82
|
+
*/
|
|
83
|
+
async synchronize(dropBeforeSync) {
|
|
84
|
+
return await this.datasource.synchronize(dropBeforeSync);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Runs all pending migrations.
|
|
88
|
+
* Can be used only after connection to the database is established.
|
|
89
|
+
* @param options
|
|
90
|
+
*/
|
|
91
|
+
async runMigrations(options) {
|
|
92
|
+
return await this.datasource.runMigrations(options);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Reverts last executed migration.
|
|
96
|
+
* Can be used only after connection to the database is established.
|
|
97
|
+
* @param options
|
|
98
|
+
*/
|
|
99
|
+
async undoLastMigration(options) {
|
|
100
|
+
return await this.datasource.undoLastMigration(options);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Lists all migrations and whether they have been run.
|
|
104
|
+
* Returns true if there are pending migrations
|
|
105
|
+
*/
|
|
106
|
+
async showMigrations() {
|
|
107
|
+
return await this.datasource.showMigrations();
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Checks if entity metadata exist for the given entity class, target name or table name.
|
|
111
|
+
* @param target
|
|
112
|
+
*/
|
|
113
|
+
hasMetadata(target) {
|
|
114
|
+
return this.datasource.hasMetadata(target);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Gets entity metadata for the given entity class or schema name.
|
|
118
|
+
* @param target
|
|
119
|
+
*/
|
|
120
|
+
getMetadata(target) {
|
|
121
|
+
return this.datasource.getMetadata(target);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Gets repository for the given entity.
|
|
125
|
+
* @param target
|
|
126
|
+
*/
|
|
127
|
+
getRepository(target) {
|
|
128
|
+
return this.datasource.getRepository(target);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Gets tree repository for the given entity class or name.
|
|
132
|
+
* Only tree-type entities can have a TreeRepository, like ones decorated with @Tree decorator.
|
|
133
|
+
* @param target
|
|
134
|
+
*/
|
|
135
|
+
getTreeRepository(target) {
|
|
136
|
+
return this.datasource.getTreeRepository(target);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Gets mongodb-specific repository for the given entity class or name.
|
|
140
|
+
* Works only if connection is mongodb-specific.
|
|
141
|
+
* @param target
|
|
142
|
+
*/
|
|
143
|
+
getMongoRepository(target) {
|
|
144
|
+
return this.datasource.getMongoRepository(target);
|
|
145
|
+
}
|
|
146
|
+
async transaction(inp1, inp2) {
|
|
147
|
+
return inp2 ? await this.datasource.transaction(inp1, inp2) : await this.datasource.transaction(inp1);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Executes raw SQL query and returns raw database results.
|
|
151
|
+
* @param query
|
|
152
|
+
* @param parameters
|
|
153
|
+
* @param queryRunner
|
|
154
|
+
*/
|
|
155
|
+
async query(query, parameters, queryRunner) {
|
|
156
|
+
return await this.datasource.query(query, parameters, queryRunner);
|
|
157
|
+
}
|
|
158
|
+
createQueryBuilder(inp1, inp2, inp3) {
|
|
159
|
+
return arguments.length > 1 ? this.datasource.createQueryBuilder(inp1, inp2, inp3) : this.datasource.createQueryBuilder(inp1);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Creates a query runner used for perform queries on a single database connection.
|
|
163
|
+
* Using query runners you can control your queries to execute using single database connection and
|
|
164
|
+
* manually control your database transaction.
|
|
165
|
+
*
|
|
166
|
+
* Mode is used in replication mode and indicates whatever you want to connect
|
|
167
|
+
* to master database or any of slave databases.
|
|
168
|
+
* If you perform writes you must use master database,
|
|
169
|
+
* if you perform reads you can use slave databases.
|
|
170
|
+
*
|
|
171
|
+
* @param mode
|
|
172
|
+
*/
|
|
173
|
+
createQueryRunner(mode) {
|
|
174
|
+
return this.datasource.createQueryRunner(mode);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Gets entity metadata of the junction table (many-to-many table).
|
|
178
|
+
* @param entityTarget
|
|
179
|
+
* @param relationPropertyPath
|
|
180
|
+
*/
|
|
181
|
+
getManyToManyMetadata(entityTarget, relationPropertyPath) {
|
|
182
|
+
return this.datasource.getManyToManyMetadata(entityTarget, relationPropertyPath);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Creates an Entity Manager for the current connection with the help of the EntityManagerFactory.
|
|
186
|
+
* @param queryRunner
|
|
187
|
+
*/
|
|
188
|
+
createEntityManager(queryRunner) {
|
|
189
|
+
return this.datasource.createEntityManager(queryRunner);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
__decorate([
|
|
193
|
+
Configurable(),
|
|
194
|
+
__metadata("design:type", Object)
|
|
195
|
+
], Database.prototype, "options", void 0);
|
|
196
|
+
Database = __decorate([
|
|
197
|
+
Singleton()
|
|
198
|
+
], Database);export{Database};
|