@adaas/a-concept 0.0.32 → 0.0.34
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/README.md +156 -8
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/src/base/A-Config/A-Config.container.d.ts +5 -2
- package/dist/src/base/A-Config/A-Config.container.js +7 -2
- package/dist/src/base/A-Config/A-Config.container.js.map +1 -1
- package/dist/src/base/A-Config/components/ConfigReader.component.js +1 -1
- package/dist/src/base/A-Config/components/ConfigReader.component.js.map +1 -1
- package/dist/src/base/A-Config/components/FileConfigReader.component.js.map +1 -1
- package/dist/src/base/A-Errors/A-Errors.component.js +3 -3
- package/dist/src/base/A-Errors/A-Errors.component.js.map +1 -1
- package/dist/src/base/A-Errors/A-Errors.context.js.map +1 -1
- package/dist/src/base/A-Logger/A-Logger.component.js.map +1 -1
- package/dist/src/decorators/A-Abstraction/{A-Abstraction.decorator.d.ts → A-Abstraction-Extend.decorator.d.ts} +1 -1
- package/dist/src/decorators/A-Abstraction/{A-Abstraction.decorator.js → A-Abstraction-Extend.decorator.js} +6 -6
- package/dist/src/decorators/A-Abstraction/A-Abstraction-Extend.decorator.js.map +1 -0
- package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.types.d.ts +1 -1
- package/dist/src/decorators/A-Connect/A-Connect.decorator.js.map +1 -1
- package/dist/src/decorators/A-Entity/A-Entity.decorator.types.d.ts +1 -1
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.d.ts +3 -3
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js +20 -4
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js.map +1 -1
- package/dist/src/decorators/A-Feature/A-Feature.decorator.types.d.ts +3 -2
- package/dist/src/decorators/A-Inject/A-Inject.decorator.d.ts +1 -1
- package/dist/src/decorators/A-Inject/A-Inject.decorator.js +23 -2
- 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 +3 -3
- package/dist/src/global/A-Abstraction/A-Abstraction.class.d.ts +40 -0
- package/dist/src/global/A-Abstraction/A-Abstraction.class.js +113 -0
- package/dist/src/global/A-Abstraction/A-Abstraction.class.js.map +1 -0
- package/dist/src/global/A-Abstraction/A-Abstraction.types.d.ts +13 -0
- package/dist/src/global/A-Abstraction/A-Abstraction.types.js +11 -0
- package/dist/src/global/A-Abstraction/A-Abstraction.types.js.map +1 -0
- package/dist/src/global/A-Channel/A-Channel.class.js +0 -1
- package/dist/src/global/A-Channel/A-Channel.class.js.map +1 -1
- package/dist/src/global/A-Channel/A-Channel.types.d.ts +2 -1
- package/dist/src/global/A-Component/A-Component.class.d.ts +5 -30
- package/dist/src/global/A-Component/A-Component.class.js +6 -10
- package/dist/src/global/A-Component/A-Component.class.js.map +1 -1
- package/dist/src/global/A-Component/A-Component.meta.d.ts +9 -2
- package/dist/src/global/A-Component/A-Component.meta.js +10 -1
- package/dist/src/global/A-Component/A-Component.meta.js.map +1 -1
- package/dist/src/global/A-Concept/A_Concept.class.d.ts +43 -20
- package/dist/src/global/A-Concept/A_Concept.class.js +77 -65
- package/dist/src/global/A-Concept/A_Concept.class.js.map +1 -1
- package/dist/src/global/A-Concept/A_Concept.meta.d.ts +10 -0
- package/dist/src/global/A-Concept/A_Concept.meta.js +20 -0
- package/dist/src/global/A-Concept/A_Concept.meta.js.map +1 -1
- package/dist/src/global/A-Concept/A_Concept.types.d.ts +9 -6
- package/dist/src/global/A-Container/A-Container.class.d.ts +7 -50
- package/dist/src/global/A-Container/A-Container.class.js +9 -19
- package/dist/src/global/A-Container/A-Container.class.js.map +1 -1
- package/dist/src/global/A-Container/A-Container.meta.d.ts +15 -0
- package/dist/src/global/A-Container/A-Container.meta.js +20 -0
- package/dist/src/global/A-Container/A-Container.meta.js.map +1 -1
- package/dist/src/global/A-Context/A-Context.class.d.ts +21 -21
- package/dist/src/global/A-Context/A-Context.class.js +60 -15
- package/dist/src/global/A-Context/A-Context.class.js.map +1 -1
- package/dist/src/global/A-Entity/A-Entity.class.d.ts +10 -18
- package/dist/src/global/A-Entity/A-Entity.class.js +21 -31
- package/dist/src/global/A-Entity/A-Entity.class.js.map +1 -1
- package/dist/src/global/A-Entity/A-Entity.meta.js.map +1 -1
- package/dist/src/global/A-Entity/A-Entity.types.d.ts +3 -2
- package/dist/src/global/A-Entity/A-Entity.types.js +1 -0
- package/dist/src/global/A-Entity/A-Entity.types.js.map +1 -1
- package/dist/src/global/A-Feature/A-Feature.class.d.ts +2 -1
- package/dist/src/global/A-Feature/A-Feature.class.js +14 -4
- package/dist/src/global/A-Feature/A-Feature.class.js.map +1 -1
- package/dist/src/global/A-Feature/A-Feature.types.d.ts +9 -0
- package/dist/src/global/A-Feature/A-Feature.types.js.map +1 -1
- package/dist/src/global/A-Meta/A-Meta.class.d.ts +1 -0
- package/dist/src/global/A-Meta/A-Meta.class.js +3 -6
- package/dist/src/global/A-Meta/A-Meta.class.js.map +1 -1
- package/dist/src/global/A-Scope/A-Scope.class.d.ts +4 -2
- package/dist/src/global/A-Scope/A-Scope.class.js +25 -16
- package/dist/src/global/A-Scope/A-Scope.class.js.map +1 -1
- package/dist/src/global/A-Scope/A-Scope.types.d.ts +4 -6
- package/dist/src/global/A-Stage/A-Stage.class.d.ts +3 -3
- package/dist/src/global/A-Stage/A-Stage.class.js +11 -10
- package/dist/src/global/A-Stage/A-Stage.class.js.map +1 -1
- package/dist/src/global/A-Stage/A-Stage.types.d.ts +1 -1
- package/dist/src/global/A-Stage/A-Stage.types.js.map +1 -1
- package/dist/src/helpers/StepsManager.class.d.ts +1 -0
- package/dist/src/helpers/StepsManager.class.js +10 -7
- package/dist/src/helpers/StepsManager.class.js.map +1 -1
- package/docs/a-concept-logo.png +0 -0
- package/docs/a-logo-docs.png +0 -0
- package/examples/fe-be/channels/Test.channel.ts +6 -3
- package/examples/simple/components/A.component.ts +7 -0
- package/examples/simple/components/B.component.ts +9 -0
- package/examples/simple/concept.ts +38 -60
- package/examples/simple/containers/Main.container.ts +25 -12
- package/examples/simple/entities/EntityA.entity.ts +3 -5
- package/examples/simple-http-server/components/http-request-handler.component.ts +6 -4
- package/examples/simple-http-server/concept.ts +24 -21
- package/examples/simple-http-server/containers/http-server.container.ts +4 -3
- package/index.ts +4 -1
- package/package.json +6 -2
- package/src/base/A-Config/A-Config.container.ts +12 -4
- package/src/base/A-Config/components/ConfigReader.component.ts +4 -5
- package/src/base/A-Config/components/FileConfigReader.component.ts +0 -2
- package/src/base/A-Errors/A-Error.entity.ts +1 -1
- package/src/base/A-Errors/A-Errors.component.ts +3 -3
- package/src/base/A-Errors/A-Errors.context.ts +2 -1
- package/src/base/A-Logger/A-Logger.component.ts +0 -1
- package/src/decorators/A-Abstraction/{A-Abstraction.decorator.ts → A-Abstraction-Extend.decorator.ts} +5 -6
- package/src/decorators/A-Abstraction/A-Abstraction.decorator.types.ts +1 -1
- package/src/decorators/A-Connect/A-Connect.decorator.ts +1 -1
- package/src/decorators/A-Entity/A-Entity.decorator.types.ts +1 -1
- package/src/decorators/A-Feature/A-Feature-Define.decorator.ts +37 -10
- package/src/decorators/A-Feature/A-Feature.decorator.types.ts +12 -12
- package/src/decorators/A-Inject/A-Inject.decorator.ts +31 -4
- package/src/decorators/A-Inject/A-Inject.decorator.types.ts +4 -3
- package/src/global/A-Abstraction/A-Abstraction.class.ts +130 -0
- package/src/global/A-Abstraction/A-Abstraction.types.ts +22 -0
- package/src/global/A-Channel/A-Channel.class.ts +0 -2
- package/src/global/A-Channel/A-Channel.types.ts +2 -1
- package/src/global/A-Component/A-Component.class.ts +12 -52
- package/src/global/A-Component/A-Component.meta.ts +19 -2
- package/src/global/A-Concept/A_Concept.class.ts +109 -111
- package/src/global/A-Concept/A_Concept.meta.ts +68 -0
- package/src/global/A-Concept/A_Concept.types.ts +11 -4
- package/src/global/A-Container/A-Container.class.ts +11 -90
- package/src/global/A-Container/A-Container.meta.ts +33 -0
- package/src/global/A-Context/A-Context.class.ts +139 -56
- package/src/global/A-Entity/A-Entity.class.ts +22 -69
- package/src/global/A-Entity/A-Entity.meta.ts +3 -2
- package/src/global/A-Entity/A-Entity.types.ts +2 -1
- package/src/global/A-Feature/A-Feature.class.ts +18 -7
- package/src/global/A-Feature/A-Feature.types.ts +10 -2
- package/src/global/A-Meta/A-Meta.class.ts +5 -8
- package/src/global/A-Scope/A-Scope.class.ts +40 -21
- package/src/global/A-Scope/A-Scope.types.ts +8 -2
- package/src/global/A-Stage/A-Stage.class.ts +20 -20
- package/src/global/A-Stage/A-Stage.types.ts +2 -3
- package/src/helpers/StepsManager.class.ts +11 -7
- package/trace-require.js +46 -0
- package/tsconfig.build.json +57 -0
- package/dist/examples/fe-be/channels/Test.channel.d.ts +0 -6
- package/dist/examples/fe-be/channels/Test.channel.js +0 -14
- package/dist/examples/fe-be/channels/Test.channel.js.map +0 -1
- package/dist/examples/fe-be/components/BE-Controller.component.d.ts +0 -4
- package/dist/examples/fe-be/components/BE-Controller.component.js +0 -24
- package/dist/examples/fe-be/components/BE-Controller.component.js.map +0 -1
- package/dist/examples/fe-be/components/FE.component.d.ts +0 -4
- package/dist/examples/fe-be/components/FE.component.js +0 -31
- package/dist/examples/fe-be/components/FE.component.js.map +0 -1
- package/dist/examples/fe-be/components/UserActions.component.d.ts +0 -5
- package/dist/examples/fe-be/components/UserActions.component.js +0 -25
- package/dist/examples/fe-be/components/UserActions.component.js.map +0 -1
- package/dist/examples/fe-be/concept.d.ts +0 -0
- package/dist/examples/fe-be/concept.js +0 -2
- package/dist/examples/fe-be/concept.js.map +0 -1
- package/dist/examples/fe-be/containers/ServerApp.container.d.ts +0 -3
- package/dist/examples/fe-be/containers/ServerApp.container.js +0 -8
- package/dist/examples/fe-be/containers/ServerApp.container.js.map +0 -1
- package/dist/examples/fe-be/containers/WebApp.container.d.ts +0 -3
- package/dist/examples/fe-be/containers/WebApp.container.js +0 -8
- package/dist/examples/fe-be/containers/WebApp.container.js.map +0 -1
- package/dist/examples/multi-container/channels/Direct.channel.d.ts +0 -9
- package/dist/examples/multi-container/channels/Direct.channel.js +0 -32
- package/dist/examples/multi-container/channels/Direct.channel.js.map +0 -1
- package/dist/examples/multi-container/concept.d.ts +0 -0
- package/dist/examples/multi-container/concept.js +0 -2
- package/dist/examples/multi-container/concept.js.map +0 -1
- package/dist/examples/multi-container/containers/Command.container.d.ts +0 -11
- package/dist/examples/multi-container/containers/Command.container.js +0 -51
- package/dist/examples/multi-container/containers/Command.container.js.map +0 -1
- package/dist/examples/multi-container/containers/Schedule.container.d.ts +0 -15
- package/dist/examples/multi-container/containers/Schedule.container.js +0 -67
- package/dist/examples/multi-container/containers/Schedule.container.js.map +0 -1
- package/dist/examples/sdk/concept.d.ts +0 -0
- package/dist/examples/sdk/concept.js +0 -21
- package/dist/examples/sdk/concept.js.map +0 -1
- package/dist/examples/sdk/orders.api.d.ts +0 -0
- package/dist/examples/sdk/orders.api.js +0 -16
- package/dist/examples/sdk/orders.api.js.map +0 -1
- package/dist/examples/sdk/users.api.d.ts +0 -0
- package/dist/examples/sdk/users.api.js +0 -16
- package/dist/examples/sdk/users.api.js.map +0 -1
- package/dist/examples/simple/components/A.component.d.ts +0 -9
- package/dist/examples/simple/components/A.component.js +0 -60
- package/dist/examples/simple/components/A.component.js.map +0 -1
- package/dist/examples/simple/components/B.component.d.ts +0 -13
- package/dist/examples/simple/components/B.component.js +0 -88
- package/dist/examples/simple/components/B.component.js.map +0 -1
- package/dist/examples/simple/concept.d.ts +0 -1
- package/dist/examples/simple/concept.js +0 -82
- package/dist/examples/simple/concept.js.map +0 -1
- package/dist/examples/simple/containers/Main.container.d.ts +0 -11
- package/dist/examples/simple/containers/Main.container.js +0 -86
- package/dist/examples/simple/containers/Main.container.js.map +0 -1
- package/dist/examples/simple/context/Fragment_A.context.d.ts +0 -6
- package/dist/examples/simple/context/Fragment_A.context.js +0 -16
- package/dist/examples/simple/context/Fragment_A.context.js.map +0 -1
- package/dist/examples/simple/context/Fragment_B.context.d.ts +0 -6
- package/dist/examples/simple/context/Fragment_B.context.js +0 -16
- package/dist/examples/simple/context/Fragment_B.context.js.map +0 -1
- package/dist/examples/simple/entities/EntityA.entity.d.ts +0 -8
- package/dist/examples/simple/entities/EntityA.entity.js +0 -22
- package/dist/examples/simple/entities/EntityA.entity.js.map +0 -1
- package/dist/examples/simple-http-server/components/http-error-handler.component.d.ts +0 -10
- package/dist/examples/simple-http-server/components/http-error-handler.component.js +0 -65
- package/dist/examples/simple-http-server/components/http-error-handler.component.js.map +0 -1
- package/dist/examples/simple-http-server/components/http-request-handler.component.d.ts +0 -3
- package/dist/examples/simple-http-server/components/http-request-handler.component.js +0 -8
- package/dist/examples/simple-http-server/components/http-request-handler.component.js.map +0 -1
- package/dist/examples/simple-http-server/concept.d.ts +0 -1
- package/dist/examples/simple-http-server/concept.js +0 -35
- package/dist/examples/simple-http-server/concept.js.map +0 -1
- package/dist/examples/simple-http-server/containers/http-server.container.d.ts +0 -11
- package/dist/examples/simple-http-server/containers/http-server.container.js +0 -73
- package/dist/examples/simple-http-server/containers/http-server.container.js.map +0 -1
- package/dist/examples/simple-http-server/containers/http-server.controller.d.ts +0 -7
- package/dist/examples/simple-http-server/containers/http-server.controller.js +0 -37
- package/dist/examples/simple-http-server/containers/http-server.controller.js.map +0 -1
- package/dist/examples/simple-http-server/containers/http-server.router.d.ts +0 -6
- package/dist/examples/simple-http-server/containers/http-server.router.js +0 -39
- package/dist/examples/simple-http-server/containers/http-server.router.js.map +0 -1
- package/dist/examples/simple-http-server/contexts/http-request.context.d.ts +0 -12
- package/dist/examples/simple-http-server/contexts/http-request.context.js +0 -49
- package/dist/examples/simple-http-server/contexts/http-request.context.js.map +0 -1
- package/dist/examples/simple-http-server/contexts/http-server.context.types.d.ts +0 -0
- package/dist/examples/simple-http-server/contexts/http-server.context.types.js +0 -2
- package/dist/examples/simple-http-server/contexts/http-server.context.types.js.map +0 -1
- package/dist/examples/simple-http-server/contexts/http-server.namespace.d.ts +0 -10
- package/dist/examples/simple-http-server/contexts/http-server.namespace.js +0 -26
- package/dist/examples/simple-http-server/contexts/http-server.namespace.js.map +0 -1
- package/dist/examples/simple-http-server/controllers/orders.controller.d.ts +0 -5
- package/dist/examples/simple-http-server/controllers/orders.controller.js +0 -32
- package/dist/examples/simple-http-server/controllers/orders.controller.js.map +0 -1
- package/dist/examples/simple-http-server/controllers/users.controller.d.ts +0 -0
- package/dist/examples/simple-http-server/controllers/users.controller.js +0 -87
- package/dist/examples/simple-http-server/controllers/users.controller.js.map +0 -1
- package/dist/examples/simple-http-server/modules/simple-http-server.context.d.ts +0 -5
- package/dist/examples/simple-http-server/modules/simple-http-server.context.js +0 -25
- package/dist/examples/simple-http-server/modules/simple-http-server.context.js.map +0 -1
- package/dist/examples/simple-http-server/modules/simple-http-server.module.d.ts +0 -16
- package/dist/examples/simple-http-server/modules/simple-http-server.module.js +0 -8
- package/dist/examples/simple-http-server/modules/simple-http-server.module.js.map +0 -1
- package/dist/examples/simple-http-server/modules/simple-http-server.types.d.ts +0 -2
- package/dist/examples/simple-http-server/modules/simple-http-server.types.js +0 -3
- package/dist/examples/simple-http-server/modules/simple-http-server.types.js.map +0 -1
- package/dist/examples/simple-http-server/test.d.ts +0 -68
- package/dist/examples/simple-http-server/test.js +0 -162
- package/dist/examples/simple-http-server/test.js.map +0 -1
- package/dist/src/containers/A-Config/A-Config.container.d.ts +0 -7
- package/dist/src/containers/A-Config/A-Config.container.js +0 -65
- package/dist/src/containers/A-Config/A-Config.container.js.map +0 -1
- package/dist/src/containers/A-Config/A-Config.namespace.d.ts +0 -28
- package/dist/src/containers/A-Config/A-Config.namespace.js +0 -54
- package/dist/src/containers/A-Config/A-Config.namespace.js.map +0 -1
- package/dist/src/containers/A-Config/A-Config.types.d.ts +0 -12
- package/dist/src/containers/A-Config/A-Config.types.js +0 -3
- package/dist/src/containers/A-Config/A-Config.types.js.map +0 -1
- package/dist/src/containers/A-Config/components/ConfigReader.component.d.ts +0 -18
- package/dist/src/containers/A-Config/components/ConfigReader.component.js +0 -37
- package/dist/src/containers/A-Config/components/ConfigReader.component.js.map +0 -1
- package/dist/src/containers/A-Config/components/ENVConfigReader.component.d.ts +0 -10
- package/dist/src/containers/A-Config/components/ENVConfigReader.component.js +0 -37
- package/dist/src/containers/A-Config/components/ENVConfigReader.component.js.map +0 -1
- package/dist/src/containers/A-Config/components/FileConfigReader.component.d.ts +0 -11
- package/dist/src/containers/A-Config/components/FileConfigReader.component.js +0 -47
- package/dist/src/containers/A-Config/components/FileConfigReader.component.js.map +0 -1
- package/dist/src/containers/A-Errors/A-Errors.container.d.ts +0 -5
- package/dist/src/containers/A-Errors/A-Errors.container.js +0 -32
- package/dist/src/containers/A-Errors/A-Errors.container.js.map +0 -1
- package/dist/src/containers/A-Errors/A-Errors.namespace.d.ts +0 -40
- package/dist/src/containers/A-Errors/A-Errors.namespace.js +0 -76
- package/dist/src/containers/A-Errors/A-Errors.namespace.js.map +0 -1
- package/dist/src/containers/A-Errors/A-Errors.types.d.ts +0 -5
- package/dist/src/containers/A-Errors/A-Errors.types.js +0 -3
- package/dist/src/containers/A-Errors/A-Errors.types.js.map +0 -1
- package/dist/src/containers/A-Logger/A-Logger.container.d.ts +0 -6
- package/dist/src/containers/A-Logger/A-Logger.container.js +0 -41
- package/dist/src/containers/A-Logger/A-Logger.container.js.map +0 -1
- package/dist/src/containers/A-Logger/A-Logger.namespace.d.ts +0 -17
- package/dist/src/containers/A-Logger/A-Logger.namespace.js +0 -22
- package/dist/src/containers/A-Logger/A-Logger.namespace.js.map +0 -1
- package/dist/src/containers/A-Logger/A-Logger.types.d.ts +0 -0
- package/dist/src/containers/A-Logger/A-Logger.types.js +0 -2
- package/dist/src/containers/A-Logger/A-Logger.types.js.map +0 -1
- package/dist/src/containers/A-Logger/components/Logger.component.d.ts +0 -29
- package/dist/src/containers/A-Logger/components/Logger.component.js +0 -128
- package/dist/src/containers/A-Logger/components/Logger.component.js.map +0 -1
- package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.js.map +0 -1
- package/dist/src/decorators/A-ConceptLifecycle/A-ConceptLifecycle.decorator.types.d.ts +0 -34
- package/dist/src/decorators/A-ConceptLifecycle/A-ConceptLifecycle.decorator.types.js +0 -3
- package/dist/src/decorators/A-ConceptLifecycle/A-ConceptLifecycle.decorator.types.js.map +0 -1
- package/dist/src/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator.d.ts +0 -11
- package/dist/src/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator.js +0 -36
- package/dist/src/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator.js.map +0 -1
- package/dist/src/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator.types.d.ts +0 -7
- package/dist/src/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator.types.js +0 -3
- package/dist/src/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator.types.js.map +0 -1
- package/dist/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.d.ts +0 -17
- package/dist/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.js +0 -42
- package/dist/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.js.map +0 -1
- package/dist/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.types.d.ts +0 -8
- package/dist/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.types.js +0 -3
- package/dist/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.types.js.map +0 -1
- package/dist/src/decorators/A-ConceptLifecycle/index.d.ts +0 -7
- package/dist/src/decorators/A-ConceptLifecycle/index.js +0 -11
- package/dist/src/decorators/A-ConceptLifecycle/index.js.map +0 -1
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.d.ts +0 -16
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.js +0 -36
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.js.map +0 -1
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.types.d.ts +0 -8
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.types.js +0 -3
- package/dist/src/decorators/A-Define/Feature/Feature.decorator.types.js.map +0 -1
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.d.ts +0 -14
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.js +0 -24
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.js.map +0 -1
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.types.d.ts +0 -8
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.types.js +0 -3
- package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.types.js.map +0 -1
- package/dist/src/decorators/A-Define/index.d.ts +0 -7
- package/dist/src/decorators/A-Define/index.js +0 -10
- package/dist/src/decorators/A-Define/index.js.map +0 -1
- package/dist/src/decorators/A-Extend/A-Extend.decorator.d.ts +0 -18
- package/dist/src/decorators/A-Extend/A-Extend.decorator.js +0 -37
- package/dist/src/decorators/A-Extend/A-Extend.decorator.js.map +0 -1
- package/dist/src/decorators/A-Extend/A-Extend.decorator.types.d.ts +0 -21
- package/dist/src/decorators/A-Extend/A-Extend.decorator.types.js +0 -3
- package/dist/src/decorators/A-Extend/A-Extend.decorator.types.js.map +0 -1
- package/dist/src/decorators/A-Feature/A-Feature.decorator.d.ts +0 -0
- package/dist/src/decorators/A-Feature/A-Feature.decorator.js +0 -11
- package/dist/src/decorators/A-Feature/A-Feature.decorator.js.map +0 -1
- package/dist/src/decorators/A-Stage/A-Stage.decorator.d.ts +0 -13
- package/dist/src/decorators/A-Stage/A-Stage.decorator.js +0 -52
- package/dist/src/decorators/A-Stage/A-Stage.decorator.js.map +0 -1
- package/dist/src/decorators/A-Stage/A-Stage.decorator.types.d.ts +0 -2
- package/dist/src/decorators/A-Stage/A-Stage.decorator.types.js +0 -3
- package/dist/src/decorators/A-Stage/A-Stage.decorator.types.js.map +0 -1
- package/dist/src/decorators/A_ConceptMethods.decorator.d.ts +0 -0
- package/dist/src/decorators/A_ConceptMethods.decorator.js +0 -2
- package/dist/src/decorators/A_ConceptMethods.decorator.js.map +0 -1
- package/dist/src/decorators/A_Lazy.decorator.d.ts +0 -5
- package/dist/src/decorators/A_Lazy.decorator.js +0 -20
- package/dist/src/decorators/A_Lazy.decorator.js.map +0 -1
- package/dist/src/global/A-Context/A-ContextFragment.class.d.ts +0 -12
- package/dist/src/global/A-Context/A-ContextFragment.class.js +0 -19
- package/dist/src/global/A-Context/A-ContextFragment.class.js.map +0 -1
- package/dist/src/global/A-Namespace/A_Namespace.class.d.ts +0 -47
- package/dist/src/global/A-Namespace/A_Namespace.class.js +0 -112
- package/dist/src/global/A-Namespace/A_Namespace.class.js.map +0 -1
- package/dist/src/global/A-Namespace/A_Namespace.types.d.ts +0 -19
- package/dist/src/global/A-Namespace/A_Namespace.types.js +0 -3
- package/dist/src/global/A-Namespace/A_Namespace.types.js.map +0 -1
- package/dist/src/managers/A_DependencyManager.class.d.ts +0 -24
- package/dist/src/managers/A_DependencyManager.class.js +0 -129
- package/dist/src/managers/A_DependencyManager.class.js.map +0 -1
- package/dist/src/storage/A_Component.storage.d.ts +0 -10
- package/dist/src/storage/A_Component.storage.js +0 -17
- package/dist/src/storage/A_Component.storage.js.map +0 -1
- package/dist/src/storage/A_Concept.storage.d.ts +0 -19
- package/dist/src/storage/A_Concept.storage.js +0 -29
- package/dist/src/storage/A_Concept.storage.js.map +0 -1
- package/dist/src/storage/A_Container.storage.d.ts +0 -8
- package/dist/src/storage/A_Container.storage.js +0 -17
- package/dist/src/storage/A_Container.storage.js.map +0 -1
- package/dist/src/storage/A_Inject.storage.d.ts +0 -9
- package/dist/src/storage/A_Inject.storage.js +0 -13
- package/dist/src/storage/A_Inject.storage.js.map +0 -1
- package/dist/src/types/A_DependencyManager.types.d.ts +0 -15
- package/dist/src/types/A_DependencyManager.types.js +0 -3
- package/dist/src/types/A_DependencyManager.types.js.map +0 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { A_Abstraction_Extend } from "@adaas/a-concept/decorators/A-Abstraction/A-Abstraction-Extend.decorator";
|
|
2
|
+
import { A_Feature } from "../A-Feature/A-Feature.class";
|
|
3
|
+
import { A_TYPES__A_AbstractionConstructor, A_TYPES__AbstractionState } from "./A-Abstraction.types";
|
|
4
|
+
import { A_Error, A_TYPES__Required } from "@adaas/a-utils";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class A_Abstraction {
|
|
8
|
+
|
|
9
|
+
public name: string;
|
|
10
|
+
protected features: A_Feature[] = [];
|
|
11
|
+
protected _current?: A_Feature;
|
|
12
|
+
protected _index: number = 0;
|
|
13
|
+
|
|
14
|
+
state: A_TYPES__AbstractionState = A_TYPES__AbstractionState.INITIALIZED;
|
|
15
|
+
error?: A_Error
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Define a new A-Abstraction
|
|
21
|
+
*/
|
|
22
|
+
static get Extend(): typeof A_Abstraction_Extend {
|
|
23
|
+
return A_Abstraction_Extend;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
constructor(params: A_TYPES__Required<Partial<A_TYPES__A_AbstractionConstructor>, ['name', 'features']>) {
|
|
29
|
+
this.name = params.name;
|
|
30
|
+
this.features = params.features.map(def => new A_Feature(def));
|
|
31
|
+
|
|
32
|
+
this._current = this.features[0];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
get feature(): A_Feature | undefined {
|
|
37
|
+
return this._current;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[Symbol.iterator](): Iterator<A_Feature, any> {
|
|
41
|
+
return {
|
|
42
|
+
// Custom next method
|
|
43
|
+
next: (): IteratorResult<A_Feature, any> => {
|
|
44
|
+
if (!this.isDone()) {
|
|
45
|
+
|
|
46
|
+
this._current = this.features[this._index];
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
value: this._current,
|
|
50
|
+
done: false
|
|
51
|
+
};
|
|
52
|
+
} else {
|
|
53
|
+
|
|
54
|
+
this._current = undefined; // Reset current on end
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
value: undefined,
|
|
58
|
+
done: true
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* This method moves the feature to the next stage
|
|
67
|
+
*
|
|
68
|
+
* @param stage
|
|
69
|
+
*/
|
|
70
|
+
next(stage) {
|
|
71
|
+
const stageIndex = this.features.indexOf(stage);
|
|
72
|
+
|
|
73
|
+
this._index = stageIndex + 1;
|
|
74
|
+
|
|
75
|
+
if (this._index >= this.features.length) {
|
|
76
|
+
this.completed();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async completed(): Promise<void> {
|
|
81
|
+
this.state = A_TYPES__AbstractionState.COMPLETED;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* This method marks the feature as failed and throws an error
|
|
87
|
+
* Uses to interrupt or end the feature processing
|
|
88
|
+
*
|
|
89
|
+
* @param error
|
|
90
|
+
*/
|
|
91
|
+
async failed(
|
|
92
|
+
error: Error | A_Error | unknown
|
|
93
|
+
): Promise<void> {
|
|
94
|
+
this.error = error as A_Error;
|
|
95
|
+
this.state = A_TYPES__AbstractionState.FAILED;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* This method checks if the A-Feature is done
|
|
101
|
+
*
|
|
102
|
+
* @returns
|
|
103
|
+
*/
|
|
104
|
+
isDone(): boolean {
|
|
105
|
+
return !this.feature
|
|
106
|
+
|| this._index >= this.features.length
|
|
107
|
+
|| this.state === A_TYPES__AbstractionState.COMPLETED
|
|
108
|
+
|| this.state === A_TYPES__AbstractionState.FAILED;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
async process() {
|
|
113
|
+
if (this.isDone())
|
|
114
|
+
return;
|
|
115
|
+
try {
|
|
116
|
+
this.state = A_TYPES__AbstractionState.PROCESSING;
|
|
117
|
+
|
|
118
|
+
for (const feature of this.features) {
|
|
119
|
+
|
|
120
|
+
await feature.process();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
await this.completed();
|
|
124
|
+
|
|
125
|
+
} catch (error) {
|
|
126
|
+
await this.failed(error);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { A_TYPES__Required } from "@adaas/a-utils";
|
|
2
|
+
import { A_Container } from "../A-Container/A-Container.class";
|
|
3
|
+
import { A_TYPES__FeatureConstructor } from "../A-Feature/A-Feature.types";
|
|
4
|
+
import { A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types";
|
|
5
|
+
import { A_TYPES__A_StageStep } from "../A-Stage/A-Stage.types";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export type A_TYPES__A_AbstractionConstructor = {
|
|
10
|
+
name: string,
|
|
11
|
+
features: Array<A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps']>>
|
|
12
|
+
} & A_TYPES__ScopeConstructor
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export enum A_TYPES__AbstractionState {
|
|
17
|
+
INITIALIZED = "INITIALIZED",
|
|
18
|
+
PROCESSING = "PROCESSING",
|
|
19
|
+
|
|
20
|
+
COMPLETED = "COMPLETED",
|
|
21
|
+
FAILED = "FAILED",
|
|
22
|
+
}
|
|
@@ -38,8 +38,6 @@ export class A_Channel<
|
|
|
38
38
|
async call<_Resp extends any>(prop: A_TYPES__A_ChannelAggregateMethods<T>, params?: Partial<A_TYPES__A_ChannelCallParams>): Promise<_Resp> {
|
|
39
39
|
// do HTTP Call or just inject class or whatever you want
|
|
40
40
|
|
|
41
|
-
console.log('Calling method', prop);
|
|
42
|
-
|
|
43
41
|
return {} as _Resp;
|
|
44
42
|
}
|
|
45
43
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { A_Container } from "@adaas/a-concept/global/A-Container/A-Container.class";
|
|
1
2
|
import { A_Component } from "../A-Component/A-Component.class"
|
|
2
3
|
import { A_TYPES__ContainerCallParams } from "../A-Container/A-Container.types"
|
|
3
4
|
import { A_Fragment } from "../A-Fragment/A-Fragment.class"
|
|
@@ -80,7 +81,7 @@ export type A_TYPES__A_ExecutableMethods<T> = {
|
|
|
80
81
|
/**
|
|
81
82
|
* Returns a string set of possible methods that could be called on a set of provided set of A-Components
|
|
82
83
|
*/
|
|
83
|
-
export type A_TYPES__A_ChannelAggregateMethods<TClasses extends A_Component[]> = {
|
|
84
|
+
export type A_TYPES__A_ChannelAggregateMethods<TClasses extends (A_Component | A_Container)[]> = {
|
|
84
85
|
[K in keyof TClasses]: TClasses[K] extends infer Instance
|
|
85
86
|
? A_TYPES__A_ExecutableMethods<Instance>
|
|
86
87
|
: never;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { A_TYPES__Required } from "@adaas/a-utils";
|
|
2
1
|
import { A_Context } from "../A-Context/A-Context.class";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { A_TYPES__ComponentConstructor } from "./A-Component.types";
|
|
3
|
+
import { A_TYPES__FeatureCallParams } from "../A-Feature/A-Feature.types";
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
|
|
@@ -9,64 +8,25 @@ import { A_Scope } from "../A-Scope/A-Scope.class";
|
|
|
9
8
|
* This element only contains the specific code
|
|
10
9
|
*
|
|
11
10
|
*/
|
|
12
|
-
export class A_Component
|
|
13
|
-
_FeatureNames extends Array<string> = any,
|
|
14
|
-
> {
|
|
11
|
+
export class A_Component {
|
|
15
12
|
constructor(
|
|
16
|
-
params?: Partial<A_TYPES__ComponentConstructor<
|
|
17
|
-
) {
|
|
13
|
+
params?: Partial<A_TYPES__ComponentConstructor<any>>
|
|
14
|
+
) {
|
|
15
|
+
console.log('A-Component instance created', this);
|
|
18
16
|
|
|
17
|
+
}
|
|
19
18
|
|
|
20
|
-
/**
|
|
21
|
-
* Call a feature of the component
|
|
22
|
-
*
|
|
23
|
-
* @param lifecycleMethod
|
|
24
|
-
* @param args
|
|
25
|
-
*/
|
|
26
|
-
async call(
|
|
27
|
-
scope: A_Scope,
|
|
28
|
-
/**
|
|
29
|
-
* A-Feature method name to be called
|
|
30
|
-
*/
|
|
31
|
-
feature: _FeatureNames[number],
|
|
32
|
-
): Promise<any>
|
|
33
|
-
async call(
|
|
34
|
-
scope: A_Scope,
|
|
35
|
-
/**
|
|
36
|
-
* A-Feature name to be called
|
|
37
|
-
*/
|
|
38
|
-
params: A_TYPES__Required<Partial<A_TYPES__ComponentCallParams<_FeatureNames[number]>>, ['name']>,
|
|
39
|
-
): Promise<any>
|
|
40
19
|
|
|
41
20
|
async call(
|
|
42
|
-
scope: A_Scope,
|
|
43
|
-
/**
|
|
44
|
-
* A-Feature method name to be called
|
|
45
|
-
*/
|
|
46
21
|
feature: string,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
params: Partial<A_TYPES__ComponentCallParams<_FeatureNames[number]>>,
|
|
51
|
-
): Promise<any>
|
|
52
|
-
|
|
53
|
-
async call(
|
|
54
|
-
scope: A_Scope,
|
|
55
|
-
param1: _FeatureNames[number] | A_TYPES__Required<Partial<A_TYPES__ComponentCallParams<_FeatureNames[number]>>, ['name']>,
|
|
56
|
-
param2?: Partial<A_TYPES__ComponentCallParams<_FeatureNames[number]>>
|
|
57
|
-
): Promise<any> {
|
|
58
|
-
|
|
59
|
-
const feature: string = typeof param1 === 'string'
|
|
60
|
-
? param1
|
|
61
|
-
: param1.name;
|
|
62
|
-
const params: Partial<A_TYPES__ComponentCallParams<_FeatureNames[number]>> = typeof param1 === 'string'
|
|
63
|
-
? param2 || {}
|
|
64
|
-
: param1;
|
|
65
|
-
|
|
66
|
-
const newFeature = A_Context.feature(scope, this, feature, params);
|
|
22
|
+
params: Partial<A_TYPES__FeatureCallParams> = {}
|
|
23
|
+
) {
|
|
24
|
+
const newFeature = A_Context.feature(A_Context.scope(this), this, feature, params);
|
|
67
25
|
|
|
68
26
|
return await newFeature.process();
|
|
69
27
|
}
|
|
28
|
+
|
|
29
|
+
|
|
70
30
|
}
|
|
71
31
|
|
|
72
32
|
|
|
@@ -2,6 +2,7 @@ import { A_TYPES__A_InjectDecorator_Meta } from "@adaas/a-concept/decorators/A-I
|
|
|
2
2
|
import { A_TYPES__ConceptAbstractionMeta, A_TYPES__ConceptStage } from "../A-Concept/A_Concept.types";
|
|
3
3
|
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
4
4
|
import { A_TYPES__ComponentMeta, A_TYPES__ComponentMetaExtension, A_TYPES__ComponentMetaKey } from "./A-Component.types";
|
|
5
|
+
import { A_TYPES__A_DefineDecorator_Meta } from "@adaas/a-concept/decorators/A-Feature/A-Feature.decorator.types";
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
export class A_ComponentMeta extends A_Meta<A_TYPES__ComponentMeta> {
|
|
@@ -62,6 +63,22 @@ export class A_ComponentMeta extends A_Meta<A_TYPES__ComponentMeta> {
|
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Returns all features defined in the Component
|
|
69
|
+
*
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
features(): Array<A_TYPES__A_DefineDecorator_Meta> {
|
|
73
|
+
|
|
74
|
+
const features = this.get(A_TYPES__ComponentMetaKey.FEATURES);
|
|
75
|
+
|
|
76
|
+
return features?.toArray()
|
|
77
|
+
// returns all extensions that match the feature
|
|
78
|
+
.map(([, feature]) => feature) || [];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
65
82
|
/**
|
|
66
83
|
* Returns a set of instructions to run proper methods in Component during A-Concept Stage
|
|
67
84
|
*
|
|
@@ -69,7 +86,7 @@ export class A_ComponentMeta extends A_Meta<A_TYPES__ComponentMeta> {
|
|
|
69
86
|
* @returns
|
|
70
87
|
*/
|
|
71
88
|
abstractions(
|
|
72
|
-
abstraction:
|
|
89
|
+
abstraction: any
|
|
73
90
|
): A_TYPES__ConceptAbstractionMeta[] {
|
|
74
91
|
const steps: A_TYPES__ConceptAbstractionMeta[] = [];
|
|
75
92
|
|
|
@@ -81,7 +98,7 @@ export class A_ComponentMeta extends A_Meta<A_TYPES__ComponentMeta> {
|
|
|
81
98
|
|
|
82
99
|
abstractions
|
|
83
100
|
// returns all extensions that match the feature
|
|
84
|
-
?.find(
|
|
101
|
+
?.find(abstraction)
|
|
85
102
|
.forEach(([handler, extensions]) => {
|
|
86
103
|
extensions.forEach(extension => {
|
|
87
104
|
const args = injections?.get(extension.handler) || [];
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import { A_TYPES__ConceptStage,
|
|
2
|
-
import { A_Context } from "../A-Context/A-Context.class";
|
|
1
|
+
import { A_TYPES__ConceptStage, A_TYPES__ConceptAbstractionCallParams, A_TYPES__IConceptConstructor, A_TYPES__ConceptAbstractionMeta } from "./A_Concept.types";
|
|
3
2
|
import { A_Container } from "../A-Container/A-Container.class";
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { A_Abstraction } from "@adaas/a-concept/decorators/A-Abstraction/A-Abstraction.decorator";
|
|
8
|
-
import { A_TYPES__A_StageStep } from "../A-Stage/A-Stage.types";
|
|
9
|
-
import { A_Channel } from "../A-Channel/A-Channel.class";
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
import { A_Abstraction } from "../A-Abstraction/A-Abstraction.class";
|
|
4
|
+
import { A_ConceptMeta } from "./A_Concept.meta";
|
|
5
|
+
import { A_Abstraction_Extend } from "@adaas/a-concept/decorators/A-Abstraction/A-Abstraction-Extend.decorator";
|
|
12
6
|
|
|
13
7
|
|
|
14
8
|
// export type RunParams<T> = T extends A_Container<any, infer Params> ? Params : never;
|
|
@@ -28,7 +22,7 @@ import { A_Channel } from "../A-Channel/A-Channel.class";
|
|
|
28
22
|
*
|
|
29
23
|
*/
|
|
30
24
|
export class A_Concept<
|
|
31
|
-
|
|
25
|
+
_Imports extends A_Container[] = any
|
|
32
26
|
> {
|
|
33
27
|
|
|
34
28
|
// ==============================================================================
|
|
@@ -37,8 +31,8 @@ export class A_Concept<
|
|
|
37
31
|
/**
|
|
38
32
|
* Load the concept. This step runs before any other steps to ensure that all components are loaded.
|
|
39
33
|
*/
|
|
40
|
-
static Load() {
|
|
41
|
-
return A_Abstraction(A_TYPES__ConceptStage.Load);
|
|
34
|
+
static Load(): ReturnType<typeof A_Abstraction_Extend> {
|
|
35
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Load);
|
|
42
36
|
}
|
|
43
37
|
|
|
44
38
|
/**
|
|
@@ -46,15 +40,15 @@ export class A_Concept<
|
|
|
46
40
|
*
|
|
47
41
|
* [!] To extend the logic just create a custom containers and override the default behavior.
|
|
48
42
|
*/
|
|
49
|
-
static Publish() {
|
|
50
|
-
return A_Abstraction(A_TYPES__ConceptStage.Publish);
|
|
43
|
+
static Publish(): ReturnType<typeof A_Abstraction_Extend> {
|
|
44
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Publish);
|
|
51
45
|
}
|
|
52
46
|
|
|
53
47
|
/**
|
|
54
48
|
* Deploy the concept to the environment.
|
|
55
49
|
*/
|
|
56
50
|
static Deploy() {
|
|
57
|
-
return A_Abstraction(A_TYPES__ConceptStage.Deploy);
|
|
51
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Deploy);
|
|
58
52
|
}
|
|
59
53
|
|
|
60
54
|
/**
|
|
@@ -64,192 +58,196 @@ export class A_Concept<
|
|
|
64
58
|
*
|
|
65
59
|
*/
|
|
66
60
|
static Build() {
|
|
67
|
-
return A_Abstraction(A_TYPES__ConceptStage.Build);
|
|
61
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Build);
|
|
68
62
|
}
|
|
69
63
|
|
|
70
64
|
/**
|
|
71
65
|
* Main execution of the concept.
|
|
72
66
|
*/
|
|
73
67
|
static Run() {
|
|
74
|
-
return A_Abstraction(A_TYPES__ConceptStage.Run);
|
|
68
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Run);
|
|
75
69
|
}
|
|
76
70
|
|
|
77
71
|
/**
|
|
78
72
|
* Start the concept. Uses for servers or any other background services.
|
|
79
73
|
*/
|
|
80
74
|
static Start() {
|
|
81
|
-
return A_Abstraction(A_TYPES__ConceptStage.Start);
|
|
75
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Start);
|
|
82
76
|
}
|
|
83
77
|
|
|
84
78
|
/**
|
|
85
79
|
* Stop the concept. Uses for servers or any other background services.
|
|
86
80
|
*/
|
|
87
81
|
static Stop() {
|
|
88
|
-
return A_Abstraction(A_TYPES__ConceptStage.Stop);
|
|
82
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Stop);
|
|
89
83
|
}
|
|
90
84
|
|
|
91
85
|
|
|
86
|
+
private sharedBase!: A_Container;
|
|
87
|
+
private meta!: A_ConceptMeta
|
|
88
|
+
|
|
89
|
+
|
|
92
90
|
|
|
93
91
|
// ==============================================================================
|
|
94
|
-
// ========================== MAIN
|
|
92
|
+
// ========================== MAIN Methods ======================================
|
|
95
93
|
// ==============================================================================
|
|
96
94
|
|
|
97
|
-
protected containers
|
|
95
|
+
protected containers!: A_Container[];
|
|
98
96
|
|
|
99
97
|
constructor(
|
|
100
|
-
protected props: A_TYPES__IConceptConstructor<
|
|
98
|
+
protected props: A_TYPES__IConceptConstructor<_Imports>
|
|
101
99
|
) {
|
|
102
|
-
|
|
100
|
+
this.sharedBase = new A_Container({
|
|
103
101
|
name: props.name,
|
|
104
102
|
fragments: props.fragments || [],
|
|
103
|
+
entities: props.entities || [],
|
|
105
104
|
// containers: props.containers
|
|
106
105
|
components: [
|
|
107
106
|
// A_Logger,
|
|
108
107
|
]
|
|
109
108
|
});
|
|
110
109
|
|
|
111
|
-
this.containers = props.containers || []
|
|
110
|
+
this.containers = (props.containers || []).map(container => {
|
|
111
|
+
container.Scope.parent(this.Scope);
|
|
112
|
+
|
|
113
|
+
return container;
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
this.meta = new A_ConceptMeta(this.containers, this.sharedBase);
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
|
|
115
120
|
get namespace() {
|
|
116
|
-
return
|
|
121
|
+
return this.sharedBase.name;
|
|
117
122
|
}
|
|
118
123
|
|
|
124
|
+
get Scope() {
|
|
125
|
+
return this.sharedBase.Scope;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
119
129
|
|
|
120
130
|
// =======================================================================
|
|
121
131
|
// ========================== LIFECYCLE ================================
|
|
122
132
|
// =======================================================================
|
|
123
133
|
|
|
134
|
+
|
|
124
135
|
/**
|
|
125
|
-
*
|
|
136
|
+
* Load the concept.
|
|
126
137
|
*/
|
|
127
|
-
async
|
|
128
|
-
params?: Partial<
|
|
138
|
+
async load(
|
|
139
|
+
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
129
140
|
) {
|
|
141
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Load, params);
|
|
130
142
|
|
|
143
|
+
await abstraction.process();
|
|
131
144
|
}
|
|
132
145
|
|
|
133
146
|
|
|
147
|
+
|
|
134
148
|
/**
|
|
135
|
-
*
|
|
149
|
+
* Run the concept.
|
|
136
150
|
*/
|
|
137
|
-
async
|
|
138
|
-
params?: Partial<
|
|
151
|
+
async run(
|
|
152
|
+
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
139
153
|
) {
|
|
154
|
+
await this.load(params);
|
|
155
|
+
|
|
156
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Run, params);
|
|
140
157
|
|
|
158
|
+
await abstraction.process();
|
|
141
159
|
}
|
|
142
160
|
|
|
143
161
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Start the concept.
|
|
164
|
+
*
|
|
165
|
+
* @param params
|
|
166
|
+
*/
|
|
167
|
+
async start(
|
|
168
|
+
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
149
169
|
) {
|
|
170
|
+
await this.load(params);
|
|
150
171
|
|
|
172
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Start, params);
|
|
173
|
+
|
|
174
|
+
await abstraction.process();
|
|
151
175
|
}
|
|
152
176
|
|
|
153
177
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
178
|
+
/**
|
|
179
|
+
* Stop the concept.
|
|
180
|
+
*
|
|
181
|
+
* @param params
|
|
182
|
+
*/
|
|
183
|
+
async stop(
|
|
184
|
+
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
159
185
|
) {
|
|
186
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Stop, params);
|
|
160
187
|
|
|
188
|
+
await abstraction.process();
|
|
161
189
|
}
|
|
162
190
|
|
|
163
191
|
|
|
164
192
|
/**
|
|
165
|
-
*
|
|
193
|
+
* Build the concept.
|
|
166
194
|
*/
|
|
167
|
-
async
|
|
168
|
-
|
|
169
|
-
>(
|
|
170
|
-
container: K[keyof K],
|
|
171
|
-
params?: A_Fragment[]
|
|
195
|
+
async build(
|
|
196
|
+
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
172
197
|
) {
|
|
173
|
-
|
|
174
|
-
// if (methodName in feature) {
|
|
175
|
-
// (feature as any)[methodName](...args);
|
|
176
|
-
// }
|
|
198
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Build, params);
|
|
177
199
|
|
|
178
|
-
|
|
200
|
+
await abstraction.process();
|
|
179
201
|
}
|
|
180
202
|
|
|
181
203
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
204
|
+
/**
|
|
205
|
+
* Deploy the concept.
|
|
206
|
+
*/
|
|
207
|
+
async deploy(
|
|
208
|
+
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
185
209
|
) {
|
|
210
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Deploy, params);
|
|
186
211
|
|
|
187
|
-
|
|
188
|
-
container: A_Container<any>,
|
|
189
|
-
runners: Array<A_TYPES__A_StageStep>
|
|
190
|
-
}[] = [];
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
this.containers.map(container => {
|
|
194
|
-
const meta = A_Context.meta(container);
|
|
195
|
-
|
|
196
|
-
const containerAbstractions: Array<A_TYPES__A_StageStep> = meta
|
|
197
|
-
.abstractions(method)
|
|
198
|
-
.map(step => ({
|
|
199
|
-
component: container,
|
|
200
|
-
...step
|
|
201
|
-
}));
|
|
202
|
-
|
|
203
|
-
const containerScope = A_Context.scope(container);
|
|
204
|
-
|
|
205
|
-
const componentsAbstractions = containerScope.components
|
|
206
|
-
.map(component => A_Context.meta(component).abstractions(method).map(step => ({
|
|
207
|
-
component,
|
|
208
|
-
...step
|
|
209
|
-
})))
|
|
210
|
-
.flat();
|
|
211
|
-
|
|
212
|
-
abstractions.push({
|
|
213
|
-
container,
|
|
214
|
-
runners: [
|
|
215
|
-
...containerAbstractions.map(step => ({
|
|
216
|
-
...step,
|
|
217
|
-
component: container,
|
|
218
|
-
})),
|
|
219
|
-
|
|
220
|
-
...componentsAbstractions
|
|
221
|
-
]
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
const scope = A_Context.allocate(this, {
|
|
229
|
-
components: params.components,
|
|
230
|
-
fragments: params.fragments,
|
|
231
|
-
parent: A_Context.scope(this)
|
|
232
|
-
});
|
|
233
|
-
|
|
212
|
+
await abstraction.process();
|
|
234
213
|
|
|
235
214
|
}
|
|
236
215
|
|
|
237
216
|
|
|
238
|
-
|
|
239
|
-
|
|
217
|
+
/**
|
|
218
|
+
* Publish the concept.
|
|
219
|
+
*/
|
|
220
|
+
async publish(
|
|
221
|
+
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
240
222
|
) {
|
|
241
|
-
const
|
|
242
|
-
const component = params.components || [];
|
|
223
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Publish, params);
|
|
243
224
|
|
|
225
|
+
await abstraction.process();
|
|
226
|
+
}
|
|
244
227
|
|
|
245
|
-
this.containers.map(container => {
|
|
246
|
-
const meta = A_Context.meta(container);
|
|
247
228
|
|
|
248
|
-
|
|
229
|
+
// =======================================================================
|
|
230
|
+
// ========================== CALL =====================================
|
|
231
|
+
// =======================================================================
|
|
249
232
|
|
|
250
|
-
});
|
|
251
233
|
|
|
234
|
+
/**
|
|
235
|
+
* Call the specific method of the concept or included modules.
|
|
236
|
+
*/
|
|
237
|
+
async call<
|
|
238
|
+
K extends Record<_Imports[number]['name'], string>
|
|
239
|
+
>(
|
|
240
|
+
container: K[keyof K],
|
|
241
|
+
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
242
|
+
) {
|
|
243
|
+
// const definition = this.meta.abstractionDefinition(A_TYPES__ConceptStage.Run, {
|
|
244
|
+
// components: params?.components,
|
|
245
|
+
// fragments: params?.fragments,
|
|
246
|
+
// });
|
|
247
|
+
|
|
248
|
+
// const feature = new A_Feature(definition);
|
|
252
249
|
|
|
250
|
+
// await feature.process();
|
|
253
251
|
}
|
|
254
252
|
|
|
255
253
|
}
|