(opts: {
existingPlatforms: SetupPlatform[];
prompter: Prompter;
quietOutput: boolean;
})
| 429 | } |
| 430 | |
| 431 | async function selectPlatforms(opts: { |
| 432 | existingPlatforms: SetupPlatform[]; |
| 433 | prompter: Prompter; |
| 434 | quietOutput: boolean; |
| 435 | }): Promise<SetupPlatform[]> { |
| 436 | const defaults = opts.existingPlatforms.length > 0 ? opts.existingPlatforms : ['iOS']; |
| 437 | showPromptHelp( |
| 438 | 'Select which platforms you are developing for. This determines which workflows are\n' + |
| 439 | 'recommended and whether a simulator needs to be configured.', |
| 440 | opts.quietOutput, |
| 441 | ); |
| 442 | return opts.prompter.selectMany({ |
| 443 | message: 'Select target platforms', |
| 444 | options: PLATFORM_OPTIONS, |
| 445 | initialSelectedKeys: new Set(defaults), |
| 446 | getKey: (value) => value, |
| 447 | minSelected: 1, |
| 448 | }); |
| 449 | } |
| 450 | |
| 451 | type ProjectChoice = { kind: 'workspace' | 'project'; absolutePath: string }; |
| 452 |
no test coverage detected