vite-plugin-swagger-mcp 0.0.21 → 0.1.0
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/cjs/index.js +0 -2
- package/dist/esm/index.js +0 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -197,13 +197,11 @@ function vitePluginSwaggerMcp({
|
|
|
197
197
|
enableJsonResponse: false,
|
|
198
198
|
onsessioninitialized: (sid) => {
|
|
199
199
|
transports[sid] = transport;
|
|
200
|
-
console.log(`[MCP] Session initialized: ${sid}`);
|
|
201
200
|
}
|
|
202
201
|
});
|
|
203
202
|
transport.onclose = () => {
|
|
204
203
|
if (transport.sessionId)
|
|
205
204
|
delete transports[transport.sessionId];
|
|
206
|
-
console.log(`[MCP] Session closed: ${transport.sessionId}`);
|
|
207
205
|
};
|
|
208
206
|
const mcpServer = createNewServer();
|
|
209
207
|
await mcpServer.connect(transport);
|
package/dist/esm/index.js
CHANGED
|
@@ -442,12 +442,10 @@ export default function vitePluginSwaggerMcp(_ref) {
|
|
|
442
442
|
enableJsonResponse: false,
|
|
443
443
|
onsessioninitialized: function onsessioninitialized(sid) {
|
|
444
444
|
transports[sid] = transport;
|
|
445
|
-
console.log("[MCP] Session initialized: ".concat(sid));
|
|
446
445
|
}
|
|
447
446
|
});
|
|
448
447
|
transport.onclose = function () {
|
|
449
448
|
if (transport.sessionId) delete transports[transport.sessionId];
|
|
450
|
-
console.log("[MCP] Session closed: ".concat(transport.sessionId));
|
|
451
449
|
};
|
|
452
450
|
|
|
453
451
|
// 为这个 Transport 绑定一个新的 Server 实例,防止 "Already initialized"
|