@xrystal/core 3.20.4 → 3.20.7
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/clients/index.d.ts +2 -2
- package/source/loader/configs/index.d.ts +3 -3
- package/source/loader/configs/index.js +1 -1
- package/source/loader/controller/index.d.ts +2 -2
- package/source/loader/events/index.d.ts +2 -2
- package/source/loader/localizations/index.d.ts +2 -2
- package/source/loader/logger/index.d.ts +2 -2
- package/source/loader/system/index.d.ts +2 -2
- package/source/utils/models/classes/class.interfaces.d.ts +2 -0
- package/source/utils/models/classes/class.interfaces.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IService } from "../../utils";
|
|
2
2
|
import ConfigsService from "../configs";
|
|
3
|
-
export default class ClientsService implements
|
|
3
|
+
export default class ClientsService implements IService<any> {
|
|
4
4
|
#private;
|
|
5
5
|
private _instances;
|
|
6
6
|
constructor({ configsService }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import SystemService from '../system/index';
|
|
2
|
-
import {
|
|
2
|
+
import { IService, ModeEnum } from '../../utils';
|
|
3
3
|
export interface IConfig {
|
|
4
4
|
worker: boolean;
|
|
5
5
|
mode: ModeEnum;
|
|
@@ -19,7 +19,7 @@ export interface IConfig {
|
|
|
19
19
|
systemLoggerLayer: string;
|
|
20
20
|
isKafkaPassive: boolean;
|
|
21
21
|
kafkaBrokers: string;
|
|
22
|
-
kafkaTopics: string;
|
|
22
|
+
kafkaTopics: string[];
|
|
23
23
|
kafkaLogsTopic: string;
|
|
24
24
|
baseApiUri: string;
|
|
25
25
|
port: number;
|
|
@@ -30,7 +30,7 @@ export interface IConfig {
|
|
|
30
30
|
}
|
|
31
31
|
export interface IConfigsService extends IConfig {
|
|
32
32
|
}
|
|
33
|
-
export default class ConfigsService implements
|
|
33
|
+
export default class ConfigsService implements IService<any> {
|
|
34
34
|
#private;
|
|
35
35
|
readonly publicFolderName: string;
|
|
36
36
|
readonly kafkaLogsTopic: string;
|
|
@@ -44,7 +44,7 @@ export default class ConfigsService {
|
|
|
44
44
|
systemLoggerLayer: process.env.SYSTEM_LOGGER_LAYER,
|
|
45
45
|
isKafkaPassive: process.env.IS_KAFKA_PASSIVE === 'true' ? true : false,
|
|
46
46
|
kafkaBrokers: process.env?.KAFKA_BROKERS,
|
|
47
|
-
kafkaTopics:
|
|
47
|
+
kafkaTopics: [],
|
|
48
48
|
kafkaLogsTopic: this.kafkaLogsTopic,
|
|
49
49
|
baseApiUri: process.env.HTTPS === 'true' ? process.env.SYSTEM_HTTPS_BASE_API_URI : process.env.SYSTEM_BASE_API_URI,
|
|
50
50
|
port: Number(process.env.PORT),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
-
import {
|
|
2
|
+
import { IService, ProtocolEnum } from '../../utils/index';
|
|
3
3
|
import LoggerService from '../logger';
|
|
4
4
|
import SystemService from '../system';
|
|
5
5
|
export declare const controllerContextStorage: AsyncLocalStorage<{
|
|
@@ -63,7 +63,7 @@ declare abstract class Controller {
|
|
|
63
63
|
protected get req(): CustomRequest;
|
|
64
64
|
protected get res(): CustomResponse;
|
|
65
65
|
}
|
|
66
|
-
export declare abstract class ControllerService extends Controller implements
|
|
66
|
+
export declare abstract class ControllerService extends Controller implements IService<any> {
|
|
67
67
|
protected systemService: SystemService;
|
|
68
68
|
constructor({ systemService }: {
|
|
69
69
|
systemService: SystemService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IService } from '../../utils/index';
|
|
2
2
|
import LoggerService from '../logger/index';
|
|
3
|
-
export default class EventsService implements
|
|
3
|
+
export default class EventsService implements IService<any> {
|
|
4
4
|
#private;
|
|
5
5
|
constructor({ loggerService }: {
|
|
6
6
|
loggerService: LoggerService;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ConfigsService from "../configs";
|
|
2
|
-
import {
|
|
2
|
+
import { IService } from "../../utils";
|
|
3
3
|
import SystemService from "../system";
|
|
4
|
-
export default class LocalizationsService implements
|
|
4
|
+
export default class LocalizationsService implements IService<any> {
|
|
5
5
|
#private;
|
|
6
6
|
_instance: any;
|
|
7
7
|
constructor({ systemService, configsService, }: {
|
|
@@ -2,7 +2,7 @@ import winston from "winston";
|
|
|
2
2
|
import "winston-daily-rotate-file";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import ConfigsService from "../configs";
|
|
5
|
-
import { LoggerLayerEnum,
|
|
5
|
+
import { LoggerLayerEnum, IService } from "../../utils";
|
|
6
6
|
import SystemService from "../system";
|
|
7
7
|
export interface ICustomLogger extends winston.Logger {
|
|
8
8
|
critical: winston.LeveledLogMethod;
|
|
@@ -14,7 +14,7 @@ export interface ILog {
|
|
|
14
14
|
payload?: any;
|
|
15
15
|
code?: string | number;
|
|
16
16
|
}
|
|
17
|
-
export default class LoggerService implements
|
|
17
|
+
export default class LoggerService implements IService<any> {
|
|
18
18
|
#private;
|
|
19
19
|
static readonly storage: AsyncLocalStorage<Map<string, string>>;
|
|
20
20
|
private serviceName;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class SystemService implements
|
|
1
|
+
import { IService } from "../../utils";
|
|
2
|
+
export default class SystemService implements IService<any> {
|
|
3
3
|
protected _core: Record<string, any>;
|
|
4
4
|
protected _tmp: Record<string, any>;
|
|
5
5
|
cwd: string;
|