(state: RuntimeState, plugin: PluginEntry, persist: boolean)
| 500 | } |
| 501 | |
| 502 | async function deactivatePluginEntry(state: RuntimeState, plugin: PluginEntry, persist: boolean) { |
| 503 | plugin.enabled = false |
| 504 | if (persist) writePluginEnabledState(state.api, plugin.id, false) |
| 505 | if (!plugin.scope) { |
| 506 | state.view.update({ status: listPluginStatus(state) }) |
| 507 | return true |
| 508 | } |
| 509 | const scope = plugin.scope |
| 510 | plugin.scope = undefined |
| 511 | await scope.dispose() |
| 512 | state.view.update({ status: listPluginStatus(state) }) |
| 513 | return true |
| 514 | } |
| 515 | |
| 516 | async function activatePluginEntry(state: RuntimeState, plugin: PluginEntry, persist: boolean) { |
| 517 | plugin.enabled = true |
no test coverage detected