mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 08:23:12 +09:00
Merge remote-tracking branch 'upstream/master' into refactor/plugin-hooks-v2
# Conflicts: # packages/lib/src/data/messages_plugin.ts # packages/web_ui/src/components/PluginViewPage.tsx # test/lib/plugin.js
This commit is contained in:
commit
db84455c34
37 files changed
+573
-60
No files matched your search
@@ -40,6 +40,23 @@ export type PluginDeclaration = {
|
||||
routes?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a plugin is expected to ship a web build.
|
||||
*
|
||||
* Mirrors the rule used by the create tool: a web build is generated when the
|
||||
* plugin has a web or controller entrypoint or defines config fields.
|
||||
*/
|
||||
export function pluginNeedsWebBuild(info: PluginDeclaration) {
|
||||
return Boolean(
|
||||
info.webEntrypoint
|
||||
|| info.controllerEntrypoint
|
||||
|| info.controllerConfigFields
|
||||
|| info.hostConfigFields
|
||||
|| info.instanceConfigFields
|
||||
|| info.controlConfigFields
|
||||
);
|
||||
}
|
||||
|
||||
export type PluginNodeEnvInfo = PluginDeclaration & {
|
||||
/**
|
||||
* Path to the folder with the static files that should be hosted on the web
|
||||
|
||||
Reference in new issue
Block a user