(filePath: string, cwd?: string)
| 441 | } |
| 442 | |
| 443 | function getAnnotateFileHeader(filePath: string, cwd?: string): "File" | "Folder" { |
| 444 | if (/^https?:\/\//i.test(filePath)) return "File"; |
| 445 | |
| 446 | try { |
| 447 | const resolved = path.isAbsolute(filePath) |
| 448 | ? filePath |
| 449 | : path.resolve(cwd || process.cwd(), filePath); |
| 450 | return statSync(resolved).isDirectory() ? "Folder" : "File"; |
| 451 | } catch { |
| 452 | return "File"; |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | export async function handleCliCommand(input: { |
| 457 | command: string; |
no test coverage detected