This commit is contained in:
peter
2019-08-04 10:30:49 +02:00
parent 48d22e0314
commit 1e46224129
2 changed files with 14 additions and 11 deletions
+10 -8
View File
@@ -33,17 +33,12 @@ export default class PluginManagerPlugin extends PluginManager implements Plugin
type: 'call'
},
{
name: "getInstalledPlugins",
name: "getInstalledPluginNames",
visibility: "private",
rpc: async() => { return await this.getInstalledPlugins() },
rpc: async() => { return await this.getInstalledPluginNames() },
type: 'call'
},
{
name: "getLoadedPlugins",
visibility: "private",
rpc: async () => { return this.getLoadedPlugins() },
type: 'call'
},{
name: "getLoadedPluginNames",
visibility: "private",
rpc: async () => { return this.getLoadedPluginNames() },
@@ -87,12 +82,19 @@ export default class PluginManagerPlugin extends PluginManager implements Plugin
visibility: "private",
rpc: async(conf) => { return this.downloadPlugin(conf) },
type: 'call'
},{
name: "getConfig",
visibility: "private",
rpc: async() => { return this.conf },
type: 'call'
}
]
}
async start(): Promise<void> {
await Promise.all(this.getInstalledPluginNames().map(name => {
return this.loadPlugin(name)
}));
}
stop(): void {