@adaas/a-concept 0.0.2 → 0.0.4

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 (303) hide show
  1. package/dist/examples/simple/components/A.component.d.ts +7 -0
  2. package/dist/examples/simple/components/A.component.js +57 -0
  3. package/dist/examples/simple/components/A.component.js.map +1 -0
  4. package/dist/examples/simple/components/B.component.d.ts +9 -0
  5. package/dist/examples/simple/components/B.component.js +77 -0
  6. package/dist/examples/simple/components/B.component.js.map +1 -0
  7. package/dist/examples/simple/concept.d.ts +1 -0
  8. package/dist/examples/simple/concept.js +53 -11
  9. package/dist/examples/simple/concept.js.map +1 -1
  10. package/dist/examples/simple/containers/Main.container.d.ts +11 -0
  11. package/dist/examples/simple/containers/Main.container.js +64 -0
  12. package/dist/examples/simple/containers/Main.container.js.map +1 -0
  13. package/dist/examples/simple/context/Fragment_A.context.d.ts +6 -0
  14. package/dist/examples/simple/context/Fragment_A.context.js +16 -0
  15. package/dist/examples/simple/context/Fragment_A.context.js.map +1 -0
  16. package/dist/examples/simple/context/Fragment_B.context.d.ts +6 -0
  17. package/dist/examples/simple/context/Fragment_B.context.js +16 -0
  18. package/dist/examples/simple/context/Fragment_B.context.js.map +1 -0
  19. package/dist/examples/simple-http-server/components/http-error-handler.component.d.ts +9 -0
  20. package/dist/examples/simple-http-server/components/http-error-handler.component.js +63 -0
  21. package/dist/examples/simple-http-server/components/http-error-handler.component.js.map +1 -0
  22. package/dist/examples/simple-http-server/components/http-request-handler.component.d.ts +2 -0
  23. package/dist/examples/simple-http-server/components/http-request-handler.component.js +7 -0
  24. package/dist/examples/simple-http-server/components/http-request-handler.component.js.map +1 -0
  25. package/dist/examples/simple-http-server/concept.js +21 -22
  26. package/dist/examples/simple-http-server/concept.js.map +1 -1
  27. package/dist/examples/simple-http-server/containers/http-server.container.d.ts +8 -8
  28. package/dist/examples/simple-http-server/containers/http-server.container.js +34 -30
  29. package/dist/examples/simple-http-server/containers/http-server.container.js.map +1 -1
  30. package/dist/examples/simple-http-server/containers/http-server.controller.js +1 -1
  31. package/dist/examples/simple-http-server/containers/http-server.router.js +2 -2
  32. package/dist/examples/simple-http-server/containers/http-server.router.js.map +1 -1
  33. package/dist/examples/simple-http-server/contexts/http-request.context.d.ts +13 -0
  34. package/dist/examples/simple-http-server/contexts/http-request.context.js +51 -0
  35. package/dist/examples/simple-http-server/contexts/http-request.context.js.map +1 -0
  36. package/dist/examples/simple-http-server/contexts/http-server.context.types.d.ts +0 -4
  37. package/dist/examples/simple-http-server/contexts/http-server.context.types.js +0 -98
  38. package/dist/examples/simple-http-server/contexts/http-server.context.types.js.map +1 -1
  39. package/dist/examples/simple-http-server/contexts/http-server.namespace.d.ts +1 -1
  40. package/dist/examples/simple-http-server/contexts/http-server.namespace.js +1 -1
  41. package/dist/examples/simple-http-server/controllers/users.controller.js +2 -2
  42. package/dist/examples/simple-http-server/test.d.ts +68 -0
  43. package/dist/examples/simple-http-server/test.js +162 -0
  44. package/dist/examples/simple-http-server/test.js.map +1 -0
  45. package/dist/index.d.ts +25 -7
  46. package/dist/index.js +55 -13
  47. package/dist/index.js.map +1 -1
  48. package/dist/src/base/A-Config/A-Config.container.d.ts +8 -0
  49. package/dist/src/base/A-Config/A-Config.container.js +64 -0
  50. package/dist/src/base/A-Config/A-Config.container.js.map +1 -0
  51. package/dist/src/base/A-Config/A-Config.context.d.ts +30 -0
  52. package/dist/src/base/A-Config/A-Config.context.js +58 -0
  53. package/dist/src/base/A-Config/A-Config.context.js.map +1 -0
  54. package/dist/src/base/A-Config/A-Config.types.d.ts +14 -0
  55. package/dist/src/base/A-Config/A-Config.types.js +3 -0
  56. package/dist/src/base/A-Config/A-Config.types.js.map +1 -0
  57. package/dist/src/base/A-Config/components/ConfigReader.component.d.ts +19 -0
  58. package/dist/src/base/A-Config/components/ConfigReader.component.js +53 -0
  59. package/dist/src/base/A-Config/components/ConfigReader.component.js.map +1 -0
  60. package/dist/src/base/A-Config/components/ENVConfigReader.component.d.ts +10 -0
  61. package/dist/src/base/A-Config/components/ENVConfigReader.component.js +37 -0
  62. package/dist/src/base/A-Config/components/ENVConfigReader.component.js.map +1 -0
  63. package/dist/src/base/A-Config/components/FileConfigReader.component.d.ts +11 -0
  64. package/dist/src/base/A-Config/components/FileConfigReader.component.js +47 -0
  65. package/dist/src/base/A-Config/components/FileConfigReader.component.js.map +1 -0
  66. package/dist/src/base/A-Errors/A-Errors.component.d.ts +18 -0
  67. package/dist/src/base/A-Errors/A-Errors.component.js +85 -0
  68. package/dist/src/base/A-Errors/A-Errors.component.js.map +1 -0
  69. package/dist/src/base/A-Errors/A-Errors.context.d.ts +27 -0
  70. package/dist/src/base/A-Errors/A-Errors.context.js +50 -0
  71. package/dist/src/base/A-Errors/A-Errors.context.js.map +1 -0
  72. package/dist/src/base/A-Errors/A-Errors.types.d.ts +5 -0
  73. package/dist/src/base/A-Errors/A-Errors.types.js +3 -0
  74. package/dist/src/base/A-Errors/A-Errors.types.js.map +1 -0
  75. package/dist/src/base/A-Logger/A-Logger.component.d.ts +28 -0
  76. package/dist/src/base/A-Logger/A-Logger.component.js +142 -0
  77. package/dist/src/base/A-Logger/A-Logger.component.js.map +1 -0
  78. package/dist/src/base/A-Logger/A-Logger.types.js +2 -0
  79. package/dist/src/base/A-Logger/A-Logger.types.js.map +1 -0
  80. package/dist/src/constants/A_ConceptLifecycle.constants.d.ts +0 -2
  81. package/dist/src/constants/A_ConceptLifecycle.constants.js +9 -10
  82. package/dist/src/constants/A_ConceptLifecycle.constants.js.map +1 -1
  83. package/dist/src/containers/A-Config/A-Config.container.js +1 -1
  84. package/dist/src/containers/A-Config/A-Config.namespace.d.ts +1 -1
  85. package/dist/src/containers/A-Config/A-Config.namespace.js +1 -1
  86. package/dist/src/containers/A-Config/A-Config.types.d.ts +1 -1
  87. package/dist/src/containers/A-Errors/A-Errors.container.js +1 -1
  88. package/dist/src/containers/A-Errors/A-Errors.namespace.d.ts +1 -1
  89. package/dist/src/containers/A-Errors/A-Errors.namespace.js +1 -1
  90. package/dist/src/containers/A-Errors/A-Errors.types.d.ts +1 -1
  91. package/dist/src/containers/A-Logger/A-Logger.container.js +1 -1
  92. package/dist/src/containers/A-Logger/A-Logger.namespace.d.ts +1 -1
  93. package/dist/src/containers/A-Logger/A-Logger.namespace.js +1 -1
  94. package/dist/src/containers/A-Logger/components/Logger.component.d.ts +1 -1
  95. package/dist/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.js.map +1 -1
  96. package/dist/src/decorators/A-Define/Feature/Feature.decorator.d.ts +16 -0
  97. package/dist/src/decorators/A-Define/Feature/Feature.decorator.js +36 -0
  98. package/dist/src/decorators/A-Define/Feature/Feature.decorator.js.map +1 -0
  99. package/dist/src/decorators/A-Define/Feature/Feature.decorator.types.d.ts +8 -0
  100. package/dist/src/decorators/A-Define/Feature/Feature.decorator.types.js +3 -0
  101. package/dist/src/decorators/A-Define/Feature/Feature.decorator.types.js.map +1 -0
  102. package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.d.ts +14 -0
  103. package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.js +24 -0
  104. package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.js.map +1 -0
  105. package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.types.d.ts +8 -0
  106. package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.types.js +3 -0
  107. package/dist/src/decorators/A-Define/Lifecycle/Lifecycle.decorator.types.js.map +1 -0
  108. package/dist/src/decorators/A-Define/index.d.ts +7 -0
  109. package/dist/src/decorators/A-Define/index.js +10 -0
  110. package/dist/src/decorators/A-Define/index.js.map +1 -0
  111. package/dist/src/decorators/A-Extend/A-Extend.decorator.d.ts +18 -0
  112. package/dist/src/decorators/A-Extend/A-Extend.decorator.js +37 -0
  113. package/dist/src/decorators/A-Extend/A-Extend.decorator.js.map +1 -0
  114. package/dist/src/decorators/A-Extend/A-Extend.decorator.types.d.ts +21 -0
  115. package/dist/src/decorators/A-Extend/A-Extend.decorator.types.js +3 -0
  116. package/dist/src/decorators/A-Extend/A-Extend.decorator.types.js.map +1 -0
  117. package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.d.ts +16 -0
  118. package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js +37 -0
  119. package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js.map +1 -0
  120. package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.d.ts +16 -0
  121. package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.js +42 -0
  122. package/dist/src/decorators/A-Feature/A-Feature-Extend.decorator.js.map +1 -0
  123. package/dist/src/decorators/A-Feature/A-Feature.decorator.types.d.ts +20 -0
  124. package/dist/src/decorators/A-Feature/A-Feature.decorator.types.js +1 -0
  125. package/dist/src/decorators/A-Inject/A-Inject.decorator.d.ts +12 -10
  126. package/dist/src/decorators/A-Inject/A-Inject.decorator.js +16 -26
  127. package/dist/src/decorators/A-Inject/A-Inject.decorator.js.map +1 -1
  128. package/dist/src/decorators/A-Inject/A-Inject.decorator.types.d.ts +4 -3
  129. package/dist/src/decorators/A-Stage/A-Stage.decorator.d.ts +12 -0
  130. package/dist/src/decorators/A-Stage/A-Stage.decorator.js +35 -0
  131. package/dist/src/decorators/A-Stage/A-Stage.decorator.js.map +1 -0
  132. package/dist/src/decorators/A-Stage/A-Stage.decorator.types.d.ts +2 -0
  133. package/dist/src/decorators/A-Stage/A-Stage.decorator.types.js +3 -0
  134. package/dist/src/decorators/A-Stage/A-Stage.decorator.types.js.map +1 -0
  135. package/dist/src/global/A-Channel/A-Channel.class.d.ts +18 -0
  136. package/dist/src/global/A-Channel/A-Channel.class.js +54 -0
  137. package/dist/src/global/A-Channel/A-Channel.class.js.map +1 -0
  138. package/dist/src/global/A-Channel/A-Channel.types.d.ts +35 -0
  139. package/dist/src/global/A-Channel/A-Channel.types.js +3 -0
  140. package/dist/src/global/A-Channel/A-Channel.types.js.map +1 -0
  141. package/dist/src/global/A-Component/A-Component.class.d.ts +1 -11
  142. package/dist/src/global/A-Component/A-Component.class.js +0 -7
  143. package/dist/src/global/A-Component/A-Component.class.js.map +1 -1
  144. package/dist/src/global/A-Component/A-Component.meta.d.ts +4 -0
  145. package/dist/src/global/A-Component/A-Component.meta.js +8 -0
  146. package/dist/src/global/A-Component/A-Component.meta.js.map +1 -0
  147. package/dist/src/global/A-Component/A-Component.types.d.ts +18 -0
  148. package/dist/src/global/A-Component/A-Component.types.js +10 -0
  149. package/dist/src/global/A-Component/A-Component.types.js.map +1 -0
  150. package/dist/src/global/A-Concept/A_Concept.class.d.ts +41 -17
  151. package/dist/src/global/A-Concept/A_Concept.class.js +120 -43
  152. package/dist/src/global/A-Concept/A_Concept.class.js.map +1 -1
  153. package/dist/src/global/A-Concept/A_Concept.meta.d.ts +3 -0
  154. package/dist/src/global/A-Concept/A_Concept.meta.js +9 -0
  155. package/dist/src/global/A-Concept/A_Concept.meta.js.map +1 -0
  156. package/dist/src/global/A-Concept/A_Concept.types.d.ts +31 -16
  157. package/dist/src/global/A-Concept/A_Concept.types.js +25 -0
  158. package/dist/src/global/A-Concept/A_Concept.types.js.map +1 -1
  159. package/dist/src/global/A-Container/A-Container.class.d.ts +72 -10
  160. package/dist/src/global/A-Container/A-Container.class.js +119 -9
  161. package/dist/src/global/A-Container/A-Container.class.js.map +1 -1
  162. package/dist/src/global/A-Container/A-Container.meta.d.ts +7 -0
  163. package/dist/src/global/A-Container/A-Container.meta.js +54 -0
  164. package/dist/src/global/A-Container/A-Container.meta.js.map +1 -0
  165. package/dist/src/global/A-Container/A-Container.types.d.ts +31 -0
  166. package/dist/src/global/A-Container/A-Container.types.js +9 -0
  167. package/dist/src/global/A-Container/A-Container.types.js.map +1 -0
  168. package/dist/src/global/A-Context/A-Context.class.d.ts +36 -54
  169. package/dist/src/global/A-Context/A-Context.class.js +127 -61
  170. package/dist/src/global/A-Context/A-Context.class.js.map +1 -1
  171. package/dist/src/global/A-Context/A-Context.types.d.ts +12 -0
  172. package/dist/src/global/A-Context/A-Context.types.js +1 -0
  173. package/dist/src/global/A-Context/A-ContextFragment.class.d.ts +12 -0
  174. package/dist/src/global/A-Context/A-ContextFragment.class.js +19 -0
  175. package/dist/src/global/A-Context/A-ContextFragment.class.js.map +1 -0
  176. package/dist/src/global/A-Dependency/A-DependencyReference.types.d.ts +0 -55
  177. package/dist/src/global/A-Dependency/A-DependencyReference.types.js +56 -1
  178. package/dist/src/global/A-Dependency/A-DependencyReference.types.js.map +1 -1
  179. package/dist/src/global/A-Entity/A-Entity.class.d.ts +10 -0
  180. package/dist/src/global/A-Entity/A-Entity.class.js +16 -0
  181. package/dist/src/global/A-Entity/A-Entity.class.js.map +1 -0
  182. package/dist/src/global/A-Entity/A-Entity.types.js +2 -0
  183. package/dist/src/global/A-Entity/A-Entity.types.js.map +1 -0
  184. package/dist/src/global/A-Feature/A-Feature.class.d.ts +44 -0
  185. package/dist/src/global/A-Feature/A-Feature.class.js +125 -0
  186. package/dist/src/global/A-Feature/A-Feature.class.js.map +1 -0
  187. package/dist/src/global/A-Feature/A-Feature.types.d.ts +17 -0
  188. package/dist/src/global/A-Feature/A-Feature.types.js +11 -0
  189. package/dist/src/global/A-Feature/A-Feature.types.js.map +1 -0
  190. package/dist/src/global/A-Fragment/A-Fragment.class.d.ts +38 -0
  191. package/dist/src/global/A-Fragment/A-Fragment.class.js +107 -0
  192. package/dist/src/global/A-Fragment/A-Fragment.class.js.map +1 -0
  193. package/dist/src/global/A-Fragment/A-Fragment.types.d.ts +3 -0
  194. package/dist/src/global/A-Fragment/A-Fragment.types.js +3 -0
  195. package/dist/src/global/A-Fragment/A-Fragment.types.js.map +1 -0
  196. package/dist/src/global/A-Meta/A-Meta.class.d.ts +11 -0
  197. package/dist/src/global/A-Meta/A-Meta.class.js +43 -0
  198. package/dist/src/global/A-Meta/A-Meta.class.js.map +1 -0
  199. package/dist/src/global/A-Meta/A-Meta.types.d.ts +0 -0
  200. package/dist/src/global/A-Meta/A-Meta.types.js +2 -0
  201. package/dist/src/global/A-Meta/A-Meta.types.js.map +1 -0
  202. package/dist/src/global/A-Scope/A-Scope.class.d.ts +51 -0
  203. package/dist/src/global/A-Scope/A-Scope.class.js +133 -0
  204. package/dist/src/global/A-Scope/A-Scope.class.js.map +1 -0
  205. package/dist/src/global/A-Scope/A-Scope.types.d.ts +32 -0
  206. package/dist/src/global/A-Scope/A-Scope.types.js +3 -0
  207. package/dist/src/global/A-Scope/A-Scope.types.js.map +1 -0
  208. package/dist/src/storage/A_Component.storage.d.ts +10 -0
  209. package/dist/src/storage/A_Component.storage.js +17 -0
  210. package/dist/src/storage/A_Component.storage.js.map +1 -0
  211. package/dist/src/storage/A_Concept.storage.js +2 -2
  212. package/dist/src/storage/A_Concept.storage.js.map +1 -1
  213. package/dist/src/storage/A_Container.storage.d.ts +8 -0
  214. package/dist/src/storage/A_Container.storage.js +17 -0
  215. package/dist/src/storage/A_Container.storage.js.map +1 -0
  216. package/dist/src/storage/A_Inject.storage.d.ts +9 -0
  217. package/dist/src/storage/A_Inject.storage.js +13 -0
  218. package/dist/src/storage/A_Inject.storage.js.map +1 -0
  219. package/examples/simple/components/A.component.ts +35 -0
  220. package/examples/simple/components/B.component.ts +46 -0
  221. package/examples/simple/concept.ts +49 -12
  222. package/examples/simple/containers/Main.container.ts +41 -0
  223. package/examples/simple/context/Fragment_A.context.ts +25 -0
  224. package/examples/simple/context/Fragment_B.context.ts +19 -0
  225. package/examples/simple-http-server/components/http-error-handler.component.ts +44 -0
  226. package/examples/simple-http-server/components/http-request-handler.component.ts +9 -0
  227. package/examples/simple-http-server/concept.ts +22 -21
  228. package/examples/simple-http-server/containers/http-server.container.ts +23 -38
  229. package/examples/simple-http-server/contexts/http-request.context.ts +59 -0
  230. package/examples/simple-http-server/contexts/http-server.context.types.ts +0 -108
  231. package/examples/simple-http-server/test.ts +290 -0
  232. package/index.ts +55 -8
  233. package/jest.config.ts +2 -0
  234. package/package.json +4 -7
  235. package/src/{containers → base}/A-Config/A-Config.container.ts +21 -20
  236. package/src/{containers/A-Config/A-Config.namespace.ts → base/A-Config/A-Config.context.ts} +12 -5
  237. package/src/{containers → base}/A-Config/A-Config.types.ts +10 -4
  238. package/src/{containers → base}/A-Config/components/ConfigReader.component.ts +7 -3
  239. package/src/{containers → base}/A-Config/components/ENVConfigReader.component.ts +1 -1
  240. package/src/{containers → base}/A-Config/components/FileConfigReader.component.ts +1 -1
  241. package/src/base/A-Errors/A-Errors.component.ts +102 -0
  242. package/src/{containers/A-Errors/A-Errors.namespace.ts → base/A-Errors/A-Errors.context.ts} +24 -39
  243. package/src/{containers → base}/A-Errors/A-Errors.types.ts +2 -2
  244. package/src/base/A-Logger/A-Logger.component.ts +169 -0
  245. package/src/base/A-Logger/A-Logger.types.ts +0 -0
  246. package/src/constants/A_ConceptLifecycle.constants.ts +9 -9
  247. package/src/decorators/A-Feature/A-Feature-Define.decorator.ts +57 -0
  248. package/src/decorators/A-Feature/A-Feature-Extend.decorator.ts +57 -0
  249. package/src/decorators/A-Feature/A-Feature.decorator.types.ts +56 -0
  250. package/src/decorators/A-Inject/A-Inject.decorator.ts +65 -53
  251. package/src/decorators/A-Inject/A-Inject.decorator.types.ts +31 -4
  252. package/src/decorators/A-Stage/A-Stage.decorator.ts +57 -0
  253. package/src/decorators/A-Stage/A-Stage.decorator.types.ts +23 -0
  254. package/src/global/A-Channel/A-Channel.class.ts +48 -0
  255. package/src/global/A-Channel/A-Channel.types.ts +60 -0
  256. package/src/global/A-Component/A-Component.class.ts +1 -29
  257. package/src/global/A-Component/A-Component.meta.ts +9 -0
  258. package/src/global/A-Component/A-Component.types.ts +40 -0
  259. package/src/global/A-Concept/A_Concept.class.ts +160 -66
  260. package/src/global/A-Concept/A_Concept.meta.ts +9 -0
  261. package/src/global/A-Concept/A_Concept.types.ts +45 -10
  262. package/src/global/A-Container/A-Container.class.ts +177 -22
  263. package/src/global/A-Container/A-Container.meta.ts +80 -0
  264. package/src/global/A-Container/A-Container.types.ts +40 -0
  265. package/src/global/A-Context/A-Context.class.ts +231 -130
  266. package/src/global/A-Context/A-Context.types.ts +15 -0
  267. package/src/global/A-Dependency/A-DependencyReference.types.ts +56 -56
  268. package/src/global/A-Entity/A-Entity.class.ts +16 -0
  269. package/src/global/A-Entity/A-Entity.types.ts +0 -0
  270. package/src/global/A-Feature/A-Feature.class.ts +156 -0
  271. package/src/global/A-Feature/A-Feature.types.ts +20 -0
  272. package/src/global/{A-Namespace/A_Namespace.class.ts → A-Fragment/A-Fragment.class.ts} +24 -30
  273. package/src/global/A-Fragment/A-Fragment.types.ts +6 -0
  274. package/src/global/A-Meta/A-Meta.class.ts +60 -0
  275. package/src/global/A-Meta/A-Meta.types.ts +0 -0
  276. package/src/global/A-Scope/A-Scope.class.ts +208 -0
  277. package/src/global/A-Scope/A-Scope.types.ts +37 -0
  278. package/src/storage/A_Component.storage.ts +28 -0
  279. package/src/storage/A_Concept.storage.ts +5 -1
  280. package/src/storage/A_Container.storage.ts +21 -0
  281. package/src/storage/A_Inject.storage.ts +30 -0
  282. package/tsconfig.json +3 -1
  283. package/examples/sdk/concept.ts +0 -24
  284. package/examples/sdk/orders.api.ts +0 -21
  285. package/examples/sdk/users.api.ts +0 -21
  286. package/examples/simple-http-server/containers/http-server.controller.ts +0 -24
  287. package/examples/simple-http-server/containers/http-server.router.ts +0 -23
  288. package/examples/simple-http-server/contexts/http-server.namespace.ts +0 -36
  289. package/src/containers/A-Errors/A-Errors.container.ts +0 -14
  290. package/src/containers/A-Logger/A-Logger.container.ts +0 -22
  291. package/src/containers/A-Logger/A-Logger.namespace.ts +0 -26
  292. package/src/containers/A-Logger/components/Logger.component.ts +0 -169
  293. package/src/decorators/A-ConceptLifecycle/A-ConceptLifecycle.decorator.types.ts +0 -46
  294. package/src/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator.ts +0 -55
  295. package/src/decorators/A-ConceptLifecycle/A-Load/A-Load.decorator.types.ts +0 -20
  296. package/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.ts +0 -62
  297. package/src/decorators/A-ConceptLifecycle/A-Run/A-Run.decorator.types.ts +0 -28
  298. package/src/decorators/A-ConceptLifecycle/index.ts +0 -9
  299. package/src/decorators/A-Feature/A-Feature.decorator.ts +0 -13
  300. package/src/decorators/A_Lazy.decorator.ts +0 -31
  301. package/src/global/A-Namespace/A_Namespace.types.ts +0 -24
  302. /package/{src/containers/A-Logger/A-Logger.types.ts → dist/src/base/A-Logger/A-Logger.types.d.ts} +0 -0
  303. /package/{src/decorators/A_ConceptMethods.decorator.ts → dist/src/global/A-Entity/A-Entity.types.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"A-Container.class.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.class.ts"],"names":[],"mappings":";;;AAIA;;;;;;;;GAQG;AACH,MAAa,WAAW;IAKpB,YACI,SAAa;QAEb,IAAI,SAAS,EAAE,CAAC;YACZ,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC/B,CAAC;IACL,CAAC;CAcJ;AAzBD,kCAyBC"}
