@yolo-croket-dev/core 1.4.52-jun.1 → 1.4.52-jun.11
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,19 @@ 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);
|
|
79
|
+
console.log('originalMessage.properties', originalMessage.properties);
|
|
80
|
+
console.log('originalMessage.properties.headers', originalMessage.properties.headers);
|
|
81
|
+
const originalcontent = originalMessage.content;
|
|
82
|
+
const originalcontent2 = JSON.parse(originalcontent.toString());
|
|
83
|
+
console.log('originalcontent2', originalcontent2);
|
|
73
84
|
const rmq = args[1];
|
|
74
85
|
const ctx = context.switchToHttp();
|
|
75
86
|
const request = ctx.getRequest();
|
|
@@ -77,9 +88,7 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
77
88
|
// const now = Date.now();
|
|
78
89
|
const content = JSON.parse(message.content.toString());
|
|
79
90
|
const traceId = content.data.param ? content.data.param.traceId : '-';
|
|
80
|
-
|
|
81
|
-
console.log('intercept 시작 message', message);
|
|
82
|
-
console.log('intercept 시작 content', content);
|
|
91
|
+
const from = ((_a = content.data.param) === null || _a === void 0 ? void 0 : _a.from) || '-';
|
|
83
92
|
msaLogger.printInputInterceptorService({
|
|
84
93
|
traceId,
|
|
85
94
|
messageBrokerInfo: {
|
|
@@ -87,16 +96,27 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
87
96
|
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
88
97
|
},
|
|
89
98
|
paramInfo: request.param,
|
|
99
|
+
traceInfo: {
|
|
100
|
+
from,
|
|
101
|
+
}
|
|
90
102
|
});
|
|
91
103
|
return next.handle()
|
|
92
104
|
.pipe((0, operators_1.tap)(() => {
|
|
93
105
|
const elapsed = Date.now() - now;
|
|
106
|
+
console.log('와이 출력안되니', content.pattern, from);
|
|
94
107
|
msaLogger.printOutService({
|
|
95
108
|
traceId,
|
|
96
109
|
responseInfo: {
|
|
97
110
|
status: 200,
|
|
98
111
|
ms: elapsed,
|
|
99
112
|
},
|
|
113
|
+
messageBrokerInfo: {
|
|
114
|
+
messagePatten: content.pattern,
|
|
115
|
+
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
116
|
+
},
|
|
117
|
+
traceInfo: {
|
|
118
|
+
from,
|
|
119
|
+
}
|
|
100
120
|
});
|
|
101
121
|
})).pipe((0, operators_1.catchError)((error) => {
|
|
102
122
|
msaLogger.printExceptionFliterService({
|
|
@@ -107,6 +127,13 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
107
127
|
message: error.subMessage,
|
|
108
128
|
stack: error.stack,
|
|
109
129
|
},
|
|
130
|
+
messageBrokerInfo: {
|
|
131
|
+
messagePatten: content.pattern,
|
|
132
|
+
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
133
|
+
},
|
|
134
|
+
traceInfo: {
|
|
135
|
+
from,
|
|
136
|
+
}
|
|
110
137
|
});
|
|
111
138
|
const elapsed = Date.now() - now;
|
|
112
139
|
msaLogger.printOutService({
|
|
@@ -115,12 +142,19 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
115
142
|
status: error.status,
|
|
116
143
|
ms: elapsed,
|
|
117
144
|
},
|
|
145
|
+
messageBrokerInfo: {
|
|
146
|
+
messagePatten: content.pattern,
|
|
147
|
+
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
148
|
+
},
|
|
149
|
+
traceInfo: {
|
|
150
|
+
from,
|
|
151
|
+
}
|
|
118
152
|
});
|
|
119
153
|
throw error;
|
|
120
154
|
}));
|
|
121
155
|
}
|
|
122
156
|
};
|
|
123
|
-
LoggingServiceInterceptor =
|
|
157
|
+
exports.LoggingServiceInterceptor = LoggingServiceInterceptor;
|
|
158
|
+
exports.LoggingServiceInterceptor = LoggingServiceInterceptor = __decorate([
|
|
124
159
|
(0, common_1.Injectable)()
|
|
125
160
|
], 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.11",
|
|
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;
|