import { colors, log } from "../../../deps.js";
let GLOBAL_VERSIONS = {
    remoteMajor: undefined,
    remoteMinor: undefined,
};
export function updateGlobalVersions(version) {
    try {
        const [prefix, remoteMinorStr] = version.split(".");
        GLOBAL_VERSIONS = {
            remoteMajor: parseInt(prefix.split("v")[1]),
            remoteMinor: parseInt(remoteMinorStr),
        };
    }
    catch (e) {
        log.info(colors.gray(`Error reading remote version: ${e}`));
    }
}
export function isVersionsGeq1585() {
    return (GLOBAL_VERSIONS.remoteMajor !== undefined &&
        GLOBAL_VERSIONS.remoteMajor >= 1 &&
        GLOBAL_VERSIONS.remoteMinor !== undefined &&
        GLOBAL_VERSIONS.remoteMinor >= 585);
}
