( runtimes: ProviderDeviceRuntime[], )
| 208 | } |
| 209 | |
| 210 | function composeDeviceInventoryProvider( |
| 211 | runtimes: ProviderDeviceRuntime[], |
| 212 | ): DeviceInventoryProvider | undefined { |
| 213 | if (runtimes.length === 0) return undefined; |
| 214 | return async (request) => { |
| 215 | for (const runtime of runtimes) { |
| 216 | if (!runtimeMatchesProvider(runtime, request.leaseProvider)) continue; |
| 217 | const devices = await runtime.deviceInventoryProvider(request); |
| 218 | if (devices) return devices; |
| 219 | } |
| 220 | return null; |
| 221 | }; |
| 222 | } |
| 223 | |
| 224 | async function firstCloudArtifactsResult( |
| 225 | runtimes: ProviderDeviceRuntime[], |
no test coverage detected