(dir)
| 180 | } |
| 181 | |
| 182 | function findExamples(dir) { |
| 183 | let results = []; |
| 184 | const entries = fs.readdirSync(dir, { withFileTypes: true }); |
| 185 | for (const entry of entries) { |
| 186 | if (entry.name.startsWith('.')) continue; |
| 187 | const fullPath = path.join(dir, entry.name); |
| 188 | if (entry.isDirectory()) { |
| 189 | const manifestPath = path.join(fullPath, 'manifest.json'); |
| 190 | if (fs.existsSync(manifestPath)) { |
| 191 | results.push(fullPath); |
| 192 | } else { |
| 193 | results = results.concat(findExamples(fullPath)); |
| 194 | } |
| 195 | } |
| 196 | } |
| 197 | return results; |
| 198 | } |
| 199 | |
| 200 | function needsNetwork(manifestPath) { |
| 201 | try { |
no test coverage detected