payload run starts the CLI with `void start()` and imports the script; when the script's top-level await is left without live handles, Node exits with code 0 and no output — a success in Coolify's Terminal. guardSeedExit() (@intecion/ipal-kit/seed, dependency-free) listens for beforeExit: until summary() runs it prints "[seed] ended before Payload initialized" / "… before the seed finished" and exits 1. createSeeder marks the run initialized, summary() finished; process.exit paths (normal, errors, the production refusals) are untouched. Wired into the ipal-site and ipal-form seed templates and the reference seed, so ipal-kit create sites get it. Tests include a real child process started like payload run. Docs: seeding.md, deployment.md §4.7, AGENT.md, ipal-reference (+ api.md), CHANGELOG Unreleased. Co-Authored-By: Claude Opus 5.5 <[email protected]>
8 lines
538 B
TypeScript
8 lines
538 B
TypeScript
export { activeSeedExitGuard, guardSeedExit } from './exitGuard.js'
|
|
export type { SeedExitGuard, SeedExitGuardOptions, SeedExitProcess } from './exitGuard.js'
|
|
export { isLocalDatabase } from './guard.js'
|
|
export { createSeeder } from './seeder.js'
|
|
export type { Seeder, SeederOptions, SeedResult, SeedStatus, SeedSummary, UpsertOptions } from './seeder.js'
|
|
export { editedSinceSeed, projectOnto, seedHash, writeLocales } from './values.js'
|
|
export type { EditedSinceSeedArgs, SeedTarget, SeedValue, WriteLocalesOptions } from './values.js'
|