@uns-kit/api 2.0.41 → 2.0.43

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.
package/dist/app.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" resolution-mode="require"/>
1
2
  /**
2
3
  * Module dependencies.
3
4
  */
@@ -38,9 +39,9 @@ export default class App {
38
39
  version: string;
39
40
  };
40
41
  paths: Record<string, any>;
41
- servers?: Array<{
42
+ servers?: {
42
43
  url: string;
43
- }>;
44
+ }[];
44
45
  };
45
46
  registerSwaggerDoc(path: string, doc: Record<string, unknown>): void;
46
47
  start(): Promise<void>;
package/dist/app.js CHANGED
@@ -8,6 +8,7 @@ import cookieParser from "cookie-parser";
8
8
  import { basePath } from "@uns-kit/core/base-path.js";
9
9
  import logger from "@uns-kit/core/logger.js";
10
10
  import os from 'os';
11
+ import { logRequestContext } from "./request-log.js";
11
12
  const normalizeBasePrefix = (value) => {
12
13
  if (!value)
13
14
  return "";
@@ -67,10 +68,7 @@ export default class App {
67
68
  : process.env.PUBLIC_HOME;
68
69
  this.expressApplication.use(express.static(path.join(basePath, publicHome)));
69
70
  // Map routes
70
- this.router.use((_req, _res, next) => {
71
- logger.info("Time: ", Date.now());
72
- next();
73
- });
71
+ this.router.use(logRequestContext);
74
72
  if (!mountConfig?.disableDefaultApiMount) {
75
73
  this.expressApplication.use(this.apiBasePrefix, this.router);
76
74
  }
@@ -16,10 +16,6 @@ export default class Api {
16
16
  });
17
17
  this.upload = multer({ storage: storage });
18
18
  this.router = express.Router();
19
- this.router.use((req, res, next) => {
20
- logger.info("Time: ", Date.now());
21
- next();
22
- });
23
19
  /**
24
20
  * Open for all
25
21
  *
@@ -44,7 +44,7 @@ export default class UnsApiProxy extends UnsProxy {
44
44
  catchAllRouteRegistered = false;
45
45
  startedAt;
46
46
  statusInterval = null;
47
- statusIntervalMs = 10_000;
47
+ statusIntervalMs = 10000;
48
48
  constructor(processName, instanceName, options) {
49
49
  super();
50
50
  this.options = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uns-kit/api",
3
- "version": "2.0.41",
3
+ "version": "2.0.43",
4
4
  "description": "Express-powered API gateway plugin for UnsProxyProcess with JWT/JWKS support.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -35,7 +35,7 @@
35
35
  "cookie-parser": "^1.4.7",
36
36
  "express": "^5.1.0",
37
37
  "multer": "^2.0.2",
38
- "@uns-kit/core": "2.0.41"
38
+ "@uns-kit/core": "2.0.43"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/jsonwebtoken": "^9.0.10",