@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-Component.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.meta.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"A-Component.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.meta.ts"],"names":[],"mappings":";;;AACA,yDAAgD;AAChD,2DAAyH;AAGzH,MAAa,eAAgB,SAAQ,qBAA8B;IAK/D;;;;;OAKG;IACH,UAAU,CACN,OAAe;QAEf,MAAM,KAAK,GAAsC,EAAE,CAAC;QAEpD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC,CAAC;QAClE,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC,CAAC;QAElE,iDAAiD;QAGjD,UAAU,aAAV,UAAU,uBAAV,UAAU;QACN,gDAAgD;SAC9C,IAAI,CAAC,OAAO,EACb,OAAO,CAA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oBACZ,0BAA0B;oBAC1B,IAAI,IACN,CAAC;YAEP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAGP,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AAnFD,0CAmFC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A_Feature } from "../A-Feature/A-Feature.class";
|
|
1
|
+
import { A_TYPES__A_InjectDecorator_Meta } from "../../decorators/A-Inject/A-Inject.decorator.types";
|
|
3
2
|
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
4
3
|
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { A_TYPES__A_ExtendDecorator_BehaviorConfig, A_TYPES__A_ExtendDecorator_Meta } from "../../decorators/A-Feature/A-Feature.decorator.types";
|
|
5
|
+
import { A_TYPES__ConceptAbstraction } from "../A-Concept/A_Concept.types";
|
|
6
|
+
export type A_TYPES__ComponentConstructor<_Exports extends Array<String>> = {
|
|
7
|
+
exports: _Exports;
|
|
8
|
+
};
|
|
7
9
|
export type A_TYPES__ComponentCallParams<T extends string> = {
|
|
8
10
|
name: T;
|
|
9
11
|
fragments: Array<A_Fragment>;
|
|
@@ -20,7 +22,7 @@ export type A_TYPES__ComponentMeta = {
|
|
|
20
22
|
*
|
|
21
23
|
* Where value is the extension instructions
|
|
22
24
|
*/
|
|
23
|
-
[Key: string]:
|
|
25
|
+
[Key: string]: A_TYPES__A_ExtendDecorator_Meta[];
|
|
24
26
|
}>;
|
|
25
27
|
[A_TYPES__ComponentMetaKey.FEATURES]: any[];
|
|
26
28
|
[A_TYPES__ComponentMetaKey.INJECTIONS]: A_Meta<{
|
|
@@ -29,14 +31,22 @@ export type A_TYPES__ComponentMeta = {
|
|
|
29
31
|
*
|
|
30
32
|
* Where value is the list of injections
|
|
31
33
|
*/
|
|
32
|
-
[Key: string]:
|
|
34
|
+
[Key: string]: A_TYPES__A_InjectDecorator_Meta;
|
|
35
|
+
}>;
|
|
36
|
+
[A_TYPES__ComponentMetaKey.ABSTRACTIONS]: A_Meta<{
|
|
37
|
+
/**
|
|
38
|
+
* Where Key is the name of the stage
|
|
39
|
+
*
|
|
40
|
+
* Where value is the list of injections
|
|
41
|
+
*/
|
|
42
|
+
[Key: string]: A_TYPES__ConceptAbstraction[];
|
|
33
43
|
}>;
|
|
34
44
|
};
|
|
35
45
|
export declare enum A_TYPES__ComponentMetaKey {
|
|
36
46
|
EXTENSIONS = "a-component-extensions",
|
|
37
47
|
FEATURES = "a-component-features",
|
|
38
48
|
INJECTIONS = "a-component-injections",
|
|
39
|
-
|
|
49
|
+
ABSTRACTIONS = "a-component-abstractions"
|
|
40
50
|
}
|
|
41
51
|
export type A_TYPES__ComponentMetaExtension = {
|
|
42
52
|
/**
|
|
@@ -50,30 +60,5 @@ export type A_TYPES__ComponentMetaExtension = {
|
|
|
50
60
|
/**
|
|
51
61
|
* The arguments that will be passed to the handler
|
|
52
62
|
*/
|
|
53
|
-
args:
|
|
54
|
-
};
|
|
55
|
-
export type A_TYPES__ComponentMeta_ExtensionItem = {
|
|
56
|
-
name: string;
|
|
57
|
-
handler: string;
|
|
58
|
-
};
|
|
59
|
-
export type A_TYPES__ComponentMeta_InjectionParams = Array<{
|
|
60
|
-
target: A_TYPES__ComponentMeta_InjectionParam;
|
|
61
|
-
} | {
|
|
62
|
-
target: {
|
|
63
|
-
new (...args: any[]): A_Entity;
|
|
64
|
-
};
|
|
65
|
-
instructions: Partial<A_TYPES__ComponentMeta_EntityInjectionInstructions>;
|
|
66
|
-
}>;
|
|
67
|
-
export type A_TYPES__ComponentMeta_EntityInjectionInstructions = {
|
|
68
|
-
aseid: string;
|
|
69
|
-
id: string;
|
|
70
|
-
};
|
|
71
|
-
export type A_TYPES__ComponentMeta_InjectionParam = {
|
|
72
|
-
new (...args: any[]): A_Fragment;
|
|
73
|
-
} | {
|
|
74
|
-
new (...args: any[]): A_Component;
|
|
75
|
-
} | {
|
|
76
|
-
new (...args: any[]): A_Scope;
|
|
77
|
-
} | {
|
|
78
|
-
new (...args: any[]): A_Feature;
|
|
79
|
-
};
|
|
63
|
+
args: A_TYPES__A_InjectDecorator_Meta;
|
|
64
|
+
} & A_TYPES__A_ExtendDecorator_BehaviorConfig;
|
|
@@ -6,12 +6,6 @@ var A_TYPES__ComponentMetaKey;
|
|
|
6
6
|
A_TYPES__ComponentMetaKey["EXTENSIONS"] = "a-component-extensions";
|
|
7
7
|
A_TYPES__ComponentMetaKey["FEATURES"] = "a-component-features";
|
|
8
8
|
A_TYPES__ComponentMetaKey["INJECTIONS"] = "a-component-injections";
|
|
9
|
-
A_TYPES__ComponentMetaKey["
|
|
9
|
+
A_TYPES__ComponentMetaKey["ABSTRACTIONS"] = "a-component-abstractions";
|
|
10
10
|
})(A_TYPES__ComponentMetaKey || (exports.A_TYPES__ComponentMetaKey = A_TYPES__ComponentMetaKey = {}));
|
|
11
|
-
// |
|
|
12
|
-
// typeof A_Fragment
|
|
13
|
-
// | typeof A_Component
|
|
14
|
-
// // | { new(...args: any[]): any }
|
|
15
|
-
// | typeof A_Scope
|
|
16
|
-
// | typeof A_Feature;
|
|
17
11
|
//# sourceMappingURL=A-Component.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Component.types.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"A-Component.types.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.types.ts"],"names":[],"mappings":";;;AAqDA,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACjC,kEAAqC,CAAA;IACrC,8DAAiC,CAAA;IACjC,kEAAqC,CAAA;IACrC,sEAAyC,CAAA;AAC7C,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC"}
|
|
@@ -18,36 +18,36 @@ export declare class A_Concept<_Features extends A_Container<any>[] = any> {
|
|
|
18
18
|
/**
|
|
19
19
|
* Load the concept. This step runs before any other steps to ensure that all components are loaded.
|
|
20
20
|
*/
|
|
21
|
-
static
|
|
21
|
+
static Load(): (target: A_Container<any> | import("../A-Component/A-Component.class").A_Component, propertyKey: string, descriptor: import("../../..").A_TYPES__A_AbstractionDecoratorDescriptor) => void;
|
|
22
22
|
/**
|
|
23
23
|
* Publish the concept to ADAAS platform. (Or any other place defined in the concept)
|
|
24
24
|
*
|
|
25
25
|
* [!] To extend the logic just create a custom containers and override the default behavior.
|
|
26
26
|
*/
|
|
27
|
-
static
|
|
27
|
+
static Publish(): (target: A_Container<any> | import("../A-Component/A-Component.class").A_Component, propertyKey: string, descriptor: import("../../..").A_TYPES__A_AbstractionDecoratorDescriptor) => void;
|
|
28
28
|
/**
|
|
29
29
|
* Deploy the concept to the environment.
|
|
30
30
|
*/
|
|
31
|
-
static
|
|
31
|
+
static Deploy(): (target: A_Container<any> | import("../A-Component/A-Component.class").A_Component, propertyKey: string, descriptor: import("../../..").A_TYPES__A_AbstractionDecoratorDescriptor) => void;
|
|
32
32
|
/**
|
|
33
33
|
* Compiles the Concept in case there are some containers that require that.
|
|
34
34
|
*
|
|
35
35
|
* Can be used for static websites or any other concept that requires a build step.
|
|
36
36
|
*
|
|
37
37
|
*/
|
|
38
|
-
static
|
|
38
|
+
static Build(): (target: A_Container<any> | import("../A-Component/A-Component.class").A_Component, propertyKey: string, descriptor: import("../../..").A_TYPES__A_AbstractionDecoratorDescriptor) => void;
|
|
39
39
|
/**
|
|
40
40
|
* Main execution of the concept.
|
|
41
41
|
*/
|
|
42
|
-
static
|
|
42
|
+
static Run(): (target: A_Container<any> | import("../A-Component/A-Component.class").A_Component, propertyKey: string, descriptor: import("../../..").A_TYPES__A_AbstractionDecoratorDescriptor) => void;
|
|
43
43
|
/**
|
|
44
44
|
* Start the concept. Uses for servers or any other background services.
|
|
45
45
|
*/
|
|
46
|
-
static
|
|
46
|
+
static Start(): (target: A_Container<any> | import("../A-Component/A-Component.class").A_Component, propertyKey: string, descriptor: import("../../..").A_TYPES__A_AbstractionDecoratorDescriptor) => void;
|
|
47
47
|
/**
|
|
48
48
|
* Stop the concept. Uses for servers or any other background services.
|
|
49
49
|
*/
|
|
50
|
-
static
|
|
50
|
+
static Stop(): (target: A_Container<any> | import("../A-Component/A-Component.class").A_Component, propertyKey: string, descriptor: import("../../..").A_TYPES__A_AbstractionDecoratorDescriptor) => void;
|
|
51
51
|
protected containers: A_Container<any>[];
|
|
52
52
|
constructor(props: A_TYPES__IConceptConstructor<_Features>);
|
|
53
53
|
get namespace(): string;
|
|
@@ -13,7 +13,7 @@ exports.A_Concept = void 0;
|
|
|
13
13
|
const A_Concept_types_1 = require("./A_Concept.types");
|
|
14
14
|
const A_Context_class_1 = require("../A-Context/A-Context.class");
|
|
15
15
|
const A_Container_types_1 = require("../A-Container/A-Container.types");
|
|
16
|
-
const
|
|
16
|
+
const A_Abstraction_decorator_1 = require("../../decorators/A-Abstraction/A-Abstraction.decorator");
|
|
17
17
|
// export type RunParams<T> = T extends A_Container<any, infer Params> ? Params : never;
|
|
18
18
|
/**
|
|
19
19
|
* A_Concept is a placeholder for the concept of the ani program.
|
|
@@ -34,22 +34,22 @@ class A_Concept {
|
|
|
34
34
|
/**
|
|
35
35
|
* Load the concept. This step runs before any other steps to ensure that all components are loaded.
|
|
36
36
|
*/
|
|
37
|
-
static
|
|
38
|
-
return (0,
|
|
37
|
+
static Load() {
|
|
38
|
+
return (0, A_Abstraction_decorator_1.A_Abstraction)(A_Concept_types_1.A_TYPES__ConceptStage.Load);
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Publish the concept to ADAAS platform. (Or any other place defined in the concept)
|
|
42
42
|
*
|
|
43
43
|
* [!] To extend the logic just create a custom containers and override the default behavior.
|
|
44
44
|
*/
|
|
45
|
-
static
|
|
46
|
-
return (0,
|
|
45
|
+
static Publish() {
|
|
46
|
+
return (0, A_Abstraction_decorator_1.A_Abstraction)(A_Concept_types_1.A_TYPES__ConceptStage.Publish);
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Deploy the concept to the environment.
|
|
50
50
|
*/
|
|
51
|
-
static
|
|
52
|
-
return (0,
|
|
51
|
+
static Deploy() {
|
|
52
|
+
return (0, A_Abstraction_decorator_1.A_Abstraction)(A_Concept_types_1.A_TYPES__ConceptStage.Deploy);
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* Compiles the Concept in case there are some containers that require that.
|
|
@@ -57,26 +57,26 @@ class A_Concept {
|
|
|
57
57
|
* Can be used for static websites or any other concept that requires a build step.
|
|
58
58
|
*
|
|
59
59
|
*/
|
|
60
|
-
static
|
|
61
|
-
return (0,
|
|
60
|
+
static Build() {
|
|
61
|
+
return (0, A_Abstraction_decorator_1.A_Abstraction)(A_Concept_types_1.A_TYPES__ConceptStage.Build);
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* Main execution of the concept.
|
|
65
65
|
*/
|
|
66
|
-
static
|
|
67
|
-
return (0,
|
|
66
|
+
static Run() {
|
|
67
|
+
return (0, A_Abstraction_decorator_1.A_Abstraction)(A_Concept_types_1.A_TYPES__ConceptStage.Run);
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Start the concept. Uses for servers or any other background services.
|
|
71
71
|
*/
|
|
72
|
-
static
|
|
73
|
-
return (0,
|
|
72
|
+
static Start() {
|
|
73
|
+
return (0, A_Abstraction_decorator_1.A_Abstraction)(A_Concept_types_1.A_TYPES__ConceptStage.Start);
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* Stop the concept. Uses for servers or any other background services.
|
|
77
77
|
*/
|
|
78
|
-
static
|
|
79
|
-
return (0,
|
|
78
|
+
static Stop() {
|
|
79
|
+
return (0, A_Abstraction_decorator_1.A_Abstraction)(A_Concept_types_1.A_TYPES__ConceptStage.Stop);
|
|
80
80
|
}
|
|
81
81
|
constructor(props) {
|
|
82
82
|
this.props = props;
|
|
@@ -142,29 +142,29 @@ class A_Concept {
|
|
|
142
142
|
}
|
|
143
143
|
runStage(method, params) {
|
|
144
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
-
const
|
|
145
|
+
const abstractions = [];
|
|
146
146
|
this.containers.map(container => {
|
|
147
147
|
const meta = A_Context_class_1.A_Context.meta(container);
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
148
|
+
const containerAbstractions = meta
|
|
149
|
+
.abstractions(method)
|
|
150
|
+
.map(step => (Object.assign({ component: container }, step)));
|
|
151
|
+
const containerScope = A_Context_class_1.A_Context.scope(container);
|
|
152
|
+
const componentsAbstractions = containerScope.components
|
|
153
|
+
.map(component => A_Context_class_1.A_Context.meta(component).abstractions(method).map(step => (Object.assign({ component }, step))))
|
|
154
|
+
.flat();
|
|
155
|
+
abstractions.push({
|
|
156
|
+
container,
|
|
157
|
+
runners: [
|
|
158
|
+
...containerAbstractions.map(step => (Object.assign(Object.assign({}, step), { component: container }))),
|
|
159
|
+
...componentsAbstractions
|
|
160
|
+
]
|
|
161
|
+
});
|
|
159
162
|
});
|
|
160
163
|
const scope = A_Context_class_1.A_Context.allocate(this, {
|
|
161
164
|
components: params.components,
|
|
162
165
|
fragments: params.fragments,
|
|
163
166
|
parent: A_Context_class_1.A_Context.scope(this)
|
|
164
167
|
});
|
|
165
|
-
for (const stage of stages) {
|
|
166
|
-
yield stage.container[stage.name](params);
|
|
167
|
-
}
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
execute(params) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A_Concept.class.js","sourceRoot":"","sources":["../../../../src/global/A-Concept/A_Concept.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqH;AACrH,kEAAyD;AAIzD,wEAA6E;AAC7E
|
|
1
|
+
{"version":3,"file":"A_Concept.class.js","sourceRoot":"","sources":["../../../../src/global/A-Concept/A_Concept.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqH;AACrH,kEAAyD;AAIzD,wEAA6E;AAC7E,+GAAkG;AAOlG,wFAAwF;AAIxF;;;;;;;;;;;GAWG;AACH,MAAa,SAAS;IAIlB,iFAAiF;IACjF,iFAAiF;IACjF,iFAAiF;IACjF;;OAEG;IACH,MAAM,CAAC,IAAI;QACP,OAAO,IAAA,uCAAa,EAAC,uCAAqB,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,OAAO;QACV,OAAO,IAAA,uCAAa,EAAC,uCAAqB,CAAC,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAM;QACT,OAAO,IAAA,uCAAa,EAAC,uCAAqB,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,KAAK;QACR,OAAO,IAAA,uCAAa,EAAC,uCAAqB,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,GAAG;QACN,OAAO,IAAA,uCAAa,EAAC,uCAAqB,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK;QACR,OAAO,IAAA,uCAAa,EAAC,uCAAqB,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAI;QACP,OAAO,IAAA,uCAAa,EAAC,uCAAqB,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAUD,YACc,KAA8C;QAA9C,UAAK,GAAL,KAAK,CAAyC;QAP5D,iFAAiF;QACjF,iFAAiF;QACjF,iFAAiF;QAEvE,eAAU,GAAuB,EAAE,CAAC;QAK1C,2BAAS,CAAC,QAAQ,CAAC,IAAI,EAAE;YACrB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB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"../A-Container/A-Container.class";
|
|
2
3
|
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
4
|
+
import { A_Entity } from "../A-Entity/A-Entity.class";
|
|
5
|
+
import { A_Component } from "../A-Component/A-Component.class";
|
|
6
|
+
import { A_TYPES__A_ExtendDecorator_BehaviorConfig } from "../../decorators/A-Feature/A-Feature.decorator.types";
|
|
3
7
|
export declare enum A_TYPES__ConceptStage {
|
|
4
8
|
Run = "run",
|
|
5
9
|
Build = "build",
|
|
@@ -26,16 +30,52 @@ export interface A_TYPES__IConceptConstructor<T extends Array<A_Container<any>>>
|
|
|
26
30
|
*/
|
|
27
31
|
containers?: T;
|
|
28
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Uses as a transfer object to pass configurations to Feature constructor
|
|
35
|
+
*/
|
|
36
|
+
export type A_TYPES__ConceptAbstractionMeta = {
|
|
37
|
+
/**
|
|
38
|
+
* The name of original Extension Definition
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
41
|
+
/**
|
|
42
|
+
* The name of the handler that will be used to apply the extension
|
|
43
|
+
*/
|
|
44
|
+
handler: string;
|
|
45
|
+
/**
|
|
46
|
+
* The arguments that will be passed to the handler
|
|
47
|
+
*/
|
|
48
|
+
args: A_TYPES__A_InjectDecorator_Meta;
|
|
49
|
+
} & A_TYPES__A_ExtendDecorator_BehaviorConfig;
|
|
50
|
+
/**
|
|
51
|
+
* Uses to define the extension that will be applied to the Concept
|
|
52
|
+
*/
|
|
53
|
+
export type A_TYPES__ConceptAbstraction = {
|
|
54
|
+
/**
|
|
55
|
+
* The name of original Extension Definition
|
|
56
|
+
*/
|
|
57
|
+
name: string;
|
|
58
|
+
/**
|
|
59
|
+
* The name of the handler that will be used to apply the extension
|
|
60
|
+
*/
|
|
61
|
+
handler: string;
|
|
62
|
+
} & A_TYPES__A_ExtendDecorator_BehaviorConfig;
|
|
29
63
|
export type A_TYPES__ConceptStageParams = {
|
|
30
64
|
fragments: Array<A_Fragment>;
|
|
31
65
|
components: Array<{
|
|
32
|
-
new (...args: any[]):
|
|
66
|
+
new (...args: any[]): A_Component;
|
|
67
|
+
}>;
|
|
68
|
+
entities: Array<{
|
|
69
|
+
new (...args: any[]): A_Entity;
|
|
33
70
|
}>;
|
|
34
71
|
};
|
|
35
72
|
export type A_TYPES__ConceptCallParams<T extends string> = {
|
|
36
73
|
name: T;
|
|
37
74
|
fragments: Array<A_Fragment>;
|
|
38
75
|
components: Array<{
|
|
39
|
-
new (...args: any[]):
|
|
76
|
+
new (...args: any[]): A_Component;
|
|
77
|
+
}>;
|
|
78
|
+
entities: Array<{
|
|
79
|
+
new (...args: any[]): A_Entity<any, any, any>;
|
|
40
80
|
}>;
|
|
41
81
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A_Concept.types.js","sourceRoot":"","sources":["../../../../src/global/A-Concept/A_Concept.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"A_Concept.types.js","sourceRoot":"","sources":["../../../../src/global/A-Concept/A_Concept.types.ts"],"names":[],"mappings":";;;AAQA,IAAY,qBAQX;AARD,WAAY,qBAAqB;IAC7B,oCAAW,CAAA;IACX,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,0CAAiB,CAAA;IACjB,sCAAa,CAAA;IACb,wCAAe,CAAA;IACf,sCAAa,CAAA;AACjB,CAAC,EARW,qBAAqB,qCAArB,qBAAqB,QAQhC;AAGD,uCAAuC;AACvC,6FAA6F;AAC7F,iDAAiD;AACjD,oDAAoD;AACpD,yCAAyC;AACzC,8BAA8B;AAC9B,oDAAoD;AACpD,kDAAkD;AAClD,WAAW;AAEX,IAAI;AAEJ,IAAY,uBAEX;AAFD,WAAY,uBAAuB;IAC/B,+DAAoC,CAAA;AACxC,CAAC,EAFW,uBAAuB,uCAAvB,uBAAuB,QAElC"}
|
|
@@ -13,7 +13,7 @@ import { A_TYPES__FeatureConstructor } from "../A-Feature/A-Feature.types";
|
|
|
13
13
|
* - Microservice
|
|
14
14
|
* - etc.
|
|
15
15
|
*/
|
|
16
|
-
export declare class A_Container<_FeatureNames extends Array<string
|
|
16
|
+
export declare class A_Container<_FeatureNames extends Array<string> = any> {
|
|
17
17
|
protected readonly config: Partial<A_TYPES__ContainerConstructor<_FeatureNames>>;
|
|
18
18
|
/**
|
|
19
19
|
* Promise that will be resolved when the container is ready to be used.
|
|
@@ -27,13 +27,6 @@ export declare class A_Container<_FeatureNames extends Array<string>> {
|
|
|
27
27
|
* Configuration of the container that will be used to run it.
|
|
28
28
|
*/
|
|
29
29
|
config: Partial<A_TYPES__ContainerConstructor<_FeatureNames>>);
|
|
30
|
-
protected hasInherited(cl: {
|
|
31
|
-
new (...args: any[]): any;
|
|
32
|
-
}): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Initializes the Namespace or can be used to reinitialize the Namespace
|
|
35
|
-
*/
|
|
36
|
-
private init;
|
|
37
30
|
/**
|
|
38
31
|
* This method allows to call the lifecycle method of the container as well as any other Feature defined for it
|
|
39
32
|
*
|
|
@@ -41,36 +41,6 @@ class A_Container {
|
|
|
41
41
|
const components = config.components || [];
|
|
42
42
|
const fragments = config.fragments || [];
|
|
43
43
|
A_Context_class_1.A_Context.allocate(this, config);
|
|
44
|
-
/**
|
|
45
|
-
* Run Async Initialization
|
|
46
|
-
*/
|
|
47
|
-
this.init();
|
|
48
|
-
}
|
|
49
|
-
hasInherited(cl) {
|
|
50
|
-
return this.constructor === cl
|
|
51
|
-
? false
|
|
52
|
-
: true;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Initializes the Namespace or can be used to reinitialize the Namespace
|
|
56
|
-
*/
|
|
57
|
-
init() {
|
|
58
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
if (!this.ready)
|
|
60
|
-
this.ready = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
try {
|
|
62
|
-
yield this.onBeforeInit();
|
|
63
|
-
yield this.onInit();
|
|
64
|
-
yield this.onAfterInit();
|
|
65
|
-
return resolve();
|
|
66
|
-
}
|
|
67
|
-
catch (error) {
|
|
68
|
-
return reject(error);
|
|
69
|
-
}
|
|
70
|
-
}));
|
|
71
|
-
else
|
|
72
|
-
yield this.ready;
|
|
73
|
-
});
|
|
74
44
|
}
|
|
75
45
|
call(param1, param2) {
|
|
76
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -80,7 +50,7 @@ class A_Container {
|
|
|
80
50
|
const params = typeof param1 === 'string'
|
|
81
51
|
? param2 || {}
|
|
82
52
|
: param1;
|
|
83
|
-
const newFeature = A_Context_class_1.A_Context.feature(this
|
|
53
|
+
const newFeature = A_Context_class_1.A_Context.feature(A_Context_class_1.A_Context.scope(this), this, feature, params);
|
|
84
54
|
return yield newFeature.process();
|
|
85
55
|
});
|
|
86
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Container.class.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,kEAAyD;AAMzD;;;;;;;;;;GAUG;AACH,MAAa,WAAW;IAYpB,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,EAAS,CAAC;IAC5C,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACrD,CAAC;IAED,IAAI,KAAK;QACL,OAAO,2BAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAGD;IACI;;OAEG;IACH,MAA6D;QAE7D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;QAC3C,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;QAEzC,2BAAS,CAAC,QAAQ,CAAC,IAAI,EA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AO,CACH,MAAyH,EACzH,MAAqE;QAGrE,MAAM,OAAO,GAAW,OAAO,MAAM,KAAK,QAAQ;YAC9C,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;QAClB,MAAM,MAAM,GAAiE,OAAO,MAAM,KAAK,QAAQ;YACnG,CAAC,CAAC,MAAM,IAAI,EAAE;YACd,CAAC,CAAC,MAAM,CAAC;QAEb,OAAO,2BAAS,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1E,CAAC;IAID,iEAAiE;IACjE,iEAAiE;IACjE,iEAAiE;IAEjE;;;;OAIG;IACa,YAAY;;YACxB,OAAO;QACX,CAAC;KAAA;IAED;;OAEG;IACa,MAAM;;YAClB,OAAO;QACX,CAAC;KAAA;IAED;;;;OAIG;IACa,WAAW;;YACvB,OAAO;QACX,CAAC;KAAA;CAEJ;AAxKD,kCAwKC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
import { A_TYPES__ConceptAbstractionMeta, A_TYPES__ConceptStage } from "../A-Concept/A_Concept.types";
|
|
1
2
|
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
2
3
|
import { A_TYPES__ContainerMeta } from "./A-Container.types";
|
|
3
4
|
export declare class A_ContainerMeta extends A_Meta<A_TYPES__ContainerMeta> {
|
|
5
|
+
/**
|
|
6
|
+
* Returns a set of instructions to run proper methods in Container during A-Concept Stage
|
|
7
|
+
*
|
|
8
|
+
* @param stage
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
abstractions(abstraction: A_TYPES__ConceptStage): A_TYPES__ConceptAbstractionMeta[];
|
|
4
12
|
}
|
|
@@ -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,5 +1,7 @@
|
|
|
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";
|
|
4
6
|
export type A_TYPES__ContainerConstructor<_Exports extends Array<String>> = {
|
|
5
7
|
name?: string;
|
|
@@ -14,16 +16,30 @@ export type A_TYPES__ContainerCallParams<T extends string> = {
|
|
|
14
16
|
};
|
|
15
17
|
export type A_TYPES__ContainerMeta = {
|
|
16
18
|
[A_TYPES__ContainerMetaKey.FEATURES]: Map<string, A_TYPES__ContainerMeta_FeatureItem>;
|
|
17
|
-
[A_TYPES__ContainerMetaKey.
|
|
19
|
+
[A_TYPES__ContainerMetaKey.ABSTRACTIONS]: 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__ConceptAbstraction[];
|
|
28
|
+
}>;
|
|
29
|
+
[A_TYPES__ContainerMetaKey.INJECTIONS]: A_Meta<{
|
|
30
|
+
/**
|
|
31
|
+
* Where Key is the name of the injection
|
|
32
|
+
*
|
|
33
|
+
* Where value is the list of injections
|
|
34
|
+
*/
|
|
35
|
+
[Key: string]: A_TYPES__A_InjectDecorator_Meta;
|
|
36
|
+
}>;
|
|
18
37
|
};
|
|
19
38
|
export declare enum A_TYPES__ContainerMetaKey {
|
|
20
39
|
FEATURES = "a-container-features",
|
|
21
|
-
|
|
40
|
+
INJECTIONS = "a-container-injections",
|
|
41
|
+
ABSTRACTIONS = "a-container-abstractions"
|
|
22
42
|
}
|
|
23
|
-
export type A_TYPES__ContainerMeta_StageExtension = {
|
|
24
|
-
name: A_TYPES__ConceptStage;
|
|
25
|
-
handler: string;
|
|
26
|
-
};
|
|
27
43
|
export type A_TYPES__ContainerMeta_FeatureItem = {
|
|
28
44
|
name: string;
|
|
29
45
|
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":";;;AA8CA,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACjC,8DAAiC,CAAA;IACjC,kEAAqC,CAAA;IACrC,sEAAyC,CAAA;AAC7C,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC"}
|
|
@@ -41,7 +41,6 @@ class A_Context {
|
|
|
41
41
|
/**
|
|
42
42
|
* A set of allocated scopes per every element in the program.
|
|
43
43
|
*/
|
|
44
|
-
// protected scopes: WeakMap<A_Container<any> | A_Feature | A_Component | any, A_Scope> = new WeakMap();
|
|
45
44
|
this.conceptsMeta = new Map();
|
|
46
45
|
this.containersMeta = new Map();
|
|
47
46
|
this.componentsMeta = new Map();
|
|
@@ -232,13 +231,8 @@ class A_Context {
|
|
|
232
231
|
// Get all extensions for the feature
|
|
233
232
|
meta
|
|
234
233
|
.extensions(feature)
|
|
235
|
-
.forEach((
|
|
236
|
-
steps.push({
|
|
237
|
-
component: constructor,
|
|
238
|
-
name,
|
|
239
|
-
handler,
|
|
240
|
-
args
|
|
241
|
-
});
|
|
234
|
+
.forEach((declaration) => {
|
|
235
|
+
steps.push(Object.assign({ component: constructor }, declaration));
|
|
242
236
|
});
|
|
243
237
|
});
|
|
244
238
|
return {
|
|
@@ -268,37 +262,14 @@ class A_Context {
|
|
|
268
262
|
case param1 instanceof A_Entity_class_1.A_Entity:
|
|
269
263
|
instance.registry.set(param1, scope);
|
|
270
264
|
break;
|
|
271
|
-
case param1 instanceof A_Fragment_class_1.A_Fragment:
|
|
265
|
+
case param1 instanceof A_Fragment_class_1.A_Fragment && !instance.registry.has(param1):
|
|
272
266
|
instance.registry.set(param1, scope);
|
|
273
267
|
break;
|
|
274
268
|
default:
|
|
275
|
-
instance.registry.
|
|
269
|
+
if (!instance.registry.has(param1))
|
|
270
|
+
instance.registry.set(param1, scope);
|
|
271
|
+
break;
|
|
276
272
|
}
|
|
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
273
|
}
|
|
303
274
|
}
|
|
304
275
|
exports.A_Context = A_Context;
|