(flags: CliFlags)
| 273 | } |
| 274 | |
| 275 | function resolveRemoteConnectFlags(flags: CliFlags): { |
| 276 | flags: CliFlags; |
| 277 | remoteConfigPath: string; |
| 278 | } { |
| 279 | if (!flags.remoteConfig) { |
| 280 | throw new AppError('INVALID_ARGS', 'connect requires --remote-config <path>.'); |
| 281 | } |
| 282 | const remoteConfig = resolveRemoteConfigProfile({ |
| 283 | configPath: flags.remoteConfig, |
| 284 | cwd: process.cwd(), |
| 285 | env: process.env, |
| 286 | }); |
| 287 | return { |
| 288 | flags, |
| 289 | remoteConfigPath: remoteConfig.resolvedPath, |
| 290 | }; |
| 291 | } |
| 292 | |
| 293 | function readRemoteConfigConnectionMetadata( |
| 294 | remoteConfigPath: string, |
no test coverage detected