bluera-knowledge 0.14.5 → 0.14.7

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.
@@ -7,7 +7,7 @@ import {
7
7
  createStoreId,
8
8
  destroyServices,
9
9
  summarizePayload
10
- } from "./chunk-EE4Y4P3M.js";
10
+ } from "./chunk-5VW5DNW4.js";
11
11
 
12
12
  // src/mcp/server.ts
13
13
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -2270,4 +2270,4 @@ export {
2270
2270
  createMCPServer,
2271
2271
  runMCPServer
2272
2272
  };
2273
- //# sourceMappingURL=chunk-U77KS2BI.js.map
2273
+ //# sourceMappingURL=chunk-SWHYQLSJ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  createLogger,
4
4
  summarizePayload,
5
5
  truncateForLog
6
- } from "./chunk-EE4Y4P3M.js";
6
+ } from "./chunk-5VW5DNW4.js";
7
7
 
8
8
  // src/crawl/intelligent-crawler.ts
9
9
  import { EventEmitter } from "events";
@@ -833,4 +833,4 @@ export {
833
833
  getCrawlStrategy,
834
834
  IntelligentCrawler
835
835
  };
836
- //# sourceMappingURL=chunk-2YNQ7ZF7.js.map
836
+ //# sourceMappingURL=chunk-TGMFSPTQ.js.map
package/dist/index.js CHANGED
@@ -7,11 +7,11 @@ import {
7
7
  isWebStoreDefinition,
8
8
  runMCPServer,
9
9
  spawnBackgroundWorker
10
- } from "./chunk-U77KS2BI.js";
10
+ } from "./chunk-SWHYQLSJ.js";
11
11
  import {
12
12
  IntelligentCrawler,
13
13
  getCrawlStrategy
14
- } from "./chunk-2YNQ7ZF7.js";
14
+ } from "./chunk-TGMFSPTQ.js";
15
15
  import {
16
16
  ASTParser,
17
17
  AdapterRegistry,
@@ -25,7 +25,7 @@ import {
25
25
  err,
26
26
  extractRepoName,
27
27
  ok
28
- } from "./chunk-EE4Y4P3M.js";
28
+ } from "./chunk-5VW5DNW4.js";
29
29
  import "./chunk-HRQD3MPH.js";
30
30
 
31
31
  // src/index.ts
@@ -1276,20 +1276,22 @@ function createServeCommand(getOptions) {
1276
1276
  const app = createApp(services);
1277
1277
  const port = parseInt(options.port ?? "3847", 10);
1278
1278
  const host = options.host ?? "127.0.0.1";
1279
- const shutdown = () => {
1280
- void (async () => {
1281
- await destroyServices(services);
1282
- process.exit(0);
1283
- })();
1284
- };
1285
- process.on("SIGINT", shutdown);
1286
- process.on("SIGTERM", shutdown);
1287
1279
  console.log(`Starting server on http://${host}:${String(port)}`);
1288
- serve({
1280
+ const server = serve({
1289
1281
  fetch: app.fetch,
1290
1282
  port,
1291
1283
  hostname: host
1292
1284
  });
1285
+ let shuttingDown = false;
1286
+ const shutdown = () => {
1287
+ if (shuttingDown) return;
1288
+ shuttingDown = true;
1289
+ server.close(() => {
1290
+ void destroyServices(services);
1291
+ });
1292
+ };
1293
+ process.on("SIGINT", shutdown);
1294
+ process.on("SIGTERM", shutdown);
1293
1295
  });
1294
1296
  }
1295
1297