@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,13 +0,0 @@
|
|
|
1
|
-
import { ContextFragmentB } from "../context/Fragment_B.context";
|
|
2
|
-
import { ContextFragmentA } from "../context/Fragment_A.context";
|
|
3
|
-
import { A_Component } from "../../../src/global/A-Component/A-Component.class";
|
|
4
|
-
import { A_Logger } from "../../../src/base/A-Logger/A-Logger.component";
|
|
5
|
-
export declare class ComponentB extends A_Component {
|
|
6
|
-
private logger;
|
|
7
|
-
constructor(logger: A_Logger);
|
|
8
|
-
load(): Promise<void>;
|
|
9
|
-
method_B(logger: A_Logger): Promise<void>;
|
|
10
|
-
someMethod(): Promise<void>;
|
|
11
|
-
someMethod2(): Promise<void>;
|
|
12
|
-
someMethod3(context: ContextFragmentB, context2: ContextFragmentA): Promise<void>;
|
|
13
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
9
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.ComponentB = void 0;
|
|
22
|
-
const A_Inject_decorator_1 = require("../../../src/decorators/A-Inject/A-Inject.decorator");
|
|
23
|
-
const Fragment_B_context_1 = require("../context/Fragment_B.context");
|
|
24
|
-
const Fragment_A_context_1 = require("../context/Fragment_A.context");
|
|
25
|
-
const A_Feature_class_1 = require("../../../src/global/A-Feature/A-Feature.class");
|
|
26
|
-
const A_Component_class_1 = require("../../../src/global/A-Component/A-Component.class");
|
|
27
|
-
const A_Logger_component_1 = require("../../../src/base/A-Logger/A-Logger.component");
|
|
28
|
-
let ComponentB = class ComponentB extends A_Component_class_1.A_Component {
|
|
29
|
-
constructor(logger) {
|
|
30
|
-
super();
|
|
31
|
-
this.logger = logger;
|
|
32
|
-
}
|
|
33
|
-
load() {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
console.log('Component B -> load()');
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
method_B(logger) {
|
|
39
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
logger.log('cyan', 'Component B -> method_B()');
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
someMethod() {
|
|
44
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
this.logger.log('pink', 'Component B -> method_B() -> someMethod()');
|
|
46
|
-
this.logger.log('Component B -> method_B() -> someMethod()');
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
someMethod2() {
|
|
50
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
this.logger.log('yellow', 'Component B -> method_B() -> someMethod2()');
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
someMethod3(context, context2) {
|
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
console.log('Component B -> method_A() -> someMethod3()');
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
exports.ComponentB = ComponentB;
|
|
61
|
-
__decorate([
|
|
62
|
-
A_Feature_class_1.A_Feature.Extend()
|
|
63
|
-
], ComponentB.prototype, "load", null);
|
|
64
|
-
__decorate([
|
|
65
|
-
A_Feature_class_1.A_Feature.Extend(),
|
|
66
|
-
__param(0, (0, A_Inject_decorator_1.A_Inject)(A_Logger_component_1.A_Logger))
|
|
67
|
-
], ComponentB.prototype, "method_B", null);
|
|
68
|
-
__decorate([
|
|
69
|
-
A_Feature_class_1.A_Feature.Extend({
|
|
70
|
-
name: 'method_B'
|
|
71
|
-
})
|
|
72
|
-
], ComponentB.prototype, "someMethod", null);
|
|
73
|
-
__decorate([
|
|
74
|
-
A_Feature_class_1.A_Feature.Extend({
|
|
75
|
-
name: 'method_B'
|
|
76
|
-
})
|
|
77
|
-
], ComponentB.prototype, "someMethod2", null);
|
|
78
|
-
__decorate([
|
|
79
|
-
A_Feature_class_1.A_Feature.Extend({
|
|
80
|
-
name: 'method_A'
|
|
81
|
-
}),
|
|
82
|
-
__param(0, (0, A_Inject_decorator_1.A_Inject)(Fragment_B_context_1.ContextFragmentB)),
|
|
83
|
-
__param(1, (0, A_Inject_decorator_1.A_Inject)(Fragment_A_context_1.ContextFragmentA))
|
|
84
|
-
], ComponentB.prototype, "someMethod3", null);
|
|
85
|
-
exports.ComponentB = ComponentB = __decorate([
|
|
86
|
-
__param(0, (0, A_Inject_decorator_1.A_Inject)(A_Logger_component_1.A_Logger))
|
|
87
|
-
], ComponentB);
|
|
88
|
-
//# sourceMappingURL=B.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"B.component.js","sourceRoot":"","sources":["../../../../examples/simple/components/B.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,gGAAmF;AACnF,sEAAiE;AACjE,sEAAiE;AACjE,uFAA8E;AAC9E,6FAAoF;AACpF,0FAA6E;AAGtE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,+BAAW;IAEvC,YACgC,MAAgB;QAE5C,KAAK,EAAE,CAAC;QAFoB,WAAM,GAAN,MAAM,CAAU;IAGhD,CAAC;IAIK,IAAI;;YACN,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QAC1C,CAAC;KAAA;IAIK,QAAQ,CACU,MAAgB;;YAEpC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;QACrD,CAAC;KAAA;IAKK,UAAU;;YAGZ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,4CAA4C,CAAC,CAAC;YACtE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;QAClE,CAAC;KAAA;IAMK,WAAW;;YACb,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,6CAA6C,CAAC,CAAC;QAC7E,CAAC;KAAA;IAKK,WAAW,CACe,OAAyB,EACzB,QAA0B;;YAEtD,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;QAC/D,CAAC;KAAA;CAEJ,CAAA;AAlDY,gCAAU;AAUb;IADL,2BAAS,CAAC,MAAM,EAAE;sCAGlB;AAIK;IADL,2BAAS,CAAC,MAAM,EAAE;IAEd,WAAA,IAAA,6BAAQ,EAAC,6BAAQ,CAAC,CAAA;0CAGtB;AAKK;IAHL,2BAAS,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,UAAU;KACnB,CAAC;4CAMD;AAMK;IAHL,2BAAS,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,UAAU;KACnB,CAAC;6CAGD;AAKK;IAHL,2BAAS,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,UAAU;KACnB,CAAC;IAEG,WAAA,IAAA,6BAAQ,EAAC,qCAAgB,CAAC,CAAA;IAC1B,WAAA,IAAA,6BAAQ,EAAC,qCAAgB,CAAC,CAAA;6CAG9B;qBAhDQ,UAAU;IAGd,WAAA,IAAA,6BAAQ,EAAC,6BAAQ,CAAC,CAAA;GAHd,UAAU,CAkDtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const Main_container_1 = require("./containers/Main.container");
|
|
13
|
-
const A_component_1 = require("./components/A.component");
|
|
14
|
-
const B_component_1 = require("./components/B.component");
|
|
15
|
-
const A_Logger_component_1 = require("../../src/base/A-Logger/A-Logger.component");
|
|
16
|
-
const Fragment_A_context_1 = require("./context/Fragment_A.context");
|
|
17
|
-
const Fragment_B_context_1 = require("./context/Fragment_B.context");
|
|
18
|
-
const A_Config_context_1 = require("../../src/base/A-Config/A-Config.context");
|
|
19
|
-
const A_Config_container_1 = require("../../src/base/A-Config/A-Config.container");
|
|
20
|
-
const ENVConfigReader_component_1 = require("../../src/base/A-Config/components/ENVConfigReader.component");
|
|
21
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
-
console.log('Start');
|
|
23
|
-
// class foo extends A_Container<['f', 'f2']> {
|
|
24
|
-
// }
|
|
25
|
-
// const simpleConcept = new A_Concept({
|
|
26
|
-
// name: 'simple-concept',
|
|
27
|
-
// fragments: [
|
|
28
|
-
// new A_Config({
|
|
29
|
-
// variables: ['A', 'B', 'C'],
|
|
30
|
-
// defaults: {
|
|
31
|
-
// A: 1,
|
|
32
|
-
// }
|
|
33
|
-
// }),
|
|
34
|
-
// new A_Errors({
|
|
35
|
-
// errors: [
|
|
36
|
-
// {
|
|
37
|
-
// code: 'some_error',
|
|
38
|
-
// description: 'Error 1',
|
|
39
|
-
// message: 'Error 1'
|
|
40
|
-
// }
|
|
41
|
-
// ]
|
|
42
|
-
// })
|
|
43
|
-
// ],
|
|
44
|
-
// containers: [
|
|
45
|
-
// new foo({})
|
|
46
|
-
// ]
|
|
47
|
-
// });
|
|
48
|
-
// console.log('Here')
|
|
49
|
-
// simpleConcept.call('method_B');
|
|
50
|
-
const configContext = new A_Config_context_1.A_Config({
|
|
51
|
-
variables: ['CONFIG_VERBOSE'],
|
|
52
|
-
defaults: {
|
|
53
|
-
'CONFIG_VERBOSE': true
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
const configLoader = new A_Config_container_1.A_ConfigLoader({
|
|
57
|
-
fragments: [
|
|
58
|
-
configContext
|
|
59
|
-
],
|
|
60
|
-
components: [
|
|
61
|
-
ENVConfigReader_component_1.ENVConfigReader
|
|
62
|
-
]
|
|
63
|
-
});
|
|
64
|
-
yield configLoader.prepare(configContext);
|
|
65
|
-
yield configLoader.readVariables(configContext);
|
|
66
|
-
const container = new Main_container_1.MainContainer({
|
|
67
|
-
name: 'MainContainer',
|
|
68
|
-
components: [
|
|
69
|
-
A_Logger_component_1.A_Logger,
|
|
70
|
-
A_component_1.ComponentA,
|
|
71
|
-
B_component_1.ComponentB
|
|
72
|
-
],
|
|
73
|
-
fragments: [
|
|
74
|
-
configContext,
|
|
75
|
-
new Fragment_A_context_1.ContextFragmentA(),
|
|
76
|
-
new Fragment_B_context_1.ContextFragmentB()
|
|
77
|
-
]
|
|
78
|
-
});
|
|
79
|
-
// await container.call('method_B');
|
|
80
|
-
yield container.method_B();
|
|
81
|
-
}))();
|
|
82
|
-
//# sourceMappingURL=concept.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"concept.js","sourceRoot":"","sources":["../../../examples/simple/concept.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gEAA4D;AAC5D,0DAAsD;AACtD,0DAAsD;AACtD,0FAA6E;AAC7E,qEAAgE;AAChE,qEAAgE;AAChE,sFAA2E;AAC3E,0FAAmF;AACnF,mHAAsG;AAEtG,CAAC,GAAS,EAAE;IAER,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAErB,+CAA+C;IAE/C,IAAI;IAGJ,wCAAwC;IACxC,8BAA8B;IAC9B,mBAAmB;IACnB,yBAAyB;IACzB,0CAA0C;IAC1C,0BAA0B;IAC1B,wBAAwB;IACxB,gBAAgB;IAChB,cAAc;IACd,yBAAyB;IACzB,wBAAwB;IACxB,oBAAoB;IACpB,0CAA0C;IAC1C,8CAA8C;IAC9C,yCAAyC;IACzC,oBAAoB;IACpB,gBAAgB;IAChB,aAAa;IACb,SAAS;IACT,oBAAoB;IAEpB,sBAAsB;IACtB,QAAQ;IACR,MAAM;IAEN,sBAAsB;IACtB,kCAAkC;IAElC,MAAM,aAAa,GAAG,IAAI,2BAAQ,CAAC;QAC/B,SAAS,EAAE,CAAC,gBAAgB,CAAC;QAC7B,QAAQ,EAAE;YACN,gBAAgB,EAAE,IAAI;SACzB;KACJ,CAAC,CAAC;IAGH,MAAM,YAAY,GAAG,IAAI,mCAAc,CAAC;QACpC,SAAS,EAAE;YACP,aAAa;SAChB;QACD,UAAU,EAAE;YACR,2CAAe;SAClB;KACJ,CAAC,CAAC;IAEH,MAAM,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC1C,MAAM,YAAY,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAGhD,MAAM,SAAS,GAAG,IAAI,8BAAa,CAAC;QAChC,IAAI,EAAE,eAAe;QACrB,UAAU,EAAE;YACR,6BAAQ;YACR,wBAAU;YACV,wBAAU;SACb;QACD,SAAS,EAAE;YACP,aAAa;YACb,IAAI,qCAAgB,EAAE;YACtB,IAAI,qCAAgB,EAAE;SACzB;KACJ,CAAC,CAAC;IAEH,oCAAoC;IACpC,MAAM,SAAS,CAAC,QAAQ,EAAE,CAAC;AAC/B,CAAC,CAAA,CAAC,EAAE,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { A_Container } from "../../../src/global/A-Container/A-Container.class";
|
|
2
|
-
import { A_Scope } from "../../../src/global/A-Scope/A-Scope.class";
|
|
3
|
-
export declare class MainContainer extends A_Container<[
|
|
4
|
-
'method_A',
|
|
5
|
-
'method_B'
|
|
6
|
-
]> {
|
|
7
|
-
load(): Promise<void>;
|
|
8
|
-
start(scope: A_Scope): Promise<void>;
|
|
9
|
-
method_A(): Promise<void>;
|
|
10
|
-
method_B(): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
9
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.MainContainer = void 0;
|
|
22
|
-
const A_Container_class_1 = require("../../../src/global/A-Container/A-Container.class");
|
|
23
|
-
const A_Feature_class_1 = require("../../../src/global/A-Feature/A-Feature.class");
|
|
24
|
-
const Fragment_A_context_1 = require("../context/Fragment_A.context");
|
|
25
|
-
const Fragment_B_context_1 = require("../context/Fragment_B.context");
|
|
26
|
-
const A_Concept_class_1 = require("../../../src/global/A-Concept/A_Concept.class");
|
|
27
|
-
const A_Inject_decorator_1 = require("../../../src/decorators/A-Inject/A-Inject.decorator");
|
|
28
|
-
const A_Context_class_1 = require("../../../src/global/A-Context/A-Context.class");
|
|
29
|
-
const A_Logger_component_1 = require("../../../src/base/A-Logger/A-Logger.component");
|
|
30
|
-
const A_Scope_class_1 = require("../../../src/global/A-Scope/A-Scope.class");
|
|
31
|
-
const EntityA_entity_1 = require("../entities/EntityA.entity");
|
|
32
|
-
class MainContainer extends A_Container_class_1.A_Container {
|
|
33
|
-
load() {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
console.log('Main container loaded');
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
start(scope) {
|
|
39
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
A_Context_class_1.A_Context.feature(scope, this, 'method_A');
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
method_A() {
|
|
44
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
console.log('Method A');
|
|
46
|
-
yield this.call('method_A', {
|
|
47
|
-
fragments: [
|
|
48
|
-
new Fragment_A_context_1.ContextFragmentA(),
|
|
49
|
-
new Fragment_B_context_1.ContextFragmentB()
|
|
50
|
-
]
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
method_B() {
|
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
console.log('Method B', A_Context_class_1.A_Context.root.name);
|
|
57
|
-
const entity = new EntityA_entity_1.EntityA('test@test:test:0000000001');
|
|
58
|
-
this.Scope.register(entity);
|
|
59
|
-
yield entity.doSomething();
|
|
60
|
-
const logger = this.Scope.resolve(A_Logger_component_1.A_Logger);
|
|
61
|
-
// or you can manually call the feature
|
|
62
|
-
const feature = A_Context_class_1.A_Context.feature(this.Scope, this, 'method_B', {
|
|
63
|
-
fragments: [new Fragment_A_context_1.ContextFragmentA(), new Fragment_B_context_1.ContextFragmentB()]
|
|
64
|
-
});
|
|
65
|
-
for (const stage of feature) {
|
|
66
|
-
logger.log('Manual Loop Execution Step', feature.stage);
|
|
67
|
-
yield stage.process();
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
exports.MainContainer = MainContainer;
|
|
73
|
-
__decorate([
|
|
74
|
-
A_Concept_class_1.A_Concept.Load()
|
|
75
|
-
], MainContainer.prototype, "load", null);
|
|
76
|
-
__decorate([
|
|
77
|
-
A_Concept_class_1.A_Concept.Start(),
|
|
78
|
-
__param(0, (0, A_Inject_decorator_1.A_Inject)(A_Scope_class_1.A_Scope))
|
|
79
|
-
], MainContainer.prototype, "start", null);
|
|
80
|
-
__decorate([
|
|
81
|
-
A_Feature_class_1.A_Feature.Define()
|
|
82
|
-
], MainContainer.prototype, "method_A", null);
|
|
83
|
-
__decorate([
|
|
84
|
-
A_Feature_class_1.A_Feature.Define()
|
|
85
|
-
], MainContainer.prototype, "method_B", null);
|
|
86
|
-
//# sourceMappingURL=Main.container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Main.container.js","sourceRoot":"","sources":["../../../../examples/simple/containers/Main.container.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6FAAoF;AACpF,uFAA8E;AAC9E,sEAAiE;AACjE,sEAAiE;AACjE,uFAA8E;AAC9E,gGAAmF;AACnF,uFAA8E;AAC9E,0FAA6E;AAC7E,iFAAwE;AACxE,+DAAqD;AAIrD,MAAa,aAAc,SAAQ,+BAElC;IAGS,IAAI;;YACN,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QACzC,CAAC;KAAA;IAGK,KAAK,CACY,KAAc;;YAGjC,2BAAS,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QAC/C,CAAC;KAAA;IAMK,QAAQ;;YACV,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACxB,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACxB,SAAS,EAAE;oBACP,IAAI,qCAAgB,EAAE;oBACtB,IAAI,qCAAgB,EAAE;iBACzB;aACJ,CAAC,CAAC;QACP,CAAC;KAAA;IAMK,QAAQ;;YAEV,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,2BAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAE7C,MAAM,MAAM,GAAG,IAAI,wBAAO,CAAC,2BAA2B,CAAC,CAAC;YAExD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAE5B,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC;YAG3B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,6BAAQ,CAAC,CAAC;YAE5C,wCAAwC;YAExC,MAAM,OAAO,GAAG,2BAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE;gBAC5D,SAAS,EAAE,CAAC,IAAI,qCAAgB,EAAE,EAAE,IAAI,qCAAgB,EAAE,CAAC;aAC9D,CAAC,CAAC;YAEH,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC1B,MAAM,CAAC,GAAG,CAAC,4BAA4B,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;gBAExD,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;YAC1B,CAAC;QACL,CAAC;KAAA;CACJ;AA5DD,sCA4DC;AAvDS;IADL,2BAAS,CAAC,IAAI,EAAE;yCAGhB;AAGK;IADL,2BAAS,CAAC,KAAK,EAAE;IAEb,WAAA,IAAA,6BAAQ,EAAC,uBAAO,CAAC,CAAA;0CAIrB;AAMK;IADL,2BAAS,CAAC,MAAM,EAAE;6CASlB;AAMK;IADL,2BAAS,CAAC,MAAM,EAAE;6CAyBlB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContextFragmentA = void 0;
|
|
4
|
-
const A_Fragment_class_1 = require("../../../src/global/A-Fragment/A-Fragment.class");
|
|
5
|
-
class ContextFragmentA extends A_Fragment_class_1.A_Fragment {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.variable = 0;
|
|
9
|
-
}
|
|
10
|
-
decrement() {
|
|
11
|
-
this.variable--;
|
|
12
|
-
console.log('ContextFragmentA -> Variable decremented to: ', this.variable);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.ContextFragmentA = ContextFragmentA;
|
|
16
|
-
//# sourceMappingURL=Fragment_A.context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Fragment_A.context.js","sourceRoot":"","sources":["../../../../examples/simple/context/Fragment_A.context.ts"],"names":[],"mappings":";;;AAAA,0FAAiF;AAKjF,MAAa,gBAAiB,SAAQ,6BAAU;IAK5C;QACI,KAAK,EAAE,CAAC;QAHZ,aAAQ,GAAW,CAAC,CAAC;IAIrB,CAAC;IAKD,SAAS;QACL,IAAI,CAAC,QAAQ,EAAE,CAAC;QAEhB,OAAO,CAAC,GAAG,CAAC,+CAA+C,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAChF,CAAC;CACJ;AAjBD,4CAiBC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContextFragmentB = void 0;
|
|
4
|
-
const A_Fragment_class_1 = require("../../../src/global/A-Fragment/A-Fragment.class");
|
|
5
|
-
class ContextFragmentB extends A_Fragment_class_1.A_Fragment {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.variable = 0;
|
|
9
|
-
}
|
|
10
|
-
increment() {
|
|
11
|
-
this.variable++;
|
|
12
|
-
console.log('ContextFragmentB -> Variable incremented to: ', this.variable);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.ContextFragmentB = ContextFragmentB;
|
|
16
|
-
//# sourceMappingURL=Fragment_B.context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Fragment_B.context.js","sourceRoot":"","sources":["../../../../examples/simple/context/Fragment_B.context.ts"],"names":[],"mappings":";;;AAAA,0FAAiF;AAGjF,MAAa,gBAAiB,SAAQ,6BAAU;IAI5C;QACI,KAAK,EAAE,CAAC;QAHZ,aAAQ,GAAW,CAAC,CAAC;IAIrB,CAAC;IAGD,SAAS;QACL,IAAI,CAAC,QAAQ,EAAE,CAAC;QAEhB,OAAO,CAAC,GAAG,CAAC,+CAA+C,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAChF,CAAC;CAEJ;AAfD,4CAeC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { A_Entity } from "../../../src/global/A-Entity/A-Entity.class";
|
|
2
|
-
import { A_TYPES__EntityBaseMethods } from "../../../src/global/A-Entity/A-Entity.types";
|
|
3
|
-
export declare class EntityA extends A_Entity<any, any, [
|
|
4
|
-
...A_TYPES__EntityBaseMethods,
|
|
5
|
-
'doSomething'
|
|
6
|
-
]> {
|
|
7
|
-
doSomething(): Promise<void>;
|
|
8
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.EntityA = void 0;
|
|
13
|
-
const A_Entity_class_1 = require("../../../src/global/A-Entity/A-Entity.class");
|
|
14
|
-
class EntityA extends A_Entity_class_1.A_Entity {
|
|
15
|
-
doSomething() {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
yield this.call('doSomething');
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.EntityA = EntityA;
|
|
22
|
-
//# sourceMappingURL=EntityA.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EntityA.entity.js","sourceRoot":"","sources":["../../../../examples/simple/entities/EntityA.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAA2E;AAK3E,MAAa,OAAQ,SAAQ,yBAG3B;IAIQ,WAAW;;YACb,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACnC,CAAC;KAAA;CACJ;AAVD,0BAUC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { HTTPRequest } from "../contexts/http-request.context";
|
|
2
|
-
import { A_Logger } from "../../../src/base/A-Logger/A-Logger.component";
|
|
3
|
-
import { A_Feature } from "../../../src/global/A-Feature/A-Feature.class";
|
|
4
|
-
import { A_Component } from "../../../src/global/A-Component/A-Component.class";
|
|
5
|
-
export declare class HTTPErrorHandler extends A_Component {
|
|
6
|
-
private logger;
|
|
7
|
-
constructor(logger: A_Logger);
|
|
8
|
-
onErrorPage(request: HTTPRequest, feature: A_Feature): Promise<void>;
|
|
9
|
-
onRequest(request: HTTPRequest): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
9
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.HTTPErrorHandler = void 0;
|
|
22
|
-
const A_Inject_decorator_1 = require("../../../src/decorators/A-Inject/A-Inject.decorator");
|
|
23
|
-
const http_request_context_1 = require("../contexts/http-request.context");
|
|
24
|
-
const A_Logger_component_1 = require("../../../src/base/A-Logger/A-Logger.component");
|
|
25
|
-
const http_server_container_1 = require("../containers/http-server.container");
|
|
26
|
-
const A_Feature_class_1 = require("../../../src/global/A-Feature/A-Feature.class");
|
|
27
|
-
const A_Component_class_1 = require("../../../src/global/A-Component/A-Component.class");
|
|
28
|
-
let HTTPErrorHandler = class HTTPErrorHandler extends A_Component_class_1.A_Component {
|
|
29
|
-
constructor(logger) {
|
|
30
|
-
super();
|
|
31
|
-
this.logger = logger;
|
|
32
|
-
}
|
|
33
|
-
onErrorPage(request, feature) {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
this.logger.log('HTTP Error Handler -> onErrorPage()');
|
|
36
|
-
yield feature.completed();
|
|
37
|
-
if (request.state !== 'end' && request.request.url === '/error')
|
|
38
|
-
request.end('Error Page');
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
onRequest(request) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
this.logger.log('HTTP Error Handler -> onRequest()');
|
|
44
|
-
if (request.state !== 'end')
|
|
45
|
-
request.end('Error');
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
exports.HTTPErrorHandler = HTTPErrorHandler;
|
|
50
|
-
__decorate([
|
|
51
|
-
A_Feature_class_1.A_Feature.Extend({
|
|
52
|
-
name: 'onRequest',
|
|
53
|
-
scope: [http_server_container_1.HttpServer]
|
|
54
|
-
}),
|
|
55
|
-
__param(0, (0, A_Inject_decorator_1.A_Inject)(http_request_context_1.HTTPRequest)),
|
|
56
|
-
__param(1, (0, A_Inject_decorator_1.A_Inject)(A_Feature_class_1.A_Feature))
|
|
57
|
-
], HTTPErrorHandler.prototype, "onErrorPage", null);
|
|
58
|
-
__decorate([
|
|
59
|
-
A_Feature_class_1.A_Feature.Extend(),
|
|
60
|
-
__param(0, (0, A_Inject_decorator_1.A_Inject)(http_request_context_1.HTTPRequest))
|
|
61
|
-
], HTTPErrorHandler.prototype, "onRequest", null);
|
|
62
|
-
exports.HTTPErrorHandler = HTTPErrorHandler = __decorate([
|
|
63
|
-
__param(0, (0, A_Inject_decorator_1.A_Inject)(A_Logger_component_1.A_Logger))
|
|
64
|
-
], HTTPErrorHandler);
|
|
65
|
-
//# sourceMappingURL=http-error-handler.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-error-handler.component.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/components/http-error-handler.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,gGAAmF;AACnF,2EAA+D;AAC/D,0FAA6E;AAC7E,+EAAiE;AACjE,uFAA8E;AAC9E,6FAAoF;AAG7E,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,+BAAW;IAE7C,YACgC,MAAgB;QAE5C,KAAK,EAAE,CAAC;QAFoB,WAAM,GAAN,MAAM,CAAU;IAGhD,CAAC;IAQK,WAAW,CACU,OAAoB,EACtB,OAAkB;;YAEvC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;YAEvD,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC;YAE1B,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,KAAK,QAAQ;gBAC3D,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAElC,CAAC;KAAA;IAKK,SAAS,CACY,OAAoB;;YAE3C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;YAErD,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK;gBACvB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;KAAA;CACJ,CAAA;AAtCY,4CAAgB;AAcnB;IAJL,2BAAS,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,CAAC,kCAAU,CAAC;KACtB,CAAC;IAEG,WAAA,IAAA,6BAAQ,EAAC,kCAAW,CAAC,CAAA;IACrB,WAAA,IAAA,6BAAQ,EAAC,2BAAS,CAAC,CAAA;mDASvB;AAKK;IADL,2BAAS,CAAC,MAAM,EAAE;IAEd,WAAA,IAAA,6BAAQ,EAAC,kCAAW,CAAC,CAAA;iDAMzB;2BArCQ,gBAAgB;IAGpB,WAAA,IAAA,6BAAQ,EAAC,6BAAQ,CAAC,CAAA;GAHd,gBAAgB,CAsC5B"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HTTPRequestHandler = void 0;
|
|
4
|
-
const A_Component_class_1 = require("../../../src/global/A-Component/A-Component.class");
|
|
5
|
-
class HTTPRequestHandler extends A_Component_class_1.A_Component {
|
|
6
|
-
}
|
|
7
|
-
exports.HTTPRequestHandler = HTTPRequestHandler;
|
|
8
|
-
//# sourceMappingURL=http-request-handler.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-request-handler.component.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/components/http-request-handler.component.ts"],"names":[],"mappings":";;;AAAA,6FAAoF;AAEpF,MAAa,kBAAoB,SAAQ,+BAAW;CAQnD;AARD,gDAQC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
-
// const simpleConcept = new A_Concept({
|
|
14
|
-
// // name: 'test-server',
|
|
15
|
-
// // // import: [
|
|
16
|
-
// // // server1,
|
|
17
|
-
// // // server2
|
|
18
|
-
// // // ],
|
|
19
|
-
// // containers: [
|
|
20
|
-
// // new DefaultHttpServer({
|
|
21
|
-
// // components: []
|
|
22
|
-
// // })
|
|
23
|
-
// // ],
|
|
24
|
-
// // context: [
|
|
25
|
-
// // new HttpServer({
|
|
26
|
-
// // port: 3000
|
|
27
|
-
// // }),
|
|
28
|
-
// // new HttpServer({
|
|
29
|
-
// // port: 3001
|
|
30
|
-
// // })
|
|
31
|
-
// // ],
|
|
32
|
-
// })
|
|
33
|
-
// await simpleConcept.run();
|
|
34
|
-
}))();
|
|
35
|
-
//# sourceMappingURL=concept.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"concept.js","sourceRoot":"","sources":["../../../examples/simple-http-server/concept.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,CAAC,GAAS,EAAE;IACR,wCAAwC;IACxC,8BAA8B;IAC9B,sBAAsB;IACtB,yBAAyB;IACzB,wBAAwB;IACxB,eAAe;IACf,uBAAuB;IACvB,qCAAqC;IACrC,gCAAgC;IAChC,gBAAgB;IAChB,YAAY;IACZ,oBAAoB;IACpB,8BAA8B;IAC9B,4BAA4B;IAC5B,iBAAiB;IACjB,8BAA8B;IAC9B,4BAA4B;IAC5B,gBAAgB;IAChB,YAAY;IACZ,KAAK;IAIL,6BAA6B;AAEjC,CAAC,CAAA,CAAC,EAAE,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { A_Container } from "../../../src/global/A-Container/A-Container.class";
|
|
2
|
-
import { IncomingMessage, Server, ServerResponse } from "http";
|
|
3
|
-
import { A_Config } from "../../../src/base/A-Config/A-Config.context";
|
|
4
|
-
export declare class HttpServer extends A_Container<['start', 'stop', 'onRequest']> {
|
|
5
|
-
server: Server;
|
|
6
|
-
port: number;
|
|
7
|
-
create(config: A_Config<'PORT'>): Promise<void>;
|
|
8
|
-
run(): Promise<void>;
|
|
9
|
-
onRequest(req: IncomingMessage, res: ServerResponse): Promise<any>;
|
|
10
|
-
stop(): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
9
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.HttpServer = void 0;
|
|
22
|
-
const A_Container_class_1 = require("../../../src/global/A-Container/A-Container.class");
|
|
23
|
-
const http_1 = require("http");
|
|
24
|
-
const A_Inject_decorator_1 = require("../../../src/decorators/A-Inject/A-Inject.decorator");
|
|
25
|
-
// import { A_Feature } from "@adaas/a-concept/decorators/A-Feature/A-Feature.decorator";
|
|
26
|
-
const A_Concept_class_1 = require("../../../src/global/A-Concept/A_Concept.class");
|
|
27
|
-
const A_Config_context_1 = require("../../../src/base/A-Config/A-Config.context");
|
|
28
|
-
const A_Feature_class_1 = require("../../../src/global/A-Feature/A-Feature.class");
|
|
29
|
-
const http_request_context_1 = require("../contexts/http-request.context");
|
|
30
|
-
class HttpServer extends A_Container_class_1.A_Container {
|
|
31
|
-
create(config) {
|
|
32
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
// Set the server to listen on port 3000
|
|
34
|
-
this.port = config.get('PORT') || 3000;
|
|
35
|
-
// Create the HTTP server
|
|
36
|
-
this.server = (0, http_1.createServer)(this.onRequest.bind(this));
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
run() {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
this.server.listen(this.port, () => {
|
|
42
|
-
console.log(`Server is running on http://localhost:${this.port}`);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
onRequest(req, res) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
return yield this.call('onRequest', {
|
|
49
|
-
fragments: [
|
|
50
|
-
new http_request_context_1.HTTPRequest(req, res)
|
|
51
|
-
]
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
stop() {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () { });
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.HttpServer = HttpServer;
|
|
60
|
-
__decorate([
|
|
61
|
-
A_Concept_class_1.A_Concept.Load(),
|
|
62
|
-
__param(0, (0, A_Inject_decorator_1.A_Inject)(A_Config_context_1.A_Config))
|
|
63
|
-
], HttpServer.prototype, "create", null);
|
|
64
|
-
__decorate([
|
|
65
|
-
A_Concept_class_1.A_Concept.Start()
|
|
66
|
-
], HttpServer.prototype, "run", null);
|
|
67
|
-
__decorate([
|
|
68
|
-
A_Feature_class_1.A_Feature.Define()
|
|
69
|
-
], HttpServer.prototype, "onRequest", null);
|
|
70
|
-
__decorate([
|
|
71
|
-
A_Concept_class_1.A_Concept.Stop()
|
|
72
|
-
], HttpServer.prototype, "stop", null);
|
|
73
|
-
//# sourceMappingURL=http-server.container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-server.container.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/containers/http-server.container.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6FAAoF;AACpF,+BAA6E;AAC7E,gGAAmF;AACnF,yFAAyF;AACzF,uFAA8E;AAC9E,sFAA2E;AAC3E,uFAA8E;AAC9E,2EAA+D;AAM/D,MAAa,UAAW,SAAQ,+BAA2C;IAOjE,MAAM,CACY,MAAwB;;YAE5C,wCAAwC;YACxC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC;YAEvC,yBAAyB;YACzB,IAAI,CAAC,MAAM,GAAG,IAAA,mBAAY,EAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1D,CAAC;KAAA;IAGK,GAAG;;YACL,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE;gBAC/B,OAAO,CAAC,GAAG,CAAC,yCAAyC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YACtE,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;IAIK,SAAS,CACX,GAAoB,EACpB,GAAmB;;YAEnB,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;gBAChC,SAAS,EAAE;oBACP,IAAI,kCAAW,CAAC,GAAG,EAAE,GAAG,CAAC;iBAC5B;aACJ,CAAC,CAAC;QACP,CAAC;KAAA;IAIK,IAAI;8DAAK,CAAC;KAAA;CACnB;AAxCD,gCAwCC;AAjCS;IADL,2BAAS,CAAC,IAAI,EAAE;IAEZ,WAAA,IAAA,6BAAQ,EAAC,2BAAQ,CAAC,CAAA;wCAOtB;AAGK;IADL,2BAAS,CAAC,KAAK,EAAE;qCAKjB;AAIK;IADL,2BAAS,CAAC,MAAM,EAAE;2CAUlB;AAIK;IADL,2BAAS,CAAC,IAAI,EAAE;sCACD"}
|