(version: string | null)
| 164 | * @returns A normalized semver string, or `"latest"` if unset. |
| 165 | */ |
| 166 | export function extractHostVersion(version: string | null): string | undefined { |
| 167 | if (version) { |
| 168 | return semver.valid(semver.coerce(version)) ?? undefined; |
| 169 | } |
| 170 | |
| 171 | return 'latest'; |
| 172 | } |
| 173 | |
| 174 | /** |
| 175 | * Build the GitHub authentication base URL for the given hostname. |