diff --git a/inject-manifest.js b/inject-manifest.js deleted file mode 100644 index d77602c..0000000 --- a/inject-manifest.js +++ /dev/null @@ -1,18 +0,0 @@ -// Post-build step: build-figma-plugin strips unknown manifest fields -// (networkAccess), so re-inject it after every build. -const fs = require('fs') -const path = require('path') - -const file = path.join(__dirname, 'manifest.json') -const manifest = JSON.parse(fs.readFileSync(file, 'utf8')) - -manifest.networkAccess = { - allowedDomains: [ - 'https://api.apinex.bond', - 'https://apinex.bond', - 'https://example.com' - ] -} - -fs.writeFileSync(file, JSON.stringify(manifest, null, 2) + '\n') -console.log('[inject-manifest] networkAccess re-injected into manifest.json') diff --git a/manifest.json b/manifest.json index 897bfe9..8acd58e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,23 +1 @@ -{ - "api": "1.0.0", - "editorType": [ - "figma" - ], - "id": "ai-plugin-mvp", - "name": "AI assistant (MVP)", - "main": "build/main.js", - "ui": "build/ui.js", - "relaunchButtons": [ - { - "name": "Запустить AI assistant", - "command": "runAI" - } - ], - "networkAccess": { - "allowedDomains": [ - "https://api.apinex.bond", - "https://apinex.bond", - "https://example.com" - ] - } -} +{"api":"1.0.0","editorType":["figma"],"id":"ai-plugin-mvp","name":"AI assistant (MVP)","main":"build/main.js","ui":"build/ui.js","relaunchButtons":[{"name":"Запустить AI assistant","command":"runAI"}],"networkAccess":{"allowedDomains":["https://api.apinex.bond","https://apinex.bond","https://example.com"]}} diff --git a/package.json b/package.json index 73c7426..9020d6a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "figma-ai-plugin", - "version": "0.1.12", + "version": "0.1.13", "private": true, "dependencies": { "@create-figma-plugin/ui": "^4.0.3", @@ -14,7 +14,7 @@ "typescript": "~5.6.3" }, "scripts": { - "build": "build-figma-plugin --typecheck --minify && node inject-manifest.js", + "build": "build-figma-plugin --typecheck --minify", "watch": "build-figma-plugin --typecheck --watch" }, "figma-plugin": { @@ -29,6 +29,13 @@ "main": "src/main.ts", "ui": "src/ui.tsx" } + }, + "networkAccess": { + "allowedDomains": [ + "https://api.apinex.bond", + "https://apinex.bond", + "https://example.com" + ] } } } diff --git a/src/ui.tsx b/src/ui.tsx index d54de82..34810a4 100644 --- a/src/ui.tsx +++ b/src/ui.tsx @@ -30,7 +30,7 @@ const MIN_WINDOW_SIZE = { width: 320, height: 200 } // very high — actual clamp is done by main via clampWindowSize (bounds*zoom). // Full plugin version shown in the footer status bar. Keep in sync with package.json "version". -const PLUGIN_VERSION = '0.1.12' +const PLUGIN_VERSION = '0.1.13' const fieldStyle = { display: 'flex',