RPC update

This commit is contained in:
peter
2019-08-26 00:04:32 +02:00
parent fda4fec201
commit 6d707e7572
5 changed files with 338 additions and 345 deletions
+8 -7
View File
@@ -1,4 +1,5 @@
import { Plugin, socketioRPC } from "frontblock-generic/Plugin";
import { Plugin } from "frontblock-generic/Plugin";
import { socketioRPC } from "frontblock-generic/RPC";
import { GitUpdater, RepoFolderStatus } from "./GitUpdater";
import { FrontblockCherryPicker } from "git-cherrypicker";
import * as Logger from 'log4js'
@@ -33,32 +34,32 @@ export class UpdateManager implements Plugin{
exportRPCs(): socketioRPC[] {
return [{
name: 'installPlugin',
rpc: async (name:string, force = false) => {return await this.installPlugin(name, force)},
func: async (name:string, force = false) => {return await this.installPlugin(name, force)},
type: 'call',
visibility: 'private'
},{
name: 'startPlugin',
rpc: async (name:string) => {return await this.startPlugin(name)},
func: async (name:string) => {return await this.startPlugin(name)},
type: 'call',
visibility: 'private'
},{
name: 'updatePlugin',
rpc: async (name) => {return await this.updatePlugin(name)},
func: async (name) => {return await this.updatePlugin(name)},
type: 'call',
visibility: 'private'
},{
name: 'setPluginVersion',
rpc: async (name, tag) => {return await this.setPluginVersion(name, tag)},
func: async (name, tag) => {return await this.setPluginVersion(name, tag)},
type: 'call',
visibility: 'private'
},{
name: 'updateDashboard',
rpc: async () => {return await this.updateDashboard()},
func: async () => {return await this.updateDashboard()},
type: 'call',
visibility: 'private'
},{
name: 'getLoadedPluginNames',
rpc: async () => {return await this.getLoadedPluginNames()},
func: async () => {return await this.getLoadedPluginNames()},
type: 'call',
visibility: 'private'
}]