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