fix(cli): resolve SQL directory at runtime for bundled CLI
The sqlDir() function was using __dirname which gets baked in at build time by bundlers (bun/esbuild), causing prepare-db --print-sql to fail when run from npm-installed package.
Changes:
-
Use import.meta.url with fileURLToPath for runtime path resolution
-
Copy SQL files to dist/sql during build
-
Add CI smoke test to verify prepare-db --print-sql works
Related issue: https://gitlab.com/postgres-ai/platform/-/issues/346
Edited by Dementii Priadko