api2ai 1.0.3 → 1.0.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.
@@ -15,7 +15,6 @@
15
15
 
16
16
  import fs from 'fs/promises';
17
17
  import path from 'path';
18
- import { fileURLToPath } from 'url';
19
18
 
20
19
  // ============================================================================
21
20
  // OpenAPI Spec Loading & Parsing
@@ -247,9 +246,9 @@ function generatePackageJson(serverName, tools, port) {
247
246
  dev: 'node --watch src/index.js',
248
247
  },
249
248
  dependencies: {
250
- 'mcp-use': '1.11.2',
249
+ 'mcp-use': '^1.11.2',
251
250
  'zod': '^3.23.0',
252
- 'dotenv': '^17.2.3',
251
+ 'dotenv': '^16.4.0',
253
252
  },
254
253
  engines: { node: '>=18.0.0' },
255
254
  }, null, 2);
@@ -776,7 +775,7 @@ Then open http://localhost:${port}/inspector to test your tools!
776
775
  export { generateMcpServer, extractTools, loadOpenApiSpec };
777
776
 
778
777
  // CLI entry point
779
- const isMainModule = process.argv[1] === fileURLToPath(import.meta.url);
778
+ const isMainModule = process.argv[1]?.includes('api2ai');
780
779
 
781
780
  if (isMainModule) {
782
781
  const args = process.argv.slice(2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api2ai",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Generate MCP servers from OpenAPI specs using the mcp-use framework",
5
5
  "type": "module",
6
6
  "main": "generate-mcp-use-server.js",
@@ -12,9 +12,7 @@
12
12
  "generate": "node generate-mcp-use-server.js",
13
13
  "example:petstore": "node generate-mcp-use-server.js https://petstore3.swagger.io/api/v3/openapi.json ./example-petstore --name petstore-api --port 3000"
14
14
  },
15
- "dependencies": {
16
- "js-yaml": "^4.1.0"
17
- },
15
+ "dependencies": {},
18
16
  "devDependencies": {
19
17
  "js-yaml": "^4.1.0"
20
18
  },