diff --git a/.babelrc b/.babelrc deleted file mode 100755 index af0f0c3d..00000000 --- a/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015"] -} \ No newline at end of file diff --git a/.flowconfig b/.flowconfig new file mode 100644 index 00000000..8dc2e468 --- /dev/null +++ b/.flowconfig @@ -0,0 +1,17 @@ +[include] +./lib + +[ignore] +.*/node_modules/.* +.*/tests/.* +.*\.test\.js + +[libs] + +[options] +emoji=true +esproposal.class_instance_fields=enable +esproposal.class_static_fields=enable +esproposal.export_star_as=enable +module.ignore_non_literal_requires=true +suppress_comment=\\(.\\|\n\\)*\\$FlowIgnore diff --git a/.gitignore b/.gitignore index 6e40ca75..a62923fd 100755 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ pids lib-cov coverage .grunt -dist/.local_storage* +dist/ build/Release node_modules test/util/playground.js diff --git a/.npmignore b/.npmignore index e69de29b..b64d6345 100755 --- a/.npmignore +++ b/.npmignore @@ -0,0 +1,4 @@ +examples/ +test/ +.gitignore +.travis.yml diff --git a/.travis.yml b/.travis.yml index d21428df..3de9398f 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,8 @@ -language: node_js -node_js: - - "0.12" - - "0.11" - - "0.10" - - "4.2.0" - - "iojs-v2" -sudo: false -branches: - only: - - master \ No newline at end of file +language: node_js +node_js: + - "6.10" + - "7" + - "node" +sudo: false +notifications: + email: false diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..f4ef1d71 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,26 @@ +# 2.0.0 [IN PROGRESS] +#### 💥 Breaking +* Updated minimum Node.js requirement to v6.10 (oldest LTS). +* Updated Inquirer.js to v3.1 from v0.11. +* Removed `Command#autocompletion` method. + +#### 🚀 New +* Added `Vorpal#title`, `Vorpal#version`, `Vorpal#description`, and `Vorpal#banner` descriptor methods. + * Renders in the header of help and menu screens. +* Added a new options object as the 3rd argument to `Vorpal#command`. + * Supports a new `default` option. + * Supports the old autocomplete functionality as a fallback. +* Added a new `vorpal_exit` event. + +#### 🐞 Fixed +* Will now properly exit all scenarios if Ctrl + C is pressed. +* Now supports slashes in autocomplete list values. +* Improvements to variadic argument parsing. + +#### 🛠 Internal +* Migrated to 100% ES2015 syntax. +* Migrated to Yarn from NPM. +* Migrated to Yarn scripts from Gulp. +* Updated to no longer require or build with Babel. +* Updated to the latest ESLint (based off Airbnb config). +* Removed the `dist` folder from the repository. diff --git a/dist/autocomplete.js b/dist/autocomplete.js deleted file mode 100755 index c08fbad9..00000000 --- a/dist/autocomplete.js +++ /dev/null @@ -1,445 +0,0 @@ -'use strict'; - -var _ = require('lodash'); -var strip = require('strip-ansi'); - -var autocomplete = { - - /** - * Handles tabbed autocompletion. - * - * - Initial tabbing lists all registered commands. - * - Completes a command halfway typed. - * - Recognizes options and lists all possible options. - * - Recognizes option arguments and lists them. - * - Supports cursor positions anywhere in the string. - * - Supports piping. - * - * @param {String} str - * @return {String} cb - * @api public - */ - - exec: function exec(str, cb) { - var self = this; - var input = parseInput(str, this.parent.ui._activePrompt.screen.rl.cursor); - var commands = getCommandNames(this.parent.commands); - var vorpalMatch = getMatch(input.context, commands, { ignoreSlashes: true }); - var freezeTabs = false; - - function end(str) { - var res = handleTabCounts.call(self, str, freezeTabs); - cb(undefined, res); - } - - function evaluateTabs(input) { - if (input.context && input.context[input.context.length - 1] === '/') { - freezeTabs = true; - } - } - - if (vorpalMatch) { - input.context = vorpalMatch; - evaluateTabs(input); - end(assembleInput(input)); - return; - } - - input = getMatchObject.call(this, input, commands); - if (input.match) { - input = parseMatchSection.call(this, input); - getMatchData.call(self, input, function (data) { - var dataMatch = getMatch(input.context, data); - if (dataMatch) { - input.context = dataMatch; - evaluateTabs(input); - end(assembleInput(input)); - return; - } - end(filterData(input.context, data)); - }); - return; - } - end(filterData(input.context, commands)); - }, - - /** - * Independent / stateless auto-complete function. - * Parses an array of strings for the best match. - * - * @param {String} str - * @param {Array} arr - * @return {String} - * @api private - */ - - match: function match(str, arr, options) { - arr = arr || []; - options = options || {}; - arr.sort(); - var arrX = _.clone(arr); - var strX = String(str); - - var prefix = ''; - - if (options.ignoreSlashes !== true) { - var parts = strX.split('/'); - strX = parts.pop(); - prefix = parts.join('/'); - prefix = parts.length > 0 ? prefix + '/' : prefix; - } - - var matches = []; - for (var i = 0; i < arrX.length; i++) { - if (strip(arrX[i]).slice(0, strX.length) === strX) { - matches.push(arrX[i]); - } - } - if (matches.length === 1) { - // If we have a slash, don't add a space after match. - var space = String(strip(matches[0])).slice(strip(matches[0]).length - 1) === '/' ? '' : ' '; - return prefix + matches[0] + space; - } else if (matches.length === 0) { - return undefined; - } else if (strX.length === 0) { - return matches; - } - - var longestMatchLength = matches.reduce(function (previous, current) { - for (var i = 0; i < current.length; i++) { - if (previous[i] && current[i] !== previous[i]) { - return current.substr(0, i); - } - } - return previous; - }).length; - - // couldn't resolve any further, return all matches - if (longestMatchLength === strX.length) { - return matches; - } - - // return the longest matching portion along with the prefix - return prefix + matches[0].substr(0, longestMatchLength); - } -}; - -/** - * Tracks how many times tab was pressed - * based on whether the UI changed. - * - * @param {String} str - * @return {String} result - * @api private - */ - -function handleTabCounts(str, freezeTabs) { - var result; - if (_.isArray(str)) { - this._tabCtr += 1; - if (this._tabCtr > 1) { - result = str.length === 0 ? undefined : str; - } - } else { - this._tabCtr = freezeTabs === true ? this._tabCtr + 1 : 0; - result = str; - } - return result; -} - -/** - * Looks for a potential exact match - * based on given data. - * - * @param {String} ctx - * @param {Array} data - * @return {String} - * @api private - */ - -function getMatch(ctx, data, options) { - // Look for a command match, eliminating and then - // re-introducing leading spaces. - var len = ctx.length; - var trimmed = ctx.replace(/^\s+/g, ''); - var match = autocomplete.match(trimmed, data.slice(), options); - if (_.isArray(match)) { - return match; - } - var prefix = new Array(len - trimmed.length + 1).join(' '); - // If we get an autocomplete match on a command, finish it. - if (match) { - // Put the leading spaces back in. - match = prefix + match; - return match; - } - return undefined; -} - -/** - * Takes the input object and assembles - * the final result to display on the screen. - * - * @param {Object} input - * @return {String} - * @api private - */ - -function assembleInput(input) { - if (_.isArray(input.context)) { - return input.context; - } - var result = (input.prefix || '') + (input.context || '') + (input.suffix || ''); - return strip(result); -} - -/** - * Reduces an array of possible - * matches to list based on a given - * string. - * - * @param {String} str - * @param {Array} data - * @return {Array} - * @api private - */ - -function filterData(str, data) { - data = data || []; - var ctx = String(str || '').trim(); - var slashParts = ctx.split('/'); - ctx = slashParts.pop(); - var wordParts = String(ctx).trim().split(' '); - var res = data.filter(function (item) { - return strip(item).slice(0, ctx.length) === ctx; - }); - res = res.map(function (item) { - var parts = String(item).trim().split(' '); - if (parts.length > 1) { - parts = parts.slice(wordParts.length); - return parts.join(' '); - } - return item; - }); - return res; -} - -/** - * Takes the user's current prompt - * string and breaks it into its - * integral parts for analysis and - * modification. - * - * @param {String} str - * @param {Integer} idx - * @return {Object} - * @api private - */ - -function parseInput(str, idx) { - var raw = String(str || ''); - var sliced = raw.slice(0, idx); - var sections = sliced.split('|'); - var prefix = sections.slice(0, sections.length - 1) || []; - prefix.push(''); - prefix = prefix.join('|'); - var suffix = getSuffix(raw.slice(idx)); - var context = sections[sections.length - 1]; - return { - raw: raw, - prefix: prefix, - suffix: suffix, - context: context - }; -} - -/** - * Takes the context after a - * matched command and figures - * out the applicable context, - * including assigning its role - * such as being an option - * parameter, etc. - * - * @param {Object} input - * @return {Object} - * @api private - */ - -function parseMatchSection(input) { - var parts = (input.context || '').split(' '); - var last = parts.pop(); - var beforeLast = strip(parts[parts.length - 1] || '').trim(); - if (beforeLast.slice(0, 1) === '-') { - input.option = beforeLast; - } - input.context = last; - input.prefix = (input.prefix || '') + parts.join(' ') + ' '; - return input; -} - -/** - * Returns a cleaned up version of the - * remaining text to the right of the cursor. - * - * @param {String} suffix - * @return {String} - * @api private - */ - -function getSuffix(suffix) { - suffix = suffix.slice(0, 1) === ' ' ? suffix : suffix.replace(/.+?(?=\s)/, ''); - suffix = suffix.slice(1, suffix.length); - return suffix; -} - -/** - * Compile all available commands and aliases - * in alphabetical order. - * - * @param {Array} cmds - * @return {Array} - * @api private - */ - -function getCommandNames(cmds) { - var commands = _.map(cmds, '_name'); - commands = commands.concat.apply(commands, _.map(cmds, '_aliases')); - commands.sort(); - return commands; -} - -/** - * When we know that we've - * exceeded a known command, grab - * on to that command and return it, - * fixing the overall input context - * at the same time. - * - * @param {Object} input - * @param {Array} commands - * @return {Object} - * @api private - */ - -function getMatchObject(input, commands) { - var len = input.context.length; - var trimmed = String(input.context).replace(/^\s+/g, ''); - var prefix = new Array(len - trimmed.length + 1).join(' '); - var match; - var suffix; - commands.forEach(function (cmd) { - var nextChar = trimmed.substr(cmd.length, 1); - if (trimmed.substr(0, cmd.length) === cmd && String(cmd).trim() !== '' && nextChar === ' ') { - match = cmd; - suffix = trimmed.substr(cmd.length); - prefix += trimmed.substr(0, cmd.length); - } - }); - - var matchObject = match ? _.find(this.parent.commands, { _name: String(match).trim() }) : undefined; - - if (!matchObject) { - this.parent.commands.forEach(function (cmd) { - if ((cmd._aliases || []).indexOf(String(match).trim()) > -1) { - matchObject = cmd; - } - return; - }); - } - - if (!matchObject) { - matchObject = _.find(this.parent.commands, { _catch: true }); - if (matchObject) { - suffix = input.context; - } - } - - if (!matchObject) { - prefix = input.context; - suffix = ''; - } - - if (matchObject) { - input.match = matchObject; - input.prefix += prefix; - input.context = suffix; - } - return input; -} - -/** - * Takes a known matched command, and reads - * the applicable data by calling its autocompletion - * instructions, whether it is the command's - * autocompletion or one of its options. - * - * @param {Object} input - * @param {Function} cb - * @return {Array} - * @api private - */ - -function getMatchData(input, cb) { - var string = input.context; - var cmd = input.match; - var midOption = String(string).trim().slice(0, 1) === '-'; - var afterOption = input.option !== undefined; - if (midOption === true) { - var results = []; - for (var i = 0; i < cmd.options.length; ++i) { - var long = cmd.options[i].long; - var short = cmd.options[i].short; - if (!long && short) { - results.push(short); - } else if (long) { - results.push(long); - } - } - cb(results); - return; - } - - function handleDataFormat(str, config, callback) { - var data = []; - if (_.isArray(config)) { - data = config; - } else if (_.isFunction(config)) { - var cbk = config.length < 2 ? function () {} : function (res) { - callback(res || []); - }; - var res = config(str, cbk); - if (res && _.isFunction(res.then)) { - res.then(function (resp) { - callback(resp); - }).catch(function (err) { - callback(err); - }); - } else if (config.length < 2) { - callback(res); - } - return; - } - callback(data); - return; - } - - if (afterOption === true) { - var opt = strip(input.option).trim(); - var shortMatch = _.find(cmd.options, { short: opt }); - var longMatch = _.find(cmd.options, { long: opt }); - var match = longMatch || shortMatch; - if (match) { - var config = match.autocomplete; - handleDataFormat(string, config, cb); - return; - } - } - - var conf = cmd._autocomplete; - conf = conf && conf.data ? conf.data : conf; - handleDataFormat(string, conf, cb); - return; -} - -module.exports = autocomplete; \ No newline at end of file diff --git a/dist/command-instance.js b/dist/command-instance.js deleted file mode 100755 index 863ab53a..00000000 --- a/dist/command-instance.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict'; - -/** - * Module dependencies. - */ - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var util = require('./util'); -var _ = require('lodash'); - -var CommandInstance = function () { - - /** - * Initialize a new `CommandInstance` instance. - * - * @param {Object} params - * @return {CommandInstance} - * @api public - */ - - function CommandInstance() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - command = _ref.command, - commandObject = _ref.commandObject, - args = _ref.args, - commandWrapper = _ref.commandWrapper, - callback = _ref.callback, - downstream = _ref.downstream; - - _classCallCheck(this, CommandInstance); - - this.command = command; - this.commandObject = commandObject; - this.args = args; - this.commandWrapper = commandWrapper; - this.session = commandWrapper.session; - this.parent = this.session.parent; - this.callback = callback; - this.downstream = downstream; - } - - /** - * Cancel running command. - */ - - _createClass(CommandInstance, [{ - key: 'cancel', - value: function cancel() { - this.session.emit('vorpal_command_cancel'); - } - - /** - * Route stdout either through a piped command, or the session's stdout. - */ - - }, { - key: 'log', - value: function log() { - var _this = this; - - var args = util.fixArgsForApply(arguments); - if (this.downstream) { - var fn = this.downstream.commandObject._fn || function () {}; - this.session.registerCommand(); - this.downstream.args.stdin = args; - var onComplete = function onComplete(err) { - if (_this.session.isLocal() && err) { - _this.session.log(err.stack || err); - _this.session.parent.emit('client_command_error', { command: _this.downstream.command, error: err }); - } - _this.session.completeCommand(); - }; - - var validate = this.downstream.commandObject._validate; - if (_.isFunction(validate)) { - try { - validate.call(this.downstream, this.downstream.args); - } catch (e) { - // Log error without piping to downstream on validation error. - this.session.log(e.toString()); - onComplete(); - return; - } - } - - var res = fn.call(this.downstream, this.downstream.args, onComplete); - if (res && _.isFunction(res.then)) { - res.then(onComplete, onComplete); - } - } else { - this.session.log.apply(this.session, args); - } - } - }, { - key: 'prompt', - value: function prompt(a, b, c) { - return this.session.prompt(a, b, c); - } - }, { - key: 'delimiter', - value: function delimiter(a, b, c) { - return this.session.delimiter(a, b, c); - } - }, { - key: 'help', - value: function help(a, b, c) { - return this.session.help(a, b, c); - } - }, { - key: 'match', - value: function match(a, b, c) { - return this.session.match(a, b, c); - } - }]); - - return CommandInstance; -}(); - -module.exports = CommandInstance; \ No newline at end of file diff --git a/dist/command.js b/dist/command.js deleted file mode 100755 index e0ba1392..00000000 --- a/dist/command.js +++ /dev/null @@ -1,577 +0,0 @@ -'use strict'; - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter; -var Option = require('./option'); -var VorpalUtil = require('./util'); -var _ = require('lodash'); - -/** - * Command prototype. - */ - -var command = Command.prototype; - -/** - * Expose `Command`. - */ - -module.exports = exports = Command; - -/** - * Initialize a new `Command` instance. - * - * @param {String} name - * @param {Vorpal} parent - * @return {Command} - * @api public - */ - -function Command(name, parent) { - if (!(this instanceof Command)) { - return new Command(); - } - this.commands = []; - this.options = []; - this._args = []; - this._aliases = []; - this._name = name; - this._relay = false; - this._hidden = false; - this._parent = parent; - this._mode = false; - this._catch = false; - this._help = undefined; - this._init = undefined; - this._after = undefined; - this._allowUnknownOptions = false; -} - -/** - * Registers an option for given command. - * - * @param {String} flags - * @param {String} description - * @param {Function} fn - * @param {String} defaultValue - * @return {Command} - * @api public - */ - -command.option = function (flags, description, autocomplete) { - var self = this; - var option = new Option(flags, description, autocomplete); - var oname = option.name(); - var name = _camelcase(oname); - var defaultValue; - - // preassign default value only for --no-*, [optional], or - if (option.bool === false || option.optional || option.required) { - // when --no-* we make sure default is true - if (option.bool === false) { - defaultValue = true; - } - // preassign only if we have a default - if (defaultValue !== undefined) { - self[name] = defaultValue; - } - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function (val) { - // unassigned or bool - if (typeof self[name] === 'boolean' || typeof self[name] === 'undefined') { - // if no value, bool true, and we have a default, then use it! - if (val === null) { - self[name] = option.bool ? defaultValue || true : false; - } else { - self[name] = val; - } - } else if (val !== null) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Defines an action for a given command. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.action = function (fn) { - var self = this; - self._fn = fn; - return this; -}; - -/** - * Let's you compose other funtions to extend the command. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.use = function (fn) { - return fn(this); -}; - -/** - * Defines a function to validate arguments - * before action is performed. Arguments - * are valid if no errors are thrown from - * the function. - * - * @param fn - * @returns {Command} - * @api public - */ -command.validate = function (fn) { - var self = this; - self._validate = fn; - return this; -}; - -/** - * Defines a function to be called when the - * command is canceled. - * - * @param fn - * @returns {Command} - * @api public - */ -command.cancel = function (fn) { - this._cancel = fn; - return this; -}; - -/** - * Defines a method to be called when - * the command set has completed. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.done = function (fn) { - this._done = fn; - return this; -}; - -/** - * Defines tabbed auto-completion - * for the given command. Favored over - * deprecated command.autocompletion. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.autocomplete = function (obj) { - this._autocomplete = obj; - return this; -}; - -/** - * Defines tabbed auto-completion rules - * for the given command. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.autocompletion = function (param) { - this._parent._useDeprecatedAutocompletion = true; - if (!_.isFunction(param) && !_.isObject(param)) { - throw new Error('An invalid object type was passed into the first parameter of command.autocompletion: function expected.'); - } - - this._autocompletion = param; - return this; -}; - -/** - * Defines an init action for a mode command. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.init = function (fn) { - var self = this; - if (self._mode !== true) { - throw Error('Cannot call init from a non-mode action.'); - } - self._init = fn; - return this; -}; - -/** - * Defines a prompt delimiter for a - * mode once entered. - * - * @param {String} delimiter - * @return {Command} - * @api public - */ - -command.delimiter = function (delimiter) { - this._delimiter = delimiter; - return this; -}; - -/** - * Sets args for static typing of options - * using minimist. - * - * @param {Object} types - * @return {Command} - * @api public - */ - -command.types = function (types) { - var supported = ['string', 'boolean']; - for (var item in types) { - if (supported.indexOf(item) === -1) { - throw new Error('An invalid type was passed into command.types(): ' + item); - } - types[item] = !_.isArray(types[item]) ? [types[item]] : types[item]; - } - this._types = types; - return this; -}; - -/** - * Defines an alias for a given command. - * - * @param {String} alias - * @return {Command} - * @api public - */ - -command.alias = function () { - var self = this; - for (var i = 0; i < arguments.length; ++i) { - var alias = arguments[i]; - if (_.isArray(alias)) { - for (var j = 0; j < alias.length; ++j) { - this.alias(alias[j]); - } - return this; - } - this._parent.commands.forEach(function (cmd) { - if (!_.isEmpty(cmd._aliases)) { - if (_.includes(cmd._aliases, alias)) { - var msg = 'Duplicate alias "' + alias + '" for command "' + self._name + '" detected. Was first reserved by command "' + cmd._name + '".'; - throw new Error(msg); - } - } - }); - this._aliases.push(alias); - } - return this; -}; - -/** - * Defines description for given command. - * - * @param {String} str - * @return {Command} - * @api public - */ - -command.description = function (str) { - if (arguments.length === 0) { - return this._description; - } - this._description = str; - return this; -}; - -/** - * Removes self from Vorpal instance. - * - * @return {Command} - * @api public - */ - -command.remove = function () { - var self = this; - this._parent.commands = _.reject(this._parent.commands, function (command) { - if (command._name === self._name) { - return true; - } - }); - return this; -}; - -/** - * Returns the commands arguments as string. - * - * @param {String} desc - * @return {String} - * @api public - */ - -command.arguments = function (desc) { - return this._parseExpectedArgs(desc.split(/ +/)); -}; - -/** - * Returns the help info for given command. - * - * @return {String} - * @api public - */ - -command.helpInformation = function () { - var desc = []; - var cmdName = this._name; - var alias = ''; - - if (this._description) { - desc = [' ' + this._description, '']; - } - - if (this._aliases.length > 0) { - alias = ' Alias: ' + this._aliases.join(' | ') + '\n'; - } - var usage = ['', ' Usage: ' + cmdName + ' ' + this.usage(), '']; - - var cmds = []; - - var help = String(this.optionHelp().replace(/^/gm, ' ')); - var options = [' Options:', '', help, '']; - - var res = usage.concat(cmds).concat(alias).concat(desc).concat(options).join('\n'); - - res = res.replace(/\n\n\n/g, '\n\n'); - - return res; -}; - -/** - * Doesn't show command in the help menu. - * - * @return {Command} - * @api public - */ - -command.hidden = function () { - this._hidden = true; - return this; -}; - -/** - * Allows undeclared options to be passed in with the command. - * - * @param {Boolean} [allowUnknownOptions=true] - * @return {Command} - * @api public - */ - -command.allowUnknownOptions = function () { - var allowUnknownOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - - allowUnknownOptions = allowUnknownOptions === "false" ? false : allowUnknownOptions; - - this._allowUnknownOptions = !!allowUnknownOptions; - return this; -}; - -/** - * Returns the command usage string for help. - * - * @param {String} str - * @return {String} - * @api public - */ - -command.usage = function (str) { - var args = this._args.map(function (arg) { - return VorpalUtil.humanReadableArgName(arg); - }); - - var usage = '[options]' + (this.commands.length ? ' [command]' : '') + (this._args.length ? ' ' + args.join(' ') : ''); - - if (arguments.length === 0) { - return this._usage || usage; - } - - this._usage = str; - - return this; -}; - -/** - * Returns the help string for the command's options. - * - * @return {String} - * @api public - */ - -command.optionHelp = function () { - var width = this._largestOptionLength(); - - // Prepend the help information - return [VorpalUtil.pad('--help', width) + ' output usage information'].concat(this.options.map(function (option) { - return VorpalUtil.pad(option.flags, width) + ' ' + option.description; - })).join('\n'); -}; - -/** - * Returns the length of the longest option. - * - * @return {Integer} - * @api private - */ - -command._largestOptionLength = function () { - return this.options.reduce(function (max, option) { - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Adds a custom handling for the --help flag. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.help = function (fn) { - if (_.isFunction(fn)) { - this._help = fn; - } - return this; -}; - -/** - * Edits the raw command string before it - * is executed. - * - * @param {String} str - * @return {String} str - * @api public - */ - -command.parse = function (fn) { - if (_.isFunction(fn)) { - this._parse = fn; - } - return this; -}; - -/** - * Adds a command to be executed after command completion. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.after = function (fn) { - if (_.isFunction(fn)) { - this._after = fn; - } - return this; -}; - -/** - * Parses and returns expected command arguments. - * - * @param {String} args - * @return {Array} - * @api private - */ - -command._parseExpectedArgs = function (args) { - if (!args.length) { - return; - } - var self = this; - args.forEach(function (arg) { - var argDetails = { - required: false, - name: '', - variadic: false - }; - - switch (arg[0]) { - case '<': - argDetails.required = true; - argDetails.name = arg.slice(1, -1); - break; - case '[': - argDetails.name = arg.slice(1, -1); - break; - default: - break; - } - - if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') { - argDetails.variadic = true; - argDetails.name = argDetails.name.slice(0, -3); - } - if (argDetails.name) { - self._args.push(argDetails); - } - }); - - // If the user entered args in a weird order, - // properly sequence them. - if (self._args.length > 1) { - self._args = self._args.sort(function (argu1, argu2) { - if (argu1.required && !argu2.required) { - return -1; - } else if (argu2.required && !argu1.required) { - return 1; - } else if (argu1.variadic && !argu2.variadic) { - return 1; - } else if (argu2.variadic && !argu1.variadic) { - return -1; - } - return 0; - }); - } - - return; -}; - -/** - * Converts string to camel case. - * - * @param {String} flag - * @return {String} - * @api private - */ - -function _camelcase(flag) { - return flag.split('-').reduce(function (str, word) { - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Make command an EventEmitter. - */ - -command.__proto__ = EventEmitter.prototype; \ No newline at end of file diff --git a/dist/history.js b/dist/history.js deleted file mode 100755 index a52d1e18..00000000 --- a/dist/history.js +++ /dev/null @@ -1,188 +0,0 @@ -'use strict'; - -var _ = require('lodash'); -var LocalStorage = require('node-localstorage').LocalStorage; -var path = require('path'); -var os = require('os'); - -// Number of command histories kept in persistent storage -var HISTORY_SIZE = 500; - -var temp = path.normalize(path.join(os.tmpdir(), '/.local_storage')); -var DEFAULT_STORAGE_PATH = temp; - -var History = function History() { - this._storageKey = undefined; - - // Prompt Command History - // Histctr moves based on number of times 'up' (+= ctr) - // or 'down' (-= ctr) was pressed in traversing - // command history. - this._hist = []; - this._histCtr = 0; - - // When in a 'mode', we reset the - // history and store it in a cache until - // exiting the 'mode', at which point we - // resume the original history. - this._histCache = []; - this._histCtrCache = 0; -}; - -/** - * Initialize the history with local storage data - * Called from setId when history id is set - */ - -History.prototype._init = function () { - if (!this._storageKey) { - return; - } - - // Load history from local storage - var persistedHistory = JSON.parse(this._localStorage.getItem(this._storageKey)); - if (_.isArray(persistedHistory)) { - Array.prototype.push.apply(this._hist, persistedHistory); - } -}; - -/** - * Set id for this history instance. - * Calls init internally to initialize - * the history with the id. - */ - -History.prototype.setId = function (id) { - // Initialize a localStorage instance with default - // path if it is not initialized - if (!this._localStorage) { - this._localStorage = new LocalStorage(DEFAULT_STORAGE_PATH); - } - this._storageKey = 'cmd_history_' + id; - this._init(); -}; - -/** - * Initialize a local storage instance with - * the path if not already initialized. - * - * @param path - */ - -History.prototype.setStoragePath = function (path) { - if (!this._localStorage) { - this._localStorage = new LocalStorage(path); - } -}; - -/** - * Get previous history. Called when up is pressed. - * - * @return {String} - */ - -History.prototype.getPreviousHistory = function () { - this._histCtr++; - this._histCtr = this._histCtr > this._hist.length ? this._hist.length : this._histCtr; - return this._hist[this._hist.length - this._histCtr]; -}; - -/** - * Get next history. Called when down is pressed. - * - * @return {String} - */ - -History.prototype.getNextHistory = function () { - this._histCtr--; - - // Return empty prompt if the we dont have any history to show - if (this._histCtr < 1) { - this._histCtr = 0; - return ''; - } - - return this._hist[this._hist.length - this._histCtr]; -}; - -/** - * Peek into history, without changing state - * - * @return {String} - */ - -History.prototype.peek = function (depth) { - depth = depth || 0; - return this._hist[this._hist.length - 1 - depth]; -}; - -/** - * A new command was submitted. Called when enter is pressed and the prompt is not empty. - * - * @param cmd - */ - -History.prototype.newCommand = function (cmd) { - // Always reset history when new command is executed. - this._histCtr = 0; - - // Don't store command in history if it's a duplicate. - if (this._hist[this._hist.length - 1] === cmd) { - return; - } - - // Push into history. - this._hist.push(cmd); - - // Only persist history when not in mode - if (this._storageKey && !this._inMode) { - var persistedHistory = this._hist; - var historyLen = this._hist.length; - if (historyLen > HISTORY_SIZE) { - persistedHistory = this._hist.slice(historyLen - HISTORY_SIZE - 1, historyLen - 1); - } - - // Add to local storage - this._localStorage.setItem(this._storageKey, JSON.stringify(persistedHistory)); - } -}; - -/** - * Called when entering a mode - */ - -History.prototype.enterMode = function () { - // Reassign the command history to a - // cache, replacing it with a blank - // history for the mode. - this._histCache = _.clone(this._hist); - this._histCtrCache = parseFloat(this._histCtr); - this._hist = []; - this._histCtr = 0; - this._inMode = true; -}; - -/** - * Called when exiting a mode - */ - -History.prototype.exitMode = function () { - this._hist = this._histCache; - this._histCtr = this._histCtrCache; - this._histCache = []; - this._histCtrCache = 0; - this._inMode = false; -}; - -/** - * Clears the command history - * (Currently only used in unit test) - */ - -History.prototype.clear = function () { - if (this._storageKey) { - this._localStorage.removeItem(this._storageKey); - } -}; - -module.exports = History; \ No newline at end of file diff --git a/dist/intercept.js b/dist/intercept.js deleted file mode 100755 index 6c153ff3..00000000 --- a/dist/intercept.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -/** - * Module dependencies. - */ - -var _ = require('lodash'); - -/** - * Intercepts stdout, passes thru callback - * also pass console.error thru stdout so it goes to callback too - * (stdout.write and stderr.write are both refs to the same stream.write function) - * returns an unhook() function, call when done intercepting - * - * @param {Function} callback - * @return {Function} - */ - -module.exports = function (callback) { - var oldStdoutWrite = process.stdout.write; - var oldConsoleError = console.error; - process.stdout.write = function (write) { - return function (string) { - var args = _.toArray(arguments); - args[0] = interceptor(string); - write.apply(process.stdout, args); - }; - }(process.stdout.write); - - console.error = function () { - return function () { - var args = _.toArray(arguments); - args.unshift('\x1b[31m[ERROR]\x1b[0m'); - console.log.apply(console.log, args); - }; - }(console.error); - - function interceptor(string) { - // only intercept the string - var result = callback(string); - if (typeof result === 'string') { - string = result.replace(/\n$/, '') + (result && /\n$/.test(string) ? '\n' : ''); - } - return string; - } - // puts back to original - return function unhook() { - process.stdout.write = oldStdoutWrite; - console.error = oldConsoleError; - }; -}; \ No newline at end of file diff --git a/dist/local-storage.js b/dist/local-storage.js deleted file mode 100755 index f5241363..00000000 --- a/dist/local-storage.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -var LocalStorageO = require('node-localstorage').LocalStorage; -var path = require('path'); -var os = require('os'); -var temp = path.normalize(path.join(os.tmpdir(), '/.local_storage_')); -var DEFAULT_STORAGE_PATH = temp; - -var LocalStorage = { - setId: function setId(id) { - if (id === undefined) { - throw new Error('vorpal.localStorage() requires a unique key to be passed in.'); - } - if (!this._localStorage) { - this._localStorage = new LocalStorageO(DEFAULT_STORAGE_PATH + id); - } - }, - validate: function validate() { - if (this._localStorage === undefined) { - throw new Error('Vorpal.localStorage() was not initialized before writing data.'); - } - }, - getItem: function getItem(key, value) { - this.validate(); - return this._localStorage.getItem(key, value); - }, - setItem: function setItem(key, value) { - this.validate(); - return this._localStorage.setItem(key, value); - }, - removeItem: function removeItem(key) { - this.validate(); - return this._localStorage.removeItem(key); - } -}; - -module.exports = LocalStorage; \ No newline at end of file diff --git a/dist/logger.js b/dist/logger.js deleted file mode 100755 index 6c9c83c5..00000000 --- a/dist/logger.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict'; - -/** - * Module dependencies. - */ - -var _ = require('lodash'); -var util = require('./util'); -var ut = require('util'); - -/** - * Initialize a new `Logger` instance. - * - * @return {Logger} - * @api public - */ - -function viewed(str) { - var re = /\u001b\[\d+m/gm; - return String(str).replace(re, ''); -} - -function trimTo(str, amt) { - var raw = ''; - var visual = viewed(str).slice(0, amt); - var result = ''; - for (var i = 0; i < str.length; ++i) { - raw += str[i]; - if (viewed(raw) === visual) { - result = raw;break; - } - } - - if (result.length < amt - 10) { - return result; - } - - var newResult = result;var found = false; - for (var j = result.length; j > 0; --j) { - if (result[j] === ' ') { - found = true; - break; - } else { - newResult = newResult.slice(0, newResult.length - 1); - } - } - - if (found === true) { - return newResult; - } - - return result; -} - -function Logger(cons) { - var logger = cons || console; - log = function log() { - logger.log.apply(logger, arguments); - }; - - log.cols = function () { - var width = process.stdout.columns; - var pads = 0; - var padsWidth = 0; - var cols = 0; - var colsWidth = 0; - var input = arguments; - - for (var h = 0; h < arguments.length; ++h) { - if (typeof arguments[h] === 'number') { - padsWidth += arguments[h]; - pads++; - } - if (_.isArray(arguments[h]) && typeof arguments[h][0] === 'number') { - padsWidth += arguments[h][0]; - pads++; - } - } - - cols = arguments.length - pads; - colsWidth = Math.floor((width - padsWidth) / cols); - - var lines = []; - - var go = function go() { - var str = ''; - var done = true; - for (var i = 0; i < input.length; ++i) { - if (typeof input[i] === 'number') { - str += util.pad('', input[i], ' '); - } else if (_.isArray(input[i]) && typeof input[i][0] === 'number') { - str += util.pad('', input[i][0], input[i][1]); - } else { - var chosenWidth = colsWidth + 0; - var trimmed = trimTo(input[i], colsWidth); - var trimmedLength = trimmed.length; - var re = /\\u001b\[\d+m/gm; - var matches = ut.inspect(trimmed).match(re); - var color = ''; - // Ugh. We're chopping a line, so we have to look for unfinished - // color assignments and throw them on the next line. - if (matches && matches[matches.length - 1] !== '\\u001b[39m') { - trimmed += '\x1B[39m'; - var number = String(matches[matches.length - 1]).slice(7, 9); - color = '\x1B[' + number + 'm'; - } - input[i] = color + String(input[i].slice(trimmedLength, input[i].length)).trim(); - str += util.pad(String(trimmed).trim(), chosenWidth, ' '); - if (viewed(input[i]).trim() !== '') { - done = false; - } - } - } - lines.push(str); - if (!done) { - go(); - } - }; - go(); - for (var i = 0; i < lines.length; ++i) { - logger.log(lines[i]); - } - return this; - }; - - log.br = function () { - logger.log(' '); - return this; - }; - - return this.log; -} - -/** - * Expose `logger`. - */ - -module.exports = exports = Logger; \ No newline at end of file diff --git a/dist/option.js b/dist/option.js deleted file mode 100755 index d801c6b5..00000000 --- a/dist/option.js +++ /dev/null @@ -1,90 +0,0 @@ -'use strict'; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Option = function () { - - /** - * Initialize a new `Option` instance. - * - * @param {String} flags - * @param {String} description - * @param {Autocomplete} autocomplete - * @return {Option} - * @api public - */ - - function Option(flags, description, autocomplete) { - _classCallCheck(this, Option); - - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - this.autocomplete = autocomplete; - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) { - this.assignFlag(flags.shift()); - } - this.assignFlag(flags.shift()); - this.description = description || ''; - } - - /** - * Return option name. - * - * @return {String} - * @api private - */ - - _createClass(Option, [{ - key: 'name', - value: function name() { - if (this.long !== undefined) { - return this.long.replace('--', '').replace('no-', ''); - } - return this.short.replace('-', ''); - } - - /** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - - }, { - key: 'is', - value: function is(arg) { - return arg === this.short || arg === this.long; - } - - /** - * Assigned flag to either long or short. - * - * @param {String} flag - * @api private - */ - - }, { - key: 'assignFlag', - value: function assignFlag(flag) { - if (flag.startsWith('--')) { - this.long = flag; - } else { - this.short = flag; - } - } - }]); - - return Option; -}(); - -/** - * Expose `Option`. - */ - -module.exports = exports = Option; \ No newline at end of file diff --git a/dist/session.js b/dist/session.js deleted file mode 100755 index 68e14652..00000000 --- a/dist/session.js +++ /dev/null @@ -1,559 +0,0 @@ -'use strict'; - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter; -var os = require('os'); -var _ = require('lodash'); -var util = require('./util'); -var autocomplete = require('./autocomplete'); -var CommandInstance = require('./command-instance'); - -/** - * Initialize a new `Session` instance. - * - * @param {String} name - * @return {Session} - * @api public - */ - -function Session(options) { - options = options || {}; - this.id = options.id || this._guid(); - this.parent = options.parent || undefined; - this.authenticating = options.authenticating || false; - this.authenticated = options.authenticated || undefined; - this.user = options.user || 'guest'; - this.host = options.host; - this.address = options.address || undefined; - this._isLocal = options.local || undefined; - this._delimiter = options.delimiter || String(os.hostname()).split('.')[0] + '~$'; - this._modeDelimiter = undefined; - - // Keeps history of how many times in a row `tab` was - // pressed on the keyboard. - this._tabCtr = 0; - - this.cmdHistory = this.parent.cmdHistory; - - // Special command mode vorpal is in at the moment, - // such as REPL. See mode documentation. - this._mode = undefined; - - return this; -} - -/** - * Extend Session prototype as an event emitter. - */ - -Session.prototype = Object.create(EventEmitter.prototype); - -/** - * Session prototype. - */ - -var session = Session.prototype; - -/** - * Expose `Session`. - */ - -module.exports = exports = Session; - -/** - * Pipes logging data through any piped - * commands, and then sends it to ._log for - * actual logging. - * - * @param {String} [... arguments] - * @return {Session} - * @api public - */ - -session.log = function () { - var args = util.fixArgsForApply(arguments); - return this._log.apply(this, args); -}; - -/** - * Routes logging for a given session. - * is on a local TTY, or remote. - * - * @param {String} [... arguments] - * @return {Session} - * @api public - */ - -session._log = function () { - var self = this; - if (this.isLocal()) { - this.parent.ui.log.apply(this.parent.ui, arguments); - } else { - // If it's an error, expose the stack. Otherwise - // we get a helpful '{}'. - var args = []; - for (var i = 0; i < arguments.length; ++i) { - var str = arguments[i]; - str = str && str.stack ? 'Error: ' + str.message : str; - args.push(str); - } - self.parent._send('vantage-ssn-stdout-downstream', 'downstream', { sessionId: self.id, value: args }); - } - return this; -}; - -/** - * Returns whether given session - * is on a local TTY, or remote. - * - * @return {Boolean} - * @api public - */ - -session.isLocal = function () { - return this._isLocal; -}; - -/** - * Maps to vorpal.prompt for a session - * context. - * - * @param {Object} options - * @param {Function} cb - * @api public - */ - -session.prompt = function (options, cb) { - options = options || {}; - options.sessionId = this.id; - return this.parent.prompt(options, cb); -}; - -/** - * Gets the full (normal + mode) delimiter - * for this session. - * - * @return {String} - * @api public - */ - -session.fullDelimiter = function () { - var result = this._delimiter + (this._modeDelimiter !== undefined ? this._modeDelimiter : ''); - return result; -}; - -/** - * Sets the delimiter for this session. - * - * @param {String} str - * @return {Session} - * @api public - */ - -session.delimiter = function (str) { - if (str === undefined) { - return this._delimiter; - } - this._delimiter = String(str).trim() + ' '; - if (this.isLocal()) { - this.parent.ui.refresh(); - } else { - this.parent._send('vantage-delimiter-downstream', 'downstream', { value: str, sessionId: this.id }); - } - return this; -}; - -/** - * Sets the mode delimiter for this session. - * - * @param {String} str - * @return {Session} - * @api public - */ - -session.modeDelimiter = function (str) { - var self = this; - if (str === undefined) { - return this._modeDelimiter; - } - if (!this.isLocal()) { - self.parent._send('vantage-mode-delimiter-downstream', 'downstream', { value: str, sessionId: self.id }); - } else { - if (str === false || str === 'false') { - this._modeDelimiter = undefined; - } else { - this._modeDelimiter = String(str).trim() + ' '; - } - this.parent.ui.refresh(); - } - return this; -}; - -/** - * Returns the result of a keypress - * string, depending on the type. - * - * @param {String} key - * @param {String} value - * @return {Function} - * @api private - */ - -session.getKeypressResult = function (key, value, cb) { - cb = cb || function () {}; - var keyMatch = ['up', 'down', 'tab'].indexOf(key) > -1; - if (key !== 'tab') { - this._tabCtr = 0; - } - if (keyMatch) { - if (['up', 'down'].indexOf(key) > -1) { - cb(undefined, this.getHistory(key)); - } else if (key === 'tab') { - // If the Vorpal user has any commands that use - // command.autocompletion, defer to the deprecated - // version of autocompletion. Otherwise, default - // to the new version. - var fn = this.parent._useDeprecatedAutocompletion ? 'getAutocompleteDeprecated' : 'getAutocomplete'; - this[fn](value, function (err, data) { - cb(err, data); - }); - } - } else { - this._histCtr = 0; - } -}; - -session.history = function (str) { - var exceptions = []; - if (str && exceptions.indexOf(String(str).toLowerCase()) === -1) { - this.cmdHistory.newCommand(str); - } -}; - -/** - * New autocomplete. - * - * @param {String} str - * @param {Function} cb - * @api private - */ - -session.getAutocomplete = function (str, cb) { - return autocomplete.exec.call(this, str, cb); -}; - -/** - * Deprecated autocomplete - being deleted - * in Vorpal 2.0. - * - * @param {String} str - * @param {Function} cb - * @api private - */ - -session.getAutocompleteDeprecated = function (str, cb) { - cb = cb || function () {}; - - // Entire command string - var cursor = this.parent.ui._activePrompt.screen.rl.cursor; - var trimmed = String(str).trim(); - var cut = String(trimmed).slice(0, cursor); - var remainder = String(trimmed).slice(cursor, trimmed.length).replace(/ +$/, ''); - trimmed = cut; - - // Set "trimmed" to command string after pipe - // Set "pre" to command string, pipe, and a space - var pre = ''; - var lastPipeIndex = trimmed.lastIndexOf('|'); - if (lastPipeIndex !== -1) { - pre = trimmed.substr(0, lastPipeIndex + 1) + ' '; - trimmed = trimmed.substr(lastPipeIndex + 1).trim(); - } - - // Complete command - var names = _.map(this.parent.commands, '_name'); - names = names.concat.apply(names, _.map(this.parent.commands, '_aliases')); - var result = this._autocomplete(trimmed, names); - if (result && trimmed.length < String(result).trim().length) { - cb(undefined, pre + result + remainder); - return; - } - - // Find custom autocompletion - var match; - var extra; - - names.forEach(function (name) { - if (trimmed.substr(0, name.length) === name && String(name).trim() !== '') { - match = name; - extra = trimmed.substr(name.length).trim(); - } - }); - - var command = match ? _.find(this.parent.commands, { _name: match }) : undefined; - - if (!command) { - command = _.find(this.parent.commands, { _catch: true }); - if (command) { - extra = trimmed; - } - } - - if (command && _.isFunction(command._autocompletion)) { - this._tabCtr++; - command._autocompletion.call(this, extra, this._tabCtr, function (err, autocomplete) { - if (err) { - return cb(err); - } - if (_.isArray(autocomplete)) { - return cb(undefined, autocomplete); - } else if (autocomplete === undefined) { - return cb(undefined, undefined); - } - return cb(undefined, pre + autocomplete + remainder); - }); - } else { - cb(undefined, undefined); - } -}; - -session._autocomplete = function (str, arr) { - return autocomplete.match.call(this, str, arr); -}; - -/** - * Public facing autocomplete helper. - * - * @param {String} str - * @param {Array} arr - * @return {String} - * @api public - */ - -session.help = function (command) { - this.log(this.parent._commandHelp(command || '')); -}; - -/** - * Public facing autocomplete helper. - * - * @param {String} str - * @param {Array} arr - * @return {String} - * @api public - */ - -session.match = function (str, arr) { - return this._autocomplete(str, arr); -}; - -/** - * Gets a new command set ready. - * - * @return {session} - * @api public - */ - -session.execCommandSet = function (wrapper, callback) { - var self = this; - var response = {}; - var res; - var cbk = callback; - this._registeredCommands = 1; - this._completedCommands = 0; - - // Create the command instance for the first - // command and hook it up to the pipe chain. - var commandInstance = new CommandInstance({ - downstream: wrapper.pipes[0], - commandObject: wrapper.commandObject, - commandWrapper: wrapper - }); - - wrapper.commandInstance = commandInstance; - - function sendDones(itm) { - if (itm.commandObject && itm.commandObject._done) { - itm.commandObject._done.call(itm); - } - if (itm.downstream) { - sendDones(itm.downstream); - } - } - - // Called when command is cancelled - this.cancelCommands = function () { - var callCancel = function callCancel(commandInstance) { - if (_.isFunction(commandInstance.commandObject._cancel)) { - commandInstance.commandObject._cancel.call(commandInstance); - } - - if (commandInstance.downstream) { - callCancel(commandInstance.downstream); - } - }; - - callCancel(wrapper.commandInstance); - - // Check if there is a cancel method on the promise - if (res && _.isFunction(res.cancel)) { - res.cancel(wrapper.commandInstance); - } - - self.removeListener('vorpal_command_cancel', self.cancelCommands); - self.cancelCommands = undefined; - self._commandSetCallback = undefined; - self._registeredCommands = 0; - self._completedCommands = 0; - self.parent.emit('client_command_cancelled', { command: wrapper.command }); - - cbk(wrapper); - }; - - this.on('vorpal_command_cancel', self.cancelCommands); - - // Gracefully handles all instances of the command completing. - this._commandSetCallback = function () { - var err = response.error; - var data = response.data; - var argus = response.args; - if (self.isLocal() && err) { - var stack; - if (data && data.stack) { - stack = data.stack; - } else if (err && err.stack) { - stack = err.stack; - } else { - stack = err; - } - self.log(stack); - self.parent.emit('client_command_error', { command: wrapper.command, error: err }); - } else if (self.isLocal()) { - self.parent.emit('client_command_executed', { command: wrapper.command }); - } - - self.removeListener('vorpal_command_cancel', self.cancelCommands); - self.cancelCommands = undefined; - cbk(wrapper, err, data, argus); - sendDones(commandInstance); - }; - - function onCompletion(wrapper, err, data, argus) { - response = { - error: err, - data: data, - args: argus - }; - self.completeCommand(); - } - - var valid; - if (_.isFunction(wrapper.validate)) { - try { - valid = wrapper.validate.call(commandInstance, wrapper.args); - } catch (e) { - // Complete with error on validation error - onCompletion(wrapper, e); - return this; - } - } - - if (valid !== true && valid !== undefined) { - onCompletion(wrapper, valid || null); - return this; - } - - // Call the root command. - res = wrapper.fn.call(commandInstance, wrapper.args, function () { - var argus = util.fixArgsForApply(arguments); - onCompletion(wrapper, argus[0], argus[1], argus); - }); - - // If the command as declared by the user - // returns a promise, handle accordingly. - if (res && _.isFunction(res.then)) { - res.then(function (data) { - onCompletion(wrapper, undefined, data); - }).catch(function (err) { - onCompletion(wrapper, true, err); - }); - } - - return this; -}; - -/** - * Adds on a command or sub-command in progress. - * Session keeps tracked of commands, - * and as soon as all commands have been - * compelted, the session returns the entire - * command set as complete. - * - * @return {session} - * @api public - */ - -session.registerCommand = function () { - this._registeredCommands = this._registeredCommands || 0; - this._registeredCommands++; - return this; -}; - -/** - * Marks a command or subcommand as having completed. - * If all commands have completed, calls back - * to the root command as being done. - * - * @return {session} - * @api public - */ - -session.completeCommand = function () { - this._completedCommands++; - if (this._registeredCommands <= this._completedCommands) { - this._registeredCommands = 0; - this._completedCommands = 0; - if (this._commandSetCallback) { - this._commandSetCallback(); - } - this._commandSetCallback = undefined; - } - return this; -}; - -/** - * Returns the appropriate command history - * string based on an 'Up' or 'Down' arrow - * key pressed by the user. - * - * @param {String} direction - * @return {String} - * @api private - */ - -session.getHistory = function (direction) { - var history; - if (direction === 'up') { - history = this.cmdHistory.getPreviousHistory(); - } else if (direction === 'down') { - history = this.cmdHistory.getNextHistory(); - } - return history; -}; - -/** - * Generates random GUID for Session ID. - * - * @return {GUID} - * @api private - */ - -session._guid = function () { - function s4() { - return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); - } - return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); -}; \ No newline at end of file diff --git a/dist/ui.js b/dist/ui.js deleted file mode 100755 index c9d28ba4..00000000 --- a/dist/ui.js +++ /dev/null @@ -1,654 +0,0 @@ -'use strict'; - -/** - * Module dependencies. - */ - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _ = require('lodash'); -var inquirer = require('inquirer'); -var EventEmitter = require('events').EventEmitter; -var chalk = require('chalk'); -var util = require('./util'); -var logUpdate = require('log-update'); - -var UI = function (_EventEmitter) { - _inherits(UI, _EventEmitter); - - /** - * Sets intial variables and registers - * listeners. This is called once in a - * process thread regardless of how many - * instances of Vorpal have been generated. - * - * @api private - */ - - function UI() { - _classCallCheck(this, UI); - - var _this = _possibleConstructorReturn(this, (UI.__proto__ || Object.getPrototypeOf(UI)).call(this)); - - var self = _this; - - // Attached vorpal instance. The UI can - // only attach to one instance of Vorpal - // at a time, and directs all events to that - // instance. - _this.parent = undefined; - - // Hook to reference active inquirer prompt. - _this._activePrompt = undefined; - - // Fail-safe to ensure there is no double - // prompt in odd situations. - _this._midPrompt = false; - - // Handle for inquirer's prompt. - _this.inquirer = inquirer; - - // prompt history from inquirer - _this.inquirerStdout = []; - - // Whether a prompt is currently in cancel mode. - _this._cancelled = false; - - // Middleware for piping stdout through. - _this._pipeFn = undefined; - - // Custom function on sigint event. - _this._sigintCalled = false; - _this._sigintCount = 0; - _this._sigint = function () { - if (_this._sigintCount > 1) { - _this.parent.emit('vorpal_exit'); - process.exit(0); - } else { - var text = _this.input(); - if (!_this.parent) { - // If Vorpal isn't shown, just exit. - process.exit(0); - } else if (_this.parent.session.cancelCommands) { - // There are commands running if - // cancelCommands function is available. - _this.imprint(); - _this.submit(''); - _this._sigintCalled = false; - _this._sigintCount = 0; - _this.parent.session.emit('vorpal_command_cancel'); - } else if (String(text).trim() !== '') { - _this.imprint(); - _this.submit(''); - _this._sigintCalled = false; - _this._sigintCount = 0; - } else { - _this._sigintCalled = false; - _this.delimiter(' '); - _this.submit(''); - _this.log('(^C again to quit)'); - } - } - }; - - process.stdin.on('keypress', function (letter, key) { - key = key || {}; - if (key.ctrl === true && key.shift === false && key.meta === false && ['c', 'C'].indexOf(key.name) > -1) { - _this._sigintCount++; - if (_this._sigint !== undefined && !_this._sigintCalled) { - _this._sigintCalled = true; - _this._sigint.call(self.parent); - _this._sigintCalled = false; - } - } else { - _this._sigintCalled = false; - _this._sigintCount = 0; - } - }); - - // Extend the render function to steal the active prompt object, - // as inquirer doesn't expose it and we need it. - var prompts = ['input', 'checkbox', 'confirm', 'expand', 'list', 'password', 'rawlist']; - - var _loop = function _loop(key) { - var promptType = prompts[key]; - - // Add method to Inquirer to get type of prompt. - inquirer.prompt.prompts[promptType].prototype.getType = function () { - return promptType; - }; - - // Hook in to steal Inquirer's keypress. - inquirer.prompt.prompts[promptType].prototype.onKeypress = function (e) { - // Inquirer seems to have a bug with release v0.10.1 - // (not 0.10.0 though) that triggers keypresses for - // the previous prompt in addition to the current one. - // So if the prompt is answered, shut it up. - if (this.status && this.status === 'answered') { - return; - } - self._activePrompt = this; - self.parent.emit('client_keypress', e); - self._keypressHandler(e, this); - }; - - // Add hook to render method. - var render = inquirer.prompt.prompts[promptType].prototype.render; - inquirer.prompt.prompts[promptType].prototype.render = function () { - self._activePrompt = this; - return render.apply(this, arguments); - }; - }; - - for (var key in prompts) { - _loop(key); - } - - // Sigint handling - make it more graceful. - var onSigInt = function onSigInt() { - if (_.isFunction(_this._sigint) && !_this._sigintCalled) { - _this._sigintCalled = true; - _this._sigint.call(_this.parent); - } - }; - process.on('SIGINT', onSigInt); - process.on('SIGTERM', onSigInt); - return _this; - } - - /** - * Hook for sigint event. - * - * @param {Object} options - * @param {Function} cb - * @api public - */ - - _createClass(UI, [{ - key: 'sigint', - value: function sigint(fn) { - if (_.isFunction(fn)) { - this._sigint = fn; - } else { - throw new Error('vorpal.ui.sigint must be passed in a valid function.'); - } - return this; - } - - /** - * Creates an inquirer prompt on the TTY. - * - * @param {Object} options - * @param {Function} cb - * @api public - */ - - }, { - key: 'prompt', - value: function prompt(options, cb) { - var _this2 = this; - - var prompt = void 0; - options = options || {}; - if (!this.parent) { - return prompt; - } - if (options.delimiter) { - this.setDelimiter(options.delimiter); - } - if (options.message) { - this.setDelimiter(options.message); - } - if (this._midPrompt) { - console.log('Prompt called when mid prompt...'); - throw new Error('UI Prompt called when already mid prompt.'); - } - this._midPrompt = true; - try { - prompt = inquirer.prompt(options, function (result) { - _this2.inquirerStdout = []; - _this2._midPrompt = false; - if (_this2._cancel === true) { - _this2._cancel = false; - } else { - cb(result); - } - }); - - // Temporary hack. We need to pull the active - // prompt from inquirer as soon as possible, - // however we can't just assign it sync, as - // the prompt isn't ready yet. - // I am trying to get inquirer extended to - // fire an event instead. - setTimeout(function () { - // this._activePrompt = prompt._activePrompt; - }, 100); - } catch (e) { - console.log('Vorpal Prompt error:', e); - } - return prompt; - } - - /** - * Returns a boolean as to whether user - * is mid another pr ompt. - * - * @return {Boolean} - * @api public - */ - - }, { - key: 'midPrompt', - value: function midPrompt() { - var mid = this._midPrompt === true && this.parent !== undefined; - return mid; - } - }, { - key: 'setDelimiter', - value: function setDelimiter(str) { - var self = this; - if (!this.parent) { - return; - } - str = String(str).trim() + ' '; - this._lastDelimiter = str; - inquirer.prompt.prompts.password.prototype.getQuestion = function () { - self._activePrompt = this; - return this.opt.message; - }; - inquirer.prompt.prompts.input.prototype.getQuestion = function () { - self._activePrompt = this; - var message = this.opt.message; - if ((this.opt.default || this.opt.default === false) && this.status !== 'answered') { - message += chalk.dim('(' + this.opt.default + ') '); - } - self.inquirerStdout.push(message); - return message; - }; - } - - /** - * Event handler for keypresses - deals with command history - * and tabbed auto-completion. - * - * @param {Event} e - * @param {Prompt} prompt - * @api private - */ - - }, { - key: '_keypressHandler', - value: function _keypressHandler(e, prompt) { - // Remove tab characters from user input. - prompt.rl.line = prompt.rl.line.replace(/\t+/, ''); - - // Mask passwords. - var line = prompt.getType() !== 'password' ? prompt.rl.line : '*'.repeat(prompt.rl.line.length); - - // Re-write render function. - var width = prompt.rl.line.length; - var newWidth = prompt.rl.line.length; - var diff = newWidth - width; - prompt.rl.cursor += diff; - var cursor = 0; - var message = prompt.getQuestion(); - var addition = prompt.status === 'answered' ? chalk.cyan(prompt.answer) : line; - message += addition; - prompt.screen.render(message, { cursor: cursor }); - - var key = (e.key || {}).name; - var value = prompt ? String(line) : undefined; - this.emit('vorpal_ui_keypress', { key: key, value: value, e: e }); - } - - /** - * Pauses active prompt, returning - * the value of what had been typed so far. - * - * @return {String} val - * @api public - */ - - }, { - key: 'pause', - value: function pause() { - if (!this.parent) { - return false; - } - if (!this._activePrompt) { - return false; - } - if (!this._midPrompt) { - return false; - } - var val = this._lastDelimiter + this._activePrompt.rl.line; - this._midPrompt = false; - var rl = this._activePrompt.screen.rl; - var screen = this._activePrompt.screen; - rl.output.unmute(); - screen.clean(); - rl.output.write(''); - return val; - } - - /** - * Resumes active prompt, accepting - * a string, which will fill the prompt - * with that text and put the cursor at - * the end. - * - * @param {String} val - * @api public - */ - - }, { - key: 'resume', - value: function resume(val) { - if (!this.parent) { - return this; - } - val = val || ''; - if (!this._activePrompt) { - return this; - } - if (this._midPrompt) { - return this; - } - var rl = this._activePrompt.screen.rl; - rl.output.write(val); - this._midPrompt = true; - return this; - } - - /** - * Cancels the active prompt, essentially - * but cutting out of the inquirer loop. - * - * @api public - */ - - }, { - key: 'cancel', - value: function cancel() { - if (this.midPrompt()) { - this._cancel = true; - this.submit(''); - this._midPrompt = false; - } - return this; - } - - /** - * Attaches TTY prompt to a given Vorpal instance. - * - * @param {Vorpal} vorpal - * @return {UI} - * @api public - */ - - }, { - key: 'attach', - value: function attach(vorpal) { - this.parent = vorpal; - this.refresh(); - this.parent._prompt(); - return this; - } - - /** - * Detaches UI from a given Vorpal instance. - * - * @param {Vorpal} vorpal - * @return {UI} - * @api public - */ - - }, { - key: 'detach', - value: function detach(vorpal) { - if (vorpal === this.parent) { - this.parent = undefined; - } - return this; - } - - /** - * Receives and runs logging through - * a piped function is one is provided - * through ui.pipe(). Pauses any active - * prompts, logs the data and then if - * paused, resumes the prompt. - * - * @return {UI} - * @api public - */ - - }, { - key: 'log', - value: function log() { - var args = util.fixArgsForApply(arguments); - args = _.isFunction(this._pipeFn) ? this._pipeFn(args) : args; - if (args === '') { - return this; - } - args = util.fixArgsForApply(args); - if (this.midPrompt()) { - var data = this.pause(); - console.log.apply(console.log, args); - if (typeof data !== 'undefined' && data !== false) { - this.resume(data); - } else { - console.log('Log got back \'false\' as data. This shouldn\'t happen.', data); - } - } else { - console.log.apply(console.log, args); - } - return this; - } - - /** - * Submits a given prompt. - * - * @param {String} value - * @return {UI} - * @api public - */ - - }, { - key: 'submit', - value: function submit() { - if (this._activePrompt) { - // this._activePrompt.screen.onClose(); - this._activePrompt.rl.emit('line'); - // this._activePrompt.onEnd({isValid: true, value: value}); - // to do - I don't know a good way to do this. - } - return this; - } - - /** - * Does a literal, one-time write to the - * *current* prompt delimiter. - * - * @param {String} str - * @return {UI} - * @api public - */ - - }, { - key: 'delimiter', - value: function delimiter(str) { - if (!this._activePrompt) { - return this; - } - var prompt = this._activePrompt; - if (str === undefined) { - return prompt.opt.message; - } - prompt.opt.message = str; - this.refresh(); - return this; - } - - /** - * Re-writes the input of an Inquirer prompt. - * If no string is passed, it gets the current - * input. - * - * @param {String} str - * @return {String} - * @api public - */ - - }, { - key: 'input', - value: function input(str) { - if (!this._activePrompt) { - return undefined; - } - var prompt = this._activePrompt; - if (str === undefined) { - return prompt.rl.line; - } - var width = prompt.rl.line.length; - prompt.rl.line = str; - var newWidth = prompt.rl.line.length; - var diff = newWidth - width; - prompt.rl.cursor += diff; - var cursor = 0; - var message = prompt.getQuestion(); - var addition = prompt.status === 'answered' ? chalk.cyan(prompt.answer) : prompt.rl.line; - message += addition; - prompt.screen.render(message, { cursor: cursor }); - return this; - } - - /** - * Logs the current delimiter and typed data. - * - * @return {UI} - * @api public - */ - - }, { - key: 'imprint', - value: function imprint() { - if (!this.parent) { - return this; - } - var val = this._activePrompt.rl.line; - var delimiter = this._lastDelimiter || this.delimiter() || ''; - this.log(delimiter + val); - return this; - } - - /** - * Redraws the inquirer prompt with a new string. - * - * @param {String} str - * @return {UI} - * @api private - */ - - }, { - key: 'refresh', - value: function refresh() { - if (!this.parent || !this._activePrompt) { - return this; - } - this._activePrompt.screen.clean(); - this._activePrompt.render(); - this._activePrompt.rl.output.write(this._activePrompt.rl.line); - return this; - } - - /** - * Writes over existing logging. - * - * @param {String} str - * @return {UI} - * @api public - */ - - }, { - key: 'redraw', - value: function redraw(str) { - logUpdate(str); - return this; - } - }]); - - return UI; -}(EventEmitter); - -/** - * Initialize singleton. - */ - -var ui = new UI(); - -/** - * Clears logging from `ui.redraw` - * permanently. - * - * @return {UI} - * @api public - */ - -ui.redraw.clear = function () { - logUpdate.clear(); - return ui; -}; - -/** - * Prints logging from `ui.redraw` - * permanently. - * - * @return {UI} - * @api public - */ - -ui.redraw.done = function () { - logUpdate.done(); - ui.refresh(); - return ui; -}; - -/** - * Expose `ui`. - * - * Modifying global? WTF?!? Yes. It is evil. - * However node.js prompts are also quite - * evil in a way. Nothing prevents dual prompts - * between applications in the same terminal, - * and inquirer doesn't catch or deal with this, so - * if you want to start two independent instances of - * vorpal, you need to know that prompt listeners - * have already been initiated, and that you can - * only attach the tty to one vorpal instance - * at a time. - * When you fire inqurier twice, you get a double-prompt, - * where every keypress fires twice and it's just a - * total mess. So forgive me. - */ - -global.__vorpal = global.__vorpal || {}; -global.__vorpal.ui = global.__vorpal.ui || { - exists: false, - exports: undefined -}; - -if (!global.__vorpal.ui.exists) { - global.__vorpal.ui.exists = true; - global.__vorpal.ui.exports = ui; - module.exports = exports = global.__vorpal.ui.exports; -} else { - module.exports = global.__vorpal.ui.exports; -} \ No newline at end of file diff --git a/dist/util.js b/dist/util.js deleted file mode 100755 index d527c9e6..00000000 --- a/dist/util.js +++ /dev/null @@ -1,464 +0,0 @@ -'use strict'; - -/** - * Module dependencies. - */ - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _ = require('lodash'); -var minimist = require('minimist'); -var strip = require('strip-ansi'); - -var util = { - /** - * Parses command arguments from multiple - * sources. - * - * @param {String} str - * @param {Object} opts - * @return {Array} - * @api private - */ - - parseArgs: function parseArgs(str, opts) { - var reg = /"(.*?)"|'(.*?)'|`(.*?)`|([^\s"]+)/gi; - var arr = []; - var match = void 0; - do { - match = reg.exec(str); - if (match !== null) { - arr.push(match[1] || match[2] || match[3] || match[4]); - } - } while (match !== null); - - arr = minimist(arr, opts); - arr._ = arr._ || []; - return arr; - }, - - /** - * Prepares a command and all its parts for execution. - * - * @param {String} command - * @param {Array} commands - * @return {Object} - * @api public - */ - - parseCommand: function parseCommand(command, commands) { - var self = this; - var pipes = []; - var match = void 0; - var matchArgs = void 0; - var matchParts = void 0; - - function parsePipes() { - // First, split the command by pipes naively. - // This will split command arguments in half when the argument contains a pipe character. - // For example, say "(Vorpal|vorpal)" will be split into ['say "(Vorpal', 'vorpal)'] which isn't good. - var naivePipes = String(command).trim().split('|'); - - // Contruct empty array to place correctly split commands into. - var newPipes = []; - - // We will look for pipe characters within these quotes to rejoin together. - var quoteChars = ['"', '\'', '`']; - - // This will expand to contain one boolean key for each type of quote. - // The value keyed by the quote is toggled off and on as quote type is opened and closed. - // Example { "`": true, "'": false } would mean that there is an open angle quote. - var quoteTracker = {}; - - // The current command piece before being rejoined with it's over half. - // Since it's not common for pipes to occur in commands, this is usually the entire command pipe. - var commandPart = ''; - - // Loop through each naive pipe. - for (var key in naivePipes) { - // It's possible/likely that this naive pipe is the whole pipe if it doesn't contain an unfinished quote. - var possiblePipe = naivePipes[key]; - commandPart += possiblePipe; - - // Loop through each individual character in the possible pipe tracking the opening and closing of quotes. - for (var i = 0; i < possiblePipe.length; i++) { - var char = possiblePipe[i]; - if (quoteChars.indexOf(char) !== -1) { - quoteTracker[char] = !quoteTracker[char]; - } - } - - // Does the pipe end on an unfinished quote? - var inQuote = _.some(quoteChars, function (quoteChar) { - return quoteTracker[quoteChar]; - }); - - // If the quotes have all been closed or this is the last possible pipe in the array, add as pipe. - if (!inQuote || key * 1 === naivePipes.length - 1) { - newPipes.push(commandPart.trim()); - commandPart = ''; - } else { - // Quote was left open. The pipe character was previously removed when the array was split. - commandPart += '|'; - } - } - - // Set the first pipe to command and the rest to pipes. - command = newPipes.shift(); - pipes = pipes.concat(newPipes); - } - - function parseMatch() { - matchParts = self.matchCommand(command, commands); - match = matchParts.command; - matchArgs = matchParts.args; - } - - parsePipes(); - parseMatch(); - - if (match && _.isFunction(match._parse)) { - command = match._parse(command, matchParts.args); - parsePipes(); - parseMatch(); - } - - return { - command: command, - match: match, - matchArgs: matchArgs, - pipes: pipes - }; - }, - - /** - * Run a raw command string, e.g. foo -bar - * against a given list of commands, - * and if there is a match, parse the - * results. - * - * @param {String} cmd - * @param {Array} cmds - * @return {Object} - * @api public - */ - - matchCommand: function matchCommand(cmd, cmds) { - var parts = String(cmd).trim().split(' '); - - var match = void 0; - var matchArgs = void 0; - for (var i = 0; i < parts.length; ++i) { - var subcommand = String(parts.slice(0, parts.length - i).join(' ')).trim(); - match = _.find(cmds, { _name: subcommand }) || match; - if (!match) { - for (var key in cmds) { - var _cmd = cmds[key]; - var idx = _cmd._aliases.indexOf(subcommand); - match = idx > -1 ? _cmd : match; - } - } - if (match) { - matchArgs = parts.slice(parts.length - i, parts.length).join(' '); - break; - } - } - // If there's no command match, check if the - // there's a `catch` command, which catches all - // missed commands. - if (!match) { - match = _.find(cmds, { _catch: true }); - // If there is one, we still need to make sure we aren't - // partially matching command groups, such as `do things` when - // there is a command `do things well`. If we match partially, - // we still want to show the help menu for that command group. - if (match) { - var allCommands = _.map(cmds, '_name'); - var wordMatch = false; - for (var _key in allCommands) { - var _cmd2 = allCommands[_key]; - var parts2 = String(_cmd2).split(' '); - var cmdParts = String(match.command).split(' '); - var matchAll = true; - for (var k = 0; k < cmdParts.length; ++k) { - if (parts2[k] !== cmdParts[k]) { - matchAll = false; - break; - } - } - if (matchAll) { - wordMatch = true; - break; - } - } - if (wordMatch) { - match = undefined; - } else { - matchArgs = cmd; - } - } - } - - return { - command: match, - args: matchArgs - }; - }, - - buildCommandArgs: function buildCommandArgs(passedArgs, cmd, execCommand, isCommandArgKeyPairNormalized) { - var args = { options: {} }; - - if (isCommandArgKeyPairNormalized) { - // Normalize all foo="bar" with "foo='bar'" - // This helps implement unix-like key value pairs. - var reg = /(['"]?)(\w+)=(?:(['"])((?:(?!\3).)*)\3|(\S+))\1/g; - passedArgs = passedArgs.replace(reg, '"$2=\'$4$5\'"'); - } - - // Types are custom arg types passed - // into `minimist` as per its docs. - var types = cmd._types || {}; - - // Make a list of all boolean options - // registered for this command. These are - // simply commands that don't have required - // or optional args. - var booleans = []; - cmd.options.forEach(function (opt) { - if (opt.required === 0 && opt.optional === 0) { - if (opt.short) { - booleans.push(opt.short); - } - if (opt.long) { - booleans.push(opt.long); - } - } - }); - - // Review the args passed into the command, - // and filter out the boolean list to only those - // options passed in. - // This returns a boolean list of all options - // passed in by the caller, which don't have - // required or optional args. - var passedArgParts = passedArgs.split(' '); - types.boolean = booleans.map(function (str) { - return String(str).replace(/^-*/, ''); - }).filter(function (str) { - var match = false; - var strings = ['-' + str, '--' + str, '--no-' + str]; - for (var i = 0; i < passedArgParts.length; ++i) { - if (strings.indexOf(passedArgParts[i]) > -1) { - match = true; - break; - } - } - return match; - }); - - // Use minimist to parse the args. - var parsedArgs = this.parseArgs(passedArgs, types); - - function validateArg(arg, cmdArg) { - return !(arg === undefined && cmdArg.required === true); - } - - // Builds varidiac args and options. - var valid = true; - var remainingArgs = _.clone(parsedArgs._); - for (var l = 0; l < 10; ++l) { - var matchArg = cmd._args[l]; - var passedArg = parsedArgs._[l]; - if (matchArg !== undefined) { - valid = !valid ? false : validateArg(parsedArgs._[l], matchArg); - if (!valid) { - break; - } - if (passedArg !== undefined) { - if (matchArg.variadic === true) { - args[matchArg.name] = remainingArgs; - } else { - args[matchArg.name] = passedArg; - remainingArgs.shift(); - } - } - } - } - - if (!valid) { - return '\n Missing required argument. Showing Help:'; - } - - // Looks for ommitted required options and throws help. - for (var m = 0; m < cmd.options.length; ++m) { - var o = cmd.options[m]; - var short = String(o.short || '').replace(/-/g, ''); - var long = String(o.long || '').replace(/--no-/g, '').replace(/^-*/g, ''); - var exist = parsedArgs[short] !== undefined ? parsedArgs[short] : undefined; - exist = exist === undefined && parsedArgs[long] !== undefined ? parsedArgs[long] : exist; - var existsNotSet = exist === true || exist === false; - if (existsNotSet && o.required !== 0) { - return '\n Missing required value for option ' + (o.long || o.short) + '. Showing Help:'; - } - if (exist !== undefined) { - args.options[long || short] = exist; - } - } - - // Looks for supplied options that don't - // exist in the options list. - // If the command allows unknown options, - // adds it, otherwise throws help. - var passedOpts = _.chain(parsedArgs).keys().pull('_').pull('help').value(); - - var _loop = function _loop(key) { - var opt = passedOpts[key]; - var optionFound = _.find(cmd.options, function (expected) { - if ('--' + opt === expected.long || '--no-' + opt === expected.long || '-' + opt === expected.short) { - return true; - } - return false; - }); - if (optionFound === undefined) { - if (cmd._allowUnknownOptions) { - args.options[opt] = parsedArgs[opt]; - } else { - return { - v: '\n Invalid option: \'' + opt + '\'. Showing Help:' - }; - } - } - }; - - for (var key in passedOpts) { - var _ret = _loop(key); - - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; - } - - // If args were passed into the programmatic - // `vorpal.exec(cmd, args, callback)`, merge - // them here. - if (execCommand && execCommand.args && _.isObject(execCommand.args)) { - args = _.extend(args, execCommand.args); - } - - // Looks for a help arg and throws help if any. - if (parsedArgs.help || parsedArgs._.indexOf('/?') > -1) { - args.options.help = true; - } - - return args; - }, - - /** - * Makes an argument name pretty for help. - * - * @param {String} arg - * @return {String} - * @api private - */ - - humanReadableArgName: function humanReadableArgName(arg) { - var nameOutput = arg.name + (arg.variadic === true ? '...' : ''); - return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']'; - }, - - /** - * Formats an array to display in a TTY - * in a pretty fashion. - * - * @param {Array} arr - * @return {String} - * @api public - */ - - prettifyArray: function prettifyArray(arr) { - arr = arr || []; - var arrClone = _.clone(arr); - var width = process.stdout.columns; - var longest = strip(arrClone.sort(function (a, b) { - return strip(b).length - strip(a).length; - })[0] || '').length + 2; - var fullWidth = strip(String(arr.join(''))).length; - var fitsOneLine = fullWidth + arr.length * 2 <= width; - var cols = Math.floor(width / longest); - cols = cols < 1 ? 1 : cols; - if (fitsOneLine) { - return arr.join(' '); - } - var col = 0; - var lines = []; - var line = ''; - for (var key in arr) { - var arrEl = arr[key]; - if (col < cols) { - col++; - } else { - lines.push(line); - line = ''; - col = 1; - } - line += this.pad(arrEl, longest, ' '); - } - if (line !== '') { - lines.push(line); - } - return lines.join('\n'); - }, - - /** - * Pads a value with with space or - * a specified delimiter to match a - * given width. - * - * @param {String} str - * @param {Integer} width - * @param {String} delimiter - * @return {String} - * @api private - */ - - pad: function pad(str, width, delimiter) { - width = Math.floor(width); - delimiter = delimiter || ' '; - var len = Math.max(0, width - strip(str).length); - return str + Array(len + 1).join(delimiter); - }, - - /** - * Pad a row on the start and end with spaces. - * - * @param {String} str - * @return {String} - */ - padRow: function padRow(str) { - return str.split('\n').map(function (row) { - return ' ' + row + ' '; - }).join('\n'); - }, - - // When passing down applied args, we need to turn - // them from `{ '0': 'foo', '1': 'bar' }` into ['foo', 'bar'] - // instead. - fixArgsForApply: function fixArgsForApply(obj) { - if (!_.isObject(obj)) { - if (!_.isArray(obj)) { - return [obj]; - } - return obj; - } - var argArray = []; - for (var key in obj) { - var aarg = obj[key]; - argArray.push(aarg); - } - return argArray; - } -}; - -/** - * Expose `util`. - */ - -module.exports = exports = util; \ No newline at end of file diff --git a/dist/vorpal-commons.js b/dist/vorpal-commons.js deleted file mode 100755 index 5046703d..00000000 --- a/dist/vorpal-commons.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -/** - * Function library for Vorpal's out-of-the-box - * API commands. Imported into a Vorpal server - * through vorpal.use(module). - */ - -/** - * Module dependencies. - */ - -var _ = require('lodash'); - -module.exports = function (vorpal) { - /** - * Help for a particular command. - */ - - vorpal.command('help [command...]').description('Provides help for a given command.').action(function (args, cb) { - var self = this; - if (args.command) { - args.command = args.command.join(' '); - var name = _.find(this.parent.commands, { _name: String(args.command).toLowerCase().trim() }); - if (name && !name._hidden) { - if (_.isFunction(name._help)) { - name._help(args.command, function (str) { - self.log(str); - cb(); - }); - return; - } - this.log(name.helpInformation()); - } else { - this.log(this.parent._commandHelp(args.command)); - } - } else { - this.log(this.parent._commandHelp(args.command)); - } - cb(); - }); - - /** - * Exits Vorpal. - */ - - vorpal.command('exit').alias('quit').description('Exits application.').action(function (args) { - args.options = args.options || {}; - args.options.sessionId = this.session.id; - this.parent.exit(args.options); - }); -}; \ No newline at end of file diff --git a/dist/vorpal.js b/dist/vorpal.js deleted file mode 100755 index cb058647..00000000 --- a/dist/vorpal.js +++ /dev/null @@ -1,1326 +0,0 @@ -'use strict'; - -/** - * Polyfill for ES6. - */ - -if (!global._babelPolyfill) { - // When the runtime transformer properly detects all shimmed methods, use instead. - // http://www.2ality.com/2015/12/babel6-helpersstandard-library.html#babel-plugin-transform-runtime - require('babel-polyfill'); -} - -/** - * Module dependencies. - */ - -var _ = require('lodash'); -var EventEmitter = require('events').EventEmitter; -var Command = require('./command'); -var CommandInstance = require('./command-instance'); -var VorpalUtil = require('./util'); -var ui = require('./ui'); -var Session = require('./session'); -var intercept = require('./intercept'); -var minimist = require('minimist'); -var commons = require('./vorpal-commons'); -var chalk = require('chalk'); -var os = require('os'); -var History = require('./history'); -var LocalStorage = require('./local-storage'); -var wrap = require('wrap-ansi'); - -/** - * Initialize a new `Vorpal` instance. - * - * @return {Vorpal} - * @api public - */ - -function Vorpal() { - if (!(this instanceof Vorpal)) { - return new Vorpal(); - } - - // Program version - // Exposed through vorpal.version(str); - this._version = ''; - - // Program title - this._title = ''; - - // Program description - this._description = ''; - - // Program baner - this._banner = ''; - - // Command line history instance - this.cmdHistory = new this.CmdHistoryExtension(); - - // Registered `vorpal.command` commands and - // their options. - this.commands = []; - - // Queue of IP requests, executed async, in sync. - this._queue = []; - - // Current command being executed. - this._command = undefined; - - // Expose UI. - this.ui = ui; - - // Expose chalk as a convenience. - this.chalk = chalk; - - // Expose lodash as a convenience. - this.lodash = _; - - // Exposed through vorpal.delimiter(str). - this._delimiter = 'local@' + String(os.hostname()).split('.')[0] + '~$ '; - ui.setDelimiter(this._delimiter); - - // Placeholder for vantage server. If vantage - // is used, this will be over-written. - this.server = { - sessions: [] - }; - - // Whether all stdout is being hooked through a function. - this._hooked = false; - - this._useDeprecatedAutocompletion = false; - - // Expose common utilities, like padding. - this.util = VorpalUtil; - - this.Session = Session; - - // Active vorpal server session. - this.session = new this.Session({ - local: true, - user: 'local', - parent: this, - delimiter: this._delimiter - }); - - // Allow unix-like key value pair normalization to be turned off by toggling this switch on. - this.isCommandArgKeyPairNormalized = true; - - this._init(); - return this; -} - -/** - * Extend Vorpal prototype as an event emitter. - */ - -Vorpal.prototype = Object.create(EventEmitter.prototype); - -/** - * Vorpal prototype. - */ - -var vorpal = Vorpal.prototype; - -/** - * Expose `Vorpal`. - */ - -exports = module.exports = Vorpal; - -/** - * Extension to `constructor`. - * @api private - */ - -Vorpal.prototype._init = function () { - var self = this; - - ui.on('vorpal_ui_keypress', function (data) { - self.emit('keypress', data); - self._onKeypress(data.key, data.value); - }); - - self.use(commons); -}; - -/** - * Parses `process.argv` and executes - * a Vorpal command based on it. - * @api public - */ - -Vorpal.prototype.parse = function (argv, options) { - options = options || {}; - var args = argv; - var result = this; - var catchExists = !(_.find(this.commands, { _catch: true }) === undefined); - args.shift(); - args.shift(); - if (args.length > 0 || catchExists) { - if (options.use === 'minimist') { - result = minimist(args); - } else { - // Wrap the spaced args back in quotes. - for (var i = 0; i < args.length; ++i) { - if (i === 0) { - continue; - } - if (args[i].indexOf(' ') > -1) { - args[i] = '"' + args[i] + '"'; - } - } - this.exec(args.join(' '), function (err) { - if (err !== undefined && err !== null) { - throw new Error(err); - } - process.exit(0); - }); - } - } - return result; -}; - -/** - * Sets version of your application's API. - * - * @param {String} version - * @return {Vorpal} - * @api public - */ - -vorpal.version = function (version) { - this._version = version; - return this; -}; - -/** - * Sets the title of your application. - * - * @param {String} title - * @return {Vorpal} - * @api public - */ - -vorpal.title = function (title) { - this._title = title; - return this; -}; - -/** - * Sets the description of your application. - * - * @param {String} description - * @return {Vorpal} - * @api public - */ - -vorpal.description = function (description) { - this._description = description; - return this; -}; - -/** - * Sets the banner of your application. - * - * @param {String} banner - * @return {Vorpal} - * @api public - */ - -vorpal.banner = function (banner) { - this._banner = banner; - return this; -}; - -/** - * Sets the permanent delimiter for this - * Vorpal server instance. - * - * @param {String} str - * @return {Vorpal} - * @api public - */ - -vorpal.delimiter = function (str) { - this._delimiter = str; - if (this.session.isLocal() && !this.session.client) { - this.session.delimiter(str); - } - return this; -}; - -/** - * Imports a library of Vorpal API commands - * from another Node module as an extension - * of Vorpal. - * - * @param {Array} commands - * @return {Vorpal} - * @api public - */ - -vorpal.use = function (commands, options) { - if (!commands) { - return this; - } - if (_.isFunction(commands)) { - commands.call(this, this, options); - } else if (_.isString(commands)) { - return this.use(require(commands), options); - } else { - commands = _.isArray(commands) ? commands : [commands]; - for (var i = 0; i < commands.length; ++i) { - var cmd = commands[i]; - if (cmd.command) { - var command = this.command(cmd.command); - if (cmd.description) { - command.description(cmd.description); - } - if (cmd.options) { - cmd.options = _.isArray(cmd.options) ? cmd.options : [cmd.options]; - for (var j = 0; j < cmd.options.length; ++j) { - command.option(cmd.options[j][0], cmd.options[j][1]); - } - } - if (cmd.action) { - command.action(cmd.action); - } - } - } - } - return this; -}; - -/** - * Registers a new command in the vorpal API. - * - * @param {String} name - * @param {String} desc - * @param {Object} opts - * @return {Command} - * @api public - */ - -vorpal.command = function (name, desc, opts) { - opts = opts || {}; - name = String(name); - - var argsRegExp = /(\[[^\]]*\]|\<[^\>]*\>)/g; - var args = []; - var arg; - - while ((arg = argsRegExp.exec(name)) !== null) { - args.push(arg[1]); - } - - var cmdNameRegExp = /^([^\[\<]*)/; - var cmdName = cmdNameRegExp.exec(name)[0].trim(); - - var cmd = new Command(cmdName, this); - - if (desc) { - cmd.description(desc); - this.executables = true; - } - - cmd._noHelp = Boolean(opts.noHelp); - cmd._mode = opts.mode || false; - cmd._catch = opts.catch || false; - cmd._parseExpectedArgs(args); - cmd.parent = this; - - var exists = false; - for (var i = 0; i < this.commands.length; ++i) { - exists = this.commands[i]._name === cmd._name ? true : exists; - if (exists) { - this.commands[i] = cmd; - break; - } - } - if (!exists) { - this.commands.push(cmd); - } else { - console.warn(chalk.yellow('Warning: command named "' + name + '" was registered more than once.\nIf you intend to override a command, you should explicitly remove the first command with command.remove().')); - } - - this.emit('command_registered', { command: cmd, name: name }); - - return cmd; -}; - -/** - * Registers a new 'mode' command in the vorpal API. - * - * @param {String} name - * @param {String} desc - * @param {Object} opts - * @return {Command} - * @api public - */ - -vorpal.mode = function (name, desc, opts) { - return this.command(name, desc, _.extend(opts || {}, { mode: true })); -}; - -/** - * Registers a 'catch' command in the vorpal API. - * This is executed when no command matches are found. - * - * @param {String} name - * @param {String} desc - * @param {Object} opts - * @return {Command} - * @api public - */ - -vorpal.catch = function (name, desc, opts) { - return this.command(name, desc, _.extend(opts || {}, { catch: true })); -}; - -/** - * An alias to the `catch` command. - * - * @param {String} name - * @param {String} desc - * @param {Object} opts - * @return {Command} - * @api public - */ - -vorpal.default = function (name, desc, opts) { - return this.command(name, desc, _.extend(opts || {}, { catch: true })); -}; - -/** - * Delegates to ui.log. - * - * @param {String} log - * @return {Vorpal} - * @api public - */ - -vorpal.log = function () { - this.ui.log.apply(this.ui, arguments); - return this; -}; - -/** - * Intercepts all logging through `vorpal.log` - * and runs it through the function declared by - * `vorpal.pipe()`. - * - * @param {Function} fn - * @return {Vorpal} - * @api public - */ - -vorpal.pipe = function (fn) { - if (this.ui) { - this.ui._pipeFn = fn; - } - return this; -}; - -/** - * If Vorpal is the local terminal, - * hook all stdout, through a fn. - * - * @return {Vorpal} - * @api private - */ - -vorpal.hook = function (fn) { - if (fn !== undefined) { - this._hook(fn); - } else { - this._unhook(); - } - return this; -}; - -/** - * Unhooks stdout capture. - * - * @return {Vorpal} - * @api public - */ - -vorpal._unhook = function () { - if (this._hooked && this._unhook !== undefined) { - this._unhook(); - this._hooked = false; - } - return this; -}; - -/** - * Hooks all stdout through a given function. - * - * @param {Function} fn - * @return {Vorpal} - * @api public - */ - -vorpal._hook = function (fn) { - if (this._hooked && this._unhook !== undefined) { - this._unhook(); - } - this._unhook = intercept(fn); - this._hooked = true; - return this; -}; - -/** - * History module used to get command history - */ -vorpal.CmdHistoryExtension = History; - -/** - * Set id for command line history - * @param id - * @return {Vorpal} - * @api public - */ -vorpal.history = function (id) { - this.cmdHistory.setId(id); - return this; -}; - -/** - * Set id for local storage - * @param id - * @return {Vorpal} - * @api public - */ -vorpal.localStorage = function (id) { - var ls = Object.create(LocalStorage); - ls.setId(id); - _.extend(this.localStorage, ls); - return this; -}; - -/** - * Set the path to where command line history is persisted. - * Must be called before vorpal.history - * @param path - * @return {Vorpal} - * @api public - */ -vorpal.historyStoragePath = function (path) { - this.cmdHistory.setStoragePath(path); - return this; -}; - -/** - * Hook the tty prompt to this given instance - * of vorpal. - * - * @return {Vorpal} - * @api public - */ - -vorpal.show = function () { - ui.attach(this); - return this; -}; - -/** - * Disables the vorpal prompt on the - * local terminal. - * - * @return {Vorpal} - * @api public - */ - -vorpal.hide = function () { - ui.detach(this); - return this; -}; - -/** - * Listener for a UI keypress. Either - * handles the keypress locally or sends - * it upstream. - * - * @param {String} key - * @param {String} value - * @api private - */ - -vorpal._onKeypress = function (key, value) { - var self = this; - if (this.session.isLocal() && !this.session.client && !this._command) { - this.session.getKeypressResult(key, value, function (err, result) { - if (!err && result !== undefined) { - if (_.isArray(result)) { - var formatted = VorpalUtil.prettifyArray(result); - self.ui.imprint(); - self.session.log(formatted); - } else { - self.ui.input(result); - } - } - }); - } else { - this._send('vantage-keypress-upstream', 'upstream', { - key: key, - value: value, - sessionId: this.session.id - }); - } -}; - -/** - * For use in vorpal API commands, sends - * a prompt command downstream to the local - * terminal. Executes a prompt and returns - * the response upstream to the API command. - * - * @param {Object} options - * @param {Function} userCallback - * @return {Vorpal} - * @api public - */ - -vorpal.prompt = function () { - var _this = this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var userCallback = arguments[1]; - - return new Promise(function (resolve) { - // Setup callback to also resolve promise. - var cb = function cb(response) { - // Does not currently handle Inquirer validation errors. - resolve(response); - if (userCallback) { - userCallback(response); - } - }; - - var prompt = void 0; - var ssn = _this.getSessionById(options.sessionId); - - if (!ssn) { - throw new Error('Vorpal.prompt was called without a passed Session ID.'); - } - - var handler = function handler(data) { - var response = data.value; - _this.removeListener('vantage-prompt-upstream', handler); - cb(response); - }; - - if (ssn.isLocal()) { - ui.setDelimiter(options.message || ssn.delimiter()); - prompt = ui.prompt(options, function (result) { - ui.setDelimiter(ssn.delimiter()); - cb(result); - }); - } else { - _this.on('vantage-prompt-upstream', handler); - _this._send('vantage-prompt-downstream', 'downstream', { options: options, value: undefined, sessionId: ssn.id }); - } - return prompt; - }); -}; - -/** - * Renders the CLI prompt or sends the - * request to do so downstream. - * - * @param {Object} data - * @return {Vorpal} - * @api private - */ - -vorpal._prompt = function (data) { - var self = this; - var prompt; - data = data || {}; - if (!data.sessionId) { - data.sessionId = self.session.id; - } - var ssn = self.getSessionById(data.sessionId); - - // If we somehow got to _prompt and aren't the - // local client, send the command downstream. - if (!ssn.isLocal()) { - this._send('vantage-resume-downstream', 'downstream', { sessionId: data.sessionId }); - return self; - } - - if (ui.midPrompt()) { - return self; - } - - prompt = ui.prompt({ - type: 'input', - name: 'command', - message: ssn.fullDelimiter() - }, function (result) { - if (self.ui._cancelled === true) { - self.ui._cancelled = false;return; - } - var str = String(result.command).trim(); - self.emit('client_prompt_submit', str); - if (str === '' || str === 'undefined') { - self._prompt(data);return; - } - self.exec(str, function () { - self._prompt(data); - }); - }); - - return prompt; -}; - -/** - * Executes a vorpal API command and - * returns the response either through a - * callback or Promise in the absence - * of a callback. - * - * A little black magic here - because - * we sometimes have to send commands 10 - * miles upstream through 80 other instances - * of vorpal and we aren't going to send - * the callback / promise with us on that - * trip, we store the command, callback, - * resolve and reject objects (as they apply) - * in a local vorpal._command variable. - * - * When the command eventually comes back - * downstream, we dig up the callbacks and - * finally resolve or reject the promise, etc. - * - * Lastly, to add some more complexity, we throw - * command and callbacks into a queue that will - * be unearthed and sent in due time. - * - * @param {String} cmd - * @param {Function} cb - * @return {Promise or Vorpal} - * @api public - */ - -vorpal.exec = function (cmd, args, cb) { - var self = this; - var ssn = self.session; - - cb = _.isFunction(args) ? args : cb; - args = args || {}; - - if (args.sessionId) { - ssn = self.getSessionById(args.sessionId); - } - - var command = { - command: cmd, - args: args, - callback: cb, - session: ssn - }; - - if (cb !== undefined) { - self._queue.push(command); - self._queueHandler(); - return self; - } - - return new Promise(function (resolve, reject) { - command.resolve = resolve; - command.reject = reject; - self._queue.push(command); - self._queueHandler(); - }); -}; - -/** - * Executes a Vorpal command in sync. - * - * @param {String} cmd - * @param {Object} args - * @return {*} stdout - * @api public - */ - -vorpal.execSync = function (cmd, options) { - var self = this; - var ssn = self.session; - options = options || {}; - if (options.sessionId) { - ssn = self.getSessionById(options.sessionId); - } - - var command = { - command: cmd, - args: options, - session: ssn, - sync: true, - options: options - }; - - return self._execQueueItem(command); -}; - -/** - * Commands issued to Vorpal server - * are executed in sequence. Called once - * when a command is inserted or completes, - * shifts the next command in the queue - * and sends it to `vorpal._execQueueItem`. - * - * @api private - */ - -vorpal._queueHandler = function () { - if (this._queue.length > 0 && this._command === undefined) { - var item = this._queue.shift(); - this._execQueueItem(item); - } -}; - -/** - * Fires off execution of a command - either - * calling upstream or executing locally. - * - * @param {Object} cmd - * @api private - */ - -vorpal._execQueueItem = function (cmd) { - var self = this; - self._command = cmd; - if (cmd.session.isLocal() && !cmd.session.client) { - return this._exec(cmd); - } - self._send('vantage-command-upstream', 'upstream', { - command: cmd.command, - args: cmd.args, - completed: false, - sessionId: cmd.session.id - }); -}; - -/** - * Executes a vorpal API command. - * Warning: Dragons lie beyond this point. - * - * @param {String} item - * @api private - */ - -vorpal._exec = function (item) { - var self = this; - item = item || {}; - item.command = item.command || ''; - var modeCommand = item.command; - item.command = item.session._mode ? item.session._mode : item.command; - - var promptCancelled = false; - if (this.ui._midPrompt) { - promptCancelled = true; - this.ui.cancel(); - } - - if (!item.session) { - throw new Error('Fatal Error: No session was passed into command for execution: ' + item); - } - - if (String(item.command).indexOf('undefine') > -1) { - throw new Error('vorpal._exec was called with an undefined command.'); - } - - // History for our 'up' and 'down' arrows. - item.session.history(item.session._mode ? modeCommand : item.command); - - var commandData = this.util.parseCommand(item.command, this.commands); - item.command = commandData.command; - item.pipes = commandData.pipes; - var match = commandData.match; - var matchArgs = commandData.matchArgs; - - function throwHelp(cmd, msg, alternativeMatch) { - if (msg) { - cmd.session.log(msg); - } - var pickedMatch = alternativeMatch || match; - cmd.session.log(pickedMatch.helpInformation()); - } - - function callback(cmd, err, msg, argus) { - // Resume the prompt if we had to cancel - // an active prompt, due to programmatic - // execution. - if (promptCancelled) { - self._prompt(); - } - if (cmd.sync) { - // If we want the command to be fatal, - // throw a real error. Otherwise, silently - // return the error. - delete self._command; - if (err) { - if (cmd.options && (cmd.options.fatal === true || vorpal._fatal === true)) { - throw new Error(err); - } - return err; - } - return msg; - } else if (cmd.callback) { - if (argus) { - cmd.callback.apply(self, argus); - } else { - cmd.callback.call(self, err, msg); - } - } else if (!err && cmd.resolve) { - cmd.resolve(msg); - } else if (err && cmd.reject) { - cmd.reject(msg); - } - delete self._command; - self._queueHandler(); - } - - if (match) { - item.fn = match._fn; - item._cancel = match._cancel; - item.validate = match._validate; - item.commandObject = match; - var init = match._init || function (arrgs, cb) { - cb(); - }; - var delimiter = match._delimiter || String(item.command).toLowerCase() + ':'; - - item.args = self.util.buildCommandArgs(matchArgs, match, item, self.isCommandArgKeyPairNormalized); - - // If we get a string back, it's a validation error. - // Show help and return. - if (_.isString(item.args) || !_.isObject(item.args)) { - throwHelp(item, item.args); - return callback(item, undefined, item.args); - } - - // Build the piped commands. - var allValid = true; - for (var j = 0; j < item.pipes.length; ++j) { - var commandParts = self.util.matchCommand(item.pipes[j], self.commands); - if (!commandParts.command) { - item.session.log(self._commandHelp(item.pipes[j])); - allValid = false; - break; - } - commandParts.args = self.util.buildCommandArgs(commandParts.args, commandParts.command); - if (_.isString(commandParts.args) || !_.isObject(commandParts.args)) { - throwHelp(item, commandParts.args, commandParts.command); - allValid = false; - break; - } - item.pipes[j] = commandParts; - } - // If invalid piped commands, return. - if (!allValid) { - return callback(item); - } - - // If `--help` or `/?` is passed, do help. - if (item.args.options.help && _.isFunction(match._help)) { - // If the command has a custom help function, run it - // as the actual "command". In this way it can go through - // the whole cycle and expect a callback. - item.fn = match._help; - delete item.validate; - delete item._cancel; - } else if (item.args.options.help) { - // Otherwise, throw the standard help. - throwHelp(item, ''); - return callback(item); - } - - // If this command throws us into a 'mode', - // prepare for it. - if (match._mode === true && !item.session._mode) { - // Assign vorpal to be in a 'mode'. - item.session._mode = item.command; - // Execute the mode's `init` function - // instead of the `action` function. - item.fn = init; - delete item.validate; - - self.cmdHistory.enterMode(); - item.session.modeDelimiter(delimiter); - } else if (item.session._mode) { - if (String(modeCommand).trim() === 'exit') { - self._exitMode({ sessionId: item.session.id }); - return callback(item); - } - // This executes when actually in a 'mode' - // session. We now pass in the raw text of what - // is typed into the first param of `action` - // instead of arguments. - item.args = modeCommand; - } - - if (item.sync === true) { - // If we're running synchronous commands, - // we don't support piping. - var response; - var error; - try { - response = item.fn.call(new CommandInstance({ - downstream: undefined, - commandWrapper: item, - commandObject: item.commandObject, - args: item.args - }), item.args); - } catch (e) { - error = e; - } - return callback(item, error, response); - } - - // Builds commandInstance objects for every - // command and piped command included in the - // execution string. - - // Build the instances for each pipe. - item.pipes = item.pipes.map(function (pipe) { - return new CommandInstance({ - commandWrapper: item, - command: pipe.command._name, - commandObject: pipe.command, - args: pipe.args - }); - }); - - // Reverse through the pipes and assign the - // `downstream` object of each parent to its - // child command. - for (var k = item.pipes.length - 1; k > -1; --k) { - var downstream = item.pipes[k + 1]; - item.pipes[k].downstream = downstream; - } - - item.session.execCommandSet(item, function (wrapper, err, data, argus) { - callback(wrapper, err, data, argus); - }); - } else { - // If no command match, just return. - item.session.log(this._commandHelp(item.command)); - return callback(item, undefined, 'Invalid command.'); - } -}; - -/** - * Exits out of a give 'mode' one is in. - * Reverts history and delimiter back to - * regular vorpal usage. - * - * @api private - */ - -vorpal._exitMode = function (options) { - var ssn = this.getSessionById(options.sessionId); - ssn._mode = false; - this.cmdHistory.exitMode(); - ssn.modeDelimiter(false); - this.emit('mode_exit', this.cmdHistory.peek()); -}; - -/** - * Registers a custom handler for SIGINT. - * Vorpal exits with 0 by default - * on a sigint. - * - * @param {Function} fn - * @return {Vorpal} - * @api public - */ - -vorpal.sigint = function (fn) { - if (_.isFunction(fn)) { - ui.sigint(fn); - } else { - throw new Error('vorpal.sigint must be passed in a valid function.'); - } - return this; -}; - -/** - * Returns the instance of given command. - * - * @param {String} cmd - * @return {Command} - * @api public - */ - -vorpal.find = function (name) { - return _.find(this.commands, { _name: name }); -}; - -/** - * Registers custom help. - * - * @param {Function} fn - * @return {Vorpal} - * @api public - */ - -vorpal.help = function (fn) { - this._help = fn; -}; - -/** - * Returns help string for a given command. - * - * @param {String} command - * @api private - */ - -vorpal._commandHelp = function (command) { - if (!this.commands.length) { - return ''; - } - - if (this._help !== undefined && _.isFunction(this._help)) { - return this._help(command); - } - - var matches = []; - var singleMatches = []; - - command = command ? String(command).trim().toLowerCase() : undefined; - for (var i = 0; i < this.commands.length; ++i) { - var parts = String(this.commands[i]._name).split(' '); - if (parts.length === 1 && parts[0] === command && !this.commands[i]._hidden && !this.commands[i]._catch) { - singleMatches.push(command); - } - var str = ''; - for (var j = 0; j < parts.length; ++j) { - str = String(str + ' ' + parts[j]).trim(); - if (str === command && !this.commands[i]._hidden && !this.commands[i]._catch) { - matches.push(this.commands[i]); - break; - } - } - } - - var invalidString = command && matches.length === 0 && singleMatches.length === 0 ? ['', ' Invalid Command. Showing Help:', ''].join('\n') : ''; - - var commandMatch = matches.length > 0; - var commandMatchLength = commandMatch ? String(command).trim().split(' ').length + 1 : 1; - matches = matches.length === 0 ? this.commands : matches; - - var skipGroups = !(matches.length + 6 > process.stdout.rows); - - var commands = matches.filter(function (cmd) { - return !cmd._noHelp; - }).filter(function (cmd) { - return !cmd._catch; - }).filter(function (cmd) { - return !cmd._hidden; - }).filter(function (cmd) { - if (skipGroups === true) { - return true; - } - return String(cmd._name).trim().split(' ').length <= commandMatchLength; - }).map(function (cmd) { - var args = cmd._args.map(function (arg) { - return VorpalUtil.humanReadableArgName(arg); - }).join(' '); - - return [cmd._name + (cmd._alias ? '|' + cmd._alias : '') + (cmd.options.length ? ' [options]' : '') + ' ' + args, cmd.description() || '']; - }); - - var width = commands.reduce(function (max, commandX) { - return Math.max(max, commandX[0].length); - }, 0); - - var counts = {}; - - var groups = _.uniq(matches.filter(function (cmd) { - return String(cmd._name).trim().split(' ').length > commandMatchLength; - }).map(function (cmd) { - return String(cmd._name).split(' ').slice(0, commandMatchLength).join(' '); - }).map(function (cmd) { - counts[cmd] = counts[cmd] || 0; - counts[cmd]++; - return cmd; - })).map(function (cmd) { - var prefix = ' ' + VorpalUtil.pad(cmd + ' *', width) + ' ' + counts[cmd] + ' sub-command' + (counts[cmd] === 1 ? '' : 's') + '.'; - return prefix; - }); - - groups = skipGroups ? [] : groups; - - var descriptionWidth = process.stdout.columns - (width + 4); - - var commandsString = commands.length < 1 ? '' : '\n Commands:\n\n' + commands.map(function (cmd) { - var prefix = ' ' + VorpalUtil.pad(cmd[0], width) + ' '; - var suffix = wrap(cmd[1], descriptionWidth - 8).split('\n'); - for (var _i = 0; _i < suffix.length; ++_i) { - if (_i !== 0) { - suffix[_i] = VorpalUtil.pad('', width + 6) + suffix[_i]; - } - } - suffix = suffix.join('\n'); - return prefix + suffix; - }).join('\n') + '\n\n'; - - var groupsString = groups.length < 1 ? '' : ' Command Groups:\n\n' + groups.join('\n') + '\n'; - - var results = String(this._helpHeader(!!invalidString) + invalidString + commandsString + '\n' + groupsString).replace(/\n\n\n/g, '\n\n').replace(/\n\n$/, '\n'); - - return results; -}; - -vorpal._helpHeader = function (hideTitle) { - var header = []; - - if (this._banner) { - header.push(VorpalUtil.padRow(this._banner), ''); - } - - // Only show under specific conditions - if (this._title && !hideTitle) { - var title = this._title; - - if (this._version) { - title += ' v' + this._version; - } - - header.push(VorpalUtil.padRow(title)); - - if (this._description) { - var descWidth = process.stdout.columns * 0.75; // Only 75% of the screen - - header.push(VorpalUtil.padRow(wrap(this._description, descWidth))); - } - } - - // Pad the top and bottom - if (header.length) { - header.unshift(''); - header.push(''); - } - - return header.join('\n'); -}; - -/** - * Abstracts the logic for sending and - * receiving sockets upstream and downstream. - * - * To do: Has the start of logic for vorpal sessions, - * which I haven't fully confronted yet. - * - * @param {String} str - * @param {String} direction - * @param {String} data - * @param {Object} options - * @api private - */ - -vorpal._send = function (str, direction, data, options) { - options = options || {}; - data = data || {}; - var ssn = this.getSessionById(data.sessionId); - if (!ssn) { - throw new Error('No Sessions logged for ID ' + data.sessionId + ' in vorpal._send.'); - } - if (direction === 'upstream') { - if (ssn.client) { - ssn.client.emit(str, data); - } - } else if (direction === 'downstream') { - if (ssn.server) { - ssn.server.emit(str, data); - } - } -}; - -/** - * Handles the 'middleman' in a 3+-way vagrant session. - * If a vagrant instance is a 'client' and 'server', it is - * now considered a 'proxy' and its sole purpose is to proxy - * information through, upstream or downstream. - * - * If vorpal is not a proxy, it resolves a promise for further - * code that assumes one is now an end user. If it ends up - * piping the traffic through, it never resolves the promise. - * - * @param {String} str - * @param {String} direction - * @param {String} data - * @param {Object} options - * @api private - */ -vorpal._proxy = function (str, direction, data, options) { - var self = this; - return new Promise(function (resolve) { - var ssn = self.getSessionById(data.sessionId); - if (ssn && !ssn.isLocal() && ssn.client) { - self._send(str, direction, data, options); - } else { - resolve(); - } - }); -}; - -/** - * Returns session by id. - * - * @param {Integer} id - * @return {Session} - * @api public - */ - -vorpal.getSessionById = function (id) { - if (_.isObject(id)) { - throw new Error('vorpal.getSessionById: id ' + JSON.stringify(id) + ' should not be an object.'); - } - var ssn = _.find(this.server.sessions, { id: id }); - ssn = this.session.id === id ? this.session : ssn; - if (!id) { - throw new Error('vorpal.getSessionById was called with no ID passed.'); - } - if (!ssn) { - var sessions = { - local: this.session.id, - server: _.map(this.server.sessions, 'id') - }; - throw new Error('No session found for id ' + id + ' in vorpal.getSessionById. Sessions: ' + JSON.stringify(sessions)); - } - return ssn; -}; - -/** - * Kills a remote vorpal session. If user - * is running on a direct terminal, will kill - * node instance after confirmation. - * - * @param {Object} options - * @param {Function} cb - * @api private - */ - -vorpal.exit = function (options) { - var ssn = this.getSessionById(options.sessionId); - this.emit('vorpal_exit'); - if (ssn.isLocal()) { - process.exit(0); - } else { - ssn.server.emit('vantage-close-downstream', { sessionId: ssn.id }); - } -}; - -Object.defineProperty(vorpal, 'activeCommand', { - get: function get() { - var result = this._command ? this._command.commandInstance : undefined; - return result; - } -}); \ No newline at end of file diff --git a/examples/calculator/calculator.js b/examples/calculator/calculator.js index ad43c286..9a518ac5 100755 --- a/examples/calculator/calculator.js +++ b/examples/calculator/calculator.js @@ -1,6 +1,6 @@ 'use strict'; -var vorpal = require('./../../')(); +var vorpal = require('../../dist/vorpal')(); var less = require('vorpal-less'); var repl = require('vorpal-repl'); vorpal.use(less).use(repl); @@ -9,6 +9,7 @@ vorpal.command('add [numbers...]', 'Adds numbers together') .alias('addition') .alias('plus') .action(function (args, cb) { + console.log(args); var numbers = args.numbers; var sum = 0; for (var i = 0; i < numbers.length; ++i) { diff --git a/examples/descriptors/descriptors.js b/examples/descriptors/descriptors.js index 8ce486e5..57712b57 100644 --- a/examples/descriptors/descriptors.js +++ b/examples/descriptors/descriptors.js @@ -1,6 +1,6 @@ 'use strict'; -var vorpal = require('./../../')(); +var vorpal = require('../../dist/vorpal')(); var chalk = vorpal.chalk; vorpal diff --git a/examples/mode/README.md b/examples/mode/README.md index c9854753..f8f2715d 100755 --- a/examples/mode/README.md +++ b/examples/mode/README.md @@ -1,13 +1,12 @@ -# Vantage Server with a `mode` command. - -This is an example of setting up a `mode` command to establish a basic REPL client. - -### Running the file - -```bash -$ git clone git://github.com/dthree/vantage.git vantage -$ cd ./vantage -$ npm install -$ node ./examples/mode/mode.js -``` - +# Vantage Server with a `mode` command. + +This is an example of setting up a `mode` command to establish a basic REPL client. + +### Running the file + +```bash +$ git clone git://github.com/dthree/vantage.git vantage +$ cd ./vantage +$ npm install +$ node ./examples/mode/mode.js +``` diff --git a/examples/mode/mode.js b/examples/mode/mode.js index 8e623369..cabe55c9 100755 --- a/examples/mode/mode.js +++ b/examples/mode/mode.js @@ -30,7 +30,7 @@ var server; server = new Vorpal() .banner(banner) .delimiter(delimiter) - .listen(port) + // .listen(port) .show(); /** @@ -68,7 +68,7 @@ server try { var res = eval(command); var log = (_.isString(res)) ? String(res).white : res; - console.log(log); + // console.log(log); cb(res); } catch (e) { console.log(e); diff --git a/examples/prompt/prompt.js b/examples/prompt/prompt.js index 1a4bdfac..2eb69450 100755 --- a/examples/prompt/prompt.js +++ b/examples/prompt/prompt.js @@ -1,6 +1,6 @@ 'use strict'; -var vorpal = require('./../../')(); +var vorpal = require('../../dist/vorpal')(); vorpal.command('login', 'Login (u: root p: vorpal)') .action(function (args, cb) { diff --git a/flow-typed/minimist.js b/flow-typed/minimist.js new file mode 100644 index 00000000..062fc4a4 --- /dev/null +++ b/flow-typed/minimist.js @@ -0,0 +1,19 @@ +declare module 'minimist' { + declare export type CLIParserOptions = { + alias?: { [arg: string]: string | string[] }, + boolean?: boolean | string | string[], + default?: { [arg: string]: string | boolean | number | null }, + stopEarly?: boolean, + string?: string | string[], + unknown?: (arg: string) => boolean, + '--'?: boolean, + }; + + declare export type CLIArgs = { + _: string | string[], + '--'?: string | string[], + [key: string]: string | boolean | number, + } + + declare export default function minimist(args: string[], opts?: CLIParserOptions): CLIArgs; +} diff --git a/flow-typed/node-localstorage.js b/flow-typed/node-localstorage.js new file mode 100644 index 00000000..c7a328d8 --- /dev/null +++ b/flow-typed/node-localstorage.js @@ -0,0 +1,14 @@ +declare module 'node-localstorage' { + declare export class LocalStorage { + constructor(path: string, quota?: number): void; + clear(): void; + getItem(key: string): ?string; + key(index: number): ?string; + setItem(key: string, value: string): void; + removeItem(key: string): void; + } + + declare export class JSONStorage extends LocalStorage { + setItem(key: string, value: *): void; + } +} diff --git a/flow-typed/strip-ansi.js b/flow-typed/strip-ansi.js new file mode 100644 index 00000000..51ef1209 --- /dev/null +++ b/flow-typed/strip-ansi.js @@ -0,0 +1,3 @@ +declare module 'strip-ansi' { + declare export default function stripAnsi(input: string): string; +} diff --git a/gulpfile.babel.js b/gulpfile.babel.js deleted file mode 100755 index 74df79e3..00000000 --- a/gulpfile.babel.js +++ /dev/null @@ -1,23 +0,0 @@ -const gulp = require('gulp'); -const _gulp = require('load-plugins')('gulp-*'); - -const paths = {}; -paths.src = './lib/**/*.js'; -paths.dist = './dist'; - -gulp.task('lint', () => { - return gulp.src(paths.src) - .pipe(_gulp.xo()); -}); - -gulp.task('build', () => { - return gulp.src(paths.src) - .pipe(_gulp.babel()) - .pipe(gulp.dest(paths.dist)); -}); - -gulp.task('watch', ['build'], () => { - gulp.watch(paths.src, ['build']); -}); - -gulp.task('default', ['watch']); diff --git a/lib/command-instance.js b/lib/command-instance.js index 03d9cb85..656e9984 100755 --- a/lib/command-instance.js +++ b/lib/command-instance.js @@ -1,37 +1,21 @@ -'use strict'; - -/** - * Module dependencies. - */ - -const util = require('./util'); -const _ = require('lodash'); class CommandInstance { + constructor(options = {}) { + const { command, commandObject, args, commandWrapper, callback, downstream } = options; - /** - * Initialize a new `CommandInstance` instance. - * - * @param {Object} params - * @return {CommandInstance} - * @api public - */ - - constructor({command, commandObject, args, commandWrapper, callback, downstream} = {}) { + this.args = args; + this.callback = callback; this.command = command; this.commandObject = commandObject; - this.args = args; this.commandWrapper = commandWrapper; - this.session = commandWrapper.session; - this.parent = this.session.parent; - this.callback = callback; this.downstream = downstream; + this.parent = commandWrapper.session.parent; + this.session = commandWrapper.session; } /** * Cancel running command. */ - cancel() { this.session.emit('vorpal_command_cancel'); } @@ -39,56 +23,67 @@ class CommandInstance { /** * Route stdout either through a piped command, or the session's stdout. */ + log(...args) { + if (!this.downstream) { + this.session.log(...args); - log() { - const args = util.fixArgsForApply(arguments); - if (this.downstream) { - const fn = this.downstream.commandObject._fn || function () {}; - this.session.registerCommand(); - this.downstream.args.stdin = args; - const onComplete = (err) => { - if (this.session.isLocal() && err) { - this.session.log(err.stack || err); - this.session.parent.emit('client_command_error', {command: this.downstream.command, error: err}); - } - this.session.completeCommand(); - }; - - const validate = this.downstream.commandObject._validate; - if (_.isFunction(validate)) { - try { - validate.call(this.downstream, this.downstream.args); - } catch (e) { - // Log error without piping to downstream on validation error. - this.session.log(e.toString()); - onComplete(); - return; - } + return; + } + + this.session.registerCommand(); + this.downstream.args.stdin = args; + + const onComplete = (error) => { + if (this.session.isLocal() && error) { + this.session.log(error.stack || error); + this.session.parent.emit('client_command_error', { + command: this.downstream.command, + error, + }); } - const res = fn.call(this.downstream, this.downstream.args, onComplete); - if (res && _.isFunction(res.then)) { - res.then(onComplete, onComplete); + this.session.completeCommand(); + }; + + const validate = this.downstream.commandObject._validate; + + if (typeof validate === 'function') { + try { + validate.call(this.downstream, this.downstream.args); + } catch (error) { + // Log error without piping to downstream on validation error. + this.session.log(error.toString()); + onComplete(); + + return; + } + } + + const callback = this.downstream.commandObject._fn; + + if (callback) { + const response = callback.call(this.downstream, this.downstream.args, onComplete); + + if (response instanceof Promise) { + response.then(onComplete, onComplete); } - } else { - this.session.log.apply(this.session, args); } } - prompt(a, b, c) { - return this.session.prompt(a, b, c); + prompt(...args) { + return this.session.prompt(...args); } - delimiter(a, b, c) { - return this.session.delimiter(a, b, c); + delimiter(...args) { + return this.session.delimiter(...args); } - help(a, b, c) { - return this.session.help(a, b, c); + help(...args) { + return this.session.help(...args); } - match(a, b, c) { - return this.session.match(a, b, c); + match(...args) { + return this.session.match(...args); } } diff --git a/lib/command.js b/lib/command.js index caabd93b..f220b39f 100755 --- a/lib/command.js +++ b/lib/command.js @@ -1,598 +1,442 @@ -'use strict'; +const { EventEmitter } = require('events'); +const Option = require('./option'); +import camelCase from './utils/camelCase'; +import humanReadableArgName from './utils/humanReadableArgName'; +import pad from './utils/pad'; + +const VARIADIC_LENGTH = 3; + +export default class Command extends EventEmitter { + constructor(name, parent) { + super(); + + this.commands = []; + this.options = []; + this._after = undefined; + this._aliases = []; + this._allowUnknownOptions = false; + this._args = []; + this._catch = false; + this._help = undefined; + this._hidden = false; + this._init = undefined; + this._mode = false; + this._name = name; + this._parent = parent; + this._relay = false; + this._types = {}; + } + + /** + * Registers an option for given command. + */ + option(flags, description, options = {}) { + const option = new Option(flags, description, options); + const name = camelCase(option.name()); + let defaultValue; + + // preassign default value only for --no-*, [optional], or + if (option.bool === false || option.optional || option.required) { + // when --no-* we make sure default is true + if (option.bool === false) { + defaultValue = true; + } -/** - * Module dependencies. - */ + // preassign only if we have a default + if (typeof defaultValue !== 'undefined') { + this[name] = defaultValue; + } + } -var EventEmitter = require('events').EventEmitter; -var Option = require('./option'); -var VorpalUtil = require('./util'); -var _ = require('lodash'); + // register the option + this.options.push(option); + + // when it's passed, assign the value and conditionally invoke the callback + this.on(option.name(), (value) => { + if (typeof this[name] === 'boolean' || typeof this[name] === 'undefined') { + // if no value, bool true, and we have a default, then use it! + if (value === null) { + this[name] = option.bool ? (defaultValue || true) : false; + } else { + this[name] = value; + } + } else if (value !== null) { + this[name] = value; + } + }); -/** - * Command prototype. - */ + return this; + } -var command = Command.prototype; + /** + * Let's you compose other funtions to extend the command. + */ + use(fn) { + return fn(this); + } -/** - * Expose `Command`. - */ + /** + * Defines an action for a given command. + */ + action(fn) { + this._fn = fn; -module.exports = exports = Command; + return this; + } -/** - * Initialize a new `Command` instance. - * - * @param {String} name - * @param {Vorpal} parent - * @return {Command} - * @api public - */ + /** + * Defines a function to validate arguments + * before action is performed. Arguments + * are valid if no errors are thrown from + * the function. + */ + validate(fn) { + this._validate = fn; -function Command(name, parent) { - if (!(this instanceof Command)) { - return new Command(); + return this; } - this.commands = []; - this.options = []; - this._args = []; - this._aliases = []; - this._name = name; - this._relay = false; - this._hidden = false; - this._parent = parent; - this._mode = false; - this._catch = false; - this._help = undefined; - this._init = undefined; - this._after = undefined; - this._allowUnknownOptions = false; -} -/** - * Registers an option for given command. - * - * @param {String} flags - * @param {String} description - * @param {Function} fn - * @param {String} defaultValue - * @return {Command} - * @api public - */ - -command.option = function (flags, description, autocomplete) { - var self = this; - var option = new Option(flags, description, autocomplete); - var oname = option.name(); - var name = _camelcase(oname); - var defaultValue; - - // preassign default value only for --no-*, [optional], or - if (option.bool === false || option.optional || option.required) { - // when --no-* we make sure default is true - if (option.bool === false) { - defaultValue = true; - } - // preassign only if we have a default - if (defaultValue !== undefined) { - self[name] = defaultValue; + /** + * Defines a function to be called when the + * command is canceled. + */ + cancel(fn) { + this._cancel = fn; + + return this; + } + + /** + * Defines a method to be called when + * the command set has completed. + */ + done(fn) { + this._done = fn; + + return this; + } + + /** + * Defines tabbed auto-completion + * for the given command. Favored over + * deprecated command.autocompletion. + */ + autocomplete(obj) { + this._autocomplete = obj; + + return this; + } + + /** + * Defines tabbed auto-completion rules + * for the given command. + */ + autocompletion(param) { + this._parent._useDeprecatedAutocompletion = true; + + if (typeof param !== 'function') { + throw new Error('An invalid object type was passed into the first parameter of Command#autocompletion: function expected.'); } + + this._autocompletion = param; + + return this; } - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function (val) { - // unassigned or bool - if (typeof self[name] === 'boolean' || typeof self[name] === 'undefined') { - // if no value, bool true, and we have a default, then use it! - if (val === null) { - self[name] = option.bool ? - defaultValue || true : - false; - } else { - self[name] = val; - } - } else if (val !== null) { - // reassign - self[name] = val; + /** + * Defines an init action for a mode command. + */ + init(fn) { + if (this._mode !== true) { + throw Error('Cannot call init from a non-mode action.'); } - }); - - return this; -}; - -/** - * Defines an action for a given command. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.action = function (fn) { - var self = this; - self._fn = fn; - return this; -}; - -/** - * Let's you compose other funtions to extend the command. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.use = function (fn) { - return fn(this); -}; - -/** - * Defines a function to validate arguments - * before action is performed. Arguments - * are valid if no errors are thrown from - * the function. - * - * @param fn - * @returns {Command} - * @api public - */ -command.validate = function (fn) { - var self = this; - self._validate = fn; - return this; -}; - -/** - * Defines a function to be called when the - * command is canceled. - * - * @param fn - * @returns {Command} - * @api public - */ -command.cancel = function (fn) { - this._cancel = fn; - return this; -}; - -/** - * Defines a method to be called when - * the command set has completed. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.done = function (fn) { - this._done = fn; - return this; -}; - -/** - * Defines tabbed auto-completion - * for the given command. Favored over - * deprecated command.autocompletion. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.autocomplete = function (obj) { - this._autocomplete = obj; - return this; -}; - -/** - * Defines tabbed auto-completion rules - * for the given command. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.autocompletion = function (param) { - this._parent._useDeprecatedAutocompletion = true; - if (!_.isFunction(param) && !_.isObject(param)) { - throw new Error('An invalid object type was passed into the first parameter of command.autocompletion: function expected.'); + + this._init = fn; + + return this; } - this._autocompletion = param; - return this; -}; - -/** - * Defines an init action for a mode command. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.init = function (fn) { - var self = this; - if (self._mode !== true) { - throw Error('Cannot call init from a non-mode action.'); + /** + * Defines a prompt delimiter for a + * mode once entered. + */ + delimiter(delimiter) { + this._delimiter = delimiter; + + return this; } - self._init = fn; - return this; -}; - -/** - * Defines a prompt delimiter for a - * mode once entered. - * - * @param {String} delimiter - * @return {Command} - * @api public - */ - -command.delimiter = function (delimiter) { - this._delimiter = delimiter; - return this; -}; - -/** - * Sets args for static typing of options - * using minimist. - * - * @param {Object} types - * @return {Command} - * @api public - */ - -command.types = function (types) { - var supported = ['string', 'boolean']; - for (var item in types) { - if (supported.indexOf(item) === -1) { - throw new Error('An invalid type was passed into command.types(): ' + item); - } - types[item] = (!_.isArray(types[item])) ? [types[item]] : types[item]; + + /** + * Sets args for static typing of options + * using minimist. + */ + types(types) { + const supported = ['string', 'boolean']; + + Object.keys(types).forEach((item) => { + if (!supported.includes(item)) { + throw new Error(`An invalid type was passed into Command#types(): ${item}`); + } + + this._types[item] = Array.isArray(types[item]) ? types[item] : [types[item]]; + }); + + return this; } - this._types = types; - return this; -}; - -/** - * Defines an alias for a given command. - * - * @param {String} alias - * @return {Command} - * @api public - */ - -command.alias = function () { - var self = this; - for (var i = 0; i < arguments.length; ++i) { - var alias = arguments[i]; - if (_.isArray(alias)) { - for (var j = 0; j < alias.length; ++j) { - this.alias(alias[j]); + + /** + * Defines an alias for a given command. + */ + alias(...aliases) { + aliases.forEach((alias) => { + if (Array.isArray(alias)) { + this.alias(...alias); + + return; } - return this; - } - this._parent.commands.forEach(function (cmd) { - if (!_.isEmpty(cmd._aliases)) { - if (_.includes(cmd._aliases, alias)) { - var msg = 'Duplicate alias "' + alias + '" for command "' + self._name + '" detected. Was first reserved by command "' + cmd._name + '".'; - throw new Error(msg); + + this._parent.commands.forEach((command) => { + if (command._aliases.includes(alias)) { + throw new Error( + `Duplicate alias "${alias}" for command "${this._name}" detected. ` + + `Was first reserved by command "${command._name}".` + ); } - } + }); + + this._aliases.push(alias); }); - this._aliases.push(alias); + + return this; } - return this; -}; - -/** - * Defines description for given command. - * - * @param {String} str - * @return {Command} - * @api public - */ - -command.description = function (str) { - if (arguments.length === 0) { - return this._description; + + /** + * Defines description for given command. + */ + description(desc) { + if (!desc) { + return this._description; + } + + this._description = desc; + + return this; + } + + /** + * Removes self from Vorpal instance. + */ + remove() { + this._parent.commands = this._parent.commands.filter(command => ( + command._name !== this._name + )); + + return this; } - this._description = str; - return this; -}; - -/** - * Removes self from Vorpal instance. - * - * @return {Command} - * @api public - */ - -command.remove = function () { - var self = this; - this._parent.commands = _.reject(this._parent.commands, function (command) { - if (command._name === self._name) { - return true; + + /** + * Returns the commands arguments as string. + */ + arguments(desc) { + return this._parseExpectedArgs(desc.split(/ +/)); + } + + /** + * Returns the help info for given command. + */ + helpInformation() { + let desc = []; + let alias = ''; + + if (this._description) { + desc = [ + ` ${this._description}`, + '', + ]; } - }); - return this; -}; - -/** - * Returns the commands arguments as string. - * - * @param {String} desc - * @return {String} - * @api public - */ - -command.arguments = function (desc) { - return this._parseExpectedArgs(desc.split(/ +/)); -}; - -/** - * Returns the help info for given command. - * - * @return {String} - * @api public - */ - -command.helpInformation = function () { - var desc = []; - var cmdName = this._name; - var alias = ''; - - if (this._description) { - desc = [ - ' ' + this._description, - '' + + if (this._aliases.length) { + alias = ` Alias: ${this._aliases.join(' | ')}\n`; + } + + const usage = [ + '', + ` Usage: ${this._name} ${this.usage()}`, + '', ]; + + // TODO + const cmds = []; + + const help = String(this.optionHelp().replace(/^/gm, ' ')); + const options = [ + ' Options:', + '', + help, + '', + ]; + + return usage + .concat(cmds) + .concat(alias) + .concat(desc) + .concat(options) + .join('\n') + .replace(/\n\n\n/g, '\n\n'); } - if (this._aliases.length > 0) { - alias = ' Alias: ' + this._aliases.join(' | ') + '\n'; + /** + * Doesn't show command in the help menu. + */ + hidden() { + this._hidden = true; + + return this; } - var usage = [ - '', - ' Usage: ' + cmdName + ' ' + this.usage(), - '' - ]; - - var cmds = []; - - var help = String(this.optionHelp().replace(/^/gm, ' ')); - var options = [ - ' Options:', - '', - help, - '' - ]; - - var res = usage - .concat(cmds) - .concat(alias) - .concat(desc) - .concat(options) - .join('\n'); - - res = res.replace(/\n\n\n/g, '\n\n'); - - return res; -}; - -/** - * Doesn't show command in the help menu. - * - * @return {Command} - * @api public - */ - -command.hidden = function () { - this._hidden = true; - return this; -}; - -/** - * Allows undeclared options to be passed in with the command. - * - * @param {Boolean} [allowUnknownOptions=true] - * @return {Command} - * @api public - */ - -command.allowUnknownOptions = function (allowUnknownOptions = true) { - allowUnknownOptions = allowUnknownOptions === "false" ? false : allowUnknownOptions; - - this._allowUnknownOptions = !!allowUnknownOptions; - return this; -}; - -/** - * Returns the command usage string for help. - * - * @param {String} str - * @return {String} - * @api public - */ - -command.usage = function (str) { - var args = this._args.map(function (arg) { - return VorpalUtil.humanReadableArgName(arg); - }); - - var usage = '[options]' + - (this.commands.length ? ' [command]' : '') + - (this._args.length ? ' ' + args.join(' ') : ''); - - if (arguments.length === 0) { - return (this._usage || usage); + + /** + * Allows undeclared options to be passed in with the command. + */ + allowUnknownOptions(allow = true) { + this._allowUnknownOptions = allow; + + return this; } - this._usage = str; - - return this; -}; - -/** - * Returns the help string for the command's options. - * - * @return {String} - * @api public - */ - -command.optionHelp = function () { - var width = this._largestOptionLength(); - - // Prepend the help information - return [VorpalUtil.pad('--help', width) + ' output usage information'] - .concat(this.options.map(function (option) { - return VorpalUtil.pad(option.flags, width) + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Returns the length of the longest option. - * - * @return {Integer} - * @api private - */ - -command._largestOptionLength = function () { - return this.options.reduce(function (max, option) { - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Adds a custom handling for the --help flag. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.help = function (fn) { - if (_.isFunction(fn)) { - this._help = fn; + /** + * Returns the command usage string for help. + */ + usage(usage) { + if (!usage) { + const args = this._args.map(arg => humanReadableArgName(arg)); + + return this._usage || [ + '[options]', + this.commands.length ? '[command]' : '', + this._args.length ? args.join(' ') : '', + ].join(' '); + } + + this._usage = usage; + + return this; } - return this; -}; - -/** - * Edits the raw command string before it - * is executed. - * - * @param {String} str - * @return {String} str - * @api public - */ - -command.parse = function (fn) { - if (_.isFunction(fn)) { - this._parse = fn; + + /** + * Returns the help string for the command's options. + */ + optionHelp() { + const width = this._largestOptionLength(); + + // Prepend the help information + return [`${pad('--help', width)} output usage information`] + .concat(this.options.map(option => ( + `${pad(option.flags, width)} ${option.description}` + ))) + .join('\n'); } - return this; -}; - -/** - * Adds a command to be executed after command completion. - * - * @param {Function} fn - * @return {Command} - * @api public - */ - -command.after = function (fn) { - if (_.isFunction(fn)) { - this._after = fn; + + /** + * Returns the length of the longest option. + */ + _largestOptionLength() { + return this.options.reduce((max, option) => Math.max(max, option.flags.length), 0); } - return this; -}; - -/** - * Parses and returns expected command arguments. - * - * @param {String} args - * @return {Array} - * @api private - */ - -command._parseExpectedArgs = function (args) { - if (!args.length) { - return; + + /** + * Adds a custom handling for the --help flag. + */ + help(fn) { + if (typeof fn === 'function') { + this._help = fn; + } else { + throw new Error('A function is required for Command#help.'); + } + + return this; } - var self = this; - args.forEach(function (arg) { - var argDetails = { - required: false, - name: '', - variadic: false - }; - - switch (arg[0]) { - case '<': - argDetails.required = true; - argDetails.name = arg.slice(1, -1); - break; - case '[': - argDetails.name = arg.slice(1, -1); - break; - default: - break; + + /** + * Edits the raw command string before it is executed. + */ + parse(fn) { + if (typeof fn === 'function') { + this._parse = fn; + } else { + throw new Error('A function is required for Command#parse.'); } - if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') { - argDetails.variadic = true; - argDetails.name = argDetails.name.slice(0, -3); + return this; + } + + /** + * Adds a command to be executed after command completion. + */ + after(fn) { + if (typeof fn === 'function') { + this._after = fn; + } else { + throw new Error('A function is required for Command#after.'); } - if (argDetails.name) { - self._args.push(argDetails); + + return this; + } + + /** + * Parses and returns expected command arguments. + */ + _parseExpectedArgs(args) { + if (!args || !args.length) { + return; } - }); - - // If the user entered args in a weird order, - // properly sequence them. - if (self._args.length > 1) { - self._args = self._args.sort(function (argu1, argu2) { - if (argu1.required && !argu2.required) { - return -1; - } else if (argu2.required && !argu1.required) { - return 1; - } else if (argu1.variadic && !argu2.variadic) { - return 1; - } else if (argu2.variadic && !argu1.variadic) { - return -1; + + args.forEach((arg) => { + const argDetails = { + name: '', + required: false, + variadic: false, + }; + + switch (arg[0]) { + case '<': + argDetails.required = true; + argDetails.name = arg.slice(1, -1); + break; + case '[': + argDetails.name = arg.slice(1, -1); + break; + default: + break; } - return 0; - }); - } - return; -}; - -/** - * Converts string to camel case. - * - * @param {String} flag - * @return {String} - * @api private - */ - -function _camelcase(flag) { - return flag.split('-').reduce(function (str, word) { - return str + word[0].toUpperCase() + word.slice(1); - }); -} + if ( + argDetails.name.length > VARIADIC_LENGTH && + argDetails.name.slice(-VARIADIC_LENGTH) === '...' + ) { + argDetails.variadic = true; + argDetails.name = argDetails.name.slice(0, -VARIADIC_LENGTH); + } -/** - * Make command an EventEmitter. - */ + if (argDetails.name) { + this._args.push(argDetails); + } + }); -command.__proto__ = EventEmitter.prototype; + // If the user entered args in a weird order, properly sequence them + if (this._args.length > 1) { + this._args = this._args.sort((argu1, argu2) => { + if (argu1.required && !argu2.required) { + return -1; + } else if (argu2.required && !argu1.required) { + return 1; + } else if (argu1.variadic && !argu2.variadic) { + return 1; + } else if (argu2.variadic && !argu1.variadic) { + return -1; + } + + return 0; + }); + } + } +} diff --git a/lib/constants.js b/lib/constants.js new file mode 100644 index 00000000..8d998803 --- /dev/null +++ b/lib/constants.js @@ -0,0 +1,4 @@ +// @flow + +export const PADDING: string = ' '; +export const PADDING_SIZE: number = PADDING.length; diff --git a/lib/history.js b/lib/history.js index 0cdb2409..3fac0377 100755 --- a/lib/history.js +++ b/lib/history.js @@ -1,190 +1,180 @@ -'use strict'; +// @flow -var _ = require('lodash'); -var LocalStorage = require('node-localstorage').LocalStorage; -var path = require('path'); -const os = require('os'); +import os from 'os'; +import path from 'path'; +import { JSONStorage } from 'node-localstorage'; + +import type { InputCommand } from './types'; // Number of command histories kept in persistent storage -var HISTORY_SIZE = 500; - -const temp = path.normalize(path.join(os.tmpdir(), '/.local_storage')); -const DEFAULT_STORAGE_PATH = temp; - -var History = function () { - this._storageKey = undefined; - - // Prompt Command History - // Histctr moves based on number of times 'up' (+= ctr) - // or 'down' (-= ctr) was pressed in traversing - // command history. - this._hist = []; - this._histCtr = 0; - - // When in a 'mode', we reset the - // history and store it in a cache until - // exiting the 'mode', at which point we - // resume the original history. - this._histCache = []; - this._histCtrCache = 0; -}; - -/** - * Initialize the history with local storage data - * Called from setId when history id is set - */ - -History.prototype._init = function () { - if (!this._storageKey) { - return; +const HISTORY_SIZE: number = 500; +const DEFAULT_STORAGE_PATH: string = path.normalize(path.join(os.tmpdir(), '.local_storage')); + +export default class History { + _counter: number; + _counterCache: number; + _history: InputCommand[]; + _historyCache: InputCommand[]; + _inMode: boolean; + _localStorage: JSONStorage; + _storageKey: string; + + constructor() { + this._inMode = false; + this._storageKey = ''; + + // Counter moves based on number of times 'up' or 'down' + // was pressed in traversing command history. + this._history = []; + this._counter = 0; + + // When in a 'mode', we reset the history and store it in a cache until + // exiting the 'mode', at which point we resume the original history. + this._historyCache = []; + this._counterCache = 0; } - // Load history from local storage - var persistedHistory = JSON.parse(this._localStorage.getItem(this._storageKey)); - if (_.isArray(persistedHistory)) { - Array.prototype.push.apply(this._hist, persistedHistory); + /** + * Set a unique ID for this history instance. + */ + setKey(key: string): this { + // Initialize an instance with the default path if it is not initialized + if (!this._localStorage) { + this._localStorage = new JSONStorage(DEFAULT_STORAGE_PATH); + } + + this._storageKey = `command_history_${key}`; + + // Pull in history from local storage + let persistedHistory = []; + + try { + persistedHistory = this._localStorage.getItem(this._storageKey); + } catch (error) { + // Nothing to do if the history cannot be parsed, + // so just load an empty one, which is better than crashing. + } + + if (Array.isArray(persistedHistory)) { + this._history.push(...persistedHistory); + } + + return this; } -}; - -/** - * Set id for this history instance. - * Calls init internally to initialize - * the history with the id. - */ - -History.prototype.setId = function (id) { - // Initialize a localStorage instance with default - // path if it is not initialized - if (!this._localStorage) { - this._localStorage = new LocalStorage(DEFAULT_STORAGE_PATH); + + /** + * Initialize a local storage instance with the path if not already initialized. + */ + setStoragePath(newPath: string): this { + if (!this._localStorage) { + this._localStorage = new JSONStorage(newPath); + } + + return this; } - this._storageKey = 'cmd_history_' + id; - this._init(); -}; - -/** - * Initialize a local storage instance with - * the path if not already initialized. - * - * @param path - */ - -History.prototype.setStoragePath = function (path) { - if (!this._localStorage) { - this._localStorage = new LocalStorage(path); + + /** + * Get previous history. Called when up is pressed. + */ + getPreviousHistory(): InputCommand { + this._counter += 1; + this._counter = (this._counter > this._history.length) + ? this._history.length + : this._counter; + + return this._history[this._history.length - this._counter]; } -}; - -/** - * Get previous history. Called when up is pressed. - * - * @return {String} - */ - -History.prototype.getPreviousHistory = function () { - this._histCtr++; - this._histCtr = (this._histCtr > this._hist.length) ? - this._hist.length : - this._histCtr; - return this._hist[this._hist.length - (this._histCtr)]; -}; - -/** - * Get next history. Called when down is pressed. - * - * @return {String} - */ - -History.prototype.getNextHistory = function () { - this._histCtr--; - - // Return empty prompt if the we dont have any history to show - if (this._histCtr < 1) { - this._histCtr = 0; - return ''; + + /** + * Get next history. Called when down is pressed. + */ + getNextHistory(): InputCommand { + this._counter -= 1; + + // Return empty prompt if the we dont have any history to show + if (this._counter < 1) { + this._counter = 0; + + return ''; + } + + return this._history[this._history.length - this._counter]; } - return this._hist[this._hist.length - this._histCtr]; -}; - -/** - * Peek into history, without changing state - * - * @return {String} - */ - -History.prototype.peek = function (depth) { - depth = depth || 0; - return this._hist[this._hist.length - 1 - depth]; -}; - -/** - * A new command was submitted. Called when enter is pressed and the prompt is not empty. - * - * @param cmd - */ - -History.prototype.newCommand = function (cmd) { - // Always reset history when new command is executed. - this._histCtr = 0; - - // Don't store command in history if it's a duplicate. - if (this._hist[this._hist.length - 1] === cmd) { - return; + /** + * Peek into history, without changing state. + */ + peek(depth: number = 0): InputCommand { + return this._history[this._history.length - 1 - depth]; } - // Push into history. - this._hist.push(cmd); + /** + * A new command was submitted. Called when enter is pressed and the prompt is not empty. + */ + newCommand(input: InputCommand): this { + // Always reset history when new command is executed + this._counter = 0; - // Only persist history when not in mode - if (this._storageKey && !this._inMode) { - var persistedHistory = this._hist; - var historyLen = this._hist.length; - if (historyLen > HISTORY_SIZE) { - persistedHistory = this._hist.slice(historyLen - HISTORY_SIZE - 1, historyLen - 1); + // Don't store command in history if it's a duplicate + if (this._history[this._history.length - 1] === input) { + return this; } - // Add to local storage - this._localStorage.setItem(this._storageKey, JSON.stringify(persistedHistory)); + // Push into history + this._history.push(input); + + // Only persist history when not in mode + if (this._storageKey && !this._inMode) { + const { length } = this._history; + let persistedHistory = this._history; + + if (length > HISTORY_SIZE) { + persistedHistory = this._history.slice(length - HISTORY_SIZE - 1, length - 1); + } + + // Add to local storage + this._localStorage.setItem(this._storageKey, persistedHistory); + } + + return this; + } + + /** + * Called when entering a mode. + */ + enterMode(): this { + // Reassign the command history to a cache, + // replacing it with a blank history for the mode. + this._historyCache = [...this._history]; + this._counterCache = this._counter; + this._history = []; + this._counter = 0; + this._inMode = true; + + return this; } -}; - -/** - * Called when entering a mode - */ - -History.prototype.enterMode = function () { - // Reassign the command history to a - // cache, replacing it with a blank - // history for the mode. - this._histCache = _.clone(this._hist); - this._histCtrCache = parseFloat(this._histCtr); - this._hist = []; - this._histCtr = 0; - this._inMode = true; -}; - -/** - * Called when exiting a mode - */ - -History.prototype.exitMode = function () { - this._hist = this._histCache; - this._histCtr = this._histCtrCache; - this._histCache = []; - this._histCtrCache = 0; - this._inMode = false; -}; - -/** - * Clears the command history - * (Currently only used in unit test) - */ - -History.prototype.clear = function () { - if (this._storageKey) { - this._localStorage.removeItem(this._storageKey); + + /** + * Called when exiting a mode. + */ + exitMode(): this { + this._history = [...this._historyCache]; + this._counter = this._counterCache; + this._historyCache = []; + this._counterCache = 0; + this._inMode = false; + + return this; } -}; -module.exports = History; + /** + * Clears the command history (currently only used in unit test). + */ + clear(): this { + if (this._storageKey) { + this._localStorage.removeItem(this._storageKey); + } + + return this; + } +} diff --git a/lib/intercept.js b/lib/intercept.js index 72211c38..3003fad2 100755 --- a/lib/intercept.js +++ b/lib/intercept.js @@ -20,16 +20,14 @@ module.exports = function (callback) { var oldStdoutWrite = process.stdout.write; var oldConsoleError = console.error; process.stdout.write = (function (write) { - return function (string) { - var args = _.toArray(arguments); - args[0] = interceptor(string); + return function (...args) { + args[0] = interceptor(args[0]); write.apply(process.stdout, args); }; }(process.stdout.write)); console.error = (function () { - return function () { - var args = _.toArray(arguments); + return function (...args) { args.unshift('\x1b[31m[ERROR]\x1b[0m'); console.log.apply(console.log, args); }; diff --git a/lib/local-storage.js b/lib/local-storage.js index 1274b7ae..b4bcb19c 100755 --- a/lib/local-storage.js +++ b/lib/local-storage.js @@ -8,7 +8,7 @@ const DEFAULT_STORAGE_PATH = temp; var LocalStorage = { - setId(id) { + setKey(id) { if (id === undefined) { throw new Error('vorpal.localStorage() requires a unique key to be passed in.'); } diff --git a/lib/logger.js b/lib/logger.js index 264863de..bf7ee329 100755 --- a/lib/logger.js +++ b/lib/logger.js @@ -1,136 +1,141 @@ -/** - * Module dependencies. - */ - -var _ = require('lodash'); -var util = require('./util'); -var ut = require('util'); - -/** - * Initialize a new `Logger` instance. - * - * @return {Logger} - * @api public - */ - -function viewed(str) { - var re = /\u001b\[\d+m/gm; - return String(str).replace(re, ''); -} +// @flow -function trimTo(str, amt) { - var raw = ''; - var visual = viewed(str).slice(0, amt); - var result = ''; - for (var i = 0; i < str.length; ++i) { - raw += str[i]; - if (viewed(raw) === visual) { - result = raw; break; - } - } +import { inspect } from 'util'; +import pad from './utils/pad'; - if (result.length < amt - 10) { - return result; - } +import type { LoggerCallback } from './types'; - var newResult = result; var found = false; - for (var j = result.length; j > 0; --j) { - if (result[j] === ' ') { - found = true; - break; - } else { - newResult = newResult.slice(0, newResult.length - 1); - } - } +const BUFFER_WIDTH: number = 10; +const ESCAPE_CODE_PATTERN: RegExp = /\u001B\[\d+m/gm; + +export default class Logger { + logger: LoggerCallback; - if (found === true) { - return newResult; + constructor(logger?: LoggerCallback) { + // eslint-disable-next-line no-console + this.logger = logger || console.log; } - return result; -} + br(): this { + return this.log(' '); + } -function Logger(cons) { - var logger = cons || console; - log = function () { - logger.log.apply(logger, arguments); - }; - - log.cols = function () { - var width = process.stdout.columns; - var pads = 0; - var padsWidth = 0; - var cols = 0; - var colsWidth = 0; - var input = arguments; - - for (var h = 0; h < arguments.length; ++h) { - if (typeof arguments[h] === 'number') { - padsWidth += arguments[h]; - pads++; - } - if (_.isArray(arguments[h]) && typeof arguments[h][0] === 'number') { - padsWidth += arguments[h][0]; - pads++; + cols(...args: *[]): this { + // $FlowIgnore + const width = process.stdout.columns; + const input = args; + const lines = []; + let pads = 0; + let padsWidth = 0; + let cols = 0; + let colsWidth = 0; + + args.forEach((arg) => { + if (typeof arg === 'number') { + padsWidth += arg; + pads += 1; + + } else if (Array.isArray(arg) && typeof arg[0] === 'number') { + padsWidth += arg[0]; + pads += 1; } - } + }); - cols = arguments.length - pads; + cols = args.length - pads; colsWidth = Math.floor((width - padsWidth) / cols); - var lines = []; + const appendLine = () => { + let line = ''; + let done = true; - var go = function () { - var str = ''; - var done = true; - for (var i = 0; i < input.length; ++i) { + for (let i = 0; i < input.length; i += 1) { if (typeof input[i] === 'number') { - str += util.pad('', input[i], ' '); - } else if (_.isArray(input[i]) && typeof input[i][0] === 'number') { - str += util.pad('', input[i][0], input[i][1]); + line += pad('', input[i]); + + } else if (Array.isArray(input[i]) && typeof input[i][0] === 'number') { + line += pad('', input[i][0], input[i][1]); + } else { - var chosenWidth = colsWidth + 0; - var trimmed = trimTo(input[i], colsWidth); - var trimmedLength = trimmed.length; - var re = /\\u001b\[\d+m/gm; - var matches = ut.inspect(trimmed).match(re); - var color = ''; + const chosenWidth = colsWidth + 0; + let trimmed = this.trimTo(input[i], colsWidth); + const trimmedLength = trimmed.length; + const matches = inspect(trimmed).match(ESCAPE_CODE_PATTERN); + let color = ''; + // Ugh. We're chopping a line, so we have to look for unfinished // color assignments and throw them on the next line. - if (matches && matches[matches.length - 1] !== '\\u001b[39m') { - trimmed += '\u001b[39m'; - var number = String(matches[matches.length - 1]).slice(7, 9); - color = '\x1B[' + number + 'm'; + if (matches && matches[matches.length - 1] !== '\\u001B[39m') { + trimmed += '\u001B[39m'; + + // eslint-disable-next-line no-magic-numbers, unicorn/no-hex-escape + color = `\x1B[m${String(matches[matches.length - 1]).slice(7, 9)}`; } - input[i] = color + String(input[i].slice(trimmedLength, input[i].length)).trim(); - str += util.pad(String(trimmed).trim(), chosenWidth, ' '); - if (viewed(input[i]).trim() !== '') { + + input[i] = color + input[i].slice(trimmedLength, input[i].length).trim(); + line += pad(trimmed.trim(), chosenWidth); + + if (this.stripEscapeCode(input[i]).trim() !== '') { done = false; } } } - lines.push(str); + + lines.push(line); + if (!done) { - go(); + appendLine(); } }; - go(); - for (var i = 0; i < lines.length; ++i) { - logger.log(lines[i]); - } + + appendLine(); + + lines.forEach((line) => { + this.log(line); + }); + return this; - }; + } + + log(...args: *[]): this { + this.logger(...args); - log.br = function () { - logger.log(' '); return this; - }; + } - return this.log; -} + trimTo(message: string, amount: number): string { + const visual = this.stripEscapeCode(message).slice(0, amount); + let raw = ''; + let result = ''; + + for (let i = 0; i < message.length; i += 1) { + raw += message[i]; + + if (this.stripEscapeCode(raw) === visual) { + result = raw; + break; + } + } + + if (result.length < (amount - BUFFER_WIDTH)) { + return result; + } + + let newResult = result; + let found = false; + + for (let j = result.length; j > 0; j -= 1) { + if (result[j] === ' ') { + found = true; + break; + } else { + newResult = newResult.slice(0, newResult.length - 1); + } + } -/** - * Expose `logger`. - */ + return found ? newResult : result; + } -module.exports = exports = Logger; + stripEscapeCode(message: string): string { + return message.replace(ESCAPE_CODE_PATTERN, ''); + } +} diff --git a/lib/option.js b/lib/option.js index 3ef05aa1..529c298d 100755 --- a/lib/option.js +++ b/lib/option.js @@ -12,12 +12,17 @@ class Option { * @api public */ - constructor(flags, description, autocomplete) { + constructor(flags, description, options = {}) { + options = typeof options === 'object' ? options : { + autocomplete: options + }; + + this.autocomplete = options.autocomplete; + this._default = options.default ? options.default : null; this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); + this.required = !!~flags.indexOf('<'); + this.optional = !!~flags.indexOf('['); this.bool = !~flags.indexOf('-no-'); - this.autocomplete = autocomplete; flags = flags.split(/[ ,|]+/); if (flags.length > 1 && !/^[[<]/.test(flags[1])) { this.assignFlag(flags.shift()); @@ -69,6 +74,10 @@ class Option { this.short = flag; } } + + default() { + return this._default; + } } /** diff --git a/lib/session.js b/lib/session.js index 058deb3c..1d4e7e12 100755 --- a/lib/session.js +++ b/lib/session.js @@ -1,4 +1,4 @@ -'use strict'; +const CommandInstance = require('./command-instance'); /** * Module dependencies. @@ -7,9 +7,8 @@ var EventEmitter = require('events').EventEmitter; var os = require('os'); var _ = require('lodash'); -var util = require('./util'); var autocomplete = require('./autocomplete'); -var CommandInstance = require('./command-instance'); + /** * Initialize a new `Session` instance. @@ -73,9 +72,8 @@ module.exports = exports = Session; * @api public */ -session.log = function () { - var args = util.fixArgsForApply(arguments); - return this._log.apply(this, args); +session.log = function (...args) { + return this._log(...args); }; /** @@ -87,16 +85,16 @@ session.log = function () { * @api public */ -session._log = function () { +session._log = function (...args) { var self = this; if (this.isLocal()) { - this.parent.ui.log.apply(this.parent.ui, arguments); + this.parent.ui.log(...args); } else { // If it's an error, expose the stack. Otherwise // we get a helpful '{}'. var args = []; - for (var i = 0; i < arguments.length; ++i) { - var str = arguments[i]; + for (var i = 0; i < args.length; ++i) { + var str = args[i]; str = (str && str.stack) ? 'Error: ' + str.message : str; args.push(str); } @@ -472,8 +470,7 @@ session.execCommandSet = function (wrapper, callback) { } // Call the root command. - res = wrapper.fn.call(commandInstance, wrapper.args, function () { - var argus = util.fixArgsForApply(arguments); + res = wrapper.fn.call(commandInstance, wrapper.args, function (...argus) { onCompletion(wrapper, argus[0], argus[1], argus); }); diff --git a/lib/types.js b/lib/types.js new file mode 100644 index 00000000..0ae5575b --- /dev/null +++ b/lib/types.js @@ -0,0 +1,38 @@ +// @flow +/* eslint-disable no-use-before-define */ + +import typeof Command from './command'; +import typeof CommandInstance from './command-instance'; +import typeof Session from './session'; + +export type Argument = { + name: string, + required: boolean, + variadic: boolean, +}; + +export type CommandArgs = { + options: { [opt: string]: string | number | boolean }, + [arg: string]: string | string[], +}; + +export type CommandExecutionItem = { + args: string | CommandArgs, // From buildCommandArgs() + command: string, // The input on the command line + commandObject?: Command, + fn: (ci: CommandInstance, args: CommandArgs) => void, // TODO response value? + options: ModeOptions, + pipes: string[] | CommandInstance[], // From parseCommand() + session: Session, + sync: boolean, +}; + +// The entire command, with arguments and options, entered in the command line +export type InputCommand = string; + +export type LoggerCallback = (...args: *[]) => void; + +export type ModeOptions = { + message?: string, + sessionId?: string, +}; diff --git a/lib/ui.js b/lib/ui.js index 4f2721bc..24cc1e14 100755 --- a/lib/ui.js +++ b/lib/ui.js @@ -1,30 +1,21 @@ -'use strict'; +/* eslint-disable no-console, no-param-reassign */ -/** - * Module dependencies. - */ - -const _ = require('lodash'); -const inquirer = require('inquirer'); -const EventEmitter = require('events').EventEmitter; +const { EventEmitter } = require('events'); const chalk = require('chalk'); -const util = require('./util'); +const inquirer = require('inquirer'); const logUpdate = require('log-update'); -class UI extends EventEmitter { +const INQUIRER_PROMPTS = ['input', 'checkbox', 'confirm', 'expand', 'list', 'password', 'rawlist']; +class UI extends EventEmitter { /** * Sets intial variables and registers * listeners. This is called once in a * process thread regardless of how many * instances of Vorpal have been generated. - * - * @api private */ - constructor() { super(); - const self = this; // Attached vorpal instance. The UI can // only attach to one instance of Vorpal @@ -58,38 +49,48 @@ class UI extends EventEmitter { if (this._sigintCount > 1) { this.parent.emit('vorpal_exit'); process.exit(0); + + return; + } + + // If Vorpal isn't shown, just exit. + if (!this.parent) { + process.exit(0); + + return; + } + + const text = this.input(); + + // There are commands running if cancelCommands function is available. + if (this.parent.session.cancelCommands) { + this.imprint(); + this.submit(''); + this._sigintCalled = false; + this._sigintCount = 0; + this.parent.session.emit('vorpal_command_cancel'); + + } else if (String(text).trim()) { + this.imprint(); + this.submit(''); + this._sigintCalled = false; + this._sigintCount = 0; + } else { - const text = this.input(); - if (!this.parent) { - // If Vorpal isn't shown, just exit. - process.exit(0); - } else if (this.parent.session.cancelCommands) { - // There are commands running if - // cancelCommands function is available. - this.imprint(); - this.submit(''); - this._sigintCalled = false; - this._sigintCount = 0; - this.parent.session.emit('vorpal_command_cancel'); - } else if (String(text).trim() !== '') { - this.imprint(); - this.submit(''); - this._sigintCalled = false; - this._sigintCount = 0; - } else { - this._sigintCalled = false; - this.delimiter(' '); - this.submit(''); - this.log('(^C again to quit)'); - } + this._sigintCalled = false; + this.delimiter(' '); + this.submit(''); + this.log('(^C again to quit)'); } }; - process.stdin.on('keypress', (letter, key) => { - key = key || {}; - if (key.ctrl === true && key.shift === false && key.meta === false && ['c', 'C'].indexOf(key.name) > -1) { - this._sigintCount++; - if (this._sigint !== undefined && !this._sigintCalled) { + const self = this; + + process.stdin.on('keypress', (letter, key = {}) => { + if (key.ctrl && !key.shift && !key.meta && ['c', 'C'].indexOf(key.name) > -1) { + this._sigintCount += 1; + + if (this._sigint && !this._sigintCalled) { this._sigintCalled = true; this._sigint.call(self.parent); this._sigintCalled = false; @@ -102,18 +103,14 @@ class UI extends EventEmitter { // Extend the render function to steal the active prompt object, // as inquirer doesn't expose it and we need it. - const prompts = ['input', 'checkbox', 'confirm', 'expand', 'list', 'password', 'rawlist']; - - for (const key in prompts) { - const promptType = prompts[key]; - + INQUIRER_PROMPTS.forEach((promptType) => { // Add method to Inquirer to get type of prompt. - inquirer.prompt.prompts[promptType].prototype.getType = function () { + inquirer.prompt.prompts[promptType].prototype.getType = function getType() { return promptType; }; // Hook in to steal Inquirer's keypress. - inquirer.prompt.prompts[promptType].prototype.onKeypress = function (e) { + inquirer.prompt.prompts[promptType].prototype.onKeypress = function onKeypress(e) { // Inquirer seems to have a bug with release v0.10.1 // (not 0.10.0 though) that triggers keypresses for // the previous prompt in addition to the current one. @@ -121,130 +118,123 @@ class UI extends EventEmitter { if (this.status && this.status === 'answered') { return; } + self._activePrompt = this; self.parent.emit('client_keypress', e); self._keypressHandler(e, this); }; - // Add hook to render method. - const render = inquirer.prompt.prompts[promptType].prototype.render; - inquirer.prompt.prompts[promptType].prototype.render = function () { + // Add hook to render method + const baseRender = inquirer.prompt.prompts[promptType].prototype.render; + + inquirer.prompt.prompts[promptType].prototype.render = function render(...args) { self._activePrompt = this; - return render.apply(this, arguments); + + return baseRender.apply(this, args); }; - } + }); - // Sigint handling - make it more graceful. + // Sigint handling - make it more graceful const onSigInt = () => { - if (_.isFunction(this._sigint) && !this._sigintCalled) { + if (typeof this._sigint === 'function' && !this._sigintCalled) { this._sigintCalled = true; this._sigint.call(this.parent); } }; + process.on('SIGINT', onSigInt); process.on('SIGTERM', onSigInt); } /** * Hook for sigint event. - * - * @param {Object} options - * @param {Function} cb - * @api public */ - sigint(fn) { - if (_.isFunction(fn)) { + if (typeof fn === 'function') { this._sigint = fn; } else { - throw new Error('vorpal.ui.sigint must be passed in a valid function.'); + throw new Error('UI#sigint must be passed a valid function.'); } + return this; } /** * Creates an inquirer prompt on the TTY. - * - * @param {Object} options - * @param {Function} cb - * @api public */ - - prompt(options, cb) { + prompt(options = {}, cb = null) { let prompt; - options = options || {}; + if (!this.parent) { return prompt; } + if (options.delimiter) { this.setDelimiter(options.delimiter); } + if (options.message) { this.setDelimiter(options.message); } + if (this._midPrompt) { - console.log('Prompt called when mid prompt...'); - throw new Error('UI Prompt called when already mid prompt.'); + throw new Error('UI prompt called when already in a prompt.'); } + this._midPrompt = true; + try { - prompt = inquirer.prompt(options, (result) => { + prompt = inquirer.prompt(options).then((result) => { this.inquirerStdout = []; this._midPrompt = false; - if (this._cancel === true) { + + if (this._cancel) { this._cancel = false; } else { cb(result); } }); - - // Temporary hack. We need to pull the active - // prompt from inquirer as soon as possible, - // however we can't just assign it sync, as - // the prompt isn't ready yet. - // I am trying to get inquirer extended to - // fire an event instead. - setTimeout(() => { - // this._activePrompt = prompt._activePrompt; - }, 100); } catch (e) { - console.log('Vorpal Prompt error:', e); + console.log('Vorpal prompt error:', e); } + return prompt; } /** * Returns a boolean as to whether user - * is mid another pr ompt. - * - * @return {Boolean} - * @api public + * is mid another prompt. */ - midPrompt() { - const mid = (this._midPrompt === true && this.parent !== undefined); - return mid; + return (this._midPrompt && this.parent); } - setDelimiter(str) { - const self = this; + setDelimiter(value) { if (!this.parent) { return; } - str = String(str).trim() + ' '; - this._lastDelimiter = str; - inquirer.prompt.prompts.password.prototype.getQuestion = function () { + + const self = this; + + this._lastDelimiter = `${String(value).trim()} `; + + inquirer.prompt.prompts.password.prototype.getQuestion = function getPasswordQuestion() { self._activePrompt = this; + return this.opt.message; }; - inquirer.prompt.prompts.input.prototype.getQuestion = function () { + + inquirer.prompt.prompts.input.prototype.getQuestion = function getInputQuestion() { self._activePrompt = this; - let message = this.opt.message; - if ((this.opt.default || this.opt.default === false) - && this.status !== 'answered') { - message += chalk.dim('(' + this.opt.default + ') '); + + let { message } = this.opt; + + if ((this.opt.default || this.opt.default === false) && this.status !== 'answered') { + message += chalk.dim(` (${this.opt.default}) `); } + self.inquirerStdout.push(message); + return message; }; } @@ -252,65 +242,55 @@ class UI extends EventEmitter { /** * Event handler for keypresses - deals with command history * and tabbed auto-completion. - * - * @param {Event} e - * @param {Prompt} prompt - * @api private */ - _keypressHandler(e, prompt) { - // Remove tab characters from user input. + // Remove tab characters from user input prompt.rl.line = prompt.rl.line.replace(/\t+/, ''); - // Mask passwords. - const line = prompt.getType() !== 'password' ? - prompt.rl.line : - '*'.repeat(prompt.rl.line.length); + // Mask passwords + const line = (prompt.getType() === 'password') + ? '*'.repeat(prompt.rl.line.length) + : prompt.rl.line; - // Re-write render function. + // Re-write render function const width = prompt.rl.line.length; const newWidth = prompt.rl.line.length; const diff = newWidth - width; + prompt.rl.cursor += diff; - const cursor = 0; - let message = prompt.getQuestion(); - const addition = (prompt.status === 'answered') ? + + const message = prompt.getQuestion() + (prompt.status === 'answered') ? chalk.cyan(prompt.answer) : line; - message += addition; - prompt.screen.render(message, {cursor: cursor}); + + prompt.screen.render(message); const key = (e.key || {}).name; - const value = (prompt) ? String(line) : undefined; - this.emit('vorpal_ui_keypress', {key: key, value: value, e: e}); + const value = prompt ? String(line) : undefined; + + this.emit('vorpal_ui_keypress', { key, value, e }); } /** * Pauses active prompt, returning * the value of what had been typed so far. - * - * @return {String} val - * @api public */ - pause() { - if (!this.parent) { - return false; - } - if (!this._activePrompt) { + if (!this.parent || !this._activePrompt || !this._midPrompt) { return false; } - if (!this._midPrompt) { - return false; - } - const val = this._lastDelimiter + this._activePrompt.rl.line; + + const value = this._lastDelimiter + this._activePrompt.rl.line; + this._midPrompt = false; - const rl = this._activePrompt.screen.rl; - const screen = this._activePrompt.screen; - rl.output.unmute(); + + const { screen } = this._activePrompt; + + screen.rl.output.unmute(); screen.clean(); - rl.output.write(''); - return val; + screen.rl.output.write(''); + + return value; } /** @@ -318,71 +298,52 @@ class UI extends EventEmitter { * a string, which will fill the prompt * with that text and put the cursor at * the end. - * - * @param {String} val - * @api public */ - - resume(val) { - if (!this.parent) { - return this; - } - val = val || ''; - if (!this._activePrompt) { + resume(value) { + if (!this.parent || !this._activePrompt || this._midPrompt) { return this; } - if (this._midPrompt) { - return this; - } - const rl = this._activePrompt.screen.rl; - rl.output.write(val); + + this._activePrompt.screen.rl.output.write(value || ''); this._midPrompt = true; + return this; } /** * Cancels the active prompt, essentially * but cutting out of the inquirer loop. - * - * @api public */ - cancel() { if (this.midPrompt()) { this._cancel = true; this.submit(''); this._midPrompt = false; } + return this; } /** * Attaches TTY prompt to a given Vorpal instance. - * - * @param {Vorpal} vorpal - * @return {UI} - * @api public */ - attach(vorpal) { this.parent = vorpal; this.refresh(); this.parent._prompt(); + return this; } /** * Detaches UI from a given Vorpal instance. - * - * @param {Vorpal} vorpal - * @return {UI} - * @api public */ detach(vorpal) { if (vorpal === this.parent) { - this.parent = undefined; + this.parent = null; } + return this; } @@ -392,42 +353,37 @@ class UI extends EventEmitter { * through ui.pipe(). Pauses any active * prompts, logs the data and then if * paused, resumes the prompt. - * - * @return {UI} - * @api public */ + log(...params) { + const args = (typeof this._pipeFn === 'function') + ? this._pipeFn(params) + : params; - log() { - let args = util.fixArgsForApply(arguments); - args = (_.isFunction(this._pipeFn)) ? - this._pipeFn(args) : - args; - if (args === '') { + if (!args || args === '') { return this; } - args = util.fixArgsForApply(args); + + // TODO/NOTE - These console logs aren't for debugging. if (this.midPrompt()) { const data = this.pause(); - console.log.apply(console.log, args); - if (typeof data !== 'undefined' && data !== false) { + + console.log(...args); + + if (data) { this.resume(data); } else { console.log('Log got back \'false\' as data. This shouldn\'t happen.', data); } } else { - console.log.apply(console.log, args); + console.log(...args); } + return this; } /** * Submits a given prompt. - * - * @param {String} value - * @return {UI} - * @api public */ - submit() { if (this._activePrompt) { // this._activePrompt.screen.onClose(); @@ -435,28 +391,28 @@ class UI extends EventEmitter { // this._activePrompt.onEnd({isValid: true, value: value}); // to do - I don't know a good way to do this. } + return this; } /** * Does a literal, one-time write to the * *current* prompt delimiter. - * - * @param {String} str - * @return {UI} - * @api public */ - - delimiter(str) { + delimiter(delimiter) { if (!this._activePrompt) { return this; } + const prompt = this._activePrompt; - if (str === undefined) { + + if (!delimiter) { return prompt.opt.message; } - prompt.opt.message = str; + + prompt.opt.message = delimiter; this.refresh(); + return this; } @@ -464,115 +420,98 @@ class UI extends EventEmitter { * Re-writes the input of an Inquirer prompt. * If no string is passed, it gets the current * input. - * - * @param {String} str - * @return {String} - * @api public */ - - input(str) { + input(input) { if (!this._activePrompt) { - return undefined; + return undefined; // TODO } + const prompt = this._activePrompt; - if (str === undefined) { + + if (!input) { return prompt.rl.line; } + const width = prompt.rl.line.length; - prompt.rl.line = str; + + prompt.rl.line = input; + const newWidth = prompt.rl.line.length; const diff = newWidth - width; + prompt.rl.cursor += diff; - const cursor = 0; - let message = prompt.getQuestion(); - const addition = (prompt.status === 'answered') ? - chalk.cyan(prompt.answer) : - prompt.rl.line; - message += addition; - prompt.screen.render(message, {cursor: cursor}); + + const message = prompt.getQuestion() + (prompt.status === 'answered') + ? chalk.cyan(prompt.answer) + : prompt.rl.line; + + prompt.screen.render(message); + return this; } /** * Logs the current delimiter and typed data. - * - * @return {UI} - * @api public */ - imprint() { if (!this.parent) { return this; } - const val = this._activePrompt.rl.line; + + const { line } = this._activePrompt.rl; const delimiter = this._lastDelimiter || this.delimiter() || ''; - this.log(delimiter + val); + + this.log(delimiter + line); + return this; } /** * Redraws the inquirer prompt with a new string. - * - * @param {String} str - * @return {UI} - * @api private */ - refresh() { if (!this.parent || !this._activePrompt) { return this; } + this._activePrompt.screen.clean(); this._activePrompt.render(); this._activePrompt.rl.output.write(this._activePrompt.rl.line); + return this; } /** * Writes over existing logging. - * - * @param {String} str - * @return {UI} - * @api public */ + redraw(output) { + logUpdate(output); - redraw(str) { - logUpdate(str); return this; } - } /** * Initialize singleton. */ - const ui = new UI(); /** - * Clears logging from `ui.redraw` - * permanently. - * - * @return {UI} - * @api public + * Clears logging from `ui.redraw` permanently. */ - -ui.redraw.clear = function () { +ui.redraw.clear = function clear() { logUpdate.clear(); + return ui; }; /** - * Prints logging from `ui.redraw` - * permanently. - * - * @return {UI} - * @api public + * Prints logging from `ui.redraw` permanently. */ - -ui.redraw.done = function () { +ui.redraw.done = function done() { logUpdate.done(); ui.refresh(); + return ui; }; @@ -594,16 +533,18 @@ ui.redraw.done = function () { * total mess. So forgive me. */ +// TODO investigate global.__vorpal = global.__vorpal || {}; global.__vorpal.ui = global.__vorpal.ui || { exists: false, - exports: undefined + exports: undefined, }; -if (!global.__vorpal.ui.exists) { +if (global.__vorpal.ui.exists) { + module.exports = global.__vorpal.ui.exports; +} else { global.__vorpal.ui.exists = true; global.__vorpal.ui.exports = ui; - module.exports = exports = global.__vorpal.ui.exports; -} else { - module.exports = global.__vorpal.ui.exports; + exports = ui; + module.exports = ui; } diff --git a/lib/util.js b/lib/util.js deleted file mode 100755 index e16fb4e9..00000000 --- a/lib/util.js +++ /dev/null @@ -1,459 +0,0 @@ -'use strict'; - -/** - * Module dependencies. - */ - -const _ = require('lodash'); -const minimist = require('minimist'); -const strip = require('strip-ansi'); - -const util = { - /** - * Parses command arguments from multiple - * sources. - * - * @param {String} str - * @param {Object} opts - * @return {Array} - * @api private - */ - - parseArgs: function (str, opts) { - const reg = /"(.*?)"|'(.*?)'|`(.*?)`|([^\s"]+)/gi; - let arr = []; - let match; - do { - match = reg.exec(str); - if (match !== null) { - arr.push(match[1] || match[2] || match[3] || match[4]); - } - } while (match !== null); - - arr = minimist(arr, opts); - arr._ = arr._ || []; - return arr; - }, - - /** - * Prepares a command and all its parts for execution. - * - * @param {String} command - * @param {Array} commands - * @return {Object} - * @api public - */ - - parseCommand: function (command, commands) { - const self = this; - let pipes = []; - let match; - let matchArgs; - let matchParts; - - function parsePipes() { - // First, split the command by pipes naively. - // This will split command arguments in half when the argument contains a pipe character. - // For example, say "(Vorpal|vorpal)" will be split into ['say "(Vorpal', 'vorpal)'] which isn't good. - const naivePipes = String(command).trim().split('|'); - - // Contruct empty array to place correctly split commands into. - const newPipes = []; - - // We will look for pipe characters within these quotes to rejoin together. - const quoteChars = ['"', '\'', '`']; - - // This will expand to contain one boolean key for each type of quote. - // The value keyed by the quote is toggled off and on as quote type is opened and closed. - // Example { "`": true, "'": false } would mean that there is an open angle quote. - const quoteTracker = {}; - - // The current command piece before being rejoined with it's over half. - // Since it's not common for pipes to occur in commands, this is usually the entire command pipe. - let commandPart = ''; - - // Loop through each naive pipe. - for (const key in naivePipes) { - // It's possible/likely that this naive pipe is the whole pipe if it doesn't contain an unfinished quote. - const possiblePipe = naivePipes[key]; - commandPart += possiblePipe; - - // Loop through each individual character in the possible pipe tracking the opening and closing of quotes. - for (let i = 0; i < possiblePipe.length; i++) { - const char = possiblePipe[i]; - if (quoteChars.indexOf(char) !== -1) { - quoteTracker[char] = !quoteTracker[char]; - } - } - - // Does the pipe end on an unfinished quote? - const inQuote = _.some(quoteChars, (quoteChar) => quoteTracker[quoteChar]); - - // If the quotes have all been closed or this is the last possible pipe in the array, add as pipe. - if (!inQuote || key * 1 === naivePipes.length - 1) { - newPipes.push(commandPart.trim()); - commandPart = ''; - } else { - // Quote was left open. The pipe character was previously removed when the array was split. - commandPart += '|'; - } - } - - // Set the first pipe to command and the rest to pipes. - command = newPipes.shift(); - pipes = pipes.concat(newPipes); - } - - function parseMatch() { - matchParts = self.matchCommand(command, commands); - match = matchParts.command; - matchArgs = matchParts.args; - } - - parsePipes(); - parseMatch(); - - if (match && _.isFunction(match._parse)) { - command = match._parse(command, matchParts.args); - parsePipes(); - parseMatch(); - } - - return ({ - command: command, - match: match, - matchArgs: matchArgs, - pipes: pipes - }); - }, - - /** - * Run a raw command string, e.g. foo -bar - * against a given list of commands, - * and if there is a match, parse the - * results. - * - * @param {String} cmd - * @param {Array} cmds - * @return {Object} - * @api public - */ - - matchCommand: function (cmd, cmds) { - const parts = String(cmd).trim().split(' '); - - let match; - let matchArgs; - for (let i = 0; i < parts.length; ++i) { - const subcommand = String(parts.slice(0, parts.length - i).join(' ')).trim(); - match = _.find(cmds, {_name: subcommand}) || match; - if (!match) { - for (const key in cmds) { - const cmd = cmds[key]; - const idx = cmd._aliases.indexOf(subcommand); - match = (idx > -1) ? cmd : match; - } - } - if (match) { - matchArgs = parts.slice(parts.length - i, parts.length).join(' '); - break; - } - } - // If there's no command match, check if the - // there's a `catch` command, which catches all - // missed commands. - if (!match) { - match = _.find(cmds, {_catch: true}); - // If there is one, we still need to make sure we aren't - // partially matching command groups, such as `do things` when - // there is a command `do things well`. If we match partially, - // we still want to show the help menu for that command group. - if (match) { - const allCommands = _.map(cmds, '_name'); - let wordMatch = false; - for (const key in allCommands) { - const cmd = allCommands[key]; - const parts2 = String(cmd).split(' '); - const cmdParts = String(match.command).split(' '); - let matchAll = true; - for (let k = 0; k < cmdParts.length; ++k) { - if (parts2[k] !== cmdParts[k]) { - matchAll = false; - break; - } - } - if (matchAll) { - wordMatch = true; - break; - } - } - if (wordMatch) { - match = undefined; - } else { - matchArgs = cmd; - } - } - } - - return ({ - command: match, - args: matchArgs - }); - }, - - buildCommandArgs: function (passedArgs, cmd, execCommand, isCommandArgKeyPairNormalized) { - let args = {options: {}}; - - if(isCommandArgKeyPairNormalized) { - // Normalize all foo="bar" with "foo='bar'" - // This helps implement unix-like key value pairs. - const reg = /(['"]?)(\w+)=(?:(['"])((?:(?!\3).)*)\3|(\S+))\1/g; - passedArgs = passedArgs.replace(reg, `"$2='$4$5'"`); - } - - // Types are custom arg types passed - // into `minimist` as per its docs. - const types = cmd._types || {}; - - // Make a list of all boolean options - // registered for this command. These are - // simply commands that don't have required - // or optional args. - const booleans = []; - cmd.options.forEach(function (opt) { - if (opt.required === 0 && opt.optional === 0) { - if (opt.short) { - booleans.push(opt.short); - } - if (opt.long) { - booleans.push(opt.long); - } - } - }); - - // Review the args passed into the command, - // and filter out the boolean list to only those - // options passed in. - // This returns a boolean list of all options - // passed in by the caller, which don't have - // required or optional args. - const passedArgParts = passedArgs.split(' '); - types.boolean = booleans.map(function (str) { - return String(str).replace(/^-*/, ''); - }).filter(function (str) { - let match = false; - let strings = [`-${str}`, `--${str}`, `--no-${str}`]; - for (let i = 0; i < passedArgParts.length; ++i) { - if (strings.indexOf(passedArgParts[i]) > -1) { - match = true; - break; - } - } - return match; - }); - - // Use minimist to parse the args. - const parsedArgs = this.parseArgs(passedArgs, types); - - function validateArg(arg, cmdArg) { - return !(arg === undefined && cmdArg.required === true); - } - - // Builds varidiac args and options. - let valid = true; - const remainingArgs = _.clone(parsedArgs._); - for (let l = 0; l < 10; ++l) { - const matchArg = cmd._args[l]; - const passedArg = parsedArgs._[l]; - if (matchArg !== undefined) { - valid = (!valid) ? false : validateArg(parsedArgs._[l], matchArg); - if (!valid) { - break; - } - if (passedArg !== undefined) { - if (matchArg.variadic === true) { - args[matchArg.name] = remainingArgs; - } else { - args[matchArg.name] = passedArg; - remainingArgs.shift(); - } - } - } - } - - if (!valid) { - return '\n Missing required argument. Showing Help:'; - } - - // Looks for ommitted required options and throws help. - for (let m = 0; m < cmd.options.length; ++m) { - const o = cmd.options[m]; - const short = String(o.short || '').replace(/-/g, ''); - const long = String(o.long || '').replace(/--no-/g, '').replace(/^-*/g, ''); - let exist = (parsedArgs[short] !== undefined) ? parsedArgs[short] : undefined; - exist = (exist === undefined && parsedArgs[long] !== undefined) ? parsedArgs[long] : exist; - const existsNotSet = (exist === true || exist === false); - if (existsNotSet && o.required !== 0) { - return `\n Missing required value for option ${(o.long || o.short)}. Showing Help:`; - } - if (exist !== undefined) { - args.options[long || short] = exist; - } - } - - // Looks for supplied options that don't - // exist in the options list. - // If the command allows unknown options, - // adds it, otherwise throws help. - const passedOpts = _.chain(parsedArgs) - .keys() - .pull('_') - .pull('help') - .value(); - for (const key in passedOpts) { - const opt = passedOpts[key]; - const optionFound = _.find(cmd.options, function (expected) { - if ('--' + opt === expected.long || - '--no-' + opt === expected.long || - '-' + opt === expected.short) { - return true; - } - return false; - }); - if (optionFound === undefined) { - if (cmd._allowUnknownOptions) { - args.options[opt] = parsedArgs[opt]; - } else { - return `\n Invalid option: '${opt}'. Showing Help:`; - } - } - } - - // If args were passed into the programmatic - // `vorpal.exec(cmd, args, callback)`, merge - // them here. - if (execCommand && execCommand.args && _.isObject(execCommand.args)) { - args = _.extend(args, execCommand.args); - } - - // Looks for a help arg and throws help if any. - if (parsedArgs.help || parsedArgs._.indexOf('/?') > -1) { - args.options.help = true; - } - - return args; - }, - - /** - * Makes an argument name pretty for help. - * - * @param {String} arg - * @return {String} - * @api private - */ - - humanReadableArgName: function (arg) { - const nameOutput = arg.name + (arg.variadic === true ? '...' : ''); - return arg.required ? - `<${nameOutput}>` : - `[${nameOutput}]`; - }, - - /** - * Formats an array to display in a TTY - * in a pretty fashion. - * - * @param {Array} arr - * @return {String} - * @api public - */ - - prettifyArray: function (arr) { - arr = arr || []; - const arrClone = _.clone(arr); - const width = process.stdout.columns; - const longest = strip((arrClone.sort(function (a, b) { - return strip(b).length - strip(a).length; - })[0] || '')).length + 2; - const fullWidth = strip(String(arr.join(''))).length; - const fitsOneLine = ((fullWidth + (arr.length * 2)) <= width); - let cols = Math.floor(width / longest); - cols = (cols < 1) ? 1 : cols; - if (fitsOneLine) { - return arr.join(' '); - } - let col = 0; - const lines = []; - let line = ''; - for (const key in arr) { - const arrEl = arr[key]; - if (col < cols) { - col++; - } else { - lines.push(line); - line = ''; - col = 1; - } - line += this.pad(arrEl, longest, ' '); - } - if (line !== '') { - lines.push(line); - } - return lines.join('\n'); - }, - - /** - * Pads a value with with space or - * a specified delimiter to match a - * given width. - * - * @param {String} str - * @param {Integer} width - * @param {String} delimiter - * @return {String} - * @api private - */ - - pad: function (str, width, delimiter) { - width = Math.floor(width); - delimiter = delimiter || ' '; - const len = Math.max(0, width - strip(str).length); - return str + Array(len + 1).join(delimiter); - }, - - /** - * Pad a row on the start and end with spaces. - * - * @param {String} str - * @return {String} - */ - padRow: function (str) { - return str.split('\n').map(function (row) { - return ' ' + row + ' '; - }).join('\n'); - }, - - // When passing down applied args, we need to turn - // them from `{ '0': 'foo', '1': 'bar' }` into ['foo', 'bar'] - // instead. - fixArgsForApply: function (obj) { - if (!_.isObject(obj)) { - if (!_.isArray(obj)) { - return [obj]; - } - return obj; - } - const argArray = []; - for (const key in obj) { - const aarg = obj[key]; - argArray.push(aarg); - } - return argArray; - } -}; - -/** - * Expose `util`. - */ - -module.exports = exports = util; diff --git a/lib/utils/buildCommandArgs.js b/lib/utils/buildCommandArgs.js new file mode 100644 index 00000000..c301dcf3 --- /dev/null +++ b/lib/utils/buildCommandArgs.js @@ -0,0 +1,139 @@ +// @flow +import Command from '../command'; +import isDefined from './isDefined'; +import padRow from './padRow'; +import parseArgs from './parseArgs'; + +import type { CommandArgs, CommandExecutionItem } from '../types'; + +const PAIR_NORMALIZE_PATTERN: RegExp = /(['"]?)(\w+)=(?:(['"])((?:(?!\3).)*)\3|(\S+))\1/g; +const MAX_ARGS: number = 10; + +// eslint-disable-next-line complexity +export default function buildCommandArgs( + passedArgs: string, + command: Command, + execCommand: ?CommandExecutionItem = null, + isCommandArgKeyPairNormalized: boolean = false +): CommandArgs { + const args = { options: {} }; + + // Normalize all foo="bar" with "foo='bar'". + // This helps implement unix-like key value pairs. + if (isCommandArgKeyPairNormalized) { + // eslint-disable-next-line no-param-reassign + passedArgs = passedArgs.replace(PAIR_NORMALIZE_PATTERN, '"$2=\'$4$5\'"'); + } + + // Types are custom arg types passed into `minimist` as per its docs. + const types = command._types || {}; + + // Make a list of all boolean options registered for this command. + // These are simply commands that don't have required or optional args. + const booleans = []; + + command.options.forEach((opt) => { + if (!opt.required && !opt.optional) { + if (opt.short) { + booleans.push(opt.short); + } + + if (opt.long) { + booleans.push(opt.long); + } + } + }); + + // Review the args passed into the command and filter out the boolean list to only those + // options passed in. This returns a boolean list of all options passed in by the caller, + // which don't have required or optional args. + types.boolean = booleans + .map(value => String(value).replace(/^-*/, '')) + .filter((value) => { + const formats = [`-${value}`, `--${value}`, `--no-${value}`]; + + return passedArgs.split(' ').some(part => formats.includes(part)); + }); + + // Use minimist to parse the args, and then build varidiac args and options. + const parsedArgs = parseArgs(passedArgs, types); + const remainingArgs = [...parsedArgs._]; + + // Builds varidiac args and options. + for (let l = 0; l < MAX_ARGS; l += 1) { + const matchArg = command._args[l]; + const passedArg = parsedArgs._[l]; + + if (matchArg) { + // Can be a falsy value + if (isDefined(passedArg)) { + if (matchArg.variadic) { + args[matchArg.name] = remainingArgs; + } else { + args[matchArg.name] = passedArg; + remainingArgs.shift(); + } + } else if (matchArg.required) { + throw new Error(padRow('\nMissing required argument. Showing Help:')); + } + } + } + + // Looks for ommitted required options and throws help. + command.options.forEach((option) => { + const short = String(option.short || '').replace(/-/g, ''); + const long = String(option.long || '').replace(/--no-/g, '').replace(/^-*/g, ''); + const exists = isDefined(parsedArgs[long]) + ? parsedArgs[long] + : parsedArgs[short]; + const existsNotSet = (exists === true || exists === false); + const defaultValue = option.default(); + const hasDefault = (isDefined(defaultValue) && defaultValue !== null); + + if (existsNotSet && option.required && !hasDefault) { + throw new Error(padRow( + `\nMissing required value for option ${option.long || option.short}. Showing Help:` + )); + } + + // Can be a falsy value + if (isDefined(exists)) { + args.options[long || short] = exists; + + } else if (hasDefault) { + args.options[long || short] = defaultValue; + } + }); + + // Looks for supplied options that don't exist in the options list. + // If the command allows unknown options, adds it, otherwise throws help. + const passedOpts = Object.keys(parsedArgs).filter(opt => (opt !== '_' && opt !== 'help')); + + passedOpts.forEach((option) => { + const optionFound = command.options.find(expected => ( + `--${option}` === expected.long || + `--no-${option}` === expected.long || + `-${option}` === expected.short + )); + + if (!optionFound) { + if (command._allowUnknownOptions) { + args.options[option] = parsedArgs[option]; + } else { + throw new Error(padRow(`\nInvalid option ${option}. Showing Help:`)); + } + } + }); + + // If args were passed into the programmatic `Vorpal#exec`, merge them here. + if (execCommand && execCommand.args && typeof execCommand.args === 'object') { + Object.assign(args, execCommand.args); + } + + // Looks for a help arg and throws help if any. + if (parsedArgs.help || parsedArgs._.includes('/?')) { + args.options.help = true; + } + + return args; +} diff --git a/lib/utils/camelCase.js b/lib/utils/camelCase.js new file mode 100644 index 00000000..5a89d655 --- /dev/null +++ b/lib/utils/camelCase.js @@ -0,0 +1,5 @@ +// @flow + +export default function camelCase(string: string): string { + return string.split('-').reduce((str, word) => str + word[0].toUpperCase() + word.slice(1)); +} diff --git a/lib/utils/humanReadableArgName.js b/lib/utils/humanReadableArgName.js new file mode 100644 index 00000000..5d12062c --- /dev/null +++ b/lib/utils/humanReadableArgName.js @@ -0,0 +1,11 @@ +// @flow +import type { Argument } from '../types'; + +/** + * Makes an argument name pretty for help. + */ +export default function humanReadableArgName(arg: Argument): string { + const name = arg.name + (arg.variadic ? '...' : ''); + + return arg.required ? `<${name}>` : `[${name}]`; +} diff --git a/lib/utils/isDefined.js b/lib/utils/isDefined.js new file mode 100644 index 00000000..bbd0c8e8 --- /dev/null +++ b/lib/utils/isDefined.js @@ -0,0 +1,5 @@ +// @flow + +export default function isDefined(value: *): boolean { + return (typeof value !== 'undefined'); +} diff --git a/lib/utils/matchCommand.js b/lib/utils/matchCommand.js new file mode 100644 index 00000000..f0a952e4 --- /dev/null +++ b/lib/utils/matchCommand.js @@ -0,0 +1,76 @@ +// @flow +import Command from '../command'; + +/** + * Run a raw command string, e.g. foo -bar against a given list of commands, + * and if there is a match, parse the results. + */ +export default function matchCommand(commandName: string, commands: Command[] = []): { + args: string, + command: ?Command, +} { + const parts = commandName.trim().split(' '); + let match = null; + let matchArgs = ''; + + for (let i = 0; i < parts.length; i += 1) { + const subcommandName = String(parts.slice(0, parts.length - i).join(' ')).trim(); + + match = commands.find(command => command._name === subcommandName) || match; + + if (!match) { + match = commands.find(command => command._aliases.includes(subcommandName)) || match; + } + + if (match) { + matchArgs = parts.slice(parts.length - i, parts.length).join(' '); + break; + } + } + + // If there's no command match, check if the there's a `catch` command, + // which catches all missed commands. + if (!match) { + match = commands.find(command => command._catch); + + // If there is one, we still need to make sure we aren't + // partially matching command groups, such as `do things` when + // there is a command `do things well`. If we match partially, + // we still want to show the help menu for that command group. + if (match) { + let wordMatch = false; + + commands.some((command) => { + const catchParts = String(command._name).split(' '); + const commandParts = String((match && match.command) || '').split(' '); + let matchAll = true; + + for (let i = 0; i < commandParts.length; i += 1) { + if (catchParts[i] !== commandParts[i]) { + matchAll = false; + break; + } + } + + if (matchAll) { + wordMatch = true; + + return true; + } + + return false; + }); + + if (wordMatch) { + match = null; + } else { + matchArgs = commandName; + } + } + } + + return { + args: matchArgs, + command: match || null, + }; +} diff --git a/lib/utils/pad.js b/lib/utils/pad.js new file mode 100644 index 00000000..f7f4fde5 --- /dev/null +++ b/lib/utils/pad.js @@ -0,0 +1,9 @@ +// @flow +import strip from 'strip-ansi'; + +/** + * Pads a value with a space or a specified delimiter to match a given width. + */ +export default function pad(value: string, width: number, delimiter?: string): string { + return value + (delimiter || ' ').repeat(Math.max(0, Math.floor(width) - strip(value).length)); +} diff --git a/lib/utils/padRow.js b/lib/utils/padRow.js new file mode 100644 index 00000000..cb7a81ba --- /dev/null +++ b/lib/utils/padRow.js @@ -0,0 +1,9 @@ +// @flow +import { PADDING } from '../constants'; + +/** + * Pad a row on the start and end with spaces. + */ +export default function padRow(value: string): string { + return value.split('\n').map(row => PADDING + row + PADDING).join('\n'); +} diff --git a/lib/utils/parseArgs.js b/lib/utils/parseArgs.js new file mode 100644 index 00000000..51e3621f --- /dev/null +++ b/lib/utils/parseArgs.js @@ -0,0 +1,35 @@ +// @flow +import minimist from 'minimist'; + +import type { CLIArgs, CLIParserOptions } from 'minimist'; + +const ARGS_PATTERN: RegExp = /"(.*?)"|'(.*?)'|`(.*?)`|([^\s"]+)/gi; + +/** + * Parses command arguments from multiple sources. + */ +export default function parseArgs(input: string, opts?: CLIParserOptions = {}): CLIArgs { + let args = []; + let match; + + do { + match = ARGS_PATTERN.exec(input); + + if (match !== null) { + args.push(match[1] || match[2] || match[3] || match[4]); + } + } while (match !== null); + + // Create clone of arr before sending to minimist, resolves #263 + var raw = args.slice(0) + + args = minimist(args, opts); + args._ = args._ || []; + + // Test for incorrectly interpreted number-like values from minimist, resolves #263 + args._.forEach(function (arg, index) { + if (arg === Infinity) args._[index] = raw[index]; + }); + + return args; +} diff --git a/lib/utils/parseCommand.js b/lib/utils/parseCommand.js new file mode 100644 index 00000000..fa081b7a --- /dev/null +++ b/lib/utils/parseCommand.js @@ -0,0 +1,101 @@ +// @flow +import Command from '../command'; +import matchCommand from './matchCommand'; + +/** + * Prepares a command and all its parts for execution. + */ +export default function parseCommand(commandName: string, commands: Command[] = []): { + command: string, + match: ?Command, + matchArgs: string, + pipes: string[], +} { + let pipes = []; + let match = null; + let matchArgs = ''; + let matchParts = {}; + let nextCommand = commandName; + + function parsePipes() { + // First, split the command by pipes naively. + // This will split command arguments in half when the argument contains a pipe character. + // Say "(Vorpal|vorpal)" will be split into ['say "(Vorpal', 'vorpal)'] which isn't good. + const naivePipes = String(nextCommand).trim().split('|'); + + // Contruct empty array to place correctly split commands into. + const newPipes = []; + + // We will look for pipe characters within these quotes to rejoin together. + const quoteChars = ['"', '\'', '`']; + + // This will expand to contain one boolean key for each type of quote. + // The value keyed by the quote is toggled off and on as quote type is opened and closed. + // Example { "`": true, "'": false } would mean that there is an open angle quote. + const quoteTracker = {}; + + // The current command piece before being rejoined with it's over half. + // Since it's not common for pipes to occur in commands, + // this is usually the entire command pipe. + let commandPart = ''; + + // Loop through each naive pipe. + naivePipes.forEach((possiblePipe, index) => { + // It's possible/likely that this naive pipe is the whole pipe + // if it doesn't contain an unfinished quote. + commandPart += possiblePipe; + + // Loop through each individual character in the possible pipe + // tracking the opening and closing of quotes. + for (let i = 0; i < possiblePipe.length; i += 1) { + const char = possiblePipe[i]; + + if (quoteChars.includes(char)) { + quoteTracker[char] = !quoteTracker[char]; + } + } + + // Does the pipe end on an unfinished quote? + const inQuote = quoteChars.some(quoteChar => !!quoteTracker[quoteChar]); + + // If the quotes have all been closed or this is the last + // possible pipe in the array, add as pipe. + if (!inQuote || index === naivePipes.length - 1) { + newPipes.push(commandPart.trim()); + commandPart = ''; + + // Quote was left open. The pipe character was previously + // removed when the array was split. + } else { + commandPart += '|'; + } + }); + + // Set the first pipe to command and the rest to pipes. + nextCommand = newPipes.shift(); + pipes = pipes.concat(newPipes); + } + + function parseMatch() { + matchParts = matchCommand(nextCommand, commands); + match = matchParts.command; + matchArgs = matchParts.args; + } + + parsePipes(); + parseMatch(); + + if (match && typeof match._parse === 'function') { + nextCommand = match._parse(nextCommand, matchParts.args || ''); + + parsePipes(); + parseMatch(); + } + + return { + command: nextCommand, + match, + matchArgs, + pipes, + }; +} diff --git a/lib/utils/prettifyArray.js b/lib/utils/prettifyArray.js new file mode 100644 index 00000000..58ab2404 --- /dev/null +++ b/lib/utils/prettifyArray.js @@ -0,0 +1,50 @@ +// @flow +import strip from 'strip-ansi'; +import pad from './pad'; +import { PADDING_SIZE } from '../constants'; + +/** + * Formats an array for display in a TTY in a pretty fashion. + */ +export default function prettifyArray(baseArray?: string[]): string { + const array = baseArray ? [...baseArray] : []; + + // Calculate widths + // $FlowIgnore `columns` is not defined + const maxWidth = process.stdout.columns; + const longestWidth = array.reduce((longest, item) => { + const { length } = strip(item); + + return (length > longest) ? length : longest; + }, 0) + PADDING_SIZE; + const fullWidth = strip(array.join('')).length; + + // Does it fit on one line? + if ((fullWidth + (array.length * PADDING_SIZE)) <= maxWidth) { + return array.join(' '); + } + + // Generate the output + const lines = []; + const cols = Math.min(1, Math.floor(maxWidth / longestWidth)); + let line = ''; + let col = 0; + + array.forEach((item) => { + if (col < cols) { + col += 1; + } else { + lines.push(line); + line = ''; + col = 1; + } + + line += pad(item, longestWidth); + }); + + if (line !== '') { + lines.push(line); + } + + return lines.join('\n'); +} diff --git a/lib/vorpal.js b/lib/vorpal.js index f4a08819..ded81480 100755 --- a/lib/vorpal.js +++ b/lib/vorpal.js @@ -1,24 +1,20 @@ -'use strict'; +const CommandInstance = require('./command-instance'); +import History from './history'; +import buildCommandArgs from './utils/buildCommandArgs'; +import humanReadableArgName from './utils/humanReadableArgName'; +import matchCommand from './utils/matchCommand'; +import pad from './utils/pad'; +import padRow from './utils/padRow'; +import parseCommand from './utils/parseCommand'; +import prettifyArray from './utils/prettifyArray'; /** - * Polyfill for ES6. - */ - -if (!global._babelPolyfill) { - // When the runtime transformer properly detects all shimmed methods, use instead. - // http://www.2ality.com/2015/12/babel6-helpersstandard-library.html#babel-plugin-transform-runtime - require('babel-polyfill'); -} - -/** - * Module dependencies. + * Module dependencies. (OLD) */ var _ = require('lodash'); var EventEmitter = require('events').EventEmitter; -var Command = require('./command'); -var CommandInstance = require('./command-instance'); -var VorpalUtil = require('./util'); +var Command = require('./command').default; var ui = require('./ui'); var Session = require('./session'); var intercept = require('./intercept'); @@ -26,7 +22,6 @@ var minimist = require('minimist'); var commons = require('./vorpal-commons'); var chalk = require('chalk'); var os = require('os'); -var History = require('./history'); var LocalStorage = require('./local-storage'); var wrap = require('wrap-ansi'); @@ -75,7 +70,7 @@ function Vorpal() { this.chalk = chalk; // Expose lodash as a convenience. - this.lodash = _; + // this.lodash = _; // Exposed through vorpal.delimiter(str). this._delimiter = 'local@' + String(os.hostname()).split('.')[0] + '~$ '; @@ -92,9 +87,6 @@ function Vorpal() { this._useDeprecatedAutocompletion = false; - // Expose common utilities, like padding. - this.util = VorpalUtil; - this.Session = Session; // Active vorpal server session. @@ -402,8 +394,8 @@ vorpal.default = function (name, desc, opts) { * @api public */ -vorpal.log = function () { - this.ui.log.apply(this.ui, arguments); +vorpal.log = function (...args) { + this.ui.log(...args); return this; }; @@ -485,7 +477,7 @@ vorpal.CmdHistoryExtension = History; * @api public */ vorpal.history = function (id) { - this.cmdHistory.setId(id); + this.cmdHistory.setKey(id); return this; }; @@ -497,7 +489,7 @@ vorpal.history = function (id) { */ vorpal.localStorage = function (id) { var ls = Object.create(LocalStorage); - ls.setId(id); + ls.setKey(id); _.extend(this.localStorage, ls); return this; }; @@ -556,7 +548,7 @@ vorpal._onKeypress = function (key, value) { this.session.getKeypressResult(key, value, function (err, result) { if (!err && result !== undefined) { if (_.isArray(result)) { - var formatted = VorpalUtil.prettifyArray(result); + var formatted = prettifyArray(result); self.ui.imprint(); self.session.log(formatted); } else { @@ -833,7 +825,7 @@ vorpal._exec = function (item) { // History for our 'up' and 'down' arrows. item.session.history((item.session._mode ? modeCommand : item.command)); - var commandData = this.util.parseCommand(item.command, this.commands); + var commandData = parseCommand(item.command, this.commands); item.command = commandData.command; item.pipes = commandData.pipes; var match = commandData.match; @@ -891,11 +883,10 @@ vorpal._exec = function (item) { }; var delimiter = match._delimiter || String(item.command).toLowerCase() + ':'; - item.args = self.util.buildCommandArgs(matchArgs, match, item, self.isCommandArgKeyPairNormalized); - - // If we get a string back, it's a validation error. - // Show help and return. - if (_.isString(item.args) || !_.isObject(item.args)) { + try { + item.args = buildCommandArgs(matchArgs, match, item, self.isCommandArgKeyPairNormalized); + } catch (error) { + item.args = error.message; throwHelp(item, item.args); return callback(item, undefined, item.args); } @@ -903,18 +894,22 @@ vorpal._exec = function (item) { // Build the piped commands. var allValid = true; for (var j = 0; j < item.pipes.length; ++j) { - var commandParts = self.util.matchCommand(item.pipes[j], self.commands); + var commandParts = matchCommand(item.pipes[j], self.commands); if (!commandParts.command) { item.session.log(self._commandHelp(item.pipes[j])); allValid = false; break; } - commandParts.args = self.util.buildCommandArgs(commandParts.args, commandParts.command); - if (_.isString(commandParts.args) || !_.isObject(commandParts.args)) { + + try { + commandParts.args = buildCommandArgs(commandParts.args, commandParts.command); + } catch (error) { + commandParts.args = error.message; throwHelp(item, commandParts.args, commandParts.command); allValid = false; break; } + item.pipes[j] = commandParts; } // If invalid piped commands, return. @@ -1128,7 +1123,7 @@ vorpal._commandHelp = function (command) { return (String(cmd._name).trim().split(' ').length <= commandMatchLength); }).map(function (cmd) { var args = cmd._args.map(function (arg) { - return VorpalUtil.humanReadableArgName(arg); + return humanReadableArgName(arg); }).join(' '); return [ @@ -1159,7 +1154,7 @@ vorpal._commandHelp = function (command) { counts[cmd]++; return cmd; })).map(function (cmd) { - let prefix = ` ${VorpalUtil.pad(cmd + ' *', width)} ${counts[cmd]} sub-command${((counts[cmd] === 1) ? '' : 's')}.`; + let prefix = ` ${pad(cmd + ' *', width)} ${counts[cmd]} sub-command${((counts[cmd] === 1) ? '' : 's')}.`; return prefix; }); @@ -1169,11 +1164,11 @@ vorpal._commandHelp = function (command) { var commandsString = (commands.length < 1) ? '' : '\n Commands:\n\n' + commands.map(function (cmd) { - var prefix = ' ' + VorpalUtil.pad(cmd[0], width) + ' '; + var prefix = ' ' + pad(cmd[0], width) + ' '; var suffix = wrap(cmd[1], descriptionWidth - 8).split('\n'); for (let i = 0; i < suffix.length; ++i) { if (i !== 0) { - suffix[i] = VorpalUtil.pad('', width + 6) + suffix[i]; + suffix[i] = pad('', width + 6) + suffix[i]; } } suffix = suffix.join('\n'); @@ -1202,7 +1197,7 @@ vorpal._helpHeader = function (hideTitle) { var header = []; if (this._banner) { - header.push(VorpalUtil.padRow(this._banner), ''); + header.push(padRow(this._banner), ''); } // Only show under specific conditions @@ -1213,12 +1208,12 @@ vorpal._helpHeader = function (hideTitle) { title += ' v' + this._version; } - header.push(VorpalUtil.padRow(title)); + header.push(padRow(title)); if (this._description) { var descWidth = process.stdout.columns * 0.75; // Only 75% of the screen - header.push(VorpalUtil.padRow(wrap(this._description, descWidth))); + header.push(padRow(wrap(this._description, descWidth))); } } diff --git a/package.json b/package.json index 6f87ab35..37500151 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,13 @@ "name": "vorpal", "version": "1.11.4", "description": "Node's first framework for building immersive CLI apps.", - "main": "./dist/vorpal.js", + "main": "./lib/vorpal.js", "scripts": { - "test": "gulp build; mocha;", - "prepublish": "in-publish && gulp build || not-in-publish" + "build": "build-lib ./lib -d ./dist", + "flow": "type-check", + "lint": "run-linter ./lib", + "lint:only": "run-linter", + "test": "yarn run build && mocha" }, "repository": { "type": "git", @@ -33,57 +36,44 @@ }, "homepage": "https://github.com/dthree/vorpal#readme", "devDependencies": { - "babel": "^6.3.26", - "babel-core": "^6.4.5", - "babel-preset-es2015": "^6.3.13", - "bluebird": "^3.1.1", - "gulp": "^3.9.0", - "gulp-babel": "^6.1.2", - "gulp-changed": "^1.3.0", - "gulp-eslint": "^1.1.1", - "gulp-xo": "^0.7.0", - "load-plugins": "^2.1.0", - "mocha": "^2.2.5", - "moment": "^2.10.3", - "request": "^2.58.0", - "should": "^6.0.3", - "vorpal-less": "0.0.4", - "vorpal-repl": "^1.1.8", - "xo": "^0.9.0" + "@milesj/build-tool-config": "^0.15.0", + "bluebird": "^3.5.0", + "mocha": "^3.4.2", + "should": "^11.2.1", + "vorpal-less": "^0.0.13", + "vorpal-repl": "^1.1.8" }, "dependencies": { - "babel-polyfill": "^6.3.14", - "chalk": "^1.1.0", - "in-publish": "^2.0.0", - "inquirer": "0.11.0", - "lodash": "^4.5.1", - "log-update": "^1.0.2", + "chalk": "^2.0.1", + "inquirer": "^3.2.0", + "lodash": "^4.17.0", + "log-update": "^2.0.0", "minimist": "^1.2.0", - "node-localstorage": "^0.6.0", - "strip-ansi": "^3.0.0", - "wrap-ansi": "^2.0.0" + "node-localstorage": "^1.3.0", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.1.0" }, "engines": { - "node": ">= 0.10.0", - "iojs": ">= 1.0.0" + "node": ">=6.10.0", + "npm": ">=3.10.0" }, - "xo": { - "space": true, + "babel": { + "extends": "./node_modules/@milesj/build-tool-config/babel.node.json5" + }, + "eslintConfig": { + "extends": "./node_modules/@milesj/build-tool-config/eslint.node.json5", "rules": { - "no-eval": 0, - "no-unused-expressions": 0, - "max-nested-callbacks": 0, - "no-proto": 0, - "wrap-iife": 0, - "global-require": 0, - "no-negated-condition": 0, - "no-loop-func": 0, - "no-implicit-coercion": 0, - "no-use-extend-native/no-use-extend-native": 0, - "no-undef": 0 + "comma-dangle": [ + "error", + { + "arrays": "always-multiline", + "objects": "always-multiline", + "imports": "never", + "exports": "never", + "functions": "never" + } + ], + "no-underscore-dangle": "off" } - }, - "files": [ - "dist" - ] + } } diff --git a/test/autocomplete.js b/test/autocomplete.js index 70c70380..83aacec7 100644 --- a/test/autocomplete.js +++ b/test/autocomplete.js @@ -1,4 +1,4 @@ -var Vorpal = require('../'); +var Vorpal = require('../dist/vorpal'); var assert = require('assert'); var _ = require('lodash'); var vorpal = new Vorpal(); @@ -33,7 +33,7 @@ describe('session._autocomplete', function () { assert.equal(result, 'def '); }); - + it('should return the prefix along with the partial match when supplied with a prefix input', function() { var result = vorpal.session._autocomplete('foo/de', ['dally','definitive', 'definitop', 'bob']); assert.equal(result, "foo/definit"); @@ -47,4 +47,4 @@ describe('session._autocomplete', function () { assert.equal(result[2], "definitive"); assert.equal(result[3], "definitop"); }); -}); \ No newline at end of file +}); diff --git a/test/index.js b/test/index.js index 1817a30c..09b0e61c 100755 --- a/test/index.js +++ b/test/index.js @@ -1,4 +1,4 @@ -var Vorpal = require('../'); +var Vorpal = require('../dist/vorpal'); var should = require('should'); var vorpal = new Vorpal(); @@ -30,7 +30,7 @@ describe('vorpal', function () { describe('mode context', function () { it('parent should have the same context in init and action', function (done) { - var vorpal = Vorpal(); + var vorpal = new Vorpal(); var initCtx; vorpal .mode('ooga') diff --git a/test/integration.js b/test/integration.js index e3011fed..f08b8c4d 100755 --- a/test/integration.js +++ b/test/integration.js @@ -1,6 +1,6 @@ 'use strict'; -var Vorpal = require('../'); +var Vorpal = require('../dist/vorpal'); var commands = require('./util/server'); var BlueBirdPromise = require('bluebird'); var fs = require('fs'); @@ -657,7 +657,7 @@ describe('integration tests:', function () { } }, 1000); var p = new BlueBirdPromise(function () {}); - p.cancellable(); + p.cancel(); return p; }); }); diff --git a/test/util/util.js b/test/util/util.js index 095e11e1..1b036700 100755 --- a/test/util/util.js +++ b/test/util/util.js @@ -1,4 +1,4 @@ -var Vantage = require('../../'); +var Vorpal = require('../../dist/vorpal'); var _ = require('lodash'); var path = require('path'); @@ -14,7 +14,7 @@ module.exports = { }); for (var i = 0; i < options.ports.length; ++i) { - var vorpal = new Vantage(); + var vorpal = new Vorpal(); var port = options.ports[i]; vorpal .delimiter(port + ':') diff --git a/test/vorpal.js b/test/vorpal.js index 87e43a45..ab089ca4 100755 --- a/test/vorpal.js +++ b/test/vorpal.js @@ -5,13 +5,20 @@ * this one. */ -var Vorpal = require('../'); +var Vorpal = require('../dist/vorpal'); var should = require('should'); var assert = require('assert'); var intercept = require('../dist/intercept'); var vorpal; +process.on('unhandledRejection', (err, p) => { + console.log('An unhandledRejection occurred'); + console.log(`Rejected Promise: ${p}`); + console.log(`Rejection: ${err}`); + console.log(err.stack); +}); + // Normalize inputs to objects. function obj(inp) { if (typeof inp === 'String') { @@ -85,6 +92,15 @@ vorpal return args; }); +vorpal + .command('defaultValues ') + .option('-s, --sound [sound]', 'Animal Sound', { + default : 'moo', + }) + .action(function (args, cb) { + return args; + }); + require('assert'); describe('argument parsing', function () { @@ -110,7 +126,7 @@ describe('argument parsing', function () { it('should throw help when not passed a required arg', function () { mute(); - var fixture = '\n Missing required argument. Showing Help:'; + var fixture = ' \nMissing required argument. Showing Help: '; vorpal.execSync('required').should.equal(fixture); unmute(); }); @@ -279,13 +295,27 @@ describe('option parsing', function () { }); it('should throw help on a required option without an arg', function () { - var fixture = "\n Missing required value for option --required. Showing Help:"; + var fixture = " \nMissing required value for option --required. Showing Help: "; mute(); vorpal.execSync('foo -r').should.equal(fixture); unmute(); }); }); + describe('options with default values', function () { + it('should allow for default values', function () { + var fixture = obj({ options: { sound: 'moo' }, animal: 'cow' }); + + obj(vorpal.execSync('defaultValues cow')).should.equal(fixture); + }); + + it('should allow for overwriting the default values', function () { + var fixture = obj({ options: { sound: 'bark' }, animal: 'dog' }); + + obj(vorpal.execSync('defaultValues --sound bark dog')).should.equal(fixture); + }); + }); + describe('negated options', function () { it('should make a boolean option false', function () { var fixture = obj({ options: { bool: false }, args: ['cows'] }); @@ -303,14 +333,14 @@ describe('option parsing', function () { }); it('should return help on a required option', function () { - var fixture = "\n Missing required value for option --required. Showing Help:"; + var fixture = " \nMissing required value for option --required. Showing Help: "; mute(); vorpal.execSync('foo --no-required cows').should.equal(fixture); unmute(); }); it('should throw help on an unknown option', function() { - var fixture = "\n Invalid option: 'unknown'. Showing Help:"; + var fixture = " \nInvalid option: 'unknown'. Showing Help: "; vorpal.execSync('foo --unknown').should.equal(fixture); }); @@ -320,7 +350,7 @@ describe('option parsing', function () { }); it('should allow the allowUnknownOptions state to be set with a boolean', function() { - var fixture = "\n Invalid option: 'unknown'. Showing Help:"; + var fixture = " \nInvalid option: 'unknown'. Showing Help: "; vorpal.execSync('baz --unknown').should.equal(fixture); }); }); diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..792ce395 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4678 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@milesj/build-tool-config@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@milesj/build-tool-config/-/build-tool-config-0.15.0.tgz#b3259538befa7efa2e32f77430cff1aabef0889a" + dependencies: + babel-cli "^6.24.1" + babel-eslint "^7.2.0" + babel-jest "^20.0.3" + babel-plugin-external-helpers "^6.22.0" + babel-plugin-transform-dev "^2.0.0" + babel-plugin-transform-export-extensions "^6.22.0" + babel-plugin-transform-runtime "^6.23.0" + babel-preset-env "^1.6.0" + babel-preset-flow "^6.23.0" + babel-preset-react "^6.24.1" + babel-preset-stage-2 "^6.24.1" + babel-runtime "^6.23.0" + copy "^0.3.0" + enzyme "^2.9.1" + eslint "^3.19.0" + eslint-config-airbnb "^15.0.2" + eslint-plugin-flowtype "2.34.1" + eslint-plugin-import "^2.6.1" + eslint-plugin-jest "^20.0.3" + eslint-plugin-jsx-a11y "^5.1.1" + eslint-plugin-promise "^3.5.0" + eslint-plugin-react "^7.1.0" + eslint-plugin-unicorn "^2.1.2" + flow-bin "^0.49.1" + jest "^20.0.4" + json5 "^0.5.1" + react "^15.6.1" + react-dom "^15.6.1" + react-test-renderer "^15.6.1" + rimraf "^2.6.1" + rollup "^0.45.2" + rollup-plugin-babel "^2.7.1" + rollup-plugin-commonjs "^8.0.2" + rollup-plugin-json "^2.3.0" + rollup-plugin-node-resolve "^3.0.0" + rollup-plugin-replace "^1.1.1" + rollup-plugin-uglify "^2.0.1" + rollup-watch "^4.3.1" + yargs-parser "^7.0.0" + +abab@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + +abbrev@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" + +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.1, acorn@^4.0.4: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +acorn@^5.0.1: + version "5.0.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" + +ajv-keywords@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + +ajv@^4.7.0, ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escapes@^1.0.0, ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-escapes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" + +ansi-green@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-green/-/ansi-green-0.1.1.tgz#8a5d9a979e458d57c40e33580b37390b8e10d0f7" + dependencies: + ansi-wrap "0.1.0" + +ansi-regex@^2.0.0, ansi-regex@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.0.0.tgz#5404e93a544c4fec7f048262977bebfe3155e0c1" + dependencies: + color-convert "^1.0.0" + +ansi-styles@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.1.0.tgz#09c202d5c917ec23188caa5c9cb9179cd9547750" + dependencies: + color-convert "^1.0.0" + +ansi-wrap@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" + +anymatch@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + dependencies: + arrify "^1.0.0" + micromatch "^2.1.5" + +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + dependencies: + default-require-extensions "^1.0.0" + +aproba@^1.0.3: + version "1.1.1" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +aria-query@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.7.0.tgz#4af10a1e61573ddea0cf3b99b51c52c05b424d24" + dependencies: + ast-types-flow "0.0.7" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0, arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asap@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +ast-types-flow@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" + +async-array-reduce@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/async-array-reduce/-/async-array-reduce-0.2.1.tgz#c8be010a2b5cd00dea96c81116034693dfdd82d1" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.4: + version "2.4.1" + resolved "https://registry.yarnpkg.com/async/-/async-2.4.1.tgz#62a56b279c98a11d0987096a01cc3eeb8eb7bbd7" + dependencies: + lodash "^4.14.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +axobject-query@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-0.1.0.tgz#62f59dbc59c9f9242759ca349960e7a2fe3c36c0" + dependencies: + ast-types-flow "0.0.7" + +babel-cli@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.24.1.tgz#207cd705bba61489b2ea41b5312341cf6aca2283" + dependencies: + babel-core "^6.24.1" + babel-polyfill "^6.23.0" + babel-register "^6.24.1" + babel-runtime "^6.22.0" + commander "^2.8.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.0.0" + glob "^7.0.0" + lodash "^4.2.0" + output-file-sync "^1.1.0" + path-is-absolute "^1.0.0" + slash "^1.0.0" + source-map "^0.5.0" + v8flags "^2.0.10" + optionalDependencies: + chokidar "^1.6.1" + +babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" + dependencies: + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +babel-core@6, babel-core@^6.0.0, babel-core@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.1.tgz#8c428564dce1e1f41fb337ec34f4c3b022b5ad83" + dependencies: + babel-code-frame "^6.22.0" + babel-generator "^6.24.1" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babylon "^6.11.0" + convert-source-map "^1.1.0" + debug "^2.1.1" + json5 "^0.5.0" + lodash "^4.2.0" + minimatch "^3.0.2" + path-is-absolute "^1.0.0" + private "^0.1.6" + slash "^1.0.0" + source-map "^0.5.0" + +babel-eslint@^7.2.0: + version "7.2.3" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" + dependencies: + babel-code-frame "^6.22.0" + babel-traverse "^6.23.1" + babel-types "^6.23.0" + babylon "^6.17.0" + +babel-generator@^6.18.0, babel-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.1.tgz#e715f486c58ded25649d888944d52aa07c5d9497" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.2.0" + source-map "^0.5.0" + trim-right "^1.0.1" + +babel-helper-bindify-decorators@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-builder-react-jsx@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.24.1.tgz#0ad7917e33c8d751e646daca4e77cc19377d2cbc" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + esutils "^2.0.0" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz#7a9747f258d8947d32d515f6aa1c7bd02204a080" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-explode-class@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb" + dependencies: + babel-helper-bindify-decorators "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz#d36e22fab1008d79d88648e32116868128456ce8" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-20.0.3.tgz#e4a03b13dc10389e140fc645d09ffc4ced301671" + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^4.0.0" + babel-preset-jest "^20.0.3" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-external-helpers@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz#2285f48b02bd5dede85175caf8c62e86adccefa1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-istanbul@^4.0.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.3.tgz#6ee6280410dcf59c7747518c3dfd98680958f102" + dependencies: + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.1" + test-exclude "^4.1.0" + +babel-plugin-jest-hoist@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz#afedc853bd3f8dc3548ea671fbe69d03cc2c1767" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-syntax-async-generators@^6.5.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" + +babel-plugin-syntax-class-properties@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" + +babel-plugin-syntax-decorators@^6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" + +babel-plugin-syntax-dynamic-import@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-export-extensions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" + +babel-plugin-syntax-flow@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" + +babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-async-generator-functions@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-generators "^6.5.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-class-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" + dependencies: + babel-helper-function-name "^6.24.1" + babel-plugin-syntax-class-properties "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-decorators@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d" + dependencies: + babel-helper-explode-class "^6.24.1" + babel-plugin-syntax-decorators "^6.13.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-dev@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-dev/-/babel-plugin-transform-dev-2.0.0.tgz#7a0bb173ab32455de8d38042755b444abcca7743" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.9.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-exponentiation-operator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-export-extensions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" + dependencies: + babel-plugin-syntax-export-extensions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-flow-strip-types@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" + dependencies: + babel-plugin-syntax-flow "^6.18.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz#875d6bc9be761c58a2ae3feee5dc4895d8c7f921" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-display-name@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.23.0.tgz#4398910c358441dc4cef18787264d0412ed36b37" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-self@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-source@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" + dependencies: + babel-helper-builder-react-jsx "^6.24.1" + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" + dependencies: + regenerator-transform "0.9.11" + +babel-plugin-transform-runtime@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-polyfill@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" + dependencies: + babel-runtime "^6.22.0" + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-preset-env@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.0.tgz#2de1c782a780a0a5d605d199c957596da43c44e4" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^2.1.2" + invariant "^2.2.2" + semver "^5.3.0" + +babel-preset-flow@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" + dependencies: + babel-plugin-transform-flow-strip-types "^6.22.0" + +babel-preset-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz#cbacaadecb5d689ca1e1de1360ebfc66862c178a" + dependencies: + babel-plugin-jest-hoist "^20.0.3" + +babel-preset-react@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" + dependencies: + babel-plugin-syntax-jsx "^6.3.13" + babel-plugin-transform-react-display-name "^6.23.0" + babel-plugin-transform-react-jsx "^6.24.1" + babel-plugin-transform-react-jsx-self "^6.22.0" + babel-plugin-transform-react-jsx-source "^6.22.0" + babel-preset-flow "^6.23.0" + +babel-preset-stage-2@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1" + dependencies: + babel-plugin-syntax-dynamic-import "^6.18.0" + babel-plugin-transform-class-properties "^6.24.1" + babel-plugin-transform-decorators "^6.24.1" + babel-preset-stage-3 "^6.24.1" + +babel-preset-stage-3@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395" + dependencies: + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-generator-functions "^6.24.1" + babel-plugin-transform-async-to-generator "^6.24.1" + babel-plugin-transform-exponentiation-operator "^6.24.1" + babel-plugin-transform-object-rest-spread "^6.22.0" + +babel-register@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" + dependencies: + babel-core "^6.24.1" + babel-runtime "^6.22.0" + core-js "^2.4.0" + home-or-tmp "^2.0.0" + lodash "^4.2.0" + mkdirp "^0.5.1" + source-map-support "^0.4.2" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-template@^6.16.0, babel-template@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babylon "^6.11.0" + lodash "^4.2.0" + +babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695" + dependencies: + babel-code-frame "^6.22.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + babylon "^6.15.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" + dependencies: + babel-runtime "^6.22.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + +babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0, babylon@^6.17.0: + version "6.17.1" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.1.tgz#17f14fddf361b695981fe679385e4f1c01ebd86f" + +balanced-match@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +binary-extensions@^1.0.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +bluebird@^3.4.1, bluebird@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browser-resolve@^1.11.0, browser-resolve@^1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +browser-stdout@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" + +browserslist@^2.1.2: + version "2.1.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.1.4.tgz#cc526af4a1312b7d2e05653e56d0c8ab70c0e053" + dependencies: + caniuse-lite "^1.0.30000670" + electron-to-chromium "^1.3.11" + +bser@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" + dependencies: + node-int64 "^0.4.0" + +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + +buffer-shims@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +builtin-modules@^1.0.0, builtin-modules@^1.1.0, builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + +caniuse-lite@^1.0.30000670: + version "1.0.30000671" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000671.tgz#c206c2f1a1feb34de46064407c4356818389bf1e" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.0.1.tgz#dbec49436d2ae15f536114e76d14656cdbc0f44d" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + +cheerio@^0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash.assignin "^4.0.9" + lodash.bind "^4.1.4" + lodash.defaults "^4.0.1" + lodash.filter "^4.4.0" + lodash.flatten "^4.2.0" + lodash.foreach "^4.3.0" + lodash.map "^4.4.0" + lodash.merge "^4.4.0" + lodash.pick "^4.2.1" + lodash.reduce "^4.4.0" + lodash.reject "^4.4.0" + lodash.some "^4.4.0" + +chokidar@^1.6.1, chokidar@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +ci-info@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" + +circular-json@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + +cli-cursor@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + dependencies: + restore-cursor "^1.0.1" + +cli-cursor@^2.0.0, cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.0.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@2.9.0, commander@^2.8.1, commander@~2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.5.2: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + +content-type-parser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" + +convert-source-map@^1.1.0, convert-source-map@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +copy@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/copy/-/copy-0.3.0.tgz#0d5fda5e063d2dedf992b78ac060a0820caeeff3" + dependencies: + async-each "^1.0.0" + bluebird "^3.4.1" + extend-shallow "^2.0.1" + file-contents "^0.3.1" + glob-parent "^2.0.0" + graceful-fs "^4.1.4" + has-glob "^0.1.1" + is-absolute "^0.2.5" + lazy-cache "^2.0.1" + log-ok "^0.1.1" + matched "^0.4.1" + mkdirp "^0.5.1" + resolve-dir "^0.1.0" + to-file "^0.2.0" + +core-js@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + +core-js@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +create-react-class@^15.6.0: + version "15.6.0" + resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.0.tgz#ab448497c26566e1e29413e883207d57cfe7bed4" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + object-assign "^4.1.1" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-what@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" + +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + +damerau-levenshtein@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +debug@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +debug@2.6.0, debug@^2.1.1, debug@^2.2.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" + dependencies: + ms "0.7.2" + +debug@^2.6.3, debug@^2.6.8: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-extend@~0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + dependencies: + strip-bom "^2.0.0" + +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + dependencies: + is-descriptor "^0.1.0" + +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +diff@3.2.0, diff@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" + +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +doctrine@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +dom-serializer@0, dom-serializer@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domelementtype@1, domelementtype@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domhandler@^2.3.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259" + dependencies: + domelementtype "1" + +domutils@1.5.1, domutils@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +electron-to-chromium@^1.3.11: + version "1.3.11" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.11.tgz#744761df1d67b492b322ce9aa0aba5393260eb61" + +emoji-regex@^6.1.0: + version "6.4.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.4.2.tgz#a30b6fee353d406d96cfb9fa765bdc82897eff6e" + +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + dependencies: + iconv-lite "~0.4.13" + +entities@^1.1.1, entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +enzyme@^2.9.1: + version "2.9.1" + resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-2.9.1.tgz#07d5ce691241240fb817bf2c4b18d6e530240df6" + dependencies: + cheerio "^0.22.0" + function.prototype.name "^1.0.0" + is-subset "^0.1.1" + lodash "^4.17.4" + object-is "^1.0.1" + object.assign "^4.0.4" + object.entries "^1.0.4" + object.values "^1.0.4" + prop-types "^15.5.10" + uuid "^3.0.1" + +"errno@>=0.1.1 <0.2.0-0": + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.6.1, es-abstract@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.0" + is-callable "^1.1.3" + is-regex "^1.0.3" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + +es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.21" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.21.tgz#19a725f9e51d0300bbc1e8e821109fd9daf55925" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@^1.6.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-config-airbnb-base@^11.2.0: + version "11.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.2.0.tgz#19a9dc4481a26f70904545ec040116876018f853" + +eslint-config-airbnb@^15.0.2: + version "15.0.2" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-15.0.2.tgz#7b99fa421d0c15aee3310d647644315b02ea24da" + dependencies: + eslint-config-airbnb-base "^11.2.0" + +eslint-import-resolver-node@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz#4422574cde66a9a7b099938ee4d508a199e0e3cc" + dependencies: + debug "^2.6.8" + resolve "^1.2.0" + +eslint-module-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.0.0.tgz#a6f8c21d901358759cdc35dbac1982ae1ee58bce" + dependencies: + debug "2.2.0" + pkg-dir "^1.0.0" + +eslint-plugin-flowtype@2.34.1: + version "2.34.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.34.1.tgz#ea109175645b05d37baeac53b9b65066d79b9446" + dependencies: + lodash "^4.15.0" + +eslint-plugin-import@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.6.1.tgz#f580be62bb809421d46e338372764afcc9f59bf6" + dependencies: + builtin-modules "^1.1.1" + contains-path "^0.1.0" + debug "^2.6.8" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.1" + eslint-module-utils "^2.0.0" + has "^1.0.1" + lodash.cond "^4.3.0" + minimatch "^3.0.3" + read-pkg-up "^2.0.0" + +eslint-plugin-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-20.0.3.tgz#ec15eba6ac0ab44a67ebf6e02672ca9d7e7cba29" + +eslint-plugin-jsx-a11y@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.1.1.tgz#5c96bb5186ca14e94db1095ff59b3e2bd94069b1" + dependencies: + aria-query "^0.7.0" + array-includes "^3.0.3" + ast-types-flow "0.0.7" + axobject-query "^0.1.0" + damerau-levenshtein "^1.0.0" + emoji-regex "^6.1.0" + jsx-ast-utils "^1.4.0" + +eslint-plugin-promise@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz#78fbb6ffe047201627569e85a6c5373af2a68fca" + +eslint-plugin-react@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.1.0.tgz#27770acf39f5fd49cd0af4083ce58104eb390d4c" + dependencies: + doctrine "^2.0.0" + has "^1.0.1" + jsx-ast-utils "^1.4.1" + +eslint-plugin-unicorn@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-2.1.2.tgz#99dffe9f4773b04bc39356a7febd64dd700274bc" + dependencies: + import-modules "^1.1.0" + lodash.camelcase "^4.1.1" + lodash.kebabcase "^4.0.1" + lodash.snakecase "^4.0.1" + lodash.upperfirst "^4.2.0" + +eslint@^3.19.0: + version "3.19.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" + dependencies: + babel-code-frame "^6.16.0" + chalk "^1.1.3" + concat-stream "^1.5.2" + debug "^2.1.1" + doctrine "^2.0.0" + escope "^3.6.0" + espree "^3.4.0" + esquery "^1.0.0" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + glob "^7.0.3" + globals "^9.14.0" + ignore "^3.2.0" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.7.5" + strip-bom "^3.0.0" + strip-json-comments "~2.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" + +espree@^3.4.0: + version "3.4.3" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" + dependencies: + acorn "^5.0.1" + acorn-jsx "^3.0.0" + +esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + +esquery@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + dependencies: + estraverse "^4.0.0" + +esrecurse@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + dependencies: + estraverse "~4.1.0" + object-assign "^4.0.1" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +estraverse@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" + +estree-walker@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" + +estree-walker@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa" + +esutils@^2.0.0, esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + +exec-sh@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" + dependencies: + merge "^1.1.3" + +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +expand-tilde@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" + dependencies: + os-homedir "^1.0.1" + +extend-shallow@^2.0.0, extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +external-editor@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" + dependencies: + iconv-lite "^0.4.17" + jschardet "^1.4.2" + tmp "^0.0.31" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +fb-watchman@^1.8.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" + dependencies: + bser "1.0.2" + +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + +fbjs@^0.8.9: + version "0.8.12" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04" + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.9" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + +file-contents@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/file-contents/-/file-contents-0.2.4.tgz#0506f7b8eff62afa45ae45da4df9e9d47df453cb" + dependencies: + extend-shallow "^2.0.0" + file-stat "^0.1.0" + graceful-fs "^4.1.2" + is-buffer "^1.1.0" + is-utf8 "^0.2.0" + lazy-cache "^0.2.3" + through2 "^2.0.0" + +file-contents@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/file-contents/-/file-contents-0.3.2.tgz#a0939fed1b8cda1580266fc6b753a232fb46de53" + dependencies: + define-property "^0.2.5" + extend-shallow "^2.0.1" + file-stat "^0.2.3" + fs-exists-sync "^0.1.0" + graceful-fs "^4.1.4" + is-buffer "^1.1.3" + isobject "^2.1.0" + lazy-cache "^2.0.1" + strip-bom-buffer "^0.1.1" + strip-bom-string "^0.1.2" + through2 "^2.0.1" + vinyl "^1.1.1" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +file-stat@^0.1.0: + version "0.1.3" + resolved "https://registry.yarnpkg.com/file-stat/-/file-stat-0.1.3.tgz#d0f1961d7d10732928120a6e6955471c2a5b5411" + dependencies: + graceful-fs "^4.1.2" + lazy-cache "^0.2.3" + through2 "^2.0.0" + +file-stat@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/file-stat/-/file-stat-0.2.3.tgz#469a7e927d6930079624cdb38109405456cb06a9" + dependencies: + fs-exists-sync "^0.1.0" + graceful-fs "^4.1.4" + lazy-cache "^2.0.1" + through2 "^2.0.1" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +flat-cache@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +flow-bin@^0.49.1: + version "0.49.1" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.49.1.tgz#c9e456b3173a7535a4ffaf28956352c63bb8e3e9" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + +fs-readdir-recursive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.1.tgz#f19fd28f43eeaf761680e519a203c4d0b3d31aff" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.29" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.0.2, function-bind@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" + +function.prototype.name@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.0.0.tgz#5f523ca64e491a5f95aba80cc1e391080a14482e" + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.0" + is-callable "^1.1.2" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@7.1.1, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-modules@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" + dependencies: + global-prefix "^0.1.4" + is-windows "^0.2.0" + +global-prefix@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.5.tgz#8d3bc6b8da3ca8112a160d8d496ff0462bfef78f" + dependencies: + homedir-polyfill "^1.0.0" + ini "^1.3.4" + is-windows "^0.2.0" + which "^1.2.12" + +globals@^9.0.0, globals@^9.14.0: + version "9.17.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +growl@1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + +handlebars@^4.0.3: + version "4.0.10" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-glob@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/has-glob/-/has-glob-0.1.1.tgz#a261c4c2a6c667e0c77b700a7f297c39ef3aa589" + dependencies: + is-glob "^2.0.1" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +homedir-polyfill@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" + dependencies: + parse-passwd "^1.0.0" + +hosted-git-info@^2.1.4: + version "2.4.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" + +html-encoding-sniffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" + dependencies: + whatwg-encoding "^1.0.1" + +htmlparser2@^3.9.1: + version "3.9.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338" + dependencies: + domelementtype "^1.3.0" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^2.0.2" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + +iconv-lite@^0.4.17, iconv-lite@~0.4.13: + version "0.4.17" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.17.tgz#4fdaa3b38acbc2c031b045d0edcdfe1ecab18c8d" + +ignore@^3.2.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" + +import-modules@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/import-modules/-/import-modules-1.1.0.tgz#748db79c5cc42bb9701efab424f894e72600e9dc" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@^1.3.4, ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +inquirer@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + readline2 "^1.0.1" + run-async "^0.1.0" + rx-lite "^3.1.2" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + +inquirer@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.0.tgz#45b44c2160c729d7578c54060b3eed94487bb42b" + dependencies: + ansi-escapes "^2.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + +interpret@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" + +invariant@^2.2.0, invariant@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-absolute@^0.2.5: + version "0.2.6" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.2.6.tgz#20de69f3db942ef2d87b9c2da36f172235b1b5eb" + dependencies: + is-relative "^0.2.1" + is-windows "^0.2.0" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + dependencies: + kind-of "^3.0.2" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.0, is-buffer@^1.1.3, is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-callable@^1.1.1, is-callable@^1.1.2, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + +is-ci@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" + dependencies: + ci-info "^1.0.0" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + dependencies: + kind-of "^3.0.2" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + +is-descriptor@^0.1.0: + version "0.1.5" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.5.tgz#e3fb8b4ab65f3a37373388e18b401d78c58cbea7" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^3.0.2" + lazy-cache "^2.0.2" + +is-dotfile@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + +is-my-json-valid@^2.10.0: + version "2.16.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-regex@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + +is-relative@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5" + dependencies: + is-unc-path "^0.1.1" + +is-resolvable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" + dependencies: + tryit "^1.0.1" + +is-stream@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-subset@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-unc-path@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-0.1.2.tgz#6ab053a72573c10250ff416a3814c35178af39b9" + dependencies: + unc-path-regex "^0.1.0" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-valid-glob@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz#d4b55c69f51886f9b65c70d6c2622d37e29f48fe" + +is-windows@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0, isobject@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-api@^1.1.1: + version "1.1.8" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.8.tgz#a844e55c6f9aeee292e7f42942196f60b23dc93e" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.1.0" + istanbul-lib-hook "^1.0.6" + istanbul-lib-instrument "^1.7.1" + istanbul-lib-report "^1.1.0" + istanbul-lib-source-maps "^1.2.0" + istanbul-reports "^1.1.0" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.0.tgz#caca19decaef3525b5d6331d701f3f3b7ad48528" + +istanbul-lib-hook@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.6.tgz#c0866d1e81cf2d5319249510131fc16dee49231f" + dependencies: + append-transform "^0.4.0" + +istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.1.tgz#169e31bc62c778851a99439dd99c3cc12184d360" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.13.0" + istanbul-lib-coverage "^1.1.0" + semver "^5.3.0" + +istanbul-lib-report@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.0.tgz#444c4ecca9afa93cf584f56b10f195bf768c0770" + dependencies: + istanbul-lib-coverage "^1.1.0" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.0.tgz#8c7706d497e26feeb6af3e0c28fd5b0669598d0e" + dependencies: + debug "^2.6.3" + istanbul-lib-coverage "^1.1.0" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.0.tgz#1ef3b795889219cfb5fad16365f6ce108d5f8c66" + dependencies: + handlebars "^4.0.3" + +jest-changed-files@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" + +jest-cli@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.4.tgz#e532b19d88ae5bc6c417e8b0593a6fe954b1dc93" + dependencies: + ansi-escapes "^1.4.0" + callsites "^2.0.0" + chalk "^1.1.3" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + istanbul-api "^1.1.1" + istanbul-lib-coverage "^1.0.1" + istanbul-lib-instrument "^1.4.2" + istanbul-lib-source-maps "^1.1.0" + jest-changed-files "^20.0.3" + jest-config "^20.0.4" + jest-docblock "^20.0.3" + jest-environment-jsdom "^20.0.3" + jest-haste-map "^20.0.4" + jest-jasmine2 "^20.0.4" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve-dependencies "^20.0.3" + jest-runtime "^20.0.4" + jest-snapshot "^20.0.3" + jest-util "^20.0.3" + micromatch "^2.3.11" + node-notifier "^5.0.2" + pify "^2.3.0" + slash "^1.0.0" + string-length "^1.0.1" + throat "^3.0.0" + which "^1.2.12" + worker-farm "^1.3.1" + yargs "^7.0.2" + +jest-config@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.4.tgz#e37930ab2217c913605eff13e7bd763ec48faeea" + dependencies: + chalk "^1.1.3" + glob "^7.1.1" + jest-environment-jsdom "^20.0.3" + jest-environment-node "^20.0.3" + jest-jasmine2 "^20.0.4" + jest-matcher-utils "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.4" + jest-validate "^20.0.3" + pretty-format "^20.0.3" + +jest-diff@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-20.0.3.tgz#81f288fd9e675f0fb23c75f1c2b19445fe586617" + dependencies: + chalk "^1.1.3" + diff "^3.2.0" + jest-matcher-utils "^20.0.3" + pretty-format "^20.0.3" + +jest-docblock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712" + +jest-environment-jsdom@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz#048a8ac12ee225f7190417713834bb999787de99" + dependencies: + jest-mock "^20.0.3" + jest-util "^20.0.3" + jsdom "^9.12.0" + +jest-environment-node@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-20.0.3.tgz#d488bc4612af2c246e986e8ae7671a099163d403" + dependencies: + jest-mock "^20.0.3" + jest-util "^20.0.3" + +jest-haste-map@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.4.tgz#653eb55c889ce3c021f7b94693f20a4159badf03" + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.11" + jest-docblock "^20.0.3" + micromatch "^2.3.11" + sane "~1.6.0" + worker-farm "^1.3.1" + +jest-jasmine2@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz#fcc5b1411780d911d042902ef1859e852e60d5e1" + dependencies: + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-matchers "^20.0.3" + jest-message-util "^20.0.3" + jest-snapshot "^20.0.3" + once "^1.4.0" + p-map "^1.1.1" + +jest-matcher-utils@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612" + dependencies: + chalk "^1.1.3" + pretty-format "^20.0.3" + +jest-matchers@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-20.0.3.tgz#ca69db1c32db5a6f707fa5e0401abb55700dfd60" + dependencies: + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" + +jest-message-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-20.0.3.tgz#6aec2844306fcb0e6e74d5796c1006d96fdd831c" + dependencies: + chalk "^1.1.3" + micromatch "^2.3.11" + slash "^1.0.0" + +jest-mock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-20.0.3.tgz#8bc070e90414aa155c11a8d64c869a0d5c71da59" + +jest-regex-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-20.0.3.tgz#85bbab5d133e44625b19faf8c6aa5122d085d762" + +jest-resolve-dependencies@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz#6e14a7b717af0f2cb3667c549de40af017b1723a" + dependencies: + jest-regex-util "^20.0.3" + +jest-resolve@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.4.tgz#9448b3e8b6bafc15479444c6499045b7ffe597a5" + dependencies: + browser-resolve "^1.11.2" + is-builtin-module "^1.0.0" + resolve "^1.3.2" + +jest-runtime@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.4.tgz#a2c802219c4203f754df1404e490186169d124d8" + dependencies: + babel-core "^6.0.0" + babel-jest "^20.0.3" + babel-plugin-istanbul "^4.0.0" + chalk "^1.1.3" + convert-source-map "^1.4.0" + graceful-fs "^4.1.11" + jest-config "^20.0.4" + jest-haste-map "^20.0.4" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.4" + jest-util "^20.0.3" + json-stable-stringify "^1.0.1" + micromatch "^2.3.11" + strip-bom "3.0.0" + yargs "^7.0.2" + +jest-snapshot@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-20.0.3.tgz#5b847e1adb1a4d90852a7f9f125086e187c76566" + dependencies: + chalk "^1.1.3" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-util "^20.0.3" + natural-compare "^1.4.0" + pretty-format "^20.0.3" + +jest-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-20.0.3.tgz#0c07f7d80d82f4e5a67c6f8b9c3fe7f65cfd32ad" + dependencies: + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-message-util "^20.0.3" + jest-mock "^20.0.3" + jest-validate "^20.0.3" + leven "^2.1.0" + mkdirp "^0.5.1" + +jest-validate@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" + dependencies: + chalk "^1.1.3" + jest-matcher-utils "^20.0.3" + leven "^2.1.0" + pretty-format "^20.0.3" + +jest@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac" + dependencies: + jest-cli "^20.0.4" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +js-tokens@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" + +js-yaml@^3.5.1, js-yaml@^3.7.0: + version "3.8.4" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" + dependencies: + argparse "^1.0.7" + esprima "^3.1.1" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jschardet@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.4.2.tgz#2aa107f142af4121d145659d44f50830961e699a" + +jsdom@^9.12.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json3@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +json5@^0.5.0, json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + +jsprim@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" + dependencies: + assert-plus "1.0.0" + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +jsx-ast-utils@^1.4.0, jsx-ast-utils@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^0.2.3: + version "0.2.7" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-0.2.7.tgz#7feddf2dcb6edb77d11ef1d117ab5ffdf0ab1b65" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lazy-cache@^2.0.1, lazy-cache@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" + dependencies: + set-getter "^0.1.0" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +leven@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash._baseassign@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" + dependencies: + lodash._basecopy "^3.0.0" + lodash.keys "^3.0.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basecreate@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash.assignin@^4.0.9: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" + +lodash.bind@^4.1.4: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" + +lodash.camelcase@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + +lodash.cond@^4.3.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" + +lodash.create@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" + dependencies: + lodash._baseassign "^3.0.0" + lodash._basecreate "^3.0.0" + lodash._isiterateecall "^3.0.0" + +lodash.defaults@^4.0.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + +lodash.filter@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" + +lodash.flatten@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + +lodash.foreach@^4.3.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.kebabcase@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.map@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" + +lodash.merge@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5" + +lodash.pick@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + +lodash.reduce@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" + +lodash.reject@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" + +lodash.snakecase@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" + +lodash.some@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + +lodash.upperfirst@^4.2.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" + +lodash@^3.10.0: + version "3.10.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + +lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +log-ok@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/log-ok/-/log-ok-0.1.1.tgz#bea3dd36acd0b8a7240d78736b5b97c65444a334" + dependencies: + ansi-green "^0.1.1" + success-symbol "^0.1.0" + +log-update@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-2.0.0.tgz#7f4354d7be1be62b724fcbb3c4b94454c0db5e26" + dependencies: + ansi-escapes "^1.0.0" + cli-cursor "^2.0.0" + wrap-ansi "^2.1.0" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +magic-string@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.15.2.tgz#0681d7388741bbc3addaa65060992624c6c09e9c" + dependencies: + vlq "^0.2.1" + +magic-string@^0.19.0: + version "0.19.1" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.19.1.tgz#14d768013caf2ec8fdea16a49af82fc377e75201" + dependencies: + vlq "^0.2.1" + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + +matched@^0.4.1: + version "0.4.4" + resolved "https://registry.yarnpkg.com/matched/-/matched-0.4.4.tgz#56d7b7eb18033f0cf9bc52eb2090fac7dc1e89fa" + dependencies: + arr-union "^3.1.0" + async-array-reduce "^0.2.0" + extend-shallow "^2.0.1" + fs-exists-sync "^0.1.0" + glob "^7.0.5" + has-glob "^0.1.1" + is-valid-glob "^0.3.0" + lazy-cache "^2.0.1" + resolve-dir "^0.1.0" + +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +micromatch@^2.1.5, micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" + dependencies: + mime-db "~1.27.0" + +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8, minimist@~0.0.1: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.1, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +mocha@^3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.4.2.tgz#d0ef4d332126dbf18d0d640c9b382dd48be97594" + dependencies: + browser-stdout "1.3.0" + commander "2.9.0" + debug "2.6.0" + diff "3.2.0" + escape-string-regexp "1.0.5" + glob "7.1.1" + growl "1.9.2" + json3 "3.3.2" + lodash.create "3.1.1" + mkdirp "0.5.1" + supports-color "3.1.2" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +mute-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + +nan@^2.3.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +node-fetch@^1.0.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.0.tgz#3ff6c56544f9b7fb00682338bb55ee6f54a8a0ef" + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + +node-localstorage@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/node-localstorage/-/node-localstorage-1.3.0.tgz#2e436aae8dcc9ace97b43c65c16c0d577be0a55c" + dependencies: + write-file-atomic "^1.1.4" + +node-notifier@^5.0.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" + dependencies: + growly "^1.3.0" + semver "^5.3.0" + shellwords "^0.1.0" + which "^1.2.12" + +node-pre-gyp@^0.6.29: + version "0.6.34" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.34.tgz#94ad1c798a11d7fc67381b50d47f8cc18d9799f7" + dependencies: + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "^2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2: + version "2.3.8" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npmlog@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.0.tgz#dc59bee85f64f00ed424efb2af0783df25d1c0b5" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +nth-check@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" + dependencies: + boolbase "~1.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.0.tgz#b4389362170e7ef9798c3c7716d80ebc0106fccf" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-is@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6" + +object-keys@^1.0.10, object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + +object.assign@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.0.4.tgz#b1c9cc044ef1b9fe63606fc141abbb32e14730cc" + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.0" + object-keys "^1.0.10" + +object.entries@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.6.1" + function-bind "^1.1.0" + has "^1.0.1" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.values@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.6.1" + function-bind "^1.1.0" + has "^1.0.1" + +once@^1.3.0, once@^1.3.3, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1, optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +output-file-sync@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" + dependencies: + graceful-fs "^4.1.4" + mkdirp "^0.5.1" + object-assign "^4.1.0" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +p-map@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.1.1.tgz#05f5e4ae97a068371bc2a5cc86bfbdbc19c4ae7a" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + dependencies: + find-up "^1.0.0" + +pluralize@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-format@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14" + dependencies: + ansi-regex "^2.1.1" + ansi-styles "^3.0.0" + +private@^0.1.6: + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +progress@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +promise@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf" + dependencies: + asap "~2.0.3" + +prop-types@^15.5.10: + version "15.5.10" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +randomatic@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +rc@^1.1.7: + version "1.2.1" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-dom@^15.6.1: + version "15.6.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.1.tgz#2cb0ed4191038e53c209eb3a79a23e2a4cf99470" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.1.0" + object-assign "^4.1.0" + prop-types "^15.5.10" + +react-test-renderer@^15.6.1: + version "15.6.1" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-15.6.1.tgz#026f4a5bb5552661fd2cc4bbcd0d4bc8a35ebf7e" + dependencies: + fbjs "^0.8.9" + object-assign "^4.1.0" + +react@^15.6.1: + version "15.6.1" + resolved "https://registry.yarnpkg.com/react/-/react-15.6.1.tgz#baa8434ec6780bde997cdc380b79cd33b96393df" + dependencies: + create-react-class "^15.6.0" + fbjs "^0.8.9" + loose-envify "^1.1.0" + object-assign "^4.1.0" + prop-types "^15.5.10" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2: + version "2.2.9" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" + dependencies: + buffer-shims "~1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~1.0.0" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +readline2@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + mute-stream "0.0.5" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +regenerate@^1.2.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + +regenerator-runtime@^0.10.0: + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + +regenerator-transform@0.9.11: + version "0.9.11" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +remove-trailing-separator@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + +request@^2.79.0, request@^2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +require-relative@0.8.7: + version "0.8.7" + resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" + +require-uncached@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +resolve-dir@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" + dependencies: + expand-tilde "^1.2.2" + global-modules "^0.2.3" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.2.0, resolve@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" + dependencies: + path-parse "^1.0.5" + +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +rollup-plugin-babel@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-2.7.1.tgz#16528197b0f938a1536f44683c7a93d573182f57" + dependencies: + babel-core "6" + babel-plugin-transform-es2015-classes "^6.9.0" + object-assign "^4.1.0" + rollup-pluginutils "^1.5.0" + +rollup-plugin-commonjs@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.0.2.tgz#98b1589bfe32a6c0f67790b60c0b499972afed89" + dependencies: + acorn "^4.0.1" + estree-walker "^0.3.0" + magic-string "^0.19.0" + resolve "^1.1.7" + rollup-pluginutils "^2.0.1" + +rollup-plugin-json@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-2.3.0.tgz#3c07a452c1b5391be28006fbfff3644056ce0add" + dependencies: + rollup-pluginutils "^2.0.1" + +rollup-plugin-node-resolve@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.0.0.tgz#8b897c4c3030d5001277b0514b25d2ca09683ee0" + dependencies: + browser-resolve "^1.11.0" + builtin-modules "^1.1.0" + is-module "^1.0.0" + resolve "^1.1.6" + +rollup-plugin-replace@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-1.1.1.tgz#396315ded050a6ce43b9518a886a3f60efb1ea33" + dependencies: + magic-string "^0.15.2" + minimatch "^3.0.2" + rollup-pluginutils "^1.5.0" + +rollup-plugin-uglify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-2.0.1.tgz#67b37ad1efdafbd83af4c36b40c189ee4866c969" + dependencies: + uglify-js "^3.0.9" + +rollup-pluginutils@^1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" + dependencies: + estree-walker "^0.2.1" + minimatch "^3.0.2" + +rollup-pluginutils@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0" + dependencies: + estree-walker "^0.3.0" + micromatch "^2.3.11" + +rollup-watch@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/rollup-watch/-/rollup-watch-4.3.1.tgz#5aa1eaeab787addf368905d102b39d6fc5ce4a8b" + dependencies: + chokidar "^1.7.0" + require-relative "0.8.7" + rollup-pluginutils "^2.0.1" + +rollup@^0.45.2: + version "0.45.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.45.2.tgz#63a284c2b31234656f24e9e9717fabb6a7f0fa43" + dependencies: + source-map-support "^0.4.0" + +run-async@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" + dependencies: + once "^1.3.0" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + dependencies: + is-promise "^2.1.0" + +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + +rx-lite@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + +safe-buffer@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + +sane@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.6.0.tgz#9610c452307a135d29c1fdfe2547034180c46775" + dependencies: + anymatch "^1.3.0" + exec-sh "^0.2.0" + fb-watchman "^1.8.0" + minimatch "^3.0.2" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.10.0" + +sax@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-getter@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" + dependencies: + to-object-path "^0.3.0" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +shelljs@^0.7.5: + version "0.7.7" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +shellwords@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" + +should-equal@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-1.0.1.tgz#0b6e9516f2601a9fb0bb2dcc369afa1c7e200af7" + dependencies: + should-type "^1.0.0" + +should-format@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1" + dependencies: + should-type "^1.3.0" + should-type-adaptors "^1.0.1" + +should-type-adaptors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.0.1.tgz#efe5553cdf68cff66e5c5f51b712dc351c77beaa" + dependencies: + should-type "^1.3.0" + should-util "^1.0.0" + +should-type@^1.0.0, should-type@^1.3.0, should-type@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3" + +should-util@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.0.tgz#c98cda374aa6b190df8ba87c9889c2b4db620063" + +should@^11.2.1: + version "11.2.1" + resolved "https://registry.yarnpkg.com/should/-/should-11.2.1.tgz#90f55145552d01cfc200666e4e818a1c9670eda2" + dependencies: + should-equal "^1.0.0" + should-format "^3.0.2" + should-type "^1.4.0" + should-type-adaptors "^1.0.1" + should-util "^1.0.0" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +slice-ansi@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.3.tgz#9ee38472a17a9f0f72e7ebc9ec0c328c39dc4a8b" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + +slide@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +source-map-support@^0.4.0, source-map-support@^0.4.2: + version "0.4.15" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" + dependencies: + source-map "^0.5.6" + +source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.0.tgz#ff2a3e4fd04497555fed97b39a0fd82fafb3a33c" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +string-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^3.0.0" + +string-width@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.0.tgz#030664561fc146c9423ec7d978fe2457437fe6d0" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.1.tgz#62e200f039955a6810d8df0a33ffc0f013662d98" + dependencies: + safe-buffer "^5.0.1" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom-buffer@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/strip-bom-buffer/-/strip-bom-buffer-0.1.1.tgz#ca3ddc4919c13f9fddf30b1dff100a9835248b4d" + dependencies: + is-buffer "^1.1.0" + is-utf8 "^0.2.0" + +strip-bom-string@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-0.1.2.tgz#9c6e720a313ba9836589518405ccfb88a5f41b9c" + +strip-bom@3.0.0, strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +success-symbol@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/success-symbol/-/success-symbol-0.1.0.tgz#24022e486f3bf1cdca094283b769c472d3b72897" + +supports-color@3.1.2, supports-color@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" + dependencies: + has-flag "^1.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.1.0.tgz#92cc14bb3dad8928ca5656c33e19a19f20af5c7a" + dependencies: + has-flag "^2.0.0" + +symbol-tree@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + +table@^3.7.8: + version "3.8.3" + resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + +tar-pack@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +test-exclude@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.0.tgz#04ca70b7390dd38c98d4a003a173806ca7991c91" + dependencies: + arrify "^1.0.1" + micromatch "^2.3.11" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +throat@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" + +through2@^2.0.0, through2@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +tmp@^0.0.31: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" + dependencies: + os-tmpdir "~1.0.1" + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + +to-fast-properties@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +to-file@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/to-file/-/to-file-0.2.0.tgz#236c6c088065e570defbd15cf4b4e565be46ea93" + dependencies: + define-property "^0.2.5" + extend-shallow "^2.0.1" + file-contents "^0.2.4" + glob-parent "^2.0.0" + is-valid-glob "^0.3.0" + isobject "^2.1.0" + lazy-cache "^2.0.1" + vinyl "^1.1.1" + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + dependencies: + kind-of "^3.0.2" + +tough-cookie@^2.3.2, tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tryit@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +ua-parser-js@^0.7.9: + version "0.7.12" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb" + +uglify-js@^2.6: + version "2.8.27" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.27.tgz#47787f912b0f242e5b984343be8e35e95f694c9c" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-js@^3.0.9: + version "3.0.11" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.11.tgz#81f594b9a24dad76e39da92f8f06e5b3bc8c2e11" + dependencies: + commander "~2.9.0" + source-map "~0.5.1" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +unc-path-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + +user-home@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + dependencies: + os-homedir "^1.0.0" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +uuid@^3.0.0, uuid@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + +v8flags@^2.0.10: + version "2.1.1" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" + dependencies: + user-home "^1.1.1" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +vinyl@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vlq@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.2.tgz#e316d5257b40b86bb43cb8d5fea5d7f54d6b0ca1" + +vorpal-less@^0.0.13: + version "0.0.13" + resolved "https://registry.yarnpkg.com/vorpal-less/-/vorpal-less-0.0.13.tgz#a5adbc4fbc8ad6a150fe6d91a8996e93fd8b6418" + dependencies: + slice-ansi "0.0.3" + +vorpal-repl@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/vorpal-repl/-/vorpal-repl-1.1.8.tgz#ed1086eb073509486a1a54a76754c888bf221e81" + dependencies: + chalk "^1.1.0" + json-stringify-safe "^5.0.1" + lodash "^3.10.0" + +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +watch@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + +webidl-conversions@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" + +whatwg-encoding@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" + dependencies: + iconv-lite "0.4.13" + +whatwg-fetch@>=0.10.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" + +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which@^1.2.12: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2, wordwrap@~0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +worker-farm@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.3.1.tgz#4333112bb49b17aa050b87895ca6b2cacf40e5ff" + dependencies: + errno ">=0.1.1 <0.2.0-0" + xtend ">=4.0.0 <4.1.0-0" + +wrap-ansi@^2.0.0, wrap-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write-file-atomic@^1.1.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + slide "^1.1.5" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + dependencies: + camelcase "^3.0.0" + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + +yargs@^7.0.2: + version "7.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0"