Move base plugins to their respective packages

Move BaseControllerPlugin to controller/src/BaseControllerPlugin.ts
Move BaseInstancePlugin to host/src/BaseInstancePlugin.ts
Move BaseControlPlugin to ctl/src/BaseCtlPlugin.ts
Move BaseWebPlugin to web_ui/src/BaseWebPlugin.ts

This solves the circular package dependency problem of the base plugins
needing types that are available only in the dependencies to lib.
This commit is contained in:
Hornwitser committed 2023-11-25 18:41:43 +01:00
1 parent 63dc370ea0
commit 808eda0513
51 files changed
+1073 -1060

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
import React, { ReactElement } from "react";
import type * as lib from "@clusterio/lib";
import { PluginPage, UserAccount } from "./BaseWebPlugin";
import ControllerPage from "./components/ControllerPage";
import HostsPage from "./components/HostsPage";
@@ -16,7 +16,7 @@ import RoleViewPage from "./components/RoleViewPage";
import PluginsPage from "./components/PluginsPage";
import PluginViewPage from "./components/PluginViewPage";
export const pages: lib.PluginPage[] = [
export const pages: PluginPage[] = [
{
path: "/controller",
sidebarName: "Controller",
@@ -47,7 +47,7 @@ export const pages: lib.PluginPage[] = [
{
path: "/mods",
sidebarName: "Mods",
permission: (account:lib.UserAccount) => account.hasAnyPermission("core.mod.list", "core.mod-pack.list"),
permission: (account: UserAccount) => account.hasAnyPermission("core.mod.list", "core.mod-pack.list"),
content: <ModsPage />,
},
{