Major version update. Major bugfixes. Security vulnerabilites fixed

This commit is contained in:
2026-10-14 03:02:07 +01:00
parent 4e47bd8ce0
commit 7c095f6f16
112 changed files with 2479 additions and 1219 deletions
+12
View File
@@ -0,0 +1,12 @@
import fs from "fs";
import path from "path";
/**
* # Write a consistent copy of the database to `dst`
* @description Uses `VACUUM INTO`, which includes changes still in the WAL
* file (a plain file copy misses them).
*/
export default function snapshotDb({ db, dst }) {
fs.mkdirSync(path.dirname(dst), { recursive: true });
fs.rmSync(dst, { force: true });
db.run("VACUUM INTO ?", [dst]);
}