@adaas/a-concept 0.0.3 → 0.0.4
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 +64 -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 +25 -19
- package/dist/index.js +55 -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 +14 -0
- package/dist/src/base/A-Config/A-Config.types.js +3 -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 +36 -54
- package/dist/src/global/A-Context/A-Context.class.js +127 -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.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 +10 -0
- package/dist/src/global/A-Entity/A-Entity.class.js +16 -0
- package/dist/src/global/A-Entity/A-Entity.class.js.map +1 -0
- package/dist/src/global/A-Entity/A-Entity.types.js +2 -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 +11 -0
- package/dist/src/global/A-Meta/A-Meta.class.js +43 -0
- package/dist/src/global/A-Meta/A-Meta.class.js.map +1 -0
- package/dist/src/global/A-Meta/A-Meta.types.d.ts +0 -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 +133 -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 +41 -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 +50 -22
- package/jest.config.ts +2 -0
- 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 +10 -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 +65 -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 +177 -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 +231 -130
- package/src/global/A-Context/A-Context.types.ts +15 -0
- package/src/global/A-Dependency/A-DependencyReference.types.ts +56 -56
- package/src/global/A-Entity/A-Entity.class.ts +16 -0
- package/src/global/A-Entity/A-Entity.types.ts +0 -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 +60 -0
- package/src/global/A-Meta/A-Meta.types.ts +0 -0
- package/src/global/A-Scope/A-Scope.class.ts +208 -0
- package/src/global/A-Scope/A-Scope.types.ts +37 -0
- package/src/storage/A_Component.storage.ts +28 -0
- package/src/storage/A_Concept.storage.ts +5 -1
- package/src/storage/A_Container.storage.ts +21 -0
- package/src/storage/A_Inject.storage.ts +30 -0
- package/tsconfig.json +3 -1
- 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/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-Entity/A-Entity.types.d.ts} +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { A_Component } from "@adaas/a-concept/global/A-Component/A-Component.class";
|
|
2
|
+
import {
|
|
3
|
+
A_TYPES__A_ExtendDecoratorConfig,
|
|
4
|
+
A_TYPES__A_ExtendDecoratorDescriptor,
|
|
5
|
+
} from "./A-Feature.decorator.types";
|
|
6
|
+
import { A_TYPES__ComponentMetaKey } from "@adaas/a-concept/global/A-Component/A-Component.types";
|
|
7
|
+
import { A_Context } from "@adaas/a-concept/global/A-Context/A-Context.class";
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A-Extend decorator
|
|
14
|
+
*
|
|
15
|
+
* This decorator allows to define a custom Extend stage for the Container.
|
|
16
|
+
* These stages are executed in a container-specific order and can be extended by components that are injected into the container.
|
|
17
|
+
* This approach allows to create a flexible and extendable architecture for the application.
|
|
18
|
+
*
|
|
19
|
+
* The main difference between the A-Extend and A-Extend decorators is that A-Extend methods can be inherited and overridden by child classes.
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* @param params
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
export function A_Feature_Extend(
|
|
26
|
+
config: Partial<A_TYPES__A_ExtendDecoratorConfig> = {}
|
|
27
|
+
) {
|
|
28
|
+
return function (
|
|
29
|
+
target: A_Component,
|
|
30
|
+
propertyKey: string,
|
|
31
|
+
descriptor: A_TYPES__A_ExtendDecoratorDescriptor
|
|
32
|
+
) {
|
|
33
|
+
|
|
34
|
+
// Get the existed metadata or create a new one
|
|
35
|
+
const existedMeta = A_Context
|
|
36
|
+
.meta(target)
|
|
37
|
+
.get(A_TYPES__ComponentMetaKey.EXTENSIONS)
|
|
38
|
+
|| new Map();
|
|
39
|
+
|
|
40
|
+
// Set the metadata of the method to define a custom Feature with name
|
|
41
|
+
existedMeta.set(propertyKey, {
|
|
42
|
+
name: config.name || propertyKey,
|
|
43
|
+
handler: propertyKey,
|
|
44
|
+
container: config.container
|
|
45
|
+
? typeof config.container === 'string'
|
|
46
|
+
? config.container
|
|
47
|
+
: config.container.name
|
|
48
|
+
: '*',
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// Update the metadata of the container with the new Feature definition
|
|
52
|
+
A_Context
|
|
53
|
+
.meta(target)
|
|
54
|
+
.set(A_TYPES__ComponentMetaKey.EXTENSIONS, existedMeta);
|
|
55
|
+
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { A_Container } from "@adaas/a-concept/global/A-Container/A-Container.class"
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export type A_TYPES__A_FeatureDecoratorDescriptor =
|
|
5
|
+
|
|
6
|
+
TypedPropertyDescriptor<() => any>
|
|
7
|
+
|
|
|
8
|
+
TypedPropertyDescriptor<(
|
|
9
|
+
...args: any[]
|
|
10
|
+
) => any>
|
|
11
|
+
|
|
|
12
|
+
TypedPropertyDescriptor<(
|
|
13
|
+
...args: any[]
|
|
14
|
+
) => Promise<any>>
|
|
15
|
+
|
|
|
16
|
+
TypedPropertyDescriptor<() => Promise<any>>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export type A_TYPES__A_FeatureDecoratorConfig = {
|
|
20
|
+
name: string,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export type A_TYPES__A_ExtendDecoratorDescriptor =
|
|
26
|
+
|
|
27
|
+
TypedPropertyDescriptor<() => any>
|
|
28
|
+
|
|
|
29
|
+
TypedPropertyDescriptor<(
|
|
30
|
+
...args: any[]
|
|
31
|
+
) => any>
|
|
32
|
+
|
|
|
33
|
+
TypedPropertyDescriptor<(
|
|
34
|
+
...args: any[]
|
|
35
|
+
) => Promise<any>>
|
|
36
|
+
|
|
|
37
|
+
TypedPropertyDescriptor<() => Promise<any>>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
export type A_TYPES__A_ExtendDecoratorConfig = {
|
|
41
|
+
/**
|
|
42
|
+
* Name of the container Lifecycle method to be extended.
|
|
43
|
+
*
|
|
44
|
+
* [!] If not provided will be used the name of the method.
|
|
45
|
+
*/
|
|
46
|
+
name: string,
|
|
47
|
+
/**
|
|
48
|
+
* Container class or container name uses to identify the proper container in case when the name is not unique.
|
|
49
|
+
*
|
|
50
|
+
* [!] If not provided will be applied to all containers with the same name.
|
|
51
|
+
*/
|
|
52
|
+
container: string | typeof A_Container<any>
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import { A_Namespace } from "@adaas/a-concept/global/A-Namespace/A_Namespace.class";
|
|
2
|
-
import { A_Context } from "@adaas/a-concept/global/A-Context/A-Context.class";
|
|
3
1
|
import { A_Component } from "@adaas/a-concept/global/A-Component/A-Component.class";
|
|
2
|
+
import { A_Container } from "@adaas/a-concept/global/A-Container/A-Container.class";
|
|
3
|
+
import { A_TYPES__A_InjectDecoratorReturn, A_TYPES__A_InjectDecoratorStorageInstruction } from "./A-Inject.decorator.types";
|
|
4
|
+
import { A_STORAGE__A_Inject_Instructions } from "@adaas/a-concept/storage/A_Inject.storage";
|
|
5
|
+
import { A_Fragment } from "@adaas/a-concept/global/A-Fragment/A-Fragment.class";
|
|
6
|
+
import { A_Scope } from "@adaas/a-concept/global/A-Scope/A-Scope.class";
|
|
7
|
+
import { A_Context } from "@adaas/a-concept/global/A-Context/A-Context.class";
|
|
8
|
+
import { A_TYPES__ComponentMetaKey } from "@adaas/a-concept/global/A-Component/A-Component.types";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
4
13
|
|
|
5
14
|
/**
|
|
6
15
|
* A-Inject decorator
|
|
@@ -13,63 +22,66 @@ import { A_Component } from "@adaas/a-concept/global/A-Component/A-Component.cla
|
|
|
13
22
|
* @param params
|
|
14
23
|
* @returns
|
|
15
24
|
*/
|
|
25
|
+
export function A_Inject(
|
|
26
|
+
scope: typeof A_Scope
|
|
27
|
+
): A_TYPES__A_InjectDecoratorReturn
|
|
28
|
+
|
|
29
|
+
export function A_Inject(
|
|
30
|
+
component: typeof A_Component
|
|
31
|
+
): A_TYPES__A_InjectDecoratorReturn
|
|
32
|
+
export function A_Inject(
|
|
33
|
+
component: { new(...args: any[]): any }
|
|
34
|
+
): A_TYPES__A_InjectDecoratorReturn
|
|
35
|
+
|
|
36
|
+
// Allows to inject just one container
|
|
37
|
+
export function A_Inject(
|
|
38
|
+
container: typeof A_Container
|
|
39
|
+
): A_TYPES__A_InjectDecoratorReturn
|
|
40
|
+
|
|
41
|
+
// Allows to inject just one Context Fragment
|
|
42
|
+
export function A_Inject(
|
|
43
|
+
fragment: typeof A_Fragment
|
|
44
|
+
): A_TYPES__A_InjectDecoratorReturn
|
|
45
|
+
|
|
46
|
+
// Allows to inject multiple Fragments
|
|
16
47
|
export function A_Inject<
|
|
17
|
-
T extends
|
|
18
|
-
>(
|
|
19
|
-
component: T
|
|
20
|
-
)
|
|
21
|
-
export function A_Inject<
|
|
22
|
-
T extends { new(...args: any[]): A_Namespace }
|
|
23
|
-
>(
|
|
24
|
-
namespace: T
|
|
25
|
-
)
|
|
26
|
-
export function A_Inject<
|
|
27
|
-
E extends { new(...args: any[]): A_Namespace },
|
|
28
|
-
T extends Array<E>
|
|
48
|
+
T extends Array<typeof A_Fragment>
|
|
29
49
|
>(
|
|
30
|
-
|
|
31
|
-
)
|
|
50
|
+
fragments: T
|
|
51
|
+
): A_TYPES__A_InjectDecoratorReturn
|
|
52
|
+
|
|
53
|
+
// ====================== BASE FUNCTION ======================
|
|
32
54
|
export function A_Inject<
|
|
33
|
-
|
|
34
|
-
K extends { new(...args: any[]): A_Component },
|
|
35
|
-
T extends Array<E>
|
|
55
|
+
T extends Array<typeof A_Fragment>
|
|
36
56
|
>(
|
|
37
|
-
param1: T |
|
|
38
|
-
) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
parameterIndex: number
|
|
45
|
-
) {
|
|
46
|
-
// It should be just register the parameter in method that will be resolved in the method
|
|
47
|
-
}
|
|
48
|
-
case param1 instanceof A_Namespace:
|
|
49
|
-
return function (
|
|
50
|
-
target: T,
|
|
51
|
-
propertyKey: string | symbol,
|
|
52
|
-
parameterIndex: number
|
|
53
|
-
) {
|
|
54
|
-
// It should be just register the parameter in method that will be resolved in the method
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
+
param1: T | typeof A_Fragment | typeof A_Component | typeof A_Container | typeof A_Fragment,
|
|
58
|
+
): A_TYPES__A_InjectDecoratorReturn {
|
|
59
|
+
return function (
|
|
60
|
+
target: A_Component,
|
|
61
|
+
methodName: string | symbol | undefined,
|
|
62
|
+
parameterIndex: number
|
|
63
|
+
) {
|
|
57
64
|
|
|
58
|
-
|
|
59
|
-
// ...(Array.isArray(param1) ? param1 : [param1])
|
|
60
|
-
// ];
|
|
65
|
+
const method = methodName ? methodName : 'constructor';
|
|
61
66
|
|
|
62
|
-
// const resolvedNamespaces: Array<A_Namespace> = []
|
|
63
67
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
const existedMeta = A_Context
|
|
69
|
+
.meta(target)
|
|
70
|
+
.get(A_TYPES__ComponentMetaKey.INJECTIONS)
|
|
71
|
+
|| new Map();
|
|
67
72
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
const paramsArray = existedMeta.get(method) || [];
|
|
74
|
+
|
|
75
|
+
paramsArray[parameterIndex] = param1;
|
|
76
|
+
|
|
77
|
+
existedMeta.set(method, paramsArray);
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
A_Context
|
|
81
|
+
.meta(target)
|
|
82
|
+
.set(
|
|
83
|
+
A_TYPES__ComponentMetaKey.INJECTIONS,
|
|
84
|
+
existedMeta
|
|
85
|
+
)
|
|
86
|
+
}
|
|
75
87
|
}
|
|
@@ -1,10 +1,37 @@
|
|
|
1
|
+
|
|
1
2
|
export type A_TYPES__A_InjectDecoratorDescriptor = TypedPropertyDescriptor<(
|
|
2
3
|
...args: any[]
|
|
3
4
|
) => Promise<void>>
|
|
4
5
|
|
|
5
6
|
|
|
7
|
+
export type A_TYPES__A_InjectDecoratorReturn<T = any> = (
|
|
8
|
+
target: T,
|
|
9
|
+
propertyKey: string | symbol | undefined,
|
|
10
|
+
parameterIndex: number
|
|
11
|
+
) => void
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
// export type A_TYPES__A_InjectDecoratorStorageInstruction = {
|
|
15
|
+
// index: number,
|
|
16
|
+
// type: typeof A_Namespace
|
|
17
|
+
// | typeof A_Component
|
|
18
|
+
// | typeof A_Container
|
|
19
|
+
// | typeof A_ContextFragment
|
|
20
|
+
// | Array<typeof A_Namespace>
|
|
21
|
+
// | Array<typeof A_Component>
|
|
22
|
+
// | Array<typeof A_Container>
|
|
23
|
+
// | Array<typeof A_ContextFragment>
|
|
24
|
+
// | { new(...args: any[]): any }
|
|
25
|
+
// }
|
|
6
26
|
|
|
7
|
-
export type A_TYPES__A_InjectDecoratorStorageInstruction =
|
|
8
|
-
|
|
9
|
-
//
|
|
10
|
-
|
|
27
|
+
export type A_TYPES__A_InjectDecoratorStorageInstruction = Array<
|
|
28
|
+
// typeof A_Namespace
|
|
29
|
+
// | typeof A_Component
|
|
30
|
+
// | typeof A_Container
|
|
31
|
+
// | typeof A_ContextFragment
|
|
32
|
+
// | Array<typeof A_Namespace>
|
|
33
|
+
// | Array<typeof A_Component>
|
|
34
|
+
// | Array<typeof A_Container>
|
|
35
|
+
// | Array<typeof A_ContextFragment>
|
|
36
|
+
| { new(...args: any[]): any }
|
|
37
|
+
>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { A_Component } from "@adaas/a-concept/global/A-Component/A-Component.class";
|
|
2
|
+
import {
|
|
3
|
+
A_TYPES__A_StageDecoratorConfig,
|
|
4
|
+
A_TYPES__A_StageDecoratorDescriptor,
|
|
5
|
+
} from "./A-Stage.decorator.types";
|
|
6
|
+
import { A_TYPES__ComponentMetaKey } from "@adaas/a-concept/global/A-Component/A-Component.types";
|
|
7
|
+
import { A_Context } from "@adaas/a-concept/global/A-Context/A-Context.class";
|
|
8
|
+
import { A_Container } from "@adaas/a-concept/global/A-Container/A-Container.class";
|
|
9
|
+
import { A_TYPES__ContainerMetaKey } from "@adaas/a-concept/global/A-Container/A-Container.types";
|
|
10
|
+
import { A_TYPES__ConceptStage } from "@adaas/a-concept/global/A-Concept/A_Concept.types";
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A_Stage Decorator uses to extend basic A-Concept Stage methods inside Containers.
|
|
17
|
+
*
|
|
18
|
+
* Using this decorator you can define extend a logic and sequence of the Container Stage methods execution.
|
|
19
|
+
*
|
|
20
|
+
* @param params
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
export function A_Stage(
|
|
24
|
+
method: A_TYPES__ConceptStage
|
|
25
|
+
) {
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
return function A_Stage(
|
|
29
|
+
config: Partial<A_TYPES__A_StageDecoratorConfig> = {}
|
|
30
|
+
) {
|
|
31
|
+
return function (
|
|
32
|
+
target: A_Container<any>,
|
|
33
|
+
propertyKey: string,
|
|
34
|
+
descriptor: A_TYPES__A_StageDecoratorDescriptor
|
|
35
|
+
) {
|
|
36
|
+
|
|
37
|
+
// Get the existed metadata or create a new one
|
|
38
|
+
const existedMeta = A_Context
|
|
39
|
+
.meta(target)
|
|
40
|
+
.get(A_TYPES__ContainerMetaKey.STAGES)
|
|
41
|
+
|| new Map();
|
|
42
|
+
|
|
43
|
+
// Set the metadata of the method to define a custom Stage with name
|
|
44
|
+
existedMeta
|
|
45
|
+
.set(propertyKey, {
|
|
46
|
+
name: method,
|
|
47
|
+
handler: propertyKey,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// Update the metadata of the container with the new Stage definition
|
|
51
|
+
A_Context
|
|
52
|
+
.meta(target)
|
|
53
|
+
.set(A_TYPES__ContainerMetaKey.STAGES, existedMeta);
|
|
54
|
+
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { A_Concept } from "@adaas/a-concept/global/A-Concept/A_Concept.class"
|
|
2
|
+
import { A_TYPES__ConceptStage } from "@adaas/a-concept/global/A-Concept/A_Concept.types"
|
|
3
|
+
|
|
4
|
+
export type A_TYPES__A_StageDecoratorDescriptor =
|
|
5
|
+
|
|
6
|
+
TypedPropertyDescriptor<() => any>
|
|
7
|
+
|
|
|
8
|
+
TypedPropertyDescriptor<(
|
|
9
|
+
...args: any[]
|
|
10
|
+
) => any>
|
|
11
|
+
|
|
|
12
|
+
TypedPropertyDescriptor<(
|
|
13
|
+
...args: any[]
|
|
14
|
+
) => Promise<any>>
|
|
15
|
+
|
|
|
16
|
+
TypedPropertyDescriptor<() => Promise<any>>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export type A_TYPES__A_StageDecoratorConfig = {
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A_Channel is an abstraction over any Communication Type from event emitters to message queues, HTTP requests, etc.
|
|
5
|
+
*
|
|
6
|
+
* A_Channel uses to connect Containers between each other. When
|
|
7
|
+
* When One container needs to communicate with another container, it uses A_Channel.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export class A_Channel<T> {
|
|
11
|
+
private proxyInstance: T | null = null;
|
|
12
|
+
private realInstance: T | null = null;
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
private realClass: { new(...args: any[]): T },
|
|
16
|
+
private args: any[]
|
|
17
|
+
) {
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
protected async loadInstance(): Promise<T> {
|
|
22
|
+
if (!this.realInstance)
|
|
23
|
+
this.realInstance = new this.realClass(...this.args);
|
|
24
|
+
|
|
25
|
+
return this.realInstance;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
public async resolve(): Promise<T> {
|
|
30
|
+
if (!this.proxyInstance) {
|
|
31
|
+
const realInstance = await this.loadInstance();
|
|
32
|
+
|
|
33
|
+
this.proxyInstance = new Proxy({}, {
|
|
34
|
+
get: (target, prop) => {
|
|
35
|
+
const value = (realInstance as any)[prop];
|
|
36
|
+
|
|
37
|
+
// If the property is a method, return a bound function
|
|
38
|
+
if (typeof value === 'function') {
|
|
39
|
+
return value.bind(realInstance);
|
|
40
|
+
}
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
}) as T;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return this.proxyInstance;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export type A_TYPES__A_DependencyReferenceConstructor = {
|
|
4
|
+
/**
|
|
5
|
+
* The name of the dependency
|
|
6
|
+
*/
|
|
7
|
+
name: string
|
|
8
|
+
/**
|
|
9
|
+
* The version of the module
|
|
10
|
+
* By default it is 1.0.0
|
|
11
|
+
*/
|
|
12
|
+
version: string
|
|
13
|
+
/**
|
|
14
|
+
* The dependencies of the module
|
|
15
|
+
* Could be:
|
|
16
|
+
* - other Modules
|
|
17
|
+
* - other Contexts
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
// dependencies: Array<typeof A_Namespace>
|
|
21
|
+
/**
|
|
22
|
+
* The source of the dependency
|
|
23
|
+
* Could be:
|
|
24
|
+
* - a string representing the path to the module
|
|
25
|
+
* - a module class (in case when config should be provided via the module constructor)
|
|
26
|
+
* - a module class constructor
|
|
27
|
+
* - a context class (in case when config should be provided via the context constructor)
|
|
28
|
+
* - a context class constructor
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
// source: A_Module | A_Context | typeof A_Module | typeof A_Context | string
|
|
32
|
+
// source: A_Namespace
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
export type A_TYPES__A_DependencyReferenceConstructorConfig = {
|
|
37
|
+
/**
|
|
38
|
+
* Sync - blocks A-Express Application initialization until module is ready
|
|
39
|
+
* Async - allows to initialize module after A-Express Application initialization
|
|
40
|
+
*/
|
|
41
|
+
behavior: 'async' | 'sync',
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Allows to define a scheme of retries
|
|
45
|
+
*/
|
|
46
|
+
retries: {
|
|
47
|
+
/**
|
|
48
|
+
* The number of retries
|
|
49
|
+
* Default is 3
|
|
50
|
+
*/
|
|
51
|
+
n: number,
|
|
52
|
+
/**
|
|
53
|
+
* The timeout between retries
|
|
54
|
+
* Multiplied by the number of retries
|
|
55
|
+
* So after each retry the timeout is increased e.g. 1000ms * 1, 1000ms * 2, 1000ms * 3
|
|
56
|
+
* Default is 1000
|
|
57
|
+
*/
|
|
58
|
+
timeout: number
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,33 +1,5 @@
|
|
|
1
|
-
import { A_Namespace } from "../A-Namespace/A_Namespace.class";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
1
|
/**
|
|
6
2
|
* This element only contains the specific code
|
|
7
3
|
*
|
|
8
4
|
*/
|
|
9
|
-
export class A_Component
|
|
10
|
-
|
|
11
|
-
constructor(
|
|
12
|
-
/**
|
|
13
|
-
* Primary context that impacts the component behavior
|
|
14
|
-
*/
|
|
15
|
-
protected namespace: A_Namespace
|
|
16
|
-
) {
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// constructor(
|
|
24
|
-
// private auth: A_AUTH_Context,
|
|
25
|
-
// private arc: A_ARC_Context,
|
|
26
|
-
// private products: A_PRODUCTS_Context,
|
|
27
|
-
// private express: A_EXPRESS_Context,
|
|
28
|
-
// ) {
|
|
29
|
-
|
|
30
|
-
// }
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
5
|
+
export class A_Component { }
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export type A_TYPES__ComponentMeta = {
|
|
4
|
+
[A_TYPES__ComponentMetaKey.EXTENSIONS]: Map<string, A_TYPES__ComponentMeta_ExtensionItem>,
|
|
5
|
+
[A_TYPES__ComponentMetaKey.FEATURES]: any[],
|
|
6
|
+
[A_TYPES__ComponentMetaKey.INJECTIONS]: Map<
|
|
7
|
+
// Where key is method name
|
|
8
|
+
Symbol | string,
|
|
9
|
+
// And value is Injection instructions
|
|
10
|
+
A_TYPES__ComponentMeta_InjectionParams
|
|
11
|
+
>
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum A_TYPES__ComponentMetaKey {
|
|
16
|
+
EXTENSIONS = 'a-component-extensions',
|
|
17
|
+
FEATURES = 'a-component-features',
|
|
18
|
+
INJECTIONS = 'a-component-injections',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export type A_TYPES__ComponentMeta_ExtensionItem = {
|
|
23
|
+
name: string,
|
|
24
|
+
container: string,
|
|
25
|
+
handler: string,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export type A_TYPES__ComponentMeta_InjectionParams = Array<
|
|
30
|
+
// typeof A_Namespace
|
|
31
|
+
// | typeof A_Component
|
|
32
|
+
// | typeof A_Container
|
|
33
|
+
// | typeof A_ContextFragment
|
|
34
|
+
// | Array<typeof A_Namespace>
|
|
35
|
+
// | Array<typeof A_Component>
|
|
36
|
+
// | Array<typeof A_Container>
|
|
37
|
+
// | Array<typeof A_ContextFragment>
|
|
38
|
+
| { new(...args: any[]): any }
|
|
39
|
+
>
|
|
40
|
+
|