1
+ {"version":3,"file":"A-Container.class.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,kEAAyD;AAIzD,kEAAyD;AAKzD;;;;;;;;;;GAUG;AACH,MAAa,WAAW;IAYpB,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,EAAS,CAAC;IAC5C,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACrD,CAAC;IAGD;IACI;;OAEG;IACH,MAA6D;QAE7D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;QAC3C,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,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OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE1C,MAAM,UAAU,GAAG,IAAI,2BAAS,CAAC;YAC7B,IAAI,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,OAAO,EAAE;YAC3C,SAAS,EAAE,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,KAAI,EAAE;YAClC,UAAU,EAAE,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,KAAI,EAAE;YACpC,KAAK;YACL,MAAM,EAAE,2BAAS,CAAC,KAAK,CAAC,IAAI,CAAC;SAChC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACtB,CAAC;IAID,iEAAiE;IACjE,iEAAiE;IACjE,iEAAiE;IAEjE;;;;OAIG;IACa,YAAY;;YACxB,OAAO;QACX,CAAC;KAAA;IAED;;OAEG;IACa,MAAM;;YAClB,OAAO;QACX,CAAC;KAAA;IAED;;;;OAIG;IACa,WAAW;;YACvB,OAAO;QACX,CAAC;KAAA;CAEJ;AA1KD,kCA0KC"}
@@ -0,0 +1,7 @@
1
+ import { A_TYPES__FeatureStep } from "../A-Feature/A-Feature.types";
2
+ import { A_Meta } from "../A-Meta/A-Meta.class";
3
+ import { A_Container } from "./A-Container.class";
4
+ import { A_TYPES__ContainerMeta } from "./A-Container.types";
5
+ export declare class A_ContainerMeta extends A_Meta<A_TYPES__ContainerMeta> {
6
+ feature<T extends string>(container: A_Container<any>, name: T): A_TYPES__FeatureStep[];
7
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.A_ContainerMeta = void 0;
4
+ const A_Component_types_1 = require("../A-Component/A-Component.types");
5
+ const A_Context_class_1 = require("../A-Context/A-Context.class");
6
+ const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
7
+ const A_Container_types_1 = require("./A-Container.types");
8
+ class A_ContainerMeta extends A_Meta_class_1.A_Meta {
9
+ feature(container, name) {
10
+ const scope = A_Context_class_1.A_Context.scope(container);
11
+ // First lets validate that there'are registered method with the same name
12
+ const featureMeta = this.get(A_Container_types_1.A_TYPES__ContainerMetaKey.FEATURES);
13
+ if (!featureMeta) {
14
+ throw new Error(`Container ${container.constructor.name} has no metadata defined`);
15
+ }
16
+ const instruction = featureMeta.get(name);
17
+ if (!instruction)
18
+ throw new Error(`Method ${name} is not defined in ${this.constructor.name}`);
19
+ // const scope = new A_Scope({
20
+ // name: `${this.constructor.name}.${feature}`,
21
+ // fragments: param2?.fragments || [],
22
+ // components: param2?.components || []
23
+ // }, {
24
+ // parent: this.scope
25
+ // });
26
+ // Now we need to resolve the method from all registered components
27
+ return scope
28
+ .components
29
+ .reduce((acc, component) => {
30
+ const componentMeta = A_Context_class_1.A_Context.meta(component);
31
+ const extensions = componentMeta.get(A_Component_types_1.A_TYPES__ComponentMetaKey.EXTENSIONS) || [];
32
+ const injections = componentMeta.get(A_Component_types_1.A_TYPES__ComponentMetaKey.INJECTIONS);
33
+ const out = [];
34
+ extensions.forEach((extension, handler) => {
35
+ if (extension.name === name
36
+ &&
37
+ (extension.container === container.constructor.name || extension.container === '*')) {
38
+ const args = (injections === null || injections === void 0 ? void 0 : injections.get(handler)) || [];
39
+ out.push({
40
+ component,
41
+ handler,
42
+ args
43
+ });
44
+ }
45
+ });
46
+ return [
47
+ ...acc,
48
+ ...out
49
+ ];
50
+ }, []);
51
+ }
52
+ }
53
+ exports.A_ContainerMeta = A_ContainerMeta;
54
+ //# sourceMappingURL=A-Container.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Container.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.meta.ts"],"names":[],"mappings":";;;AAAA,wEAA6E;AAC7E,kEAAyD;AAEzD,yDAAgD;AAEhD,2DAG6B;AAI7B,MAAa,eAAgB,SAAQ,qBAA8B;IAG/D,OAAO,CACH,SAA2B,EAC3B,IAAO;QAGP,MAAM,KAAK,GAAG,2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U,CAAE,GAAG,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;oBAE5C,GAAG,CAAC,IAAI,CAAC;wBACL,SAAS;wBACT,OAAO;wBACP,IAAI;qBACP,CAAC,CAAC;gBACP,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,OAAO;gBACH,GAAG,GAAG;gBACN,GAAG,GAAG;aACT,CAAC;QAEN,CAAC,EAAE,EAA4B,CAAC,CAAA;IACxC,CAAC;CACJ;AAnED,0CAmEC"}
@@ -0,0 +1,31 @@
1
+ import { A_TYPES__ConceptStage } from "../A-Concept/A_Concept.types";
2
+ import { A_Fragment } from "../A-Fragment/A-Fragment.class";
3
+ import { A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types";
4
+ export type A_TYPES__ContainerConstructor<_Exports extends Array<String>> = {
5
+ name?: string;
6
+ exports: _Exports;
7
+ } & A_TYPES__ScopeConstructor;
8
+ export type A_TYPES__ContainerCallParams<T extends string> = {
9
+ name: T;
10
+ fragments: Array<A_Fragment>;
11
+ components: Array<{
12
+ new (...args: any[]): any;
13
+ }>;
14
+ };
15
+ export type A_TYPES__ContainerMeta = {
16
+ [A_TYPES__ContainerMetaKey.FEATURES]: Map<string, A_TYPES__ContainerMeta_FeatureItem>;
17
+ [A_TYPES__ContainerMetaKey.STAGES]: Map<string, A_TYPES__ContainerMeta_StageExtension>;
18
+ };
19
+ export declare enum A_TYPES__ContainerMetaKey {
20
+ FEATURES = "a-container-features",
21
+ STAGES = "a-container-stages"
22
+ }
23
+ export type A_TYPES__ContainerMeta_StageExtension = {
24
+ name: A_TYPES__ConceptStage;
25
+ handler: string;
26
+ };
27
+ export type A_TYPES__ContainerMeta_FeatureItem = {
28
+ name: string;
29
+ container: string;
30
+ handler: string;
31
+ };
@@ -0,0 +1,9 @@
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["STAGES"] = "a-container-stages";
8
+ })(A_TYPES__ContainerMetaKey || (exports.A_TYPES__ContainerMetaKey = A_TYPES__ContainerMetaKey = {}));
9
+ //# sourceMappingURL=A-Container.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Container.types.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.types.ts"],"names":[],"mappings":";;;AAwBA,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,8DAAiC,CAAA;IACjC,0DAA6B,CAAA;AACjC,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC"}
@@ -1,5 +1,13 @@
1
- import { A_Namespace } from "../A-Namespace/A_Namespace.class";
2
1
  import { A_Component } from "../A-Component/A-Component.class";
