/**
 * TLD-quirk smoke test: verify that .ca, .ai, .io all return sensible
 * availability + price through lib/opensrs.ts.
 *
 * Usage:  source .opensrs.env && npx tsx scripts/smoke-opensrs-tlds.ts
 */

import { checkDomain } from '../lib/opensrs';

async function main() {
  const stamp = Date.now();
  const cases = [
    { domain: `vibnai-${stamp}.ca`, period: 1 },
    { domain: `vibnai-${stamp}.ai`, period: 1 }, // should auto-bump to 2y
    { domain: `vibnai-${stamp}.io`, period: 1 },
    { domain: `vibnai-${stamp}.com`, period: 1 },
  ];
  for (const c of cases) {
    try {
      const r = await checkDomain(c.domain, c.period);
      console.log(c.domain.padEnd(32), '->', JSON.stringify(r));
    } catch (err) {
      console.log(c.domain.padEnd(32), '-> ERR', err instanceof Error ? err.message : err);
    }
  }
}

main().catch(err => { console.error(err); process.exit(1); });
