| 420 | } |
| 421 | |
| 422 | async function localProviderMetadata(config) { |
| 423 | const [health, simulators] = await Promise.all([ |
| 424 | localGet(config, "/api/health"), |
| 425 | localGet(config, "/api/simulators"), |
| 426 | ]); |
| 427 | return { |
| 428 | capabilities: { |
| 429 | health, |
| 430 | simulators: |
| 431 | simulators.simulators?.map((simulator) => ({ |
| 432 | isBooted: simulator.isBooted, |
| 433 | name: simulator.name, |
| 434 | runtimeName: simulator.runtimeName, |
| 435 | udid: simulator.udid, |
| 436 | })) ?? [], |
| 437 | }, |
| 438 | ok: Boolean(health?.ok), |
| 439 | }; |
| 440 | } |
| 441 | |
| 442 | async function ensureTemplateSimulator(templateName) { |
| 443 | const inventory = await simulatorInventory(); |