'use strict';

const tools = require('../../scripts/utils/tools');
const migrateUtils = require('../../scripts/utils/migrate/migrate-utils');
const configUtils = require('../../scripts/csdr/config/config-utils');

Promise.resolve()
  .then(() => {
    const pkg = configUtils.packages.getPackage();
    return migrateUtils.migrate(pkg);
  })
  .then(() => {
    tools.logSuccess();
  })
  .catch((e) => {
    tools.logError('ERROR found while building package');
    console.error(e);
    process.exit(1);
  })
