From 8280d0c22797c72978f698dc2deaa8ef569a9d15 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 12 Apr 2021 10:10:48 +0200 Subject: Ensure to install supported plugins --- server/controllers/api/plugins.ts | 2 +- server/lib/plugins/plugin-index.ts | 12 ++++++++++++ server/lib/plugins/plugin-manager.ts | 9 ++++++++- server/lib/plugins/yarn.ts | 13 ++++++++----- server/middlewares/validators/plugins.ts | 2 -- 5 files changed, 29 insertions(+), 9 deletions(-) (limited to 'server') diff --git a/server/controllers/api/plugins.ts b/server/controllers/api/plugins.ts index bb69f25a1..a186de010 100644 --- a/server/controllers/api/plugins.ts +++ b/server/controllers/api/plugins.ts @@ -151,7 +151,7 @@ async function updatePlugin (req: express.Request, res: express.Response) { const fromDisk = !!body.path const toUpdate = body.npmName || body.path try { - const plugin = await PluginManager.Instance.update(toUpdate, undefined, fromDisk) + const plugin = await PluginManager.Instance.update(toUpdate, fromDisk) return res.json(plugin.toFormattedJSON()) } catch (err) { diff --git a/server/lib/plugins/plugin-index.ts b/server/lib/plugins/plugin-index.ts index 624f5da1d..165bc91b3 100644 --- a/server/lib/plugins/plugin-index.ts +++ b/server/lib/plugins/plugin-index.ts @@ -67,7 +67,19 @@ async function getLatestPluginsVersion (npmNames: string[]): Promise