* Recursively get all TypeScript and HTML files
(dir, fileList = [])
| 116 | * Recursively get all TypeScript and HTML files |
| 117 | */ |
| 118 | function getAllFiles(dir, fileList = []) { |
| 119 | const files = fs.readdirSync(dir); |
| 120 | |
| 121 | files.forEach((file) => { |
| 122 | const filePath = path.join(dir, file); |
| 123 | const stat = fs.statSync(filePath); |
| 124 | |
| 125 | if (stat.isDirectory()) { |
| 126 | getAllFiles(filePath, fileList); |
| 127 | } else if (file.endsWith('.ts') || file.endsWith('.html')) { |
| 128 | fileList.push(filePath); |
| 129 | } |
| 130 | }); |
| 131 | |
| 132 | return fileList; |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * Check a file for version-specific patterns |