/** * Entry point: @intecion/ipal-kit/seed * * Seed helper for the project's seed scripts (docs/seeding.md): * * // scripts/seed-content.ts — pnpm payload run scripts/seed-content.ts * import config from '@payload-config' * import { getPayload } from 'payload' * import { createSeeder, guardSeedExit } from '@intecion/ipal-kit/seed' * * guardSeedExit() // first: an early exit (no Payload, unfinished run) becomes exit 1, not a silent 0 * const seed = createSeeder(await getPayload({ config })) * await seed.upsertBySlug('pages', [{ title: { pl: 'Kontakt', en: 'Contact' }, slug: { pl: 'kontakt', en: 'contact' } }]) * await seed.fillGlobal('header', { links: [] }) * process.exit(seed.summary().errors ? 1 : 0) * * Server only: Node built-ins and the Local API. Never import it from client * code, the Payload config or a route. It does not import 'server-only' — that * package throws in plain Node, and `payload run` is plain Node. */ export { activeSeedExitGuard, createSeeder, editedSinceSeed, guardSeedExit, isLocalDatabase, projectOnto, seedHash, writeLocales, } from '../modules/seed/index.js' export type { EditedSinceSeedArgs, Seeder, SeederOptions, SeedExitGuard, SeedExitGuardOptions, SeedExitProcess, SeedResult, SeedStatus, SeedSummary, SeedTarget, SeedValue, UpsertOptions, WriteLocalesOptions, } from '../modules/seed/index.js'