figma-mcp-console 0.5.1 → 0.5.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.
- package/bin/darwin-amd64/figma-mcp +0 -0
- package/bin/darwin-arm64/figma-mcp +0 -0
- package/bin/linux-amd64/figma-mcp +0 -0
- package/bin/linux-arm64/figma-mcp +0 -0
- package/bin/windows-amd64/figma-mcp.exe +0 -0
- package/bin/windows-arm64/figma-mcp.exe +0 -0
- package/package.json +1 -1
- package/run.js +7 -7
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/run.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
//
|
|
3
|
-
// stdout
|
|
2
|
+
// Run the Go binary bundled in the npm package — NO network/GitHub download.
|
|
3
|
+
// stdout is the MCP transport → all wrapper logs go to stderr.
|
|
4
4
|
"use strict";
|
|
5
5
|
const { spawnSync } = require("child_process");
|
|
6
6
|
const fs = require("fs");
|
|
@@ -24,8 +24,8 @@ const binPath = path.join(
|
|
|
24
24
|
`figma-mcp${exe}`,
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
//
|
|
28
|
-
//
|
|
27
|
+
// Subcommand: install-plugin — extract the plugin into a VISIBLE folder (no leading dot)
|
|
28
|
+
// and open that folder so the user sees manifest.json right away.
|
|
29
29
|
if (process.argv[2] === "install-plugin") {
|
|
30
30
|
const srcDir = path.join(__dirname, "bin", "plugin");
|
|
31
31
|
const destDir = path.join(os.homedir(), "figma-mcp-console-plugin");
|
|
@@ -42,7 +42,7 @@ if (process.argv[2] === "install-plugin") {
|
|
|
42
42
|
"\n\n",
|
|
43
43
|
);
|
|
44
44
|
|
|
45
|
-
//
|
|
45
|
+
// Open the folder in the file manager (best-effort; ignore errors).
|
|
46
46
|
const opener =
|
|
47
47
|
plat === "darwin" ? "open" : plat === "windows" ? "explorer" : "xdg-open";
|
|
48
48
|
try {
|
|
@@ -51,10 +51,10 @@ if (process.argv[2] === "install-plugin") {
|
|
|
51
51
|
process.exit(0);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
if (!fs.existsSync(binPath)) fail(`
|
|
54
|
+
if (!fs.existsSync(binPath)) fail(`binary not found for ${plat}-${arch}`);
|
|
55
55
|
try {
|
|
56
56
|
fs.chmodSync(binPath, 0o755);
|
|
57
57
|
} catch (_) {}
|
|
58
58
|
const r = spawnSync(binPath, process.argv.slice(2), { stdio: "inherit" });
|
|
59
|
-
if (r.error) fail(`
|
|
59
|
+
if (r.error) fail(`failed to start server: ${r.error.message}`);
|
|
60
60
|
process.exit(r.status === null ? 1 : r.status);
|