@forklaunch/express 0.9.29 → 0.9.31
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 +18 -10
- package/lib/index.mjs +18 -10
- package/package.json +9 -9
package/lib/index.js
CHANGED
|
@@ -84,11 +84,11 @@ var BunSocketShim = class extends import_stream.Duplex {
|
|
|
84
84
|
allowHalfOpen: false,
|
|
85
85
|
objectMode: false
|
|
86
86
|
});
|
|
87
|
-
this.remoteAddress = options2.remoteAddress
|
|
88
|
-
this.remotePort = options2.remotePort
|
|
87
|
+
this.remoteAddress = options2.remoteAddress ?? "127.0.0.1";
|
|
88
|
+
this.remotePort = options2.remotePort ?? 0;
|
|
89
89
|
this.remoteFamily = "IPv4";
|
|
90
|
-
this.localAddress = options2.localAddress
|
|
91
|
-
this.localPort = options2.localPort
|
|
90
|
+
this.localAddress = options2.localAddress ?? "localhost";
|
|
91
|
+
this.localPort = options2.localPort ?? 0;
|
|
92
92
|
this.localFamily = "IPv4";
|
|
93
93
|
this._abortController = options2.abortController || new AbortController();
|
|
94
94
|
this._request = options2.request;
|
|
@@ -212,9 +212,9 @@ var BunSocketShim = class extends import_stream.Duplex {
|
|
|
212
212
|
this.localFamily = "IPv4";
|
|
213
213
|
} else if (typeof optionsPortOrPath === "string") {
|
|
214
214
|
this.remoteAddress = optionsPortOrPath;
|
|
215
|
-
this.remotePort =
|
|
215
|
+
this.remotePort = 0;
|
|
216
216
|
this.localAddress = optionsPortOrPath;
|
|
217
|
-
this.localPort =
|
|
217
|
+
this.localPort = 0;
|
|
218
218
|
this.remoteFamily = "Unix";
|
|
219
219
|
this.localFamily = "Unix";
|
|
220
220
|
listener = typeof hostOrConnectionListener === "function" ? hostOrConnectionListener : connectionListener;
|
|
@@ -222,9 +222,9 @@ var BunSocketShim = class extends import_stream.Duplex {
|
|
|
222
222
|
const options2 = optionsPortOrPath;
|
|
223
223
|
if ("path" in options2) {
|
|
224
224
|
this.remoteAddress = options2.path;
|
|
225
|
-
this.remotePort =
|
|
225
|
+
this.remotePort = 0;
|
|
226
226
|
this.localAddress = options2.path;
|
|
227
|
-
this.localPort =
|
|
227
|
+
this.localPort = 0;
|
|
228
228
|
this.remoteFamily = "Unix";
|
|
229
229
|
this.localFamily = "Unix";
|
|
230
230
|
} else {
|
|
@@ -250,8 +250,12 @@ var BunSocketShim = class extends import_stream.Duplex {
|
|
|
250
250
|
this.connecting = false;
|
|
251
251
|
this.pending = false;
|
|
252
252
|
this.readyState = "open";
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
if (port !== void 0) {
|
|
254
|
+
this.remotePort = port;
|
|
255
|
+
}
|
|
256
|
+
if (host !== void 0) {
|
|
257
|
+
this.remoteAddress = host;
|
|
258
|
+
}
|
|
255
259
|
this.emit("connect");
|
|
256
260
|
});
|
|
257
261
|
return this;
|
|
@@ -2249,6 +2253,10 @@ Correlation id: ${(0, import_http3.isForklaunchRequest)(req) ? req.context.corre
|
|
|
2249
2253
|
);
|
|
2250
2254
|
};
|
|
2251
2255
|
this.internal.use(errorHandler);
|
|
2256
|
+
this.internal.use((req, res, next) => {
|
|
2257
|
+
res.setHeader("X-Powered-By", "forklaunch");
|
|
2258
|
+
next();
|
|
2259
|
+
});
|
|
2252
2260
|
const { workerCount, ssl, routingStrategy } = this.hostingConfiguration ?? {};
|
|
2253
2261
|
if (workerCount != null && workerCount > 1) {
|
|
2254
2262
|
if (typeof Bun !== "undefined") {
|
package/lib/index.mjs
CHANGED
|
@@ -55,11 +55,11 @@ var BunSocketShim = class extends Duplex {
|
|
|
55
55
|
allowHalfOpen: false,
|
|
56
56
|
objectMode: false
|
|
57
57
|
});
|
|
58
|
-
this.remoteAddress = options2.remoteAddress
|
|
59
|
-
this.remotePort = options2.remotePort
|
|
58
|
+
this.remoteAddress = options2.remoteAddress ?? "127.0.0.1";
|
|
59
|
+
this.remotePort = options2.remotePort ?? 0;
|
|
60
60
|
this.remoteFamily = "IPv4";
|
|
61
|
-
this.localAddress = options2.localAddress
|
|
62
|
-
this.localPort = options2.localPort
|
|
61
|
+
this.localAddress = options2.localAddress ?? "localhost";
|
|
62
|
+
this.localPort = options2.localPort ?? 0;
|
|
63
63
|
this.localFamily = "IPv4";
|
|
64
64
|
this._abortController = options2.abortController || new AbortController();
|
|
65
65
|
this._request = options2.request;
|
|
@@ -183,9 +183,9 @@ var BunSocketShim = class extends Duplex {
|
|
|
183
183
|
this.localFamily = "IPv4";
|
|
184
184
|
} else if (typeof optionsPortOrPath === "string") {
|
|
185
185
|
this.remoteAddress = optionsPortOrPath;
|
|
186
|
-
this.remotePort =
|
|
186
|
+
this.remotePort = 0;
|
|
187
187
|
this.localAddress = optionsPortOrPath;
|
|
188
|
-
this.localPort =
|
|
188
|
+
this.localPort = 0;
|
|
189
189
|
this.remoteFamily = "Unix";
|
|
190
190
|
this.localFamily = "Unix";
|
|
191
191
|
listener = typeof hostOrConnectionListener === "function" ? hostOrConnectionListener : connectionListener;
|
|
@@ -193,9 +193,9 @@ var BunSocketShim = class extends Duplex {
|
|
|
193
193
|
const options2 = optionsPortOrPath;
|
|
194
194
|
if ("path" in options2) {
|
|
195
195
|
this.remoteAddress = options2.path;
|
|
196
|
-
this.remotePort =
|
|
196
|
+
this.remotePort = 0;
|
|
197
197
|
this.localAddress = options2.path;
|
|
198
|
-
this.localPort =
|
|
198
|
+
this.localPort = 0;
|
|
199
199
|
this.remoteFamily = "Unix";
|
|
200
200
|
this.localFamily = "Unix";
|
|
201
201
|
} else {
|
|
@@ -221,8 +221,12 @@ var BunSocketShim = class extends Duplex {
|
|
|
221
221
|
this.connecting = false;
|
|
222
222
|
this.pending = false;
|
|
223
223
|
this.readyState = "open";
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
if (port !== void 0) {
|
|
225
|
+
this.remotePort = port;
|
|
226
|
+
}
|
|
227
|
+
if (host !== void 0) {
|
|
228
|
+
this.remoteAddress = host;
|
|
229
|
+
}
|
|
226
230
|
this.emit("connect");
|
|
227
231
|
});
|
|
228
232
|
return this;
|
|
@@ -2222,6 +2226,10 @@ Correlation id: ${isForklaunchRequest(req) ? req.context.correlationId : "No cor
|
|
|
2222
2226
|
);
|
|
2223
2227
|
};
|
|
2224
2228
|
this.internal.use(errorHandler);
|
|
2229
|
+
this.internal.use((req, res, next) => {
|
|
2230
|
+
res.setHeader("X-Powered-By", "forklaunch");
|
|
2231
|
+
next();
|
|
2232
|
+
});
|
|
2225
2233
|
const { workerCount, ssl, routingStrategy } = this.hostingConfiguration ?? {};
|
|
2226
2234
|
if (workerCount != null && workerCount > 1) {
|
|
2227
2235
|
if (typeof Bun !== "undefined") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/express",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.31",
|
|
4
4
|
"description": "Forklaunch framework for express.",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@forklaunch/fastmcp-fork": "^1.0.5",
|
|
29
|
-
"@modelcontextprotocol/sdk": "^1.20.
|
|
29
|
+
"@modelcontextprotocol/sdk": "^1.20.2",
|
|
30
30
|
"@scalar/express-api-reference": "^0.8.22",
|
|
31
31
|
"@types/multer": "^2.0.0",
|
|
32
32
|
"body-parser": "^2.2.0",
|
|
@@ -37,23 +37,23 @@
|
|
|
37
37
|
"qs": "^6.14.0",
|
|
38
38
|
"range-parser": "^1.2.1",
|
|
39
39
|
"swagger-ui-express": "^5.0.1",
|
|
40
|
-
"@forklaunch/common": "0.6.
|
|
41
|
-
"@forklaunch/
|
|
42
|
-
"@forklaunch/
|
|
40
|
+
"@forklaunch/common": "0.6.22",
|
|
41
|
+
"@forklaunch/core": "0.15.12",
|
|
42
|
+
"@forklaunch/validator": "0.10.22"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@eslint/js": "^9.38.0",
|
|
46
46
|
"@types/body-parser": "^1.19.6",
|
|
47
|
-
"@types/bun": "^1.3.
|
|
47
|
+
"@types/bun": "^1.3.1",
|
|
48
48
|
"@types/busboy": "^1.5.4",
|
|
49
49
|
"@types/cors": "^2.8.19",
|
|
50
|
-
"@types/express": "^5.0.
|
|
50
|
+
"@types/express": "^5.0.5",
|
|
51
51
|
"@types/express-serve-static-core": "^5.1.0",
|
|
52
52
|
"@types/jest": "^30.0.0",
|
|
53
53
|
"@types/qs": "^6.14.0",
|
|
54
54
|
"@types/range-parser": "^1.2.7",
|
|
55
55
|
"@types/swagger-ui-express": "^4.1.8",
|
|
56
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
56
|
+
"@typescript/native-preview": "7.0.0-dev.20251027.1",
|
|
57
57
|
"jest": "^30.2.0",
|
|
58
58
|
"kill-port-process": "^3.2.1",
|
|
59
59
|
"prettier": "^3.6.2",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"tsup": "^8.5.0",
|
|
63
63
|
"typedoc": "^0.28.14",
|
|
64
64
|
"typescript": "^5.9.3",
|
|
65
|
-
"typescript-eslint": "^8.46.
|
|
65
|
+
"typescript-eslint": "^8.46.2"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"build": "tsgo --noEmit && tsup index.ts --format cjs,esm --no-splitting --tsconfig tsconfig.json --outDir lib --dts --clean",
|