const fs = require('fs');
const content = fs.readFileSync('dist/server.cjs', 'utf8');

const matches = [];
let idx = 0;
const targetKeywords = ['vouchers', 'db', '.json', 'fs.read', 'fs.write'];
targetKeywords.forEach(kw => {
  idx = 0;
  while ((idx = content.indexOf(kw, idx)) !== -1) {
    matches.push({ keyword: kw, index: idx, snippet: content.substring(idx - 50, idx + 100) });
    idx += kw.length;
  }
});

console.log(`Found ${matches.length} matches. Showing first 30:`);
matches.slice(0, 30).forEach(m => {
  console.log(`[${m.keyword}] at ${m.index}: ${m.snippet.replace(/\n/g, ' ')}`);
});
