const packageEnv = require('../package.json');
/* sentry */
function getEnv() {
  const env = process.env.mode || '';
  let environment = '';
  switch (env) {
    case 'test':
      environment = 'development';
      break;
    case 'pre':
      environment = 'preview';
      break;
    case '':
      environment = 'production';
      break;
    default:
      environment = 'production';
      break;
  }
  return environment;
}
export const sentryOptions = {
  dsn: `https://61a2691f71014d5fa79d4f9aba78a109@sentry.guangdianyun.tv/8`,
  version: packageEnv.version,
  env: getEnv(),
  name: packageEnv.name
};

export const uploaderOptions = {
  accessKeyId: 'LTAIIgVna8MHelpI',
  accessKeySecret: 'fqQNjEGxww3ZZJ9GbUfNp2yzsWUcnl',
  endpoint: 'oss-cn-hangzhou.aliyuncs.com',
  cname: 'false',
  multiFiles: true
};

module.exports = {
  DEF_DOMAIM: '//apiliveroom.dev.guangdianyun.tv',
  DEF_OSS: '//static-pro.guangdianyun.tv',
  DEF_AODIANYUN: '//cdn.aodianyun.com',
  DEF_S_AODIANYUN: '//cdn.aodianyun.com',
  DEF_SITE: '//web.guangdianyun.tv',
  GTAG_ID: 'G-H08BKPKZPJ',
  SERVE_PORT: 3000,
  HTTPS_PORT: '',
  HTTP_PORT: '',
  X_CA_STAGE: '',
  private: false,
  sentryOptions,
  uploaderName: 'aliyun',
  uploaderOptions
};
