Fix MITM window

This commit is contained in:
decolua
2026-03-16 09:11:19 +07:00
parent 65af4328fd
commit 62d7e61907
8 changed files with 105 additions and 136 deletions

View File

@@ -162,7 +162,7 @@ export async function GET() {
} catch {
// Try loading from global node_modules (user ran: npm i better-sqlite3 -g)
try {
const globalRoot = execSync("npm root -g", { timeout: 5000 }).toString().trim();
const globalRoot = execSync("npm root -g", { timeout: 5000, windowsHide: true }).toString().trim();
const requireGlobal = createRequire(join(globalRoot, "better-sqlite3", "package.json"));
Database = requireGlobal("better-sqlite3");
} catch { /* fall through to sqlite3 CLI strategy */ }