@adaas/a-concept 0.0.29 → 0.0.31
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/examples/fe-be/channels/Test.channel.d.ts +6 -0
- package/dist/examples/fe-be/channels/Test.channel.js +14 -0
- package/dist/examples/fe-be/channels/Test.channel.js.map +1 -0
- package/dist/examples/fe-be/components/BE-Controller.component.d.ts +4 -0
- package/dist/examples/fe-be/components/BE-Controller.component.js +24 -0
- package/dist/examples/fe-be/components/BE-Controller.component.js.map +1 -0
- package/dist/examples/fe-be/components/FE.component.d.ts +4 -0
- package/dist/examples/fe-be/components/FE.component.js +31 -0
- package/dist/examples/fe-be/components/FE.component.js.map +1 -0
- package/dist/examples/fe-be/components/UserActions.component.d.ts +5 -0
- package/dist/examples/fe-be/components/UserActions.component.js +25 -0
- package/dist/examples/fe-be/components/UserActions.component.js.map +1 -0
- package/dist/examples/fe-be/concept.d.ts +0 -0
- package/dist/examples/fe-be/concept.js +2 -0
- package/dist/examples/fe-be/concept.js.map +1 -0
- package/dist/examples/fe-be/containers/ServerApp.container.d.ts +3 -0
- package/dist/examples/fe-be/containers/ServerApp.container.js +8 -0
- package/dist/examples/fe-be/containers/ServerApp.container.js.map +1 -0
- package/dist/examples/fe-be/containers/WebApp.container.d.ts +3 -0
- package/dist/examples/fe-be/containers/WebApp.container.js +8 -0
- package/dist/examples/fe-be/containers/WebApp.container.js.map +1 -0
- package/dist/examples/multi-container/channels/Direct.channel.d.ts +9 -0
- package/dist/examples/multi-container/channels/Direct.channel.js +32 -0
- package/dist/examples/multi-container/channels/Direct.channel.js.map +1 -0
- package/dist/examples/multi-container/concept.d.ts +0 -0
- package/dist/examples/multi-container/concept.js +2 -0
- package/dist/examples/multi-container/concept.js.map +1 -0
- package/dist/examples/multi-container/containers/Command.container.d.ts +11 -0
- package/dist/examples/multi-container/containers/Command.container.js +51 -0
- package/dist/examples/multi-container/containers/Command.container.js.map +1 -0
- package/dist/examples/multi-container/containers/Schedule.container.d.ts +15 -0
- package/dist/examples/multi-container/containers/Schedule.container.js +67 -0
- package/dist/examples/multi-container/containers/Schedule.container.js.map +1 -0
- package/dist/examples/simple/components/A.component.js.map +1 -1
- package/dist/examples/simple/containers/Main.container.js +7 -3
- package/dist/examples/simple/containers/Main.container.js.map +1 -1
- package/dist/examples/simple/entities/EntityA.entity.d.ts +8 -0
- package/dist/examples/simple/entities/EntityA.entity.js +22 -0
- package/dist/examples/simple/entities/EntityA.entity.js.map +1 -0
- package/dist/examples/simple-http-server/contexts/http-request.context.d.ts +0 -1
- package/dist/examples/simple-http-server/contexts/http-request.context.js +6 -8
- package/dist/examples/simple-http-server/contexts/http-request.context.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +16 -7
- package/dist/index.js.map +1 -1
- package/dist/src/base/A-Errors/A-Error.entity.d.ts +3 -0
- package/dist/src/base/A-Errors/A-Error.entity.js +8 -0
- package/dist/src/base/A-Errors/A-Error.entity.js.map +1 -0
- package/dist/src/base/A-Errors/A-Errors.context.js +1 -1
- package/dist/src/base/A-Errors/A-Errors.context.js.map +1 -1
- package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.d.ts +14 -0
- package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.js +53 -0
- package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.js.map +1 -0
- package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.types.d.ts +2 -0
- package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.types.js +3 -0
- package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.types.js.map +1 -0
- package/dist/src/decorators/A-Connect/A-Connect.decorator.d.ts +19 -0
- package/dist/src/decorators/A-Connect/A-Connect.decorator.js +31 -0
- package/dist/src/decorators/A-Connect/A-Connect.decorator.js.map +1 -0
- package/dist/src/decorators/A-Connect/A-Connect.decorator.types.d.ts +1 -0
- package/dist/src/decorators/A-Connect/A-Connect.decorator.types.js +3 -0
- package/dist/src/decorators/A-Connect/A-Connect.decorator.types.js.map +1 -0
- package/dist/src/decorators/A-Entity/A-Entity-List.decorator.d.ts +1 -0
- package/dist/src/decorators/A-Entity/A-Entity-List.decorator.js +8 -0
- package/dist/src/decorators/A-Entity/A-Entity-List.decorator.js.map +1 -0
- package/dist/src/decorators/A-Entity/A-Entity.decorator.types.d.ts +14 -0
- package/dist/src/decorators/A-Entity/A-Entity.decorator.types.js +3 -0
- package/dist/src/decorators/A-Entity/A-Entity.decorator.types.js.map +1 -0
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js +7 -5
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js.map +1 -1
- package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.js +9 -0
- package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.js.map +1 -1
- package/dist/src/decorators/A-Feature/A-Feature.decorator.types.d.ts +36 -0
- package/dist/src/decorators/A-Inject/A-Inject.decorator.d.ts +2 -3
- 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 +44 -0
- package/dist/src/global/A-Channel/A-Channel.class.d.ts +8 -10
- package/dist/src/global/A-Channel/A-Channel.class.js +12 -26
- package/dist/src/global/A-Channel/A-Channel.class.js.map +1 -1
- package/dist/src/global/A-Channel/A-Channel.types.d.ts +32 -0
- package/dist/src/global/A-Component/A-Component.class.d.ts +2 -1
- package/dist/src/global/A-Component/A-Component.class.js +1 -0
- package/dist/src/global/A-Component/A-Component.class.js.map +1 -1
- package/dist/src/global/A-Component/A-Component.meta.d.ts +16 -0
- package/dist/src/global/A-Component/A-Component.meta.js +37 -3
- package/dist/src/global/A-Component/A-Component.meta.js.map +1 -1
- package/dist/src/global/A-Component/A-Component.types.d.ts +26 -38
- package/dist/src/global/A-Component/A-Component.types.js +1 -7
- package/dist/src/global/A-Component/A-Component.types.js.map +1 -1
- package/dist/src/global/A-Concept/A_Concept.class.d.ts +7 -7
- package/dist/src/global/A-Concept/A_Concept.class.js +30 -30
- package/dist/src/global/A-Concept/A_Concept.class.js.map +1 -1
- package/dist/src/global/A-Concept/A_Concept.types.d.ts +42 -2
- package/dist/src/global/A-Concept/A_Concept.types.js.map +1 -1
- package/dist/src/global/A-Container/A-Container.class.d.ts +1 -8
- package/dist/src/global/A-Container/A-Container.class.js +1 -31
- package/dist/src/global/A-Container/A-Container.class.js.map +1 -1
- package/dist/src/global/A-Container/A-Container.meta.d.ts +8 -0
- package/dist/src/global/A-Container/A-Container.meta.js +29 -0
- package/dist/src/global/A-Container/A-Container.meta.js.map +1 -1
- package/dist/src/global/A-Container/A-Container.types.d.ts +32 -8
- package/dist/src/global/A-Container/A-Container.types.js +2 -1
- package/dist/src/global/A-Container/A-Container.types.js.map +1 -1
- package/dist/src/global/A-Context/A-Context.class.js +29 -36
- package/dist/src/global/A-Context/A-Context.class.js.map +1 -1
- package/dist/src/global/A-Entity/A-Entity.class.d.ts +1 -2
- package/dist/src/global/A-Entity/A-Entity.class.js +6 -7
- package/dist/src/global/A-Entity/A-Entity.class.js.map +1 -1
- package/dist/src/global/A-Entity/A-Entity.types.d.ts +12 -6
- package/dist/src/global/A-Entity/A-Entity.types.js.map +1 -1
- package/dist/src/global/A-Feature/A-Feature.class.d.ts +30 -6
- package/dist/src/global/A-Feature/A-Feature.class.js +49 -40
- package/dist/src/global/A-Feature/A-Feature.class.js.map +1 -1
- package/dist/src/global/A-Feature/A-Feature.types.d.ts +2 -24
- package/dist/src/global/A-Feature/A-Feature.types.js +21 -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 +8 -0
- package/dist/src/global/A-Fragment/A-Fragment.class.js +10 -0
- package/dist/src/global/A-Fragment/A-Fragment.class.js.map +1 -1
- package/dist/src/global/A-Scope/A-Scope.class.d.ts +7 -5
- package/dist/src/global/A-Scope/A-Scope.class.js +33 -10
- package/dist/src/global/A-Scope/A-Scope.class.js.map +1 -1
- package/dist/src/global/A-Scope/A-Scope.types.d.ts +2 -1
- package/dist/src/global/A-Stage/A-Stage.class.d.ts +69 -0
- package/dist/src/global/A-Stage/A-Stage.class.js +181 -0
- package/dist/src/global/A-Stage/A-Stage.class.js.map +1 -0
- package/dist/src/global/A-Stage/A-Stage.types.d.ts +78 -0
- package/dist/src/global/A-Stage/A-Stage.types.js +59 -0
- package/dist/src/global/A-Stage/A-Stage.types.js.map +1 -0
- package/dist/src/helpers/StepsManager.class.d.ts +15 -0
- package/dist/src/helpers/StepsManager.class.js +85 -0
- package/dist/src/helpers/StepsManager.class.js.map +1 -0
- package/examples/fe-be/channels/Test.channel.ts +24 -0
- package/examples/fe-be/components/BE-Controller.component.ts +20 -0
- package/examples/fe-be/components/FE.component.ts +13 -0
- package/examples/fe-be/concept.ts +0 -0
- package/examples/fe-be/containers/ServerApp.container.ts +8 -0
- package/examples/fe-be/containers/WebApp.container.ts +13 -0
- package/examples/multi-container/channels/Direct.channel.ts +39 -0
- package/examples/multi-container/concept.ts +0 -0
- package/examples/multi-container/containers/Command.container.ts +41 -0
- package/examples/multi-container/containers/Schedule.container.ts +57 -0
- package/examples/simple/components/A.component.ts +2 -1
- package/examples/simple/containers/Main.container.ts +11 -3
- package/examples/simple/entities/EntityA.entity.ts +16 -0
- package/examples/simple-http-server/contexts/http-request.context.ts +6 -6
- package/index.ts +12 -3
- package/package.json +1 -1
- package/src/base/A-Errors/A-Error.entity.ts +10 -0
- package/src/base/A-Errors/A-Errors.context.ts +2 -2
- package/src/decorators/A-Abstraction/A-Abstraction.decorator.ts +82 -0
- package/src/decorators/{A-Stage/A-Stage.decorator.types.ts → A-Abstraction/A-Abstraction.decorator.types.ts} +1 -3
- package/src/decorators/A-Connect/A-Connect.decorator.ts +71 -0
- package/src/decorators/A-Connect/A-Connect.decorator.types.ts +6 -0
- package/src/decorators/A-Entity/A-Entity-List.decorator.ts +12 -0
- package/src/decorators/A-Entity/A-Entity.decorator.types.ts +18 -0
- package/src/decorators/A-Feature/A-Feature-Define.decorator.ts +16 -9
- package/src/decorators/A-Feature/A-Feature-Extend.decorator.ts +10 -2
- package/src/decorators/A-Feature/A-Feature.decorator.types.ts +46 -0
- package/src/decorators/A-Inject/A-Inject.decorator.ts +7 -7
- package/src/decorators/A-Inject/A-Inject.decorator.types.ts +47 -1
- package/src/global/A-Channel/A-Channel.class.ts +25 -28
- package/src/global/A-Channel/A-Channel.types.ts +53 -0
- package/src/global/A-Component/A-Component.class.ts +10 -2
- package/src/global/A-Component/A-Component.meta.ts +59 -6
- package/src/global/A-Component/A-Component.types.ts +28 -45
- package/src/global/A-Concept/A_Concept.class.ts +52 -31
- package/src/global/A-Concept/A_Concept.types.ts +48 -3
- package/src/global/A-Container/A-Container.class.ts +3 -39
- package/src/global/A-Container/A-Container.meta.ts +41 -4
- package/src/global/A-Container/A-Container.types.ts +36 -8
- package/src/global/A-Context/A-Context.class.ts +37 -50
- package/src/global/A-Entity/A-Entity.class.ts +8 -6
- package/src/global/A-Entity/A-Entity.types.ts +13 -6
- package/src/global/A-Feature/A-Feature.class.ts +73 -61
- package/src/global/A-Feature/A-Feature.types.ts +24 -23
- package/src/global/A-Fragment/A-Fragment.class.ts +15 -0
- package/src/global/A-Scope/A-Scope.class.ts +58 -25
- package/src/global/A-Scope/A-Scope.types.ts +2 -1
- package/src/global/A-Stage/A-Stage.class.ts +234 -0
- package/src/global/A-Stage/A-Stage.types.ts +101 -0
- package/src/helpers/StepsManager.class.ts +104 -0
- package/tests/channel.ts +213 -0
- package/tests/log.ts +88 -40
- package/src/decorators/A-Stage/A-Stage.decorator.ts +0 -84
|
@@ -2,7 +2,36 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.A_ContainerMeta = void 0;
|
|
4
4
|
const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
|
|
5
|
+
const A_Container_types_1 = require("./A-Container.types");
|
|
5
6
|
class A_ContainerMeta extends A_Meta_class_1.A_Meta {
|
|
7
|
+
/**
|
|
8
|
+
* Returns a set of instructions to run proper methods in Container during A-Concept Stage
|
|
9
|
+
*
|
|
10
|
+
* @param stage
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
abstractions(abstraction) {
|
|
14
|
+
const steps = [];
|
|
15
|
+
const abstractions = this.get(A_Container_types_1.A_TYPES__ContainerMetaKey.ABSTRACTIONS);
|
|
16
|
+
const injections = this.get(A_Container_types_1.A_TYPES__ContainerMetaKey.INJECTIONS);
|
|
17
|
+
// const constructor = A_Context.component(this);
|
|
18
|
+
abstractions === null || abstractions === void 0 ? void 0 : abstractions
|
|
19
|
+
// returns all extensions that match the feature
|
|
20
|
+
.find(`CONCEPT_ABSTRACTION::${abstraction}`).forEach(([handler, extensions]) => {
|
|
21
|
+
extensions.forEach(extension => {
|
|
22
|
+
const args = (injections === null || injections === void 0 ? void 0 : injections.get(extension.handler)) || [];
|
|
23
|
+
steps.push({
|
|
24
|
+
name: extension.name,
|
|
25
|
+
handler: extension.handler,
|
|
26
|
+
args,
|
|
27
|
+
before: extension.before,
|
|
28
|
+
behavior: extension.behavior,
|
|
29
|
+
after: extension.after
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
return steps;
|
|
34
|
+
}
|
|
6
35
|
}
|
|
7
36
|
exports.A_ContainerMeta = A_ContainerMeta;
|
|
8
37
|
//# sourceMappingURL=A-Container.meta.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Container.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.meta.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"A-Container.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.meta.ts"],"names":[],"mappings":";;;AACA,yDAAgD;AAChD,2DAG6B;AAI7B,MAAa,eAAgB,SAAQ,qBAA8B;IAG/D;;;;;OAKG;IACH,YAAY,CACR,WAAkC;QAElC,MAAM,KAAK,GAAsC,EAAE,CAAC;QAEpD,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,6CAAyB,CAAC,YAAY,CAAC,CAAC;QACtE,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC,CAAC;QAElE,iDAAiD;QAGjD,YAAY,aAAZ,YAAY,uBAAZ,YAAY;QACR,gDAAgD;SAC9C,IAAI,CAAC,wBAAwB,WAAW,EAAE,EAC3C,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE;YAC/B,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBAC3B,MAAM,IAAI,GAAG,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;gBAEtD,KAAK,CAAC,IAAI,CAAC;oBACP,IAAI,EAAE,SAAS,CAAC,IAAI;oBACpB,OAAO,EAAE,SAAS,CAAC,OAAO;oBAC1B,IAAI;oBACJ,MAAM,EAAE,SAAS,CAAC,MAAM;oBACxB,QAAQ,EAAE,SAAS,CAAC,QAAQ;oBAC5B,KAAK,EAAE,SAAS,CAAC,KAAK;iBACzB,CAAC,CAAC;YAEP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAGP,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ;AA3CD,0CA2CC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A_TYPES__A_InjectDecorator_Meta } from "../../decorators/A-Inject/A-Inject.decorator.types";
|
|
2
|
+
import { A_TYPES__ConceptAbstraction } from "../A-Concept/A_Concept.types";
|
|
2
3
|
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
4
|
+
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
3
5
|
import { A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types";
|
|
6
|
+
import { A_TYPES__A_DefineDecorator_Meta } from "../../decorators/A-Feature/A-Feature.decorator.types";
|
|
4
7
|
export type A_TYPES__ContainerConstructor<_Exports extends Array<String>> = {
|
|
5
8
|
name?: string;
|
|
6
9
|
exports: _Exports;
|
|
@@ -13,17 +16,38 @@ export type A_TYPES__ContainerCallParams<T extends string> = {
|
|
|
13
16
|
}>;
|
|
14
17
|
};
|
|
15
18
|
export type A_TYPES__ContainerMeta = {
|
|
16
|
-
[A_TYPES__ContainerMetaKey.FEATURES]:
|
|
17
|
-
|
|
19
|
+
[A_TYPES__ContainerMetaKey.FEATURES]: A_Meta<{
|
|
20
|
+
/**
|
|
21
|
+
* Where Key is the name of the feature
|
|
22
|
+
*
|
|
23
|
+
* Where value is the list of features
|
|
24
|
+
*/
|
|
25
|
+
[Key: string]: A_TYPES__A_DefineDecorator_Meta;
|
|
26
|
+
}>;
|
|
27
|
+
[A_TYPES__ContainerMetaKey.ABSTRACTIONS]: A_Meta<{
|
|
28
|
+
/**
|
|
29
|
+
* Where Key the regexp for what to apply the extension
|
|
30
|
+
* A set of container names or a wildcard, or a regexp
|
|
31
|
+
*
|
|
32
|
+
*
|
|
33
|
+
* Where value is the extension instructions
|
|
34
|
+
*/
|
|
35
|
+
[Key: string]: A_TYPES__ConceptAbstraction[];
|
|
36
|
+
}>;
|
|
37
|
+
[A_TYPES__ContainerMetaKey.INJECTIONS]: A_Meta<{
|
|
38
|
+
/**
|
|
39
|
+
* Where Key is the name of the injection
|
|
40
|
+
*
|
|
41
|
+
* Where value is the list of injections
|
|
42
|
+
*/
|
|
43
|
+
[Key: string]: A_TYPES__A_InjectDecorator_Meta;
|
|
44
|
+
}>;
|
|
18
45
|
};
|
|
19
46
|
export declare enum A_TYPES__ContainerMetaKey {
|
|
20
47
|
FEATURES = "a-container-features",
|
|
21
|
-
|
|
48
|
+
INJECTIONS = "a-container-injections",
|
|
49
|
+
ABSTRACTIONS = "a-container-abstractions"
|
|
22
50
|
}
|
|
23
|
-
export type A_TYPES__ContainerMeta_StageExtension = {
|
|
24
|
-
name: A_TYPES__ConceptStage;
|
|
25
|
-
handler: string;
|
|
26
|
-
};
|
|
27
51
|
export type A_TYPES__ContainerMeta_FeatureItem = {
|
|
28
52
|
name: string;
|
|
29
53
|
container: string;
|
|
@@ -4,6 +4,7 @@ exports.A_TYPES__ContainerMetaKey = void 0;
|
|
|
4
4
|
var A_TYPES__ContainerMetaKey;
|
|
5
5
|
(function (A_TYPES__ContainerMetaKey) {
|
|
6
6
|
A_TYPES__ContainerMetaKey["FEATURES"] = "a-container-features";
|
|
7
|
-
A_TYPES__ContainerMetaKey["
|
|
7
|
+
A_TYPES__ContainerMetaKey["INJECTIONS"] = "a-container-injections";
|
|
8
|
+
A_TYPES__ContainerMetaKey["ABSTRACTIONS"] = "a-container-abstractions";
|
|
8
9
|
})(A_TYPES__ContainerMetaKey || (exports.A_TYPES__ContainerMetaKey = A_TYPES__ContainerMetaKey = {}));
|
|
9
10
|
//# sourceMappingURL=A-Container.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Container.types.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"A-Container.types.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.types.ts"],"names":[],"mappings":";;;AAqDA,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACjC,8DAAiC,CAAA;IACjC,kEAAqC,CAAA;IACrC,sEAAyC,CAAA;AAC7C,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC"}
|
|
@@ -11,8 +11,11 @@ const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
|
|
|
11
11
|
const A_Component_meta_1 = require("../A-Component/A-Component.meta");
|
|
12
12
|
const A_Container_meta_1 = require("../A-Container/A-Container.meta");
|
|
13
13
|
const A_Concept_class_1 = require("../A-Concept/A_Concept.class");
|
|
14
|
+
const A_Entity_types_1 = require("../A-Entity/A-Entity.types");
|
|
14
15
|
const A_Entity_class_1 = require("../A-Entity/A-Entity.class");
|
|
15
16
|
const A_Entity_meta_1 = require("../A-Entity/A-Entity.meta");
|
|
17
|
+
const A_Container_types_1 = require("../A-Container/A-Container.types");
|
|
18
|
+
const A_Component_types_1 = require("../A-Component/A-Component.types");
|
|
16
19
|
/**
|
|
17
20
|
* Namespace Provider is responsible for providing the Namespace to the Containers and other Namespaces.
|
|
18
21
|
* This class stores all Namespaces across the Program.
|
|
@@ -41,7 +44,6 @@ class A_Context {
|
|
|
41
44
|
/**
|
|
42
45
|
* A set of allocated scopes per every element in the program.
|
|
43
46
|
*/
|
|
44
|
-
// protected scopes: WeakMap<A_Container<any> | A_Feature | A_Component | any, A_Scope> = new WeakMap();
|
|
45
47
|
this.conceptsMeta = new Map();
|
|
46
48
|
this.containersMeta = new Map();
|
|
47
49
|
this.componentsMeta = new Map();
|
|
@@ -215,7 +217,26 @@ class A_Context {
|
|
|
215
217
|
* While Scope we use just to store the scope where the component registered.
|
|
216
218
|
*
|
|
217
219
|
*/
|
|
218
|
-
|
|
220
|
+
let metaKey;
|
|
221
|
+
switch (true) {
|
|
222
|
+
case component instanceof A_Entity_class_1.A_Entity:
|
|
223
|
+
metaKey = A_Entity_types_1.A_TYPES__EntityMetaKey.FEATURES;
|
|
224
|
+
break;
|
|
225
|
+
case component instanceof A_Container_class_1.A_Container:
|
|
226
|
+
metaKey = A_Container_types_1.A_TYPES__ContainerMetaKey.FEATURES;
|
|
227
|
+
break;
|
|
228
|
+
case component instanceof A_Component_class_1.A_Component:
|
|
229
|
+
metaKey = A_Component_types_1.A_TYPES__ComponentMetaKey.FEATURES;
|
|
230
|
+
break;
|
|
231
|
+
default:
|
|
232
|
+
throw new Error(`A-Feature cannot be defined on the ${component} level`);
|
|
233
|
+
}
|
|
234
|
+
const featureDefinition = this.meta(component).get(metaKey);
|
|
235
|
+
if (!featureDefinition)
|
|
236
|
+
throw new Error(`[!] A-Concept Context: Feature not found.`);
|
|
237
|
+
const steps = [
|
|
238
|
+
...featureDefinition.template
|
|
239
|
+
];
|
|
219
240
|
// const feature: string = new ASEID({
|
|
220
241
|
// id: `${param2}-${Math.random()}`,
|
|
221
242
|
// entity: 'a-feature',
|
|
@@ -232,13 +253,8 @@ class A_Context {
|
|
|
232
253
|
// Get all extensions for the feature
|
|
233
254
|
meta
|
|
234
255
|
.extensions(feature)
|
|
235
|
-
.forEach((
|
|
236
|
-
steps.push({
|
|
237
|
-
component: constructor,
|
|
238
|
-
name,
|
|
239
|
-
handler,
|
|
240
|
-
args
|
|
241
|
-
});
|
|
256
|
+
.forEach((declaration) => {
|
|
257
|
+
steps.push(Object.assign({ component: constructor }, declaration));
|
|
242
258
|
});
|
|
243
259
|
});
|
|
244
260
|
return {
|
|
@@ -268,37 +284,14 @@ class A_Context {
|
|
|
268
284
|
case param1 instanceof A_Entity_class_1.A_Entity:
|
|
269
285
|
instance.registry.set(param1, scope);
|
|
270
286
|
break;
|
|
271
|
-
case param1 instanceof A_Fragment_class_1.A_Fragment:
|
|
287
|
+
case param1 instanceof A_Fragment_class_1.A_Fragment && !instance.registry.has(param1):
|
|
272
288
|
instance.registry.set(param1, scope);
|
|
273
289
|
break;
|
|
274
290
|
default:
|
|
275
|
-
instance.registry.
|
|
291
|
+
if (!instance.registry.has(param1))
|
|
292
|
+
instance.registry.set(param1, scope);
|
|
293
|
+
break;
|
|
276
294
|
}
|
|
277
|
-
// if (param1 instanceof A_Fragment) {
|
|
278
|
-
// const instance = this.getInstance();
|
|
279
|
-
// let fragment: A_Fragment;
|
|
280
|
-
// let name: string;
|
|
281
|
-
// if (typeof param2 === 'string') {
|
|
282
|
-
// name = param2;
|
|
283
|
-
// fragment = param1;
|
|
284
|
-
// } else {
|
|
285
|
-
// fragment = param1 as A_Fragment;
|
|
286
|
-
// name = fragment.name;
|
|
287
|
-
// }
|
|
288
|
-
// /**
|
|
289
|
-
// * If the namespace is not provided, then use the root namespace.
|
|
290
|
-
// * If the root namespace is not provided, then use the default namespace.
|
|
291
|
-
// */
|
|
292
|
-
// if (!name)
|
|
293
|
-
// name = this.root
|
|
294
|
-
// || process.env.ADAAS_NAMESPACE
|
|
295
|
-
// || process.env.A_NAMESPACE
|
|
296
|
-
// || process.env.ADAAS_APP_NAMESPACE
|
|
297
|
-
// || 'a-concept'
|
|
298
|
-
// if (!this.root)
|
|
299
|
-
// instance._root = name;
|
|
300
|
-
// // instance.namedFragments.set(namespace, Namespace);
|
|
301
|
-
// return name;
|
|
302
295
|
}
|
|
303
296
|
}
|
|
304
297
|
exports.A_Context = A_Context;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Context.class.js","sourceRoot":"","sources":["../../../../src/global/A-Context/A-Context.class.ts"],"names":[],"mappings":";;;AAAA,4CAAuF;AACvF,wEAA+D;AAC/D,qEAA4D;AAC5D,kEAAyD;AACzD,wEAA+D;AAC/D,4DAAmD;AAEnD,yDAAgD;AAChD,sEAAkE;AAClE,sEAAkE;AAClE,kEAAyD;
|
|
1
|
+
{"version":3,"file":"A-Context.class.js","sourceRoot":"","sources":["../../../../src/global/A-Context/A-Context.class.ts"],"names":[],"mappings":";;;AAAA,4CAAuF;AACvF,wEAA+D;AAC/D,qEAA4D;AAC5D,kEAAyD;AACzD,wEAA+D;AAC/D,4DAAmD;AAEnD,yDAAgD;AAChD,sEAAkE;AAClE,sEAAkE;AAClE,kEAAyD;AACzD,+DAA+F;AAC/F,+DAAsD;AACtD,6DAAyD;AAIzD,wEAA6E;AAC7E,wEAA6E;AAG7E;;;;;;GAMG;AACH,MAAa,SAAS;IAsDlB;QAlDA;;WAEG;QACO,eAAU,GAAuC,IAAI,OAAO,EAAE,CAAC;QAEzE;;WAEG;QACO,aAAQ,GAAgC,IAAI,OAAO,EAAE,CAAC;QAEhE;;WAEG;QACO,aAAQ,GAAqC,IAAI,OAAO,EAAE,CAAC;QAGrE;;WAEG;QACO,aAAQ,GAQd,IAAI,OAAO,EAAE,CAAC;QAKlB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QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBACrC,MAAM;YAEV;gBACI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC;oBAC9B,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBAEzC,MAAM;QACd,CAAC;IACL,CAAC;CACJ;AA1hBD,8BA0hBC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { A_TYPES__Required, ASEID } from "@adaas/a-utils";
|
|
2
2
|
import { A_TYPES__Entity_JSON, A_TYPES__EntityBaseMethod, A_TYPES__EntityBaseMethods, A_TYPES__EntityCallParams, A_TYPES__IEntity } from "./A-Entity.types";
|
|
3
|
-
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
4
3
|
/**
|
|
5
4
|
* A_Entity is another abstraction that describes all major participants in the system business logic.
|
|
6
5
|
* Each Entity should have a clear definition and a clear set of responsibilities.
|
|
@@ -8,7 +7,7 @@ import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
|
8
7
|
*
|
|
9
8
|
* Each entity should be connected to the ContextFragment (Scope) and should be able to communicate with other entities.
|
|
10
9
|
*/
|
|
11
|
-
export declare class A_Entity<_ConstructorType = any, _SerializedType extends A_TYPES__Entity_JSON = A_TYPES__Entity_JSON, _FeatureNames extends Array<string | A_TYPES__EntityBaseMethod> = A_TYPES__EntityBaseMethods>
|
|
10
|
+
export declare class A_Entity<_ConstructorType = any, _SerializedType extends A_TYPES__Entity_JSON = A_TYPES__Entity_JSON, _FeatureNames extends Array<string | A_TYPES__EntityBaseMethod> = A_TYPES__EntityBaseMethods> implements A_TYPES__IEntity {
|
|
12
11
|
aseid: ASEID;
|
|
13
12
|
/**
|
|
14
13
|
* Entity Identifier that corresponds to the class name
|
|
@@ -14,7 +14,6 @@ const a_utils_1 = require("@adaas/a-utils");
|
|
|
14
14
|
const A_Entity_types_1 = require("./A-Entity.types");
|
|
15
15
|
const errors_constants_1 = require("@adaas/a-utils/dist/src/constants/errors.constants");
|
|
16
16
|
const A_Context_class_1 = require("../A-Context/A-Context.class");
|
|
17
|
-
const A_Fragment_class_1 = require("../A-Fragment/A-Fragment.class");
|
|
18
17
|
/**
|
|
19
18
|
* A_Entity is another abstraction that describes all major participants in the system business logic.
|
|
20
19
|
* Each Entity should have a clear definition and a clear set of responsibilities.
|
|
@@ -22,7 +21,7 @@ const A_Fragment_class_1 = require("../A-Fragment/A-Fragment.class");
|
|
|
22
21
|
*
|
|
23
22
|
* Each entity should be connected to the ContextFragment (Scope) and should be able to communicate with other entities.
|
|
24
23
|
*/
|
|
25
|
-
class A_Entity
|
|
24
|
+
class A_Entity {
|
|
26
25
|
/**
|
|
27
26
|
* Entity Identifier that corresponds to the class name
|
|
28
27
|
*/
|
|
@@ -33,7 +32,6 @@ class A_Entity extends A_Fragment_class_1.A_Fragment {
|
|
|
33
32
|
.replace(/_/g, '-');
|
|
34
33
|
}
|
|
35
34
|
constructor(props) {
|
|
36
|
-
super();
|
|
37
35
|
switch (true) {
|
|
38
36
|
case (typeof props === 'string' && a_utils_1.ASEID.isASEID(props)):
|
|
39
37
|
this.aseid = new a_utils_1.ASEID(props);
|
|
@@ -105,6 +103,7 @@ class A_Entity extends A_Fragment_class_1.A_Fragment {
|
|
|
105
103
|
const params = typeof param1 === 'string'
|
|
106
104
|
? param2 || {}
|
|
107
105
|
: param1;
|
|
106
|
+
console.log('WTF???? ', A_Context_class_1.A_Context.scope(this));
|
|
108
107
|
const newFeature = A_Context_class_1.A_Context.feature(A_Context_class_1.A_Context.scope(this), this, feature, params);
|
|
109
108
|
return yield newFeature.process();
|
|
110
109
|
});
|
|
@@ -115,7 +114,7 @@ class A_Entity extends A_Fragment_class_1.A_Fragment {
|
|
|
115
114
|
load() {
|
|
116
115
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
116
|
yield this.call(A_Entity_types_1.A_TYPES__EntityBaseMethod.DESTROY, {
|
|
118
|
-
|
|
117
|
+
entities: [
|
|
119
118
|
this
|
|
120
119
|
]
|
|
121
120
|
});
|
|
@@ -124,16 +123,16 @@ class A_Entity extends A_Fragment_class_1.A_Fragment {
|
|
|
124
123
|
destroy() {
|
|
125
124
|
return __awaiter(this, void 0, void 0, function* () {
|
|
126
125
|
yield this.call(A_Entity_types_1.A_TYPES__EntityBaseMethod.DESTROY, {
|
|
127
|
-
|
|
126
|
+
entities: [
|
|
128
127
|
this
|
|
129
|
-
]
|
|
128
|
+
],
|
|
130
129
|
});
|
|
131
130
|
});
|
|
132
131
|
}
|
|
133
132
|
save() {
|
|
134
133
|
return __awaiter(this, void 0, void 0, function* () {
|
|
135
134
|
yield this.call(A_Entity_types_1.A_TYPES__EntityBaseMethod.SAVE, {
|
|
136
|
-
|
|
135
|
+
entities: [
|
|
137
136
|
this
|
|
138
137
|
]
|
|
139
138
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Entity.class.js","sourceRoot":"","sources":["../../../../src/global/A-Entity/A-Entity.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAIwB;AACxB,qDAM0B;AAC1B,yFAAiG;AACjG,kEAAyD;
|
|
1
|
+
{"version":3,"file":"A-Entity.class.js","sourceRoot":"","sources":["../../../../src/global/A-Entity/A-Entity.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAIwB;AACxB,qDAM0B;AAC1B,yFAAiG;AACjG,kEAAyD;AAKzD;;;;;;GAMG;AACH,MAAa,QAAQ;IAUjB;;OAEG;IACH,MAAM,KAAK,MAAM;QACb,OAAO,wBAAc;aAChB,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;aACvC,iBAAiB,EAAE;aACnB,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC;IAcD,YAAY,KAA0D;QAGlE,QAAQ,IAAI,EAAE,CAAC;YACX,KAAK,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AAC,KAAK,CAAC,CAAC;QAC3C,OAAO;IACX,CAAC;IAID;;;;;OAKG;IACH,MAAM;QACF,OAAO;YACH,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;SACZ,CAAC;IACzB,CAAC;IAGD,QAAQ;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACtE,CAAC;CACJ;AAlOD,4BAkOC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { ASEID } from "@adaas/a-utils";
|
|
2
2
|
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
3
3
|
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
4
|
+
import { A_TYPES__A_DefineDecorator_Meta, A_TYPES__A_ExtendDecorator_Meta } from "../../decorators/A-Feature/A-Feature.decorator.types";
|
|
5
|
+
import { A_Entity } from "./A-Entity.class";
|
|
4
6
|
export type A_TYPES__EntityCallParams<T extends string> = {
|
|
5
7
|
name: T;
|
|
6
8
|
fragments: Array<A_Fragment>;
|
|
9
|
+
entities: Array<A_Entity<any, any, any>>;
|
|
7
10
|
components: Array<{
|
|
8
11
|
new (...args: any[]): any;
|
|
9
12
|
}>;
|
|
@@ -39,16 +42,19 @@ export type A_TYPES__EntityMeta = {
|
|
|
39
42
|
*
|
|
40
43
|
* Where value is the extension instructions
|
|
41
44
|
*/
|
|
42
|
-
[Key: string]:
|
|
45
|
+
[Key: string]: A_TYPES__A_ExtendDecorator_Meta[];
|
|
43
46
|
}>;
|
|
44
47
|
case: any;
|
|
45
|
-
[A_TYPES__EntityMetaKey.FEATURES]:
|
|
48
|
+
[A_TYPES__EntityMetaKey.FEATURES]: A_Meta<{
|
|
49
|
+
/**
|
|
50
|
+
* Where Key is the name of the feature
|
|
51
|
+
*
|
|
52
|
+
* Where value is the list of features
|
|
53
|
+
*/
|
|
54
|
+
[Key: string]: A_TYPES__A_DefineDecorator_Meta;
|
|
55
|
+
}>;
|
|
46
56
|
};
|
|
47
57
|
export declare enum A_TYPES__EntityMetaKey {
|
|
48
58
|
EXTENSIONS = "a-component-extensions",
|
|
49
59
|
FEATURES = "a-component-features"
|
|
50
60
|
}
|
|
51
|
-
export type A_TYPES__EntityMeta_ExtensionItem = {
|
|
52
|
-
name: string;
|
|
53
|
-
handler: string;
|
|
54
|
-
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Entity.types.js","sourceRoot":"","sources":["../../../../src/global/A-Entity/A-Entity.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"A-Entity.types.js","sourceRoot":"","sources":["../../../../src/global/A-Entity/A-Entity.types.ts"],"names":[],"mappings":";;;AAsBA,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACjC,0CAAa,CAAA;IACb,gDAAmB,CAAA;IACnB,0CAAa,CAAA;AACjB,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC;AAOA,CAAC;AAuCF,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,+DAAqC,CAAA;IACrC,2DAAiC,CAAA;AACrC,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { A_Feature_Define } from "../../decorators/A-Feature/A-Feature-Define.decorator";
|
|
2
|
-
import { A_TYPES__FeatureConstructor,
|
|
2
|
+
import { A_TYPES__FeatureConstructor, A_TYPES__FeatureState } from "./A-Feature.types";
|
|
3
3
|
import { A_Error, A_TYPES__Required } from "@adaas/a-utils";
|
|
4
4
|
import { A_TYPES__A_Feature_Extend } from "../../decorators/A-Feature/A-Feature.decorator.types";
|
|
5
|
+
import { A_Stage } from "../A-Stage/A-Stage.class";
|
|
6
|
+
import { StepsManager } from "../../helpers/StepsManager.class";
|
|
5
7
|
/**
|
|
6
8
|
* A_Feature is representing a feature that can be executed across multiple components
|
|
7
9
|
* This class stores the steps of the feature and executes them in order of appearance
|
|
@@ -19,9 +21,10 @@ export declare class A_Feature {
|
|
|
19
21
|
* Extend an existing A-Feature
|
|
20
22
|
*/
|
|
21
23
|
static get Extend(): A_TYPES__A_Feature_Extend;
|
|
22
|
-
protected
|
|
23
|
-
protected _current?:
|
|
24
|
+
protected stages: Array<A_Stage>;
|
|
25
|
+
protected _current?: A_Stage;
|
|
24
26
|
protected _index: number;
|
|
27
|
+
protected SM: StepsManager;
|
|
25
28
|
state: A_TYPES__FeatureState;
|
|
26
29
|
result?: any;
|
|
27
30
|
error?: A_Error;
|
|
@@ -31,17 +34,34 @@ export declare class A_Feature {
|
|
|
31
34
|
*
|
|
32
35
|
* @returns
|
|
33
36
|
*/
|
|
34
|
-
[Symbol.iterator](): Iterator<
|
|
35
|
-
|
|
37
|
+
[Symbol.iterator](): Iterator<A_Stage, any>;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the current A-Feature Stage
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
get stage(): A_Stage | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* This method checks if the A-Feature is done
|
|
45
|
+
*
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
36
48
|
isDone(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* This method moves the feature to the next stage
|
|
51
|
+
*
|
|
52
|
+
* @param stage
|
|
53
|
+
*/
|
|
54
|
+
next(stage: any): void;
|
|
37
55
|
/**
|
|
38
56
|
* This method marks the feature as completed and returns the result
|
|
39
57
|
* Uses to interrupt or end the feature processing
|
|
40
58
|
*
|
|
59
|
+
* The result of the feature is a Scope Fragments
|
|
60
|
+
*
|
|
41
61
|
* @param result
|
|
42
62
|
* @returns
|
|
43
63
|
*/
|
|
44
|
-
completed<T extends any>(
|
|
64
|
+
completed<T extends any>(): Promise<T>;
|
|
45
65
|
/**
|
|
46
66
|
* This method marks the feature as failed and throws an error
|
|
47
67
|
* Uses to interrupt or end the feature processing
|
|
@@ -49,6 +69,10 @@ export declare class A_Feature {
|
|
|
49
69
|
* @param error
|
|
50
70
|
*/
|
|
51
71
|
failed(error: Error | A_Error | unknown): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* This method processes the feature by executing all the stages
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
52
76
|
process(): Promise<void>;
|
|
53
77
|
protected errorHandler(error: Error | A_Error | unknown): Promise<void>;
|
|
54
78
|
}
|
|
@@ -15,6 +15,7 @@ const A_Feature_Extend_decorator_1 = require("../../decorators/A-Feature/A-Featu
|
|
|
15
15
|
const A_Feature_types_1 = require("./A-Feature.types");
|
|
16
16
|
const a_utils_1 = require("@adaas/a-utils");
|
|
17
17
|
const A_Context_class_1 = require("../A-Context/A-Context.class");
|
|
18
|
+
const StepsManager_class_1 = require("../../helpers/StepsManager.class");
|
|
18
19
|
/**
|
|
19
20
|
* A_Feature is representing a feature that can be executed across multiple components
|
|
20
21
|
* This class stores the steps of the feature and executes them in order of appearance
|
|
@@ -38,11 +39,12 @@ class A_Feature {
|
|
|
38
39
|
}
|
|
39
40
|
constructor(params) {
|
|
40
41
|
// protected scope: A_Scope
|
|
41
|
-
this.
|
|
42
|
+
this.stages = [];
|
|
42
43
|
this._index = 0;
|
|
43
44
|
this.state = A_Feature_types_1.A_TYPES__FeatureState.INITIALIZED;
|
|
44
|
-
|
|
45
|
-
this.
|
|
45
|
+
this.SM = new StepsManager_class_1.StepsManager(params.steps);
|
|
46
|
+
this.stages = this.SM.toStages(this);
|
|
47
|
+
this._current = this.stages[0];
|
|
46
48
|
A_Context_class_1.A_Context.allocate(this, params);
|
|
47
49
|
}
|
|
48
50
|
/**
|
|
@@ -54,55 +56,65 @@ class A_Feature {
|
|
|
54
56
|
return {
|
|
55
57
|
// Custom next method
|
|
56
58
|
next: () => {
|
|
57
|
-
if (this.
|
|
58
|
-
|
|
59
|
-
||
|
|
60
|
-
this.state === A_Feature_types_1.A_TYPES__FeatureState.COMPLETED) {
|
|
61
|
-
throw new Error('FEATURE_PROCESSING_INTERRUPTED');
|
|
62
|
-
}
|
|
63
|
-
this._current = this.steps[this._index];
|
|
64
|
-
const { component, handler, args } = this._current;
|
|
65
|
-
const instance = A_Context_class_1.A_Context.scope(this).resolve(component);
|
|
59
|
+
if (!this.isDone()) {
|
|
60
|
+
this._current = this.stages[this._index];
|
|
66
61
|
return {
|
|
67
|
-
value:
|
|
68
|
-
if (instance[handler]) {
|
|
69
|
-
const callArgs = args.map(arg =>
|
|
70
|
-
// In case if the target is a feature step then pass the current feature
|
|
71
|
-
a_utils_1.A_CommonHelper.isInheritedFrom(arg.target, A_Feature)
|
|
72
|
-
? this
|
|
73
|
-
: A_Context_class_1.A_Context.scope(this).resolve(arg.target));
|
|
74
|
-
yield instance[handler](...callArgs);
|
|
75
|
-
}
|
|
76
|
-
this._index++;
|
|
77
|
-
}),
|
|
62
|
+
value: this._current,
|
|
78
63
|
done: false
|
|
79
64
|
};
|
|
80
65
|
}
|
|
81
66
|
else {
|
|
82
67
|
this._current = undefined; // Reset current on end
|
|
83
|
-
return {
|
|
68
|
+
return {
|
|
69
|
+
value: undefined,
|
|
70
|
+
done: true
|
|
71
|
+
};
|
|
84
72
|
}
|
|
85
73
|
}
|
|
86
74
|
};
|
|
87
75
|
}
|
|
88
|
-
|
|
89
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Returns the current A-Feature Stage
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
get stage() {
|
|
90
81
|
return this._current;
|
|
91
82
|
}
|
|
92
|
-
|
|
83
|
+
/**
|
|
84
|
+
* This method checks if the A-Feature is done
|
|
85
|
+
*
|
|
86
|
+
* @returns
|
|
87
|
+
*/
|
|
93
88
|
isDone() {
|
|
94
|
-
return this.
|
|
89
|
+
return !this.stage
|
|
90
|
+
|| this._index >= this.stages.length
|
|
91
|
+
|| this.state === A_Feature_types_1.A_TYPES__FeatureState.COMPLETED
|
|
92
|
+
|| this.state === A_Feature_types_1.A_TYPES__FeatureState.FAILED;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* This method moves the feature to the next stage
|
|
96
|
+
*
|
|
97
|
+
* @param stage
|
|
98
|
+
*/
|
|
99
|
+
next(stage) {
|
|
100
|
+
const stageIndex = this.stages.indexOf(stage);
|
|
101
|
+
this._index = stageIndex + 1;
|
|
102
|
+
if (this._index >= this.stages.length) {
|
|
103
|
+
this.completed();
|
|
104
|
+
}
|
|
95
105
|
}
|
|
96
106
|
/**
|
|
97
107
|
* This method marks the feature as completed and returns the result
|
|
98
108
|
* Uses to interrupt or end the feature processing
|
|
99
109
|
*
|
|
110
|
+
* The result of the feature is a Scope Fragments
|
|
111
|
+
*
|
|
100
112
|
* @param result
|
|
101
113
|
* @returns
|
|
102
114
|
*/
|
|
103
|
-
completed(
|
|
115
|
+
completed() {
|
|
104
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
this.result =
|
|
117
|
+
this.result = A_Context_class_1.A_Context.scope(this).toJSON();
|
|
106
118
|
this.state = A_Feature_types_1.A_TYPES__FeatureState.COMPLETED;
|
|
107
119
|
return this.result;
|
|
108
120
|
});
|
|
@@ -120,18 +132,15 @@ class A_Feature {
|
|
|
120
132
|
yield this.errorHandler(error);
|
|
121
133
|
});
|
|
122
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* This method processes the feature by executing all the stages
|
|
137
|
+
*
|
|
138
|
+
*/
|
|
123
139
|
process() {
|
|
124
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
yield step();
|
|
129
|
-
}
|
|
130
|
-
yield this.completed();
|
|
131
|
-
}
|
|
132
|
-
catch (error) {
|
|
133
|
-
console.log('[!] Feature processing error:', error);
|
|
134
|
-
yield this.failed(error);
|
|
141
|
+
this.state = A_Feature_types_1.A_TYPES__FeatureState.PROCESSING;
|
|
142
|
+
for (const stage of this) {
|
|
143
|
+
yield stage.process();
|
|
135
144
|
}
|
|
136
145
|
});
|
|
137
146
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Feature.class.js","sourceRoot":"","sources":["../../../../src/global/A-Feature/A-Feature.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iHAAoG;AACpG,iHAAoG;AACpG,
|
|
1
|
+
{"version":3,"file":"A-Feature.class.js","sourceRoot":"","sources":["../../../../src/global/A-Feature/A-Feature.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iHAAoG;AACpG,iHAAoG;AACpG,uDAAwF;AACxF,4CAA4D;AAC5D,kEAAyD;AAIzD,oFAA2E;AAI3E;;;;;;;GAOG;AACH,MAAa,SAAS;IAGlB;;OAEG;IACH,MAAM,KAAK,MAAM;QACb,OAAO,6CAAgB,CAAC;IAC5B,CAAC;IAGD;;OAEG;IACH,MAAM,KAAK,MAAM;QACb,OAAO,6CAAgB,CAAC;IAC5B,CAAC;IAeD,YACI,MAA0E;QAb9E,2BAA2B;QACjB,WAAM,GAAmB,EAAE,CAAC;QAE5B,WAAM,GAAW,CAAC,CAAC;QAG7B,UAAK,GAA0B,uCAAqB,CAAC,WAAW,CAAC;QAU7D,IAAI,CAAC,EAAE,GAAG,IAAI,iCAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEzC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAErC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAE/B,2BAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACrC,CAAC;IAGD;;;;OAIG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC;QACb,OAAO;YACH,qBAAqB;YACrB,IAAI,EAAE,GAAiC,EAAE;gBACrC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;oBAEjB,IAAI,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