@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,162 +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
|
-
function Inject() {
|
|
21
|
-
return function (target, key, index) {
|
|
22
|
-
console.log('Inject', target, key, index);
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
function Define(name, ...args) {
|
|
26
|
-
return function (target, key, descriptor) {
|
|
27
|
-
Architecture
|
|
28
|
-
.register(target.constructor, {
|
|
29
|
-
name
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
class User {
|
|
34
|
-
}
|
|
35
|
-
class CRUDController {
|
|
36
|
-
constructor(
|
|
37
|
-
// Context Injection to adjust behavior
|
|
38
|
-
// @Inject(User) user
|
|
39
|
-
) {
|
|
40
|
-
}
|
|
41
|
-
post(request) {
|
|
42
|
-
request.user;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
__decorate([
|
|
46
|
-
__param(0, Inject())
|
|
47
|
-
], CRUDController.prototype, "post", null);
|
|
48
|
-
class StatsController {
|
|
49
|
-
// This method is context independent and "extends" the behavior of the parent Class (without inheritance)
|
|
50
|
-
// Here you can define what to expect from the previous step
|
|
51
|
-
// Basically here we can extend the behavior of the parent class
|
|
52
|
-
onRequest() {
|
|
53
|
-
}
|
|
54
|
-
// This method is context dependent
|
|
55
|
-
count(request) {
|
|
56
|
-
request.user;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
__decorate([
|
|
60
|
-
App.Lifecycle.onRequest()
|
|
61
|
-
], StatsController.prototype, "onRequest", null);
|
|
62
|
-
__decorate([
|
|
63
|
-
__param(0, Inject())
|
|
64
|
-
], StatsController.prototype, "count", null);
|
|
65
|
-
class ControllerRequest {
|
|
66
|
-
constructor(user) {
|
|
67
|
-
this.user = user;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
class DependencyResolver {
|
|
71
|
-
resolve(target) {
|
|
72
|
-
return new target();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
class Architecture {
|
|
76
|
-
constructor() {
|
|
77
|
-
this.definitions = new Map();
|
|
78
|
-
}
|
|
79
|
-
static getInstance() {
|
|
80
|
-
if (!this.instance) {
|
|
81
|
-
this.instance = new Architecture();
|
|
82
|
-
}
|
|
83
|
-
return this.instance;
|
|
84
|
-
}
|
|
85
|
-
static register(constructor, config) {
|
|
86
|
-
const instance = this.getInstance();
|
|
87
|
-
instance.definitions.set(constructor, {
|
|
88
|
-
lifecycle: new Map()
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
static getLifecycle(constructor) {
|
|
92
|
-
var _a;
|
|
93
|
-
const instance = this.getInstance();
|
|
94
|
-
return (_a = instance.definitions.get(constructor)) === null || _a === void 0 ? void 0 : _a.lifecycle;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
class Container {
|
|
98
|
-
}
|
|
99
|
-
class Concept {
|
|
100
|
-
// private steps!: _FeaturesDefinition
|
|
101
|
-
constructor(props) {
|
|
102
|
-
}
|
|
103
|
-
// async resolve(): Promise<{
|
|
104
|
-
// [K in _FeaturesDefinition[number]['name']]: (
|
|
105
|
-
// context: InstanceType<
|
|
106
|
-
// Extract<_FeaturesDefinition[number], { name: K }>['context']
|
|
107
|
-
// >
|
|
108
|
-
// ) => void;
|
|
109
|
-
// }> {
|
|
110
|
-
// return {} as any
|
|
111
|
-
// }
|
|
112
|
-
resolve2() {
|
|
113
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
return {};
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
class App extends Container {
|
|
119
|
-
constructor(components) {
|
|
120
|
-
super();
|
|
121
|
-
this.components = [];
|
|
122
|
-
// this.server = new Server();
|
|
123
|
-
this.components = components;
|
|
124
|
-
}
|
|
125
|
-
static get Lifecycle() {
|
|
126
|
-
return {
|
|
127
|
-
onRequest: (...args) => Define('onRequest', ...args)
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
// The container has a set of lifecycle methods that can be used to extend the behavior by adding new methods
|
|
131
|
-
// Define Decorator allows to create a custom lifecycle attached to the class.
|
|
132
|
-
// So any other classes injected here will be able to use the lifecycle methods
|
|
133
|
-
onRequest(request) {
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
__decorate([
|
|
137
|
-
Define()
|
|
138
|
-
], App.prototype, "onRequest", null);
|
|
139
|
-
class startContext {
|
|
140
|
-
}
|
|
141
|
-
const myConcept = new Concept({
|
|
142
|
-
exports: {
|
|
143
|
-
start: startContext
|
|
144
|
-
},
|
|
145
|
-
context: [],
|
|
146
|
-
import: [
|
|
147
|
-
// We say that concept has User Entity
|
|
148
|
-
User,
|
|
149
|
-
// We say that concept has an APP with CRUDController
|
|
150
|
-
new App([
|
|
151
|
-
//
|
|
152
|
-
CRUDController,
|
|
153
|
-
// new CRUDController(),
|
|
154
|
-
])
|
|
155
|
-
]
|
|
156
|
-
});
|
|
157
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
158
|
-
// const target2 = await myConcept
|
|
159
|
-
// .resolve2();
|
|
160
|
-
// target2.start()
|
|
161
|
-
}))();
|
|
162
|
-
//# sourceMappingURL=test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../examples/simple-http-server/test.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { A_Container } from "../../global/A-Container/A-Container.class";
|
|
2
|
-
import { A_Config } from "./A-Config.namespace";
|
|
3
|
-
export declare class A_ConfigInitializer extends A_Container<A_Config> {
|
|
4
|
-
private reader;
|
|
5
|
-
identifyReader(): Promise<void>;
|
|
6
|
-
readVariables(): Promise<void>;
|
|
7
|
-
}
|
|
@@ -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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.A_ConfigInitializer = void 0;
|
|
19
|
-
const A_Container_class_1 = require("../../global/A-Container/A-Container.class");
|
|
20
|
-
const A_Load_decorator_1 = require("@adaas/a-concept/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator");
|
|
21
|
-
const a_utils_1 = require("@adaas/a-utils");
|
|
22
|
-
const FileConfigReader_component_1 = require("./components/FileConfigReader.component");
|
|
23
|
-
const ENVConfigReader_component_1 = require("./components/ENVConfigReader.component");
|
|
24
|
-
const A_Context_class_1 = require("../../global/A-Context/A-Context.class");
|
|
25
|
-
// @A_Injectable({
|
|
26
|
-
// })
|
|
27
|
-
class A_ConfigInitializer extends A_Container_class_1.A_Container {
|
|
28
|
-
identifyReader(
|
|
29
|
-
// @A_Inject(A_LoggerContext) logger: A_LoggerContext
|
|
30
|
-
) {
|
|
31
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
// OR Inject the logger by calling Context Provider
|
|
33
|
-
// const logger2 = await this.CP.resolve(A_LoggerContext);
|
|
34
|
-
const fs = yield a_utils_1.A_Polyfills.fs();
|
|
35
|
-
switch (true) {
|
|
36
|
-
case A_Context_class_1.A_Context.environment === 'server' && !!fs.existsSync(`${this.namespace}.conf.json`):
|
|
37
|
-
this.reader = A_Context_class_1.A_Context.resolve(FileConfigReader_component_1.FileConfigReader);
|
|
38
|
-
break;
|
|
39
|
-
case A_Context_class_1.A_Context.environment === 'server':
|
|
40
|
-
!fs.existsSync(`${this.namespace}.conf.json`);
|
|
41
|
-
this.reader = A_Context_class_1.A_Context.resolve(ENVConfigReader_component_1.ENVConfigReader);
|
|
42
|
-
break;
|
|
43
|
-
case A_Context_class_1.A_Context.environment === 'browser':
|
|
44
|
-
this.reader = A_Context_class_1.A_Context.resolve(ENVConfigReader_component_1.ENVConfigReader);
|
|
45
|
-
break;
|
|
46
|
-
default:
|
|
47
|
-
throw new Error(`Environment ${A_Context_class_1.A_Context.environment} is not supported`);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
readVariables() {
|
|
52
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
const config = yield this.reader.read(this.namespace.CONFIG_PROPERTIES);
|
|
54
|
-
this.namespace.set(config);
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.A_ConfigInitializer = A_ConfigInitializer;
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, A_Load_decorator_1.A_Load)({})
|
|
61
|
-
], A_ConfigInitializer.prototype, "identifyReader", null);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, A_Load_decorator_1.A_Load)({})
|
|
64
|
-
], A_ConfigInitializer.prototype, "readVariables", null);
|
|
65
|
-
//# sourceMappingURL=A-Config.container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Config.container.js","sourceRoot":"","sources":["../../../../src/containers/A-Config/A-Config.container.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6FAAoF;AAEpF,6GAAgG;AAChG,4CAA6C;AAC7C,wFAA2E;AAC3E,sFAAyE;AAEzE,uFAA8E;AAI9E,kBAAkB;AAElB,KAAK;AACL,MAAa,mBAAoB,SAAQ,+BAAqB;IAOpD,cAAc;IAChB,qDAAqD;;;YAGrD,mDAAmD;YACnD,0DAA0D;YAE1D,MAAM,EAAE,GAAG,MAAM,qBAAW,CAAC,EAAE,EAAE,CAAC;YAElC,QAAQ,IAAI,EAAE,CAAC;gBAEX,KAAK,2BAAS,CAAC,WAAW,KAAK,QAAQ,IAAI,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,SAAS,YAAY,CAAC;oBACrF,IAAI,CAAC,MAAM,GAAG,2BAAS,CAAC,OAAO,CAAC,6CAAgB,CAAC,CAAC;oBAClD,MAAM;gBAGV,KAAK,2BAAS,CAAC,WAAW,KAAK,QAAQ;oBAAE,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,SAAS,YAAY,CAAC,CAAA;oBAClF,IAAI,CAAC,MAAM,GAAG,2BAAS,CAAC,OAAO,CAAC,2CAAe,CAAC,CAAC;oBACjD,MAAM;gBAEV,KAAK,2BAAS,CAAC,WAAW,KAAK,SAAS;oBACpC,IAAI,CAAC,MAAM,GAAG,2BAAS,CAAC,OAAO,CAAC,2CAAe,CAAC,CAAC;oBACjD,MAAM;gBAEV;oBACI,MAAM,IAAI,KAAK,CAAC,eAAe,2BAAS,CAAC,WAAW,mBAAmB,CAAC,CAAC;YACjF,CAAC;QACL,CAAC;KAAA;IAIK,aAAa;;YACf,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;YAExE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;KAAA;CAGJ;AA7CD,kDA6CC;AAtCS;IAFL,IAAA,yBAAM,EAAC,EACP,CAAC;yDA4BD;AAIK;IADL,IAAA,yBAAM,EAAC,EAAE,CAAC;wDAKV"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { A_Namespace } from "@adaas/a-concept/global/A-Namespace/A_Namespace.class";
|
|
2
|
-
import { A_TYPES__ConfigContainerConstructor } from "./A-Config.types";
|
|
3
|
-
export declare class A_Config<T extends string = any> extends A_Namespace<A_TYPES__ConfigContainerConstructor<T>> {
|
|
4
|
-
private VARIABLES;
|
|
5
|
-
CONFIG_PROPERTIES: T[];
|
|
6
|
-
protected DEFAULT_ALLOWED_TO_READ_PROPERTIES: readonly ["CONFIG_SDK_VALIDATION", "CONFIG_VERBOSE", "CONFIG_IGNORE_ERRORS"];
|
|
7
|
-
constructor(config: A_TYPES__ConfigContainerConstructor<T>);
|
|
8
|
-
/**
|
|
9
|
-
* This method is used to get the configuration property by name
|
|
10
|
-
*
|
|
11
|
-
* @param property
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
get<_OutType = any>(property: T | typeof this.DEFAULT_ALLOWED_TO_READ_PROPERTIES[number]): _OutType;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* This method is used to set the configuration property by name
|
|
18
|
-
* OR set multiple properties at once by passing an array of objects
|
|
19
|
-
*
|
|
20
|
-
* @param variables
|
|
21
|
-
*/
|
|
22
|
-
set<V extends string = T | typeof this.DEFAULT_ALLOWED_TO_READ_PROPERTIES[number]>(variables: Array<{
|
|
23
|
-
property: V;
|
|
24
|
-
value: any;
|
|
25
|
-
}>): any;
|
|
26
|
-
set<V extends string = T | typeof this.DEFAULT_ALLOWED_TO_READ_PROPERTIES[number]>(variables: Record<V, any>): any;
|
|
27
|
-
set<V extends string = T | typeof this.DEFAULT_ALLOWED_TO_READ_PROPERTIES[number]>(property: V, value: any): any;
|
|
28
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.A_Config = void 0;
|
|
4
|
-
const A_Namespace_class_1 = require("@adaas/a-concept/global/A-Namespace/A_Namespace.class");
|
|
5
|
-
class A_Config extends A_Namespace_class_1.A_Namespace {
|
|
6
|
-
constructor(config) {
|
|
7
|
-
super(config);
|
|
8
|
-
// Custom properties
|
|
9
|
-
this.VARIABLES = new Map();
|
|
10
|
-
this.CONFIG_PROPERTIES = [];
|
|
11
|
-
this.DEFAULT_ALLOWED_TO_READ_PROPERTIES = [
|
|
12
|
-
'CONFIG_SDK_VALIDATION',
|
|
13
|
-
'CONFIG_VERBOSE',
|
|
14
|
-
'CONFIG_IGNORE_ERRORS',
|
|
15
|
-
];
|
|
16
|
-
const targetConfig = config;
|
|
17
|
-
this.CONFIG_PROPERTIES = targetConfig.variables ? targetConfig.variables : [];
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* This method is used to get the configuration property by name
|
|
21
|
-
*
|
|
22
|
-
* @param property
|
|
23
|
-
* @returns
|
|
24
|
-
*/
|
|
25
|
-
get(property) {
|
|
26
|
-
if (this.CONFIG_PROPERTIES.includes(property))
|
|
27
|
-
return this.VARIABLES.get(property);
|
|
28
|
-
throw new Error('Property not exists or not allowed to read');
|
|
29
|
-
// return this.concept.Errors.throw(A_SDK_CONSTANTS__ERROR_CODES.CONFIGURATION_PROPERTY_NOT_EXISTS_OR_NOT_ALLOWED_TO_READ) as never;
|
|
30
|
-
}
|
|
31
|
-
set(property, value) {
|
|
32
|
-
var _a;
|
|
33
|
-
const array = Array.isArray(property)
|
|
34
|
-
? property
|
|
35
|
-
: typeof property === 'string'
|
|
36
|
-
? [{ property, value }]
|
|
37
|
-
: Object
|
|
38
|
-
.keys(property)
|
|
39
|
-
.map((key) => ({
|
|
40
|
-
property: key,
|
|
41
|
-
value: property[key]
|
|
42
|
-
}));
|
|
43
|
-
for (const { property, value } of array) {
|
|
44
|
-
let targetValue = value
|
|
45
|
-
? value
|
|
46
|
-
: ((_a = this.config) === null || _a === void 0 ? void 0 : _a.defaults)
|
|
47
|
-
? this.config.defaults[property]
|
|
48
|
-
: undefined;
|
|
49
|
-
this.VARIABLES.set(property, targetValue);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.A_Config = A_Config;
|
|
54
|
-
//# sourceMappingURL=A-Config.namespace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Config.namespace.js","sourceRoot":"","sources":["../../../../src/containers/A-Config/A-Config.namespace.ts"],"names":[],"mappings":";;;AAAA,6FAAoF;AAIpF,MAAa,QAEX,SAAQ,+BAAmD;IAazD,YACI,MAA8C;QAE9C,KAAK,CAAC,MAAM,CAAC,CAAC;QAdlB,oBAAoB;QACZ,cAAS,GAAqB,IAAI,GAAG,EAAe,CAAC;QAC7D,sBAAiB,GAAQ,EAAE,CAAC;QAElB,uCAAkC,GAAG;YAC3C,uBAAuB;YACvB,gBAAgB;YAChB,sBAAsB;SAChB,CAAC;QAQP,MAAM,YAAY,GAAG,MAAM,CAAA;QAE3B,IAAI,CAAC,iBAAiB,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IAClF,CAAC;IAGD;;;;;OAKG;IACH,GAAG,CACC,QAAoE;QAEpE,IAAI,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,QAAe,CAAC;YAChD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAkB,CAAa,CAAC;QAE9D,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAU,CAAC;QACvE,oIAAoI;IACxI,CAAC;IAwBD,GAAG,CACC,QAGmB,EACnB,KAAW;;QAEX,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;YACjC,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,OAAO,QAAQ,KAAK,QAAQ;gBAC1B,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;gBACvB,CAAC,CAAC,MAAM;qBACH,IAAI,CAAC,QAAQ,CAAC;qBACd,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;oBACX,QAAQ,EAAE,GAAG;oBACb,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC;iBACvB,CAAC,CAAC,CAAC;QAEhB,KAAK,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,KAAK,EAAE,CAAC;YAEtC,IAAI,WAAW,GAAG,KAAK;gBACnB,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,QAAQ;oBACnB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAa,CAAC;oBACrC,CAAC,CAAC,SAAS,CAAC;YAEpB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAkB,EAAE,WAAW,CAAC,CAAC;QACxD,CAAC;IACL,CAAC;CACJ;AA7FD,4BA6FC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { A_TYPES__NamespaceConstructor } from "@adaas/a-concept/global/A-Namespace/A_Namespace.types";
|
|
2
|
-
export type A_TYPES__ConfigContainerConstructor<T extends string> = {
|
|
3
|
-
/**
|
|
4
|
-
* The name of the Config Container
|
|
5
|
-
*/
|
|
6
|
-
variables?: Array<T>;
|
|
7
|
-
/**
|
|
8
|
-
* Allows to set the default values for the variables
|
|
9
|
-
*/
|
|
10
|
-
defaults?: Record<T, any>;
|
|
11
|
-
} & A_TYPES__NamespaceConstructor;
|
|
12
|
-
export type A_TYPES__ConfigContainer_DefaultProperties = 'CONFIG_SDK_VALIDATION' | 'CONFIG_VERBOSE' | 'CONFIG_IGNORE_ERRORS';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Config.types.js","sourceRoot":"","sources":["../../../../src/containers/A-Config/A-Config.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { A_Component } from "../../../global/A-Component/A-Component.class";
|
|
2
|
-
import { A_Config } from "../A-Config.namespace";
|
|
3
|
-
/**
|
|
4
|
-
* Config Reader
|
|
5
|
-
*/
|
|
6
|
-
export declare class ConfigReader extends A_Component<A_Config> {
|
|
7
|
-
/**
|
|
8
|
-
* Get the configuration property by Name
|
|
9
|
-
* @param property
|
|
10
|
-
*/
|
|
11
|
-
resolve<_ReturnType = any>(property: string): _ReturnType;
|
|
12
|
-
/**
|
|
13
|
-
* This method reads the configuration and sets the values to the context
|
|
14
|
-
*
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
read<T extends string>(variables?: Array<T>): Promise<Record<T, any>>;
|
|
18
|
-
}
|
|
@@ -1,37 +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.ConfigReader = void 0;
|
|
13
|
-
const A_Component_class_1 = require("../../../global/A-Component/A-Component.class");
|
|
14
|
-
/**
|
|
15
|
-
* Config Reader
|
|
16
|
-
*/
|
|
17
|
-
class ConfigReader extends A_Component_class_1.A_Component {
|
|
18
|
-
/**
|
|
19
|
-
* Get the configuration property by Name
|
|
20
|
-
* @param property
|
|
21
|
-
*/
|
|
22
|
-
resolve(property) {
|
|
23
|
-
return property;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* This method reads the configuration and sets the values to the context
|
|
27
|
-
*
|
|
28
|
-
* @returns
|
|
29
|
-
*/
|
|
30
|
-
read() {
|
|
31
|
-
return __awaiter(this, arguments, void 0, function* (variables = []) {
|
|
32
|
-
return {};
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.ConfigReader = ConfigReader;
|
|
37
|
-
//# sourceMappingURL=ConfigReader.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigReader.component.js","sourceRoot":"","sources":["../../../../../src/containers/A-Config/components/ConfigReader.component.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAAoF;AAKpF;;GAEG;AACH,MAAa,YAAa,SAAQ,+BAAqB;IAGnD;;;OAGG;IACH,OAAO,CAAoB,QAAgB;QACvC,OAAO,QAAuB,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACG,IAAI;6DACN,YAAsB,EAAE;YAExB,OAAO,EAAoB,CAAC;QAChC,CAAC;KAAA;CACJ;AArBD,oCAqBC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ConfigReader } from "./ConfigReader.component";
|
|
2
|
-
export declare class ENVConfigReader extends ConfigReader {
|
|
3
|
-
/**
|
|
4
|
-
* Get the configuration property Name
|
|
5
|
-
* @param property
|
|
6
|
-
*/
|
|
7
|
-
getConfigurationProperty_ENV_Alias(property: string): string;
|
|
8
|
-
resolve<_ReturnType = any>(property: string): _ReturnType;
|
|
9
|
-
read<T extends string>(variables?: Array<T>): Promise<Record<T, any>>;
|
|
10
|
-
}
|
|
@@ -1,37 +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.ENVConfigReader = void 0;
|
|
13
|
-
const a_utils_1 = require("@adaas/a-utils");
|
|
14
|
-
const ConfigReader_component_1 = require("./ConfigReader.component");
|
|
15
|
-
class ENVConfigReader extends ConfigReader_component_1.ConfigReader {
|
|
16
|
-
/**
|
|
17
|
-
* Get the configuration property Name
|
|
18
|
-
* @param property
|
|
19
|
-
*/
|
|
20
|
-
getConfigurationProperty_ENV_Alias(property) {
|
|
21
|
-
return `${a_utils_1.A_CommonHelper.toUpperSnakeCase(this.namespace.name)}_${a_utils_1.A_CommonHelper.toUpperSnakeCase(property)}`;
|
|
22
|
-
}
|
|
23
|
-
resolve(property) {
|
|
24
|
-
return process.env[this.getConfigurationProperty_ENV_Alias(property)];
|
|
25
|
-
}
|
|
26
|
-
read() {
|
|
27
|
-
return __awaiter(this, arguments, void 0, function* (variables = []) {
|
|
28
|
-
const config = {};
|
|
29
|
-
variables.forEach(variable => {
|
|
30
|
-
config[variable] = this.resolve(variable);
|
|
31
|
-
});
|
|
32
|
-
return config;
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.ENVConfigReader = ENVConfigReader;
|
|
37
|
-
//# sourceMappingURL=ENVConfigReader.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ENVConfigReader.component.js","sourceRoot":"","sources":["../../../../../src/containers/A-Config/components/ENVConfigReader.component.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAgD;AAChD,qEAAwD;AAGxD,MAAa,eAAgB,SAAQ,qCAAY;IAG7C;;;OAGG;IACH,kCAAkC,CAAC,QAAgB;QAC/C,OAAO,GAAG,wBAAc,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,wBAAc,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC;IAClH,CAAC;IAGD,OAAO,CAAoB,QAAgB;QACvC,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,kCAAkC,CAAC,QAAQ,CAAC,CAAgB,CAAC;IACzF,CAAC;IAGK,IAAI;6DAAmB,YAAsB,EAAE;YACjD,MAAM,MAAM,GAAmB,EAAoB,CAAC;YAEpD,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBACzB,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;CACJ;AA1BD,0CA0BC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ConfigReader } from "./ConfigReader.component";
|
|
2
|
-
export declare class FileConfigReader extends ConfigReader {
|
|
3
|
-
private FileData;
|
|
4
|
-
/**
|
|
5
|
-
* Get the configuration property Name
|
|
6
|
-
* @param property
|
|
7
|
-
*/
|
|
8
|
-
getConfigurationProperty_File_Alias(property: string): string;
|
|
9
|
-
resolve<_ReturnType = any>(property: string): _ReturnType;
|
|
10
|
-
read<T extends string>(variables?: Array<T>): Promise<Record<T, any>>;
|
|
11
|
-
}
|
|
@@ -1,47 +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.FileConfigReader = void 0;
|
|
13
|
-
const a_utils_1 = require("@adaas/a-utils");
|
|
14
|
-
const ConfigReader_component_1 = require("./ConfigReader.component");
|
|
15
|
-
class FileConfigReader extends ConfigReader_component_1.ConfigReader {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.FileData = new Map();
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Get the configuration property Name
|
|
22
|
-
* @param property
|
|
23
|
-
*/
|
|
24
|
-
getConfigurationProperty_File_Alias(property) {
|
|
25
|
-
return a_utils_1.A_CommonHelper.toCamelCase(property);
|
|
26
|
-
}
|
|
27
|
-
resolve(property) {
|
|
28
|
-
return this.FileData.get(this.getConfigurationProperty_File_Alias(property));
|
|
29
|
-
}
|
|
30
|
-
read(variables) {
|
|
31
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
const fs = yield a_utils_1.A_Polyfills.fs();
|
|
33
|
-
try {
|
|
34
|
-
const data = fs.readFileSync(`${this.namespace.name}.conf.json`, 'utf8');
|
|
35
|
-
const config = JSON.parse(data);
|
|
36
|
-
this.FileData = new Map(Object.entries(config));
|
|
37
|
-
return config;
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
// this.context.Logger.error(error);
|
|
41
|
-
return {};
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.FileConfigReader = FileConfigReader;
|
|
47
|
-
//# sourceMappingURL=FileConfigReader.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileConfigReader.component.js","sourceRoot":"","sources":["../../../../../src/containers/A-Config/components/FileConfigReader.component.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA6D;AAC7D,qEAAwD;AAIxD,MAAa,gBAAiB,SAAQ,qCAAY;IAAlD;;QAEY,aAAQ,GAAqB,IAAI,GAAG,EAAe,CAAC;IAkChE,CAAC;IAhCG;;;OAGG;IACH,mCAAmC,CAAC,QAAgB;QAChD,OAAO,wBAAc,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAGD,OAAO,CAAoB,QAAgB;QACvC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAmC,CAAC,QAAQ,CAAC,CAAgB,CAAC;IAChG,CAAC;IAGK,IAAI,CACN,SAAoB;;YAEpB,MAAM,EAAE,GAAG,MAAM,qBAAW,CAAC,EAAE,EAAE,CAAC;YAClC,IAAI,CAAC;gBACD,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,YAAY,EAAE,MAAM,CAAC,CAAC;gBAEzE,MAAM,MAAM,GAAmB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAEhD,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;gBAEhD,OAAO,MAAM,CAAC;YAElB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,oCAAoC;gBACpC,OAAO,EAAoB,CAAC;YAChC,CAAC;QACL,CAAC;KAAA;CACJ;AApCD,4CAoCC"}
|
|
@@ -1,32 +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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.A_ErrorsInitializer = void 0;
|
|
19
|
-
const A_Container_class_1 = require("../../global/A-Container/A-Container.class");
|
|
20
|
-
const A_Load_decorator_1 = require("@adaas/a-concept/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator");
|
|
21
|
-
class A_ErrorsInitializer extends A_Container_class_1.A_Container {
|
|
22
|
-
init() {
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
yield this.namespace.ready;
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.A_ErrorsInitializer = A_ErrorsInitializer;
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, A_Load_decorator_1.A_Load)({})
|
|
31
|
-
], A_ErrorsInitializer.prototype, "init", null);
|
|
32
|
-
//# sourceMappingURL=A-Errors.container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Errors.container.js","sourceRoot":"","sources":["../../../../src/containers/A-Errors/A-Errors.container.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6FAAoF;AAEpF,6GAAgG;AAIhG,MAAa,mBAAoB,SAAQ,+BAAqB;IAGpD,IAAI;;YACN,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QAC/B,CAAC;KAAA;CAEJ;AAPD,kDAOC;AAJS;IADL,IAAA,yBAAM,EAAC,EAAE,CAAC;+CAGV"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { A_Namespace } from "@adaas/a-concept/global/A-Namespace/A_Namespace.class";
|
|
2
|
-
import { A_CONSTANTS__ERROR_CODES, A_Error, A_ServerError, A_TYPES__Dictionary, A_TYPES__Error, A_TYPES__ServerError } from "@adaas/a-utils";
|
|
3
|
-
import { A_TYPES__A_ErrorsConstructor } from "./A-Errors.types";
|
|
4
|
-
export declare class A_Errors extends A_Namespace<Partial<A_TYPES__A_ErrorsConstructor>> {
|
|
5
|
-
protected registeredErrors: Map<string, A_TYPES__Error | A_TYPES__ServerError>;
|
|
6
|
-
constructor(params: Partial<A_TYPES__A_ErrorsConstructor>);
|
|
7
|
-
/**
|
|
8
|
-
* This method adds a dictionary of errors to the registry.
|
|
9
|
-
*
|
|
10
|
-
* @param registry
|
|
11
|
-
*/
|
|
12
|
-
addRegistry(registry: A_TYPES__Dictionary<A_TYPES__Error> | A_TYPES__Error[]): A_Errors;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* Adds an error to the registry
|
|
16
|
-
*
|
|
17
|
-
* @param error
|
|
18
|
-
*/
|
|
19
|
-
registerError(error: A_TYPES__Error): A_Errors;
|
|
20
|
-
/**
|
|
21
|
-
* This method returns an error object by its code.
|
|
22
|
-
*
|
|
23
|
-
* @param code
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
getError(code: A_CONSTANTS__ERROR_CODES | string): A_ServerError | A_Error | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* This method throws an error by its code.
|
|
29
|
-
*
|
|
30
|
-
* @param code
|
|
31
|
-
*/
|
|
32
|
-
throw(code: A_CONSTANTS__ERROR_CODES | string): never;
|
|
33
|
-
/**
|
|
34
|
-
* This method wraps an error into the SDK error object.
|
|
35
|
-
*
|
|
36
|
-
* @param error
|
|
37
|
-
* @returns
|
|
38
|
-
*/
|
|
39
|
-
wrap(error: Error | A_Error | unknown): A_ServerError | A_Error;
|
|
40
|
-
}
|