<commit_before>'use strict';

/**
 * This contains all the core commands that kalabox can run on every machine
 */

var _ = require('lodash');
var chalk = require('chalk');
var async = require('async');

var B2D_UP_ATTEMPTS = 3;
var B2D_DOWN_ATTEMPTS = 3;
var B2D_STATUS_ATTEMPTS = 3;
var B2D_IP_ATTEMPTS = 3;

module.exports = function(argv, plugin, kbox) {

  var tasks = kbox.core.tasks;

  // Display list of dependencies.
  tasks.registerTask('deps', function(done) {
    var keys = kbox.core.deps.keys().sort();
    _.each(keys, function(key) {
      console.log(key);
    });
    done();
  });

  // Display list of apps.
  tasks.registerTask('apps', function(done) {
    kbox.app.list(function(err, apps) {
      if (err) {
        done(err);
      } else {
        _.forEach(apps, function(app) {
          console.log(app.name);
        });
        done();
      }

    });
  });

  // Display list of containers.
  tasks.registerTask('containers', function(done) {
    kbox.engine.list(function(err, containers) {
      if (err) {<commit_msg>Sorted the output of kbox apps command<commit_after>'use strict';

/**
 * This contains all the core commands that kalabox can run on every machine
 */

var _ = require('lodash');
var chalk = require('chalk');
var async = require('async');

var B2D_UP_ATTEMPTS = 3;
var B2D_DOWN_ATTEMPTS = 3;
var B2D_STATUS_ATTEMPTS = 3;
var B2D_IP_ATTEMPTS = 3;

module.exports = function(argv, plugin, kbox) {

  var tasks = kbox.core.tasks;

  // Display list of dependencies.
  tasks.registerTask('deps', function(done) {
    var keys = kbox.core.deps.keys().sort();
    _.each(keys, function(key) {
      console.log(key);
    });
    done();
  });

  // Display list of apps.
  tasks.registerTask('apps', function(done) {
    kbox.app.list(function(err, apps) {
      if (err) {
        done(err);
      } else {
        var appNames = [];
        _.forEach(apps, function(app) {
          appNames.push(app.name);
        });
        appNames.sort();
        _.forEach(appNames, function(appName) {
          console.log(appName);
        });
        done();
      }

    });
  });

  // Display list of containers.
  tasks.registerTask('containers', function(done) {
    kbox.engine.list(function(err, containers) {
      if (err) {
{'fraction_non_alphanumeric': 0.1497584541062802, 'fraction_numerical': 0.007026789635485288, 'mean_word_length': 2.734426229508197, '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': '7531671', 'n_tokens_mistral': 784, 'n_tokens_neox': 761, 'n_words': 174}