@stackkedjohn/mcp-factory-cli 0.2.0 → 0.2.2

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/cli.js CHANGED
@@ -1,14 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
+ import { readFileSync } from 'fs';
4
+ import { fileURLToPath } from 'url';
5
+ import { dirname, join } from 'path';
3
6
  import { createCommand } from './commands/create.js';
4
7
  import { validateCommand } from './commands/validate.js';
5
8
  import { listCommand } from './commands/list.js';
6
9
  import { installCommand } from './commands/install.js';
10
+ const __filename = fileURLToPath(import.meta.url);
11
+ const __dirname = dirname(__filename);
12
+ const packageJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
7
13
  const program = new Command();
8
14
  program
9
15
  .name('mcp-factory')
10
16
  .description('Generate production-ready MCP servers from API documentation')
11
- .version('0.1.0');
17
+ .version(packageJson.version);
12
18
  program
13
19
  .command('create')
14
20
  .description('Generate MCP server from API documentation')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackkedjohn/mcp-factory-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Generate production-ready MCP servers from API documentation",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",
@@ -35,7 +35,6 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@anthropic-ai/sdk": "^0.72.1",
38
- "@stackkedjohn/mcp-factory-cli": "^0.1.1",
39
38
  "commander": "^14.0.3",
40
39
  "drafter.js": "^3.2.0",
41
40
  "handlebars": "^4.7.8",
package/src/cli.ts CHANGED
@@ -1,17 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { Command } from 'commander';
4
+ import { readFileSync } from 'fs';
5
+ import { fileURLToPath } from 'url';
6
+ import { dirname, join } from 'path';
4
7
  import { createCommand } from './commands/create.js';
5
8
  import { validateCommand } from './commands/validate.js';
6
9
  import { listCommand } from './commands/list.js';
7
10
  import { installCommand } from './commands/install.js';
8
11
 
12
+ const __filename = fileURLToPath(import.meta.url);
13
+ const __dirname = dirname(__filename);
14
+ const packageJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
15
+
9
16
  const program = new Command();
10
17
 
11
18
  program
12
19
  .name('mcp-factory')
13
20
  .description('Generate production-ready MCP servers from API documentation')
14
- .version('0.1.0');
21
+ .version(packageJson.version);
15
22
 
16
23
  program
17
24
  .command('create')