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

function searchDir(dir) {
  const files = fs.readdirSync(dir);
  for (const file of files) {
    const fullPath = path.join(dir, file);
    if (file === 'node_modules' || file === '.git' || file === 'dist') continue;
    const stat = fs.statSync(fullPath);
    if (stat.isDirectory()) {
      searchDir(fullPath);
    } else {
      try {
        const content = fs.readFileSync(fullPath, 'utf8');
        if (content.includes('edit_bundle') || content.includes('apply_edits') || content.includes('index-D9sWWWv_.js')) {
          console.log(`Found in: ${fullPath}`);
        }
      } catch (err) {
        // ignore
      }
    }
  }
}

searchDir('.');
