<commit_before>// Generated by CoffeeScript 1.9.0
var AdapterManager, ClientLoader, CollectionManager, CollectionMonitor, EventEmitter, Model, RikkiTikkiAPI, SchemaManager, SchemaMonitor, SchemaTree, SchemaTreeManager, SyncService, cnf, e, fs, path, _, _collections, _connections, _router, _types,
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  __hasProp = {}.hasOwnProperty;

_ = require('underscore')._;

EventEmitter = require('events').EventEmitter;

fs = require('fs');

path = require('path');

RikkiTikkiAPI = (function(_super) {
  __extends(RikkiTikkiAPI, _super);

  RikkiTikkiAPI.prototype.__adapter = null;

  RikkiTikkiAPI.prototype.__detected_adapter = null;

  function RikkiTikkiAPI(__options, callback) {
    var adapter;
    if (__options == null) {
      __options = new RikkiTikkiAPI.APIOptions;
    }
    if (!RikkiTikkiAPI.Util.Object.isOfType(__options, RikkiTikkiAPI.APIOptions)) {
      __options = new RikkiTikkiAPI.APIOptions(__options);
    }
    RikkiTikkiAPI.getOptions = (function(_this) {
      return function() {
        return __options;
      };
    })(this);
    RikkiTikkiAPI.getSchemas = (function(_this) {
      return function() {
        return RikkiTikkiAPI.SchemaManager.getInstance();
      };
    })(this);
    RikkiTikkiAPI.useAdapter = (function(_this) {
      return function(adapter, options) {
        var router;
        if (adapter) {
          if (typeof adapter === 'string') {
            if (0 <= RikkiTikkiAPI.Adapters.listAdapters().indexOf(adapter)) {
              _this.__adapter = new (RikkiTikkiAPI.Adapters.getAdapter(adapter))(options);
            } else {
              throw "Routing Adapter '" + adapter + "' was not registered. Use RikkiTikkiAPI.Adapters.registerAdapter(name, class)";
            }
          } else {
            _this.__adapter = adapter;
          }
          if (RikkiTikkiAPI.getConnection() != null) {
            if ((_this.__adapter != null) && ((router = new RikkiTikkiAPI.Router) != null)) {
              router.intializeRoutes();
              return _this.emit('ready');
            }
          } else {
            return _this.once('open', function() {
              if ((_this.__adapter != null) && ((router = new RikkiTikkiAPI.Router) != null)) {
                router.intializeRoutes();
                return _this.emit('ready');
              }
            });
          }
        } else {
          throw 'param \'adapter\' is required';
          return process.exit(1);
        }
      };
    })(this);
    RikkiTikkiAPI.getAdapter = (function(_this) {
      return function() {
        return _this.__adapter;
      };
    })(this);
    if ((adapter = __options.get('adapter')) != null) {
      RikkiTikkiAPI.useAdapter(adapter);
    }
    (this.__config = new RikkiTikkiAPI.ConfigLoader(__options)).load((function(_this) {
      return function(e, data) {
        return _this.connect((e == null ? _this.__config.getEnvironment(RikkiTikkiAPI.Util.Env.getEnvironment()) : {
          port: 27017
        }), {
          open: function() {
            if ((adapter = __options.get('adapter')) != null) {
              RikkiTikkiAPI.useAdapter(adapter);<commit_msg>added built sources<commit_after>// Generated by CoffeeScript 1.9.0
var AdapterManager, ClientLoader, CollectionManager, CollectionMonitor, EventEmitter, Model, RikkiTikkiAPI, SchemaManager, SchemaMonitor, SchemaTree, SchemaTreeManager, SyncService, cnf, e, fs, path, _, _collections, _connections, _router, _types,
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  __hasProp = {}.hasOwnProperty;

_ = require('underscore')._;

EventEmitter = require('events').EventEmitter;

fs = require('fs');

path = require('path');

RikkiTikkiAPI = (function(_super) {
  __extends(RikkiTikkiAPI, _super);

  RikkiTikkiAPI.prototype.__adapter = null;

  RikkiTikkiAPI.prototype.__detected_adapter = null;

  function RikkiTikkiAPI(__options, callback) {
    var adapter;
    if (__options == null) {
      __options = new RikkiTikkiAPI.APIOptions;
    }
    if (!RikkiTikkiAPI.Util.Object.isOfType(__options, RikkiTikkiAPI.APIOptions)) {
      __options = new RikkiTikkiAPI.APIOptions(__options);
    }
    RikkiTikkiAPI.getOptions = (function(_this) {
      return function() {
        return __options;
      };
    })(this);
    RikkiTikkiAPI.getSchemas = (function(_this) {
      return function() {
        return RikkiTikkiAPI.SchemaManager.getInstance();
      };
    })(this);
    RikkiTikkiAPI.useAdapter = (function(_this) {
      return function(adapter, options) {
        var router;
        if (adapter) {
          if (typeof adapter === 'string') {
            if (0 <= RikkiTikkiAPI.Adapters.listAdapters().indexOf(adapter)) {
              _this.__adapter = new (RikkiTikkiAPI.Adapters.getAdapter(adapter))(options);
            } else {
              throw "Routing Adapter '" + adapter + "' was not registered. Use RikkiTikkiAPI.Adapters.registerAdapter(name, class)";
            }
          } else {
            _this.__adapter = adapter;
          }
          if (RikkiTikkiAPI.getConnection() != null) {
            if ((_this.__adapter != null) && ((router = new RikkiTikkiAPI.Router) != null)) {
              router.intializeRoutes();
              return _this.emit('ready');
            }
          } else {
            return _this.once('open', function() {
              if ((_this.__adapter != null) && ((router = new RikkiTikkiAPI.Router) != null)) {
                router.intializeRoutes();
                return _this.emit('ready');
              }
            });
          }
        } else {
          throw 'param \'adapter\' is required';
          return process.exit(1);
        }
      };
    })(this);
    RikkiTikkiAPI.getAdapter = (function(_this) {
      return function() {
        return _this.__adapter;
      };
    })(this);
    if ((adapter = __options.get('adapter')) != null) {
      RikkiTikkiAPI.useAdapter(adapter);
    }
    (this.__config = new RikkiTikkiAPI.ConfigLoader(__options)).load((function(_this) {
      return function(e, data) {
        return _this.connect((e == null ? _this.__config.getEnvironment(RikkiTikkiAPI.Util.Env.getEnvironment()) : {
          host: 'localhost'
        }), {
          open: function() {
            if ((adapter = __options.get('adapter')) != null) {
              RikkiTikkiAPI.useAdapter(adapter);
{'fraction_non_alphanumeric': 0.1330609862853808, 'fraction_numerical': 0.0021885030639042895, 'mean_word_length': 2.659903897490657, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7076144', 'n_tokens_mistral': 2108, 'n_tokens_neox': 2083, 'n_words': 401}