import { getPayload } from 'payload' import configPromise from '../src/payload.config' async function run() { const payload = await getPayload({ config: configPromise }) const pages = await payload.find({ collection: 'pages', locale: 'all', limit: 100 }) for (const p of pages.docs) { if (!p.layout) continue; for (const b of p.layout) { if (b.blockType === 'contactSection') { console.log(`Page ${p.slug} has contactSection in some locale.`) break; } } } process.exit(0) } run().catch(console.error)