working on frontend
This commit is contained in:
@@ -24,7 +24,7 @@ export default class PluginManagerPlugin extends PluginManager implements Plugin
|
||||
this.loadedPlugins[this.name] = {backend: this, frontend: this.loadFrontend(this.name)}
|
||||
}
|
||||
|
||||
exportRPCs(): socketioRPC[] {
|
||||
exportExtraRPCs(): socketioRPC[] {
|
||||
return [
|
||||
{
|
||||
name: "getAvailablePluginNames",
|
||||
@@ -66,12 +66,6 @@ export default class PluginManagerPlugin extends PluginManager implements Plugin
|
||||
visibility: "private",
|
||||
rpc: async(pluginName:string) => { return this.unloadPlugin(pluginName) },
|
||||
type: 'call'
|
||||
},
|
||||
{
|
||||
name: "updateConfig",
|
||||
visibility: "private",
|
||||
rpc: async(conf) => { return this.updateConfig(conf) },
|
||||
type: 'call'
|
||||
},{
|
||||
name: "extractPlugin",
|
||||
visibility: "private",
|
||||
|
||||
@@ -7,7 +7,7 @@ import path = require('path')
|
||||
import unzip = require('unzip')
|
||||
import easyunzip = require('easy-unzip')
|
||||
|
||||
import { Plugin, ConfigLoader } from 'frontblock-generic/Plugin';
|
||||
import { Plugin, ConfigLoader, PluginConfigLoader } from 'frontblock-generic/Plugin';
|
||||
import { SemVer, parse } from "semver";
|
||||
import { once } from 'events';
|
||||
|
||||
@@ -39,7 +39,7 @@ export type PluginManagerConfig = {
|
||||
installDir:string
|
||||
}
|
||||
|
||||
export default class PluginManager extends ConfigLoader<PluginManagerConfig&PluginVersioning>{
|
||||
export default abstract class PluginManager extends PluginConfigLoader<PluginManagerConfig&PluginVersioning>{
|
||||
|
||||
private cacheDir: string
|
||||
protected loadedPlugins: PluginMap = {}
|
||||
@@ -152,7 +152,7 @@ export default class PluginManager extends ConfigLoader<PluginManagerConfig&Plug
|
||||
this.conf[pluginName] = {}
|
||||
}
|
||||
this.conf[pluginName]!["cached"] = version
|
||||
this.updateConfig(this.conf)
|
||||
this.setConfig(this.conf)
|
||||
|
||||
|
||||
} catch (error) {
|
||||
@@ -172,7 +172,7 @@ export default class PluginManager extends ConfigLoader<PluginManagerConfig&Plug
|
||||
this.conf[pluginName] = {}
|
||||
}
|
||||
this.conf[pluginName]!["installed"] = this.conf[pluginName]!["cached"]
|
||||
this.updateConfig(this.conf)
|
||||
this.setConfig(this.conf)
|
||||
}
|
||||
|
||||
public async installPlugin(pluginName: string) {
|
||||
|
||||
Reference in New Issue
Block a user