Seed helper: @intecion/ipal-kit/seed (createSeeder + building blocks)
createSeeder(payload, { dryRun, update, force, guard, editCheck, context, ... })
returns upsertBySlug, upsertBy, fillGlobal and summary(); building blocks
isLocalDatabase, writeLocales, seedHash, projectOnto, editedSinceSeed.
Behaviour follows docs/seeding.md: create-only by default, natural keys,
never deletes, globals get empty fields only, every locale written with
fallbackLocale: false onto the same row ids, records edited since seeding
skipped, update refused on production / non-local DB unless
IPAL_SEED_ALLOW_PROD_UPDATE=1, context.ipalSkipIndexNow on every write.
Both seed templates now use the helper. Node-only entry (no 'server-only',
which throws under `payload run`). SQLite integration tests cover the
production guard, the edited-record skip, the hash field, row ids and
the IndexNow skip. Agent guide (AGENT.md, ipal-reference, ipal-site,
ipal-form) and seeding.md updated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b61b753ec2
commit
cff76c2a69
@@ -20,6 +20,7 @@ const ENTRIES: Record<string, string> = {
|
||||
'/env': 'src/exports/env.ts',
|
||||
'/next/middleware': 'src/exports/next-middleware.ts',
|
||||
'/rsc': 'src/exports/rsc.ts',
|
||||
'/seed': 'src/exports/seed.ts',
|
||||
'/server': 'src/exports/server.ts',
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user