xcode-cli 1.0.6 → 1.0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/xcode.ts +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xcode-cli",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test \"tests/**/*.test.ts\"",
package/src/xcode.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { execFile } from 'node:child_process';
3
3
  import { promisify } from 'node:util';
4
+ import { createRequire } from 'node:module';
4
5
  import { Command } from 'commander';
5
6
  import { createRuntime, createServerProxy, describeConnectionIssue } from 'mcporter';
6
7
  import type { CallResult } from 'mcporter';
@@ -12,6 +13,7 @@ import { parseTestSpecifier, type ParsedTestSpecifier } from './xcode-test.ts';
12
13
  import { renderLsTree } from './xcode-tree.ts';
13
14
  import type { CommonOpts, ClientContext } from './xcode-types.ts';
14
15
 
16
+ const { version } = createRequire(import.meta.url)('../package.json');
15
17
  const SERVER_NAME = 'xcode-tools';
16
18
  const DEFAULT_PORT = '48321';
17
19
  const DEFAULT_URL = `http://localhost:${DEFAULT_PORT}/mcp`;
@@ -20,6 +22,7 @@ const program = new Command();
20
22
  program
21
23
  .name('xcode-cli')
22
24
  .description('Friendly Xcode MCP CLI for browsing, editing, building, and testing projects.')
25
+ .version(version, '-v, --version')
23
26
  .option('--url <url>', `MCP endpoint (default: ${DEFAULT_URL})`)
24
27
  .option('--tab <tabIdentifier>', 'Default tab identifier for commands that need it')
25
28
  .option('-t, --timeout <ms>', 'Call timeout in milliseconds', '60000')