@abyss-project/monitor 1.0.60 → 1.0.62

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.
@@ -172,6 +172,9 @@ const setLocalsMiddleware = (controller, options = { prefix: '/' }, controllerPr
172
172
  if (propertyKey) {
173
173
  const isKillable = Reflect.getMetadata(metadata_1.KILLABLE_WATERMARK, controller.prototype, propertyKey);
174
174
  res.locals.isKillable = !!isKillable;
175
+ if (isKillable) {
176
+ console.log(`[Killable Route] ${controller.name}.${String(propertyKey)} is marked as killable`);
177
+ }
175
178
  }
176
179
  next();
177
180
  };
@@ -8,6 +8,7 @@ const createRequestTrackerMiddleware = (options) => {
8
8
  const { logger, isKillable } = options || {};
9
9
  return (req, res, next) => {
10
10
  const requestIsKillable = isKillable ? isKillable(req) : (0, killable_route_utils_1.isRouteKillable)(res);
11
+ logger === null || logger === void 0 ? void 0 : logger.info(`Incoming request ${req.method} ${req.url} killable: ${requestIsKillable}`);
11
12
  if ((0, request_tracker_utils_1.getIsShuttingDown)()) {
12
13
  res.status(503).json({
13
14
  errorCode: graceful_shutdown_types_1.GracefulShutdownErrorCode.SERVICE_UNAVAILABLE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/monitor",
3
- "version": "1.0.60",
3
+ "version": "1.0.62",
4
4
  "description": "Core package to interact with Abyss-Monitor",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",