"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NodeVersionUtils = void 0;
const ProcessNodeVersion_1 = require("../model/ProcessNodeVersion");
const SupportedNodeVersion_1 = require("../model/SupportedNodeVersion");
const utils_1 = require("../utils");
class NodeVersionUtils {
    constructor() {
        this.processNodeVersion = new ProcessNodeVersion_1.ProcessNodeVersion();
        this.supportedNodeVersion = new SupportedNodeVersion_1.SupportedNodeVersion();
    }
    processVersion() {
        return this.processNodeVersion.toString();
    }
    supportedVersion() {
        return this.supportedNodeVersion.toString();
    }
    versionsDefined() {
        return (this.supportedNodeVersion.isDefined() &&
            this.processNodeVersion.isDefined());
    }
    strictVersionEqual() {
        this.compareDebugLog();
        return this.processVersion() === this.supportedVersion();
    }
    majorVersionEqual() {
        this.compareDebugLog();
        return (this.processNodeVersion.major === this.supportedNodeVersion.major);
    }
    minorVersionEqual() {
        this.compareDebugLog();
        return (this.processNodeVersion.minor === this.supportedNodeVersion.minor);
    }
    patchVersionEqual() {
        this.compareDebugLog();
        return (this.processNodeVersion.patch === this.supportedNodeVersion.patch);
    }
    compareDebugLog() {
        utils_1.debug(`Comparing ${this.processNodeVersion} ${this.supportedNodeVersion}`);
    }
}
exports.NodeVersionUtils = NodeVersionUtils;
//# sourceMappingURL=NodeUtils.js.map