@adaas/a-concept 0.1.24 → 0.1.25

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 (227) hide show
  1. package/dist/index.cjs +3 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.mts +3952 -0
  4. package/dist/index.d.ts +3952 -50
  5. package/dist/index.mjs +3 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +5 -6
  8. package/src/global/A-Abstraction/A-Abstraction-Extend.decorator.ts +2 -1
  9. package/src/global/A-Context/A-Context.class.ts +81 -7
  10. package/src/global/A-Context/A-Context.error.ts +4 -0
  11. package/src/global/A-Dependency/A-Dependency-Default.decorator.ts +75 -0
  12. package/src/global/A-Dependency/A-Dependency-Load.decorator.ts +80 -0
  13. package/src/global/A-Dependency/A-Dependency-Require.decorator.ts +68 -0
  14. package/src/global/A-Dependency/A-Dependency.class.ts +33 -0
  15. package/src/global/A-Dependency/A-Dependency.error.ts +13 -0
  16. package/src/global/A-Dependency/A-Dependency.types.ts +28 -0
  17. package/src/global/A-Feature/A-Feature-Define.decorator.ts +2 -1
  18. package/src/global/A-Feature/A-Feature-Extend.decorator.ts +2 -1
  19. package/src/global/A-Feature/A-Feature.class.ts +11 -0
  20. package/src/global/A-Inject/A-Inject.decorator.ts +4 -2
  21. package/src/global/A-Inject/A-Inject.types.ts +5 -3
  22. package/src/global/A-Scope/A-Scope.class.ts +85 -57
  23. package/src/global/A-Stage/A-Stage.class.ts +22 -2
  24. package/src/global/A-Stage/A-Stage.error.ts +2 -0
  25. package/src/helpers/A_Common.helper.ts +101 -0
  26. package/src/helpers/A_TypeGuards.helper.ts +8 -0
  27. package/src/index.ts +88 -0
  28. package/tests/A-Component.test.ts +1 -1
  29. package/tests/A-Concept.test.ts +5 -6
  30. package/tests/A-Dependency.test.ts +93 -0
  31. package/tests/A-Feature.test.ts +7 -7
  32. package/tests/A-Scope.test.ts +10 -10
  33. package/tsconfig.json +2 -2
  34. package/tsup.config.ts +32 -0
  35. package/dist/index.js +0 -112
  36. package/dist/index.js.map +0 -1
  37. package/dist/src/constants/env.constants.d.ts +0 -33
  38. package/dist/src/constants/env.constants.js +0 -47
  39. package/dist/src/constants/env.constants.js.map +0 -1
  40. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.d.ts +0 -23
  41. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js +0 -96
  42. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js.map +0 -1
  43. package/dist/src/global/A-Abstraction/A-Abstraction.class.d.ts +0 -74
  44. package/dist/src/global/A-Abstraction/A-Abstraction.class.js +0 -130
  45. package/dist/src/global/A-Abstraction/A-Abstraction.class.js.map +0 -1
  46. package/dist/src/global/A-Abstraction/A-Abstraction.error.d.ts +0 -7
  47. package/dist/src/global/A-Abstraction/A-Abstraction.error.js +0 -12
  48. package/dist/src/global/A-Abstraction/A-Abstraction.error.js.map +0 -1
  49. package/dist/src/global/A-Abstraction/A-Abstraction.types.d.ts +0 -38
  50. package/dist/src/global/A-Abstraction/A-Abstraction.types.js +0 -3
  51. package/dist/src/global/A-Abstraction/A-Abstraction.types.js.map +0 -1
  52. package/dist/src/global/A-Caller/A_Caller.class.d.ts +0 -33
  53. package/dist/src/global/A-Caller/A_Caller.class.js +0 -44
  54. package/dist/src/global/A-Caller/A_Caller.class.js.map +0 -1
  55. package/dist/src/global/A-Caller/A_Caller.error.d.ts +0 -7
  56. package/dist/src/global/A-Caller/A_Caller.error.js +0 -12
  57. package/dist/src/global/A-Caller/A_Caller.error.js.map +0 -1
  58. package/dist/src/global/A-Caller/A_Caller.types.d.ts +0 -18
  59. package/dist/src/global/A-Caller/A_Caller.types.js +0 -3
  60. package/dist/src/global/A-Caller/A_Caller.types.js.map +0 -1
  61. package/dist/src/global/A-Component/A-Component.class.d.ts +0 -34
  62. package/dist/src/global/A-Component/A-Component.class.js +0 -56
  63. package/dist/src/global/A-Component/A-Component.class.js.map +0 -1
  64. package/dist/src/global/A-Component/A-Component.constants.d.ts +0 -6
  65. package/dist/src/global/A-Component/A-Component.constants.js +0 -11
  66. package/dist/src/global/A-Component/A-Component.constants.js.map +0 -1
  67. package/dist/src/global/A-Component/A-Component.meta.d.ts +0 -34
  68. package/dist/src/global/A-Component/A-Component.meta.js +0 -78
  69. package/dist/src/global/A-Component/A-Component.meta.js.map +0 -1
  70. package/dist/src/global/A-Component/A-Component.types.d.ts +0 -76
  71. package/dist/src/global/A-Component/A-Component.types.js +0 -4
  72. package/dist/src/global/A-Component/A-Component.types.js.map +0 -1
  73. package/dist/src/global/A-Concept/A-Concept.class.d.ts +0 -153
  74. package/dist/src/global/A-Concept/A-Concept.class.js +0 -260
  75. package/dist/src/global/A-Concept/A-Concept.class.js.map +0 -1
  76. package/dist/src/global/A-Concept/A-Concept.constants.d.ts +0 -33
  77. package/dist/src/global/A-Concept/A-Concept.constants.js +0 -39
  78. package/dist/src/global/A-Concept/A-Concept.constants.js.map +0 -1
  79. package/dist/src/global/A-Concept/A-Concept.meta.d.ts +0 -6
  80. package/dist/src/global/A-Concept/A-Concept.meta.js +0 -12
  81. package/dist/src/global/A-Concept/A-Concept.meta.js.map +0 -1
  82. package/dist/src/global/A-Concept/A-Concept.types.d.ts +0 -66
  83. package/dist/src/global/A-Concept/A-Concept.types.js +0 -3
  84. package/dist/src/global/A-Concept/A-Concept.types.js.map +0 -1
  85. package/dist/src/global/A-Container/A-Container.class.d.ts +0 -52
  86. package/dist/src/global/A-Container/A-Container.class.js +0 -78
  87. package/dist/src/global/A-Container/A-Container.class.js.map +0 -1
  88. package/dist/src/global/A-Container/A-Container.constants.d.ts +0 -6
  89. package/dist/src/global/A-Container/A-Container.constants.js +0 -11
  90. package/dist/src/global/A-Container/A-Container.constants.js.map +0 -1
  91. package/dist/src/global/A-Container/A-Container.meta.d.ts +0 -35
  92. package/dist/src/global/A-Container/A-Container.meta.js +0 -76
  93. package/dist/src/global/A-Container/A-Container.meta.js.map +0 -1
  94. package/dist/src/global/A-Container/A-Container.types.d.ts +0 -75
  95. package/dist/src/global/A-Container/A-Container.types.js +0 -4
  96. package/dist/src/global/A-Container/A-Container.types.js.map +0 -1
  97. package/dist/src/global/A-Context/A-Context.class.d.ts +0 -361
  98. package/dist/src/global/A-Context/A-Context.class.js +0 -603
  99. package/dist/src/global/A-Context/A-Context.class.js.map +0 -1
  100. package/dist/src/global/A-Context/A-Context.error.d.ts +0 -20
  101. package/dist/src/global/A-Context/A-Context.error.js +0 -25
  102. package/dist/src/global/A-Context/A-Context.error.js.map +0 -1
  103. package/dist/src/global/A-Context/A-Context.types.d.ts +0 -5
  104. package/dist/src/global/A-Context/A-Context.types.js +0 -3
  105. package/dist/src/global/A-Context/A-Context.types.js.map +0 -1
  106. package/dist/src/global/A-Dependency/A-DependencyReference.class.d.ts +0 -0
  107. package/dist/src/global/A-Dependency/A-DependencyReference.class.js +0 -49
  108. package/dist/src/global/A-Dependency/A-DependencyReference.class.js.map +0 -1
  109. package/dist/src/global/A-Dependency/A-DependencyReference.types.d.ts +0 -0
  110. package/dist/src/global/A-Dependency/A-DependencyReference.types.js +0 -58
  111. package/dist/src/global/A-Dependency/A-DependencyReference.types.js.map +0 -1
  112. package/dist/src/global/A-Entity/A-Entity.class.d.ts +0 -214
  113. package/dist/src/global/A-Entity/A-Entity.class.js +0 -282
  114. package/dist/src/global/A-Entity/A-Entity.class.js.map +0 -1
  115. package/dist/src/global/A-Entity/A-Entity.constants.d.ts +0 -11
  116. package/dist/src/global/A-Entity/A-Entity.constants.js +0 -17
  117. package/dist/src/global/A-Entity/A-Entity.constants.js.map +0 -1
  118. package/dist/src/global/A-Entity/A-Entity.error.d.ts +0 -7
  119. package/dist/src/global/A-Entity/A-Entity.error.js +0 -12
  120. package/dist/src/global/A-Entity/A-Entity.error.js.map +0 -1
  121. package/dist/src/global/A-Entity/A-Entity.meta.d.ts +0 -11
  122. package/dist/src/global/A-Entity/A-Entity.meta.js +0 -18
  123. package/dist/src/global/A-Entity/A-Entity.meta.js.map +0 -1
  124. package/dist/src/global/A-Entity/A-Entity.types.d.ts +0 -56
  125. package/dist/src/global/A-Entity/A-Entity.types.js +0 -5
  126. package/dist/src/global/A-Entity/A-Entity.types.js.map +0 -1
  127. package/dist/src/global/A-Error/A_Error.class.d.ts +0 -229
  128. package/dist/src/global/A-Error/A_Error.class.js +0 -296
  129. package/dist/src/global/A-Error/A_Error.class.js.map +0 -1
  130. package/dist/src/global/A-Error/A_Error.constants.d.ts +0 -5
  131. package/dist/src/global/A-Error/A_Error.constants.js +0 -9
  132. package/dist/src/global/A-Error/A_Error.constants.js.map +0 -1
  133. package/dist/src/global/A-Error/A_Error.types.d.ts +0 -93
  134. package/dist/src/global/A-Error/A_Error.types.js +0 -3
  135. package/dist/src/global/A-Error/A_Error.types.js.map +0 -1
  136. package/dist/src/global/A-Feature/A-Feature-Define.decorator.d.ts +0 -15
  137. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js +0 -76
  138. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js.map +0 -1
  139. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.d.ts +0 -56
  140. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js +0 -128
  141. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js.map +0 -1
  142. package/dist/src/global/A-Feature/A-Feature.class.d.ts +0 -175
  143. package/dist/src/global/A-Feature/A-Feature.class.js +0 -318
  144. package/dist/src/global/A-Feature/A-Feature.class.js.map +0 -1
  145. package/dist/src/global/A-Feature/A-Feature.error.d.ts +0 -25
  146. package/dist/src/global/A-Feature/A-Feature.error.js +0 -33
  147. package/dist/src/global/A-Feature/A-Feature.error.js.map +0 -1
  148. package/dist/src/global/A-Feature/A-Feature.types.d.ts +0 -334
  149. package/dist/src/global/A-Feature/A-Feature.types.js +0 -26
  150. package/dist/src/global/A-Feature/A-Feature.types.js.map +0 -1
  151. package/dist/src/global/A-Fragment/A-Fragment.class.d.ts +0 -36
  152. package/dist/src/global/A-Fragment/A-Fragment.class.js +0 -46
  153. package/dist/src/global/A-Fragment/A-Fragment.class.js.map +0 -1
  154. package/dist/src/global/A-Fragment/A-Fragment.types.d.ts +0 -21
  155. package/dist/src/global/A-Fragment/A-Fragment.types.js +0 -6
  156. package/dist/src/global/A-Fragment/A-Fragment.types.js.map +0 -1
  157. package/dist/src/global/A-Inject/A-Inject.decorator.d.ts +0 -80
  158. package/dist/src/global/A-Inject/A-Inject.decorator.js +0 -49
  159. package/dist/src/global/A-Inject/A-Inject.decorator.js.map +0 -1
  160. package/dist/src/global/A-Inject/A-Inject.error.d.ts +0 -5
  161. package/dist/src/global/A-Inject/A-Inject.error.js +0 -10
  162. package/dist/src/global/A-Inject/A-Inject.error.js.map +0 -1
  163. package/dist/src/global/A-Inject/A-Inject.types.d.ts +0 -42
  164. package/dist/src/global/A-Inject/A-Inject.types.js +0 -3
  165. package/dist/src/global/A-Inject/A-Inject.types.js.map +0 -1
  166. package/dist/src/global/A-Meta/A-Meta.class.d.ts +0 -97
  167. package/dist/src/global/A-Meta/A-Meta.class.js +0 -164
  168. package/dist/src/global/A-Meta/A-Meta.class.js.map +0 -1
  169. package/dist/src/global/A-Meta/A-Meta.types.d.ts +0 -14
  170. package/dist/src/global/A-Meta/A-Meta.types.js +0 -3
  171. package/dist/src/global/A-Meta/A-Meta.types.js.map +0 -1
  172. package/dist/src/global/A-Scope/A-Scope.class.d.ts +0 -466
  173. package/dist/src/global/A-Scope/A-Scope.class.js +0 -791
  174. package/dist/src/global/A-Scope/A-Scope.class.js.map +0 -1
  175. package/dist/src/global/A-Scope/A-Scope.error.d.ts +0 -8
  176. package/dist/src/global/A-Scope/A-Scope.error.js +0 -13
  177. package/dist/src/global/A-Scope/A-Scope.error.js.map +0 -1
  178. package/dist/src/global/A-Scope/A-Scope.types.d.ts +0 -81
  179. package/dist/src/global/A-Scope/A-Scope.types.js +0 -3
  180. package/dist/src/global/A-Scope/A-Scope.types.js.map +0 -1
  181. package/dist/src/global/A-Stage/A-Stage.class.d.ts +0 -112
  182. package/dist/src/global/A-Stage/A-Stage.class.js +0 -240
  183. package/dist/src/global/A-Stage/A-Stage.class.js.map +0 -1
  184. package/dist/src/global/A-Stage/A-Stage.error.d.ts +0 -4
  185. package/dist/src/global/A-Stage/A-Stage.error.js +0 -11
  186. package/dist/src/global/A-Stage/A-Stage.error.js.map +0 -1
  187. package/dist/src/global/A-Stage/A-Stage.types.d.ts +0 -101
  188. package/dist/src/global/A-Stage/A-Stage.types.js +0 -43
  189. package/dist/src/global/A-Stage/A-Stage.types.js.map +0 -1
  190. package/dist/src/global/A-StepManager/A-StepManager.class.d.ts +0 -20
  191. package/dist/src/global/A-StepManager/A-StepManager.class.js +0 -112
  192. package/dist/src/global/A-StepManager/A-StepManager.class.js.map +0 -1
  193. package/dist/src/global/A-StepManager/A-StepManager.error.d.ts +0 -4
  194. package/dist/src/global/A-StepManager/A-StepManager.error.js +0 -9
  195. package/dist/src/global/A-StepManager/A-StepManager.error.js.map +0 -1
  196. package/dist/src/global/ASEID/ASEID.class.d.ts +0 -130
  197. package/dist/src/global/ASEID/ASEID.class.js +0 -167
  198. package/dist/src/global/ASEID/ASEID.class.js.map +0 -1
  199. package/dist/src/global/ASEID/ASEID.constants.d.ts +0 -0
  200. package/dist/src/global/ASEID/ASEID.constants.js +0 -2
  201. package/dist/src/global/ASEID/ASEID.constants.js.map +0 -1
  202. package/dist/src/global/ASEID/ASEID.error.d.ts +0 -5
  203. package/dist/src/global/ASEID/ASEID.error.js +0 -10
  204. package/dist/src/global/ASEID/ASEID.error.js.map +0 -1
  205. package/dist/src/global/ASEID/ASEID.types.d.ts +0 -65
  206. package/dist/src/global/ASEID/ASEID.types.js +0 -5
  207. package/dist/src/global/ASEID/ASEID.types.js.map +0 -1
  208. package/dist/src/helpers/A_Common.helper.d.ts +0 -28
  209. package/dist/src/helpers/A_Common.helper.js +0 -170
  210. package/dist/src/helpers/A_Common.helper.js.map +0 -1
  211. package/dist/src/helpers/A_Formatter.helper.d.ts +0 -35
  212. package/dist/src/helpers/A_Formatter.helper.js +0 -62
  213. package/dist/src/helpers/A_Formatter.helper.js.map +0 -1
  214. package/dist/src/helpers/A_Identity.helper.d.ts +0 -29
  215. package/dist/src/helpers/A_Identity.helper.js +0 -43
  216. package/dist/src/helpers/A_Identity.helper.js.map +0 -1
  217. package/dist/src/helpers/A_TypeGuards.helper.d.ts +0 -207
  218. package/dist/src/helpers/A_TypeGuards.helper.js +0 -296
  219. package/dist/src/helpers/A_TypeGuards.helper.js.map +0 -1
  220. package/dist/src/types/A_Common.types.d.ts +0 -36
  221. package/dist/src/types/A_Common.types.js +0 -3
  222. package/dist/src/types/A_Common.types.js.map +0 -1
  223. package/index.ts +0 -81
  224. package/src/global/A-Dependency/A-DependencyReference.class.ts +0 -61
  225. package/src/global/A-Dependency/A-DependencyReference.types.ts +0 -61
  226. package/trace-require.js +0 -46
  227. package/tsconfig.build.json +0 -58
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=A-Concept.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Concept.types.js","sourceRoot":"","sources":["../../../../src/global/A-Concept/A-Concept.types.ts"],"names":[],"mappings":""}
@@ -1,52 +0,0 @@
1
- import { A_Scope } from "../A-Scope/A-Scope.class";
2
- import { A_TYPES__Container_Init } from "./A-Container.types";
3
- export declare class A_Container {
4
- /**
5
- * Configuration of the container that will be used to run it.
6
- */
7
- protected readonly config: Partial<A_TYPES__Container_Init>;
8
- /**
9
- * Name of the container
10
- */
11
- get name(): string;
12
- /**
13
- * Returns the scope where the container is registered
14
- */
15
- get scope(): A_Scope;
16
- /**
17
- * This class should combine Components to achieve the goal withing Concept
18
- *
19
- * Container is a direct container that should be "run" to make Concept work.
20
- * So because of that Container can be:
21
- * - HTTP Server
22
- * - BASH Script
23
- * - Database Connection
24
- * - Microservice
25
- * - etc.
26
- *
27
- * @param config - Configuration of the container that will be used to run it.
28
- */
29
- constructor(
30
- /**
31
- * Configuration of the container that will be used to run it.
32
- */
33
- config?: Partial<A_TYPES__Container_Init>);
34
- /**
35
- * Calls the feature with the given name in the given scope
36
- *
37
- * [!] Note: This method creates a new instance of the feature every time it is called
38
- *
39
- * @param feature - the name of the feature to call
40
- * @param scope - the scope in which to call the feature
41
- * @returns - void
42
- */
43
- call(
44
- /**
45
- * Name of the feature to call
46
- */
47
- feature: string,
48
- /**
49
- * scope in which the feature will be executed
50
- */
51
- scope?: A_Scope): Promise<void>;
52
- }
@@ -1,78 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.A_Container = void 0;
13
- const A_Context_class_1 = require("../A-Context/A-Context.class");
14
- const A_Feature_class_1 = require("../A-Feature/A-Feature.class");
15
- class A_Container {
16
- /**
17
- * Name of the container
18
- */
19
- get name() {
20
- var _a;
21
- return ((_a = this.config) === null || _a === void 0 ? void 0 : _a.name) || this.constructor.name;
22
- }
23
- /**
24
- * Returns the scope where the container is registered
25
- */
26
- get scope() {
27
- return A_Context_class_1.A_Context.scope(this);
28
- }
29
- /**
30
- * This class should combine Components to achieve the goal withing Concept
31
- *
32
- * Container is a direct container that should be "run" to make Concept work.
33
- * So because of that Container can be:
34
- * - HTTP Server
35
- * - BASH Script
36
- * - Database Connection
37
- * - Microservice
38
- * - etc.
39
- *
40
- * @param config - Configuration of the container that will be used to run it.
41
- */
42
- constructor(
43
- /**
44
- * Configuration of the container that will be used to run it.
45
- */
46
- config = {}) {
47
- this.config = config;
48
- A_Context_class_1.A_Context.allocate(this, this.config);
49
- }
50
- /**
51
- * Calls the feature with the given name in the given scope
52
- *
53
- * [!] Note: This method creates a new instance of the feature every time it is called
54
- *
55
- * @param feature - the name of the feature to call
56
- * @param scope - the scope in which to call the feature
57
- * @returns - void
58
- */
59
- call(
60
- /**
61
- * Name of the feature to call
62
- */
63
- feature,
64
- /**
65
- * scope in which the feature will be executed
66
- */
67
- scope) {
68
- return __awaiter(this, void 0, void 0, function* () {
69
- const newFeature = new A_Feature_class_1.A_Feature({
70
- name: feature,
71
- component: this
72
- });
73
- return yield newFeature.process(scope);
74
- });
75
- }
76
- }
77
- exports.A_Container = A_Container;
78
- //# sourceMappingURL=A-Container.class.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Container.class.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kEAAyD;AACzD,kEAAyD;AAMzD,MAAa,WAAW;IAMpB;;OAEG;IACH,IAAI,IAAI;;QACJ,OAAO,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,IAAI,KAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACtD,CAAC;IACD;;OAEG;IACH,IAAI,KAAK;QACL,OAAO,2BAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAGD;;;;;;;;;;;;OAYG;IACH;IACI;;OAEG;IACH,SAA2C,EAAE;QAE7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,2BAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAGD;;;;;;;;OAQG;IACG,IAAI;IACN;;OAEG;IACH,OAAe;IACf;;OAEG;IACH,KAAe;;YAEf,MAAM,UAAU,GAAG,IAAI,2BAAS,CAAC;gBAC7B,IAAI,EAAE,OAAO;gBACb,SAAS,EAAE,IAAI;aAClB,CAAC,CAAC;YAEH,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;KAAA;CACJ;AAvED,kCAuEC"}
@@ -1,6 +0,0 @@
1
- export declare enum A_TYPES__ContainerMetaKey {
2
- FEATURES = "a-container-features",
3
- INJECTIONS = "a-container-injections",
4
- ABSTRACTIONS = "a-container-abstractions",
5
- EXTENSIONS = "a-container-extensions"
6
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_TYPES__ContainerMetaKey = void 0;
4
- var A_TYPES__ContainerMetaKey;
5
- (function (A_TYPES__ContainerMetaKey) {
6
- A_TYPES__ContainerMetaKey["FEATURES"] = "a-container-features";
7
- A_TYPES__ContainerMetaKey["INJECTIONS"] = "a-container-injections";
8
- A_TYPES__ContainerMetaKey["ABSTRACTIONS"] = "a-container-abstractions";
9
- A_TYPES__ContainerMetaKey["EXTENSIONS"] = "a-container-extensions";
10
- })(A_TYPES__ContainerMetaKey || (exports.A_TYPES__ContainerMetaKey = A_TYPES__ContainerMetaKey = {}));
11
- //# sourceMappingURL=A-Container.constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Container.constants.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACjC,8DAAiC,CAAA;IACjC,kEAAqC,CAAA;IACrC,sEAAyC,CAAA;IACzC,kEAAsC,CAAA;AAC1C,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC"}
@@ -1,35 +0,0 @@
1
- import { A_TYPES__ContainerMeta, A_TYPES__ContainerMetaExtension } from "./A-Container.types";
2
- import { A_TYPES__A_InjectDecorator_Meta } from "../A-Inject/A-Inject.types";
3
- import { A_TYPES__ConceptAbstractionMeta } from "../A-Concept/A-Concept.types";
4
- import { A_Meta } from "../A-Meta/A-Meta.class";
5
- import { A_TYPES__FeatureDefineDecoratorMeta } from "../A-Feature/A-Feature.types";
6
- import { A_TYPES__ConceptAbstractions } from "../A-Concept/A-Concept.constants";
7
- export declare class A_ContainerMeta extends A_Meta<A_TYPES__ContainerMeta> {
8
- /**
9
- * Allows to get all the injections for a given handler
10
- *
11
- * @param handler
12
- * @returns
13
- */
14
- injections(handler: string): A_TYPES__A_InjectDecorator_Meta;
15
- /**
16
- * Returns all features defined in the Container
17
- *
18
- * @returns
19
- */
20
- features(): Array<A_TYPES__FeatureDefineDecoratorMeta>;
21
- /**
22
- * Returns a set of instructions to run proper methods in Container during A-Concept Stage
23
- *
24
- * @param stage
25
- * @returns
26
- */
27
- abstractions(abstraction: A_TYPES__ConceptAbstractions): A_TYPES__ConceptAbstractionMeta[];
28
- /**
29
- * Allows to get all the extensions for a given feature
30
- *
31
- * @param feature
32
- * @returns
33
- */
34
- extensions(feature: string): A_TYPES__ContainerMetaExtension[];
35
- }
@@ -1,76 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_ContainerMeta = void 0;
4
- const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
5
- const A_Container_constants_1 = require("./A-Container.constants");
6
- class A_ContainerMeta extends A_Meta_class_1.A_Meta {
7
- /**
8
- * Allows to get all the injections for a given handler
9
- *
10
- * @param handler
11
- * @returns
12
- */
13
- injections(handler) {
14
- const injections = this.get(A_Container_constants_1.A_TYPES__ContainerMetaKey.INJECTIONS);
15
- const args = (injections === null || injections === void 0 ? void 0 : injections.get(handler)) || [];
16
- return args;
17
- }
18
- /**
19
- * Returns all features defined in the Container
20
- *
21
- * @returns
22
- */
23
- features() {
24
- const features = this.get(A_Container_constants_1.A_TYPES__ContainerMetaKey.FEATURES);
25
- return (features === null || features === void 0 ? void 0 : features.toArray().map(([, feature]) => feature)) || [];
26
- }
27
- /**
28
- * Returns a set of instructions to run proper methods in Container during A-Concept Stage
29
- *
30
- * @param stage
31
- * @returns
32
- */
33
- abstractions(abstraction) {
34
- const steps = [];
35
- const abstractions = this.get(A_Container_constants_1.A_TYPES__ContainerMetaKey.ABSTRACTIONS);
36
- const injections = this.get(A_Container_constants_1.A_TYPES__ContainerMetaKey.INJECTIONS);
37
- abstractions === null || abstractions === void 0 ? void 0 : abstractions
38
- // returns all extensions that match the feature
39
- .find(`CONCEPT_ABSTRACTION::${abstraction}`).forEach(([handler, extensions]) => {
40
- extensions.forEach(extension => {
41
- const args = (injections === null || injections === void 0 ? void 0 : injections.get(extension.handler)) || [];
42
- steps.push(Object.assign(Object.assign({}, extension), { args }));
43
- });
44
- });
45
- return steps;
46
- }
47
- /**
48
- * Allows to get all the extensions for a given feature
49
- *
50
- * @param feature
51
- * @returns
52
- */
53
- extensions(feature) {
54
- const steps = [];
55
- const extensions = this.get(A_Container_constants_1.A_TYPES__ContainerMetaKey.EXTENSIONS);
56
- extensions === null || extensions === void 0 ? void 0 : extensions
57
- // returns all extensions that match the feature
58
- .find(feature).forEach(([handler, extensions]) => {
59
- extensions.forEach(extension => {
60
- steps.push({
61
- // component: constructor,
62
- name: extension.name,
63
- handler: extension.handler,
64
- behavior: extension.behavior,
65
- before: extension.before || '',
66
- after: extension.after || '',
67
- throwOnError: extension.throwOnError || true,
68
- override: ''
69
- });
70
- });
71
- });
72
- return steps;
73
- }
74
- }
75
- exports.A_ContainerMeta = A_ContainerMeta;
76
- //# sourceMappingURL=A-Container.meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Container.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.meta.ts"],"names":[],"mappings":";;;AAGA,yDAAgD;AAChD,mEAAoE;AAMpE,MAAa,eAAgB,SAAQ,qBAA8B;IAI/D;;;;;OAKG;IACH,UAAU,CACN,OAAe;QAEf,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,iDAAyB,CAAC,UAAU,CAAC,CAAC;QAElE,MAAM,IAAI,GAAG,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,GAAG,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;QAE5C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,QAAQ;QAEJ,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,iDAAyB,CAAC,QAAQ,CAAC,CAAC;QAE9D,OAAO,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,GAEnB,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;IAC7C,CAAC;IAED;;;;;OAKG;IACH,YAAY,CACR,WAAyC;QAEzC,MAAM,KAAK,GAAsC,EAAE,CAAC;QAEpD,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,iDAAyB,CAAC,YAAY,CAAC,CAAC;QACtE,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,iDAAyB,CAAC,UAAU,CAAC,CAAC;QAElE,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,iCACH,SAAS,KACZ,IAAI,IACN,CAAC;YAEP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAGP,OAAO,KAAK,CAAC;IACjB,CAAC;IAGD;;;;;OAKG;IACH,UAAU,CACN,OAAe;QAEf,MAAM,KAAK,GAAsC,EAAE,CAAC;QAEpD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,iDAAyB,CAAC,UAAU,CAAC,CAAC;QAElE,UAAU,aAAV,UAAU,uBAAV,UAAU;QACN,gDAAgD;SAC9C,IAAI,CAAC,OAAO,EACb,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE;YAC/B,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBAC3B,KAAK,CAAC,IAAI,CAAC;oBACP,0BAA0B;oBAC1B,IAAI,EAAE,SAAS,CAAC,IAAI;oBACpB,OAAO,EAAE,SAAS,CAAC,OAAO;oBAC1B,QAAQ,EAAE,SAAS,CAAC,QAAQ;oBAC5B,MAAM,EAAE,SAAS,CAAC,MAAM,IAAI,EAAE;oBAC9B,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,EAAE;oBAC5B,YAAY,EAAE,SAAS,CAAC,YAAY,IAAI,IAAI;oBAC5C,QAAQ,EAAE,EAAE;iBAEf,CAAC,CAAC;YAEP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAGP,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ;AAzGD,0CAyGC"}
@@ -1,75 +0,0 @@
1
- import { A_TYPES__A_InjectDecorator_Meta } from "../A-Inject/A-Inject.types";
2
- import { A_TYPES__ConceptAbstraction } from "../A-Concept/A-Concept.types";
3
- import { A_Meta } from "../A-Meta/A-Meta.class";
4
- import { A_TYPES__Scope_Init } from "../A-Scope/A-Scope.types";
5
- import { A_TYPES__ContainerMetaKey } from "./A-Container.constants";
6
- import { A_Container } from "./A-Container.class";
7
- import { A_TYPES__FeatureDefineDecoratorMeta, A_TYPES__FeatureExtendDecoratorMeta } from "../A-Feature/A-Feature.types";
8
- /**
9
- * Container constructor type
10
- * Uses the generic type T to specify the type of the container
11
- */
12
- export type A_TYPES__Container_Constructor<T = A_Container> = new (...args: any[]) => T;
13
- /**
14
- * Container initialization type
15
- */
16
- export type A_TYPES__Container_Init = {
17
- /**
18
- * The extra name for the container (optional)
19
- */
20
- name?: string;
21
- } & A_TYPES__Scope_Init;
22
- /**
23
- * Container serialized type
24
- */
25
- export type A_TYPES__Container_Serialized = {
26
- /**
27
- * The ASEID of the container
28
- */
29
- aseid: string;
30
- };
31
- /**
32
- * Meta information stored in each Container
33
- */
34
- export type A_TYPES__ContainerMeta = {
35
- /**
36
- * Extensions applied to the component per handler
37
- */
38
- [A_TYPES__ContainerMetaKey.EXTENSIONS]: A_Meta<{
39
- /**
40
- * Where Key the regexp for what to apply the extension
41
- * A set of container names or a wildcard, or a regexp
42
- *
43
- *
44
- * Where value is the extension instructions
45
- */
46
- [Key: string]: A_TYPES__FeatureExtendDecoratorMeta[];
47
- }>;
48
- [A_TYPES__ContainerMetaKey.FEATURES]: A_Meta<{
49
- /**
50
- * Where Key is the name of the feature
51
- *
52
- * Where value is the list of features
53
- */
54
- [Key: string]: A_TYPES__FeatureDefineDecoratorMeta;
55
- }>;
56
- [A_TYPES__ContainerMetaKey.ABSTRACTIONS]: A_Meta<{
57
- /**
58
- * Where Key the regexp for what to apply the extension
59
- * A set of container names or a wildcard, or a regexp
60
- *
61
- *
62
- * Where value is the extension instructions
63
- */
64
- [Key: string]: A_TYPES__ConceptAbstraction[];
65
- }>;
66
- [A_TYPES__ContainerMetaKey.INJECTIONS]: A_Meta<{
67
- /**
68
- * Where Key is the name of the injection
69
- *
70
- * Where value is the list of injections
71
- */
72
- [Key: string]: A_TYPES__A_InjectDecorator_Meta;
73
- }>;
74
- };
75
- export type A_TYPES__ContainerMetaExtension = A_TYPES__FeatureExtendDecoratorMeta;
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const A_Container_constants_1 = require("./A-Container.constants");
4
- //# sourceMappingURL=A-Container.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Container.types.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.types.ts"],"names":[],"mappings":";;AAIA,mEAAoE"}