@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
|
@@ -1,20 +1,130 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.A_Container = void 0;
|
|
13
|
+
const A_Feature_class_1 = require("../A-Feature/A-Feature.class");
|
|
14
|
+
const A_Context_class_1 = require("../A-Context/A-Context.class");
|
|
4
15
|
/**
|
|
5
|
-
* This class should combine Components to achieve the goal withing
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
16
|
+
* This class should combine Components to achieve the goal withing Concept
|
|
17
|
+
*
|
|
18
|
+
* Container is a direct container that should be "run" to make Concept work.
|
|
19
|
+
* So because of that Container can be:
|
|
20
|
+
* - HTTP Server
|
|
21
|
+
* - BASH Script
|
|
22
|
+
* - Database Connection
|
|
23
|
+
* - Microservice
|
|
11
24
|
* - etc.
|
|
12
25
|
*/
|
|
13
26
|
class A_Container {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
27
|
+
get exports() {
|
|
28
|
+
return this.config.exports || [];
|
|
29
|
+
}
|
|
30
|
+
get name() {
|
|
31
|
+
return this.config.name || this.constructor.name;
|
|
32
|
+
}
|
|
33
|
+
constructor(
|
|
34
|
+
/**
|
|
35
|
+
* Configuration of the container that will be used to run it.
|
|
36
|
+
*/
|
|
37
|
+
config) {
|
|
38
|
+
this.config = config;
|
|
39
|
+
const components = config.components || [];
|
|
40
|
+
const fragments = config.fragments || [];
|
|
41
|
+
A_Context_class_1.A_Context.allocate(this, {
|
|
42
|
+
components,
|
|
43
|
+
fragments
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* Run Async Initialization
|
|
47
|
+
*/
|
|
48
|
+
this.init();
|
|
49
|
+
}
|
|
50
|
+
hasInherited(cl) {
|
|
51
|
+
return this.constructor === cl
|
|
52
|
+
? false
|
|
53
|
+
: true;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Initializes the Namespace or can be used to reinitialize the Namespace
|
|
57
|
+
*/
|
|
58
|
+
init() {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
if (!this.ready)
|
|
61
|
+
this.ready = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
try {
|
|
63
|
+
yield this.onBeforeInit();
|
|
64
|
+
yield this.onInit();
|
|
65
|
+
yield this.onAfterInit();
|
|
66
|
+
return resolve();
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
return reject(error);
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
else
|
|
73
|
+
yield this.ready;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
call(param1, param2) {
|
|
77
|
+
let feature;
|
|
78
|
+
let params;
|
|
79
|
+
if (typeof param1 === 'string') {
|
|
80
|
+
feature = param1;
|
|
81
|
+
params = param2 || {};
|
|
17
82
|
}
|
|
83
|
+
else {
|
|
84
|
+
feature = param1.name;
|
|
85
|
+
params = param1;
|
|
86
|
+
}
|
|
87
|
+
const meta = A_Context_class_1.A_Context.meta(this);
|
|
88
|
+
const steps = meta.feature(this, feature);
|
|
89
|
+
const newFeature = new A_Feature_class_1.A_Feature({
|
|
90
|
+
name: `${this.constructor.name}.${feature}`,
|
|
91
|
+
fragments: (param2 === null || param2 === void 0 ? void 0 : param2.fragments) || [],
|
|
92
|
+
components: (param2 === null || param2 === void 0 ? void 0 : param2.components) || [],
|
|
93
|
+
steps,
|
|
94
|
+
parent: A_Context_class_1.A_Context.scope(this)
|
|
95
|
+
});
|
|
96
|
+
return newFeature;
|
|
97
|
+
}
|
|
98
|
+
// ==============================================================
|
|
99
|
+
// ======================= HOOKS ================================
|
|
100
|
+
// ==============================================================
|
|
101
|
+
/**
|
|
102
|
+
* Before init hook to be used in inherited classes
|
|
103
|
+
*
|
|
104
|
+
* @returns
|
|
105
|
+
*/
|
|
106
|
+
onBeforeInit() {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
return;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Main initialization method for the Container
|
|
113
|
+
*/
|
|
114
|
+
onInit() {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
return;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* After init hook to be used in inherited classes
|
|
121
|
+
*
|
|
122
|
+
* @returns
|
|
123
|
+
*/
|
|
124
|
+
onAfterInit() {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
return;
|
|
127
|
+
});
|
|
18
128
|
}
|
|
19
129
|
}
|
|
20
130
|
exports.A_Container = A_Container;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Container.class.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.class.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"A-Container.class.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,kEAAyD;AACzD,kEAAyD;AAIzD;;;;;;;;;;GAUG;AACH,MAAa,WAAW;IAYpB,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,EAAS,CAAC;IAC5C,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACrD,CAAC;IAGD;IACI;;OAEG;IACH,MAA6D;QAE7D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;Q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CAAC,CAAC;QAElC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE1C,MAAM,UAAU,GAAG,IAAI,2BAAS,CAAC;YAC7B,IAAI,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,OAAO,EAAE;YAC3C,SAAS,EAAE,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,KAAI,EAAE;YAClC,UAAU,EAAE,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,KAAI,EAAE;YACpC,KAAK;YACL,MAAM,EAAE,2BAAS,CAAC,KAAK,CAAC,IAAI,CAAC;SAChC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACtB,CAAC;IAID,iEAAiE;IACjE,iEAAiE;IACjE,iEAAiE;IAEjE;;;;OAIG;IACa,YAAY;;YACxB,OAAO;QACX,CAAC;KAAA;IAED;;OAEG;IACa,MAAM;;YAClB,OAAO;QACX,CAAC;KAAA;IAED;;;;OAIG;IACa,WAAW;;YACvB,OAAO;QACX,CAAC;KAAA;CAEJ;AA1KD,kCA0KC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { A_TYPES__FeatureStep } from "../A-Feature/A-Feature.types";
|
|
2
|
+
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
3
|
+
import { A_Container } from "./A-Container.class";
|
|
4
|
+
import { A_TYPES__ContainerMeta } from "./A-Container.types";
|
|
5
|
+
export declare class A_ContainerMeta extends A_Meta<A_TYPES__ContainerMeta> {
|
|
6
|
+
feature<T extends string>(container: A_Container<any>, name: T): A_TYPES__FeatureStep[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.A_ContainerMeta = void 0;
|
|
4
|
+
const A_Component_types_1 = require("../A-Component/A-Component.types");
|
|
5
|
+
const A_Context_class_1 = require("../A-Context/A-Context.class");
|
|
6
|
+
const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
|
|
7
|
+
const A_Container_types_1 = require("./A-Container.types");
|
|
8
|
+
class A_ContainerMeta extends A_Meta_class_1.A_Meta {
|
|
9
|
+
feature(container, name) {
|
|
10
|
+
const scope = A_Context_class_1.A_Context.scope(container);
|
|
11
|
+
// First lets validate that there'are registered method with the same name
|
|
12
|
+
const featureMeta = this.get(A_Container_types_1.A_TYPES__ContainerMetaKey.FEATURES);
|
|
13
|
+
if (!featureMeta) {
|
|
14
|
+
throw new Error(`Container ${container.constructor.name} has no metadata defined`);
|
|
15
|
+
}
|
|
16
|
+
const instruction = featureMeta.get(name);
|
|
17
|
+
if (!instruction)
|
|
18
|
+
throw new Error(`Method ${name} is not defined in ${this.constructor.name}`);
|
|
19
|
+
// const scope = new A_Scope({
|
|
20
|
+
// name: `${this.constructor.name}.${feature}`,
|
|
21
|
+
// fragments: param2?.fragments || [],
|
|
22
|
+
// components: param2?.components || []
|
|
23
|
+
// }, {
|
|
24
|
+
// parent: this.scope
|
|
25
|
+
// });
|
|
26
|
+
// Now we need to resolve the method from all registered components
|
|
27
|
+
return scope
|
|
28
|
+
.components
|
|
29
|
+
.reduce((acc, component) => {
|
|
30
|
+
const componentMeta = A_Context_class_1.A_Context.meta(component);
|
|
31
|
+
const extensions = componentMeta.get(A_Component_types_1.A_TYPES__ComponentMetaKey.EXTENSIONS) || [];
|
|
32
|
+
const injections = componentMeta.get(A_Component_types_1.A_TYPES__ComponentMetaKey.INJECTIONS);
|
|
33
|
+
const out = [];
|
|
34
|
+
extensions.forEach((extension, handler) => {
|
|
35
|
+
if (extension.name === name
|
|
36
|
+
&&
|
|
37
|
+
(extension.container === container.constructor.name || extension.container === '*')) {
|
|
38
|
+
const args = (injections === null || injections === void 0 ? void 0 : injections.get(handler)) || [];
|
|
39
|
+
out.push({
|
|
40
|
+
component,
|
|
41
|
+
handler,
|
|
42
|
+
args
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return [
|
|
47
|
+
...acc,
|
|
48
|
+
...out
|
|
49
|
+
];
|
|
50
|
+
}, []);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.A_ContainerMeta = A_ContainerMeta;
|
|
54
|
+
//# sourceMappingURL=A-Container.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Container.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.meta.ts"],"names":[],"mappings":";;;AAAA,wEAA6E;AAC7E,kEAAyD;AAEzD,yDAAgD;AAEhD,2DAG6B;AAI7B,MAAa,eAAgB,SAAQ,qBAA8B;IAG/D,OAAO,CACH,SAA2B,EAC3B,IAAO;QAGP,MAAM,KAAK,GAAG,2BAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAEzC,0EAA0E;QAC1E,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,6CAAyB,CAAC,QAAQ,CAAC,CAAC;QAEjE,IAAI,CAAC,WAAW,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,aAAa,SAAS,CAAC,WAAW,CAAC,IAAI,0BAA0B,CAAC,CAAC;QACvF,CAAC;QAED,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAE1C,IAAI,CAAC,WAAW;YACZ,MAAM,IAAI,KAAK,CAAC,UAAU,IAAI,sBAAsB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QAEjF,8BAA8B;QAC9B,mDAAmD;QACnD,0CAA0C;QAC1C,2CAA2C;QAC3C,OAAO;QACP,yBAAyB;QACzB,MAAM;QAGN,oEAAoE;QACpE,OAAO,KAAK;aACP,UAAU;aACV,MAAM,CAAC,CACJ,GAAG,EAAE,SAAS,EAChB,EAAE;YACA,MAAM,aAAa,GAAG,2BAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAEhD,MAAM,UAAU,GAAG,aAAa,CAAC,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACjF,MAAM,UAAU,GAAG,aAAa,CAAC,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC,CAAC;YAE3E,MAAM,GAAG,GAA2B,EAAE,CAAC;YAEvC,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE;gBACtC,IACI,SAAS,CAAC,IAAI,KAAK,IAAI;;wBAEvB,CAAC,SAAS,CAAC,SAAS,KAAK,SAAS,CAAC,WAAW,CAAC,IAAI,IAAI,SAAS,CAAC,SAAS,KAAK,GAAG,CAAC,EACrF,CAAC;oBACC,MAAM,IAAI,GAAG,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,GAAG,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;oBAE5C,GAAG,CAAC,IAAI,CAAC;wBACL,SAAS;wBACT,OAAO;wBACP,IAAI;qBACP,CAAC,CAAC;gBACP,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,OAAO;gBACH,GAAG,GAAG;gBACN,GAAG,GAAG;aACT,CAAC;QAEN,CAAC,EAAE,EAA4B,CAAC,CAAA;IACxC,CAAC;CACJ;AAnED,0CAmEC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
export type A_TYPES__ContainerConstructor<_Exports extends Array<String>> = {
|
|
5
|
+
name?: string;
|
|
6
|
+
exports: _Exports;
|
|
7
|
+
} & A_TYPES__ScopeConstructor;
|
|
8
|
+
export type A_TYPES__ContainerCallParams<T extends string> = {
|
|
9
|
+
name: T;
|
|
10
|
+
fragments: Array<A_Fragment>;
|
|
11
|
+
components: Array<{
|
|
12
|
+
new (...args: any[]): any;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
export type A_TYPES__ContainerMeta = {
|
|
16
|
+
[A_TYPES__ContainerMetaKey.FEATURES]: Map<string, A_TYPES__ContainerMeta_FeatureItem>;
|
|
17
|
+
[A_TYPES__ContainerMetaKey.STAGES]: Map<string, A_TYPES__ContainerMeta_StageExtension>;
|
|
18
|
+
};
|
|
19
|
+
export declare enum A_TYPES__ContainerMetaKey {
|
|
20
|
+
FEATURES = "a-container-features",
|
|
21
|
+
STAGES = "a-container-stages"
|
|
22
|
+
}
|
|
23
|
+
export type A_TYPES__ContainerMeta_StageExtension = {
|
|
24
|
+
name: A_TYPES__ConceptStage;
|
|
25
|
+
handler: string;
|
|
26
|
+
};
|
|
27
|
+
export type A_TYPES__ContainerMeta_FeatureItem = {
|
|
28
|
+
name: string;
|
|
29
|
+
container: string;
|
|
30
|
+
handler: string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.A_TYPES__ContainerMetaKey = void 0;
|
|
4
|
+
var A_TYPES__ContainerMetaKey;
|
|
5
|
+
(function (A_TYPES__ContainerMetaKey) {
|
|
6
|
+
A_TYPES__ContainerMetaKey["FEATURES"] = "a-container-features";
|
|
7
|
+
A_TYPES__ContainerMetaKey["STAGES"] = "a-container-stages";
|
|
8
|
+
})(A_TYPES__ContainerMetaKey || (exports.A_TYPES__ContainerMetaKey = A_TYPES__ContainerMetaKey = {}));
|
|
9
|
+
//# sourceMappingURL=A-Container.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Container.types.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.types.ts"],"names":[],"mappings":";;;AAwBA,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,8DAAiC,CAAA;IACjC,0DAA6B,CAAA;AACjC,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import { A_Namespace } from "../A-Namespace/A_Namespace.class";
|
|
2
1
|
import { A_Component } from "../A-Component/A-Component.class";
|
|
2
|
+
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
3
|
+
import { A_Feature } from "../A-Feature/A-Feature.class";
|
|
4
|
+
import { A_Container } from "../A-Container/A-Container.class";
|
|
5
|
+
import { A_Scope } from "../A-Scope/A-Scope.class";
|
|
6
|
+
import { A_TYPES__ScopeConfig, A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types";
|
|
7
|
+
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
8
|
+
import { A_ComponentMeta } from "../A-Component/A-Component.meta";
|
|
9
|
+
import { A_ContainerMeta } from "../A-Container/A-Container.meta";
|
|
10
|
+
import { A_Concept } from "../A-Concept/A_Concept.class";
|
|
3
11
|
/**
|
|
4
12
|
* Namespace Provider is responsible for providing the Namespace to the Containers and other Namespaces.
|
|
5
13
|
* This class stores all Namespaces across the Program.
|
|
@@ -10,31 +18,24 @@ import { A_Component } from "../A-Component/A-Component.class";
|
|
|
10
18
|
export declare class A_Context {
|
|
11
19
|
static instance: A_Context;
|
|
12
20
|
/**
|
|
13
|
-
*
|
|
14
|
-
* There might be a Namespaces of the same type but with different namespaces.
|
|
15
|
-
* That might be useful for the cases when you need to have multiple instances of the same Namespace e.g.
|
|
16
|
-
* - multiple http servers
|
|
17
|
-
* - multitenant applications
|
|
18
|
-
* - etc.
|
|
21
|
+
* A set of globally registered containers.
|
|
19
22
|
*/
|
|
20
|
-
|
|
23
|
+
protected containers: WeakMap<A_Container<any>, A_Scope>;
|
|
21
24
|
/**
|
|
22
|
-
*
|
|
23
|
-
* Singleton Namespaces are the Namespaces that are used only once in the program.
|
|
24
|
-
* In most cases, the singleton Namespace is the main Namespace of the program.
|
|
25
|
-
* It could be :
|
|
26
|
-
* - the main Namespace of the Program
|
|
27
|
-
* - the authentication Namespace
|
|
28
|
-
* - the main database Namespace
|
|
29
|
-
* - etc.
|
|
25
|
+
* A set of globally registered features.
|
|
30
26
|
*/
|
|
31
|
-
|
|
32
|
-
new (...args: any[]): A_Namespace;
|
|
33
|
-
}, A_Namespace>;
|
|
27
|
+
protected features: WeakMap<A_Feature, A_Scope>;
|
|
34
28
|
/**
|
|
35
|
-
*
|
|
29
|
+
* A set of globally registered concepts.
|
|
36
30
|
*/
|
|
37
|
-
|
|
31
|
+
protected concepts: WeakMap<A_Concept<any>, A_Scope>;
|
|
32
|
+
/**
|
|
33
|
+
* A set of allocated scopes per every element in the program.
|
|
34
|
+
*/
|
|
35
|
+
protected conceptsMeta: Map<typeof A_Concept.constructor, A_Meta<any>>;
|
|
36
|
+
protected containersMeta: Map<typeof A_Container.constructor, A_ContainerMeta>;
|
|
37
|
+
protected componentsMeta: Map<typeof A_Container.constructor, A_ComponentMeta>;
|
|
38
|
+
protected customMeta: Map<typeof A_Container.constructor, A_Meta<any>>;
|
|
38
39
|
/**
|
|
39
40
|
* Root Namespace is a Namespace that is used to run the program.
|
|
40
41
|
*/
|
|
@@ -48,41 +49,23 @@ export declare class A_Context {
|
|
|
48
49
|
static getInstance(): A_Context;
|
|
49
50
|
static get root(): string;
|
|
50
51
|
static get environment(): 'server' | 'browser';
|
|
52
|
+
static allocate(component: any, importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>): A_Scope;
|
|
53
|
+
static allocate(feature: A_Feature, importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>): A_Scope;
|
|
54
|
+
static allocate(container: A_Container<any>, importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>): A_Scope;
|
|
55
|
+
static meta(container: typeof A_Container): A_ContainerMeta;
|
|
56
|
+
static meta(container: A_Container<any>): A_ContainerMeta;
|
|
57
|
+
static meta(component: typeof A_Component): A_ComponentMeta;
|
|
58
|
+
static meta(component: A_Component): A_ComponentMeta;
|
|
59
|
+
static meta<T extends Record<string, any>>(component: {
|
|
60
|
+
new (...args: any[]): any;
|
|
61
|
+
}): A_Meta<T>;
|
|
62
|
+
static scope(concept: A_Concept): A_Scope;
|
|
63
|
+
static scope(component: A_Container<any>): A_Scope;
|
|
64
|
+
static scope(component: A_Feature): A_Scope;
|
|
51
65
|
/**
|
|
52
66
|
* Register a Namespace in the provider.
|
|
53
67
|
* @param Namespace
|
|
54
68
|
*/
|
|
55
|
-
static register(Namespace:
|
|
56
|
-
static register(Namespace:
|
|
57
|
-
/**
|
|
58
|
-
* Get the Namespace by namespace.
|
|
59
|
-
* @param namespace
|
|
60
|
-
*/
|
|
61
|
-
static get(namespace: string): A_Namespace<any> | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Resolve the Component by Class.
|
|
64
|
-
*
|
|
65
|
-
* @param component
|
|
66
|
-
*/
|
|
67
|
-
static resolve<T extends A_Component>(component: {
|
|
68
|
-
new (...args: any[]): T;
|
|
69
|
-
}): T;
|
|
70
|
-
static resolve<T extends A_Namespace>(namespace: {
|
|
71
|
-
new (...args: any[]): T;
|
|
72
|
-
}): T;
|
|
73
|
-
static resolve<T extends A_Namespace>(namespaces: Array<{
|
|
74
|
-
new (...args: any[]): T;
|
|
75
|
-
}>): Array<T>;
|
|
76
|
-
static resolve<T extends A_Namespace>(namespace: {
|
|
77
|
-
new (...args: any[]): T;
|
|
78
|
-
}, name: string): T;
|
|
79
|
-
private static resolveComponent;
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
* Allowing to resolve the Namespace by Class and Name.
|
|
83
|
-
*
|
|
84
|
-
* @param namespace
|
|
85
|
-
* @param name
|
|
86
|
-
*/
|
|
87
|
-
private static resolveNamespace;
|
|
69
|
+
static register(Namespace: A_Fragment): string;
|
|
70
|
+
static register(Namespace: A_Fragment, namespace?: string): string;
|
|
88
71
|
}
|
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.A_Context = void 0;
|
|
4
4
|
const a_utils_1 = require("@adaas/a-utils");
|
|
5
|
-
const A_Namespace_class_1 = require("../A-Namespace/A_Namespace.class");
|
|
6
5
|
const A_Component_class_1 = require("../A-Component/A-Component.class");
|
|
6
|
+
const A_Feature_class_1 = require("../A-Feature/A-Feature.class");
|
|
7
|
+
const A_Container_class_1 = require("../A-Container/A-Container.class");
|
|
8
|
+
const A_Scope_class_1 = require("../A-Scope/A-Scope.class");
|
|
9
|
+
const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
|
|
10
|
+
const A_Component_meta_1 = require("../A-Component/A-Component.meta");
|
|
11
|
+
const A_Container_meta_1 = require("../A-Container/A-Container.meta");
|
|
12
|
+
const A_Concept_class_1 = require("../A-Concept/A_Concept.class");
|
|
7
13
|
/**
|
|
8
14
|
* Namespace Provider is responsible for providing the Namespace to the Containers and other Namespaces.
|
|
9
15
|
* This class stores all Namespaces across the Program.
|
|
@@ -14,30 +20,30 @@ const A_Component_class_1 = require("../A-Component/A-Component.class");
|
|
|
14
20
|
class A_Context {
|
|
15
21
|
constructor() {
|
|
16
22
|
/**
|
|
17
|
-
*
|
|
18
|
-
* There might be a Namespaces of the same type but with different namespaces.
|
|
19
|
-
* That might be useful for the cases when you need to have multiple instances of the same Namespace e.g.
|
|
20
|
-
* - multiple http servers
|
|
21
|
-
* - multitenant applications
|
|
22
|
-
* - etc.
|
|
23
|
+
* A set of globally registered containers.
|
|
23
24
|
*/
|
|
24
|
-
this.
|
|
25
|
+
this.containers = new WeakMap();
|
|
25
26
|
/**
|
|
26
|
-
*
|
|
27
|
-
* Singleton Namespaces are the Namespaces that are used only once in the program.
|
|
28
|
-
* In most cases, the singleton Namespace is the main Namespace of the program.
|
|
29
|
-
* It could be :
|
|
30
|
-
* - the main Namespace of the Program
|
|
31
|
-
* - the authentication Namespace
|
|
32
|
-
* - the main database Namespace
|
|
33
|
-
* - etc.
|
|
27
|
+
* A set of globally registered features.
|
|
34
28
|
*/
|
|
35
|
-
this.
|
|
29
|
+
this.features = new WeakMap();
|
|
36
30
|
/**
|
|
37
|
-
*
|
|
31
|
+
* A set of globally registered concepts.
|
|
38
32
|
*/
|
|
39
|
-
this.
|
|
33
|
+
this.concepts = new WeakMap();
|
|
34
|
+
/**
|
|
35
|
+
* A set of allocated scopes per every element in the program.
|
|
36
|
+
*/
|
|
37
|
+
// protected scopes: WeakMap<A_Container<any> | A_Feature | A_Component | any, A_Scope> = new WeakMap();
|
|
38
|
+
this.conceptsMeta = new Map();
|
|
39
|
+
this.containersMeta = new Map();
|
|
40
|
+
this.componentsMeta = new Map();
|
|
41
|
+
// uses to allow to store custom meta data
|
|
42
|
+
this.customMeta = new Map();
|
|
40
43
|
}
|
|
44
|
+
// ===================================================================================================
|
|
45
|
+
// ================================ META OPERATIONS ==================================================
|
|
46
|
+
// ===================================================================================================
|
|
41
47
|
/**
|
|
42
48
|
* Get the instance of the Namespace Provider.
|
|
43
49
|
*
|
|
@@ -55,63 +61,125 @@ class A_Context {
|
|
|
55
61
|
static get environment() {
|
|
56
62
|
return a_utils_1.A_Polyfills.env;
|
|
57
63
|
}
|
|
64
|
+
static allocate(param1, param2) {
|
|
65
|
+
const instance = this.getInstance();
|
|
66
|
+
const newScope = new A_Scope_class_1.A_Scope(param2, param2);
|
|
67
|
+
switch (true) {
|
|
68
|
+
case param1 instanceof A_Container_class_1.A_Container:
|
|
69
|
+
instance.containers.set(param1, newScope);
|
|
70
|
+
break;
|
|
71
|
+
case param1 instanceof A_Feature_class_1.A_Feature:
|
|
72
|
+
instance.features.set(param1, newScope);
|
|
73
|
+
break;
|
|
74
|
+
case param1 instanceof A_Concept_class_1.A_Concept:
|
|
75
|
+
instance.concepts.set(param1, newScope);
|
|
76
|
+
break;
|
|
77
|
+
default:
|
|
78
|
+
throw new Error(`[!] A-Concept Context: Unknown type of the parameter.`);
|
|
79
|
+
}
|
|
80
|
+
return newScope;
|
|
81
|
+
}
|
|
82
|
+
static meta(param1) {
|
|
83
|
+
const instance = this.getInstance();
|
|
84
|
+
let metaStorage;
|
|
85
|
+
let property;
|
|
86
|
+
let meta;
|
|
87
|
+
switch (true) {
|
|
88
|
+
case param1 instanceof A_Container_class_1.A_Container: {
|
|
89
|
+
metaStorage = instance.containersMeta;
|
|
90
|
+
property = param1.constructor;
|
|
91
|
+
if (!metaStorage.has(property)) {
|
|
92
|
+
const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_Container_meta_1.A_ContainerMeta();
|
|
93
|
+
metaStorage.set(property, new A_Container_meta_1.A_ContainerMeta().from(inheritMeta));
|
|
94
|
+
}
|
|
95
|
+
meta = metaStorage.get(property);
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
case a_utils_1.A_CommonHelper.isInheritedFrom(param1, A_Container_class_1.A_Container): {
|
|
99
|
+
metaStorage = instance.containersMeta;
|
|
100
|
+
property = param1;
|
|
101
|
+
if (!metaStorage.has(property)) {
|
|
102
|
+
const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_Container_meta_1.A_ContainerMeta();
|
|
103
|
+
metaStorage.set(property, new A_Container_meta_1.A_ContainerMeta().from(inheritMeta));
|
|
104
|
+
}
|
|
105
|
+
meta = metaStorage.get(property);
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
case param1 instanceof A_Component_class_1.A_Component: {
|
|
109
|
+
metaStorage = instance.componentsMeta;
|
|
110
|
+
property = param1.constructor;
|
|
111
|
+
if (!metaStorage.has(property)) {
|
|
112
|
+
const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_Component_meta_1.A_ComponentMeta();
|
|
113
|
+
metaStorage.set(property, new A_Component_meta_1.A_ComponentMeta().from(inheritMeta));
|
|
114
|
+
}
|
|
115
|
+
meta = metaStorage.get(property);
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
case a_utils_1.A_CommonHelper.isInheritedFrom(param1, A_Component_class_1.A_Component): {
|
|
119
|
+
metaStorage = instance.componentsMeta;
|
|
120
|
+
property = param1;
|
|
121
|
+
if (!metaStorage.has(property)) {
|
|
122
|
+
const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_Component_meta_1.A_ComponentMeta();
|
|
123
|
+
metaStorage.set(property, new A_Component_meta_1.A_ComponentMeta().from(inheritMeta));
|
|
124
|
+
}
|
|
125
|
+
meta = metaStorage.get(property);
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
default: {
|
|
129
|
+
metaStorage = instance.customMeta;
|
|
130
|
+
property = typeof param1 === 'function' ? param1 : param1.constructor;
|
|
131
|
+
if (!metaStorage.has(property)) {
|
|
132
|
+
const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_Meta_class_1.A_Meta();
|
|
133
|
+
metaStorage.set(property, new A_Meta_class_1.A_Meta().from(inheritMeta));
|
|
134
|
+
}
|
|
135
|
+
meta = metaStorage.get(property);
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// const inheritMeta: T = metaStorage.get(Object.getPrototypeOf(property)) || new A_Meta() as T;
|
|
140
|
+
// // we just know that the type of parent meta is the same as the type of the current meta
|
|
141
|
+
// const meta = metaStorage.get(property);
|
|
142
|
+
return meta;
|
|
143
|
+
}
|
|
144
|
+
static scope(param1) {
|
|
145
|
+
const instance = this.getInstance();
|
|
146
|
+
switch (true) {
|
|
147
|
+
case param1 instanceof A_Container_class_1.A_Container:
|
|
148
|
+
return instance.containers.get(param1);
|
|
149
|
+
case param1 instanceof A_Feature_class_1.A_Feature:
|
|
150
|
+
return instance.features.get(param1);
|
|
151
|
+
case param1 instanceof A_Concept_class_1.A_Concept:
|
|
152
|
+
return instance.concepts.get(param1);
|
|
153
|
+
default:
|
|
154
|
+
throw new Error(`[!] A-Concept Context: Unknown type of the parameter.`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
58
157
|
static register(param1, param2) {
|
|
59
158
|
const instance = this.getInstance();
|
|
60
|
-
let
|
|
61
|
-
let
|
|
159
|
+
let fragment;
|
|
160
|
+
let name;
|
|
62
161
|
if (typeof param2 === 'string') {
|
|
63
|
-
|
|
64
|
-
|
|
162
|
+
name = param2;
|
|
163
|
+
fragment = param1;
|
|
65
164
|
}
|
|
66
165
|
else {
|
|
67
|
-
|
|
68
|
-
|
|
166
|
+
fragment = param1;
|
|
167
|
+
name = fragment.name;
|
|
69
168
|
}
|
|
70
169
|
/**
|
|
71
170
|
* If the namespace is not provided, then use the root namespace.
|
|
72
171
|
* If the root namespace is not provided, then use the default namespace.
|
|
73
172
|
*/
|
|
74
|
-
if (!
|
|
75
|
-
|
|
173
|
+
if (!name)
|
|
174
|
+
name = this.root
|
|
76
175
|
|| process.env.ADAAS_NAMESPACE
|
|
77
176
|
|| process.env.A_NAMESPACE
|
|
78
177
|
|| process.env.ADAAS_APP_NAMESPACE
|
|
79
178
|
|| 'a-concept';
|
|
80
179
|
if (!this.root)
|
|
81
|
-
instance._root =
|
|
82
|
-
instance.
|
|
83
|
-
return
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Get the Namespace by namespace.
|
|
87
|
-
* @param namespace
|
|
88
|
-
*/
|
|
89
|
-
static get(namespace) {
|
|
90
|
-
const instance = this.getInstance();
|
|
91
|
-
return instance.namespaced.get(namespace);
|
|
92
|
-
}
|
|
93
|
-
static resolve(param1, param2) {
|
|
94
|
-
switch (true) {
|
|
95
|
-
// If the first parameter is a Namespace
|
|
96
|
-
case Array.isArray(param1) && param1.every(namespace => a_utils_1.A_CommonHelper.isInheritedFrom(namespace, A_Namespace_class_1.A_Namespace)):
|
|
97
|
-
return param1.map(namespace => this.resolveNamespace(namespace));
|
|
98
|
-
// If the first parameter is a Namespace and the second parameter is a string
|
|
99
|
-
case !!param2 && typeof param1 === 'function' && a_utils_1.A_CommonHelper.isInheritedFrom(param1, A_Namespace_class_1.A_Namespace):
|
|
100
|
-
return this.resolveNamespace(param1, param2);
|
|
101
|
-
// If the first parameter is a Component
|
|
102
|
-
case !!param2 && typeof param1 === 'function' && a_utils_1.A_CommonHelper.isInheritedFrom(param1, A_Component_class_1.A_Component):
|
|
103
|
-
return this.resolveComponent(param1);
|
|
104
|
-
default:
|
|
105
|
-
throw new Error(`[!] A-Concept Context: Unknown type of the parameter.`);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
static resolveComponent(component) {
|
|
109
|
-
const instance = this.getInstance();
|
|
110
|
-
return instance.components.get(component.name);
|
|
111
|
-
}
|
|
112
|
-
static resolveNamespace(param1, param2) {
|
|
113
|
-
const instance = this.getInstance();
|
|
114
|
-
return instance.namespaced.get(param2 || param1.name);
|
|
180
|
+
instance._root = name;
|
|
181
|
+
// instance.namedFragments.set(namespace, Namespace);
|
|
182
|
+
return name;
|
|
115
183
|
}
|
|
116
184
|
}
|
|
117
185
|
exports.A_Context = A_Context;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Context.class.js","sourceRoot":"","sources":["../../../../src/global/A-Context/A-Context.class.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"A-Context.class.js","sourceRoot":"","sources":["../../../../src/global/A-Context/A-Context.class.ts"],"names":[],"mappings":";;;AAAA,4CAAkF;AAClF,wEAA+D;AAE/D,kEAAyD;AACzD,wEAA+D;AAC/D,4DAAmD;AAEnD,yDAAgD;AAChD,sEAAkE;AAClE,sEAAkE;AAClE,kEAAyD;AAGzD;;;;;;GAMG;AACH,MAAa,SAAS;IAuClB;QAnCA;;WAEG;QACO,eAAU,GAAuC,IAAI,OAAO,EAAE,CAAC;QAEzE;;WAEG;QACO,aAAQ,GAAgC,IAAI,OAAO,EAAE,CAAC;QAEhE;;WAEG;QACO,aAAQ,GAAqC,IAAI,OAAO,EAAE,CAAC;QAIrE;;WAEG;QACH,wGAAwG;QAE9F,iBAAY,GAAmD,IAAI,GAAG,EAAE,CAAC;QACzE,mBAAc,GAAyD,IAAI,GAAG,EAAE,CAAC;QACjF,mBA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zB,IAAI,IAAY,CAAC;QAEjB,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC7B,IAAI,GAAG,MAAM,CAAC;YACd,QAAQ,GAAG,MAAM,CAAC;QACtB,CAAC;aAAM,CAAC;YACJ,QAAQ,GAAG,MAAoB,CAAC;YAChC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;QACzB,CAAC;QAED;;;WAGG;QACH,IAAI,CAAC,IAAI;YACL,IAAI,GAAG,IAAI,CAAC,IAAI;mBACT,OAAO,CAAC,GAAG,CAAC,eAAe;mBAC3B,OAAO,CAAC,GAAG,CAAC,WAAW;mBACvB,OAAO,CAAC,GAAG,CAAC,mBAAmB;mBAC/B,WAAW,CAAA;QAItB,IAAI,CAAC,IAAI,CAAC,IAAI;YACV,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC;QAE1B,qDAAqD;QAErD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAxTD,8BAwTC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { A_Scope } from "../A-Scope/A-Scope.class";
|
|
2
|
+
export type A_TYPES__ContextExecutionPipeline = {
|
|
3
|
+
scope: A_Scope;
|
|
4
|
+
steps: A_TYPES__ContextExecutionPipelineStep[];
|
|
5
|
+
};
|
|
6
|
+
export type A_TYPES__ContextExecutionPipelineStep = {
|
|
7
|
+
component: {
|
|
8
|
+
new (...args: any[]): any;
|
|
9
|
+
};
|
|
10
|
+
handler: string;
|
|
11
|
+
args: any[];
|
|
12
|
+
};
|