@adaas/a-concept 0.1.30 → 0.1.32

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.
package/dist/index.d.mts CHANGED
@@ -1186,7 +1186,7 @@ declare class A_Stage {
1186
1186
  * @param step
1187
1187
  * @returns
1188
1188
  */
1189
- protected getStepArgs(scope: A_Scope, step: A_TYPES__A_StageStep): Promise<(A_Container | A_Component | A_Entity<any, A_TYPES__Entity_Serialized> | A_Scope<A_TYPES__Component_Constructor[], A_TYPES__Error_Constructor[], A_TYPES__Entity_Constructor[], A_Fragment<any, any>[]> | A_Feature<A_TYPES__FeatureAvailableComponents> | A_Fragment<any, any> | A_TYPES__ScopeResolvableComponents[] | undefined)[]>;
1189
+ protected getStepArgs(scope: A_Scope, step: A_TYPES__A_StageStep): Promise<(A_Container | A_Component | A_Entity<any, A_TYPES__Entity_Serialized> | A_Scope<A_TYPES__Component_Constructor[], A_TYPES__Error_Constructor[], A_TYPES__Entity_Constructor[], A_Fragment<any, any>[]> | A_Feature<A_TYPES__FeatureAvailableComponents> | A_Fragment<any, any> | A_Error<A_TYPES__Error_Init, A_TYPES__Error_Serialized> | A_TYPES__ScopeResolvableComponents[] | undefined)[]>;
1190
1190
  /**
1191
1191
  * Resolves the component of the step
1192
1192
  *
@@ -1249,7 +1249,7 @@ declare class A_StageError extends A_Error {
1249
1249
  static get CompileError(): string;
1250
1250
  }
1251
1251
 
1252
- declare class A_FeatureError extends A_Error {
1252
+ declare class A_FeatureError extends A_Error<A_TYPES__FeatureError_Init> {
1253
1253
  /**
1254
1254
  * Indicates that the Feature has been interrupted
1255
1255
  */
@@ -1260,6 +1260,12 @@ declare class A_FeatureError extends A_Error {
1260
1260
  * Failed during the A-Feature initialization process
1261
1261
  */
1262
1262
  static readonly FeatureInitializationError = "Unable to initialize A-Feature";
1263
+ /**
1264
+ * Indicates that there was an error processing the Feature
1265
+ *
1266
+ * Failed during the A-Feature processing
1267
+ */
1268
+ static readonly FeatureProcessingError = "Error occurred during A-Feature processing";
1263
1269
  /**
1264
1270
  * Indicates that there was an error defining the Feature
1265
1271
  *
@@ -1272,6 +1278,11 @@ declare class A_FeatureError extends A_Error {
1272
1278
  * Failed during the @A_Feature.Extend() decorator execution
1273
1279
  */
1274
1280
  static readonly FeatureExtensionError = "Unable to extend A-Feature";
1281
+ /**
1282
+ * Stage where the error occurred
1283
+ */
1284
+ stage?: A_Stage;
1285
+ protected fromConstructor(params: A_TYPES__FeatureError_Init): void;
1275
1286
  }
1276
1287
 
1277
1288
  /**
@@ -1464,6 +1475,13 @@ declare class A_Feature<T extends A_TYPES__FeatureAvailableComponents = A_TYPES_
1464
1475
  * @returns
1465
1476
  */
1466
1477
  completed(): Promise<void>;
1478
+ /**
1479
+ * This method marks the feature as failed and throws an error
1480
+ * Uses to mark the feature as failed
1481
+ *
1482
+ * @param error
1483
+ */
1484
+ failed(error: A_FeatureError): Promise<void>;
1467
1485
  /**
1468
1486
  * This method marks the feature as failed and throws an error
1469
1487
  * Uses to interrupt or end the feature processing
@@ -1558,8 +1576,18 @@ declare enum A_TYPES__FeatureState {
1558
1576
  /**
1559
1577
  * The feature has been interrupted
1560
1578
  */
1561
- INTERRUPTED = "INTERRUPTED"
1579
+ INTERRUPTED = "INTERRUPTED",
1580
+ /**
1581
+ * The feature has failed
1582
+ */
1583
+ FAILED = "FAILED"
1562
1584
  }
1585
+ type A_TYPES__FeatureError_Init = {
1586
+ /**
1587
+ * Stage where the error occurred
1588
+ */
1589
+ stage?: A_Stage;
1590
+ } & A_TYPES__Error_Init;
1563
1591
  /**
1564
1592
  * A list of component where features can be Defined
1565
1593
  *
@@ -2670,7 +2698,7 @@ type A_TYPES__A_InjectDecorator_Meta = Array<{
2670
2698
  *
2671
2699
  */
2672
2700
  type A_TYPES__InjectableTargets = A_TYPES__Component_Constructor | InstanceType<A_TYPES__Component_Constructor> | InstanceType<A_TYPES__Container_Constructor>;
