(sourceDir: string)
| 481 | } |
| 482 | |
| 483 | async function listClaudeMarkdownFiles(sourceDir: string): Promise<string[]> { |
| 484 | try { |
| 485 | const stat = await fs.stat(sourceDir) |
| 486 | if (!stat.isDirectory()) return [] |
| 487 | } catch { |
| 488 | return [] |
| 489 | } |
| 490 | |
| 491 | const result: string[] = [] |
| 492 | const glob = new Bun.Glob("**/*.md") |
| 493 | for await (const rel of glob.scan({ cwd: sourceDir, onlyFiles: true })) { |
| 494 | result.push(path.join(sourceDir, rel)) |
| 495 | } |
| 496 | return result |
| 497 | } |
| 498 | |
| 499 | async function importClaudeFiles(files: string[], sourceDir: string, targetDir: string) { |
| 500 | await fs.mkdir(targetDir, { recursive: true }) |
no test coverage detected