@xrystal/core 3.18.8 → 3.19.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/package.json
CHANGED
|
@@ -8,6 +8,13 @@ export default class ConfigsService {
|
|
|
8
8
|
#systemService;
|
|
9
9
|
constructor({ systemService }) {
|
|
10
10
|
this.#systemService = systemService;
|
|
11
|
+
return new Proxy(this, {
|
|
12
|
+
get: (target, prop) => {
|
|
13
|
+
if (prop in target)
|
|
14
|
+
return target[prop];
|
|
15
|
+
return target.config[prop];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
11
18
|
}
|
|
12
19
|
load = async ({}) => {
|
|
13
20
|
const cwd = process.cwd();
|
|
@@ -62,6 +69,9 @@ export default class ConfigsService {
|
|
|
62
69
|
};
|
|
63
70
|
this.config = Object.freeze(mergedData);
|
|
64
71
|
}
|
|
72
|
+
_(key) {
|
|
73
|
+
return this.config[key];
|
|
74
|
+
}
|
|
65
75
|
get all() {
|
|
66
76
|
return this.config;
|
|
67
77
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LifetimeType } from 'awilix';
|
|
2
|
-
declare class X {
|
|
2
|
+
declare class X<T = {}> {
|
|
3
3
|
private container;
|
|
4
4
|
private initializedNames;
|
|
5
5
|
constructor();
|
|
@@ -23,5 +23,5 @@ declare class X {
|
|
|
23
23
|
get cradle(): any;
|
|
24
24
|
private isRegistered;
|
|
25
25
|
}
|
|
26
|
-
declare const _default: X
|
|
26
|
+
declare const _default: X<{}>;
|
|
27
27
|
export default _default;
|