@xrystal/core 3.22.2 → 3.22.3
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 +1 -1
- package/source/loader/configs/index.d.ts +2 -2
- package/source/loader/configs/index.js +5 -5
- package/source/loader/controller/index.d.ts +1 -1
- package/source/loader/controller/index.js +1 -1
- package/source/loader/service/index.d.ts +1 -1
- package/source/loader/service/index.js +1 -1
package/package.json
CHANGED
|
@@ -34,8 +34,8 @@ export default class Configs implements IProvide<any> {
|
|
|
34
34
|
#private;
|
|
35
35
|
readonly publicFolderName: string;
|
|
36
36
|
readonly kafkaLogsTopic: string;
|
|
37
|
-
constructor({
|
|
38
|
-
|
|
37
|
+
constructor({ system }: {
|
|
38
|
+
system: System;
|
|
39
39
|
});
|
|
40
40
|
onInit: ({}: {}) => Promise<void>;
|
|
41
41
|
private initializeKafkaInfrastructure;
|
|
@@ -6,10 +6,10 @@ import { Constants } from '../../utils';
|
|
|
6
6
|
export default class Configs {
|
|
7
7
|
publicFolderName = Constants.publicFolderName;
|
|
8
8
|
kafkaLogsTopic = Constants.kafkaLogsTopic;
|
|
9
|
-
#
|
|
9
|
+
#system;
|
|
10
10
|
#config;
|
|
11
|
-
constructor({
|
|
12
|
-
this.#
|
|
11
|
+
constructor({ system }) {
|
|
12
|
+
this.#system = system;
|
|
13
13
|
const proxy = new Proxy(this, {
|
|
14
14
|
get: (target, prop) => {
|
|
15
15
|
return target[prop] || target.config?.[prop];
|
|
@@ -19,7 +19,7 @@ export default class Configs {
|
|
|
19
19
|
}
|
|
20
20
|
onInit = async ({}) => {
|
|
21
21
|
const cwd = process.cwd();
|
|
22
|
-
const tmp = this.#
|
|
22
|
+
const tmp = this.#system.tmp;
|
|
23
23
|
const extendConfigs = tmp.configs.loaders.configs.loadPath;
|
|
24
24
|
const fullPath = extendConfigs.startsWith('@/')
|
|
25
25
|
? path.join(process.cwd(), extendConfigs.slice(2))
|
|
@@ -76,7 +76,7 @@ export default class Configs {
|
|
|
76
76
|
...this.#config.kafkaTopics
|
|
77
77
|
])
|
|
78
78
|
],
|
|
79
|
-
serviceName: this.#
|
|
79
|
+
serviceName: this.#system.tmp.configs.service
|
|
80
80
|
};
|
|
81
81
|
if (isKafkaPassive === true || !kafkaBrokers)
|
|
82
82
|
return;
|
|
@@ -47,7 +47,7 @@ export declare abstract class BaseController {
|
|
|
47
47
|
protected get res(): CustomResponse;
|
|
48
48
|
}
|
|
49
49
|
export default abstract class Controller extends BaseController implements IProvide<any> {
|
|
50
|
-
constructor(
|
|
50
|
+
constructor();
|
|
51
51
|
onInit(): Promise<void>;
|
|
52
52
|
schema({ checks, logic, response }: {
|
|
53
53
|
checks?: (args: any) => Promise<any>;
|