()
| 279 | * Get status of all managed binaries. |
| 280 | */ |
| 281 | export function getRuntimeBinaryStatuses(): ManagedBinaryStatus[] { |
| 282 | const platformKey = getPlatformKey() |
| 283 | return Object.entries(REGISTRY).map(([name, def]) => { |
| 284 | const binaryPath = resolve(name) |
| 285 | const isDownloading = activeDownloads.has(name) |
| 286 | const supported = !!def.urls[platformKey] |
| 287 | |
| 288 | return { |
| 289 | name, |
| 290 | displayName: def.displayName, |
| 291 | version: def.version, |
| 292 | status: isDownloading ? "downloading" : binaryPath ? "available" : "not_downloaded", |
| 293 | path: binaryPath, |
| 294 | error: !supported ? `Not available for ${platformKey}` : null, |
| 295 | } |
| 296 | }) |
| 297 | } |
| 298 | |
| 299 | /** |
| 300 | * Remove a managed binary. |
no test coverage detected