@adaas/a-concept 0.0.63 → 0.1.1
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/dist/index.d.ts +24 -32
- package/dist/index.js +35 -52
- package/dist/index.js.map +1 -1
- package/dist/src/constants/env.constants.d.ts +15 -8
- package/dist/src/constants/env.constants.js +17 -10
- package/dist/src/constants/env.constants.js.map +1 -1
- package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.d.ts +23 -0
- package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js +69 -0
- package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js.map +1 -0
- package/dist/src/global/A-Abstraction/A-Abstraction.class.d.ts +47 -20
- package/dist/src/global/A-Abstraction/A-Abstraction.class.js +55 -48
- package/dist/src/global/A-Abstraction/A-Abstraction.class.js.map +1 -1
- package/dist/src/global/A-Abstraction/A-Abstraction.error.d.ts +7 -0
- package/dist/src/global/A-Abstraction/A-Abstraction.error.js +12 -0
- package/dist/src/global/A-Abstraction/A-Abstraction.error.js.map +1 -0
- package/dist/src/global/A-Abstraction/A-Abstraction.types.d.ts +27 -12
- package/dist/src/global/A-Abstraction/A-Abstraction.types.js +0 -8
- package/dist/src/global/A-Abstraction/A-Abstraction.types.js.map +1 -1
- package/dist/src/global/A-Caller/A_Caller.class.d.ts +33 -0
- package/dist/src/global/A-Caller/A_Caller.class.js +44 -0
- package/dist/src/global/A-Caller/A_Caller.class.js.map +1 -0
- package/dist/src/global/A-Caller/A_Caller.error.d.ts +7 -0
- package/dist/src/global/A-Caller/A_Caller.error.js +12 -0
- package/dist/src/global/A-Caller/A_Caller.error.js.map +1 -0
- package/dist/src/global/A-Caller/A_Caller.types.d.ts +18 -0
- package/dist/src/{base/A-Errors/A-Errors.types.js → global/A-Caller/A_Caller.types.js} +1 -1
- package/dist/src/global/A-Caller/A_Caller.types.js.map +1 -0
- package/dist/src/global/A-Component/A-Component.class.d.ts +20 -3
- package/dist/src/global/A-Component/A-Component.class.js +35 -19
- package/dist/src/global/A-Component/A-Component.class.js.map +1 -1
- package/dist/src/global/A-Component/A-Component.constants.d.ts +6 -0
- package/dist/src/global/A-Component/A-Component.constants.js +11 -0
- package/dist/src/global/A-Component/A-Component.constants.js.map +1 -0
- package/dist/src/global/A-Component/A-Component.meta.d.ts +4 -4
- package/dist/src/global/A-Component/A-Component.meta.js +6 -8
- package/dist/src/global/A-Component/A-Component.meta.js.map +1 -1
- package/dist/src/global/A-Component/A-Component.types.d.ts +40 -22
- package/dist/src/global/A-Component/A-Component.types.js +1 -8
- package/dist/src/global/A-Component/A-Component.types.js.map +1 -1
- package/dist/src/global/A-Concept/A-Concept.class.d.ts +153 -0
- package/dist/src/global/A-Concept/A-Concept.class.js +260 -0
- package/dist/src/global/A-Concept/A-Concept.class.js.map +1 -0
- package/dist/src/global/A-Concept/A-Concept.constants.d.ts +33 -0
- package/dist/src/global/A-Concept/A-Concept.constants.js +39 -0
- package/dist/src/global/A-Concept/A-Concept.constants.js.map +1 -0
- package/dist/src/global/A-Concept/{A_Concept.meta.js → A-Concept.meta.js} +1 -2
- package/dist/src/global/A-Concept/A-Concept.meta.js.map +1 -0
- package/dist/src/global/A-Concept/A-Concept.types.d.ts +83 -0
- package/dist/src/global/{A-Channel/A-Channel.types.js → A-Concept/A-Concept.types.js} +1 -1
- package/dist/src/global/A-Concept/A-Concept.types.js.map +1 -0
- package/dist/src/global/A-Container/A-Container.class.d.ts +31 -35
- package/dist/src/global/A-Container/A-Container.class.js +34 -55
- package/dist/src/global/A-Container/A-Container.class.js.map +1 -1
- package/dist/src/global/A-Container/A-Container.constants.d.ts +5 -0
- package/dist/src/global/A-Container/A-Container.constants.js +10 -0
- package/dist/src/global/A-Container/A-Container.constants.js.map +1 -0
- package/dist/src/global/A-Container/A-Container.meta.d.ts +6 -6
- package/dist/src/global/A-Container/A-Container.meta.js +5 -6
- package/dist/src/global/A-Container/A-Container.meta.js.map +1 -1
- package/dist/src/global/A-Container/A-Container.types.d.ts +31 -25
- package/dist/src/global/A-Container/A-Container.types.js +1 -7
- package/dist/src/global/A-Container/A-Container.types.js.map +1 -1
- package/dist/src/global/A-Context/A-Context.class.d.ts +302 -76
- package/dist/src/global/A-Context/A-Context.class.js +436 -244
- package/dist/src/global/A-Context/A-Context.class.js.map +1 -1
- package/dist/src/global/A-Context/A-Context.error.d.ts +20 -0
- package/dist/src/global/A-Context/A-Context.error.js +25 -0
- package/dist/src/global/A-Context/A-Context.error.js.map +1 -0
- package/dist/src/global/A-Context/A-Context.types.d.ts +5 -0
- package/dist/src/global/A-Context/A-Context.types.js +1 -0
- package/dist/src/global/A-Entity/A-Entity.class.d.ts +18 -18
- package/dist/src/global/A-Entity/A-Entity.class.js +36 -43
- package/dist/src/global/A-Entity/A-Entity.class.js.map +1 -1
- package/dist/src/global/A-Entity/A-Entity.constants.d.ts +11 -0
- package/dist/src/global/A-Entity/A-Entity.constants.js +17 -0
- package/dist/src/global/A-Entity/A-Entity.constants.js.map +1 -0
- package/dist/src/global/A-Entity/A-Entity.error.d.ts +7 -0
- package/dist/src/global/A-Entity/A-Entity.error.js +12 -0
- package/dist/src/global/A-Entity/A-Entity.error.js.map +1 -0
- package/dist/src/global/A-Entity/A-Entity.meta.d.ts +2 -2
- package/dist/src/global/A-Entity/A-Entity.meta.js +2 -2
- package/dist/src/global/A-Entity/A-Entity.meta.js.map +1 -1
- package/dist/src/global/A-Entity/A-Entity.types.d.ts +24 -29
- package/dist/src/global/A-Entity/A-Entity.types.js +1 -13
- package/dist/src/global/A-Entity/A-Entity.types.js.map +1 -1
- package/dist/src/global/A-Error/A_Error.class.d.ts +219 -0
- package/dist/src/global/A-Error/A_Error.class.js +267 -0
- package/dist/src/global/A-Error/A_Error.class.js.map +1 -0
- package/dist/src/global/A-Error/A_Error.constants.d.ts +5 -0
- package/dist/src/global/A-Error/A_Error.constants.js +9 -0
- package/dist/src/global/A-Error/A_Error.constants.js.map +1 -0
- package/dist/src/global/A-Error/A_Error.types.d.ts +89 -0
- package/dist/src/{decorators/A-Inject/A-Inject.decorator.types.js → global/A-Error/A_Error.types.js} +1 -1
- package/dist/src/global/A-Error/A_Error.types.js.map +1 -0
- package/dist/src/global/A-Feature/A-Feature-Define.decorator.d.ts +15 -0
- package/dist/src/{decorators → global}/A-Feature/A-Feature-Define.decorator.js +21 -27
- package/dist/src/global/A-Feature/A-Feature-Define.decorator.js.map +1 -0
- package/dist/src/{decorators → global}/A-Feature/A-Feature-Extend.decorator.d.ts +26 -3
- package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js +97 -0
- package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js.map +1 -0
- package/dist/src/global/A-Feature/A-Feature.class.d.ts +120 -30
- package/dist/src/global/A-Feature/A-Feature.class.js +205 -73
- package/dist/src/global/A-Feature/A-Feature.class.js.map +1 -1
- package/dist/src/global/A-Feature/A-Feature.error.d.ts +25 -0
- package/dist/src/global/A-Feature/A-Feature.error.js +33 -0
- package/dist/src/global/A-Feature/A-Feature.error.js.map +1 -0
- package/dist/src/global/A-Feature/A-Feature.types.d.ts +241 -18
- package/dist/src/global/A-Feature/A-Feature.types.js +16 -22
- package/dist/src/global/A-Feature/A-Feature.types.js.map +1 -1
- package/dist/src/global/A-Fragment/A-Fragment.class.d.ts +19 -27
- package/dist/src/global/A-Fragment/A-Fragment.class.js +21 -91
- package/dist/src/global/A-Fragment/A-Fragment.class.js.map +1 -1
- package/dist/src/global/A-Fragment/A-Fragment.types.d.ts +19 -1
- package/dist/src/global/A-Fragment/A-Fragment.types.js +3 -0
- package/dist/src/global/A-Fragment/A-Fragment.types.js.map +1 -1
- package/dist/src/global/A-Inject/A-Inject.decorator.d.ts +80 -0
- package/dist/src/global/A-Inject/A-Inject.decorator.js +49 -0
- package/dist/src/global/A-Inject/A-Inject.decorator.js.map +1 -0
- package/dist/src/global/A-Inject/A-Inject.error.d.ts +5 -0
- package/dist/src/global/A-Inject/A-Inject.error.js +10 -0
- package/dist/src/global/A-Inject/A-Inject.error.js.map +1 -0
- package/dist/src/global/A-Inject/A-Inject.types.d.ts +42 -0
- package/dist/src/{decorators/A-Entity/A-Entity.decorator.types.js → global/A-Inject/A-Inject.types.js} +1 -1
- package/dist/src/global/A-Inject/A-Inject.types.js.map +1 -0
- package/dist/src/global/A-Meta/A-Meta.class.d.ts +1 -1
- package/dist/src/global/A-Meta/A-Meta.types.d.ts +14 -0
- package/dist/src/global/A-Meta/A-Meta.types.js +1 -0
- package/dist/src/global/A-Scope/A-Scope.class.d.ts +406 -63
- package/dist/src/global/A-Scope/A-Scope.class.js +533 -287
- package/dist/src/global/A-Scope/A-Scope.class.js.map +1 -1
- package/dist/src/global/A-Scope/A-Scope.error.d.ts +6 -0
- package/dist/src/global/A-Scope/A-Scope.error.js +11 -0
- package/dist/src/global/A-Scope/A-Scope.error.js.map +1 -0
- package/dist/src/global/A-Scope/A-Scope.types.d.ts +50 -13
- package/dist/src/global/A-Stage/A-Stage.class.d.ts +31 -23
- package/dist/src/global/A-Stage/A-Stage.class.js +100 -68
- package/dist/src/global/A-Stage/A-Stage.class.js.map +1 -1
- package/dist/src/global/A-Stage/A-Stage.error.d.ts +2 -1
- package/dist/src/global/A-Stage/A-Stage.error.js +5 -2
- package/dist/src/global/A-Stage/A-Stage.error.js.map +1 -1
- package/dist/src/global/A-Stage/A-Stage.types.d.ts +4 -16
- package/dist/src/global/A-Stage/A-Stage.types.js +0 -16
- package/dist/src/global/A-Stage/A-Stage.types.js.map +1 -1
- package/dist/src/global/ASEID/ASEID.class.d.ts +130 -0
- package/dist/src/global/ASEID/ASEID.class.js +167 -0
- package/dist/src/global/ASEID/ASEID.class.js.map +1 -0
- package/dist/src/global/ASEID/ASEID.constants.js +2 -0
- package/dist/src/global/ASEID/ASEID.constants.js.map +1 -0
- package/dist/src/global/ASEID/ASEID.error.d.ts +5 -0
- package/dist/src/global/ASEID/ASEID.error.js +10 -0
- package/dist/src/global/ASEID/ASEID.error.js.map +1 -0
- package/dist/src/global/ASEID/ASEID.types.d.ts +65 -0
- package/dist/src/global/ASEID/ASEID.types.js +5 -0
- package/dist/src/global/ASEID/ASEID.types.js.map +1 -0
- package/dist/src/helpers/A_Common.helper.d.ts +28 -0
- package/dist/src/helpers/A_Common.helper.js +170 -0
- package/dist/src/helpers/A_Common.helper.js.map +1 -0
- package/dist/src/helpers/A_Formatter.helper.d.ts +35 -0
- package/dist/src/helpers/A_Formatter.helper.js +62 -0
- package/dist/src/helpers/A_Formatter.helper.js.map +1 -0
- package/dist/src/helpers/A_Identity.helper.d.ts +29 -0
- package/dist/src/helpers/A_Identity.helper.js +43 -0
- package/dist/src/helpers/A_Identity.helper.js.map +1 -0
- package/dist/src/helpers/{StepsManager.class.d.ts → A_StepsManager.class.d.ts} +4 -2
- package/dist/src/helpers/{StepsManager.class.js → A_StepsManager.class.js} +10 -5
- package/dist/src/helpers/A_StepsManager.class.js.map +1 -0
- package/dist/src/helpers/A_TypeGuards.helper.d.ts +205 -0
- package/dist/src/helpers/A_TypeGuards.helper.js +288 -0
- package/dist/src/helpers/A_TypeGuards.helper.js.map +1 -0
- package/dist/src/types/A_Common.types.d.ts +36 -0
- package/dist/src/types/A_Common.types.js +3 -0
- package/dist/src/types/A_Common.types.js.map +1 -0
- package/index.ts +27 -51
- package/jest.config.ts +1 -0
- package/package.json +1 -2
- package/src/constants/env.constants.ts +18 -11
- package/src/global/A-Abstraction/A-Abstraction-Extend.decorator.ts +103 -0
- package/src/global/A-Abstraction/A-Abstraction.class.ts +71 -65
- package/src/global/A-Abstraction/A-Abstraction.error.ts +9 -0
- package/src/global/A-Abstraction/A-Abstraction.types.ts +52 -13
- package/src/global/A-Caller/A_Caller.class.ts +61 -0
- package/src/global/A-Caller/A_Caller.error.ts +10 -0
- package/src/global/A-Caller/A_Caller.types.ts +25 -0
- package/src/global/A-Component/A-Component.class.ts +26 -15
- package/src/global/A-Component/A-Component.constants.ts +9 -0
- package/src/global/A-Component/A-Component.meta.ts +6 -16
- package/src/global/A-Component/A-Component.types.ts +53 -28
- package/src/global/A-Concept/A-Concept.class.ts +316 -0
- package/src/global/A-Concept/A-Concept.constants.ts +36 -0
- package/src/global/A-Concept/A-Concept.meta.ts +17 -0
- package/src/global/A-Concept/A-Concept.types.ts +100 -0
- package/src/global/A-Container/A-Container.class.ts +42 -83
- package/src/global/A-Container/A-Container.constants.ts +5 -0
- package/src/global/A-Container/A-Container.meta.ts +7 -11
- package/src/global/A-Container/A-Container.types.ts +38 -34
- package/src/global/A-Context/A-Context.class.ts +648 -412
- package/src/global/A-Context/A-Context.error.ts +44 -0
- package/src/global/A-Context/A-Context.types.ts +14 -0
- package/src/global/A-Entity/A-Entity.class.ts +39 -52
- package/src/global/A-Entity/A-Entity.constants.ts +12 -0
- package/src/global/A-Entity/A-Entity.error.ts +12 -0
- package/src/global/A-Entity/A-Entity.meta.ts +4 -4
- package/src/global/A-Entity/A-Entity.types.ts +31 -36
- package/src/global/A-Error/A_Error.class.ts +408 -0
- package/src/global/A-Error/A_Error.constants.ts +11 -0
- package/src/global/A-Error/A_Error.types.ts +96 -0
- package/src/{decorators → global}/A-Feature/A-Feature-Define.decorator.ts +31 -37
- package/src/global/A-Feature/A-Feature-Extend.decorator.ts +187 -0
- package/src/global/A-Feature/A-Feature.class.ts +279 -122
- package/src/global/A-Feature/A-Feature.error.ts +33 -0
- package/src/global/A-Feature/A-Feature.types.ts +278 -40
- package/src/global/A-Fragment/A-Fragment.class.ts +29 -100
- package/src/global/A-Fragment/A-Fragment.types.ts +25 -3
- package/src/global/A-Inject/A-Inject.decorator.ts +167 -0
- package/src/global/A-Inject/A-Inject.error.ts +8 -0
- package/src/global/A-Inject/A-Inject.types.ts +75 -0
- package/src/global/A-Meta/A-Meta.class.ts +1 -1
- package/src/global/A-Meta/A-Meta.types.ts +21 -0
- package/src/global/A-Scope/A-Scope.class.ts +841 -443
- package/src/global/A-Scope/A-Scope.error.ts +13 -0
- package/src/global/A-Scope/A-Scope.types.ts +65 -26
- package/src/global/A-Stage/A-Stage.class.ts +142 -80
- package/src/global/A-Stage/A-Stage.error.ts +4 -2
- package/src/global/A-Stage/A-Stage.types.ts +4 -25
- package/src/global/ASEID/ASEID.class.ts +275 -0
- package/src/global/ASEID/ASEID.error.ts +12 -0
- package/src/global/ASEID/ASEID.types.ts +79 -0
- package/src/helpers/A_Common.helper.ts +204 -0
- package/src/helpers/A_Formatter.helper.ts +58 -0
- package/src/helpers/A_Identity.helper.ts +53 -0
- package/src/helpers/{StepsManager.class.ts → A_StepsManager.class.ts} +19 -3
- package/src/helpers/A_TypeGuards.helper.ts +318 -0
- package/src/types/A_Common.types.ts +79 -0
- package/tests/A-Common.test.ts +117 -0
- package/tests/A-Component.test.ts +11 -6
- package/tests/A-Concept.test.ts +19 -22
- package/tests/A-Entity.test.ts +24 -24
- package/tests/A-Error.test.ts +129 -0
- package/tests/A-Feature.test.ts +34 -25
- package/tests/A-Scope.test.ts +50 -22
- package/tests/ASEID.test.ts +74 -0
- package/tsconfig.build.json +2 -1
- package/tsconfig.json +3 -2
- package/dist/src/base/A-Config/A-Config.container.d.ts +0 -9
- package/dist/src/base/A-Config/A-Config.container.js +0 -69
- package/dist/src/base/A-Config/A-Config.container.js.map +0 -1
- package/dist/src/base/A-Config/A-Config.context.d.ts +0 -30
- package/dist/src/base/A-Config/A-Config.context.js +0 -60
- package/dist/src/base/A-Config/A-Config.context.js.map +0 -1
- package/dist/src/base/A-Config/A-Config.types.d.ts +0 -20
- package/dist/src/base/A-Config/A-Config.types.js +0 -7
- package/dist/src/base/A-Config/A-Config.types.js.map +0 -1
- package/dist/src/base/A-Config/components/ConfigReader.component.d.ts +0 -29
- package/dist/src/base/A-Config/components/ConfigReader.component.js +0 -84
- package/dist/src/base/A-Config/components/ConfigReader.component.js.map +0 -1
- package/dist/src/base/A-Config/components/ENVConfigReader.component.d.ts +0 -10
- package/dist/src/base/A-Config/components/ENVConfigReader.component.js +0 -37
- package/dist/src/base/A-Config/components/ENVConfigReader.component.js.map +0 -1
- package/dist/src/base/A-Config/components/FileConfigReader.component.d.ts +0 -11
- package/dist/src/base/A-Config/components/FileConfigReader.component.js +0 -48
- package/dist/src/base/A-Config/components/FileConfigReader.component.js.map +0 -1
- package/dist/src/base/A-Errors/A-Error.entity.d.ts +0 -3
- package/dist/src/base/A-Errors/A-Error.entity.js +0 -8
- package/dist/src/base/A-Errors/A-Error.entity.js.map +0 -1
- package/dist/src/base/A-Errors/A-Errors.component.d.ts +0 -19
- package/dist/src/base/A-Errors/A-Errors.component.js +0 -87
- package/dist/src/base/A-Errors/A-Errors.component.js.map +0 -1
- package/dist/src/base/A-Errors/A-Errors.context.d.ts +0 -27
- package/dist/src/base/A-Errors/A-Errors.context.js +0 -50
- package/dist/src/base/A-Errors/A-Errors.context.js.map +0 -1
- package/dist/src/base/A-Errors/A-Errors.types.d.ts +0 -5
- package/dist/src/base/A-Errors/A-Errors.types.js.map +0 -1
- package/dist/src/base/A-Logger/A-Logger.component.d.ts +0 -31
- package/dist/src/base/A-Logger/A-Logger.component.js +0 -155
- package/dist/src/base/A-Logger/A-Logger.component.js.map +0 -1
- package/dist/src/base/A-Logger/A-Logger.types.js +0 -2
- package/dist/src/base/A-Logger/A-Logger.types.js.map +0 -1
- package/dist/src/base/A-Polyfill/A-Polyfill.component.d.ts +0 -5
- package/dist/src/base/A-Polyfill/A-Polyfill.component.js +0 -34
- package/dist/src/base/A-Polyfill/A-Polyfill.component.js.map +0 -1
- package/dist/src/decorators/A-Abstraction/A-Abstraction-Extend.decorator.d.ts +0 -14
- package/dist/src/decorators/A-Abstraction/A-Abstraction-Extend.decorator.js +0 -53
- package/dist/src/decorators/A-Abstraction/A-Abstraction-Extend.decorator.js.map +0 -1
- package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.types.d.ts +0 -2
- package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.types.js +0 -3
- package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.types.js.map +0 -1
- package/dist/src/decorators/A-Connect/A-Connect.decorator.d.ts +0 -19
- package/dist/src/decorators/A-Connect/A-Connect.decorator.js +0 -31
- package/dist/src/decorators/A-Connect/A-Connect.decorator.js.map +0 -1
- package/dist/src/decorators/A-Connect/A-Connect.decorator.types.d.ts +0 -1
- package/dist/src/decorators/A-Connect/A-Connect.decorator.types.js +0 -3
- package/dist/src/decorators/A-Connect/A-Connect.decorator.types.js.map +0 -1
- package/dist/src/decorators/A-Entity/A-Entity-List.decorator.d.ts +0 -1
- package/dist/src/decorators/A-Entity/A-Entity-List.decorator.js +0 -8
- package/dist/src/decorators/A-Entity/A-Entity-List.decorator.js.map +0 -1
- package/dist/src/decorators/A-Entity/A-Entity.decorator.types.d.ts +0 -14
- package/dist/src/decorators/A-Entity/A-Entity.decorator.types.js.map +0 -1
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.d.ts +0 -19
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js.map +0 -1
- package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.js +0 -81
- package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.js.map +0 -1
- package/dist/src/decorators/A-Feature/A-Feature.decorator.types.d.ts +0 -96
- package/dist/src/decorators/A-Feature/A-Feature.decorator.types.js +0 -3
- package/dist/src/decorators/A-Feature/A-Feature.decorator.types.js.map +0 -1
- package/dist/src/decorators/A-Inject/A-Inject.decorator.d.ts +0 -30
- package/dist/src/decorators/A-Inject/A-Inject.decorator.js +0 -47
- package/dist/src/decorators/A-Inject/A-Inject.decorator.js.map +0 -1
- package/dist/src/decorators/A-Inject/A-Inject.decorator.types.d.ts +0 -48
- package/dist/src/decorators/A-Inject/A-Inject.decorator.types.js.map +0 -1
- package/dist/src/global/A-Channel/A-Channel.class.d.ts +0 -16
- package/dist/src/global/A-Channel/A-Channel.class.js +0 -59
- package/dist/src/global/A-Channel/A-Channel.class.js.map +0 -1
- package/dist/src/global/A-Channel/A-Channel.types.d.ts +0 -68
- package/dist/src/global/A-Channel/A-Channel.types.js.map +0 -1
- package/dist/src/global/A-Command/A-Command.class.d.ts +0 -187
- package/dist/src/global/A-Command/A-Command.class.js +0 -349
- package/dist/src/global/A-Command/A-Command.class.js.map +0 -1
- package/dist/src/global/A-Command/A-Command.constants.d.ts +0 -17
- package/dist/src/global/A-Command/A-Command.constants.js +0 -22
- package/dist/src/global/A-Command/A-Command.constants.js.map +0 -1
- package/dist/src/global/A-Command/A-Command.meta.d.ts +0 -11
- package/dist/src/global/A-Command/A-Command.meta.js +0 -18
- package/dist/src/global/A-Command/A-Command.meta.js.map +0 -1
- package/dist/src/global/A-Command/A-Command.types.d.ts +0 -43
- package/dist/src/global/A-Command/A-Command.types.js +0 -10
- package/dist/src/global/A-Command/A-Command.types.js.map +0 -1
- package/dist/src/global/A-Command/context/A_Command.context.d.ts +0 -64
- package/dist/src/global/A-Command/context/A_Command.context.js +0 -85
- package/dist/src/global/A-Command/context/A_Command.context.js.map +0 -1
- package/dist/src/global/A-Concept/A_Concept.class.d.ts +0 -104
- package/dist/src/global/A-Concept/A_Concept.class.js +0 -217
- package/dist/src/global/A-Concept/A_Concept.class.js.map +0 -1
- package/dist/src/global/A-Concept/A_Concept.meta.js.map +0 -1
- package/dist/src/global/A-Concept/A_Concept.types.d.ts +0 -103
- package/dist/src/global/A-Concept/A_Concept.types.js +0 -28
- package/dist/src/global/A-Concept/A_Concept.types.js.map +0 -1
- package/dist/src/global/A-Feature/A-FeatureCaller.class.d.ts +0 -22
- package/dist/src/global/A-Feature/A-FeatureCaller.class.js +0 -26
- package/dist/src/global/A-Feature/A-FeatureCaller.class.js.map +0 -1
- package/dist/src/helpers/StepsManager.class.js.map +0 -1
- package/dist/src/types/A_Module.types.d.ts +0 -17
- package/dist/src/types/A_Module.types.js +0 -22
- package/dist/src/types/A_Module.types.js.map +0 -1
- package/examples/entity/concept.ts +0 -68
- package/examples/entity/entities/Task.entity.ts +0 -110
- package/examples/entity/entities/User.entity.ts +0 -62
- package/examples/fe-be/channels/Test.channel.ts +0 -27
- package/examples/fe-be/components/BE-Controller.component.ts +0 -20
- package/examples/fe-be/components/FE.component.ts +0 -13
- package/examples/fe-be/containers/ServerApp.container.ts +0 -8
- package/examples/fe-be/containers/WebApp.container.ts +0 -13
- package/examples/multi-container/channels/Direct.channel.ts +0 -39
- package/examples/multi-container/concept.ts +0 -0
- package/examples/multi-container/containers/Command.container.ts +0 -41
- package/examples/multi-container/containers/Schedule.container.ts +0 -52
- package/examples/simple/components/A.component.ts +0 -71
- package/examples/simple/components/B.component.ts +0 -68
- package/examples/simple/concept.ts +0 -87
- package/examples/simple/containers/Main.container.ts +0 -88
- package/examples/simple/containers/Secondary.container.ts +0 -26
- package/examples/simple/context/Fragment_A.context.ts +0 -25
- package/examples/simple/context/Fragment_B.context.ts +0 -19
- package/examples/simple/entities/EntityA.entity.ts +0 -32
- package/examples/simple-http-server/components/http-error-handler.component.ts +0 -47
- package/examples/simple-http-server/components/http-request-handler.component.ts +0 -13
- package/examples/simple-http-server/concept.ts +0 -35
- package/examples/simple-http-server/containers/http-server.container.ts +0 -57
- package/examples/simple-http-server/contexts/http-request.context.ts +0 -59
- package/examples/simple-http-server/contexts/http-server.context.types.ts +0 -0
- package/examples/simple-http-server/controllers/orders.controller.ts +0 -20
- package/examples/simple-http-server/controllers/users.controller.ts +0 -104
- package/examples/simple-http-server/test.ts +0 -290
- package/src/base/A-Config/A-Config.container.ts +0 -68
- package/src/base/A-Config/A-Config.context.ts +0 -114
- package/src/base/A-Config/A-Config.types.ts +0 -28
- package/src/base/A-Config/components/ConfigReader.component.ts +0 -68
- package/src/base/A-Config/components/ENVConfigReader.component.ts +0 -31
- package/src/base/A-Config/components/FileConfigReader.component.ts +0 -41
- package/src/base/A-Errors/A-Error.entity.ts +0 -10
- package/src/base/A-Errors/A-Errors.component.ts +0 -103
- package/src/base/A-Errors/A-Errors.context.ts +0 -90
- package/src/base/A-Errors/A-Errors.types.ts +0 -6
- package/src/base/A-Logger/A-Logger.component.ts +0 -192
- package/src/base/A-Logger/A-Logger.types.ts +0 -0
- package/src/base/A-Polyfill/A-Polyfill.component.ts +0 -18
- package/src/decorators/A-Abstraction/A-Abstraction-Extend.decorator.ts +0 -81
- package/src/decorators/A-Abstraction/A-Abstraction.decorator.types.ts +0 -21
- package/src/decorators/A-Connect/A-Connect.decorator.ts +0 -71
- package/src/decorators/A-Connect/A-Connect.decorator.types.ts +0 -6
- package/src/decorators/A-Entity/A-Entity-List.decorator.ts +0 -12
- package/src/decorators/A-Entity/A-Entity.decorator.types.ts +0 -18
- package/src/decorators/A-Feature/A-Feature-Extend.decorator.ts +0 -151
- package/src/decorators/A-Feature/A-Feature.decorator.types.ts +0 -142
- package/src/decorators/A-Inject/A-Inject.decorator.ts +0 -119
- package/src/decorators/A-Inject/A-Inject.decorator.types.ts +0 -85
- package/src/global/A-Channel/A-Channel.class.ts +0 -111
- package/src/global/A-Channel/A-Channel.types.ts +0 -114
- package/src/global/A-Command/A-Command.class.ts +0 -419
- package/src/global/A-Command/A-Command.constants.ts +0 -27
- package/src/global/A-Command/A-Command.meta.ts +0 -22
- package/src/global/A-Command/A-Command.types.ts +0 -73
- package/src/global/A-Command/context/A_Command.context.ts +0 -114
- package/src/global/A-Concept/A_Concept.class.ts +0 -298
- package/src/global/A-Concept/A_Concept.meta.ts +0 -32
- package/src/global/A-Concept/A_Concept.types.ts +0 -143
- package/src/global/A-Feature/A-FeatureCaller.class.ts +0 -38
- package/src/types/A_Module.types.ts +0 -23
- package/tests/A-Command.test.ts +0 -133
- package/tests/A-Config.test.ts +0 -172
- /package/dist/src/global/A-Concept/{A_Concept.meta.d.ts → A-Concept.meta.d.ts} +0 -0
- /package/dist/src/{base/A-Logger/A-Logger.types.d.ts → global/ASEID/ASEID.constants.d.ts} +0 -0
- /package/{examples/fe-be/concept.ts → src/global/ASEID/ASEID.constants.ts} +0 -0
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { A_TYPES__Command_Constructor, A_TYPES__Command_Listener, A_TYPES__Command_Serialized } from "./A-Command.types";
|
|
2
|
-
import { A_Error, ASEID } from "@adaas/a-utils";
|
|
3
|
-
import { A_Scope } from "../A-Scope/A-Scope.class";
|
|
4
|
-
import { A_CONSTANTS__A_Command_Event, A_CONSTANTS__A_Command_Status } from "./A-Command.constants";
|
|
5
|
-
export declare class A_Command<InvokeType extends A_TYPES__Command_Constructor = A_TYPES__Command_Constructor, ResultType extends Record<string, any> = Record<string, any>, LifecycleEvents extends string = A_CONSTANTS__A_Command_Event> {
|
|
6
|
-
/**
|
|
7
|
-
* Command Identifier that corresponds to the class name
|
|
8
|
-
*/
|
|
9
|
-
static get code(): string;
|
|
10
|
-
/**
|
|
11
|
-
* DEFAULT Namespace of the command from environment variable A_CONCEPT_NAMESPACE
|
|
12
|
-
* [!] If environment variable is not set, it will default to 'a-concept'
|
|
13
|
-
*/
|
|
14
|
-
static get namespace(): string;
|
|
15
|
-
/**
|
|
16
|
-
* DEFAULT Scope of the command from environment variable A_CONCEPT_DEFAULT_SCOPE
|
|
17
|
-
* [!] If environment variable is not set, it will default to 'core'
|
|
18
|
-
* [!] Scope is an application specific identifier that can be used to group commands together
|
|
19
|
-
* [!] e.g. 'default', 'core', 'public', 'internal', etc
|
|
20
|
-
*/
|
|
21
|
-
static get scope(): string;
|
|
22
|
-
/**
|
|
23
|
-
* ASEID is a command identifier that is unique across the system
|
|
24
|
-
* A - A_Concept or Application
|
|
25
|
-
* S - System or Scope
|
|
26
|
-
* E - Entity
|
|
27
|
-
* ID - Identifier
|
|
28
|
-
*
|
|
29
|
-
* [!] ASEID is immutable and should not be changed after the entity is created
|
|
30
|
-
*
|
|
31
|
-
* [!] ASEID is composed of the following parts:
|
|
32
|
-
* - namespace: an application specific identifier from where the command is coming from
|
|
33
|
-
* - scope: the scope of the command from Application Namespace
|
|
34
|
-
* - entity: the name of the command from Application Namespace
|
|
35
|
-
* - id: the unique identifier of the command
|
|
36
|
-
*
|
|
37
|
-
* [!] For more information about ASEID, please refer to the ASEID class documentation
|
|
38
|
-
*/
|
|
39
|
-
aseid: ASEID;
|
|
40
|
-
protected _result?: ResultType;
|
|
41
|
-
protected _errors?: Set<A_Error>;
|
|
42
|
-
protected _params: InvokeType;
|
|
43
|
-
protected _status: A_CONSTANTS__A_Command_Status;
|
|
44
|
-
protected _listeners: Map<LifecycleEvents | A_CONSTANTS__A_Command_Event, Set<A_TYPES__Command_Listener<InvokeType, ResultType, LifecycleEvents>>>;
|
|
45
|
-
protected _startTime?: Date;
|
|
46
|
-
protected _endTime?: Date;
|
|
47
|
-
/**
|
|
48
|
-
* Execution Duration in milliseconds
|
|
49
|
-
*/
|
|
50
|
-
get Duration(): number | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* Command Execution A-Scope that inherits from scope where command was created
|
|
53
|
-
*
|
|
54
|
-
* Command execution context is stored in A_CommandContext fragment within this scope
|
|
55
|
-
*/
|
|
56
|
-
get Scope(): A_Scope;
|
|
57
|
-
/**
|
|
58
|
-
* Unique code identifying the command type
|
|
59
|
-
* Example: 'user.create', 'task.complete', etc.
|
|
60
|
-
*
|
|
61
|
-
*/
|
|
62
|
-
get Code(): string;
|
|
63
|
-
/**
|
|
64
|
-
* Current status of the command
|
|
65
|
-
*/
|
|
66
|
-
get Status(): A_CONSTANTS__A_Command_Status;
|
|
67
|
-
/**
|
|
68
|
-
* Start time of the command execution
|
|
69
|
-
*/
|
|
70
|
-
get StartedAt(): Date | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* End time of the command execution
|
|
73
|
-
*/
|
|
74
|
-
get EndedAt(): Date | undefined;
|
|
75
|
-
/**
|
|
76
|
-
* Result of the command execution stored in the context
|
|
77
|
-
*/
|
|
78
|
-
get Result(): ResultType | undefined;
|
|
79
|
-
/**
|
|
80
|
-
* Errors encountered during the command execution stored in the context
|
|
81
|
-
*/
|
|
82
|
-
get Errors(): Set<A_Error> | undefined;
|
|
83
|
-
/**
|
|
84
|
-
* Parameters used to invoke the command
|
|
85
|
-
*/
|
|
86
|
-
get Params(): InvokeType;
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
* A-Command represents an executable command with a specific code and parameters.
|
|
90
|
-
* It can be executed within a given scope and stores execution results and errors.
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* A-Command should be context independent and execution logic should be based on attached components
|
|
94
|
-
*
|
|
95
|
-
* @param code
|
|
96
|
-
* @param params
|
|
97
|
-
*/
|
|
98
|
-
constructor(
|
|
99
|
-
/**
|
|
100
|
-
* Command invocation parameters
|
|
101
|
-
*/
|
|
102
|
-
params: InvokeType | A_TYPES__Command_Serialized<ResultType>);
|
|
103
|
-
/**
|
|
104
|
-
* Extracts the ID from the ASEID
|
|
105
|
-
* ID is the unique identifier of the entity
|
|
106
|
-
*/
|
|
107
|
-
get id(): string | number;
|
|
108
|
-
/**
|
|
109
|
-
* Extracts the namespace from the ASEID
|
|
110
|
-
* namespace is an application specific identifier from where the entity is coming from
|
|
111
|
-
*/
|
|
112
|
-
get namespace(): string;
|
|
113
|
-
/**
|
|
114
|
-
* Extracts the scope from the ASEID
|
|
115
|
-
* scope is the scope of the entity from Application Namespace
|
|
116
|
-
*/
|
|
117
|
-
get scope(): string;
|
|
118
|
-
/**
|
|
119
|
-
* Extracts the entity from the ASEID
|
|
120
|
-
* entity is the name of the entity from Application Namespace
|
|
121
|
-
*
|
|
122
|
-
*/
|
|
123
|
-
get entity(): string;
|
|
124
|
-
init(): Promise<void>;
|
|
125
|
-
compile(): Promise<any>;
|
|
126
|
-
/**
|
|
127
|
-
* Executes the command logic.
|
|
128
|
-
*/
|
|
129
|
-
execute(): Promise<any>;
|
|
130
|
-
/**
|
|
131
|
-
* Marks the command as completed
|
|
132
|
-
*/
|
|
133
|
-
complete(): Promise<any>;
|
|
134
|
-
/**
|
|
135
|
-
* Marks the command as failed
|
|
136
|
-
*/
|
|
137
|
-
fail(): Promise<any>;
|
|
138
|
-
/**
|
|
139
|
-
* Registers an event listener for a specific event
|
|
140
|
-
*
|
|
141
|
-
* @param event
|
|
142
|
-
* @param listener
|
|
143
|
-
*/
|
|
144
|
-
on(event: LifecycleEvents | A_CONSTANTS__A_Command_Event, listener: A_TYPES__Command_Listener<InvokeType, ResultType, LifecycleEvents>): void;
|
|
145
|
-
/**
|
|
146
|
-
* Removes an event listener for a specific event
|
|
147
|
-
*
|
|
148
|
-
* @param event
|
|
149
|
-
* @param listener
|
|
150
|
-
*/
|
|
151
|
-
off(event: LifecycleEvents | A_CONSTANTS__A_Command_Event, listener: A_TYPES__Command_Listener<InvokeType, ResultType, LifecycleEvents>): void;
|
|
152
|
-
/**
|
|
153
|
-
* Emits an event to all registered listeners
|
|
154
|
-
*
|
|
155
|
-
* @param event
|
|
156
|
-
*/
|
|
157
|
-
emit(event: LifecycleEvents | A_CONSTANTS__A_Command_Event): void;
|
|
158
|
-
/**
|
|
159
|
-
* Allows to create a Command instance from new data
|
|
160
|
-
*
|
|
161
|
-
* @param newEntity
|
|
162
|
-
*/
|
|
163
|
-
fromNew(newEntity: InvokeType): void;
|
|
164
|
-
/**
|
|
165
|
-
* Allows to convert serialized data to Command instance
|
|
166
|
-
*
|
|
167
|
-
* [!] By default it omits params as they are not stored in the serialized data
|
|
168
|
-
*
|
|
169
|
-
* @param serialized
|
|
170
|
-
*/
|
|
171
|
-
fromJSON(serialized: A_TYPES__Command_Serialized<ResultType>): void;
|
|
172
|
-
/**
|
|
173
|
-
* Converts the Command instance to a plain object
|
|
174
|
-
*
|
|
175
|
-
* @returns
|
|
176
|
-
*/
|
|
177
|
-
toJSON(): A_TYPES__Command_Serialized<ResultType>;
|
|
178
|
-
/**
|
|
179
|
-
* Call a feature of the component with the provided scope
|
|
180
|
-
*
|
|
181
|
-
* [!] If the provided scope is not inherited from the entity scope, it will be inherited
|
|
182
|
-
*
|
|
183
|
-
* @param lifecycleMethod
|
|
184
|
-
* @param args
|
|
185
|
-
*/
|
|
186
|
-
call(feature: string, scope?: A_Scope): Promise<any>;
|
|
187
|
-
}
|
|
@@ -1,349 +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.A_Command = void 0;
|
|
13
|
-
const a_utils_1 = require("@adaas/a-utils");
|
|
14
|
-
const A_Command_context_1 = require("./context/A_Command.context");
|
|
15
|
-
const A_Command_constants_1 = require("./A-Command.constants");
|
|
16
|
-
const A_Context_class_1 = require("../A-Context/A-Context.class");
|
|
17
|
-
const env_constants_1 = require("../../constants/env.constants");
|
|
18
|
-
class A_Command {
|
|
19
|
-
// ====================================================================
|
|
20
|
-
// ================== Static A-Command Information ====================
|
|
21
|
-
// ====================================================================
|
|
22
|
-
/**
|
|
23
|
-
* Command Identifier that corresponds to the class name
|
|
24
|
-
*/
|
|
25
|
-
static get code() {
|
|
26
|
-
return a_utils_1.A_CommonHelper.toKebabCase(this.name);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* DEFAULT Namespace of the command from environment variable A_CONCEPT_NAMESPACE
|
|
30
|
-
* [!] If environment variable is not set, it will default to 'a-concept'
|
|
31
|
-
*/
|
|
32
|
-
static get namespace() {
|
|
33
|
-
return A_Context_class_1.A_Context.root.name;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* DEFAULT Scope of the command from environment variable A_CONCEPT_DEFAULT_SCOPE
|
|
37
|
-
* [!] If environment variable is not set, it will default to 'core'
|
|
38
|
-
* [!] Scope is an application specific identifier that can be used to group commands together
|
|
39
|
-
* [!] e.g. 'default', 'core', 'public', 'internal', etc
|
|
40
|
-
*/
|
|
41
|
-
static get scope() {
|
|
42
|
-
return process && process.env ? process.env[env_constants_1.A_CONSTANTS__DEFAULT_ENV_VARIABLES.A_CONCEPT_DEFAULT_SCOPE] || 'core' : 'core';
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Execution Duration in milliseconds
|
|
46
|
-
*/
|
|
47
|
-
get Duration() {
|
|
48
|
-
return this._endTime && this._startTime
|
|
49
|
-
? this._endTime.getTime() - this._startTime.getTime()
|
|
50
|
-
: this._startTime
|
|
51
|
-
? new Date().getTime() - this._startTime.getTime()
|
|
52
|
-
: undefined;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Command Execution A-Scope that inherits from scope where command was created
|
|
56
|
-
*
|
|
57
|
-
* Command execution context is stored in A_CommandContext fragment within this scope
|
|
58
|
-
*/
|
|
59
|
-
get Scope() {
|
|
60
|
-
return A_Context_class_1.A_Context.scope(this);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Unique code identifying the command type
|
|
64
|
-
* Example: 'user.create', 'task.complete', etc.
|
|
65
|
-
*
|
|
66
|
-
*/
|
|
67
|
-
get Code() {
|
|
68
|
-
return this.constructor.code;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Current status of the command
|
|
72
|
-
*/
|
|
73
|
-
get Status() {
|
|
74
|
-
return this._status;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Start time of the command execution
|
|
78
|
-
*/
|
|
79
|
-
get StartedAt() {
|
|
80
|
-
return this._startTime;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* End time of the command execution
|
|
84
|
-
*/
|
|
85
|
-
get EndedAt() {
|
|
86
|
-
return this._endTime;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Result of the command execution stored in the context
|
|
90
|
-
*/
|
|
91
|
-
get Result() {
|
|
92
|
-
return this._result;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Errors encountered during the command execution stored in the context
|
|
96
|
-
*/
|
|
97
|
-
get Errors() {
|
|
98
|
-
return this._errors;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Parameters used to invoke the command
|
|
102
|
-
*/
|
|
103
|
-
get Params() {
|
|
104
|
-
return this._params;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
*
|
|
108
|
-
* A-Command represents an executable command with a specific code and parameters.
|
|
109
|
-
* It can be executed within a given scope and stores execution results and errors.
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* A-Command should be context independent and execution logic should be based on attached components
|
|
113
|
-
*
|
|
114
|
-
* @param code
|
|
115
|
-
* @param params
|
|
116
|
-
*/
|
|
117
|
-
constructor(
|
|
118
|
-
/**
|
|
119
|
-
* Command invocation parameters
|
|
120
|
-
*/
|
|
121
|
-
params) {
|
|
122
|
-
this._listeners = new Map();
|
|
123
|
-
if (params && typeof params === 'object' && 'aseid' in params) {
|
|
124
|
-
this.fromJSON(params);
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
this.fromNew(params);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Extracts the ID from the ASEID
|
|
132
|
-
* ID is the unique identifier of the entity
|
|
133
|
-
*/
|
|
134
|
-
get id() {
|
|
135
|
-
return this.aseid.id;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Extracts the namespace from the ASEID
|
|
139
|
-
* namespace is an application specific identifier from where the entity is coming from
|
|
140
|
-
*/
|
|
141
|
-
get namespace() {
|
|
142
|
-
return this.aseid.namespace;
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Extracts the scope from the ASEID
|
|
146
|
-
* scope is the scope of the entity from Application Namespace
|
|
147
|
-
*/
|
|
148
|
-
get scope() {
|
|
149
|
-
return this.aseid.scope;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Extracts the entity from the ASEID
|
|
153
|
-
* entity is the name of the entity from Application Namespace
|
|
154
|
-
*
|
|
155
|
-
*/
|
|
156
|
-
get entity() {
|
|
157
|
-
return this.aseid.entity;
|
|
158
|
-
}
|
|
159
|
-
// --------------------------------------------------------------------------
|
|
160
|
-
// A-Command Lifecycle Methods
|
|
161
|
-
// --------------------------------------------------------------------------
|
|
162
|
-
// should create a new Task in DB with basic records
|
|
163
|
-
init() {
|
|
164
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
-
this.emit('init');
|
|
166
|
-
return yield this.call('init');
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
// Should compile everything before execution
|
|
170
|
-
compile() {
|
|
171
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
172
|
-
this.emit('compile');
|
|
173
|
-
return yield this.call('compile');
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Executes the command logic.
|
|
178
|
-
*/
|
|
179
|
-
execute() {
|
|
180
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
-
this._status = A_Command_constants_1.A_CONSTANTS__A_Command_Status.IN_PROGRESS;
|
|
182
|
-
this._startTime = new Date();
|
|
183
|
-
try {
|
|
184
|
-
this.emit('execute');
|
|
185
|
-
yield this.call('execute');
|
|
186
|
-
yield this.complete();
|
|
187
|
-
}
|
|
188
|
-
catch (error) {
|
|
189
|
-
yield this.fail();
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Marks the command as completed
|
|
195
|
-
*/
|
|
196
|
-
complete() {
|
|
197
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
-
this._status = A_Command_constants_1.A_CONSTANTS__A_Command_Status.COMPLETED;
|
|
199
|
-
this._endTime = new Date();
|
|
200
|
-
this._result = this.Scope.resolve(A_Command_context_1.A_CommandContext).toJSON();
|
|
201
|
-
this.emit('complete');
|
|
202
|
-
return yield this.call('complete');
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Marks the command as failed
|
|
207
|
-
*/
|
|
208
|
-
fail() {
|
|
209
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
210
|
-
this._status = A_Command_constants_1.A_CONSTANTS__A_Command_Status.FAILED;
|
|
211
|
-
this._endTime = new Date();
|
|
212
|
-
this._errors = this.Scope.resolve(A_Command_context_1.A_CommandContext).Errors;
|
|
213
|
-
this.emit('fail');
|
|
214
|
-
return yield this.call('fail');
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
// --------------------------------------------------------------------------
|
|
218
|
-
// A-Command Event-Emitter methods
|
|
219
|
-
// --------------------------------------------------------------------------
|
|
220
|
-
/**
|
|
221
|
-
* Registers an event listener for a specific event
|
|
222
|
-
*
|
|
223
|
-
* @param event
|
|
224
|
-
* @param listener
|
|
225
|
-
*/
|
|
226
|
-
on(event, listener) {
|
|
227
|
-
if (!this._listeners.has(event)) {
|
|
228
|
-
this._listeners.set(event, new Set());
|
|
229
|
-
}
|
|
230
|
-
this._listeners.get(event).add(listener);
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Removes an event listener for a specific event
|
|
234
|
-
*
|
|
235
|
-
* @param event
|
|
236
|
-
* @param listener
|
|
237
|
-
*/
|
|
238
|
-
off(event, listener) {
|
|
239
|
-
var _a;
|
|
240
|
-
(_a = this._listeners.get(event)) === null || _a === void 0 ? void 0 : _a.delete(listener);
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Emits an event to all registered listeners
|
|
244
|
-
*
|
|
245
|
-
* @param event
|
|
246
|
-
*/
|
|
247
|
-
emit(event) {
|
|
248
|
-
var _a;
|
|
249
|
-
(_a = this._listeners.get(event)) === null || _a === void 0 ? void 0 : _a.forEach(listener => {
|
|
250
|
-
listener(this);
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
// --------------------------------------------------------------------------
|
|
254
|
-
// A-Entity Base Class Overrides
|
|
255
|
-
// --------------------------------------------------------------------------
|
|
256
|
-
// Serialization / Deserialization
|
|
257
|
-
// -------------------------------------------------------------------------
|
|
258
|
-
/**
|
|
259
|
-
* Allows to create a Command instance from new data
|
|
260
|
-
*
|
|
261
|
-
* @param newEntity
|
|
262
|
-
*/
|
|
263
|
-
fromNew(newEntity) {
|
|
264
|
-
this.aseid = new a_utils_1.ASEID({
|
|
265
|
-
namespace: this.constructor.namespace,
|
|
266
|
-
scope: this.constructor.scope,
|
|
267
|
-
entity: this.constructor.code,
|
|
268
|
-
id: a_utils_1.A_IdentityHelper.generateTimeId(),
|
|
269
|
-
});
|
|
270
|
-
A_Context_class_1.A_Context.allocate(this, {
|
|
271
|
-
name: `a-command-scope::${this.id}`,
|
|
272
|
-
fragments: [
|
|
273
|
-
new A_Command_context_1.A_CommandContext()
|
|
274
|
-
]
|
|
275
|
-
});
|
|
276
|
-
this._params = newEntity;
|
|
277
|
-
this._status = A_Command_constants_1.A_CONSTANTS__A_Command_Status.INITIALIZED;
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Allows to convert serialized data to Command instance
|
|
281
|
-
*
|
|
282
|
-
* [!] By default it omits params as they are not stored in the serialized data
|
|
283
|
-
*
|
|
284
|
-
* @param serialized
|
|
285
|
-
*/
|
|
286
|
-
fromJSON(serialized) {
|
|
287
|
-
this.aseid = new a_utils_1.ASEID(serialized.aseid);
|
|
288
|
-
const context = new A_Command_context_1.A_CommandContext();
|
|
289
|
-
A_Context_class_1.A_Context.allocate(this, {
|
|
290
|
-
name: `a-command-scope::${this.id}`,
|
|
291
|
-
fragments: [
|
|
292
|
-
context
|
|
293
|
-
]
|
|
294
|
-
});
|
|
295
|
-
if (serialized.startedAt)
|
|
296
|
-
this._startTime = new Date(serialized.startedAt);
|
|
297
|
-
if (serialized.endedAt)
|
|
298
|
-
this._endTime = new Date(serialized.endedAt);
|
|
299
|
-
// Restore result and errors in the context
|
|
300
|
-
if (serialized.result) {
|
|
301
|
-
Object.entries(serialized.result).forEach(([key, value]) => {
|
|
302
|
-
context.save(key, value);
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
if (serialized.errors) {
|
|
306
|
-
serialized.errors.forEach(err => {
|
|
307
|
-
context.error(new a_utils_1.A_Error(err));
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
this._status = serialized.status || A_Command_constants_1.A_CONSTANTS__A_Command_Status.INITIALIZED;
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* Converts the Command instance to a plain object
|
|
314
|
-
*
|
|
315
|
-
* @returns
|
|
316
|
-
*/
|
|
317
|
-
toJSON() {
|
|
318
|
-
return {
|
|
319
|
-
aseid: this.aseid.toString(),
|
|
320
|
-
code: this.Code,
|
|
321
|
-
status: this._status,
|
|
322
|
-
startedAt: this._startTime ? this._startTime.toISOString() : undefined,
|
|
323
|
-
endedAt: this._endTime ? this._endTime.toISOString() : undefined,
|
|
324
|
-
duration: this.Duration,
|
|
325
|
-
result: this.Result,
|
|
326
|
-
errors: this.Errors ? Array.from(this.Errors).map(err => err.toJSON()) : undefined
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
;
|
|
330
|
-
/**
|
|
331
|
-
* Call a feature of the component with the provided scope
|
|
332
|
-
*
|
|
333
|
-
* [!] If the provided scope is not inherited from the entity scope, it will be inherited
|
|
334
|
-
*
|
|
335
|
-
* @param lifecycleMethod
|
|
336
|
-
* @param args
|
|
337
|
-
*/
|
|
338
|
-
call(feature_1) {
|
|
339
|
-
return __awaiter(this, arguments, void 0, function* (feature, scope = this.Scope) {
|
|
340
|
-
if (scope && !scope.isInheritedFrom(this.Scope)) {
|
|
341
|
-
scope = scope.inherit(this.Scope);
|
|
342
|
-
}
|
|
343
|
-
const newFeature = A_Context_class_1.A_Context.feature(this, feature, scope);
|
|
344
|
-
return yield newFeature.process();
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
exports.A_Command = A_Command;
|
|
349
|
-
//# sourceMappingURL=A-Command.class.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Command.class.js","sourceRoot":"","sources":["../../../../src/global/A-Command/A-Command.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4CAAkF;AAElF,mEAA+D;AAC/D,+DAAoG;AACpG,kEAAyD;AACzD,4EAA8F;AAG9F,MAAa,SAAS;IAMlB,uEAAuE;IACvE,uEAAuE;IACvE,uEAAuE;IAEvE;;OAEG;IACH,MAAM,KAAK,IAAI;QACX,OAAO,wBAAc,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAED;;;OAGG;IACH,MAAM,KAAK,SAAS;QAChB,OAAO,2BAAS,CAAC,IAAI,CAAC,IAAI,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACH,MAAM,KAAK,KAAK;QACZ,OAAO,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,kDAAkC,CAAC,uBAAuB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/H,CAAC;IAuCD;;OAEG;IACH,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU;YACnC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrD,CAAC,CAAC,IAAI,CAAC,UAAU;gBACb,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;gBAClD,CAAC,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;;;OAIG;IACH,IAAI,KAAK;QACL,OAAO,2BAAS,CAAC,KA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,CAAC,EAAE,CAAC;gBAC9C,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtC,CAAC;YAED,MAAM,UAAU,GAAG,2BAAS,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;YAE3D,OAAO,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;QACtC,CAAC;KAAA;CAEJ;AAzZD,8BAyZC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare enum A_CONSTANTS__A_Command_Status {
|
|
2
|
-
INITIALIZED = "INITIALIZED",
|
|
3
|
-
IN_PROGRESS = "IN_PROGRESS",
|
|
4
|
-
COMPLETED = "COMPLETED",
|
|
5
|
-
FAILED = "FAILED"
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* A-Command Lifecycle Features
|
|
9
|
-
*/
|
|
10
|
-
export declare enum A_CONSTANTS_A_Command_Features {
|
|
11
|
-
INIT = "init",
|
|
12
|
-
COMPLIED = "complied",
|
|
13
|
-
EXECUTE = "execute",
|
|
14
|
-
COMPLETE = "complete",
|
|
15
|
-
FAIL = "fail"
|
|
16
|
-
}
|
|
17
|
-
export type A_CONSTANTS__A_Command_Event = 'init' | 'compile' | 'execute' | 'complete' | 'fail';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.A_CONSTANTS_A_Command_Features = exports.A_CONSTANTS__A_Command_Status = void 0;
|
|
4
|
-
var A_CONSTANTS__A_Command_Status;
|
|
5
|
-
(function (A_CONSTANTS__A_Command_Status) {
|
|
6
|
-
A_CONSTANTS__A_Command_Status["INITIALIZED"] = "INITIALIZED";
|
|
7
|
-
A_CONSTANTS__A_Command_Status["IN_PROGRESS"] = "IN_PROGRESS";
|
|
8
|
-
A_CONSTANTS__A_Command_Status["COMPLETED"] = "COMPLETED";
|
|
9
|
-
A_CONSTANTS__A_Command_Status["FAILED"] = "FAILED";
|
|
10
|
-
})(A_CONSTANTS__A_Command_Status || (exports.A_CONSTANTS__A_Command_Status = A_CONSTANTS__A_Command_Status = {}));
|
|
11
|
-
/**
|
|
12
|
-
* A-Command Lifecycle Features
|
|
13
|
-
*/
|
|
14
|
-
var A_CONSTANTS_A_Command_Features;
|
|
15
|
-
(function (A_CONSTANTS_A_Command_Features) {
|
|
16
|
-
A_CONSTANTS_A_Command_Features["INIT"] = "init";
|
|
17
|
-
A_CONSTANTS_A_Command_Features["COMPLIED"] = "complied";
|
|
18
|
-
A_CONSTANTS_A_Command_Features["EXECUTE"] = "execute";
|
|
19
|
-
A_CONSTANTS_A_Command_Features["COMPLETE"] = "complete";
|
|
20
|
-
A_CONSTANTS_A_Command_Features["FAIL"] = "fail";
|
|
21
|
-
})(A_CONSTANTS_A_Command_Features || (exports.A_CONSTANTS_A_Command_Features = A_CONSTANTS_A_Command_Features = {}));
|
|
22
|
-
//# sourceMappingURL=A-Command.constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Command.constants.js","sourceRoot":"","sources":["../../../../src/global/A-Command/A-Command.constants.ts"],"names":[],"mappings":";;;AAEA,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACrC,4DAA2B,CAAA;IAC3B,4DAA2B,CAAA;IAC3B,wDAAuB,CAAA;IACvB,kDAAiB,CAAA;AACrB,CAAC,EALW,6BAA6B,6CAA7B,6BAA6B,QAKxC;AAED;;GAEG;AACH,IAAY,8BAMX;AAND,WAAY,8BAA8B;IACtC,+CAAa,CAAA;IACb,uDAAqB,CAAA;IACrB,qDAAmB,CAAA;IACnB,uDAAqB,CAAA;IACrB,+CAAa,CAAA;AACjB,CAAC,EANW,8BAA8B,8CAA9B,8BAA8B,QAMzC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
2
|
-
import { A_TYPES__CommandMeta } from "./A-Command.types";
|
|
3
|
-
import { A_TYPES__A_DefineDecorator_Meta } from "../../decorators/A-Feature/A-Feature.decorator.types";
|
|
4
|
-
export declare class A_CommandMeta extends A_Meta<A_TYPES__CommandMeta> {
|
|
5
|
-
/**
|
|
6
|
-
* Returns all features defined in the Container
|
|
7
|
-
*
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
features(): Array<A_TYPES__A_DefineDecorator_Meta>;
|
|
11
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.A_CommandMeta = void 0;
|
|
4
|
-
const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
|
|
5
|
-
const A_Command_types_1 = require("./A-Command.types");
|
|
6
|
-
class A_CommandMeta extends A_Meta_class_1.A_Meta {
|
|
7
|
-
/**
|
|
8
|
-
* Returns all features defined in the Container
|
|
9
|
-
*
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
features() {
|
|
13
|
-
const features = this.get(A_Command_types_1.A_TYPES__CommandMetaKey.FEATURES);
|
|
14
|
-
return (features === null || features === void 0 ? void 0 : features.toArray().map(([, feature]) => feature)) || [];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.A_CommandMeta = A_CommandMeta;
|
|
18
|
-
//# sourceMappingURL=A-Command.meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Command.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Command/A-Command.meta.ts"],"names":[],"mappings":";;;AAAA,yDAAgD;AAChD,uDAAkF;AAIlF,MAAa,aAAc,SAAQ,qBAA4B;IAE3D;;;;OAIG;IACH,QAAQ;QAEJ,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,yCAAuB,CAAC,QAAQ,CAAC,CAAC;QAE5D,OAAO,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,GAEnB,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;IAC7C,CAAC;CAEJ;AAhBD,sCAgBC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { A_Command } from "./A-Command.class";
|
|
2
|
-
import { A_CONSTANTS__A_Command_Event, A_CONSTANTS__A_Command_Status } from "./A-Command.constants";
|
|
3
|
-
import { A_TYPES__Error } from "@adaas/a-utils";
|
|
4
|
-
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
5
|
-
import { A_TYPES__A_DefineDecorator_Meta, A_TYPES__A_ExtendDecorator_Meta } from "../../decorators/A-Feature/A-Feature.decorator.types";
|
|
6
|
-
export type A_TYPES__Command_Constructor = {};
|
|
7
|
-
export type A_TYPES__Command_Serialized<ResultType extends Record<string, any> = Record<string, any>> = {
|
|
8
|
-
aseid: string;
|
|
9
|
-
code: string;
|
|
10
|
-
status: A_CONSTANTS__A_Command_Status;
|
|
11
|
-
startedAt?: string;
|
|
12
|
-
endedAt?: string;
|
|
13
|
-
duration?: number;
|
|
14
|
-
result?: ResultType;
|
|
15
|
-
errors?: Array<A_TYPES__Error>;
|
|
16
|
-
};
|
|
17
|
-
export type A_TYPES__Command_Listener<InvokeType extends A_TYPES__Command_Constructor = A_TYPES__Command_Constructor, ResultType extends Record<string, any> = Record<string, any>, LifecycleEvents extends string = A_CONSTANTS__A_Command_Event> = (command?: A_Command<InvokeType, ResultType, LifecycleEvents>) => void;
|
|
18
|
-
export type A_TYPES__CommandMeta = {
|
|
19
|
-
[A_TYPES__CommandMetaKey.EXTENSIONS]: A_Meta<{
|
|
20
|
-
/**
|
|
21
|
-
* Where Key the regexp for what to apply the extension
|
|
22
|
-
* A set of container names or a wildcard, or a regexp
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* Where value is the extension instructions
|
|
26
|
-
*/
|
|
27
|
-
[Key: string]: A_TYPES__A_ExtendDecorator_Meta[];
|
|
28
|
-
}>;
|
|
29
|
-
case: any;
|
|
30
|
-
[A_TYPES__CommandMetaKey.FEATURES]: A_Meta<{
|
|
31
|
-
/**
|
|
32
|
-
* Where Key is the name of the feature
|
|
33
|
-
*
|
|
34
|
-
* Where value is the list of features
|
|
35
|
-
*/
|
|
36
|
-
[Key: string]: A_TYPES__A_DefineDecorator_Meta;
|
|
37
|
-
}>;
|
|
38
|
-
};
|
|
39
|
-
export declare enum A_TYPES__CommandMetaKey {
|
|
40
|
-
EXTENSIONS = "a-command-extensions",
|
|
41
|
-
FEATURES = "a-command-features",
|
|
42
|
-
ABSTRACTIONS = "a-command-abstractions"
|
|
43
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.A_TYPES__CommandMetaKey = void 0;
|
|
4
|
-
var A_TYPES__CommandMetaKey;
|
|
5
|
-
(function (A_TYPES__CommandMetaKey) {
|
|
6
|
-
A_TYPES__CommandMetaKey["EXTENSIONS"] = "a-command-extensions";
|
|
7
|
-
A_TYPES__CommandMetaKey["FEATURES"] = "a-command-features";
|
|
8
|
-
A_TYPES__CommandMetaKey["ABSTRACTIONS"] = "a-command-abstractions";
|
|
9
|
-
})(A_TYPES__CommandMetaKey || (exports.A_TYPES__CommandMetaKey = A_TYPES__CommandMetaKey = {}));
|
|
10
|
-
//# sourceMappingURL=A-Command.types.js.map
|