-
released this
2026-08-06 21:30:37 -05:00 | 95 commits to main since this releaseFixed
A
DATABASE_URLthat Postgres cannot parse now fails at boot, naming the cause.Both Swarm stack entries build their DSN by interpolating a password into a URL, and a password holding a literal
/,#or?ends the authority early — the port becomes a non-numeric string and the URL is rejected. The config only asked for a non-empty string, so it loaded clean and the API started, then died on its first query four frames insidepg:ERR fatal | error=TypeError: Invalid URL at parse (/app/node_modules/pg-connection-string/index.js:30) at ApiStore.assertSchema (file:///app/dist/src/api/store.js:73)Nothing in that names the variable at fault or the reason, and the stack points at library code.
DATABASE_URLis now validated in bothloadConfigandloadApiConfigagainst pg own parser rather than anew URLlookalike — the question worth answering is whethernew Pool()will accept the string, and a check that can drift from the real one is not that question.Two things beyond it parsed are also required, because
parsecannot fail on a stray word: it resolves relative strings against a base URL, soxcomes back as hostbase. A scheme is what distinguishes a DSN, and a non-empty host is what distinguishespostgres:///db, which parses fine and then fails as a refused connection. Both unix-socket forms still pass.The message names the variable and the offending characters and never quotes the DSN, which carries the password inline.
pg-connection-stringmoves from a transitive dependency ofpgto a declared one, since it is now imported directly. It adds no install weight.Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)