-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-basic.js
More file actions
45 lines (37 loc) · 1 KB
/
Copy pathtest-basic.js
File metadata and controls
45 lines (37 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env node
// Basic syntax check without full TypeScript compilation
const fs = require('fs');
const path = require('path');
const files = [
'src/cli.ts',
'src/commands/init.ts',
'src/commands/generate.ts',
'src/core/parser.ts',
'src/core/generator.ts',
'src/utils/config.ts',
'src/utils/logger.ts',
'src/index.ts'
];
console.log('Checking TypeScript files...');
let errors = 0;
for (const file of files) {
const filePath = path.join(__dirname, file);
try {
const content = fs.readFileSync(filePath, 'utf8');
// Basic syntax checks
if (!content.includes('export')) {
console.log(` ❌ ${file} - No exports found`);
errors++;
} else if (content.match(/import.*from/)) {
console.log(` ✅ ${file} - OK`);
}
} catch (err) {
console.log(` ❌ ${file} - ${err.message}`);
errors++;
}
}
console.log(`\nChecked ${files.length} files, ${errors} errors`);
if (errors > 0) {
process.exit(1);
}
console.log('\n✅ All files passed basic checks');