(pluginId: string)
| 826 | * project. Returns false for plugins only installed in other projects. |
| 827 | */ |
| 828 | export function isPluginInstalled(pluginId: string): boolean { |
| 829 | const v2Data = loadInstalledPluginsV2() |
| 830 | const installations = v2Data.plugins[pluginId] |
| 831 | if (!installations || installations.length === 0) { |
| 832 | return false |
| 833 | } |
| 834 | if (!installations.some(isInstallationRelevantToCurrentProject)) { |
| 835 | return false |
| 836 | } |
| 837 | // Plugins are loaded from settings.enabledPlugins |
| 838 | // If settings.enabledPlugins and installed_plugins.json diverge |
| 839 | // (via settings.json clobber), return false |
| 840 | return getSettings_DEPRECATED().enabledPlugins?.[pluginId] !== undefined |
| 841 | } |
| 842 | |
| 843 | /** |
| 844 | * True only if the plugin has a USER or MANAGED scope installation. |
no test coverage detected