mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 00:13:13 +09:00
plugins.checkEnabled(name) tells if a plugin is in the load list. #plugin_module is renamed to #import_plugin. loadPluginMigrations moves into PluginLoader.ts, leaving plugin_loader.ts with plugin discovery and details, so it is renamed to plugin_info.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 lines
275 B
TypeScript
8 lines
275 B
TypeScript
import type { PluginDeclaration, PluginWebEnvInfo } from "./plugin";
|
|
|
|
export default async function importPlugin(
|
|
pluginInfo: PluginDeclaration, entrypoint: string
|
|
): Promise<Record<string, any>> {
|
|
return await (pluginInfo as PluginWebEnvInfo).container.get(entrypoint);
|
|
}
|