"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.runNodeDoctor = runNodeDoctor;
const checks_1 = require("./checks");
const runner_1 = require("./runner");
/**
 * Run the farm-runner dependency health check.
 * Returns the process exit code (0 = success, 1 = required failure).
 */
async function runNodeDoctor(opts = {}) {
    const platform = opts.platform || (0, checks_1.defaultPlatformForOS)();
    const checks = (0, checks_1.buildNodeChecks)({ platform, hubUrl: opts.hubUrl });
    const header = `farm-runner doctor  (platform=${platform}, os=${process.platform})`;
    const summary = await (0, runner_1.runChecks)(header, checks);
    return summary.exitCode;
}
//# sourceMappingURL=index.js.map