figma-rust-mcp 3.2.8 → 3.2.11

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.
@@ -1,38 +1,38 @@
1
- #!/bin/bash
2
- set -e
3
-
4
- BIN_PATH="target/release/figma-mcp"
5
- if [ ! -f "$BIN_PATH" ]; then
6
- BIN_PATH="target/debug/figma-mcp"
7
- fi
8
-
9
- echo "Testing binary: $BIN_PATH"
10
-
11
- # Test 1: CLI Version
12
- echo "--- Test 1: Version check ---"
13
- $BIN_PATH --version
14
-
15
- # Test 2: MCP Protocol JSON-RPC
16
- echo "--- Test 2: MCP Stdio JSON-RPC ---"
17
- INPUT=$(cat << 'JSON'
18
- {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0.0"}}}
19
- {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
20
- {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"figma_docs","arguments":{"section":"icons"}}}
21
- {"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"figma_status","arguments":{}}}
22
- JSON
23
- )
24
-
25
- OUTPUT=$(echo "$INPUT" | $BIN_PATH --port 38499 2>/dev/null)
26
- echo "$OUTPUT" | head -n 4
27
-
28
- # Verify tool registration in JSON-RPC output
29
- echo "--- Test 3: Verify Tool Registrations (15 tools) ---"
30
- for TOOL in figma_status figma_get_selection figma_inspect_node figma_to_code figma_get_tokens figma_export_asset figma_export_assets figma_index figma_read figma_write figma_rules figma_docs figma_match_components figma_prepare_design figma_verify_ui; do
31
- echo "$OUTPUT" | grep -q "\"name\":\"$TOOL\"" && echo "✓ $TOOL registered"
32
- done
33
-
34
- # Test 4: Node/NPX wrapper test
35
- echo "--- Test 4: NPX Wrapper ---"
36
- node bin/figma-mcp.js --version
37
-
38
- echo "--- All Tests completed successfully! ---"
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ BIN_PATH="target/release/figma-mcp"
5
+ if [ ! -f "$BIN_PATH" ]; then
6
+ BIN_PATH="target/debug/figma-mcp"
7
+ fi
8
+
9
+ echo "Testing binary: $BIN_PATH"
10
+
11
+ # Test 1: CLI Version
12
+ echo "--- Test 1: Version check ---"
13
+ $BIN_PATH --version
14
+
15
+ # Test 2: MCP Protocol JSON-RPC
16
+ echo "--- Test 2: MCP Stdio JSON-RPC ---"
17
+ INPUT=$(cat << 'JSON'
18
+ {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0.0"}}}
19
+ {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
20
+ {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"figma_docs","arguments":{"section":"icons"}}}
21
+ {"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"figma_status","arguments":{}}}
22
+ JSON
23
+ )
24
+
25
+ OUTPUT=$(echo "$INPUT" | $BIN_PATH --port 38499 2>/dev/null)
26
+ echo "$OUTPUT" | head -n 4
27
+
28
+ # Verify tool registration in JSON-RPC output
29
+ echo "--- Test 3: Verify Tool Registrations (15 tools) ---"
30
+ for TOOL in figma_status figma_get_selection figma_inspect_node figma_to_code figma_get_tokens figma_export_asset figma_export_assets figma_index figma_read figma_write figma_rules figma_docs figma_match_components figma_prepare_design figma_verify_ui; do
31
+ echo "$OUTPUT" | grep -q "\"name\":\"$TOOL\"" && echo "✓ $TOOL registered"
32
+ done
33
+
34
+ # Test 4: Node/NPX wrapper test
35
+ echo "--- Test 4: NPX Wrapper ---"
36
+ node bin/figma-mcp.js --version
37
+
38
+ echo "--- All Tests completed successfully! ---"