* Finds the latest extension version compatible with the currently installed server. * If a specific version is requested, only that one is checked. * * @returns the latest compatible version, or `undefined` if the check does not apply * @throws {Error} if no version is compatible
({
installSpec,
pkgName,
pkgVer,
}: InstallViaNpmArgs)
| 1231 | * @throws {Error} if no version is compatible |
| 1232 | */ |
| 1233 | private async _findCompatibleExtVersion({ |
| 1234 | installSpec, |
| 1235 | pkgName, |
| 1236 | pkgVer, |
| 1237 | }: InstallViaNpmArgs): Promise<string | undefined> { |
| 1238 | const serverVersion = npmPackage.version; |
| 1239 | const isGivenExtCompatible = await this._checkGivenExtVersionCompatibility( |
| 1240 | serverVersion, |
| 1241 | installSpec, |
| 1242 | pkgName, |
| 1243 | pkgVer, |
| 1244 | ); |
| 1245 | |
| 1246 | if (isGivenExtCompatible) { |
| 1247 | return undefined; |
| 1248 | } |
| 1249 | |
| 1250 | return await this._findLatestCompatibleExtVersion(serverVersion, installSpec, pkgName); |
| 1251 | } |
| 1252 | |
| 1253 | /** |
| 1254 | * Checks whether the given extension version (or the latest, if not specified) is compatible |
nothing calls this directly
no outgoing calls
no test coverage detected