fix admin not exporting own RPCs
This commit is contained in:
@@ -12,6 +12,7 @@ import * as path from "path"
|
||||
import { UpdateManager } from './UpdateManger';
|
||||
import { FrontblockApi } from 'frontblock-generic/Api';
|
||||
import { Plugin } from 'frontblock-generic/Plugin';
|
||||
import { socketioRPC } from 'frontblock-generic/RPC';
|
||||
var exec = require('child-process-promise').exec;
|
||||
|
||||
Logger.configure({
|
||||
@@ -91,6 +92,13 @@ export class FrontblockAdmin extends AdminBase<AdminConf>{
|
||||
this.startWebserver()
|
||||
}
|
||||
|
||||
exportRPCs():socketioRPC[]{
|
||||
return [
|
||||
...[/* more RPC here */],
|
||||
...super.exportRPCs()
|
||||
]
|
||||
}
|
||||
|
||||
private startWebserver(){
|
||||
if(this.httpServer != null || this.express != null){
|
||||
logger.warn("Webserver is already running")
|
||||
|
||||
@@ -79,22 +79,7 @@ export class UpdateManager extends Plugin{
|
||||
async updatePlatformDependencies(){
|
||||
|
||||
logger.info("installing npm stuff")
|
||||
|
||||
/*
|
||||
const res = await exec('npm install --prefix ./plugins knex sqlite3')
|
||||
logger.warn(res.stderr)
|
||||
logger.info(res.stdout)
|
||||
*/
|
||||
|
||||
/*
|
||||
const extensions = [
|
||||
new NPMExtension("sqlite3", "./plugins", "4.1.0"),
|
||||
new NPMExtension("frontblock", "./plugins", "latest")
|
||||
|
||||
]
|
||||
*/
|
||||
|
||||
const extensions:NPMExtension[] = []
|
||||
const extensions:NPMExtension[] = []
|
||||
|
||||
await Promise.all(extensions.map(e => e.install()))
|
||||
const status = await Promise.all(extensions.map(e => e.status()))
|
||||
|
||||
Reference in New Issue
Block a user