()
| 71 | } |
| 72 | |
| 73 | function loadDataset(): DatasetEntry[] { |
| 74 | const raw = readFileSync(new URL("../dataset.yaml", import.meta.url), "utf8"); |
| 75 | const parsed = YAML.parse(raw); |
| 76 | if (!Array.isArray(parsed)) { |
| 77 | throw new Error("dataset.yaml must contain an array."); |
| 78 | } |
| 79 | |
| 80 | return parsed |
| 81 | .map((entry) => entry?.repo) |
| 82 | .filter( |
| 83 | (repo): repo is string => typeof repo === "string" && repo.length > 0, |
| 84 | ) |
| 85 | .map((repo) => ({ repo })); |
| 86 | } |
| 87 | |
| 88 | async function main(): Promise<void> { |
| 89 | // Read inputs from stdin |