<commit_before>var main = require('./cli-main');

function cli(fun) {
  var pckName = 'Configuration-manager';
  console.log('Module \'' + pckName + '\' started');
  fun();
  console.log('Module \'' + pckName + '\' finished');
}

cli(main);

// process.argv.forEach(function (val, index, array) {
  // console.log(index + ': ' + val);
// });
<commit_msg>Update cli.js<commit_after>(function() {
  'use strict';

  var parser = require('nomnom');
  var ConfigurationManager = require('./configuration-manager');

  function main() {
    var cManager = new ConfigurationManager();

    parser.command('init')
      .callback(initHandle)
      .help('run init');

    parser.command('version-update-major')
      .callback(handleMajor)
      .help('run version update --type=major');
    parser.parse();

    function initHandle(opts) {
      cManager.init();
    }

    function handleMajor(opts) {
      cManager.incMajor();
    }

    function handle(opts) {
      if(!(opts.type in methods)) {
        console.log('Type not found.');
        return;
      }
      console.log(opts.type);
      var funName = 'cManager.' + opts.type + '()';
      eval(funName);
    }
  }

  function wrapper() {
    var pckName = 'Configuration-manager';
    console.log('Module \'' + pckName + '\' started');
    main();
    console.log('Module \'' + pckName + '\' finished');
  }

  wrapper();
})();

{'fraction_non_alphanumeric': 0.1847041847041847, 'fraction_numerical': 0.0, 'mean_word_length': 2.8421052631578947, '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': '5030842', 'n_tokens_mistral': 444, 'n_tokens_neox': 431, 'n_words': 83}