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

function search(dir) {
  const files = fs.readdirSync(dir);
  for (const file of files) {
    if (file === 'node_modules' || file === '.git' || file === '.aistudio') continue;
    const fullPath = path.join(dir, file);
    const stat = fs.statSync(fullPath);
    if (stat.isDirectory()) {
      search(fullPath);
    } else {
      if (file.endsWith('.js') || file.endsWith('.cjs')) {
        const content = fs.readFileSync(fullPath, 'utf8');
        if (content.includes('sendSaaSSystemNotification')) {
          console.log('Found in:', fullPath);
        }
      }
    }
  }
}
search('.');
