@forklaunch/express 2.2.0 → 2.2.1
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/lib/index.js +2 -2
- package/lib/index.mjs +5 -5
- package/package.json +10 -10
package/lib/index.js
CHANGED
|
@@ -2145,9 +2145,9 @@ function enrichResponseTransmission(req, res, next) {
|
|
|
2145
2145
|
res.setHeader = function(name, value) {
|
|
2146
2146
|
let stringifiedValue;
|
|
2147
2147
|
if (Array.isArray(value)) {
|
|
2148
|
-
stringifiedValue = value.map((v) => (0, import_common3.
|
|
2148
|
+
stringifiedValue = value.map((v) => (0, import_common3.toPlainString)(v));
|
|
2149
2149
|
} else {
|
|
2150
|
-
stringifiedValue = (0, import_common3.
|
|
2150
|
+
stringifiedValue = (0, import_common3.toPlainString)(value);
|
|
2151
2151
|
}
|
|
2152
2152
|
return originalSetHeader.call(this, name, stringifiedValue);
|
|
2153
2153
|
};
|
package/lib/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "@forklaunch/core/http";
|
|
5
5
|
|
|
6
6
|
// src/expressApplication.ts
|
|
7
|
-
import { getEnvVar, safeStringify
|
|
7
|
+
import { getEnvVar, safeStringify } from "@forklaunch/common";
|
|
8
8
|
import {
|
|
9
9
|
ATTR_HTTP_RESPONSE_STATUS_CODE,
|
|
10
10
|
createMcpHttpHandler,
|
|
@@ -2099,7 +2099,7 @@ async function writeFetchResponse(response, res) {
|
|
|
2099
2099
|
}
|
|
2100
2100
|
|
|
2101
2101
|
// src/middleware/enrichResponseTransmission.middleware.ts
|
|
2102
|
-
import {
|
|
2102
|
+
import { toPlainString } from "@forklaunch/common";
|
|
2103
2103
|
import {
|
|
2104
2104
|
enrichExpressLikeSend
|
|
2105
2105
|
} from "@forklaunch/core/http";
|
|
@@ -2123,9 +2123,9 @@ function enrichResponseTransmission(req, res, next) {
|
|
|
2123
2123
|
res.setHeader = function(name, value) {
|
|
2124
2124
|
let stringifiedValue;
|
|
2125
2125
|
if (Array.isArray(value)) {
|
|
2126
|
-
stringifiedValue = value.map((v) =>
|
|
2126
|
+
stringifiedValue = value.map((v) => toPlainString(v));
|
|
2127
2127
|
} else {
|
|
2128
|
-
stringifiedValue =
|
|
2128
|
+
stringifiedValue = toPlainString(value);
|
|
2129
2129
|
}
|
|
2130
2130
|
return originalSetHeader.call(this, name, stringifiedValue);
|
|
2131
2131
|
};
|
|
@@ -2362,7 +2362,7 @@ var Application = class extends ForklaunchExpressLikeApplication {
|
|
|
2362
2362
|
this.internal.get(
|
|
2363
2363
|
`/api${process.env.VERSION ? `/${process.env.VERSION}` : ""}/openapi-hash`,
|
|
2364
2364
|
async (_, res) => {
|
|
2365
|
-
const hash = await crypto2.createHash("sha256").update(
|
|
2365
|
+
const hash = await crypto2.createHash("sha256").update(safeStringify(openApi)).digest("hex");
|
|
2366
2366
|
res.send(hash);
|
|
2367
2367
|
}
|
|
2368
2368
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/express",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Forklaunch framework for express.",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"lib/**"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@forklaunch/common": "^
|
|
32
|
-
"@forklaunch/core": "^4.1.
|
|
33
|
-
"@forklaunch/validator": "^1.3.
|
|
31
|
+
"@forklaunch/common": "^2.0.0",
|
|
32
|
+
"@forklaunch/core": "^4.1.1",
|
|
33
|
+
"@forklaunch/validator": "^1.3.1",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
35
|
-
"@scalar/express-api-reference": "^0.10.
|
|
35
|
+
"@scalar/express-api-reference": "^0.10.43",
|
|
36
36
|
"@types/multer": "^2.3.0",
|
|
37
37
|
"body-parser": "^2.4.0",
|
|
38
38
|
"busboy": "^1.6.0",
|
|
39
39
|
"cors": "^2.8.6",
|
|
40
40
|
"express": "^5.3.0",
|
|
41
|
-
"fastmcp": "^4.
|
|
41
|
+
"fastmcp": "^4.30.2",
|
|
42
42
|
"multer": "2.5.0",
|
|
43
43
|
"qs": "^6.17.1",
|
|
44
44
|
"range-parser": "^1.3.0",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@eslint/js": "^10.0.1",
|
|
49
|
-
"@types/body-parser": "^
|
|
50
|
-
"@types/bun": "^1.4.
|
|
49
|
+
"@types/body-parser": "^2.2.0",
|
|
50
|
+
"@types/bun": "^1.4.5",
|
|
51
51
|
"@types/busboy": "^1.5.5",
|
|
52
52
|
"@types/cors": "^2.8.19",
|
|
53
53
|
"@types/express": "^5.0.6",
|
|
54
54
|
"@types/express-serve-static-core": "^5.1.3",
|
|
55
|
-
"@types/node": "^26.6.
|
|
55
|
+
"@types/node": "^26.6.11",
|
|
56
56
|
"@types/qs": "^6.15.1",
|
|
57
57
|
"@types/range-parser": "^1.2.7",
|
|
58
58
|
"@types/swagger-ui-express": "^4.1.8",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"ts-node": "^10.9.2",
|
|
62
62
|
"tsup": "^9.0.0",
|
|
63
63
|
"typescript": "^7.0.2",
|
|
64
|
-
"typescript-eslint": "^8.
|
|
64
|
+
"typescript-eslint": "^8.74.0"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "tsc --noEmit && tsup index.ts --format cjs,esm --no-splitting --tsconfig tsconfig.json --outDir lib --clean && tsc -p tsconfig.build.json --emitDeclarationOnly",
|