(pluginName: string)
| 163 | } |
| 164 | |
| 165 | async delete(pluginName: string): Promise<boolean> { |
| 166 | const plugin = this.plugins.find(({ name }) => name === pluginName) |
| 167 | if (!plugin) return false |
| 168 | await plugin.destroy() |
| 169 | const idx = this.plugins.indexOf(plugin) |
| 170 | this.plugins.splice(idx, 1) |
| 171 | return this.pluginsMap.delete(pluginName) |
| 172 | } |
| 173 | |
| 174 | async init() { |
| 175 | const pluginNames: string[] = [] |