@xrystal/core 3.21.7 → 3.21.8
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
-
import { IService, ProtocolEnum } from '../../utils/index';
|
|
3
2
|
import LoggerService from '../logger';
|
|
4
3
|
import SystemService from '../system';
|
|
4
|
+
import { IService, ProtocolEnum } from '../../utils/index';
|
|
5
5
|
export declare const controllerContextStorage: AsyncLocalStorage<{
|
|
6
6
|
protocol?: ProtocolEnum;
|
|
7
7
|
ctx?: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
-
import { LoggerLayerEnum, ProtocolEnum, responseMessageHelper, ResponseSchema, x } from '../../utils/index';
|
|
3
2
|
import LoggerService from '../logger';
|
|
4
3
|
import SystemService from '../system';
|
|
4
|
+
import { LoggerLayerEnum, ProtocolEnum, responseMessageHelper, ResponseSchema, x } from '../../utils/index';
|
|
5
5
|
export const controllerContextStorage = new AsyncLocalStorage();
|
|
6
6
|
export const getControllerCtx = () => controllerContextStorage.getStore();
|
|
7
7
|
export class Controller {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import winston from "winston";
|
|
2
2
|
import "winston-daily-rotate-file";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
|
-
import ConfigsService from "../configs";
|
|
5
|
-
import { LoggerLayerEnum, IService } from "../../utils";
|
|
6
4
|
import SystemService from "../system";
|
|
5
|
+
import ConfigsService from "../configs";
|
|
6
|
+
import { LoggerLayerEnum } from '../../utils/models/enums/index';
|
|
7
|
+
import { IService } from "../../utils";
|
|
7
8
|
export interface ICustomLogger extends winston.Logger {
|
|
8
9
|
critical: winston.LeveledLogMethod;
|
|
9
10
|
http: winston.LeveledLogMethod;
|
|
@@ -4,7 +4,7 @@ import "winston-daily-rotate-file";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { Kafka, Partitioners, logLevel } from "kafkajs";
|
|
7
|
-
import { LoggerLayerEnum } from
|
|
7
|
+
import { LoggerLayerEnum } from '../../utils/models/enums/index';
|
|
8
8
|
class KafkaTransport extends Transport {
|
|
9
9
|
service;
|
|
10
10
|
constructor(opts, service) {
|