(pluginId: string)
| 816 | * project. Returns false for plugins only installed in other projects. |
| 817 | */ |
| 818 | export function isPluginInstalled(pluginId: string): boolean { |
| 819 | const v2Data = loadInstalledPluginsV2() |
| 820 | const installations = v2Data.plugins[pluginId] |
| 821 | if (!installations || installations.length === 0) { |
| 822 | return false |
| 823 | } |
| 824 | if (!installations.some(isInstallationRelevantToCurrentProject)) { |
| 825 | return false |
| 826 | } |
| 827 | // Plugins are loaded from settings.enabledPlugins |
| 828 | // If settings.enabledPlugins and installed_plugins.json diverge |
| 829 | // (via settings.json clobber), return false |
| 830 | return getSettings_DEPRECATED().enabledPlugins?.[pluginId] !== undefined |
| 831 | } |
| 832 | |
| 833 | /** |
| 834 | * True only if the plugin has a USER or MANAGED scope installation. |
no test coverage detected