@adaas/a-concept 0.3.2 → 0.3.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.
@@ -738,6 +738,12 @@ declare class A_Meta<_StorageItems extends Record<any, any> = any, _SerializedTy
738
738
  * @returns
739
739
  */
740
740
  from(meta: A_Meta<_StorageItems>): A_Meta<_StorageItems>;
741
+ /**
742
+ * Allows to create a copy of the meta object with the same values, this is needed to ensure that when we inherit meta from the parent component, we create a copy of it, not a reference to the same object. This allows us to modify the meta of the child component without affecting the meta of the parent component.
743
+ *
744
+ * @returns
745
+ */
746
+ clone(): A_Meta<_StorageItems>;
741
747
  /**
742
748
  * Method to set values in the map
743
749
  *
@@ -813,7 +819,18 @@ declare class A_Meta<_StorageItems extends Record<any, any> = any, _SerializedTy
813
819
  * Method to clear the map
814
820
  */
815
821
  clear(): void;
822
+ /**
823
+ * Method to convert the meta to an array of key-value pairs
824
+ *
825
+ * @returns
826
+ */
816
827
  toArray(): Array<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]>;
828
+ /**
829
+ * Helper method to recursively convert the meta object to a JSON-compatible format. It handles nested A_Meta instances, Maps, Arrays, and plain objects.
830
+ *
831
+ * @param value
832
+ * @returns
833
+ */
817
834
  protected recursiveToJSON(value: any): any;
818
835
  /**
819
836
  * Serializes the meta to a JSON object
@@ -839,11 +856,11 @@ declare enum A_TYPES__EntityMetaKey {
839
856
  ABSTRACTIONS = "a-component-abstractions",
840
857
  INJECTIONS = "a-component-injections"
841
858
  }
842
- declare enum A_TYPES__EntityFeatures {
843
- SAVE = "save",
844
- DESTROY = "destroy",
845
- LOAD = "load"
846
- }
859
+ declare const A_TYPES__EntityFeatures: {
860
+ readonly SAVE: "_A_Entity__Save";
861
+ readonly DESTROY: "_A_Entity__Destroy";
862
+ readonly LOAD: "_A_Entity__Load";
863
+ };
847
864
 
848
865
  /**
849
866
  * Entity interface
@@ -907,6 +924,7 @@ type A_TYPES__EntityMeta = {
907
924
  [Key: string]: A_TYPES__A_InjectDecorator_Meta;
908
925
  }>;
909
926
  };
927
+ type A_TYPES__EntityFeatureNames = typeof A_TYPES__EntityFeatures[keyof typeof A_TYPES__EntityFeatures];
910
928
 
911
929
  /**
912
930
  * A_Entity is another abstraction that describes all major participants in the system business logic.
@@ -1065,15 +1083,15 @@ declare class A_Entity<_ConstructorType extends A_TYPES__Entity_Init = A_TYPES__
1065
1083
  /**
1066
1084
  * The default method that can be called and extended to load entity data.
1067
1085
  */
1068
- load(scope?: A_Scope): Promise<any>;
1086
+ load(scope?: A_Scope): Promise<void> | void;
1069
1087
  /**
1070
1088
  * The default method that can be called and extended to destroy entity data.
1071
1089
  */
1072
- destroy(scope?: A_Scope): Promise<any>;
1090
+ destroy(scope?: A_Scope): Promise<void> | void;
1073
1091
  /**
1074
1092
  * The default method that can be called and extended to save entity data.
1075
1093
  */
1076
- save(scope?: A_Scope): Promise<any>;
1094
+ save(scope?: A_Scope): Promise<void> | void;
1077
1095
  /**
1078
1096
  * Create a new entity from ASEID string or instance
1079
1097
  * [!] Executed when the constructor is called with a string or ASEID instance that represents the ASEID
@@ -1129,7 +1147,7 @@ declare class A_Entity<_ConstructorType extends A_TYPES__Entity_Init = A_TYPES__
1129
1147
  toString(): string;
1130
1148
  }
1131
1149
 
1132
- declare class A_EntityMeta extends A_Meta<A_TYPES__EntityMeta> {
1150
+ declare class A_EntityMeta<T extends A_TYPES__EntityMeta = A_TYPES__EntityMeta> extends A_Meta<T> {
1133
1151
  /**
1134
1152
  * Returns all features defined in the Container
1135
1153
  *
@@ -2844,7 +2862,7 @@ declare class A_Container {
2844
2862
  scope?: A_Scope): Promise<void>;
2845
2863
  }
2846
2864
 
2847
- declare class A_ContainerMeta extends A_Meta<A_TYPES__ContainerMeta> {
2865
+ declare class A_ContainerMeta<T extends A_TYPES__ContainerMeta = A_TYPES__ContainerMeta> extends A_Meta<T> {
2848
2866
  /**
2849
2867
  * Allows to get all the injections for a given handler
2850
2868
  *
@@ -3330,7 +3348,27 @@ declare class A_Scope<_MetaItems extends Record<string, any> = any, _ComponentTy
3330
3348
  * Provide the fragment name in PascalCase to retrieve its constructor
3331
3349
  */
