"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const semver_1 = require("semver");
function computeVersionCodeFromVersion(v, defaultVersion = 1) {
    if (!semver_1.valid(v)) {
        return defaultVersion;
    }
    const i = semver_1.parse(v);
    if (!i) {
        return defaultVersion;
    }
    return i.major * 1000000 + i.minor * 10000 + i.patch;
}
exports.computeVersionCodeFromVersion = computeVersionCodeFromVersion;
//# sourceMappingURL=utility.js.map