Skip to content

fix(mac-configs): resolve the seed file from the package root - #57

Merged
neo773 merged 1 commit into
neo773:masterfrom
Nethrenial:fix/mac-configs-seed-path
Oct 6, 2026
Merged

neo773 merged 1 commit into
neo773:masterfrom
Nethrenial:fix/mac-configs-seed-path

Conversation

@Nethrenial

@Nethrenial Nethrenial commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #56.

populate-mac-configs --seed failed on a clean build because SEED_PATH resolved under dist/, where tsc never emits the JSON. That broke README setup step 4, and the same command runs on every Dockerfile.api boot, where it failed silently: nest-commander writes command errors to stderr and exits 0, so the container started but seeding was skipped.

The path now climbs to the package root and reads src/database/seeds/mac-configs.json, the same anchor MIGRATIONS_FOLDER uses in migrate-database.command.ts. This works from source (bun) and compiled (node) runs, and keeps --scrape writing the tracked seed file.

Verified:

  • From a clean dist/: bun run build:api, then bun run db:seed:mac-configs seeds 229 Mac configurations.
  • Built Dockerfile.api for both revisions: on master, populate-mac-configs --seed logs ENOENT inside the image; on this branch the seed file is present and --seed --dry-run reports 229 configurations.
  • bunx tsc --noEmit at root and in packages/macgamingdb-server, bun run lint, bun run format:check, bun run test.

SEED_PATH climbed three levels from the compiled command's directory, landing on dist/database/seeds, where tsc emits no JSON. Climb to the package root like MIGRATIONS_FOLDER does and read the seed from src/database/seeds, which exists in both source and container runs.
@neo773
neo773 merged commit 66cc787 into neo773:master Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

populate-mac-configs --seed fails on a clean build (seed file looked up under dist/)

2 participants