<commit_before>var Path = require('path');
var uuid64 = require('uuid64');

if (!process.env.NODE_CONFIG_DIR) {
  process.env.NODE_CONFIG_DIR = Path.join(__dirname, '../../server/config/env');
}

var ebEnv = require('eb-env');

if (!ebEnv.name) {
  var packageFile = Path.join(__dirname, '../../package.json');
  var packageName = 'unknown';
  try {
    var pkg = require(packageFile);
    packageName = pkg.name;
  } catch (e) {
    // will use default name
  }
  ebEnv.name = packageName + '-local-env';
}

var envRegEx = /-([^-]+)-env/;
var match = envRegEx.exec(ebEnv.name);
process.env.NODE_ENV = match[1];

var config = require('config');

config.env = {
  name: ebEnv.name,
  app: ebEnv.app || {
    sourceId: uuid64()
  }
};

module.exports = config;<commit_msg>get env type<commit_after>var Path = require('path');
var uuid64 = require('uuid64');

if (!process.env.NODE_CONFIG_DIR) {
  process.env.NODE_CONFIG_DIR = Path.join(__dirname, '../../server/config/env');
}

var ebEnv = require('eb-env');

if (!ebEnv.name) {
  var packageFile = Path.join(__dirname, '../../package.json');
  var packageName = 'unknown';
  try {
    var pkg = require(packageFile);
    packageName = pkg.name;
  } catch (e) {
    // will use default name
  }
  ebEnv.name = packageName + '-local-env';
}

var envRegEx = /-([^-]+)-env/;
var match = envRegEx.exec(ebEnv.name);
var envType = match[1] || 'local';
process.env.NODE_ENV = envType;

var config = require('config');

config.env = {
  name: ebEnv.name,
  type: envType,
  app: ebEnv.app || {
    sourceId: uuid64()
  }
};

module.exports = config;
{'fraction_non_alphanumeric': 0.18867924528301888, 'fraction_numerical': 0.00880503144654088, 'mean_word_length': 3.4565826330532214, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1481384', 'n_tokens_mistral': 578, 'n_tokens_neox': 574, 'n_words': 123}