<commit_before>/*
 * cushion-cli
 * https://github.com/stefanjudis/cushion-cli
 *
 * Copyright (c) 2012 <NAME>
 * Licensed under the MIT license.
 */

var userCallbacks = module.exports = {},
    generalCallbacks = require('./generalCallbacks'),
    cli = require('../cliRunner'),
    clc = require('cli-color'),
    extend = require('node.extend');


// extend level commands with general commands
extend(userCallbacks, generalCallbacks);

userCallbacks.addRole = function(error, added) {
  if (added) {
    console.log(clc.yellow('\nRole(s) were successfully added.\n'));
  } else {
    userCallbacks.showError(error);
  }

  cli.prompt();
};


userCallbacks.deleteRole = function(error, deleted) {
  if (deleted) {
    console.log(deleted);
    console.log(clc.yellow('\nRole(s) were successfully deleted.\n'));
  } else {
    userCallbacks.showError(error);
  }

  cli.prompt();
};


userCallbacks.getRoles = function(error, roles) {
  if (roles) {
    console.log(clc.yellow('\nUser has the following roles:'));
    console.pretty(roles);
  } else {
    userCallbacks.showErrow(error);
  }

  cli.prompt();
};


userCallbacks.create = userCallbacks.simpleCallback;<commit_msg>added propet user create callback<commit_after>/*
 * cushion-cli
 * https://github.com/stefanjudis/cushion-cli
 *
 * Copyright (c) 2012 <NAME>
 * Licensed under the MIT license.
 */

var userCallbacks = module.exports = {},
    generalCallbacks = require('./generalCallbacks'),
    cli = require('../cliRunner'),
    clc = require('cli-color'),
    extend = require('node.extend');


// extend level commands with general commands
extend(userCallbacks, generalCallbacks);

userCallbacks.addRole = function(error, added) {
  if (added) {
    console.log(clc.yellow('\nRole(s) were successfully added.\n'));
  } else {
    userCallbacks.showError(error);
  }

  cli.prompt();
};


userCallbacks.deleteRole = function(error, deleted) {
  if (deleted) {
    console.log(clc.yellow('\nRole(s) were successfully deleted.\n'));
  } else {
    userCallbacks.showError(error);
  }

  cli.prompt();
};


userCallbacks.getRoles = function(error, roles) {
  if (roles) {
    console.log(clc.yellow('\nUser has the following roles:'));
    console.pretty(roles);
  } else {
    userCallbacks.showErrow(error);
  }

  cli.prompt();
};


userCallbacks.create = function(error, created) {
  if (created) {
    console.log(clc.yellow('\nRole(s) were successfully deleted.\n'));
  } else {
    userCallbacks.showError(error);
  }

  cli.prompt();
};
{'fraction_non_alphanumeric': 0.15843949044585987, 'fraction_numerical': 0.0031847133757961785, 'mean_word_length': 3.777566539923954, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '2737616', 'n_tokens_mistral': 860, 'n_tokens_neox': 818, 'n_words': 156}