"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.recommendedVersion = void 0;
exports.default = checkNodeVersion;
const semver_1 = require("semver");
const minimumVersion = '>=20';
exports.recommendedVersion = '24';
function checkNodeVersion() {
    if ('SKIP_NODE_VERSION_CHECK' in process.env)
        return;
    if (!(0, semver_1.satisfies)(process.version, minimumVersion)) {
        console.error(`The installed version of node (${process.version}) is older than the minimum required version (${minimumVersion}). See https://github.com/SignalK/signalk-server/wiki/Installing-and-Updating-Node.js for more information how to upgrade.`);
        process.exit(1);
    }
    else if (!(0, semver_1.satisfies)(process.version, exports.recommendedVersion)) {
        console.warn(`The installed version of node (${process.version}) is different than the recommended version (${exports.recommendedVersion}). See https://github.com/SignalK/signalk-server/wiki/Installing-and-Updating-Node.js for more information how to upgrade.`);
    }
}
//# sourceMappingURL=version.js.map