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

const target = 'addHotspotUserToClient';
let idx = 0;
while ((idx = content.indexOf(target, idx)) !== -1) {
  console.log(`Found "${target}" at index ${idx}:`);
  console.log(content.substring(idx - 100, idx + 500));
  idx += target.length;
}

const target2 = 'addHotspotUserToRest';
idx = 0;
while ((idx = content.indexOf(target2, idx)) !== -1) {
  console.log(`Found "${target2}" at index ${idx}:`);
  console.log(content.substring(idx - 100, idx + 500));
  idx += target2.length;
}
