(usePluginInfoId = false)
| 470 | // So we overwrite the declared versions with versions from |
| 471 | // listFetchedPluginVersions that do contain this information. |
| 472 | listInstalledPluginVersions(usePluginInfoId = false) { |
| 473 | const pluginInfoProvider = new PluginInfoProvider(); |
| 474 | const installedPluginVersions = pluginInfoProvider.getAllWithinSearchPath( |
| 475 | files.convertToOSPath(this.pluginsDir)); |
| 476 | const fetchedPluginVersions = this.listFetchedPluginVersions(); |
| 477 | return _.object(installedPluginVersions.map(pluginInfo => { |
| 478 | const fetchedPlugin = fetchedPluginVersions[pluginInfo.id]; |
| 479 | const id = fetchedPlugin.id; |
| 480 | const version = fetchedPlugin.version || pluginInfo.version; |
| 481 | return [usePluginInfoId ? pluginInfo.id : id, version]; |
| 482 | })); |
| 483 | } |
| 484 | |
| 485 | // There is no Cordova function to get the fetched plugin versions, so we |
| 486 | // have to read in fetch.json (a file managed by plugman, a semi-independent |
no test coverage detected