@adaas/a-concept 0.1.23 → 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 (234) 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 +18 -13
  9. package/src/global/A-Component/A-Component.meta.ts +3 -2
  10. package/src/global/A-Container/A-Container.meta.ts +5 -8
  11. package/src/global/A-Context/A-Context.class.ts +81 -7
  12. package/src/global/A-Context/A-Context.error.ts +4 -0
  13. package/src/global/A-Dependency/A-Dependency-Default.decorator.ts +75 -0
  14. package/src/global/A-Dependency/A-Dependency-Load.decorator.ts +80 -0
  15. package/src/global/A-Dependency/A-Dependency-Require.decorator.ts +68 -0
  16. package/src/global/A-Dependency/A-Dependency.class.ts +33 -0
  17. package/src/global/A-Dependency/A-Dependency.error.ts +13 -0
  18. package/src/global/A-Dependency/A-Dependency.types.ts +28 -0
  19. package/src/global/A-Entity/A-Entity.class.ts +2 -1
  20. package/src/global/A-Feature/A-Feature-Define.decorator.ts +7 -4
  21. package/src/global/A-Feature/A-Feature-Extend.decorator.ts +23 -17
  22. package/src/global/A-Feature/A-Feature.class.ts +12 -1
  23. package/src/global/A-Feature/A-Feature.types.ts +33 -8
  24. package/src/global/A-Inject/A-Inject.decorator.ts +4 -2
  25. package/src/global/A-Inject/A-Inject.types.ts +5 -3
  26. package/src/global/A-Scope/A-Scope.class.ts +85 -57
  27. package/src/global/A-Stage/A-Stage.class.ts +22 -2
  28. package/src/global/A-Stage/A-Stage.error.ts +2 -0
  29. package/src/global/A-Stage/A-Stage.types.ts +7 -2
  30. package/src/global/A-StepManager/A-StepManager.class.ts +19 -13
  31. package/src/helpers/A_Common.helper.ts +101 -0
  32. package/src/helpers/A_TypeGuards.helper.ts +8 -0
  33. package/src/index.ts +88 -0
  34. package/tests/A-Component.test.ts +1 -1
  35. package/tests/A-Concept.test.ts +58 -10
  36. package/tests/A-Dependency.test.ts +93 -0
  37. package/tests/A-Feature.test.ts +11 -11
  38. package/tests/A-Scope.test.ts +10 -10
  39. package/tests/A-StepManager.test.ts +60 -11
  40. package/tsconfig.json +2 -2
  41. package/tsup.config.ts +32 -0
  42. package/dist/index.js +0 -112
  43. package/dist/index.js.map +0 -1
  44. package/dist/src/constants/env.constants.d.ts +0 -33
  45. package/dist/src/constants/env.constants.js +0 -47
  46. package/dist/src/constants/env.constants.js.map +0 -1
  47. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.d.ts +0 -23
  48. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js +0 -89
  49. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js.map +0 -1
  50. package/dist/src/global/A-Abstraction/A-Abstraction.class.d.ts +0 -74
  51. package/dist/src/global/A-Abstraction/A-Abstraction.class.js +0 -130
  52. package/dist/src/global/A-Abstraction/A-Abstraction.class.js.map +0 -1
  53. package/dist/src/global/A-Abstraction/A-Abstraction.error.d.ts +0 -7
  54. package/dist/src/global/A-Abstraction/A-Abstraction.error.js +0 -12
  55. package/dist/src/global/A-Abstraction/A-Abstraction.error.js.map +0 -1
  56. package/dist/src/global/A-Abstraction/A-Abstraction.types.d.ts +0 -38
  57. package/dist/src/global/A-Abstraction/A-Abstraction.types.js +0 -3
  58. package/dist/src/global/A-Abstraction/A-Abstraction.types.js.map +0 -1
  59. package/dist/src/global/A-Caller/A_Caller.class.d.ts +0 -33
  60. package/dist/src/global/A-Caller/A_Caller.class.js +0 -44
  61. package/dist/src/global/A-Caller/A_Caller.class.js.map +0 -1
  62. package/dist/src/global/A-Caller/A_Caller.error.d.ts +0 -7
  63. package/dist/src/global/A-Caller/A_Caller.error.js +0 -12
  64. package/dist/src/global/A-Caller/A_Caller.error.js.map +0 -1
  65. package/dist/src/global/A-Caller/A_Caller.types.d.ts +0 -18
  66. package/dist/src/global/A-Caller/A_Caller.types.js +0 -3
  67. package/dist/src/global/A-Caller/A_Caller.types.js.map +0 -1
  68. package/dist/src/global/A-Component/A-Component.class.d.ts +0 -34
  69. package/dist/src/global/A-Component/A-Component.class.js +0 -56
  70. package/dist/src/global/A-Component/A-Component.class.js.map +0 -1
  71. package/dist/src/global/A-Component/A-Component.constants.d.ts +0 -6
  72. package/dist/src/global/A-Component/A-Component.constants.js +0 -11
  73. package/dist/src/global/A-Component/A-Component.constants.js.map +0 -1
  74. package/dist/src/global/A-Component/A-Component.meta.d.ts +0 -34
  75. package/dist/src/global/A-Component/A-Component.meta.js +0 -77
  76. package/dist/src/global/A-Component/A-Component.meta.js.map +0 -1
  77. package/dist/src/global/A-Component/A-Component.types.d.ts +0 -76
  78. package/dist/src/global/A-Component/A-Component.types.js +0 -4
  79. package/dist/src/global/A-Component/A-Component.types.js.map +0 -1
  80. package/dist/src/global/A-Concept/A-Concept.class.d.ts +0 -153
  81. package/dist/src/global/A-Concept/A-Concept.class.js +0 -260
  82. package/dist/src/global/A-Concept/A-Concept.class.js.map +0 -1
  83. package/dist/src/global/A-Concept/A-Concept.constants.d.ts +0 -33
  84. package/dist/src/global/A-Concept/A-Concept.constants.js +0 -39
  85. package/dist/src/global/A-Concept/A-Concept.constants.js.map +0 -1
  86. package/dist/src/global/A-Concept/A-Concept.meta.d.ts +0 -6
  87. package/dist/src/global/A-Concept/A-Concept.meta.js +0 -12
  88. package/dist/src/global/A-Concept/A-Concept.meta.js.map +0 -1
  89. package/dist/src/global/A-Concept/A-Concept.types.d.ts +0 -66
  90. package/dist/src/global/A-Concept/A-Concept.types.js +0 -3
  91. package/dist/src/global/A-Concept/A-Concept.types.js.map +0 -1
  92. package/dist/src/global/A-Container/A-Container.class.d.ts +0 -52
  93. package/dist/src/global/A-Container/A-Container.class.js +0 -78
  94. package/dist/src/global/A-Container/A-Container.class.js.map +0 -1
  95. package/dist/src/global/A-Container/A-Container.constants.d.ts +0 -6
  96. package/dist/src/global/A-Container/A-Container.constants.js +0 -11
  97. package/dist/src/global/A-Container/A-Container.constants.js.map +0 -1
  98. package/dist/src/global/A-Container/A-Container.meta.d.ts +0 -35
  99. package/dist/src/global/A-Container/A-Container.meta.js +0 -83
  100. package/dist/src/global/A-Container/A-Container.meta.js.map +0 -1
  101. package/dist/src/global/A-Container/A-Container.types.d.ts +0 -75
  102. package/dist/src/global/A-Container/A-Container.types.js +0 -4
  103. package/dist/src/global/A-Container/A-Container.types.js.map +0 -1
  104. package/dist/src/global/A-Context/A-Context.class.d.ts +0 -361
  105. package/dist/src/global/A-Context/A-Context.class.js +0 -603
  106. package/dist/src/global/A-Context/A-Context.class.js.map +0 -1
  107. package/dist/src/global/A-Context/A-Context.error.d.ts +0 -20
  108. package/dist/src/global/A-Context/A-Context.error.js +0 -25
  109. package/dist/src/global/A-Context/A-Context.error.js.map +0 -1
  110. package/dist/src/global/A-Context/A-Context.types.d.ts +0 -5
  111. package/dist/src/global/A-Context/A-Context.types.js +0 -3
  112. package/dist/src/global/A-Context/A-Context.types.js.map +0 -1
  113. package/dist/src/global/A-Dependency/A-DependencyReference.class.d.ts +0 -0
  114. package/dist/src/global/A-Dependency/A-DependencyReference.class.js +0 -49
  115. package/dist/src/global/A-Dependency/A-DependencyReference.class.js.map +0 -1
  116. package/dist/src/global/A-Dependency/A-DependencyReference.types.d.ts +0 -0
  117. package/dist/src/global/A-Dependency/A-DependencyReference.types.js +0 -58
  118. package/dist/src/global/A-Dependency/A-DependencyReference.types.js.map +0 -1
  119. package/dist/src/global/A-Entity/A-Entity.class.d.ts +0 -214
  120. package/dist/src/global/A-Entity/A-Entity.class.js +0 -281
  121. package/dist/src/global/A-Entity/A-Entity.class.js.map +0 -1
  122. package/dist/src/global/A-Entity/A-Entity.constants.d.ts +0 -11
  123. package/dist/src/global/A-Entity/A-Entity.constants.js +0 -17
  124. package/dist/src/global/A-Entity/A-Entity.constants.js.map +0 -1
  125. package/dist/src/global/A-Entity/A-Entity.error.d.ts +0 -7
  126. package/dist/src/global/A-Entity/A-Entity.error.js +0 -12
  127. package/dist/src/global/A-Entity/A-Entity.error.js.map +0 -1
  128. package/dist/src/global/A-Entity/A-Entity.meta.d.ts +0 -11
  129. package/dist/src/global/A-Entity/A-Entity.meta.js +0 -18
  130. package/dist/src/global/A-Entity/A-Entity.meta.js.map +0 -1
  131. package/dist/src/global/A-Entity/A-Entity.types.d.ts +0 -56
  132. package/dist/src/global/A-Entity/A-Entity.types.js +0 -5
  133. package/dist/src/global/A-Entity/A-Entity.types.js.map +0 -1
  134. package/dist/src/global/A-Error/A_Error.class.d.ts +0 -229
  135. package/dist/src/global/A-Error/A_Error.class.js +0 -296
  136. package/dist/src/global/A-Error/A_Error.class.js.map +0 -1
  137. package/dist/src/global/A-Error/A_Error.constants.d.ts +0 -5
  138. package/dist/src/global/A-Error/A_Error.constants.js +0 -9
  139. package/dist/src/global/A-Error/A_Error.constants.js.map +0 -1
  140. package/dist/src/global/A-Error/A_Error.types.d.ts +0 -93
  141. package/dist/src/global/A-Error/A_Error.types.js +0 -3
  142. package/dist/src/global/A-Error/A_Error.types.js.map +0 -1
  143. package/dist/src/global/A-Feature/A-Feature-Define.decorator.d.ts +0 -15
  144. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js +0 -76
  145. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js.map +0 -1
  146. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.d.ts +0 -56
  147. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js +0 -119
  148. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js.map +0 -1
  149. package/dist/src/global/A-Feature/A-Feature.class.d.ts +0 -175
  150. package/dist/src/global/A-Feature/A-Feature.class.js +0 -318
  151. package/dist/src/global/A-Feature/A-Feature.class.js.map +0 -1
  152. package/dist/src/global/A-Feature/A-Feature.error.d.ts +0 -25
  153. package/dist/src/global/A-Feature/A-Feature.error.js +0 -33
  154. package/dist/src/global/A-Feature/A-Feature.error.js.map +0 -1
  155. package/dist/src/global/A-Feature/A-Feature.types.d.ts +0 -310
  156. package/dist/src/global/A-Feature/A-Feature.types.js +0 -26
  157. package/dist/src/global/A-Feature/A-Feature.types.js.map +0 -1
  158. package/dist/src/global/A-Fragment/A-Fragment.class.d.ts +0 -36
  159. package/dist/src/global/A-Fragment/A-Fragment.class.js +0 -46
  160. package/dist/src/global/A-Fragment/A-Fragment.class.js.map +0 -1
  161. package/dist/src/global/A-Fragment/A-Fragment.types.d.ts +0 -21
  162. package/dist/src/global/A-Fragment/A-Fragment.types.js +0 -6
  163. package/dist/src/global/A-Fragment/A-Fragment.types.js.map +0 -1
  164. package/dist/src/global/A-Inject/A-Inject.decorator.d.ts +0 -80
  165. package/dist/src/global/A-Inject/A-Inject.decorator.js +0 -49
  166. package/dist/src/global/A-Inject/A-Inject.decorator.js.map +0 -1
  167. package/dist/src/global/A-Inject/A-Inject.error.d.ts +0 -5
  168. package/dist/src/global/A-Inject/A-Inject.error.js +0 -10
  169. package/dist/src/global/A-Inject/A-Inject.error.js.map +0 -1
  170. package/dist/src/global/A-Inject/A-Inject.types.d.ts +0 -42
  171. package/dist/src/global/A-Inject/A-Inject.types.js +0 -3
  172. package/dist/src/global/A-Inject/A-Inject.types.js.map +0 -1
  173. package/dist/src/global/A-Meta/A-Meta.class.d.ts +0 -97
  174. package/dist/src/global/A-Meta/A-Meta.class.js +0 -164
  175. package/dist/src/global/A-Meta/A-Meta.class.js.map +0 -1
  176. package/dist/src/global/A-Meta/A-Meta.types.d.ts +0 -14
  177. package/dist/src/global/A-Meta/A-Meta.types.js +0 -3
  178. package/dist/src/global/A-Meta/A-Meta.types.js.map +0 -1
  179. package/dist/src/global/A-Scope/A-Scope.class.d.ts +0 -466
  180. package/dist/src/global/A-Scope/A-Scope.class.js +0 -791
  181. package/dist/src/global/A-Scope/A-Scope.class.js.map +0 -1
  182. package/dist/src/global/A-Scope/A-Scope.error.d.ts +0 -8
  183. package/dist/src/global/A-Scope/A-Scope.error.js +0 -13
  184. package/dist/src/global/A-Scope/A-Scope.error.js.map +0 -1
  185. package/dist/src/global/A-Scope/A-Scope.types.d.ts +0 -81
  186. package/dist/src/global/A-Scope/A-Scope.types.js +0 -3
  187. package/dist/src/global/A-Scope/A-Scope.types.js.map +0 -1
  188. package/dist/src/global/A-Stage/A-Stage.class.d.ts +0 -112
  189. package/dist/src/global/A-Stage/A-Stage.class.js +0 -240
  190. package/dist/src/global/A-Stage/A-Stage.class.js.map +0 -1
  191. package/dist/src/global/A-Stage/A-Stage.error.d.ts +0 -4
  192. package/dist/src/global/A-Stage/A-Stage.error.js +0 -11
  193. package/dist/src/global/A-Stage/A-Stage.error.js.map +0 -1
  194. package/dist/src/global/A-Stage/A-Stage.types.d.ts +0 -97
  195. package/dist/src/global/A-Stage/A-Stage.types.js +0 -43
  196. package/dist/src/global/A-Stage/A-Stage.types.js.map +0 -1
  197. package/dist/src/global/A-StepManager/A-StepManager.class.d.ts +0 -20
  198. package/dist/src/global/A-StepManager/A-StepManager.class.js +0 -111
  199. package/dist/src/global/A-StepManager/A-StepManager.class.js.map +0 -1
  200. package/dist/src/global/A-StepManager/A-StepManager.error.d.ts +0 -4
  201. package/dist/src/global/A-StepManager/A-StepManager.error.js +0 -9
  202. package/dist/src/global/A-StepManager/A-StepManager.error.js.map +0 -1
  203. package/dist/src/global/ASEID/ASEID.class.d.ts +0 -130
  204. package/dist/src/global/ASEID/ASEID.class.js +0 -167
  205. package/dist/src/global/ASEID/ASEID.class.js.map +0 -1
  206. package/dist/src/global/ASEID/ASEID.constants.d.ts +0 -0
  207. package/dist/src/global/ASEID/ASEID.constants.js +0 -2
  208. package/dist/src/global/ASEID/ASEID.constants.js.map +0 -1
  209. package/dist/src/global/ASEID/ASEID.error.d.ts +0 -5
  210. package/dist/src/global/ASEID/ASEID.error.js +0 -10
  211. package/dist/src/global/ASEID/ASEID.error.js.map +0 -1
  212. package/dist/src/global/ASEID/ASEID.types.d.ts +0 -65
  213. package/dist/src/global/ASEID/ASEID.types.js +0 -5
  214. package/dist/src/global/ASEID/ASEID.types.js.map +0 -1
  215. package/dist/src/helpers/A_Common.helper.d.ts +0 -28
  216. package/dist/src/helpers/A_Common.helper.js +0 -170
  217. package/dist/src/helpers/A_Common.helper.js.map +0 -1
  218. package/dist/src/helpers/A_Formatter.helper.d.ts +0 -35
  219. package/dist/src/helpers/A_Formatter.helper.js +0 -62
  220. package/dist/src/helpers/A_Formatter.helper.js.map +0 -1
  221. package/dist/src/helpers/A_Identity.helper.d.ts +0 -29
  222. package/dist/src/helpers/A_Identity.helper.js +0 -43
  223. package/dist/src/helpers/A_Identity.helper.js.map +0 -1
  224. package/dist/src/helpers/A_TypeGuards.helper.d.ts +0 -207
  225. package/dist/src/helpers/A_TypeGuards.helper.js +0 -296
  226. package/dist/src/helpers/A_TypeGuards.helper.js.map +0 -1
  227. package/dist/src/types/A_Common.types.d.ts +0 -36
  228. package/dist/src/types/A_Common.types.js +0 -3
  229. package/dist/src/types/A_Common.types.js.map +0 -1
  230. package/index.ts +0 -81
  231. package/src/global/A-Dependency/A-DependencyReference.class.ts +0 -61
  232. package/src/global/A-Dependency/A-DependencyReference.types.ts +0 -61
  233. package/trace-require.js +0 -46
  234. package/tsconfig.build.json +0 -58
