mcp-proxy 6.4.4 → 6.4.5
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/bin/mcp-proxy.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{stdio-BmURZCbz.mjs → stdio-_93Y9W6l.mjs} +6 -3
- package/dist/{stdio-BmURZCbz.mjs.map → stdio-_93Y9W6l.mjs.map} +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/startHTTPServer.test.ts +54 -0
- package/src/startHTTPServer.ts +11 -6
package/dist/bin/mcp-proxy.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as __toESM, E as __commonJSMin, a as startHTTPServer, i as Client, n as serializeMessage, o as proxyServer, r as Server, t as ReadBuffer, w as InMemoryEventStore } from "../stdio-
|
|
2
|
+
import { D as __toESM, E as __commonJSMin, a as startHTTPServer, i as Client, n as serializeMessage, o as proxyServer, r as Server, t as ReadBuffer, w as InMemoryEventStore } from "../stdio-_93Y9W6l.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { basename, dirname, extname, join, normalize, relative, resolve } from "path";
|
|
5
5
|
import { format, inspect } from "util";
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as NEVER, S as _coercedNumber, T as AuthenticationMiddleware, _ as looseObject, a as startHTTPServer, b as string, c as LATEST_PROTOCOL_VERSION, d as isJSONRPCResultResponse, f as ZodNumber, g as literal, h as boolean, i as Client, l as isInitializedNotification, m as array, n as serializeMessage, o as proxyServer, p as any, r as Server, s as JSONRPCMessageSchema, t as ReadBuffer, u as isJSONRPCRequest, v as number$1, w as InMemoryEventStore, x as url, y as object } from "./stdio-
|
|
1
|
+
import { C as NEVER, S as _coercedNumber, T as AuthenticationMiddleware, _ as looseObject, a as startHTTPServer, b as string, c as LATEST_PROTOCOL_VERSION, d as isJSONRPCResultResponse, f as ZodNumber, g as literal, h as boolean, i as Client, l as isInitializedNotification, m as array, n as serializeMessage, o as proxyServer, p as any, r as Server, s as JSONRPCMessageSchema, t as ReadBuffer, u as isJSONRPCRequest, v as number$1, w as InMemoryEventStore, x as url, y as object } from "./stdio-_93Y9W6l.mjs";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
|
|
4
4
|
//#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/compat.js
|
|
@@ -16253,6 +16253,10 @@ const startHTTPServer = async ({ apiKey, authenticate, cors, createServer, enabl
|
|
|
16253
16253
|
res.writeHead(200).end("pong");
|
|
16254
16254
|
return;
|
|
16255
16255
|
}
|
|
16256
|
+
if (onUnhandledRequest) {
|
|
16257
|
+
await onUnhandledRequest(req, res);
|
|
16258
|
+
if (res.writableEnded) return;
|
|
16259
|
+
}
|
|
16256
16260
|
if (!authMiddleware.validateRequest(req)) {
|
|
16257
16261
|
const authResponse = authMiddleware.getUnauthorizedResponse();
|
|
16258
16262
|
res.writeHead(401, authResponse.headers);
|
|
@@ -16283,8 +16287,7 @@ const startHTTPServer = async ({ apiKey, authenticate, cors, createServer, enabl
|
|
|
16283
16287
|
res,
|
|
16284
16288
|
stateless
|
|
16285
16289
|
})) return;
|
|
16286
|
-
|
|
16287
|
-
else res.writeHead(404).end();
|
|
16290
|
+
res.writeHead(404).end();
|
|
16288
16291
|
};
|
|
16289
16292
|
let httpServer;
|
|
16290
16293
|
if (sslCa || sslCert || sslKey) {
|
|
@@ -24806,4 +24809,4 @@ function serializeMessage(message) {
|
|
|
24806
24809
|
|
|
24807
24810
|
//#endregion
|
|
24808
24811
|
export { NEVER as C, __toESM as D, __commonJSMin as E, _coercedNumber as S, AuthenticationMiddleware as T, looseObject as _, startHTTPServer as a, string as b, LATEST_PROTOCOL_VERSION as c, isJSONRPCResultResponse as d, ZodNumber as f, literal as g, boolean as h, Client as i, isInitializedNotification as l, array as m, serializeMessage as n, proxyServer as o, any as p, Server as r, JSONRPCMessageSchema as s, ReadBuffer as t, isJSONRPCRequest as u, number as v, InMemoryEventStore as w, url as x, object as y };
|
|
24809
|
-
//# sourceMappingURL=stdio-
|
|
24812
|
+
//# sourceMappingURL=stdio-_93Y9W6l.mjs.map
|