@yolo-croket-dev/core 1.4.52-jun.1 → 1.4.52-jun.10
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.
|
@@ -68,8 +68,14 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
68
68
|
return data;
|
|
69
69
|
}
|
|
70
70
|
intercept(context, next) {
|
|
71
|
+
var _a;
|
|
71
72
|
const now = Date.now();
|
|
72
73
|
const args = context.getArgs();
|
|
74
|
+
const rmqContext = context.switchToRpc().getContext();
|
|
75
|
+
const channel = rmqContext.getChannelRef();
|
|
76
|
+
const originalMessage = rmqContext.getMessage();
|
|
77
|
+
console.log('channel', channel);
|
|
78
|
+
console.log('originalMessage', originalMessage);
|
|
73
79
|
const rmq = args[1];
|
|
74
80
|
const ctx = context.switchToHttp();
|
|
75
81
|
const request = ctx.getRequest();
|
|
@@ -77,9 +83,7 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
77
83
|
// const now = Date.now();
|
|
78
84
|
const content = JSON.parse(message.content.toString());
|
|
79
85
|
const traceId = content.data.param ? content.data.param.traceId : '-';
|
|
80
|
-
|
|
81
|
-
console.log('intercept 시작 message', message);
|
|
82
|
-
console.log('intercept 시작 content', content);
|
|
86
|
+
const from = ((_a = content.data.param) === null || _a === void 0 ? void 0 : _a.from) || '-';
|
|
83
87
|
msaLogger.printInputInterceptorService({
|
|
84
88
|
traceId,
|
|
85
89
|
messageBrokerInfo: {
|
|
@@ -87,16 +91,27 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
87
91
|
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
88
92
|
},
|
|
89
93
|
paramInfo: request.param,
|
|
94
|
+
traceInfo: {
|
|
95
|
+
from,
|
|
96
|
+
}
|
|
90
97
|
});
|
|
91
98
|
return next.handle()
|
|
92
99
|
.pipe((0, operators_1.tap)(() => {
|
|
93
100
|
const elapsed = Date.now() - now;
|
|
101
|
+
console.log('와이 출력안되니', content.pattern, from);
|
|
94
102
|
msaLogger.printOutService({
|
|
95
103
|
traceId,
|
|
96
104
|
responseInfo: {
|
|
97
105
|
status: 200,
|
|
98
106
|
ms: elapsed,
|
|
99
107
|
},
|
|
108
|
+
messageBrokerInfo: {
|
|
109
|
+
messagePatten: content.pattern,
|
|
110
|
+
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
111
|
+
},
|
|
112
|
+
traceInfo: {
|
|
113
|
+
from,
|
|
114
|
+
}
|
|
100
115
|
});
|
|
101
116
|
})).pipe((0, operators_1.catchError)((error) => {
|
|
102
117
|
msaLogger.printExceptionFliterService({
|
|
@@ -107,6 +122,13 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
107
122
|
message: error.subMessage,
|
|
108
123
|
stack: error.stack,
|
|
109
124
|
},
|
|
125
|
+
messageBrokerInfo: {
|
|
126
|
+
messagePatten: content.pattern,
|
|
127
|
+
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
128
|
+
},
|
|
129
|
+
traceInfo: {
|
|
130
|
+
from,
|
|
131
|
+
}
|
|
110
132
|
});
|
|
111
133
|
const elapsed = Date.now() - now;
|
|
112
134
|
msaLogger.printOutService({
|
|
@@ -115,12 +137,19 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
115
137
|
status: error.status,
|
|
116
138
|
ms: elapsed,
|
|
117
139
|
},
|
|
140
|
+
messageBrokerInfo: {
|
|
141
|
+
messagePatten: content.pattern,
|
|
142
|
+
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
143
|
+
},
|
|
144
|
+
traceInfo: {
|
|
145
|
+
from,
|
|
146
|
+
}
|
|
118
147
|
});
|
|
119
148
|
throw error;
|
|
120
149
|
}));
|
|
121
150
|
}
|
|
122
151
|
};
|
|
123
|
-
LoggingServiceInterceptor =
|
|
152
|
+
exports.LoggingServiceInterceptor = LoggingServiceInterceptor;
|
|
153
|
+
exports.LoggingServiceInterceptor = LoggingServiceInterceptor = __decorate([
|
|
124
154
|
(0, common_1.Injectable)()
|
|
125
155
|
], LoggingServiceInterceptor);
|
|
126
|
-
exports.LoggingServiceInterceptor = LoggingServiceInterceptor;
|
|
@@ -256,8 +256,8 @@ let RPCInterceptor = class RPCInterceptor {
|
|
|
256
256
|
}));
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
|
-
RPCInterceptor =
|
|
259
|
+
exports.RPCInterceptor = RPCInterceptor;
|
|
260
|
+
exports.RPCInterceptor = RPCInterceptor = __decorate([
|
|
260
261
|
(0, common_1.Injectable)(),
|
|
261
262
|
__metadata("design:paramtypes", [core_1.Reflector])
|
|
262
263
|
], RPCInterceptor);
|
|
263
|
-
exports.RPCInterceptor = RPCInterceptor;
|
package/interfaces/exception.js
CHANGED
|
@@ -18,9 +18,10 @@ var ErrActionTypeEnum;
|
|
|
18
18
|
ErrActionTypeEnum["LEGACY_SHOW_TOAST"] = "LEGACY_SHOW_TOAST";
|
|
19
19
|
ErrActionTypeEnum["FORCE_UPDATE"] = "FORCE_UPDATE";
|
|
20
20
|
ErrActionTypeEnum["UPDATE_ACCESS_TOKEN"] = "UPDATE_ACCESS_TOKEN";
|
|
21
|
-
})(ErrActionTypeEnum
|
|
21
|
+
})(ErrActionTypeEnum || (exports.ErrActionTypeEnum = ErrActionTypeEnum = {}));
|
|
22
22
|
class ErrAction {
|
|
23
23
|
}
|
|
24
|
+
exports.ErrAction = ErrAction;
|
|
24
25
|
__decorate([
|
|
25
26
|
(0, swagger_1.ApiProperty)({
|
|
26
27
|
description: '액션 타입',
|
|
@@ -57,9 +58,9 @@ __decorate([
|
|
|
57
58
|
}),
|
|
58
59
|
__metadata("design:type", String)
|
|
59
60
|
], ErrAction.prototype, "webViewUrl", void 0);
|
|
60
|
-
exports.ErrAction = ErrAction;
|
|
61
61
|
class ErrInfo {
|
|
62
62
|
}
|
|
63
|
+
exports.ErrInfo = ErrInfo;
|
|
63
64
|
__decorate([
|
|
64
65
|
(0, swagger_1.ApiProperty)({
|
|
65
66
|
description: '에러 종류 식별자',
|
|
@@ -81,4 +82,3 @@ __decorate([
|
|
|
81
82
|
}),
|
|
82
83
|
__metadata("design:type", ErrAction)
|
|
83
84
|
], ErrInfo.prototype, "action", void 0);
|
|
84
|
-
exports.ErrInfo = ErrInfo;
|
package/interfaces/http.d.ts
CHANGED
package/modules/redis.module.js
CHANGED
|
@@ -15,10 +15,10 @@ const redisProvider = {
|
|
|
15
15
|
};
|
|
16
16
|
let RedisModule = class RedisModule {
|
|
17
17
|
};
|
|
18
|
-
RedisModule =
|
|
18
|
+
exports.RedisModule = RedisModule;
|
|
19
|
+
exports.RedisModule = RedisModule = __decorate([
|
|
19
20
|
(0, common_1.Module)({
|
|
20
21
|
providers: [redisProvider],
|
|
21
22
|
exports: [redisProvider],
|
|
22
23
|
})
|
|
23
24
|
], RedisModule);
|
|
24
|
-
exports.RedisModule = RedisModule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolo-croket-dev/core",
|
|
3
|
-
"version": "1.4.52-jun.
|
|
3
|
+
"version": "1.4.52-jun.10",
|
|
4
4
|
"author": "Yolo Co., Ltd.",
|
|
5
5
|
"description": "Yolo commonization module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"@nestjs/common": "^8.2.3",
|
|
18
18
|
"@nestjs/microservices": "9.0.8",
|
|
19
19
|
"@yolo-croket-dev/logger": "^1.0.15",
|
|
20
|
+
"@yolo-croket-dev/msa-logger": "^2.1.0",
|
|
20
21
|
"@yolo-croket-dev/redis": "^1.0.23",
|
|
21
22
|
"@yolo-croket-dev/swagger": "^0.0.7",
|
|
22
23
|
"axios": "^1.1.3",
|
|
@@ -31,8 +31,8 @@ let ValidationPipe = class ValidationPipe {
|
|
|
31
31
|
return value;
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
ValidationPipe =
|
|
34
|
+
exports.ValidationPipe = ValidationPipe;
|
|
35
|
+
exports.ValidationPipe = ValidationPipe = __decorate([
|
|
35
36
|
(0, common_1.Injectable)(),
|
|
36
37
|
__metadata("design:paramtypes", [Object])
|
|
37
38
|
], ValidationPipe);
|
|
38
|
-
exports.ValidationPipe = ValidationPipe;
|