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

// Let's search for "used" or "vouchers" assignment in server.cjs
let idx = 0;
while ((idx = content.indexOf('vouchers', idx)) !== -1) {
  const substring = content.substring(idx - 150, idx + 250);
  if (substring.includes('used') || substring.includes('status') || substring.includes('map') || substring.includes('find') || substring.includes('filter')) {
    console.log(`Found 'vouchers' at index ${idx}:`);
    console.log(substring);
    console.log('-------------------------------------------');
  }
  idx += 8;
}
