mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-02 13:22:11 +03:00
The db-backups import route statically imported better-sqlite3, which is stripped from the Next standalone server's node_modules in the packaged Electron app. Loading the route then crashed with "Cannot find module 'better-sqlite3'" on the Windows installer, even though node:sqlite was available. Route the upload integrity-check through openDatabaseAsync (better-sqlite3 -> node:sqlite -> sql.js), matching every other DB path. Adds a guard test so no API route can reintroduce a direct native import.