Skip to content
SprecherEast
Issue 625

Type the seed script's JSON rows instead of any[]

Back to our plan
Open
cmstech-debtpriority: low

In plain words: scripts/seed.ts still reads its data files as any[], so a wrong field name in the JSON isn't caught.

Details: found while fixing #618. rawEvents, rawPosts and rawBoard are cast to { events: any[] } and similar, and the loops read fields with many fallbacks (time_start ?? timeStart). Give each row a plain type (or a Zod schema) and map it to RequiredDataFromCollectionSlug. Check first whether scripts/seed.ts is still used, since src/endpoints/seed/ is the maintained seed and npx payload run is broken on Node 24; if it isn't, delete it instead.

Acceptance criteria

  • No any left in scripts/seed.ts, or the script is removed with a note on why

Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab