@adaas/a-concept 0.2.14 → 0.3.2
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/.conf/tsconfig.base.json +91 -0
- package/.conf/tsconfig.browser.json +36 -0
- package/.conf/tsconfig.node.json +40 -0
- package/dist/browser/index.d.mts +4188 -212
- package/dist/browser/index.mjs +2 -67
- package/dist/browser/index.mjs.map +1 -1
- package/dist/node/index.cjs +5810 -383
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.mts +4215 -212
- package/dist/node/index.d.ts +4215 -212
- package/dist/node/index.mjs +5751 -66
- package/dist/node/index.mjs.map +1 -1
- package/jest.config.ts +30 -15
- package/package.json +19 -16
- package/src/env/env-browser.ts +38 -1
- package/src/env/env-node.ts +26 -2
- package/src/env/env.base.ts +21 -2
- package/src/env/global.browser.d.ts +1 -1
- package/src/helpers/A_BasicTypeGuards.helper.ts +81 -0
- package/src/helpers/A_Common.helper.ts +2 -2
- package/src/helpers/A_Identity.helper.ts +2 -4
- package/src/helpers/A_TypeGuards.helper.ts +45 -30
- package/src/helpers/index.ts +5 -0
- package/src/index.ts +21 -94
- package/src/{global → lib}/A-Abstraction/A-Abstraction-Extend.decorator.ts +18 -13
- package/src/{global → lib}/A-Abstraction/A-Abstraction.class.ts +5 -5
- package/src/{global → lib}/A-Abstraction/A-Abstraction.error.ts +1 -1
- package/src/{global → lib}/A-Abstraction/A-Abstraction.types.ts +5 -5
- package/src/lib/A-Abstraction/index.ts +8 -0
- package/src/{global → lib}/A-Caller/A_Caller.class.ts +3 -4
- package/src/{global → lib}/A-Caller/A_Caller.error.ts +1 -4
- package/src/{global → lib}/A-Caller/A_Caller.types.ts +4 -4
- package/src/lib/A-Caller/index.ts +3 -0
- package/src/{global → lib}/A-Component/A-Component.class.ts +2 -3
- package/src/{global → lib}/A-Component/A-Component.meta.ts +5 -5
- package/src/{global → lib}/A-Component/A-Component.types.ts +5 -5
- package/src/lib/A-Component/index.ts +5 -0
- package/src/{global → lib}/A-Concept/A-Concept.class.ts +9 -7
- package/src/{global → lib}/A-Concept/A-Concept.meta.ts +2 -2
- package/src/{global → lib}/A-Concept/A-Concept.types.ts +7 -7
- package/src/lib/A-Concept/index.ts +4 -0
- package/src/{global → lib}/A-Container/A-Container.class.ts +3 -3
- package/src/{global → lib}/A-Container/A-Container.meta.ts +11 -6
- package/src/{global → lib}/A-Container/A-Container.types.ts +9 -6
- package/src/lib/A-Container/index.ts +5 -0
- package/src/{global → lib}/A-Context/A-Context.class.ts +53 -42
- package/src/{global → lib}/A-Context/A-Context.error.ts +1 -1
- package/src/lib/A-Context/A-Context.types.ts +14 -0
- package/src/lib/A-Context/index.ts +5 -0
- package/src/{global → lib}/A-Dependency/A-Dependency-All.decorator.ts +11 -11
- package/src/{global → lib}/A-Dependency/A-Dependency-Default.decorator.ts +11 -9
- package/src/{global → lib}/A-Dependency/A-Dependency-Flat.decorator.ts +11 -8
- package/src/{global → lib}/A-Dependency/A-Dependency-Load.decorator.ts +11 -9
- package/src/{global → lib}/A-Dependency/A-Dependency-Parent.decorator.ts +11 -9
- package/src/lib/A-Dependency/A-Dependency-Query.decorator.ts +90 -0
- package/src/{global → lib}/A-Dependency/A-Dependency-Require.decorator.ts +11 -9
- package/src/{global → lib}/A-Dependency/A-Dependency.class.ts +20 -3
- package/src/{global → lib}/A-Dependency/A-Dependency.error.ts +1 -1
- package/src/{global → lib}/A-Dependency/A-Dependency.types.ts +20 -9
- package/src/lib/A-Dependency/index.ts +18 -0
- package/src/{global → lib}/A-Entity/A-Entity.class.ts +11 -9
- package/src/{global → lib}/A-Entity/A-Entity.error.ts +1 -1
- package/src/{global → lib}/A-Entity/A-Entity.meta.ts +3 -3
- package/src/{global → lib}/A-Entity/A-Entity.types.ts +5 -5
- package/src/lib/A-Entity/index.ts +5 -0
- package/src/{global → lib}/A-Error/A_Error.class.ts +13 -13
- package/src/{global → lib}/A-Error/A_Error.types.ts +2 -2
- package/src/lib/A-Error/index.ts +3 -0
- package/src/{global → lib}/A-Feature/A-Feature-Define.decorator.ts +16 -10
- package/src/{global → lib}/A-Feature/A-Feature-Extend.decorator.ts +13 -9
- package/src/{global → lib}/A-Feature/A-Feature.class.ts +15 -13
- package/src/{global → lib}/A-Feature/A-Feature.error.ts +2 -2
- package/src/{global → lib}/A-Feature/A-Feature.types.ts +21 -12
- package/src/lib/A-Feature/index.ts +13 -0
- package/src/{global → lib}/A-Fragment/A-Fragment.class.ts +0 -2
- package/src/{global → lib}/A-Fragment/A-Fragment.types.ts +1 -1
- package/src/lib/A-Fragment/index.ts +5 -0
- package/src/{global → lib}/A-Inject/A-Inject.decorator.ts +42 -24
- package/src/{global → lib}/A-Inject/A-Inject.error.ts +1 -1
- package/src/{global → lib}/A-Inject/A-Inject.types.ts +3 -9
- package/src/lib/A-Inject/index.ts +3 -0
- package/src/{global → lib}/A-Meta/A-Meta.decorator.ts +2 -2
- package/src/{global → lib}/A-Meta/A-Meta.types.ts +18 -10
- package/src/lib/A-Meta/index.ts +11 -0
- package/src/{global → lib}/A-Scope/A-Scope.class.ts +37 -25
- package/src/{global → lib}/A-Scope/A-Scope.error.ts +1 -1
- package/src/{global → lib}/A-Scope/A-Scope.types.ts +23 -15
- package/src/lib/A-Scope/index.ts +5 -0
- package/src/{global → lib}/A-Stage/A-Stage.class.ts +9 -10
- package/src/{global → lib}/A-Stage/A-Stage.error.ts +1 -1
- package/src/{global → lib}/A-Stage/A-Stage.types.ts +1 -4
- package/src/lib/A-Stage/index.ts +5 -0
- package/src/{global → lib}/A-StepManager/A-StepManager.class.ts +8 -4
- package/src/{global → lib}/A-StepManager/A-StepManager.error.ts +1 -1
- package/src/lib/A-StepManager/index.ts +4 -0
- package/src/{global → lib}/ASEID/ASEID.class.ts +20 -23
- package/src/lib/ASEID/ASEID.error.ts +12 -0
- package/src/lib/ASEID/index.ts +4 -0
- package/src/types/A_identity.types.ts +4 -0
- package/src/types/index.ts +2 -0
- package/tests/A-Abstraction.test.ts +6 -6
- package/tests/A-Common.test.ts +6 -4
- package/tests/A-Component.test.ts +7 -5
- package/tests/A-Concept.test.ts +13 -11
- package/tests/A-Container.test.ts +4 -3
- package/tests/A-Dependency.test.ts +73 -1
- package/tests/A-Entity.test.ts +108 -5
- package/tests/A-Error.test.ts +7 -4
- package/tests/A-Feature.test.ts +12 -8
- package/tests/A-Fragment.test.ts +1 -2
- package/tests/A-Inject.test.ts +4 -1
- package/tests/A-Meta.test.ts +12 -10
- package/tests/A-Scope.test.ts +11 -10
- package/tests/A-StepManager.test.ts +3 -3
- package/tests/ASEID.test.ts +2 -2
- package/tests/jest.setup.ts +23 -23
- package/tsconfig.json +59 -97
- package/tsup.config.ts +18 -13
- package/dist/browser/A-Context.types-BtR_HJ0j.d.mts +0 -3828
- package/dist/browser/env.d.mts +0 -64
- package/dist/browser/env.mjs +0 -3
- package/dist/browser/env.mjs.map +0 -1
- package/dist/node/A-Context.types-BtR_HJ0j.d.mts +0 -3828
- package/dist/node/A-Context.types-BtR_HJ0j.d.ts +0 -3828
- package/dist/node/env.cjs +0 -12
- package/dist/node/env.cjs.map +0 -1
- package/dist/node/env.d.mts +0 -91
- package/dist/node/env.d.ts +0 -91
- package/dist/node/env.js +0 -12
- package/dist/node/env.js.map +0 -1
- package/dist/node/env.mjs +0 -3
- package/dist/node/env.mjs.map +0 -1
- package/dist/node/index.js +0 -387
- package/dist/node/index.js.map +0 -1
- package/src/global/A-Context/A-Context.types.ts +0 -14
- package/src/global/ASEID/ASEID.error.ts +0 -12
- /package/src/{global → lib}/A-Component/A-Component.constants.ts +0 -0
- /package/src/{global → lib}/A-Concept/A-Concept.constants.ts +0 -0
- /package/src/{global → lib}/A-Container/A-Container.constants.ts +0 -0
- /package/src/{global → lib}/A-Entity/A-Entity.constants.ts +0 -0
- /package/src/{global → lib}/A-Error/A_Error.constants.ts +0 -0
- /package/src/{global → lib}/A-Meta/A-Meta.class.ts +0 -0
- /package/src/{global → lib}/ASEID/ASEID.constants.ts +0 -0
- /package/src/{global → lib}/ASEID/ASEID.types.ts +0 -0
|
@@ -3,31 +3,49 @@ import {
|
|
|
3
3
|
A_TYPES__A_InjectDecoratorReturn,
|
|
4
4
|
A_TYPES__InjectableTargets
|
|
5
5
|
} from "./A-Inject.types";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
|
|
6
|
+
import {
|
|
7
|
+
A_Component,
|
|
8
|
+
A_TYPES__ComponentMetaKey,
|
|
9
|
+
A_TYPES__Component_Constructor
|
|
10
|
+
} from "@adaas/a-concept/a-component";
|
|
11
|
+
import {
|
|
12
|
+
A_Fragment,
|
|
13
|
+
A_TYPES__Fragment_Constructor
|
|
14
|
+
} from "@adaas/a-concept/a-fragment";
|
|
15
|
+
import {
|
|
16
|
+
A_TYPES__ContainerMetaKey
|
|
17
|
+
|
|
18
|
+
} from "@adaas/a-concept/a-container";
|
|
19
|
+
import {
|
|
20
|
+
A_TYPES__Entity_Constructor,
|
|
21
|
+
A_TYPES__EntityMetaKey
|
|
22
|
+
} from "@adaas/a-concept/a-entity";
|
|
23
|
+
import { A_Context } from "@adaas/a-concept/a-context";
|
|
24
|
+
import { A_Meta } from "@adaas/a-concept/a-meta";
|
|
25
|
+
import { A_Entity } from "@adaas/a-concept/a-entity";
|
|
26
|
+
import { A_TYPES__Feature_Constructor } from "@adaas/a-concept/a-feature";
|
|
27
|
+
import {
|
|
28
|
+
A_Caller,
|
|
29
|
+
A_TYPES__Caller_Constructor
|
|
30
|
+
} from "@adaas/a-concept/a-caller";
|
|
31
|
+
import { A_TypeGuards} from "@adaas/a-concept/helpers/A_TypeGuards.helper";
|
|
32
|
+
import { A_CommonHelper} from "@adaas/a-concept/helpers/A_Common.helper";
|
|
17
33
|
import { A_InjectError } from "./A-Inject.error";
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import { A_Feature } from "@adaas/a-concept/
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
import {
|
|
35
|
+
A_Scope,
|
|
36
|
+
A_TYPES__Scope_Constructor
|
|
37
|
+
} from "@adaas/a-concept/a-scope";
|
|
38
|
+
import { A_Feature } from "@adaas/a-concept/a-feature";
|
|
39
|
+
import {
|
|
40
|
+
A_Error,
|
|
41
|
+
A_TYPES__Error_Constructor
|
|
42
|
+
} from "@adaas/a-concept/a-error";
|
|
43
|
+
import {
|
|
44
|
+
A_Dependency,
|
|
45
|
+
A_TYPES__A_DependencyInjectable,
|
|
46
|
+
A_TYPES__A_DependencyResolutionStrategy
|
|
47
|
+
} from "@adaas/a-concept/a-dependency";
|
|
48
|
+
import { A_TYPES__Ctor } from "@adaas/a-concept/types";
|
|
31
49
|
|
|
32
50
|
|
|
33
51
|
/**
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { A_TYPES__Component_Constructor } from "@adaas/a-concept/
|
|
2
|
-
import { A_TYPES__Container_Constructor } from "@adaas/a-concept/
|
|
3
|
-
import {
|
|
4
|
-
import { A_TYPES__Entity_Constructor } from "@adaas/a-concept/global/A-Entity/A-Entity.types";
|
|
5
|
-
import { A_TYPES__Feature_Constructor } from "@adaas/a-concept/global/A-Feature/A-Feature.types";
|
|
6
|
-
import { A_TYPES__Fragment_Constructor } from "@adaas/a-concept/global/A-Fragment/A-Fragment.types";
|
|
7
|
-
import { A_TYPES__Caller_Constructor } from "@adaas/a-concept/global/A-Caller/A_Caller.types";
|
|
8
|
-
import { A_TYPES__Error_Constructor } from "../A-Error/A_Error.types";
|
|
9
|
-
import { A_Dependency } from "../A-Dependency/A-Dependency.class";
|
|
1
|
+
import { A_TYPES__Component_Constructor } from "@adaas/a-concept/a-component";
|
|
2
|
+
import { A_TYPES__Container_Constructor } from "@adaas/a-concept/a-container";
|
|
3
|
+
import { A_Dependency } from "@adaas/a-concept/a-dependency";
|
|
10
4
|
|
|
11
5
|
|
|
12
6
|
// ============================================================================
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A_TYPES__Ctor } from "@adaas/a-concept/types
|
|
2
|
-
import { A_Context } from "
|
|
1
|
+
import { A_TYPES__Ctor } from "@adaas/a-concept/types";
|
|
2
|
+
import { A_Context } from "@adaas/a-concept/a-context";
|
|
3
3
|
import { A_Meta } from "./A-Meta.class";
|
|
4
4
|
import { A_TYPES__MetaLinkedComponentConstructors } from "./A-Meta.types";
|
|
5
5
|
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import { A_TYPES__Ctor } from "@adaas/a-concept/types
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { A_TYPES__Ctor } from "@adaas/a-concept/types";
|
|
2
|
+
import {
|
|
3
|
+
A_Component,
|
|
4
|
+
A_TYPES__Component_Constructor
|
|
5
|
+
} from "@adaas/a-concept/a-component";
|
|
6
|
+
import {
|
|
7
|
+
A_Container,
|
|
8
|
+
A_TYPES__Container_Constructor
|
|
9
|
+
} from "@adaas/a-concept/a-container";
|
|
10
|
+
import {
|
|
11
|
+
A_Entity,
|
|
12
|
+
A_TYPES__Entity_Constructor
|
|
13
|
+
} from "@adaas/a-concept/a-entity";
|
|
14
|
+
import {
|
|
15
|
+
A_Fragment,
|
|
16
|
+
A_TYPES__Fragment_Constructor
|
|
17
|
+
} from "@adaas/a-concept/a-fragment";
|
|
10
18
|
import { A_Meta } from "./A-Meta.class";
|
|
11
19
|
|
|
12
20
|
|
|
@@ -27,7 +35,7 @@ export type A_TYPES__MetaLinkedComponents = A_Container
|
|
|
27
35
|
/**
|
|
28
36
|
* Constructors of components that can have Meta associated with them
|
|
29
37
|
*/
|
|
30
|
-
export type A_TYPES__MetaLinkedComponentConstructors =
|
|
38
|
+
export type A_TYPES__MetaLinkedComponentConstructors = A_TYPES__Ctor<any>
|
|
31
39
|
| A_TYPES__Container_Constructor
|
|
32
40
|
| A_TYPES__Component_Constructor
|
|
33
41
|
| A_TYPES__Entity_Constructor
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { A_Meta } from './A-Meta.class';
|
|
2
|
+
// export { A_MetaMeta } from './A-Meta.meta';
|
|
3
|
+
// export { A_MetaError } from './A-Meta.error';
|
|
4
|
+
export * from './A-Meta.types';
|
|
5
|
+
// export * from './A-Meta.constants';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
// --------------------------------------------------------
|
|
9
|
+
// -----------------------Decorators-----------------------
|
|
10
|
+
// --------------------------------------------------------
|
|
11
|
+
export { A_MetaDecorator } from './A-Meta.decorator';
|
|
@@ -5,25 +5,35 @@ import {
|
|
|
5
5
|
A_TYPES__Scope_Constructor,
|
|
6
6
|
A_TYPES__ScopeLinkedConstructors
|
|
7
7
|
} from './A-Scope.types'
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
|
|
8
|
+
import {
|
|
9
|
+
A_Fragment,
|
|
10
|
+
A_TYPES__Fragment_Constructor
|
|
11
|
+
} from "@adaas/a-concept/a-fragment";
|
|
12
|
+
import { A_Context } from "@adaas/a-concept/a-context";
|
|
13
|
+
import {
|
|
14
|
+
A_Component,
|
|
15
|
+
A_TYPES__Component_Constructor,
|
|
16
|
+
A_TYPES__ComponentMetaKey
|
|
17
|
+
} from "@adaas/a-concept/a-component";
|
|
18
|
+
import {
|
|
19
|
+
A_Entity,
|
|
20
|
+
A_TYPES__Entity_Constructor
|
|
21
|
+
} from "@adaas/a-concept/a-entity";
|
|
22
|
+
import { A_TypeGuards} from "@adaas/a-concept/helpers/A_TypeGuards.helper";
|
|
23
|
+
import { A_FormatterHelper} from "@adaas/a-concept/helpers/A_Formatter.helper";
|
|
24
|
+
import { A_CommonHelper} from "@adaas/a-concept/helpers/A_Common.helper";
|
|
25
|
+
import {
|
|
26
|
+
A_Error,
|
|
27
|
+
A_TYPES__Error_Constructor
|
|
28
|
+
} from "@adaas/a-concept/a-error";
|
|
29
|
+
import { A_ScopeError } from '@adaas/a-concept/a-scope';
|
|
30
|
+
import { A_Meta } from '@adaas/a-concept/a-meta';
|
|
31
|
+
import {
|
|
32
|
+
A_Dependency,
|
|
33
|
+
A_TYPES__A_DependencyInjectable
|
|
34
|
+
} from '@adaas/a-concept/a-dependency';
|
|
35
|
+
import { A_TYPES__Ctor } from '@adaas/a-concept/types';
|
|
36
|
+
import { ASEID } from '@adaas/a-concept/aseid';
|
|
27
37
|
|
|
28
38
|
|
|
29
39
|
|
|
@@ -169,8 +179,10 @@ export class A_Scope<
|
|
|
169
179
|
get parent(): A_Scope | undefined {
|
|
170
180
|
return this._parent;
|
|
171
181
|
}
|
|
182
|
+
|
|
172
183
|
/**
|
|
173
|
-
* A_Scope
|
|
184
|
+
* A_Scope is a unique A-Concept Structure that allows to operate with A-Concept Primitives and Models in a specific context and with specific rules.
|
|
185
|
+
* It refers to the visibility and accessibility of :
|
|
174
186
|
* - variables,
|
|
175
187
|
* - Components,
|
|
176
188
|
* - Context Fragments
|
|
@@ -1684,11 +1696,11 @@ export class A_Scope<
|
|
|
1684
1696
|
this.allowedErrors.add(param1.constructor as _ErrorType[number]);
|
|
1685
1697
|
|
|
1686
1698
|
this._errors.set(
|
|
1687
|
-
param1.code,
|
|
1699
|
+
(param1 as any).code,
|
|
1688
1700
|
param1 as InstanceType<_ErrorType[number]>
|
|
1689
1701
|
);
|
|
1690
1702
|
|
|
1691
|
-
A_Context.register(this, param1);
|
|
1703
|
+
A_Context.register(this, (param1 as any));
|
|
1692
1704
|
break;
|
|
1693
1705
|
}
|
|
1694
1706
|
|
|
@@ -1855,10 +1867,10 @@ export class A_Scope<
|
|
|
1855
1867
|
// 5) In case when it's a A-Error instance
|
|
1856
1868
|
case A_TypeGuards.isErrorInstance(param1): {
|
|
1857
1869
|
|
|
1858
|
-
this._errors.delete(param1.code);
|
|
1859
|
-
A_Context.deregister(param1);
|
|
1870
|
+
this._errors.delete((param1 as any).code);
|
|
1871
|
+
A_Context.deregister((param1 as any));
|
|
1860
1872
|
|
|
1861
|
-
const ctor = param1.constructor as _ErrorType[number];
|
|
1873
|
+
const ctor = (param1 as any).constructor as _ErrorType[number];
|
|
1862
1874
|
|
|
1863
1875
|
const hasError = Array.from(this._errors.values()).some(error => error instanceof ctor);
|
|
1864
1876
|
if (!hasError) {
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import type {
|
|
2
|
+
A_Component,
|
|
3
|
+
A_TYPES__Component_Constructor
|
|
4
|
+
} from "@adaas/a-concept/a-component"
|
|
5
|
+
import type {
|
|
6
|
+
A_Container,
|
|
7
|
+
A_TYPES__Container_Constructor
|
|
8
|
+
} from "@adaas/a-concept/a-container"
|
|
9
|
+
import type {
|
|
10
|
+
A_Entity,
|
|
11
|
+
A_TYPES__Entity_Constructor
|
|
12
|
+
} from "@adaas/a-concept/a-entity"
|
|
13
|
+
import type { A_Feature } from "@adaas/a-concept/a-feature"
|
|
14
|
+
import type { A_Fragment } from "@adaas/a-concept/a-fragment"
|
|
15
|
+
import type { A_Caller } from "@adaas/a-concept/a-caller"
|
|
16
|
+
import type {
|
|
17
|
+
A_Error,
|
|
18
|
+
A_TYPES__Error_Constructor
|
|
19
|
+
} from "@adaas/a-concept/a-error"
|
|
20
|
+
import type { A_Scope } from "./A-Scope.class"
|
|
21
|
+
import type { A_TYPES__Feature_Constructor } from "@adaas/a-concept/a-feature"
|
|
22
|
+
import type { A_TYPES__Ctor } from "@adaas/a-concept/types"
|
|
15
23
|
|
|
16
24
|
|
|
17
25
|
// ============================================================================
|
|
@@ -81,7 +89,7 @@ export type A_TYPES__ScopeLinkedConstructors = A_TYPES__Container_Constructor |
|
|
|
81
89
|
/**
|
|
82
90
|
* A list of components that can have a scope associated with them
|
|
83
91
|
*/
|
|
84
|
-
export type A_TYPES__ScopeLinkedComponents = A_Container | A_Feature
|
|
92
|
+
export type A_TYPES__ScopeLinkedComponents = A_Container | A_Feature | A_Entity
|
|
85
93
|
/**
|
|
86
94
|
* A list of components that are dependent on a scope and do not have their own scope
|
|
87
95
|
*/
|
|
@@ -3,16 +3,15 @@ import {
|
|
|
3
3
|
A_TYPES__A_StageStep,
|
|
4
4
|
A_TYPES__Stage_Serialized
|
|
5
5
|
} from "./A-Stage.types";
|
|
6
|
-
import { A_Context } from "
|
|
7
|
-
import { A_Feature } from "
|
|
8
|
-
import { A_Scope } from "
|
|
6
|
+
import { A_Context } from "@adaas/a-concept/a-context";
|
|
7
|
+
import type { A_Feature } from "@adaas/a-concept/a-feature";
|
|
8
|
+
import type { A_Scope } from "@adaas/a-concept/a-scope";
|
|
9
9
|
import { A_StageError } from "./A-Stage.error";
|
|
10
|
-
import { A_Error } from "
|
|
11
|
-
import { A_TypeGuards
|
|
12
|
-
import { A_TYPES__Container_Constructor } from "
|
|
13
|
-
import { A_TYPES__Component_Constructor } from "
|
|
14
|
-
import {
|
|
15
|
-
import { A_TYPES__A_DependencyInjectable } from "../A-Dependency/A-Dependency.types";
|
|
10
|
+
import { A_Error } from "@adaas/a-concept/a-error";
|
|
11
|
+
import { A_TypeGuards} from "@adaas/a-concept/helpers/A_TypeGuards.helper";
|
|
12
|
+
import type { A_TYPES__Container_Constructor } from "@adaas/a-concept/a-container";
|
|
13
|
+
import type { A_TYPES__Component_Constructor } from "@adaas/a-concept/a-component";
|
|
14
|
+
import type { A_TYPES__A_DependencyInjectable } from "@adaas/a-concept/a-dependency";
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
|
|
@@ -197,7 +196,7 @@ export class A_Stage {
|
|
|
197
196
|
*
|
|
198
197
|
* @param scope - Scope to be used to resolve the steps dependencies
|
|
199
198
|
*/
|
|
200
|
-
|
|
199
|
+
process(
|
|
201
200
|
/**
|
|
202
201
|
* Scope to be used to resolve the steps dependencies
|
|
203
202
|
*/
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A_TYPES__Component_Constructor } from "../A-Component/A-Component.types"
|
|
3
|
-
import { A_Dependency } from "../A-Dependency/A-Dependency.class"
|
|
4
|
-
import { A_Component } from "../A-Component/A-Component.class"
|
|
1
|
+
import type { A_Dependency } from "@adaas/a-concept/a-dependency"
|
|
5
2
|
|
|
6
3
|
|
|
7
4
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type {
|
|
2
|
+
A_Feature,
|
|
3
|
+
A_TYPES__FeatureDefineDecoratorTemplateItem
|
|
4
|
+
} from "@adaas/a-concept/a-feature";
|
|
5
|
+
import {
|
|
6
|
+
A_Stage,
|
|
7
|
+
A_TYPES__A_StageStep
|
|
8
|
+
} from "@adaas/a-concept/a-stage";
|
|
5
9
|
import { A_StepManagerError } from "./A-StepManager.error";
|
|
6
10
|
|
|
7
11
|
export class A_StepsManager {
|
|
@@ -2,12 +2,11 @@ import {
|
|
|
2
2
|
A_TYPES__ASEID_Constructor,
|
|
3
3
|
A_TYPES__ASEID_JSON
|
|
4
4
|
} from "./ASEID.types";
|
|
5
|
-
import { A_IdentityHelper
|
|
6
|
-
import {
|
|
7
|
-
import { A_Context } from "
|
|
8
|
-
import { ASEID_Error } from "./ASEID.error";
|
|
9
|
-
import { A_TYPES__Required } from "@adaas/a-concept/types
|
|
10
|
-
|
|
5
|
+
import { A_IdentityHelper} from "@adaas/a-concept/helpers/A_Identity.helper";
|
|
6
|
+
import { A_BasicTypeGuards} from "@adaas/a-concept/helpers/A_BasicTypeGuards.helper";
|
|
7
|
+
import { A_Context } from "@adaas/a-concept/a-context";
|
|
8
|
+
// import { ASEID_Error } from "./ASEID.error";
|
|
9
|
+
import { A_TYPES__Required } from "@adaas/a-concept/types";
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
export class ASEID {
|
|
@@ -37,12 +36,12 @@ export class ASEID {
|
|
|
37
36
|
return false;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
if (
|
|
41
|
-
throw new
|
|
39
|
+
if (A_BasicTypeGuards.isString(aseid1) && this.isASEID(aseid1) === false) {
|
|
40
|
+
throw new Error(`Invalid ASEID format provided: ${aseid1}`);
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
if (
|
|
45
|
-
throw new
|
|
43
|
+
if (A_BasicTypeGuards.isString(aseid2) && this.isASEID(aseid2) === false) {
|
|
44
|
+
throw new Error(`Invalid ASEID format provided: ${aseid2}`);
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
const aseidObj1 = aseid1 instanceof ASEID ? aseid1 : new ASEID(aseid1);
|
|
@@ -186,15 +185,14 @@ export class ASEID {
|
|
|
186
185
|
param1: string | A_TYPES__Required<Partial<A_TYPES__ASEID_Constructor>, ['id', 'entity']>
|
|
187
186
|
): (param1: any) => void | (() => void) {
|
|
188
187
|
switch (true) {
|
|
189
|
-
case
|
|
188
|
+
case A_BasicTypeGuards.isString(param1):
|
|
190
189
|
return this.fromString;
|
|
191
190
|
|
|
192
|
-
case
|
|
191
|
+
case A_BasicTypeGuards.isObject<A_TYPES__ASEID_Constructor>(param1):
|
|
193
192
|
return this.fromObject;
|
|
194
193
|
|
|
195
194
|
default:
|
|
196
|
-
throw new
|
|
197
|
-
ASEID_Error.ASEIDInitializationError,
|
|
195
|
+
throw new Error(
|
|
198
196
|
'Invalid parameters provided to ASEID constructor'
|
|
199
197
|
);
|
|
200
198
|
}
|
|
@@ -233,7 +231,7 @@ export class ASEID {
|
|
|
233
231
|
: A_Context.concept;
|
|
234
232
|
|
|
235
233
|
this._scope = param1.scope
|
|
236
|
-
?
|
|
234
|
+
? A_BasicTypeGuards.isNumber(param1.scope)
|
|
237
235
|
? A_IdentityHelper.formatWithLeadingZeros(param1.scope) :
|
|
238
236
|
ASEID.isASEID(param1.scope)
|
|
239
237
|
? new ASEID(param1.scope).id
|
|
@@ -242,7 +240,7 @@ export class ASEID {
|
|
|
242
240
|
|
|
243
241
|
this._entity = param1.entity;
|
|
244
242
|
|
|
245
|
-
this._id =
|
|
243
|
+
this._id = A_BasicTypeGuards.isNumber(param1.id)
|
|
246
244
|
? A_IdentityHelper.formatWithLeadingZeros(param1.id)
|
|
247
245
|
: param1.id;
|
|
248
246
|
|
|
@@ -285,16 +283,15 @@ export class ASEID {
|
|
|
285
283
|
|
|
286
284
|
switch (true) {
|
|
287
285
|
// 1) check for string and validate it as ASEID
|
|
288
|
-
case
|
|
289
|
-
throw new
|
|
286
|
+
case A_BasicTypeGuards.isString(param1) && !ASEID.isASEID(param1):
|
|
287
|
+
throw new Error( 'Invalid ASEID format provided')
|
|
290
288
|
|
|
291
289
|
// 2) check for object and validate required fields
|
|
292
|
-
case
|
|
293
|
-
throw new
|
|
294
|
-
|
|
290
|
+
case A_BasicTypeGuards.isObject<A_TYPES__ASEID_Constructor>(param1) && !param1.id:
|
|
291
|
+
throw new Error('ASEID id is required')
|
|
295
292
|
// 3) check for object and validate required fields
|
|
296
|
-
case
|
|
297
|
-
throw new
|
|
293
|
+
case A_BasicTypeGuards.isObject<A_TYPES__ASEID_Constructor>(param1) && !param1.entity:
|
|
294
|
+
throw new Error('ASEID entity is required')
|
|
298
295
|
|
|
299
296
|
}
|
|
300
297
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// import { A_Error } from "@adaas/a-concept/a-error";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
// export class ASEID_Error extends A_Error {
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
// static readonly ASEIDInitializationError = 'ASEID Initialization Error';
|
|
9
|
+
|
|
10
|
+
// static readonly ASEIDValidationError = 'ASEID Validation Error';
|
|
11
|
+
|
|
12
|
+
// }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A_Component } from '@adaas/a-concept/
|
|
2
|
-
import { A_Concept } from '@adaas/a-concept/
|
|
3
|
-
import { A_Container } from '@adaas/a-concept/
|
|
4
|
-
import { A_Context } from '@adaas/a-concept/
|
|
5
|
-
import { A_Inject } from '@adaas/a-concept/
|
|
6
|
-
import { A_Feature } from '@adaas/a-concept/
|
|
1
|
+
import { A_Component } from '@adaas/a-concept/a-component';
|
|
2
|
+
import { A_Concept } from '@adaas/a-concept/a-concept';
|
|
3
|
+
import { A_Container } from '@adaas/a-concept/a-container';
|
|
4
|
+
import { A_Context } from '@adaas/a-concept/a-context';
|
|
5
|
+
import { A_Inject } from '@adaas/a-concept/a-inject';
|
|
6
|
+
import { A_Feature } from '@adaas/a-concept/a-feature';
|
|
7
7
|
|
|
8
8
|
jest.retryTimes(0);
|
|
9
9
|
|
package/tests/A-Common.test.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { A_TypeGuards} from "@adaas/a-concept/helpers/A_TypeGuards.helper";
|
|
2
|
+
import { A_FormatterHelper} from "@adaas/a-concept/helpers/A_Formatter.helper";
|
|
3
|
+
import { A_CommonHelper} from "@adaas/a-concept/helpers/A_Common.helper";
|
|
4
|
+
import { A_IdentityHelper} from "@adaas/a-concept/helpers/A_Identity.helper";
|
|
5
|
+
import { A_BasicTypeGuards} from "@adaas/a-concept/helpers/A_BasicTypeGuards.helper";
|
|
6
|
+
import { A_TYPES__DeepPartial } from "@adaas/a-concept/types";
|
|
5
7
|
jest.retryTimes(0);
|
|
6
8
|
|
|
7
9
|
describe('A-Common Tests', () => {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { A_Inject } from '@adaas/a-concept/
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { A_Inject } from '@adaas/a-concept/a-inject';
|
|
2
|
+
import {
|
|
3
|
+
A_Component,
|
|
4
|
+
A_TYPES__ComponentMetaKey
|
|
5
|
+
} from "@adaas/a-concept/a-component";
|
|
6
|
+
import { A_Context } from '@adaas/a-concept/a-context';
|
|
7
|
+
import { A_Concept } from '@adaas/a-concept/a-concept';
|
|
6
8
|
|
|
7
9
|
jest.retryTimes(0);
|
|
8
10
|
|
package/tests/A-Concept.test.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { A_Caller } from '@adaas/a-concept/
|
|
2
|
-
import { A_Component } from "@adaas/a-concept/
|
|
3
|
-
import { A_Concept } from "@adaas/a-concept/
|
|
4
|
-
import { A_Container } from "@adaas/a-concept/
|
|
5
|
-
import { A_Context } from "@adaas/a-concept/
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { A_Caller } from '@adaas/a-concept/a-caller';
|
|
2
|
+
import { A_Component } from "@adaas/a-concept/a-component";
|
|
3
|
+
import { A_Concept } from "@adaas/a-concept/a-concept";
|
|
4
|
+
import { A_Container } from "@adaas/a-concept/a-container";
|
|
5
|
+
import { A_Context } from "@adaas/a-concept/a-context";
|
|
6
|
+
import {
|
|
7
|
+
A_Entity,
|
|
8
|
+
A_TYPES__EntityFeatures
|
|
9
|
+
} from "@adaas/a-concept/a-entity";
|
|
10
|
+
import { A_Fragment } from "@adaas/a-concept/a-fragment";
|
|
11
|
+
import { A_Inject } from '@adaas/a-concept/a-inject';
|
|
12
|
+
import { A_Scope } from "@adaas/a-concept/a-scope";
|
|
13
|
+
import { A_Feature } from '@adaas/a-concept/a-feature';
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
jest.retryTimes(0);
|