<commit_before>var db = require('./mongodb.js');
var memoryFs = require('./memoryFs.js');
var utils = require('./utils');
var path = require('path');

module.exports = {
  connect: db.connect,
  getVendorsBundle: function (packages) {
    var bundleName = utils.getVendorsBundleName(packages);
    return db.findOne('bundles', {name: bundleName})
      .then(function (bundle) {
        return bundle;
      });
  },
  getVendorsBundleEntries: function (packages) {
    var bundleName = utils.getVendorsBundleName(packages);
    return db.findOne('bundles', {name: bundleName}, {entries: 1, name: 1})
      .then(function (bundle) {
        return {
          vendorsBundle: bundle.name,
          entries: bundle.entries
        };<commit_msg>fixed bug with reset of db<commit_after>var db = require('./mongodb.js');
var memoryFs = require('./memoryFs.js');
var utils = require('./utils');
var path = require('path');

module.exports = {
  connect: db.connect,
  getVendorsBundle: function (packages) {
    var bundleName = utils.getVendorsBundleName(packages);
    return db.findOne('bundles', {name: bundleName})
      .then(function (bundle) {
        return bundle;
      });
  },
  getVendorsBundleEntries: function (packages) {
    var bundleName = utils.getVendorsBundleName(packages);
    return db.findOne('bundles', {name: bundleName}, {entries: 1, name: 1})
      .then(function (bundle) {
        if (!bundle) {
          return null;
        }
        return {
          vendorsBundle: bundle.name,
          entries: bundle.entries
        };
{'fraction_non_alphanumeric': 0.14129736673089274, 'fraction_numerical': 0.002569043031470777, 'mean_word_length': 3.121693121693122, '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': '6393430', 'n_tokens_mistral': 469, 'n_tokens_neox': 468, 'n_words': 109}