@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 +3 -2
- package/dist/app.js +2 -4
- package/dist/routes/api.js +0 -4
- package/dist/uns-api-proxy.js +1 -1
- package/package.json +2 -2
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?:
|
|
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(
|
|
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
|
}
|
package/dist/routes/api.js
CHANGED
package/dist/uns-api-proxy.js
CHANGED
|
@@ -44,7 +44,7 @@ export default class UnsApiProxy extends UnsProxy {
|
|
|
44
44
|
catchAllRouteRegistered = false;
|
|
45
45
|
startedAt;
|
|
46
46
|
statusInterval = null;
|
|
47
|
-
statusIntervalMs =
|
|
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.
|
|
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.
|
|
38
|
+
"@uns-kit/core": "2.0.43"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/jsonwebtoken": "^9.0.10",
|