@adaas/a-concept 0.0.29 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/examples/fe-be/channels/Test.channel.d.ts +6 -0
  2. package/dist/examples/fe-be/channels/Test.channel.js +14 -0
  3. package/dist/examples/fe-be/channels/Test.channel.js.map +1 -0
  4. package/dist/examples/fe-be/components/BE-Controller.component.d.ts +4 -0
  5. package/dist/examples/fe-be/components/BE-Controller.component.js +24 -0
  6. package/dist/examples/fe-be/components/BE-Controller.component.js.map +1 -0
  7. package/dist/examples/fe-be/components/FE.component.d.ts +4 -0
  8. package/dist/examples/fe-be/components/FE.component.js +31 -0
  9. package/dist/examples/fe-be/components/FE.component.js.map +1 -0
  10. package/dist/examples/fe-be/components/UserActions.component.d.ts +5 -0
  11. package/dist/examples/fe-be/components/UserActions.component.js +25 -0
  12. package/dist/examples/fe-be/components/UserActions.component.js.map +1 -0
  13. package/dist/examples/fe-be/concept.d.ts +0 -0
  14. package/dist/examples/fe-be/concept.js +2 -0
  15. package/dist/examples/fe-be/concept.js.map +1 -0
  16. package/dist/examples/fe-be/containers/ServerApp.container.d.ts +3 -0
  17. package/dist/examples/fe-be/containers/ServerApp.container.js +8 -0
  18. package/dist/examples/fe-be/containers/ServerApp.container.js.map +1 -0
  19. package/dist/examples/fe-be/containers/WebApp.container.d.ts +3 -0
  20. package/dist/examples/fe-be/containers/WebApp.container.js +8 -0
  21. package/dist/examples/fe-be/containers/WebApp.container.js.map +1 -0
  22. package/dist/examples/multi-container/channels/Direct.channel.d.ts +9 -0
  23. package/dist/examples/multi-container/channels/Direct.channel.js +32 -0
  24. package/dist/examples/multi-container/channels/Direct.channel.js.map +1 -0
  25. package/dist/examples/multi-container/concept.d.ts +0 -0
  26. package/dist/examples/multi-container/concept.js +2 -0
  27. package/dist/examples/multi-container/concept.js.map +1 -0
  28. package/dist/examples/multi-container/containers/Command.container.d.ts +11 -0
  29. package/dist/examples/multi-container/containers/Command.container.js +51 -0
  30. package/dist/examples/multi-container/containers/Command.container.js.map +1 -0
  31. package/dist/examples/multi-container/containers/Schedule.container.d.ts +15 -0
  32. package/dist/examples/multi-container/containers/Schedule.container.js +67 -0
  33. package/dist/examples/multi-container/containers/Schedule.container.js.map +1 -0
  34. package/dist/examples/simple/components/A.component.js.map +1 -1
  35. package/dist/examples/simple/containers/Main.container.js +7 -3
  36. package/dist/examples/simple/containers/Main.container.js.map +1 -1
  37. package/dist/examples/simple/entities/EntityA.entity.d.ts +8 -0
  38. package/dist/examples/simple/entities/EntityA.entity.js +22 -0
  39. package/dist/examples/simple/entities/EntityA.entity.js.map +1 -0
  40. package/dist/examples/simple-http-server/contexts/http-request.context.d.ts +0 -1
  41. package/dist/examples/simple-http-server/contexts/http-request.context.js +6 -8
  42. package/dist/examples/simple-http-server/contexts/http-request.context.js.map +1 -1
  43. package/dist/index.d.ts +8 -2
  44. package/dist/index.js +16 -7
  45. package/dist/index.js.map +1 -1
  46. package/dist/src/base/A-Errors/A-Error.entity.d.ts +3 -0
  47. package/dist/src/base/A-Errors/A-Error.entity.js +8 -0
  48. package/dist/src/base/A-Errors/A-Error.entity.js.map +1 -0
  49. package/dist/src/base/A-Errors/A-Errors.context.js +1 -1
  50. package/dist/src/base/A-Errors/A-Errors.context.js.map +1 -1
  51. package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.d.ts +14 -0
  52. package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.js +53 -0
  53. package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.js.map +1 -0
  54. package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.types.d.ts +2 -0
  55. package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.types.js +3 -0
  56. package/dist/src/decorators/A-Abstraction/A-Abstraction.decorator.types.js.map +1 -0
  57. package/dist/src/decorators/A-Connect/A-Connect.decorator.d.ts +19 -0
  58. package/dist/src/decorators/A-Connect/A-Connect.decorator.js +31 -0
  59. package/dist/src/decorators/A-Connect/A-Connect.decorator.js.map +1 -0
  60. package/dist/src/decorators/A-Connect/A-Connect.decorator.types.d.ts +1 -0
  61. package/dist/src/decorators/A-Connect/A-Connect.decorator.types.js +3 -0
  62. package/dist/src/decorators/A-Connect/A-Connect.decorator.types.js.map +1 -0
  63. package/dist/src/decorators/A-Entity/A-Entity-List.decorator.d.ts +1 -0
  64. package/dist/src/decorators/A-Entity/A-Entity-List.decorator.js +8 -0
  65. package/dist/src/decorators/A-Entity/A-Entity-List.decorator.js.map +1 -0
  66. package/dist/src/decorators/A-Entity/A-Entity.decorator.types.d.ts +14 -0
  67. package/dist/src/decorators/A-Entity/A-Entity.decorator.types.js +3 -0
  68. package/dist/src/decorators/A-Entity/A-Entity.decorator.types.js.map +1 -0
  69. package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js +7 -5
  70. package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js.map +1 -1
  71. package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.js +9 -0
  72. package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.js.map +1 -1
  73. package/dist/src/decorators/A-Feature/A-Feature.decorator.types.d.ts +36 -0
  74. package/dist/src/decorators/A-Inject/A-Inject.decorator.d.ts +2 -3
  75. package/dist/src/decorators/A-Inject/A-Inject.decorator.js.map +1 -1
  76. package/dist/src/decorators/A-Inject/A-Inject.decorator.types.d.ts +44 -0
  77. package/dist/src/global/A-Channel/A-Channel.class.d.ts +8 -10
  78. package/dist/src/global/A-Channel/A-Channel.class.js +12 -26
  79. package/dist/src/global/A-Channel/A-Channel.class.js.map +1 -1
  80. package/dist/src/global/A-Channel/A-Channel.types.d.ts +32 -0
  81. package/dist/src/global/A-Component/A-Component.class.d.ts +2 -1
  82. package/dist/src/global/A-Component/A-Component.class.js +1 -0
  83. package/dist/src/global/A-Component/A-Component.class.js.map +1 -1
  84. package/dist/src/global/A-Component/A-Component.meta.d.ts +16 -0
  85. package/dist/src/global/A-Component/A-Component.meta.js +37 -3
  86. package/dist/src/global/A-Component/A-Component.meta.js.map +1 -1
  87. package/dist/src/global/A-Component/A-Component.types.d.ts +26 -38
  88. package/dist/src/global/A-Component/A-Component.types.js +1 -7
  89. package/dist/src/global/A-Component/A-Component.types.js.map +1 -1
  90. package/dist/src/global/A-Concept/A_Concept.class.d.ts +7 -7
  91. package/dist/src/global/A-Concept/A_Concept.class.js +30 -30
  92. package/dist/src/global/A-Concept/A_Concept.class.js.map +1 -1
  93. package/dist/src/global/A-Concept/A_Concept.types.d.ts +42 -2
  94. package/dist/src/global/A-Concept/A_Concept.types.js.map +1 -1
  95. package/dist/src/global/A-Container/A-Container.class.d.ts +1 -8
  96. package/dist/src/global/A-Container/A-Container.class.js +1 -31
  97. package/dist/src/global/A-Container/A-Container.class.js.map +1 -1
  98. package/dist/src/global/A-Container/A-Container.meta.d.ts +8 -0
  99. package/dist/src/global/A-Container/A-Container.meta.js +29 -0
  100. package/dist/src/global/A-Container/A-Container.meta.js.map +1 -1
  101. package/dist/src/global/A-Container/A-Container.types.d.ts +32 -8
  102. package/dist/src/global/A-Container/A-Container.types.js +2 -1
  103. package/dist/src/global/A-Container/A-Container.types.js.map +1 -1
  104. package/dist/src/global/A-Context/A-Context.class.js +29 -36
  105. package/dist/src/global/A-Context/A-Context.class.js.map +1 -1
  106. package/dist/src/global/A-Entity/A-Entity.class.d.ts +1 -2
  107. package/dist/src/global/A-Entity/A-Entity.class.js +6 -7
  108. package/dist/src/global/A-Entity/A-Entity.class.js.map +1 -1
  109. package/dist/src/global/A-Entity/A-Entity.types.d.ts +12 -6
  110. package/dist/src/global/A-Entity/A-Entity.types.js.map +1 -1
  111. package/dist/src/global/A-Feature/A-Feature.class.d.ts +30 -6
  112. package/dist/src/global/A-Feature/A-Feature.class.js +49 -40
  113. package/dist/src/global/A-Feature/A-Feature.class.js.map +1 -1
  114. package/dist/src/global/A-Feature/A-Feature.types.d.ts +2 -24
  115. package/dist/src/global/A-Feature/A-Feature.types.js +21 -0
  116. package/dist/src/global/A-Feature/A-Feature.types.js.map +1 -1
  117. package/dist/src/global/A-Fragment/A-Fragment.class.d.ts +8 -0
  118. package/dist/src/global/A-Fragment/A-Fragment.class.js +10 -0
  119. package/dist/src/global/A-Fragment/A-Fragment.class.js.map +1 -1
  120. package/dist/src/global/A-Scope/A-Scope.class.d.ts +7 -5
  121. package/dist/src/global/A-Scope/A-Scope.class.js +33 -10
  122. package/dist/src/global/A-Scope/A-Scope.class.js.map +1 -1
  123. package/dist/src/global/A-Scope/A-Scope.types.d.ts +2 -1
  124. package/dist/src/global/A-Stage/A-Stage.class.d.ts +69 -0
  125. package/dist/src/global/A-Stage/A-Stage.class.js +181 -0
  126. package/dist/src/global/A-Stage/A-Stage.class.js.map +1 -0
  127. package/dist/src/global/A-Stage/A-Stage.types.d.ts +78 -0
  128. package/dist/src/global/A-Stage/A-Stage.types.js +59 -0
  129. package/dist/src/global/A-Stage/A-Stage.types.js.map +1 -0
  130. package/dist/src/helpers/StepsManager.class.d.ts +15 -0
  131. package/dist/src/helpers/StepsManager.class.js +85 -0
  132. package/dist/src/helpers/StepsManager.class.js.map +1 -0
  133. package/examples/fe-be/channels/Test.channel.ts +24 -0
  134. package/examples/fe-be/components/BE-Controller.component.ts +20 -0
  135. package/examples/fe-be/components/FE.component.ts +13 -0
  136. package/examples/fe-be/concept.ts +0 -0
  137. package/examples/fe-be/containers/ServerApp.container.ts +8 -0
  138. package/examples/fe-be/containers/WebApp.container.ts +13 -0
  139. package/examples/multi-container/channels/Direct.channel.ts +39 -0
  140. package/examples/multi-container/concept.ts +0 -0
  141. package/examples/multi-container/containers/Command.container.ts +41 -0
  142. package/examples/multi-container/containers/Schedule.container.ts +57 -0
  143. package/examples/simple/components/A.component.ts +2 -1
  144. package/examples/simple/containers/Main.container.ts +11 -3
  145. package/examples/simple/entities/EntityA.entity.ts +16 -0
  146. package/examples/simple-http-server/contexts/http-request.context.ts +6 -6
  147. package/index.ts +12 -3
  148. package/package.json +1 -1
  149. package/src/base/A-Errors/A-Error.entity.ts +10 -0
  150. package/src/base/A-Errors/A-Errors.context.ts +2 -2
  151. package/src/decorators/A-Abstraction/A-Abstraction.decorator.ts +82 -0
  152. package/src/decorators/{A-Stage/A-Stage.decorator.types.ts → A-Abstraction/A-Abstraction.decorator.types.ts} +1 -3
  153. package/src/decorators/A-Connect/A-Connect.decorator.ts +71 -0
  154. package/src/decorators/A-Connect/A-Connect.decorator.types.ts +6 -0
  155. package/src/decorators/A-Entity/A-Entity-List.decorator.ts +12 -0
  156. package/src/decorators/A-Entity/A-Entity.decorator.types.ts +18 -0
  157. package/src/decorators/A-Feature/A-Feature-Define.decorator.ts +16 -9
  158. package/src/decorators/A-Feature/A-Feature-Extend.decorator.ts +10 -2
  159. package/src/decorators/A-Feature/A-Feature.decorator.types.ts +46 -0
  160. package/src/decorators/A-Inject/A-Inject.decorator.ts +7 -7
  161. package/src/decorators/A-Inject/A-Inject.decorator.types.ts +47 -1
  162. package/src/global/A-Channel/A-Channel.class.ts +25 -28
  163. package/src/global/A-Channel/A-Channel.types.ts +53 -0
  164. package/src/global/A-Component/A-Component.class.ts +10 -2
  165. package/src/global/A-Component/A-Component.meta.ts +59 -6
  166. package/src/global/A-Component/A-Component.types.ts +28 -45
  167. package/src/global/A-Concept/A_Concept.class.ts +52 -31
  168. package/src/global/A-Concept/A_Concept.types.ts +48 -3
  169. package/src/global/A-Container/A-Container.class.ts +3 -39
  170. package/src/global/A-Container/A-Container.meta.ts +41 -4
  171. package/src/global/A-Container/A-Container.types.ts +36 -8
  172. package/src/global/A-Context/A-Context.class.ts +37 -50
  173. package/src/global/A-Entity/A-Entity.class.ts +8 -6
  174. package/src/global/A-Entity/A-Entity.types.ts +13 -6
  175. package/src/global/A-Feature/A-Feature.class.ts +73 -61
  176. package/src/global/A-Feature/A-Feature.types.ts +24 -23
  177. package/src/global/A-Fragment/A-Fragment.class.ts +15 -0
  178. package/src/global/A-Scope/A-Scope.class.ts +58 -25
  179. package/src/global/A-Scope/A-Scope.types.ts +2 -1
  180. package/src/global/A-Stage/A-Stage.class.ts +234 -0
  181. package/src/global/A-Stage/A-Stage.types.ts +101 -0
  182. package/src/helpers/StepsManager.class.ts +104 -0
  183. package/tests/channel.ts +213 -0
  184. package/tests/log.ts +88 -40
  185. package/src/decorators/A-Stage/A-Stage.decorator.ts +0 -84
