@adaas/a-concept 0.0.29 → 0.0.30
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/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-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 +28 -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 +8 -0
- package/dist/src/global/A-Component/A-Component.meta.js +27 -1
- package/dist/src/global/A-Component/A-Component.meta.js.map +1 -1
- package/dist/src/global/A-Component/A-Component.types.d.ts +19 -34
- 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 +23 -7
- 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 +6 -35
- 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 +4 -5
- 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 +176 -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 +83 -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/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-Extend.decorator.ts +10 -0
- package/src/decorators/A-Feature/A-Feature.decorator.types.ts +36 -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 +42 -1
- package/src/global/A-Component/A-Component.types.ts +20 -40
- 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 +28 -7
- package/src/global/A-Context/A-Context.class.ts +9 -49
- package/src/global/A-Entity/A-Entity.class.ts +8 -6
- package/src/global/A-Entity/A-Entity.types.ts +4 -5
- 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 +225 -0
- package/src/global/A-Stage/A-Stage.types.ts +106 -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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Scope.class.js","sourceRoot":"","sources":["../../../../src/global/A-Scope/A-Scope.class.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"A-Scope.class.js","sourceRoot":"","sources":["../../../../src/global/A-Scope/A-Scope.class.ts"],"names":[],"mappings":";;;AAAA,4CAAuD;AAEvD,qEAA4D;AAC5D,kEAAyD;AACzD,wEAE0C;AAC1C,wEAA+D;AAC/D,+DAAsD;AAGtD;;;;;;;;;;;;GAYG;AACH,MAAa,OAAO;IAahB,YACI,MAA0C,EAC1C,SAAwC,EAAE;QAb9C,SAAI,GAAW,EAAE,CAAC;QAEV,gBAAW,GAAiD,IAAI,OAAO,EAAE,CAAC;QAC1E,eAAU,GAAgD,IAAI,OAAO,EAAE,CAAC;QACxE,cAAS,GAA0B,IAAI,GAAG,EAAE,CAAC;QAWjD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,IAAI,CA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,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;YAE3C,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAA;YAEpC,uCACO,GAAG,KACN,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,IAChC;QACL,CAAC,EAAE,EAAE,CAAC,CAAC;IACX,CAAC;CACJ;AAzZD,0BAyZC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { A_Component } from "../A-Component/A-Component.class";
|
|
1
2
|
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
2
3
|
import { A_Scope } from "./A-Scope.class";
|
|
3
4
|
export type A_TYPES__ScopeConstructor = {
|
|
@@ -13,7 +14,7 @@ export type A_TYPES__ScopeConstructor = {
|
|
|
13
14
|
* A set of Components available in the Scope
|
|
14
15
|
*/
|
|
15
16
|
components: Array<{
|
|
16
|
-
new (...args: any[]):
|
|
17
|
+
new (...args: any[]): A_Component;
|
|
17
18
|
}>;
|
|
18
19
|
/**
|
|
19
20
|
* A list of Features/Lifecycle Hooks available in the Scope
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { A_Error } from "@adaas/a-utils";
|
|
2
|
+
import { A_Feature } from "../A-Feature/A-Feature.class";
|
|
3
|
+
import { A_TYPES__A_Stage_JSON, A_TYPES__A_Stage_Status, A_TYPES__A_StageStep } from "./A-Stage.types";
|
|
4
|
+
import { A_Container } from "../A-Container/A-Container.class";
|
|
5
|
+
/**
|
|
6
|
+
* A_Stage is a set of A_Functions within A_Feature that should be run in a specific order.
|
|
7
|
+
* Each stage may contain one or more functions.
|
|
8
|
+
* [!] That always run in parallel (in NodeJS asynchronously), independently of each other.
|
|
9
|
+
*
|
|
10
|
+
* A-Stage is a common object that uses to simplify logic and re-use of A-Feature internals for better composition.
|
|
11
|
+
*/
|
|
12
|
+
export declare class A_Stage {
|
|
13
|
+
private feature;
|
|
14
|
+
private steps;
|
|
15
|
+
constructor(feature: A_Feature, steps?: A_TYPES__A_StageStep[]);
|
|
16
|
+
status: A_TYPES__A_Stage_Status;
|
|
17
|
+
/**
|
|
18
|
+
* Promise that will be resolved when the stage is Processed
|
|
19
|
+
*/
|
|
20
|
+
processed: Promise<void> | undefined;
|
|
21
|
+
get before(): string[];
|
|
22
|
+
get after(): string[];
|
|
23
|
+
/**
|
|
24
|
+
* Resolves the arguments of the step
|
|
25
|
+
*
|
|
26
|
+
* @param step
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
protected getStepArgs(step: A_TYPES__A_StageStep): Promise<Promise<import("../A-Fragment/A-Fragment.class").A_Fragment | import("../A-Entity/A-Entity.class").A_Entity<any, any, any> | import("../A-Component/A-Component.class").A_Component<any> | import("../A-Scope/A-Scope.class").A_Scope | A_Container<any> | A_Feature | this>[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Adds a step to the stage
|
|
32
|
+
*
|
|
33
|
+
* @param step
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
add(step: A_TYPES__A_StageStep): this;
|
|
37
|
+
/**
|
|
38
|
+
* Resolves the component of the step
|
|
39
|
+
*
|
|
40
|
+
* @param step
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
protected getStepInstance(step: A_TYPES__A_StageStep): A_Container<any> | import("../A-Component/A-Component.class").A_Component<string[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Calls the handler of the step
|
|
46
|
+
*
|
|
47
|
+
* @param step
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
protected getStepHandler(step: A_TYPES__A_StageStep): Promise<any>;
|
|
51
|
+
/**
|
|
52
|
+
* Runs async all the steps of the stage
|
|
53
|
+
*
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
56
|
+
process(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Skips the stage
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
skip(): void;
|
|
62
|
+
protected completed(): void;
|
|
63
|
+
protected failed(error: Error | A_Error | unknown): void;
|
|
64
|
+
/**
|
|
65
|
+
* Serializes the stage to JSON
|
|
66
|
+
*
|
|
67
|
+
*/
|
|
68
|
+
toJSON(): A_TYPES__A_Stage_JSON;
|
|
69
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
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_Stage = void 0;
|
|
13
|
+
const a_utils_1 = require("@adaas/a-utils");
|
|
14
|
+
const A_Context_class_1 = require("../A-Context/A-Context.class");
|
|
15
|
+
const A_Feature_class_1 = require("../A-Feature/A-Feature.class");
|
|
16
|
+
const A_Stage_types_1 = require("./A-Stage.types");
|
|
17
|
+
const A_Container_class_1 = require("../A-Container/A-Container.class");
|
|
18
|
+
/**
|
|
19
|
+
* A_Stage is a set of A_Functions within A_Feature that should be run in a specific order.
|
|
20
|
+
* Each stage may contain one or more functions.
|
|
21
|
+
* [!] That always run in parallel (in NodeJS asynchronously), independently of each other.
|
|
22
|
+
*
|
|
23
|
+
* A-Stage is a common object that uses to simplify logic and re-use of A-Feature internals for better composition.
|
|
24
|
+
*/
|
|
25
|
+
class A_Stage {
|
|
26
|
+
constructor(feature, steps = []) {
|
|
27
|
+
this.feature = feature;
|
|
28
|
+
this.steps = steps;
|
|
29
|
+
this.status = A_Stage_types_1.A_TYPES__A_Stage_Status.INITIALIZED;
|
|
30
|
+
}
|
|
31
|
+
get before() {
|
|
32
|
+
return this.steps.reduce((acc, step) => ([
|
|
33
|
+
...acc,
|
|
34
|
+
...step.before
|
|
35
|
+
]), []);
|
|
36
|
+
}
|
|
37
|
+
get after() {
|
|
38
|
+
return this.steps.reduce((acc, step) => ([
|
|
39
|
+
...acc,
|
|
40
|
+
...step.after
|
|
41
|
+
]), []);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Resolves the arguments of the step
|
|
45
|
+
*
|
|
46
|
+
* @param step
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
49
|
+
getStepArgs(step) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
return step.args.map((arg) => __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
// In case if the target is a feature step then pass the current feature
|
|
53
|
+
return a_utils_1.A_CommonHelper.isInheritedFrom(arg.target, A_Feature_class_1.A_Feature)
|
|
54
|
+
? this
|
|
55
|
+
: A_Context_class_1.A_Context.scope(this.feature).resolve(arg.target);
|
|
56
|
+
}));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Adds a step to the stage
|
|
61
|
+
*
|
|
62
|
+
* @param step
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
add(step) {
|
|
66
|
+
this.steps.push(step);
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Resolves the component of the step
|
|
71
|
+
*
|
|
72
|
+
* @param step
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
75
|
+
getStepInstance(step) {
|
|
76
|
+
const { component, handler } = step;
|
|
77
|
+
// TODO: probably would be better to do it another way. let's think about it
|
|
78
|
+
const instance = component instanceof A_Container_class_1.A_Container
|
|
79
|
+
? component
|
|
80
|
+
: A_Context_class_1.A_Context.scope(this.feature).resolve(component);
|
|
81
|
+
if (!instance)
|
|
82
|
+
throw new Error(`Unable to resolve component ${component.name}`);
|
|
83
|
+
if (!instance[handler])
|
|
84
|
+
throw new Error(`Handler ${handler} not found in ${instance.constructor.name}`);
|
|
85
|
+
return instance;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Calls the handler of the step
|
|
89
|
+
*
|
|
90
|
+
* @param step
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
getStepHandler(step) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
const instance = this.getStepInstance(step);
|
|
96
|
+
const callArgs = yield this.getStepArgs(step);
|
|
97
|
+
return instance[step.handler](...callArgs);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Runs async all the steps of the stage
|
|
102
|
+
*
|
|
103
|
+
* @returns
|
|
104
|
+
*/
|
|
105
|
+
process() {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
if (!this.processed)
|
|
108
|
+
this.processed = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
try {
|
|
110
|
+
this.status = A_Stage_types_1.A_TYPES__A_Stage_Status.PROCESSING;
|
|
111
|
+
const syncSteps = this.steps.filter(step => step.behavior === 'sync');
|
|
112
|
+
const asyncSteps = this.steps.filter(step => step.behavior === 'async');
|
|
113
|
+
// Run sync steps
|
|
114
|
+
yield Promise
|
|
115
|
+
.all([
|
|
116
|
+
// Run async steps that are independent of each other
|
|
117
|
+
...asyncSteps.map(step => this.getStepHandler(step)),
|
|
118
|
+
// Run sync steps that are dependent on each other
|
|
119
|
+
new Promise((r, j) => __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
try {
|
|
121
|
+
for (const step of syncSteps) {
|
|
122
|
+
yield this.getStepHandler(step);
|
|
123
|
+
}
|
|
124
|
+
return r();
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
return j(error);
|
|
128
|
+
}
|
|
129
|
+
}))
|
|
130
|
+
]);
|
|
131
|
+
this.completed();
|
|
132
|
+
return resolve();
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
this.failed(error);
|
|
136
|
+
return reject(error);
|
|
137
|
+
}
|
|
138
|
+
}));
|
|
139
|
+
return this.processed;
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Skips the stage
|
|
144
|
+
*
|
|
145
|
+
*/
|
|
146
|
+
skip() {
|
|
147
|
+
this.status = A_Stage_types_1.A_TYPES__A_Stage_Status.SKIPPED;
|
|
148
|
+
this.feature.next(this);
|
|
149
|
+
}
|
|
150
|
+
// ==========================================
|
|
151
|
+
// ============ Status methods =============
|
|
152
|
+
// ==========================================
|
|
153
|
+
completed() {
|
|
154
|
+
this.status = A_Stage_types_1.A_TYPES__A_Stage_Status.COMPLETED;
|
|
155
|
+
this.feature.next(this);
|
|
156
|
+
}
|
|
157
|
+
failed(error) {
|
|
158
|
+
this.status = A_Stage_types_1.A_TYPES__A_Stage_Status.FAILED;
|
|
159
|
+
this.feature.failed(error);
|
|
160
|
+
}
|
|
161
|
+
// ==========================================
|
|
162
|
+
// ============ Serialization ===============
|
|
163
|
+
// ==========================================
|
|
164
|
+
/**
|
|
165
|
+
* Serializes the stage to JSON
|
|
166
|
+
*
|
|
167
|
+
*/
|
|
168
|
+
toJSON() {
|
|
169
|
+
return {
|
|
170
|
+
name: 'A_Stage',
|
|
171
|
+
status: this.status,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
exports.A_Stage = A_Stage;
|
|
176
|
+
//# sourceMappingURL=A-Stage.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Stage.class.js","sourceRoot":"","sources":["../../../../src/global/A-Stage/A-Stage.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAyD;AACzD,kE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AI,CAAC,CAAC;IAC5B,CAAC;IAES,MAAM,CACZ,KAAgC;QAEhC,IAAI,CAAC,MAAM,GAAG,uCAAuB,CAAC,MAAM,CAAC;QAE7C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAID,6CAA6C;IAC7C,6CAA6C;IAC7C,6CAA6C;IAG7C;;;OAGG;IACH,MAAM;QAEF,OAAO;YACH,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;SACtB,CAAA;IACL,CAAC;CACJ;AAjND,0BAiNC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { A_TYPES__A_InjectDecorator_Meta } from "../../decorators/A-Inject/A-Inject.decorator.types";
|
|
2
|
+
import { A_Component } from "../A-Component/A-Component.class";
|
|
3
|
+
import { A_Container } from "../A-Container/A-Container.class";
|
|
4
|
+
import { A_TYPES__A_ExtendDecorator_BehaviorConfig } from "../../decorators/A-Feature/A-Feature.decorator.types";
|
|
5
|
+
export declare enum A_TYPES__A_Stage_Status {
|
|
6
|
+
/**
|
|
7
|
+
* The stage is currently being processed
|
|
8
|
+
*/
|
|
9
|
+
PROCESSING = "PROCESSING",
|
|
10
|
+
/**
|
|
11
|
+
* The stage has been completed
|
|
12
|
+
*/
|
|
13
|
+
COMPLETED = "COMPLETED",
|
|
14
|
+
/**
|
|
15
|
+
* The stage has failed
|
|
16
|
+
*/
|
|
17
|
+
FAILED = "FAILED",
|
|
18
|
+
/**
|
|
19
|
+
* The stage has been skipped
|
|
20
|
+
*/
|
|
21
|
+
SKIPPED = "SKIPPED",
|
|
22
|
+
/**
|
|
23
|
+
* The stage has been paused
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The stage has been stopped
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The stage has been started
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The stage has been initialized
|
|
33
|
+
*/
|
|
34
|
+
INITIALIZED = "INITIALIZED",
|
|
35
|
+
/**
|
|
36
|
+
* The stage has been reset
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* The stage has been resumed
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* The stage has been suspended
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* The stage has been terminated
|
|
46
|
+
*/
|
|
47
|
+
/**
|
|
48
|
+
* The stage has been aborted
|
|
49
|
+
*/
|
|
50
|
+
ABORTED = "ABORTED"
|
|
51
|
+
}
|
|
52
|
+
export type A_TYPES__A_StageStep = {
|
|
53
|
+
/**
|
|
54
|
+
* The component to be called
|
|
55
|
+
*/
|
|
56
|
+
component: typeof A_Component | typeof A_Container | A_Container<any>;
|
|
57
|
+
/**
|
|
58
|
+
* The method to be called on the component
|
|
59
|
+
*/
|
|
60
|
+
handler: string;
|
|
61
|
+
/**
|
|
62
|
+
* Original Feature Extension name
|
|
63
|
+
*
|
|
64
|
+
* [!] could be string or regex
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
name: string;
|
|
68
|
+
/**
|
|
69
|
+
* Arguments to be passed to the method
|
|
70
|
+
*/
|
|
71
|
+
args: A_TYPES__A_InjectDecorator_Meta;
|
|
72
|
+
} & A_TYPES__A_ExtendDecorator_BehaviorConfig;
|
|
73
|
+
export type A_TYPES__A_Stage_JSON = {
|
|
74
|
+
/**
|
|
75
|
+
* The name of the stage
|
|
76
|
+
*/
|
|
77
|
+
name: string;
|
|
78
|
+
/**
|
|
79
|
+
* The status of the stage
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
status: A_TYPES__A_Stage_Status;
|
|
83
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.A_TYPES__A_Stage_Status = void 0;
|
|
4
|
+
var A_TYPES__A_Stage_Status;
|
|
5
|
+
(function (A_TYPES__A_Stage_Status) {
|
|
6
|
+
/**
|
|
7
|
+
* The stage is currently being processed
|
|
8
|
+
*/
|
|
9
|
+
A_TYPES__A_Stage_Status["PROCESSING"] = "PROCESSING";
|
|
10
|
+
/**
|
|
11
|
+
* The stage has been completed
|
|
12
|
+
*/
|
|
13
|
+
A_TYPES__A_Stage_Status["COMPLETED"] = "COMPLETED";
|
|
14
|
+
/**
|
|
15
|
+
* The stage has failed
|
|
16
|
+
*/
|
|
17
|
+
A_TYPES__A_Stage_Status["FAILED"] = "FAILED";
|
|
18
|
+
/**
|
|
19
|
+
* The stage has been skipped
|
|
20
|
+
*/
|
|
21
|
+
A_TYPES__A_Stage_Status["SKIPPED"] = "SKIPPED";
|
|
22
|
+
/**
|
|
23
|
+
* The stage has been paused
|
|
24
|
+
*/
|
|
25
|
+
// PAUSED = 'PAUSED',
|
|
26
|
+
/**
|
|
27
|
+
* The stage has been stopped
|
|
28
|
+
*/
|
|
29
|
+
// STOPPED = 'STOPPED',
|
|
30
|
+
/**
|
|
31
|
+
* The stage has been started
|
|
32
|
+
*/
|
|
33
|
+
// STARTED = 'STARTED',
|
|
34
|
+
/**
|
|
35
|
+
* The stage has been initialized
|
|
36
|
+
*/
|
|
37
|
+
A_TYPES__A_Stage_Status["INITIALIZED"] = "INITIALIZED";
|
|
38
|
+
/**
|
|
39
|
+
* The stage has been reset
|
|
40
|
+
*/
|
|
41
|
+
// RESET = 'RESET',
|
|
42
|
+
/**
|
|
43
|
+
* The stage has been resumed
|
|
44
|
+
*/
|
|
45
|
+
// RESUMED = 'RESUMED',
|
|
46
|
+
/**
|
|
47
|
+
* The stage has been suspended
|
|
48
|
+
*/
|
|
49
|
+
// SUSPENDED = 'SUSPENDED',
|
|
50
|
+
/**
|
|
51
|
+
* The stage has been terminated
|
|
52
|
+
*/
|
|
53
|
+
// TERMINATED = 'TERMINATED',
|
|
54
|
+
/**
|
|
55
|
+
* The stage has been aborted
|
|
56
|
+
*/
|
|
57
|
+
A_TYPES__A_Stage_Status["ABORTED"] = "ABORTED";
|
|
58
|
+
})(A_TYPES__A_Stage_Status || (exports.A_TYPES__A_Stage_Status = A_TYPES__A_Stage_Status = {}));
|
|
59
|
+
//# sourceMappingURL=A-Stage.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"A-Stage.types.js","sourceRoot":"","sources":["../../../../src/global/A-Stage/A-Stage.types.ts"],"names":[],"mappings":";;;AAOA,IAAY,uBAqDX;AArDD,WAAY,uBAAuB;IAC/B;;OAEG;IACH,oDAAyB,CAAA;IACzB;;OAEG;IACH,kDAAuB,CAAA;IACvB;;OAEG;IACH,4CAAiB,CAAA;IACjB;;OAEG;IACH,8CAAmB,CAAA;IACnB;;OAEG;IACH,qBAAqB;IACrB;;OAEG;IACH,uBAAuB;IACvB;;OAEG;IACH,uBAAuB;IACvB;;OAEG;IACH,sDAA2B,CAAA;IAC3B;;OAEG;IACH,mBAAmB;IACnB;;OAEG;IACH,uBAAuB;IACvB;;OAEG;IACH,2BAA2B;IAC3B;;OAEG;IACH,6BAA6B;IAC7B;;OAEG;IACH,8CAAmB,CAAA;AACvB,CAAC,EArDW,uBAAuB,uCAAvB,uBAAuB,QAqDlC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { A_Feature } from "../global/A-Feature/A-Feature.class";
|
|
2
|
+
import { A_Stage } from "../global/A-Stage/A-Stage.class";
|
|
3
|
+
import { A_TYPES__A_StageStep } from "../global/A-Stage/A-Stage.types";
|
|
4
|
+
export declare class StepsManager {
|
|
5
|
+
entities: A_TYPES__A_StageStep[];
|
|
6
|
+
graph: Map<string, Set<string>>;
|
|
7
|
+
visited: Set<string>;
|
|
8
|
+
tempMark: Set<string>;
|
|
9
|
+
sortedEntities: string[];
|
|
10
|
+
constructor(entities: A_TYPES__A_StageStep[]);
|
|
11
|
+
private buildGraph;
|
|
12
|
+
private matchEntities;
|
|
13
|
+
private visit;
|
|
14
|
+
toStages(feature: A_Feature): Array<A_Stage>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StepsManager = void 0;
|
|
4
|
+
const A_Stage_class_1 = require("../global/A-Stage/A-Stage.class");
|
|
5
|
+
class StepsManager {
|
|
6
|
+
constructor(entities) {
|
|
7
|
+
this.entities = entities;
|
|
8
|
+
this.graph = new Map();
|
|
9
|
+
this.visited = new Set();
|
|
10
|
+
this.tempMark = new Set();
|
|
11
|
+
this.sortedEntities = [];
|
|
12
|
+
}
|
|
13
|
+
buildGraph() {
|
|
14
|
+
// Initialize graph nodes
|
|
15
|
+
this.entities.forEach(entity => this.graph.set(entity.name, new Set()));
|
|
16
|
+
// Add directed edges based on 'before' and 'after'
|
|
17
|
+
this.entities.forEach(entity => {
|
|
18
|
+
const { name, before = [], after = [] } = entity;
|
|
19
|
+
// Add edges for 'before' dependencies
|
|
20
|
+
before.forEach(dep => {
|
|
21
|
+
const targets = this.matchEntities(dep);
|
|
22
|
+
targets.forEach(target => {
|
|
23
|
+
if (!this.graph.has(target))
|
|
24
|
+
this.graph.set(target, new Set());
|
|
25
|
+
this.graph.get(target).add(name); // target -> name (target should be before name)
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
// Add edges for 'after' dependencies
|
|
29
|
+
after.forEach(dep => {
|
|
30
|
+
const sources = this.matchEntities(dep);
|
|
31
|
+
sources.forEach(source => {
|
|
32
|
+
if (!this.graph.has(name))
|
|
33
|
+
this.graph.set(name, new Set());
|
|
34
|
+
this.graph.get(name).add(source); // name -> source (name should be before source)
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
// Match entities by name or regex
|
|
40
|
+
matchEntities(pattern) {
|
|
41
|
+
const regex = new RegExp(`^${pattern}$`);
|
|
42
|
+
return this.entities
|
|
43
|
+
.filter(entity => regex.test(entity.name))
|
|
44
|
+
.map(entity => entity.name);
|
|
45
|
+
}
|
|
46
|
+
// Topological sort with cycle detection
|
|
47
|
+
visit(node) {
|
|
48
|
+
if (this.tempMark.has(node))
|
|
49
|
+
throw new Error("Circular dependency detected");
|
|
50
|
+
if (!this.visited.has(node)) {
|
|
51
|
+
this.tempMark.add(node);
|
|
52
|
+
(this.graph.get(node) || []).forEach(neighbor => this.visit(neighbor));
|
|
53
|
+
this.tempMark.delete(node);
|
|
54
|
+
this.visited.add(node);
|
|
55
|
+
this.sortedEntities.push(node);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Sort the entities based on dependencies
|
|
59
|
+
toStages(feature) {
|
|
60
|
+
this.buildGraph();
|
|
61
|
+
// Start topological sort
|
|
62
|
+
this.entities.forEach(entity => {
|
|
63
|
+
if (!this.visited.has(entity.name))
|
|
64
|
+
this.visit(entity.name);
|
|
65
|
+
});
|
|
66
|
+
const stages = [];
|
|
67
|
+
// Map sorted names back to entity objects
|
|
68
|
+
this.sortedEntities
|
|
69
|
+
.map(name => {
|
|
70
|
+
const step = this.entities.find(entity => entity.name === name);
|
|
71
|
+
let stage = stages.find(stage => {
|
|
72
|
+
return stage.after.every(after => step.after.includes(after))
|
|
73
|
+
&& step.before.every(before => stage.after.includes(before));
|
|
74
|
+
});
|
|
75
|
+
if (!stage) {
|
|
76
|
+
stage = new A_Stage_class_1.A_Stage(feature);
|
|
77
|
+
stages.push(stage);
|
|
78
|
+
}
|
|
79
|
+
stage.add(step);
|
|
80
|
+
});
|
|
81
|
+
return stages;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.StepsManager = StepsManager;
|
|
85
|
+
//# sourceMappingURL=StepsManager.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepsManager.class.js","sourceRoot":"","sources":["../../../src/helpers/StepsManager.class.ts"],"names":[],"mappings":";;;AACA,mEAA0D;AAG1D,MAAa,YAAY;IASrB,YAAY,QAAgC;QACxC,IAAI,CAAC,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AAI,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;QAEP,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAnGD,oCAmGC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { A_Channel } from "@adaas/a-concept/global/A-Channel/A-Channel.class";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export class TestChannel extends A_Channel<any> {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
getVersion(
|
|
8
|
+
params
|
|
9
|
+
) {
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
getUser() {
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
getPage() {
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { A_Component } from "@adaas/a-concept/global/A-Component/A-Component.class";
|
|
2
|
+
import { A_Feature } from "@adaas/a-concept/global/A-Feature/A-Feature.class";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class BEController extends A_Component {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@A_Feature.Define({
|
|
11
|
+
name: 'getOrdersCount',
|
|
12
|
+
// channel
|
|
13
|
+
})
|
|
14
|
+
getOrdersCount() {
|
|
15
|
+
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { A_Component } from "@adaas/a-concept/global/A-Component/A-Component.class";
|
|
2
|
+
import { A_Concept } from "@adaas/a-concept/global/A-Concept/A_Concept.class";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class FEComponent extends A_Component {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@A_Concept.Load()
|
|
10
|
+
async renderHomePage() {
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
}
|
|
File without changes
|