2673
- type A_TYPES__InjectableConstructors = A_TYPES__Component_Constructor | A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor | A_TYPES__Feature_Constructor | A_TYPES__Caller_Constructor | A_TYPES__Fragment_Constructor | string;
2701
+ type A_TYPES__InjectableConstructors = A_TYPES__Component_Constructor | A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor | A_TYPES__Feature_Constructor | A_TYPES__Caller_Constructor | A_TYPES__Fragment_Constructor | A_TYPES__Error_Constructor | string;
2674
2702
  type A_TYPES__A_InjectDecorator_EntityInjectionInstructions<T extends A_Entity = A_Entity> = {
2675
2703
  query: Partial<A_TYPES__A_InjectDecorator_EntityInjectionQuery<T>>;
2676
2704
  pagination: Partial<A_TYPES__A_InjectDecorator_EntityInjectionPagination>;
@@ -2765,6 +2793,12 @@ declare class A_Scope<_ComponentType extends A_TYPES__Component_Constructor[] =
2765
2793
  * [!] One component instance per scope
2766
2794
  */
2767
2795
  get components(): Array<InstanceType<_ComponentType[number]>>;
2796
+ /**
2797
+ * Returns an Array of errors registered in the scope
2798
+ *
2799
+ * [!] One error per code
2800
+ */
2801
+ get errors(): Array<InstanceType<_ErrorType[number]>>;
2768
2802
  /**
2769
2803
  * Returns the parent scope of the current scope
2770
2804
  *
@@ -2894,6 +2928,11 @@ declare class A_Scope<_ComponentType extends A_TYPES__Component_Constructor[] =
2894
2928
  * Provide a fragment constructor to check if it's available in the scope
2895
2929
  */
2896
2930
  fragment: A_TYPES__Fragment_Constructor<T>): boolean;
2931
+ has<T extends A_Error>(
2932
+ /**
2933
+ * Provide an error constructor to check if it's available in the scope
2934
+ */
2935
+ error: A_TYPES__Error_Constructor<T>): boolean;
2897
2936
  has(
2898
2937
  /**
2899
2938
  * Provide a string to check if a component, entity or fragment with the provided name is available in the scope
@@ -2970,13 +3009,6 @@ declare class A_Scope<_ComponentType extends A_TYPES__Component_Constructor[] =
2970
3009
  * Provide an entity constructor to resolve its instance or an array of instances from the scope
2971
3010
  */
2972
3011
  entity: A_TYPES__Entity_Constructor<T>): T | undefined;
2973
- resolve<T extends A_Scope>(
2974
- /**
2975
- * Uses only in case of resolving a single entity
2976
- *
2977
- * Provide an entity constructor to resolve its instance from the scope
2978
- */
2979
- scope: new (...args: any[]) => T): T | undefined;
2980
3012
  resolve<T extends A_Entity>(
2981
3013
  /**
2982
3014
  * Provide an entity constructor to resolve its instance or an array of instances from the scope
@@ -2986,6 +3018,20 @@ declare class A_Scope<_ComponentType extends A_TYPES__Component_Constructor[] =
2986
3018
  * Provide optional instructions to find a specific entity or a set of entities
2987
3019
  */
2988
3020
  instructions: Partial<A_TYPES__A_InjectDecorator_EntityInjectionInstructions<T>>): Array<T>;
3021
+ resolve<T extends A_Scope>(
3022
+ /**
3023
+ * Uses only in case of resolving a single entity
3024
+ *
3025
+ * Provide an entity constructor to resolve its instance from the scope
3026
+ */
3027
+ scope: A_TYPES__Scope_Constructor<T>): T | undefined;
3028
+ resolve<T extends A_Error>(
3029
+ /**
3030
+ * Uses only in case of resolving a single entity
3031
+ *
3032
+ * Provide an entity constructor to resolve its instance from the scope
3033
+ */
3034
+ scope: A_TYPES__Error_Constructor<T>): T | undefined;
2989
3035
  resolve<T extends A_TYPES__ScopeResolvableComponents>(constructorName: string): T | undefined;
