"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDatabasePath = getDatabasePath;
const path_1 = __importDefault(require("path"));
const fs_1 = __importDefault(require("fs"));
const os_1 = require("os");
/**
 * Get the database file path, ensuring the directory exists
 */
function getDatabasePath() {
    // Use the user's home directory for persistent storage
    const userDataPath = path_1.default.join((0, os_1.homedir)(), '.one-logger');
    const dbDir = path_1.default.join(userDataPath, 'database');
    console.log("db path is ", dbDir);
    // Ensure the directory exists
    if (!fs_1.default.existsSync(dbDir)) {
        fs_1.default.mkdirSync(dbDir, { recursive: true });
    }
    return path_1.default.join(dbDir, 'projects-database');
}
//# sourceMappingURL=paths.js.map