@yolo-croket-dev/core 1.7.9 → 1.7.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.
@@ -105,6 +105,7 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
105
105
  from: pastFrom,
106
106
  froms: pastFroms,
107
107
  },
108
+ startedAt: Date.now(),
108
109
  });
109
110
  const currentSpan = dd_trace_1.default.scope().active();
110
111
  let loggingSpan = null;
@@ -187,7 +188,7 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
187
188
  }));
188
189
  }
189
190
  };
190
- LoggingServiceInterceptor = __decorate([
191
+ exports.LoggingServiceInterceptor = LoggingServiceInterceptor;
192
+ exports.LoggingServiceInterceptor = LoggingServiceInterceptor = __decorate([
191
193
  (0, common_1.Injectable)()
192
194
  ], LoggingServiceInterceptor);
193
- exports.LoggingServiceInterceptor = LoggingServiceInterceptor;
@@ -135,7 +135,7 @@ let RPCInterceptor = class RPCInterceptor {
135
135
  // return data;
136
136
  // }
137
137
  async intercept(context, next) {
138
- var _a, _b;
138
+ var _a, _b, _c, _d;
139
139
  const options = this.reflector.get('rpcInterceptorScope', context.getHandler());
140
140
  const args = context.getArgs();
141
141
  const arg = args[0];
@@ -149,6 +149,7 @@ let RPCInterceptor = class RPCInterceptor {
149
149
  const isAdmin = content.data.param ? content.data.param.isAdmin : false;
150
150
  const reDeliveryCount = Number(message.properties.headers['x-delivery-count']) || 0; /** 몇번 재전달되었는지 */
151
151
  const staticRetryCount = Number(options === null || options === void 0 ? void 0 : options.messageRetryCount) || 0; /** 최대 재시도 갯수 */
152
+ const isRedelivery = message.fields.redelivered;
152
153
  const method = content.pattern;
153
154
  const correlationId = message.properties.correlationId;
154
155
  const execInterceptor = {
@@ -167,6 +168,14 @@ let RPCInterceptor = class RPCInterceptor {
167
168
  return new rxjs_1.Observable();
168
169
  }
169
170
  if (!staticRetryCount && reDeliveryCount > 0) {
171
+ msaLogger.debug('RETRY_COUNT_ZERO_OR_NO_RETRY debug param', { traceId: ((_b = content.data.param) === null || _b === void 0 ? void 0 : _b.traceId) || 'RETRY_COUNT_ZERO_OR_NO_RETRY' }, {
172
+ properties: message.properties,
173
+ fields: message.fields,
174
+ time: Date.now(),
175
+ isRedelivery,
176
+ reDeliveryCount,
177
+ staticRetryCount,
178
+ });
170
179
  channel.sendToQueue(message.properties.replyTo, Buffer.from(JSON.stringify({
171
180
  isError: true,
172
181
  message: 'RETRY_COUNT_ZERO_OR_NO_RETRY',
@@ -179,6 +188,14 @@ let RPCInterceptor = class RPCInterceptor {
179
188
  message.properties.replyTo = undefined; /** replyTo가 존재하면 sendToQueue가 호출되므로, 삭제해주기 */
180
189
  return new rxjs_1.Observable();
181
190
  }
191
+ msaLogger.debug('RETRY_COUNT_ZERO_OR_NO_RETRY debug isNotRedelivery', { traceId: ((_c = content.data.param) === null || _c === void 0 ? void 0 : _c.traceId) || 'RETRY_COUNT_ZERO_OR_NO_RETRY' }, {
192
+ properties: message.properties,
193
+ fields: message.fields,
194
+ time: Date.now(),
195
+ isRedelivery,
196
+ reDeliveryCount,
197
+ staticRetryCount,
198
+ });
182
199
  const noAck = message.fields.routingKey.includes('ASYNC');
183
200
  let localErrorProcessor = async (err) => {
184
201
  var _a;
@@ -246,7 +263,7 @@ let RPCInterceptor = class RPCInterceptor {
246
263
  };
247
264
  localErrorProcessor = localErrorProcessor.bind(this);
248
265
  /** 파일 객체 처리 */
249
- (0, functions_1.reWriteFileValue)((_b = content === null || content === void 0 ? void 0 : content.data) === null || _b === void 0 ? void 0 : _b.file);
266
+ (0, functions_1.reWriteFileValue)((_d = content === null || content === void 0 ? void 0 : content.data) === null || _d === void 0 ? void 0 : _d.file);
250
267
  if (options) {
251
268
  if (options.maxLengthKeys && options.maxLengthKeys.length) {
252
269
  for (const key of options.maxLengthKeys) {
@@ -304,9 +321,9 @@ let RPCInterceptor = class RPCInterceptor {
304
321
  }));
305
322
  }
306
323
  };
307
- RPCInterceptor = __decorate([
324
+ exports.RPCInterceptor = RPCInterceptor;
325
+ exports.RPCInterceptor = RPCInterceptor = __decorate([
308
326
  (0, common_1.Injectable)(),
309
327
  __metadata("design:paramtypes", [core_1.Reflector,
310
328
  graceful_shutdown_service_1.GracefulShutdownService])
311
329
  ], RPCInterceptor);
312
- exports.RPCInterceptor = RPCInterceptor;
@@ -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 = exports.ErrActionTypeEnum || (exports.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;
@@ -11,11 +11,11 @@ const common_1 = require("@nestjs/common");
11
11
  const graceful_shutdown_service_1 = require("./graceful-shutdown.service");
12
12
  let GracefulShutdownModule = class GracefulShutdownModule {
13
13
  };
14
- GracefulShutdownModule = __decorate([
14
+ exports.GracefulShutdownModule = GracefulShutdownModule;
15
+ exports.GracefulShutdownModule = GracefulShutdownModule = __decorate([
15
16
  (0, common_1.Global)(),
16
17
  (0, common_1.Module)({
17
18
  providers: [graceful_shutdown_service_1.GracefulShutdownService],
18
19
  exports: [graceful_shutdown_service_1.GracefulShutdownService],
19
20
  })
20
21
  ], GracefulShutdownModule);
21
- exports.GracefulShutdownModule = GracefulShutdownModule;
@@ -1,7 +1,7 @@
1
1
  import { RmqOptions, ServerRMQ } from '@nestjs/microservices';
2
2
  import { Channel } from 'amqp-connection-manager';
3
3
  import { ConsumeMessage } from 'amqplib';
4
- export declare type GracefulRmqOptions = RmqOptions['options'] & {
4
+ export type GracefulRmqOptions = RmqOptions['options'] & {
5
5
  waitingEndingHandlersTimeoutMs?: number;
6
6
  waitingEndingHandlersIntervalMs?: number;
7
7
  };
@@ -94,7 +94,7 @@ let GracefulShutdownService = class GracefulShutdownService {
94
94
  }
95
95
  }
96
96
  };
97
- GracefulShutdownService = __decorate([
97
+ exports.GracefulShutdownService = GracefulShutdownService;
98
+ exports.GracefulShutdownService = GracefulShutdownService = __decorate([
98
99
  (0, common_1.Injectable)()
99
100
  ], GracefulShutdownService);
100
- exports.GracefulShutdownService = GracefulShutdownService;
@@ -15,10 +15,10 @@ const redisProvider = {
15
15
  };
16
16
  let RedisModule = class RedisModule {
17
17
  };
18
- RedisModule = __decorate([
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.7.9",
3
+ "version": "1.7.11",
4
4
  "author": "Yolo Co., Ltd.",
5
5
  "description": "Yolo commonization module",
6
6
  "main": "index.js",
@@ -17,7 +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": "^3.0.1",
20
+ "@yolo-croket-dev/msa-logger": "^3.0.4",
21
21
  "@yolo-croket-dev/redis": "^1.0.23",
22
22
  "@yolo-croket-dev/swagger": "^0.0.7",
23
23
  "axios": "^1.1.3",
@@ -31,8 +31,8 @@ let ValidationPipe = class ValidationPipe {
31
31
  return value;
32
32
  }
33
33
  };
34
- ValidationPipe = __decorate([
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;