@createlex/figma-swiftui-mcp 1.0.1 → 1.0.3

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.
@@ -28,6 +28,37 @@ Examples:
28
28
  `);
29
29
  }
30
30
 
31
+ function printCommandHelp(command) {
32
+ if (command === 'login') {
33
+ console.log(`${CLI_NAME} login
34
+
35
+ Usage:
36
+ npx ${PACKAGE_NAME} login
37
+
38
+ Description:
39
+ Open the CreateLex browser login flow and save ~/.createlex/auth.json
40
+ `);
41
+ return;
42
+ }
43
+
44
+ if (command === 'start') {
45
+ console.log(`${CLI_NAME} start
46
+
47
+ Usage:
48
+ npx ${PACKAGE_NAME} start [--project /path/to/Xcode/source]
49
+
50
+ Options:
51
+ --project <path> Set the Xcode source folder used for generated SwiftUI output
52
+
53
+ Description:
54
+ Start the local figma-swiftui MCP runtime and localhost bridge
55
+ `);
56
+ return;
57
+ }
58
+
59
+ printHelp();
60
+ }
61
+
31
62
  function resolveEntry(command) {
32
63
  if (command === 'login') {
33
64
  return path.join(__dirname, '..', 'companion', 'login.mjs');
@@ -56,12 +87,21 @@ function runNode(entry, args) {
56
87
 
57
88
  const packageJson = require(path.join(__dirname, '..', 'package.json'));
58
89
  const [command = 'help', ...args] = process.argv.slice(2);
90
+ const wantsHelp = args.includes('--help') || args.includes('-h');
59
91
 
60
92
  switch (command) {
61
93
  case 'login':
94
+ if (wantsHelp) {
95
+ printCommandHelp('login');
96
+ break;
97
+ }
62
98
  runNode(resolveEntry('login'), args);
63
99
  break;
64
100
  case 'start':
101
+ if (wantsHelp) {
102
+ printCommandHelp('start');
103
+ break;
104
+ }
65
105
  runNode(resolveEntry('start'), args);
66
106
  break;
67
107
  case 'help':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@createlex/figma-swiftui-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "CreateLex MCP runtime for Figma-to-SwiftUI generation and Xcode export",
5
5
  "bin": {
6
6
  "figma-swiftui-mcp": "bin/figma-swiftui-mcp.js"
@@ -20,7 +20,6 @@
20
20
  "access": "public"
21
21
  },
22
22
  "scripts": {
23
- "postinstall": "npm --prefix companion install",
24
23
  "build": "tsc",
25
24
  "login": "node bin/figma-swiftui-mcp.js login",
26
25
  "start": "node bin/figma-swiftui-mcp.js start",
@@ -32,6 +31,13 @@
32
31
  "engines": {
33
32
  "node": ">=18.0.0"
34
33
  },
34
+ "dependencies": {
35
+ "@modelcontextprotocol/sdk": "^1.28.0",
36
+ "cors": "^2.8.5",
37
+ "express": "^4.18.0",
38
+ "ws": "^8.20.0",
39
+ "zod": "^4.3.6"
40
+ },
35
41
  "devDependencies": {
36
42
  "@figma/plugin-typings": "*",
37
43
  "typescript": "^5.4.0"