|
|
|
@ -36,9 +36,9 @@ export class RemixAppManager extends PluginManager { |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onActivated (plugin) { |
|
|
|
|
onPluginActivated (plugin) { |
|
|
|
|
this.pluginLoader.set(plugin, this.actives) |
|
|
|
|
this.event.emit('activate', plugin.name) |
|
|
|
|
this.event.emit('activate', plugin) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getAll () { |
|
|
|
@ -51,9 +51,9 @@ export class RemixAppManager extends PluginManager { |
|
|
|
|
return Object.keys(this.registered) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onDeactivated (plugin) { |
|
|
|
|
onPluginDeactivated (plugin) { |
|
|
|
|
this.pluginLoader.set(plugin, this.actives) |
|
|
|
|
this.event.emit('deactivate', plugin.name) |
|
|
|
|
this.event.emit('deactivate', plugin) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onRegistration (plugin) { |
|
|
|
@ -62,6 +62,16 @@ export class RemixAppManager extends PluginManager { |
|
|
|
|
this.event.emit('added', plugin.name) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ensureActivated (apiName) { |
|
|
|
|
if (!this.isActive(apiName)) this.activateOne(apiName) |
|
|
|
|
this.event.emit('ensureActivated', apiName) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ensureDeactivated (apiName) { |
|
|
|
|
if (this.isActive(apiName)) this.deactivateOne(apiName) |
|
|
|
|
this.event.emit('ensureDeactivated', apiName) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
deactivatePlugin (name) { |
|
|
|
|
if (requiredModules.includes(name)) return |
|
|
|
|
super.deactivatePlugin(name) |
|
|
|
|