()
| 62 | } |
| 63 | |
| 64 | export async function pickAuthMethod(): Promise<AuthChoice['value']> { |
| 65 | const { select, isCancel } = await import('@clack/prompts'); |
| 66 | const value = await select({ |
| 67 | message: 'How would you like to authenticate?', |
| 68 | options: AUTH_CHOICES.map(c => ({ value: c.value, label: c.label })), |
| 69 | }); |
| 70 | if (isCancel(value)) throw new CLIError('Authentication cancelled.', ExitCode.AUTH); |
| 71 | return value as AuthChoice['value']; |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Region-only picker used by `mmx auth login --recommend` (no API-key option). |
no outgoing calls
no test coverage detected