3332
3350
  name: string): A_TYPES__Fragment_Constructor<T>;
3333
- resolveConstructor<T extends A_TYPES__A_DependencyInjectable>(name: string): A_TYPES__Entity_Constructor<T> | A_TYPES__Component_Constructor<T> | A_TYPES__Fragment_Constructor<T> | undefined;
3351
+ resolveConstructor<T extends A_Component>(
3352
+ /**
3353
+ * Provide the component constructor or its name to retrieve its constructor
3354
+ */
3355
+ component: A_TYPES__Ctor<T>): A_TYPES__Component_Constructor<T> | undefined;
3356
+ resolveConstructor<T extends A_Entity>(
3357
+ /**
3358
+ * Provide the entity constructor or its name to retrieve its constructor
3359
+ */
3360
+ entity: A_TYPES__Ctor<T>): A_TYPES__Entity_Constructor<T> | undefined;
3361
+ resolveConstructor<T extends A_Fragment>(
3362
+ /**
3363
+ * Provide the fragment constructor or its name to retrieve its constructor
3364
+ */
3365
+ fragment: A_TYPES__Ctor<T>): A_TYPES__Fragment_Constructor<T> | undefined;
3366
+ resolveConstructor<T extends A_Error>(
3367
+ /**
3368
+ * Provide the error constructor or its name to retrieve its constructor
3369
+ */
3370
+ error: A_TYPES__Ctor<T>): A_TYPES__Error_Constructor<T> | undefined;
3371
+ resolveConstructor<T extends A_TYPES__A_DependencyInjectable>(name: string | A_TYPES__Ctor<T>): A_TYPES__Entity_Constructor<T> | A_TYPES__Component_Constructor<T> | A_TYPES__Fragment_Constructor<T> | undefined;
3334
3372
  /**
3335
3373
  * This method should resolve all instances of the components, or entities within the scope, by provided parent class
3336
3374
  * So in case of providing a base class it should return all instances that extends this base class
@@ -3692,6 +3730,11 @@ declare class A_Scope<_MetaItems extends Record<string, any> = any, _ComponentTy
3692
3730
  * Provide an entity instance to deregister it in the scope
3693
3731
  */
3694
3732
  entity: A_Entity): void;
3733
+ deregister<T extends A_TYPES__A_DependencyInjectable>(
3734
+ /**
3735
+ * Provide an entity instance to register it in the scope
3736
+ */
3737
+ component: T): void;
3695
3738
  /**
3696
3739
  * This method is useful when you want to serialize the scope to JSON
3697
3740
  *
@@ -4200,17 +4243,17 @@ declare class A_Context {
4200
4243
  * Get meta for the specific entity class by constructor.
4201
4244
  */
4202
4245
  entity: A_TYPES__Entity_Constructor): T;
4203
- static meta<T extends A_EntityMeta>(
4246
+ static meta<T extends A_EntityMeta, E extends A_Entity>(
4204
4247
  /**
4205
4248
  * Get meta for the specific entity instance.
4206
4249
  */
4207
- entity: A_Entity): T;
4250
+ entity: E): T;
4208
4251
  static meta<T extends A_ComponentMeta>(
4209
4252
  /**
4210
4253
  * Get meta for the specific component class by constructor.
4211
4254
  */
4212
4255
  component: A_TYPES__Component_Constructor): T;
