@adaas/a-concept 0.0.33 → 0.0.35
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.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 +16 -17
- package/dist/src/global/A-Concept/A_Concept.class.js +31 -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 +2 -2
- 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 +20 -20
- package/dist/src/global/A-Context/A-Context.class.js +57 -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-Fragment/A-Fragment.class.d.ts +1 -3
- 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 +23 -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 +0 -8
- 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/multi-container/containers/Schedule.container.ts +1 -6
- 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 +24 -11
- 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.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 +45 -126
- package/src/global/A-Concept/A_Concept.meta.ts +68 -0
- package/src/global/A-Concept/A_Concept.types.ts +2 -2
- 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 +134 -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-Fragment/A-Fragment.class.ts +1 -1
- package/src/global/A-Meta/A-Meta.class.ts +5 -8
- package/src/global/A-Scope/A-Scope.class.ts +38 -21
- package/src/global/A-Scope/A-Scope.types.ts +2 -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
|
@@ -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,18 +1,8 @@
|
|
|
1
|
-
import { A_TYPES__ConceptStage, A_TYPES__ConceptAbstractionCallParams, A_TYPES__IConceptConstructor } from "./A_Concept.types";
|
|
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
|
-
import { A_Feature } from "../A-Feature/A-Feature.class";
|
|
11
|
-
import { A_TYPES__FeatureConstructor } from "../A-Feature/A-Feature.types";
|
|
12
|
-
import { A_TYPES__Required } from "@adaas/a-utils";
|
|
13
|
-
import { A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types";
|
|
14
|
-
|
|
15
|
-
|
|
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";
|
|
16
6
|
|
|
17
7
|
|
|
18
8
|
// export type RunParams<T> = T extends A_Container<any, infer Params> ? Params : never;
|
|
@@ -32,7 +22,7 @@ import { A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types";
|
|
|
32
22
|
*
|
|
33
23
|
*/
|
|
34
24
|
export class A_Concept<
|
|
35
|
-
|
|
25
|
+
_Imports extends A_Container[] = any
|
|
36
26
|
> {
|
|
37
27
|
|
|
38
28
|
// ==============================================================================
|
|
@@ -41,8 +31,8 @@ export class A_Concept<
|
|
|
41
31
|
/**
|
|
42
32
|
* Load the concept. This step runs before any other steps to ensure that all components are loaded.
|
|
43
33
|
*/
|
|
44
|
-
static Load() {
|
|
45
|
-
return A_Abstraction(A_TYPES__ConceptStage.Load);
|
|
34
|
+
static Load(): ReturnType<typeof A_Abstraction_Extend> {
|
|
35
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Load);
|
|
46
36
|
}
|
|
47
37
|
|
|
48
38
|
/**
|
|
@@ -50,15 +40,15 @@ export class A_Concept<
|
|
|
50
40
|
*
|
|
51
41
|
* [!] To extend the logic just create a custom containers and override the default behavior.
|
|
52
42
|
*/
|
|
53
|
-
static Publish() {
|
|
54
|
-
return A_Abstraction(A_TYPES__ConceptStage.Publish);
|
|
43
|
+
static Publish(): ReturnType<typeof A_Abstraction_Extend> {
|
|
44
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Publish);
|
|
55
45
|
}
|
|
56
46
|
|
|
57
47
|
/**
|
|
58
48
|
* Deploy the concept to the environment.
|
|
59
49
|
*/
|
|
60
50
|
static Deploy() {
|
|
61
|
-
return A_Abstraction(A_TYPES__ConceptStage.Deploy);
|
|
51
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Deploy);
|
|
62
52
|
}
|
|
63
53
|
|
|
64
54
|
/**
|
|
@@ -68,43 +58,46 @@ export class A_Concept<
|
|
|
68
58
|
*
|
|
69
59
|
*/
|
|
70
60
|
static Build() {
|
|
71
|
-
return A_Abstraction(A_TYPES__ConceptStage.Build);
|
|
61
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Build);
|
|
72
62
|
}
|
|
73
63
|
|
|
74
64
|
/**
|
|
75
65
|
* Main execution of the concept.
|
|
76
66
|
*/
|
|
77
67
|
static Run() {
|
|
78
|
-
return A_Abstraction(A_TYPES__ConceptStage.Run);
|
|
68
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Run);
|
|
79
69
|
}
|
|
80
70
|
|
|
81
71
|
/**
|
|
82
72
|
* Start the concept. Uses for servers or any other background services.
|
|
83
73
|
*/
|
|
84
74
|
static Start() {
|
|
85
|
-
return A_Abstraction(A_TYPES__ConceptStage.Start);
|
|
75
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Start);
|
|
86
76
|
}
|
|
87
77
|
|
|
88
78
|
/**
|
|
89
79
|
* Stop the concept. Uses for servers or any other background services.
|
|
90
80
|
*/
|
|
91
81
|
static Stop() {
|
|
92
|
-
return A_Abstraction(A_TYPES__ConceptStage.Stop);
|
|
82
|
+
return A_Abstraction.Extend(A_TYPES__ConceptStage.Stop);
|
|
93
83
|
}
|
|
94
84
|
|
|
95
85
|
|
|
86
|
+
private sharedBase!: A_Container;
|
|
87
|
+
private meta!: A_ConceptMeta
|
|
88
|
+
|
|
89
|
+
|
|
96
90
|
|
|
97
91
|
// ==============================================================================
|
|
98
92
|
// ========================== MAIN Methods ======================================
|
|
99
93
|
// ==============================================================================
|
|
100
94
|
|
|
101
|
-
protected containers
|
|
95
|
+
protected containers!: A_Container[];
|
|
102
96
|
|
|
103
97
|
constructor(
|
|
104
|
-
protected props: A_TYPES__IConceptConstructor<
|
|
98
|
+
protected props: A_TYPES__IConceptConstructor<_Imports>
|
|
105
99
|
) {
|
|
106
|
-
|
|
107
|
-
A_Context.allocate(this, {
|
|
100
|
+
this.sharedBase = new A_Container({
|
|
108
101
|
name: props.name,
|
|
109
102
|
fragments: props.fragments || [],
|
|
110
103
|
entities: props.entities || [],
|
|
@@ -114,19 +107,26 @@ export class A_Concept<
|
|
|
114
107
|
]
|
|
115
108
|
});
|
|
116
109
|
|
|
117
|
-
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);
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
|
|
121
120
|
get namespace() {
|
|
122
|
-
return
|
|
121
|
+
return this.sharedBase.name;
|
|
123
122
|
}
|
|
124
123
|
|
|
125
124
|
get Scope() {
|
|
126
|
-
return
|
|
125
|
+
return this.sharedBase.Scope;
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
|
|
129
|
+
|
|
130
130
|
// =======================================================================
|
|
131
131
|
// ========================== LIFECYCLE ================================
|
|
132
132
|
// =======================================================================
|
|
@@ -138,9 +138,7 @@ export class A_Concept<
|
|
|
138
138
|
async load(
|
|
139
139
|
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
140
140
|
) {
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
const abstraction = new A_Feature(definition);
|
|
141
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Load, params);
|
|
144
142
|
|
|
145
143
|
await abstraction.process();
|
|
146
144
|
}
|
|
@@ -155,9 +153,7 @@ export class A_Concept<
|
|
|
155
153
|
) {
|
|
156
154
|
await this.load(params);
|
|
157
155
|
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
const abstraction = new A_Feature(definition);
|
|
156
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Run, params);
|
|
161
157
|
|
|
162
158
|
await abstraction.process();
|
|
163
159
|
}
|
|
@@ -173,9 +169,7 @@ export class A_Concept<
|
|
|
173
169
|
) {
|
|
174
170
|
await this.load(params);
|
|
175
171
|
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
const abstraction = new A_Feature(definition);
|
|
172
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Start, params);
|
|
179
173
|
|
|
180
174
|
await abstraction.process();
|
|
181
175
|
}
|
|
@@ -189,9 +183,7 @@ export class A_Concept<
|
|
|
189
183
|
async stop(
|
|
190
184
|
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
191
185
|
) {
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
const abstraction = new A_Feature(definition);
|
|
186
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Stop, params);
|
|
195
187
|
|
|
196
188
|
await abstraction.process();
|
|
197
189
|
}
|
|
@@ -203,9 +195,7 @@ export class A_Concept<
|
|
|
203
195
|
async build(
|
|
204
196
|
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
205
197
|
) {
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
const abstraction = new A_Feature(definition);
|
|
198
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Build, params);
|
|
209
199
|
|
|
210
200
|
await abstraction.process();
|
|
211
201
|
}
|
|
@@ -217,9 +207,7 @@ export class A_Concept<
|
|
|
217
207
|
async deploy(
|
|
218
208
|
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
219
209
|
) {
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
const abstraction = new A_Feature(definition);
|
|
210
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Deploy, params);
|
|
223
211
|
|
|
224
212
|
await abstraction.process();
|
|
225
213
|
|
|
@@ -232,9 +220,7 @@ export class A_Concept<
|
|
|
232
220
|
async publish(
|
|
233
221
|
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
234
222
|
) {
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
const abstraction = new A_Feature(definition);
|
|
223
|
+
const abstraction = this.meta.abstraction(A_TYPES__ConceptStage.Publish, params);
|
|
238
224
|
|
|
239
225
|
await abstraction.process();
|
|
240
226
|
}
|
|
@@ -249,86 +235,19 @@ export class A_Concept<
|
|
|
249
235
|
* Call the specific method of the concept or included modules.
|
|
250
236
|
*/
|
|
251
237
|
async call<
|
|
252
|
-
K extends Record<
|
|
238
|
+
K extends Record<_Imports[number]['name'], string>
|
|
253
239
|
>(
|
|
254
240
|
container: K[keyof K],
|
|
255
241
|
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
256
242
|
) {
|
|
257
|
-
const definition = this.abstractionDefinition(A_TYPES__ConceptStage.Run, {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
const feature = new A_Feature(definition);
|
|
263
|
-
|
|
264
|
-
await feature.process();
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
abstractionDefinition(
|
|
269
|
-
method: A_TYPES__ConceptStage,
|
|
270
|
-
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
271
|
-
): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']> {
|
|
272
|
-
|
|
273
|
-
const abstractionSteps: Array<A_TYPES__A_StageStep> = [];
|
|
274
|
-
|
|
275
|
-
this.containers.map(container => {
|
|
276
|
-
const meta = A_Context.meta(container);
|
|
277
|
-
|
|
278
|
-
const containerAbstractions: Array<A_TYPES__A_StageStep> = meta
|
|
279
|
-
.abstractions(method)
|
|
280
|
-
.map(step => ({
|
|
281
|
-
component: container,
|
|
282
|
-
...step
|
|
283
|
-
}));
|
|
284
|
-
|
|
285
|
-
const containerScope = A_Context.scope(container);
|
|
286
|
-
|
|
287
|
-
const componentsAbstractions = containerScope
|
|
288
|
-
.components
|
|
289
|
-
.map(component => A_Context.meta(component).abstractions(method).map(step => ({
|
|
290
|
-
component,
|
|
291
|
-
...step
|
|
292
|
-
})))
|
|
293
|
-
.flat();
|
|
294
|
-
|
|
295
|
-
abstractionSteps.push(
|
|
296
|
-
...containerAbstractions.map(step => ({
|
|
297
|
-
...step,
|
|
298
|
-
component: container,
|
|
299
|
-
})),
|
|
300
|
-
|
|
301
|
-
...componentsAbstractions
|
|
302
|
-
);
|
|
303
|
-
});
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
return {
|
|
307
|
-
...params,
|
|
308
|
-
name: `${this.namespace}.${method}`,
|
|
309
|
-
steps: abstractionSteps,
|
|
310
|
-
parent: this.Scope,
|
|
311
|
-
components: params?.components || [],
|
|
312
|
-
fragments: params?.fragments || [],
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
private async execute(
|
|
318
|
-
params: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
319
|
-
) {
|
|
320
|
-
const fragments = params.fragments || [];
|
|
321
|
-
const component = params.components || [];
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
this.containers.map(container => {
|
|
325
|
-
const meta = A_Context.meta(container);
|
|
326
|
-
|
|
327
|
-
meta.get(A_TYPES__ContainerMetaKey.FEATURES)
|
|
328
|
-
|
|
329
|
-
});
|
|
243
|
+
// const definition = this.meta.abstractionDefinition(A_TYPES__ConceptStage.Run, {
|
|
244
|
+
// components: params?.components,
|
|
245
|
+
// fragments: params?.fragments,
|
|
246
|
+
// });
|
|
330
247
|
|
|
248
|
+
// const feature = new A_Feature(definition);
|
|
331
249
|
|
|
250
|
+
// await feature.process();
|
|
332
251
|
}
|
|
333
252
|
|
|
334
253
|
}
|
|
@@ -1,9 +1,77 @@
|
|
|
1
|
+
|
|
2
|
+
import { A_Container } from "@adaas/a-concept/global/A-Container/A-Container.class";
|
|
1
3
|
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
4
|
+
import { A_TYPES__Required } from "@adaas/a-utils";
|
|
5
|
+
import { A_TYPES__ConceptAbstractionCallParams, A_TYPES__ConceptStage } from "./A_Concept.types";
|
|
6
|
+
import { A_TYPES__FeatureConstructor } from "../A-Feature/A-Feature.types";
|
|
7
|
+
import { A_TYPES__A_StageStep } from "../A-Stage/A-Stage.types";
|
|
8
|
+
import { A_Context } from "@adaas/a-concept/global/A-Context/A-Context.class";
|
|
9
|
+
import { A_TYPES__A_FeatureDecoratorConfig } from "@adaas/a-concept/decorators/A-Feature/A-Feature.decorator.types";
|
|
10
|
+
import { A_TYPES__A_AbstractionConstructor } from "../A-Abstraction/A-Abstraction.types";
|
|
11
|
+
import { A_Abstraction } from "../A-Abstraction/A-Abstraction.class";
|
|
2
12
|
// import { A_TYPES__ComponentMeta } from "./A-Component.types";
|
|
3
13
|
|
|
4
14
|
|
|
5
15
|
export class A_ConceptMeta extends A_Meta<any> {
|
|
6
16
|
|
|
7
17
|
|
|
18
|
+
constructor(
|
|
19
|
+
private containers: Array<A_Container>,
|
|
20
|
+
private base: A_Container
|
|
21
|
+
) {
|
|
22
|
+
super();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
abstractionDefinition(
|
|
26
|
+
method: A_TYPES__ConceptStage,
|
|
27
|
+
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
28
|
+
): A_TYPES__Required<Partial<A_TYPES__A_AbstractionConstructor>, ['features']> {
|
|
29
|
+
|
|
30
|
+
const featureDefinitions = this.containers.map(container =>
|
|
31
|
+
A_Context.abstractionDefinition(container.Scope, container, method, params)
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
const definition = {
|
|
36
|
+
...params,
|
|
37
|
+
name: `${this.base.name}.${method}`,
|
|
38
|
+
features: featureDefinitions,
|
|
39
|
+
parent: this.base.Scope,
|
|
40
|
+
components: params?.components || [],
|
|
41
|
+
fragments: params?.fragments || [],
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return definition;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
abstraction(
|
|
50
|
+
method: A_TYPES__ConceptStage,
|
|
51
|
+
params?: Partial<A_TYPES__ConceptAbstractionCallParams>
|
|
52
|
+
): A_Abstraction {
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
const featureDefinitions = this.containers.map(container => {
|
|
56
|
+
const definition = A_Context.abstractionDefinition(container.Scope, container, method, params);
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
...definition,
|
|
60
|
+
steps: definition.steps.map(step => ({ ...step, component: step.component ? step.component : container }))
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
const definition = {
|
|
66
|
+
...params,
|
|
67
|
+
name: `${this.base.name}.${method}`,
|
|
68
|
+
features: featureDefinitions,
|
|
69
|
+
parent: this.base.Scope,
|
|
70
|
+
components: params?.components || [],
|
|
71
|
+
fragments: params?.fragments || [],
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
return new A_Abstraction(definition);
|
|
75
|
+
}
|
|
8
76
|
|
|
9
77
|
}
|
|
@@ -35,7 +35,7 @@ export enum A_TYPES__ConceptMetaKey {
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
export interface A_TYPES__IConceptConstructor<
|
|
38
|
-
T extends Array<A_Container
|
|
38
|
+
T extends Array<A_Container>
|
|
39
39
|
> {
|
|
40
40
|
name: string,
|
|
41
41
|
|
|
@@ -124,7 +124,7 @@ export type A_TYPES__ConceptCallParams<T extends string> = {
|
|
|
124
124
|
name: T,
|
|
125
125
|
fragments: Array<A_Fragment>,
|
|
126
126
|
components: Array<{ new(...args: any[]): A_Component }>,
|
|
127
|
-
entities: Array<{ new(...args: any[]): A_Entity
|
|
127
|
+
entities: Array<{ new(...args: any[]): A_Entity }>
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
|