@@ -98,14 +98,14 @@ describe('A-StepManager tests', () => {
98
98
  name: 'step5',
99
99
  component: ComponentA,
100
100
  handler: 'step5',
101
- before: ['step2'],
102
- after: ['step6']
101
+ before: /^.*\.*step2$/.source,
102
+ after: /^.*\.*step6$/.source
103
103
  },
104
104
  {
105
105
  name: 'step6',
106
106
  component: ComponentA,
107
107
  handler: 'step6',
108
- before: ['ComponentA.step2']
108
+ before: /^ComponentA\.step2$/.source
109
109
  },
110
110
  ]);
111
111
 
@@ -162,7 +162,7 @@ describe('A-StepManager tests', () => {
162
162
  name: 'step6',
163
163
  component: ComponentA,
164
164
  handler: 'step6',
165
- before: [new RegExp('.*').source],
165
+ before: /.*/.source,
166
166
  },
167
167
  ]);
168
168
 
@@ -213,13 +213,13 @@ describe('A-StepManager tests', () => {
213
213
  name: 'step5',
214
214
  component: ComponentA,
215
215
  handler: 'step5',
216
- before: [new RegExp('.*').source],
216
+ before: new RegExp('.*').source,
217
217
  },
218
218
  {
219
219
  name: 'step6',
220
220
  component: ComponentA,
221
221
  handler: 'step6',
222
- before: [new RegExp('.*').source],
222
+ before: new RegExp('.*').source,
223
223
  },
224
224
  ]);
