Provide mandatory meta information for plugins #2504
TimHal
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As more and more plugins get written by the core team and community and with the release of Payload Cloud, I think the time is right to discuss the future of plugin management and the plugin ecosystem at large.
Status Quo
Plugins are injected into the main payload configuration and can freely manipulate the incoming config. While this approach is extremely powerful and flexible it can cause namespace conflicts and other problems. Currently plugins do not provide any meta information, possible conflicts and compatible payload versions can only be found in their respective repositories or not at all. Furthermore, there is not a reliable, peer-review and trusted source for community plugins and patches other than the curated list by the payload team which links the repositories - a solution which is fine for now but probably does not scale very well with the rising popularity of the framework.
Proposal
Add mandatory meta information for plugins which are provided directly from the respective
index.ts
or a special file such asplugin.json
. Meta information should include fields such as:semver
of minimum and maximum supported payload versionsAdvantages
Adopting meta information early paves the way for future projects and extensions, such as a payload plugin store (
payload plugin install @core/seo
which could add the npm packages and register the plugin in your config automatically) or the ability to manage + enable/disable plugins from within the admin dashboard by having aplugins
section which gives you an overview of installed plugins. It would be easy to see potential conflicts either between plugins or with your current payload version without having to dive into the code of the respective plugins yourself. Finally, it would make namespacing easier in the future as right now plugins can freely add/delete endpoints, hooks and fields which does not only crowd the global namespace but also poses a potential security risk.Beta Was this translation helpful? Give feedback.
All reactions