@adaas/a-concept 0.0.2 → 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 -7
- package/dist/index.js +55 -13
- 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 +55 -8
- 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,40 @@
|
|
|
1
|
+
import { A_TYPES__ConceptStage } from "../A-Concept/A_Concept.types";
|
|
2
|
+
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
3
|
+
import { A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export type A_TYPES__ContainerConstructor<_Exports extends Array<String>> = {
|
|
8
|
+
name?: string,
|
|
9
|
+
exports: _Exports,
|
|
10
|
+
} & A_TYPES__ScopeConstructor
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export type A_TYPES__ContainerCallParams<T extends string> = {
|
|
14
|
+
name: T,
|
|
15
|
+
fragments: Array<A_Fragment>,
|
|
16
|
+
components: Array<{ new(...args: any[]): any }>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type A_TYPES__ContainerMeta = {
|
|
20
|
+
[A_TYPES__ContainerMetaKey.FEATURES]: Map<string, A_TYPES__ContainerMeta_FeatureItem>
|
|
21
|
+
[A_TYPES__ContainerMetaKey.STAGES]: Map<string, A_TYPES__ContainerMeta_StageExtension>
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export enum A_TYPES__ContainerMetaKey {
|
|
26
|
+
FEATURES = 'a-container-features',
|
|
27
|
+
STAGES = 'a-container-stages',
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type A_TYPES__ContainerMeta_StageExtension = {
|
|
31
|
+
name: A_TYPES__ConceptStage,
|
|
32
|
+
handler: string,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
export type A_TYPES__ContainerMeta_FeatureItem = {
|
|
37
|
+
name: string,
|
|
38
|
+
container: string,
|
|
39
|
+
handler: string,
|
|
40
|
+
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { A_CommonHelper, A_Polyfills } from "@adaas/a-utils";
|
|
2
|
-
import { A_Namespace } from "../A-Namespace/A_Namespace.class";
|
|
1
|
+
import { A_CommonHelper, A_Polyfills, A_TYPES__Dictionary } from "@adaas/a-utils";
|
|
3
2
|
import { A_Component } from "../A-Component/A-Component.class";
|
|
3
|
+
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
4
|
+
import { A_Feature } from "../A-Feature/A-Feature.class";
|
|
5
|
+
import { A_Container } from "../A-Container/A-Container.class";
|
|
6
|
+
import { A_Scope } from "../A-Scope/A-Scope.class";
|
|
7
|
+
import { A_TYPES__ScopeConfig, A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types";
|
|
8
|
+
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
9
|
+
import { A_ComponentMeta } from "../A-Component/A-Component.meta";
|
|
10
|
+
import { A_ContainerMeta } from "../A-Container/A-Container.meta";
|
|
11
|
+
import { A_Concept } from "../A-Concept/A_Concept.class";
|
|
4
12
|
|
|
5
13
|
|
|
6
14
|
/**
|
|
@@ -12,36 +20,34 @@ import { A_Component } from "../A-Component/A-Component.class";
|
|
|
12
20
|
*/
|
|
13
21
|
export class A_Context {
|
|
14
22
|
|
|
15
|
-
|
|
16
23
|
static instance: A_Context;
|
|
17
24
|
|
|
18
25
|
/**
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*
|
|
26
|
+
* A set of globally registered containers.
|
|
27
|
+
*/
|
|
28
|
+
protected containers: WeakMap<A_Container<any>, A_Scope> = new WeakMap();
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A set of globally registered features.
|
|
25
32
|
*/
|
|
26
|
-
|
|
33
|
+
protected features: WeakMap<A_Feature, A_Scope> = new WeakMap();
|
|
27
34
|
|
|
28
35
|
/**
|
|
29
|
-
*
|
|
30
|
-
* Singleton Namespaces are the Namespaces that are used only once in the program.
|
|
31
|
-
* In most cases, the singleton Namespace is the main Namespace of the program.
|
|
32
|
-
* It could be :
|
|
33
|
-
* - the main Namespace of the Program
|
|
34
|
-
* - the authentication Namespace
|
|
35
|
-
* - the main database Namespace
|
|
36
|
-
* - etc.
|
|
36
|
+
* A set of globally registered concepts.
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
protected concepts: WeakMap<A_Concept<any>, A_Scope> = new WeakMap();
|
|
39
|
+
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
/**
|
|
42
|
-
*
|
|
43
|
+
* A set of allocated scopes per every element in the program.
|
|
43
44
|
*/
|
|
44
|
-
|
|
45
|
+
// protected scopes: WeakMap<A_Container<any> | A_Feature | A_Component | any, A_Scope> = new WeakMap();
|
|
46
|
+
|
|
47
|
+
protected conceptsMeta: Map<typeof A_Concept.constructor, A_Meta<any>> = new Map();
|
|
48
|
+
protected containersMeta: Map<typeof A_Container.constructor, A_ContainerMeta> = new Map();
|
|
49
|
+
protected componentsMeta: Map<typeof A_Container.constructor, A_ComponentMeta> = new Map();
|
|
50
|
+
|
|
45
51
|
|
|
46
52
|
/**
|
|
47
53
|
* Root Namespace is a Namespace that is used to run the program.
|
|
@@ -49,9 +55,15 @@ export class A_Context {
|
|
|
49
55
|
private _root!: string
|
|
50
56
|
|
|
51
57
|
|
|
52
|
-
private constructor() {
|
|
58
|
+
private constructor() { }
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
// ===================================================================================================
|
|
63
|
+
// ================================ META OPERATIONS ==================================================
|
|
64
|
+
// ===================================================================================================
|
|
65
|
+
|
|
53
66
|
|
|
54
|
-
}
|
|
55
67
|
|
|
56
68
|
/**
|
|
57
69
|
* Get the instance of the Namespace Provider.
|
|
@@ -74,157 +86,246 @@ export class A_Context {
|
|
|
74
86
|
return A_Polyfills.env;
|
|
75
87
|
}
|
|
76
88
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
static allocate(
|
|
93
|
+
component: any,
|
|
94
|
+
importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>
|
|
95
|
+
): A_Scope
|
|
96
|
+
static allocate(
|
|
97
|
+
feature: A_Feature,
|
|
98
|
+
importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>
|
|
99
|
+
): A_Scope
|
|
100
|
+
static allocate(
|
|
101
|
+
container: A_Container<any>,
|
|
102
|
+
importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>
|
|
103
|
+
): A_Scope
|
|
104
|
+
static allocate(
|
|
105
|
+
param1: A_Container<any> | A_Feature | A_Component | any,
|
|
106
|
+
param2: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>
|
|
107
|
+
): A_Scope {
|
|
90
108
|
|
|
91
109
|
const instance = this.getInstance();
|
|
92
110
|
|
|
93
|
-
|
|
94
|
-
let namespace: string;
|
|
111
|
+
const newScope = new A_Scope(param2, param2);
|
|
95
112
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
Namespace = param1 as A_Namespace;
|
|
101
|
-
namespace = Namespace.name;
|
|
102
|
-
}
|
|
113
|
+
switch (true) {
|
|
114
|
+
case param1 instanceof A_Container:
|
|
115
|
+
instance.containers.set(param1, newScope);
|
|
116
|
+
break;
|
|
103
117
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
*/
|
|
108
|
-
if (!namespace)
|
|
109
|
-
namespace = this.root
|
|
110
|
-
|| process.env.ADAAS_NAMESPACE
|
|
111
|
-
|| process.env.A_NAMESPACE
|
|
112
|
-
|| process.env.ADAAS_APP_NAMESPACE
|
|
113
|
-
|| 'a-concept'
|
|
118
|
+
case param1 instanceof A_Feature:
|
|
119
|
+
instance.features.set(param1, newScope);
|
|
120
|
+
break;
|
|
114
121
|
|
|
122
|
+
case param1 instanceof A_Concept:
|
|
123
|
+
instance.concepts.set(param1, newScope);
|
|
124
|
+
break;
|
|
115
125
|
|
|
116
126
|
|
|
117
|
-
|
|
118
|
-
|
|
127
|
+
default:
|
|
128
|
+
throw new Error(`[!] A-Concept Context: Unknown type of the parameter.`);
|
|
129
|
+
}
|
|
119
130
|
|
|
120
|
-
instance.namespaced.set(namespace, Namespace);
|
|
121
131
|
|
|
122
|
-
return
|
|
132
|
+
return newScope;
|
|
123
133
|
}
|
|
124
134
|
|
|
125
135
|
|
|
126
136
|
|
|
127
137
|
|
|
138
|
+
static meta(
|
|
139
|
+
container: typeof A_Container,
|
|
140
|
+
): A_ContainerMeta
|
|
141
|
+
static meta(
|
|
142
|
+
container: A_Container<any>,
|
|
143
|
+
): A_ContainerMeta
|
|
144
|
+
static meta(
|
|
145
|
+
component: typeof A_Component,
|
|
146
|
+
): A_ComponentMeta
|
|
147
|
+
static meta(
|
|
148
|
+
component: A_Component,
|
|
149
|
+
): A_ComponentMeta
|
|
150
|
+
static meta<T extends Record<string, any>>(
|
|
151
|
+
component: { new(...args: any[]): any },
|
|
152
|
+
): A_Meta<T>
|
|
153
|
+
static meta<T extends Record<string, any>>(
|
|
154
|
+
param1: typeof A_Container | A_Container<any> | { new(...args: any[]): any } | A_Component | typeof A_Component,
|
|
155
|
+
): A_ContainerMeta | A_ComponentMeta | A_Meta<T> {
|
|
156
|
+
const instance = this.getInstance();
|
|
128
157
|
|
|
158
|
+
let metaStorage: WeakMap<typeof A_Container.constructor, A_Meta<any>>;
|
|
159
|
+
let property: Function;
|
|
129
160
|
|
|
130
|
-
|
|
131
|
-
* Get the Namespace by namespace.
|
|
132
|
-
* @param namespace
|
|
133
|
-
*/
|
|
134
|
-
static get(namespace: string) {
|
|
135
|
-
const instance = this.getInstance();
|
|
161
|
+
let meta: A_Meta<any>;
|
|
136
162
|
|
|
137
|
-
return instance.namespaced.get(namespace)
|
|
138
|
-
}
|
|
139
163
|
|
|
164
|
+
switch (true) {
|
|
165
|
+
case param1 instanceof A_Container: {
|
|
140
166
|
|
|
167
|
+
metaStorage = instance.containersMeta;
|
|
168
|
+
property = param1.constructor;
|
|
141
169
|
|
|
142
170
|
|
|
171
|
+
if (!metaStorage.has(property)) {
|
|
172
|
+
const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_ContainerMeta();
|
|
173
|
+
metaStorage.set(property, new A_ContainerMeta().from(inheritMeta));
|
|
174
|
+
}
|
|
143
175
|
|
|
144
|
-
|
|
145
|
-
* Resolve the Component by Class.
|
|
146
|
-
*
|
|
147
|
-
* @param component
|
|
148
|
-
*/
|
|
149
|
-
static resolve<T extends A_Component>(
|
|
150
|
-
component: { new(...args: any[]): T }
|
|
151
|
-
): T
|
|
152
|
-
static resolve<T extends A_Namespace>(
|
|
153
|
-
namespace: { new(...args: any[]): T }
|
|
154
|
-
): T
|
|
155
|
-
static resolve<
|
|
156
|
-
T extends A_Namespace,
|
|
157
|
-
>(
|
|
158
|
-
namespaces: Array<{ new(...args: any[]): T }>
|
|
159
|
-
): Array<T>
|
|
160
|
-
static resolve<T extends A_Namespace>(
|
|
161
|
-
namespace: { new(...args: any[]): T },
|
|
162
|
-
name: string
|
|
163
|
-
): T
|
|
164
|
-
static resolve<
|
|
165
|
-
T extends A_Namespace,
|
|
166
|
-
K extends A_Component,
|
|
167
|
-
>(
|
|
168
|
-
param1: { new(...args: any[]): T } | { new(...args: any[]): K } | Array<{ new(...args: any[]): T }>,
|
|
169
|
-
param2?: string
|
|
170
|
-
): T | K | Array<T> {
|
|
176
|
+
meta = metaStorage.get(property)!;
|
|
171
177
|
|
|
172
|
-
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
173
180
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
181
|
+
case A_CommonHelper.isInheritedFrom(param1, A_Container): {
|
|
182
|
+
metaStorage = instance.containersMeta;
|
|
183
|
+
property = param1 as typeof A_Container<any>;
|
|
177
184
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
185
|
+
if (!metaStorage.has(property)) {
|
|
186
|
+
const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_ContainerMeta();
|
|
187
|
+
metaStorage.set(property, new A_ContainerMeta().from(inheritMeta));
|
|
188
|
+
}
|
|
181
189
|
|
|
182
|
-
|
|
183
|
-
case !!param2 && typeof param1 === 'function' && A_CommonHelper.isInheritedFrom(param1, A_Component):
|
|
184
|
-
return this.resolveComponent(param1 as { new(...args: any[]): A_Component }) as K;
|
|
190
|
+
meta = metaStorage.get(property)!;
|
|
185
191
|
|
|
186
|
-
|
|
187
|
-
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
case param1 instanceof A_Component: {
|
|
196
|
+
metaStorage = instance.componentsMeta;
|
|
197
|
+
property = param1.constructor;
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
if (!metaStorage.has(property)) {
|
|
201
|
+
const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_ComponentMeta();
|
|
202
|
+
metaStorage.set(property, new A_ComponentMeta().from(inheritMeta));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
meta = metaStorage.get(property)!;
|
|
206
|
+
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
case A_CommonHelper.isInheritedFrom(param1, A_Component): {
|
|
211
|
+
metaStorage = instance.componentsMeta;
|
|
212
|
+
property = param1 as typeof A_Component;
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
if (!metaStorage.has(property)) {
|
|
216
|
+
const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_ComponentMeta();
|
|
217
|
+
metaStorage.set(property, new A_ComponentMeta().from(inheritMeta));
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
meta = metaStorage.get(property)!;
|
|
221
|
+
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
default: {
|
|
226
|
+
metaStorage = instance.componentsMeta;
|
|
227
|
+
property = typeof (param1 as any) === 'function' ? param1 : param1.constructor;
|
|
228
|
+
|
|
229
|
+
if (!metaStorage.has(property)) {
|
|
230
|
+
const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_Meta();
|
|
231
|
+
metaStorage.set(property, new A_Meta().from(inheritMeta));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
meta = metaStorage.get(property)!;
|
|
235
|
+
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
188
238
|
}
|
|
239
|
+
|
|
240
|
+
// const inheritMeta: T = metaStorage.get(Object.getPrototypeOf(property)) || new A_Meta() as T;
|
|
241
|
+
// // we just know that the type of parent meta is the same as the type of the current meta
|
|
242
|
+
// const meta = metaStorage.get(property);
|
|
243
|
+
|
|
244
|
+
return meta!;
|
|
189
245
|
}
|
|
190
246
|
|
|
191
247
|
|
|
192
248
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
static scope(
|
|
252
|
+
concept: A_Concept
|
|
253
|
+
): A_Scope
|
|
254
|
+
static scope(
|
|
255
|
+
component: A_Container<any>
|
|
256
|
+
): A_Scope
|
|
257
|
+
static scope(
|
|
258
|
+
component: A_Feature
|
|
259
|
+
): A_Scope
|
|
260
|
+
static scope(
|
|
261
|
+
param1: A_Feature | A_Container<any> | A_Concept
|
|
262
|
+
): A_Scope | undefined {
|
|
263
|
+
|
|
196
264
|
const instance = this.getInstance();
|
|
197
265
|
|
|
198
|
-
|
|
266
|
+
switch (true) {
|
|
267
|
+
case param1 instanceof A_Container:
|
|
268
|
+
return instance.containers.get(param1);
|
|
269
|
+
|
|
270
|
+
case param1 instanceof A_Feature:
|
|
271
|
+
return instance.features.get(param1);
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
case param1 instanceof A_Concept:
|
|
275
|
+
return instance.concepts.get(param1);
|
|
276
|
+
|
|
277
|
+
default:
|
|
278
|
+
throw new Error(`[!] A-Concept Context: Unknown type of the parameter.`);
|
|
279
|
+
}
|
|
199
280
|
}
|
|
200
281
|
|
|
201
282
|
|
|
202
283
|
|
|
203
284
|
/**
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* @param namespace
|
|
208
|
-
* @param name
|
|
285
|
+
* Register a Namespace in the provider.
|
|
286
|
+
* @param Namespace
|
|
209
287
|
*/
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
): T {
|
|
288
|
+
static register(Namespace: A_Fragment): string
|
|
289
|
+
static register(
|
|
290
|
+
Namespace: A_Fragment,
|
|
291
|
+
namespace?: string
|
|
292
|
+
): string
|
|
293
|
+
static register(
|
|
294
|
+
param1: A_Fragment,
|
|
295
|
+
param2?: A_Fragment | string,
|
|
296
|
+
): string {
|
|
297
|
+
|
|
221
298
|
const instance = this.getInstance();
|
|
222
299
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
300
|
+
let fragment: A_Fragment;
|
|
301
|
+
let name: string;
|
|
302
|
+
|
|
303
|
+
if (typeof param2 === 'string') {
|
|
304
|
+
name = param2;
|
|
305
|
+
fragment = param1;
|
|
306
|
+
} else {
|
|
307
|
+
fragment = param1 as A_Fragment;
|
|
308
|
+
name = fragment.name;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* If the namespace is not provided, then use the root namespace.
|
|
313
|
+
* If the root namespace is not provided, then use the default namespace.
|
|
314
|
+
*/
|
|
315
|
+
if (!name)
|
|
316
|
+
name = this.root
|
|
317
|
+
|| process.env.ADAAS_NAMESPACE
|
|
318
|
+
|| process.env.A_NAMESPACE
|
|
319
|
+
|| process.env.ADAAS_APP_NAMESPACE
|
|
320
|
+
|| 'a-concept'
|
|
321
|
+
|
|
227
322
|
|
|
228
323
|
|
|
324
|
+
if (!this.root)
|
|
325
|
+
instance._root = name;
|
|
326
|
+
|
|
327
|
+
// instance.namedFragments.set(namespace, Namespace);
|
|
229
328
|
|
|
329
|
+
return name;
|
|
330
|
+
}
|
|
230
331
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { A_Scope } from "../A-Scope/A-Scope.class"
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export type A_TYPES__ContextExecutionPipeline = {
|
|
6
|
+
scope: A_Scope
|
|
7
|
+
steps: A_TYPES__ContextExecutionPipelineStep[]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export type A_TYPES__ContextExecutionPipelineStep = {
|
|
12
|
+
component: { new(...args: any[]): any },
|
|
13
|
+
handler: string,
|
|
14
|
+
args: any[]
|
|
15
|
+
}
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { A_Namespace } from "@adaas/a-concept/global/A-Namespace/A_Namespace.class"
|
|
1
|
+
// import { A_Namespace } from "@adaas/a-concept/global/A-Namespace/A_Namespace.class"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
export type A_TYPES__A_DependencyReferenceConstructor = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
4
|
+
// export type A_TYPES__A_DependencyReferenceConstructor = {
|
|
5
|
+
// /**
|
|
6
|
+
// * The name of the dependency
|
|
7
|
+
// */
|
|
8
|
+
// name: string
|
|
9
|
+
// /**
|
|
10
|
+
// * The version of the module
|
|
11
|
+
// * By default it is 1.0.0
|
|
12
|
+
// */
|
|
13
|
+
// version: string
|
|
14
|
+
// /**
|
|
15
|
+
// * The dependencies of the module
|
|
16
|
+
// * Could be:
|
|
17
|
+
// * - other Modules
|
|
18
|
+
// * - other Contexts
|
|
19
|
+
// *
|
|
20
|
+
// */
|
|
21
|
+
// dependencies: Array<typeof A_Namespace>
|
|
22
|
+
// /**
|
|
23
|
+
// * The source of the dependency
|
|
24
|
+
// * Could be:
|
|
25
|
+
// * - a string representing the path to the module
|
|
26
|
+
// * - a module class (in case when config should be provided via the module constructor)
|
|
27
|
+
// * - a module class constructor
|
|
28
|
+
// * - a context class (in case when config should be provided via the context constructor)
|
|
29
|
+
// * - a context class constructor
|
|
30
|
+
// *
|
|
31
|
+
// */
|
|
32
|
+
// // source: A_Module | A_Context | typeof A_Module | typeof A_Context | string
|
|
33
|
+
// source: A_Namespace
|
|
34
|
+
// }
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
export type A_TYPES__A_DependencyReferenceConstructorConfig = {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
// export type A_TYPES__A_DependencyReferenceConstructorConfig = {
|
|
38
|
+
// /**
|
|
39
|
+
// * Sync - blocks A-Express Application initialization until module is ready
|
|
40
|
+
// * Async - allows to initialize module after A-Express Application initialization
|
|
41
|
+
// */
|
|
42
|
+
// behavior: 'async' | 'sync',
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
44
|
+
// /**
|
|
45
|
+
// * Allows to define a scheme of retries
|
|
46
|
+
// */
|
|
47
|
+
// retries: {
|
|
48
|
+
// /**
|
|
49
|
+
// * The number of retries
|
|
50
|
+
// * Default is 3
|
|
51
|
+
// */
|
|
52
|
+
// n: number,
|
|
53
|
+
// /**
|
|
54
|
+
// * The timeout between retries
|
|
55
|
+
// * Multiplied by the number of retries
|
|
56
|
+
// * So after each retry the timeout is increased e.g. 1000ms * 1, 1000ms * 2, 1000ms * 3
|
|
57
|
+
// * Default is 1000
|
|
58
|
+
// */
|
|
59
|
+
// timeout: number
|
|
60
|
+
// }
|
|
61
|
+
// }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A_Entity is another abstraction that describes all major participants in the system business logic.
|
|
5
|
+
* Each Entity should have a clear definition and a clear set of responsibilities.
|
|
6
|
+
* However, entity may hide some of its responsibilities behind the interface to prevent overload.
|
|
7
|
+
*
|
|
8
|
+
* Each entity should be connected to the ContextFragment (Scope) and should be able to communicate with other entities.
|
|
9
|
+
*/
|
|
10
|
+
export class A_Entity {
|
|
11
|
+
|
|
12
|
+
constructor() {
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
File without changes
|