225
225
 
@@ -276,8 +276,8 @@ describe('A-StepManager tests', () => {
276
276
  name: 'test',
277
277
  component: ComponentA,
278
278
  handler: 'test',
279
- before: [new RegExp('step(4|5)').source],
280
- after: [new RegExp('step(1|2)').source],
279
+ before: /^.*\.step(4|5)$/.source,
280
+ after: /^.*\.step(1|2)$/.source,
281
281
  },
282
282
  ]);
283
283
 
@@ -326,8 +326,8 @@ describe('A-StepManager tests', () => {
326
326
  name: 'inject',
327
327
  component: ComponentA,
328
328
  handler: 'inject',
329
- before: [/ComponentB\.read.+/.source],
330
- after: ['ComponentA.initialize']
329
+ before: /ComponentB\.read.+/ig.source,
330
+ after: 'ComponentA.initialize'
331
331
  },
332
332
  ]);
333
333
 
@@ -342,5 +342,54 @@ describe('A-StepManager tests', () => {
342
342
  ]);
343
343
  });
344
344
 
345
-
345
+
346
+ it('Should allow to override steps by regexp', async () => {
347
+ class ComponentA extends A_Component {
348
+ async step1() { }
349
+ async step2() { }
350
+ async step3() { }
351
+ async step4() { }
352
+ async step5() { }
353
+ async test() { }
354
+ }
355
+
356
+ const sm = new A_StepsManager([
357
+ {
358
+ name: 'step1',
359
+ component: ComponentA,
360
+ handler: 'step1',
361
+ },
362
+ {
363
+ name: 'step2',
364
+ component: ComponentA,
365
+ handler: 'step2',
366
+ },
367
+ {
368
+ name: 'step3',
369
+ component: ComponentA,
370
+ handler: 'step3',
371
+ override: /^.*\.step(4|5)$/.source
372
+ },
373
+ {
374
+ name: 'step4',
375
+ component: ComponentA,
376
+ handler: 'step4',
377
+ },
378
+ {
379
+ name: 'step5',
380
+ component: ComponentA,
381
+ handler: 'step5',
382
+ }
383
+ ]);
384
+
385
+
386
+ const result = sm.toSortedArray();
387
+
388
+ expect(result).toEqual([
389
+ "ComponentA.step1",
390
+ "ComponentA.step2",
391
+ "ComponentA.step3",
392
+ ]);
393
+ });
394
+
346
395
  });
