figmanage 1.3.3 → 1.3.5
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/dist/mcp.js +4 -1
- package/package.json +1 -1
package/dist/mcp.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createServer } from 'node:http';
|
|
2
2
|
import { randomBytes } from 'node:crypto';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
3
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
5
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
5
6
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
@@ -65,9 +66,11 @@ export async function startMcpServer() {
|
|
|
65
66
|
const config = loadAuthConfig();
|
|
66
67
|
const readOnly = process.env.FIGMA_READ_ONLY === '1' || process.env.FIGMA_READ_ONLY === 'true';
|
|
67
68
|
const enabledToolsets = parseToolsets(process.env.FIGMA_TOOLSETS);
|
|
69
|
+
const require = createRequire(import.meta.url);
|
|
70
|
+
const { version } = require('../package.json');
|
|
68
71
|
const server = new McpServer({
|
|
69
72
|
name: 'figmanage',
|
|
70
|
-
version
|
|
73
|
+
version,
|
|
71
74
|
});
|
|
72
75
|
const fullyConfigured = hasPat(config) && hasCookie(config);
|
|
73
76
|
if (fullyConfigured) {
|
package/package.json
CHANGED