mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
✨ Add the concept of version to plugins
And make mcp plugin version 2
This commit is contained in:
parent
2ccb33ba89
commit
c00d512193
@ -95,10 +95,10 @@
|
|||||||
[]
|
[]
|
||||||
|
|
||||||
(let [plugins-state* (mf/use-state #(preg/plugins-list))
|
(let [plugins-state* (mf/use-state #(preg/plugins-list))
|
||||||
plugins-state @plugins-state*
|
plugins-state (deref plugins-state*)
|
||||||
|
|
||||||
plugin-url* (mf/use-state "")
|
plugin-url* (mf/use-state "")
|
||||||
plugin-url @plugin-url*
|
plugin-url (deref plugin-url*)
|
||||||
|
|
||||||
fetching-manifest? (mf/use-state false)
|
fetching-manifest? (mf/use-state false)
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
desc (obj/get manifest "description")
|
desc (obj/get manifest "description")
|
||||||
code (obj/get manifest "code")
|
code (obj/get manifest "code")
|
||||||
icon (obj/get manifest "icon")
|
icon (obj/get manifest "icon")
|
||||||
|
vers (d/nilv (obj/get manifest "version") 1)
|
||||||
|
|
||||||
permissions (into #{} (obj/get manifest "permissions" []))
|
permissions (into #{} (obj/get manifest "permissions" []))
|
||||||
permissions
|
permissions
|
||||||
@ -55,9 +56,13 @@
|
|||||||
(u/uri plugin-url)
|
(u/uri plugin-url)
|
||||||
|
|
||||||
origin
|
origin
|
||||||
(-> plugin-url
|
(if (= vers 1)
|
||||||
(u/join ".")
|
(-> plugin-url
|
||||||
(str))
|
(assoc :path "/")
|
||||||
|
(str))
|
||||||
|
(-> plugin-url
|
||||||
|
(u/join ".")
|
||||||
|
(str)))
|
||||||
|
|
||||||
prev-plugin
|
prev-plugin
|
||||||
(->> (:data @registry)
|
(->> (:data @registry)
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Penpot MCP Plugin",
|
"name": "Penpot MCP Plugin",
|
||||||
"code": "plugin.js",
|
"code": "plugin.js",
|
||||||
|
"version": 2,
|
||||||
"description": "This plugin enables interaction with the Penpot MCP server",
|
"description": "This plugin enables interaction with the Penpot MCP server",
|
||||||
"permissions": ["content:read", "content:write", "library:read", "library:write", "comment:read", "comment:write"]
|
"permissions": ["content:read", "content:write", "library:read", "library:write", "comment:read", "comment:write"]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user