'use strict';

const injectionUtils = require('../../scripts/utils/pre-build/injection/injection-utils');
const tools = require('../../scripts/utils/tools');
const configUtils = require('../../scripts/csdr/config/config-utils');

let { configEnvTarget } = tools.getArgs();

Promise.resolve()
  .then(() => {
    const prj = configUtils.projects.getProject();
    return injectionUtils.openid.injectAppConfig(prj, configEnvTarget);
  })
  .catch((e) => {
    console.error(e);
    process.exit(1);
  });
