import { getPayload } from 'payload';
import configPromise from '@payload-config';

async function run() {
  const payload = await getPayload({ config: configPromise });
  const result = await payload.find({ collection: 'pages', limit: 1 });
  const doc = result.docs[0] as any;
  console.log('Sample page:', doc.slug);
  console.log('Content structure (first 2 levels):');
  console.log(JSON.stringify(doc.content, null, 2).slice(0, 3000));
  process.exit(0);
}

run();
