,
+ // options?: camelcase.Options
+ // ): string;
+ // export = camelcase;
+ default: typeof camelcase;
+};
+
+export = camelcase;
diff --git a/node_modules/yargs-parser/node_modules/camelcase/index.js b/node_modules/yargs-parser/node_modules/camelcase/index.js
new file mode 100644
index 0000000000000..579f99b47f772
--- /dev/null
+++ b/node_modules/yargs-parser/node_modules/camelcase/index.js
@@ -0,0 +1,76 @@
+'use strict';
+
+const preserveCamelCase = string => {
+ let isLastCharLower = false;
+ let isLastCharUpper = false;
+ let isLastLastCharUpper = false;
+
+ for (let i = 0; i < string.length; i++) {
+ const character = string[i];
+
+ if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) {
+ string = string.slice(0, i) + '-' + string.slice(i);
+ isLastCharLower = false;
+ isLastLastCharUpper = isLastCharUpper;
+ isLastCharUpper = true;
+ i++;
+ } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) {
+ string = string.slice(0, i - 1) + '-' + string.slice(i - 1);
+ isLastLastCharUpper = isLastCharUpper;
+ isLastCharUpper = false;
+ isLastCharLower = true;
+ } else {
+ isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character;
+ isLastLastCharUpper = isLastCharUpper;
+ isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character;
+ }
+ }
+
+ return string;
+};
+
+const camelCase = (input, options) => {
+ if (!(typeof input === 'string' || Array.isArray(input))) {
+ throw new TypeError('Expected the input to be `string | string[]`');
+ }
+
+ options = Object.assign({
+ pascalCase: false
+ }, options);
+
+ const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x;
+
+ if (Array.isArray(input)) {
+ input = input.map(x => x.trim())
+ .filter(x => x.length)
+ .join('-');
+ } else {
+ input = input.trim();
+ }
+
+ if (input.length === 0) {
+ return '';
+ }
+
+ if (input.length === 1) {
+ return options.pascalCase ? input.toUpperCase() : input.toLowerCase();
+ }
+
+ const hasUpperCase = input !== input.toLowerCase();
+
+ if (hasUpperCase) {
+ input = preserveCamelCase(input);
+ }
+
+ input = input
+ .replace(/^[_.\- ]+/, '')
+ .toLowerCase()
+ .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase())
+ .replace(/\d+(\w|$)/g, m => m.toUpperCase());
+
+ return postProcess(input);
+};
+
+module.exports = camelCase;
+// TODO: Remove this for the next major release
+module.exports.default = camelCase;
diff --git a/node_modules/mem/node_modules/mimic-fn/license b/node_modules/yargs-parser/node_modules/camelcase/license
similarity index 100%
rename from node_modules/mem/node_modules/mimic-fn/license
rename to node_modules/yargs-parser/node_modules/camelcase/license
diff --git a/node_modules/yargs-parser/node_modules/camelcase/package.json b/node_modules/yargs-parser/node_modules/camelcase/package.json
new file mode 100644
index 0000000000000..560c2e1d7356f
--- /dev/null
+++ b/node_modules/yargs-parser/node_modules/camelcase/package.json
@@ -0,0 +1,75 @@
+{
+ "_from": "camelcase@^5.0.0",
+ "_id": "camelcase@5.3.1",
+ "_inBundle": false,
+ "_integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+ "_location": "/yargs-parser/camelcase",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "camelcase@^5.0.0",
+ "name": "camelcase",
+ "escapedName": "camelcase",
+ "rawSpec": "^5.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^5.0.0"
+ },
+ "_requiredBy": [
+ "/yargs-parser"
+ ],
+ "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+ "_shasum": "e3c9b31569e106811df242f715725a1f4c494320",
+ "_spec": "camelcase@^5.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs-parser",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/camelcase/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` β `fooBar`",
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.1",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/sindresorhus/camelcase#readme",
+ "keywords": [
+ "camelcase",
+ "camel-case",
+ "camel",
+ "case",
+ "dash",
+ "hyphen",
+ "dot",
+ "underscore",
+ "separator",
+ "string",
+ "text",
+ "convert",
+ "pascalcase",
+ "pascal-case"
+ ],
+ "license": "MIT",
+ "name": "camelcase",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/camelcase.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "version": "5.3.1"
+}
diff --git a/node_modules/yargs-parser/node_modules/camelcase/readme.md b/node_modules/yargs-parser/node_modules/camelcase/readme.md
new file mode 100644
index 0000000000000..fde27261b2a82
--- /dev/null
+++ b/node_modules/yargs-parser/node_modules/camelcase/readme.md
@@ -0,0 +1,99 @@
+# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase)
+
+> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` β `fooBar`
+
+---
+
+
+
+---
+
+## Install
+
+```
+$ npm install camelcase
+```
+
+
+## Usage
+
+```js
+const camelCase = require('camelcase');
+
+camelCase('foo-bar');
+//=> 'fooBar'
+
+camelCase('foo_bar');
+//=> 'fooBar'
+
+camelCase('Foo-Bar');
+//=> 'fooBar'
+
+camelCase('Foo-Bar', {pascalCase: true});
+//=> 'FooBar'
+
+camelCase('--foo.bar', {pascalCase: false});
+//=> 'fooBar'
+
+camelCase('foo bar');
+//=> 'fooBar'
+
+console.log(process.argv[3]);
+//=> '--foo-bar'
+camelCase(process.argv[3]);
+//=> 'fooBar'
+
+camelCase(['foo', 'bar']);
+//=> 'fooBar'
+
+camelCase(['__foo__', '--bar'], {pascalCase: true});
+//=> 'FooBar'
+```
+
+
+## API
+
+### camelCase(input, [options])
+
+#### input
+
+Type: `string` `string[]`
+
+String to convert to camel case.
+
+#### options
+
+Type: `Object`
+
+##### pascalCase
+
+Type: `boolean`
+Default: `false`
+
+Uppercase the first character: `foo-bar` β `FooBar`
+
+
+## Security
+
+To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+
+
+## Related
+
+- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module
+- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase
+- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string
+- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one
+
+
+## License
+
+MIT Β© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/yargs-parser/package.json b/node_modules/yargs-parser/package.json
index c4d1ca1ce5990..467593e5d9f89 100644
--- a/node_modules/yargs-parser/package.json
+++ b/node_modules/yargs-parser/package.json
@@ -1,27 +1,27 @@
{
- "_from": "yargs-parser@^9.0.2",
- "_id": "yargs-parser@9.0.2",
+ "_from": "yargs-parser@^15.0.1",
+ "_id": "yargs-parser@15.0.1",
"_inBundle": false,
- "_integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=",
+ "_integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==",
"_location": "/yargs-parser",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "yargs-parser@^9.0.2",
+ "raw": "yargs-parser@^15.0.1",
"name": "yargs-parser",
"escapedName": "yargs-parser",
- "rawSpec": "^9.0.2",
+ "rawSpec": "^15.0.1",
"saveSpec": null,
- "fetchSpec": "^9.0.2"
+ "fetchSpec": "^15.0.1"
},
"_requiredBy": [
"/yargs"
],
- "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz",
- "_shasum": "9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077",
- "_spec": "yargs-parser@^9.0.2",
- "_where": "/Users/rebecca/code/npm/node_modules/yargs",
+ "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz",
+ "_shasum": "54786af40b820dcb2fb8025b11b4d659d76323b3",
+ "_spec": "yargs-parser@^15.0.1",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs",
"author": {
"name": "Ben Coe",
"email": "ben@npmjs.com"
@@ -31,17 +31,21 @@
},
"bundleDependencies": false,
"dependencies": {
- "camelcase": "^4.1.0"
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
},
"deprecated": false,
"description": "the mighty option parser used by yargs",
"devDependencies": {
- "chai": "^3.5.0",
- "coveralls": "^2.11.12",
- "mocha": "^3.0.1",
- "nyc": "^11.4.1",
- "standard": "^10.0.2",
- "standard-version": "^4.3.0"
+ "chai": "^4.2.0",
+ "coveralls": "^3.0.2",
+ "mocha": "^5.2.0",
+ "nyc": "^14.1.0",
+ "standard": "^12.0.1",
+ "standard-version": "^6.0.0"
+ },
+ "engine": {
+ "node": ">=6"
},
"files": [
"lib",
@@ -71,5 +75,5 @@
"release": "standard-version",
"test": "nyc mocha test/*.js"
},
- "version": "9.0.2"
+ "version": "15.0.1"
}
diff --git a/node_modules/yargs/CHANGELOG.md b/node_modules/yargs/CHANGELOG.md
index 2cccca04c4113..343ffc9ab0718 100644
--- a/node_modules/yargs/CHANGELOG.md
+++ b/node_modules/yargs/CHANGELOG.md
@@ -1,11 +1,265 @@
-# Change Log
+# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-# [11.1.1](https://github.com/yargs/yargs/compare/v11.1.0...v11.1.1) (2019-10-06)
+### 14.2.2
+
+### Bug Fixes
+
+* temporary fix for libraries that call Object.freeze() ([#1483](https://www.github.com/yargs/yargs/issues/1483)) ([99c2dc8](https://www.github.com/yargs/yargs/commit/99c2dc850e67c606644f8b0c0bca1a59c87dcbcd))
+
+### [14.2.1](https://github.com/yargs/yargs/compare/v14.2.0...v14.2.1) (2019-10-30)
+
+
+### Bug Fixes
+
+* stop-parse was not being respected by commands ([#1459](https://github.com/yargs/yargs/issues/1459)) ([e78e76e](https://github.com/yargs/yargs/commit/e78e76e3ac0551d4f30c71a05ddb21582960fcef))
+
+## [14.2.0](https://github.com/yargs/yargs/compare/v14.1.0...v14.2.0) (2019-10-07)
+
+
+### Bug Fixes
+
+* async middleware was called twice ([#1422](https://github.com/yargs/yargs/issues/1422)) ([9a42b63](https://github.com/yargs/yargs/commit/9a42b63))
+* fix promise check to accept any spec conform object ([#1424](https://github.com/yargs/yargs/issues/1424)) ([0be43d2](https://github.com/yargs/yargs/commit/0be43d2))
+* groups were not being maintained for nested commands ([#1430](https://github.com/yargs/yargs/issues/1430)) ([d38650e](https://github.com/yargs/yargs/commit/d38650e))
+* **docs:** broken markdown link ([#1426](https://github.com/yargs/yargs/issues/1426)) ([236e24e](https://github.com/yargs/yargs/commit/236e24e))
+* support merging deeply nested configuration ([#1423](https://github.com/yargs/yargs/issues/1423)) ([bae66fe](https://github.com/yargs/yargs/commit/bae66fe))
+
+
+### Features
+
+* **deps:** introduce yargs-parser with support for unknown-options-as-args ([#1440](https://github.com/yargs/yargs/issues/1440)) ([4d21520](https://github.com/yargs/yargs/commit/4d21520))
+
+## [14.1.0](https://github.com/yargs/yargs/compare/v14.0.0...v14.1.0) (2019-09-06)
+
+
+### Bug Fixes
+
+* **docs:** fix incorrect parserConfiguration documentation ([2a99124](https://github.com/yargs/yargs/commit/2a99124))
+* detect zsh when zsh isnt run as a login prompt ([#1395](https://github.com/yargs/yargs/issues/1395)) ([8792d13](https://github.com/yargs/yargs/commit/8792d13))
+* populate correct value on yargs.parsed and stop warning on access ([#1412](https://github.com/yargs/yargs/issues/1412)) ([bb0eb52](https://github.com/yargs/yargs/commit/bb0eb52))
+* showCompletionScript was logging script twice ([#1388](https://github.com/yargs/yargs/issues/1388)) ([07c8537](https://github.com/yargs/yargs/commit/07c8537))
+* strict() should not ignore hyphenated arguments ([#1414](https://github.com/yargs/yargs/issues/1414)) ([b774b5e](https://github.com/yargs/yargs/commit/b774b5e))
+* **docs:** formalize existing callback argument to showHelp ([#1386](https://github.com/yargs/yargs/issues/1386)) ([d217764](https://github.com/yargs/yargs/commit/d217764))
+
+
+### Features
+
+* make it possible to merge configurations when extending other config. ([#1411](https://github.com/yargs/yargs/issues/1411)) ([5d7ad98](https://github.com/yargs/yargs/commit/5d7ad98))
+
+## [14.0.0](https://github.com/yargs/yargs/compare/v13.3.0...v14.0.0) (2019-07-30)
+
+
+### β BREAKING CHANGES
+
+* we now only officially support yargs.$0 parameter and discourage direct access to yargs.parsed
+* previously to this fix methods like `yargs.getOptions()` contained the state of the last command to execute.
+* do not allow additional positionals in strict mode
+
+### Bug Fixes
+
+* calling parse multiple times now appropriately maintains state ([#1137](https://github.com/yargs/yargs/issues/1137)) ([#1369](https://github.com/yargs/yargs/issues/1369)) ([026b151](https://github.com/yargs/yargs/commit/026b151))
+* prefer user supplied script name in usage ([#1383](https://github.com/yargs/yargs/issues/1383)) ([28c74b9](https://github.com/yargs/yargs/commit/28c74b9))
+* **deps:** use decamelize from npm instead of vendored copy ([#1377](https://github.com/yargs/yargs/issues/1377)) ([015eeb9](https://github.com/yargs/yargs/commit/015eeb9))
+* **examples:** fix usage-options.js to reflect current API ([#1375](https://github.com/yargs/yargs/issues/1375)) ([6e5b76b](https://github.com/yargs/yargs/commit/6e5b76b))
+* do not allow additional positionals in strict mode ([35d777c](https://github.com/yargs/yargs/commit/35d777c))
+* properties accessed on singleton now reflect current state of instance ([#1366](https://github.com/yargs/yargs/issues/1366)) ([409d35b](https://github.com/yargs/yargs/commit/409d35b))
+* tolerate null prototype for config objects with `extends` ([#1376](https://github.com/yargs/yargs/issues/1376)) ([3d26d11](https://github.com/yargs/yargs/commit/3d26d11)), closes [#1372](https://github.com/yargs/yargs/issues/1372)
+* yargs.parsed now populated before returning, when yargs.parse() called with no args (#1382) ([e3981fd](https://github.com/yargs/yargs/commit/e3981fd)), closes [#1382](https://github.com/yargs/yargs/issues/1382)
+
+### Features
+
+* adds support for multiple epilog messages ([#1384](https://github.com/yargs/yargs/issues/1384)) ([07a5554](https://github.com/yargs/yargs/commit/07a5554))
+* allow completionCommand to be set via showCompletionScript ([#1385](https://github.com/yargs/yargs/issues/1385)) ([5562853](https://github.com/yargs/yargs/commit/5562853))
+
+## [13.3.0](https://www.github.com/yargs/yargs/compare/v13.2.4...v13.3.0) (2019-06-10)
+
+
+### Bug Fixes
+
+* **deps:** yargs-parser update addressing several parsing bugs ([#1357](https://www.github.com/yargs/yargs/issues/1357)) ([e230d5b](https://www.github.com/yargs/yargs/commit/e230d5b))
+
+
+### Features
+
+* **i18n:** swap out os-locale dependency for simple inline implementation ([#1356](https://www.github.com/yargs/yargs/issues/1356)) ([4dfa19b](https://www.github.com/yargs/yargs/commit/4dfa19b))
+* support defaultDescription for positional arguments ([812048c](https://www.github.com/yargs/yargs/commit/812048c))
+
+### [13.2.4](https://github.com/yargs/yargs/compare/v13.2.3...v13.2.4) (2019-05-13)
+
+
+### Bug Fixes
+
+* **i18n:** rename unclear 'implication failed' to 'missing dependent arguments' ([#1317](https://github.com/yargs/yargs/issues/1317)) ([bf46813](https://github.com/yargs/yargs/commit/bf46813))
+
+
+
+### [13.2.3](https://github.com/yargs/yargs/compare/v13.2.2...v13.2.3) (2019-05-05)
+
+
+### Bug Fixes
+
+* **deps:** upgrade cliui for compatibility with latest chalk. ([#1330](https://github.com/yargs/yargs/issues/1330)) ([b20db65](https://github.com/yargs/yargs/commit/b20db65))
+* address issues with dutch translation ([#1316](https://github.com/yargs/yargs/issues/1316)) ([0295132](https://github.com/yargs/yargs/commit/0295132))
+
+
+### Tests
+
+* accept differently formatted output ([#1327](https://github.com/yargs/yargs/issues/1327)) ([c294d1b](https://github.com/yargs/yargs/commit/c294d1b))
+
+
+
+## [13.2.2](https://github.com/yargs/yargs/compare/v13.2.1...v13.2.2) (2019-03-06)
+
+
+
+## [13.2.1](https://github.com/yargs/yargs/compare/v13.2.0...v13.2.1) (2019-02-18)
+
+
+### Bug Fixes
+
+* add zsh script to files array ([3180224](https://github.com/yargs/yargs/commit/3180224))
+* support options/sub-commands in zsh completion ([0a96394](https://github.com/yargs/yargs/commit/0a96394))
+
+
+# [13.2.0](https://github.com/yargs/yargs/compare/v13.1.0...v13.2.0) (2019-02-15)
+
+
+### Features
+
+* zsh auto completion ([#1292](https://github.com/yargs/yargs/issues/1292)) ([16c5d25](https://github.com/yargs/yargs/commit/16c5d25)), closes [#1156](https://github.com/yargs/yargs/issues/1156)
+
+
+
+# [13.1.0](https://github.com/yargs/yargs/compare/v13.0.0...v13.1.0) (2019-02-12)
+
+
+### Features
+
+* add applyBeforeValidation, for applying sync middleware before validation ([5be206a](https://github.com/yargs/yargs/commit/5be206a))
+
+
+
+
+# [13.0.0](https://github.com/yargs/yargs/compare/v12.0.5...v13.0.0) (2019-02-02)
+
+
+### Bug Fixes
+
+* **deps:** Update os-locale to avoid security vulnerability ([#1270](https://github.com/yargs/yargs/issues/1270)) ([27bf739](https://github.com/yargs/yargs/commit/27bf739))
+* **validation:** Use the error as a message when none exists otherwise ([#1268](https://github.com/yargs/yargs/issues/1268)) ([0510fe6](https://github.com/yargs/yargs/commit/0510fe6))
+* better bash path completion ([#1272](https://github.com/yargs/yargs/issues/1272)) ([da75ea2](https://github.com/yargs/yargs/commit/da75ea2))
+* middleware added multiple times due to reference bug ([#1282](https://github.com/yargs/yargs/issues/1282)) ([64af518](https://github.com/yargs/yargs/commit/64af518))
+
+
+### Chores
+
+* ~drop Node 6 from testing matrix ([#1287](https://github.com/yargs/yargs/issues/1287)) ([ef16792](https://github.com/yargs/yargs/commit/ef16792))~
+ * _opting to not drop Node 6 support until April, [see](https://github.com/nodejs/Release)._
+* update dependencies ([#1284](https://github.com/yargs/yargs/issues/1284)) ([f25de4f](https://github.com/yargs/yargs/commit/f25de4f))
+
+
+### Features
+
+* Add `.parserConfiguration()` method, deprecating package.json config ([#1262](https://github.com/yargs/yargs/issues/1262)) ([3c6869a](https://github.com/yargs/yargs/commit/3c6869a))
+* adds config option for sorting command output ([#1256](https://github.com/yargs/yargs/issues/1256)) ([6916ce9](https://github.com/yargs/yargs/commit/6916ce9))
+* options/positionals with leading '+' and '0' no longer parse as numbers ([#1286](https://github.com/yargs/yargs/issues/1286)) ([e9dc3aa](https://github.com/yargs/yargs/commit/e9dc3aa))
+* support promises in middleware ([f3a4e4f](https://github.com/yargs/yargs/commit/f3a4e4f))
+
+
+### BREAKING CHANGES
+
+* options with leading '+' or '0' now parse as strings
+* dropping Node 6 which hits end of life in April 2019
+* see [yargs-parser@12.0.0 CHANGELOG](https://github.com/yargs/yargs-parser/blob/master/CHANGELOG.md#breaking-changes)
+* we now warn if the yargs stanza package.json is used.
+
+
+
+
+## [12.0.5](https://github.com/yargs/yargs/compare/v12.0.4...v12.0.5) (2018-11-19)
+
+
+### Bug Fixes
+
+* allows camel-case, variadic arguments, and strict mode to be combined ([#1247](https://github.com/yargs/yargs/issues/1247)) ([eacc035](https://github.com/yargs/yargs/commit/eacc035))
+
+
+
+
+## [12.0.4](https://github.com/yargs/yargs/compare/v12.0.3...v12.0.4) (2018-11-10)
+
+
+### Bug Fixes
+
+* don't load config when processing positionals ([5d0dc92](https://github.com/yargs/yargs/commit/5d0dc92))
+
+
+
+
+## [12.0.3](https://github.com/yargs/yargs/compare/v12.0.2...v12.0.3) (2018-10-06)
+
+
+### Bug Fixes
+
+* $0 contains first arg in bundled electron apps ([#1206](https://github.com/yargs/yargs/issues/1206)) ([567820b](https://github.com/yargs/yargs/commit/567820b))
+* accept single function for middleware ([66fd6f7](https://github.com/yargs/yargs/commit/66fd6f7)), closes [#1214](https://github.com/yargs/yargs/issues/1214) [#1214](https://github.com/yargs/yargs/issues/1214)
+* hide `hidden` options from help output even if they are in a group ([#1221](https://github.com/yargs/yargs/issues/1221)) ([da54028](https://github.com/yargs/yargs/commit/da54028))
+* improve Norwegian BokmΓ₯l translations ([#1208](https://github.com/yargs/yargs/issues/1208)) ([a458fa4](https://github.com/yargs/yargs/commit/a458fa4))
+* improve Norwegian Nynorsk translations ([#1207](https://github.com/yargs/yargs/issues/1207)) ([d422eb5](https://github.com/yargs/yargs/commit/d422eb5))
+
+
+
+
+## [12.0.2](https://github.com/yargs/yargs/compare/v12.0.1...v12.0.2) (2018-09-04)
+
+
+### Bug Fixes
+
+* middleware should work regardless of when method is called ([664b265](https://github.com/yargs/yargs/commit/664b265)), closes [#1178](https://github.com/yargs/yargs/issues/1178)
+* translation not working when using __ with a single parameter ([#1183](https://github.com/yargs/yargs/issues/1183)) ([f449aea](https://github.com/yargs/yargs/commit/f449aea))
+* upgrade os-locale to version that addresses license issue ([#1195](https://github.com/yargs/yargs/issues/1195)) ([efc0970](https://github.com/yargs/yargs/commit/efc0970))
+
+
+
+
+## [12.0.1](https://github.com/yargs/yargs/compare/v12.0.0...v12.0.1) (2018-06-29)
+
+
+
+
+# [12.0.0](https://github.com/yargs/yargs/compare/v11.1.0...v12.0.0) (2018-06-26)
+
+
+### Bug Fixes
+
+* .argv and .parse() now invoke identical code path ([#1126](https://github.com/yargs/yargs/issues/1126)) ([f13ebf4](https://github.com/yargs/yargs/commit/f13ebf4))
+* remove the trailing white spaces from the help output ([#1090](https://github.com/yargs/yargs/issues/1090)) ([3f0746c](https://github.com/yargs/yargs/commit/3f0746c))
+* **completion:** Avoid default command and recommendations during completion ([#1123](https://github.com/yargs/yargs/issues/1123)) ([036e7c5](https://github.com/yargs/yargs/commit/036e7c5))
+
+
+### Chores
+
+* test Node.js 6, 8 and 10 ([#1160](https://github.com/yargs/yargs/issues/1160)) ([84f9d2b](https://github.com/yargs/yargs/commit/84f9d2b))
+* upgrade to version of yargs-parser that does not populate value for unset boolean ([#1104](https://github.com/yargs/yargs/issues/1104)) ([d4705f4](https://github.com/yargs/yargs/commit/d4705f4))
+
+
+### Features
+
+* add support for global middleware, useful for shared tasks like metrics ([#1119](https://github.com/yargs/yargs/issues/1119)) ([9d71ac7](https://github.com/yargs/yargs/commit/9d71ac7))
+* allow setting scriptName $0 ([#1143](https://github.com/yargs/yargs/issues/1143)) ([a2f2eae](https://github.com/yargs/yargs/commit/a2f2eae))
+* remove `setPlaceholderKeys` ([#1105](https://github.com/yargs/yargs/issues/1105)) ([6ee2c82](https://github.com/yargs/yargs/commit/6ee2c82))
+
+
+### BREAKING CHANGES
+
+* Options absent from `argv` (not set via CLI argument) are now absent from the parsed result object rather than being set with `undefined`
+* drop Node 4 from testing matrix, such that we'll gradually start drifting away from supporting Node 4.
+* yargs-parser does not populate 'false' when boolean flag is not passed
+* tests that assert against help output will need to be updated
+
-* backport security fix for os-locale.
# [11.1.0](https://github.com/yargs/yargs/compare/v11.0.0...v11.1.0) (2018-03-04)
@@ -21,6 +275,8 @@ All notable changes to this project will be documented in this file. See [standa
* allow hidden options to be displayed with --show-hidden ([#1061](https://github.com/yargs/yargs/issues/1061)) ([ea862ae](https://github.com/yargs/yargs/commit/ea862ae))
* extend *.rc files in addition to json ([#1080](https://github.com/yargs/yargs/issues/1080)) ([11691a6](https://github.com/yargs/yargs/commit/11691a6))
+
+
# [11.0.0](https://github.com/yargs/yargs/compare/v10.1.2...v11.0.0) (2018-01-22)
@@ -656,7 +912,7 @@ All notable changes to this project will be documented in this file. See [standa
- [#308](https://github.com/bcoe/yargs/pull/308) Yargs now handles environment variables (@nexdrew)
- [#302](https://github.com/bcoe/yargs/pull/302) Add Indonesian translation (@rilut)
- [#300](https://github.com/bcoe/yargs/pull/300) Add Turkish translation (@feyzo)
-- [#298](https://github.com/bcoe/yargs/pull/298) Add Norwegian BokmaΜl translation (@sindresorhus)
+- [#298](https://github.com/bcoe/yargs/pull/298) Add Norwegian BokmΓ₯l translation (@sindresorhus)
- [#297](https://github.com/bcoe/yargs/pull/297) Fix for layout of cjk characters (@disjukr)
- [#296](https://github.com/bcoe/yargs/pull/296) Add Korean translation (@disjukr)
diff --git a/node_modules/yargs/README.md b/node_modules/yargs/README.md
index d16b82d177c11..679a3eeea9e6b 100644
--- a/node_modules/yargs/README.md
+++ b/node_modules/yargs/README.md
@@ -1,20 +1,24 @@
-# Yargs
+
+
+
+ Yargs
+
+ Yargs be a node.js library fer hearties tryin' ter parse optstrings
+
+
+
[![Build Status][travis-image]][travis-url]
[![Coverage Status][coveralls-image]][coveralls-url]
[![NPM version][npm-image]][npm-url]
-[![Windows Tests][windows-image]][windows-url]
[![js-standard-style][standard-image]][standard-url]
[![Conventional Commits][conventional-commits-image]][conventional-commits-url]
[![Slack][slack-image]][slack-url]
-_Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com)_.
-
-> Yargs be a node.js library fer hearties tryin' ter parse optstrings.
+## Description :
+Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface.
-
-
-Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. It gives you:
+It gives you:
* commands and (grouped) options (`my-program.js serve --port=5000`).
* a dynamically generated help menu based on your arguments.
@@ -26,11 +30,19 @@ Yargs helps you build interactive command line tools, by parsing arguments and g
## Installation
+Stable version:
+```bash
+npm i yargs
+```
+
+Bleeding edge version with the most recent features:
```bash
-npm i yargs --save
+npm i yargs@next
```
-## Simple Example
+## Usage :
+
+### Simple Example
````javascript
#!/usr/bin/env node
@@ -51,9 +63,9 @@ $ ./plunder.js --ships 12 --distance 98.7
Retreat from the xupptumblers!
```
-## Complex Example
+### Complex Example
-```js
+```javascript
#!/usr/bin/env node
require('yargs') // eslint-disable-line
.command('serve [port]', 'start the server', (yargs) => {
@@ -68,14 +80,31 @@ require('yargs') // eslint-disable-line
})
.option('verbose', {
alias: 'v',
- default: false
+ type: 'boolean',
+ description: 'Run with verbose logging'
})
.argv
```
Run the example above with `--help` to see the help for the application.
-## Table of Contents
+## TypeScript
+
+yargs has type definitions at [@types/yargs][type-definitions].
+
+```
+npm i @types/yargs --save-dev
+```
+
+See usage examples in [docs](/docs/typescript.md).
+
+## Community :
+
+Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com).
+
+## Documentation :
+
+### Table of Contents
* [Yargs' API](/docs/api.md)
* [Examples](/docs/examples.md)
@@ -85,6 +114,7 @@ Run the example above with `--help` to see the help for the application.
* [Numbers](/docs/tricks.md#numbers)
* [Arrays](/docs/tricks.md#arrays)
* [Objects](/docs/tricks.md#objects)
+ * [Quotes](/docs/tricks.md#quotes)
* [Advanced Topics](/docs/advanced.md)
* [Composing Your App Using Commands](/docs/advanced.md#commands)
* [Building Configurable CLI Apps](/docs/advanced.md#configuration)
@@ -97,11 +127,10 @@ Run the example above with `--help` to see the help for the application.
[coveralls-image]: https://img.shields.io/coveralls/yargs/yargs.svg
[npm-url]: https://www.npmjs.com/package/yargs
[npm-image]: https://img.shields.io/npm/v/yargs.svg
-[windows-url]: https://ci.appveyor.com/project/bcoe/yargs-ljwvf
-[windows-image]: https://img.shields.io/appveyor/ci/bcoe/yargs-ljwvf/master.svg?label=Windows%20Tests
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
[standard-url]: http://standardjs.com/
[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
[conventional-commits-url]: https://conventionalcommits.org/
[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg
[slack-url]: http://devtoolscommunity.herokuapp.com
+[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs
diff --git a/node_modules/yargs/completion.sh.hbs b/node_modules/yargs/completion.sh.hbs
deleted file mode 100644
index 819c8ae83a7e4..0000000000000
--- a/node_modules/yargs/completion.sh.hbs
+++ /dev/null
@@ -1,28 +0,0 @@
-###-begin-{{app_name}}-completions-###
-#
-# yargs command completion script
-#
-# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
-# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
-#
-_yargs_completions()
-{
- local cur_word args type_list
-
- cur_word="${COMP_WORDS[COMP_CWORD]}"
- args=("${COMP_WORDS[@]}")
-
- # ask yargs to generate completions.
- type_list=$({{app_path}} --get-yargs-completions "${args[@]}")
-
- COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )
-
- # if no match was found, fall back to filename completion
- if [ ${#COMPREPLY[@]} -eq 0 ]; then
- COMPREPLY=( $(compgen -f -- "${cur_word}" ) )
- fi
-
- return 0
-}
-complete -F _yargs_completions {{app_name}}
-###-end-{{app_name}}-completions-###
diff --git a/node_modules/yargs/index.js b/node_modules/yargs/index.js
index dfed54bc51686..2db543ed3a698 100644
--- a/node_modules/yargs/index.js
+++ b/node_modules/yargs/index.js
@@ -25,8 +25,15 @@ function singletonify (inst) {
Object.keys(inst).forEach((key) => {
if (key === 'argv') {
Argv.__defineGetter__(key, inst.__lookupGetter__(key))
+ } else if (typeof inst[key] === 'function') {
+ Argv[key] = inst[key].bind(inst)
} else {
- Argv[key] = typeof inst[key] === 'function' ? inst[key].bind(inst) : inst[key]
+ Argv.__defineGetter__('$0', () => {
+ return inst.$0
+ })
+ Argv.__defineGetter__('parsed', () => {
+ return inst.parsed
+ })
}
})
}
diff --git a/node_modules/yargs/lib/apply-extends.js b/node_modules/yargs/lib/apply-extends.js
index 530b022ac57b5..643c91335a090 100644
--- a/node_modules/yargs/lib/apply-extends.js
+++ b/node_modules/yargs/lib/apply-extends.js
@@ -16,12 +16,26 @@ function getPathToDefaultConfig (cwd, pathToExtend) {
return path.resolve(cwd, pathToExtend)
}
-function applyExtends (config, cwd) {
+function mergeDeep (config1, config2) {
+ const target = {}
+ const isObject = obj => obj && typeof obj === 'object' && !Array.isArray(obj)
+ Object.assign(target, config1)
+ for (let key of Object.keys(config2)) {
+ if (isObject(config2[key]) && isObject(target[key])) {
+ target[key] = mergeDeep(config1[key], config2[key])
+ } else {
+ target[key] = config2[key]
+ }
+ }
+ return target
+}
+
+function applyExtends (config, cwd, mergeExtends) {
let defaultConfig = {}
- if (config.hasOwnProperty('extends')) {
+ if (Object.prototype.hasOwnProperty.call(config, 'extends')) {
if (typeof config.extends !== 'string') return defaultConfig
- const isPath = /\.json$/.test(config.extends)
+ const isPath = /\.json|\..*rc$/.test(config.extends)
let pathToDefault = null
if (!isPath) {
try {
@@ -42,12 +56,12 @@ function applyExtends (config, cwd) {
defaultConfig = isPath ? JSON.parse(fs.readFileSync(pathToDefault, 'utf8')) : require(config.extends)
delete config.extends
- defaultConfig = applyExtends(defaultConfig, path.dirname(pathToDefault))
+ defaultConfig = applyExtends(defaultConfig, path.dirname(pathToDefault), mergeExtends)
}
previouslyVisitedConfigs = []
- return Object.assign({}, defaultConfig, config)
+ return mergeExtends ? mergeDeep(defaultConfig, config) : Object.assign({}, defaultConfig, config)
}
module.exports = applyExtends
diff --git a/node_modules/yargs/lib/argsert.js b/node_modules/yargs/lib/argsert.js
index ed1d598713df9..f310b4e7479a6 100644
--- a/node_modules/yargs/lib/argsert.js
+++ b/node_modules/yargs/lib/argsert.js
@@ -1,16 +1,18 @@
'use strict'
+
+// hoisted due to circular dependency on command.
+module.exports = argsert
const command = require('./command')()
const YError = require('./yerror')
const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']
-
-module.exports = function argsert (expected, callerArguments, length) {
+function argsert (expected, callerArguments, length) {
// TODO: should this eventually raise an exception.
try {
// preface the argument description with "cmd", so
// that we can run it through yargs' command parser.
let position = 0
- let parsed = {demanded: [], optional: []}
+ let parsed = { demanded: [], optional: [] }
if (typeof expected === 'object') {
length = callerArguments
callerArguments = expected
diff --git a/node_modules/yargs/lib/command.js b/node_modules/yargs/lib/command.js
index 65322dbbdbd3d..d2a6e4d49355b 100644
--- a/node_modules/yargs/lib/command.js
+++ b/node_modules/yargs/lib/command.js
@@ -1,6 +1,8 @@
'use strict'
const inspect = require('util').inspect
+const isPromise = require('./is-promise')
+const { applyMiddleware, commandMiddlewareFactory } = require('./middleware')
const path = require('path')
const Parser = require('yargs-parser')
@@ -9,15 +11,18 @@ const DEFAULT_MARKER = /(^\*)|(^\$0)/
// handles parsing positional arguments,
// and populating argv with said positional
// arguments.
-module.exports = function command (yargs, usage, validation) {
+module.exports = function command (yargs, usage, validation, globalMiddleware) {
const self = {}
let handlers = {}
let aliasMap = {}
let defaultCommand
- self.addHandler = function addHandler (cmd, description, builder, handler, middlewares) {
+ globalMiddleware = globalMiddleware || []
+
+ self.addHandler = function addHandler (cmd, description, builder, handler, commandMiddleware) {
let aliases = []
+ const middlewares = commandMiddlewareFactory(commandMiddleware)
handler = handler || (() => {})
- middlewares = middlewares || []
+
if (Array.isArray(cmd)) {
aliases = cmd.slice(1)
cmd = cmd[0]
@@ -169,7 +174,7 @@ module.exports = function command (yargs, usage, validation) {
let numFiles = currentContext.files.length
const parentCommands = currentContext.commands.slice()
- // what does yargs look like after the buidler is run?
+ // what does yargs look like after the builder is run?
let innerArgv = parsed.argv
let innerYargs = null
let positionalMap = {}
@@ -181,24 +186,17 @@ module.exports = function command (yargs, usage, validation) {
// a function can be provided, which builds
// up a yargs chain and possibly returns it.
innerYargs = commandHandler.builder(yargs.reset(parsed.aliases))
- // if the builder function did not yet parse argv with reset yargs
- // and did not explicitly set a usage() string, then apply the
- // original command string as usage() for consistent behavior with
- // options object below.
- if (yargs.parsed === false) {
- if (shouldUpdateUsage(yargs)) {
- yargs.getUsageInstance().usage(
- usageFromParentCommandsCommandHandler(parentCommands, commandHandler),
- commandHandler.description
- )
- }
- innerArgv = innerYargs ? innerYargs._parseArgs(null, null, true, commandIndex) : yargs._parseArgs(null, null, true, commandIndex)
- } else {
- innerArgv = yargs.parsed.argv
+ if (!innerYargs || (typeof innerYargs._parseArgs !== 'function')) {
+ innerYargs = yargs
}
-
- if (innerYargs && yargs.parsed === false) aliases = innerYargs.parsed.aliases
- else aliases = yargs.parsed.aliases
+ if (shouldUpdateUsage(innerYargs)) {
+ innerYargs.getUsageInstance().usage(
+ usageFromParentCommandsCommandHandler(parentCommands, commandHandler),
+ commandHandler.description
+ )
+ }
+ innerArgv = innerYargs._parseArgs(null, null, true, commandIndex)
+ aliases = innerYargs.parsed.aliases
} else if (typeof commandHandler.builder === 'object') {
// as a short hand, an object can instead be provided, specifying
// the options that a command takes.
@@ -220,24 +218,37 @@ module.exports = function command (yargs, usage, validation) {
positionalMap = populatePositionals(commandHandler, innerArgv, currentContext, yargs)
}
+ const middlewares = globalMiddleware.slice(0).concat(commandHandler.middlewares || [])
+ applyMiddleware(innerArgv, yargs, middlewares, true)
+
// we apply validation post-hoc, so that custom
// checks get passed populated positional arguments.
if (!yargs._hasOutput()) yargs._runValidation(innerArgv, aliases, positionalMap, yargs.parsed.error)
if (commandHandler.handler && !yargs._hasOutput()) {
yargs._setHasOutput()
- if (commandHandler.middlewares.length > 0) {
- const middlewareArgs = commandHandler.middlewares.reduce(function (initialObj, middleware) {
- return Object.assign(initialObj, middleware(innerArgv))
- }, {})
- Object.assign(innerArgv, middlewareArgs)
+ // to simplify the parsing of positionals in commands,
+ // we temporarily populate '--' rather than _, with arguments
+ const populateDoubleDash = !!yargs.getOptions().configuration['populate--']
+ if (!populateDoubleDash) yargs._copyDoubleDash(innerArgv)
+
+ innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false)
+ let handlerResult
+ if (isPromise(innerArgv)) {
+ handlerResult = innerArgv.then(argv => commandHandler.handler(argv))
+ } else {
+ handlerResult = commandHandler.handler(innerArgv)
}
- const handlerResult = commandHandler.handler(innerArgv)
- if (handlerResult && typeof handlerResult.then === 'function') {
- handlerResult.then(
- null,
- (error) => yargs.getUsageInstance().fail(null, error)
- )
+
+ if (isPromise(handlerResult)) {
+ yargs.getUsageInstance().cacheHelpMessage()
+ handlerResult.catch(error => {
+ try {
+ yargs.getUsageInstance().fail(null, error)
+ } catch (err) {
+ // fail's throwing would cause an unhandled rejection.
+ }
+ })
}
}
@@ -328,6 +339,7 @@ module.exports = function command (yargs, usage, validation) {
options.default = Object.assign(parseOptions.default, options.default)
options.alias = Object.assign(parseOptions.alias, options.alias)
options.array = options.array.concat(parseOptions.array)
+ delete options.config // don't load config when processing positionals.
const unparsed = []
Object.keys(positionalMap).forEach((key) => {
@@ -340,7 +352,12 @@ module.exports = function command (yargs, usage, validation) {
// short-circuit parse.
if (!unparsed.length) return
- const parsed = Parser.detailed(unparsed, options)
+ const config = Object.assign({}, options.configuration, {
+ 'populate--': true
+ })
+ const parsed = Parser.detailed(unparsed, Object.assign({}, options, {
+ configuration: config
+ }))
if (parsed.error) {
yargs.getUsageInstance().fail(parsed.error.message, parsed.error)
@@ -354,6 +371,9 @@ module.exports = function command (yargs, usage, validation) {
Object.keys(parsed.argv).forEach((key) => {
if (positionalKeys.indexOf(key) !== -1) {
+ // any new aliases need to be placed in positionalMap, which
+ // is used for validation.
+ if (!positionalMap[key]) positionalMap[key] = parsed.argv[key]
argv[key] = parsed.argv[key]
}
})
@@ -408,18 +428,19 @@ module.exports = function command (yargs, usage, validation) {
// the state of commands such that
// we can apply .parse() multiple times
// with the same yargs instance.
- let frozen
+ let frozens = []
self.freeze = () => {
- frozen = {}
+ let frozen = {}
+ frozens.push(frozen)
frozen.handlers = handlers
frozen.aliasMap = aliasMap
frozen.defaultCommand = defaultCommand
}
self.unfreeze = () => {
+ let frozen = frozens.pop()
handlers = frozen.handlers
aliasMap = frozen.aliasMap
defaultCommand = frozen.defaultCommand
- frozen = undefined
}
return self
diff --git a/node_modules/yargs/lib/completion-templates.js b/node_modules/yargs/lib/completion-templates.js
new file mode 100644
index 0000000000000..43714fb6ed96a
--- /dev/null
+++ b/node_modules/yargs/lib/completion-templates.js
@@ -0,0 +1,49 @@
+exports.completionShTemplate =
+`###-begin-{{app_name}}-completions-###
+#
+# yargs command completion script
+#
+# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
+# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
+#
+_yargs_completions()
+{
+ local cur_word args type_list
+
+ cur_word="\${COMP_WORDS[COMP_CWORD]}"
+ args=("\${COMP_WORDS[@]}")
+
+ # ask yargs to generate completions.
+ type_list=$({{app_path}} --get-yargs-completions "\${args[@]}")
+
+ COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) )
+
+ # if no match was found, fall back to filename completion
+ if [ \${#COMPREPLY[@]} -eq 0 ]; then
+ COMPREPLY=()
+ fi
+
+ return 0
+}
+complete -o default -F _yargs_completions {{app_name}}
+###-end-{{app_name}}-completions-###
+`
+
+exports.completionZshTemplate = `###-begin-{{app_name}}-completions-###
+#
+# yargs command completion script
+#
+# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
+# or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX.
+#
+_{{app_name}}_yargs_completions()
+{
+ local reply
+ local si=$IFS
+ IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
+ IFS=$si
+ _describe 'values' reply
+}
+compdef _{{app_name}}_yargs_completions {{app_name}}
+###-end-{{app_name}}-completions-###
+`
diff --git a/node_modules/yargs/lib/completion.js b/node_modules/yargs/lib/completion.js
index ad6969a2d932f..3f3bf16e1c938 100644
--- a/node_modules/yargs/lib/completion.js
+++ b/node_modules/yargs/lib/completion.js
@@ -1,5 +1,4 @@
'use strict'
-const fs = require('fs')
const path = require('path')
// add bash completions to your
@@ -9,6 +8,8 @@ module.exports = function completion (yargs, usage, command) {
completionKey: 'get-yargs-completions'
}
+ const zshShell = (process.env.SHELL && process.env.SHELL.indexOf('zsh') !== -1) ||
+ (process.env.ZSH_NAME && process.env.ZSH_NAME.indexOf('zsh') !== -1)
// get a list of completion commands.
// 'args' is the array of strings from the line to be completed
self.getCompletion = function getCompletion (args, done) {
@@ -16,6 +17,7 @@ module.exports = function completion (yargs, usage, command) {
const current = args.length ? args[args.length - 1] : ''
const argv = yargs.parse(args, true)
const aliases = yargs.parsed.aliases
+ const parentCommands = yargs.getContext().commands
// a custom completion function can be provided
// to completion().
@@ -54,22 +56,33 @@ module.exports = function completion (yargs, usage, command) {
}
}
- if (!current.match(/^-/)) {
+ if (!current.match(/^-/) && parentCommands[parentCommands.length - 1] !== current) {
usage.getCommands().forEach((usageCommand) => {
const commandName = command.parseCommand(usageCommand[0]).cmd
if (args.indexOf(commandName) === -1) {
- completions.push(commandName)
+ if (!zshShell) {
+ completions.push(commandName)
+ } else {
+ const desc = usageCommand[1] || ''
+ completions.push(commandName.replace(/:/g, '\\:') + ':' + desc)
+ }
}
})
}
- if (current.match(/^-/)) {
+ if (current.match(/^-/) || (current === '' && completions.length === 0)) {
+ const descs = usage.getDescriptions()
Object.keys(yargs.getOptions().key).forEach((key) => {
// If the key and its aliases aren't in 'args', add the key to 'completions'
const keyAndAliases = [key].concat(aliases[key] || [])
const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1)
if (notInArgs) {
- completions.push(`--${key}`)
+ if (!zshShell) {
+ completions.push(`--${key}`)
+ } else {
+ const desc = descs[key] || ''
+ completions.push(`--${key.replace(/:/g, '\\:')}:${desc.replace('__yargsString__:', '')}`)
+ }
}
})
}
@@ -79,10 +92,8 @@ module.exports = function completion (yargs, usage, command) {
// generate the completion script to add to your .bashrc.
self.generateCompletionScript = function generateCompletionScript ($0, cmd) {
- let script = fs.readFileSync(
- path.resolve(__dirname, '../completion.sh.hbs'),
- 'utf-8'
- )
+ const templates = require('./completion-templates')
+ let script = zshShell ? templates.completionZshTemplate : templates.completionShTemplate
const name = path.basename($0)
// add ./to applications not yet installed as bin.
diff --git a/node_modules/yargs/lib/is-promise.js b/node_modules/yargs/lib/is-promise.js
new file mode 100644
index 0000000000000..271d93b2d121a
--- /dev/null
+++ b/node_modules/yargs/lib/is-promise.js
@@ -0,0 +1,3 @@
+module.exports = function isPromise (maybePromise) {
+ return !!maybePromise && !!maybePromise.then && (typeof maybePromise.then === 'function')
+}
diff --git a/node_modules/yargs/lib/levenshtein.js b/node_modules/yargs/lib/levenshtein.js
index f32b0c277125f..c66c1babbc3d9 100644
--- a/node_modules/yargs/lib/levenshtein.js
+++ b/node_modules/yargs/lib/levenshtein.js
@@ -1,11 +1,22 @@
/*
Copyright (c) 2011 Andrei Mackenzie
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed.
@@ -37,8 +48,8 @@ module.exports = function levenshtein (a, b) {
matrix[i][j] = matrix[i - 1][j - 1]
} else {
matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution
- Math.min(matrix[i][j - 1] + 1, // insertion
- matrix[i - 1][j] + 1)) // deletion
+ Math.min(matrix[i][j - 1] + 1, // insertion
+ matrix[i - 1][j] + 1)) // deletion
}
}
}
diff --git a/node_modules/yargs/lib/middleware.js b/node_modules/yargs/lib/middleware.js
new file mode 100644
index 0000000000000..56dab75277b47
--- /dev/null
+++ b/node_modules/yargs/lib/middleware.js
@@ -0,0 +1,64 @@
+'use strict'
+
+// hoisted due to circular dependency on command.
+module.exports = {
+ applyMiddleware,
+ commandMiddlewareFactory,
+ globalMiddlewareFactory
+}
+const isPromise = require('./is-promise')
+const argsert = require('./argsert')
+
+function globalMiddlewareFactory (globalMiddleware, context) {
+ return function (callback, applyBeforeValidation = false) {
+ argsert(' [boolean]', [callback, applyBeforeValidation], arguments.length)
+ if (Array.isArray(callback)) {
+ for (let i = 0; i < callback.length; i++) {
+ if (typeof callback[i] !== 'function') {
+ throw Error('middleware must be a function')
+ }
+ callback[i].applyBeforeValidation = applyBeforeValidation
+ }
+ Array.prototype.push.apply(globalMiddleware, callback)
+ } else if (typeof callback === 'function') {
+ callback.applyBeforeValidation = applyBeforeValidation
+ globalMiddleware.push(callback)
+ }
+ return context
+ }
+}
+
+function commandMiddlewareFactory (commandMiddleware) {
+ if (!commandMiddleware) return []
+ return commandMiddleware.map(middleware => {
+ middleware.applyBeforeValidation = false
+ return middleware
+ })
+}
+
+function applyMiddleware (argv, yargs, middlewares, beforeValidation) {
+ const beforeValidationError = new Error('middleware cannot return a promise when applyBeforeValidation is true')
+ return middlewares
+ .reduce((accumulation, middleware) => {
+ if (middleware.applyBeforeValidation !== beforeValidation) {
+ return accumulation
+ }
+
+ if (isPromise(accumulation)) {
+ return accumulation
+ .then(initialObj =>
+ Promise.all([initialObj, middleware(initialObj, yargs)])
+ )
+ .then(([initialObj, middlewareObj]) =>
+ Object.assign(initialObj, middlewareObj)
+ )
+ } else {
+ const result = middleware(argv, yargs)
+ if (beforeValidation && isPromise(result)) throw beforeValidationError
+
+ return isPromise(result)
+ ? result.then(middlewareObj => Object.assign(accumulation, middlewareObj))
+ : Object.assign(accumulation, result)
+ }
+ }, argv)
+}
diff --git a/node_modules/yargs/lib/usage.js b/node_modules/yargs/lib/usage.js
index bd0906a89dbc2..92bf378620c5c 100644
--- a/node_modules/yargs/lib/usage.js
+++ b/node_modules/yargs/lib/usage.js
@@ -1,6 +1,7 @@
'use strict'
// this file handles outputting usage instructions,
// failures, etc. keeps logging in one place.
+const decamelize = require('decamelize')
const stringWidth = require('string-width')
const objFilter = require('./obj-filter')
const path = require('path')
@@ -45,7 +46,10 @@ module.exports = function usage (yargs, y18n) {
// don't output failure message more than once
if (!failureOutput) {
failureOutput = true
- if (showHelpOnFail) yargs.showHelp('error')
+ if (showHelpOnFail) {
+ yargs.showHelp('error')
+ logger.error()
+ }
if (msg || err) logger.error(msg || err)
if (failMessage) {
if (msg || err) logger.error('')
@@ -118,9 +122,9 @@ module.exports = function usage (yargs, y18n) {
}
self.getDescriptions = () => descriptions
- let epilog
+ let epilogs = []
self.epilog = (msg) => {
- epilog = msg
+ epilogs.push(msg)
}
let wrapSet = false
@@ -144,24 +148,26 @@ module.exports = function usage (yargs, y18n) {
const defaultGroup = 'Options:'
self.help = function help () {
+ if (cachedHelpMessage) return cachedHelpMessage
normalizeAliases()
// handle old demanded API
- const base$0 = path.basename(yargs.$0)
+ const base$0 = yargs.customScriptName ? yargs.$0 : path.basename(yargs.$0)
const demandedOptions = yargs.getDemandedOptions()
const demandedCommands = yargs.getDemandedCommands()
const groups = yargs.getGroups()
const options = yargs.getOptions()
- let keys = Object.keys(
- Object.keys(descriptions)
- .concat(Object.keys(demandedOptions))
- .concat(Object.keys(demandedCommands))
- .concat(Object.keys(options.default))
- .reduce((acc, key) => {
- if (key !== '_') acc[key] = true
- return acc
- }, {})
- )
+
+ let keys = []
+ keys = keys.concat(Object.keys(descriptions))
+ keys = keys.concat(Object.keys(demandedOptions))
+ keys = keys.concat(Object.keys(demandedCommands))
+ keys = keys.concat(Object.keys(options.default))
+ keys = keys.filter(filterHiddenOptions)
+ keys = Object.keys(keys.reduce((acc, key) => {
+ if (key !== '_') acc[key] = true
+ return acc
+ }, {}))
const theWrap = getWrap()
const ui = require('cliui')({
@@ -176,7 +182,7 @@ module.exports = function usage (yargs, y18n) {
usages.forEach((usage) => {
ui.div(`${usage[0].replace(/\$0/g, base$0)}`)
if (usage[1]) {
- ui.div({text: `${usage[1]}`, padding: [1, 0, 0, 0]})
+ ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] })
}
})
ui.div()
@@ -200,6 +206,10 @@ module.exports = function usage (yargs, y18n) {
const context = yargs.getContext()
const parentCommands = context.commands.length ? `${context.commands.join(' ')} ` : ''
+ if (yargs.getParserConfiguration()['sort-commands'] === true) {
+ commands = commands.sort((a, b) => a[0].localeCompare(b[0]))
+ }
+
commands.forEach((command) => {
const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}` // drop $0 from default commands.
ui.span(
@@ -208,7 +218,7 @@ module.exports = function usage (yargs, y18n) {
padding: [0, 2, 0, 2],
width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4
},
- {text: command[1]}
+ { text: command[1] }
)
const hints = []
if (command[2]) hints.push(`[${__('default:').slice(0, -1)}]`) // TODO hacking around i18n here
@@ -216,7 +226,7 @@ module.exports = function usage (yargs, y18n) {
hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`)
}
if (hints.length) {
- ui.div({text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right'})
+ ui.div({ text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right' })
} else {
ui.div()
}
@@ -241,11 +251,9 @@ module.exports = function usage (yargs, y18n) {
Object.keys(groups).forEach((groupName) => {
if (!groups[groupName].length) return
- ui.div(__(groupName))
-
// if we've grouped the key 'f', but 'f' aliases 'foobar',
// normalizedKeys should contain only 'foobar'.
- const normalizedKeys = groups[groupName].map((key) => {
+ const normalizedKeys = groups[groupName].filter(filterHiddenOptions).map((key) => {
if (~aliasKeys.indexOf(key)) return key
for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) {
if (~(options.alias[aliasKey] || []).indexOf(key)) return aliasKey
@@ -253,6 +261,10 @@ module.exports = function usage (yargs, y18n) {
return key
})
+ if (normalizedKeys.length < 1) return
+
+ ui.div(__(groupName))
+
// actually generate the switches string --foo, -f, --bar.
const switches = normalizedKeys.reduce((acc, key) => {
acc[key] = [ key ].concat(options.alias[key] || [])
@@ -290,11 +302,11 @@ module.exports = function usage (yargs, y18n) {
].filter(Boolean).join(' ')
ui.span(
- {text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4},
+ { text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4 },
desc
)
- if (extra) ui.div({text: extra, padding: [0, 0, 0, 2], align: 'right'})
+ if (extra) ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' })
else ui.div()
})
@@ -334,12 +346,13 @@ module.exports = function usage (yargs, y18n) {
}
// the usage string.
- if (epilog) {
- const e = epilog.replace(/\$0/g, base$0)
+ if (epilogs.length > 0) {
+ const e = epilogs.map(epilog => epilog.replace(/\$0/g, base$0)).join('\n')
ui.div(`${e}\n`)
}
- return ui.toString()
+ // Remove the trailing white spaces
+ return ui.toString().replace(/\s*$/, '')
}
// return the maximum width of a string
@@ -391,6 +404,13 @@ module.exports = function usage (yargs, y18n) {
})
}
+ // if yargs is executing an async handler, we take a snapshot of the
+ // help message to display on failure:
+ let cachedHelpMessage
+ self.cacheHelpMessage = function () {
+ cachedHelpMessage = this.help()
+ }
+
// given a set of keys, place any keys that are
// ungrouped under the 'Options:' grouping.
function addUngroupedKeys (keys, aliases, groups) {
@@ -409,6 +429,10 @@ module.exports = function usage (yargs, y18n) {
return groupedKeys
}
+ function filterHiddenOptions (key) {
+ return yargs.getOptions().hiddenOptions.indexOf(key) < 0 || yargs.parsed.argv[yargs.getOptions().showHiddenOpt]
+ }
+
self.showHelp = (level) => {
const logger = yargs._getLoggerInstance()
if (!level) level = 'error'
@@ -417,7 +441,7 @@ module.exports = function usage (yargs, y18n) {
}
self.functionDescription = (fn) => {
- const description = fn.name ? require('decamelize')(fn.name, '-') : __('generated-value')
+ const description = fn.name ? decamelize(fn.name, '-') : __('generated-value')
return ['(', description, ')'].join('')
}
@@ -489,35 +513,36 @@ module.exports = function usage (yargs, y18n) {
failureOutput = false
usages = []
usageDisabled = false
- epilog = undefined
+ epilogs = []
examples = []
commands = []
descriptions = objFilter(descriptions, (k, v) => !localLookup[k])
return self
}
- let frozen
+ let frozens = []
self.freeze = function freeze () {
- frozen = {}
+ let frozen = {}
+ frozens.push(frozen)
frozen.failMessage = failMessage
frozen.failureOutput = failureOutput
frozen.usages = usages
frozen.usageDisabled = usageDisabled
- frozen.epilog = epilog
+ frozen.epilogs = epilogs
frozen.examples = examples
frozen.commands = commands
frozen.descriptions = descriptions
}
self.unfreeze = function unfreeze () {
+ let frozen = frozens.pop()
failMessage = frozen.failMessage
failureOutput = frozen.failureOutput
usages = frozen.usages
usageDisabled = frozen.usageDisabled
- epilog = frozen.epilog
+ epilogs = frozen.epilogs
examples = frozen.examples
commands = frozen.commands
descriptions = frozen.descriptions
- frozen = undefined
}
return self
diff --git a/node_modules/yargs/lib/validation.js b/node_modules/yargs/lib/validation.js
index f4655b4fdc7ac..35659a356b810 100644
--- a/node_modules/yargs/lib/validation.js
+++ b/node_modules/yargs/lib/validation.js
@@ -37,7 +37,7 @@ module.exports = function validation (yargs, usage, y18n) {
)
} else {
usage.fail(
- __('Too many non-option arguments: got %s, maximum of %s', _s, demandedCommands._.max)
+ __('Too many non-option arguments: got %s, maximum of %s', _s, demandedCommands._.max)
)
}
}
@@ -96,13 +96,13 @@ module.exports = function validation (yargs, usage, y18n) {
if (specialKeys.indexOf(key) === -1 &&
!positionalMap.hasOwnProperty(key) &&
!yargs._getParseContext().hasOwnProperty(key) &&
- !aliases.hasOwnProperty(key)
+ !self.isValidAndSomeAliasIsNotNew(key, aliases)
) {
unknown.push(key)
}
})
- if (commandKeys.length > 0) {
+ if ((currentContext.commands.length > 0) || (commandKeys.length > 0)) {
argv._.slice(currentContext.commands.length).forEach((key) => {
if (commandKeys.indexOf(key) === -1) {
unknown.push(key)
@@ -120,6 +120,21 @@ module.exports = function validation (yargs, usage, y18n) {
}
}
+ // check for a key that is not an alias, or for which every alias is new,
+ // implying that it was invented by the parser, e.g., during camelization
+ self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew (key, aliases) {
+ if (!aliases.hasOwnProperty(key)) {
+ return false
+ }
+ const newAliases = yargs.parsed.newAliases
+ for (let a of [key, ...aliases[key]]) {
+ if (!newAliases.hasOwnProperty(a) || !newAliases[key]) {
+ return true
+ }
+ }
+ return false
+ }
+
// validate arguments limited to enumerated choices
self.limitedChoices = function limitedChoices (argv) {
const options = yargs.getOptions()
@@ -209,43 +224,36 @@ module.exports = function validation (yargs, usage, y18n) {
return implied
}
+ function keyExists (argv, val) {
+ // convert string '1' to number 1
+ let num = Number(val)
+ val = isNaN(num) ? val : num
+
+ if (typeof val === 'number') {
+ // check length of argv._
+ val = argv._.length >= val
+ } else if (val.match(/^--no-.+/)) {
+ // check if key/value doesn't exist
+ val = val.match(/^--no-(.+)/)[1]
+ val = !argv[val]
+ } else {
+ // check if key/value exists
+ val = argv[val]
+ }
+ return val
+ }
+
self.implications = function implications (argv) {
const implyFail = []
Object.keys(implied).forEach((key) => {
const origKey = key
;(implied[key] || []).forEach((value) => {
- let num
let key = origKey
const origValue = value
+ key = keyExists(argv, key)
+ value = keyExists(argv, value)
- // convert string '1' to number 1
- num = Number(key)
- key = isNaN(num) ? key : num
-
- if (typeof key === 'number') {
- // check length of argv._
- key = argv._.length >= key
- } else if (key.match(/^--no-.+/)) {
- // check if key doesn't exist
- key = key.match(/^--no-(.+)/)[1]
- key = !argv[key]
- } else {
- // check if key exists
- key = argv[key]
- }
-
- num = Number(value)
- value = isNaN(num) ? value : num
-
- if (typeof value === 'number') {
- value = argv._.length >= value
- } else if (value.match(/^--no-.+/)) {
- value = value.match(/^--no-(.+)/)[1]
- value = !argv[value]
- } else {
- value = argv[value]
- }
if (key && !value) {
implyFail.push(` ${origKey} -> ${origValue}`)
}
@@ -292,7 +300,7 @@ module.exports = function validation (yargs, usage, y18n) {
// we default keys to 'undefined' that have been configured, we should not
// apply conflicting check unless they are a value other than 'undefined'.
if (value && argv[key] !== undefined && argv[value] !== undefined) {
- usage.fail(__(`Arguments ${key} and ${value} are mutually exclusive`))
+ usage.fail(__('Arguments %s and %s are mutually exclusive', key, value))
}
})
}
@@ -323,18 +331,19 @@ module.exports = function validation (yargs, usage, y18n) {
return self
}
- let frozen
+ let frozens = []
self.freeze = function freeze () {
- frozen = {}
+ let frozen = {}
+ frozens.push(frozen)
frozen.implied = implied
frozen.checks = checks
frozen.conflicting = conflicting
}
self.unfreeze = function unfreeze () {
+ let frozen = frozens.pop()
implied = frozen.implied
checks = frozen.checks
conflicting = frozen.conflicting
- frozen = undefined
}
return self
diff --git a/node_modules/yargs/locales/de.json b/node_modules/yargs/locales/de.json
index d805710b09a54..05d983737140f 100644
--- a/node_modules/yargs/locales/de.json
+++ b/node_modules/yargs/locales/de.json
@@ -29,7 +29,7 @@
"Invalid values:": "UnzulΓ€ssige Werte:",
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, MΓΆglichkeiten: %s",
"Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s",
- "Implications failed:": "Implikationen fehlgeschlagen:",
+ "Implications failed:": "Fehlende abhΓ€ngige Argumente:",
"Not enough arguments following: %s": "Nicht genΓΌgend Argumente nach: %s",
"Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s",
"Path to JSON config file": "Pfad zur JSON-Config Datei",
diff --git a/node_modules/yargs/locales/en.json b/node_modules/yargs/locales/en.json
index fc65c2a0d86f0..b32a63f27adba 100644
--- a/node_modules/yargs/locales/en.json
+++ b/node_modules/yargs/locales/en.json
@@ -29,7 +29,7 @@
"Invalid values:": "Invalid values:",
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s",
"Argument check failed: %s": "Argument check failed: %s",
- "Implications failed:": "Implications failed:",
+ "Implications failed:": "Missing dependent arguments:",
"Not enough arguments following: %s": "Not enough arguments following: %s",
"Invalid JSON config file: %s": "Invalid JSON config file: %s",
"Path to JSON config file": "Path to JSON config file",
diff --git a/node_modules/yargs/locales/fr.json b/node_modules/yargs/locales/fr.json
index 481f47e37fbc9..cf9c74bf5b750 100644
--- a/node_modules/yargs/locales/fr.json
+++ b/node_modules/yargs/locales/fr.json
@@ -28,7 +28,7 @@
"Invalid values:": "Valeurs invalides:",
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, DonnΓ©: %s, Choix: %s",
"Argument check failed: %s": "Echec de la vΓ©rification de l'argument: %s",
- "Implications failed:": "Implications Γ©chouΓ©es:",
+ "Implications failed:": "Arguments dΓ©pendants manquants:",
"Not enough arguments following: %s": "Pas assez d'arguments suivant: %s",
"Invalid JSON config file: %s": "Fichier de configuration JSON invalide: %s",
"Path to JSON config file": "Chemin du fichier de configuration JSON",
diff --git a/node_modules/yargs/locales/it.json b/node_modules/yargs/locales/it.json
index f9eb3756eacc1..9ee900d34aca9 100644
--- a/node_modules/yargs/locales/it.json
+++ b/node_modules/yargs/locales/it.json
@@ -29,7 +29,7 @@
"Invalid values:": "Valori non validi:",
"Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s",
"Argument check failed: %s": "Controllo dell'argomento fallito: %s",
- "Implications failed:": "Argomenti impliciti non soddisfatti:",
+ "Implications failed:": "Argomenti dipendenti mancanti:",
"Not enough arguments following: %s": "Argomenti insufficienti dopo: %s",
"Invalid JSON config file: %s": "File di configurazione JSON non valido: %s",
"Path to JSON config file": "Percorso del file di configurazione JSON",
diff --git a/node_modules/yargs/locales/nb.json b/node_modules/yargs/locales/nb.json
index fc607fb1e19c1..55be1fbedeb69 100644
--- a/node_modules/yargs/locales/nb.json
+++ b/node_modules/yargs/locales/nb.json
@@ -27,7 +27,7 @@
},
"Invalid values:": "Ugyldige verdier:",
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s",
- "Argument check failed: %s": "Argument sjekk mislyktes: %s",
+ "Argument check failed: %s": "Argumentsjekk mislyktes: %s",
"Implications failed:": "Konsekvensene mislyktes:",
"Not enough arguments following: %s": "Ikke nok fΓΈlgende argumenter: %s",
"Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s",
diff --git a/node_modules/yargs/locales/nl.json b/node_modules/yargs/locales/nl.json
index 1d144724ec3b6..5d62e0fc3b611 100644
--- a/node_modules/yargs/locales/nl.json
+++ b/node_modules/yargs/locales/nl.json
@@ -1,42 +1,42 @@
{
- "Commands:": "Opdrachten:",
+ "Commands:": "Commando's:",
"Options:": "Opties:",
"Examples:": "Voorbeelden:",
- "boolean": "boolean",
+ "boolean": "booleaans",
"count": "aantal",
- "string": "text",
- "number": "nummer",
+ "string": "string",
+ "number": "getal",
"array": "lijst",
"required": "verplicht",
"default:": "standaard:",
"choices:": "keuzes:",
"aliases:": "aliassen:",
"generated-value": "gegenereerde waarde",
- "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg non-optie argumenten. Gekregen: %s, minstens nodig: %s",
- "Too many non-option arguments: got %s, maximum of %s": "Te veel non-optie argumenten. Gekregen: %s, maximum: %s",
+ "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig",
+ "Too many non-option arguments: got %s, maximum of %s": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s",
"Missing argument value: %s": {
- "one": "Missing argument value: %s",
- "other": "Missing argument values: %s"
+ "one": "Missende argumentwaarde: %s",
+ "other": "Missende argumentwaarden: %s"
},
"Missing required argument: %s": {
- "one": "Missend verplichte argument: %s",
+ "one": "Missend verplicht argument: %s",
"other": "Missende verplichte argumenten: %s"
},
"Unknown argument: %s": {
"one": "Onbekend argument: %s",
"other": "Onbekende argumenten: %s"
},
- "Invalid values:": "Ongeldige waardes:",
+ "Invalid values:": "Ongeldige waarden:",
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s",
- "Argument check failed: %s": "Argument check mislukt: %s",
- "Implications failed:": "Implicaties mislukt:",
+ "Argument check failed: %s": "Argumentcontrole mislukt: %s",
+ "Implications failed:": "Ontbrekende afhankelijke argumenten:",
"Not enough arguments following: %s": "Niet genoeg argumenten na: %s",
- "Invalid JSON config file: %s": "Ongeldig JSON configuratiebestand: %s",
- "Path to JSON config file": "Pad naar JSON configuratiebestand",
+ "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s",
+ "Path to JSON config file": "Pad naar JSON-config-bestand",
"Show help": "Toon help",
- "Show version number": "Toon versie nummer",
+ "Show version number": "Toon versienummer",
"Did you mean %s?": "Bedoelde u misschien %s?",
- "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s zijn onderling uitsluitend",
+ "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden",
"Positionals:": "Positie-afhankelijke argumenten",
"command": "commando"
}
diff --git a/node_modules/yargs/locales/nn.json b/node_modules/yargs/locales/nn.json
index 5e03c505ab75b..5a3c9514dc5b0 100644
--- a/node_modules/yargs/locales/nn.json
+++ b/node_modules/yargs/locales/nn.json
@@ -29,9 +29,9 @@
},
"Invalid values:": "Ugyldige verdiar:",
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s",
- "Argument check failed: %s": "Argument sjekk mislukkast: %s",
+ "Argument check failed: %s": "Argumentsjekk mislukkast: %s",
"Implications failed:": "Konsekvensane mislukkast:",
- "Not enough arguments following: %s": "Ikkje nok fylgande argument: %s",
+ "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s",
"Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s",
"Path to JSON config file": "Bane til JSON konfigurasjonsfil",
"Show help": "Vis hjelp",
diff --git a/node_modules/yargs/locales/pirate.json b/node_modules/yargs/locales/pirate.json
index 1f4e19e65de5e..dcb5cb75377d7 100644
--- a/node_modules/yargs/locales/pirate.json
+++ b/node_modules/yargs/locales/pirate.json
@@ -8,5 +8,6 @@
"other": "Ye be havin' to set the followin' arguments land lubber: %s"
},
"Show help": "Parlay this here code of conduct",
- "Show version number": "'Tis the version ye be askin' fer"
+ "Show version number": "'Tis the version ye be askin' fer",
+ "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench"
}
diff --git a/node_modules/yargs/node_modules/ansi-regex/index.js b/node_modules/yargs/node_modules/ansi-regex/index.js
new file mode 100644
index 0000000000000..c25448009f304
--- /dev/null
+++ b/node_modules/yargs/node_modules/ansi-regex/index.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = options => {
+ options = Object.assign({
+ onlyFirst: false
+ }, options);
+
+ const pattern = [
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
+ ].join('|');
+
+ return new RegExp(pattern, options.onlyFirst ? undefined : 'g');
+};
diff --git a/node_modules/os-locale/license b/node_modules/yargs/node_modules/ansi-regex/license
similarity index 100%
rename from node_modules/os-locale/license
rename to node_modules/yargs/node_modules/ansi-regex/license
diff --git a/node_modules/yargs/node_modules/ansi-regex/package.json b/node_modules/yargs/node_modules/ansi-regex/package.json
new file mode 100644
index 0000000000000..32d176534fee2
--- /dev/null
+++ b/node_modules/yargs/node_modules/ansi-regex/package.json
@@ -0,0 +1,85 @@
+{
+ "_from": "ansi-regex@^4.1.0",
+ "_id": "ansi-regex@4.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "_location": "/yargs/ansi-regex",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "ansi-regex@^4.1.0",
+ "name": "ansi-regex",
+ "escapedName": "ansi-regex",
+ "rawSpec": "^4.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^4.1.0"
+ },
+ "_requiredBy": [
+ "/yargs/strip-ansi"
+ ],
+ "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "_shasum": "8b9f8f08cf1acb843756a839ca8c7e3168c51997",
+ "_spec": "ansi-regex@^4.1.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/strip-ansi",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/ansi-regex/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Regular expression for matching ANSI escape codes",
+ "devDependencies": {
+ "ava": "^0.25.0",
+ "xo": "^0.23.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/chalk/ansi-regex#readme",
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "text",
+ "regex",
+ "regexp",
+ "re",
+ "match",
+ "test",
+ "find",
+ "pattern"
+ ],
+ "license": "MIT",
+ "name": "ansi-regex",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/ansi-regex.git"
+ },
+ "scripts": {
+ "test": "xo && ava",
+ "view-supported": "node fixtures/view-codes.js"
+ },
+ "version": "4.1.0"
+}
diff --git a/node_modules/yargs/node_modules/ansi-regex/readme.md b/node_modules/yargs/node_modules/ansi-regex/readme.md
new file mode 100644
index 0000000000000..d19c44667e704
--- /dev/null
+++ b/node_modules/yargs/node_modules/ansi-regex/readme.md
@@ -0,0 +1,87 @@
+# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
+
+> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+
+---
+
+
+
+---
+
+
+## Install
+
+```
+$ npm install ansi-regex
+```
+
+
+## Usage
+
+```js
+const ansiRegex = require('ansi-regex');
+
+ansiRegex().test('\u001B[4mcake\u001B[0m');
+//=> true
+
+ansiRegex().test('cake');
+//=> false
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex());
+//=> ['\u001B[4m', '\u001B[0m']
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
+//=> ['\u001B[4m']
+
+'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
+//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
+```
+
+
+## API
+
+### ansiRegex([options])
+
+Returns a regex for matching ANSI escape codes.
+
+#### options
+
+##### onlyFirst
+
+Type: `boolean`
+Default: `false` *(Matches any ANSI escape codes in a string)*
+
+Match only the first ANSI escape.
+
+
+## FAQ
+
+### Why do you test for codes not in the ECMA 48 standard?
+
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
+
+On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
+
+
+## Security
+
+To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/node_modules/yargs/node_modules/find-up/index.js b/node_modules/yargs/node_modules/find-up/index.js
new file mode 100644
index 0000000000000..8e83819cea5a9
--- /dev/null
+++ b/node_modules/yargs/node_modules/find-up/index.js
@@ -0,0 +1,46 @@
+'use strict';
+const path = require('path');
+const locatePath = require('locate-path');
+
+module.exports = (filename, opts = {}) => {
+ const startDir = path.resolve(opts.cwd || '');
+ const {root} = path.parse(startDir);
+
+ const filenames = [].concat(filename);
+
+ return new Promise(resolve => {
+ (function find(dir) {
+ locatePath(filenames, {cwd: dir}).then(file => {
+ if (file) {
+ resolve(path.join(dir, file));
+ } else if (dir === root) {
+ resolve(null);
+ } else {
+ find(path.dirname(dir));
+ }
+ });
+ })(startDir);
+ });
+};
+
+module.exports.sync = (filename, opts = {}) => {
+ let dir = path.resolve(opts.cwd || '');
+ const {root} = path.parse(dir);
+
+ const filenames = [].concat(filename);
+
+ // eslint-disable-next-line no-constant-condition
+ while (true) {
+ const file = locatePath.sync(filenames, {cwd: dir});
+
+ if (file) {
+ return path.join(dir, file);
+ }
+
+ if (dir === root) {
+ return null;
+ }
+
+ dir = path.dirname(dir);
+ }
+};
diff --git a/node_modules/os-locale/node_modules/execa/license b/node_modules/yargs/node_modules/find-up/license
similarity index 100%
rename from node_modules/os-locale/node_modules/execa/license
rename to node_modules/yargs/node_modules/find-up/license
diff --git a/node_modules/yargs/node_modules/find-up/package.json b/node_modules/yargs/node_modules/find-up/package.json
new file mode 100644
index 0000000000000..4ea5014dd40c6
--- /dev/null
+++ b/node_modules/yargs/node_modules/find-up/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "find-up@^3.0.0",
+ "_id": "find-up@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "_location": "/yargs/find-up",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "find-up@^3.0.0",
+ "name": "find-up",
+ "escapedName": "find-up",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/yargs"
+ ],
+ "_resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "_shasum": "49169f1d7993430646da61ecc5ae355c21c97b73",
+ "_spec": "find-up@^3.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/find-up/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "locate-path": "^3.0.0"
+ },
+ "deprecated": false,
+ "description": "Find a file or directory by walking up parent directories",
+ "devDependencies": {
+ "ava": "*",
+ "tempy": "^0.2.1",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/find-up#readme",
+ "keywords": [
+ "find",
+ "up",
+ "find-up",
+ "findup",
+ "look-up",
+ "look",
+ "file",
+ "search",
+ "match",
+ "package",
+ "resolve",
+ "parent",
+ "parents",
+ "folder",
+ "directory",
+ "dir",
+ "walk",
+ "walking",
+ "path"
+ ],
+ "license": "MIT",
+ "name": "find-up",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/find-up.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0"
+}
diff --git a/node_modules/yargs/node_modules/find-up/readme.md b/node_modules/yargs/node_modules/find-up/readme.md
new file mode 100644
index 0000000000000..810ad7ceb5276
--- /dev/null
+++ b/node_modules/yargs/node_modules/find-up/readme.md
@@ -0,0 +1,87 @@
+# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master)
+
+> Find a file or directory by walking up parent directories
+
+
+## Install
+
+```
+$ npm install find-up
+```
+
+
+## Usage
+
+```
+/
+βββ Users
+ βββ sindresorhus
+ βββ unicorn.png
+ βββ foo
+ βββ bar
+ βββ baz
+ βββ example.js
+```
+
+`example.js`
+
+```js
+const findUp = require('find-up');
+
+(async () => {
+ console.log(await findUp('unicorn.png'));
+ //=> '/Users/sindresorhus/unicorn.png'
+
+ console.log(await findUp(['rainbow.png', 'unicorn.png']));
+ //=> '/Users/sindresorhus/unicorn.png'
+})();
+```
+
+
+## API
+
+### findUp(filename, [options])
+
+Returns a `Promise` for either the filepath or `null` if it couldn't be found.
+
+### findUp([filenameA, filenameB], [options])
+
+Returns a `Promise` for either the first filepath found (by respecting the order) or `null` if none could be found.
+
+### findUp.sync(filename, [options])
+
+Returns a filepath or `null`.
+
+### findUp.sync([filenameA, filenameB], [options])
+
+Returns the first filepath found (by respecting the order) or `null`.
+
+#### filename
+
+Type: `string`
+
+Filename of the file to find.
+
+#### options
+
+Type: `Object`
+
+##### cwd
+
+Type: `string`
+Default: `process.cwd()`
+
+Directory to start from.
+
+
+## Related
+
+- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module
+- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
+- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package
+- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module like `require.resolve()` but from a given path
+
+
+## License
+
+MIT Β© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js b/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js
new file mode 100644
index 0000000000000..d506327c3e557
--- /dev/null
+++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js
@@ -0,0 +1,46 @@
+'use strict';
+/* eslint-disable yoda */
+module.exports = x => {
+ if (Number.isNaN(x)) {
+ return false;
+ }
+
+ // code points are derived from:
+ // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
+ if (
+ x >= 0x1100 && (
+ x <= 0x115f || // Hangul Jamo
+ x === 0x2329 || // LEFT-POINTING ANGLE BRACKET
+ x === 0x232a || // RIGHT-POINTING ANGLE BRACKET
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
+ (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
+ // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
+ (0x3250 <= x && x <= 0x4dbf) ||
+ // CJK Unified Ideographs .. Yi Radicals
+ (0x4e00 <= x && x <= 0xa4c6) ||
+ // Hangul Jamo Extended-A
+ (0xa960 <= x && x <= 0xa97c) ||
+ // Hangul Syllables
+ (0xac00 <= x && x <= 0xd7a3) ||
+ // CJK Compatibility Ideographs
+ (0xf900 <= x && x <= 0xfaff) ||
+ // Vertical Forms
+ (0xfe10 <= x && x <= 0xfe19) ||
+ // CJK Compatibility Forms .. Small Form Variants
+ (0xfe30 <= x && x <= 0xfe6b) ||
+ // Halfwidth and Fullwidth Forms
+ (0xff01 <= x && x <= 0xff60) ||
+ (0xffe0 <= x && x <= 0xffe6) ||
+ // Kana Supplement
+ (0x1b000 <= x && x <= 0x1b001) ||
+ // Enclosed Ideographic Supplement
+ (0x1f200 <= x && x <= 0x1f251) ||
+ // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
+ (0x20000 <= x && x <= 0x3fffd)
+ )
+ ) {
+ return true;
+ }
+
+ return false;
+};
diff --git a/node_modules/yargs/node_modules/is-fullwidth-code-point/license b/node_modules/yargs/node_modules/is-fullwidth-code-point/license
new file mode 100644
index 0000000000000..654d0bfe94343
--- /dev/null
+++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json b/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json
new file mode 100644
index 0000000000000..88ca7956f1970
--- /dev/null
+++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json
@@ -0,0 +1,77 @@
+{
+ "_from": "is-fullwidth-code-point@^2.0.0",
+ "_id": "is-fullwidth-code-point@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "_location": "/yargs/is-fullwidth-code-point",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-fullwidth-code-point@^2.0.0",
+ "name": "is-fullwidth-code-point",
+ "escapedName": "is-fullwidth-code-point",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/yargs/string-width"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f",
+ "_spec": "is-fullwidth-code-point@^2.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/string-width",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Check if the character represented by a given Unicode code point is fullwidth",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme",
+ "keywords": [
+ "fullwidth",
+ "full-width",
+ "full",
+ "width",
+ "unicode",
+ "character",
+ "char",
+ "string",
+ "str",
+ "codepoint",
+ "code",
+ "point",
+ "is",
+ "detect",
+ "check"
+ ],
+ "license": "MIT",
+ "name": "is-fullwidth-code-point",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.0.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md b/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md
new file mode 100644
index 0000000000000..093b0281b2c46
--- /dev/null
+++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md
@@ -0,0 +1,39 @@
+# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point)
+
+> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
+
+
+## Install
+
+```
+$ npm install --save is-fullwidth-code-point
+```
+
+
+## Usage
+
+```js
+const isFullwidthCodePoint = require('is-fullwidth-code-point');
+
+isFullwidthCodePoint('θ°’'.codePointAt());
+//=> true
+
+isFullwidthCodePoint('a'.codePointAt());
+//=> false
+```
+
+
+## API
+
+### isFullwidthCodePoint(input)
+
+#### input
+
+Type: `number`
+
+[Code point](https://en.wikipedia.org/wiki/Code_point) of a character.
+
+
+## License
+
+MIT Β© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/yargs/node_modules/locate-path/index.js b/node_modules/yargs/node_modules/locate-path/index.js
new file mode 100644
index 0000000000000..5aae6ee4ad027
--- /dev/null
+++ b/node_modules/yargs/node_modules/locate-path/index.js
@@ -0,0 +1,24 @@
+'use strict';
+const path = require('path');
+const pathExists = require('path-exists');
+const pLocate = require('p-locate');
+
+module.exports = (iterable, options) => {
+ options = Object.assign({
+ cwd: process.cwd()
+ }, options);
+
+ return pLocate(iterable, el => pathExists(path.resolve(options.cwd, el)), options);
+};
+
+module.exports.sync = (iterable, options) => {
+ options = Object.assign({
+ cwd: process.cwd()
+ }, options);
+
+ for (const el of iterable) {
+ if (pathExists.sync(path.resolve(options.cwd, el))) {
+ return el;
+ }
+ }
+};
diff --git a/node_modules/yargs/node_modules/locate-path/license b/node_modules/yargs/node_modules/locate-path/license
new file mode 100644
index 0000000000000..e7af2f77107d7
--- /dev/null
+++ b/node_modules/yargs/node_modules/locate-path/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/yargs/node_modules/locate-path/package.json b/node_modules/yargs/node_modules/locate-path/package.json
new file mode 100644
index 0000000000000..4800b6856bf92
--- /dev/null
+++ b/node_modules/yargs/node_modules/locate-path/package.json
@@ -0,0 +1,76 @@
+{
+ "_from": "locate-path@^3.0.0",
+ "_id": "locate-path@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "_location": "/yargs/locate-path",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "locate-path@^3.0.0",
+ "name": "locate-path",
+ "escapedName": "locate-path",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/yargs/find-up"
+ ],
+ "_resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "_shasum": "dbec3b3ab759758071b58fe59fc41871af21400e",
+ "_spec": "locate-path@^3.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/find-up",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/locate-path/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "p-locate": "^3.0.0",
+ "path-exists": "^3.0.0"
+ },
+ "deprecated": false,
+ "description": "Get the first path that exists on disk of multiple paths",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/locate-path#readme",
+ "keywords": [
+ "locate",
+ "path",
+ "paths",
+ "file",
+ "files",
+ "exists",
+ "find",
+ "finder",
+ "search",
+ "searcher",
+ "array",
+ "iterable",
+ "iterator"
+ ],
+ "license": "MIT",
+ "name": "locate-path",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/locate-path.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0"
+}
diff --git a/node_modules/yargs/node_modules/locate-path/readme.md b/node_modules/yargs/node_modules/locate-path/readme.md
new file mode 100644
index 0000000000000..a1d2e628328c2
--- /dev/null
+++ b/node_modules/yargs/node_modules/locate-path/readme.md
@@ -0,0 +1,99 @@
+# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path)
+
+> Get the first path that exists on disk of multiple paths
+
+
+## Install
+
+```
+$ npm install locate-path
+```
+
+
+## Usage
+
+Here we find the first file that exists on disk, in array order.
+
+```js
+const locatePath = require('locate-path');
+
+const files = [
+ 'unicorn.png',
+ 'rainbow.png', // Only this one actually exists on disk
+ 'pony.png'
+];
+
+(async () => {
+ console(await locatePath(files));
+ //=> 'rainbow'
+})();
+```
+
+
+## API
+
+### locatePath(input, [options])
+
+Returns a `Promise` for the first path that exists or `undefined` if none exists.
+
+#### input
+
+Type: `Iterable`
+
+Paths to check.
+
+#### options
+
+Type: `Object`
+
+##### concurrency
+
+Type: `number`
+Default: `Infinity`
+Minimum: `1`
+
+Number of concurrently pending promises.
+
+##### preserveOrder
+
+Type: `boolean`
+Default: `true`
+
+Preserve `input` order when searching.
+
+Disable this to improve performance if you don't care about the order.
+
+##### cwd
+
+Type: `string`
+Default: `process.cwd()`
+
+Current working directory.
+
+### locatePath.sync(input, [options])
+
+Returns the first path that exists or `undefined` if none exists.
+
+#### input
+
+Type: `Iterable`
+
+Paths to check.
+
+#### options
+
+Type: `Object`
+
+##### cwd
+
+Same as above.
+
+
+## Related
+
+- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists
+
+
+## License
+
+MIT Β© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/yargs/node_modules/p-limit/index.d.ts b/node_modules/yargs/node_modules/p-limit/index.d.ts
new file mode 100644
index 0000000000000..6bbfad4ac7766
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-limit/index.d.ts
@@ -0,0 +1,38 @@
+export interface Limit {
+ /**
+ @param fn - Promise-returning/async function.
+ @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a lot of functions.
+ @returns The promise returned by calling `fn(...arguments)`.
+ */
+ (
+ fn: (...arguments: Arguments) => PromiseLike | ReturnType,
+ ...arguments: Arguments
+ ): Promise;
+
+ /**
+ The number of promises that are currently running.
+ */
+ readonly activeCount: number;
+
+ /**
+ The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
+ */
+ readonly pendingCount: number;
+
+ /**
+ Discard pending promises that are waiting to run.
+
+ This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app.
+
+ Note: This does not cancel promises that are already running.
+ */
+ clearQueue(): void;
+}
+
+/**
+Run multiple promise-returning & async functions with limited concurrency.
+
+@param concurrency - Concurrency limit. Minimum: `1`.
+@returns A `limit` function.
+*/
+export default function pLimit(concurrency: number): Limit;
diff --git a/node_modules/yargs/node_modules/p-limit/index.js b/node_modules/yargs/node_modules/p-limit/index.js
new file mode 100644
index 0000000000000..6a72a4c4fc3c7
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-limit/index.js
@@ -0,0 +1,57 @@
+'use strict';
+const pTry = require('p-try');
+
+const pLimit = concurrency => {
+ if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
+ return Promise.reject(new TypeError('Expected `concurrency` to be a number from 1 and up'));
+ }
+
+ const queue = [];
+ let activeCount = 0;
+
+ const next = () => {
+ activeCount--;
+
+ if (queue.length > 0) {
+ queue.shift()();
+ }
+ };
+
+ const run = (fn, resolve, ...args) => {
+ activeCount++;
+
+ const result = pTry(fn, ...args);
+
+ resolve(result);
+
+ result.then(next, next);
+ };
+
+ const enqueue = (fn, resolve, ...args) => {
+ if (activeCount < concurrency) {
+ run(fn, resolve, ...args);
+ } else {
+ queue.push(run.bind(null, fn, resolve, ...args));
+ }
+ };
+
+ const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args));
+ Object.defineProperties(generator, {
+ activeCount: {
+ get: () => activeCount
+ },
+ pendingCount: {
+ get: () => queue.length
+ },
+ clearQueue: {
+ value: () => {
+ queue.length = 0;
+ }
+ }
+ });
+
+ return generator;
+};
+
+module.exports = pLimit;
+module.exports.default = pLimit;
diff --git a/node_modules/yargs/node_modules/p-limit/license b/node_modules/yargs/node_modules/p-limit/license
new file mode 100644
index 0000000000000..e7af2f77107d7
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-limit/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/yargs/node_modules/p-limit/package.json b/node_modules/yargs/node_modules/p-limit/package.json
new file mode 100644
index 0000000000000..1aef677a31751
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-limit/package.json
@@ -0,0 +1,84 @@
+{
+ "_from": "p-limit@^2.0.0",
+ "_id": "p-limit@2.3.0",
+ "_inBundle": false,
+ "_integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "_location": "/yargs/p-limit",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "p-limit@^2.0.0",
+ "name": "p-limit",
+ "escapedName": "p-limit",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/yargs/p-locate"
+ ],
+ "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "_shasum": "3dd33c647a214fdfffd835933eb086da0dc21db1",
+ "_spec": "p-limit@^2.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/p-locate",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/p-limit/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Run multiple promise-returning & async functions with limited concurrency",
+ "devDependencies": {
+ "ava": "^1.2.1",
+ "delay": "^4.1.0",
+ "in-range": "^1.0.0",
+ "random-int": "^1.0.0",
+ "time-span": "^2.0.0",
+ "tsd-check": "^0.3.0",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "homepage": "https://github.com/sindresorhus/p-limit#readme",
+ "keywords": [
+ "promise",
+ "limit",
+ "limited",
+ "concurrency",
+ "throttle",
+ "throat",
+ "rate",
+ "batch",
+ "ratelimit",
+ "task",
+ "queue",
+ "async",
+ "await",
+ "promises",
+ "bluebird"
+ ],
+ "license": "MIT",
+ "name": "p-limit",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/p-limit.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd-check"
+ },
+ "version": "2.3.0"
+}
diff --git a/node_modules/yargs/node_modules/p-limit/readme.md b/node_modules/yargs/node_modules/p-limit/readme.md
new file mode 100644
index 0000000000000..64aa476e2370c
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-limit/readme.md
@@ -0,0 +1,101 @@
+# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit)
+
+> Run multiple promise-returning & async functions with limited concurrency
+
+## Install
+
+```
+$ npm install p-limit
+```
+
+## Usage
+
+```js
+const pLimit = require('p-limit');
+
+const limit = pLimit(1);
+
+const input = [
+ limit(() => fetchSomething('foo')),
+ limit(() => fetchSomething('bar')),
+ limit(() => doSomething())
+];
+
+(async () => {
+ // Only one promise is run at once
+ const result = await Promise.all(input);
+ console.log(result);
+})();
+```
+
+## API
+
+### pLimit(concurrency)
+
+Returns a `limit` function.
+
+#### concurrency
+
+Type: `number`\
+Minimum: `1`\
+Default: `Infinity`
+
+Concurrency limit.
+
+### limit(fn, ...args)
+
+Returns the promise returned by calling `fn(...args)`.
+
+#### fn
+
+Type: `Function`
+
+Promise-returning/async function.
+
+#### args
+
+Any arguments to pass through to `fn`.
+
+Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions.
+
+### limit.activeCount
+
+The number of promises that are currently running.
+
+### limit.pendingCount
+
+The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
+
+### limit.clearQueue()
+
+Discard pending promises that are waiting to run.
+
+This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app.
+
+Note: This does not cancel promises that are already running.
+
+## FAQ
+
+### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package?
+
+This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause the queue.
+
+## Related
+
+- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control
+- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions
+- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions
+- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency
+- [Moreβ¦](https://github.com/sindresorhus/promise-fun)
+
+---
+
+
diff --git a/node_modules/yargs/node_modules/p-locate/index.js b/node_modules/yargs/node_modules/p-locate/index.js
new file mode 100644
index 0000000000000..4bd08aad19312
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-locate/index.js
@@ -0,0 +1,34 @@
+'use strict';
+const pLimit = require('p-limit');
+
+class EndError extends Error {
+ constructor(value) {
+ super();
+ this.value = value;
+ }
+}
+
+// The input can also be a promise, so we `Promise.resolve()` it
+const testElement = (el, tester) => Promise.resolve(el).then(tester);
+
+// The input can also be a promise, so we `Promise.all()` them both
+const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0])));
+
+module.exports = (iterable, tester, opts) => {
+ opts = Object.assign({
+ concurrency: Infinity,
+ preserveOrder: true
+ }, opts);
+
+ const limit = pLimit(opts.concurrency);
+
+ // Start all the promises concurrently with optional limit
+ const items = [...iterable].map(el => [el, limit(testElement, el, tester)]);
+
+ // Check the promises either serially or concurrently
+ const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity);
+
+ return Promise.all(items.map(el => checkLimit(finder, el)))
+ .then(() => {})
+ .catch(err => err instanceof EndError ? err.value : Promise.reject(err));
+};
diff --git a/node_modules/yargs/node_modules/p-locate/license b/node_modules/yargs/node_modules/p-locate/license
new file mode 100644
index 0000000000000..e7af2f77107d7
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-locate/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/yargs/node_modules/p-locate/package.json b/node_modules/yargs/node_modules/p-locate/package.json
new file mode 100644
index 0000000000000..b6cefbf4248c5
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-locate/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "p-locate@^3.0.0",
+ "_id": "p-locate@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "_location": "/yargs/p-locate",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "p-locate@^3.0.0",
+ "name": "p-locate",
+ "escapedName": "p-locate",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/yargs/locate-path"
+ ],
+ "_resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "_shasum": "322d69a05c0264b25997d9f40cd8a891ab0064a4",
+ "_spec": "p-locate@^3.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/locate-path",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/p-locate/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "p-limit": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Get the first fulfilled promise that satisfies the provided testing function",
+ "devDependencies": {
+ "ava": "*",
+ "delay": "^3.0.0",
+ "in-range": "^1.0.0",
+ "time-span": "^2.0.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/p-locate#readme",
+ "keywords": [
+ "promise",
+ "locate",
+ "find",
+ "finder",
+ "search",
+ "searcher",
+ "test",
+ "array",
+ "collection",
+ "iterable",
+ "iterator",
+ "race",
+ "fulfilled",
+ "fastest",
+ "async",
+ "await",
+ "promises",
+ "bluebird"
+ ],
+ "license": "MIT",
+ "name": "p-locate",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/p-locate.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0"
+}
diff --git a/node_modules/yargs/node_modules/p-locate/readme.md b/node_modules/yargs/node_modules/p-locate/readme.md
new file mode 100644
index 0000000000000..3b0173bc4ea78
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-locate/readme.md
@@ -0,0 +1,88 @@
+# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate)
+
+> Get the first fulfilled promise that satisfies the provided testing function
+
+Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+
+
+## Install
+
+```
+$ npm install p-locate
+```
+
+
+## Usage
+
+Here we find the first file that exists on disk, in array order.
+
+```js
+const pathExists = require('path-exists');
+const pLocate = require('p-locate');
+
+const files = [
+ 'unicorn.png',
+ 'rainbow.png', // Only this one actually exists on disk
+ 'pony.png'
+];
+
+(async () => {
+ const foundPath = await pLocate(files, file => pathExists(file));
+
+ console.log(foundPath);
+ //=> 'rainbow'
+})();
+```
+
+*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.*
+
+
+## API
+
+### pLocate(input, tester, [options])
+
+Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`.
+
+#### input
+
+Type: `Iterable`
+
+#### tester(element)
+
+Type: `Function`
+
+Expected to return a `Promise` or boolean.
+
+#### options
+
+Type: `Object`
+
+##### concurrency
+
+Type: `number`
+Default: `Infinity`
+Minimum: `1`
+
+Number of concurrently pending promises returned by `tester`.
+
+##### preserveOrder
+
+Type: `boolean`
+Default: `true`
+
+Preserve `input` order when searching.
+
+Disable this to improve performance if you don't care about the order.
+
+
+## Related
+
+- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
+- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently
+- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled
+- [Moreβ¦](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT Β© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/yargs/node_modules/p-try/index.d.ts b/node_modules/yargs/node_modules/p-try/index.d.ts
new file mode 100644
index 0000000000000..2a7319ec2a556
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-try/index.d.ts
@@ -0,0 +1,39 @@
+declare const pTry: {
+ /**
+ Start a promise chain.
+
+ @param fn - The function to run to start the promise chain.
+ @param arguments - Arguments to pass to `fn`.
+ @returns The value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error.
+
+ @example
+ ```
+ import pTry = require('p-try');
+
+ (async () => {
+ try {
+ const value = await pTry(() => {
+ return synchronousFunctionThatMightThrow();
+ });
+ console.log(value);
+ } catch (error) {
+ console.error(error);
+ }
+ })();
+ ```
+ */
+ (
+ fn: (...arguments: ArgumentsType) => PromiseLike | ValueType,
+ ...arguments: ArgumentsType
+ ): Promise;
+
+ // TODO: remove this in the next major version, refactor the whole definition to:
+ // declare function pTry(
+ // fn: (...arguments: ArgumentsType) => PromiseLike | ValueType,
+ // ...arguments: ArgumentsType
+ // ): Promise;
+ // export = pTry;
+ default: typeof pTry;
+};
+
+export = pTry;
diff --git a/node_modules/yargs/node_modules/p-try/index.js b/node_modules/yargs/node_modules/p-try/index.js
new file mode 100644
index 0000000000000..db858da29252b
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-try/index.js
@@ -0,0 +1,9 @@
+'use strict';
+
+const pTry = (fn, ...arguments_) => new Promise(resolve => {
+ resolve(fn(...arguments_));
+});
+
+module.exports = pTry;
+// TODO: remove this in the next major version
+module.exports.default = pTry;
diff --git a/node_modules/yargs/node_modules/p-try/license b/node_modules/yargs/node_modules/p-try/license
new file mode 100644
index 0000000000000..e7af2f77107d7
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-try/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/yargs/node_modules/p-try/package.json b/node_modules/yargs/node_modules/p-try/package.json
new file mode 100644
index 0000000000000..7ed46850f64d4
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-try/package.json
@@ -0,0 +1,74 @@
+{
+ "_from": "p-try@^2.0.0",
+ "_id": "p-try@2.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "_location": "/yargs/p-try",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "p-try@^2.0.0",
+ "name": "p-try",
+ "escapedName": "p-try",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/yargs/p-limit"
+ ],
+ "_resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "_shasum": "cb2868540e313d61de58fafbe35ce9004d5540e6",
+ "_spec": "p-try@^2.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/p-limit",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/p-try/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "`Start a promise chain",
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.1",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/sindresorhus/p-try#readme",
+ "keywords": [
+ "promise",
+ "try",
+ "resolve",
+ "function",
+ "catch",
+ "async",
+ "await",
+ "promises",
+ "settled",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "bluebird"
+ ],
+ "license": "MIT",
+ "name": "p-try",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/p-try.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "version": "2.2.0"
+}
diff --git a/node_modules/yargs/node_modules/p-try/readme.md b/node_modules/yargs/node_modules/p-try/readme.md
new file mode 100644
index 0000000000000..4d7bd64dfcb8b
--- /dev/null
+++ b/node_modules/yargs/node_modules/p-try/readme.md
@@ -0,0 +1,58 @@
+# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try)
+
+> Start a promise chain
+
+[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/)
+
+
+## Install
+
+```
+$ npm install p-try
+```
+
+
+## Usage
+
+```js
+const pTry = require('p-try');
+
+(async () => {
+ try {
+ const value = await pTry(() => {
+ return synchronousFunctionThatMightThrow();
+ });
+ console.log(value);
+ } catch (error) {
+ console.error(error);
+ }
+})();
+```
+
+
+## API
+
+### pTry(fn, ...arguments)
+
+Returns a `Promise` resolved with the value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error.
+
+Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions.
+
+#### fn
+
+The function to run to start the promise chain.
+
+#### arguments
+
+Arguments to pass to `fn`.
+
+
+## Related
+
+- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome
+- [Moreβ¦](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT Β© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/yargs/node_modules/string-width/index.js b/node_modules/yargs/node_modules/string-width/index.js
new file mode 100644
index 0000000000000..33c9d6c06f7a5
--- /dev/null
+++ b/node_modules/yargs/node_modules/string-width/index.js
@@ -0,0 +1,39 @@
+'use strict';
+const stripAnsi = require('strip-ansi');
+const isFullwidthCodePoint = require('is-fullwidth-code-point');
+const emojiRegex = require('emoji-regex')();
+
+module.exports = input => {
+ input = input.replace(emojiRegex, ' ');
+
+ if (typeof input !== 'string' || input.length === 0) {
+ return 0;
+ }
+
+ input = stripAnsi(input);
+
+ let width = 0;
+
+ for (let i = 0; i < input.length; i++) {
+ const code = input.codePointAt(i);
+
+ // Ignore control characters
+ if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) {
+ continue;
+ }
+
+ // Ignore combining characters
+ if (code >= 0x300 && code <= 0x36F) {
+ continue;
+ }
+
+ // Surrogates
+ if (code > 0xFFFF) {
+ i++;
+ }
+
+ width += isFullwidthCodePoint(code) ? 2 : 1;
+ }
+
+ return width;
+};
diff --git a/node_modules/yargs/node_modules/string-width/license b/node_modules/yargs/node_modules/string-width/license
new file mode 100644
index 0000000000000..e7af2f77107d7
--- /dev/null
+++ b/node_modules/yargs/node_modules/string-width/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/yargs/node_modules/string-width/package.json b/node_modules/yargs/node_modules/string-width/package.json
new file mode 100644
index 0000000000000..328f386cdc922
--- /dev/null
+++ b/node_modules/yargs/node_modules/string-width/package.json
@@ -0,0 +1,88 @@
+{
+ "_from": "string-width@^3.0.0",
+ "_id": "string-width@3.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "_location": "/yargs/string-width",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string-width@^3.0.0",
+ "name": "string-width",
+ "escapedName": "string-width",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/yargs"
+ ],
+ "_resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "_shasum": "22767be21b62af1081574306f69ac51b62203961",
+ "_spec": "string-width@^3.0.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/string-width/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ },
+ "deprecated": false,
+ "description": "Get the visual width of a string - the number of columns required to display it",
+ "devDependencies": {
+ "ava": "^1.0.1",
+ "xo": "^0.23.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/string-width#readme",
+ "keywords": [
+ "string",
+ "str",
+ "character",
+ "char",
+ "unicode",
+ "width",
+ "visual",
+ "column",
+ "columns",
+ "fullwidth",
+ "full-width",
+ "full",
+ "ansi",
+ "escape",
+ "codes",
+ "cli",
+ "command-line",
+ "terminal",
+ "console",
+ "cjk",
+ "chinese",
+ "japanese",
+ "korean",
+ "fixed-width"
+ ],
+ "license": "MIT",
+ "name": "string-width",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/string-width.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.1.0"
+}
diff --git a/node_modules/yargs/node_modules/string-width/readme.md b/node_modules/yargs/node_modules/string-width/readme.md
new file mode 100644
index 0000000000000..d39d95f56cf3f
--- /dev/null
+++ b/node_modules/yargs/node_modules/string-width/readme.md
@@ -0,0 +1,45 @@
+# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width)
+
+> Get the visual width of a string - the number of columns required to display it
+
+Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width.
+
+Useful to be able to measure the actual width of command-line output.
+
+
+## Install
+
+```
+$ npm install string-width
+```
+
+
+## Usage
+
+```js
+const stringWidth = require('string-width');
+
+stringWidth('ε€');
+//=> 2
+
+stringWidth('\u001b[1mε€\u001b[22m');
+//=> 2
+
+stringWidth('a');
+//=> 1
+
+stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+// => 5
+```
+
+
+## Related
+
+- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module
+- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string
+- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string
+
+
+## License
+
+MIT Β© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/yargs/node_modules/strip-ansi/index.d.ts b/node_modules/yargs/node_modules/strip-ansi/index.d.ts
new file mode 100644
index 0000000000000..44e954d0c724d
--- /dev/null
+++ b/node_modules/yargs/node_modules/strip-ansi/index.d.ts
@@ -0,0 +1,15 @@
+/**
+Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
+
+@example
+```
+import stripAnsi from 'strip-ansi';
+
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
+
+stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+//=> 'Click'
+```
+*/
+export default function stripAnsi(string: string): string;
diff --git a/node_modules/yargs/node_modules/strip-ansi/index.js b/node_modules/yargs/node_modules/strip-ansi/index.js
new file mode 100644
index 0000000000000..9788c96dfa3b0
--- /dev/null
+++ b/node_modules/yargs/node_modules/strip-ansi/index.js
@@ -0,0 +1,7 @@
+'use strict';
+const ansiRegex = require('ansi-regex');
+
+const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;
+
+module.exports = stripAnsi;
+module.exports.default = stripAnsi;
diff --git a/node_modules/yargs/node_modules/strip-ansi/license b/node_modules/yargs/node_modules/strip-ansi/license
new file mode 100644
index 0000000000000..e7af2f77107d7
--- /dev/null
+++ b/node_modules/yargs/node_modules/strip-ansi/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/yargs/node_modules/strip-ansi/package.json b/node_modules/yargs/node_modules/strip-ansi/package.json
new file mode 100644
index 0000000000000..127cf08941ca8
--- /dev/null
+++ b/node_modules/yargs/node_modules/strip-ansi/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "strip-ansi@^5.1.0",
+ "_id": "strip-ansi@5.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "_location": "/yargs/strip-ansi",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "strip-ansi@^5.1.0",
+ "name": "strip-ansi",
+ "escapedName": "strip-ansi",
+ "rawSpec": "^5.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^5.1.0"
+ },
+ "_requiredBy": [
+ "/yargs/string-width"
+ ],
+ "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "_shasum": "8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae",
+ "_spec": "strip-ansi@^5.1.0",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/string-width",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/strip-ansi/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "ansi-regex": "^4.1.0"
+ },
+ "deprecated": false,
+ "description": "Strip ANSI escape codes from a string",
+ "devDependencies": {
+ "ava": "^1.3.1",
+ "tsd-check": "^0.5.0",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/chalk/strip-ansi#readme",
+ "keywords": [
+ "strip",
+ "trim",
+ "remove",
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "license": "MIT",
+ "name": "strip-ansi",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/strip-ansi.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd-check"
+ },
+ "version": "5.2.0"
+}
diff --git a/node_modules/yargs/node_modules/strip-ansi/readme.md b/node_modules/yargs/node_modules/strip-ansi/readme.md
new file mode 100644
index 0000000000000..8681fe8af4424
--- /dev/null
+++ b/node_modules/yargs/node_modules/strip-ansi/readme.md
@@ -0,0 +1,61 @@
+# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
+
+> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string
+
+---
+
+
+
+---
+
+## Install
+
+```
+$ npm install strip-ansi
+```
+
+
+## Usage
+
+```js
+const stripAnsi = require('strip-ansi');
+
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
+
+stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+//=> 'Click'
+```
+
+
+## Security
+
+To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+
+
+## Related
+
+- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
+- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/node_modules/yargs/node_modules/y18n/LICENSE b/node_modules/yargs/node_modules/y18n/LICENSE
deleted file mode 100644
index 3c157f0b9d9be..0000000000000
--- a/node_modules/yargs/node_modules/y18n/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright (c) 2015, Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any purpose
-with or without fee is hereby granted, provided that the above copyright notice
-and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
diff --git a/node_modules/yargs/node_modules/y18n/README.md b/node_modules/yargs/node_modules/y18n/README.md
deleted file mode 100644
index 9859458f20b85..0000000000000
--- a/node_modules/yargs/node_modules/y18n/README.md
+++ /dev/null
@@ -1,91 +0,0 @@
-# y18n
-
-[![Build Status][travis-image]][travis-url]
-[![Coverage Status][coveralls-image]][coveralls-url]
-[![NPM version][npm-image]][npm-url]
-[![js-standard-style][standard-image]][standard-url]
-
-The bare-bones internationalization library used by yargs.
-
-Inspired by [i18n](https://www.npmjs.com/package/i18n).
-
-## Examples
-
-_simple string translation:_
-
-```js
-var __ = require('y18n').__
-
-console.log(__('my awesome string %s', 'foo'))
-```
-
-output:
-
-`my awesome string foo`
-
-_pluralization support:_
-
-```js
-var __n = require('y18n').__n
-
-console.log(__n('one fish %s', '%d fishes %s', 2, 'foo'))
-```
-
-output:
-
-`2 fishes foo`
-
-## JSON Language Files
-
-The JSON language files should be stored in a `./locales` folder.
-File names correspond to locales, e.g., `en.json`, `pirate.json`.
-
-When strings are observed for the first time they will be
-added to the JSON file corresponding to the current locale.
-
-## Methods
-
-### require('y18n')(config)
-
-Create an instance of y18n with the config provided, options include:
-
-* `directory`: the locale directory, default `./locales`.
-* `updateFiles`: should newly observed strings be updated in file, default `true`.
-* `locale`: what locale should be used.
-* `fallbackToLanguage`: should fallback to a language-only file (e.g. `en.json`)
- be allowed if a file matching the locale does not exist (e.g. `en_US.json`),
- default `true`.
-
-### y18n.\_\_(str, arg, arg, arg)
-
-Print a localized string, `%s` will be replaced with `arg`s.
-
-### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg)
-
-Print a localized string with appropriate pluralization. If `%d` is provided
-in the string, the `count` will replace this placeholder.
-
-### y18n.setLocale(str)
-
-Set the current locale being used.
-
-### y18n.getLocale()
-
-What locale is currently being used?
-
-### y18n.updateLocale(obj)
-
-Update the current locale with the key value pairs in `obj`.
-
-## License
-
-ISC
-
-[travis-url]: https://travis-ci.org/yargs/y18n
-[travis-image]: https://img.shields.io/travis/yargs/y18n.svg
-[coveralls-url]: https://coveralls.io/github/yargs/y18n
-[coveralls-image]: https://img.shields.io/coveralls/yargs/y18n.svg
-[npm-url]: https://npmjs.org/package/y18n
-[npm-image]: https://img.shields.io/npm/v/y18n.svg
-[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
-[standard-url]: https://github.com/feross/standard
diff --git a/node_modules/yargs/node_modules/y18n/index.js b/node_modules/yargs/node_modules/y18n/index.js
deleted file mode 100644
index 91b159e34298a..0000000000000
--- a/node_modules/yargs/node_modules/y18n/index.js
+++ /dev/null
@@ -1,172 +0,0 @@
-var fs = require('fs')
-var path = require('path')
-var util = require('util')
-
-function Y18N (opts) {
- // configurable options.
- opts = opts || {}
- this.directory = opts.directory || './locales'
- this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true
- this.locale = opts.locale || 'en'
- this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true
-
- // internal stuff.
- this.cache = {}
- this.writeQueue = []
-}
-
-Y18N.prototype.__ = function () {
- var args = Array.prototype.slice.call(arguments)
- var str = args.shift()
- var cb = function () {} // start with noop.
-
- if (typeof args[args.length - 1] === 'function') cb = args.pop()
- cb = cb || function () {} // noop.
-
- if (!this.cache[this.locale]) this._readLocaleFile()
-
- // we've observed a new string, update the language file.
- if (!this.cache[this.locale][str] && this.updateFiles) {
- this.cache[this.locale][str] = str
-
- // include the current directory and locale,
- // since these values could change before the
- // write is performed.
- this._enqueueWrite([this.directory, this.locale, cb])
- } else {
- cb()
- }
-
- return util.format.apply(util, [this.cache[this.locale][str] || str].concat(args))
-}
-
-Y18N.prototype._enqueueWrite = function (work) {
- this.writeQueue.push(work)
- if (this.writeQueue.length === 1) this._processWriteQueue()
-}
-
-Y18N.prototype._processWriteQueue = function () {
- var _this = this
- var work = this.writeQueue[0]
-
- // destructure the enqueued work.
- var directory = work[0]
- var locale = work[1]
- var cb = work[2]
-
- var languageFile = this._resolveLocaleFile(directory, locale)
- var serializedLocale = JSON.stringify(this.cache[locale], null, 2)
-
- fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) {
- _this.writeQueue.shift()
- if (_this.writeQueue.length > 0) _this._processWriteQueue()
- cb(err)
- })
-}
-
-Y18N.prototype._readLocaleFile = function () {
- var localeLookup = {}
- var languageFile = this._resolveLocaleFile(this.directory, this.locale)
-
- try {
- localeLookup = JSON.parse(fs.readFileSync(languageFile, 'utf-8'))
- } catch (err) {
- if (err instanceof SyntaxError) {
- err.message = 'syntax error in ' + languageFile
- }
-
- if (err.code === 'ENOENT') localeLookup = {}
- else throw err
- }
-
- this.cache[this.locale] = localeLookup
-}
-
-Y18N.prototype._resolveLocaleFile = function (directory, locale) {
- var file = path.resolve(directory, './', locale + '.json')
- if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) {
- // attempt fallback to language only
- var languageFile = path.resolve(directory, './', locale.split('_')[0] + '.json')
- if (this._fileExistsSync(languageFile)) file = languageFile
- }
- return file
-}
-
-// this only exists because fs.existsSync() "will be deprecated"
-// see https://nodejs.org/api/fs.html#fs_fs_existssync_path
-Y18N.prototype._fileExistsSync = function (file) {
- try {
- return fs.statSync(file).isFile()
- } catch (err) {
- return false
- }
-}
-
-Y18N.prototype.__n = function () {
- var args = Array.prototype.slice.call(arguments)
- var singular = args.shift()
- var plural = args.shift()
- var quantity = args.shift()
-
- var cb = function () {} // start with noop.
- if (typeof args[args.length - 1] === 'function') cb = args.pop()
-
- if (!this.cache[this.locale]) this._readLocaleFile()
-
- var str = quantity === 1 ? singular : plural
- if (this.cache[this.locale][singular]) {
- str = this.cache[this.locale][singular][quantity === 1 ? 'one' : 'other']
- }
-
- // we've observed a new string, update the language file.
- if (!this.cache[this.locale][singular] && this.updateFiles) {
- this.cache[this.locale][singular] = {
- one: singular,
- other: plural
- }
-
- // include the current directory and locale,
- // since these values could change before the
- // write is performed.
- this._enqueueWrite([this.directory, this.locale, cb])
- } else {
- cb()
- }
-
- // if a %d placeholder is provided, add quantity
- // to the arguments expanded by util.format.
- var values = [str]
- if (~str.indexOf('%d')) values.push(quantity)
-
- return util.format.apply(util, values.concat(args))
-}
-
-Y18N.prototype.setLocale = function (locale) {
- this.locale = locale
-}
-
-Y18N.prototype.getLocale = function () {
- return this.locale
-}
-
-Y18N.prototype.updateLocale = function (obj) {
- if (!this.cache[this.locale]) this._readLocaleFile()
-
- for (var key in obj) {
- this.cache[this.locale][key] = obj[key]
- }
-}
-
-module.exports = function (opts) {
- var y18n = new Y18N(opts)
-
- // bind all functions to y18n, so that
- // they can be used in isolation.
- for (var key in y18n) {
- if (typeof y18n[key] === 'function') {
- y18n[key] = y18n[key].bind(y18n)
- }
- }
-
- return y18n
-}
diff --git a/node_modules/yargs/node_modules/y18n/package.json b/node_modules/yargs/node_modules/y18n/package.json
deleted file mode 100644
index 89e1b7c57fbab..0000000000000
--- a/node_modules/yargs/node_modules/y18n/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "_from": "y18n@^3.2.1",
- "_id": "y18n@3.2.1",
- "_inBundle": false,
- "_integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
- "_location": "/yargs/y18n",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "y18n@^3.2.1",
- "name": "y18n",
- "escapedName": "y18n",
- "rawSpec": "^3.2.1",
- "saveSpec": null,
- "fetchSpec": "^3.2.1"
- },
- "_requiredBy": [
- "/yargs"
- ],
- "_resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
- "_shasum": "6d15fba884c08679c0d77e88e7759e811e07fa41",
- "_spec": "y18n@^3.2.1",
- "_where": "/Users/rebecca/code/npm/node_modules/yargs",
- "author": {
- "name": "Ben Coe",
- "email": "ben@npmjs.com"
- },
- "bugs": {
- "url": "https://github.com/yargs/y18n/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "the bare-bones internationalization library used by yargs",
- "devDependencies": {
- "chai": "^3.4.1",
- "coveralls": "^2.11.6",
- "mocha": "^2.3.4",
- "nyc": "^6.1.1",
- "rimraf": "^2.5.0",
- "standard": "^5.4.1"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/yargs/y18n",
- "keywords": [
- "i18n",
- "internationalization",
- "yargs"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "y18n",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/yargs/y18n.git"
- },
- "scripts": {
- "coverage": "nyc report --reporter=text-lcov | coveralls",
- "pretest": "standard",
- "test": "nyc mocha"
- },
- "version": "3.2.1"
-}
diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json
index fd0a1265c23dd..3facc8afe3446 100644
--- a/node_modules/yargs/package.json
+++ b/node_modules/yargs/package.json
@@ -1,65 +1,73 @@
{
- "_from": "yargs@^11.0.0",
- "_id": "yargs@11.1.1",
+ "_from": "yargs@^14.2.3",
+ "_id": "yargs@14.2.3",
"_inBundle": false,
- "_integrity": "sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw==",
+ "_integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==",
"_location": "/yargs",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "emoji-regex": "7.0.3",
+ "path-exists": "3.0.0"
+ },
"_requested": {
"type": "range",
"registry": true,
- "raw": "yargs@^11.0.0",
+ "raw": "yargs@^14.2.3",
"name": "yargs",
"escapedName": "yargs",
- "rawSpec": "^11.0.0",
+ "rawSpec": "^14.2.3",
"saveSpec": null,
- "fetchSpec": "^11.0.0"
+ "fetchSpec": "^14.2.3"
},
"_requiredBy": [
"/libnpx"
],
- "_resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.1.tgz",
- "_shasum": "5052efe3446a4df5ed669c995886cc0f13702766",
- "_spec": "yargs@^11.0.0",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/libnpx",
+ "_resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz",
+ "_shasum": "1a1c3edced1afb2a2fea33604bc6d1d8d688a414",
+ "_spec": "yargs@^14.2.3",
+ "_where": "/Users/claudiahdz/npm/cli/node_modules/libnpx",
"bugs": {
"url": "https://github.com/yargs/yargs/issues"
},
"bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Yargs Contributors",
+ "url": "https://github.com/yargs/yargs/graphs/contributors"
+ }
+ ],
"dependencies": {
- "cliui": "^4.0.0",
- "decamelize": "^1.1.1",
- "find-up": "^2.1.0",
- "get-caller-file": "^1.0.1",
- "os-locale": "^3.1.0",
+ "cliui": "^5.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^3.0.0",
+ "get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
- "require-main-filename": "^1.0.1",
+ "require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
- "string-width": "^2.0.0",
+ "string-width": "^3.0.0",
"which-module": "^2.0.0",
- "y18n": "^3.2.1",
- "yargs-parser": "^9.0.2"
+ "y18n": "^4.0.0",
+ "yargs-parser": "^15.0.1"
},
"deprecated": false,
"description": "yargs the modern, pirate-themed, successor to optimist.",
"devDependencies": {
- "chai": "^4.1.2",
- "chalk": "^1.1.3",
- "coveralls": "^2.11.11",
- "cpr": "^2.0.0",
+ "chai": "^4.2.0",
+ "chalk": "^2.4.2",
+ "coveralls": "^3.0.3",
+ "cpr": "^3.0.1",
"cross-spawn": "^6.0.4",
- "es6-promise": "^4.0.2",
+ "es6-promise": "^4.2.5",
"hashish": "0.0.4",
- "mocha": "^3.0.1",
- "nyc": "^11.2.1",
- "rimraf": "^2.5.0",
- "standard": "^8.6.0",
- "standard-version": "^4.2.0",
- "which": "^1.2.9",
+ "mocha": "^5.2.0",
+ "nyc": "^14.1.0",
+ "rimraf": "^2.6.3",
+ "standard": "^12.0.1",
+ "standard-version": "^7.0.0",
+ "which": "^1.3.1",
"yargs-test-extends": "^1.0.1"
},
"engine": {
- "node": ">=4"
+ "node": ">=6"
},
"files": [
"index.js",
@@ -67,9 +75,10 @@
"lib",
"locales",
"completion.sh.hbs",
+ "completion.zsh.hbs",
"LICENSE"
],
- "homepage": "http://yargs.js.org/",
+ "homepage": "https://yargs.js.org/",
"keywords": [
"argument",
"args",
@@ -84,18 +93,18 @@
"name": "yargs",
"repository": {
"type": "git",
- "url": "git+ssh://git@github.com/yargs/yargs.git"
+ "url": "git+https://github.com/yargs/yargs.git"
},
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
- "posttest": "standard",
+ "pretest": "standard",
"release": "standard-version",
- "test": "nyc --cache mocha --require ./test/before.js --timeout=8000 --check-leaks"
+ "test": "nyc --cache mocha --require ./test/before.js --timeout=12000 --check-leaks"
},
"standard": {
"ignore": [
"**/example/**"
]
},
- "version": "11.1.1"
+ "version": "14.2.3"
}
diff --git a/node_modules/yargs/yargs.js b/node_modules/yargs/yargs.js
index 38f1b2ea6e67f..fdc8a095a97dc 100644
--- a/node_modules/yargs/yargs.js
+++ b/node_modules/yargs/yargs.js
@@ -11,6 +11,7 @@ const Y18n = require('y18n')
const objFilter = require('./lib/obj-filter')
const setBlocking = require('set-blocking')
const applyExtends = require('./lib/apply-extends')
+const { globalMiddlewareFactory } = require('./lib/middleware')
const YError = require('./lib/yerror')
exports = module.exports = Yargs
@@ -21,6 +22,7 @@ function Yargs (processArgs, cwd, parentRequire) {
let command = null
let completion = null
let groups = {}
+ let globalMiddleware = []
let output = ''
let preservedGroups = {}
let usage = null
@@ -31,14 +33,26 @@ function Yargs (processArgs, cwd, parentRequire) {
updateFiles: false
})
+ self.middleware = globalMiddlewareFactory(globalMiddleware, self)
+
if (!cwd) cwd = process.cwd()
- self.$0 = process.argv
- .slice(0, 2)
+ self.scriptName = function (scriptName) {
+ self.customScriptName = true
+ self.$0 = scriptName
+ return self
+ }
+
+ // ignore the node bin, specify this in your
+ // bin file with #!/usr/bin/env node
+ if (/\b(node|iojs|electron)(\.exe)?$/.test(process.argv[0])) {
+ self.$0 = process.argv.slice(1, 2)
+ } else {
+ self.$0 = process.argv.slice(0, 1)
+ }
+
+ self.$0 = self.$0
.map((x, i) => {
- // ignore the node bin, specify this in your
- // bin file with #!/usr/bin/env node
- if (i === 0 && /\b(node|iojs)(\.exe)?$/.test(x)) return
const b = rebase(cwd, x)
return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x
})
@@ -80,20 +94,24 @@ function Yargs (processArgs, cwd, parentRequire) {
})
})
- // preserve all groups not set to local.
- preservedGroups = Object.keys(groups).reduce((acc, groupName) => {
- const keys = groups[groupName].filter(key => !(key in localLookup))
- if (keys.length > 0) {
- acc[groupName] = keys
- }
- return acc
- }, {})
+ // add all groups not set to local to preserved groups
+ Object.assign(
+ preservedGroups,
+ Object.keys(groups).reduce((acc, groupName) => {
+ const keys = groups[groupName].filter(key => !(key in localLookup))
+ if (keys.length > 0) {
+ acc[groupName] = keys
+ }
+ return acc
+ }, {})
+ )
// groups can now be reset
groups = {}
const arrayOptions = [
'array', 'boolean', 'string', 'skipValidation',
- 'count', 'normalize', 'number'
+ 'count', 'normalize', 'number',
+ 'hiddenOptions'
]
const objectOptions = [
@@ -116,7 +134,7 @@ function Yargs (processArgs, cwd, parentRequire) {
// instances of all our helpers -- otherwise just reset.
usage = usage ? usage.reset(localLookup) : Usage(self, y18n)
validation = validation ? validation.reset(localLookup) : Validation(self, usage, y18n)
- command = command ? command.reset() : Command(self, usage, validation)
+ command = command ? command.reset() : Command(self, usage, validation, globalMiddleware)
if (!completion) completion = Completion(self, usage, command)
completionCommand = null
@@ -130,9 +148,10 @@ function Yargs (processArgs, cwd, parentRequire) {
self.resetOptions()
// temporary hack: allow "freezing" of reset-able state for parse(msg, cb)
- let frozen
+ let frozens = []
function freeze () {
- frozen = {}
+ let frozen = {}
+ frozens.push(frozen)
frozen.options = options
frozen.configObjects = options.configObjects.slice(0)
frozen.exitProcess = exitProcess
@@ -146,8 +165,11 @@ function Yargs (processArgs, cwd, parentRequire) {
frozen.exitError = exitError
frozen.hasOutput = hasOutput
frozen.parsed = self.parsed
+ frozen.parseFn = parseFn
+ frozen.parseContext = parseContext
}
function unfreeze () {
+ let frozen = frozens.pop()
options = frozen.options
options.configObjects = frozen.configObjects
exitProcess = frozen.exitProcess
@@ -161,9 +183,8 @@ function Yargs (processArgs, cwd, parentRequire) {
command.unfreeze()
strict = frozen.strict
completionCommand = frozen.completionCommand
- parseFn = null
- parseContext = null
- frozen = undefined
+ parseFn = frozen.parseFn
+ parseContext = frozen.parseContext
}
self.boolean = function (keys) {
@@ -217,6 +238,7 @@ function Yargs (processArgs, cwd, parentRequire) {
function populateParserHintArray (type, keys, value) {
keys = [].concat(keys)
keys.forEach((key) => {
+ key = sanitizeKey(key)
options[type].push(key)
})
}
@@ -272,8 +294,8 @@ function Yargs (processArgs, cwd, parentRequire) {
function populateParserHintObject (builder, isArray, type, key, value) {
if (Array.isArray(key)) {
+ const temp = Object.create(null)
// an array of keys with one value ['x', 'y', 'z'], function parse () {}
- const temp = {}
key.forEach((k) => {
temp[k] = value
})
@@ -284,6 +306,7 @@ function Yargs (processArgs, cwd, parentRequire) {
builder(k, key[k])
})
} else {
+ key = sanitizeKey(key)
// a single key value pair 'x', parse() {}
if (isArray) {
options[type][key] = (options[type][key] || []).concat(value)
@@ -293,6 +316,13 @@ function Yargs (processArgs, cwd, parentRequire) {
}
}
+ // TODO(bcoe): in future major versions move more objects towards
+ // Object.create(null):
+ function sanitizeKey (key) {
+ if (key === '__proto__') return '___proto___'
+ return key
+ }
+
function deleteFromParserHintObject (optionKey) {
// delete from all parsing hints:
// boolean, array, key, alias, etc.
@@ -312,7 +342,7 @@ function Yargs (processArgs, cwd, parentRequire) {
argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length)
// allow a config object to be provided directly.
if (typeof key === 'object') {
- key = applyExtends(key, cwd)
+ key = applyExtends(key, cwd, self.getParserConfiguration()['deep-merge-config'])
options.configObjects = (options.configObjects || []).concat(key)
return self
}
@@ -486,7 +516,7 @@ function Yargs (processArgs, cwd, parentRequire) {
// If an object exists in the key, add it to options.configObjects
if (obj[key] && typeof obj[key] === 'object') {
- conf = applyExtends(obj[key], rootPath || cwd)
+ conf = applyExtends(obj[key], rootPath || cwd, self.getParserConfiguration()['deep-merge-config'])
options.configObjects = (options.configObjects || []).concat(conf)
}
@@ -524,7 +554,15 @@ function Yargs (processArgs, cwd, parentRequire) {
let parseContext = null
self.parse = function parse (args, shortCircuit, _parseFn) {
argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length)
- if (typeof args === 'undefined') args = processArgs
+ freeze()
+ if (typeof args === 'undefined') {
+ const argv = self._parseArgs(processArgs)
+ const tmpParsed = self.parsed
+ unfreeze()
+ // TODO: remove this compatibility hack when we release yargs@15.x:
+ self.parsed = tmpParsed
+ return argv
+ }
// a context object can optionally be provided, this allows
// additional information to be passed to a command handler.
@@ -544,7 +582,6 @@ function Yargs (processArgs, cwd, parentRequire) {
// skipping validation, etc.
if (!shortCircuit) processArgs = args
- freeze()
if (parseFn) exitProcess = false
const parsed = self._parseArgs(args, shortCircuit)
@@ -657,8 +694,9 @@ function Yargs (processArgs, cwd, parentRequire) {
}
const desc = opt.describe || opt.description || opt.desc
- if (!opt.hidden) {
- self.describe(key, desc)
+ self.describe(key, desc)
+ if (opt.hidden) {
+ self.hide(key)
}
if (opt.requiresArg) {
@@ -677,8 +715,8 @@ function Yargs (processArgs, cwd, parentRequire) {
}
// .positional() only supports a subset of the configuration
- // options availble to .option().
- const supportedOpts = ['default', 'implies', 'normalize',
+ // options available to .option().
+ const supportedOpts = ['default', 'defaultDescription', 'implies', 'normalize',
'choices', 'conflicts', 'coerce', 'type', 'describe',
'desc', 'description', 'alias']
opts = objFilter(opts, (k, v) => {
@@ -748,6 +786,14 @@ function Yargs (processArgs, cwd, parentRequire) {
}
self.getStrict = () => strict
+ let parserConfig = {}
+ self.parserConfiguration = function parserConfiguration (config) {
+ argsert('