<commit_before>/*
 * config.js: Configuration for the jitsu CLI.
 *
 * (C) 2010, Nodejitsu Inc.
 *
 */

var path = require('path'),
    fs = require('fs'),
    jitsu = require('../jitsu');

//
// Store the original `jitsu.config.load()` function
// for later use.
//
var _load = jitsu.config.load;

//
// Setup target file for `.jitsuconf`.
//
//
// TODO: Refactor broadway to emit `bootstrap:after` and put this 
//       code in a handler for that event
//
try {
  jitsu.config.file({
    file: jitsu.argv.jitsuconf || jitsu.argv.j || '.jitsuconf',
    dir: process.cwd(),
    search: true
  });
}
catch (err) {
  console.log('Error parsing ' + jitsu.config.stores.file.file.magenta);
  console.log(err.message);
  console.log('');
  console.log('This is most likely not an error in jitsu.');
  console.log('Please check your jitsuconf and try again.');
  console.log('');
  process.exit(1);
}


var defaults = {
  analyze: true,
  colors: true,
  debug: true,
  gzipbin: 'gzip',
  loglevel: 'info',
  loglength: 110,
  protocol: 'http',
  remoteHost: 'api.nodejitsu.com',
  requiresAuth: ['apps', 'databases', 'env', 'logs', 'snapshots'],
  root: process.env.HOME,
  tar: 'tar',
  tmproot: process.env.HOME + '/.jitsu/tmp',
  userconfig: '.jitsuconf'
};

Object.defineProperty(defaults, 'remoteUri', {<commit_msg>[api minor] Begin searching for .jitsuconf from `process.env.HOME`<commit_after>/*
 * config.js: Configuration for the jitsu CLI.
 *
 * (C) 2010, Nodejitsu Inc.
 *
 */

var path = require('path'),
    fs = require('fs'),
    jitsu = require('../jitsu');

//
// Store the original `jitsu.config.load()` function
// for later use.
//
var _load = jitsu.config.load;

//
// Setup target file for `.jitsuconf`.
//
//
// TODO: Refactor broadway to emit `bootstrap:after` and put this 
//       code in a handler for that event
//
try {
  jitsu.config.file({
    file: jitsu.argv.jitsuconf || jitsu.argv.j || '.jitsuconf',
    dir: process.env.HOME,
    search: true
  });
}
catch (err) {
  console.log('Error parsing ' + jitsu.config.stores.file.file.magenta);
  console.log(err.message);
  console.log('');
  console.log('This is most likely not an error in jitsu.');
  console.log('Please check your jitsuconf and try again.');
  console.log('');
  process.exit(1);
}


var defaults = {
  analyze: true,
  colors: true,
  debug: true,
  gzipbin: 'gzip',
  loglevel: 'info',
  loglength: 110,
  protocol: 'http',
  remoteHost: 'api.nodejitsu.com',
  requiresAuth: ['apps', 'databases', 'env', 'logs', 'snapshots'],
  root: process.env.HOME,
  tar: 'tar',
  tmproot: process.env.HOME + '/.jitsu/tmp',
  userconfig: '.jitsuconf'
};

Object.defineProperty(defaults, 'remoteUri', {
{'fraction_non_alphanumeric': 0.17782738095238096, 'fraction_numerical': 0.005952380952380952, 'mean_word_length': 3.309294871794872, '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': '4397501', 'n_tokens_mistral': 1005, 'n_tokens_neox': 952, 'n_words': 247}