Make initialized type generation work without external Postgres - #55
Open
gilmarGNJ wants to merge 1 commit into
Open
Make initialized type generation work without external Postgres#55gilmarGNJ wants to merge 1 commit into
gilmarGNJ wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2.
@algora-pbc /claim #2
pgstrap generateand the API now use an in-memory PGlite database by default, so the existing script produced bypgstrap initneeds no external Postgres.--no-pglite/pglite: falseretain the external-database path.The embedded path binds only to loopback, closes its gateway and PGlite instance, and restores both
DATABASE_URLandPOSTGRES_URIon success or failure. The latter matters becausepg-schema-dumpgivesPOSTGRES_URIprecedence.Testing the actual installed package uncovered two additional blockers in this exact workflow, addressed here with regressions:
#in its directory name.node-pg-migratepeer to v9, which exports a namedrunner. The loader now accepts that as well as the existing v6 default-export forms, without changing dependency versions.Validation performed locally:
bun test: 14 passed, 0 failed, including real migrations, CLI/API defaults, the scaffolded script, the compiled Node CLI, export compatibility, error cleanup and environment restoration.bun run format:check, andgit diff --checkpass.bun run db:generatewith external database URIs pointing at unused loopback port 1. It exits 0 and generates both typed Zapatos declarations and SQL for a migrated table with defaults and indexes. A repeat run produces the same type-file hash.--no-pglitefails withECONNREFUSEDat that unused port, as expected.AI-assisted implementation and review, with the commands and results above actually run. No claim of human review or bounty award; this is submitted for maintainer evaluation.