mirror of
https://github.com/penpot/penpot.git
synced 2026-04-03 18:02:39 +02:00
✨ Provide root package version as PENPOT_MCP_VERSION in plugin
Update current root package version using set-version script
This commit is contained in:
committed by
Alonso Torres
parent
0122eaa391
commit
905f4fa5dd
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@penpot/mcp",
|
||||
"version": "1.0.0",
|
||||
"version": "2.15.0-rc.1.153",
|
||||
"description": "MCP server for Penpot integration",
|
||||
"bin": {
|
||||
"penpot-mcp": "./bin/mcp-local.js"
|
||||
|
||||
1
mcp/packages/plugin/src/vite-env.d.ts
vendored
1
mcp/packages/plugin/src/vite-env.d.ts
vendored
@@ -2,3 +2,4 @@
|
||||
|
||||
declare const IS_MULTI_USER_MODE: boolean;
|
||||
declare const PENPOT_MCP_WEBSOCKET_URL: string;
|
||||
declare const PENPOT_MCP_VERSION: string;
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
import { defineConfig } from "vite";
|
||||
import livePreview from "vite-live-preview";
|
||||
import { createRequire } from "module";
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const rootPkg = require("../../package.json");
|
||||
|
||||
let WS_URI = process.env.WS_URI || "http://localhost:4402";
|
||||
let SERVER_HOST = process.env.PENPOT_MCP_PLUGIN_SERVER_HOST ?? "localhost";
|
||||
let MCP_VERSION = JSON.stringify(rootPkg.version);
|
||||
|
||||
console.log("Will define PENPOT_MCP_WEBSOCKET_URL as:", JSON.stringify(WS_URI));
|
||||
console.log("PENPOT_MCP_WEBSOCKET_URL:", JSON.stringify(WS_URI));
|
||||
console.log("PENPOT_MCP_VERSION:", MCP_VERSION);
|
||||
|
||||
export default defineConfig({
|
||||
base: "./",
|
||||
@@ -37,5 +43,6 @@ export default defineConfig({
|
||||
},
|
||||
define: {
|
||||
PENPOT_MCP_WEBSOCKET_URL: JSON.stringify(WS_URI),
|
||||
PENPOT_MCP_VERSION: MCP_VERSION,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user