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
@@ -29,6 +29,11 @@
|
||||
"types": "./dist/exports/server.d.ts",
|
||||
"default": "./dist/exports/server.js"
|
||||
},
|
||||
"./seed": {
|
||||
"import": "./dist/exports/seed.js",
|
||||
"types": "./dist/exports/seed.d.ts",
|
||||
"default": "./dist/exports/seed.js"
|
||||
},
|
||||
"./next/middleware": {
|
||||
"import": "./dist/exports/next-middleware.js",
|
||||
"types": "./dist/exports/next-middleware.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user