import fs from "node:fs";
import { zmeelConfigSchema } from "@zmeel/shared";
import { resolvezmeelConfigPath } from "./paths.js";
export function readConfigFile() {
    const configPath = resolvezmeelConfigPath();
    if (!fs.existsSync(configPath))
        return null;
    try {
        const raw = JSON.parse(fs.readFileSync(configPath, "utf-8"));
        return zmeelConfigSchema.parse(raw);
    }
    catch {
        return null;
    }
}
//# sourceMappingURL=config-file.js.map