<commit_before>/**
 * Module dependencies.
 */
var async   = require('async');
var _       = require('lodash');
var figures = require('figures');


/**
 * Sails.prototype.lift()
 *
 * Loads the app, then starts all attached servers.
 *
 * @api public
 */
module.exports = function lift(configOverride, cb) {
  var sails = this;

  // try {console.timeEnd('require_core');}catch(e){}

  // try {console.time('core_lift');}catch(e){}

  // Callback is optional
  cb = cb || function(err) {
    if (err) return sails.log.error(err);
  };

  async.series([

    function(cb) {
      sails.load(configOverride, cb);
    },

    sails.initialize

  ], function sailsReady(err, async_data) {
    if (err) {
      return sails.lower(function (errorLoweringSails){

        cb(err);

        if (errorLoweringSails) {
          sails.log.error('When trying to lower the app as a result of a failed lift, encountered an error:',errorLoweringSails);
        }
      });
    }

    _printSuccessMsg(sails);

    // try {console.timeEnd('core_lift');}catch(e){}

    sails.emit('lifted');
    sails.isLifted = true;
    return cb(null, sails);
  });
};

var _printPluginList = function(sails){
  sails.log.blank();
  sails.log('Plugins loaded :');
  _.forEach(sails.config.plugins, function(plugin){
    sails.log("\t " + plugin + " " + figures.tick);
  });
};

// Gather app meta-info and log startup message (the boat).
function _printSuccessMsg(sails) {

  // If `config.noShip` is set, skip the startup message.
  if (!(sails.config.log && sails.config.log.noShip)) {

    sails.log.ship && sails.log.ship();
    sails.log.info(('Server lifted in `' + sails.config.appPath + '`'));
    sails.log.info(('To see your app, visit ' + (sails.getBaseurl() || '').underline));
    sails.log.info(('To shut down Sails, press <CTRL> + C at any time.'));
    sails.log.blank();
    sails.log('--------------------------------------------------------'.grey);
    sails.log((':: ' + new Date()).grey);
    sails.log.blank();
    sails.log('Environment    : ' + sails.config.environment);

    // Only log the host if an explicit host is set
    if (sails.getHost()) {
      sails.log('Host          : ' + sails.getHost()); // 12 - 4 = 8 spaces
    }
    sails.log('Port           : ' + sails.config.port); // 12 - 4 = 8 spaces
    if (sails.config.plugins && sails.config.plugins.length > 0) _printPluginList(sails);
    sails.log('--------------------------------------------------------'.grey);

  }
}
<commit_msg>updated and ensure that the plugins are loaded<commit_after>/**
 * Module dependencies.
 */
var async   = require('async');
var _       = require('lodash');
var figures = require('figures');


/**
 * Sails.prototype.lift()
 *
 * Loads the app, then starts all attached servers.
 *
 * @api public
 */
module.exports = function lift(configOverride, cb) {
  var sails = this;

  // try {console.timeEnd('require_core');}catch(e){}

  // try {console.time('core_lift');}catch(e){}

  // Callback is optional
  cb = cb || function(err) {
    if (err) return sails.log.error(err);
  };

  async.series([

    function(cb) {
      sails.load(configOverride, cb);
    },

    sails.initialize

  ], function sailsReady(err, async_data) {
    if (err) {
      return sails.lower(function (errorLoweringSails){

        cb(err);

        if (errorLoweringSails) {
          sails.log.error('When trying to lower the app as a result of a failed lift, encountered an error:',errorLoweringSails);
        }
      });
    }

    _printSuccessMsg(sails);

    // try {console.timeEnd('core_lift');}catch(e){}

    sails.emit('lifted');
    sails.isLifted = true;
    return cb(null, sails);
  });
};

var _printPluginList = function(sails){
  sails.log.blank();
  sails.log('Plugins loaded :');
  _.forEach(sails.plugins.list(), function(plugin){
    sails.log("\t " + plugin + " " + figures.tick);
  });
};

var _pringExtensionList = function(sails){
  sails.log.blank();
  sails.log('Extensions loaded :');
  _.forEach(sails.config.extensions, function(plugin){
    sails.log("\t " + plugin + " " + figures.tick);
  });
};

// Gather app meta-info and log startup message (the boat).
function _printSuccessMsg(sails) {

  // If `config.noShip` is set, skip the startup message.
  if (!(sails.config.log && sails.config.log.noShip)) {

    sails.log.ship && sails.log.ship();
    sails.log.info(('Server lifted in `' + sails.config.appPath + '`'));
    sails.log.info(('To see your app, visit ' + (sails.getBaseurl() || '').underline));
    sails.log.info(('To shut down Sails, press <CTRL> + C at any time.'));
    sails.log.blank();
    sails.log('--------------------------------------------------------'.grey);
    sails.log((':: ' + new Date()).grey);
    sails.log.blank();
    sails.log('Environment    : ' + sails.config.environment);

    // Only log the host if an explicit host is set
    if (sails.getHost()) {
      sails.log('Host          : ' + sails.getHost()); // 12 - 4 = 8 spaces
    }
    sails.log('Port           : ' + sails.config.port); // 12 - 4 = 8 spaces
    if (sails.plugins.list().length > 0) _printPluginList(sails);
    sails.log('--------------------------------------------------------'.grey);

  }
}

{'fraction_non_alphanumeric': 0.21012269938650308, 'fraction_numerical': 0.003450920245398773, 'mean_word_length': 2.4664451827242524, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2433261', 'n_tokens_mistral': 1761, 'n_tokens_neox': 1671, 'n_words': 373}