mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 23:33:12 +09:00
Rename PluginWebpackEnvInfo to PluginWebEnvInfo
The old name is kept as a deprecated alias. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a4db2dc460
commit
f40113e01c
10 files changed
+25
-19
No files matched your search
@@ -144,7 +144,7 @@ export type WebPluginContext = lib.PluginLoadContext<{
|
||||
control: Control;
|
||||
container: any;
|
||||
package: any;
|
||||
}, lib.PluginWebpackEnvInfo>;
|
||||
}, lib.PluginWebEnvInfo>;
|
||||
|
||||
/**
|
||||
* Collection of web plugin hooks
|
||||
@@ -258,7 +258,7 @@ export class BaseWebPlugin {
|
||||
constructor(
|
||||
public container: any,
|
||||
packageData: any,
|
||||
public info: lib.PluginWebpackEnvInfo,
|
||||
public info: lib.PluginWebEnvInfo,
|
||||
public control: Control,
|
||||
public logger: lib.Logger,
|
||||
) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import { pages } from "./pages";
|
||||
|
||||
const { ConsoleTransport, WebConsoleFormat, logger } = lib;
|
||||
|
||||
async function loadPluginInfos(): Promise<[lib.PluginWebpackEnvInfo[], string]> {
|
||||
async function loadPluginInfos(): Promise<[lib.PluginWebEnvInfo[], string]> {
|
||||
let response = await fetch(`${webRoot}api/plugins`);
|
||||
let pluginList: lib.PluginWebApi[];
|
||||
if (response.ok) {
|
||||
@@ -28,7 +28,7 @@ async function loadPluginInfos(): Promise<[lib.PluginWebpackEnvInfo[], string]>
|
||||
}
|
||||
let pluginSetKey = loadedPluginSetKey(pluginList);
|
||||
|
||||
let pluginInfos: lib.PluginWebpackEnvInfo[] = [];
|
||||
let pluginInfos: lib.PluginWebEnvInfo[] = [];
|
||||
for (let meta of pluginList) {
|
||||
if (meta.web.error) {
|
||||
logger.error(`Failed to load plugin ${meta.name}: ${meta.web.error}`);
|
||||
@@ -65,7 +65,7 @@ async function loadPluginInfos(): Promise<[lib.PluginWebpackEnvInfo[], string]>
|
||||
}
|
||||
|
||||
async function loadPlugins(
|
||||
pluginInfos: lib.PluginWebpackEnvInfo[],
|
||||
pluginInfos: lib.PluginWebEnvInfo[],
|
||||
control: Control
|
||||
) {
|
||||
const plugins = new Map<string, WebPlugin.BaseWebPlugin>();
|
||||
|
||||
@@ -47,8 +47,8 @@ function PluginMachines(props: PluginMachinesProps) {
|
||||
|
||||
type ControllerPluginProps = {
|
||||
pluginMeta: PluginWebApi,
|
||||
pluginInfo?: lib.PluginWebpackEnvInfo,
|
||||
loadedPlugin?: lib.PluginWebpackEnvInfo,
|
||||
pluginInfo?: lib.PluginWebEnvInfo,
|
||||
loadedPlugin?: lib.PluginWebEnvInfo,
|
||||
title: string,
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Space, Table, Typography } from "antd";
|
||||
import CloseCircleFilled from "@ant-design/icons/CloseCircleFilled";
|
||||
import InfoCircleFilled from "@ant-design/icons/InfoCircleFilled";
|
||||
|
||||
import type { PluginWebApi, PluginWebpackEnvInfo } from "@clusterio/lib";
|
||||
import type { PluginWebApi, PluginWebEnvInfo } from "@clusterio/lib";
|
||||
|
||||
import notify from "../util/notify";
|
||||
import { useAccount } from "../model/account";
|
||||
@@ -28,7 +28,7 @@ type PluginRow = {
|
||||
title: string;
|
||||
/** Not present for plugins the controller hasn't loaded */
|
||||
meta?: PluginWebApi;
|
||||
info?: PluginWebpackEnvInfo;
|
||||
info?: PluginWebEnvInfo;
|
||||
package?: any;
|
||||
status?: PluginStatus;
|
||||
};
|
||||
|
||||
@@ -54,7 +54,7 @@ export class Control extends lib.Link {
|
||||
public hooks = new WebPlugin.WebHooks(logger);
|
||||
/** @deprecated Only holds plugins using the class export, use loadedPlugins and hooks instead */
|
||||
public plugins = new Map<string, WebPlugin.BaseWebPlugin>();
|
||||
public loadedPlugins = new Map<string, lib.PluginWebpackEnvInfo>();
|
||||
public loadedPlugins = new Map<string, lib.PluginWebEnvInfo>();
|
||||
public inputComponents = new Map<string, WebPlugin.InputComponent>();
|
||||
public extensionComponents: Partial<WebPlugin.ExtensionComponents> = {};
|
||||
public loginForms: WebPlugin.PluginLoginForm[] = [];
|
||||
@@ -85,7 +85,7 @@ export class Control extends lib.Link {
|
||||
|
||||
constructor(
|
||||
connector: ControlConnector,
|
||||
public pluginInfos = new Map<string, lib.PluginWebpackEnvInfo>(),
|
||||
public pluginInfos = new Map<string, lib.PluginWebEnvInfo>(),
|
||||
/** Key of the plugin set this interface was loaded against */
|
||||
public pluginSetKey = "",
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user