figma-mcp-console 0.4.1 → 0.5.0

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.
Binary file
Binary file
Binary file
Binary file
@@ -97,10 +97,12 @@
97
97
  // background tabs throttle timers, so a visibility change and a click on
98
98
  // the status line also trigger an immediate attempt.
99
99
  const PORT = 2000,
100
- RETRY = 1000;
100
+ RETRY = 1000,
101
+ PROTOCOL = 1; // must match bridge.ProtocolVersion in the Go server
101
102
  let ws = null; // open connection, null while disconnected
102
103
  let attempt = null; // socket currently trying to connect
103
104
  let reg = null; // {key, name} of this file, sent by the main thread
105
+ let protoWarning = null; // set when the server reports a newer protocol
104
106
 
105
107
  function setStatus(connected, text) {
106
108
  document.getElementById("dot").className = connected ? "on" : "";
@@ -108,6 +110,7 @@
108
110
  }
109
111
 
110
112
  function label() {
113
+ if (protoWarning) return protoWarning;
111
114
  return reg ? "Connected · " + reg.name : "Connected (port " + PORT + ")";
112
115
  }
113
116
 
@@ -136,6 +139,10 @@
136
139
  sock.onmessage = (e) => {
137
140
  const msg = JSON.parse(e.data);
138
141
  if (msg.hello) {
142
+ protoWarning =
143
+ msg.hello.protocol && msg.hello.protocol !== PROTOCOL
144
+ ? "⚠ Plugin outdated — re-import from the latest release"
145
+ : null;
139
146
  setStatus(true, label());
140
147
  return;
141
148
  }
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "figma-mcp-console",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "scripts": {
5
5
  "prepublishOnly": "cp ../README.md ./README.md"
6
6
  },