<commit_before>#!/usr/bin/env node

const fs = require('fs');
const path = require('path');

const command = process.argv[process.argv.length - 1];

/*const exists = (p, throwError) => {
  const doesExist = fs.existsSync(path.resolve(appRootDir.get(), `${p}.js`)) || fs.existsSync(path.resolve(appRootDir.get(), p, 'index.js'));
  if (!doesExist && throwError) throw new Error(`${p} not found in your root dir!`);
  else if (!doesExist) console.log(`${p} not found in your root dir!`);
  return doesExist;
};

exists('server');
exists('app', true);

require('babel-register')({
  presets: [
    [require.resolve('babel-preset-env'), { targets: { node: true } }],
    require.resolve('babel-preset-stage-3'),
    require.resolve('babel-preset-react'),
  ],
  only: [
    path.resolve(__dirname, '..', 'tools'),
    path.resolve(__dirname, '..', 'src'),
    path.resolve(__dirname, '..', 'config'),
    path.resolve(appRootDir.get(), 'universally.config.js')
  ],
});*/

if (fs.existsSync(path.resolve(__dirname, '..', 'node_modules', 'kyt', 'cli'))) {
  require(path.resolve(__dirname, '..', 'node_modules', 'kyt', 'cli'));
} else if (fs.existsSync(path.resolve(__dirname, '..', '..', 'kyt', 'cli'))) {
  require(path.resolve(__dirname, '..', '..', 'kyt', 'cli'));
} else throw new Error('kyt not found');<commit_msg>fix kyt start<commit_after>#!/usr/bin/env node

const fs = require('fs');
const path = require('path');

const command = process.argv[process.argv.length - 1];

/*const exists = (p, throwError) => {
  const doesExist = fs.existsSync(path.resolve(appRootDir.get(), `${p}.js`)) || fs.existsSync(path.resolve(appRootDir.get(), p, 'index.js'));
  if (!doesExist && throwError) throw new Error(`${p} not found in your root dir!`);
  else if (!doesExist) console.log(`${p} not found in your root dir!`);
  return doesExist;
};

exists('server');
exists('app', true);

require('babel-register')({
  presets: [
    [require.resolve('babel-preset-env'), { targets: { node: true } }],
    require.resolve('babel-preset-stage-3'),
    require.resolve('babel-preset-react'),
  ],
  only: [
    path.resolve(__dirname, '..', 'tools'),
    path.resolve(__dirname, '..', 'src'),
    path.resolve(__dirname, '..', 'config'),
    path.resolve(appRootDir.get(), 'universally.config.js')
  ],
});*/

if (command === 'start') return require(path.resolve(process.cwd(), 'server', 'main'));
if (fs.existsSync(path.resolve(__dirname, '..', 'node_modules', 'kyt', 'cli'))) {
  require(path.resolve(__dirname, '..', 'node_modules', 'kyt', 'cli'));
} else if (fs.existsSync(path.resolve(__dirname, '..', '..', 'kyt', 'cli'))) {
  require(path.resolve(__dirname, '..', '..', 'kyt', 'cli'));
} else throw new Error('kyt not found');
{'fraction_non_alphanumeric': 0.23602941176470588, 'fraction_numerical': 0.0014705882352941176, 'mean_word_length': 4.610309278350515, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2070627', 'n_tokens_mistral': 948, 'n_tokens_neox': 945, 'n_words': 188}