@adaas/a-concept 0.1.24 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/dist/index.cjs +3 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.mts +3952 -0
  4. package/dist/index.d.ts +3952 -50
  5. package/dist/index.mjs +3 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +5 -6
  8. package/src/global/A-Abstraction/A-Abstraction-Extend.decorator.ts +2 -1
  9. package/src/global/A-Context/A-Context.class.ts +81 -7
  10. package/src/global/A-Context/A-Context.error.ts +4 -0
  11. package/src/global/A-Dependency/A-Dependency-Default.decorator.ts +75 -0
  12. package/src/global/A-Dependency/A-Dependency-Load.decorator.ts +80 -0
  13. package/src/global/A-Dependency/A-Dependency-Require.decorator.ts +68 -0
  14. package/src/global/A-Dependency/A-Dependency.class.ts +33 -0
  15. package/src/global/A-Dependency/A-Dependency.error.ts +13 -0
  16. package/src/global/A-Dependency/A-Dependency.types.ts +28 -0
  17. package/src/global/A-Feature/A-Feature-Define.decorator.ts +2 -1
  18. package/src/global/A-Feature/A-Feature-Extend.decorator.ts +2 -1
  19. package/src/global/A-Feature/A-Feature.class.ts +11 -0
  20. package/src/global/A-Inject/A-Inject.decorator.ts +4 -2
  21. package/src/global/A-Inject/A-Inject.types.ts +5 -3
  22. package/src/global/A-Scope/A-Scope.class.ts +85 -57
  23. package/src/global/A-Stage/A-Stage.class.ts +22 -2
  24. package/src/global/A-Stage/A-Stage.error.ts +2 -0
  25. package/src/helpers/A_Common.helper.ts +101 -0
  26. package/src/helpers/A_TypeGuards.helper.ts +8 -0
  27. package/src/index.ts +88 -0
  28. package/tests/A-Component.test.ts +1 -1
  29. package/tests/A-Concept.test.ts +5 -6
  30. package/tests/A-Dependency.test.ts +93 -0
  31. package/tests/A-Feature.test.ts +7 -7
  32. package/tests/A-Scope.test.ts +10 -10
  33. package/tsconfig.json +2 -2
  34. package/tsup.config.ts +32 -0
  35. package/dist/index.js +0 -112
  36. package/dist/index.js.map +0 -1
  37. package/dist/src/constants/env.constants.d.ts +0 -33
  38. package/dist/src/constants/env.constants.js +0 -47
  39. package/dist/src/constants/env.constants.js.map +0 -1
  40. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.d.ts +0 -23
  41. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js +0 -96
  42. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js.map +0 -1
  43. package/dist/src/global/A-Abstraction/A-Abstraction.class.d.ts +0 -74
  44. package/dist/src/global/A-Abstraction/A-Abstraction.class.js +0 -130
  45. package/dist/src/global/A-Abstraction/A-Abstraction.class.js.map +0 -1
  46. package/dist/src/global/A-Abstraction/A-Abstraction.error.d.ts +0 -7
  47. package/dist/src/global/A-Abstraction/A-Abstraction.error.js +0 -12
  48. package/dist/src/global/A-Abstraction/A-Abstraction.error.js.map +0 -1
  49. package/dist/src/global/A-Abstraction/A-Abstraction.types.d.ts +0 -38
  50. package/dist/src/global/A-Abstraction/A-Abstraction.types.js +0 -3
  51. package/dist/src/global/A-Abstraction/A-Abstraction.types.js.map +0 -1
  52. package/dist/src/global/A-Caller/A_Caller.class.d.ts +0 -33
  53. package/dist/src/global/A-Caller/A_Caller.class.js +0 -44
  54. package/dist/src/global/A-Caller/A_Caller.class.js.map +0 -1
  55. package/dist/src/global/A-Caller/A_Caller.error.d.ts +0 -7
  56. package/dist/src/global/A-Caller/A_Caller.error.js +0 -12
  57. package/dist/src/global/A-Caller/A_Caller.error.js.map +0 -1
  58. package/dist/src/global/A-Caller/A_Caller.types.d.ts +0 -18
  59. package/dist/src/global/A-Caller/A_Caller.types.js +0 -3
  60. package/dist/src/global/A-Caller/A_Caller.types.js.map +0 -1
  61. package/dist/src/global/A-Component/A-Component.class.d.ts +0 -34
  62. package/dist/src/global/A-Component/A-Component.class.js +0 -56
  63. package/dist/src/global/A-Component/A-Component.class.js.map +0 -1
  64. package/dist/src/global/A-Component/A-Component.constants.d.ts +0 -6
  65. package/dist/src/global/A-Component/A-Component.constants.js +0 -11
  66. package/dist/src/global/A-Component/A-Component.constants.js.map +0 -1
  67. package/dist/src/global/A-Component/A-Component.meta.d.ts +0 -34
  68. package/dist/src/global/A-Component/A-Component.meta.js +0 -78
  69. package/dist/src/global/A-Component/A-Component.meta.js.map +0 -1
  70. package/dist/src/global/A-Component/A-Component.types.d.ts +0 -76
  71. package/dist/src/global/A-Component/A-Component.types.js +0 -4
  72. package/dist/src/global/A-Component/A-Component.types.js.map +0 -1
  73. package/dist/src/global/A-Concept/A-Concept.class.d.ts +0 -153
  74. package/dist/src/global/A-Concept/A-Concept.class.js +0 -260
  75. package/dist/src/global/A-Concept/A-Concept.class.js.map +0 -1
  76. package/dist/src/global/A-Concept/A-Concept.constants.d.ts +0 -33
  77. package/dist/src/global/A-Concept/A-Concept.constants.js +0 -39
  78. package/dist/src/global/A-Concept/A-Concept.constants.js.map +0 -1
  79. package/dist/src/global/A-Concept/A-Concept.meta.d.ts +0 -6
  80. package/dist/src/global/A-Concept/A-Concept.meta.js +0 -12
  81. package/dist/src/global/A-Concept/A-Concept.meta.js.map +0 -1
  82. package/dist/src/global/A-Concept/A-Concept.types.d.ts +0 -66
  83. package/dist/src/global/A-Concept/A-Concept.types.js +0 -3
  84. package/dist/src/global/A-Concept/A-Concept.types.js.map +0 -1
  85. package/dist/src/global/A-Container/A-Container.class.d.ts +0 -52
  86. package/dist/src/global/A-Container/A-Container.class.js +0 -78
  87. package/dist/src/global/A-Container/A-Container.class.js.map +0 -1
  88. package/dist/src/global/A-Container/A-Container.constants.d.ts +0 -6
  89. package/dist/src/global/A-Container/A-Container.constants.js +0 -11
  90. package/dist/src/global/A-Container/A-Container.constants.js.map +0 -1
  91. package/dist/src/global/A-Container/A-Container.meta.d.ts +0 -35
  92. package/dist/src/global/A-Container/A-Container.meta.js +0 -76
  93. package/dist/src/global/A-Container/A-Container.meta.js.map +0 -1
  94. package/dist/src/global/A-Container/A-Container.types.d.ts +0 -75
  95. package/dist/src/global/A-Container/A-Container.types.js +0 -4
  96. package/dist/src/global/A-Container/A-Container.types.js.map +0 -1
  97. package/dist/src/global/A-Context/A-Context.class.d.ts +0 -361
  98. package/dist/src/global/A-Context/A-Context.class.js +0 -603
  99. package/dist/src/global/A-Context/A-Context.class.js.map +0 -1
  100. package/dist/src/global/A-Context/A-Context.error.d.ts +0 -20
  101. package/dist/src/global/A-Context/A-Context.error.js +0 -25
  102. package/dist/src/global/A-Context/A-Context.error.js.map +0 -1
  103. package/dist/src/global/A-Context/A-Context.types.d.ts +0 -5
  104. package/dist/src/global/A-Context/A-Context.types.js +0 -3
  105. package/dist/src/global/A-Context/A-Context.types.js.map +0 -1
  106. package/dist/src/global/A-Dependency/A-DependencyReference.class.d.ts +0 -0
  107. package/dist/src/global/A-Dependency/A-DependencyReference.class.js +0 -49
  108. package/dist/src/global/A-Dependency/A-DependencyReference.class.js.map +0 -1
  109. package/dist/src/global/A-Dependency/A-DependencyReference.types.d.ts +0 -0
  110. package/dist/src/global/A-Dependency/A-DependencyReference.types.js +0 -58
  111. package/dist/src/global/A-Dependency/A-DependencyReference.types.js.map +0 -1
  112. package/dist/src/global/A-Entity/A-Entity.class.d.ts +0 -214
  113. package/dist/src/global/A-Entity/A-Entity.class.js +0 -282
  114. package/dist/src/global/A-Entity/A-Entity.class.js.map +0 -1
  115. package/dist/src/global/A-Entity/A-Entity.constants.d.ts +0 -11
  116. package/dist/src/global/A-Entity/A-Entity.constants.js +0 -17
  117. package/dist/src/global/A-Entity/A-Entity.constants.js.map +0 -1
  118. package/dist/src/global/A-Entity/A-Entity.error.d.ts +0 -7
  119. package/dist/src/global/A-Entity/A-Entity.error.js +0 -12
  120. package/dist/src/global/A-Entity/A-Entity.error.js.map +0 -1
  121. package/dist/src/global/A-Entity/A-Entity.meta.d.ts +0 -11
  122. package/dist/src/global/A-Entity/A-Entity.meta.js +0 -18
  123. package/dist/src/global/A-Entity/A-Entity.meta.js.map +0 -1
  124. package/dist/src/global/A-Entity/A-Entity.types.d.ts +0 -56
  125. package/dist/src/global/A-Entity/A-Entity.types.js +0 -5
  126. package/dist/src/global/A-Entity/A-Entity.types.js.map +0 -1
  127. package/dist/src/global/A-Error/A_Error.class.d.ts +0 -229
  128. package/dist/src/global/A-Error/A_Error.class.js +0 -296
  129. package/dist/src/global/A-Error/A_Error.class.js.map +0 -1
  130. package/dist/src/global/A-Error/A_Error.constants.d.ts +0 -5
  131. package/dist/src/global/A-Error/A_Error.constants.js +0 -9
  132. package/dist/src/global/A-Error/A_Error.constants.js.map +0 -1
  133. package/dist/src/global/A-Error/A_Error.types.d.ts +0 -93
  134. package/dist/src/global/A-Error/A_Error.types.js +0 -3
  135. package/dist/src/global/A-Error/A_Error.types.js.map +0 -1
  136. package/dist/src/global/A-Feature/A-Feature-Define.decorator.d.ts +0 -15
  137. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js +0 -76
  138. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js.map +0 -1
  139. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.d.ts +0 -56
  140. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js +0 -128
  141. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js.map +0 -1
  142. package/dist/src/global/A-Feature/A-Feature.class.d.ts +0 -175
  143. package/dist/src/global/A-Feature/A-Feature.class.js +0 -318
  144. package/dist/src/global/A-Feature/A-Feature.class.js.map +0 -1
  145. package/dist/src/global/A-Feature/A-Feature.error.d.ts +0 -25
  146. package/dist/src/global/A-Feature/A-Feature.error.js +0 -33
  147. package/dist/src/global/A-Feature/A-Feature.error.js.map +0 -1
  148. package/dist/src/global/A-Feature/A-Feature.types.d.ts +0 -334
  149. package/dist/src/global/A-Feature/A-Feature.types.js +0 -26
  150. package/dist/src/global/A-Feature/A-Feature.types.js.map +0 -1
  151. package/dist/src/global/A-Fragment/A-Fragment.class.d.ts +0 -36
  152. package/dist/src/global/A-Fragment/A-Fragment.class.js +0 -46
  153. package/dist/src/global/A-Fragment/A-Fragment.class.js.map +0 -1
  154. package/dist/src/global/A-Fragment/A-Fragment.types.d.ts +0 -21
  155. package/dist/src/global/A-Fragment/A-Fragment.types.js +0 -6
  156. package/dist/src/global/A-Fragment/A-Fragment.types.js.map +0 -1
  157. package/dist/src/global/A-Inject/A-Inject.decorator.d.ts +0 -80
  158. package/dist/src/global/A-Inject/A-Inject.decorator.js +0 -49
  159. package/dist/src/global/A-Inject/A-Inject.decorator.js.map +0 -1
  160. package/dist/src/global/A-Inject/A-Inject.error.d.ts +0 -5
  161. package/dist/src/global/A-Inject/A-Inject.error.js +0 -10
  162. package/dist/src/global/A-Inject/A-Inject.error.js.map +0 -1
  163. package/dist/src/global/A-Inject/A-Inject.types.d.ts +0 -42
  164. package/dist/src/global/A-Inject/A-Inject.types.js +0 -3
  165. package/dist/src/global/A-Inject/A-Inject.types.js.map +0 -1
  166. package/dist/src/global/A-Meta/A-Meta.class.d.ts +0 -97
  167. package/dist/src/global/A-Meta/A-Meta.class.js +0 -164
  168. package/dist/src/global/A-Meta/A-Meta.class.js.map +0 -1
  169. package/dist/src/global/A-Meta/A-Meta.types.d.ts +0 -14
  170. package/dist/src/global/A-Meta/A-Meta.types.js +0 -3
  171. package/dist/src/global/A-Meta/A-Meta.types.js.map +0 -1
  172. package/dist/src/global/A-Scope/A-Scope.class.d.ts +0 -466
  173. package/dist/src/global/A-Scope/A-Scope.class.js +0 -791
  174. package/dist/src/global/A-Scope/A-Scope.class.js.map +0 -1
  175. package/dist/src/global/A-Scope/A-Scope.error.d.ts +0 -8
  176. package/dist/src/global/A-Scope/A-Scope.error.js +0 -13
  177. package/dist/src/global/A-Scope/A-Scope.error.js.map +0 -1
  178. package/dist/src/global/A-Scope/A-Scope.types.d.ts +0 -81
  179. package/dist/src/global/A-Scope/A-Scope.types.js +0 -3
  180. package/dist/src/global/A-Scope/A-Scope.types.js.map +0 -1
  181. package/dist/src/global/A-Stage/A-Stage.class.d.ts +0 -112
  182. package/dist/src/global/A-Stage/A-Stage.class.js +0 -240
  183. package/dist/src/global/A-Stage/A-Stage.class.js.map +0 -1
  184. package/dist/src/global/A-Stage/A-Stage.error.d.ts +0 -4
  185. package/dist/src/global/A-Stage/A-Stage.error.js +0 -11
  186. package/dist/src/global/A-Stage/A-Stage.error.js.map +0 -1
  187. package/dist/src/global/A-Stage/A-Stage.types.d.ts +0 -101
  188. package/dist/src/global/A-Stage/A-Stage.types.js +0 -43
  189. package/dist/src/global/A-Stage/A-Stage.types.js.map +0 -1
  190. package/dist/src/global/A-StepManager/A-StepManager.class.d.ts +0 -20
  191. package/dist/src/global/A-StepManager/A-StepManager.class.js +0 -112
  192. package/dist/src/global/A-StepManager/A-StepManager.class.js.map +0 -1
  193. package/dist/src/global/A-StepManager/A-StepManager.error.d.ts +0 -4
  194. package/dist/src/global/A-StepManager/A-StepManager.error.js +0 -9
  195. package/dist/src/global/A-StepManager/A-StepManager.error.js.map +0 -1
  196. package/dist/src/global/ASEID/ASEID.class.d.ts +0 -130
  197. package/dist/src/global/ASEID/ASEID.class.js +0 -167
  198. package/dist/src/global/ASEID/ASEID.class.js.map +0 -1
  199. package/dist/src/global/ASEID/ASEID.constants.d.ts +0 -0
  200. package/dist/src/global/ASEID/ASEID.constants.js +0 -2
  201. package/dist/src/global/ASEID/ASEID.constants.js.map +0 -1
  202. package/dist/src/global/ASEID/ASEID.error.d.ts +0 -5
  203. package/dist/src/global/ASEID/ASEID.error.js +0 -10
  204. package/dist/src/global/ASEID/ASEID.error.js.map +0 -1
  205. package/dist/src/global/ASEID/ASEID.types.d.ts +0 -65
  206. package/dist/src/global/ASEID/ASEID.types.js +0 -5
  207. package/dist/src/global/ASEID/ASEID.types.js.map +0 -1
  208. package/dist/src/helpers/A_Common.helper.d.ts +0 -28
  209. package/dist/src/helpers/A_Common.helper.js +0 -170
  210. package/dist/src/helpers/A_Common.helper.js.map +0 -1
  211. package/dist/src/helpers/A_Formatter.helper.d.ts +0 -35
  212. package/dist/src/helpers/A_Formatter.helper.js +0 -62
  213. package/dist/src/helpers/A_Formatter.helper.js.map +0 -1
  214. package/dist/src/helpers/A_Identity.helper.d.ts +0 -29
  215. package/dist/src/helpers/A_Identity.helper.js +0 -43
  216. package/dist/src/helpers/A_Identity.helper.js.map +0 -1
  217. package/dist/src/helpers/A_TypeGuards.helper.d.ts +0 -207
  218. package/dist/src/helpers/A_TypeGuards.helper.js +0 -296
  219. package/dist/src/helpers/A_TypeGuards.helper.js.map +0 -1
  220. package/dist/src/types/A_Common.types.d.ts +0 -36
  221. package/dist/src/types/A_Common.types.js +0 -3
  222. package/dist/src/types/A_Common.types.js.map +0 -1
  223. package/index.ts +0 -81
  224. package/src/global/A-Dependency/A-DependencyReference.class.ts +0 -61
  225. package/src/global/A-Dependency/A-DependencyReference.types.ts +0 -61
  226. package/trace-require.js +0 -46
  227. package/tsconfig.build.json +0 -58
