<commit_before>/* jshint node: true */

module.exports = function(environment) {
  var ENV = {
    APP: {},
    modulePrefix: 'aeonvera',
    podModulePrefix: 'aeonvera/pods',
    i18n: {
      defaultLocale: 'en'
    },
    environment: environment,
    baseURL: '/',
    locationType: 'auto',
    EmberENV: {
      FEATURES: {
        // Here you can enable experimental features on an ember canary build
        // e.g. 'with-controller': true
      }
    },

    stripe: {
      key: 'a', /* set per event */
      /* development client id */
      clientId: 'ca_4oEqCCUzDfLTBqXsFbXyklhVUP8XdOfO'
    },

    devise: {
      serverTokenEndpoint: 'api/users/sign_in'
    },

    rollbar: {
      captureUncaught: environment !== 'development',
      accessToken: 'ca10480ec923459abdbe39a95c1181d9'
    },

    torii: {
      providers: {
        'stripe-connect': {
          apiKey: process.env.STRIPE_CLIENT_ID
        }
      }
    },

    localSettings: {
      serializer: 'json',
      adapter: 'local-storage',
      prefix: 'aeonvera/'
    },

    'ember-simple-auth': {
      routeIfAlreadyAuthenticated: 'dashboard',
      // session: 'session:application',
      // store: 'session-store:local-storage',
      // authorizer: 'ember-simple-auth-authorizer:token',
      authorizer: 'authorizer:token',
      crossOriginWhitelist: ['*']
    },
    'ember-simple-auth-token': {
      serverTokenEndpoint: '/api/users/sign_in',
      identificationField: 'email',
      passwordField: 'password',
      tokenPropertyName: 'token',
      authorizationPrefix: 'Bearer ',
      authorizationHeaderName: 'Authorization',
      headers: {},
    },
    contentSecurityPolicy: {
      'default-src': "'none'",
      'script-src': "'self' 'unsafe-inline' 'unsafe-eval' *.stripe.com sidecar.gitter.im *",
      'font-src': "'self' *.amazonaws.com",
      'connect-src': "*",
      'img-src': "'self'  *.amazonaws.com data: https://*.stripe.com *",
      'style-src': "'self' 'unsafe-inline' *.aeonvera.com",
      'frame-src': "https://*.stripe.com"
    },
    flashMessageDefaults: {
      timeout: 10000
    }
  };

  /*
  ==========================
    Per Environment Setups
  ==========================
  */

  if (environment === 'development') {
    ENV.host = 'http://swing.vhost:3000';
    ENV.APP.host = 'http://swing.vhost:3000';

    ENV['ember-simple-auth-token']['serverTokenEndpoint'] =
      'http://swing.vhost:3000/api/users/sign_in';

    ENV.torii.providers['stripe-connect'].apiKey = ENV.stripe.clientId;
    ENV.torii.providers['stripe-connect'].redirectUri = 'http://swing.vhost:4200';

    ENV['ember-cli-mirage'] = {
      enabled: false
    };

    // Extremely detailed logging, highlighting every internal
    // step made while transitioning into a route, including
    // `beforeModel`, `model`, and `afterModel` hooks, and
    // information about redirects and aborted transitions
    // ENV.APP.LOG_RESOLVER = true;
    // ENV.APP.LOG_ACTIVE_GENERATION = true;
    ENV.APP.LOG_TRANSITIONS = true;
    ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
    // ENV.APP.LOG_VIEW_LOOKUPS = true;
  }

  if (environment === 'staging'){
    ENV.host = 'https://aeonvera-staging.work';
    ENV.APP.host = 'https://aeonvera-staging.work';
    ENV.S3Assets = 'https://s3.amazonaws.com/aeonvera-staging/ember';

    ENV['ember-cli-mirage'] = {
      enabled: false
    };

    ENV['ember-simple-auth-token']['serverTokenEndpoint'] =
      'https://aeonvera-staging.work/api/users/sign_in';

    ENV.torii.providers['stripe-connect'].redirectUri = ENV.host;

    ENV.APP.LOG_TRANSITIONS = true;
    ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
    
    ENV['contentSecurityPolicy'] = {
      'default-src': "'none'",
      'script-src': "'self' 'unsafe-inline' 'unsafe-eval' https://*.stripe.com sidecar.gitter.im",
      'font-src': "'self' *.amazonaws.com",
      'connect-src': "'self' *.aeonvera-staging.work",<commit_msg>add newrelic to cors... WHERE IS THIS EVEN COMING FROM<commit_after>/* jshint node: true */

module.exports = function(environment) {
  var ENV = {
    APP: {},
    modulePrefix: 'aeonvera',
    podModulePrefix: 'aeonvera/pods',
    i18n: {
      defaultLocale: 'en'
    },
    environment: environment,
    baseURL: '/',
    locationType: 'auto',
    EmberENV: {
      FEATURES: {
        // Here you can enable experimental features on an ember canary build
        // e.g. 'with-controller': true
      }
    },

    stripe: {
      key: 'a', /* set per event */
      /* development client id */
      clientId: 'ca_4oEqCCUzDfLTBqXsFbXyklhVUP8XdOfO'
    },

    devise: {
      serverTokenEndpoint: 'api/users/sign_in'
    },

    rollbar: {
      captureUncaught: environment !== 'development',
      accessToken: 'ca10480ec923459abdbe39a95c1181d9'
    },

    torii: {
      providers: {
        'stripe-connect': {
          apiKey: process.env.STRIPE_CLIENT_ID
        }
      }
    },

    localSettings: {
      serializer: 'json',
      adapter: 'local-storage',
      prefix: 'aeonvera/'
    },

    'ember-simple-auth': {
      routeIfAlreadyAuthenticated: 'dashboard',
      // session: 'session:application',
      // store: 'session-store:local-storage',
      // authorizer: 'ember-simple-auth-authorizer:token',
      authorizer: 'authorizer:token',
      crossOriginWhitelist: ['*']
    },
    'ember-simple-auth-token': {
      serverTokenEndpoint: '/api/users/sign_in',
      identificationField: 'email',
      passwordField: 'password',
      tokenPropertyName: 'token',
      authorizationPrefix: 'Bearer ',
      authorizationHeaderName: 'Authorization',
      headers: {},
    },
    contentSecurityPolicy: {
      'default-src': "'none'",
      'script-src': "'self' 'unsafe-inline' 'unsafe-eval' js-agent.newrelic.com *.stripe.com sidecar.gitter.im *",
      'font-src': "'self' *.amazonaws.com",
      'connect-src': "*",
      'img-src': "'self'  *.amazonaws.com data: https://*.stripe.com *",
      'style-src': "'self' 'unsafe-inline' *.aeonvera.com",
      'frame-src': "https://*.stripe.com"
    },
    flashMessageDefaults: {
      timeout: 10000
    }
  };

  /*
  ==========================
    Per Environment Setups
  ==========================
  */

  if (environment === 'development') {
    ENV.host = 'http://swing.vhost:3000';
    ENV.APP.host = 'http://swing.vhost:3000';

    ENV['ember-simple-auth-token']['serverTokenEndpoint'] =
      'http://swing.vhost:3000/api/users/sign_in';

    ENV.torii.providers['stripe-connect'].apiKey = ENV.stripe.clientId;
    ENV.torii.providers['stripe-connect'].redirectUri = 'http://swing.vhost:4200';

    ENV['ember-cli-mirage'] = {
      enabled: false
    };

    // Extremely detailed logging, highlighting every internal
    // step made while transitioning into a route, including
    // `beforeModel`, `model`, and `afterModel` hooks, and
    // information about redirects and aborted transitions
    // ENV.APP.LOG_RESOLVER = true;
    // ENV.APP.LOG_ACTIVE_GENERATION = true;
    ENV.APP.LOG_TRANSITIONS = true;
    ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
    // ENV.APP.LOG_VIEW_LOOKUPS = true;
  }

  if (environment === 'staging'){
    ENV.host = 'https://aeonvera-staging.work';
    ENV.APP.host = 'https://aeonvera-staging.work';
    ENV.S3Assets = 'https://s3.amazonaws.com/aeonvera-staging/ember';

    ENV['ember-cli-mirage'] = {
      enabled: false
    };

    ENV['ember-simple-auth-token']['serverTokenEndpoint'] =
      'https://aeonvera-staging.work/api/users/sign_in';

    ENV.torii.providers['stripe-connect'].redirectUri = ENV.host;

    ENV.APP.LOG_TRANSITIONS = true;
    ENV.APP.LOG_TRANSITIONS_INTERNAL = true;

    ENV['contentSecurityPolicy'] = {
      'default-src': "'none'",
      'script-src': "'self' 'unsafe-inline' 'unsafe-eval' https://*.stripe.com sidecar.gitter.im",
      'font-src': "'self' *.amazonaws.com",
      'connect-src': "'self' *.aeonvera-staging.work",
{'fraction_non_alphanumeric': 0.17379240761760625, 'fraction_numerical': 0.011855215033421617, 'mean_word_length': 2.7494089834515365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '770966', 'n_tokens_mistral': 2796, 'n_tokens_neox': 2653, 'n_words': 433}