Plugin kinds
Six plugin_type values are in real use today: ui, widget, library, dbs, framework and graphics.
Every plugin declares a plugin_type when it is uploaded. upload_plugin checks it against a
fixed list before accepting anything: dbs, widget, graphics, library, platform,
framework, util, ui. platform and util are accepted but
reserved; the six kinds below are the ones plugins use.
The Plugins tab's kind filter is built by reading the distinct plugin_type
values off the plugins actually installed in the project, not from a fixed list. The six kinds
below are what that produces in practice.
The six kinds
Naming convention
Every first-party plugin folder name encodes its kind: xuda-<kind>-plugin-<name> (for example
xuda-ui-plugin-moment, xuda-dbs-plugin-couchdb). This is a convention the first-party plugins
follow, not a rule the platform enforces; plugin_type on upload is what actually decides the
kind, and a third-party plugin can name its package however it likes.
Depending on another plugin
A plugin can declare dependent_plugin_id, naming another plugin it needs. install_plugin,
save_plugin_setup and get_plugin_setup all check two things before doing anything for a
dependent plugin: that the named plugin is already installed in the project, and that the named
plugin's own authorized_plugins list includes this plugin. A hub plugin (for example a
framework or dbs plugin other plugins are built on top of) opts in to being depended on by
listing the dependents it authorizes; nothing installs against it silently.