package/tsconfig.json CHANGED
@@ -50,8 +50,8 @@
50
50
  "src/**/*",
51
51
  "tests/**/*",
52
52
  "examples/**/*",
53
- "index.ts"
54
- , "../adaas-a-utils/src/lib" ],
53
+ "src/index.ts"
54
+ ],
55
55
  "exclude": [
56
56
  "node_modules/**/*",
57
57
  "dist/**/*",
package/tsup.config.ts ADDED
@@ -0,0 +1,32 @@
1
+ import { defineConfig } from "tsup";
2
+
3
+ export default defineConfig((options) => ({
4
+ entry: ["src/index.ts"],
5
+ format: ["esm", "cjs"],
6
+ dts: true,
7
+ clean: !options.watch,
8
+ sourcemap: true,
9
+ target: "es2020",
10
+ minify: !options.watch,
11
+ treeshake: "recommended",
12
+ skipNodeModulesBundle: true,
13
+ splitting: false,
14
+ silent: false,
15
+ platform: "neutral",
16
+ // Add hash to filenames for cache busting in production builds
17
+ outExtension({ format }) {
18
+ return {
19
+ js: format === "esm" ? `.mjs` : `.cjs`,
20
+ };
21
+ },
22
+ // Extra optimization options (for 2025 esbuild)
23
+ esbuildOptions(options) {
24
+ options.keepNames = true; // Preserve class/function names for better debugging
25
+ options.charset = "utf8";
26
+ },
27
+
28
+ // Enable minification for output size (production only)
29
+ minifyWhitespace: !options.watch,
30
+ minifyIdentifiers: !options.watch,
31
+ minifySyntax: !options.watch,
32
+ }));
package/dist/index.js DELETED
@@ -1,112 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.A_TypeGuards = exports.A_StepManagerError = exports.A_StepsManager = exports.A_IdentityHelper = exports.A_FormatterHelper = exports.A_CommonHelper = exports.A_Abstraction_Extend = exports.A_Feature_Extend = exports.A_Feature_Define = exports.A_Inject = exports.A_Fragment = exports.A_Meta = exports.A_ScopeError = exports.A_Scope = exports.A_StageError = exports.A_Stage = exports.A_FeatureError = exports.A_Feature = exports.ASEID_Error = exports.ASEID = exports.A_Error = exports.A_CallerError = exports.A_Caller = exports.A_AbstractionError = exports.A_Abstraction = 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
- // =================================================================================================
21
- __exportStar(require("./src/constants/env.constants"), exports);
22
- __exportStar(require("./src/types/A_Common.types"), exports);
23
- // ---------------------- Major Components ----------------------
24
- var A_Context_class_1 = require("./src/global/A-Context/A-Context.class");
25
- Object.defineProperty(exports, "A_Context", { enumerable: true, get: function () { return A_Context_class_1.A_Context; } });
26
- __exportStar(require("./src/global/A-Context/A-Context.types"), exports);
27
- var A_Concept_class_1 = require("./src/global/A-Concept/A-Concept.class");
28
- Object.defineProperty(exports, "A_Concept", { enumerable: true, get: function () { return A_Concept_class_1.A_Concept; } });
29
- var A_Concept_meta_1 = require("./src/global/A-Concept/A-Concept.meta");
30
- Object.defineProperty(exports, "A_ConceptMeta", { enumerable: true, get: function () { return A_Concept_meta_1.A_ConceptMeta; } });
31
- __exportStar(require("./src/global/A-Concept/A-Concept.types"), exports);
32
- var A_Container_class_1 = require("./src/global/A-Container/A-Container.class");
33
- Object.defineProperty(exports, "A_Container", { enumerable: true, get: function () { return A_Container_class_1.A_Container; } });
34
- var A_Container_meta_1 = require("./src/global/A-Container/A-Container.meta");
35
- Object.defineProperty(exports, "A_ContainerMeta", { enumerable: true, get: function () { return A_Container_meta_1.A_ContainerMeta; } });
36
- __exportStar(require("./src/global/A-Container/A-Container.class"), exports);
37
- var A_Component_class_1 = require("./src/global/A-Component/A-Component.class");
38
- Object.defineProperty(exports, "A_Component", { enumerable: true, get: function () { return A_Component_class_1.A_Component; } });
39
- var A_Component_meta_1 = require("./src/global/A-Component/A-Component.meta");
40
- Object.defineProperty(exports, "A_ComponentMeta", { enumerable: true, get: function () { return A_Component_meta_1.A_ComponentMeta; } });
41
- __exportStar(require("./src/global/A-Component/A-Component.types"), exports);
42
- var A_Entity_class_1 = require("./src/global/A-Entity/A-Entity.class");
43
- Object.defineProperty(exports, "A_Entity", { enumerable: true, get: function () { return A_Entity_class_1.A_Entity; } });
44
- __exportStar(require("./src/global/A-Entity/A-Entity.types"), exports);
45
- // ---------------------- Common Components ----------------------
46
- var A_Abstraction_class_1 = require("./src/global/A-Abstraction/A-Abstraction.class");
47
- Object.defineProperty(exports, "A_Abstraction", { enumerable: true, get: function () { return A_Abstraction_class_1.A_Abstraction; } });
48
- var A_Abstraction_error_1 = require("./src/global/A-Abstraction/A-Abstraction.error");
49
- Object.defineProperty(exports, "A_AbstractionError", { enumerable: true, get: function () { return A_Abstraction_error_1.A_AbstractionError; } });
50
- __exportStar(require("./src/global/A-Abstraction/A-Abstraction.types"), exports);
51
- var A_Caller_class_1 = require("./src/global/A-Caller/A_Caller.class");
52
- Object.defineProperty(exports, "A_Caller", { enumerable: true, get: function () { return A_Caller_class_1.A_Caller; } });
53
- var A_Caller_error_1 = require("./src/global/A-Caller/A_Caller.error");
54
- Object.defineProperty(exports, "A_CallerError", { enumerable: true, get: function () { return A_Caller_error_1.A_CallerError; } });
55
- __exportStar(require("./src/global/A-Caller/A_Caller.types"), exports);
56
- var A_Error_class_1 = require("./src/global/A-Error/A_Error.class");
57
- Object.defineProperty(exports, "A_Error", { enumerable: true, get: function () { return A_Error_class_1.A_Error; } });
58
- __exportStar(require("./src/global/A-Error/A_Error.types"), exports);
59
- var ASEID_class_1 = require("./src/global/ASEID/ASEID.class");
60
- Object.defineProperty(exports, "ASEID", { enumerable: true, get: function () { return ASEID_class_1.ASEID; } });
61
- var ASEID_error_1 = require("./src/global/ASEID/ASEID.error");
62
- Object.defineProperty(exports, "ASEID_Error", { enumerable: true, get: function () { return ASEID_error_1.ASEID_Error; } });
63
- __exportStar(require("./src/global/ASEID/ASEID.types"), exports);
64
- var A_Feature_class_1 = require("./src/global/A-Feature/A-Feature.class");
65
- Object.defineProperty(exports, "A_Feature", { enumerable: true, get: function () { return A_Feature_class_1.A_Feature; } });
66
- var A_Feature_error_1 = require("./src/global/A-Feature/A-Feature.error");
67
- Object.defineProperty(exports, "A_FeatureError", { enumerable: true, get: function () { return A_Feature_error_1.A_FeatureError; } });
68
- __exportStar(require("./src/global/A-Feature/A-Feature.types"), exports);
69
- var A_Stage_class_1 = require("./src/global/A-Stage/A-Stage.class");
70
- Object.defineProperty(exports, "A_Stage", { enumerable: true, get: function () { return A_Stage_class_1.A_Stage; } });
71
- var A_Stage_error_1 = require("./src/global/A-Stage/A-Stage.error");
72
- Object.defineProperty(exports, "A_StageError", { enumerable: true, get: function () { return A_Stage_error_1.A_StageError; } });
73
- __exportStar(require("./src/global/A-Stage/A-Stage.types"), exports);
74
- var A_Scope_class_1 = require("./src/global/A-Scope/A-Scope.class");
75
- Object.defineProperty(exports, "A_Scope", { enumerable: true, get: function () { return A_Scope_class_1.A_Scope; } });
76
- var A_Scope_error_1 = require("./src/global/A-Scope/A-Scope.error");
77
- Object.defineProperty(exports, "A_ScopeError", { enumerable: true, get: function () { return A_Scope_error_1.A_ScopeError; } });
78
- __exportStar(require("./src/global/A-Scope/A-Scope.types"), exports);
79
- var A_Meta_class_1 = require("./src/global/A-Meta/A-Meta.class");
80
- Object.defineProperty(exports, "A_Meta", { enumerable: true, get: function () { return A_Meta_class_1.A_Meta; } });
81
- __exportStar(require("./src/global/A-Meta/A-Meta.types"), exports);
82
- var A_Fragment_class_1 = require("./src/global/A-Fragment/A-Fragment.class");
83
- Object.defineProperty(exports, "A_Fragment", { enumerable: true, get: function () { return A_Fragment_class_1.A_Fragment; } });
84
- __exportStar(require("./src/global/A-Fragment/A-Fragment.types"), exports);
85
- // =================================================================================================
86
- // =============================== Export Decorators ===============================================
87
- // =================================================================================================
88
- var A_Inject_decorator_1 = require("./src/global/A-Inject/A-Inject.decorator");
89
- Object.defineProperty(exports, "A_Inject", { enumerable: true, get: function () { return A_Inject_decorator_1.A_Inject; } });
90
- __exportStar(require("./src/global/A-Inject/A-Inject.types"), exports);
91
- var A_Feature_Define_decorator_1 = require("./src/global/A-Feature/A-Feature-Define.decorator");
92
- Object.defineProperty(exports, "A_Feature_Define", { enumerable: true, get: function () { return A_Feature_Define_decorator_1.A_Feature_Define; } });
93
- var A_Feature_Extend_decorator_1 = require("./src/global/A-Feature/A-Feature-Extend.decorator");
94
- Object.defineProperty(exports, "A_Feature_Extend", { enumerable: true, get: function () { return A_Feature_Extend_decorator_1.A_Feature_Extend; } });
95
- var A_Abstraction_Extend_decorator_1 = require("./src/global/A-Abstraction/A-Abstraction-Extend.decorator");
96
- Object.defineProperty(exports, "A_Abstraction_Extend", { enumerable: true, get: function () { return A_Abstraction_Extend_decorator_1.A_Abstraction_Extend; } });
97
- // =================================================================================================
98
- // =============================== Export Helpers ================================================
99
- // =================================================================================================
100
- var A_Common_helper_1 = require("./src/helpers/A_Common.helper");
101
- Object.defineProperty(exports, "A_CommonHelper", { enumerable: true, get: function () { return A_Common_helper_1.A_CommonHelper; } });
102
- var A_Formatter_helper_1 = require("./src/helpers/A_Formatter.helper");
103
- Object.defineProperty(exports, "A_FormatterHelper", { enumerable: true, get: function () { return A_Formatter_helper_1.A_FormatterHelper; } });
104
- var A_Identity_helper_1 = require("./src/helpers/A_Identity.helper");
105
- Object.defineProperty(exports, "A_IdentityHelper", { enumerable: true, get: function () { return A_Identity_helper_1.A_IdentityHelper; } });
106
- var A_StepManager_class_1 = require("./src/global/A-StepManager/A-StepManager.class");
107
- Object.defineProperty(exports, "A_StepsManager", { enumerable: true, get: function () { return A_StepManager_class_1.A_StepsManager; } });
108
- var A_StepManager_error_1 = require("./src/global/A-StepManager/A-StepManager.error");
109
- Object.defineProperty(exports, "A_StepManagerError", { enumerable: true, get: function () { return A_StepManager_error_1.A_StepManagerError; } });
110
- var A_TypeGuards_helper_1 = require("./src/helpers/A_TypeGuards.helper");
111
- Object.defineProperty(exports, "A_TypeGuards", { enumerable: true, get: function () { return A_TypeGuards_helper_1.A_TypeGuards; } });
112
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oGAAoG;AACpG,oGAAoG;AACpG,oGAAoG;AACpG,gEAA8C;AAC9C,6DAA2C;AAE3C,iEAAiE;AACjE,0EAAmE;AAA1D,4GAAA,SAAS,OAAA;AAClB,yEAAuD;AAEvD,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,uEAAqD;AAGrD,kEAAkE;AAClE,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AC3B,yEAAiE;AAAxD,mHAAA,YAAY,OAAA"}
@@ -1,33 +0,0 @@
1
- export declare const A_CONSTANTS__DEFAULT_ENV_VARIABLES: {
2
- /**
3
- * Name of the application
4
- *
5
- * DEFAULT value is 'a-concept'
6
- *
7
- * [!] Provided name will be used for all aseids in the application by default
8
- */
9
- readonly A_CONCEPT_NAME: "A_CONCEPT_NAME";
10
- /**
11
- * Root scope of the application
12
- *
13
- * DEFAULT value is 'root'
14
- *
15
- * [!] Provided name will be used for all aseids in the application by default
16
- */
17
- readonly A_CONCEPT_ROOT_SCOPE: "A_CONCEPT_ROOT_SCOPE";
18
- /**
19
- * Environment of the application e.g. development, production, staging
20
- */
21
- readonly A_CONCEPT_ENVIRONMENT: "A_CONCEPT_ENVIRONMENT";
22
- /**
23
- * Root folder of the application
24
- * [!] Automatically set by A-Concept when the application starts
25
- */
26
- readonly A_CONCEPT_ROOT_FOLDER: "A_CONCEPT_ROOT_FOLDER";
27
- /**
28
- * Allows to define a default error description for errors thrown without a description
29
- */
30
- readonly A_ERROR_DEFAULT_DESCRIPTION: "A_ERROR_DEFAULT_DESCRIPTION";
31
- };
32
- export type A_TYPES__ConceptENVVariables = (typeof A_CONSTANTS__DEFAULT_ENV_VARIABLES)[keyof typeof A_CONSTANTS__DEFAULT_ENV_VARIABLES][];
33
- export declare const A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY: readonly ["A_CONCEPT_NAME", "A_CONCEPT_ROOT_SCOPE", "A_CONCEPT_ENVIRONMENT", "A_CONCEPT_ROOT_FOLDER", "A_ERROR_DEFAULT_DESCRIPTION"];
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY = exports.A_CONSTANTS__DEFAULT_ENV_VARIABLES = void 0;
4
- exports.A_CONSTANTS__DEFAULT_ENV_VARIABLES = {
5
- // ----------------------------------------------------------
6
- // A-Concept Core Environment Variables
7
- // ----------------------------------------------------------
8
- // These environment variables are used by A-Concept core to configure the application
9
- // ----------------------------------------------------------
10
- /**
11
- * Name of the application
12
- *
13
- * DEFAULT value is 'a-concept'
14
- *
15
- * [!] Provided name will be used for all aseids in the application by default
16
- */
17
- A_CONCEPT_NAME: 'A_CONCEPT_NAME',
18
- /**
19
- * Root scope of the application
20
- *
21
- * DEFAULT value is 'root'
22
- *
23
- * [!] Provided name will be used for all aseids in the application by default
24
- */
25
- A_CONCEPT_ROOT_SCOPE: 'A_CONCEPT_ROOT_SCOPE',
26
- /**
27
- * Environment of the application e.g. development, production, staging
28
- */
29
- A_CONCEPT_ENVIRONMENT: 'A_CONCEPT_ENVIRONMENT',
30
- /**
31
- * Root folder of the application
32
- * [!] Automatically set by A-Concept when the application starts
33
- */
34
- A_CONCEPT_ROOT_FOLDER: 'A_CONCEPT_ROOT_FOLDER',
35
- /**
36
- * Allows to define a default error description for errors thrown without a description
37
- */
38
- A_ERROR_DEFAULT_DESCRIPTION: 'A_ERROR_DEFAULT_DESCRIPTION',
39
- };
40
- exports.A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY = [
41
- exports.A_CONSTANTS__DEFAULT_ENV_VARIABLES.A_CONCEPT_NAME,
42
- exports.A_CONSTANTS__DEFAULT_ENV_VARIABLES.A_CONCEPT_ROOT_SCOPE,
43
- exports.A_CONSTANTS__DEFAULT_ENV_VARIABLES.A_CONCEPT_ENVIRONMENT,
44
- exports.A_CONSTANTS__DEFAULT_ENV_VARIABLES.A_CONCEPT_ROOT_FOLDER,
45
- exports.A_CONSTANTS__DEFAULT_ENV_VARIABLES.A_ERROR_DEFAULT_DESCRIPTION,
46
- ];
47
- //# sourceMappingURL=env.constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.constants.js","sourceRoot":"","sources":["../../../src/constants/env.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,kCAAkC,GAAG;IAC9C,6DAA6D;IAC7D,uCAAuC;IACvC,6DAA6D;IAC7D,sFAAsF;IACtF,6DAA6D;IAC7D;;;;;;OAMG;IACH,cAAc,EAAE,gBAAgB;IAChC;;;;;;OAMG;IACH,oBAAoB,EAAE,sBAAsB;IAC5C;;OAEG;IACH,qBAAqB,EAAE,uBAAuB;IAC9C;;;OAGG;IACH,qBAAqB,EAAE,uBAAuB;IAC9C;;OAEG;IACH,2BAA2B,EAAE,6BAA6B;CACpD,CAAA;AAOG,QAAA,wCAAwC,GAAG;IACpD,0CAAkC,CAAC,cAAc;IACjD,0CAAkC,CAAC,oBAAoB;IACvD,0CAAkC,CAAC,qBAAqB;IACxD,0CAAkC,CAAC,qBAAqB;IAExD,0CAAkC,CAAC,2BAA2B;CACxD,CAAC"}
@@ -1,23 +0,0 @@
1
- import { A_TYPES__AbstractionDecoratorConfig, A_TYPES__AbstractionDecoratorDescriptor } from "./A-Abstraction.types";
2
- import { A_Component } from "../A-Component/A-Component.class";
3
- import { A_Container } from "../A-Container/A-Container.class";
4
- import { A_TYPES__ConceptAbstractions } from "../A-Concept/A-Concept.constants";
5
- /**
6
- * A-Abstraction Extend decorator allows to extends behavior of each concept abstraction execution.
7
- * In case some components or containers requires to extend the behavior of the abstraction like 'start', 'build' or 'deploy'
8
- * for example, this decorator allows to do so.
9
- *
10
- * @param name - abstraction name
11
- * @param config - configuration of the abstraction extension
12
- * @returns
13
- */
14
- export declare function A_Abstraction_Extend(
15
- /**
16
- * Name of the Concept Abstraction to extend
17
- */
18
- name: A_TYPES__ConceptAbstractions,
19
- /**
20
- * Configuration of the Abstraction Extension
21
- *
22
- */
23
- config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
@@ -1,89 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_Abstraction_Extend = A_Abstraction_Extend;
4
- const A_Context_class_1 = require("../A-Context/A-Context.class");
5
- const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
6
- const A_Container_constants_1 = require("../A-Container/A-Container.constants");
7
- const A_Component_constants_1 = require("../A-Component/A-Component.constants");
8
- const A_Abstraction_error_1 = require("./A-Abstraction.error");
9
- const A_TypeGuards_helper_1 = require("../../helpers/A_TypeGuards.helper");
10
- /**
11
- * A-Abstraction Extend decorator allows to extends behavior of each concept abstraction execution.
12
- * In case some components or containers requires to extend the behavior of the abstraction like 'start', 'build' or 'deploy'
13
- * for example, this decorator allows to do so.
14
- *
15
- * @param name - abstraction name
16
- * @param config - configuration of the abstraction extension
17
- * @returns
18
- */
19
- function A_Abstraction_Extend(
20
- /**
21
- * Name of the Concept Abstraction to extend
22
- */
23
- name,
24
- /**
25
- * Configuration of the Abstraction Extension
26
- *
27
- */
28
- config = {}) {
29
- return function (target, propertyKey, descriptor) {
30
- var _a, _b, _c;
31
- // for error messages
32
- const componentName = ((_a = target === null || target === void 0 ? void 0 : target.constructor) === null || _a === void 0 ? void 0 : _a.name) || String(target) || 'UnknownComponent';
33
- if (!name)
34
- throw new A_Abstraction_error_1.A_AbstractionError(A_Abstraction_error_1.A_AbstractionError.AbstractionExtensionError, `Abstraction name must be provided to extend abstraction for '${componentName}'.`);
35
- // Only Containers and Components can extend Concept Abstractions
36
- if (!A_TypeGuards_helper_1.A_TypeGuards.isConstructorAvailableForAbstraction(target)) {
37
- throw new A_Abstraction_error_1.A_AbstractionError(A_Abstraction_error_1.A_AbstractionError.AbstractionExtensionError, `Unable to extend Abstraction '${name}' for '${componentName}'. Only A-Containers and A-Components can extend Abstractions.`);
38
- }
39
- let metaKey;
40
- const meta = A_Context_class_1.A_Context.meta(target);
41
- switch (true) {
42
- case A_TypeGuards_helper_1.A_TypeGuards.isContainerConstructor(target) || A_TypeGuards_helper_1.A_TypeGuards.isContainerInstance(target):
43
- metaKey = A_Container_constants_1.A_TYPES__ContainerMetaKey.ABSTRACTIONS;
44
- break;
45
- case A_TypeGuards_helper_1.A_TypeGuards.isComponentConstructor(target) || A_TypeGuards_helper_1.A_TypeGuards.isComponentInstance(target):
46
- metaKey = A_Component_constants_1.A_TYPES__ComponentMetaKey.ABSTRACTIONS;
47
- break;
48
- }
49
- const setName = `CONCEPT_ABSTRACTION::${name}`;
50
- // Get the existed metadata or create a new one
51
- const existedMeta = meta.get(metaKey) ?
52
- new A_Meta_class_1.A_Meta().from(meta.get(metaKey))
53
- : new A_Meta_class_1.A_Meta();
54
- // Set the metadata of the method to define a custom Stage with name
55
- const existedMetaValue = [
56
- ...(existedMeta.get(setName) || [])
57
- ];
58
- const existedIndex = existedMetaValue.findIndex(item => item.handler === propertyKey);
59
- const abstraction = {
60
- name: setName,
61
- handler: propertyKey,
62
- behavior: config.behavior || 'sync',
63
- throwOnError: config.throwOnError !== undefined ? config.throwOnError : true,
64
- before: (((_b = config.before) === null || _b === void 0 ? void 0 : _b.map(b => b instanceof RegExp
65
- ? b.source
66
- : new RegExp(`^.*${b.replace(/\./g, '\\.')}$`).source))
67
- || []),
68
- after: (((_c = config.after) === null || _c === void 0 ? void 0 : _c.map(a => a instanceof RegExp
69
- ? a.source
70
- : new RegExp(`^.*${a.replace(/\./g, '\\.')}$`).source))
71
- || []),
72
- };
73
- if (existedIndex !== -1) {
74
- // Update the existing method in the metadata
75
- existedMetaValue[existedIndex] = abstraction;
76
- }
77
- else {
78
- // Add the new method to the metadata
79
- existedMetaValue.push(abstraction);
80
- }
81
- // Set the metadata of the method to define a custom Feature with name
82
- existedMeta.set(setName, existedMetaValue);
83
- // Update the metadata of the container with the new Stage definition
84
- A_Context_class_1.A_Context
85
- .meta(target)
86
- .set(metaKey, existedMeta);
87
- };
88
- }
89
- //# sourceMappingURL=A-Abstraction-Extend.decorator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Abstraction-Extend.decorator.js","sourceRoot":"","sources":["../../../../src/global/A-Abstraction/A-Abstraction-Extend.decorator.ts"],"names":[],"mappings":";;AA2BA,oDAmGC;AAzHD,uFAA8E;AAI9E,8EAAqE;AAErE,qG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AAA;QAED,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE,CAAC;YACtB,6CAA6C;YAC7C,gBAAgB,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC;QACjD,CAAC;aAAM,CAAC;YACJ,qCAAqC;YACrC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC;QAED,sEAAsE;QACtE,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;QAE3C,sEAAsE;QACtE,2BAAS;aACJ,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CACA,OAAO,EACP,WAAW,CACd,CAAC;IACV,CAAC,CAAC;AACN,CAAC"}
@@ -1,74 +0,0 @@
1
- import { A_Abstraction_Extend } from "./A-Abstraction-Extend.decorator";
2
- import { A_Feature } from "../A-Feature/A-Feature.class";
3
- import { A_TYPES__Abstraction_Init } from "./A-Abstraction.types";
4
- import { A_Scope } from "../A-Scope/A-Scope.class";
5
- import { A_TYPES__ConceptAbstractions } from "../A-Concept/A-Concept.constants";
6
- export declare class A_Abstraction {
7
- /**
8
- * The name of the Abstraction e.g. 'deploy', 'start', 'test', etc.
9
- */
10
- protected _name: A_TYPES__ConceptAbstractions;
11
- /**
12
- * List of features that are part of this Abstraction
13
- */
14
- protected _features: A_Feature[];
15
- /**
16
- * The Feature currently being processed
17
- */
18
- protected _current?: A_Feature;
19
- /**
20
- * Actual Index of the current Feature being processed
21
- */
22
- protected _index: number;
23
- /**
24
- * Allows to extends A-Abstraction with additional methods
25
- */
26
- static get Extend(): typeof A_Abstraction_Extend;
27
- /**
28
- * A-Abstraction is an object that is common for any application.
29
- * By providing components and creating abstraction extensions it's possible to create a unique behavior of the whole solution.
30
- *
31
- * Every application has basic abstractions like 'start', 'stop', 'deploy', 'test', etc.
32
- * They can be easily extended with additional logic from both containers and components.
33
- *
34
- *
35
- * @param params
36
- */
37
- constructor(
38
- /**
39
- * Parameters to define the A-Abstraction
40
- */
41
- params: A_TYPES__Abstraction_Init);
42
- /**
43
- * Returns the name of the Abstraction
44
- */
45
- get name(): string;
46
- /**
47
- * Returns the current Feature being processed
48
- */
49
- get feature(): A_Feature | undefined;
50
- /**
51
- * This method checks if the A-Feature is done
52
- *
53
- * @returns
54
- */
55
- get isDone(): boolean;
56
- [Symbol.iterator](): Iterator<A_Feature, any>;
57
- /**
58
- * This method moves the Abstraction processing to the next Feature in the list
59
- *
60
- * @param stage
61
- */
62
- next(stage: any): void;
63
- /**
64
- * Allows to process all stages of the Abstraction
65
- *
66
- * @returns
67
- */
68
- process(
69
- /**
70
- * Allows to override the scope in which the Abstraction will be processed
71
- *
72
- */
73
- scope?: A_Scope): Promise<void>;
74
- }