2
+ import { A_Fragment } from "../A-Fragment/A-Fragment.class";
3
+ import { A_Feature } from "../A-Feature/A-Feature.class";
4
+ import { A_Container } from "../A-Container/A-Container.class";
5
+ import { A_Scope } from "../A-Scope/A-Scope.class";
6
+ import { A_TYPES__ScopeConfig, A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types";
7
+ import { A_Meta } from "../A-Meta/A-Meta.class";
8
+ import { A_ComponentMeta } from "../A-Component/A-Component.meta";
9
+ import { A_ContainerMeta } from "../A-Container/A-Container.meta";
10
+ import { A_Concept } from "../A-Concept/A_Concept.class";
3
11
  /**
4
12
  * Namespace Provider is responsible for providing the Namespace to the Containers and other Namespaces.
5
13
  * This class stores all Namespaces across the Program.
@@ -10,31 +18,23 @@ import { A_Component } from "../A-Component/A-Component.class";
10
18
  export declare class A_Context {
11
19
  static instance: A_Context;
12
20
  /**
13
- * Stores all the Namespaces by namespace.
14
- * There might be a Namespaces of the same type but with different namespaces.
15
- * That might be useful for the cases when you need to have multiple instances of the same Namespace e.g.
16
- * - multiple http servers
17
- * - multitenant applications
18
- * - etc.
21
+ * A set of globally registered containers.
19
22
  */
20
- namespaced: Map<string, A_Namespace>;
23
+ protected containers: WeakMap<A_Container<any>, A_Scope>;
21
24
  /**
22
- * Stores the singleton Namespaces.
23
- * Singleton Namespaces are the Namespaces that are used only once in the program.
24
- * In most cases, the singleton Namespace is the main Namespace of the program.
25
- * It could be :
26
- * - the main Namespace of the Program
27
- * - the authentication Namespace
28
- * - the main database Namespace
29
- * - etc.
25
+ * A set of globally registered features.
30
26
  */
31
- singleton: WeakMap<{
32
- new (...args: any[]): A_Namespace;
33
- }, A_Namespace>;
27
+ protected features: WeakMap<A_Feature, A_Scope>;
34
28
  /**
35
- * Stores the components that are used in the program.
29
+ * A set of globally registered concepts.
36
30
  */
37
- components: Map<string, any>;
31
+ protected concepts: WeakMap<A_Concept<any>, A_Scope>;
32
+ /**
33
+ * A set of allocated scopes per every element in the program.
34
+ */
35
+ protected conceptsMeta: Map<typeof A_Concept.constructor, A_Meta<any>>;
36
+ protected containersMeta: Map<typeof A_Container.constructor, A_ContainerMeta>;
37
+ protected componentsMeta: Map<typeof A_Container.constructor, A_ComponentMeta>;
38
38
  /**
39
39
  * Root Namespace is a Namespace that is used to run the program.
40
40
  */
@@ -48,41 +48,23 @@ export declare class A_Context {
48
48
  static getInstance(): A_Context;
49
49
  static get root(): string;
50
50
  static get environment(): 'server' | 'browser';
51
+ static allocate(component: any, importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>): A_Scope;
52
+ static allocate(feature: A_Feature, importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>): A_Scope;
53
+ static allocate(container: A_Container<any>, importing: Partial<A_TYPES__ScopeConstructor & A_TYPES__ScopeConfig>): A_Scope;
54
+ static meta(container: typeof A_Container): A_ContainerMeta;
55
+ static meta(container: A_Container<any>): A_ContainerMeta;
56
+ static meta(component: typeof A_Component): A_ComponentMeta;
57
+ static meta(component: A_Component): A_ComponentMeta;
58
+ static meta<T extends Record<string, any>>(component: {
59
+ new (...args: any[]): any;
60
+ }): A_Meta<T>;
61
+ static scope(concept: A_Concept): A_Scope;
62
+ static scope(component: A_Container<any>): A_Scope;
63
+ static scope(component: A_Feature): A_Scope;
51
64
  /**
52
65
  * Register a Namespace in the provider.
53
66
  * @param Namespace
54
67
  */
55
- static register(Namespace: A_Namespace): string;
56
- static register(Namespace: A_Namespace, namespace?: string): string;
57
- /**
58
- * Get the Namespace by namespace.
59
- * @param namespace
60
- */
61
- static get(namespace: string): A_Namespace<any> | undefined;
62
- /**
63
- * Resolve the Component by Class.
64
- *
65
- * @param component
66
- */
67
- static resolve<T extends A_Component>(component: {
68
- new (...args: any[]): T;
69
- }): T;
70
- static resolve<T extends A_Namespace>(namespace: {
71
- new (...args: any[]): T;
72
- }): T;
73
- static resolve<T extends A_Namespace>(namespaces: Array<{
74
- new (...args: any[]): T;
75
- }>): Array<T>;
76
- static resolve<T extends A_Namespace>(namespace: {
77
- new (...args: any[]): T;
78
- }, name: string): T;
79
- private static resolveComponent;
80
- /**
81
- *
82
- * Allowing to resolve the Namespace by Class and Name.
83
- *
84
- * @param namespace
85
- * @param name
86
- */
87
- private static resolveNamespace;
68
+ static register(Namespace: A_Fragment): string;
69
+ static register(Namespace: A_Fragment, namespace?: string): string;
88
70
  }
@@ -2,8 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.A_Context = void 0;
4
4
  const a_utils_1 = require("@adaas/a-utils");
5
- const A_Namespace_class_1 = require("../A-Namespace/A_Namespace.class");
6
5
  const A_Component_class_1 = require("../A-Component/A-Component.class");
6
+ const A_Feature_class_1 = require("../A-Feature/A-Feature.class");
7
+ const A_Container_class_1 = require("../A-Container/A-Container.class");
8
+ const A_Scope_class_1 = require("../A-Scope/A-Scope.class");
9
+ const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
10
+ const A_Component_meta_1 = require("../A-Component/A-Component.meta");
11
+ const A_Container_meta_1 = require("../A-Container/A-Container.meta");
12
+ const A_Concept_class_1 = require("../A-Concept/A_Concept.class");
7
13
  /**
8
14
  * Namespace Provider is responsible for providing the Namespace to the Containers and other Namespaces.
9
15
  * This class stores all Namespaces across the Program.
@@ -14,30 +20,28 @@ const A_Component_class_1 = require("../A-Component/A-Component.class");
14
20
  class A_Context {
15
21
  constructor() {
16
22
  /**
17
- * Stores all the Namespaces by namespace.
18
- * There might be a Namespaces of the same type but with different namespaces.
19
- * That might be useful for the cases when you need to have multiple instances of the same Namespace e.g.
20
- * - multiple http servers
21
- * - multitenant applications
22
- * - etc.
23
+ * A set of globally registered containers.
23
24
  */
24
- this.namespaced = new Map();
25
+ this.containers = new WeakMap();
25
26
  /**
26
- * Stores the singleton Namespaces.
27
- * Singleton Namespaces are the Namespaces that are used only once in the program.
28
- * In most cases, the singleton Namespace is the main Namespace of the program.
29
- * It could be :
30
- * - the main Namespace of the Program
31
- * - the authentication Namespace
32
- * - the main database Namespace
33
- * - etc.
27
+ * A set of globally registered features.
34
28
  */
35
- this.singleton = new WeakMap();
29
+ this.features = new WeakMap();
36
30
  /**
37
- * Stores the components that are used in the program.
31
+ * A set of globally registered concepts.
38
32
  */
39
- this.components = new Map();
33
+ this.concepts = new WeakMap();
34
+ /**
35
+ * A set of allocated scopes per every element in the program.
36
+ */
37
+ // protected scopes: WeakMap<A_Container<any> | A_Feature | A_Component | any, A_Scope> = new WeakMap();
38
+ this.conceptsMeta = new Map();
39
+ this.containersMeta = new Map();
40
+ this.componentsMeta = new Map();
40
41
  }