4213
- static meta<T extends A_ComponentMeta, S extends A_Component>(
4256
+ static meta<T extends A_ComponentMeta<any>, S extends A_Component>(
4214
4257
  /**
4215
4258
  * Get meta for the specific component instance.
4216
4259
  */
@@ -4990,4 +5033,4 @@ declare const A_CONSTANTS__DEFAULT_ENV_VARIABLES: {
4990
5033
  type A_TYPES__ConceptENVVariables = (typeof A_CONSTANTS__DEFAULT_ENV_VARIABLES)[keyof typeof A_CONSTANTS__DEFAULT_ENV_VARIABLES][];
4991
5034
  declare const A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY: readonly ["A_CONCEPT_NAME", "A_CONCEPT_ROOT_SCOPE", "A_CONCEPT_ENVIRONMENT", "A_CONCEPT_RUNTIME_ENVIRONMENT", "A_CONCEPT_ROOT_FOLDER", "A_ERROR_DEFAULT_DESCRIPTION"];
4992
5035
 
4993
- export { ASEID, A_Abstraction, A_AbstractionError, A_Abstraction_Extend, A_BasicTypeGuards, A_CONCEPT_ENV, A_CONSTANTS__DEFAULT_ENV_VARIABLES, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_CONSTANTS__ERROR_CODES, A_CONSTANTS__ERROR_DESCRIPTION, A_Caller, A_CallerError, A_CommonHelper, A_Component, A_ComponentMeta, A_Concept, A_ConceptMeta, A_Container, A_ContainerMeta, A_Context, A_ContextError, A_Dependency, A_DependencyError, A_Dependency_All, A_Dependency_Default, A_Dependency_Flat, A_Dependency_Load, A_Dependency_Parent, A_Dependency_Query, A_Dependency_Require, A_Entity, A_EntityError, A_EntityMeta, 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_InjectError, A_Meta, A_MetaDecorator, 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_DependencyConstructor, type A_TYPES__A_DependencyInjectable, type A_TYPES__A_DependencyResolutionStrategy, type A_TYPES__A_DependencyResolutionType, type A_TYPES__A_Dependency_AllDecoratorReturn, type A_TYPES__A_Dependency_DefaultDecoratorReturn, type A_TYPES__A_Dependency_EntityInjectionPagination, type A_TYPES__A_Dependency_EntityInjectionQuery, type A_TYPES__A_Dependency_EntityResolutionConfig, type A_TYPES__A_Dependency_FlatDecoratorReturn, type A_TYPES__A_Dependency_LoadDecoratorReturn, type A_TYPES__A_Dependency_ParentDecoratorReturn, type A_TYPES__A_Dependency_QueryDecoratorReturn, type A_TYPES__A_Dependency_QueryTarget, type A_TYPES__A_Dependency_RequireDecoratorReturn, type A_TYPES__A_Dependency_Serialized, type A_TYPES__A_InjectDecoratorDescriptor, type A_TYPES__A_InjectDecoratorReturn, 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, A_TYPES__ComponentMetaKey, type A_TYPES__Component_Constructor, type A_TYPES__Component_Init, type A_TYPES__Component_Serialized, type A_TYPES__ConceptAbstraction, type A_TYPES__ConceptAbstractionMeta, A_TYPES__ConceptAbstractions, type A_TYPES__ConceptENVVariables, A_TYPES__ConceptMetaKey, type A_TYPES__Concept_Constructor, type A_TYPES__Concept_Init, type A_TYPES__Concept_Serialized, type A_TYPES__ContainerMeta, type A_TYPES__ContainerMetaExtension, A_TYPES__ContainerMetaKey, type A_TYPES__Container_Constructor, type A_TYPES__Container_Init, type A_TYPES__Container_Serialized, type A_TYPES__ContextEnvironment, type A_TYPES__Ctor, type A_TYPES__DeepPartial, type A_TYPES__Dictionary, A_TYPES__EntityFeatures, type A_TYPES__EntityMeta, A_TYPES__EntityMetaKey, 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__InjectableTargets, type A_TYPES__MetaLinkedComponentConstructors, type A_TYPES__MetaLinkedComponents, type A_TYPES__Meta_Constructor, 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__Scope_Constructor, type A_TYPES__Scope_Init, type A_TYPES__Scope_Serialized, type A_TYPES__Stage_Serialized, type A_TYPES__UnionToIntersection, A_TypeGuards };
5036
+ export { ASEID, A_Abstraction, A_AbstractionError, A_Abstraction_Extend, A_BasicTypeGuards, A_CONCEPT_ENV, A_CONSTANTS__DEFAULT_ENV_VARIABLES, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_CONSTANTS__ERROR_CODES, A_CONSTANTS__ERROR_DESCRIPTION, A_Caller, A_CallerError, A_CommonHelper, A_Component, A_ComponentMeta, A_Concept, A_ConceptMeta, A_Container, A_ContainerMeta, A_Context, A_ContextError, A_Dependency, A_DependencyError, A_Dependency_All, A_Dependency_Default, A_Dependency_Flat, A_Dependency_Load, A_Dependency_Parent, A_Dependency_Query, A_Dependency_Require, A_Entity, A_EntityError, A_EntityMeta, 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_InjectError, A_Meta, A_MetaDecorator, 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_DependencyConstructor, type A_TYPES__A_DependencyInjectable, type A_TYPES__A_DependencyResolutionStrategy, type A_TYPES__A_DependencyResolutionType, type A_TYPES__A_Dependency_AllDecoratorReturn, type A_TYPES__A_Dependency_DefaultDecoratorReturn, type A_TYPES__A_Dependency_EntityInjectionPagination, type A_TYPES__A_Dependency_EntityInjectionQuery, type A_TYPES__A_Dependency_EntityResolutionConfig, type A_TYPES__A_Dependency_FlatDecoratorReturn, type A_TYPES__A_Dependency_LoadDecoratorReturn, type A_TYPES__A_Dependency_ParentDecoratorReturn, type A_TYPES__A_Dependency_QueryDecoratorReturn, type A_TYPES__A_Dependency_QueryTarget, type A_TYPES__A_Dependency_RequireDecoratorReturn, type A_TYPES__A_Dependency_Serialized, type A_TYPES__A_InjectDecoratorDescriptor, type A_TYPES__A_InjectDecoratorReturn, 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, A_TYPES__ComponentMetaKey, type A_TYPES__Component_Constructor, type A_TYPES__Component_Init, type A_TYPES__Component_Serialized, type A_TYPES__ConceptAbstraction, type A_TYPES__ConceptAbstractionMeta, A_TYPES__ConceptAbstractions, type A_TYPES__ConceptENVVariables, A_TYPES__ConceptMetaKey, type A_TYPES__Concept_Constructor, type A_TYPES__Concept_Init, type A_TYPES__Concept_Serialized, type A_TYPES__ContainerMeta, type A_TYPES__ContainerMetaExtension, A_TYPES__ContainerMetaKey, type A_TYPES__Container_Constructor, type A_TYPES__Container_Init, type A_TYPES__Container_Serialized, type A_TYPES__ContextEnvironment, type A_TYPES__Ctor, type A_TYPES__DeepPartial, type A_TYPES__Dictionary, type A_TYPES__EntityFeatureNames, A_TYPES__EntityFeatures, type A_TYPES__EntityMeta, A_TYPES__EntityMetaKey, 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__InjectableTargets, type A_TYPES__MetaLinkedComponentConstructors, type A_TYPES__MetaLinkedComponents, type A_TYPES__Meta_Constructor, 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__Scope_Constructor, type A_TYPES__Scope_Init, type A_TYPES__Scope_Serialized, type A_TYPES__Stage_Serialized, type A_TYPES__UnionToIntersection, A_TypeGuards };
@@ -738,6 +738,12 @@ declare class A_Meta<_StorageItems extends Record<any, any> = any, _SerializedTy
738
738
  * @returns
739
739
  */
740
740
  from(meta: A_Meta<_StorageItems>): A_Meta<_StorageItems>;
741
+ /**
742
+ * Allows to create a copy of the meta object with the same values, this is needed to ensure that when we inherit meta from the parent component, we create a copy of it, not a reference to the same object. This allows us to modify the meta of the child component without affecting the meta of the parent component.
743
+ *
744
+ * @returns
745
+ */
746
+ clone(): A_Meta<_StorageItems>;
741
747
  /**
742
748
  * Method to set values in the map
743
749
  *
@@ -813,7 +819,18 @@ declare class A_Meta<_StorageItems extends Record<any, any> = any, _SerializedTy
813
819
  * Method to clear the map
814
820
  */
815
821
  clear(): void;
822
+ /**
823
+ * Method to convert the meta to an array of key-value pairs
824
+ *
825
+ * @returns
826
+ */
816
827
  toArray(): Array<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]>;
828
+ /**
829
+ * Helper method to recursively convert the meta object to a JSON-compatible format. It handles nested A_Meta instances, Maps, Arrays, and plain objects.
830
+ *
831
+ * @param value
832
+ * @returns
833
+ */
817
834
  protected recursiveToJSON(value: any): any;
818
835
  /**
819
836
  * Serializes the meta to a JSON object
@@ -839,11 +856,11 @@ declare enum A_TYPES__EntityMetaKey {
839
856
  ABSTRACTIONS = "a-component-abstractions",
840
857
  INJECTIONS = "a-component-injections"
841
858
  }
842
- declare enum A_TYPES__EntityFeatures {
843
- SAVE = "save",
844
- DESTROY = "destroy",
845
- LOAD = "load"
846
- }
859
+ declare const A_TYPES__EntityFeatures: {
860
+ readonly SAVE: "_A_Entity__Save";
861
+ readonly DESTROY: "_A_Entity__Destroy";
862
+ readonly LOAD: "_A_Entity__Load";
863
+ };
847
864
 
848
865
  /**
849
866
  * Entity interface
@@ -907,6 +924,7 @@ type A_TYPES__EntityMeta = {
907
924
  [Key: string]: A_TYPES__A_InjectDecorator_Meta;
908
925
  }>;
909
926
  };
927
+ type A_TYPES__EntityFeatureNames = typeof A_TYPES__EntityFeatures[keyof typeof A_TYPES__EntityFeatures];
910
928
 
911
929
  /**
912
930
  * A_Entity is another abstraction that describes all major participants in the system business logic.
@@ -1065,15 +1083,15 @@ declare class A_Entity<_ConstructorType extends A_TYPES__Entity_Init = A_TYPES__
1065
1083
  /**
1066
1084
  * The default method that can be called and extended to load entity data.
1067
1085
  */
1068
- load(scope?: A_Scope): Promise<any>;
1086
+ load(scope?: A_Scope): Promise<void> | void;
1069
1087
  /**
1070
1088
  * The default method that can be called and extended to destroy entity data.
1071
1089
  */
1072
- destroy(scope?: A_Scope): Promise<any>;
1090
+ destroy(scope?: A_Scope): Promise<void> | void;
1073
1091
  /**
1074
1092
  * The default method that can be called and extended to save entity data.
1075
1093
  */
1076
- save(scope?: A_Scope): Promise<any>;
1094
+ save(scope?: A_Scope): Promise<void> | void;
1077
1095
  /**
1078
1096
  * Create a new entity from ASEID string or instance
1079
1097
  * [!] Executed when the constructor is called with a string or ASEID instance that represents the ASEID
@@ -1129,7 +1147,7 @@ declare class A_Entity<_ConstructorType extends A_TYPES__Entity_Init = A_TYPES__
1129
1147
  toString(): string;
1130
1148
  }
1131
1149
 
1132
- declare class A_EntityMeta extends A_Meta<A_TYPES__EntityMeta> {
1150
+ declare class A_EntityMeta<T extends A_TYPES__EntityMeta = A_TYPES__EntityMeta> extends A_Meta<T> {
1133
1151
  /**
1134
1152
  * Returns all features defined in the Container
1135
1153
  *
@@ -2844,7 +2862,7 @@ declare class A_Container {
2844
2862
  scope?: A_Scope): Promise<void>;
2845
2863
  }
2846
2864
 
2847
- declare class A_ContainerMeta extends A_Meta<A_TYPES__ContainerMeta> {
2865
+ declare class A_ContainerMeta<T extends A_TYPES__ContainerMeta = A_TYPES__ContainerMeta> extends A_Meta<T> {
2848
2866
  /**
2849
2867
  * Allows to get all the injections for a given handler
2850
2868
  *
@@ -3330,7 +3348,27 @@ declare class A_Scope<_MetaItems extends Record<string, any> = any, _ComponentTy
3330
3348
  * Provide the fragment name in PascalCase to retrieve its constructor
3331
3349
  */
3332
3350
  name: string): A_TYPES__Fragment_Constructor<T>;
3333
- resolveConstructor<T extends A_TYPES__A_DependencyInjectable>(name: string): A_TYPES__Entity_Constructor<T> | A_TYPES__Component_Constructor<T> | A_TYPES__Fragment_Constructor<T> | undefined;
3351
+ resolveConstructor<T extends A_Component>(
3352
+ /**
3353
+ * Provide the component constructor or its name to retrieve its constructor
3354
+ */
3355
+ component: A_TYPES__Ctor<T>): A_TYPES__Component_Constructor<T> | undefined;
3356
+ resolveConstructor<T extends A_Entity>(
3357
+ /**
3358
+ * Provide the entity constructor or its name to retrieve its constructor
3359
+ */
3360
+ entity: A_TYPES__Ctor<T>): A_TYPES__Entity_Constructor<T> | undefined;
3361
+ resolveConstructor<T extends A_Fragment>(
3362
+ /**
3363
+ * Provide the fragment constructor or its name to retrieve its constructor
3364
+ */
3365
+ fragment: A_TYPES__Ctor<T>): A_TYPES__Fragment_Constructor<T> | undefined;
3366
+ resolveConstructor<T extends A_Error>(
3367
+ /**
3368
+ * Provide the error constructor or its name to retrieve its constructor
3369
+ */
3370
+ error: A_TYPES__Ctor<T>): A_TYPES__Error_Constructor<T> | undefined;
3371
+ resolveConstructor<T extends A_TYPES__A_DependencyInjectable>(name: string | A_TYPES__Ctor<T>): A_TYPES__Entity_Constructor<T> | A_TYPES__Component_Constructor<T> | A_TYPES__Fragment_Constructor<T> | undefined;
3334
3372
  /**
3335
3373
  * This method should resolve all instances of the components, or entities within the scope, by provided parent class
3336
3374
  * So in case of providing a base class it should return all instances that extends this base class
@@ -3692,6 +3730,11 @@ declare class A_Scope<_MetaItems extends Record<string, any> = any, _ComponentTy
3692
3730
  * Provide an entity instance to deregister it in the scope
3693
3731
  */
3694
3732
  entity: A_Entity): void;
