@airabbit/sqlite-mcp-server 0.1.4 → 0.1.6

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/build/index.js +14 -1
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -447,7 +447,20 @@ export class SqliteMcpServer {
447
447
  console.error('SQLite MCP server running on stdio');
448
448
  }
449
449
  }
450
- if (import.meta.url === `file://${process.argv[1]}`) {
450
+ function isMainModule() {
451
+ if (!process.argv[1]) {
452
+ return false;
453
+ }
454
+ try {
455
+ const entryPath = fs.realpathSync(process.argv[1]);
456
+ const modulePath = fs.realpathSync(fileURLToPath(import.meta.url));
457
+ return entryPath === modulePath;
458
+ }
459
+ catch {
460
+ return false;
461
+ }
462
+ }
463
+ if (isMainModule()) {
451
464
  const server = new SqliteMcpServer();
452
465
  server.run().catch(console.error);
453
466
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airabbit/sqlite-mcp-server",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Generic SQLite Model Context Protocol (MCP) server",
5
5
  "main": "build/index.js",
6
6
  "bin": {