@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Concept.types.js","sourceRoot":"","sources":["../../../../src/global/A-Concept/A-Concept.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { A_Scope } from "../A-Scope/A-Scope.class";
|
|
2
|
-
import { A_TYPES__Container_Init } from "./A-Container.types";
|
|
3
|
-
export declare class A_Container {
|
|
4
|
-
/**
|
|
5
|
-
* Configuration of the container that will be used to run it.
|
|
6
|
-
*/
|
|
7
|
-
protected readonly config: Partial<A_TYPES__Container_Init>;
|
|
8
|
-
/**
|
|
9
|
-
* Name of the container
|
|
10
|
-
*/
|
|
11
|
-
get name(): string;
|
|
12
|
-
/**
|
|
13
|
-
* Returns the scope where the container is registered
|
|
14
|
-
*/
|
|
15
|
-
get scope(): A_Scope;
|
|
16
|
-
/**
|
|
17
|
-
* This class should combine Components to achieve the goal withing Concept
|
|
18
|
-
*
|
|
19
|
-
* Container is a direct container that should be "run" to make Concept work.
|
|
20
|
-
* So because of that Container can be:
|
|
21
|
-
* - HTTP Server
|
|
22
|
-
* - BASH Script
|
|
23
|
-
* - Database Connection
|
|
24
|
-
* - Microservice
|
|
25
|
-
* - etc.
|
|
26
|
-
*
|
|
27
|
-
* @param config - Configuration of the container that will be used to run it.
|
|
28
|
-
*/
|
|
29
|
-
constructor(
|
|
30
|
-
/**
|
|
31
|
-
* Configuration of the container that will be used to run it.
|
|
32
|
-
*/
|
|
33
|
-
config?: Partial<A_TYPES__Container_Init>);
|
|
34
|
-
/**
|
|
35
|
-
* Calls the feature with the given name in the given scope
|
|
36
|
-
*
|
|
37
|
-
* [!] Note: This method creates a new instance of the feature every time it is called
|
|
38
|
-
*
|
|
39
|
-
* @param feature - the name of the feature to call
|
|
40
|
-
* @param scope - the scope in which to call the feature
|
|
41
|
-
* @returns - void
|
|
42
|
-
*/
|
|
43
|
-
call(
|
|
44
|
-
/**
|
|
45
|
-
* Name of the feature to call
|
|
46
|
-
*/
|
|
47
|
-
feature: string,
|
|
48
|
-
/**
|
|
49
|
-
* scope in which the feature will be executed
|
|
50
|
-
*/
|
|
51
|
-
scope?: A_Scope): Promise<void>;
|
|
52
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.A_Container = void 0;
|
|
13
|
-
const A_Context_class_1 = require("../A-Context/A-Context.class");
|
|
14
|
-
const A_Feature_class_1 = require("../A-Feature/A-Feature.class");
|
|
15
|
-
class A_Container {
|
|
16
|
-
/**
|
|
17
|
-
* Name of the container
|
|
18
|
-
*/
|
|
19
|
-
get name() {
|
|
20
|
-
var _a;
|
|
21
|
-
return ((_a = this.config) === null || _a === void 0 ? void 0 : _a.name) || this.constructor.name;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Returns the scope where the container is registered
|
|
25
|
-
*/
|
|
26
|
-
get scope() {
|
|
27
|
-
return A_Context_class_1.A_Context.scope(this);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* This class should combine Components to achieve the goal withing Concept
|
|
31
|
-
*
|
|
32
|
-
* Container is a direct container that should be "run" to make Concept work.
|
|
33
|
-
* So because of that Container can be:
|
|
34
|
-
* - HTTP Server
|
|
35
|
-
* - BASH Script
|
|
36
|
-
* - Database Connection
|
|
37
|
-
* - Microservice
|
|
38
|
-
* - etc.
|
|
39
|
-
*
|
|
40
|
-
* @param config - Configuration of the container that will be used to run it.
|
|
41
|
-
*/
|
|
42
|
-
constructor(
|
|
43
|
-
/**
|
|
44
|
-
* Configuration of the container that will be used to run it.
|
|
45
|
-
*/
|
|
46
|
-
config = {}) {
|
|
47
|
-
this.config = config;
|
|
48
|
-
A_Context_class_1.A_Context.allocate(this, this.config);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Calls the feature with the given name in the given scope
|
|
52
|
-
*
|
|
53
|
-
* [!] Note: This method creates a new instance of the feature every time it is called
|
|
54
|
-
*
|
|
55
|
-
* @param feature - the name of the feature to call
|
|
56
|
-
* @param scope - the scope in which to call the feature
|
|
57
|
-
* @returns - void
|
|
58
|
-
*/
|
|
59
|
-
call(
|
|
60
|
-
/**
|
|
61
|
-
* Name of the feature to call
|
|
62
|
-
*/
|
|
63
|
-
feature,
|
|
64
|
-
/**
|
|
65
|
-
* scope in which the feature will be executed
|
|
66
|
-
*/
|
|
67
|
-
scope) {
|
|
68
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
const newFeature = new A_Feature_class_1.A_Feature({
|
|
70
|
-
name: feature,
|
|
71
|
-
component: this
|
|
72
|
-
});
|
|
73
|
-
return yield newFeature.process(scope);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.A_Container = A_Container;
|
|
78
|
-
//# sourceMappingURL=A-Container.class.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Container.class.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kEAAyD;AACzD,kEAAyD;AAMzD,MAAa,WAAW;IAMpB;;OAEG;IACH,IAAI,IAAI;;QACJ,OAAO,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,IAAI,KAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACtD,CAAC;IACD;;OAEG;IACH,IAAI,KAAK;QACL,OAAO,2BAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAGD;;;;;;;;;;;;OAYG;IACH;IACI;;OAEG;IACH,SAA2C,EAAE;QAE7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,2BAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAGD;;;;;;;;OAQG;IACG,IAAI;IACN;;OAEG;IACH,OAAe;IACf;;OAEG;IACH,KAAe;;YAEf,MAAM,UAAU,GAAG,IAAI,2BAAS,CAAC;gBAC7B,IAAI,EAAE,OAAO;gBACb,SAAS,EAAE,IAAI;aAClB,CAAC,CAAC;YAEH,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;KAAA;CACJ;AAvED,kCAuEC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.A_TYPES__ContainerMetaKey = void 0;
|
|
4
|
-
var A_TYPES__ContainerMetaKey;
|
|
5
|
-
(function (A_TYPES__ContainerMetaKey) {
|
|
6
|
-
A_TYPES__ContainerMetaKey["FEATURES"] = "a-container-features";
|
|
7
|
-
A_TYPES__ContainerMetaKey["INJECTIONS"] = "a-container-injections";
|
|
8
|
-
A_TYPES__ContainerMetaKey["ABSTRACTIONS"] = "a-container-abstractions";
|
|
9
|
-
A_TYPES__ContainerMetaKey["EXTENSIONS"] = "a-container-extensions";
|
|
10
|
-
})(A_TYPES__ContainerMetaKey || (exports.A_TYPES__ContainerMetaKey = A_TYPES__ContainerMetaKey = {}));
|
|
11
|
-
//# sourceMappingURL=A-Container.constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Container.constants.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACjC,8DAAiC,CAAA;IACjC,kEAAqC,CAAA;IACrC,sEAAyC,CAAA;IACzC,kEAAsC,CAAA;AAC1C,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { A_TYPES__ContainerMeta, A_TYPES__ContainerMetaExtension } from "./A-Container.types";
|
|
2
|
-
import { A_TYPES__A_InjectDecorator_Meta } from "../A-Inject/A-Inject.types";
|
|
3
|
-
import { A_TYPES__ConceptAbstractionMeta } from "../A-Concept/A-Concept.types";
|
|
4
|
-
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
5
|
-
import { A_TYPES__FeatureDefineDecoratorMeta } from "../A-Feature/A-Feature.types";
|
|
6
|
-
import { A_TYPES__ConceptAbstractions } from "../A-Concept/A-Concept.constants";
|
|
7
|
-
export declare class A_ContainerMeta extends A_Meta<A_TYPES__ContainerMeta> {
|
|
8
|
-
/**
|
|
9
|
-
* Allows to get all the injections for a given handler
|
|
10
|
-
*
|
|
11
|
-
* @param handler
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
injections(handler: string): A_TYPES__A_InjectDecorator_Meta;
|
|
15
|
-
/**
|
|
16
|
-
* Returns all features defined in the Container
|
|
17
|
-
*
|
|
18
|
-
* @returns
|
|
19
|
-
*/
|
|
20
|
-
features(): Array<A_TYPES__FeatureDefineDecoratorMeta>;
|
|
21
|
-
/**
|
|
22
|
-
* Returns a set of instructions to run proper methods in Container during A-Concept Stage
|
|
23
|
-
*
|
|
24
|
-
* @param stage
|
|
25
|
-
* @returns
|
|
26
|
-
*/
|
|
27
|
-
abstractions(abstraction: A_TYPES__ConceptAbstractions): A_TYPES__ConceptAbstractionMeta[];
|
|
28
|
-
/**
|
|
29
|
-
* Allows to get all the extensions for a given feature
|
|
30
|
-
*
|
|
31
|
-
* @param feature
|
|
32
|
-
* @returns
|
|
33
|
-
*/
|
|
34
|
-
extensions(feature: string): A_TYPES__ContainerMetaExtension[];
|
|
35
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.A_ContainerMeta = void 0;
|
|
4
|
-
const A_Meta_class_1 = require("../A-Meta/A-Meta.class");
|
|
5
|
-
const A_Container_constants_1 = require("./A-Container.constants");
|
|
6
|
-
class A_ContainerMeta extends A_Meta_class_1.A_Meta {
|
|
7
|
-
/**
|
|
8
|
-
* Allows to get all the injections for a given handler
|
|
9
|
-
*
|
|
10
|
-
* @param handler
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
injections(handler) {
|
|
14
|
-
const injections = this.get(A_Container_constants_1.A_TYPES__ContainerMetaKey.INJECTIONS);
|
|
15
|
-
const args = (injections === null || injections === void 0 ? void 0 : injections.get(handler)) || [];
|
|
16
|
-
return args;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Returns all features defined in the Container
|
|
20
|
-
*
|
|
21
|
-
* @returns
|
|
22
|
-
*/
|
|
23
|
-
features() {
|
|
24
|
-
const features = this.get(A_Container_constants_1.A_TYPES__ContainerMetaKey.FEATURES);
|
|
25
|
-
return (features === null || features === void 0 ? void 0 : features.toArray().map(([, feature]) => feature)) || [];
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Returns a set of instructions to run proper methods in Container during A-Concept Stage
|
|
29
|
-
*
|
|
30
|
-
* @param stage
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
abstractions(abstraction) {
|
|
34
|
-
const steps = [];
|
|
35
|
-
const abstractions = this.get(A_Container_constants_1.A_TYPES__ContainerMetaKey.ABSTRACTIONS);
|
|
36
|
-
const injections = this.get(A_Container_constants_1.A_TYPES__ContainerMetaKey.INJECTIONS);
|
|
37
|
-
abstractions === null || abstractions === void 0 ? void 0 : abstractions
|
|
38
|
-
// returns all extensions that match the feature
|
|
39
|
-
.find(`CONCEPT_ABSTRACTION::${abstraction}`).forEach(([handler, extensions]) => {
|
|
40
|
-
extensions.forEach(extension => {
|
|
41
|
-
const args = (injections === null || injections === void 0 ? void 0 : injections.get(extension.handler)) || [];
|
|
42
|
-
steps.push({
|
|
43
|
-
name: extension.name,
|
|
44
|
-
handler: extension.handler,
|
|
45
|
-
args,
|
|
46
|
-
before: extension.before,
|
|
47
|
-
behavior: extension.behavior,
|
|
48
|
-
after: extension.after,
|
|
49
|
-
throwOnError: extension.throwOnError,
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
return steps;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Allows to get all the extensions for a given feature
|
|
57
|
-
*
|
|
58
|
-
* @param feature
|
|
59
|
-
* @returns
|
|
60
|
-
*/
|
|
61
|
-
extensions(feature) {
|
|
62
|
-
const steps = [];
|
|
63
|
-
const extensions = this.get(A_Container_constants_1.A_TYPES__ContainerMetaKey.EXTENSIONS);
|
|
64
|
-
extensions === null || extensions === void 0 ? void 0 : extensions
|
|
65
|
-
// returns all extensions that match the feature
|
|
66
|
-
.find(feature).forEach(([handler, extensions]) => {
|
|
67
|
-
extensions.forEach(extension => {
|
|
68
|
-
steps.push({
|
|
69
|
-
// component: constructor,
|
|
70
|
-
name: extension.name,
|
|
71
|
-
handler: extension.handler,
|
|
72
|
-
behavior: extension.behavior,
|
|
73
|
-
before: extension.before || [],
|
|
74
|
-
after: extension.after || [],
|
|
75
|
-
throwOnError: extension.throwOnError || true,
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
return steps;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.A_ContainerMeta = A_ContainerMeta;
|
|
83
|
-
//# sourceMappingURL=A-Container.meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Container.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.meta.ts"],"names":[],"mappings":";;;AAGA,yDAAgD;AAChD,mEAAoE;AAMpE,MAAa,eAAgB,SAAQ,qBAA8B;IAI/D;;;;;OAKG;IACH,UAAU,CACN,OAAe;QAEf,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,iDAAyB,CAAC,UAAU,CAAC,CAAC;QAElE,MAAM,IAAI,GAAG,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,GAAG,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;QAE5C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,QAAQ;QAEJ,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,iDAAyB,CAAC,QAAQ,CAAC,CAAC;QAE9D,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;IAED;;;;;OAKG;IACH,YAAY,CACR,WAAyC;QAEzC,MAAM,KAAK,GAAsC,EAAE,CAAC;QAEpD,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,iDAAyB,CAAC,YAAY,CAAC,CAAC;QACtE,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,iDAAyB,CAAC,UAAU,CAAC,CAAC;QAElE,YAAY,aAAZ,YAAY,uBAAZ,YAAY;QACR,gDAAgD;SAC9C,IAAI,CAAC,wBAAwB,WAAW,EAAE,EAC3C,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE;YAC/B,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBAC3B,MAAM,IAAI,GAAG,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;gBAEtD,KAAK,CAAC,IAAI,CAAC;oBACP,IAAI,EAAE,SAAS,CAAC,IAAI;oBACpB,OAAO,EAAE,SAAS,CAAC,OAAO;oBAC1B,IAAI;oBACJ,MAAM,EAAE,SAAS,CAAC,MAAM;oBACxB,QAAQ,EAAE,SAAS,CAAC,QAAQ;oBAC5B,KAAK,EAAE,SAAS,CAAC,KAAK;oBACtB,YAAY,EAAE,SAAS,CAAC,YAAY;iBACvC,CAAC,CAAC;YAEP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAGP,OAAO,KAAK,CAAC;IACjB,CAAC;IAGD;;;;;OAKG;IACH,UAAU,CACN,OAAe;QAEf,MAAM,KAAK,GAAsC,EAAE,CAAC;QAEpD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,iDAAyB,CAAC,UAAU,CAAC,CAAC;QAElE,UAAU,aAAV,UAAU,uBAAV,UAAU;QACN,gDAAgD;SAC9C,IAAI,CAAC,OAAO,EACb,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE;YAC/B,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBAC3B,KAAK,CAAC,IAAI,CAAC;oBACP,0BAA0B;oBAC1B,IAAI,EAAE,SAAS,CAAC,IAAI;oBACpB,OAAO,EAAE,SAAS,CAAC,OAAO;oBAC1B,QAAQ,EAAE,SAAS,CAAC,QAAQ;oBAC5B,MAAM,EAAE,SAAS,CAAC,MAAM,IAAI,EAAE;oBAC9B,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,EAAE;oBAC5B,YAAY,EAAE,SAAS,CAAC,YAAY,IAAI,IAAI;iBAC/C,CAAC,CAAC;YAEP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAGP,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ;AA5GD,0CA4GC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { A_TYPES__A_InjectDecorator_Meta } from "../A-Inject/A-Inject.types";
|
|
2
|
-
import { A_TYPES__ConceptAbstraction } from "../A-Concept/A-Concept.types";
|
|
3
|
-
import { A_Meta } from "../A-Meta/A-Meta.class";
|
|
4
|
-
import { A_TYPES__Scope_Init } from "../A-Scope/A-Scope.types";
|
|
5
|
-
import { A_TYPES__ContainerMetaKey } from "./A-Container.constants";
|
|
6
|
-
import { A_Container } from "./A-Container.class";
|
|
7
|
-
import { A_TYPES__FeatureDefineDecoratorMeta, A_TYPES__FeatureExtendDecoratorMeta } from "../A-Feature/A-Feature.types";
|
|
8
|
-
/**
|
|
9
|
-
* Container constructor type
|
|
10
|
-
* Uses the generic type T to specify the type of the container
|
|
11
|
-
*/
|
|
12
|
-
export type A_TYPES__Container_Constructor<T = A_Container> = new (...args: any[]) => T;
|
|
13
|
-
/**
|
|
14
|
-
* Container initialization type
|
|
15
|
-
*/
|
|
16
|
-
export type A_TYPES__Container_Init = {
|
|
17
|
-
/**
|
|
18
|
-
* The extra name for the container (optional)
|
|
19
|
-
*/
|
|
20
|
-
name?: string;
|
|
21
|
-
} & A_TYPES__Scope_Init;
|
|
22
|
-
/**
|
|
23
|
-
* Container serialized type
|
|
24
|
-
*/
|
|
25
|
-
export type A_TYPES__Container_Serialized = {
|
|
26
|
-
/**
|
|
27
|
-
* The ASEID of the container
|
|
28
|
-
*/
|
|
29
|
-
aseid: string;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Meta information stored in each Container
|
|
33
|
-
*/
|
|
34
|
-
export type A_TYPES__ContainerMeta = {
|
|
35
|
-
/**
|
|
36
|
-
* Extensions applied to the component per handler
|
|
37
|
-
*/
|
|
38
|
-
[A_TYPES__ContainerMetaKey.EXTENSIONS]: A_Meta<{
|
|
39
|
-
/**
|
|
40
|
-
* Where Key the regexp for what to apply the extension
|
|
41
|
-
* A set of container names or a wildcard, or a regexp
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* Where value is the extension instructions
|
|
45
|
-
*/
|
|
46
|
-
[Key: string]: A_TYPES__FeatureExtendDecoratorMeta[];
|
|
47
|
-
}>;
|
|
48
|
-
[A_TYPES__ContainerMetaKey.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
|
-
[A_TYPES__ContainerMetaKey.ABSTRACTIONS]: A_Meta<{
|
|
57
|
-
/**
|
|
58
|
-
* Where Key the regexp for what to apply the extension
|
|
59
|
-
* A set of container names or a wildcard, or a regexp
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* Where value is the extension instructions
|
|
63
|
-
*/
|
|
64
|
-
[Key: string]: A_TYPES__ConceptAbstraction[];
|
|
65
|
-
}>;
|
|
66
|
-
[A_TYPES__ContainerMetaKey.INJECTIONS]: A_Meta<{
|
|
67
|
-
/**
|
|
68
|
-
* Where Key is the name of the injection
|
|
69
|
-
*
|
|
70
|
-
* Where value is the list of injections
|
|
71
|
-
*/
|
|
72
|
-
[Key: string]: A_TYPES__A_InjectDecorator_Meta;
|
|
73
|
-
}>;
|
|
74
|
-
};
|
|
75
|
-
export type A_TYPES__ContainerMetaExtension = A_TYPES__FeatureExtendDecoratorMeta;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A-Container.types.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.types.ts"],"names":[],"mappings":";;AAIA,mEAAoE"}
|