@adaas/a-concept 0.0.33 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +156 -8
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/src/base/A-Config/A-Config.container.d.ts +5 -2
- package/dist/src/base/A-Config/A-Config.container.js +7 -2
- package/dist/src/base/A-Config/A-Config.container.js.map +1 -1
- package/dist/src/base/A-Config/components/ConfigReader.component.js +1 -1
- package/dist/src/base/A-Config/components/ConfigReader.component.js.map +1 -1
- package/dist/src/base/A-Config/components/FileConfigReader.component.js.map +1 -1
- package/dist/src/base/A-Errors/A-Errors.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-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/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-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 +0,0 @@
|
|
|
1
|
-
import { A_Container } from "../../../src/global/A-Container/A-Container.class";
|
|
2
|
-
import { HttpServer } from "../contexts/http-server.namespace";
|
|
3
|
-
import { A_Concept } from "../../../src/global/A-Concept/A_Concept.class";
|
|
4
|
-
import { A_Config } from "src/containers/A-Config/A-Config.namespace";
|
|
5
|
-
export declare class HttpServerController extends A_Container<HttpServer> {
|
|
6
|
-
create(concept: A_Concept, config: A_Config<'PORT'>): Promise<void>;
|
|
7
|
-
}
|
|
@@ -1,37 +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.HttpServerController = void 0;
|
|
22
|
-
const A_Load_decorator_1 = require("@adaas/a-concept/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator");
|
|
23
|
-
const A_Container_class_1 = require("../../../src/global/A-Container/A-Container.class");
|
|
24
|
-
const A_Inject_decorator_1 = require("../../../src/decorators/A-Inject/A-Inject.decorator");
|
|
25
|
-
const A_Config_namespace_1 = require("src/containers/A-Config/A-Config.namespace");
|
|
26
|
-
class HttpServerController extends A_Container_class_1.A_Container {
|
|
27
|
-
create(concept, config) {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.HttpServerController = HttpServerController;
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, A_Load_decorator_1.A_Load)(),
|
|
35
|
-
__param(1, (0, A_Inject_decorator_1.A_Inject)(A_Config_namespace_1.A_Config))
|
|
36
|
-
], HttpServerController.prototype, "create", null);
|
|
37
|
-
//# sourceMappingURL=http-server.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-server.controller.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/containers/http-server.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6GAAgG;AAChG,6FAAoF;AAGpF,gGAAmF;AAEnF,mFAAsE;AAMtE,MAAa,oBAAqB,SAAQ,+BAAuB;IAIhD,MAAM,CACf,OAAkB,EACE,MAAwB;;QAGhD,CAAC;KAAA;CAEJ;AAXD,oDAWC;AAPgB;IAFZ,IAAA,yBAAM,GACN;IAGI,WAAA,IAAA,6BAAQ,EAAC,6BAAQ,CAAC,CAAA;kDAGtB"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { A_Container } from "../../../src/global/A-Container/A-Container.class";
|
|
2
|
-
import { HttpServer } from "../contexts/http-server.namespace";
|
|
3
|
-
import { A_Config } from "src/containers/A-Config/A-Config.namespace";
|
|
4
|
-
export declare class HttpServerRouter extends A_Container<HttpServer> {
|
|
5
|
-
listen(config: A_Config<'PORT'>): Promise<void>;
|
|
6
|
-
}
|
|
@@ -1,39 +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.HttpServerRouter = void 0;
|
|
22
|
-
const A_Container_class_1 = require("../../../src/global/A-Container/A-Container.class");
|
|
23
|
-
const A_Inject_decorator_1 = require("../../../src/decorators/A-Inject/A-Inject.decorator");
|
|
24
|
-
const A_Config_namespace_1 = require("src/containers/A-Config/A-Config.namespace");
|
|
25
|
-
const A_ConceptLifecycle_1 = require("@adaas/a-concept/decorators/A-ConceptLifecycle");
|
|
26
|
-
class HttpServerRouter extends A_Container_class_1.A_Container {
|
|
27
|
-
listen(config) {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
// const server = this.namespace.getServer(this.namespace.port);
|
|
30
|
-
// Do something with Server e.g. assign routes
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.HttpServerRouter = HttpServerRouter;
|
|
35
|
-
__decorate([
|
|
36
|
-
A_ConceptLifecycle_1.A_Lifecycle.Load(),
|
|
37
|
-
__param(0, (0, A_Inject_decorator_1.A_Inject)(A_Config_namespace_1.A_Config))
|
|
38
|
-
], HttpServerRouter.prototype, "listen", null);
|
|
39
|
-
//# sourceMappingURL=http-server.router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-server.router.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/containers/http-server.router.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6FAAoF;AAGpF,gGAAmF;AACnF,mFAAsE;AACtE,uFAA6E;AAM7E,MAAa,gBAAiB,SAAQ,+BAAuB;IAG5C,MAAM,CACK,MAAwB;;YAE5C,gEAAgE;YAEhE,8CAA8C;QAClD,CAAC;KAAA;CAEJ;AAXD,4CAWC;AARgB;IADZ,gCAAW,CAAC,IAAI,EAAE;IAEd,WAAA,IAAA,6BAAQ,EAAC,6BAAQ,CAAC,CAAA;8CAKtB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { A_Fragment } from "../../../src/global/A-Fragment/A-Fragment.class";
|
|
2
|
-
import { IncomingMessage, ServerResponse } from "http";
|
|
3
|
-
export declare class HTTPRequest extends A_Fragment {
|
|
4
|
-
request: IncomingMessage;
|
|
5
|
-
response: ServerResponse;
|
|
6
|
-
private _body;
|
|
7
|
-
state: 'open' | 'end';
|
|
8
|
-
constructor(request: IncomingMessage, response: ServerResponse);
|
|
9
|
-
protected onInit(): Promise<void>;
|
|
10
|
-
private parseBody;
|
|
11
|
-
end(body: string): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,49 +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.HTTPRequest = void 0;
|
|
13
|
-
const A_Fragment_class_1 = require("../../../src/global/A-Fragment/A-Fragment.class");
|
|
14
|
-
class HTTPRequest extends A_Fragment_class_1.A_Fragment {
|
|
15
|
-
constructor(request, response) {
|
|
16
|
-
super();
|
|
17
|
-
this.state = 'open';
|
|
18
|
-
this.request = request;
|
|
19
|
-
this.response = response;
|
|
20
|
-
}
|
|
21
|
-
onInit() {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
this.response.statusCode = 200;
|
|
24
|
-
this.response.setHeader('Content-Type', 'text/plain');
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
// async toJSON<T extends any>(): Promise<T> {
|
|
28
|
-
// if (!this._body) {
|
|
29
|
-
// this._body = await this.parseBody();
|
|
30
|
-
// }
|
|
31
|
-
// return this._body;
|
|
32
|
-
// }
|
|
33
|
-
parseBody() {
|
|
34
|
-
return new Promise((resolve, reject) => {
|
|
35
|
-
let body = '';
|
|
36
|
-
this.request.on('data', chunk => body += chunk.toString());
|
|
37
|
-
this.request.on('end', () => resolve(JSON.parse(body)));
|
|
38
|
-
this.request.on('error', reject);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
end(body) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
this.state = 'end';
|
|
44
|
-
this.response.end(body);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.HTTPRequest = HTTPRequest;
|
|
49
|
-
//# sourceMappingURL=http-request.context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-request.context.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/contexts/http-request.context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0FAAiF;AAMjF,MAAa,WAAY,SAAQ,6BAAU;IAWvC,YACI,OAAwB,EACxB,QAAwB;QAGxB,KAAK,EAAE,CAAC;QARZ,UAAK,GAAmB,MAAM,CAAA;QAU1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAGe,MAAM;;YAClB,IAAI,CAAC,QAAQ,CAAC,UAAU,GAAG,GAAG,CAAC;YAC/B,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QAC1D,CAAC;KAAA;IAGD,8CAA8C;IAC9C,yBAAyB;IACzB,+CAA+C;IAC/C,QAAQ;IAER,yBAAyB;IACzB,IAAI;IAEI,SAAS;QACb,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC3D,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACxD,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACP,CAAC;IAGK,GAAG,CAAC,IAAY;;YAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;KAAA;CAEJ;AApDD,kCAoDC"}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-server.context.types.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/contexts/http-server.context.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { A_Namespace } from "@adaas/a-concept/global/A-Namespace/A_Namespace.class";
|
|
2
|
-
import { IncomingMessage, Server } from "http";
|
|
3
|
-
import { A_TYPES__HttpServerNamespaceConstructor } from "./http-server.context.types";
|
|
4
|
-
export declare class HttpServer extends A_Namespace<A_TYPES__HttpServerNamespaceConstructor> {
|
|
5
|
-
servers: Map<string, Server>;
|
|
6
|
-
get port(): number;
|
|
7
|
-
registerServer(server: Server, port: number): void;
|
|
8
|
-
getServer(port: number): Server<typeof IncomingMessage, typeof import("http").ServerResponse> | undefined;
|
|
9
|
-
parseBody(req: IncomingMessage): Promise<any>;
|
|
10
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HttpServer = void 0;
|
|
4
|
-
const A_Namespace_class_1 = require("@adaas/a-concept/global/A-Namespace/A_Namespace.class");
|
|
5
|
-
class HttpServer extends A_Namespace_class_1.A_Namespace {
|
|
6
|
-
get port() {
|
|
7
|
-
const [name, port] = this.name.split(':');
|
|
8
|
-
return parseInt(port);
|
|
9
|
-
}
|
|
10
|
-
registerServer(server, port) {
|
|
11
|
-
this.servers.set(port.toString(), server);
|
|
12
|
-
}
|
|
13
|
-
getServer(port) {
|
|
14
|
-
return this.servers.get(port.toString());
|
|
15
|
-
}
|
|
16
|
-
parseBody(req) {
|
|
17
|
-
return new Promise((resolve, reject) => {
|
|
18
|
-
let body = '';
|
|
19
|
-
req.on('data', chunk => body += chunk.toString());
|
|
20
|
-
req.on('end', () => resolve(JSON.parse(body)));
|
|
21
|
-
req.on('error', reject);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.HttpServer = HttpServer;
|
|
26
|
-
//# sourceMappingURL=http-server.namespace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-server.namespace.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/contexts/http-server.namespace.ts"],"names":[],"mappings":";;;AAAA,6FAAoF;AAKpF,MAAa,UAAW,SAAQ,+BAAoD;IAOhF,IAAI,IAAI;QACJ,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE1C,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAGD,cAAc,CAAC,MAAc,EAAE,IAAY;QACvC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,SAAS,CAAC,IAAY;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,SAAS,CAAC,GAAoB;QAC1B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAClD,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC/C,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AA9BD,gCA8BC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// declare module "../modules/simple-http-server.types" {
|
|
3
|
-
// interface SimpleHTTPServerModuleControllers {
|
|
4
|
-
// Orders: OrderController
|
|
5
|
-
// }
|
|
6
|
-
// }
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.OrderController = void 0;
|
|
18
|
-
const A_Component_class_1 = require("../../../src/global/A-Component/A-Component.class");
|
|
19
|
-
class OrderController extends A_Component_class_1.A_Component {
|
|
20
|
-
makeSome1() {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
console.log('Making some request');
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
makeSome2() {
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
console.log('Making some request');
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.OrderController = OrderController;
|
|
32
|
-
//# sourceMappingURL=orders.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orders.controller.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/controllers/orders.controller.ts"],"names":[],"mappings":";AACA,yDAAyD;AACzD,oDAAoD;AACpD,kCAAkC;AAClC,QAAQ;AACR,IAAI;;;;;;;;;;;;AAEJ,6FAAmF;AAEnF,MAAa,eAAgB,SAAQ,+BAAW;IAEtC,SAAS;;YACX,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;QACtC,CAAC;KAAA;IAEK,SAAS;;YACX,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;QACtC,CAAC;KAAA;CAEJ;AAVD,0CAUC"}
|
|
File without changes
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import { A_Load } from "@adaas/a-concept/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator"
|
|
3
|
-
// import { A_Module } from "@adaas/a-concept/global/A_Module.class"
|
|
4
|
-
// import { SimpleHTTPServerModule } from "../modules/simple-http-server.module"
|
|
5
|
-
// import { IncomingMessage, ServerResponse } from "http"
|
|
6
|
-
// import { SimpleHTTPServerContext } from "../modules/simple-http-server.context"
|
|
7
|
-
// import { A_Dependency } from "@adaas/a-concept/decorators/A-Dependency/A-Dependency.decorator"
|
|
8
|
-
// import { A_Run } from "@adaas/a-concept/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator"
|
|
9
|
-
// import { A_Inject } from "../../../src/decorators/A-Inject/A-Inject.decorator"
|
|
10
|
-
// import { OrderController } from "./orders.controller"
|
|
11
|
-
// declare module "../modules/simple-http-server.types" {
|
|
12
|
-
// interface SimpleHTTPServerModuleControllers {
|
|
13
|
-
// Users: UserController
|
|
14
|
-
// }
|
|
15
|
-
// }
|
|
16
|
-
// declare module "../modules/simple-http-server.context" {
|
|
17
|
-
// interface SimpleHTTPServerContext {
|
|
18
|
-
// users: Array<any>
|
|
19
|
-
// }
|
|
20
|
-
// }
|
|
21
|
-
// // @A_Dependency({
|
|
22
|
-
// // name: 'users-controller',
|
|
23
|
-
// // version: '0.0.1',
|
|
24
|
-
// // dependencies: [
|
|
25
|
-
// // SimpleHTTPServerModule
|
|
26
|
-
// // ]
|
|
27
|
-
// // })
|
|
28
|
-
// export class UserController extends A_Module {
|
|
29
|
-
// private SomeModule = A_Inject(OrderController)
|
|
30
|
-
// @A_Load(
|
|
31
|
-
// // after: [SimpleHTTPServerModule]
|
|
32
|
-
// )
|
|
33
|
-
// async defineListeners(
|
|
34
|
-
// ) {
|
|
35
|
-
// /**
|
|
36
|
-
// * Approach with Dependency Manager allows to resolve the module and context in the method
|
|
37
|
-
// */
|
|
38
|
-
// const simpleHTTPServerModule1 = await this.DM.resolve(SimpleHTTPServerModule);
|
|
39
|
-
// const context1 = await this.DM.resolve(SimpleHTTPServerContext);
|
|
40
|
-
// /**
|
|
41
|
-
// * OR
|
|
42
|
-
// *
|
|
43
|
-
// * It's possible to resolve multiple dependencies at once
|
|
44
|
-
// */
|
|
45
|
-
// const [
|
|
46
|
-
// simpleHTTPServerModule2,
|
|
47
|
-
// context
|
|
48
|
-
// ] = await this.DM.resolve([
|
|
49
|
-
// SimpleHTTPServerModule,
|
|
50
|
-
// SimpleHTTPServerContext
|
|
51
|
-
// ]);
|
|
52
|
-
// // simpleHTTPServerModule.create();
|
|
53
|
-
// context.users = [
|
|
54
|
-
// { id: 1, name: 'John Doe' },
|
|
55
|
-
// { id: 2, name: 'Jane Doe' }
|
|
56
|
-
// ];
|
|
57
|
-
// }
|
|
58
|
-
// @A_Load()
|
|
59
|
-
// /**
|
|
60
|
-
// *
|
|
61
|
-
// * Approach with direct injection allows to use the module directly in the method
|
|
62
|
-
// * However, this approach is not recommended as it makes the code less readable and testable
|
|
63
|
-
// * In the example below Injection changes the original method signature that may impact the readability/testability of the code
|
|
64
|
-
// *
|
|
65
|
-
// */
|
|
66
|
-
// async run(
|
|
67
|
-
// @A_Inject(SimpleHTTPServerModule) simpleHTTPServerModule: SimpleHTTPServerModule
|
|
68
|
-
// ) {
|
|
69
|
-
// // simpleHTTPServerModule.create();
|
|
70
|
-
// }
|
|
71
|
-
// async getUser(
|
|
72
|
-
// req: IncomingMessage,
|
|
73
|
-
// res: ServerResponse,
|
|
74
|
-
// id: number
|
|
75
|
-
// ) {
|
|
76
|
-
// const context = new SimpleHTTPServerContext()
|
|
77
|
-
// const user = context.users.find(u => u.id === id);
|
|
78
|
-
// if (user) {
|
|
79
|
-
// res.writeHead(200);
|
|
80
|
-
// res.end(JSON.stringify(user));
|
|
81
|
-
// } else {
|
|
82
|
-
// res.writeHead(404);
|
|
83
|
-
// res.end(JSON.stringify({ message: 'User not found' }));
|
|
84
|
-
// }
|
|
85
|
-
// }
|
|
86
|
-
// }
|
|
87
|
-
//# sourceMappingURL=users.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"users.controller.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/controllers/users.controller.ts"],"names":[],"mappings":";AAAA,kGAAkG;AAClG,oEAAoE;AACpE,gFAAgF;AAChF,yDAAyD;AACzD,kFAAkF;AAClF,iGAAiG;AACjG,+FAA+F;AAC/F,qFAAqF;AACrF,wDAAwD;AAExD,yDAAyD;AACzD,oDAAoD;AACpD,gCAAgC;AAChC,QAAQ;AACR,IAAI;AAEJ,2DAA2D;AAC3D,0CAA0C;AAC1C,4BAA4B;AAC5B,QAAQ;AACR,IAAI;AAIJ,qBAAqB;AACrB,mCAAmC;AACnC,2BAA2B;AAC3B,yBAAyB;AACzB,oCAAoC;AACpC,WAAW;AACX,QAAQ;AACR,iDAAiD;AAGjD,sDAAsD;AAGtD,eAAe;AACf,6CAA6C;AAC7C,QAAQ;AACR,6BAA6B;AAC7B,UAAU;AAEV,cAAc;AACd,qGAAqG;AACrG,cAAc;AACd,yFAAyF;AACzF,2EAA2E;AAC3E,cAAc;AACd,gBAAgB;AAChB,cAAc;AACd,oEAAoE;AACpE,cAAc;AACd,kBAAkB;AAClB,uCAAuC;AACvC,sBAAsB;AACtB,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC,cAAc;AAEd,8CAA8C;AAC9C,4BAA4B;AAC5B,2CAA2C;AAC3C,0CAA0C;AAC1C,aAAa;AACb,QAAQ;AAIR,gBAAgB;AAChB,UAAU;AACV,UAAU;AACV,wFAAwF;AACxF,mGAAmG;AACnG,sIAAsI;AACtI,UAAU;AACV,UAAU;AACV,iBAAiB;AACjB,2FAA2F;AAC3F,UAAU;AACV,8CAA8C;AAC9C,QAAQ;AAGR,qBAAqB;AACrB,gCAAgC;AAChC,+BAA+B;AAC/B,qBAAqB;AACrB,UAAU;AAEV,wDAAwD;AAGxD,6DAA6D;AAC7D,sBAAsB;AACtB,kCAAkC;AAClC,6CAA6C;AAC7C,mBAAmB;AACnB,kCAAkC;AAClC,sEAAsE;AACtE,YAAY;AACZ,QAAQ;AACR,IAAI"}
|
|
@@ -1,25 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.SimpleHTTPServerContext = void 0;
|
|
10
|
-
const A_Namespace_class_1 = require("../../../src/global/A-Namespace/A_Namespace.class");
|
|
11
|
-
let SimpleHTTPServerContext = class SimpleHTTPServerContext {
|
|
12
|
-
parseBody(req) {
|
|
13
|
-
return new Promise((resolve, reject) => {
|
|
14
|
-
let body = '';
|
|
15
|
-
req.on('data', chunk => body += chunk.toString());
|
|
16
|
-
req.on('end', () => resolve(JSON.parse(body)));
|
|
17
|
-
req.on('error', reject);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
exports.SimpleHTTPServerContext = SimpleHTTPServerContext;
|
|
22
|
-
exports.SimpleHTTPServerContext = SimpleHTTPServerContext = __decorate([
|
|
23
|
-
(0, A_Namespace_class_1.A_Context)({})
|
|
24
|
-
], SimpleHTTPServerContext);
|
|
25
|
-
//# sourceMappingURL=simple-http-server.context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"simple-http-server.context.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/modules/simple-http-server.context.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6FAAkF;AAM3E,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAIhC,SAAS,CAAC,GAAoB;QAC1B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAClD,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC/C,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAZY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,6BAAS,EAAC,EAAE,CAAC;GACD,uBAAuB,CAYnC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { A_Module } from "@adaas/a-concept/global/A_Module.class";
|
|
2
|
-
import { A_TYPES__ModuleConstructor } from "../../../src/types/A_Module.types";
|
|
3
|
-
import { Server } from 'http';
|
|
4
|
-
import { SimpleHTTPServerModuleControllers } from "./simple-http-server.types";
|
|
5
|
-
declare module "@adaas/a-concept/global/A-Concept/A_Concept.class" {
|
|
6
|
-
interface A_Concept {
|
|
7
|
-
server: any;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export type SimpleServerModuleConfig = {
|
|
11
|
-
port: number;
|
|
12
|
-
} & A_TYPES__ModuleConstructor;
|
|
13
|
-
export declare class SimpleHTTPServerModule extends A_Module<SimpleServerModuleConfig> {
|
|
14
|
-
server: Server;
|
|
15
|
-
controllers: SimpleHTTPServerModuleControllers;
|
|
16
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SimpleHTTPServerModule = void 0;
|
|
4
|
-
const A_Module_class_1 = require("@adaas/a-concept/global/A_Module.class");
|
|
5
|
-
class SimpleHTTPServerModule extends A_Module_class_1.A_Module {
|
|
6
|
-
}
|
|
7
|
-
exports.SimpleHTTPServerModule = SimpleHTTPServerModule;
|
|
8
|
-
//# sourceMappingURL=simple-http-server.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"simple-http-server.module.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/modules/simple-http-server.module.ts"],"names":[],"mappings":";;;AACA,2EAAkE;AAmBlE,MAAa,sBAAuB,SAAQ,yBAAkC;CAM7E;AAND,wDAMC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"simple-http-server.types.js","sourceRoot":"","sources":["../../../../examples/simple-http-server/modules/simple-http-server.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
declare function Inject(): (target: any, key: string, index: number) => void;
|
|
2
|
-
/**
|
|
3
|
-
* Allows to define a new lifecycle method
|
|
4
|
-
*/
|
|
5
|
-
declare function Define(...args: any[]): any;
|
|
6
|
-
declare class User {
|
|
7
|
-
}
|
|
8
|
-
declare class CRUDController {
|
|
9
|
-
constructor();
|
|
10
|
-
post(request: ControllerRequest): void;
|
|
11
|
-
}
|
|
12
|
-
declare class StatsController {
|
|
13
|
-
onRequest(): void;
|
|
14
|
-
count(request: ControllerRequest): void;
|
|
15
|
-
}
|
|
16
|
-
declare class ControllerRequest {
|
|
17
|
-
user: User;
|
|
18
|
-
constructor(user: User);
|
|
19
|
-
}
|
|
20
|
-
declare class DependencyResolver {
|
|
21
|
-
resolve<T extends {
|
|
22
|
-
new (...args: any[]): any;
|
|
23
|
-
}>(target: any): T;
|
|
24
|
-
}
|
|
25
|
-
declare class Architecture {
|
|
26
|
-
private static instance;
|
|
27
|
-
private definitions;
|
|
28
|
-
private constructor();
|
|
29
|
-
static getInstance(): Architecture;
|
|
30
|
-
static register(constructor: {
|
|
31
|
-
new (...args: any[]): any;
|
|
32
|
-
}, config: {
|
|
33
|
-
name: string;
|
|
34
|
-
}): void;
|
|
35
|
-
static getLifecycle(constructor: {
|
|
36
|
-
new (...args: any[]): any;
|
|
37
|
-
}): Map<string, Function> | undefined;
|
|
38
|
-
}
|
|
39
|
-
declare class Container {
|
|
40
|
-
}
|
|
41
|
-
interface Feature<_LifecycleMethodName extends string, _RuntimeContext extends any> {
|
|
42
|
-
name: _LifecycleMethodName;
|
|
43
|
-
context: new (...args: any[]) => _RuntimeContext;
|
|
44
|
-
}
|
|
45
|
-
declare class Concept<_LifecycleMethodNames extends string, _RuntimeContext extends any, _FeaturesDefinition2 extends Record<_LifecycleMethodNames, new (...args: any[]) => _RuntimeContext>> {
|
|
46
|
-
constructor(props: {
|
|
47
|
-
exports: _FeaturesDefinition2;
|
|
48
|
-
context: [];
|
|
49
|
-
import: any[];
|
|
50
|
-
});
|
|
51
|
-
resolve2(): Promise<{
|
|
52
|
-
[K in keyof _FeaturesDefinition2]: (context: InstanceType<_FeaturesDefinition2[K]>) => void;
|
|
53
|
-
}>;
|
|
54
|
-
}
|
|
55
|
-
declare class App extends Container {
|
|
56
|
-
server: any;
|
|
57
|
-
components: any[];
|
|
58
|
-
constructor(components: any[]);
|
|
59
|
-
static get Lifecycle(): {
|
|
60
|
-
onRequest: (...args: any[]) => any;
|
|
61
|
-
};
|
|
62
|
-
onRequest(request: any): void;
|
|
63
|
-
}
|
|
64
|
-
declare class startContext {
|
|
65
|
-
}
|
|
66
|
-
declare const myConcept: Concept<string, unknown, {
|
|
67
|
-
start: typeof startContext;
|
|
68
|
-
}>;
|