2990
3036
  resolve<T extends A_TYPES__ScopeResolvableComponents>(
2991
3037
  /**
@@ -3025,6 +3071,13 @@ declare class A_Scope<_ComponentType extends A_TYPES__Component_Constructor[] =
3025
3071
  * @returns
3026
3072
  */
3027
3073
  private resolveEntity;
3074
+ /**
3075
+ * This method is used internally to resolve a single error from the scope
3076
+ *
3077
+ * @param error
3078
+ * @returns
3079
+ */
3080
+ private resolveError;
3028
3081
  /**
3029
3082
  * This method is used internally to resolve a single fragment from the scope
3030
3083
  *
@@ -3241,11 +3294,11 @@ type A_TYPES__ScopeLinkedComponents = A_Container | A_Feature;
3241
3294
  /**
3242
3295
  * A list of components that can be resolved by a scope
3243
3296
  */
3244
- type A_TYPES__ScopeResolvableComponents = A_Component | A_Fragment | A_Entity;
3297
+ type A_TYPES__ScopeResolvableComponents = A_Component | A_Fragment | A_Entity | A_Error | A_Scope;
3245
3298
  /**
3246
3299
  * A list of components that are dependent on a scope and do not have their own scope
3247
3300
  */
3248
- type A_TYPES_ScopeDependentComponents = A_Component | A_Entity | A_Fragment;
3301
+ type A_TYPES_ScopeDependentComponents = A_Component | A_Entity | A_Fragment | A_Error;
3249
3302
  /**
3250
3303
  * A list of components that are independent of a scope. They don't need a scope to be resolved
3251
3304
  * Those components haven't scope dependent features.
@@ -3817,6 +3870,13 @@ declare function A_Inject<T extends A_Scope>(
3817
3870
  * [!] It returns an instance of the Scope where the Entity/Component/Container is defined.
3818
3871
  */
3819
3872
  scope: A_TYPES__Scope_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3873
+ declare function A_Inject<T extends A_Error>(
3874
+ /***
3875
+ * Provide the Error constructor that will be associated with the injection.
3876
+ *
3877
+ * [!] It returns an Instance of the Error what is executed.
3878
+ */
3879
+ error: A_TYPES__Error_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3820
3880
  declare function A_Inject<T extends A_Feature>(
3821
3881
  /**
3822
3882
  * Provide the Feature constructor that will be associated with the injection.
@@ -4169,4 +4229,4 @@ declare class A_TypeGuards {
4169
4229
  static isConstructorType<T extends A_TYPES__Error_Init>(param: any): param is T;
4170
4230
  }
4171
4231
 
4172
- export { ASEID, ASEID_Error, A_Abstraction, A_AbstractionError, A_Abstraction_Extend, A_CONSTANTS__DEFAULT_ENV_VARIABLES, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_Caller, A_CallerError, A_CommonHelper, A_Component, A_ComponentMeta, A_Concept, A_ConceptMeta, A_Container, A_ContainerMeta, A_Context, A_Dependency, A_DependencyError, A_Dependency_Default, A_Dependency_Load, A_Dependency_Require, A_Entity, A_Error, A_Feature, A_FeatureError, A_Feature_Define, A_Feature_Extend, A_FormatterHelper, A_Fragment, type A_ID_TYPES__TimeId_Parts, A_IdentityHelper, A_Inject, A_Meta, A_Scope, A_ScopeError, A_Stage, A_StageError, A_StepManagerError, A_StepsManager, type A_TYPES_ScopeDependentComponents, type A_TYPES_ScopeIndependentComponents, type A_TYPES_StageExecutionBehavior, type A_TYPES__ASEID_Constructor, type A_TYPES__ASEID_ConstructorConfig, type A_TYPES__ASEID_JSON, type A_TYPES__A_Dependency_DefaultDecoratorReturn, type A_TYPES__A_Dependency_LoadDecoratorReturn, type A_TYPES__A_Dependency_RequireDecoratorReturn, type A_TYPES__A_InjectDecoratorDescriptor, type A_TYPES__A_InjectDecoratorReturn, type A_TYPES__A_InjectDecorator_EntityInjectionInstructions, type A_TYPES__A_InjectDecorator_EntityInjectionPagination, type A_TYPES__A_InjectDecorator_EntityInjectionQuery, type A_TYPES__A_InjectDecorator_Meta, type A_TYPES__A_StageStep, type A_TYPES__A_StageStepProcessingExtraParams, A_TYPES__A_Stage_Status, type A_TYPES__AbstractionAvailableComponents, type A_TYPES__AbstractionDecoratorConfig, type A_TYPES__AbstractionDecoratorDescriptor, type A_TYPES__Abstraction_Constructor, type A_TYPES__Abstraction_Init, type A_TYPES__Abstraction_Serialized, type A_TYPES__CallerComponent, type A_TYPES__Caller_Constructor, type A_TYPES__Caller_Init, type A_TYPES__Caller_Serialized, type A_TYPES__ComponentMeta, type A_TYPES__ComponentMetaExtension, type A_TYPES__Component_Constructor, type A_TYPES__Component_Init, type A_TYPES__Component_Serialized, type A_TYPES__ConceptAbstraction, type A_TYPES__ConceptAbstractionMeta, type A_TYPES__ConceptENVVariables, type A_TYPES__Concept_Constructor, type A_TYPES__Concept_Init, type A_TYPES__Concept_Serialized, type A_TYPES__ContainerMeta, type A_TYPES__ContainerMetaExtension, type A_TYPES__Container_Constructor, type A_TYPES__Container_Init, type A_TYPES__Container_Serialized, type A_TYPES__ContextEnvironment, type A_TYPES__DeepPartial, type A_TYPES__Dictionary, type A_TYPES__EntityMeta, type A_TYPES__Entity_Constructor, type A_TYPES__Entity_Init, type A_TYPES__Entity_Serialized, type A_TYPES__Error_Constructor, type A_TYPES__Error_Init, type A_TYPES__Error_Serialized, type A_TYPES__ExtractNested, type A_TYPES__ExtractProperties, type A_TYPES__FeatureAvailableComponents, type A_TYPES__FeatureAvailableConstructors, type A_TYPES__FeatureDefineDecoratorConfig, type A_TYPES__FeatureDefineDecoratorDescriptor, type A_TYPES__FeatureDefineDecoratorMeta, type A_TYPES__FeatureDefineDecoratorTarget, type A_TYPES__FeatureDefineDecoratorTemplateItem, type A_TYPES__FeatureExtendDecoratorConfig, type A_TYPES__FeatureExtendDecoratorDescriptor, type A_TYPES__FeatureExtendDecoratorMeta, type A_TYPES__FeatureExtendDecoratorScopeConfig, type A_TYPES__FeatureExtendDecoratorScopeItem, type A_TYPES__FeatureExtendDecoratorTarget, type A_TYPES__FeatureExtendableMeta, A_TYPES__FeatureState, type A_TYPES__Feature_Constructor, type A_TYPES__Feature_Init, type A_TYPES__Feature_InitWithComponent, type A_TYPES__Feature_InitWithTemplate, type A_TYPES__Feature_Serialized, type A_TYPES__Fragment_Constructor, type A_TYPES__Fragment_Init, type A_TYPES__Fragment_Serialized, type A_TYPES__IEntity, type A_TYPES__InjectableConstructors, type A_TYPES__InjectableTargets, type A_TYPES__MetaLinkedComponentConstructors, type A_TYPES__MetaLinkedComponents, type A_TYPES__NonObjectPaths, type A_TYPES__ObjectKeyEnum, type A_TYPES__Paths, type A_TYPES__PathsToObject, type A_TYPES__Required, type A_TYPES__ScopeConfig, type A_TYPES__ScopeLinkedComponents, type A_TYPES__ScopeLinkedConstructors, type A_TYPES__ScopeResolvableComponents, type A_TYPES__Scope_Constructor, type A_TYPES__Scope_Init, type A_TYPES__Scope_Serialized, type A_TYPES__Stage_Serialized, type A_TYPES__UnionToIntersection, A_TypeGuards };
4232
+ export { ASEID, ASEID_Error, A_Abstraction, A_AbstractionError, A_Abstraction_Extend, A_CONSTANTS__DEFAULT_ENV_VARIABLES, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_Caller, A_CallerError, A_CommonHelper, A_Component, A_ComponentMeta, A_Concept, A_ConceptMeta, A_Container, A_ContainerMeta, A_Context, A_Dependency, A_DependencyError, A_Dependency_Default, A_Dependency_Load, A_Dependency_Require, A_Entity, A_Error, A_Feature, A_FeatureError, A_Feature_Define, A_Feature_Extend, A_FormatterHelper, A_Fragment, type A_ID_TYPES__TimeId_Parts, A_IdentityHelper, A_Inject, A_Meta, A_Scope, A_ScopeError, A_Stage, A_StageError, A_StepManagerError, A_StepsManager, type A_TYPES_ScopeDependentComponents, type A_TYPES_ScopeIndependentComponents, type A_TYPES_StageExecutionBehavior, type A_TYPES__ASEID_Constructor, type A_TYPES__ASEID_ConstructorConfig, type A_TYPES__ASEID_JSON, type A_TYPES__A_Dependency_DefaultDecoratorReturn, type A_TYPES__A_Dependency_LoadDecoratorReturn, type A_TYPES__A_Dependency_RequireDecoratorReturn, type A_TYPES__A_InjectDecoratorDescriptor, type A_TYPES__A_InjectDecoratorReturn, type A_TYPES__A_InjectDecorator_EntityInjectionInstructions, type A_TYPES__A_InjectDecorator_EntityInjectionPagination, type A_TYPES__A_InjectDecorator_EntityInjectionQuery, type A_TYPES__A_InjectDecorator_Meta, type A_TYPES__A_StageStep, type A_TYPES__A_StageStepProcessingExtraParams, A_TYPES__A_Stage_Status, type A_TYPES__AbstractionAvailableComponents, type A_TYPES__AbstractionDecoratorConfig, type A_TYPES__AbstractionDecoratorDescriptor, type A_TYPES__Abstraction_Constructor, type A_TYPES__Abstraction_Init, type A_TYPES__Abstraction_Serialized, type A_TYPES__CallerComponent, type A_TYPES__Caller_Constructor, type A_TYPES__Caller_Init, type A_TYPES__Caller_Serialized, type A_TYPES__ComponentMeta, type A_TYPES__ComponentMetaExtension, type A_TYPES__Component_Constructor, type A_TYPES__Component_Init, type A_TYPES__Component_Serialized, type A_TYPES__ConceptAbstraction, type A_TYPES__ConceptAbstractionMeta, type A_TYPES__ConceptENVVariables, type A_TYPES__Concept_Constructor, type A_TYPES__Concept_Init, type A_TYPES__Concept_Serialized, type A_TYPES__ContainerMeta, type A_TYPES__ContainerMetaExtension, type A_TYPES__Container_Constructor, type A_TYPES__Container_Init, type A_TYPES__Container_Serialized, type A_TYPES__ContextEnvironment, type A_TYPES__DeepPartial, type A_TYPES__Dictionary, type A_TYPES__EntityMeta, type A_TYPES__Entity_Constructor, type A_TYPES__Entity_Init, type A_TYPES__Entity_Serialized, type A_TYPES__Error_Constructor, type A_TYPES__Error_Init, type A_TYPES__Error_Serialized, type A_TYPES__ExtractNested, type A_TYPES__ExtractProperties, type A_TYPES__FeatureAvailableComponents, type A_TYPES__FeatureAvailableConstructors, type A_TYPES__FeatureDefineDecoratorConfig, type A_TYPES__FeatureDefineDecoratorDescriptor, type A_TYPES__FeatureDefineDecoratorMeta, type A_TYPES__FeatureDefineDecoratorTarget, type A_TYPES__FeatureDefineDecoratorTemplateItem, type A_TYPES__FeatureError_Init, type A_TYPES__FeatureExtendDecoratorConfig, type A_TYPES__FeatureExtendDecoratorDescriptor, type A_TYPES__FeatureExtendDecoratorMeta, type A_TYPES__FeatureExtendDecoratorScopeConfig, type A_TYPES__FeatureExtendDecoratorScopeItem, type A_TYPES__FeatureExtendDecoratorTarget, type A_TYPES__FeatureExtendableMeta, A_TYPES__FeatureState, type A_TYPES__Feature_Constructor, type A_TYPES__Feature_Init, type A_TYPES__Feature_InitWithComponent, type A_TYPES__Feature_InitWithTemplate, type A_TYPES__Feature_Serialized, type A_TYPES__Fragment_Constructor, type A_TYPES__Fragment_Init, type A_TYPES__Fragment_Serialized, type A_TYPES__IEntity, type A_TYPES__InjectableConstructors, type A_TYPES__InjectableTargets, type A_TYPES__MetaLinkedComponentConstructors, type A_TYPES__MetaLinkedComponents, type A_TYPES__NonObjectPaths, type A_TYPES__ObjectKeyEnum, type A_TYPES__Paths, type A_TYPES__PathsToObject, type A_TYPES__Required, type A_TYPES__ScopeConfig, type A_TYPES__ScopeLinkedComponents, type A_TYPES__ScopeLinkedConstructors, type A_TYPES__ScopeResolvableComponents, type A_TYPES__Scope_Constructor, type A_TYPES__Scope_Init, type A_TYPES__Scope_Serialized, type A_TYPES__Stage_Serialized, type A_TYPES__UnionToIntersection, A_TypeGuards };
package/dist/index.d.ts CHANGED
@@ -1186,7 +1186,7 @@ declare class A_Stage {
1186
1186
  * @param step
1187
1187
  * @returns
1188
1188
  */
1189
- protected getStepArgs(scope: A_Scope, step: A_TYPES__A_StageStep): Promise<(A_Container | A_Component | A_Entity<any, A_TYPES__Entity_Serialized> | A_Scope<A_TYPES__Component_Constructor[], A_TYPES__Error_Constructor[], A_TYPES__Entity_Constructor[], A_Fragment<any, any>[]> | A_Feature<A_TYPES__FeatureAvailableComponents> | A_Fragment<any, any> | A_TYPES__ScopeResolvableComponents[] | undefined)[]>;
1189
+ protected getStepArgs(scope: A_Scope, step: A_TYPES__A_StageStep): Promise<(A_Container | A_Component | A_Entity<any, A_TYPES__Entity_Serialized> | A_Scope<A_TYPES__Component_Constructor[], A_TYPES__Error_Constructor[], A_TYPES__Entity_Constructor[], A_Fragment<any, any>[]> | A_Feature<A_TYPES__FeatureAvailableComponents> | A_Fragment<any, any> | A_Error<A_TYPES__Error_Init, A_TYPES__Error_Serialized> | A_TYPES__ScopeResolvableComponents[] | undefined)[]>;
1190
1190
  /**
1191
1191
  * Resolves the component of the step
1192
1192
  *
@@ -1249,7 +1249,7 @@ declare class A_StageError extends A_Error {
1249
1249
  static get CompileError(): string;
1250
1250
  }
1251
1251
 
1252
- declare class A_FeatureError extends A_Error {
1252
+ declare class A_FeatureError extends A_Error<A_TYPES__FeatureError_Init> {
1253
1253
  /**
1254
1254
  * Indicates that the Feature has been interrupted
1255
1255
  */
@@ -1260,6 +1260,12 @@ declare class A_FeatureError extends A_Error {
1260
1260
  * Failed during the A-Feature initialization process
1261
1261
  */
1262
1262
  static readonly FeatureInitializationError = "Unable to initialize A-Feature";
1263
+ /**
1264
+ * Indicates that there was an error processing the Feature
1265
+ *
1266
+ * Failed during the A-Feature processing
1267
+ */
1268
+ static readonly FeatureProcessingError = "Error occurred during A-Feature processing";
1263
1269
  /**
1264
1270
  * Indicates that there was an error defining the Feature
1265
1271
  *
@@ -1272,6 +1278,11 @@ declare class A_FeatureError extends A_Error {
1272
1278
  * Failed during the @A_Feature.Extend() decorator execution
1273
1279
  */
1274
1280
  static readonly FeatureExtensionError = "Unable to extend A-Feature";
1281
+ /**
1282
+ * Stage where the error occurred
1283
+ */
1284
+ stage?: A_Stage;
1285
+ protected fromConstructor(params: A_TYPES__FeatureError_Init): void;
1275
1286
  }
1276
1287
 
1277
1288
  /**
@@ -1464,6 +1475,13 @@ declare class A_Feature<T extends A_TYPES__FeatureAvailableComponents = A_TYPES_
1464
1475
  * @returns
1465
1476
  */
1466
1477
  completed(): Promise<void>;
1478
+ /**
1479
+ * This method marks the feature as failed and throws an error
1480
+ * Uses to mark the feature as failed
1481
+ *
1482
+ * @param error
1483
+ */
1484
+ failed(error: A_FeatureError): Promise<void>;
1467
1485
  /**
1468
1486
  * This method marks the feature as failed and throws an error
1469
1487
  * Uses to interrupt or end the feature processing
@@ -1558,8 +1576,18 @@ declare enum A_TYPES__FeatureState {
1558
1576
  /**
1559
1577
  * The feature has been interrupted
1560
1578
  */
1561
- INTERRUPTED = "INTERRUPTED"
1579
+ INTERRUPTED = "INTERRUPTED",
1580
+ /**
1581
+ * The feature has failed
1582
+ */
1583
+ FAILED = "FAILED"
1562
1584
  }
1585
+ type A_TYPES__FeatureError_Init = {
1586
+ /**
1587
+ * Stage where the error occurred
1588
+ */
1589
+ stage?: A_Stage;
1590
+ } & A_TYPES__Error_Init;
1563
1591
  /**
1564
1592
  * A list of component where features can be Defined
1565
1593
  *
@@ -2670,7 +2698,7 @@ type A_TYPES__A_InjectDecorator_Meta = Array<{
2670
2698
  *
2671
2699
  */
2672
2700
  type A_TYPES__InjectableTargets = A_TYPES__Component_Constructor | InstanceType<A_TYPES__Component_Constructor> | InstanceType<A_TYPES__Container_Constructor>;
2673
- type A_TYPES__InjectableConstructors = A_TYPES__Component_Constructor | A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor | A_TYPES__Feature_Constructor | A_TYPES__Caller_Constructor | A_TYPES__Fragment_Constructor | string;
2701
+ type A_TYPES__InjectableConstructors = A_TYPES__Component_Constructor | A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor | A_TYPES__Feature_Constructor | A_TYPES__Caller_Constructor | A_TYPES__Fragment_Constructor | A_TYPES__Error_Constructor | string;
2674
2702
  type A_TYPES__A_InjectDecorator_EntityInjectionInstructions<T extends A_Entity = A_Entity> = {
2675
2703
  query: Partial<A_TYPES__A_InjectDecorator_EntityInjectionQuery<T>>;
2676
2704
  pagination: Partial<A_TYPES__A_InjectDecorator_EntityInjectionPagination>;
@@ -2765,6 +2793,12 @@ declare class A_Scope<_ComponentType extends A_TYPES__Component_Constructor[] =
2765
2793
  * [!] One component instance per scope
2766
2794
  */
2767
2795
  get components(): Array<InstanceType<_ComponentType[number]>>;
2796
+ /**
2797
+ * Returns an Array of errors registered in the scope
2798
+ *
2799
+ * [!] One error per code
2800
+ */
2801
+ get errors(): Array<InstanceType<_ErrorType[number]>>;
2768
2802
  /**
2769
2803
  * Returns the parent scope of the current scope
2770
2804
  *
@@ -2894,6 +2928,11 @@ declare class A_Scope<_ComponentType extends A_TYPES__Component_Constructor[] =
2894
2928
  * Provide a fragment constructor to check if it's available in the scope
2895
2929
  */
2896
2930
  fragment: A_TYPES__Fragment_Constructor<T>): boolean;
2931
+ has<T extends A_Error>(
2932
+ /**
2933
+ * Provide an error constructor to check if it's available in the scope
2934
+ */
2935
+ error: A_TYPES__Error_Constructor<T>): boolean;
2897
2936
  has(
2898
2937
  /**
2899
2938
  * Provide a string to check if a component, entity or fragment with the provided name is available in the scope
@@ -2970,13 +3009,6 @@ declare class A_Scope<_ComponentType extends A_TYPES__Component_Constructor[] =
2970
3009
  * Provide an entity constructor to resolve its instance or an array of instances from the scope
2971
3010
  */
2972
3011
  entity: A_TYPES__Entity_Constructor<T>): T | undefined;
2973
- resolve<T extends A_Scope>(
2974
- /**
2975
- * Uses only in case of resolving a single entity
2976
- *
2977
- * Provide an entity constructor to resolve its instance from the scope
2978
- */
2979
- scope: new (...args: any[]) => T): T | undefined;
2980
3012
  resolve<T extends A_Entity>(
2981
3013
  /**
2982
3014
  * Provide an entity constructor to resolve its instance or an array of instances from the scope
@@ -2986,6 +3018,20 @@ declare class A_Scope<_ComponentType extends A_TYPES__Component_Constructor[] =
2986
3018
  * Provide optional instructions to find a specific entity or a set of entities
2987
3019
  */
2988
3020
  instructions: Partial<A_TYPES__A_InjectDecorator_EntityInjectionInstructions<T>>): Array<T>;
3021
+ resolve<T extends A_Scope>(
3022
+ /**
3023
+ * Uses only in case of resolving a single entity
3024
+ *
3025
+ * Provide an entity constructor to resolve its instance from the scope
3026
+ */
3027
+ scope: A_TYPES__Scope_Constructor<T>): T | undefined;
3028
+ resolve<T extends A_Error>(
3029
+ /**
3030
+ * Uses only in case of resolving a single entity
3031
+ *
3032
+ * Provide an entity constructor to resolve its instance from the scope
3033
+ */
3034
+ scope: A_TYPES__Error_Constructor<T>): T | undefined;
2989
3035
  resolve<T extends A_TYPES__ScopeResolvableComponents>(constructorName: string): T | undefined;
2990
3036
  resolve<T extends A_TYPES__ScopeResolvableComponents>(
2991
3037
  /**
@@ -3025,6 +3071,13 @@ declare class A_Scope<_ComponentType extends A_TYPES__Component_Constructor[] =
3025
3071
  * @returns
3026
3072
  */
3027
3073
  private resolveEntity;
3074
+ /**
3075
+ * This method is used internally to resolve a single error from the scope
3076
+ *
3077
+ * @param error
3078
+ * @returns
3079
+ */
3080
+ private resolveError;
3028
3081
  /**
3029
3082
  * This method is used internally to resolve a single fragment from the scope
3030
3083
  *
@@ -3241,11 +3294,11 @@ type A_TYPES__ScopeLinkedComponents = A_Container | A_Feature;
3241
3294
  /**
3242
3295
  * A list of components that can be resolved by a scope
3243
3296
  */
3244
- type A_TYPES__ScopeResolvableComponents = A_Component | A_Fragment | A_Entity;
3297
+ type A_TYPES__ScopeResolvableComponents = A_Component | A_Fragment | A_Entity | A_Error | A_Scope;
3245
3298
  /**
3246
3299
  * A list of components that are dependent on a scope and do not have their own scope
3247
3300
  */
3248
- type A_TYPES_ScopeDependentComponents = A_Component | A_Entity | A_Fragment;
3301
+ type A_TYPES_ScopeDependentComponents = A_Component | A_Entity | A_Fragment | A_Error;
3249
3302
  /**
3250
3303
  * A list of components that are independent of a scope. They don't need a scope to be resolved
3251
3304
  * Those components haven't scope dependent features.
@@ -3817,6 +3870,13 @@ declare function A_Inject<T extends A_Scope>(
3817
3870
  * [!] It returns an instance of the Scope where the Entity/Component/Container is defined.
3818
3871
  */
3819
3872
  scope: A_TYPES__Scope_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3873
+ declare function A_Inject<T extends A_Error>(
3874
+ /***
3875
+ * Provide the Error constructor that will be associated with the injection.
3876
+ *
3877
+ * [!] It returns an Instance of the Error what is executed.
3878
+ */
3879
+ error: A_TYPES__Error_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3820
3880
  declare function A_Inject<T extends A_Feature>(
3821
3881
  /**
3822
3882
  * Provide the Feature constructor that will be associated with the injection.
@@ -4169,4 +4229,4 @@ declare class A_TypeGuards {
4169
4229
  static isConstructorType<T extends A_TYPES__Error_Init>(param: any): param is T;
4170
4230
  }
4171
4231
 
4172
- export { ASEID, ASEID_Error, A_Abstraction, A_AbstractionError, A_Abstraction_Extend, A_CONSTANTS__DEFAULT_ENV_VARIABLES, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_Caller, A_CallerError, A_CommonHelper, A_Component, A_ComponentMeta, A_Concept, A_ConceptMeta, A_Container, A_ContainerMeta, A_Context, A_Dependency, A_DependencyError, A_Dependency_Default, A_Dependency_Load, A_Dependency_Require, A_Entity, A_Error, A_Feature, A_FeatureError, A_Feature_Define, A_Feature_Extend, A_FormatterHelper, A_Fragment, type A_ID_TYPES__TimeId_Parts, A_IdentityHelper, A_Inject, A_Meta, A_Scope, A_ScopeError, A_Stage, A_StageError, A_StepManagerError, A_StepsManager, type A_TYPES_ScopeDependentComponents, type A_TYPES_ScopeIndependentComponents, type A_TYPES_StageExecutionBehavior, type A_TYPES__ASEID_Constructor, type A_TYPES__ASEID_ConstructorConfig, type A_TYPES__ASEID_JSON, type A_TYPES__A_Dependency_DefaultDecoratorReturn, type A_TYPES__A_Dependency_LoadDecoratorReturn, type A_TYPES__A_Dependency_RequireDecoratorReturn, type A_TYPES__A_InjectDecoratorDescriptor, type A_TYPES__A_InjectDecoratorReturn, type A_TYPES__A_InjectDecorator_EntityInjectionInstructions, type A_TYPES__A_InjectDecorator_EntityInjectionPagination, type A_TYPES__A_InjectDecorator_EntityInjectionQuery, type A_TYPES__A_InjectDecorator_Meta, type A_TYPES__A_StageStep, type A_TYPES__A_StageStepProcessingExtraParams, A_TYPES__A_Stage_Status, type A_TYPES__AbstractionAvailableComponents, type A_TYPES__AbstractionDecoratorConfig, type A_TYPES__AbstractionDecoratorDescriptor, type A_TYPES__Abstraction_Constructor, type A_TYPES__Abstraction_Init, type A_TYPES__Abstraction_Serialized, type A_TYPES__CallerComponent, type A_TYPES__Caller_Constructor, type A_TYPES__Caller_Init, type A_TYPES__Caller_Serialized, type A_TYPES__ComponentMeta, type A_TYPES__ComponentMetaExtension, type A_TYPES__Component_Constructor, type A_TYPES__Component_Init, type A_TYPES__Component_Serialized, type A_TYPES__ConceptAbstraction, type A_TYPES__ConceptAbstractionMeta, type A_TYPES__ConceptENVVariables, type A_TYPES__Concept_Constructor, type A_TYPES__Concept_Init, type A_TYPES__Concept_Serialized, type A_TYPES__ContainerMeta, type A_TYPES__ContainerMetaExtension, type A_TYPES__Container_Constructor, type A_TYPES__Container_Init, type A_TYPES__Container_Serialized, type A_TYPES__ContextEnvironment, type A_TYPES__DeepPartial, type A_TYPES__Dictionary, type A_TYPES__EntityMeta, type A_TYPES__Entity_Constructor, type A_TYPES__Entity_Init, type A_TYPES__Entity_Serialized, type A_TYPES__Error_Constructor, type A_TYPES__Error_Init, type A_TYPES__Error_Serialized, type A_TYPES__ExtractNested, type A_TYPES__ExtractProperties, type A_TYPES__FeatureAvailableComponents, type A_TYPES__FeatureAvailableConstructors, type A_TYPES__FeatureDefineDecoratorConfig, type A_TYPES__FeatureDefineDecoratorDescriptor, type A_TYPES__FeatureDefineDecoratorMeta, type A_TYPES__FeatureDefineDecoratorTarget, type A_TYPES__FeatureDefineDecoratorTemplateItem, type A_TYPES__FeatureExtendDecoratorConfig, type A_TYPES__FeatureExtendDecoratorDescriptor, type A_TYPES__FeatureExtendDecoratorMeta, type A_TYPES__FeatureExtendDecoratorScopeConfig, type A_TYPES__FeatureExtendDecoratorScopeItem, type A_TYPES__FeatureExtendDecoratorTarget, type A_TYPES__FeatureExtendableMeta, A_TYPES__FeatureState, type A_TYPES__Feature_Constructor, type A_TYPES__Feature_Init, type A_TYPES__Feature_InitWithComponent, type A_TYPES__Feature_InitWithTemplate, type A_TYPES__Feature_Serialized, type A_TYPES__Fragment_Constructor, type A_TYPES__Fragment_Init, type A_TYPES__Fragment_Serialized, type A_TYPES__IEntity, type A_TYPES__InjectableConstructors, type A_TYPES__InjectableTargets, type A_TYPES__MetaLinkedComponentConstructors, type A_TYPES__MetaLinkedComponents, type A_TYPES__NonObjectPaths, type A_TYPES__ObjectKeyEnum, type A_TYPES__Paths, type A_TYPES__PathsToObject, type A_TYPES__Required, type A_TYPES__ScopeConfig, type A_TYPES__ScopeLinkedComponents, type A_TYPES__ScopeLinkedConstructors, type A_TYPES__ScopeResolvableComponents, type A_TYPES__Scope_Constructor, type A_TYPES__Scope_Init, type A_TYPES__Scope_Serialized, type A_TYPES__Stage_Serialized, type A_TYPES__UnionToIntersection, A_TypeGuards };
4232
+ export { ASEID, ASEID_Error, A_Abstraction, A_AbstractionError, A_Abstraction_Extend, A_CONSTANTS__DEFAULT_ENV_VARIABLES, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_Caller, A_CallerError, A_CommonHelper, A_Component, A_ComponentMeta, A_Concept, A_ConceptMeta, A_Container, A_ContainerMeta, A_Context, A_Dependency, A_DependencyError, A_Dependency_Default, A_Dependency_Load, A_Dependency_Require, A_Entity, A_Error, A_Feature, A_FeatureError, A_Feature_Define, A_Feature_Extend, A_FormatterHelper, A_Fragment, type A_ID_TYPES__TimeId_Parts, A_IdentityHelper, A_Inject, A_Meta, A_Scope, A_ScopeError, A_Stage, A_StageError, A_StepManagerError, A_StepsManager, type A_TYPES_ScopeDependentComponents, type A_TYPES_ScopeIndependentComponents, type A_TYPES_StageExecutionBehavior, type A_TYPES__ASEID_Constructor, type A_TYPES__ASEID_ConstructorConfig, type A_TYPES__ASEID_JSON, type A_TYPES__A_Dependency_DefaultDecoratorReturn, type A_TYPES__A_Dependency_LoadDecoratorReturn, type A_TYPES__A_Dependency_RequireDecoratorReturn, type A_TYPES__A_InjectDecoratorDescriptor, type A_TYPES__A_InjectDecoratorReturn, type A_TYPES__A_InjectDecorator_EntityInjectionInstructions, type A_TYPES__A_InjectDecorator_EntityInjectionPagination, type A_TYPES__A_InjectDecorator_EntityInjectionQuery, type A_TYPES__A_InjectDecorator_Meta, type A_TYPES__A_StageStep, type A_TYPES__A_StageStepProcessingExtraParams, A_TYPES__A_Stage_Status, type A_TYPES__AbstractionAvailableComponents, type A_TYPES__AbstractionDecoratorConfig, type A_TYPES__AbstractionDecoratorDescriptor, type A_TYPES__Abstraction_Constructor, type A_TYPES__Abstraction_Init, type A_TYPES__Abstraction_Serialized, type A_TYPES__CallerComponent, type A_TYPES__Caller_Constructor, type A_TYPES__Caller_Init, type A_TYPES__Caller_Serialized, type A_TYPES__ComponentMeta, type A_TYPES__ComponentMetaExtension, type A_TYPES__Component_Constructor, type A_TYPES__Component_Init, type A_TYPES__Component_Serialized, type A_TYPES__ConceptAbstraction, type A_TYPES__ConceptAbstractionMeta, type A_TYPES__ConceptENVVariables, type A_TYPES__Concept_Constructor, type A_TYPES__Concept_Init, type A_TYPES__Concept_Serialized, type A_TYPES__ContainerMeta, type A_TYPES__ContainerMetaExtension, type A_TYPES__Container_Constructor, type A_TYPES__Container_Init, type A_TYPES__Container_Serialized, type A_TYPES__ContextEnvironment, type A_TYPES__DeepPartial, type A_TYPES__Dictionary, type A_TYPES__EntityMeta, type A_TYPES__Entity_Constructor, type A_TYPES__Entity_Init, type A_TYPES__Entity_Serialized, type A_TYPES__Error_Constructor, type A_TYPES__Error_Init, type A_TYPES__Error_Serialized, type A_TYPES__ExtractNested, type A_TYPES__ExtractProperties, type A_TYPES__FeatureAvailableComponents, type A_TYPES__FeatureAvailableConstructors, type A_TYPES__FeatureDefineDecoratorConfig, type A_TYPES__FeatureDefineDecoratorDescriptor, type A_TYPES__FeatureDefineDecoratorMeta, type A_TYPES__FeatureDefineDecoratorTarget, type A_TYPES__FeatureDefineDecoratorTemplateItem, type A_TYPES__FeatureError_Init, type A_TYPES__FeatureExtendDecoratorConfig, type A_TYPES__FeatureExtendDecoratorDescriptor, type A_TYPES__FeatureExtendDecoratorMeta, type A_TYPES__FeatureExtendDecoratorScopeConfig, type A_TYPES__FeatureExtendDecoratorScopeItem, type A_TYPES__FeatureExtendDecoratorTarget, type A_TYPES__FeatureExtendableMeta, A_TYPES__FeatureState, type A_TYPES__Feature_Constructor, type A_TYPES__Feature_Init, type A_TYPES__Feature_InitWithComponent, type A_TYPES__Feature_InitWithTemplate, type A_TYPES__Feature_Serialized, type A_TYPES__Fragment_Constructor, type A_TYPES__Fragment_Init, type A_TYPES__Fragment_Serialized, type A_TYPES__IEntity, type A_TYPES__InjectableConstructors, type A_TYPES__InjectableTargets, type A_TYPES__MetaLinkedComponentConstructors, type A_TYPES__MetaLinkedComponents, type A_TYPES__NonObjectPaths, type A_TYPES__ObjectKeyEnum, type A_TYPES__Paths, type A_TYPES__PathsToObject, type A_TYPES__Required, type A_TYPES__ScopeConfig, type A_TYPES__ScopeLinkedComponents, type A_TYPES__ScopeLinkedConstructors, type A_TYPES__ScopeResolvableComponents, type A_TYPES__Scope_Constructor, type A_TYPES__Scope_Init, type A_TYPES__Scope_Serialized, type A_TYPES__Stage_Serialized, type A_TYPES__UnionToIntersection, A_TypeGuards };