@@ -1,11 +0,0 @@
1
- export declare enum A_TYPES__EntityMetaKey {
2
- EXTENSIONS = "a-component-extensions",
3
- FEATURES = "a-component-features",
4
- ABSTRACTIONS = "a-component-abstractions",
5
- INJECTIONS = "a-component-injections"
6
- }
7
- export declare enum A_TYPES__EntityFeatures {
8
- SAVE = "save",
9
- DESTROY = "destroy",
10
- LOAD = "load"
11
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_TYPES__EntityFeatures = exports.A_TYPES__EntityMetaKey = void 0;
4
- var A_TYPES__EntityMetaKey;
5
- (function (A_TYPES__EntityMetaKey) {
6
- A_TYPES__EntityMetaKey["EXTENSIONS"] = "a-component-extensions";
7
- A_TYPES__EntityMetaKey["FEATURES"] = "a-component-features";
8
- A_TYPES__EntityMetaKey["ABSTRACTIONS"] = "a-component-abstractions";
9
- A_TYPES__EntityMetaKey["INJECTIONS"] = "a-component-injections";
10
- })(A_TYPES__EntityMetaKey || (exports.A_TYPES__EntityMetaKey = A_TYPES__EntityMetaKey = {}));
11
- var A_TYPES__EntityFeatures;
12
- (function (A_TYPES__EntityFeatures) {
13
- A_TYPES__EntityFeatures["SAVE"] = "save";
14
- A_TYPES__EntityFeatures["DESTROY"] = "destroy";
15
- A_TYPES__EntityFeatures["LOAD"] = "load";
16
- })(A_TYPES__EntityFeatures || (exports.A_TYPES__EntityFeatures = A_TYPES__EntityFeatures = {}));
17
- //# sourceMappingURL=A-Entity.constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Entity.constants.js","sourceRoot":"","sources":["../../../../src/global/A-Entity/A-Entity.constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAKX;AALD,WAAY,sBAAsB;IAC9B,+DAAqC,CAAA;IACrC,2DAAiC,CAAA;IACjC,mEAAyC,CAAA;IACzC,+DAAqC,CAAA;AACzC,CAAC,EALW,sBAAsB,sCAAtB,sBAAsB,QAKjC;AAED,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IAC/B,wCAAa,CAAA;IACb,8CAAmB,CAAA;IACnB,wCAAa,CAAA;AACjB,CAAC,EAJW,uBAAuB,uCAAvB,uBAAuB,QAIlC"}
@@ -1,7 +0,0 @@
1
- import { A_Error } from "../A-Error/A_Error.class";
2
- export declare class A_Entity_Error extends A_Error {
3
- /**
4
- * Error code for validation errors.
5
- */
6
- static readonly ValidationError = "A-Entity Validation Error";
7
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_Entity_Error = void 0;
4
- const A_Error_class_1 = require("../A-Error/A_Error.class");
5
- class A_Entity_Error extends A_Error_class_1.A_Error {
6
- }
7
- exports.A_Entity_Error = A_Entity_Error;
8
- /**
9
- * Error code for validation errors.
10
- */
11
- A_Entity_Error.ValidationError = 'A-Entity Validation Error';
12
- //# sourceMappingURL=A-Entity.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Entity.error.js","sourceRoot":"","sources":["../../../../src/global/A-Entity/A-Entity.error.ts"],"names":[],"mappings":";;;AAAA,4DAAmD;AAInD,MAAa,cAAe,SAAQ,uBAAO;;AAA3C,wCAOC;AALG;;GAEG;AACa,8BAAe,GAAG,2BAA2B,CAAC"}
@@ -1,11 +0,0 @@
1
- import { A_Meta } from "../A-Meta/A-Meta.class";
2
- import { A_TYPES__EntityMeta } from "./A-Entity.types";
3
- import { A_TYPES__FeatureDefineDecoratorMeta } from "../A-Feature/A-Feature.types";
4
- export declare class A_EntityMeta extends A_Meta<A_TYPES__EntityMeta> {
5
- /**
6
- * Returns all features defined in the Container
7
- *
8
- * @returns
9
- */
10
- features(): Array<A_TYPES__FeatureDefineDecoratorMeta>;
11
- }
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_EntityMeta = void 0;
4
- const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
5
- const A_Entity_constants_1 = require("./A-Entity.constants");
6
- class A_EntityMeta extends A_Meta_class_1.A_Meta {
7
- /**
8
- * Returns all features defined in the Container
9
- *
10
- * @returns
11
- */
12
- features() {
13
- const features = this.get(A_Entity_constants_1.A_TYPES__EntityMetaKey.FEATURES);
14
- return (features === null || features === void 0 ? void 0 : features.toArray().map(([, feature]) => feature)) || [];
15
- }
16
- }
17
- exports.A_EntityMeta = A_EntityMeta;
18
- //# sourceMappingURL=A-Entity.meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Entity.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Entity/A-Entity.meta.ts"],"names":[],"mappings":";;;AAAA,yDAAgD;AAEhD,6DAA8D;AAI9D,MAAa,YAAa,SAAQ,qBAA2B;IAEzD;;;;OAIG;IACH,QAAQ;QAEJ,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,2CAAsB,CAAC,QAAQ,CAAC,CAAC;QAE3D,OAAO,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,GAEnB,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;IAC7C,CAAC;CAEJ;AAhBD,oCAgBC"}
@@ -1,56 +0,0 @@
1
- import { A_Meta } from "../A-Meta/A-Meta.class";
2
- import { A_Entity } from "./A-Entity.class";
3
- import { ASEID } from "../ASEID/ASEID.class";
4
- import { A_TYPES__EntityMetaKey } from "./A-Entity.constants";
5
- import { A_TYPES__FeatureDefineDecoratorMeta, A_TYPES__FeatureExtendDecoratorMeta } from "../A-Feature/A-Feature.types";
6
- /**
7
- * Entity interface
8
- */
9
- export interface A_TYPES__IEntity {
10
- /**
11
- * The ASEID of the entity
12
- */
13
- aseid: ASEID;
14
- }
15
- /**
16
- * Entity constructor type
17
- * Uses the generic type T to specify the type of the entity
18
- */
19
- export type A_TYPES__Entity_Constructor<T = A_Entity> = new (...args: any[]) => T;
20
- /**
21
- * Entity initialization type
22
- */
23
- export type A_TYPES__Entity_Init = any;
24
- /**
25
- * Entity serialized type
26
- */
27
- export type A_TYPES__Entity_Serialized = {
28
- /**
29
- * The ASEID of the entity
30
- */
31
- aseid: string;
32
- };
33
- /**
34
- * Entity meta type
35
- */
36
- export type A_TYPES__EntityMeta = {
37
- [A_TYPES__EntityMetaKey.EXTENSIONS]: A_Meta<{
38
- /**
39
- * Where Key the regexp for what to apply the extension
40
- * A set of container names or a wildcard, or a regexp
41
- *
42
- *
43
- * Where value is the extension instructions
44
- */
45
- [Key: string]: A_TYPES__FeatureExtendDecoratorMeta[];
46
- }>;
47
- case: any;
48
- [A_TYPES__EntityMetaKey.FEATURES]: A_Meta<{
49
- /**
50
- * Where Key is the name of the feature
51
- *
52
- * Where value is the list of features
53
- */
54
- [Key: string]: A_TYPES__FeatureDefineDecoratorMeta;
55
- }>;
56
- };
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const A_Entity_constants_1 = require("./A-Entity.constants");
4
- ;
5
- //# sourceMappingURL=A-Entity.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Entity.types.js","sourceRoot":"","sources":["../../../../src/global/A-Entity/A-Entity.types.ts"],"names":[],"mappings":";;AAGA,6DAA8D;AAY7D,CAAC"}
@@ -1,229 +0,0 @@
1
- import { A_TYPES__Error_Init, A_TYPES__Error_Serialized } from './A_Error.types';
2
- import { ASEID } from '../ASEID/ASEID.class';
3
- export declare class A_Error<_ConstructorType extends A_TYPES__Error_Init = A_TYPES__Error_Init, _SerializedType extends A_TYPES__Error_Serialized = A_TYPES__Error_Serialized> extends Error {
4
- /**
5
- * Error Identifier that corresponds to the class name
6
- */
7
- static get entity(): string;
8
- /**
9
- * DEFAULT Namespace of the error from environment variable A_CONCEPT_NAMESPACE
10
- *
11
- * [!] If environment variable is not set, it will default to 'a-concept'
12
- */
13
- static get concept(): string;
14
- /**
15
- * DEFAULT Scope of the entity from environment variable A_CONCEPT_DEFAULT_SCOPE
16
- *
17
- * [!] If environment variable is not set, it will default to 'core'
18
- * [!] Scope is an application specific identifier that can be used to group entities together
19
- * [!] e.g. 'default', 'core', 'public', 'internal', etc
20
- */
21
- static get scope(): string;
22
- /**
23
- * ASEID of the error instance
24
- */
25
- protected _aseid: ASEID;
26
- /**
27
- * Title of the error
28
- */
29
- protected _title: string;
30
- /**
31
- * Possible Scope if needed to identify the error by it's execution environment
32
- */
33
- protected _scope?: string;
34
- /**
35
- * Unique code representing the type of error
36
- */
37
- protected _code?: string;
38
- /**
39
- * Detailed description of the error
40
- */
41
- protected _description?: string;
42
- /**
43
- * Original Error if any
44
- */
45
- protected _originalError?: Error | any;
46
- /**
47
- * Link to the documentation or support page for the error
48
- */
49
- protected _link?: string;
50
- /**
51
- * A_Error is a custom error class for A_Concept framework.
52
- * This error allows to have more structured error handling.
53
- * Each error has a unique code, description and a link to the documentation.
54
- *
55
- * Example of usage:
56
- * ```typescript
57
- *
58
- * // 1) all parameters will be used as provided
59
- * throw new A_Error({
60
- * message: 'User not found',
61
- * code: 'USER_NOT_FOUND',
62
- * description: 'The user with the given ID was not found.',
63
- * link: 'https://support.adaas.org/error/USER_NOT_FOUND'
64
- * });
65
- *
66
- * // or
67
- * // 2) only message is provided, other parameters will be set to default values:
68
- * // - code: 'user-not-found' (kebab-case of the message)
69
- * // - description: 'User not found' (same as message)
70
- * // - link: Empty
71
- * throw new A_Error('User not found');
72
- *
73
- * // or
74
- * // 3) Provided Message and Description, other parameters will be set to default values:
75
- * // - code: 'user-not-found' (kebab-case of the message)
76
- * // - description: 'The user with the given ID was not found.' (as provided)
77
- * // - link: Empty
78
- * throw new A_Error('User not found', 'The user with the given ID was not found.');
79
- *
80
- *
81
- * ```
82
- * [!] Note: The behavior of A_Error is similar to the A_Entity however it cannot have own A_Features.
83
- * [!] Note: This class can be inherited to create custom error classes.
84
- *
85
- * @param message
86
- */
87
- constructor(
88
- /**
89
- * A_Error Constructor params
90
- */
91
- params: _ConstructorType);
92
- constructor(
93
- /**
94
- * Error message
95
- */
96
- message: string);
97
- constructor(
98
- /**
99
- * Original JS Error
100
- */
101
- error: Error);
102
- constructor(
103
- /**
104
- * Error message
105
- */
106
- title: string,
107
- /**
108
- * Detailed description of the error
109
- */
110
- description: string);
111
- /**
112
- * Returns the ASEID of the error instance
113
- */
114
- get aseid(): ASEID;
115
- /**
116
- * Returns the title of the error
117
- *
118
- * Example: 'User not found', 'Validation error', 'Unauthorized access', etc.
119
- *
120
- * [!] Note: This title should be short and concise, less than 60 characters
121
- * [!] Note: If title exceeds 60 characters, there would be an error thrown
122
- * [!] Note: This title is intended to be human-readable and can be displayed in UI or logs
123
- */
124
- get title(): string;
125
- /**
126
- * Returns an Error message what is a brief title of the error
127
- *
128
- */
129
- get message(): string;
130
- /**
131
- * Returns a unique code representing the type of error
132
- *
133
- * If code is not provided, it will generate a kebab-case of the message
134
- *
135
- * Example: 'validation-error', 'not-found', 'user-not-found', 'unauthorized' etc.
136
- *
137
- * [!] Note: It is recommended to use kebab-case for error codes
138
- * [!] Note: If not provided would be used a kebab-case message of the error
139
- */
140
- get code(): string;
141
- /**
142
- * Returns the type of the error which corresponds to the static entity of the class
143
- *
144
- * Example: 'a-error', 'validation-error', 'not-found-error', 'user-error', etc.
145
- *
146
- * Defaults to the kebab-case of the class name
147
- *
148
- * [!] Note: naming ad separation are fully dependent on the architecture of the application
149
- * [!] Note: It is recommended to use kebab-case for error types
150
- * [!] Note: This type is intended to group similar errors together
151
- */
152
- get type(): string;
153
- /**
154
- * Returns a link with possible documentation or support page for the error
155
- * If link is not provided, it will generate a link based on the ASEID of the error that points to the A-Concept support page
156
- *
157
- * Example: https://adaas.support/a-concept/errors/{ASEID}
158
- *
159
- * [!] Note: ASEID is generated based on the static properties of the class (concept, scope, entity) and the code of the error
160
- */
161
- get link(): string;
162
- /**
163
- * The scope name of the error instance
164
- *
165
- * If scope is not provided, it will use the static scope of the class
166
- *
167
- * [!] Note: Scope is an application specific identifier that can be used to group entities together
168
- * [!] e.g. 'default', 'core', 'public', 'internal', etc
169
- */
170
- get scope(): string;
171
- /**
172
- * A detailed description of the error
173
- * If description is not provided, it will use the environment variable A_ERROR_DEFAULT_DESCRIPTION or a generic message
174
- *
175
- * Example: 'The user with the given ID was not found.', 'The provided data is invalid.', 'You do not have permission to access this resource.', etc.
176
- *
177
- * [!] Note: This description is intended to provide more context about the error and can be used for debugging or logging purposes
178
- */
179
- get description(): string;
180
- /**
181
- * Returns the original error if any
182
- *
183
- * This can be useful for debugging purposes to see the original stack trace or error message
184
- *
185
- * [!] Note: Original error is optional and may not be present in all cases
186
- */
187
- get originalError(): Error | any | undefined;
188
- /**
189
- * Determines which initializer method to use based on the type of the first parameter.
190
- *
191
- * @param param1
192
- * @returns
193
- */
194
- protected getInitializer(param1: _ConstructorType | Error | string | any, param2?: string): (param1: any, param2: any) => void | (() => void);
195
- /**
196
- * Initializes the A_Error instance from a standard Error object.
197
- *
198
- * @param error
199
- */
200
- protected fromError(error: Error): void;
201
- /**
202
- * Initializes the A_Error instance from a message.
203
- *
204
- * @param title
205
- * @param description
206
- */
207
- protected fromMessage(message: string): void;
208
- fromTitle(title: string, description: string): void;
209
- /**
210
- * Initializes the A_Error instance from a constructor parameters object.
211
- *
212
- * @param params
213
- */
214
- protected fromConstructor(params: _ConstructorType): void;
215
- /**
216
- * Serializes the A_Error instance to a plain object.
217
- *
218
- *
219
- * @returns
220
- */
221
- toJSON(): _SerializedType;
222
- /**
223
- * Checks if the provided title exceeds 60 characters.
224
- * If it does, throws a validation A_Error.
225
- *
226
- * @param title
227
- */
228
- protected validateTitle(title: string): void;
229
- }