3733
+ deregister<T extends A_TYPES__A_DependencyInjectable>(
3734
+ /**
3735
+ * Provide an entity instance to register it in the scope
3736
+ */
3737
+ component: T): void;
3695
3738
  /**
3696
3739
  * This method is useful when you want to serialize the scope to JSON
3697
3740
  *
@@ -4200,17 +4243,17 @@ declare class A_Context {
4200
4243
  * Get meta for the specific entity class by constructor.
4201
4244
  */
4202
4245
  entity: A_TYPES__Entity_Constructor): T;
4203
- static meta<T extends A_EntityMeta>(
4246
+ static meta<T extends A_EntityMeta, E extends A_Entity>(
4204
4247
  /**
4205
4248
  * Get meta for the specific entity instance.
4206
4249
  */
4207
- entity: A_Entity): T;
4250
+ entity: E): T;
4208
4251
  static meta<T extends A_ComponentMeta>(
4209
4252
  /**
4210
4253
  * Get meta for the specific component class by constructor.
4211
4254
  */
4212
4255
  component: A_TYPES__Component_Constructor): T;
4213
- static meta<T extends A_ComponentMeta, S extends A_Component>(
4256
+ static meta<T extends A_ComponentMeta<any>, S extends A_Component>(
4214
4257
  /**
4215
4258
  * Get meta for the specific component instance.
4216
4259
  */
@@ -4990,4 +5033,4 @@ declare const A_CONSTANTS__DEFAULT_ENV_VARIABLES: {
4990
5033
  type A_TYPES__ConceptENVVariables = (typeof A_CONSTANTS__DEFAULT_ENV_VARIABLES)[keyof typeof A_CONSTANTS__DEFAULT_ENV_VARIABLES][];
4991
5034
  declare const A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY: readonly ["A_CONCEPT_NAME", "A_CONCEPT_ROOT_SCOPE", "A_CONCEPT_ENVIRONMENT", "A_CONCEPT_RUNTIME_ENVIRONMENT", "A_CONCEPT_ROOT_FOLDER", "A_ERROR_DEFAULT_DESCRIPTION"];
4992
5035
 
4993
- export { ASEID, A_Abstraction, A_AbstractionError, A_Abstraction_Extend, A_BasicTypeGuards, A_CONCEPT_ENV, A_CONSTANTS__DEFAULT_ENV_VARIABLES, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_CONSTANTS__ERROR_CODES, A_CONSTANTS__ERROR_DESCRIPTION, A_Caller, A_CallerError, A_CommonHelper, A_Component, A_ComponentMeta, A_Concept, A_ConceptMeta, A_Container, A_ContainerMeta, A_Context, A_ContextError, A_Dependency, A_DependencyError, A_Dependency_All, A_Dependency_Default, A_Dependency_Flat, A_Dependency_Load, A_Dependency_Parent, A_Dependency_Query, A_Dependency_Require, A_Entity, A_EntityError, A_EntityMeta, 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_InjectError, A_Meta, A_MetaDecorator, 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_DependencyConstructor, type A_TYPES__A_DependencyInjectable, type A_TYPES__A_DependencyResolutionStrategy, type A_TYPES__A_DependencyResolutionType, type A_TYPES__A_Dependency_AllDecoratorReturn, type A_TYPES__A_Dependency_DefaultDecoratorReturn, type A_TYPES__A_Dependency_EntityInjectionPagination, type A_TYPES__A_Dependency_EntityInjectionQuery, type A_TYPES__A_Dependency_EntityResolutionConfig, type A_TYPES__A_Dependency_FlatDecoratorReturn, type A_TYPES__A_Dependency_LoadDecoratorReturn, type A_TYPES__A_Dependency_ParentDecoratorReturn, type A_TYPES__A_Dependency_QueryDecoratorReturn, type A_TYPES__A_Dependency_QueryTarget, type A_TYPES__A_Dependency_RequireDecoratorReturn, type A_TYPES__A_Dependency_Serialized, type A_TYPES__A_InjectDecoratorDescriptor, type A_TYPES__A_InjectDecoratorReturn, 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, A_TYPES__ComponentMetaKey, type A_TYPES__Component_Constructor, type A_TYPES__Component_Init, type A_TYPES__Component_Serialized, type A_TYPES__ConceptAbstraction, type A_TYPES__ConceptAbstractionMeta, A_TYPES__ConceptAbstractions, type A_TYPES__ConceptENVVariables, A_TYPES__ConceptMetaKey, type A_TYPES__Concept_Constructor, type A_TYPES__Concept_Init, type A_TYPES__Concept_Serialized, type A_TYPES__ContainerMeta, type A_TYPES__ContainerMetaExtension, A_TYPES__ContainerMetaKey, type A_TYPES__Container_Constructor, type A_TYPES__Container_Init, type A_TYPES__Container_Serialized, type A_TYPES__ContextEnvironment, type A_TYPES__Ctor, type A_TYPES__DeepPartial, type A_TYPES__Dictionary, A_TYPES__EntityFeatures, type A_TYPES__EntityMeta, A_TYPES__EntityMetaKey, 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__InjectableTargets, type A_TYPES__MetaLinkedComponentConstructors, type A_TYPES__MetaLinkedComponents, type A_TYPES__Meta_Constructor, 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__Scope_Constructor, type A_TYPES__Scope_Init, type A_TYPES__Scope_Serialized, type A_TYPES__Stage_Serialized, type A_TYPES__UnionToIntersection, A_TypeGuards };
5036
+ export { ASEID, A_Abstraction, A_AbstractionError, A_Abstraction_Extend, A_BasicTypeGuards, A_CONCEPT_ENV, A_CONSTANTS__DEFAULT_ENV_VARIABLES, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_CONSTANTS__ERROR_CODES, A_CONSTANTS__ERROR_DESCRIPTION, A_Caller, A_CallerError, A_CommonHelper, A_Component, A_ComponentMeta, A_Concept, A_ConceptMeta, A_Container, A_ContainerMeta, A_Context, A_ContextError, A_Dependency, A_DependencyError, A_Dependency_All, A_Dependency_Default, A_Dependency_Flat, A_Dependency_Load, A_Dependency_Parent, A_Dependency_Query, A_Dependency_Require, A_Entity, A_EntityError, A_EntityMeta, 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_InjectError, A_Meta, A_MetaDecorator, 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_DependencyConstructor, type A_TYPES__A_DependencyInjectable, type A_TYPES__A_DependencyResolutionStrategy, type A_TYPES__A_DependencyResolutionType, type A_TYPES__A_Dependency_AllDecoratorReturn, type A_TYPES__A_Dependency_DefaultDecoratorReturn, type A_TYPES__A_Dependency_EntityInjectionPagination, type A_TYPES__A_Dependency_EntityInjectionQuery, type A_TYPES__A_Dependency_EntityResolutionConfig, type A_TYPES__A_Dependency_FlatDecoratorReturn, type A_TYPES__A_Dependency_LoadDecoratorReturn, type A_TYPES__A_Dependency_ParentDecoratorReturn, type A_TYPES__A_Dependency_QueryDecoratorReturn, type A_TYPES__A_Dependency_QueryTarget, type A_TYPES__A_Dependency_RequireDecoratorReturn, type A_TYPES__A_Dependency_Serialized, type A_TYPES__A_InjectDecoratorDescriptor, type A_TYPES__A_InjectDecoratorReturn, 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, A_TYPES__ComponentMetaKey, type A_TYPES__Component_Constructor, type A_TYPES__Component_Init, type A_TYPES__Component_Serialized, type A_TYPES__ConceptAbstraction, type A_TYPES__ConceptAbstractionMeta, A_TYPES__ConceptAbstractions, type A_TYPES__ConceptENVVariables, A_TYPES__ConceptMetaKey, type A_TYPES__Concept_Constructor, type A_TYPES__Concept_Init, type A_TYPES__Concept_Serialized, type A_TYPES__ContainerMeta, type A_TYPES__ContainerMetaExtension, A_TYPES__ContainerMetaKey, type A_TYPES__Container_Constructor, type A_TYPES__Container_Init, type A_TYPES__Container_Serialized, type A_TYPES__ContextEnvironment, type A_TYPES__Ctor, type A_TYPES__DeepPartial, type A_TYPES__Dictionary, type A_TYPES__EntityFeatureNames, A_TYPES__EntityFeatures, type A_TYPES__EntityMeta, A_TYPES__EntityMetaKey, 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__InjectableTargets, type A_TYPES__MetaLinkedComponentConstructors, type A_TYPES__MetaLinkedComponents, type A_TYPES__Meta_Constructor, 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__Scope_Constructor, type A_TYPES__Scope_Init, type A_TYPES__Scope_Serialized, type A_TYPES__Stage_Serialized, type A_TYPES__UnionToIntersection, A_TypeGuards };
@@ -962,6 +962,20 @@ var A_EntityError = class extends A_Error {
962
962
  */
963
963
  A_EntityError.ValidationError = "A-Entity Validation Error";
964
964
 
965
+ // src/lib/A-Entity/A-Entity.constants.ts
966
+ var A_TYPES__EntityMetaKey = /* @__PURE__ */ ((A_TYPES__EntityMetaKey2) => {
967
+ A_TYPES__EntityMetaKey2["EXTENSIONS"] = "a-component-extensions";
968
+ A_TYPES__EntityMetaKey2["FEATURES"] = "a-component-features";
969
+ A_TYPES__EntityMetaKey2["ABSTRACTIONS"] = "a-component-abstractions";
970
+ A_TYPES__EntityMetaKey2["INJECTIONS"] = "a-component-injections";
971
+ return A_TYPES__EntityMetaKey2;
972
+ })(A_TYPES__EntityMetaKey || {});
973
+ var A_TYPES__EntityFeatures = {
974
+ SAVE: "_A_Entity__Save",
975
+ DESTROY: "_A_Entity__Destroy",
976
+ LOAD: "_A_Entity__Load"
977
+ };
978
+
965
979
  // src/lib/A-Entity/A-Entity.class.ts
966
980
  var A_Entity = class {
967
981
  // ====================================================================
@@ -1117,20 +1131,20 @@ var A_Entity = class {
1117
1131
  /**
1118
1132
  * The default method that can be called and extended to load entity data.
1119
1133
  */
1120
- async load(scope) {
1121
- return this.call("load", scope);
1134
+ load(scope) {
1135
+ return this.call(A_TYPES__EntityFeatures.LOAD, scope);
1122
1136
  }
1123
1137
  /**
1124
1138
  * The default method that can be called and extended to destroy entity data.
1125
1139
  */
1126
- async destroy(scope) {
1127
- return this.call("destroy", scope);
1140
+ destroy(scope) {
1141
+ return this.call(A_TYPES__EntityFeatures.DESTROY, scope);
1128
1142
  }
1129
1143
  /**
1130
1144
  * The default method that can be called and extended to save entity data.
1131
1145
  */
1132
- async save(scope) {
1133
- return this.call("save", scope);
1146
+ save(scope) {
1147
+ return this.call(A_TYPES__EntityFeatures.SAVE, scope);
1134
1148
  }
1135
1149
  // ====================================================================
1136
1150
  // ================== Entity Serialization ============================
@@ -1256,6 +1270,17 @@ var A_Meta = class _A_Meta {
1256
1270
  this.meta = new Map(meta.meta);
1257
1271
  return this;
1258
1272
  }
1273
+ /**
1274
+ * Allows to create a copy of the meta object with the same values, this is needed to ensure that when we inherit meta from the parent component, we create a copy of it, not a reference to the same object. This allows us to modify the meta of the child component without affecting the meta of the parent component.
1275
+ *
1276
+ * @returns
1277
+ */
1278
+ clone() {
1279
+ const ctor = this.constructor;
1280
+ const copy = new ctor();
1281
+ copy.meta = new Map(this.meta);
1282
+ return copy;
1283
+ }
1259
1284
  /**
1260
1285
  * Method to set values in the map
1261
1286
  *
@@ -1367,9 +1392,20 @@ var A_Meta = class _A_Meta {
1367
1392
  clear() {
1368
1393
  this.meta.clear();
1369
1394
  }
1395
+ /**
1396
+ * Method to convert the meta to an array of key-value pairs
1397
+ *
1398
+ * @returns
1399
+ */
1370
1400
  toArray() {
1371
1401
  return Array.from(this.meta.entries());
1372
1402
  }
1403
+ /**
1404
+ * Helper method to recursively convert the meta object to a JSON-compatible format. It handles nested A_Meta instances, Maps, Arrays, and plain objects.
1405
+ *
1406
+ * @param value
1407
+ * @returns
1408
+ */
1373
1409
  recursiveToJSON(value) {
1374
1410
  switch (true) {
1375
1411
  case value instanceof _A_Meta:
@@ -1407,21 +1443,6 @@ var A_Meta = class _A_Meta {
1407
1443
  }
1408
1444
  };
1409
1445
 
1410
- // src/lib/A-Entity/A-Entity.constants.ts
1411
- var A_TYPES__EntityMetaKey = /* @__PURE__ */ ((A_TYPES__EntityMetaKey2) => {
1412
- A_TYPES__EntityMetaKey2["EXTENSIONS"] = "a-component-extensions";
1413
- A_TYPES__EntityMetaKey2["FEATURES"] = "a-component-features";
1414
- A_TYPES__EntityMetaKey2["ABSTRACTIONS"] = "a-component-abstractions";
1415
- A_TYPES__EntityMetaKey2["INJECTIONS"] = "a-component-injections";
1416
- return A_TYPES__EntityMetaKey2;
1417
- })(A_TYPES__EntityMetaKey || {});
1418
- var A_TYPES__EntityFeatures = /* @__PURE__ */ ((A_TYPES__EntityFeatures2) => {
1419
- A_TYPES__EntityFeatures2["SAVE"] = "save";
1420
- A_TYPES__EntityFeatures2["DESTROY"] = "destroy";
1421
- A_TYPES__EntityFeatures2["LOAD"] = "load";
1422
- return A_TYPES__EntityFeatures2;
1423
- })(A_TYPES__EntityFeatures || {});
1424
-
1425
1446
  // src/lib/A-Entity/A-Entity.meta.ts
1426
1447
  var A_EntityMeta = class extends A_Meta {
1427
1448
  /**
@@ -4122,6 +4143,21 @@ var A_Scope = class {
4122
4143
  return slice.length === 1 && count !== -1 ? slice[0] : slice.length ? slice : void 0;
4123
4144
  }
4124
4145
  resolveConstructor(name) {
4146
+ switch (true) {
4147
+ case A_TypeGuards.isComponentConstructor(name):
4148
+ return Array.from(this.allowedComponents).find((c) => A_CommonHelper.isInheritedFrom(c, name));
4149
+ case A_TypeGuards.isEntityConstructor(name):
4150
+ return Array.from(this.allowedEntities).find((e) => A_CommonHelper.isInheritedFrom(e, name));
4151
+ case A_TypeGuards.isFragmentConstructor(name):
4152
+ return Array.from(this.allowedFragments).find((f) => A_CommonHelper.isInheritedFrom(f, name));
4153
+ case A_TypeGuards.isErrorConstructor(name):
4154
+ return Array.from(this.allowedErrors).find((e) => A_CommonHelper.isInheritedFrom(e, name));
4155
+ }
4156
+ if (!A_TypeGuards.isString(name))
4157
+ throw new A_ScopeError(
4158
+ A_ScopeError.ResolutionError,
4159
+ `Invalid constructor name provided: ${name}`
4160
+ );
4125
4161
  const component = Array.from(this.allowedComponents).find(
4126
4162
  (c) => c.name === name || c.name === A_FormatterHelper.toPascalCase(name)
4127
4163
  );
@@ -5024,7 +5060,7 @@ var A_Context = class _A_Context {
5024
5060
  }
5025
5061
  if (!inheritedMeta)
5026
5062
  inheritedMeta = new metaType();
5027
- instance._metaStorage.set(property, new metaType().from(inheritedMeta));
5063
+ instance._metaStorage.set(property, inheritedMeta.clone());
5028
5064
  }
5029
5065
  return instance._metaStorage.get(property);
5030
5066
  }