mcp-server-penpot 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.
package/dist/index.js CHANGED
@@ -15075,6 +15075,12 @@ var PenpotMcpServer = class {
15075
15075
  const pluginDistPath = path5.join(__dirname2, "plugin");
15076
15076
  const fs4 = await import("fs");
15077
15077
  if (fs4.existsSync(pluginDistPath)) {
15078
+ pluginApp.use((_req, res, next) => {
15079
+ res.setHeader("Access-Control-Allow-Origin", "*");
15080
+ res.setHeader("Access-Control-Allow-Methods", "GET, OPTIONS");
15081
+ res.setHeader("Access-Control-Allow-Headers", "*");
15082
+ next();
15083
+ });
15078
15084
  pluginApp.use(express2.static(pluginDistPath));
15079
15085
  return new Promise((resolve2) => {
15080
15086
  pluginApp.listen(this.pluginPort, this.listenAddress, () => {
@@ -15095,7 +15101,12 @@ var PenpotMcpServer = class {
15095
15101
  const pluginDistPath = path5.join(__dirname2, "plugin");
15096
15102
  const fs4 = await import("fs");
15097
15103
  if (fs4.existsSync(pluginDistPath)) {
15098
- this.app.use("/plugin", express2.static(pluginDistPath));
15104
+ this.app.use("/plugin", (_req, res, next) => {
15105
+ res.setHeader("Access-Control-Allow-Origin", "*");
15106
+ res.setHeader("Access-Control-Allow-Methods", "GET, OPTIONS");
15107
+ res.setHeader("Access-Control-Allow-Headers", "*");
15108
+ next();
15109
+ }, express2.static(pluginDistPath));
15099
15110
  this.logger.info(`Plugin files will be served at: http://${this.serverAddress}:${this.port}/plugin/`);
15100
15111
  }
15101
15112
  return new Promise((resolve2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-server-penpot",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "MCP server for Penpot design tool integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "build:server": "esbuild src/index.ts --bundle --platform=node --target=node18 --format=esm --outfile=dist/index.js --external:@modelcontextprotocol/* --external:ws --external:express --external:class-transformer --external:class-validator --external:reflect-metadata --external:pino --external:pino-pretty --external:js-yaml --external:sharp",
15
- "build": "pnpm run build:server && cp -r src/static dist/static && cp -r data dist/data && cp -r ../plugin/dist dist/plugin",
15
+ "build": "pnpm run build:server && rm -rf dist/static dist/data dist/plugin && cp -r src/static dist/static && cp -r data dist/data && cp -r ../plugin/dist dist/plugin",
16
16
  "build:multi-user": "pnpm run build",
17
17
  "build:types": "tsc --emitDeclarationOnly --outDir dist",
18
18
  "start": "node dist/index.js",