From 526568b5ddb99de6187039c195cc46ee71f09370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=BCbleitner?= Date: Tue, 27 Aug 2019 22:59:02 +0200 Subject: [PATCH] deps are hard coded in Installer --- src/backend/Installer.ts | 6 ++++-- src/backend/Launcher.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/backend/Installer.ts b/src/backend/Installer.ts index dace064..f2abf2d 100644 --- a/src/backend/Installer.ts +++ b/src/backend/Installer.ts @@ -18,10 +18,12 @@ const logger = Logger.getLogger("installer") export type NPMPkgName = string export type NPMVersion = string -export const install = (plugins: Plugin[] = [], npmPkgs: [NPMPkgName, NPMVersion][] = []) => { +export const install = (plugins: Plugin[] = []) => { - logger.info("Checking npm dependencies...") + const npmPkgs = [['sqlite3', '4.1.0'], ['knex', '0.19.2']] const deps = npmPkgs.map((pkg) => {return pkg[0] + '@' + pkg[1]} ) + logger.info("Checking npm dependencies..." + deps) + exec("npm i --prefix ./plugins " + deps.join(' ')).then(process => { logger.debug(process.stdout) diff --git a/src/backend/Launcher.ts b/src/backend/Launcher.ts index cf0809a..e48de69 100644 --- a/src/backend/Launcher.ts +++ b/src/backend/Launcher.ts @@ -1,2 +1,2 @@ import { install } from "./Installer"; -install([], [['sqlite3', '4.1.0'], ['knex', '0.19.2']]) +install([])