"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

function _constants() {
  const data = require("../../../constants");

  _constants = function () {
    return data;
  };

  return data;
}

/**
 * Add default binding prefix to version model
 * @param {*} versionModel - The parsed component model
 */
function removeLatestFromCompiler(versionModel) {
  if (versionModel.compiler && versionModel.compiler.indexOf(_constants().LATEST) > -1) {
    console.log('replacing before: ', versionModel.compiler);
    versionModel.compiler = versionModel.compiler.replace(`${_constants().VERSION_DELIMITER}${_constants().LATEST}`, '');
    console.log('replacing after: ', versionModel.compiler);
  }

  return versionModel;
}

const removeLatestFromCompilerDeclartaion = {
  name: 'remove latest from compiler',
  migrate: removeLatestFromCompiler
};
var _default = removeLatestFromCompilerDeclartaion;
exports.default = _default;