feat(source2): push all latest files - device labeling, help system, proxy docs, database isolation fix
- Added DOKUMENTASI-FILTER-PER-SITE.md (site isolation docs) - Fixed start-with-env.js to force-load .env.production - Fixed MONGODB_URI hostname from mongodb-netify to mongodb.prod.proit.id - Updated .gitignore to exclude sensitive scripts and credential files - Minor UI and labeling improvements
This commit is contained in:
1 parent
a403f752f3
commit
dd4c8f6876
385 files changed
+31016
-8268
No files matched your search
@@ -0,0 +1,39 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const excludeDirs = ['node_modules', '.next', 'scratch', 'test', '.git', 'dist'];
|
||||
|
||||
function getFiles(dir, fileList = []) {
|
||||
const files = fs.readdirSync(dir);
|
||||
for (const file of files) {
|
||||
const filePath = path.join(dir, file);
|
||||
const stat = fs.statSync(filePath);
|
||||
if (stat.isDirectory()) {
|
||||
if (!excludeDirs.includes(file)) {
|
||||
getFiles(filePath, fileList);
|
||||
}
|
||||
} else {
|
||||
if (['.ts', '.tsx', '.js', '.jsx'].includes(path.extname(file))) {
|
||||
fileList.push(filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
return fileList;
|
||||
}
|
||||
|
||||
const allFiles = getFiles('C:\\Users\\demo\\Downloads\\Deep Package Inspection');
|
||||
|
||||
console.log('--- Checking file sizes (Rule 3: 256-LOC limit) ---');
|
||||
const longFiles = [];
|
||||
allFiles.forEach(file => {
|
||||
const content = fs.readFileSync(file, 'utf8');
|
||||
const lines = content.split('\n').length;
|
||||
if (lines > 256) {
|
||||
longFiles.push({ file, lines });
|
||||
}
|
||||
});
|
||||
|
||||
console.log(`Found ${longFiles.length} files exceeding 256 lines:`);
|
||||
longFiles.forEach(f => {
|
||||
console.log(`- ${path.relative('C:\\Users\\demo\\Downloads\\Deep Package Inspection', f.file)}: ${f.lines} lines`);
|
||||
});
|
||||
Reference in new issue
Block a user