xcally-nest-library 0.0.26 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -8
- package/dist/index.js.map +1 -1
- package/dist/src/modules/logger/pino/logger.module.js +3 -1
- package/dist/src/modules/logger/pino/logger.module.js.map +1 -1
- package/dist/src/modules/logger/pino/logger.service.js +0 -13
- package/dist/src/modules/logger/pino/logger.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/index.ts +0 -8
- package/package.json +16 -66
- package/src/modules/logger/pino/logger.module.ts +3 -1
- package/src/modules/logger/pino/logger.service.ts +0 -13
- package/dist/src/config/env.validation.d.ts +0 -22
- package/dist/src/config/env.validation.js +0 -82
- package/dist/src/config/env.validation.js.map +0 -1
- package/dist/src/decorators/utils.decorators.d.ts +0 -2
- package/dist/src/decorators/utils.decorators.js +0 -15
- package/dist/src/decorators/utils.decorators.js.map +0 -1
- package/dist/src/interceptors/log-request.interceptor.d.ts +0 -8
- package/dist/src/interceptors/log-request.interceptor.js +0 -44
- package/dist/src/interceptors/log-request.interceptor.js.map +0 -1
- package/dist/src/interceptors/serialize.interceptor.d.ts +0 -12
- package/dist/src/interceptors/serialize.interceptor.js +0 -24
- package/dist/src/interceptors/serialize.interceptor.js.map +0 -1
- package/dist/src/modules/logger/consoleTransport.strategy.d.ts +0 -5
- package/dist/src/modules/logger/consoleTransport.strategy.js +0 -16
- package/dist/src/modules/logger/consoleTransport.strategy.js.map +0 -1
- package/dist/src/modules/logger/datadogTransport.strategy.d.ts +0 -5
- package/dist/src/modules/logger/datadogTransport.strategy.js +0 -18
- package/dist/src/modules/logger/datadogTransport.strategy.js.map +0 -1
- package/dist/src/modules/logger/elasticsearchTransport.strategy.d.ts +0 -6
- package/dist/src/modules/logger/elasticsearchTransport.strategy.js +0 -13
- package/dist/src/modules/logger/elasticsearchTransport.strategy.js.map +0 -1
- package/dist/src/modules/logger/fileTransport.strategy.d.ts +0 -7
- package/dist/src/modules/logger/fileTransport.strategy.js +0 -17
- package/dist/src/modules/logger/fileTransport.strategy.js.map +0 -1
- package/dist/src/modules/logger/strategy.interface.d.ts +0 -6
- package/dist/src/modules/logger/strategy.interface.js +0 -3
- package/dist/src/modules/logger/strategy.interface.js.map +0 -1
- package/dist/src/modules/logger/winston.interface.d.ts +0 -21
- package/dist/src/modules/logger/winston.interface.js +0 -3
- package/dist/src/modules/logger/winston.interface.js.map +0 -1
- package/dist/src/modules/logger/winston.module.d.ts +0 -4
- package/dist/src/modules/logger/winston.module.js +0 -74
- package/dist/src/modules/logger/winston.module.js.map +0 -1
- package/dist/src/modules/logger/winston.service.d.ts +0 -18
- package/dist/src/modules/logger/winston.service.js +0 -43
- package/dist/src/modules/logger/winston.service.js.map +0 -1
- package/dist/src/modules/tracer/tracer.middleware.d.ts +0 -22
- package/dist/src/modules/tracer/tracer.middleware.js +0 -41
- package/dist/src/modules/tracer/tracer.middleware.js.map +0 -1
- package/dist/src/modules/tracer/tracer.module.d.ts +0 -7
- package/dist/src/modules/tracer/tracer.module.js +0 -36
- package/dist/src/modules/tracer/tracer.module.js.map +0 -1
- package/dist/src/types/auth.d.ts +0 -31
- package/dist/src/types/auth.js +0 -10
- package/dist/src/types/auth.js.map +0 -1
- package/dist/src/types/index.d.ts +0 -1
- package/dist/src/types/index.js +0 -18
- package/dist/src/types/index.js.map +0 -1
- package/src/config/env.validation.ts +0 -61
- package/src/decorators/utils.decorators.ts +0 -28
- package/src/interceptors/log-request.interceptor.ts +0 -32
- package/src/interceptors/serialize.interceptor.ts +0 -27
- package/src/modules/logger/consoleTransport.strategy.ts +0 -22
- package/src/modules/logger/datadogTransport.strategy.ts +0 -17
- package/src/modules/logger/elasticsearchTransport.strategy.ts +0 -12
- package/src/modules/logger/fileTransport.strategy.ts +0 -17
- package/src/modules/logger/strategy.interface.ts +0 -9
- package/src/modules/logger/winston.interface.ts +0 -22
- package/src/modules/logger/winston.module.ts +0 -63
- package/src/modules/logger/winston.service.ts +0 -53
- package/src/modules/tracer/tracer.middleware.ts +0 -38
- package/src/modules/tracer/tracer.module.ts +0 -18
- package/src/types/auth.ts +0 -37
- package/src/types/index.ts +0 -1
@@ -1,74 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var WinstonModule_1;
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.WinstonModule = void 0;
|
11
|
-
const common_1 = require("@nestjs/common");
|
12
|
-
const winston_1 = require("winston");
|
13
|
-
const config_1 = require("@nestjs/config");
|
14
|
-
const winston_service_1 = require("./winston.service");
|
15
|
-
const datadogTransport_strategy_1 = require("./datadogTransport.strategy");
|
16
|
-
const elasticsearchTransport_strategy_1 = require("./elasticsearchTransport.strategy");
|
17
|
-
const consoleTransport_strategy_1 = require("./consoleTransport.strategy");
|
18
|
-
const fileTransport_strategy_1 = require("./fileTransport.strategy");
|
19
|
-
let WinstonModule = WinstonModule_1 = class WinstonModule {
|
20
|
-
static forRoot() {
|
21
|
-
const winstonProvider = {
|
22
|
-
provide: 'WINSTON_LOGGER',
|
23
|
-
useFactory: (configService) => {
|
24
|
-
const nameService = configService.getOrThrow('NAME_SERVICE');
|
25
|
-
const transportsArray = configService
|
26
|
-
.getOrThrow('LOG_TRANSPORTS')
|
27
|
-
.split(',')
|
28
|
-
.map((item) => item.trim());
|
29
|
-
if (transportsArray.length === 0 || transportsArray.includes('')) {
|
30
|
-
throw new Error('LOG_TRANSPORTS configuration must contain at least one valid transport method.');
|
31
|
-
}
|
32
|
-
const selectedTransports = transportsArray.flatMap((key) => {
|
33
|
-
const strategyMap = {
|
34
|
-
elasticsearch: new elasticsearchTransport_strategy_1.ElasticsearchTransportStrategy(),
|
35
|
-
datadog: new datadogTransport_strategy_1.DatadogTransportStrategy(),
|
36
|
-
file: new fileTransport_strategy_1.FileTransportStrategy(nameService),
|
37
|
-
console: new consoleTransport_strategy_1.ConsoleTransportStrategy(),
|
38
|
-
};
|
39
|
-
const strategy = strategyMap[key];
|
40
|
-
if (strategy) {
|
41
|
-
return [].concat(strategy.createTransport(configService));
|
42
|
-
}
|
43
|
-
else {
|
44
|
-
throw new Error(`No strategy found for transport ${key}`);
|
45
|
-
}
|
46
|
-
});
|
47
|
-
return (0, winston_1.createLogger)({
|
48
|
-
level: configService.get('LOG_LEVEL') || 'info',
|
49
|
-
format: winston_1.format.combine(winston_1.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss:ms' })),
|
50
|
-
defaultMeta: { service: nameService },
|
51
|
-
transports: selectedTransports,
|
52
|
-
});
|
53
|
-
},
|
54
|
-
inject: [config_1.ConfigService],
|
55
|
-
};
|
56
|
-
const loggerServiceProvider = {
|
57
|
-
provide: winston_service_1.WinstonLoggerService,
|
58
|
-
useFactory: (logger) => new winston_service_1.WinstonLoggerService(logger),
|
59
|
-
inject: ['WINSTON_LOGGER'],
|
60
|
-
};
|
61
|
-
return {
|
62
|
-
module: WinstonModule_1,
|
63
|
-
imports: [config_1.ConfigModule],
|
64
|
-
providers: [winstonProvider, loggerServiceProvider],
|
65
|
-
exports: [winstonProvider, loggerServiceProvider],
|
66
|
-
};
|
67
|
-
}
|
68
|
-
};
|
69
|
-
exports.WinstonModule = WinstonModule;
|
70
|
-
exports.WinstonModule = WinstonModule = WinstonModule_1 = __decorate([
|
71
|
-
(0, common_1.Global)(),
|
72
|
-
(0, common_1.Module)({})
|
73
|
-
], WinstonModule);
|
74
|
-
//# sourceMappingURL=winston.module.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"winston.module.js","sourceRoot":"","sources":["../../../../src/modules/logger/winston.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,qCAAuD;AACvD,2CAA6D;AAC7D,uDAAyD;AACzD,2EAAuE;AACvE,uFAAmF;AACnF,2EAAuE;AACvE,qEAAiE;AAI1D,IAAM,aAAa,qBAAnB,MAAM,aAAa;IACxB,MAAM,CAAC,OAAO;QACZ,MAAM,eAAe,GAAG;YACtB,OAAO,EAAE,gBAAgB;YACzB,UAAU,EAAE,CAAC,aAA4B,EAAU,EAAE;gBACnD,MAAM,WAAW,GAAG,aAAa,CAAC,UAAU,CAAS,cAAc,CAAC,CAAC;gBACrE,MAAM,eAAe,GAAG,aAAa;qBAClC,UAAU,CAAS,gBAAgB,CAAC;qBACpC,KAAK,CAAC,GAAG,CAAC;qBACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC9B,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,IAAI,eAAe,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;oBACjE,MAAM,IAAI,KAAK,CAAC,gFAAgF,CAAC,CAAC;gBACpG,CAAC;gBAED,MAAM,kBAAkB,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;oBACzD,MAAM,WAAW,GAAG;wBAClB,aAAa,EAAE,IAAI,gEAA8B,EAAE;wBACnD,OAAO,EAAE,IAAI,oDAAwB,EAAE;wBACvC,IAAI,EAAE,IAAI,8CAAqB,CAAC,WAAW,CAAC;wBAC5C,OAAO,EAAE,IAAI,oDAAwB,EAAE;qBACxC,CAAC;oBACF,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;oBAClC,IAAI,QAAQ,EAAE,CAAC;wBACb,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC;oBAC5D,CAAC;yBAAM,CAAC;wBACN,MAAM,IAAI,KAAK,CAAC,mCAAmC,GAAG,EAAE,CAAC,CAAC;oBAC5D,CAAC;gBACH,CAAC,CAAC,CAAC;gBAEH,OAAO,IAAA,sBAAY,EAAC;oBAClB,KAAK,EAAE,aAAa,CAAC,GAAG,CAAS,WAAW,CAAC,IAAI,MAAM;oBACvD,MAAM,EAAE,gBAAM,CAAC,OAAO,CAAC,gBAAM,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,wBAAwB,EAAE,CAAC,CAAC;oBAC9E,WAAW,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;oBACrC,UAAU,EAAE,kBAAkB;iBAC/B,CAAC,CAAC;YACL,CAAC;YACD,MAAM,EAAE,CAAC,sBAAa,CAAC;SACxB,CAAC;QACF,MAAM,qBAAqB,GAAG;YAC5B,OAAO,EAAE,sCAAoB;YAC7B,UAAU,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,IAAI,sCAAoB,CAAC,MAAM,CAAC;YAChE,MAAM,EAAE,CAAC,gBAAgB,CAAC;SAC3B,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,eAAa;YACrB,OAAO,EAAE,CAAC,qBAAY,CAAC;YACvB,SAAS,EAAE,CAAC,eAAe,EAAE,qBAAqB,CAAC;YACnD,OAAO,EAAE,CAAC,eAAe,EAAE,qBAAqB,CAAC;SAClD,CAAC;IACJ,CAAC;CACF,CAAA;AAnDY,sCAAa;wBAAb,aAAa;IAFzB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,aAAa,CAmDzB"}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { Logger } from 'winston';
|
2
|
-
import { IWinstonLogger } from './winston.interface';
|
3
|
-
import { LoggerCtx } from '../../types';
|
4
|
-
export declare class WinstonLoggerService implements IWinstonLogger {
|
5
|
-
private readonly logger;
|
6
|
-
constructor(logger: Logger);
|
7
|
-
info(message: string, meta: LoggerCtx): void;
|
8
|
-
warn(message: string, meta: LoggerCtx): void;
|
9
|
-
help(message: string, meta: LoggerCtx): void;
|
10
|
-
data(message: string, meta: LoggerCtx): void;
|
11
|
-
debug(message: string, meta: LoggerCtx): void;
|
12
|
-
prompt(message: string, meta: LoggerCtx): void;
|
13
|
-
http(message: string, meta: LoggerCtx): void;
|
14
|
-
verbose(message: string, meta: LoggerCtx): void;
|
15
|
-
input(message: string, meta: LoggerCtx): void;
|
16
|
-
silly(message: string, meta: LoggerCtx): void;
|
17
|
-
error(message: string, meta: LoggerCtx): void;
|
18
|
-
}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.WinstonLoggerService = void 0;
|
4
|
-
class WinstonLoggerService {
|
5
|
-
constructor(logger) {
|
6
|
-
this.logger = logger;
|
7
|
-
}
|
8
|
-
info(message, meta) {
|
9
|
-
this.logger.info(message, meta);
|
10
|
-
}
|
11
|
-
warn(message, meta) {
|
12
|
-
this.logger.warn(message, meta);
|
13
|
-
}
|
14
|
-
help(message, meta) {
|
15
|
-
this.logger.help(message, meta);
|
16
|
-
}
|
17
|
-
data(message, meta) {
|
18
|
-
this.logger.data(message, meta);
|
19
|
-
}
|
20
|
-
debug(message, meta) {
|
21
|
-
this.logger.debug(message, meta);
|
22
|
-
}
|
23
|
-
prompt(message, meta) {
|
24
|
-
this.logger.prompt(message, meta);
|
25
|
-
}
|
26
|
-
http(message, meta) {
|
27
|
-
this.logger.http(message, meta);
|
28
|
-
}
|
29
|
-
verbose(message, meta) {
|
30
|
-
this.logger.verbose(message, meta);
|
31
|
-
}
|
32
|
-
input(message, meta) {
|
33
|
-
this.logger.input(message, meta);
|
34
|
-
}
|
35
|
-
silly(message, meta) {
|
36
|
-
this.logger.silly(message, meta);
|
37
|
-
}
|
38
|
-
error(message, meta) {
|
39
|
-
this.logger.error(message, meta);
|
40
|
-
}
|
41
|
-
}
|
42
|
-
exports.WinstonLoggerService = WinstonLoggerService;
|
43
|
-
//# sourceMappingURL=winston.service.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"winston.service.js","sourceRoot":"","sources":["../../../../src/modules/logger/winston.service.ts"],"names":[],"mappings":";;;AAKA,MAAa,oBAAoB;IAC/B,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/C,IAAI,CAAC,OAAe,EAAE,IAAe;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,IAAe;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,IAAe;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,IAAe;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,IAAe;QACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;IACD,MAAM,CAAC,OAAe,EAAE,IAAe;QACrC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,IAAe;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,CAAC,OAAe,EAAE,IAAe;QACtC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,IAAe;QACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,IAAe;QACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,IAAe;QACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;CAGF;AA/CD,oDA+CC"}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import { NestMiddleware } from '@nestjs/common';
|
2
|
-
import { NextFunction, Request, Response } from 'express';
|
3
|
-
export declare const X_REQUEST_ID_HEADER = "X-Request-ID";
|
4
|
-
export declare const X_RESPONSE_ID_HEADER = "X-Response-ID";
|
5
|
-
import { RouteInfo } from '@nestjs/common/interfaces';
|
6
|
-
import { Ctx } from '../../types';
|
7
|
-
interface CtxLocal {
|
8
|
-
local: Ctx;
|
9
|
-
}
|
10
|
-
type CtxLocalRequest = Request & Ctx;
|
11
|
-
export interface TracingModuleOptions {
|
12
|
-
routes: (string | RouteInfo)[];
|
13
|
-
excludedRoutes?: (string | RouteInfo)[];
|
14
|
-
onRequest?(uuid: string, next: NextFunction): void;
|
15
|
-
}
|
16
|
-
export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<TracingModuleOptions, "register", "create", {}>, MODULE_OPTIONS_TOKEN: string | symbol, OPTIONS_TYPE: TracingModuleOptions & Partial<{}>, ASYNC_OPTIONS_TYPE: import("@nestjs/common").ConfigurableModuleAsyncOptions<TracingModuleOptions, "create"> & Partial<{}>;
|
17
|
-
export declare class TracerMiddleware implements NestMiddleware {
|
18
|
-
protected readonly options: typeof OPTIONS_TYPE;
|
19
|
-
constructor(options: typeof OPTIONS_TYPE);
|
20
|
-
use(req: CtxLocalRequest & CtxLocal, res: Response, next: NextFunction): Promise<void>;
|
21
|
-
}
|
22
|
-
export {};
|
@@ -1,41 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
13
|
-
};
|
14
|
-
var _a;
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
exports.TracerMiddleware = exports.ASYNC_OPTIONS_TYPE = exports.OPTIONS_TYPE = exports.MODULE_OPTIONS_TOKEN = exports.ConfigurableModuleClass = exports.X_RESPONSE_ID_HEADER = exports.X_REQUEST_ID_HEADER = void 0;
|
17
|
-
const common_1 = require("@nestjs/common");
|
18
|
-
const crypto_1 = require("crypto");
|
19
|
-
exports.X_REQUEST_ID_HEADER = 'X-Request-ID';
|
20
|
-
exports.X_RESPONSE_ID_HEADER = 'X-Response-ID';
|
21
|
-
const common_2 = require("@nestjs/common");
|
22
|
-
_a = new common_2.ConfigurableModuleBuilder().build(), exports.ConfigurableModuleClass = _a.ConfigurableModuleClass, exports.MODULE_OPTIONS_TOKEN = _a.MODULE_OPTIONS_TOKEN, exports.OPTIONS_TYPE = _a.OPTIONS_TYPE, exports.ASYNC_OPTIONS_TYPE = _a.ASYNC_OPTIONS_TYPE;
|
23
|
-
let TracerMiddleware = class TracerMiddleware {
|
24
|
-
constructor(options) {
|
25
|
-
this.options = options;
|
26
|
-
}
|
27
|
-
async use(req, res, next) {
|
28
|
-
const { onRequest = (_, next) => next() } = this.options;
|
29
|
-
const uuid = req.header(exports.X_REQUEST_ID_HEADER) ?? (0, crypto_1.randomUUID)();
|
30
|
-
req.local = { traceId: uuid };
|
31
|
-
res.setHeader(exports.X_RESPONSE_ID_HEADER, uuid);
|
32
|
-
onRequest(uuid, next);
|
33
|
-
}
|
34
|
-
};
|
35
|
-
exports.TracerMiddleware = TracerMiddleware;
|
36
|
-
exports.TracerMiddleware = TracerMiddleware = __decorate([
|
37
|
-
(0, common_1.Injectable)(),
|
38
|
-
__param(0, (0, common_1.Inject)(exports.MODULE_OPTIONS_TOKEN)),
|
39
|
-
__metadata("design:paramtypes", [Object])
|
40
|
-
], TracerMiddleware);
|
41
|
-
//# sourceMappingURL=tracer.middleware.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"tracer.middleware.js","sourceRoot":"","sources":["../../../../src/modules/tracer/tracer.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,mCAAoC;AAEvB,QAAA,mBAAmB,GAAG,cAAc,CAAC;AACrC,QAAA,oBAAoB,GAAG,eAAe,CAAC;AACpD,2CAA2D;AAe9C,KACX,IAAI,kCAAyB,EAAwB,CAAC,KAAK,EAAE,EADhD,+BAAuB,+BAAE,4BAAoB,4BAAE,oBAAY,oBAAE,0BAAkB,yBAC9B;AAGzD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YAEqB,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;IAC9C,CAAC;IAEJ,KAAK,CAAC,GAAG,CAAC,GAA+B,EAAE,GAAa,EAAE,IAAkB;QAC1E,MAAM,EAAE,SAAS,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACzD,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,2BAAmB,CAAC,IAAI,IAAA,mBAAU,GAAE,CAAC;QAC7D,GAAG,CAAC,KAAK,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC9B,GAAG,CAAC,SAAS,CAAC,4BAAoB,EAAE,IAAI,CAAC,CAAC;QAC1C,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACxB,CAAC;CACF,CAAA;AAbY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,4BAAoB,CAAC,CAAA;;GAFpB,gBAAgB,CAa5B"}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { MiddlewareConsumer, NestModule } from '@nestjs/common';
|
2
|
-
import { ConfigurableModuleClass, OPTIONS_TYPE } from './tracer.middleware';
|
3
|
-
export declare class TracerModule extends ConfigurableModuleClass implements NestModule {
|
4
|
-
protected readonly options: typeof OPTIONS_TYPE;
|
5
|
-
constructor(options: typeof OPTIONS_TYPE);
|
6
|
-
configure(consumer: MiddlewareConsumer): void;
|
7
|
-
}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
13
|
-
};
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.TracerModule = void 0;
|
16
|
-
const common_1 = require("@nestjs/common");
|
17
|
-
const tracer_middleware_1 = require("./tracer.middleware");
|
18
|
-
let TracerModule = class TracerModule extends tracer_middleware_1.ConfigurableModuleClass {
|
19
|
-
constructor(options) {
|
20
|
-
super();
|
21
|
-
this.options = options;
|
22
|
-
}
|
23
|
-
configure(consumer) {
|
24
|
-
const config = consumer.apply(tracer_middleware_1.TracerMiddleware);
|
25
|
-
if (this.options.excludedRoutes)
|
26
|
-
config.exclude(...this.options.excludedRoutes);
|
27
|
-
config.forRoutes(...this.options.routes);
|
28
|
-
}
|
29
|
-
};
|
30
|
-
exports.TracerModule = TracerModule;
|
31
|
-
exports.TracerModule = TracerModule = __decorate([
|
32
|
-
(0, common_1.Module)({}),
|
33
|
-
__param(0, (0, common_1.Inject)(tracer_middleware_1.MODULE_OPTIONS_TOKEN)),
|
34
|
-
__metadata("design:paramtypes", [Object])
|
35
|
-
], TracerModule);
|
36
|
-
//# sourceMappingURL=tracer.module.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"tracer.module.js","sourceRoot":"","sources":["../../../../src/modules/tracer/tracer.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAgF;AAChF,2DAAoH;AAG7G,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,2CAAuB;IACvD,YAEqB,OAA4B;QAE/C,KAAK,EAAE,CAAC;QAFW,YAAO,GAAP,OAAO,CAAqB;IAGjD,CAAC;IAED,SAAS,CAAC,QAA4B;QACpC,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,oCAAgB,CAAC,CAAC;QAChD,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc;YAAE,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAChF,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;CACF,CAAA;AAbY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,eAAM,EAAC,EAAE,CAAC;IAGN,WAAA,IAAA,eAAM,EAAC,wCAAoB,CAAC,CAAA;;GAFpB,YAAY,CAaxB"}
|
package/dist/src/types/auth.d.ts
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
export type UserPermission = {
|
2
|
-
sectionId: number;
|
3
|
-
name: string;
|
4
|
-
category: string;
|
5
|
-
crudPermissions: Array<'r' | 'e' | 'd'>;
|
6
|
-
};
|
7
|
-
export type User = {
|
8
|
-
id: number;
|
9
|
-
role: Role;
|
10
|
-
name: string;
|
11
|
-
userProfileId: number;
|
12
|
-
permissions: UserPermission[];
|
13
|
-
};
|
14
|
-
export type Ctx = {
|
15
|
-
traceId: string;
|
16
|
-
user?: User;
|
17
|
-
auth?: Auth;
|
18
|
-
};
|
19
|
-
export type LoggerCtx = Ctx & {
|
20
|
-
className: string;
|
21
|
-
methodName: string;
|
22
|
-
[key: string]: any;
|
23
|
-
};
|
24
|
-
export declare enum Role {
|
25
|
-
User = "user",
|
26
|
-
Admin = "admin",
|
27
|
-
Agent = "agent"
|
28
|
-
}
|
29
|
-
export type Auth = {
|
30
|
-
token: string;
|
31
|
-
};
|
package/dist/src/types/auth.js
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Role = void 0;
|
4
|
-
var Role;
|
5
|
-
(function (Role) {
|
6
|
-
Role["User"] = "user";
|
7
|
-
Role["Admin"] = "admin";
|
8
|
-
Role["Agent"] = "agent";
|
9
|
-
})(Role || (exports.Role = Role = {}));
|
10
|
-
//# sourceMappingURL=auth.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/types/auth.ts"],"names":[],"mappings":";;;AA4BA,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,qBAAa,CAAA;IACb,uBAAe,CAAA;IACf,uBAAe,CAAA;AACjB,CAAC,EAJW,IAAI,oBAAJ,IAAI,QAIf"}
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './auth';
|
package/dist/src/types/index.js
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./auth"), exports);
|
18
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB"}
|
@@ -1,61 +0,0 @@
|
|
1
|
-
import { plainToClass } from 'class-transformer';
|
2
|
-
import { IsEnum, IsNumber, IsBoolean, IsString, validateSync, NotContains, IsDefined } from 'class-validator';
|
3
|
-
|
4
|
-
enum EnvironmentType {
|
5
|
-
Dev = 'development',
|
6
|
-
Prod = 'production',
|
7
|
-
Test = 'test',
|
8
|
-
Staging = 'staging',
|
9
|
-
E2E = 'e2e',
|
10
|
-
}
|
11
|
-
|
12
|
-
class EnvironmentVariables {
|
13
|
-
@IsDefined()
|
14
|
-
@IsEnum(EnvironmentType)
|
15
|
-
NODE_ENV: EnvironmentType;
|
16
|
-
|
17
|
-
@IsString()
|
18
|
-
MYSQL_HOST: string;
|
19
|
-
|
20
|
-
@IsNumber()
|
21
|
-
MYSQL_PORT: number;
|
22
|
-
|
23
|
-
@IsString()
|
24
|
-
@NotContains(' ')
|
25
|
-
MYSQL_DATABASE: string;
|
26
|
-
|
27
|
-
@IsString()
|
28
|
-
MYSQL_USERNAME: string;
|
29
|
-
|
30
|
-
@IsString()
|
31
|
-
MYSQL_PASSWORD: string;
|
32
|
-
|
33
|
-
@IsBoolean()
|
34
|
-
MYSQL_SYNCHRONIZE: boolean;
|
35
|
-
|
36
|
-
@IsNumber()
|
37
|
-
HTTP_TIMEOUT: number;
|
38
|
-
|
39
|
-
@IsNumber()
|
40
|
-
HTTP_MAX_REDIRECTS: number;
|
41
|
-
|
42
|
-
@IsString()
|
43
|
-
BASE_MOTION_URL: string;
|
44
|
-
|
45
|
-
@IsString()
|
46
|
-
ACTOR_SERVICE_URL: string;
|
47
|
-
}
|
48
|
-
|
49
|
-
export function validate(configuration: Record<string, unknown>) {
|
50
|
-
const finalConfig = plainToClass(EnvironmentVariables, configuration, {
|
51
|
-
enableImplicitConversion: true,
|
52
|
-
});
|
53
|
-
|
54
|
-
const errors = validateSync(finalConfig, { skipMissingProperties: true });
|
55
|
-
|
56
|
-
if (errors.length > 0) {
|
57
|
-
throw new Error(errors.toString());
|
58
|
-
}
|
59
|
-
|
60
|
-
return finalConfig;
|
61
|
-
}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Creates a parameter decorator that retrieves the metadata from the execution context.
|
5
|
-
*
|
6
|
-
* @param data - Additional data passed to the decorator (unused)
|
7
|
-
* @param ctx - The execution context
|
8
|
-
* @returns The metadata from the execution context
|
9
|
-
*/
|
10
|
-
export const GetMeta = createParamDecorator((data: unknown, ctx: ExecutionContext) => {
|
11
|
-
const context = ctx.switchToRpc();
|
12
|
-
return context.getContext();
|
13
|
-
});
|
14
|
-
|
15
|
-
/**
|
16
|
-
* Creates a parameter decorator that retrieves the trace ID from the execution context.
|
17
|
-
* The 'traceId' key should be used when setting this value in the metadata.
|
18
|
-
*
|
19
|
-
* @param data - Additional data passed to the decorator (unused)
|
20
|
-
* @param ctx - The execution context
|
21
|
-
* @returns The trace ID
|
22
|
-
*/
|
23
|
-
export const GetTraceId = createParamDecorator((data: unknown, ctx: ExecutionContext) => {
|
24
|
-
const context = ctx.switchToRpc();
|
25
|
-
const metadata = context.getContext();
|
26
|
-
const traceId = metadata.get('traceId')[0];
|
27
|
-
return traceId; // 'traceId' should match the key used when setting this value in metadata
|
28
|
-
});
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
|
2
|
-
import { Observable } from 'rxjs';
|
3
|
-
import { tap } from 'rxjs/operators';
|
4
|
-
import { WinstonLoggerService } from '../modules/logger/winston.service';
|
5
|
-
// import { CustomLoggerService } from '../modules/logger/winston.service';
|
6
|
-
@Injectable()
|
7
|
-
export class LogRequestInterceptor implements NestInterceptor {
|
8
|
-
constructor(private readonly logger: WinstonLoggerService) {}
|
9
|
-
intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
|
10
|
-
const req = context.switchToHttp().getRequest();
|
11
|
-
this.logger.info('Before Middleware...', {
|
12
|
-
traceId: req?.local?.traceId,
|
13
|
-
className: this.constructor.name,
|
14
|
-
methodName: 'intercept',
|
15
|
-
});
|
16
|
-
const now = Date.now();
|
17
|
-
|
18
|
-
if (req) {
|
19
|
-
const method = req.method;
|
20
|
-
const url = req.url;
|
21
|
-
return next.handle().pipe(
|
22
|
-
tap(() =>
|
23
|
-
this.logger.info(`After Middleware... ${method} ${url} ${Date.now() - now}ms`, {
|
24
|
-
traceId: req?.local?.traceId,
|
25
|
-
className: 'LogRequestInterceptor',
|
26
|
-
methodName: 'intercept',
|
27
|
-
}),
|
28
|
-
),
|
29
|
-
);
|
30
|
-
}
|
31
|
-
}
|
32
|
-
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import { UseInterceptors, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
|
2
|
-
import { Observable } from 'rxjs';
|
3
|
-
import { map } from 'rxjs/operators';
|
4
|
-
import { plainToInstance } from 'class-transformer';
|
5
|
-
|
6
|
-
interface ClassConstructor {
|
7
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
8
|
-
new (...args: any[]): {};
|
9
|
-
}
|
10
|
-
|
11
|
-
export function Serialize(dto: ClassConstructor) {
|
12
|
-
return UseInterceptors(new SerializeInterceptor(dto));
|
13
|
-
}
|
14
|
-
|
15
|
-
export class SerializeInterceptor implements NestInterceptor {
|
16
|
-
constructor(private dto: any) {}
|
17
|
-
|
18
|
-
intercept(context: ExecutionContext, handler: CallHandler): Observable<any> {
|
19
|
-
return handler.handle().pipe(
|
20
|
-
map((data: any) => {
|
21
|
-
return plainToInstance(this.dto, data, {
|
22
|
-
excludeExtraneousValues: true,
|
23
|
-
});
|
24
|
-
}),
|
25
|
-
);
|
26
|
-
}
|
27
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import { format, transports } from 'winston';
|
2
|
-
import { TransportStrategy } from './strategy.interface';
|
3
|
-
// Custom format for log entries
|
4
|
-
const myFormat = format.printf(({ level = 'info', message, timestamp, err, ...metadata }) => {
|
5
|
-
return `${timestamp} [${level}]: ${message} ${err ? err.stack : ''} ${JSON.stringify(metadata)} `;
|
6
|
-
});
|
7
|
-
|
8
|
-
// Console transport strategy
|
9
|
-
export class ConsoleTransportStrategy implements TransportStrategy {
|
10
|
-
createTransport(): transports.ConsoleTransportInstance {
|
11
|
-
return new transports.Console({
|
12
|
-
format: format.combine(
|
13
|
-
format.colorize(),
|
14
|
-
format.splat(),
|
15
|
-
format.errors({ stack: true }),
|
16
|
-
format.json(),
|
17
|
-
format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss:ms' }),
|
18
|
-
myFormat,
|
19
|
-
),
|
20
|
-
});
|
21
|
-
}
|
22
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
2
|
-
import DatadogWinston = require('datadog-winston');
|
3
|
-
import { TransportStrategy } from './strategy.interface';
|
4
|
-
|
5
|
-
// Datadog transport strategy
|
6
|
-
export class DatadogTransportStrategy implements TransportStrategy {
|
7
|
-
createTransport(configService: ConfigService) {
|
8
|
-
return new DatadogWinston({
|
9
|
-
apiKey: configService.getOrThrow<string>('DATADOG_APIKEY'),
|
10
|
-
hostname: configService.getOrThrow<string>('DATADOG_HOSTNAME'),
|
11
|
-
service: configService.getOrThrow<string>('DATADOG_SERVICE'),
|
12
|
-
ddsource: configService.getOrThrow<string>('DATADOG_DDSOURCE'),
|
13
|
-
ddtags: configService.getOrThrow<string>('DATADOG_DDTAGS'),
|
14
|
-
intakeRegion: configService.getOrThrow<string>('DATADOG_INTAKEREGION'),
|
15
|
-
});
|
16
|
-
}
|
17
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
2
|
-
import { ElasticsearchTransport } from 'winston-elasticsearch';
|
3
|
-
import { TransportStrategy } from './strategy.interface';
|
4
|
-
|
5
|
-
// Elasticsearch transport strategy
|
6
|
-
export class ElasticsearchTransportStrategy implements TransportStrategy {
|
7
|
-
createTransport(configService: ConfigService): ElasticsearchTransport {
|
8
|
-
return new ElasticsearchTransport({
|
9
|
-
clientOpts: { node: configService.getOrThrow<string>('ELASTICSEARCH_URL') },
|
10
|
-
});
|
11
|
-
}
|
12
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { transports, format } from 'winston';
|
2
|
-
import { TransportStrategy } from './strategy.interface';
|
3
|
-
|
4
|
-
// File transport strategy
|
5
|
-
export class FileTransportStrategy implements TransportStrategy {
|
6
|
-
name: string;
|
7
|
-
constructor(name: string) {
|
8
|
-
this.name = name;
|
9
|
-
}
|
10
|
-
|
11
|
-
createTransport(): transports.FileTransportInstance {
|
12
|
-
return new transports.File({
|
13
|
-
filename: `logs/${this.name}.log`,
|
14
|
-
format: format.combine(format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss:ms' }), format.json()),
|
15
|
-
});
|
16
|
-
}
|
17
|
-
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
2
|
-
import { transports } from 'winston';
|
3
|
-
import { ElasticsearchTransport } from 'winston-elasticsearch';
|
4
|
-
|
5
|
-
export interface TransportStrategy {
|
6
|
-
createTransport(
|
7
|
-
configService: ConfigService,
|
8
|
-
): ElasticsearchTransport | transports.ConsoleTransportInstance | transports.FileTransportInstance;
|
9
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import { ElasticsearchTransportOptions } from 'winston-elasticsearch';
|
2
|
-
import { DatadogTransportOptions } from 'datadog-winston';
|
3
|
-
export interface IWinstonLogger {
|
4
|
-
info(message: string, meta?: Record<string, any>): void;
|
5
|
-
error(message: string, meta?: Record<string, any>): void;
|
6
|
-
warn(message: string, meta?: Record<string, any>): void;
|
7
|
-
help(message: string, meta?: Record<string, any>): void;
|
8
|
-
data(message: string, meta?: Record<string, any>): void;
|
9
|
-
debug(message: string, meta?: Record<string, any>): void;
|
10
|
-
prompt(message: string, meta?: Record<string, any>): void;
|
11
|
-
http(message: string, meta?: Record<string, any>): void;
|
12
|
-
verbose(message: string, meta?: Record<string, any>): void;
|
13
|
-
input(message: string, meta?: Record<string, any>): void;
|
14
|
-
silly(message: string, meta?: Record<string, any>): void;
|
15
|
-
}
|
16
|
-
|
17
|
-
export interface WinstonLoggerModuleOptions {
|
18
|
-
transportFile?: boolean;
|
19
|
-
transportConsole?: boolean;
|
20
|
-
transportElasticsearch?: ElasticsearchTransportOptions;
|
21
|
-
transportDatadog?: DatadogTransportOptions;
|
22
|
-
}
|