@adaas/a-concept 0.0.3 → 0.0.5
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/dist/examples/simple/components/A.component.d.ts +7 -0
- package/dist/examples/simple/components/A.component.js +57 -0
- package/dist/examples/simple/components/A.component.js.map +1 -0
- package/dist/examples/simple/components/B.component.d.ts +9 -0
- package/dist/examples/simple/components/B.component.js +77 -0
- package/dist/examples/simple/components/B.component.js.map +1 -0
- package/dist/examples/simple/concept.d.ts +1 -0
- package/dist/examples/simple/concept.js +53 -11
- package/dist/examples/simple/concept.js.map +1 -1
- package/dist/examples/simple/containers/Main.container.d.ts +11 -0
- package/dist/examples/simple/containers/Main.container.js +71 -0
- package/dist/examples/simple/containers/Main.container.js.map +1 -0
- package/dist/examples/simple/context/Fragment_A.context.d.ts +6 -0
- package/dist/examples/simple/context/Fragment_A.context.js +16 -0
- package/dist/examples/simple/context/Fragment_A.context.js.map +1 -0
- package/dist/examples/simple/context/Fragment_B.context.d.ts +6 -0
- package/dist/examples/simple/context/Fragment_B.context.js +16 -0
- package/dist/examples/simple/context/Fragment_B.context.js.map +1 -0
- package/dist/examples/simple-http-server/components/http-error-handler.component.d.ts +9 -0
- package/dist/examples/simple-http-server/components/http-error-handler.component.js +63 -0
- package/dist/examples/simple-http-server/components/http-error-handler.component.js.map +1 -0
- package/dist/examples/simple-http-server/components/http-request-handler.component.d.ts +2 -0
- package/dist/examples/simple-http-server/components/http-request-handler.component.js +7 -0
- package/dist/examples/simple-http-server/components/http-request-handler.component.js.map +1 -0
- package/dist/examples/simple-http-server/concept.js +21 -22
- package/dist/examples/simple-http-server/concept.js.map +1 -1
- package/dist/examples/simple-http-server/containers/http-server.container.d.ts +8 -8
- package/dist/examples/simple-http-server/containers/http-server.container.js +34 -30
- package/dist/examples/simple-http-server/containers/http-server.container.js.map +1 -1
- package/dist/examples/simple-http-server/containers/http-server.controller.js +1 -1
- package/dist/examples/simple-http-server/containers/http-server.router.js +2 -2
- package/dist/examples/simple-http-server/containers/http-server.router.js.map +1 -1
- package/dist/examples/simple-http-server/contexts/http-request.context.d.ts +13 -0
- package/dist/examples/simple-http-server/contexts/http-request.context.js +51 -0
- package/dist/examples/simple-http-server/contexts/http-request.context.js.map +1 -0
- package/dist/examples/simple-http-server/contexts/http-server.context.types.d.ts +0 -4
- package/dist/examples/simple-http-server/contexts/http-server.context.types.js +0 -98
- package/dist/examples/simple-http-server/contexts/http-server.context.types.js.map +1 -1
- package/dist/examples/simple-http-server/contexts/http-server.namespace.d.ts +1 -1
- package/dist/examples/simple-http-server/contexts/http-server.namespace.js +1 -1
- package/dist/examples/simple-http-server/controllers/users.controller.js +2 -2
- package/dist/examples/simple-http-server/test.d.ts +68 -0
- package/dist/examples/simple-http-server/test.js +162 -0
- package/dist/examples/simple-http-server/test.js.map +1 -0
- package/dist/index.d.ts +27 -19
- package/dist/index.js +58 -26
- package/dist/index.js.map +1 -1
- package/dist/src/base/A-Config/A-Config.container.d.ts +8 -0
- package/dist/src/base/A-Config/A-Config.container.js +64 -0
- package/dist/src/base/A-Config/A-Config.container.js.map +1 -0
- package/dist/src/base/A-Config/A-Config.context.d.ts +30 -0
- package/dist/src/base/A-Config/A-Config.context.js +58 -0
- package/dist/src/base/A-Config/A-Config.context.js.map +1 -0
- package/dist/src/base/A-Config/A-Config.types.d.ts +16 -0
- package/dist/src/base/A-Config/A-Config.types.js +7 -0
- package/dist/src/base/A-Config/A-Config.types.js.map +1 -0
- package/dist/src/base/A-Config/components/ConfigReader.component.d.ts +19 -0
- package/dist/src/base/A-Config/components/ConfigReader.component.js +53 -0
- package/dist/src/base/A-Config/components/ConfigReader.component.js.map +1 -0
- package/dist/src/base/A-Config/components/ENVConfigReader.component.d.ts +10 -0
- package/dist/src/base/A-Config/components/ENVConfigReader.component.js +37 -0
- package/dist/src/base/A-Config/components/ENVConfigReader.component.js.map +1 -0
- package/dist/src/base/A-Config/components/FileConfigReader.component.d.ts +11 -0
- package/dist/src/base/A-Config/components/FileConfigReader.component.js +47 -0
- package/dist/src/base/A-Config/components/FileConfigReader.component.js.map +1 -0
- package/dist/src/base/A-Errors/A-Errors.component.d.ts +18 -0
- package/dist/src/base/A-Errors/A-Errors.component.js +85 -0
- package/dist/src/base/A-Errors/A-Errors.component.js.map +1 -0
- package/dist/src/base/A-Errors/A-Errors.context.d.ts +27 -0
- package/dist/src/base/A-Errors/A-Errors.context.js +50 -0
- package/dist/src/base/A-Errors/A-Errors.context.js.map +1 -0
- package/dist/src/base/A-Errors/A-Errors.types.d.ts +5 -0
- package/dist/src/base/A-Errors/A-Errors.types.js +3 -0
- package/dist/src/base/A-Errors/A-Errors.types.js.map +1 -0
- package/dist/src/base/A-Logger/A-Logger.component.d.ts +28 -0
- package/dist/src/base/A-Logger/A-Logger.component.js +142 -0
- package/dist/src/base/A-Logger/A-Logger.component.js.map +1 -0
- package/dist/src/base/A-Logger/A-Logger.types.js +2 -0
- package/dist/src/base/A-Logger/A-Logger.types.js.map +1 -0
- package/dist/src/constants/A_ConceptLifecycle.constants.d.ts +0 -2
- package/dist/src/constants/A_ConceptLifecycle.constants.js +9 -10
- package/dist/src/constants/A_ConceptLifecycle.constants.js.map +1 -1
- package/dist/src/containers/A-Config/A-Config.container.js +1 -1
- package/dist/src/containers/A-Config/A-Config.namespace.d.ts +1 -1
- package/dist/src/containers/A-Config/A-Config.namespace.js +1 -1
- package/dist/src/containers/A-Config/A-Config.types.d.ts +1 -1
- package/dist/src/containers/A-Errors/A-Errors.container.js +1 -1
- package/dist/src/containers/A-Errors/A-Errors.namespace.d.ts +1 -1
- package/dist/src/containers/A-Errors/A-Errors.namespace.js +1 -1
- package/dist/src/containers/A-Errors/A-Errors.types.d.ts +1 -1
- package/dist/src/containers/A-Logger/A-Logger.container.js +1 -1
- package/dist/src/containers/A-Logger/A-Logger.namespace.d.ts +1 -1
- package/dist/src/containers/A-Logger/A-Logger.namespace.js +1 -1
- package/dist/src/containers/A-Logger/components/Logger.component.d.ts +1 -1
- package/dist/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.js.map +1 -1
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.d.ts +16 -0
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.js +36 -0
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.js.map +1 -0
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.types.d.ts +8 -0
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.types.js +3 -0
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.types.js.map +1 -0
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.d.ts +14 -0
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.js +24 -0
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.js.map +1 -0
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.types.d.ts +8 -0
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.types.js +3 -0
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.types.js.map +1 -0
- package/dist/src/decorators/A-Define/index.d.ts +7 -0
- package/dist/src/decorators/A-Define/index.js +10 -0
- package/dist/src/decorators/A-Define/index.js.map +1 -0
- package/dist/src/decorators/A-Extend/A-Extend.decorator.d.ts +18 -0
- package/dist/src/decorators/A-Extend/A-Extend.decorator.js +37 -0
- package/dist/src/decorators/A-Extend/A-Extend.decorator.js.map +1 -0
- package/dist/src/decorators/A-Extend/A-Extend.decorator.types.d.ts +21 -0
- package/dist/src/decorators/A-Extend/A-Extend.decorator.types.js +3 -0
- package/dist/src/decorators/A-Extend/A-Extend.decorator.types.js.map +1 -0
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.d.ts +16 -0
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js +37 -0
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js.map +1 -0
- package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.d.ts +16 -0
- package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.js +42 -0
- package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.js.map +1 -0
- package/dist/src/decorators/A-Feature/A-Feature.decorator.types.d.ts +20 -0
- package/dist/src/decorators/A-Feature/A-Feature.decorator.types.js +1 -0
- package/dist/src/decorators/A-Inject/A-Inject.decorator.d.ts +12 -10
- package/dist/src/decorators/A-Inject/A-Inject.decorator.js +16 -26
- package/dist/src/decorators/A-Inject/A-Inject.decorator.js.map +1 -1
- package/dist/src/decorators/A-Inject/A-Inject.decorator.types.d.ts +4 -3
- package/dist/src/decorators/A-Stage/A-Stage.decorator.d.ts +12 -0
- package/dist/src/decorators/A-Stage/A-Stage.decorator.js +35 -0
- package/dist/src/decorators/A-Stage/A-Stage.decorator.js.map +1 -0
- package/dist/src/decorators/A-Stage/A-Stage.decorator.types.d.ts +2 -0
- package/dist/src/decorators/A-Stage/A-Stage.decorator.types.js +3 -0
- package/dist/src/decorators/A-Stage/A-Stage.decorator.types.js.map +1 -0
- package/dist/src/global/A-Channel/A-Channel.class.d.ts +18 -0
- package/dist/src/global/A-Channel/A-Channel.class.js +54 -0
- package/dist/src/global/A-Channel/A-Channel.class.js.map +1 -0
- package/dist/src/global/A-Channel/A-Channel.types.d.ts +35 -0
- package/dist/src/global/A-Channel/A-Channel.types.js +3 -0
- package/dist/src/global/A-Channel/A-Channel.types.js.map +1 -0
- package/dist/src/global/A-Component/A-Component.class.d.ts +1 -11
- package/dist/src/global/A-Component/A-Component.class.js +0 -7
- package/dist/src/global/A-Component/A-Component.class.js.map +1 -1
- package/dist/src/global/A-Component/A-Component.meta.d.ts +4 -0
- package/dist/src/global/A-Component/A-Component.meta.js +8 -0
- package/dist/src/global/A-Component/A-Component.meta.js.map +1 -0
- package/dist/src/global/A-Component/A-Component.types.d.ts +18 -0
- package/dist/src/global/A-Component/A-Component.types.js +10 -0
- package/dist/src/global/A-Component/A-Component.types.js.map +1 -0
- package/dist/src/global/A-Concept/A_Concept.class.d.ts +41 -17
- package/dist/src/global/A-Concept/A_Concept.class.js +120 -43
- package/dist/src/global/A-Concept/A_Concept.class.js.map +1 -1
- package/dist/src/global/A-Concept/A_Concept.meta.d.ts +3 -0
- package/dist/src/global/A-Concept/A_Concept.meta.js +9 -0
- package/dist/src/global/A-Concept/A_Concept.meta.js.map +1 -0
- package/dist/src/global/A-Concept/A_Concept.types.d.ts +31 -16
- package/dist/src/global/A-Concept/A_Concept.types.js +25 -0
- package/dist/src/global/A-Concept/A_Concept.types.js.map +1 -1
- package/dist/src/global/A-Container/A-Container.class.d.ts +72 -10
- package/dist/src/global/A-Container/A-Container.class.js +119 -9
- package/dist/src/global/A-Container/A-Container.class.js.map +1 -1
- package/dist/src/global/A-Container/A-Container.meta.d.ts +7 -0
- package/dist/src/global/A-Container/A-Container.meta.js +54 -0
- package/dist/src/global/A-Container/A-Container.meta.js.map +1 -0
- package/dist/src/global/A-Container/A-Container.types.d.ts +31 -0
- package/dist/src/global/A-Container/A-Container.types.js +9 -0
- package/dist/src/global/A-Container/A-Container.types.js.map +1 -0
- package/dist/src/global/A-Context/A-Context.class.d.ts +37 -54
- package/dist/src/global/A-Context/A-Context.class.js +129 -61
- package/dist/src/global/A-Context/A-Context.class.js.map +1 -1
- package/dist/src/global/A-Context/A-Context.types.d.ts +12 -0
- package/dist/src/global/A-Context/A-Context.types.js +1 -0
- package/dist/src/global/A-Context/A-ContextFragment.class.d.ts +12 -0
- package/dist/src/global/A-Context/A-ContextFragment.class.js +19 -0
- package/dist/src/global/A-Context/A-ContextFragment.class.js.map +1 -0
- package/dist/src/global/A-Dependency/A-DependencyReference.class.d.ts +0 -17
- package/dist/src/global/A-Dependency/A-DependencyReference.class.js +47 -65
- package/dist/src/global/A-Dependency/A-DependencyReference.class.js.map +1 -1
- package/dist/src/global/A-Dependency/A-DependencyReference.types.d.ts +0 -55
- package/dist/src/global/A-Dependency/A-DependencyReference.types.js +56 -1
- package/dist/src/global/A-Dependency/A-DependencyReference.types.js.map +1 -1
- package/dist/src/global/A-Entity/A-Entity.class.d.ts +57 -0
- package/dist/src/global/A-Entity/A-Entity.class.js +102 -0
- package/dist/src/global/A-Entity/A-Entity.class.js.map +1 -0
- package/dist/src/global/A-Entity/A-Entity.types.d.ts +13 -0
- package/dist/src/global/A-Entity/A-Entity.types.js +4 -0
- package/dist/src/global/A-Entity/A-Entity.types.js.map +1 -0
- package/dist/src/global/A-Feature/A-Feature.class.d.ts +44 -0
- package/dist/src/global/A-Feature/A-Feature.class.js +125 -0
- package/dist/src/global/A-Feature/A-Feature.class.js.map +1 -0
- package/dist/src/global/A-Feature/A-Feature.types.d.ts +17 -0
- package/dist/src/global/A-Feature/A-Feature.types.js +11 -0
- package/dist/src/global/A-Feature/A-Feature.types.js.map +1 -0
- package/dist/src/global/A-Fragment/A-Fragment.class.d.ts +38 -0
- package/dist/src/global/A-Fragment/A-Fragment.class.js +107 -0
- package/dist/src/global/A-Fragment/A-Fragment.class.js.map +1 -0
- package/dist/src/global/A-Fragment/A-Fragment.types.d.ts +3 -0
- package/dist/src/global/A-Fragment/A-Fragment.types.js +3 -0
- package/dist/src/global/A-Fragment/A-Fragment.types.js.map +1 -0
- package/dist/src/global/A-Meta/A-Meta.class.d.ts +16 -0
- package/dist/src/global/A-Meta/A-Meta.class.js +69 -0
- package/dist/src/global/A-Meta/A-Meta.class.js.map +1 -0
- package/dist/src/global/A-Meta/A-Meta.types.js +2 -0
- package/dist/src/global/A-Meta/A-Meta.types.js.map +1 -0
- package/dist/src/global/A-Scope/A-Scope.class.d.ts +51 -0
- package/dist/src/global/A-Scope/A-Scope.class.js +135 -0
- package/dist/src/global/A-Scope/A-Scope.class.js.map +1 -0
- package/dist/src/global/A-Scope/A-Scope.types.d.ts +32 -0
- package/dist/src/global/A-Scope/A-Scope.types.js +3 -0
- package/dist/src/global/A-Scope/A-Scope.types.js.map +1 -0
- package/dist/src/storage/A_Component.storage.d.ts +10 -0
- package/dist/src/storage/A_Component.storage.js +17 -0
- package/dist/src/storage/A_Component.storage.js.map +1 -0
- package/dist/src/storage/A_Concept.storage.js +2 -2
- package/dist/src/storage/A_Concept.storage.js.map +1 -1
- package/dist/src/storage/A_Container.storage.d.ts +8 -0
- package/dist/src/storage/A_Container.storage.js +17 -0
- package/dist/src/storage/A_Container.storage.js.map +1 -0
- package/dist/src/storage/A_Inject.storage.d.ts +9 -0
- package/dist/src/storage/A_Inject.storage.js +13 -0
- package/dist/src/storage/A_Inject.storage.js.map +1 -0
- package/examples/simple/components/A.component.ts +35 -0
- package/examples/simple/components/B.component.ts +46 -0
- package/examples/simple/concept.ts +49 -12
- package/examples/simple/containers/Main.container.ts +47 -0
- package/examples/simple/context/Fragment_A.context.ts +25 -0
- package/examples/simple/context/Fragment_B.context.ts +19 -0
- package/examples/simple-http-server/components/http-error-handler.component.ts +44 -0
- package/examples/simple-http-server/components/http-request-handler.component.ts +9 -0
- package/examples/simple-http-server/concept.ts +22 -21
- package/examples/simple-http-server/containers/http-server.container.ts +23 -38
- package/examples/simple-http-server/contexts/http-request.context.ts +59 -0
- package/examples/simple-http-server/contexts/http-server.context.types.ts +0 -108
- package/examples/simple-http-server/test.ts +290 -0
- package/index.ts +53 -22
- package/jest.config.ts +1 -3
- package/package.json +4 -7
- package/src/{containers → base}/A-Config/A-Config.container.ts +21 -20
- package/src/{containers/A-Config/A-Config.namespace.ts → base/A-Config/A-Config.context.ts} +12 -5
- package/src/{containers → base}/A-Config/A-Config.types.ts +15 -4
- package/src/{containers → base}/A-Config/components/ConfigReader.component.ts +7 -3
- package/src/{containers → base}/A-Config/components/ENVConfigReader.component.ts +1 -1
- package/src/{containers → base}/A-Config/components/FileConfigReader.component.ts +1 -1
- package/src/base/A-Errors/A-Errors.component.ts +102 -0
- package/src/{containers/A-Errors/A-Errors.namespace.ts → base/A-Errors/A-Errors.context.ts} +24 -39
- package/src/{containers → base}/A-Errors/A-Errors.types.ts +2 -2
- package/src/base/A-Logger/A-Logger.component.ts +169 -0
- package/src/base/A-Logger/A-Logger.types.ts +0 -0
- package/src/constants/A_ConceptLifecycle.constants.ts +9 -9
- package/src/decorators/A-Feature/A-Feature-Define.decorator.ts +57 -0
- package/src/decorators/A-Feature/A-Feature-Extend.decorator.ts +57 -0
- package/src/decorators/A-Feature/A-Feature.decorator.types.ts +56 -0
- package/src/decorators/A-Inject/A-Inject.decorator.ts +64 -53
- package/src/decorators/A-Inject/A-Inject.decorator.types.ts +31 -4
- package/src/decorators/A-Stage/A-Stage.decorator.ts +57 -0
- package/src/decorators/A-Stage/A-Stage.decorator.types.ts +23 -0
- package/src/global/A-Channel/A-Channel.class.ts +48 -0
- package/src/global/A-Channel/A-Channel.types.ts +60 -0
- package/src/global/A-Component/A-Component.class.ts +1 -29
- package/src/global/A-Component/A-Component.meta.ts +9 -0
- package/src/global/A-Component/A-Component.types.ts +40 -0
- package/src/global/A-Concept/A_Concept.class.ts +160 -66
- package/src/global/A-Concept/A_Concept.meta.ts +9 -0
- package/src/global/A-Concept/A_Concept.types.ts +45 -10
- package/src/global/A-Container/A-Container.class.ts +172 -22
- package/src/global/A-Container/A-Container.meta.ts +80 -0
- package/src/global/A-Container/A-Container.types.ts +40 -0
- package/src/global/A-Context/A-Context.class.ts +233 -130
- package/src/global/A-Context/A-Context.types.ts +15 -0
- package/src/global/A-Dependency/A-DependencyReference.class.ts +61 -61
- package/src/global/A-Dependency/A-DependencyReference.types.ts +56 -56
- package/src/global/A-Entity/A-Entity.class.ts +141 -0
- package/src/global/A-Entity/A-Entity.types.ts +17 -0
- package/src/global/A-Feature/A-Feature.class.ts +156 -0
- package/src/global/A-Feature/A-Feature.types.ts +20 -0
- package/src/global/{A-Namespace/A_Namespace.class.ts → A-Fragment/A-Fragment.class.ts} +24 -30
- package/src/global/A-Fragment/A-Fragment.types.ts +6 -0
- package/src/global/A-Meta/A-Meta.class.ts +96 -0
- package/src/global/A-Meta/A-Meta.types.ts +0 -0
- package/src/global/A-Scope/A-Scope.class.ts +211 -0
- package/src/global/A-Scope/A-Scope.types.ts +37 -0
- package/tsconfig.json +1 -3
- package/examples/sdk/concept.ts +0 -24
- package/examples/sdk/orders.api.ts +0 -21
- package/examples/sdk/users.api.ts +0 -21
- package/examples/simple-http-server/containers/http-server.controller.ts +0 -24
- package/examples/simple-http-server/containers/http-server.router.ts +0 -23
- package/examples/simple-http-server/contexts/http-server.namespace.ts +0 -36
- package/src/containers/A-Errors/A-Errors.container.ts +0 -14
- package/src/containers/A-Logger/A-Logger.container.ts +0 -22
- package/src/containers/A-Logger/A-Logger.namespace.ts +0 -26
- package/src/containers/A-Logger/components/Logger.component.ts +0 -169
- package/src/decorators/A-ConceptLifecycle/A-ConceptLifecycle.decorator.types.ts +0 -46
- package/src/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator.ts +0 -55
- package/src/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator.types.ts +0 -20
- package/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.ts +0 -62
- package/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.types.ts +0 -28
- package/src/decorators/A-ConceptLifecycle/index.ts +0 -9
- package/src/decorators/A-Feature/A-Feature.decorator.ts +0 -13
- package/src/decorators/A_Lazy.decorator.ts +0 -31
- package/src/global/A-Namespace/A_Namespace.types.ts +0 -24
- package/src/storage/A_Concept.storage.ts +0 -45
- /package/{src/containers/A-Logger/A-Logger.types.ts → dist/src/base/A-Logger/A-Logger.types.d.ts} +0 -0
- /package/{src/decorators/A_ConceptMethods.decorator.ts → dist/src/global/A-Meta/A-Meta.types.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorators/A-Define/index.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AACxD,yEAA8D;AAQjD,QAAA,QAAQ,GAAc;IAC/B,SAAS,EAAE,iCAAW;IACtB,OAAO,EAAE,6BAAS;CACrB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { A_TYPES__A_ExtendDecoratorConfig, A_TYPES__A_ExtendDecoratorDescriptor } from "./A-Extend.decorator.types";
|
|
2
|
+
import { A_Component } from "../../global/A-Component/A-Component.class";
|
|
3
|
+
/**
|
|
4
|
+
* A-Extend decorator
|
|
5
|
+
*
|
|
6
|
+
* This decorator allows to define a custom Extend stage for the Container.
|
|
7
|
+
* These stages are executed in a container-specific order and can be extended by components that are injected into the container.
|
|
8
|
+
* This approach allows to create a flexible and extendable architecture for the application.
|
|
9
|
+
*
|
|
10
|
+
* The main difference between the A-Extend and A-Extend decorators is that A-Extend methods can be inherited and overridden by child classes.
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* @param params
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function A_Extend(config?: Partial<A_TYPES__A_ExtendDecoratorConfig>): (target: A_Component | {
|
|
17
|
+
new (...args: any[]): any;
|
|
18
|
+
}, propertyKey: string, descriptor: A_TYPES__A_ExtendDecoratorDescriptor) => void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.A_Extend = A_Extend;
|
|
4
|
+
const A_Component_storage_1 = require("../../storage/A_Component.storage");
|
|
5
|
+
/**
|
|
6
|
+
* A-Extend decorator
|
|
7
|
+
*
|
|
8
|
+
* This decorator allows to define a custom Extend stage for the Container.
|
|
9
|
+
* These stages are executed in a container-specific order and can be extended by components that are injected into the container.
|
|
10
|
+
* This approach allows to create a flexible and extendable architecture for the application.
|
|
11
|
+
*
|
|
12
|
+
* The main difference between the A-Extend and A-Extend decorators is that A-Extend methods can be inherited and overridden by child classes.
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* @param params
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
function A_Extend(config = {}) {
|
|
19
|
+
return function (target, propertyKey, descriptor) {
|
|
20
|
+
const existedMeta = A_Component_storage_1.A_COMPONENT_Storage.get(target.constructor) || new Map();
|
|
21
|
+
const inheritMeta = A_Component_storage_1.A_COMPONENT_Storage.get(Object.getPrototypeOf(target.constructor)) || new Map();
|
|
22
|
+
const inheritedExtension = inheritMeta.get(A_Component_storage_1.A_COMPONENT_STORAGE__Definition__Extensions) || new Map();
|
|
23
|
+
const extensionDefinition = existedMeta.get(A_Component_storage_1.A_COMPONENT_STORAGE__Definition__Extensions) || new Map(inheritedExtension);
|
|
24
|
+
extensionDefinition.set(propertyKey, {
|
|
25
|
+
name: config.name || propertyKey,
|
|
26
|
+
handler: propertyKey,
|
|
27
|
+
container: config.container
|
|
28
|
+
? typeof config.container === 'string'
|
|
29
|
+
? config.container
|
|
30
|
+
: config.container.name
|
|
31
|
+
: '*',
|
|
32
|
+
});
|
|
33
|
+
existedMeta.set(A_Component_storage_1.A_COMPONENT_STORAGE__Definition__Extensions, extensionDefinition);
|
|
34
|
+
A_Component_storage_1.A_COMPONENT_Storage.set(target.constructor, existedMeta);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=A-Extend.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Extend.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Extend/A-Extend.decorator.ts"],"names":[],"mappings":";;AA0BA,4BA6BC;AA/CD,sFAAgI;AAKhI;;;;;;;;;;;;GAYG;AACH,SAAgB,QAAQ,CACpB,SAAoD,EAAE;IAEtD,OAAO,UACH,MAAkD,EAClD,WAAmB,EACnB,UAAgD;QAGhD,MAAM,WAAW,GAAG,yCAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC;QAC7E,MAAM,WAAW,GAAG,yCAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC;QAEpG,MAAM,kBAAkB,GAAG,WAAW,CAAC,GAAG,CAAC,iEAA2C,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC;QACrG,MAAM,mBAAmB,GAA8D,WAAW,CAAC,GAAG,CAAC,iEAA2C,CAAC,IAAI,IAAI,GAAG,CAAC,kBAAkB,CAAC,CAAA;QAElL,mBAAmB,CAAC,GAAG,CAAC,WAAW,EAAE;YACjC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,WAAW;YAChC,OAAO,EAAE,WAAW;YACpB,SAAS,EAAE,MAAM,CAAC,SAAS;gBACvB,CAAC,CAAC,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ;oBAClC,CAAC,CAAC,MAAM,CAAC,SAAS;oBAClB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI;gBAC3B,CAAC,CAAC,GAAG;SACZ,CAAC,CAAC;QAGH,WAAW,CAAC,GAAG,CAAC,iEAA2C,EAAE,mBAAmB,CAAC,CAAC;QAClF,yCAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAC7D,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { A_Container } from "../../global/A-Container/A-Container.class";
|
|
2
|
+
export type A_TYPES__A_ExtendDecoratorDescriptor = TypedPropertyDescriptor<() => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<() => Promise<any>>;
|
|
3
|
+
export type A_TYPES__A_ExtendDecoratorConfig = {
|
|
4
|
+
/**
|
|
5
|
+
* Name of the container Lifecycle method to be extended.
|
|
6
|
+
*
|
|
7
|
+
* [!] If not provided will be used the name of the method.
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* Container class or container name uses to identify the proper container in case when the name is not unique.
|
|
12
|
+
*
|
|
13
|
+
* [!] If not provided will be applied to all containers with the same name.
|
|
14
|
+
*/
|
|
15
|
+
container: string | typeof A_Container;
|
|
16
|
+
};
|
|
17
|
+
export type A_TYPES__A_ExtendDecoratorStorageInstruction = {
|
|
18
|
+
name: string;
|
|
19
|
+
container: string;
|
|
20
|
+
handler: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Extend.decorator.types.js","sourceRoot":"","sources":["../../../../src/decorators/A-Extend/A-Extend.decorator.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { A_TYPES__A_FeatureDecoratorConfig, A_TYPES__A_FeatureDecoratorDescriptor } from "./A-Feature.decorator.types";
|
|
2
|
+
import { A_Container } from "../../global/A-Container/A-Container.class";
|
|
3
|
+
/**
|
|
4
|
+
* A-Feature decorator
|
|
5
|
+
*
|
|
6
|
+
* This decorator allows to define a custom lifecycle stage for the Container.
|
|
7
|
+
* These stages are executed in a container-specific order and can be extended by components that are injected into the container.
|
|
8
|
+
* This approach allows to create a flexible and extendable architecture for the application.
|
|
9
|
+
*
|
|
10
|
+
* The main difference between the A-Feature and A-Feature decorators is that A-Feature methods can be inherited and overridden by child classes.
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* @param params
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function A_Feature_Define(config?: Partial<A_TYPES__A_FeatureDecoratorConfig>): (target: A_Container<any>, propertyKey: string, descriptor: A_TYPES__A_FeatureDecoratorDescriptor) => void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.A_Feature_Define = A_Feature_Define;
|
|
4
|
+
const A_Container_types_1 = require("../../global/A-Container/A-Container.types");
|
|
5
|
+
const A_Context_class_1 = require("../../global/A-Context/A-Context.class");
|
|
6
|
+
/**
|
|
7
|
+
* A-Feature decorator
|
|
8
|
+
*
|
|
9
|
+
* This decorator allows to define a custom lifecycle stage for the Container.
|
|
10
|
+
* These stages are executed in a container-specific order and can be extended by components that are injected into the container.
|
|
11
|
+
* This approach allows to create a flexible and extendable architecture for the application.
|
|
12
|
+
*
|
|
13
|
+
* The main difference between the A-Feature and A-Feature decorators is that A-Feature methods can be inherited and overridden by child classes.
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
* @param params
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
function A_Feature_Define(config = {}) {
|
|
20
|
+
return function (target, propertyKey, descriptor) {
|
|
21
|
+
// Get the existed metadata or create a new one
|
|
22
|
+
const existedMeta = A_Context_class_1.A_Context
|
|
23
|
+
.meta(target)
|
|
24
|
+
.get(A_Container_types_1.A_TYPES__ContainerMetaKey.FEATURES)
|
|
25
|
+
|| new Map();
|
|
26
|
+
// Set the metadata of the method to define a custom Feature with name
|
|
27
|
+
existedMeta.set(propertyKey, {
|
|
28
|
+
handler: propertyKey,
|
|
29
|
+
config: Object.assign(Object.assign({}, config), { name: `${target.constructor.name}.${propertyKey || config.name}` })
|
|
30
|
+
});
|
|
31
|
+
// Update the metadata of the container with the new Feature definition
|
|
32
|
+
A_Context_class_1.A_Context
|
|
33
|
+
.meta(target)
|
|
34
|
+
.set(A_Container_types_1.A_TYPES__ContainerMetaKey.FEATURES, existedMeta);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=A-Feature-Define.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Feature-Define.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Feature/A-Feature-Define.decorator.ts"],"names":[],"mappings":";;AAsBA,4CAkCC;AAnDD,6FAAkG;AAClG,uFAA8E;AAG9E;;;;;;;;;;;;GAYG;AACH,SAAgB,gBAAgB,CAC5B,SAAqD,EAAE;IAEvD,OAAO,UACH,MAAwB,EACxB,WAAmB,EACnB,UAAiD;QAGjD,+CAA+C;QAC/C,MAAM,WAAW,GAAG,2BAAS;aACxB,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CAAC,6CAAyB,CAAC,QAAQ,CAAC;eACrC,IAAI,GAAG,EAAE,CAAC;QAIjB,uEAAuE;QACvE,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE;YACzB,OAAO,EAAE,WAAW;YACpB,MAAM,kCACC,MAAM,KACT,IAAI,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,WAAW,IAAI,MAAM,CAAC,IAAI,EAAE,GACnE;SACJ,CAAC,CAAC;QAEH,wEAAwE;QACxE,2BAAS;aACJ,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CACA,6CAAyB,CAAC,QAAQ,EAClC,WAAW,CACd,CAAC;IACV,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { A_Component } from "../../global/A-Component/A-Component.class";
|
|
2
|
+
import { A_TYPES__A_ExtendDecoratorConfig, A_TYPES__A_ExtendDecoratorDescriptor } from "./A-Feature.decorator.types";
|
|
3
|
+
/**
|
|
4
|
+
* A-Extend decorator
|
|
5
|
+
*
|
|
6
|
+
* This decorator allows to define a custom Extend stage for the Container.
|
|
7
|
+
* These stages are executed in a container-specific order and can be extended by components that are injected into the container.
|
|
8
|
+
* This approach allows to create a flexible and extendable architecture for the application.
|
|
9
|
+
*
|
|
10
|
+
* The main difference between the A-Extend and A-Extend decorators is that A-Extend methods can be inherited and overridden by child classes.
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* @param params
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function A_Feature_Extend(config?: Partial<A_TYPES__A_ExtendDecoratorConfig>): (target: A_Component, propertyKey: string, descriptor: A_TYPES__A_ExtendDecoratorDescriptor) => void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.A_Feature_Extend = A_Feature_Extend;
|
|
4
|
+
const A_Component_types_1 = require("../../global/A-Component/A-Component.types");
|
|
5
|
+
const A_Context_class_1 = require("../../global/A-Context/A-Context.class");
|
|
6
|
+
/**
|
|
7
|
+
* A-Extend decorator
|
|
8
|
+
*
|
|
9
|
+
* This decorator allows to define a custom Extend stage for the Container.
|
|
10
|
+
* These stages are executed in a container-specific order and can be extended by components that are injected into the container.
|
|
11
|
+
* This approach allows to create a flexible and extendable architecture for the application.
|
|
12
|
+
*
|
|
13
|
+
* The main difference between the A-Extend and A-Extend decorators is that A-Extend methods can be inherited and overridden by child classes.
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
* @param params
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
function A_Feature_Extend(config = {}) {
|
|
20
|
+
return function (target, propertyKey, descriptor) {
|
|
21
|
+
// Get the existed metadata or create a new one
|
|
22
|
+
const existedMeta = A_Context_class_1.A_Context
|
|
23
|
+
.meta(target)
|
|
24
|
+
.get(A_Component_types_1.A_TYPES__ComponentMetaKey.EXTENSIONS)
|
|
25
|
+
|| new Map();
|
|
26
|
+
// Set the metadata of the method to define a custom Feature with name
|
|
27
|
+
existedMeta.set(propertyKey, {
|
|
28
|
+
name: config.name || propertyKey,
|
|
29
|
+
handler: propertyKey,
|
|
30
|
+
container: config.container
|
|
31
|
+
? typeof config.container === 'string'
|
|
32
|
+
? config.container
|
|
33
|
+
: config.container.name
|
|
34
|
+
: '*',
|
|
35
|
+
});
|
|
36
|
+
// Update the metadata of the container with the new Feature definition
|
|
37
|
+
A_Context_class_1.A_Context
|
|
38
|
+
.meta(target)
|
|
39
|
+
.set(A_Component_types_1.A_TYPES__ComponentMetaKey.EXTENSIONS, existedMeta);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=A-Feature-Extend.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Feature-Extend.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Feature/A-Feature-Extend.decorator.ts"],"names":[],"mappings":";;AAwBA,4CAgCC;AAnDD,6FAAkG;AAClG,uFAA8E;AAK9E;;;;;;;;;;;;GAYG;AACH,SAAgB,gBAAgB,CAC5B,SAAoD,EAAE;IAEtD,OAAO,UACH,MAAmB,EACnB,WAAmB,EACnB,UAAgD;QAGhD,+CAA+C;QAC/C,MAAM,WAAW,GAAG,2BAAS;aACxB,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC;eACvC,IAAI,GAAG,EAAE,CAAC;QAEjB,sEAAsE;QACtE,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE;YACzB,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,WAAW;YAChC,OAAO,EAAE,WAAW;YACpB,SAAS,EAAE,MAAM,CAAC,SAAS;gBACvB,CAAC,CAAC,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ;oBAClC,CAAC,CAAC,MAAM,CAAC,SAAS;oBAClB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI;gBAC3B,CAAC,CAAC,GAAG;SACZ,CAAC,CAAC;QAEH,wEAAwE;QACxE,2BAAS;aACJ,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CAAC,6CAAyB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAEhE,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { A_Container } from "../../global/A-Container/A-Container.class";
|
|
2
|
+
export type A_TYPES__A_FeatureDecoratorDescriptor = TypedPropertyDescriptor<() => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<() => Promise<any>>;
|
|
3
|
+
export type A_TYPES__A_FeatureDecoratorConfig = {
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
export type A_TYPES__A_ExtendDecoratorDescriptor = TypedPropertyDescriptor<() => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<() => Promise<any>>;
|
|
7
|
+
export type A_TYPES__A_ExtendDecoratorConfig = {
|
|
8
|
+
/**
|
|
9
|
+
* Name of the container Lifecycle method to be extended.
|
|
10
|
+
*
|
|
11
|
+
* [!] If not provided will be used the name of the method.
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Container class or container name uses to identify the proper container in case when the name is not unique.
|
|
16
|
+
*
|
|
17
|
+
* [!] If not provided will be applied to all containers with the same name.
|
|
18
|
+
*/
|
|
19
|
+
container: string | typeof A_Container<any>;
|
|
20
|
+
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { A_Namespace } from "../../global/A-Namespace/A_Namespace.class";
|
|
2
1
|
import { A_Component } from "../../global/A-Component/A-Component.class";
|
|
2
|
+
import { A_Container } from "../../global/A-Container/A-Container.class";
|
|
3
|
+
import { A_TYPES__A_InjectDecoratorReturn } from "./A-Inject.decorator.types";
|
|
4
|
+
import { A_Fragment } from "../../global/A-Fragment/A-Fragment.class";
|
|
5
|
+
import { A_Scope } from "../../global/A-Scope/A-Scope.class";
|
|
3
6
|
/**
|
|
4
7
|
* A-Inject decorator
|
|
5
8
|
*
|
|
@@ -11,12 +14,11 @@ import { A_Component } from "../../global/A-Component/A-Component.class";
|
|
|
11
14
|
* @param params
|
|
12
15
|
* @returns
|
|
13
16
|
*/
|
|
14
|
-
export declare function A_Inject
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export declare function A_Inject
|
|
21
|
-
|
|
22
|
-
}, T extends Array<E>>(namespaces: T): any;
|
|
17
|
+
export declare function A_Inject(scope: typeof A_Scope): A_TYPES__A_InjectDecoratorReturn;
|
|
18
|
+
export declare function A_Inject(component: typeof A_Component): A_TYPES__A_InjectDecoratorReturn;
|
|
19
|
+
export declare function A_Inject(component: {
|
|
20
|
+
new (...args: any[]): any;
|
|
21
|
+
}): A_TYPES__A_InjectDecoratorReturn;
|
|
22
|
+
export declare function A_Inject(container: typeof A_Container): A_TYPES__A_InjectDecoratorReturn;
|
|
23
|
+
export declare function A_Inject(fragment: typeof A_Fragment): A_TYPES__A_InjectDecoratorReturn;
|
|
24
|
+
export declare function A_Inject<T extends Array<typeof A_Fragment>>(fragments: T): A_TYPES__A_InjectDecoratorReturn;
|
|
@@ -1,32 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.A_Inject = A_Inject;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const A_Context_class_1 = require("../../global/A-Context/A-Context.class");
|
|
5
|
+
const A_Component_types_1 = require("../../global/A-Component/A-Component.types");
|
|
6
|
+
// ====================== BASE FUNCTION ======================
|
|
6
7
|
function A_Inject(param1) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// const resolvedNamespaces: Array<A_Namespace> = []
|
|
21
|
-
// for (const namespace of namespaces) {
|
|
22
|
-
// resolvedNamespaces.push(A_Context.resolve(namespace));
|
|
23
|
-
// }
|
|
24
|
-
// return function (
|
|
25
|
-
// target: T | E,
|
|
26
|
-
// propertyKey: string | symbol,
|
|
27
|
-
// parameterIndex: number
|
|
28
|
-
// ) {
|
|
29
|
-
// // It should be just register the parameter in method that will be resolved in the method
|
|
30
|
-
// }
|
|
8
|
+
return function (target, methodName, parameterIndex) {
|
|
9
|
+
const method = methodName ? methodName : 'constructor';
|
|
10
|
+
const existedMeta = A_Context_class_1.A_Context
|
|
11
|
+
.meta(target)
|
|
12
|
+
.get(A_Component_types_1.A_TYPES__ComponentMetaKey.INJECTIONS)
|
|
13
|
+
|| new Map();
|
|
14
|
+
const paramsArray = existedMeta.get(method) || [];
|
|
15
|
+
paramsArray[parameterIndex] = param1;
|
|
16
|
+
existedMeta.set(method, paramsArray);
|
|
17
|
+
A_Context_class_1.A_Context
|
|
18
|
+
.meta(target)
|
|
19
|
+
.set(A_Component_types_1.A_TYPES__ComponentMetaKey.INJECTIONS, existedMeta);
|
|
20
|
+
};
|
|
31
21
|
}
|
|
32
22
|
//# sourceMappingURL=A-Inject.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Inject.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Inject/A-Inject.decorator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"A-Inject.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Inject/A-Inject.decorator.ts"],"names":[],"mappings":";;AAoDA,4BAiCC;AAhFD,uFAA8E;AAC9E,6FAAkG;AA6ClG,8DAA8D;AAC9D,SAAgB,QAAQ,CAGpB,MAA2F;IAE3F,OAAO,UACH,MAAmB,EACnB,UAAuC,EACvC,cAAsB;QAGtB,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC;QAGvD,MAAM,WAAW,GAAG,2BAAS;aACxB,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC;eACvC,IAAI,GAAG,EAAE,CAAC;QAEjB,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAElD,WAAW,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC;QAErC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAGrC,2BAAS;aACJ,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CACA,6CAAyB,CAAC,UAAU,EACpC,WAAW,CACd,CAAA;IACT,CAAC,CAAA;AACL,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type A_TYPES__A_InjectDecoratorDescriptor = TypedPropertyDescriptor<(...args: any[]) => Promise<void>>;
|
|
2
|
-
export type
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export type A_TYPES__A_InjectDecoratorReturn<T = any> = (target: T, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
3
|
+
export type A_TYPES__A_InjectDecoratorStorageInstruction = Array<{
|
|
4
|
+
new (...args: any[]): any;
|
|
5
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { A_TYPES__A_StageDecoratorConfig, A_TYPES__A_StageDecoratorDescriptor } from "./A-Stage.decorator.types";
|
|
2
|
+
import { A_Container } from "../../global/A-Container/A-Container.class";
|
|
3
|
+
import { A_TYPES__ConceptStage } from "../../global/A-Concept/A_Concept.types";
|
|
4
|
+
/**
|
|
5
|
+
* A_Stage Decorator uses to extend basic A-Concept Stage methods inside Containers.
|
|
6
|
+
*
|
|
7
|
+
* Using this decorator you can define extend a logic and sequence of the Container Stage methods execution.
|
|
8
|
+
*
|
|
9
|
+
* @param params
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare function A_Stage(method: A_TYPES__ConceptStage): (config?: Partial<A_TYPES__A_StageDecoratorConfig>) => (target: A_Container<any>, propertyKey: string, descriptor: A_TYPES__A_StageDecoratorDescriptor) => void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.A_Stage = A_Stage;
|
|
4
|
+
const A_Context_class_1 = require("../../global/A-Context/A-Context.class");
|
|
5
|
+
const A_Container_types_1 = require("../../global/A-Container/A-Container.types");
|
|
6
|
+
/**
|
|
7
|
+
* A_Stage Decorator uses to extend basic A-Concept Stage methods inside Containers.
|
|
8
|
+
*
|
|
9
|
+
* Using this decorator you can define extend a logic and sequence of the Container Stage methods execution.
|
|
10
|
+
*
|
|
11
|
+
* @param params
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
function A_Stage(method) {
|
|
15
|
+
return function A_Stage(config = {}) {
|
|
16
|
+
return function (target, propertyKey, descriptor) {
|
|
17
|
+
// Get the existed metadata or create a new one
|
|
18
|
+
const existedMeta = A_Context_class_1.A_Context
|
|
19
|
+
.meta(target)
|
|
20
|
+
.get(A_Container_types_1.A_TYPES__ContainerMetaKey.STAGES)
|
|
21
|
+
|| new Map();
|
|
22
|
+
// Set the metadata of the method to define a custom Stage with name
|
|
23
|
+
existedMeta
|
|
24
|
+
.set(propertyKey, {
|
|
25
|
+
name: method,
|
|
26
|
+
handler: propertyKey,
|
|
27
|
+
});
|
|
28
|
+
// Update the metadata of the container with the new Stage definition
|
|
29
|
+
A_Context_class_1.A_Context
|
|
30
|
+
.meta(target)
|
|
31
|
+
.set(A_Container_types_1.A_TYPES__ContainerMetaKey.STAGES, existedMeta);
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=A-Stage.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Stage.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Stage/A-Stage.decorator.ts"],"names":[],"mappings":";;AAsBA,0BAkCC;AAlDD,uFAA8E;AAE9E,6FAAkG;AAMlG;;;;;;;GAOG;AACH,SAAgB,OAAO,CACnB,MAA6B;IAI7B,OAAO,SAAS,OAAO,CACnB,SAAmD,EAAE;QAErD,OAAO,UACH,MAAwB,EACxB,WAAmB,EACnB,UAA+C;YAG/C,+CAA+C;YAC/C,MAAM,WAAW,GAAG,2BAAS;iBACxB,IAAI,CAAC,MAAM,CAAC;iBACZ,GAAG,CAAC,6CAAyB,CAAC,MAAM,CAAC;mBACnC,IAAI,GAAG,EAAE,CAAC;YAEjB,oEAAoE;YACpE,WAAW;iBACN,GAAG,CAAC,WAAW,EAAE;gBACd,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,WAAW;aACvB,CAAC,CAAC;YAEP,sEAAsE;YACtE,2BAAS;iBACJ,IAAI,CAAC,MAAM,CAAC;iBACZ,GAAG,CAAC,6CAAyB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAE5D,CAAC,CAAC;IACN,CAAC,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type A_TYPES__A_StageDecoratorDescriptor = TypedPropertyDescriptor<() => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<() => Promise<any>>;
|
|
2
|
+
export type A_TYPES__A_StageDecoratorConfig = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Stage.decorator.types.js","sourceRoot":"","sources":["../../../../src/decorators/A-Stage/A-Stage.decorator.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A_Channel is an abstraction over any Communication Type from event emitters to message queues, HTTP requests, etc.
|
|
3
|
+
*
|
|
4
|
+
* A_Channel uses to connect Containers between each other. When
|
|
5
|
+
* When One container needs to communicate with another container, it uses A_Channel.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export declare class A_Channel<T> {
|
|
9
|
+
private realClass;
|
|
10
|
+
private args;
|
|
11
|
+
private proxyInstance;
|
|
12
|
+
private realInstance;
|
|
13
|
+
constructor(realClass: {
|
|
14
|
+
new (...args: any[]): T;
|
|
15
|
+
}, args: any[]);
|
|
16
|
+
protected loadInstance(): Promise<T>;
|
|
17
|
+
resolve(): Promise<T>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.A_Channel = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* A_Channel is an abstraction over any Communication Type from event emitters to message queues, HTTP requests, etc.
|
|
15
|
+
*
|
|
16
|
+
* A_Channel uses to connect Containers between each other. When
|
|
17
|
+
* When One container needs to communicate with another container, it uses A_Channel.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
class A_Channel {
|
|
21
|
+
constructor(realClass, args) {
|
|
22
|
+
this.realClass = realClass;
|
|
23
|
+
this.args = args;
|
|
24
|
+
this.proxyInstance = null;
|
|
25
|
+
this.realInstance = null;
|
|
26
|
+
}
|
|
27
|
+
loadInstance() {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
if (!this.realInstance)
|
|
30
|
+
this.realInstance = new this.realClass(...this.args);
|
|
31
|
+
return this.realInstance;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
resolve() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
if (!this.proxyInstance) {
|
|
37
|
+
const realInstance = yield this.loadInstance();
|
|
38
|
+
this.proxyInstance = new Proxy({}, {
|
|
39
|
+
get: (target, prop) => {
|
|
40
|
+
const value = realInstance[prop];
|
|
41
|
+
// If the property is a method, return a bound function
|
|
42
|
+
if (typeof value === 'function') {
|
|
43
|
+
return value.bind(realInstance);
|
|
44
|
+
}
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return this.proxyInstance;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.A_Channel = A_Channel;
|
|
54
|
+
//# sourceMappingURL=A-Channel.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Channel.class.js","sourceRoot":"","sources":["../../../../src/global/A-Channel/A-Channel.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA;;;;;;GAMG;AACH,MAAa,SAAS;IAIlB,YACY,SAAqC,EACrC,IAAW;QADX,cAAS,GAAT,SAAS,CAA4B;QACrC,SAAI,GAAJ,IAAI,CAAO;QALf,kBAAa,GAAa,IAAI,CAAC;QAC/B,iBAAY,GAAa,IAAI,CAAC;IAOtC,CAAC;IAEe,YAAY;;YACxB,IAAI,CAAC,IAAI,CAAC,YAAY;gBAClB,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;YAEzD,OAAO,IAAI,CAAC,YAAY,CAAC;QAC7B,CAAC;KAAA;IAGY,OAAO;;YAChB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;gBACtB,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;gBAE/C,IAAI,CAAC,aAAa,GAAG,IAAI,KAAK,CAAC,EAAE,EAAE;oBAC/B,GAAG,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;wBAClB,MAAM,KAAK,GAAI,YAAoB,CAAC,IAAI,CAAC,CAAC;wBAE1C,uDAAuD;wBACvD,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;4BAC9B,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;wBACpC,CAAC;wBACD,OAAO,KAAK,CAAC;oBACjB,CAAC;iBACJ,CAAM,CAAC;YACZ,CAAC;YAED,OAAO,IAAI,CAAC,aAAa,CAAC;QAC9B,CAAC;KAAA;CACJ;AAtCD,8BAsCC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type A_TYPES__A_DependencyReferenceConstructor = {
|
|
2
|
+
/**
|
|
3
|
+
* The name of the dependency
|
|
4
|
+
*/
|
|
5
|
+
name: string;
|
|
6
|
+
/**
|
|
7
|
+
* The version of the module
|
|
8
|
+
* By default it is 1.0.0
|
|
9
|
+
*/
|
|
10
|
+
version: string;
|
|
11
|
+
};
|
|
12
|
+
export type A_TYPES__A_DependencyReferenceConstructorConfig = {
|
|
13
|
+
/**
|
|
14
|
+
* Sync - blocks A-Express Application initialization until module is ready
|
|
15
|
+
* Async - allows to initialize module after A-Express Application initialization
|
|
16
|
+
*/
|
|
17
|
+
behavior: 'async' | 'sync';
|
|
18
|
+
/**
|
|
19
|
+
* Allows to define a scheme of retries
|
|
20
|
+
*/
|
|
21
|
+
retries: {
|
|
22
|
+
/**
|
|
23
|
+
* The number of retries
|
|
24
|
+
* Default is 3
|
|
25
|
+
*/
|
|
26
|
+
n: number;
|
|
27
|
+
/**
|
|
28
|
+
* The timeout between retries
|
|
29
|
+
* Multiplied by the number of retries
|
|
30
|
+
* So after each retry the timeout is increased e.g. 1000ms * 1, 1000ms * 2, 1000ms * 3
|
|
31
|
+
* Default is 1000
|
|
32
|
+
*/
|
|
33
|
+
timeout: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Channel.types.js","sourceRoot":"","sources":["../../../../src/global/A-Channel/A-Channel.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import { A_Namespace } from "../A-Namespace/A_Namespace.class";
|
|
2
1
|
/**
|
|
3
2
|
* This element only contains the specific code
|
|
4
3
|
*
|
|
5
4
|
*/
|
|
6
|
-
export declare class A_Component
|
|
7
|
-
/**
|
|
8
|
-
* Primary context that impacts the component behavior
|
|
9
|
-
*/
|
|
10
|
-
protected namespace: A_Namespace;
|
|
11
|
-
constructor(
|
|
12
|
-
/**
|
|
13
|
-
* Primary context that impacts the component behavior
|
|
14
|
-
*/
|
|
15
|
-
namespace: A_Namespace);
|
|
5
|
+
export declare class A_Component {
|
|
16
6
|
}
|
|
@@ -6,13 +6,6 @@ exports.A_Component = void 0;
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
class A_Component {
|
|
9
|
-
constructor(
|
|
10
|
-
/**
|
|
11
|
-
* Primary context that impacts the component behavior
|
|
12
|
-
*/
|
|
13
|
-
namespace) {
|
|
14
|
-
this.namespace = namespace;
|
|
15
|
-
}
|
|
16
9
|
}
|
|
17
10
|
exports.A_Component = A_Component;
|
|
18
11
|
//# sourceMappingURL=A-Component.class.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Component.class.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.class.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"A-Component.class.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.class.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAa,WAAW;CAAI;AAA5B,kCAA4B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.A_ComponentMeta = void 0;
|
|
4
|
+
const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
|
|
5
|
+
class A_ComponentMeta extends A_Meta_class_1.A_Meta {
|
|
6
|
+
}
|
|
7
|
+
exports.A_ComponentMeta = A_ComponentMeta;
|
|
8
|
+
//# sourceMappingURL=A-Component.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Component.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.meta.ts"],"names":[],"mappings":";;;AAAA,yDAAgD;AAIhD,MAAa,eAAgB,SAAQ,qBAA8B;CAIlE;AAJD,0CAIC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type A_TYPES__ComponentMeta = {
|
|
2
|
+
[A_TYPES__ComponentMetaKey.EXTENSIONS]: Map<string, A_TYPES__ComponentMeta_ExtensionItem>;
|
|
3
|
+
[A_TYPES__ComponentMetaKey.FEATURES]: any[];
|
|
4
|
+
[A_TYPES__ComponentMetaKey.INJECTIONS]: Map<Symbol | string, A_TYPES__ComponentMeta_InjectionParams>;
|
|
5
|
+
};
|
|
6
|
+
export declare enum A_TYPES__ComponentMetaKey {
|
|
7
|
+
EXTENSIONS = "a-component-extensions",
|
|
8
|
+
FEATURES = "a-component-features",
|
|
9
|
+
INJECTIONS = "a-component-injections"
|
|
10
|
+
}
|
|
11
|
+
export type A_TYPES__ComponentMeta_ExtensionItem = {
|
|
12
|
+
name: string;
|
|
13
|
+
container: string;
|
|
14
|
+
handler: string;
|
|
15
|
+
};
|
|
16
|
+
export type A_TYPES__ComponentMeta_InjectionParams = Array<{
|
|
17
|
+
new (...args: any[]): any;
|
|
18
|
+
}>;
|