(dir)
| 88 | } |
| 89 | |
| 90 | function findFirstGif(dir) { |
| 91 | if (!dir) return null; |
| 92 | const animationDir = path.join(ROOT, dir, "Animation"); |
| 93 | if (!fs.existsSync(animationDir)) return null; |
| 94 | const stack = [animationDir]; |
| 95 | |
| 96 | while (stack.length) { |
| 97 | const current = stack.pop(); |
| 98 | const entries = fs.readdirSync(current, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name)); |
| 99 | for (const entry of entries) { |
| 100 | const full = path.join(current, entry.name); |
| 101 | if (entry.isDirectory()) stack.push(full); |
| 102 | if (entry.isFile() && /\.gif$/i.test(entry.name)) return path.relative(ROOT, full).split(path.sep).join("/"); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | return null; |
| 107 | } |
| 108 | |
| 109 | function buildManifest() { |
| 110 | const dirs = problemDirs(); |
no test coverage detected