( channel: ReleaseChannel, )
| 382 | * This is used by installations that don't have npm (e.g. package manager installs). |
| 383 | */ |
| 384 | export async function getLatestVersionFromGcs( |
| 385 | channel: ReleaseChannel, |
| 386 | ): Promise<string | null> { |
| 387 | try { |
| 388 | const response = await axios.get(`${GCS_BUCKET_URL}/${channel}`, { |
| 389 | timeout: 5000, |
| 390 | responseType: 'text', |
| 391 | }) |
| 392 | return response.data.trim() |
| 393 | } catch (error) { |
| 394 | logForDebugging(`Failed to fetch ${channel} from GCS: ${error}`) |
| 395 | return null |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | /** |
| 400 | * Get available versions from GCS bucket (for native installations). |
no test coverage detected