require('dotenv').config();
const { createClient } = require('@supabase/supabase-js');
const sb = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_SERVICE_KEY);
(async()=>{
  // Show the 4 telegram tasks
  const {data:tg} = await sb.from('tasks').select('id,title,created_at').eq('source','telegram').eq('status','open');
  console.log('Telegram tasks:',tg.length);
  tg.forEach(t=>console.log(t.id.slice(0,8),'|',t.created_at.slice(0,10),'|',t.title.slice(0,60)));

  // seeder_v7 count
  const {data:s7} = await sb.from('tasks').select('id').eq('source','seeder_v7').eq('status','open');
  console.log('\nseeder_v7:',s7.length,'(expected 79)');

  // wave2 count  
  const {data:w2} = await sb.from('tasks').select('id').eq('source','seeder_v7_wave2').eq('status','open');
  console.log('seeder_v7_wave2:',w2.length,'(expected 27)');
})();