42
+ // ===================================================================================================
43
+ // ================================ META OPERATIONS ==================================================
44
+ // ===================================================================================================
41
45
  /**
42
46
  * Get the instance of the Namespace Provider.
43
47
  *
@@ -55,63 +59,125 @@ class A_Context {
55
59
  static get environment() {
56
60
  return a_utils_1.A_Polyfills.env;
57
61
  }
62
+ static allocate(param1, param2) {
63
+ const instance = this.getInstance();
64
+ const newScope = new A_Scope_class_1.A_Scope(param2, param2);
65
+ switch (true) {
66
+ case param1 instanceof A_Container_class_1.A_Container:
67
+ instance.containers.set(param1, newScope);
68
+ break;
69
+ case param1 instanceof A_Feature_class_1.A_Feature:
70
+ instance.features.set(param1, newScope);
71
+ break;
72
+ case param1 instanceof A_Concept_class_1.A_Concept:
73
+ instance.concepts.set(param1, newScope);
74
+ break;
75
+ default:
76
+ throw new Error(`[!] A-Concept Context: Unknown type of the parameter.`);
77
+ }
78
+ return newScope;
79
+ }
80
+ static meta(param1) {
81
+ const instance = this.getInstance();
82
+ let metaStorage;
83
+ let property;
84
+ let meta;
85
+ switch (true) {
86
+ case param1 instanceof A_Container_class_1.A_Container: {
87
+ metaStorage = instance.containersMeta;
88
+ property = param1.constructor;
89
+ if (!metaStorage.has(property)) {
90
+ const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_Container_meta_1.A_ContainerMeta();
91
+ metaStorage.set(property, new A_Container_meta_1.A_ContainerMeta().from(inheritMeta));
92
+ }
93
+ meta = metaStorage.get(property);
94
+ break;
95
+ }
96
+ case a_utils_1.A_CommonHelper.isInheritedFrom(param1, A_Container_class_1.A_Container): {
97
+ metaStorage = instance.containersMeta;
98
+ property = param1;
99
+ if (!metaStorage.has(property)) {
100
+ const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_Container_meta_1.A_ContainerMeta();
101
+ metaStorage.set(property, new A_Container_meta_1.A_ContainerMeta().from(inheritMeta));
102
+ }
103
+ meta = metaStorage.get(property);
104
+ break;
105
+ }
106
+ case param1 instanceof A_Component_class_1.A_Component: {
107
+ metaStorage = instance.componentsMeta;
108
+ property = param1.constructor;
109
+ if (!metaStorage.has(property)) {
110
+ const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_Component_meta_1.A_ComponentMeta();
111
+ metaStorage.set(property, new A_Component_meta_1.A_ComponentMeta().from(inheritMeta));
112
+ }
113
+ meta = metaStorage.get(property);
114
+ break;
115
+ }
116
+ case a_utils_1.A_CommonHelper.isInheritedFrom(param1, A_Component_class_1.A_Component): {
117
+ metaStorage = instance.componentsMeta;
118
+ property = param1;
119
+ if (!metaStorage.has(property)) {
120
+ const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_Component_meta_1.A_ComponentMeta();
121
+ metaStorage.set(property, new A_Component_meta_1.A_ComponentMeta().from(inheritMeta));
122
+ }
123
+ meta = metaStorage.get(property);
124
+ break;
125
+ }
126
+ default: {
127
+ metaStorage = instance.componentsMeta;
128
+ property = typeof param1 === 'function' ? param1 : param1.constructor;
129
+ if (!metaStorage.has(property)) {
130
+ const inheritMeta = metaStorage.get(Object.getPrototypeOf(property)) || new A_Meta_class_1.A_Meta();
131
+ metaStorage.set(property, new A_Meta_class_1.A_Meta().from(inheritMeta));
132
+ }
133
+ meta = metaStorage.get(property);
134
+ break;
135
+ }
136
+ }
137
+ // const inheritMeta: T = metaStorage.get(Object.getPrototypeOf(property)) || new A_Meta() as T;
138
+ // // we just know that the type of parent meta is the same as the type of the current meta
139
+ // const meta = metaStorage.get(property);
140
+ return meta;
141
+ }
142
+ static scope(param1) {
143
+ const instance = this.getInstance();
144
+ switch (true) {
145
+ case param1 instanceof A_Container_class_1.A_Container:
146
+ return instance.containers.get(param1);
147
+ case param1 instanceof A_Feature_class_1.A_Feature:
148
+ return instance.features.get(param1);
149
+ case param1 instanceof A_Concept_class_1.A_Concept:
150
+ return instance.concepts.get(param1);
151
+ default:
152
+ throw new Error(`[!] A-Concept Context: Unknown type of the parameter.`);
153
+ }
154
+ }
58
155
  static register(param1, param2) {
59
156
  const instance = this.getInstance();
60
- let Namespace;
61
- let namespace;
157
+ let fragment;
158
+ let name;
62
159
  if (typeof param2 === 'string') {
63
- namespace = param2;
64
- Namespace = param1;
160
+ name = param2;
161
+ fragment = param1;
65
162
  }
66
163
  else {
67
- Namespace = param1;
68
- namespace = Namespace.name;
164
+ fragment = param1;
165
+ name = fragment.name;
69
166
  }
70
167
  /**
71
168
  * If the namespace is not provided, then use the root namespace.
72
169
  * If the root namespace is not provided, then use the default namespace.
73
170
  */
