@adaas/a-concept 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +3952 -0
- package/dist/index.d.ts +3952 -50
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +5 -6
- package/src/global/A-Abstraction/A-Abstraction-Extend.decorator.ts +18 -13
- package/src/global/A-Component/A-Component.meta.ts +3 -2
- package/src/global/A-Container/A-Container.meta.ts +5 -8
- package/src/global/A-Context/A-Context.class.ts +81 -7
- package/src/global/A-Context/A-Context.error.ts +4 -0
- package/src/global/A-Dependency/A-Dependency-Default.decorator.ts +75 -0
- package/src/global/A-Dependency/A-Dependency-Load.decorator.ts +80 -0
- package/src/global/A-Dependency/A-Dependency-Require.decorator.ts +68 -0
- package/src/global/A-Dependency/A-Dependency.class.ts +33 -0
- package/src/global/A-Dependency/A-Dependency.error.ts +13 -0
- package/src/global/A-Dependency/A-Dependency.types.ts +28 -0
- package/src/global/A-Entity/A-Entity.class.ts +2 -1
- package/src/global/A-Feature/A-Feature-Define.decorator.ts +7 -4
- package/src/global/A-Feature/A-Feature-Extend.decorator.ts +23 -17
- package/src/global/A-Feature/A-Feature.class.ts +12 -1
- package/src/global/A-Feature/A-Feature.types.ts +33 -8
- package/src/global/A-Inject/A-Inject.decorator.ts +4 -2
- package/src/global/A-Inject/A-Inject.types.ts +5 -3
- package/src/global/A-Scope/A-Scope.class.ts +85 -57
- package/src/global/A-Stage/A-Stage.class.ts +22 -2
- package/src/global/A-Stage/A-Stage.error.ts +2 -0
- package/src/global/A-Stage/A-Stage.types.ts +7 -2
- package/src/global/A-StepManager/A-StepManager.class.ts +19 -13
- package/src/helpers/A_Common.helper.ts +101 -0
- package/src/helpers/A_TypeGuards.helper.ts +8 -0
- package/src/index.ts +88 -0
- package/tests/A-Component.test.ts +1 -1
- package/tests/A-Concept.test.ts +58 -10
- package/tests/A-Dependency.test.ts +93 -0
- package/tests/A-Feature.test.ts +11 -11
- package/tests/A-Scope.test.ts +10 -10
- package/tests/A-StepManager.test.ts +60 -11
- package/tsconfig.json +2 -2
- package/tsup.config.ts +32 -0
- package/dist/index.js +0 -112
- package/dist/index.js.map +0 -1
- package/dist/src/constants/env.constants.d.ts +0 -33
- package/dist/src/constants/env.constants.js +0 -47
- package/dist/src/constants/env.constants.js.map +0 -1
- package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.d.ts +0 -23
- package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js +0 -89
- package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js.map +0 -1
- package/dist/src/global/A-Abstraction/A-Abstraction.class.d.ts +0 -74
- package/dist/src/global/A-Abstraction/A-Abstraction.class.js +0 -130
- package/dist/src/global/A-Abstraction/A-Abstraction.class.js.map +0 -1
- package/dist/src/global/A-Abstraction/A-Abstraction.error.d.ts +0 -7
- package/dist/src/global/A-Abstraction/A-Abstraction.error.js +0 -12
- package/dist/src/global/A-Abstraction/A-Abstraction.error.js.map +0 -1
- package/dist/src/global/A-Abstraction/A-Abstraction.types.d.ts +0 -38
- package/dist/src/global/A-Abstraction/A-Abstraction.types.js +0 -3
- package/dist/src/global/A-Abstraction/A-Abstraction.types.js.map +0 -1
- package/dist/src/global/A-Caller/A_Caller.class.d.ts +0 -33
- package/dist/src/global/A-Caller/A_Caller.class.js +0 -44
- package/dist/src/global/A-Caller/A_Caller.class.js.map +0 -1
- package/dist/src/global/A-Caller/A_Caller.error.d.ts +0 -7
- package/dist/src/global/A-Caller/A_Caller.error.js +0 -12
- package/dist/src/global/A-Caller/A_Caller.error.js.map +0 -1
- package/dist/src/global/A-Caller/A_Caller.types.d.ts +0 -18
- package/dist/src/global/A-Caller/A_Caller.types.js +0 -3
- package/dist/src/global/A-Caller/A_Caller.types.js.map +0 -1
- package/dist/src/global/A-Component/A-Component.class.d.ts +0 -34
- package/dist/src/global/A-Component/A-Component.class.js +0 -56
- package/dist/src/global/A-Component/A-Component.class.js.map +0 -1
- package/dist/src/global/A-Component/A-Component.constants.d.ts +0 -6
- package/dist/src/global/A-Component/A-Component.constants.js +0 -11
- package/dist/src/global/A-Component/A-Component.constants.js.map +0 -1
- package/dist/src/global/A-Component/A-Component.meta.d.ts +0 -34
- package/dist/src/global/A-Component/A-Component.meta.js +0 -77
- package/dist/src/global/A-Component/A-Component.meta.js.map +0 -1
- package/dist/src/global/A-Component/A-Component.types.d.ts +0 -76
- package/dist/src/global/A-Component/A-Component.types.js +0 -4
- package/dist/src/global/A-Component/A-Component.types.js.map +0 -1
- package/dist/src/global/A-Concept/A-Concept.class.d.ts +0 -153
- package/dist/src/global/A-Concept/A-Concept.class.js +0 -260
- package/dist/src/global/A-Concept/A-Concept.class.js.map +0 -1
- package/dist/src/global/A-Concept/A-Concept.constants.d.ts +0 -33
- package/dist/src/global/A-Concept/A-Concept.constants.js +0 -39
- package/dist/src/global/A-Concept/A-Concept.constants.js.map +0 -1
- package/dist/src/global/A-Concept/A-Concept.meta.d.ts +0 -6
- package/dist/src/global/A-Concept/A-Concept.meta.js +0 -12
- package/dist/src/global/A-Concept/A-Concept.meta.js.map +0 -1
- package/dist/src/global/A-Concept/A-Concept.types.d.ts +0 -66
- package/dist/src/global/A-Concept/A-Concept.types.js +0 -3
- package/dist/src/global/A-Concept/A-Concept.types.js.map +0 -1
- package/dist/src/global/A-Container/A-Container.class.d.ts +0 -52
- package/dist/src/global/A-Container/A-Container.class.js +0 -78
- package/dist/src/global/A-Container/A-Container.class.js.map +0 -1
- package/dist/src/global/A-Container/A-Container.constants.d.ts +0 -6
- package/dist/src/global/A-Container/A-Container.constants.js +0 -11
- package/dist/src/global/A-Container/A-Container.constants.js.map +0 -1
- package/dist/src/global/A-Container/A-Container.meta.d.ts +0 -35
- package/dist/src/global/A-Container/A-Container.meta.js +0 -83
- package/dist/src/global/A-Container/A-Container.meta.js.map +0 -1
- package/dist/src/global/A-Container/A-Container.types.d.ts +0 -75
- package/dist/src/global/A-Container/A-Container.types.js +0 -4
- package/dist/src/global/A-Container/A-Container.types.js.map +0 -1
- package/dist/src/global/A-Context/A-Context.class.d.ts +0 -361
- package/dist/src/global/A-Context/A-Context.class.js +0 -603
- package/dist/src/global/A-Context/A-Context.class.js.map +0 -1
- package/dist/src/global/A-Context/A-Context.error.d.ts +0 -20
- package/dist/src/global/A-Context/A-Context.error.js +0 -25
- package/dist/src/global/A-Context/A-Context.error.js.map +0 -1
- package/dist/src/global/A-Context/A-Context.types.d.ts +0 -5
- package/dist/src/global/A-Context/A-Context.types.js +0 -3
- package/dist/src/global/A-Context/A-Context.types.js.map +0 -1
- package/dist/src/global/A-Dependency/A-DependencyReference.class.d.ts +0 -0
- package/dist/src/global/A-Dependency/A-DependencyReference.class.js +0 -49
- package/dist/src/global/A-Dependency/A-DependencyReference.class.js.map +0 -1
- package/dist/src/global/A-Dependency/A-DependencyReference.types.d.ts +0 -0
- package/dist/src/global/A-Dependency/A-DependencyReference.types.js +0 -58
- package/dist/src/global/A-Dependency/A-DependencyReference.types.js.map +0 -1
- package/dist/src/global/A-Entity/A-Entity.class.d.ts +0 -214
- package/dist/src/global/A-Entity/A-Entity.class.js +0 -281
- package/dist/src/global/A-Entity/A-Entity.class.js.map +0 -1
- package/dist/src/global/A-Entity/A-Entity.constants.d.ts +0 -11
- package/dist/src/global/A-Entity/A-Entity.constants.js +0 -17
- package/dist/src/global/A-Entity/A-Entity.constants.js.map +0 -1
- package/dist/src/global/A-Entity/A-Entity.error.d.ts +0 -7
- package/dist/src/global/A-Entity/A-Entity.error.js +0 -12
- package/dist/src/global/A-Entity/A-Entity.error.js.map +0 -1
- package/dist/src/global/A-Entity/A-Entity.meta.d.ts +0 -11
- package/dist/src/global/A-Entity/A-Entity.meta.js +0 -18
- package/dist/src/global/A-Entity/A-Entity.meta.js.map +0 -1
- package/dist/src/global/A-Entity/A-Entity.types.d.ts +0 -56
- package/dist/src/global/A-Entity/A-Entity.types.js +0 -5
- package/dist/src/global/A-Entity/A-Entity.types.js.map +0 -1
- package/dist/src/global/A-Error/A_Error.class.d.ts +0 -229
- package/dist/src/global/A-Error/A_Error.class.js +0 -296
- package/dist/src/global/A-Error/A_Error.class.js.map +0 -1
- package/dist/src/global/A-Error/A_Error.constants.d.ts +0 -5
- package/dist/src/global/A-Error/A_Error.constants.js +0 -9
- package/dist/src/global/A-Error/A_Error.constants.js.map +0 -1
- package/dist/src/global/A-Error/A_Error.types.d.ts +0 -93
- package/dist/src/global/A-Error/A_Error.types.js +0 -3
- package/dist/src/global/A-Error/A_Error.types.js.map +0 -1
- package/dist/src/global/A-Feature/A-Feature-Define.decorator.d.ts +0 -15
- package/dist/src/global/A-Feature/A-Feature-Define.decorator.js +0 -76
- package/dist/src/global/A-Feature/A-Feature-Define.decorator.js.map +0 -1
- package/dist/src/global/A-Feature/A-Feature-Extend.decorator.d.ts +0 -56
- package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js +0 -119
- package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js.map +0 -1
- package/dist/src/global/A-Feature/A-Feature.class.d.ts +0 -175
- package/dist/src/global/A-Feature/A-Feature.class.js +0 -318
- package/dist/src/global/A-Feature/A-Feature.class.js.map +0 -1
- package/dist/src/global/A-Feature/A-Feature.error.d.ts +0 -25
- package/dist/src/global/A-Feature/A-Feature.error.js +0 -33
- package/dist/src/global/A-Feature/A-Feature.error.js.map +0 -1
- package/dist/src/global/A-Feature/A-Feature.types.d.ts +0 -310
- package/dist/src/global/A-Feature/A-Feature.types.js +0 -26
- package/dist/src/global/A-Feature/A-Feature.types.js.map +0 -1
- package/dist/src/global/A-Fragment/A-Fragment.class.d.ts +0 -36
- package/dist/src/global/A-Fragment/A-Fragment.class.js +0 -46
- package/dist/src/global/A-Fragment/A-Fragment.class.js.map +0 -1
- package/dist/src/global/A-Fragment/A-Fragment.types.d.ts +0 -21
- package/dist/src/global/A-Fragment/A-Fragment.types.js +0 -6
- package/dist/src/global/A-Fragment/A-Fragment.types.js.map +0 -1
- package/dist/src/global/A-Inject/A-Inject.decorator.d.ts +0 -80
- package/dist/src/global/A-Inject/A-Inject.decorator.js +0 -49
- package/dist/src/global/A-Inject/A-Inject.decorator.js.map +0 -1
- package/dist/src/global/A-Inject/A-Inject.error.d.ts +0 -5
- package/dist/src/global/A-Inject/A-Inject.error.js +0 -10
- package/dist/src/global/A-Inject/A-Inject.error.js.map +0 -1
- package/dist/src/global/A-Inject/A-Inject.types.d.ts +0 -42
- package/dist/src/global/A-Inject/A-Inject.types.js +0 -3
- package/dist/src/global/A-Inject/A-Inject.types.js.map +0 -1
- package/dist/src/global/A-Meta/A-Meta.class.d.ts +0 -97
- package/dist/src/global/A-Meta/A-Meta.class.js +0 -164
- package/dist/src/global/A-Meta/A-Meta.class.js.map +0 -1
- package/dist/src/global/A-Meta/A-Meta.types.d.ts +0 -14
- package/dist/src/global/A-Meta/A-Meta.types.js +0 -3
- package/dist/src/global/A-Meta/A-Meta.types.js.map +0 -1
- package/dist/src/global/A-Scope/A-Scope.class.d.ts +0 -466
- package/dist/src/global/A-Scope/A-Scope.class.js +0 -791
- package/dist/src/global/A-Scope/A-Scope.class.js.map +0 -1
- package/dist/src/global/A-Scope/A-Scope.error.d.ts +0 -8
- package/dist/src/global/A-Scope/A-Scope.error.js +0 -13
- package/dist/src/global/A-Scope/A-Scope.error.js.map +0 -1
- package/dist/src/global/A-Scope/A-Scope.types.d.ts +0 -81
- package/dist/src/global/A-Scope/A-Scope.types.js +0 -3
- package/dist/src/global/A-Scope/A-Scope.types.js.map +0 -1
- package/dist/src/global/A-Stage/A-Stage.class.d.ts +0 -112
- package/dist/src/global/A-Stage/A-Stage.class.js +0 -240
- package/dist/src/global/A-Stage/A-Stage.class.js.map +0 -1
- package/dist/src/global/A-Stage/A-Stage.error.d.ts +0 -4
- package/dist/src/global/A-Stage/A-Stage.error.js +0 -11
- package/dist/src/global/A-Stage/A-Stage.error.js.map +0 -1
- package/dist/src/global/A-Stage/A-Stage.types.d.ts +0 -97
- package/dist/src/global/A-Stage/A-Stage.types.js +0 -43
- package/dist/src/global/A-Stage/A-Stage.types.js.map +0 -1
- package/dist/src/global/A-StepManager/A-StepManager.class.d.ts +0 -20
- package/dist/src/global/A-StepManager/A-StepManager.class.js +0 -111
- package/dist/src/global/A-StepManager/A-StepManager.class.js.map +0 -1
- package/dist/src/global/A-StepManager/A-StepManager.error.d.ts +0 -4
- package/dist/src/global/A-StepManager/A-StepManager.error.js +0 -9
- package/dist/src/global/A-StepManager/A-StepManager.error.js.map +0 -1
- package/dist/src/global/ASEID/ASEID.class.d.ts +0 -130
- package/dist/src/global/ASEID/ASEID.class.js +0 -167
- package/dist/src/global/ASEID/ASEID.class.js.map +0 -1
- package/dist/src/global/ASEID/ASEID.constants.d.ts +0 -0
- package/dist/src/global/ASEID/ASEID.constants.js +0 -2
- package/dist/src/global/ASEID/ASEID.constants.js.map +0 -1
- package/dist/src/global/ASEID/ASEID.error.d.ts +0 -5
- package/dist/src/global/ASEID/ASEID.error.js +0 -10
- package/dist/src/global/ASEID/ASEID.error.js.map +0 -1
- package/dist/src/global/ASEID/ASEID.types.d.ts +0 -65
- package/dist/src/global/ASEID/ASEID.types.js +0 -5
- package/dist/src/global/ASEID/ASEID.types.js.map +0 -1
- package/dist/src/helpers/A_Common.helper.d.ts +0 -28
- package/dist/src/helpers/A_Common.helper.js +0 -170
- package/dist/src/helpers/A_Common.helper.js.map +0 -1
- package/dist/src/helpers/A_Formatter.helper.d.ts +0 -35
- package/dist/src/helpers/A_Formatter.helper.js +0 -62
- package/dist/src/helpers/A_Formatter.helper.js.map +0 -1
- package/dist/src/helpers/A_Identity.helper.d.ts +0 -29
- package/dist/src/helpers/A_Identity.helper.js +0 -43
- package/dist/src/helpers/A_Identity.helper.js.map +0 -1
- package/dist/src/helpers/A_TypeGuards.helper.d.ts +0 -207
- package/dist/src/helpers/A_TypeGuards.helper.js +0 -296
- package/dist/src/helpers/A_TypeGuards.helper.js.map +0 -1
- package/dist/src/types/A_Common.types.d.ts +0 -36
- package/dist/src/types/A_Common.types.js +0 -3
- package/dist/src/types/A_Common.types.js.map +0 -1
- package/index.ts +0 -81
- package/src/global/A-Dependency/A-DependencyReference.class.ts +0 -61
- package/src/global/A-Dependency/A-DependencyReference.types.ts +0 -61
- package/trace-require.js +0 -46
- package/tsconfig.build.json +0 -58
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
import { A_TYPES__Scope_Init, A_TYPES__ScopeConfig, A_TYPES__ScopeLinkedComponents, A_TYPES_ScopeDependentComponents } from "../A-Scope/A-Scope.types";
|
|
2
|
-
import { A_TYPES__MetaLinkedComponentConstructors, A_TYPES__MetaLinkedComponents } from "../A-Meta/A-Meta.types";
|
|
3
|
-
import { A_TYPES__FeatureAvailableComponents } from "../A-Feature/A-Feature.types";
|
|
4
|
-
import { A_Component } from "../A-Component/A-Component.class";
|
|
5
|
-
import { A_Feature } from "../A-Feature/A-Feature.class";
|
|
6
|
-
import { A_Container } from "../A-Container/A-Container.class";
|
|
7
|
-
import { A_Scope } from "../A-Scope/A-Scope.class";
|
|
8
|
-
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
9
|
-
import { A_ComponentMeta } from "../A-Component/A-Component.meta";
|
|
10
|
-
import { A_ContainerMeta } from "../A-Container/A-Container.meta";
|
|
11
|
-
import { A_Entity } from "../A-Entity/A-Entity.class";
|
|
12
|
-
import { A_EntityMeta } from "../A-Entity/A-Entity.meta";
|
|
13
|
-
import { A_TYPES__A_StageStep } from "../A-Stage/A-Stage.types";
|
|
14
|
-
import { A_TYPES__ContextEnvironment } from "./A-Context.types";
|
|
15
|
-
import { A_TYPES__Container_Constructor } from "../A-Container/A-Container.types";
|
|
16
|
-
import { A_TYPES__Entity_Constructor } from "../A-Entity/A-Entity.types";
|
|
17
|
-
import { A_TYPES__Component_Constructor } from "../A-Component/A-Component.types";
|
|
18
|
-
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
19
|
-
import { A_TYPES__InjectableTargets } from "../A-Inject/A-Inject.types";
|
|
20
|
-
import { A_TYPES__ConceptAbstractions } from "../A-Concept/A-Concept.constants";
|
|
21
|
-
export declare class A_Context {
|
|
22
|
-
/**
|
|
23
|
-
* Default name of the application from environment variable A_CONCEPT_NAME
|
|
24
|
-
*
|
|
25
|
-
* [!] If environment variable is not set, it will default to 'a-concept'
|
|
26
|
-
*/
|
|
27
|
-
static get concept(): string;
|
|
28
|
-
/**
|
|
29
|
-
* Root scope of the application from environment variable A_CONCEPT_ROOT_SCOPE
|
|
30
|
-
*
|
|
31
|
-
* [!] If environment variable is not set, it will default to 'root'
|
|
32
|
-
*/
|
|
33
|
-
static get root(): A_Scope;
|
|
34
|
-
/**
|
|
35
|
-
* Environment the application is running in.
|
|
36
|
-
* Can be either 'server' or 'browser'.
|
|
37
|
-
* [!] Determined by checking if 'window' object is available.
|
|
38
|
-
*/
|
|
39
|
-
static get environment(): A_TYPES__ContextEnvironment;
|
|
40
|
-
/**
|
|
41
|
-
* Singleton instance of the Context
|
|
42
|
-
*/
|
|
43
|
-
private static _instance;
|
|
44
|
-
/**
|
|
45
|
-
* Root Scope of the Concept and Environment
|
|
46
|
-
*
|
|
47
|
-
* Root scope is the top-level scope that all other scopes inherit from.
|
|
48
|
-
* It stores global configurations and settings and ALL SHAREABLE RESOURCES.
|
|
49
|
-
*
|
|
50
|
-
* [!] Root scope is created automatically when the Context is initialized.
|
|
51
|
-
* [!] Root scope name can be configured using environment variable A_CONCEPT_ROOT_SCOPE
|
|
52
|
-
*/
|
|
53
|
-
private _root;
|
|
54
|
-
/**
|
|
55
|
-
* A registry that keeps track of scopes for all components (Containers, Features, Commands)
|
|
56
|
-
* Which can issue a scope allocation.
|
|
57
|
-
*/
|
|
58
|
-
protected _registry: WeakMap<A_TYPES__ScopeLinkedComponents, A_Scope>;
|
|
59
|
-
/**
|
|
60
|
-
* This is a registry that stores an issuer of each scope allocation.
|
|
61
|
-
* It helps to track which component (Container, Feature, Command) allocated a specific scope.
|
|
62
|
-
*/
|
|
63
|
-
protected _scopeIssuers: WeakMap<A_Scope, A_TYPES__ScopeLinkedComponents>;
|
|
64
|
-
/**
|
|
65
|
-
* Stores a context associated with a specific component that depends on a scope.
|
|
66
|
-
* uses for quick retrieval of the scope for the component.
|
|
67
|
-
*/
|
|
68
|
-
protected _scopeStorage: WeakMap<A_TYPES_ScopeDependentComponents, A_Scope>;
|
|
69
|
-
/**
|
|
70
|
-
* Stores meta information for different component types by their constructors.
|
|
71
|
-
* Meta provides to store extra information about the class behavior and configuration.
|
|
72
|
-
*/
|
|
73
|
-
protected _metaStorage: Map<A_TYPES__MetaLinkedComponentConstructors, A_Meta>;
|
|
74
|
-
/**
|
|
75
|
-
* Private constructor to enforce singleton pattern.
|
|
76
|
-
*
|
|
77
|
-
* [!] This class should not be instantiated directly. Use A_Context.getInstance() instead.
|
|
78
|
-
*/
|
|
79
|
-
private constructor();
|
|
80
|
-
/**
|
|
81
|
-
* Get the instance of the Namespace Provider.
|
|
82
|
-
*
|
|
83
|
-
* If the instance does not exist, it will be created.
|
|
84
|
-
*
|
|
85
|
-
* @returns
|
|
86
|
-
*/
|
|
87
|
-
static getInstance(): A_Context;
|
|
88
|
-
/**
|
|
89
|
-
* Register method allows to register a component with a specific scope in the context.
|
|
90
|
-
*
|
|
91
|
-
* @param component - Component to register with a specific scope. Can be either A_Container, A_Feature.
|
|
92
|
-
* @param scope - Scope to associate the component with.
|
|
93
|
-
* @returns
|
|
94
|
-
*/
|
|
95
|
-
static register(
|
|
96
|
-
/**
|
|
97
|
-
* Provide the scope that will be associated with the component.
|
|
98
|
-
*/
|
|
99
|
-
scope: A_Scope,
|
|
100
|
-
/**
|
|
101
|
-
* Provide a component that needs to be registered with a specific scope.
|
|
102
|
-
*/
|
|
103
|
-
component: A_TYPES_ScopeDependentComponents): A_Scope;
|
|
104
|
-
/**
|
|
105
|
-
* Allocate method instantiates a new scope for the given component and registers it in the context.
|
|
106
|
-
* It bounds the component (Container, Feature) to a new scope that can be configured and used independently.
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* @param component - Component to allocate the scope for. Can be either A_Container, A_Feature.
|
|
110
|
-
* @param importing - Configuration of the scope that will be created for the component.
|
|
111
|
-
*/
|
|
112
|
-
static allocate(
|
|
113
|
-
/**
|
|
114
|
-
* Provide a component that needs a scope allocation.
|
|
115
|
-
*/
|
|
116
|
-
component: A_TYPES__ScopeLinkedComponents): A_Scope;
|
|
117
|
-
static allocate(
|
|
118
|
-
/**
|
|
119
|
-
* Provide a component that needs a scope allocation.
|
|
120
|
-
*/
|
|
121
|
-
component: A_TYPES__ScopeLinkedComponents,
|
|
122
|
-
/**
|
|
123
|
-
* Provide the scope that will be used as a base for the new scope.
|
|
124
|
-
*/
|
|
125
|
-
importing: A_Scope): A_Scope;
|
|
126
|
-
static allocate(
|
|
127
|
-
/**
|
|
128
|
-
* Provide a component that needs a scope allocation.
|
|
129
|
-
*/
|
|
130
|
-
component: A_TYPES__ScopeLinkedComponents,
|
|
131
|
-
/**
|
|
132
|
-
* Provide configuration for the scope that will be created for the component.
|
|
133
|
-
*/
|
|
134
|
-
config: Partial<A_TYPES__Scope_Init & A_TYPES__ScopeConfig>): A_Scope;
|
|
135
|
-
/**
|
|
136
|
-
* Get or Create Meta for the specific class or instance.
|
|
137
|
-
* This method will return the existing meta if it exists, or create a new one if it doesn't.
|
|
138
|
-
*
|
|
139
|
-
* Meta object contains custom metadata based on the class type.
|
|
140
|
-
*
|
|
141
|
-
* @param container
|
|
142
|
-
*/
|
|
143
|
-
static meta(
|
|
144
|
-
/**
|
|
145
|
-
* Get meta for the specific container class by constructor.
|
|
146
|
-
*/
|
|
147
|
-
container: A_TYPES__Container_Constructor): A_ContainerMeta;
|
|
148
|
-
static meta(
|
|
149
|
-
/**
|
|
150
|
-
* Get meta for the specific container instance.
|
|
151
|
-
*/
|
|
152
|
-
container: A_Container): A_ContainerMeta;
|
|
153
|
-
static meta(
|
|
154
|
-
/**
|
|
155
|
-
* Get meta for the specific entity class by constructor.
|
|
156
|
-
*/
|
|
157
|
-
entity: A_TYPES__Entity_Constructor): A_EntityMeta;
|
|
158
|
-
static meta(
|
|
159
|
-
/**
|
|
160
|
-
* Get meta for the specific entity instance.
|
|
161
|
-
*/
|
|
162
|
-
entity: A_Entity): A_EntityMeta;
|
|
163
|
-
static meta(
|
|
164
|
-
/**
|
|
165
|
-
* Get meta for the specific component class by constructor.
|
|
166
|
-
*/
|
|
167
|
-
component: A_TYPES__Component_Constructor): A_ComponentMeta;
|
|
168
|
-
static meta(
|
|
169
|
-
/**
|
|
170
|
-
* Get meta for the specific component instance.
|
|
171
|
-
*/
|
|
172
|
-
component: A_Component): A_ComponentMeta;
|
|
173
|
-
static meta(
|
|
174
|
-
/**
|
|
175
|
-
* Get meta for the specific component by its name.
|
|
176
|
-
*/
|
|
177
|
-
component: string): A_ComponentMeta;
|
|
178
|
-
static meta(
|
|
179
|
-
/**
|
|
180
|
-
* Get meta for the specific injectable target (class or instance).
|
|
181
|
-
*/
|
|
182
|
-
target: A_TYPES__InjectableTargets): A_ComponentMeta;
|
|
183
|
-
static meta<T extends Record<string, any>>(
|
|
184
|
-
/**
|
|
185
|
-
* Get meta for the specific class or instance
|
|
186
|
-
*/
|
|
187
|
-
constructor: new (...args: any[]) => any): A_Meta<T>;
|
|
188
|
-
/**
|
|
189
|
-
*
|
|
190
|
-
* This method allows to get the issuer of a specific scope.
|
|
191
|
-
*
|
|
192
|
-
* @param scope - Scope to get the issuer for.
|
|
193
|
-
* @returns - Component that issued the scope.
|
|
194
|
-
*/
|
|
195
|
-
static issuer(
|
|
196
|
-
/**
|
|
197
|
-
* Provide the scope to get its issuer.
|
|
198
|
-
*/
|
|
199
|
-
scope: A_Scope): A_TYPES__ScopeLinkedComponents;
|
|
200
|
-
/**
|
|
201
|
-
* Get the scope of the specific class or instance.
|
|
202
|
-
*
|
|
203
|
-
* Every execution in Concept has its own scope.
|
|
204
|
-
*
|
|
205
|
-
* This method will return the scope of the specific class or instance.
|
|
206
|
-
*
|
|
207
|
-
* @param entity
|
|
208
|
-
*/
|
|
209
|
-
static scope<T extends A_Entity>(
|
|
210
|
-
/**
|
|
211
|
-
* Provide an entity to get its scope.
|
|
212
|
-
*/
|
|
213
|
-
entity: T): A_Scope;
|
|
214
|
-
static scope<T extends A_Component>(
|
|
215
|
-
/**
|
|
216
|
-
* Provide a component to get its scope.
|
|
217
|
-
*/
|
|
218
|
-
component: T): A_Scope;
|
|
219
|
-
static scope<T extends A_Container>(
|
|
220
|
-
/**
|
|
221
|
-
* Provide a container to get its scope.
|
|
222
|
-
*/
|
|
223
|
-
container: T): A_Scope;
|
|
224
|
-
static scope<T extends A_Feature>(
|
|
225
|
-
/**
|
|
226
|
-
* Provide a feature to get its scope.
|
|
227
|
-
*/
|
|
228
|
-
feature: T): A_Scope;
|
|
229
|
-
static scope<T extends A_Fragment>(
|
|
230
|
-
/**
|
|
231
|
-
* Provide a fragment to get its scope.
|
|
232
|
-
*/
|
|
233
|
-
fragment: T): A_Scope;
|
|
234
|
-
/**
|
|
235
|
-
* Returns a template of the feature that can be then used to create a new A-Feature Instance
|
|
236
|
-
*
|
|
237
|
-
* [!] Note: Steps/Stages included are fully dependent on the scope provided since it dictates which components are active and can provide extensions for the feature.
|
|
238
|
-
*
|
|
239
|
-
* @param name
|
|
240
|
-
*/
|
|
241
|
-
static featureTemplate(
|
|
242
|
-
/**
|
|
243
|
-
* Provide the name of the feature to get the template for. Regular expressions are also supported to match multiple features.
|
|
244
|
-
*/
|
|
245
|
-
name: string | RegExp,
|
|
246
|
-
/**
|
|
247
|
-
* Provide the component to get the feature template from.
|
|
248
|
-
*/
|
|
249
|
-
component: A_TYPES__FeatureAvailableComponents,
|
|
250
|
-
/**
|
|
251
|
-
* Provide the scope that dictates which components are active and can provide extensions for the feature.
|
|
252
|
-
*/
|
|
253
|
-
scope?: A_Scope): Array<A_TYPES__A_StageStep>;
|
|
254
|
-
/**
|
|
255
|
-
* Returns all extensions for the specific feature in the specific component within the provided scope.
|
|
256
|
-
* Scope dictates which components are active and can provide extensions for the feature.
|
|
257
|
-
*
|
|
258
|
-
* [!] This method only returns extensions, not the base feature definition.
|
|
259
|
-
*
|
|
260
|
-
* @param scope
|
|
261
|
-
* @returns
|
|
262
|
-
*/
|
|
263
|
-
static featureExtensions(
|
|
264
|
-
/**
|
|
265
|
-
* Provide the name of the feature to get the template for. Regular expressions are also supported to match multiple features.
|
|
266
|
-
*/
|
|
267
|
-
name: string | RegExp,
|
|
268
|
-
/**
|
|
269
|
-
* Provide the component to get the feature template from.
|
|
270
|
-
*/
|
|
271
|
-
component: A_TYPES__FeatureAvailableComponents,
|
|
272
|
-
/**
|
|
273
|
-
* Provide the scope that dictates which components are active and can provide extensions for the feature.
|
|
274
|
-
*/
|
|
275
|
-
scope: A_Scope): Array<A_TYPES__A_StageStep>;
|
|
276
|
-
/**
|
|
277
|
-
* method helps to filter steps in a way that only the most derived classes are kept.
|
|
278
|
-
*
|
|
279
|
-
* @param scope
|
|
280
|
-
* @param items
|
|
281
|
-
* @returns
|
|
282
|
-
*/
|
|
283
|
-
private filterToMostDerived;
|
|
284
|
-
/**
|
|
285
|
-
* This method returns the feature template definition without any extensions.
|
|
286
|
-
* It can be used to retrieve the base template for a feature before any modifications are applied.
|
|
287
|
-
*
|
|
288
|
-
* [!] This method does not consider extensions from other components.
|
|
289
|
-
*
|
|
290
|
-
* @param feature
|
|
291
|
-
* @param component
|
|
292
|
-
* @returns
|
|
293
|
-
*/
|
|
294
|
-
static featureDefinition(
|
|
295
|
-
/**
|
|
296
|
-
* Name of the feature to get the template for.
|
|
297
|
-
* Regular expressions are also supported to match multiple features.
|
|
298
|
-
*/
|
|
299
|
-
feature: string | RegExp,
|
|
300
|
-
/**
|
|
301
|
-
* Component to get the feature template from.
|
|
302
|
-
*/
|
|
303
|
-
component: A_TYPES__FeatureAvailableComponents): Array<A_TYPES__A_StageStep>;
|
|
304
|
-
/**
|
|
305
|
-
* Returns a definition of the abstraction that can be then used to create a new A-Feature Instance
|
|
306
|
-
*
|
|
307
|
-
* [!] Note: Steps/Stages included are fully dependent on the scope provided since it dictates which components are active and can provide extensions for the abstraction.
|
|
308
|
-
*
|
|
309
|
-
* @param abstraction
|
|
310
|
-
*/
|
|
311
|
-
static abstractionTemplate(
|
|
312
|
-
/**
|
|
313
|
-
* Provide the abstraction stage to get the definition for.
|
|
314
|
-
*/
|
|
315
|
-
abstraction: A_TYPES__ConceptAbstractions,
|
|
316
|
-
/**
|
|
317
|
-
* Provide the component to get the abstraction definition from.
|
|
318
|
-
*/
|
|
319
|
-
component: A_TYPES__FeatureAvailableComponents): Array<A_TYPES__A_StageStep>;
|
|
320
|
-
static abstractionExtensions(
|
|
321
|
-
/**
|
|
322
|
-
* Provide the abstraction name to get the definition for.
|
|
323
|
-
*/
|
|
324
|
-
abstraction: A_TYPES__ConceptAbstractions,
|
|
325
|
-
/**
|
|
326
|
-
* Provide the component to get the abstraction definition from.
|
|
327
|
-
*/
|
|
328
|
-
component: A_TYPES__FeatureAvailableComponents): Array<A_TYPES__A_StageStep>;
|
|
329
|
-
/**
|
|
330
|
-
* Resets the Context to its initial state.
|
|
331
|
-
*/
|
|
332
|
-
static reset(): void;
|
|
333
|
-
/**
|
|
334
|
-
* Type guard to check if the param is allowed for scope allocation.
|
|
335
|
-
*
|
|
336
|
-
* @param param
|
|
337
|
-
* @returns
|
|
338
|
-
*/
|
|
339
|
-
static isAllowedForScopeAllocation(param: any): param is A_TYPES__ScopeLinkedComponents;
|
|
340
|
-
/**
|
|
341
|
-
* Type guard to check if the param is allowed to be registered in the context.
|
|
342
|
-
*
|
|
343
|
-
* @param param
|
|
344
|
-
* @returns
|
|
345
|
-
*/
|
|
346
|
-
static isAllowedToBeRegistered(param: any): param is A_TYPES_ScopeDependentComponents;
|
|
347
|
-
/**
|
|
348
|
-
* Type guard to check if the param is allowed for meta storage.
|
|
349
|
-
*
|
|
350
|
-
* @param param
|
|
351
|
-
* @returns
|
|
352
|
-
*/
|
|
353
|
-
static isAllowedForMeta(param: any): param is A_TYPES__MetaLinkedComponents;
|
|
354
|
-
/**
|
|
355
|
-
* Type guard to check if the param is allowed for meta storage by constructor.
|
|
356
|
-
*
|
|
357
|
-
* @param param
|
|
358
|
-
* @returns
|
|
359
|
-
*/
|
|
360
|
-
static isAllowedForMetaConstructor(param: any): param is A_TYPES__MetaLinkedComponentConstructors;
|
|
361
|
-
}
|