externals
This commit is contained in:
@@ -2,6 +2,9 @@ import { Plugin, socketioRPC } from "frontblock-generic/Plugin";
|
||||
import { GitUpdater, RepoFolderStatus } from "./GitUpdater";
|
||||
import { FrontblockCherryPicker } from "git-cherrypicker";
|
||||
import * as Logger from 'log4js'
|
||||
import { mkdirSync } from "fs";
|
||||
var exec = require('child-process-promise').exec;
|
||||
|
||||
Logger.configure({
|
||||
appenders:
|
||||
{
|
||||
@@ -61,6 +64,17 @@ export class UpdateManager implements Plugin{
|
||||
}]
|
||||
}
|
||||
|
||||
async updatePlatformDependencies(){
|
||||
|
||||
logger.info("installing npm stuff")
|
||||
const res = await exec('npm install --prefix ./externals knex sqlite3')
|
||||
logger.warn(res.stderr)
|
||||
logger.info(res.stdout)
|
||||
|
||||
//mkdirSync("./test", {recursive:true})
|
||||
//await npmInstallAsync(["sqlite3"], "./test")
|
||||
}
|
||||
|
||||
async updateAdmin(force:boolean = false){
|
||||
this.adminUpdater = new GitUpdater("./dist")
|
||||
let status = await this.adminUpdater.getStatus()
|
||||
@@ -108,7 +122,7 @@ export class UpdateManager implements Plugin{
|
||||
|
||||
|
||||
let str = "../plugins/"+name+"/Plugin"
|
||||
const pluginClass = await import(str)
|
||||
const pluginClass = await eval('require')(str)
|
||||
const pluginObj = new pluginClass.default()
|
||||
await pluginObj.start()
|
||||
this.loadedPlugins[name] = pluginObj
|
||||
|
||||
Reference in New Issue
Block a user