import { writeFileSync } from "node:fs";
import { join } from "node:path";
import { getConfigDir } from "../config/index.js";
import { logger } from "../logger.js";
const HEARTBEAT_FILENAME = "heartbeat";
export function getHeartbeatFilePath() {
    return join(getConfigDir(), HEARTBEAT_FILENAME);
}
export function writeHeartbeatFile() {
    try {
        writeFileSync(getHeartbeatFilePath(), String(Date.now()), "utf-8");
    }
    catch (err) {
        logger.warn(`Failed to write heartbeat file: ${err instanceof Error ? err.message : String(err)}`);
    }
}
//# sourceMappingURL=heartbeat-file.js.map