* Main execution
()
| 223 | * Main execution |
| 224 | */ |
| 225 | function main() { |
| 226 | console.log(`${colors.blue}Starting Angular version compatibility check...${colors.reset}\n`); |
| 227 | |
| 228 | if (!fs.existsSync(componentsDir)) { |
| 229 | console.error(`${colors.red}Error: Components directory not found: ${componentsDir}${colors.reset}`); |
| 230 | process.exit(1); |
| 231 | } |
| 232 | |
| 233 | const files = getAllFiles(componentsDir); |
| 234 | results.filesScanned = files.length; |
| 235 | |
| 236 | console.log(`Scanning ${files.length} files...\n`); |
| 237 | |
| 238 | files.forEach((file) => { |
| 239 | checkFile(file); |
| 240 | }); |
| 241 | |
| 242 | printResults(); |
| 243 | |
| 244 | // Exit with error code if compatibility issues found |
| 245 | process.exit(results.passed ? 0 : 1); |
| 246 | } |
| 247 | |
| 248 | // Run the script |
| 249 | main(); |
no test coverage detected