import { initDatabase, resolveSyncDbPath } from "./database.js";
let initialized = false;
export function ensureSyncDatabase(dbPath) {
    if (initialized)
        return;
    initDatabase(dbPath);
    initialized = true;
    const path = dbPath ?? resolveSyncDbPath();
    console.error(`[Friday-SYNC] Database initialized at ${path}`);
}
/** Vitest-only: reset for tests that need a fresh DB */
export function resetSyncInitForTest() {
    initialized = false;
}
