( ideType: IdeType, )
| 132 | } |
| 133 | |
| 134 | export async function isJetBrainsPluginInstalled( |
| 135 | ideType: IdeType, |
| 136 | ): Promise<boolean> { |
| 137 | const pluginDirs = await detectPluginDirectories(ideType) |
| 138 | for (const dir of pluginDirs) { |
| 139 | const pluginPath = join(dir, PLUGIN_PREFIX) |
| 140 | try { |
| 141 | await getFsImplementation().stat(pluginPath) |
| 142 | return true |
| 143 | } catch { |
| 144 | // Plugin not found in this directory, continue |
| 145 | } |
| 146 | } |
| 147 | return false |
| 148 | } |
| 149 | |
| 150 | const pluginInstalledCache = new Map<IdeType, boolean>() |
| 151 | const pluginInstalledPromiseCache = new Map<IdeType, Promise<boolean>>() |
no test coverage detected