74
- if (!namespace)
75
- namespace = this.root
171
+ if (!name)
172
+ name = this.root
76
173
  || process.env.ADAAS_NAMESPACE
77
174
  || process.env.A_NAMESPACE
78
175
  || process.env.ADAAS_APP_NAMESPACE
79
176
  || 'a-concept';
80
177
  if (!this.root)
81
- instance._root = namespace;
82
- instance.namespaced.set(namespace, Namespace);
83
- return namespace;
84
- }
85
- /**
86
- * Get the Namespace by namespace.
87
- * @param namespace
88
- */
89
- static get(namespace) {
90
- const instance = this.getInstance();
91
- return instance.namespaced.get(namespace);
92
- }
93
- static resolve(param1, param2) {
94
- switch (true) {
95
- // If the first parameter is a Namespace
96
- case Array.isArray(param1) && param1.every(namespace => a_utils_1.A_CommonHelper.isInheritedFrom(namespace, A_Namespace_class_1.A_Namespace)):
97
- return param1.map(namespace => this.resolveNamespace(namespace));
98
- // If the first parameter is a Namespace and the second parameter is a string
99
- case !!param2 && typeof param1 === 'function' && a_utils_1.A_CommonHelper.isInheritedFrom(param1, A_Namespace_class_1.A_Namespace):
100
- return this.resolveNamespace(param1, param2);
101
- // If the first parameter is a Component
102
- case !!param2 && typeof param1 === 'function' && a_utils_1.A_CommonHelper.isInheritedFrom(param1, A_Component_class_1.A_Component):
103
- return this.resolveComponent(param1);
104
- default:
105
- throw new Error(`[!] A-Concept Context: Unknown type of the parameter.`);
106
- }
107
- }
108
- static resolveComponent(component) {
109
- const instance = this.getInstance();
110
- return instance.components.get(component.name);
111
- }
112
- static resolveNamespace(param1, param2) {
113
- const instance = this.getInstance();
114
- return instance.namespaced.get(param2 || param1.name);
178
+ instance._root = name;
179
+ // instance.namedFragments.set(namespace, Namespace);
180
+ return name;
115
181
  }
