Bug-fix release found while verifying v0.4.0 on both engines (whatsapp-web.js and Baileys): the Baileys QR
now renders in the dashboard, a synchronize-created SQLite data DB no longer crashes when adopting
migrations, and graceful shutdown is clean. No API or breaking changes.
Fixed
- Baileys QR code is now scannable from the dashboard. The Baileys engine returned the raw WhatsApp QR
ref string fromGET /sessions/:id/qr, while the dashboard (and the whatsapp-web.js engine) expect a PNG
data URL — so the dashboard's<img>showed a broken image and Baileys sessions could not be linked via
the UI. The Baileys adapter now renders the QR to adata:image/pngURL, matching the whatsapp-web.js
engine's contract (the REST response shape is now consistent across engines). - Adopting migrations over a
synchronize-created SQLite data DB no longer crashes on boot. A data DB
whose schema was created byDATABASE_SYNCHRONIZE=truehas an empty migrations table, so the baseline
migration re-ranCREATE TABLE "sessions"and aborted startup withtable "sessions" already exists. The
baseline migration is now idempotent (it skips when the schema already exists, mirroring the other
migrations), so switching a SQLite data DB from synchronize to migration-managed boots cleanly and the DB
becomes migration-managed going forward (existing rows preserved). Fresh deployments are unaffected. - Graceful shutdown no longer logs "could not find DataSource" on SIGTERM. With two named TypeORM
connections (main+data),@nestjs/typeorm's shutdown hook resolved the default (unnamed) DataSource
token and threwNest could not find DataSource element, leaving the DataSources undestroyed and the
process exiting non-zero. The connection factories now carry theirname, so the shutdown hook resolves
the correct named DataSource and the app shuts down cleanly (exit 0).
Changed
- Internal: the SQLite data-DB configuration comment and a dead
synchronizedefault inapp.module.tsnow
reflect the actual behavior (the data DB is migration-managed by default;DATABASE_SYNCHRONIZE=trueopts
into synchronize). No runtime behavior change.