@adaas/a-concept 0.2.14 → 0.3.1
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 +4166 -212
- package/dist/browser/index.mjs +2 -67
- package/dist/browser/index.mjs.map +1 -1
- package/dist/node/index.cjs +5757 -383
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.mts +4193 -212
- package/dist/node/index.d.ts +4193 -212
- package/dist/node/index.mjs +5699 -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 +20 -1
- 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 +41 -33
- 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/{global → lib}/A-Dependency/A-Dependency-Require.decorator.ts +11 -9
- package/src/{global → lib}/A-Dependency/A-Dependency.class.ts +9 -3
- package/src/{global → lib}/A-Dependency/A-Dependency.error.ts +1 -1
- package/src/{global → lib}/A-Dependency/A-Dependency.types.ts +9 -9
- package/src/lib/A-Dependency/index.ts +17 -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 +34 -24
- package/src/{global → lib}/A-Scope/A-Scope.error.ts +1 -1
- package/src/{global → lib}/A-Scope/A-Scope.types.ts +22 -14
- 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 +6 -1
- package/tests/A-Entity.test.ts +7 -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
package/tests/jest.setup.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { A_Context } from '@adaas/a-concept/
|
|
2
|
-
import fs from 'fs';
|
|
1
|
+
// import { A_Context } from '@adaas/a-concept/a-context';
|
|
2
|
+
// import fs from 'fs';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
beforeAll(async () => {
|
|
4
|
+
// /**
|
|
5
|
+
// * Base hooks for tests
|
|
6
|
+
// */
|
|
7
|
+
// beforeAll(async () => {
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
});
|
|
9
|
+
// return Promise.resolve();
|
|
10
|
+
// });
|
|
11
11
|
|
|
12
|
-
afterAll(async () => {
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
// afterAll(async () => {
|
|
13
|
+
// try {
|
|
14
|
+
// fs.unlinkSync('a-concept.conf.json');
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// } catch (error) {
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
18
|
+
// }
|
|
19
|
+
// return Promise.resolve();
|
|
20
|
+
// });
|
|
21
21
|
|
|
22
|
-
beforeEach(async () => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
22
|
+
// beforeEach(async () => {
|
|
23
|
+
// A_Context.reset();
|
|
24
|
+
// return Promise.resolve();
|
|
25
|
+
// });
|
|
26
26
|
|
|
27
|
-
afterEach(async () => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
27
|
+
// afterEach(async () => {
|
|
28
|
+
// A_Context.reset();
|
|
29
|
+
// return Promise.resolve();
|
|
30
|
+
// });
|
package/tsconfig.json
CHANGED
|
@@ -1,99 +1,61 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Internal aliases (DEV ONLY)
|
|
62
|
-
=============================== */
|
|
63
|
-
"baseUrl": ".",
|
|
64
|
-
"paths": {
|
|
65
|
-
"@adaas/a-concept/constants/*": ["src/constants/*"],
|
|
66
|
-
"@adaas/a-concept/global/*": ["src/global/*"],
|
|
67
|
-
"@adaas/a-concept/types/*": ["src/types/*"],
|
|
68
|
-
"@adaas/a-concept/helpers/*": ["src/helpers/*"],
|
|
69
|
-
"@adaas/a-concept/decorators/*": ["src/decorators/*"],
|
|
70
|
-
"@adaas/a-concept/utils/*": ["src/utils/*"],
|
|
71
|
-
|
|
72
|
-
/* DEV-only override to utils source */
|
|
73
|
-
"@adaas/a-concept/env": ["src/env/index.node.ts"],
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
/* ===============================
|
|
77
|
-
Types
|
|
78
|
-
=============================== */
|
|
79
|
-
"types": [
|
|
80
|
-
"node",
|
|
81
|
-
"jest",
|
|
82
|
-
"mocha",
|
|
83
|
-
],
|
|
84
|
-
"typeRoots": ["node_modules/@types"]
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
"include": [
|
|
88
|
-
"src/**/*",
|
|
89
|
-
"tests/**/*",
|
|
90
|
-
"examples/**/*.ts",
|
|
91
|
-
"src/index.ts",
|
|
92
|
-
"src/env/global.browser.d.ts"
|
|
93
|
-
],
|
|
94
|
-
|
|
95
|
-
"exclude": [
|
|
96
|
-
"node_modules",
|
|
97
|
-
"dist",
|
|
98
|
-
]
|
|
2
|
+
"extends": "./.conf/tsconfig.base.json",
|
|
3
|
+
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"rootDir": "./",
|
|
6
|
+
"baseUrl": ".",
|
|
7
|
+
/* ===============================
|
|
8
|
+
Internal aliases (DEV ONLY)
|
|
9
|
+
=============================== */
|
|
10
|
+
"paths": {
|
|
11
|
+
"@adaas/a-concept/constants/*": ["src/constants/*"],
|
|
12
|
+
"@adaas/a-concept/utils/*": ["src/utils/*"],
|
|
13
|
+
"@adaas/a-concept/helpers/*": ["src/helpers/*"],
|
|
14
|
+
"@adaas/a-concept/types": ["src/types"],
|
|
15
|
+
"@adaas/a-concept/env": ["src/env/index.node.ts"],
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
"@adaas/a-concept/a-abstraction": ["src/lib/A-Abstraction"],
|
|
19
|
+
"@adaas/a-concept/a-caller": ["src/lib/A-Caller"],
|
|
20
|
+
"@adaas/a-concept/a-component": ["src/lib/A-Component"],
|
|
21
|
+
"@adaas/a-concept/a-concept": ["src/lib/A-Concept"],
|
|
22
|
+
"@adaas/a-concept/a-container": ["src/lib/A-Container"],
|
|
23
|
+
"@adaas/a-concept/a-context": ["src/lib/A-Context"],
|
|
24
|
+
"@adaas/a-concept/a-dependency": ["src/lib/A-Dependency"],
|
|
25
|
+
"@adaas/a-concept/a-entity": ["src/lib/A-Entity"],
|
|
26
|
+
"@adaas/a-concept/a-error": ["src/lib/A-Error"],
|
|
27
|
+
"@adaas/a-concept/a-feature": ["src/lib/A-Feature"],
|
|
28
|
+
"@adaas/a-concept/a-fragment": ["src/lib/A-Fragment"],
|
|
29
|
+
"@adaas/a-concept/a-inject": ["src/lib/A-Inject"],
|
|
30
|
+
"@adaas/a-concept/a-meta": ["src/lib/A-Meta"],
|
|
31
|
+
"@adaas/a-concept/a-scope": ["src/lib/A-Scope"],
|
|
32
|
+
"@adaas/a-concept/a-stage": ["src/lib/A-Stage"],
|
|
33
|
+
"@adaas/a-concept/a-step-manager": ["src/lib/A-StepManager"],
|
|
34
|
+
"@adaas/a-concept/aseid": ["src/lib/ASEID"],
|
|
35
|
+
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
/* ===============================
|
|
39
|
+
Types
|
|
40
|
+
=============================== */
|
|
41
|
+
"types": [
|
|
42
|
+
"node",
|
|
43
|
+
"jest",
|
|
44
|
+
"mocha",
|
|
45
|
+
],
|
|
46
|
+
"typeRoots": ["node_modules/@types"]
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
"include": [
|
|
50
|
+
"src/**/*",
|
|
51
|
+
"tests/**/*",
|
|
52
|
+
"examples/**/*.ts",
|
|
53
|
+
"src/index.ts",
|
|
54
|
+
"src/env/global.browser.d.ts"
|
|
55
|
+
],
|
|
56
|
+
|
|
57
|
+
"exclude": [
|
|
58
|
+
"node_modules",
|
|
59
|
+
"dist",
|
|
60
|
+
]
|
|
99
61
|
}
|
package/tsup.config.ts
CHANGED
|
@@ -18,15 +18,14 @@ export default defineConfig([
|
|
|
18
18
|
entry: {
|
|
19
19
|
// Public library entry
|
|
20
20
|
index: "src/index.ts",
|
|
21
|
-
|
|
22
|
-
// Public env entry (browser implementation)
|
|
23
|
-
env: "src/env/index.browser.ts",
|
|
24
21
|
},
|
|
25
22
|
|
|
23
|
+
tsconfig: "./.conf/tsconfig.browser.json", // Separate tsconfig for browser build
|
|
24
|
+
|
|
26
25
|
// Output directory for browser bundle
|
|
27
26
|
outDir: "dist/browser",
|
|
28
27
|
|
|
29
|
-
bundle:
|
|
28
|
+
bundle: true, // Bundle for browser consumption
|
|
30
29
|
|
|
31
30
|
// Browser consumers expect ESM
|
|
32
31
|
format: ["esm"],
|
|
@@ -46,11 +45,14 @@ export default defineConfig([
|
|
|
46
45
|
// Emit .d.ts files
|
|
47
46
|
dts: true,
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
minify: true, // Minify browser build for smaller size
|
|
49
|
+
|
|
50
|
+
// Ensure .mjs extension for ESM output
|
|
51
|
+
outExtension({ format }) {
|
|
52
|
+
return {
|
|
53
|
+
js: ".mjs"
|
|
54
|
+
};
|
|
55
|
+
}
|
|
54
56
|
},
|
|
55
57
|
|
|
56
58
|
/**
|
|
@@ -71,15 +73,16 @@ export default defineConfig([
|
|
|
71
73
|
entry: {
|
|
72
74
|
// Same public API as browser
|
|
73
75
|
index: "src/index.ts",
|
|
74
|
-
|
|
75
|
-
// Node-specific env implementation
|
|
76
|
-
env: "src/env/index.node.ts",
|
|
77
76
|
},
|
|
78
77
|
|
|
78
|
+
tsconfig: "./.conf/tsconfig.node.json", // Separate tsconfig for node build
|
|
79
|
+
|
|
80
|
+
splitting: true, // Disable code splitting for Node build
|
|
81
|
+
|
|
79
82
|
// Output directory for node bundle
|
|
80
83
|
outDir: "dist/node",
|
|
81
84
|
|
|
82
|
-
bundle:
|
|
85
|
+
bundle: true, // Don't bundle node build, keep imports as-is
|
|
83
86
|
|
|
84
87
|
// Support both module systems
|
|
85
88
|
format: ["esm", "cjs"],
|
|
@@ -96,6 +99,8 @@ export default defineConfig([
|
|
|
96
99
|
// Emit .d.ts files (shared shape)
|
|
97
100
|
dts: true,
|
|
98
101
|
|
|
102
|
+
minify: false, // Don't minify Node build for better readability
|
|
103
|
+
|
|
99
104
|
// Ensure .cjs extension for CommonJS output
|
|
100
105
|
outExtension({ format }) {
|
|
101
106
|
return {
|