"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatDate = void 0;
const node_fs_1 = require("node:fs");
const node_os_1 = require("node:os");
const node_path_1 = require("node:path");
const formatDate = () => {
    const now = new Date();
    const year = now.getFullYear();
    const month = String(now.getMonth() + 1).padStart(2, "0");
    const day = String(now.getDate()).padStart(2, "0");
    return `${year}-${month}-${day}`;
};
exports.formatDate = formatDate;
const getAIGNEHomePath = () => {
    const folder = (0, node_path_1.join)("images", (0, exports.formatDate)());
    const AIGNE_OBSERVER_IMAGE_DIR = (0, node_path_1.join)((0, node_os_1.homedir)(), ".aigne", "observability", folder);
    if (!(0, node_fs_1.existsSync)(AIGNE_OBSERVER_IMAGE_DIR)) {
        (0, node_fs_1.mkdirSync)(AIGNE_OBSERVER_IMAGE_DIR, { recursive: true });
    }
    return AIGNE_OBSERVER_IMAGE_DIR;
};
exports.default = getAIGNEHomePath;
