(rawFormat: string | undefined)
| 34 | type ListHostOptions = { ephemeral: boolean } |
| 35 | |
| 36 | export function parseFormat(rawFormat: string | undefined): ListFormat { |
| 37 | const format = (rawFormat ?? "json").toLowerCase() |
| 38 | if (format === "json" || format === "text") { |
| 39 | return format |
| 40 | } |
| 41 | |
| 42 | throw new Error(`Invalid format: ${rawFormat}. Must be "json" or "text".`) |
| 43 | } |
| 44 | |
| 45 | function resolveWorkspacePath(workspace: string | undefined): string { |
| 46 | const resolved = workspace ? path.resolve(workspace) : process.cwd() |
no outgoing calls
no test coverage detected