Files
klz-cables.com/scripts/inspect-start.ts
Marc Mintel 0cb96dfbac
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Failing after 2m15s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
feat: product catalog
2026-03-01 10:19:13 +01:00

28 lines
870 B
TypeScript

import { getPayload } from 'payload';
import configPromise from '../payload.config';
async function inspectStart() {
const payload = await getPayload({ config: configPromise });
const result = await payload.find({
collection: 'pages',
where: { slug: { equals: 'start' } },
locale: 'de'
});
if (result.docs.length > 0) {
const doc = result.docs[0];
console.log('Start Page:', doc.title);
console.log('Excerpt:', doc.excerpt);
// Print block types in content
if (doc.content?.root?.children) {
const blocks = doc.content.root.children.filter((n: any) => n.type === 'block');
console.log('Blocks found:', blocks.map((b: any) => b.blockType || b.type));
}
} else {
console.log('Start page not found');
}
process.exit(0);
}
inspectStart();