package/dist/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ // =================================================================================================
3
+ // ============================= Export Framework Components =======================================
4
+ // =================================================================================================
2
5
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
6
  if (k2 === undefined) k2 = k;
4
7
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -14,10 +17,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
17
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
18
  };
16
19
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.A_Errors = exports.A_ErrorsManager = exports.FileConfigReader = exports.ENVConfigReader = exports.ConfigReader = exports.A_Config = exports.A_ConfigLoader = exports.A_Stage = exports.A_Feature_Extend = exports.A_Feature_Define = exports.A_Inject = exports.A_Fragment = exports.A_Meta = exports.A_Scope = exports.A_Feature = exports.A_Entity = exports.A_ComponentMeta = exports.A_Component = exports.A_ContainerMeta = exports.A_Container = exports.A_ConceptMeta = exports.A_Concept = exports.A_Context = void 0;
18
- // =================================================================================================
19
- // ============================= Export Framework Components =======================================
20
- // =================================================================================================
20
+ exports.A_Errors = exports.A_ErrorsManager = exports.FileConfigReader = exports.ENVConfigReader = exports.ConfigReader = exports.A_Config = exports.A_ConfigLoader = exports.A_Connect = exports.A_Abstraction = exports.A_Feature_Extend = exports.A_Feature_Define = exports.A_Inject = exports.A_Fragment = exports.A_Meta = exports.A_Scope = exports.A_Stage = exports.A_Feature = exports.A_Channel = exports.A_Entity = exports.A_ComponentMeta = exports.A_Component = exports.A_ContainerMeta = exports.A_Container = exports.A_ConceptMeta = exports.A_Concept = exports.A_Context = void 0;
21
21
  // ---------------------- Major Components ----------------------
