(positionals: string[])
| 421 | } |
| 422 | |
| 423 | function readConnectProvider(positionals: string[]): ConnectProvider | undefined { |
| 424 | const provider = positionals[0]; |
| 425 | if (provider === undefined) return undefined; |
| 426 | if (positionals.length > 1) { |
| 427 | throw new AppError('INVALID_ARGS', 'connect accepts at most one provider positional.'); |
| 428 | } |
| 429 | if (isConnectProviderName(provider)) { |
| 430 | return provider; |
| 431 | } |
| 432 | throw new AppError( |
| 433 | 'INVALID_ARGS', |
| 434 | `Unknown connect provider: ${provider}. Supported providers: ${connectProviderNamesForError()}.`, |
| 435 | ); |
| 436 | } |
| 437 | |
| 438 | function shouldUseProxyConnectShortcut(flags: CliFlags): boolean { |
| 439 | if (!flags.daemonBaseUrl || flags.tenant || flags.runId || flags.leaseId || flags.leaseBackend) { |
no test coverage detected