@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,46 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type A_TYPES__ConceptLifecycle_MethodDeclarationConfig = {
|
|
4
|
-
/**
|
|
5
|
-
* The name of the method. If not provided, the name of the function will be used.
|
|
6
|
-
* The name is connected to the class name.
|
|
7
|
-
* e.g. 'YourClass.yourMethod'
|
|
8
|
-
*/
|
|
9
|
-
name: string,
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Allows to override the method with a new implementation.
|
|
13
|
-
* The methods listed will not be called.
|
|
14
|
-
* e.g. ['YourClass.yourMethod']
|
|
15
|
-
*/
|
|
16
|
-
override: Array<string> | string | Function,
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Defines a flexible dependency management mechanism to enable pipeline-like behavior.
|
|
20
|
-
* The target method will be called before the methods listed.
|
|
21
|
-
* e.g. ['YourClass.yourMethod']
|
|
22
|
-
*/
|
|
23
|
-
before: Array<string> | string | Function,
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Defines a flexible dependency management mechanism to enable pipeline-like behavior.
|
|
27
|
-
* The target method will be called after the methods listed.
|
|
28
|
-
* e.g. ['YourClass.yourMethod']
|
|
29
|
-
*/
|
|
30
|
-
after: Array<string> | string | Function,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Allows to define a behavior of the method
|
|
35
|
-
* Sync - blocks other Concept Lifecycle methods until the method is ready
|
|
36
|
-
* Async - allows to initialize method after Concept Lifecycle initialization
|
|
37
|
-
*/
|
|
38
|
-
behavior: 'sync' | 'async',
|
|
39
|
-
type: 'extension' | 'pipe'
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export type A_TYPES__ConceptLifecycle_MethodDeclarationStorage = {
|
|
46
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { A_TYPES__A_LoadDecoratorConfig, A_TYPES__A_LoadDecoratorDescriptor, A_TYPES__A_LoadDecoratorStorageInstruction } from "./A-Load.decorator.types";
|
|
2
|
-
import { A_CONCEPT_ModulesDeclarationStorage, A_CONCEPT_STORAGE__MODULE_DECLARATION_Lifecycle_RootLoad } from "src/storage/A_Concept.storage";
|
|
3
|
-
import { A_CommonHelper } from "@adaas/a-utils";
|
|
4
|
-
import { A_CONSTANTS__DEFAULT_CONCEPT_LIFECYCLE_METHOD_DECLARATION_CONFIG } from "@adaas/a-concept/constants/A_ConceptLifecycle.constants";
|
|
5
|
-
import { A_Container } from "@adaas/a-concept/global/A-Container/A-Container.class";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* A-Load decorator
|
|
12
|
-
*
|
|
13
|
-
* This Decorator allows to an extended flow of Concept loading.
|
|
14
|
-
*
|
|
15
|
-
* @param params
|
|
16
|
-
* @returns
|
|
17
|
-
*/
|
|
18
|
-
export function A_Load(
|
|
19
|
-
config: Partial<A_TYPES__A_LoadDecoratorConfig> = {}
|
|
20
|
-
) {
|
|
21
|
-
|
|
22
|
-
return function (
|
|
23
|
-
target: A_Container,
|
|
24
|
-
propertyKey: string,
|
|
25
|
-
descriptor: A_TYPES__A_LoadDecoratorDescriptor
|
|
26
|
-
) {
|
|
27
|
-
const targetProperty: Symbol = A_CONCEPT_STORAGE__MODULE_DECLARATION_Lifecycle_RootLoad;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const existedMeta = A_CONCEPT_ModulesDeclarationStorage.get(target.constructor) || new Map();
|
|
32
|
-
const inheritMeta = A_CONCEPT_ModulesDeclarationStorage.get(Object.getPrototypeOf(target.constructor)) || new Map();
|
|
33
|
-
|
|
34
|
-
const inheritedInstructions = inheritMeta.get(targetProperty) || [];
|
|
35
|
-
const instructions: Array<A_TYPES__A_LoadDecoratorStorageInstruction> = existedMeta.get(targetProperty) || [...inheritedInstructions];
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* That's is needed to remove the previous definition of the method from parent classes
|
|
39
|
-
* and override it with the new one
|
|
40
|
-
*/
|
|
41
|
-
const targetInstructions = instructions
|
|
42
|
-
.filter(
|
|
43
|
-
(instr: A_TYPES__A_LoadDecoratorStorageInstruction) => instr.handler !== propertyKey
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
targetInstructions.push({
|
|
47
|
-
handler: propertyKey,
|
|
48
|
-
config: A_CommonHelper.deepCloneAndMerge(config, A_CONSTANTS__DEFAULT_CONCEPT_LIFECYCLE_METHOD_DECLARATION_CONFIG)
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
existedMeta.set(targetProperty, targetInstructions);
|
|
52
|
-
|
|
53
|
-
A_CONCEPT_ModulesDeclarationStorage.set(target.constructor, existedMeta);
|
|
54
|
-
};
|
|
55
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { A_TYPES__ConceptLifecycle_MethodDeclarationConfig } from "../A-ConceptLifecycle.decorator.types"
|
|
2
|
-
|
|
3
|
-
export type A_TYPES__A_LoadDecoratorDescriptor =
|
|
4
|
-
TypedPropertyDescriptor<(
|
|
5
|
-
...args: any[]
|
|
6
|
-
) => void>
|
|
7
|
-
|
|
|
8
|
-
TypedPropertyDescriptor<(
|
|
9
|
-
...args: any[]
|
|
10
|
-
) => Promise<void>>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export type A_TYPES__A_LoadDecoratorConfig = {
|
|
14
|
-
} & A_TYPES__ConceptLifecycle_MethodDeclarationConfig
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export type A_TYPES__A_LoadDecoratorStorageInstruction = {
|
|
18
|
-
handler: string,
|
|
19
|
-
config: A_TYPES__A_LoadDecoratorConfig
|
|
20
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { A_TYPES__A_RunDecoratorConfig, A_TYPES__A_RunDecoratorDescriptor, A_TYPES__A_RunDecoratorStorageInstruction } from "./A-Run.decorator.types";
|
|
2
|
-
import { A_CONCEPT_ModulesDeclarationStorage, A_CONCEPT_STORAGE__MODULE_DECLARATION_Lifecycle_RootRun } from "src/storage/A_Concept.storage";
|
|
3
|
-
import { A_CommonHelper } from "@adaas/a-utils";
|
|
4
|
-
import { A_CONSTANTS__DEFAULT_CONCEPT_LIFECYCLE_METHOD_DECLARATION_CONFIG } from "@adaas/a-concept/constants/A_ConceptLifecycle.constants";
|
|
5
|
-
import { A_Container } from "@adaas/a-concept/global/A-Container/A-Container.class";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* A-Run decorator
|
|
13
|
-
*
|
|
14
|
-
* This decorator is used to define a method that will be executed during the lifecycle of the module.
|
|
15
|
-
* Depending on the definition and configurations
|
|
16
|
-
* it will be executed during the run command
|
|
17
|
-
* modifying and adjusting the whole [root.run] pipeline.
|
|
18
|
-
*
|
|
19
|
-
* This decorator can be used in case of the need to define a custom logic that will be executed during the run command.
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* @param params
|
|
23
|
-
* @returns
|
|
24
|
-
*/
|
|
25
|
-
export function A_Run(
|
|
26
|
-
config: Partial<A_TYPES__A_RunDecoratorConfig> = {}
|
|
27
|
-
) {
|
|
28
|
-
|
|
29
|
-
return function (
|
|
30
|
-
target: A_Container,
|
|
31
|
-
propertyKey: string,
|
|
32
|
-
descriptor: A_TYPES__A_RunDecoratorDescriptor
|
|
33
|
-
) {
|
|
34
|
-
const targetProperty: Symbol = A_CONCEPT_STORAGE__MODULE_DECLARATION_Lifecycle_RootRun;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const existedMeta = A_CONCEPT_ModulesDeclarationStorage.get(target.constructor) || new Map();
|
|
39
|
-
const inheritMeta = A_CONCEPT_ModulesDeclarationStorage.get(Object.getPrototypeOf(target.constructor)) || new Map();
|
|
40
|
-
|
|
41
|
-
const inheritedInstructions = inheritMeta.get(targetProperty) || [];
|
|
42
|
-
const instructions: Array<A_TYPES__A_RunDecoratorStorageInstruction> = existedMeta.get(targetProperty) || [...inheritedInstructions];
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* That's is needed to remove the previous definition of the method from parent classes
|
|
46
|
-
* and override it with the new one
|
|
47
|
-
*/
|
|
48
|
-
const targetInstructions = instructions
|
|
49
|
-
.filter(
|
|
50
|
-
(instr: A_TYPES__A_RunDecoratorStorageInstruction) => instr.handler !== propertyKey
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
targetInstructions.push({
|
|
54
|
-
handler: propertyKey,
|
|
55
|
-
config: A_CommonHelper.deepCloneAndMerge(config, A_CONSTANTS__DEFAULT_CONCEPT_LIFECYCLE_METHOD_DECLARATION_CONFIG)
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
existedMeta.set(targetProperty, targetInstructions);
|
|
59
|
-
|
|
60
|
-
A_CONCEPT_ModulesDeclarationStorage.set(target.constructor, existedMeta);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { A_TYPES__A_CONCEPT_RootRunParams } from "@adaas/a-concept/global/A-Concept/A_Concept.types"
|
|
2
|
-
import { A_TYPES__ConceptLifecycle_MethodDeclarationConfig } from "../A-ConceptLifecycle.decorator.types"
|
|
3
|
-
|
|
4
|
-
export type A_TYPES__A_RunDecoratorDescriptor =
|
|
5
|
-
TypedPropertyDescriptor<(
|
|
6
|
-
params: A_TYPES__A_CONCEPT_RootRunParams
|
|
7
|
-
) => any>
|
|
8
|
-
|
|
|
9
|
-
TypedPropertyDescriptor<(
|
|
10
|
-
) => any>
|
|
11
|
-
|
|
|
12
|
-
TypedPropertyDescriptor<(
|
|
13
|
-
params: A_TYPES__A_CONCEPT_RootRunParams
|
|
14
|
-
) => Promise<any>>
|
|
15
|
-
|
|
|
16
|
-
TypedPropertyDescriptor<(
|
|
17
|
-
) => Promise<any>>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export type A_TYPES__A_RunDecoratorConfig = {
|
|
21
|
-
|
|
22
|
-
} & A_TYPES__ConceptLifecycle_MethodDeclarationConfig
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export type A_TYPES__A_RunDecoratorStorageInstruction = {
|
|
26
|
-
handler: string,
|
|
27
|
-
config: A_TYPES__A_RunDecoratorConfig
|
|
28
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
function RegisterLazyMethod(
|
|
2
|
-
target: any,
|
|
3
|
-
propertyKey: string,
|
|
4
|
-
descriptor: PropertyDescriptor
|
|
5
|
-
) {
|
|
6
|
-
const originalMethod = descriptor.value;
|
|
7
|
-
|
|
8
|
-
descriptor.value = function (...args: any[]) {
|
|
9
|
-
console.log(`Intercepted call to method: ${propertyKey}`);
|
|
10
|
-
console.log(`Arguments: `, args);
|
|
11
|
-
|
|
12
|
-
// You can modify args or do something else here
|
|
13
|
-
const result = originalMethod.apply(this, args);
|
|
14
|
-
|
|
15
|
-
// You can also modify the return value
|
|
16
|
-
console.log(`Result: `, result);
|
|
17
|
-
return result;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return descriptor;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export function A_Lazy(
|
|
26
|
-
params: {
|
|
27
|
-
source: string;
|
|
28
|
-
}
|
|
29
|
-
) {
|
|
30
|
-
return RegisterLazyMethod;
|
|
31
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Namespace Constructor Interface
|
|
3
|
-
*/
|
|
4
|
-
export type A_TYPES__NamespaceConstructor = {
|
|
5
|
-
name?: string,
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Namespace Interface
|
|
11
|
-
*/
|
|
12
|
-
export interface A_TYPES__INamespace {
|
|
13
|
-
name: string;
|
|
14
|
-
ready: Promise<void>
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Global Namespace Interface uses for extending the Namespace from other modules or SDKs
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
export interface A_TYPES__IGlobalNamespace extends A_TYPES__INamespace {
|
|
23
|
-
|
|
24
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// --------------------------------------------------------------
|
|
4
|
-
// ----- A Concept -> Module Declaration -> Main Config ---------
|
|
5
|
-
// --------------------------------------------------------------
|
|
6
|
-
export const A_CONCEPT_STORAGE__MODULE_DECLARATION_Config = Symbol('a-concept-modules-declaration');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// -------------------------------------------------------------------------------
|
|
11
|
-
// ----- A Concept -> Module Declaration -> Concept Lifecycle Extension_ ---------
|
|
12
|
-
// -------------------------------------------------------------------------------
|
|
13
|
-
export const A_CONCEPT_STORAGE__MODULE_DECLARATION_Lifecycle_RootRun = Symbol('a-concept-modules-declaration-lifecycle-root-run');
|
|
14
|
-
export const A_CONCEPT_STORAGE__MODULE_DECLARATION_Lifecycle_RootLoad = Symbol('a-concept-modules-declaration-lifecycle-root-load');
|
|
15
|
-
export const A_CONCEPT_STORAGE__MODULE_DECLARATION_Lifecycle_RootBuild = Symbol('a-concept-modules-declaration-lifecycle-root-build');
|
|
16
|
-
export const A_CONCEPT_STORAGE__MODULE_DECLARATION_Lifecycle_RootPublish = Symbol('a-concept-modules-declaration-lifecycle-root-publish');
|
|
17
|
-
export const A_CONCEPT_STORAGE__MODULE_DECLARATION_Lifecycle_RootTest = Symbol('a-concept-modules-declaration-lifecycle-root-test');
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Storage to keep the module declarations across all modules
|
|
24
|
-
*/
|
|
25
|
-
export const A_CONCEPT_ModulesDeclarationStorage: WeakMap<
|
|
26
|
-
any,
|
|
27
|
-
Map<string | Symbol, any>
|
|
28
|
-
> = new WeakMap();
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Storage to keep the lifecycle declarations across all modules
|
|
34
|
-
*/
|
|
35
|
-
export const A_CONCEPT_LifecycleDeclarationsStorage: Map<Symbol, any> = new Map();
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The simplest way to store the decorators
|
|
43
|
-
* If any extra API is needed, it can be added here or replaced with a new class
|
|
44
|
-
*/
|
|
45
|
-
export const A_CONCEPT_Storage = new WeakMap();
|
/package/{src/containers/A-Logger/A-Logger.types.ts → dist/src/base/A-Logger/A-Logger.types.d.ts}
RENAMED
|
File without changes
|
/package/{src/decorators/A_ConceptMethods.decorator.ts → dist/src/global/A-Meta/A-Meta.types.d.ts}
RENAMED
|
File without changes
|