@bytebase/dbhub 0.11.9 → 0.11.10

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4201,13 +4201,19 @@ See documentation for more details on configuring database connections.
4201
4201
  });
4202
4202
  app.get("/api/sources", listSources);
4203
4203
  app.get("/api/sources/:sourceId", getSource);
4204
+ app.get("/mcp", (req, res) => {
4205
+ res.status(405).json({
4206
+ error: "Method Not Allowed",
4207
+ message: "SSE streaming is not supported in stateless mode. Use POST requests with JSON responses."
4208
+ });
4209
+ });
4204
4210
  app.post("/mcp", async (req, res) => {
4205
4211
  try {
4206
4212
  const transport = new StreamableHTTPServerTransport({
4207
4213
  sessionIdGenerator: void 0,
4208
4214
  // Disable session management for stateless mode
4209
- enableJsonResponse: false
4210
- // Use SSE streaming
4215
+ enableJsonResponse: true
4216
+ // Use JSON responses (SSE not supported in stateless mode)
4211
4217
  });
4212
4218
  const server = createServer2();
4213
4219
  await server.connect(transport);
@@ -4219,9 +4225,11 @@ See documentation for more details on configuring database connections.
4219
4225
  }
4220
4226
  }
4221
4227
  });
4222
- app.get("*", (req, res) => {
4223
- res.sendFile(path3.join(frontendPath, "index.html"));
4224
- });
4228
+ if (process.env.NODE_ENV !== "development") {
4229
+ app.get("*", (req, res) => {
4230
+ res.sendFile(path3.join(frontendPath, "index.html"));
4231
+ });
4232
+ }
4225
4233
  app.listen(port, "0.0.0.0", () => {
4226
4234
  if (process.env.NODE_ENV === "development") {
4227
4235
  console.error("Development mode detected!");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebase/dbhub",
3
- "version": "0.11.9",
3
+ "version": "0.11.10",
4
4
  "description": "Universal Database MCP Server",
5
5
  "repository": {
6
6
  "type": "git",