116
182
  }
117
183
  exports.A_Context = A_Context;
@@ -1 +1 @@
1
- {"version":3,"file":"A-Context.class.js","sourceRoot":"","sources":["../../../../src/global/A-Context/A-Context.class.ts"],"names":[],"mappings":";;;AAAA,4CAA6D;AAC7D,wEAA+D;AAC/D,wEAA+D;AAG/D;;;;;;GAMG;AACH,MAAa,SAAS;IAuClB;QAlCA;;;;;;;WAOG;QACH,eA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BAAmB;mBAC/B,WAAW,CAAA;QAItB,IAAI,CAAC,IAAI,CAAC,IAAI;YACV,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC;QAE1B,qDAAqD;QAErD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAtTD,8BAsTC"}
@@ -0,0 +1,12 @@
1
+ import { A_Scope } from "../A-Scope/A-Scope.class";
2
+ export type A_TYPES__ContextExecutionPipeline = {
3
+ scope: A_Scope;
4
+ steps: A_TYPES__ContextExecutionPipelineStep[];
5
+ };
6
+ export type A_TYPES__ContextExecutionPipelineStep = {
7
+ component: {
8
+ new (...args: any[]): any;
9
+ };
10
+ handler: string;
11
+ args: any[];
12
+ };
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=A-Context.types.js.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Context Fragments is a set of arguments that can be used to define a Context for the pipeline.
3
+ * In other words it is a dynamic context that will be created on pipeline start and destroyed on pipeline end.
4
+ * During the execution of the pipeline, the Context Fragments can be used to pass the data between the pipeline steps.
5
+ *
6
+ * Or to store the data that is required for the pipeline execution
7
+ *
8
+ */
9
+ export declare class A_ContextFragment {
10
+ protected args: any[];
11
+ constructor(...args: any[]);
12
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.A_ContextFragment = void 0;
4
+ /**
5
+ * Context Fragments is a set of arguments that can be used to define a Context for the pipeline.
6
+ * In other words it is a dynamic context that will be created on pipeline start and destroyed on pipeline end.
7
+ * During the execution of the pipeline, the Context Fragments can be used to pass the data between the pipeline steps.
8
+ *
9
+ * Or to store the data that is required for the pipeline execution
10
+ *
11
+ */
12
+ class A_ContextFragment {
13
+ constructor(...args) {
14
+ this.args = [];
15
+ this.args = args;
16
+ }
17
+ }
18
+ exports.A_ContextFragment = A_ContextFragment;
19
+ //# sourceMappingURL=A-ContextFragment.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-ContextFragment.class.js","sourceRoot":"","sources":["../../../../src/global/A-Context/A-ContextFragment.class.ts"],"names":[],"mappings":";;;AAEA;;;;;;;GAOG;AACH,MAAa,iBAAiB;IAI1B,YAAY,GAAG,IAAW;QAFhB,SAAI,GAAU,EAAE,CAAC;QAGvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CAEJ;AARD,8CAQC"}
@@ -1,55 +0,0 @@
1
- import { A_Namespace } from "../A-Namespace/A_Namespace.class";
2
- export type A_TYPES__A_DependencyReferenceConstructor = {
3
- /**
4
- * The name of the dependency
5
- */
6
- name: string;
7
- /**
8
- * The version of the module
9
- * By default it is 1.0.0
10
- */
11
- version: string;
12
- /**
13
- * The dependencies of the module
14
- * Could be:
15
- * - other Modules
16
- * - other Contexts
17
- *
18
- */
19
- dependencies: Array<typeof A_Namespace>;
20
- /**
21
- * The source of the dependency
22
- * Could be:
23
- * - a string representing the path to the module
24
- * - a module class (in case when config should be provided via the module constructor)
25
- * - a module class constructor
26
- * - a context class (in case when config should be provided via the context constructor)
27
- * - a context class constructor
28
- *
29
- */
30
- source: A_Namespace;
31
- };
32
- export type A_TYPES__A_DependencyReferenceConstructorConfig = {
33
- /**
34
- * Sync - blocks A-Express Application initialization until module is ready
35
- * Async - allows to initialize module after A-Express Application initialization
36
- */
37
- behavior: 'async' | 'sync';
38
- /**
39
- * Allows to define a scheme of retries
40
- */
41
- retries: {
42
- /**
43
- * The number of retries
44
- * Default is 3
45
- */
46
- n: number;
47
- /**
48
- * The timeout between retries
49
- * Multiplied by the number of retries
50
- * So after each retry the timeout is increased e.g. 1000ms * 1, 1000ms * 2, 1000ms * 3
51
- * Default is 1000
52
- */
53
- timeout: number;
54
- };
55
- };