Move PluginWebApi to lib

Resolve circular dependency of controller depending on web_ui and web_ui
depending on controller by moving the type from controller that was used
in web_ui to lib.
This commit is contained in:
Hornwitser committed 2023-11-28 14:48:06 +01:00
1 parent 47c5a727b5
commit 9df6717364
8 files changed
+18 -19

No files matched your search

+1 -13
View File
@@ -93,20 +93,8 @@ async function getMetrics(req: Request, res: Response, next: any) {
}
export type PluginWebApi = {
name: string;
version: string;
enabled: boolean;
loaded: boolean;
web: {
main: string;
error?: string;
};
requirePath: string;
}
function getPlugins(req: Request, res: Response) {
let plugins: PluginWebApi[] = [];
let plugins: lib.PluginWebApi[] = [];
for (let pluginInfo of req.app.locals.controller.pluginInfos) {
let name = pluginInfo.name;
let loaded = req.app.locals.controller.plugins.has(name);