@adaas/a-concept 0.0.38 → 0.0.40

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.
Files changed (50) hide show
  1. package/dist/src/global/A-Abstraction/A-Abstraction.class.d.ts +8 -2
  2. package/dist/src/global/A-Abstraction/A-Abstraction.class.js +5 -1
  3. package/dist/src/global/A-Abstraction/A-Abstraction.class.js.map +1 -1
  4. package/dist/src/global/A-Abstraction/A-Abstraction.types.d.ts +13 -4
  5. package/dist/src/global/A-Abstraction/A-Abstraction.types.js.map +1 -1
  6. package/dist/src/global/A-Component/A-Component.class.d.ts +11 -4
  7. package/dist/src/global/A-Component/A-Component.class.js +13 -4
  8. package/dist/src/global/A-Component/A-Component.class.js.map +1 -1
  9. package/dist/src/global/A-Concept/A_Concept.class.d.ts +11 -10
  10. package/dist/src/global/A-Concept/A_Concept.class.js +24 -20
  11. package/dist/src/global/A-Concept/A_Concept.class.js.map +1 -1
  12. package/dist/src/global/A-Concept/A_Concept.meta.d.ts +4 -4
  13. package/dist/src/global/A-Concept/A_Concept.meta.js +14 -6
  14. package/dist/src/global/A-Concept/A_Concept.meta.js.map +1 -1
  15. package/dist/src/global/A-Container/A-Container.class.d.ts +3 -4
  16. package/dist/src/global/A-Container/A-Container.class.js +8 -8
  17. package/dist/src/global/A-Container/A-Container.class.js.map +1 -1
  18. package/dist/src/global/A-Context/A-Context.class.d.ts +8 -10
  19. package/dist/src/global/A-Context/A-Context.class.js +32 -34
  20. package/dist/src/global/A-Context/A-Context.class.js.map +1 -1
  21. package/dist/src/global/A-Entity/A-Entity.class.d.ts +2 -2
  22. package/dist/src/global/A-Entity/A-Entity.class.js +4 -4
  23. package/dist/src/global/A-Entity/A-Entity.class.js.map +1 -1
  24. package/dist/src/global/A-Feature/A-Feature.class.d.ts +10 -8
  25. package/dist/src/global/A-Feature/A-Feature.class.js +11 -11
  26. package/dist/src/global/A-Feature/A-Feature.class.js.map +1 -1
  27. package/dist/src/global/A-Feature/A-Feature.types.d.ts +13 -2
  28. package/dist/src/global/A-Feature/A-Feature.types.js.map +1 -1
  29. package/dist/src/global/A-Scope/A-Scope.class.d.ts +14 -0
  30. package/dist/src/global/A-Scope/A-Scope.class.js +48 -5
  31. package/dist/src/global/A-Scope/A-Scope.class.js.map +1 -1
  32. package/dist/src/global/A-Stage/A-Stage.class.js +2 -2
  33. package/dist/src/global/A-Stage/A-Stage.class.js.map +1 -1
  34. package/examples/simple/concept.ts +1 -0
  35. package/examples/simple/containers/Main.container.ts +6 -5
  36. package/examples/simple-http-server/concept.ts +1 -0
  37. package/examples/simple-http-server/containers/http-server.container.ts +4 -2
  38. package/package.json +1 -1
  39. package/src/global/A-Abstraction/A-Abstraction.class.ts +11 -3
  40. package/src/global/A-Abstraction/A-Abstraction.types.ts +13 -6
  41. package/src/global/A-Component/A-Component.class.ts +12 -7
  42. package/src/global/A-Concept/A_Concept.class.ts +29 -21
  43. package/src/global/A-Concept/A_Concept.meta.ts +8 -15
  44. package/src/global/A-Container/A-Container.class.ts +13 -11
  45. package/src/global/A-Context/A-Context.class.ts +49 -87
  46. package/src/global/A-Entity/A-Entity.class.ts +5 -4
  47. package/src/global/A-Feature/A-Feature.class.ts +22 -13
  48. package/src/global/A-Feature/A-Feature.types.ts +14 -2
  49. package/src/global/A-Scope/A-Scope.class.ts +61 -5
  50. package/src/global/A-Stage/A-Stage.class.ts +4 -2
@@ -1,7 +1,8 @@
1
1
  import { A_Abstraction_Extend } from "../../decorators/A-Abstraction/A-Abstraction-Extend.decorator";