22
22
  var A_Context_class_1 = require("./src/global/A-Context/A-Context.class");
23
23
  Object.defineProperty(exports, "A_Context", { enumerable: true, get: function () { return A_Context_class_1.A_Context; } });
@@ -41,9 +41,15 @@ var A_Entity_class_1 = require("./src/global/A-Entity/A-Entity.class");
41
41
  Object.defineProperty(exports, "A_Entity", { enumerable: true, get: function () { return A_Entity_class_1.A_Entity; } });
42
42
  __exportStar(require("./src/global/A-Entity/A-Entity.types"), exports);
43
43
  // ---------------------- Common Components ----------------------
44
+ var A_Channel_class_1 = require("./src/global/A-Channel/A-Channel.class");
45
+ Object.defineProperty(exports, "A_Channel", { enumerable: true, get: function () { return A_Channel_class_1.A_Channel; } });
46
+ __exportStar(require("./src/global/A-Channel/A-Channel.types"), exports);
44
47
  var A_Feature_class_1 = require("./src/global/A-Feature/A-Feature.class");
45
48
  Object.defineProperty(exports, "A_Feature", { enumerable: true, get: function () { return A_Feature_class_1.A_Feature; } });
46
49
  __exportStar(require("./src/global/A-Feature/A-Feature.types"), exports);
50
+ var A_Stage_class_1 = require("./src/global/A-Stage/A-Stage.class");
51
+ Object.defineProperty(exports, "A_Stage", { enumerable: true, get: function () { return A_Stage_class_1.A_Stage; } });
52
+ __exportStar(require("./src/global/A-Stage/A-Stage.types"), exports);
47
53
  var A_Scope_class_1 = require("./src/global/A-Scope/A-Scope.class");
48
54
  Object.defineProperty(exports, "A_Scope", { enumerable: true, get: function () { return A_Scope_class_1.A_Scope; } });
49
55
  __exportStar(require("./src/global/A-Scope/A-Scope.types"), exports);
