<commit_before>let
  config,
  rc = require('rc');

function unstringify (cfg) {
  Object.keys(cfg).forEach(k => {
    // exception - *version entries need to be kept as string
    if (/version$/i.test(k)) {
      return;
    }

    if (typeof cfg[k] === 'string') {
      if (cfg[k] === 'true') {
        cfg[k] = true;
      }
      else if (cfg[k] === 'false') {
        cfg[k] = false;
      }
      else if (/^[0-9]+$/.test(cfg[k])) {
        cfg[k] = parseInt(cfg[k]);
      }
      else if (/^[0-9]+\.[0-9]+$/.test(cfg[k])) {
        cfg[k] = parseFloat(cfg[k]);
      }
    }
    else if (cfg[k] instanceof Object) {
      cfg[k] = unstringify(cfg[k]);
    }
  });

  return cfg;
}

config = rc('proxy', {
  logs: {
    access: [
      {
        type: 'console',
        level: 'info',
        stderrLevels: []
      }
    ],
    errors: [
      {
        type: 'console',
        level: 'info',
        stderrLevels: ['warn', 'error', 'debug']
      }
    ],
    accessLogFormat: 'combined',
    accessLogIpOffset: 0
  },
  protocolPlugins: {
    'kuzzle-plugin-websocket': {
      version: '1.0.7',
      activated: true,
      config: {
        port: 7513,
        room: 'kuzzle'
      }
    },
    'kuzzle-plugin-socketio': {
      version: '2.1.0',
      activated: true,
      config: {
        port: 7512,
        room: 'kuzzle'
      }
    }
  },
  backend: {
    port: 7331,
    mode: 'standard',
    timeout: 10000
  },<commit_msg>hotfix - use proper protocol plugins versions<commit_after>let
  config,
  rc = require('rc');

function unstringify (cfg) {
  Object.keys(cfg).forEach(k => {
    // exception - *version entries need to be kept as string
    if (/version$/i.test(k)) {
      return;
    }

    if (typeof cfg[k] === 'string') {
      if (cfg[k] === 'true') {
        cfg[k] = true;
      }
      else if (cfg[k] === 'false') {
        cfg[k] = false;
      }
      else if (/^[0-9]+$/.test(cfg[k])) {
        cfg[k] = parseInt(cfg[k]);
      }
      else if (/^[0-9]+\.[0-9]+$/.test(cfg[k])) {
        cfg[k] = parseFloat(cfg[k]);
      }
    }
    else if (cfg[k] instanceof Object) {
      cfg[k] = unstringify(cfg[k]);
    }
  });

  return cfg;
}

config = rc('proxy', {
  logs: {
    access: [
      {
        type: 'console',
        level: 'info',
        stderrLevels: []
      }
    ],
    errors: [
      {
        type: 'console',
        level: 'info',
        stderrLevels: ['warn', 'error', 'debug']
      }
    ],
    accessLogFormat: 'combined',
    accessLogIpOffset: 0
  },
  protocolPlugins: {
    'kuzzle-plugin-websocket': {
      version: '1.0.8',
      activated: true,
      config: {
        port: 7513,
        room: 'kuzzle'
      }
    },
    'kuzzle-plugin-socketio': {
      version: '2.1.1',
      activated: true,
      config: {
        port: 7512,
        room: 'kuzzle'
      }
    }
  },
  backend: {
    port: 7331,
    mode: 'standard',
    timeout: 10000
  },
{'fraction_non_alphanumeric': 0.18532423208191126, 'fraction_numerical': 0.020477815699658702, 'mean_word_length': 1.7189239332096475, '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': '7417008', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1053, 'n_words': 213}