const fs = require('fs');
const path = require('path');

const dir = 'dist';
const files = fs.readdirSync(dir);
files.forEach(file => {
  if (file.endsWith('.php')) {
    const filePath = path.join(dir, file);
    const content = fs.readFileSync(filePath, 'utf8');
    
    // Check if there are any hardcoded URLs, IPs, or incorrect status mappings
    if (content.includes('status') || content.includes('active') || content.includes('used')) {
      console.log(`=== File: ${file} ===`);
      const lines = content.split('\n');
      lines.forEach((line, i) => {
        if (line.includes('status') || line.includes('active') || line.includes('used') || line.includes('price')) {
          console.log(`Line ${i+1}: ${line.trim()}`);
        }
      });
    }
  }
});
