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

+2 -1
View File
@@ -1,5 +1,6 @@
import fs from "fs-extra";
import path from "path";
import { BaseControllerPlugin } from "@clusterio/controller";
import { Static } from "@sinclair/typebox";
import * as lib from "@clusterio/lib";
@@ -48,7 +49,7 @@ async function saveTechnologies(
await lib.safeOutputFile(filePath, JSON.stringify([...technologies.entries()], null, "\t"));
}
export class ControllerPlugin extends lib.BaseControllerPlugin {
export class ControllerPlugin extends BaseControllerPlugin {
technologies!: Map<string, Technology>;
progressRateLimiter!: lib.RateLimiter;
progressBroadcastId!: ReturnType<typeof setInterval> | null;