@@ -64,9 +70,12 @@ Object.defineProperty(exports, "A_Feature_Define", { enumerable: true, get: func
64
70
  var A_Feature_Extend_decorator_1 = require("./src/decorators/A-Feature/A-Feature-Extend.decorator");
65
71
  Object.defineProperty(exports, "A_Feature_Extend", { enumerable: true, get: function () { return A_Feature_Extend_decorator_1.A_Feature_Extend; } });
66
72
  __exportStar(require("./src/decorators/A-Feature/A-Feature.decorator.types"), exports);
67
- var A_Stage_decorator_1 = require("./src/decorators/A-Stage/A-Stage.decorator");
68
- Object.defineProperty(exports, "A_Stage", { enumerable: true, get: function () { return A_Stage_decorator_1.A_Stage; } });
69
- __exportStar(require("./src/decorators/A-Stage/A-Stage.decorator.types"), exports);
73
+ var A_Abstraction_decorator_1 = require("./src/decorators/A-Abstraction/A-Abstraction.decorator");
74
+ Object.defineProperty(exports, "A_Abstraction", { enumerable: true, get: function () { return A_Abstraction_decorator_1.A_Abstraction; } });
75
+ __exportStar(require("./src/decorators/A-Abstraction/A-Abstraction.decorator.types"), exports);
76
+ var A_Connect_decorator_1 = require("./src/decorators/A-Connect/A-Connect.decorator");
77
+ Object.defineProperty(exports, "A_Connect", { enumerable: true, get: function () { return A_Connect_decorator_1.A_Connect; } });
78
+ __exportStar(require("./src/decorators/A-Connect/A-Connect.decorator.types"), exports);
70
79
  // =================================================================================================
71
80
  // =============================== Export Base Entities ============================================
72
81
  // =================================================================================================
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,oGAAoG;AACpG,oGAAoG;AACpG,oGAAoG;AACpG,iEAAiE;AACjE,0EAAmE;AAA1D,4GAAA,SAAS,OAAA;AAClB,0DAA0D;AAE1D,0EAAmE;AAA1D,4GAAA,SAAS,OAAA;AAClB,wEAAsE;AAA7D,+GAAA,aAAa,OAAA;AACtB,yEAAuD;AAEvD,gFAAyE;AAAhE,gHAAA,WAAW,OAAA;AACpB,8EAA4E;AAAnE,mHAAA,eAAe,OAAA;AACxB,6EAA2D;AAE3D,gFAAyE;AAAhE,gHAAA,WAAW,OAAA;AACpB,8EAA4E;AAAnE,mHAAA,eAAe,OAAA;AACxB,6EAA2D;AAE3D,uEAAgE;AAAvD,0GAAA,QAAQ,OAAA;AACjB,u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AAAvD,4GAAA,QAAQ,OAAA;AACjB,qEAAmD"}
@@ -0,0 +1,3 @@
1
+ import { A_Entity } from "../../global/A-Entity/A-Entity.class";
2
+ export declare class A_Error extends A_Entity {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.A_Error = void 0;
4
+ const A_Entity_class_1 = require("../../global/A-Entity/A-Entity.class");
5
+ class A_Error extends A_Entity_class_1.A_Entity {
6
+ }
7
+ exports.A_Error = A_Error;
8
+ //# sourceMappingURL=A-Error.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Error.entity.js","sourceRoot":"","sources":["../../../../src/base/A-Errors/A-Error.entity.ts"],"names":[],"mappings":";;;AAAA,oFAA2E;AAI3E,MAAa,OAAQ,SAAQ,yBAAQ;CAKpC;AALD,0BAKC"}
@@ -8,10 +8,10 @@ class A_Errors extends A_Fragment_class_1.A_Fragment {
8
8
  constructor(params) {
9
9
  super(Object.assign(Object.assign({}, params), { name: params.name || 'a-errors' }));
10
10
  this.registeredErrors = new Map();
11
+ this.addRegistry(errors_constants_1.A_CONSTANTS__DEFAULT_ERRORS);
11
12
  if (params.errors) {
12
13
  this.addRegistry(params.errors);
13
14
  }
14
- this.addRegistry(errors_constants_1.A_CONSTANTS__DEFAULT_ERRORS);
15
15
  }
16
16
  /**
17
17
  * This method adds a dictionary of errors to the registry.
@@ -1 +1 @@
1
- {"version":3,"file":"A-Errors.context.js","sourceRoot":"","sources":["../../../../src/base/A-Errors/A-Errors.context.ts"],"names":[],"mappings":";;;AAAA,4CAA6I;AAE7I,yFAAiG;AACjG,0FAAiF;AAGjF,MAAa,QAAS,SAAQ,6BAAU;IAIpC,YACI,MAA6C;QAG7C,KAAK,iCACE,MAAM,KACT,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,UAAU,IACjC,CAAC;QATG,qBAAgB,GAAuD,IAAI,GAAG,EAAE,CAAC;QAWvF,IAAI,MAAM,CA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qBAAgB,GAAuD,IAAI,GAAG,EAAE,CAAC;QAWvF,IAAI,CAAC,WAAW,CAAC,8CAA2B,CAAC,CAAC;QAE9C,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACpC,CAAC;IACL,CAAC;IAGD;;;;OAIG;IACH,WAAW,CACP,QAAgE;QAEhE,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAE5E,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;QAE/C,OAAO,IAAI,CAAC;IAChB,CAAC;IAGD;;;;;OAKG;IACH,aAAa,CAAC,KAAqB;QAC/B,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAE7C,OAAO,IAAI,CAAC;IAChB,CAAC;IAGD;;;;;OAKG;IACH,GAAG,CAAC,IAAuC;QACvC,IAAI,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAE/C,IAAI,CAAC,QAAQ;YACT,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,kCAAwB,CAAC,gBAAgB,CAAE,CAAC;QAErF,OAAO,QAAQ,CAAC;IACpB,CAAC;CAmBJ;AAlFD,4BAkFC"}
@@ -0,0 +1,14 @@
1
+ import { A_Component } from "../../global/A-Component/A-Component.class";
2
+ import { A_TYPES__A_AbstractionDecoratorDescriptor } from "./A-Abstraction.decorator.types";
3
+ import { A_Container } from "../../global/A-Container/A-Container.class";
4
+ import { A_TYPES__ConceptStage } from "../../global/A-Concept/A_Concept.types";
5
+ import { A_TYPES__A_ExtendDecoratorConfig } from "../A-Feature/A-Feature.decorator.types";
6
+ /**
7
+ * A_Stage Decorator uses to extend basic A-Concept Stage methods inside Containers.
8
+ *
9
+ * Using this decorator you can define extend a logic and sequence of the Container Stage methods execution.
10
+ *
11
+ * @param params
12
+ * @returns
13
+ */
14
+ export declare function A_Abstraction(method: A_TYPES__ConceptStage, config?: Partial<A_TYPES__A_ExtendDecoratorConfig>): (target: A_Container<any> | A_Component, propertyKey: string, descriptor: A_TYPES__A_AbstractionDecoratorDescriptor) => void;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.A_Abstraction = A_Abstraction;
4
+ const A_Component_class_1 = require("../../global/A-Component/A-Component.class");
5
+ const A_Component_types_1 = require("../../global/A-Component/A-Component.types");
6
+ const A_Context_class_1 = require("../../global/A-Context/A-Context.class");
7
+ const A_Container_class_1 = require("../../global/A-Container/A-Container.class");
8
+ const A_Container_types_1 = require("../../global/A-Container/A-Container.types");
9
+ const A_Meta_class_1 = require("../../global/A-Meta/A-Meta.class");
10
+ /**
11
+ * A_Stage Decorator uses to extend basic A-Concept Stage methods inside Containers.
12
+ *
13
+ * Using this decorator you can define extend a logic and sequence of the Container Stage methods execution.
14
+ *
15
+ * @param params
16
+ * @returns
17
+ */
18
+ function A_Abstraction(method, config = {}) {
19
+ return function (target, propertyKey, descriptor) {
20
+ const meta = A_Context_class_1.A_Context.meta(target);
21
+ let metaKey;
22
+ const StageKey = `CONCEPT_ABSTRACTION::${method}`;
23
+ switch (true) {
24
+ case target instanceof A_Container_class_1.A_Container:
25
+ metaKey = A_Container_types_1.A_TYPES__ContainerMetaKey.ABSTRACTIONS;
26
+ break;
27
+ case target instanceof A_Component_class_1.A_Component:
28
+ metaKey = A_Component_types_1.A_TYPES__ComponentMetaKey.ABSTRACTIONS;
29
+ break;
30
+ default:
31
+ throw new Error(`Concept Stage cannot be defined on the ${target} level`);
32
+ }
33
+ // Get the existed metadata or create a new one
34
+ const existedMeta = meta.get(metaKey) || new A_Meta_class_1.A_Meta();
35
+ // Set the metadata of the method to define a custom Stage with name
36
+ const existedMetaValue = existedMeta.get(StageKey) || [];
37
+ // Add the new method to the metadata
38
+ existedMetaValue.push({
39
+ name: method,
40
+ handler: propertyKey,
41
+ before: config.before || [],
42
+ after: config.after || [],
43
+ behavior: config.behavior || 'sync'
44
+ });
45
+ // Set the metadata of the method to define a custom Feature with name
46
+ existedMeta.set(StageKey, existedMetaValue);
47
+ // Update the metadata of the container with the new Stage definition
48
+ A_Context_class_1.A_Context
49
+ .meta(target)
50
+ .set(metaKey, existedMeta);
51
+ };
52
+ }
53
+ //# sourceMappingURL=A-Abstraction.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Abstraction.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Abstraction/A-Abstraction.decorator.ts"],"names":[],"mappings":";;AAuBA,sCA0DC;AAjFD,6FAAoF;AAIpF,6FAAkG;AAClG,uFAA8E;AAC9E,6FAAoF;AACpF,6FAAkG;AAIlG,8EAAqE;AAIrE;;;;;;;GAOG;AACH,SAAgB,aAAa,CACzB,MAA6B,EAC7B,SAAoD,EAAE;IAEtD,OAAO,UACH,MAAsC,EACtC,WAAmB,EACnB,UAAqD;QAGrD,MAAM,IAAI,GAAsC,2BAAS,CAAC,IAAI,CAAC,MAAa,CAAC,CAAC;QAE9E,IAAI,OAAO,CAAC;QAEZ,MAAM,QAAQ,GAAG,wBAAwB,MAAM,EAAE,CAAC;QAElD,QAAQ,IAAI,EAAE,CAAC;YACX,KAAK,MAAM,YAAY,+BAAW;gBAC9B,OAAO,GAAG,6CAAyB,CAAC,YAAY,CAAA;gBAChD,MAAM;YACV,KAAK,MAAM,YAAY,+BAAW;gBAC9B,OAAO,GAAG,6CAAyB,CAAC,YAAY,CAAA;gBAChD,MAAM;YACV;gBACI,MAAM,IAAI,KAAK,CAAC,0CAA0C,MAAM,QAAQ,CAAC,CAAC;QAClF,CAAC;QAED,+CAA+C;QAC/C,MAAM,WAAW,GAEZ,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,qBAAM,EAAE,CAAC;QAEvC,oEAAoE;QACpE,MAAM,gBAAgB,GAAG,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAGzD,qCAAqC;QACrC,gBAAgB,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;YAC3B,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE;YACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,MAAM;SACtC,CAAC,CAAC;QAEH,sEAAsE;QACtE,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;QAG5C,sEAAsE;QACtE,2BAAS;aACJ,IAAI,CAAC,MAAa,CAAC;aACnB,GAAG,CACA,OAAO,EACP,WAAW,CACd,CAAC;IAEV,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type A_TYPES__A_AbstractionDecoratorDescriptor = TypedPropertyDescriptor<() => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<() => Promise<any>>;
2
+ export type A_TYPES__A_StageDecoratorConfig = {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=A-Abstraction.decorator.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Abstraction.decorator.types.js","sourceRoot":"","sources":["../../../../src/decorators/A-Abstraction/A-Abstraction.decorator.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import { A_Channel } from "../../global/A-Channel/A-Channel.class";
2
+ /**
3
+ * A_Connect decorators allows to establish a connection between the Containers.
4
+ *
5
+ * Depending on the A-Channel implementation the connection could be established in different ways like:
6
+ * - Direct connection (Async Module import)
7
+ * - Remote connection (HTTP, WebSockets)
8
+ * - Local connection (Shared Memory, IPC)
9
+ * - Event-based connection (EventEmitter, PubSub)
10
+ *
11
+ *
12
+ * @param params
13
+ * @returns
14
+ */
15
+ export declare function A_Connect(channel: typeof A_Channel,
16
+ /**
17
+ * Connection name
18
+ */
19
+ id: string): any;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.A_Connect = A_Connect;
4
+ const A_Context_class_1 = require("../../global/A-Context/A-Context.class");
5
+ function A_Connect(channel, config) {
6
+ return function (target, methodName, parameterIndex) {
7
+ const meta = A_Context_class_1.A_Context.meta(target);
8
+ let metaKey;
9
+ // // Get the existed metadata or create a new one
10
+ // const existedMeta: A_Meta<{
11
+ // [Key: string]: A_TYPES__ContainerMeta_StageExtension[];
12
+ // }> = meta.get(metaKey) || new A_Meta();
13
+ // // Set the metadata of the method to define a custom Stage with name
14
+ // const existedMetaValue = existedMeta.get(StageKey) || [];
15
+ // // Add the new method to the metadata
16
+ // existedMetaValue.push({
17
+ // name: method,
18
+ // handler: propertyKey,
19
+ // });
20
+ // // Set the metadata of the method to define a custom Feature with name
21
+ // existedMeta.set(StageKey, existedMetaValue);
22
+ // // Update the metadata of the container with the new Stage definition
23
+ // A_Context
24
+ // .meta(target as any)
25
+ // .set(
26
+ // metaKey,
27
+ // existedMeta
28
+ // );
29
+ };
30
+ }
31
+ //# sourceMappingURL=A-Connect.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Connect.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Connect/A-Connect.decorator.ts"],"names":[],"mappings":";;AA4BA,8BA0CC;AArED,uFAA8E;AA2B9E,SAAgB,SAAS,CACrB,OAAyB,EACzB,MAAqB;IAErB,OAAO,UACH,MAAsC,EACtC,UAAuC,EACvC,cAAsB;QAGtB,MAAM,IAAI,GAAsC,2BAAS,CAAC,IAAI,CAAC,MAAa,CAAC,CAAC;QAE9E,IAAI,OAAO,CAAC;QAGZ,kDAAkD;QAClD,8BAA8B;QAC9B,8DAA8D;QAC9D,0CAA0C;QAE1C,uEAAuE;QACvE,4DAA4D;QAE5D,wCAAwC;QACxC,0BAA0B;QAC1B,oBAAoB;QACpB,4BAA4B;QAC5B,MAAM;QAEN,yEAAyE;QACzE,+CAA+C;QAG/C,yEAAyE;QACzE,YAAY;QACZ,2BAA2B;QAC3B,YAAY;QACZ,mBAAmB;QACnB,sBAAsB;QACtB,SAAS;IAEb,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1 @@
1
+ export type A_TYPES__A_ConnectDecoratorConfig = {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=A-Connect.decorator.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Connect.decorator.types.js","sourceRoot":"","sources":["../../../../src/decorators/A-Connect/A-Connect.decorator.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export declare function A_EntityListDecorator(...args: any[]): any;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.A_EntityListDecorator = A_EntityListDecorator;
4
+ function A_EntityListDecorator(...args) {
5
+ return function (target, propertyKey, descriptor) {
6
+ };
7
+ }
8
+ //# sourceMappingURL=A-Entity-List.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Entity-List.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Entity/A-Entity-List.decorator.ts"],"names":[],"mappings":";;AAEA,sDASC;AATD,SAAgB,qBAAqB,CAAC,GAAG,IAAW;IAEhD,OAAO,UACH,MAAW,EACX,WAAmB,EACnB,UAA8B;IAGlC,CAAC,CAAA;AACL,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { A_Entity } from "../../global/A-Entity/A-Entity.class";
2
+ import { ASEID } from "@adaas/a-utils";
3
+ export type A_TYPES__EntityListDecoratorQuery = {
4
+ aseid: string | ASEID;
5
+ id: string;
6
+ type: {
7
+ new (...args: any[]): A_Entity<any, any, any>;
8
+ };
9
+ entity: string;
10
+ };
11
+ export type A_TYPES__EntityListDecoratorPagination = {
12
+ limit: number;
13
+ offset: number;
14
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=A-Entity.decorator.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Entity.decorator.types.js","sourceRoot":"","sources":["../../../../src/decorators/A-Entity/A-Entity.decorator.types.ts"],"names":[],"mappings":""}
@@ -8,6 +8,7 @@ const A_Context_class_1 = require("../../global/A-Context/A-Context.class");
8
8
  const A_Entity_types_1 = require("../../global/A-Entity/A-Entity.types");
9
9
  const A_Component_types_1 = require("../../global/A-Component/A-Component.types");
10
10
  const A_Entity_class_1 = require("../../global/A-Entity/A-Entity.class");
11
+ const A_Meta_class_1 = require("../../global/A-Meta/A-Meta.class");
11
12
  /**
12
13
  * A-Feature decorator
13
14
  *
@@ -23,7 +24,7 @@ const A_Entity_class_1 = require("../../global/A-Entity/A-Entity.class");
23
24
  */
24
25
  function A_Feature_Define(config = {}) {
25
26
  return function (target, propertyKey, descriptor) {
26
- const meta = A_Context_class_1.A_Context.meta(target);
27
+ const meta = A_Context_class_1.A_Context.meta(target.constructor);
27
28
  let metaKey;
28
29
  switch (true) {
29
30
  case target instanceof A_Entity_class_1.A_Entity:
@@ -39,16 +40,17 @@ function A_Feature_Define(config = {}) {
39
40
  throw new Error(`A-Feature cannot be defined on the ${target} level`);
40
41
  }
41
42
  // Get the existed metadata or create a new one
42
- const existedMeta = meta.get(metaKey)
43
- || new Map();
43
+ const existedMeta = meta.get(metaKey) || new A_Meta_class_1.A_Meta();
44
44
  // Set the metadata of the method to define a custom Feature with name
45
45
  existedMeta.set(propertyKey, {
46
46
  handler: propertyKey,
47
- config: Object.assign(Object.assign({}, config), { name: `${target.constructor.name}.${propertyKey || config.name}` })
47
+ name: `${target.constructor.name}.${propertyKey || config.name}`,
48
+ template: config.template || [],
49
+ channel: config.channel || []
48
50
  });
49
51
  // Update the metadata of the container with the new Feature definition
50
52
  A_Context_class_1.A_Context
51
- .meta(target)
53
+ .meta(target.constructor)
52
54
  .set(metaKey, existedMeta);
53
55
  };
54
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"A-Feature-Define.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Feature/A-Feature-Define.decorator.ts"],"names":[],"mappings":";;AA6BA,4CAmDC;AAhFD,6FAAoF;AAKpF,6FAAoF;AACpF,6FAAkG;AAClG,uFAA8E;AAI9E,oFAAyF;AACzF,6FAAkG;AAClG,oFAA2E;AAG3E;;;;;;;;;;;;GAYG;AACH,SAAgB,gBAAgB,CAC5B,SAAqD,EAAE;IAEvD,OAAO,UACH,MAAiD,EACjD,WAAmB,EACnB,UAAiD;QAGjD,MAAM,IAAI,GAAqD,2BAAS,CAAC,IAAI,CAAC,MAAa,CAAC,CAAC;QAE7F,IAAI,OAAO,CAAC;QAGZ,QAAQ,IAAI,EAAE,CAAC;YACX,KAAK,MAAM,YAAY,yBAAQ;gBAC3B,OAAO,GAAG,uCAAsB,CAAC,QAAQ,CAAC;gBAC1C,MAAM;YACV,KAAK,MAAM,YAAY,+BAAW;gBAC9B,OAAO,GAAG,6CAAyB,CAAC,QAAQ,CAAA;gBAC5C,MAAM;YACV,KAAK,MAAM,YAAY,+BAAW;gBAC9B,OAAO,GAAG,6CAAyB,CAAC,QAAQ,CAAA;gBAC5C,MAAM;YACV;gBACI,MAAM,IAAI,KAAK,CAAC,sCAAsC,MAAM,QAAQ,CAAC,CAAC;QAC9E,CAAC;QAGD,+CAA+C;QAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;eAC9B,IAAI,GAAG,EAAE,CAAC;QAGjB,uEAAuE;QACvE,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE;YACzB,OAAO,EAAE,WAAW;YACpB,MAAM,kCACC,MAAM,KACT,IAAI,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,WAAW,IAAI,MAAM,CAAC,IAAI,EAAE,GACnE;SACJ,CAAC,CAAC;QAEH,wEAAwE;QACxE,2BAAS;aACJ,IAAI,CAAC,MAAa,CAAC;aACnB,GAAG,CACA,OAAO,EACP,WAAW,CACd,CAAC;IACV,CAAC,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"A-Feature-Define.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Feature/A-Feature-Define.decorator.ts"],"names":[],"mappings":";;AA+BA,4CAwDC;AAvFD,6FAAoF;AAMpF,6FAAoF;AACpF,6FAAsI;AACtI,uFAA8E;AAI9E,oFAAyF;AACzF,6FAAkG;AAClG,oFAA2E;AAC3E,8EAAqE;AAGrE;;;;;;;;;;;;GAYG;AACH,SAAgB,gBAAgB,CAC5B,SAAqD,EAAE;IAEvD,OAAO,UACH,MAAiD,EACjD,WAAmB,EACnB,UAAiD;QAGjD,MAAM,IAAI,GAAqD,2BAAS,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAElG,IAAI,OAAO,CAAC;QAGZ,QAAQ,IAAI,EAAE,CAAC;YACX,KAAK,MAAM,YAAY,yBAAQ;gBAC3B,OAAO,GAAG,uCAAsB,CAAC,QAAQ,CAAC;gBAC1C,MAAM;YACV,KAAK,MAAM,YAAY,+BAAW;gBAC9B,OAAO,GAAG,6CAAyB,CAAC,QAAQ,CAAA;gBAC5C,MAAM;YACV,KAAK,MAAM,YAAY,+BAAW;gBAC9B,OAAO,GAAG,6CAAyB,CAAC,QAAQ,CAAA;gBAC5C,MAAM;YACV;gBACI,MAAM,IAAI,KAAK,CAAC,sCAAsC,MAAM,QAAQ,CAAC,CAAC;QAC9E,CAAC;QAGD,+CAA+C;QAC/C,MAAM,WAAW,GAOZ,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,qBAAM,EAAE,CAAC;QAGvC,uEAAuE;QACvE,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE;YACzB,OAAO,EAAE,WAAW;YACpB,IAAI,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,WAAW,IAAI,MAAM,CAAC,IAAI,EAAE;YAChE,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE;YAC/B,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE;SAChC,CAAC,CAAC;QAEH,wEAAwE;QACxE,2BAAS;aACJ,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;aACxB,GAAG,CACA,OAAO,EACP,WAAW,CACd,CAAC;IACV,CAAC,CAAC;AACN,CAAC"}
@@ -7,6 +7,9 @@ const A_Meta_class_1 = require("../../global/A-Meta/A-Meta.class");
7
7
  function A_Feature_Extend(param1) {
8
8
  return function (target, propertyKey, descriptor) {
9
9
  let targetRegexp;
10
+ let behavior = 'sync';
11
+ let before = [];
12
+ let after = [];
10
13
  // Check if the config is a RegExp
11
14
  if (param1 instanceof RegExp) {
12
15
  targetRegexp = param1;
@@ -17,6 +20,9 @@ function A_Feature_Extend(param1) {
17
20
  .map(el => el.name)
18
21
  .join('|')})`
19
22
  : '.*'}\\.${param1.name || propertyKey}$`);
23
+ behavior = param1.behavior || behavior;
24
+ before = param1.before || before;
25
+ after = param1.after || after;
20
26
  }
21
27
  else {
22
28
  targetRegexp = new RegExp(`^.*\\.${propertyKey}$`);
@@ -31,6 +37,9 @@ function A_Feature_Extend(param1) {
31
37
  existedMetaValue.push({
32
38
  name: targetRegexp.source,
33
39
  handler: propertyKey,
40
+ behavior,
41
+ before,
42
+ after
34
43
  });
35
44
  // Set the metadata of the method to define a custom Feature with name
36
45
  existedMeta.set(targetRegexp.source, existedMetaValue);
@@ -1 +1 @@
1
- {"version":3,"file":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,EAAE,gBAAgB,CAAC,CAAC;QAEvD,wEAAwE;QACxE,2BAAS;aACJ,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CAAC,6CAAyB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAChE,CAAC,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"A-Feature-Extend.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Feature/A-Feature-Extend.decorator.ts"],"names":[],"mappings":";;AA+CA,4CA6DC;AAvGD,6FAAkG;AAClG,uFAA8E;AAC9E,8EAAqE;AAwCrE,SAAgB,gBAAgB,CAC5B,MAA2D;IAE3D,OAAO,UACH,MAAmB,EACnB,WAAmB,EACnB,UAAgD;QAGhD,IAAI,YAAoB,CAAC;QACzB,IAAI,QAAQ,GAAqB,MAAM,CAAC;QACxC,IAAI,MAAM,GAAa,EAAE,CAAC;QAC1B,IAAI,KAAK,GAAa,EAAE,CAAC;QAGzB,kCAAkC;QAClC,IAAI,MAAM,YAAY,MAAM,EAAE,CAAC;YAC3B,YAAY,GAAG,MAAM,CAAC;QAC1B,CAAC;aACI,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;YAChB,YAAY,GAAG,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK;gBACtC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK;qBACb,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;qBAClB,IAAI,CAAC,GAAG,CAAC,GAAG;gBACjB,CAAC,CAAC,IACF,MAAM,MAAM,CAAC,IAAI,IAAI,WAAW,GAAG,CAAC,CAAC;YAEzC,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,QAAQ,CAAC;YACvC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC;YACjC,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC;QAClC,CAAC;aACI,CAAC;YACF,YAAY,GAAG,IAAI,MAAM,CAAC,SAAS,WAAW,GAAG,CAAC,CAAC;QACvD,CAAC;QAED,+CAA+C;QAC/C,MAAM,WAAW,GAAG,2BAAS;aACxB,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC;eACvC,IAAI,qBAAM,EAAE,CAAC;QAGpB,MAAM,gBAAgB,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAEpE,qCAAqC;QACrC,gBAAgB,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,YAAY,CAAC,MAAM;YACzB,OAAO,EAAE,WAAW;YACpB,QAAQ;YACR,MAAM;YACN,KAAK;SACR,CAAC,CAAC;QAEH,sEAAsE;QACtE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAEvD,wEAAwE;QACxE,2BAAS;aACJ,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CAAC,6CAAyB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAChE,CAAC,CAAC;AACN,CAAC"}
@@ -1,6 +1,8 @@
1
+ import { A_Channel } from "../../global/A-Channel/A-Channel.class";
1
2
  import { A_Component } from "../../global/A-Component/A-Component.class";
2
3
  import { A_Container } from "../../global/A-Container/A-Container.class";
3
4
  import { A_Entity } from "../../global/A-Entity/A-Entity.class";
5
+ import { A_TYPES__A_StageStep } from "../../global/A-Stage/A-Stage.types";
4
6
  export type A_TYPES__A_Feature_Extend = {
5
7
  (regexp: RegExp): MethodDecorator;
6
8
  (config: Partial<A_TYPES__A_ExtendDecoratorConfig>): MethodDecorator;
@@ -9,7 +11,13 @@ export type A_TYPES__A_Feature_Extend = {
9
11
  export type A_TYPES__A_FeatureDecoratorDescriptor = TypedPropertyDescriptor<() => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<() => Promise<any>>;
10
12
  export type A_TYPES__A_FeatureDecoratorConfig = {
11
13
  name: string;
14
+ channel: Array<typeof A_Channel>;
15
+ template: Array<A_TYPES__A_StageStep>;
12
16
  };
17
+ export type A_TYPES__A_FeatureTemplateItem = A_TYPES__A_StageStep;
18
+ export type A_TYPES__A_DefineDecorator_Meta = {
19
+ handler: string;
20
+ } & A_TYPES__A_FeatureDecoratorConfig;
13
21
  export type A_TYPES__A_ExtendDecoratorDescriptor = TypedPropertyDescriptor<() => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<() => Promise<any>>;
14
22
  export type A_TYPES__A_ExtendDecoratorConfig = {
15
23
  /**
@@ -32,4 +40,32 @@ export type A_TYPES__A_ExtendDecoratorConfig = {
32
40
  } | {
33
41
  new (...args: any[]): A_Component;
34
42
  }>;
43
+ } & A_TYPES__A_ExtendDecorator_BehaviorConfig;
44
+ export type A_TYPES__A_ExtendDecorator_BehaviorConfig = {
45
+ /**
46
+ * The behavior of the method.
47
+ * In case its async it will be executed independently from the main thread.
48
+ *
49
+ * [!] However, in case of sync, it will be executed in the main thread.in the order of the declaration.
50
+ *
51
+ */
52
+ behavior: 'async' | 'sync';
53
+ /**
54
+ * Allows to define the order of the execution of the method.
55
+ *
56
+ * [!] In case the method has circular dependencies it will Throw an error.
57
+ *
58
+ */
59
+ before: string[];
60
+ /**
61
+ * Allows to define the order of the execution of the method.
62
+ *
63
+ * [!] In case the method has circular dependencies it will Throw an error.
64
+ *
65
+ */
66
+ after: string[];
35
67
  };
68
+ export type A_TYPES__A_ExtendDecorator_Meta = {
69
+ name: string;
70
+ handler: string;
71
+ } & A_TYPES__A_ExtendDecorator_BehaviorConfig;
@@ -1,8 +1,7 @@
1
1
  import { A_Component } from "../../global/A-Component/A-Component.class";
2
- import { A_TYPES__A_InjectDecoratorReturn } from "./A-Inject.decorator.types";
2
+ import { A_TYPES__A_InjectDecorator_EntityInjectionInstructions, A_TYPES__A_InjectDecoratorReturn } from "./A-Inject.decorator.types";
3
3
  import { A_Fragment } from "../../global/A-Fragment/A-Fragment.class";
4
4
  import { A_Scope } from "../../global/A-Scope/A-Scope.class";
5
- import { A_TYPES__ComponentMeta_EntityInjectionInstructions } from "../../global/A-Component/A-Component.types";
6
5
  import { A_Feature } from "../../global/A-Feature/A-Feature.class";
7
6
  import { A_Entity } from "../../global/A-Entity/A-Entity.class";
8
7
  /**
@@ -26,4 +25,4 @@ export declare function A_Inject(fragment: {
26
25
  }): A_TYPES__A_InjectDecoratorReturn;
27
26
  export declare function A_Inject(entity: {
28
27
  new (...args: any[]): A_Entity;
29
- }, config: Partial<A_TYPES__ComponentMeta_EntityInjectionInstructions>): A_TYPES__A_InjectDecoratorReturn;
28
+ }, config: Partial<A_TYPES__A_InjectDecorator_EntityInjectionInstructions>): A_TYPES__A_InjectDecoratorReturn;
@@ -1 +1 @@
1
- {"version":3,"file":"A-Inject.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Inject/A-Inject.decorator.ts"],"names":[],"mappings":";;AAgDA,4BAyCC;AArFD,uFAA8E;AAC9E,6FAAsJ;AACtJ,8EAAqE;AAyCrE,8DAA8D;AAC9D,SAAgB,QAAQ,CACpB,MAIuC,EACvC,MAGC;IAED,OAAO,UACH,MAAmB,EACnB,UAAuC,EACvC,cAAsB;QAGtB,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;QAE/D,MAAM,WAAW,GAAG,2BAAS;aACxB,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC;eACvC,IAAI,qBAAM,EAAE,CAAC;QAGpB,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAElD,WAAW,CAAC,cAAc,CAAC,GAAG;YAC1B,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,MAAM;SACvB,CAAA;QAED,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAErC,2BAAS;aACJ,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CACA,6CAAyB,CAAC,UAAU,EACpC,WAAW,CACd,CAAC;IACV,CAAC,CAAA;AACL,CAAC"}
1
+ {"version":3,"file":"A-Inject.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Inject/A-Inject.decorator.ts"],"names":[],"mappings":";;AAmDA,4BAsCC;AAlFD,uFAA8E;AAC9E,6FAAkG;AAClG,8EAAqE;AAyCrE,8DAA8D;AAC9D,SAAgB,QAAQ,CACpB,MAIuC,EACvC,MAAwE;IAExE,OAAO,UACH,MAAmB,EACnB,UAAuC,EACvC,cAAsB;QAGtB,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;QAE/D,MAAM,WAAW,GAAG,2BAAS;aACxB,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC;eACvC,IAAI,qBAAM,EAAE,CAAC;QAGpB,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAElD,WAAW,CAAC,cAAc,CAAC,GAAG;YAC1B,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,MAAM;SACvB,CAAA;QAED,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAErC,2BAAS;aACJ,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CACA,6CAAyB,CAAC,UAAU,EACpC,WAAW,CACd,CAAC;IACV,CAAC,CAAA;AACL,CAAC"}
@@ -1,5 +1,49 @@
1
+ import { A_Component } from "../../global/A-Component/A-Component.class";
2
+ import { A_Container } from "../../global/A-Container/A-Container.class";
3
+ import { A_Entity } from "../../global/A-Entity/A-Entity.class";
4
+ import { A_Feature } from "../../global/A-Feature/A-Feature.class";
5
+ import { A_Fragment } from "../../global/A-Fragment/A-Fragment.class";
6
+ import { A_Scope } from "../../global/A-Scope/A-Scope.class";
7
+ import { ASEID } from "@adaas/a-utils";
1
8
  export type A_TYPES__A_InjectDecoratorDescriptor = TypedPropertyDescriptor<(...args: any[]) => Promise<void>>;
2
9
  export type A_TYPES__A_InjectDecoratorReturn<T = any> = (target: T, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
3
10
  export type A_TYPES__A_InjectDecoratorStorageInstruction = Array<{
4
11
  new (...args: any[]): any;
5
12
  }>;
13
+ export type A_TYPES__A_InjectDecorator_Meta = Array<{
14
+ target: A_TYPES__A_InjectDecorator_Injectable;
15
+ } | {
16
+ target: {
17
+ new (...args: any[]): A_Entity;
18
+ };
19
+ instructions: Partial<A_TYPES__A_InjectDecorator_EntityInjectionInstructions>;
20
+ }>;
21
+ export type A_TYPES__A_InjectDecorator_Injectable = {
22
+ new (...args: any[]): A_Fragment;
23
+ } | {
24
+ new (...args: any[]): A_Component;
25
+ } | {
26
+ new (...args: any[]): A_Container<any>;
27
+ } | {
28
+ new (...args: any[]): A_Scope;
29
+ } | {
30
+ new (...args: any[]): A_Feature;
31
+ } | {
32
+ new (...args: any[]): A_Entity<any, any, any>;
33
+ };
34
+ export type A_TYPES__A_InjectDecorator_EntityInjectionInstructions = {
35
+ query: Partial<A_TYPES__A_InjectDecorator_EntityInjectionQuery>;
36
+ pagination: Partial<A_TYPES__A_InjectDecorator_EntityInjectionPagination>;
37
+ };
38
+ export type A_TYPES__A_InjectDecorator_EntityInjectionQuery = {
39
+ aseid: string | ASEID;
40
+ id: string;
41
+ type: {
42
+ new (...args: any[]): A_Entity<any, any, any>;
43
+ };
44
+ entity: string;
45
+ };
46
+ export type A_TYPES__A_InjectDecorator_EntityInjectionPagination = {
47
+ count: number;
48
+ from: 'start' | 'end';
49
+ };
@@ -1,3 +1,6 @@
1
+ import { A_Component } from "../A-Component/A-Component.class";
2
+ import { A_Container } from "../A-Container/A-Container.class";
3
+ import { A_TYPES__A_ChannelAggregated, A_TYPES__A_ChannelAggregateMethods, A_TYPES__A_ChannelCallParams, A_TYPES__A_ChannelConstructor } from "./A-Channel.types";
1
4
  /**
2
5
  * A_Channel is an abstraction over any Communication Type from event emitters to message queues, HTTP requests, etc.
3
6
  *
@@ -5,14 +8,9 @@
5
8
  * When One container needs to communicate with another container, it uses A_Channel.
6
9
  *
7
10
  */
8
- export declare class A_Channel<T> {
9
- private realClass;
10
- private args;
11
- private proxyInstance;
12
- private realInstance;
13
- constructor(realClass: {
14
- new (...args: any[]): T;
15
- }, args: any[]);
16
- protected loadInstance(): Promise<T>;
17
- resolve(): Promise<T>;
11
+ export declare class A_Channel<T extends Array<A_Component | A_Container> = any[], _Constructor extends A_TYPES__A_ChannelConstructor = A_TYPES__A_ChannelConstructor> {
12
+ id: string;
13
+ protected channel: A_TYPES__A_ChannelAggregated<T>;
14
+ constructor(params: A_TYPES__A_ChannelConstructor);
15
+ call<_Resp extends any>(prop: A_TYPES__A_ChannelAggregateMethods<T>, params?: Partial<A_TYPES__A_ChannelCallParams>): Promise<_Resp>;
18
16
  }
@@ -18,35 +18,21 @@ exports.A_Channel = void 0;
18
18
  *
19
19
  */
20
20
  class A_Channel {
21
- constructor(realClass, args) {
22
- this.realClass = realClass;
23
- this.args = args;
24
- this.proxyInstance = null;
25
- this.realInstance = null;
26
- }
27
- loadInstance() {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- if (!this.realInstance)
30
- this.realInstance = new this.realClass(...this.args);
31
- return this.realInstance;
21
+ constructor(params) {
22
+ this.id = params.id;
23
+ this.channel = new Proxy({}, {
24
+ get: (target, prop) => {
25
+ return (...args) => __awaiter(this, void 0, void 0, function* () {
26
+ this.call(prop);
27
+ });
28
+ }
32
29
  });
33
30
  }
34
- resolve() {
31
+ call(prop, params) {
35
32
  return __awaiter(this, void 0, void 0, function* () {
36
- if (!this.proxyInstance) {
37
- const realInstance = yield this.loadInstance();
38
- this.proxyInstance = new Proxy({}, {
39
- get: (target, prop) => {
40
- const value = realInstance[prop];
41
- // If the property is a method, return a bound function
42
- if (typeof value === 'function') {
43
- return value.bind(realInstance);
44
- }
45
- return value;
46
- }
47
- });
48
- }
49
- return this.proxyInstance;
33
+ // do HTTP Call or just inject class or whatever you want
34
+ console.log('Calling method', prop);
35
+ return {};
50
36
  });
51
37
  }
52
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"A-Channel.class.js","sourceRoot":"","sources":["../../../../src/global/A-Channel/A-Channel.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA;;;;;;GAMG;AACH,MAAa,SAAS;IAIlB,YACY,SAAqC,EACrC,IAAW;QADX,cAAS,GAAT,SAAS,CAA4B;QACrC,SAAI,GAAJ,IAAI,CAAO;QALf,kBAAa,GAAa,IAAI,CAAC;QAC/B,iBAAY,GAAa,IAAI,CAAC;IAOtC,CAAC;IAEe,YAAY;;YACxB,IAAI,CAAC,IAAI,CAAC,YAAY;gBAClB,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;YAEzD,OAAO,IAAI,CAAC,YAAY,CAAC;QAC7B,CAAC;KAAA;IAGY,OAAO;;YAChB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;gBACtB,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;gBAE/C,IAAI,CAAC,aAAa,GAAG,IAAI,KAAK,CAAC,EAAE,EAAE;oBAC/B,GAAG,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;wBAClB,MAAM,KAAK,GAAI,YAAoB,CAAC,IAAI,CAAC,CAAC;wBAE1C,uDAAuD;wBACvD,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;4BAC9B,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;wBACpC,CAAC;wBACD,OAAO,KAAK,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