2
2
  import { A_Feature } from "../A-Feature/A-Feature.class";
3
3
  import { A_TYPES__A_AbstractionConstructor, A_TYPES__AbstractionState } from "./A-Abstraction.types";
4
- import { A_Error, A_TYPES__Required } from "@adaas/a-utils";
4
+ import { A_Error } from "@adaas/a-utils";
5
+ import { A_Scope } from "../A-Scope/A-Scope.class";
5
6
  export declare class A_Abstraction {
6
7
  name: string;
7
8
  protected features: A_Feature[];
@@ -9,11 +10,16 @@ export declare class A_Abstraction {
9
10
  protected _index: number;
10
11
  state: A_TYPES__AbstractionState;
11
12
  error?: A_Error;
13
+ readonly Scope: A_Scope;
12
14
  /**
13
15
  * Define a new A-Abstraction
14
16
  */
15
17
  static get Extend(): typeof A_Abstraction_Extend;
16
- constructor(params: A_TYPES__Required<Partial<A_TYPES__A_AbstractionConstructor>, ['name', 'features']>);
18
+ constructor(
19
+ /**
20
+ * Parameters to define the A-Abstraction
21
+ */
22
+ params: A_TYPES__A_AbstractionConstructor);
17
23
  get feature(): A_Feature | undefined;
18
24
  [Symbol.iterator](): Iterator<A_Feature, any>;
19
25
  /**
@@ -20,7 +20,11 @@ class A_Abstraction {
20
20
  static get Extend() {
21
21
  return A_Abstraction_Extend_decorator_1.A_Abstraction_Extend;
22
22
  }
23
- constructor(params) {
23
+ constructor(
24
+ /**
25
+ * Parameters to define the A-Abstraction
26
+ */
27
+ params) {
24
28
  this.features = [];
25
29
  this._index = 0;
26
30
  this.state = A_Abstraction_types_1.A_TYPES__AbstractionState.INITIALIZED;
@@ -1 +1 @@
1
- {"version":3,"file":"A-Abstraction.class.js","sourceRoot":"","sources":["../../../../src/global/A-Abstraction/A-Abstraction.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6HAAgH;AAChH,kEAAyD;AACzD,+DAAqG;AAIrG,MAAa,aAAa;IAYtB;;OAEG;IACH,MAAM,KAAK,MAAM;QACb,OAAO,qDAAoB,CAAC;IAChC,CAAC;IAID,YAAY,MAA2F;QAlB7F,aAAQ,GAAgB,EAAE,CAAC;QAE3B,WAAM,GAAW,CAAC,CAAC;QAE7B,UAAK,GAA8B,+CAAyB,CAAC,WAAW,CAAC;QAerE,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,2BAAS,CAAC,GAAG,CAAC,CAAC,CAAC;Q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AAC,KAAK,GAAG,+CAAyB,CAAC,MAAM,CAAC;QAClD,CAAC;KAAA;IAGD;;;;OAIG;IACH,MAAM;QACF,OAAO,CAAC,IAAI,CAAC,OAAO;eACb,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM;eACnC,IAAI,CAAC,KAAK,KAAK,+CAAyB,CAAC,SAAS;eAClD,IAAI,CAAC,KAAK,KAAK,+CAAyB,CAAC,MAAM,CAAC;IAC3D,CAAC;IAGK,OAAO;;YACT,IAAI,IAAI,CAAC,MAAM,EAAE;gBACb,OAAO;YACX,IAAI,CAAC;gBACD,IAAI,CAAC,KAAK,GAAG,+CAAyB,CAAC,UAAU,CAAC;gBAElD,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAElC,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;gBAC5B,CAAC;gBAED,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;YAE3B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC;QAEL,CAAC;KAAA;CACJ;AAlID,sCAkIC"}
@@ -1,10 +1,19 @@
1
- import { A_TYPES__Required } from "@adaas/a-utils";
2
1
  import { A_TYPES__FeatureConstructor } from "../A-Feature/A-Feature.types";
3
- import { A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types";
2
+ import { A_Scope } from "../A-Scope/A-Scope.class";
4
3
  export type A_TYPES__A_AbstractionConstructor = {
4
+ /**
5
+ * Name of the A-Abstraction
6
+ */
5
7
  name: string;
6
- features: Array<A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps']>>;
7
- } & A_TYPES__ScopeConstructor;
8
+ /**
9
+ * Features that compose the A-Abstraction
10
+ */
11
+ features: Array<A_TYPES__FeatureConstructor>;
12
+ /**
13
+ * Scope in which the A-Abstraction will be executed
14
+ */
15
+ scope: A_Scope;
16
+ };
8
17
  export declare enum A_TYPES__AbstractionState {
9
18
  INITIALIZED = "INITIALIZED",
10
19
  PROCESSING = "PROCESSING",
@@ -1 +1 @@
1
- {"version":3,"file":"A-Abstraction.types.js","sourceRoot":"","sources":["../../../../src/global/A-Abstraction/A-Abstraction.types.ts"],"names":[],"mappings":";;;AAeA,IAAY,yBAMX;AAND,WAAY,yBAAyB;IACjC,wDAA2B,CAAA;IAC3B,sDAAyB,CAAA;IAEzB,oDAAuB,CAAA;IACvB,8CAAiB,CAAA;AACrB,CAAC,EANW,yBAAyB,yCAAzB,yBAAyB,QAMpC"}
1
+ {"version":3,"file":"A-Abstraction.types.js","sourceRoot":"","sources":["../../../../src/global/A-Abstraction/A-Abstraction.types.ts"],"names":[],"mappings":";;;AAsBA,IAAY,yBAMX;AAND,WAAY,yBAAyB;IACjC,wDAA2B,CAAA;IAC3B,sDAAyB,CAAA;IAEzB,oDAAuB,CAAA;IACvB,8CAAiB,CAAA;AACrB,CAAC,EANW,yBAAyB,yCAAzB,yBAAyB,QAMpC"}
@@ -1,10 +1,17 @@
1
- import { A_TYPES__ComponentConstructor } from "./A-Component.types";
2
- import { A_TYPES__FeatureCallParams } from "../A-Feature/A-Feature.types";
1
+ import { A_Scope } from "../A-Scope/A-Scope.class";
3
2
  /**
4
3
  * This element only contains the specific code
5
4
  *
6
5
  */
7
6
  export declare class A_Component {
8
- constructor(params?: Partial<A_TYPES__ComponentConstructor<any>>);
9
- call(feature: string, params?: Partial<A_TYPES__FeatureCallParams>): Promise<any>;
7
+ constructor();
8
+ call(
9
+ /**
10
+ * Name of the feature to call
11
+ */
12
+ feature: string,
13
+ /**
14
+ * Scope in which the feature will be executed
15
+ */
16
+ scope?: A_Scope): Promise<any>;
10
17
  }
@@ -16,12 +16,21 @@ const A_Context_class_1 = require("../A-Context/A-Context.class");
16
16
  *
17
17
  */
18
18
  class A_Component {
19
- constructor(params) {
19
+ constructor() {
20
20
  console.log('A-Component instance created', this);
21
21
  }
22
- call(feature_1) {
23
- return __awaiter(this, arguments, void 0, function* (feature, params = {}) {
24
- const newFeature = A_Context_class_1.A_Context.feature(A_Context_class_1.A_Context.scope(this), this, feature, params);
22
+ call(
23
+ /**
24
+ * Name of the feature to call
25
+ */
26
+ feature,
27
+ /**
28
+ * Scope in which the feature will be executed
29
+ */
30
+ scope) {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ scope = scope ? scope.inherit(A_Context_class_1.A_Context.scope(this)) : A_Context_class_1.A_Context.scope(this);
33
+ const newFeature = A_Context_class_1.A_Context.feature(this, feature, scope);
25
34
  return yield newFeature.process();
26
35
  });
27
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"A-Component.class.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kEAAyD;AAMzD;;;GAGG;AACH,MAAa,WAAW;IACpB,YACI,MAAoD;QAEpD,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,IAAI,CAAC,CAAC;IAEtD,CAAC;IAGK,IAAI;6DACN,OAAe,EACf,SAA8C,EAAE;YAEhD,MAAM,UAAU,GAAG,2BAAS,CAAC,OAAO,CAAC,2BAAS,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAEnF,OAAO,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;QACtC,CAAC;KAAA;CAGJ;AAnBD,kCAmBC"}
1
+ {"version":3,"file":"A-Component.class.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kEAAyD;AAOzD;;;GAGG;AACH,MAAa,WAAW;IACpB;QACI,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,IAAI,CAAC,CAAC;IAEtD,CAAC;IAGK,IAAI;IACN;;OAEG;IACH,OAAe;IACf;;OAEG;IACH,KAAe;;YAEf,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,2BAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,2BAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAE7E,MAAM,UAAU,GAAG,2BAAS,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;YAE3D,OAAO,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;QACtC,CAAC;KAAA;CACJ;AAvBD,kCAuBC"}
@@ -1,6 +1,7 @@
1
- import { A_TYPES__ConceptAbstractionCallParams, A_TYPES__IConceptConstructor } from "./A_Concept.types";
1
+ import { A_TYPES__IConceptConstructor } from "./A_Concept.types";
2
2
  import { A_Container } from "../A-Container/A-Container.class";
3
3
  import { A_Abstraction_Extend } from "../../decorators/A-Abstraction/A-Abstraction-Extend.decorator";
4
+ import { A_Scope } from "../A-Scope/A-Scope.class";
4
5
  /**
5
6
  * A_Concept is a placeholder for the concept of the ani program.
6
7
  *
@@ -53,41 +54,41 @@ export declare class A_Concept<_Imports extends A_Container[] = any> {
53
54
  protected containers: A_Container[];
54
55
  constructor(props: A_TYPES__IConceptConstructor<_Imports>);
55
56
  get namespace(): string;
56
- get Scope(): import("../A-Scope/A-Scope.class").A_Scope;
57
+ get Scope(): A_Scope;
57
58
  /**
58
59
  * Load the concept.
59
60
  */
60
- load(params?: Partial<A_TYPES__ConceptAbstractionCallParams>): Promise<void>;
61
+ load(scope?: A_Scope): Promise<void>;
61
62
  /**
62
63
  * Run the concept.
63
64
  */
64
- run(params?: Partial<A_TYPES__ConceptAbstractionCallParams>): Promise<void>;
65
+ run(scope?: A_Scope): Promise<void>;
65
66
  /**
66
67
  * Start the concept.
67
68
  *
68
69
  * @param params
69
70
  */
70
- start(params?: Partial<A_TYPES__ConceptAbstractionCallParams>): Promise<void>;
71
+ start(scope?: A_Scope): Promise<void>;
71
72
  /**
72
73
  * Stop the concept.
73
74
  *
74
75
  * @param params
75
76
  */
76
- stop(params?: Partial<A_TYPES__ConceptAbstractionCallParams>): Promise<void>;
77
+ stop(scope?: A_Scope): Promise<void>;
77
78
  /**
78
79
  * Build the concept.
79
80
  */
80
- build(params?: Partial<A_TYPES__ConceptAbstractionCallParams>): Promise<void>;
81
+ build(scope?: A_Scope): Promise<void>;
81
82
  /**
82
83
  * Deploy the concept.
83
84
  */
84
- deploy(params?: Partial<A_TYPES__ConceptAbstractionCallParams>): Promise<void>;
85
+ deploy(scope?: A_Scope): Promise<void>;
85
86
  /**
86
87
  * Publish the concept.
87
88
  */
88
- publish(params?: Partial<A_TYPES__ConceptAbstractionCallParams>): Promise<void>;
89
+ publish(scope?: A_Scope): Promise<void>;
89
90
  /**
90
91
  * Call the specific method of the concept or included modules.
91
92
  */
92
- call<K extends Record<_Imports[number]['name'], string>>(container: K[keyof K], params?: Partial<A_TYPES__ConceptAbstractionCallParams>): Promise<void>;
93
+ call<K extends Record<_Imports[number]['name'], string>>(container: K[keyof K]): Promise<void>;
93
94
  }
@@ -81,13 +81,12 @@ class A_Concept {
81
81
  constructor(props) {
82
82
  this.props = props;
83
83
  this.sharedBase = new A_Container_class_1.A_Container({
84
- name: props.name,
84
+ name: `${props.name}::base`,
85
85
  fragments: props.fragments || [],
86
86
  entities: props.entities || [],
87
- // containers: props.containers
88
87
  components: [
89
88
  // A_Logger,
90
- ]
89
+ ],
91
90
  });
92
91
  this.containers = (props.containers || []).map(container => {
93
92
  container.Scope.parent(this.Scope);
@@ -107,19 +106,20 @@ class A_Concept {
107
106
  /**
108
107
  * Load the concept.
109
108
  */
110
- load(params) {
109
+ load(scope) {
111
110
  return __awaiter(this, void 0, void 0, function* () {
112
- const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Load, params);
111
+ scope = scope ? scope.inherit(this.Scope) : this.Scope;
112
+ const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Load, scope);
113
113
  yield abstraction.process();
114
114
  });
115
115
  }
116
116
  /**
117
117
  * Run the concept.
118
118
  */
119
- run(params) {
119
+ run(scope) {
120
120
  return __awaiter(this, void 0, void 0, function* () {
121
- yield this.load(params);
122
- const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Run, params);
121
+ scope = scope ? scope.inherit(this.Scope) : this.Scope;
122
+ const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Run, scope);
123
123
  yield abstraction.process();
124
124
  });
125
125
  }
@@ -128,10 +128,10 @@ class A_Concept {
128
128
  *
129
129
  * @param params
130
130
  */
131
- start(params) {
131
+ start(scope) {
132
132
  return __awaiter(this, void 0, void 0, function* () {
133
- yield this.load(params);
134
- const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Start, params);
133
+ scope = scope ? scope.inherit(this.Scope) : this.Scope;
134
+ const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Start, scope);
135
135
  yield abstraction.process();
136
136
  });
137
137
  }
@@ -140,36 +140,40 @@ class A_Concept {
140
140
  *
141
141
  * @param params
142
142
  */
143
- stop(params) {
143
+ stop(scope) {
144
144
  return __awaiter(this, void 0, void 0, function* () {
145
- const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Stop, params);
145
+ scope = scope ? scope.inherit(this.Scope) : this.Scope;
146
+ const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Stop, scope);
146
147
  yield abstraction.process();
147
148
  });
148
149
  }
149
150
  /**
150
151
  * Build the concept.
151
152
  */
152
- build(params) {
153
+ build(scope) {
153
154
  return __awaiter(this, void 0, void 0, function* () {
154
- const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Build, params);
155
+ scope = scope ? scope.inherit(this.Scope) : this.Scope;
156
+ const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Build, scope);
155
157
  yield abstraction.process();
156
158
  });
157
159
  }
158
160
  /**
159
161
  * Deploy the concept.
160
162
  */
161
- deploy(params) {
163
+ deploy(scope) {
162
164
  return __awaiter(this, void 0, void 0, function* () {
163
- const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Deploy, params);
165
+ scope = scope ? scope.inherit(this.Scope) : this.Scope;
166
+ const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Deploy, scope);
164
167
  yield abstraction.process();
165
168
  });
166
169
  }
167
170
  /**
168
171
  * Publish the concept.
169
172
  */
170
- publish(params) {
173
+ publish(scope) {
171
174
  return __awaiter(this, void 0, void 0, function* () {
172
- const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Publish, params);
175
+ scope = scope ? scope.inherit(this.Scope) : this.Scope;
176
+ const abstraction = this.meta.abstraction(A_Concept_types_1.A_TYPES__ConceptStage.Publish, scope);
173
177
  yield abstraction.process();
174
178
  });
175
179
  }
@@ -179,7 +183,7 @@ class A_Concept {
179
183
  /**
180
184
  * Call the specific method of the concept or included modules.
181
185
  */
182
- call(container, params) {
186
+ call(container) {
183
187
  return __awaiter(this, void 0, void 0, function* () {
184
188
  // const definition = this.meta.abstractionDefinition(A_TYPES__ConceptStage.Run, {
185
189
  // components: params?.components,
@@ -1 +1 @@
1
- {"version":3,"file":"A_Concept.class.js","sourceRoot":"","sources":["../../../../src/global/A-Concept/A_Concept.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAgK;AAChK,wEAA+D;AAC/D,8EAAqE;AACrE,qDAAiD;AAIjD,wFAAwF;AAIxF;;;;;;;;;;;GAWG;AACH,MAAa,SAAS;IAIlB,iFAAiF;IACjF,iFAAiF;IACjF,iFAAiF;IACjF;;OAEG;IACH,MAAM,CAAC,IAAI;QACP,OAAO,mCAAa,CAAC,MAAM,CAAC,uCAAqB,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,OAAO;QACV,OAAO,mCAAa,CAAC,MAAM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MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,uCAAqB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAEhF,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;QAChC,CAAC;KAAA;IAGD,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAG1E;;OAEG;IACG,IAAI,CAGN,SAAqB;;YAErB,kFAAkF;YAClF,sCAAsC;YACtC,oCAAoC;YACpC,MAAM;YAEN,6CAA6C;YAE7C,2BAA2B;QAC/B,CAAC;KAAA;CAEJ;AA5OD,8BA4OC"}
@@ -1,13 +1,13 @@
1
1
  import { A_Container } from "../A-Container/A-Container.class";
2
2
  import { A_Meta } from "../A-Meta/A-Meta.class";
3
- import { A_TYPES__Required } from "@adaas/a-utils";
4
- import { A_TYPES__ConceptAbstractionCallParams, A_TYPES__ConceptStage } from "./A_Concept.types";
3
+ import { A_TYPES__ConceptStage } from "./A_Concept.types";
5
4
  import { A_TYPES__A_AbstractionConstructor } from "../A-Abstraction/A-Abstraction.types";
6
5
  import { A_Abstraction } from "../A-Abstraction/A-Abstraction.class";
6
+ import { A_Scope } from "../A-Scope/A-Scope.class";
7
7
  export declare class A_ConceptMeta extends A_Meta<any> {
8
8
  private containers;
9
9
  private base;
10
10
  constructor(containers: Array<A_Container>, base: A_Container);
11
- abstractionDefinition(method: A_TYPES__ConceptStage, params?: Partial<A_TYPES__ConceptAbstractionCallParams>): A_TYPES__Required<Partial<A_TYPES__A_AbstractionConstructor>, ['features']>;
12
- abstraction(method: A_TYPES__ConceptStage, params?: Partial<A_TYPES__ConceptAbstractionCallParams>): A_Abstraction;
11
+ abstractionDefinition(method: A_TYPES__ConceptStage, scope: A_Scope): A_TYPES__A_AbstractionConstructor;
12
+ abstraction(method: A_TYPES__ConceptStage, scope: A_Scope): A_Abstraction;
13
13
  }
@@ -11,17 +11,25 @@ class A_ConceptMeta extends A_Meta_class_1.A_Meta {
11
11
  this.containers = containers;
12
12
  this.base = base;
13
13
  }
14
- abstractionDefinition(method, params) {
15
- const featureDefinitions = this.containers.map(container => A_Context_class_1.A_Context.abstractionDefinition(container.Scope, container, method, params));
16
- const definition = Object.assign(Object.assign({}, params), { name: `${this.base.name}.${method}`, features: featureDefinitions, parent: this.base.Scope, components: (params === null || params === void 0 ? void 0 : params.components) || [], fragments: (params === null || params === void 0 ? void 0 : params.fragments) || [] });
14
+ abstractionDefinition(method, scope) {
15
+ const featureDefinitions = this.containers.map(container => A_Context_class_1.A_Context.abstractionDefinition(container, method, scope));
16
+ const definition = {
17
+ name: `${this.base.name}.${method}`,
18
+ features: featureDefinitions,
19
+ scope
20
+ };
17
21
  return definition;
18
22
  }
19
- abstraction(method, params) {
23
+ abstraction(method, scope) {
20
24
  const featureDefinitions = this.containers.map(container => {
21
- const definition = A_Context_class_1.A_Context.abstractionDefinition(container.Scope, container, method, params);
25
+ const definition = A_Context_class_1.A_Context.abstractionDefinition(container, method, container.Scope);
22
26
  return Object.assign(Object.assign({}, definition), { steps: definition.steps.map(step => (Object.assign(Object.assign({}, step), { component: step.component ? step.component : container }))) });
23
27
  });
24
- const definition = Object.assign(Object.assign({}, params), { name: `${this.base.name}.${method}`, features: featureDefinitions, parent: this.base.Scope, components: (params === null || params === void 0 ? void 0 : params.components) || [], fragments: (params === null || params === void 0 ? void 0 : params.fragments) || [] });
28
+ const definition = {
29
+ name: `${this.base.name}.${method}`,
30
+ features: featureDefinitions,
31
+ scope
32
+ };
25
33
  return new A_Abstraction_class_1.A_Abstraction(definition);
26
34
  }
27
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"A_Concept.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Concept/A_Concept.meta.ts"],"names":[],"mappings":";;;AAEA,yDAAgD;AAKhD,uFAA8E;AAG9E,8EAAqE;AACrE,gEAAgE;AAGhE,MAAa,aAAc,SAAQ,qBAAW;IAG1C,YACY,UAA8B,EAC9B,IAAiB;QAEzB,KAAK,EAAE,CAAC;QAHA,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CAAC,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;YAEvF,uCACO,UAAU,KACb,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,iCAAM,IAAI,KAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IAAG,CAAC,IAC7G;QACL,CAAC,CAAC,CAAC;QAGH,MAAM,UAAU,GAAG;YACf,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,MAAM,EAAE;YACnC,QAAQ,EAAE,kBAAkB;YAC5B,KAAK;SACR,CAAC;QAEF,OAAO,IAAI,mCAAa,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;CAEJ;AAtDD,sCAsDC"}
@@ -1,7 +1,6 @@
1
1
  import { A_TYPES__ContainerConstructor } from "./A-Container.types";
2
- import { A_TYPES__Required } from "@adaas/a-utils";
3
2
  import { A_Scope } from "../A-Scope/A-Scope.class";
4
- import { A_TYPES__FeatureCallParams, A_TYPES__FeatureConstructor } from "../A-Feature/A-Feature.types";
3
+ import { A_TYPES__FeatureConstructor } from "../A-Feature/A-Feature.types";
5
4
  /**
6
5
  * This class should combine Components to achieve the goal withing Concept
7
6
  *
@@ -26,13 +25,13 @@ export declare class A_Container {
26
25
  * Configuration of the container that will be used to run it.
27
26
  */
28
27
  config: Partial<A_TYPES__ContainerConstructor<any>>);
29
- call(feature: string, params?: Partial<A_TYPES__FeatureCallParams>): Promise<any>;
28
+ call(feature: string, scope?: A_Scope): Promise<any>;
30
29
  /**
31
30
  * This method allows to get a feature Definition for the future reuse with custom Feature classes
32
31
  *
33
32
  * @param feature
34
33
  */
35
- feature(feature: string, params?: Partial<A_TYPES__FeatureCallParams>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
34
+ feature(feature: string, scope?: A_Scope): A_TYPES__FeatureConstructor;
36
35
  /**
37
36
  * Before init hook to be used in inherited classes
38
37
  *
@@ -35,13 +35,12 @@ class A_Container {
35
35
  */
36
36
  config) {
37
37
  this.config = config;
38
- const components = config.components || [];
39
- const fragments = config.fragments || [];
40
- A_Context_class_1.A_Context.allocate(this, config);
38
+ A_Context_class_1.A_Context.allocate(this, Object.assign({ name: this.name }, config));
41
39
  }
42
- call(feature_1) {
43
- return __awaiter(this, arguments, void 0, function* (feature, params = {}) {
44
- const newFeature = A_Context_class_1.A_Context.feature(this.Scope, this, feature, params);
40
+ call(feature, scope) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ scope = scope ? scope.inherit(this.Scope) : this.Scope;
43
+ const newFeature = A_Context_class_1.A_Context.feature(this, feature, scope);
45
44
  return yield newFeature.process();
46
45
  });
47
46
  }
@@ -50,8 +49,9 @@ class A_Container {
50
49
  *
51
50
  * @param feature
52
51
  */
53
- feature(feature, params = {}) {
54
- return A_Context_class_1.A_Context.featureDefinition(this.Scope, this, feature, params);
52
+ feature(feature, scope) {
53
+ scope = scope ? scope.inherit(this.Scope) : this.Scope;
54
+ return A_Context_class_1.A_Context.featureDefinition(this, feature, scope);
55
55
  }
56
56
  // ==============================================================
57
57
  // ======================= HOOKS ================================
@@ -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;IAUpB,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,MAAmD;QAEnD,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,EAAE,MAAM,CAAC,CAAC;IAGrC,CAAC;IAGK,IAAI;6DACN,OAAe,EACf,SAA8C,EAAE;YAEhD,MAAM,UAAU,GAAG,2BAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAExE,OAAO,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;QACtC,CAAC;KAAA;IAGD;;;;OAIG;IACH,OAAO,CACH,OAAe,EACf,SAA8C,EAAE;QAGhD,OAAO,2BAAS,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1E,CAAC;IAGD,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;AAzFD,kCAyFC"}
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;IAUpB,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,MAAmD;QAEnD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,2BAAS,CAAC,QAAQ,CAAC,IAAI,kBACnB,IAAI,EAAE,IAAI,CAAC,IAAI,IACZ,MAAM,EACX,CAAC;IACP,CAAC;IAGK,IAAI,CACN,OAAe,EACf,KAAe;;YAEf,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;YAEvD,MAAM,UAAU,GAAG,2BAAS,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;YAE3D,OAAO,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;QACtC,CAAC;KAAA;IAGD;;;;OAIG;IACH,OAAO,CACH,OAAe,EACf,KAAe;QAGf,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QAEvD,OAAO,2BAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7D,CAAC;IAGD,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;AA3FD,kCA2FC"}
@@ -1,4 +1,3 @@
1
- import { A_TYPES__Required } from "@adaas/a-utils";
2
1
  import { A_Component } from "../A-Component/A-Component.class";
3
2
  import { A_Fragment } from "../A-Fragment/A-Fragment.class";
4
3
  import { A_Feature } from "../A-Feature/A-Feature.class";
@@ -55,8 +54,11 @@ export declare class A_Context {
55
54
  static get root(): A_Scope;
56
55
  static get environment(): 'server' | 'browser';
57
56
  static allocate(component: any, importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>): A_Scope;
57
+ static allocate(component: any, importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig> | A_Scope): A_Scope;
58
58
  static allocate(feature: A_Feature, importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>): A_Scope;
59
+ static allocate(feature: A_Feature, importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig> | A_Scope): A_Scope;
59
60
  static allocate(container: A_Container, importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>): A_Scope;
61
+ static allocate(container: A_Container, importing: A_Scope): A_Scope;
60
62
  static meta(container: typeof A_Container): A_ContainerMeta;
61
63
  static meta(container: A_Container): A_ContainerMeta;
62
64
  static meta(entity: A_Entity): A_ContainerMeta;
@@ -84,27 +86,23 @@ export declare class A_Context {
84
86
  * @param scope
85
87
  * @returns
86
88
  */
87
- static featureDefinition(scope: A_Scope, entity: A_Entity, feature: A_TYPES__EntityBaseMethod | string | RegExp, params?: Partial<A_TYPES__ScopeConstructor>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
88
- static featureDefinition(scope: A_Scope, container: A_Container, feature: string, params?: Partial<A_TYPES__ScopeConstructor>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
89
- static featureDefinition(scope: A_Scope, component: A_Component, feature: string, params?: Partial<A_TYPES__ScopeConstructor>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
89
+ static featureDefinition(component: A_Component | A_Container | A_Entity, feature: string | RegExp, scope: A_Scope): A_TYPES__FeatureConstructor;
90
90
  /**
91
91
  * This method returns a constructor params to create a new feature
92
92
  *
93
93
  * @param scope
94
94
  * @returns
95
95
  */
96
- static abstractionDefinition(scope: A_Scope, entity: A_Entity, feature: A_TYPES__ConceptStage, params?: Partial<A_TYPES__ScopeConstructor>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
97
- static abstractionDefinition(scope: A_Scope, container: A_Container, feature: A_TYPES__ConceptStage, params?: Partial<A_TYPES__ScopeConstructor>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
98
- static abstractionDefinition(scope: A_Scope, component: A_Component, feature: A_TYPES__ConceptStage, params?: Partial<A_TYPES__ScopeConstructor>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
96
+ static abstractionDefinition(component: A_Component | A_Container | A_Entity, abstraction: A_TYPES__ConceptStage, scope: A_Scope): A_TYPES__FeatureConstructor;
99
97
  /**
100
98
  * This method returns a step-by-step instructions of feature implementation depending on the feature name and the class.
101
99
  *
102
100
  * @param scope
103
101
  * @returns
104
102
  */
105
- static feature<T extends Array<string>>(scope: A_Scope, entity: A_Entity<any, any>, feature: A_TYPES__EntityBaseMethod | string | T[number] | RegExp, params?: Partial<A_TYPES__ScopeConstructor>): A_Feature;
106
- static feature<T extends Array<string>>(scope: A_Scope, container: A_Container, feature: T[number], params?: Partial<A_TYPES__ScopeConstructor>): A_Feature;
107
- static feature(scope: A_Scope, component: A_Component, feature: string, params?: Partial<A_TYPES__ScopeConstructor>): A_Feature;
103
+ static feature<T extends Array<string>>(entity: A_Entity<any, any>, feature: A_TYPES__EntityBaseMethod | string | T[number] | RegExp, scope: A_Scope): A_Feature;
104
+ static feature<T extends Array<string>>(container: A_Container, feature: T[number], scope: A_Scope): A_Feature;
105
+ static feature(component: A_Component, feature: string, scope: A_Scope): A_Feature;
108
106
  /**
109
107
  * Register a Namespace in the provider.
110
108
  * @param Namespace