aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/libnpx/node_modules
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/libnpx/node_modules')
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/index.js44
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/errname.js4
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/stdio.js41
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/license20
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/CHANGELOG.md6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/README.md28
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/enoent.js2
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/hasBrokenSpawn.js11
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/parse.js169
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/escapeArgument.js30
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/escapeCommand.js12
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js18
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/readShebang.js37
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/resolveCommand.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/resolveCommand.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/index.js19
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/license)2
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/index.js2
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/package.json64
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/readme.md29
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/package.json71
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/readme.md39
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/package.json67
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/buffer-stream.js33
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/index.js50
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/index.js90
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/package.json45
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/readme.md61
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/index.js3
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/index.js292
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/license21
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/package.json47
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/readme.md83
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/package.json44
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/readme.md28
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/package.json78
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/readme.md8
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/package.json92
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/readme.md149
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/package.json55
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/readme.md2
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/index.js17
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/package.json63
43 files changed, 969 insertions, 1007 deletions
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/index.js
index 0219cfa73f..74ba8ee2de 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/index.js
@@ -9,12 +9,17 @@ const _getStream = require('get-stream');
const pFinally = require('p-finally');
const onExit = require('signal-exit');
const errname = require('./lib/errname');
+const stdio = require('./lib/stdio');
const TEN_MEGABYTES = 1000 * 1000 * 10;
function handleArgs(cmd, args, opts) {
let parsed;
+ if (opts && opts.env && opts.extendEnv !== false) {
+ opts.env = Object.assign({}, process.env, opts.env);
+ }
+
if (opts && opts.__winShell === true) {
delete opts.__winShell;
parsed = {
@@ -32,19 +37,23 @@ function handleArgs(cmd, args, opts) {
maxBuffer: TEN_MEGABYTES,
stripEof: true,
preferLocal: true,
+ localDir: parsed.options.cwd || process.cwd(),
encoding: 'utf8',
reject: true,
cleanup: true
}, parsed.options);
+ opts.stdio = stdio(opts);
+
if (opts.preferLocal) {
- opts.env = npmRunPath.env(opts);
+ opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir}));
}
return {
cmd: parsed.command,
args: parsed.args,
- opts
+ opts,
+ parsed
};
}
@@ -153,7 +162,7 @@ module.exports = (cmd, args, opts) => {
timeoutId = setTimeout(() => {
timeoutId = null;
timedOut = true;
- spawned.kill(parsed.killSignal);
+ spawned.kill(parsed.opts.killSignal);
}, parsed.opts.timeout);
}
@@ -167,6 +176,13 @@ module.exports = (cmd, args, opts) => {
cleanupTimeout();
resolve({err});
});
+
+ if (spawned.stdin) {
+ spawned.stdin.on('error', err => {
+ cleanupTimeout();
+ resolve({err});
+ });
+ }
});
function destroy() {
@@ -198,7 +214,21 @@ module.exports = (cmd, args, opts) => {
if (err || code !== 0 || signal !== null) {
if (!err) {
- err = new Error(`Command failed: ${joinedCmd}\n${stderr}${stdout}`);
+ let output = '';
+
+ if (Array.isArray(parsed.opts.stdio)) {
+ if (parsed.opts.stdio[2] !== 'inherit') {
+ output += output.length > 0 ? stderr : `\n${stderr}`;
+ }
+
+ if (parsed.opts.stdio[1] !== 'inherit') {
+ output += `\n${stdout}`;
+ }
+ } else if (parsed.opts.stdio !== 'inherit') {
+ output = `\n${stderr}${stdout}`;
+ }
+
+ err = new Error(`Command failed: ${joinedCmd}${output}`);
err.code = code < 0 ? errname(code) : code;
}
@@ -233,7 +263,7 @@ module.exports = (cmd, args, opts) => {
};
}), destroy);
- crossSpawn._enoent.hookChildProcess(spawned, parsed);
+ crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
handleInput(spawned, parsed.opts);
@@ -264,6 +294,10 @@ module.exports.sync = (cmd, args, opts) => {
const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts);
+ if (result.error || result.status !== 0) {
+ throw (result.error || new Error(result.stderr === '' ? result.stdout : result.stderr));
+ }
+
result.stdout = handleOutput(parsed.opts, result.stdout);
result.stderr = handleOutput(parsed.opts, result.stderr);
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/errname.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/errname.js
index a99d7500c2..328f3e35da 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/errname.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/errname.js
@@ -12,7 +12,7 @@ try {
uv = process.binding('uv');
if (typeof uv.errname !== 'function') {
- throw new Error('uv.errname is not a function');
+ throw new TypeError('uv.errname is not a function');
}
} catch (err) {
console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err);
@@ -33,5 +33,5 @@ function errname(uv, code) {
module.exports = code => errname(uv, code);
-// used for testing the fallback behavior
+// Used for testing the fallback behavior
module.exports.__test__ = errname;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/stdio.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/stdio.js
new file mode 100644
index 0000000000..a82d46838a
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/stdio.js
@@ -0,0 +1,41 @@
+'use strict';
+const alias = ['stdin', 'stdout', 'stderr'];
+
+const hasAlias = opts => alias.some(x => Boolean(opts[x]));
+
+module.exports = opts => {
+ if (!opts) {
+ return null;
+ }
+
+ if (opts.stdio && hasAlias(opts)) {
+ throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`);
+ }
+
+ if (typeof opts.stdio === 'string') {
+ return opts.stdio;
+ }
+
+ const stdio = opts.stdio || [];
+
+ if (!Array.isArray(stdio)) {
+ throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
+ }
+
+ const result = [];
+ const len = Math.max(stdio.length, alias.length);
+
+ for (let i = 0; i < len; i++) {
+ let value = null;
+
+ if (stdio[i] !== undefined) {
+ value = stdio[i];
+ } else if (opts[alias[i]] !== undefined) {
+ value = opts[alias[i]];
+ }
+
+ result[i] = value;
+ }
+
+ return result;
+};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/license
index 654d0bfe94..e7af2f7710 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/license
@@ -1,21 +1,9 @@
-The MIT License (MIT)
+MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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:
+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 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.
+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/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/CHANGELOG.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/CHANGELOG.md
new file mode 100644
index 0000000000..f1298a82f7
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/CHANGELOG.md
@@ -0,0 +1,6 @@
+## 5.0.0 - 2016-10-30
+
+- Add support for `options.shell`
+- Improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module
+- Refactor some code to make it more clear
+- Update README caveats
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/README.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/README.md
index 18cc2b8bc8..dde730df1b 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/README.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/README.md
@@ -32,8 +32,8 @@ Node has issues when using spawn on Windows:
- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang)
+- No `options.shell` support on node < v6
- It does not allow you to run `del` or `dir`
-- It does not properly escape arguments with spaces or special characters
All these issues are handled correctly by `cross-spawn`.
There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.
@@ -43,7 +43,8 @@ There are some known modules, such as [win-spawn](https://github.com/ForbesLinde
Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement.
-```javascript
+
+```js
var spawn = require('cross-spawn');
// Spawn NPM asynchronously
@@ -53,12 +54,25 @@ var child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
var results = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
```
-## Caveat
-On Windows, cross-spawn will only spawn `cmd.exe` if necessary. If the extension
-of the executable is `.exe` or `.com`, it will spawn it directly. If you wish
-to override this behavior and *always* spawn a shell, pass the `{shell: true}`
-option.
+## Caveats
+
+#### `options.shell` as an alternative to `cross-spawn`
+
+Starting from node v6, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves most of the problems that `cross-spawn` attempts to solve, but:
+
+- It's not supported in node < v6
+- It has no support for shebangs on Windows
+- You must manually escape the command and arguments which is very error prone, specially when passing user input
+
+If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned.
+
+
+#### Shebangs
+
+While `cross-spawn` handles shebangs on Windows, its support is limited: e.g.: it doesn't handle arguments after the path, e.g.: `#!/bin/bash -e`.
+
+Remember to always test your code on Windows!
## Tests
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/enoent.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/enoent.js
index 74ff06e495..d0a193aecd 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/enoent.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/enoent.js
@@ -1,7 +1,7 @@
'use strict';
var isWin = process.platform === 'win32';
-var resolveCommand = require('./resolveCommand');
+var resolveCommand = require('./util/resolveCommand');
var isNode10 = process.version.indexOf('v0.10.') === 0;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/hasBrokenSpawn.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/hasBrokenSpawn.js
deleted file mode 100644
index e73f906b61..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/hasBrokenSpawn.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = (function () {
- if (process.platform !== 'win32') {
- return false;
- }
- var nodeVer = process.version.substr(1).split('.').map(function (num) {
- return parseInt(num, 10);
- });
- return (nodeVer[0] === 0 && nodeVer[1] < 12);
-})();
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/parse.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/parse.js
index 77cbb83d2d..10a013625b 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/parse.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/parse.js
@@ -1,90 +1,92 @@
'use strict';
-var fs = require('fs');
-var LRU = require('lru-cache');
-var resolveCommand = require('./resolveCommand');
-var hasBrokenSpawn = require('./hasBrokenSpawn');
+var resolveCommand = require('./util/resolveCommand');
+var hasEmptyArgumentBug = require('./util/hasEmptyArgumentBug');
+var escapeArgument = require('./util/escapeArgument');
+var escapeCommand = require('./util/escapeCommand');
+var readShebang = require('./util/readShebang');
var isWin = process.platform === 'win32';
-var shebangCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec
+var skipShellRegExp = /\.(?:com|exe)$/i;
-function readShebang(command) {
- var buffer;
- var fd;
- var match;
+// Supported in Node >= 6 and >= 4.8
+var supportsShellOption = parseInt(process.version.substr(1).split('.')[0], 10) >= 6 ||
+ parseInt(process.version.substr(1).split('.')[0], 10) === 4 && parseInt(process.version.substr(1).split('.')[1], 10) >= 8;
+
+function parseNonShell(parsed) {
var shebang;
+ var needsShell;
+ var applyQuotes;
- // Check if it is in the cache first
- if (shebangCache.has(command)) {
- return shebangCache.get(command);
+ if (!isWin) {
+ return parsed;
}
- // Read the first 150 bytes from the file
- buffer = new Buffer(150);
-
- try {
- fd = fs.openSync(command, 'r');
- fs.readSync(fd, buffer, 0, 150, 0);
- fs.closeSync(fd);
- } catch (e) { /* empty */ }
-
- // Check if it is a shebang
- match = buffer.toString().trim().match(/#!(.+)/i);
+ // Detect & add support for shebangs
+ parsed.file = resolveCommand(parsed.command);
+ parsed.file = parsed.file || resolveCommand(parsed.command, true);
+ shebang = parsed.file && readShebang(parsed.file);
- if (match) {
- shebang = match[1].replace(/\/usr\/bin\/env\s+/i, ''); // Remove /usr/bin/env
+ if (shebang) {
+ parsed.args.unshift(parsed.file);
+ parsed.command = shebang;
+ needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(resolveCommand(shebang) || resolveCommand(shebang, true));
+ } else {
+ needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(parsed.file);
}
- // Store the shebang in the cache
- shebangCache.set(command, shebang);
+ // If a shell is required, use cmd.exe and take care of escaping everything correctly
+ if (needsShell) {
+ // Escape command & arguments
+ applyQuotes = (parsed.command !== 'echo'); // Do not quote arguments for the special "echo" command
+ parsed.command = escapeCommand(parsed.command);
+ parsed.args = parsed.args.map(function (arg) {
+ return escapeArgument(arg, applyQuotes);
+ });
+
+ // Make use of cmd.exe
+ parsed.args = ['/d', '/s', '/c', '"' + parsed.command + (parsed.args.length ? ' ' + parsed.args.join(' ') : '') + '"'];
+ parsed.command = process.env.comspec || 'cmd.exe';
+ parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
+ }
- return shebang;
+ return parsed;
}
-function escapeArg(arg, quote) {
- // Convert to string
- arg = '' + arg;
+function parseShell(parsed) {
+ var shellCommand;
- // If we are not going to quote the argument,
- // escape shell metacharacters, including double and single quotes:
- if (!quote) {
- arg = arg.replace(/([\(\)%!\^<>&|;,"'\s])/g, '^$1');
- } else {
- // Sequence of backslashes followed by a double quote:
- // double up all the backslashes and escape the double quote
- arg = arg.replace(/(\\*)"/g, '$1$1\\"');
+ // If node supports the shell option, there's no need to mimic its behavior
+ if (supportsShellOption) {
+ return parsed;
+ }
- // Sequence of backslashes followed by the end of the string
- // (which will become a double quote later):
- // double up all the backslashes
- arg = arg.replace(/(\\*)$/, '$1$1');
+ // Mimic node shell option, see: https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335
+ shellCommand = [parsed.command].concat(parsed.args).join(' ');
- // All other backslashes occur literally
+ if (isWin) {
+ parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe';
+ parsed.args = ['/d', '/s', '/c', '"' + shellCommand + '"'];
+ parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
+ } else {
+ if (typeof parsed.options.shell === 'string') {
+ parsed.command = parsed.options.shell;
+ } else if (process.platform === 'android') {
+ parsed.command = '/system/bin/sh';
+ } else {
+ parsed.command = '/bin/sh';
+ }
- // Quote the whole thing:
- arg = '"' + arg + '"';
+ parsed.args = ['-c', shellCommand];
}
- return arg;
+ return parsed;
}
-function escapeCommand(command) {
- // Do not escape if this command is not dangerous..
- // We do this so that commands like "echo" or "ifconfig" work
- // Quoting them, will make them unaccessible
- return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArg(command, true);
-}
-
-function requiresShell(command) {
- return !/\.(?:com|exe)$/i.test(command);
-}
+// ------------------------------------------------
function parse(command, args, options) {
- var shebang;
- var applyQuotes;
- var file;
- var original;
- var shell;
+ var parsed;
// Normalize arguments, similar to nodejs
if (args && !Array.isArray(args)) {
@@ -94,47 +96,18 @@ function parse(command, args, options) {
args = args ? args.slice(0) : []; // Clone array to avoid changing the original
options = options || {};
- original = command;
-
- if (isWin) {
- // Detect & add support for shebangs
- file = resolveCommand(command);
- file = file || resolveCommand(command, true);
- shebang = file && readShebang(file);
- shell = options.shell || hasBrokenSpawn;
-
- if (shebang) {
- args.unshift(file);
- command = shebang;
- shell = shell || requiresShell(resolveCommand(shebang) || resolveCommand(shebang, true));
- } else {
- shell = shell || requiresShell(file);
- }
- if (shell) {
- // Escape command & arguments
- applyQuotes = (command !== 'echo'); // Do not quote arguments for the special "echo" command
- command = escapeCommand(command);
- args = args.map(function (arg) {
- return escapeArg(arg, applyQuotes);
- });
-
- // Use cmd.exe
- args = ['/s', '/c', '"' + command + (args.length ? ' ' + args.join(' ') : '') + '"'];
- command = process.env.comspec || 'cmd.exe';
-
- // Tell node's spawn that the arguments are already escaped
- options.windowsVerbatimArguments = true;
- }
- }
-
- return {
+ // Build our parsed object
+ parsed = {
command: command,
args: args,
options: options,
- file: file,
- original: original,
+ file: undefined,
+ original: command,
};
+
+ // Delegate further parsing to shell or non-shell
+ return options.shell ? parseShell(parsed) : parseNonShell(parsed);
}
module.exports = parse;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/escapeArgument.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/escapeArgument.js
new file mode 100644
index 0000000000..367263f669
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/escapeArgument.js
@@ -0,0 +1,30 @@
+'use strict';
+
+function escapeArgument(arg, quote) {
+ // Convert to string
+ arg = '' + arg;
+
+ // If we are not going to quote the argument,
+ // escape shell metacharacters, including double and single quotes:
+ if (!quote) {
+ arg = arg.replace(/([()%!^<>&|;,"'\s])/g, '^$1');
+ } else {
+ // Sequence of backslashes followed by a double quote:
+ // double up all the backslashes and escape the double quote
+ arg = arg.replace(/(\\*)"/g, '$1$1\\"');
+
+ // Sequence of backslashes followed by the end of the string
+ // (which will become a double quote later):
+ // double up all the backslashes
+ arg = arg.replace(/(\\*)$/, '$1$1');
+
+ // All other backslashes occur literally
+
+ // Quote the whole thing:
+ arg = '"' + arg + '"';
+ }
+
+ return arg;
+}
+
+module.exports = escapeArgument;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/escapeCommand.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/escapeCommand.js
new file mode 100644
index 0000000000..d9c25b2656
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/escapeCommand.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var escapeArgument = require('./escapeArgument');
+
+function escapeCommand(command) {
+ // Do not escape if this command is not dangerous..
+ // We do this so that commands like "echo" or "ifconfig" work
+ // Quoting them, will make them unaccessible
+ return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArgument(command, true);
+}
+
+module.exports = escapeCommand;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js
new file mode 100644
index 0000000000..9f2eba6355
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js
@@ -0,0 +1,18 @@
+'use strict';
+
+// See: https://github.com/IndigoUnited/node-cross-spawn/pull/34#issuecomment-221623455
+function hasEmptyArgumentBug() {
+ var nodeVer;
+
+ if (process.platform !== 'win32') {
+ return false;
+ }
+
+ nodeVer = process.version.substr(1).split('.').map(function (num) {
+ return parseInt(num, 10);
+ });
+
+ return (nodeVer[0] === 0 && nodeVer[1] < 12);
+}
+
+module.exports = hasEmptyArgumentBug();
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/readShebang.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/readShebang.js
new file mode 100644
index 0000000000..2cf3541c99
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/readShebang.js
@@ -0,0 +1,37 @@
+'use strict';
+
+var fs = require('fs');
+var LRU = require('lru-cache');
+var shebangCommand = require('shebang-command');
+
+var shebangCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec
+
+function readShebang(command) {
+ var buffer;
+ var fd;
+ var shebang;
+
+ // Check if it is in the cache first
+ if (shebangCache.has(command)) {
+ return shebangCache.get(command);
+ }
+
+ // Read the first 150 bytes from the file
+ buffer = new Buffer(150);
+
+ try {
+ fd = fs.openSync(command, 'r');
+ fs.readSync(fd, buffer, 0, 150, 0);
+ fs.closeSync(fd);
+ } catch (e) { /* empty */ }
+
+ // Attempt to extract shebang (null is returned if not a shebang)
+ shebang = shebangCommand(buffer.toString());
+
+ // Store the shebang in the cache
+ shebangCache.set(command, shebang);
+
+ return shebang;
+}
+
+module.exports = readShebang;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/resolveCommand.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/resolveCommand.js
index b7a9490974..b7a9490974 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/resolveCommand.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/resolveCommand.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/index.js
new file mode 100644
index 0000000000..2de70b0742
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/index.js
@@ -0,0 +1,19 @@
+'use strict';
+var shebangRegex = require('shebang-regex');
+
+module.exports = function (str) {
+ var match = str.match(shebangRegex);
+
+ if (!match) {
+ return null;
+ }
+
+ var arr = match[0].replace(/#! ?/, '').split(' ');
+ var bin = arr[0].split('/').pop();
+ var arg = arr[1];
+
+ return (bin === 'env' ?
+ arg :
+ bin + (arg ? ' ' + arg : '')
+ );
+};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/license
index 1aeb74fd25..0f8cf79c3c 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/license
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
+Copyright (c) Kevin Martensson <kevinmartensson@gmail.com> (github.com/kevva)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/index.js
new file mode 100644
index 0000000000..d052d2e05e
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/index.js
@@ -0,0 +1,2 @@
+'use strict';
+module.exports = /^#!.*/;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/package.json
new file mode 100644
index 0000000000..f462aa5893
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/package.json
@@ -0,0 +1,64 @@
+{
+ "_from": "shebang-regex@^1.0.0",
+ "_id": "shebang-regex@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "_location": "/libnpx/yargs/os-locale/execa/cross-spawn/shebang-command/shebang-regex",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "shebang-regex@^1.0.0",
+ "name": "shebang-regex",
+ "escapedName": "shebang-regex",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/libnpx/yargs/os-locale/execa/cross-spawn/shebang-command"
+ ],
+ "_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+ "_shasum": "da42f49740c0b42db2ca9728571cb190c98efea3",
+ "_spec": "shebang-regex@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/shebang-regex/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Regular expression for matching a shebang",
+ "devDependencies": {
+ "ava": "0.0.4"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/shebang-regex#readme",
+ "keywords": [
+ "re",
+ "regex",
+ "regexp",
+ "shebang",
+ "match",
+ "test"
+ ],
+ "license": "MIT",
+ "name": "shebang-regex",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/shebang-regex.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/readme.md
new file mode 100644
index 0000000000..ef75e51b5b
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/readme.md
@@ -0,0 +1,29 @@
+# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex)
+
+> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix))
+
+
+## Install
+
+```
+$ npm install --save shebang-regex
+```
+
+
+## Usage
+
+```js
+var shebangRegex = require('shebang-regex');
+var str = '#!/usr/bin/env node\nconsole.log("unicorns");';
+
+shebangRegex.test(str);
+//=> true
+
+shebangRegex.exec(str)[0];
+//=> '#!/usr/bin/env node'
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/package.json
new file mode 100644
index 0000000000..ab0bf5ea1c
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/package.json
@@ -0,0 +1,71 @@
+{
+ "_from": "shebang-command@^1.2.0",
+ "_id": "shebang-command@1.2.0",
+ "_inBundle": false,
+ "_integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "_location": "/libnpx/yargs/os-locale/execa/cross-spawn/shebang-command",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "shebang-command@^1.2.0",
+ "name": "shebang-command",
+ "escapedName": "shebang-command",
+ "rawSpec": "^1.2.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.2.0"
+ },
+ "_requiredBy": [
+ "/libnpx/yargs/os-locale/execa/cross-spawn"
+ ],
+ "_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+ "_shasum": "44aac65b695b03398968c39f363fee5deafdf1ea",
+ "_spec": "shebang-command@^1.2.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn",
+ "author": {
+ "name": "Kevin Martensson",
+ "email": "kevinmartensson@gmail.com",
+ "url": "github.com/kevva"
+ },
+ "bugs": {
+ "url": "https://github.com/kevva/shebang-command/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "shebang-regex": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Get the command from a shebang",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/kevva/shebang-command#readme",
+ "keywords": [
+ "cmd",
+ "command",
+ "parse",
+ "shebang"
+ ],
+ "license": "MIT",
+ "name": "shebang-command",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/kevva/shebang-command.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.2.0",
+ "xo": {
+ "ignores": [
+ "test.js"
+ ]
+ }
+}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/readme.md
new file mode 100644
index 0000000000..16b0be4d7d
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/readme.md
@@ -0,0 +1,39 @@
+# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command)
+
+> Get the command from a shebang
+
+
+## Install
+
+```
+$ npm install --save shebang-command
+```
+
+
+## Usage
+
+```js
+const shebangCommand = require('shebang-command');
+
+shebangCommand('#!/usr/bin/env node');
+//=> 'node'
+
+shebangCommand('#!/bin/bash');
+//=> 'bash'
+```
+
+
+## API
+
+### shebangCommand(string)
+
+#### string
+
+Type: `string`
+
+String containing a shebang.
+
+
+## License
+
+MIT © [Kevin Martensson](http://github.com/kevva)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/package.json
index c269a6260b..77b39f96c2 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/package.json
@@ -1,36 +1,43 @@
{
- "_from": "cross-spawn@^4.0.0",
- "_id": "cross-spawn@4.0.2",
+ "_from": "cross-spawn@^5.0.1",
+ "_id": "cross-spawn@5.1.0",
"_inBundle": false,
- "_integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=",
+ "_integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"_location": "/libnpx/yargs/os-locale/execa/cross-spawn",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "cross-spawn@^4.0.0",
+ "raw": "cross-spawn@^5.0.1",
"name": "cross-spawn",
"escapedName": "cross-spawn",
- "rawSpec": "^4.0.0",
+ "rawSpec": "^5.0.1",
"saveSpec": null,
- "fetchSpec": "^4.0.0"
+ "fetchSpec": "^5.0.1"
},
"_requiredBy": [
"/libnpx/yargs/os-locale/execa"
],
- "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz",
- "_shasum": "7b9247621c23adfdd3856004a823cbe397424d41",
- "_shrinkwrap": null,
- "_spec": "cross-spawn@^4.0.0",
+ "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
+ "_shasum": "e8bd0efee58fcff6f8f94510a0a554bbfa235449",
+ "_spec": "cross-spawn@^5.0.1",
"_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa",
- "bin": null,
+ "author": {
+ "name": "IndigoUnited",
+ "email": "hello@indigounited.com",
+ "url": "http://indigounited.com"
+ },
+ "bugs": {
+ "url": "https://github.com/IndigoUnited/node-cross-spawn/issues/"
+ },
"bundleDependencies": false,
"dependencies": {
"lru-cache": "^4.0.1",
+ "shebang-command": "^1.2.0",
"which": "^1.2.9"
},
"deprecated": false,
- "description": "[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]",
+ "description": "Cross platform child_process#spawn and child_process#spawnSync",
"devDependencies": {
"@satazor/eslint-config": "^3.0.0",
"eslint": "^3.0.0",
@@ -38,11 +45,39 @@
"glob": "^7.0.0",
"mkdirp": "^0.5.1",
"mocha": "^3.0.2",
+ "once": "^1.4.0",
"rimraf": "^2.5.0"
},
+ "files": [
+ "index.js",
+ "lib"
+ ],
+ "homepage": "https://github.com/IndigoUnited/node-cross-spawn#readme",
+ "keywords": [
+ "spawn",
+ "spawnSync",
+ "windows",
+ "cross",
+ "platform",
+ "path",
+ "ext",
+ "path-ext",
+ "path_ext",
+ "shebang",
+ "hashbang",
+ "cmd",
+ "execute"
+ ],
+ "license": "MIT",
+ "main": "index.js",
"name": "cross-spawn",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "4.0.2"
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/IndigoUnited/node-cross-spawn.git"
+ },
+ "scripts": {
+ "lint": "eslint '{*.js,lib/**/*.js,test/**/*.js}'",
+ "test": "node test/prepare && mocha --bail test/test"
+ },
+ "version": "5.1.0"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/buffer-stream.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/buffer-stream.js
index cc834c4dc8..ae45d3d9e7 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/buffer-stream.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/buffer-stream.js
@@ -1,14 +1,13 @@
-var PassThrough = require('stream').PassThrough;
-var objectAssign = require('object-assign');
+'use strict';
+const PassThrough = require('stream').PassThrough;
-module.exports = function (opts) {
- opts = objectAssign({}, opts);
+module.exports = opts => {
+ opts = Object.assign({}, opts);
- var array = opts.array;
- var encoding = opts.encoding;
-
- var buffer = encoding === 'buffer';
- var objectMode = false;
+ const array = opts.array;
+ let encoding = opts.encoding;
+ const buffer = encoding === 'buffer';
+ let objectMode = false;
if (array) {
objectMode = !(encoding || buffer);
@@ -20,16 +19,15 @@ module.exports = function (opts) {
encoding = null;
}
- var len = 0;
- var ret = [];
-
- var stream = new PassThrough({objectMode: objectMode});
+ let len = 0;
+ const ret = [];
+ const stream = new PassThrough({objectMode});
if (encoding) {
stream.setEncoding(encoding);
}
- stream.on('data', function (chunk) {
+ stream.on('data', chunk => {
ret.push(chunk);
if (objectMode) {
@@ -39,16 +37,15 @@ module.exports = function (opts) {
}
});
- stream.getBufferedValue = function () {
+ stream.getBufferedValue = () => {
if (array) {
return ret;
}
+
return buffer ? Buffer.concat(ret, len) : ret.join('');
};
- stream.getBufferedLength = function () {
- return len;
- };
+ stream.getBufferedLength = () => len;
return stream;
};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/index.js
index aa60cf038f..2dc5ee96af 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/index.js
@@ -1,24 +1,31 @@
'use strict';
-var Promise = require('pinkie-promise');
-var objectAssign = require('object-assign');
-var bufferStream = require('./buffer-stream');
+const bufferStream = require('./buffer-stream');
function getStream(inputStream, opts) {
if (!inputStream) {
return Promise.reject(new Error('Expected a stream'));
}
- opts = objectAssign({maxBuffer: Infinity}, opts);
- var maxBuffer = opts.maxBuffer;
- var stream;
- var clean;
+ opts = Object.assign({maxBuffer: Infinity}, opts);
+
+ const maxBuffer = opts.maxBuffer;
+ let stream;
+ let clean;
+
+ const p = new Promise((resolve, reject) => {
+ const error = err => {
+ if (err) { // null check
+ err.bufferedData = stream.getBufferedValue();
+ }
+
+ reject(err);
+ };
- var p = new Promise(function (resolve, reject) {
stream = bufferStream(opts);
inputStream.once('error', error);
inputStream.pipe(stream);
- stream.on('data', function () {
+ stream.on('data', () => {
if (stream.getBufferedLength() > maxBuffer) {
reject(new Error('maxBuffer exceeded'));
}
@@ -26,34 +33,19 @@ function getStream(inputStream, opts) {
stream.once('error', error);
stream.on('end', resolve);
- clean = function () {
- // some streams doesn't implement the stream.Readable interface correctly
+ clean = () => {
+ // some streams doesn't implement the `stream.Readable` interface correctly
if (inputStream.unpipe) {
inputStream.unpipe(stream);
}
};
-
- function error(err) {
- if (err) { // null check
- err.bufferedData = stream.getBufferedValue();
- }
- reject(err);
- }
});
p.then(clean, clean);
- return p.then(function () {
- return stream.getBufferedValue();
- });
+ return p.then(() => stream.getBufferedValue());
}
module.exports = getStream;
-
-module.exports.buffer = function (stream, opts) {
- return getStream(stream, objectAssign({}, opts, {encoding: 'buffer'}));
-};
-
-module.exports.array = function (stream, opts) {
- return getStream(stream, objectAssign({}, opts, {array: true}));
-};
+module.exports.buffer = (stream, opts) => getStream(stream, Object.assign({}, opts, {encoding: 'buffer'}));
+module.exports.array = (stream, opts) => getStream(stream, Object.assign({}, opts, {array: true}));
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/index.js
deleted file mode 100644
index 0930cf8890..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/index.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-object-assign
-(c) Sindre Sorhus
-@license MIT
-*/
-
-'use strict';
-/* eslint-disable no-unused-vars */
-var getOwnPropertySymbols = Object.getOwnPropertySymbols;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
-
- // Detect buggy property enumeration order in older V8 versions.
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
-
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
-}
-
-module.exports = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
-
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
-
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
-
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
-
- return to;
-};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/package.json
deleted file mode 100644
index cb1283bace..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/package.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "_from": "object-assign@^4.0.1",
- "_id": "object-assign@4.1.1",
- "_inBundle": false,
- "_integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
- "_location": "/libnpx/yargs/os-locale/execa/get-stream/object-assign",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "object-assign@^4.0.1",
- "name": "object-assign",
- "escapedName": "object-assign",
- "rawSpec": "^4.0.1",
- "saveSpec": null,
- "fetchSpec": "^4.0.1"
- },
- "_requiredBy": [
- "/libnpx/yargs/os-locale/execa/get-stream"
- ],
- "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "_shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863",
- "_shrinkwrap": null,
- "_spec": "object-assign@^4.0.1",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)",
- "devDependencies": {
- "ava": "^0.16.0",
- "lodash": "^4.16.4",
- "matcha": "^0.7.0",
- "xo": "^0.16.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "name": "object-assign",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "4.1.1"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/readme.md
deleted file mode 100644
index 1be09d35c7..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/readme.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-
-> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
-
-
-## Use the built-in
-
-Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
-support `Object.assign()` :tada:. If you target only those environments, then by all
-means, use `Object.assign()` instead of this package.
-
-
-## Install
-
-```
-$ npm install --save object-assign
-```
-
-
-## Usage
-
-```js
-const objectAssign = require('object-assign');
-
-objectAssign({foo: 0}, {bar: 1});
-//=> {foo: 0, bar: 1}
-
-// multiple sources
-objectAssign({foo: 0}, {bar: 1}, {baz: 2});
-//=> {foo: 0, bar: 1, baz: 2}
-
-// overwrites equal keys
-objectAssign({foo: 0}, {foo: 1}, {foo: 2});
-//=> {foo: 2}
-
-// ignores null and undefined sources
-objectAssign({foo: 0}, null, {bar: 1}, undefined);
-//=> {foo: 0, bar: 1}
-```
-
-
-## API
-
-### objectAssign(target, [source, ...])
-
-Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
-
-
-## Resources
-
-- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
-
-
-## Related
-
-- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/index.js
deleted file mode 100644
index 777377a1f7..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = typeof Promise === 'function' ? Promise : require('pinkie');
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/index.js
deleted file mode 100644
index 14ce1bfe3d..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/index.js
+++ /dev/null
@@ -1,292 +0,0 @@
-'use strict';
-
-var PENDING = 'pending';
-var SETTLED = 'settled';
-var FULFILLED = 'fulfilled';
-var REJECTED = 'rejected';
-var NOOP = function () {};
-var isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function';
-
-var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate;
-var asyncQueue = [];
-var asyncTimer;
-
-function asyncFlush() {
- // run promise callbacks
- for (var i = 0; i < asyncQueue.length; i++) {
- asyncQueue[i][0](asyncQueue[i][1]);
- }
-
- // reset async asyncQueue
- asyncQueue = [];
- asyncTimer = false;
-}
-
-function asyncCall(callback, arg) {
- asyncQueue.push([callback, arg]);
-
- if (!asyncTimer) {
- asyncTimer = true;
- asyncSetTimer(asyncFlush, 0);
- }
-}
-
-function invokeResolver(resolver, promise) {
- function resolvePromise(value) {
- resolve(promise, value);
- }
-
- function rejectPromise(reason) {
- reject(promise, reason);
- }
-
- try {
- resolver(resolvePromise, rejectPromise);
- } catch (e) {
- rejectPromise(e);
- }
-}
-
-function invokeCallback(subscriber) {
- var owner = subscriber.owner;
- var settled = owner._state;
- var value = owner._data;
- var callback = subscriber[settled];
- var promise = subscriber.then;
-
- if (typeof callback === 'function') {
- settled = FULFILLED;
- try {
- value = callback(value);
- } catch (e) {
- reject(promise, e);
- }
- }
-
- if (!handleThenable(promise, value)) {
- if (settled === FULFILLED) {
- resolve(promise, value);
- }
-
- if (settled === REJECTED) {
- reject(promise, value);
- }
- }
-}
-
-function handleThenable(promise, value) {
- var resolved;
-
- try {
- if (promise === value) {
- throw new TypeError('A promises callback cannot return that same promise.');
- }
-
- if (value && (typeof value === 'function' || typeof value === 'object')) {
- // then should be retrieved only once
- var then = value.then;
-
- if (typeof then === 'function') {
- then.call(value, function (val) {
- if (!resolved) {
- resolved = true;
-
- if (value === val) {
- fulfill(promise, val);
- } else {
- resolve(promise, val);
- }
- }
- }, function (reason) {
- if (!resolved) {
- resolved = true;
-
- reject(promise, reason);
- }
- });
-
- return true;
- }
- }
- } catch (e) {
- if (!resolved) {
- reject(promise, e);
- }
-
- return true;
- }
-
- return false;
-}
-
-function resolve(promise, value) {
- if (promise === value || !handleThenable(promise, value)) {
- fulfill(promise, value);
- }
-}
-
-function fulfill(promise, value) {
- if (promise._state === PENDING) {
- promise._state = SETTLED;
- promise._data = value;
-
- asyncCall(publishFulfillment, promise);
- }
-}
-
-function reject(promise, reason) {
- if (promise._state === PENDING) {
- promise._state = SETTLED;
- promise._data = reason;
-
- asyncCall(publishRejection, promise);
- }
-}
-
-function publish(promise) {
- promise._then = promise._then.forEach(invokeCallback);
-}
-
-function publishFulfillment(promise) {
- promise._state = FULFILLED;
- publish(promise);
-}
-
-function publishRejection(promise) {
- promise._state = REJECTED;
- publish(promise);
- if (!promise._handled && isNode) {
- global.process.emit('unhandledRejection', promise._data, promise);
- }
-}
-
-function notifyRejectionHandled(promise) {
- global.process.emit('rejectionHandled', promise);
-}
-
-/**
- * @class
- */
-function Promise(resolver) {
- if (typeof resolver !== 'function') {
- throw new TypeError('Promise resolver ' + resolver + ' is not a function');
- }
-
- if (this instanceof Promise === false) {
- throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.');
- }
-
- this._then = [];
-
- invokeResolver(resolver, this);
-}
-
-Promise.prototype = {
- constructor: Promise,
-
- _state: PENDING,
- _then: null,
- _data: undefined,
- _handled: false,
-
- then: function (onFulfillment, onRejection) {
- var subscriber = {
- owner: this,
- then: new this.constructor(NOOP),
- fulfilled: onFulfillment,
- rejected: onRejection
- };
-
- if ((onRejection || onFulfillment) && !this._handled) {
- this._handled = true;
- if (this._state === REJECTED && isNode) {
- asyncCall(notifyRejectionHandled, this);
- }
- }
-
- if (this._state === FULFILLED || this._state === REJECTED) {
- // already resolved, call callback async
- asyncCall(invokeCallback, subscriber);
- } else {
- // subscribe
- this._then.push(subscriber);
- }
-
- return subscriber.then;
- },
-
- catch: function (onRejection) {
- return this.then(null, onRejection);
- }
-};
-
-Promise.all = function (promises) {
- if (!Array.isArray(promises)) {
- throw new TypeError('You must pass an array to Promise.all().');
- }
-
- return new Promise(function (resolve, reject) {
- var results = [];
- var remaining = 0;
-
- function resolver(index) {
- remaining++;
- return function (value) {
- results[index] = value;
- if (!--remaining) {
- resolve(results);
- }
- };
- }
-
- for (var i = 0, promise; i < promises.length; i++) {
- promise = promises[i];
-
- if (promise && typeof promise.then === 'function') {
- promise.then(resolver(i), reject);
- } else {
- results[i] = promise;
- }
- }
-
- if (!remaining) {
- resolve(results);
- }
- });
-};
-
-Promise.race = function (promises) {
- if (!Array.isArray(promises)) {
- throw new TypeError('You must pass an array to Promise.race().');
- }
-
- return new Promise(function (resolve, reject) {
- for (var i = 0, promise; i < promises.length; i++) {
- promise = promises[i];
-
- if (promise && typeof promise.then === 'function') {
- promise.then(resolve, reject);
- } else {
- resolve(promise);
- }
- }
- });
-};
-
-Promise.resolve = function (value) {
- if (value && typeof value === 'object' && value.constructor === Promise) {
- return value;
- }
-
- return new Promise(function (resolve) {
- resolve(value);
- });
-};
-
-Promise.reject = function (reason) {
- return new Promise(function (resolve, reject) {
- reject(reason);
- });
-};
-
-module.exports = Promise;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/license
deleted file mode 100644
index 1aeb74fd25..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
-
-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/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/package.json
deleted file mode 100644
index d94124cdf5..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/package.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "_from": "pinkie@^2.0.0",
- "_id": "pinkie@2.0.4",
- "_inBundle": false,
- "_integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
- "_location": "/libnpx/yargs/os-locale/execa/get-stream/pinkie-promise/pinkie",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "pinkie@^2.0.0",
- "name": "pinkie",
- "escapedName": "pinkie",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/libnpx/yargs/os-locale/execa/get-stream/pinkie-promise"
- ],
- "_resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
- "_shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870",
- "_shrinkwrap": null,
- "_spec": "pinkie@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "<h1 align=\"center\"> \t<br> \t<img width=\"256\" src=\"media/logo.png\" alt=\"pinkie\"> \t<br> \t<br> </h1>",
- "devDependencies": {
- "core-assert": "^0.1.1",
- "coveralls": "^2.11.4",
- "mocha": "*",
- "nyc": "^3.2.2",
- "promises-aplus-tests": "*",
- "xo": "^0.10.1"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "name": "pinkie",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "2.0.4"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/readme.md
deleted file mode 100644
index 54747f60cc..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/readme.md
+++ /dev/null
@@ -1,83 +0,0 @@
-<h1 align="center">
- <br>
- <img width="256" src="media/logo.png" alt="pinkie">
- <br>
- <br>
-</h1>
-
-> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation
-
-[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master)
-
-There are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality.
-
-This module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though).
-
-
-## Install
-
-```
-$ npm install --save pinkie
-```
-
-
-## Usage
-
-```js
-var fs = require('fs');
-var Promise = require('pinkie');
-
-new Promise(function (resolve, reject) {
- fs.readFile('foo.json', 'utf8', function (err, data) {
- if (err) {
- reject(err);
- return;
- }
-
- resolve(data);
- });
-});
-//=> Promise
-```
-
-
-### API
-
-`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot:
-
-#### new Promise(executor)
-
-Returns new instance of `Promise`.
-
-##### executor
-
-*Required*
-Type: `function`
-
-Function with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it.
-
-#### pinkie.all(promises)
-
-Returns a promise that resolves when all of the promises in the `promises` Array argument have resolved.
-
-#### pinkie.race(promises)
-
-Returns a promise that resolves or rejects as soon as one of the promises in the `promises` Array resolves or rejects, with the value or reason from that promise.
-
-#### pinkie.reject(reason)
-
-Returns a Promise object that is rejected with the given `reason`.
-
-#### pinkie.resolve(value)
-
-Returns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`.
-
-
-## Related
-
-- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module
-
-
-## License
-
-MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/package.json
deleted file mode 100644
index 96227946d8..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "_from": "pinkie-promise@^2.0.0",
- "_id": "pinkie-promise@2.0.1",
- "_inBundle": false,
- "_integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
- "_location": "/libnpx/yargs/os-locale/execa/get-stream/pinkie-promise",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "pinkie-promise@^2.0.0",
- "name": "pinkie-promise",
- "escapedName": "pinkie-promise",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/libnpx/yargs/os-locale/execa/get-stream"
- ],
- "_resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
- "_shasum": "2135d6dfa7a358c069ac9b178776288228450ffa",
- "_shrinkwrap": null,
- "_spec": "pinkie-promise@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {
- "pinkie": "^2.0.0"
- },
- "deprecated": false,
- "description": "> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill",
- "devDependencies": {
- "mocha": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "name": "pinkie-promise",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "2.0.1"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/readme.md
deleted file mode 100644
index 78477f4297..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/readme.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise)
-
-> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill
-
-Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill.
-
-## Install
-
-```
-$ npm install --save pinkie-promise
-```
-
-## Usage
-
-```js
-var Promise = require('pinkie-promise');
-
-new Promise(function (resolve) { resolve('unicorns'); });
-//=> Promise { 'unicorns' }
-```
-
-## Related
-
-- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function
-
-## License
-
-MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/package.json
index 90ff4f2098..1b817c9ee6 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/package.json
@@ -1,48 +1,80 @@
{
- "_from": "get-stream@^2.2.0",
- "_id": "get-stream@2.3.1",
+ "_from": "get-stream@^3.0.0",
+ "_id": "get-stream@3.0.0",
"_inBundle": false,
- "_integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=",
+ "_integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
"_location": "/libnpx/yargs/os-locale/execa/get-stream",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "get-stream@^2.2.0",
+ "raw": "get-stream@^3.0.0",
"name": "get-stream",
"escapedName": "get-stream",
- "rawSpec": "^2.2.0",
+ "rawSpec": "^3.0.0",
"saveSpec": null,
- "fetchSpec": "^2.2.0"
+ "fetchSpec": "^3.0.0"
},
"_requiredBy": [
"/libnpx/yargs/os-locale/execa"
],
- "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz",
- "_shasum": "5f38f93f346009666ee0150a054167f91bdd95de",
- "_shrinkwrap": null,
- "_spec": "get-stream@^2.2.0",
+ "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
+ "_shasum": "8e943d1358dc37555054ecbe2edb05aa174ede14",
+ "_spec": "get-stream@^3.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {
- "object-assign": "^4.0.1",
- "pinkie-promise": "^2.0.0"
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/get-stream/issues"
},
+ "bundleDependencies": false,
"deprecated": false,
- "description": "> Get a stream as a string, buffer, or array",
+ "description": "Get a stream as a string, buffer, or array",
"devDependencies": {
"ava": "*",
- "buffer-equals": "^1.0.3",
- "into-stream": "^2.0.1",
+ "into-stream": "^3.0.0",
"xo": "*"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4"
},
+ "files": [
+ "index.js",
+ "buffer-stream.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/get-stream#readme",
+ "keywords": [
+ "get",
+ "stream",
+ "promise",
+ "concat",
+ "string",
+ "str",
+ "text",
+ "buffer",
+ "read",
+ "data",
+ "consume",
+ "readable",
+ "readablestream",
+ "array",
+ "object",
+ "obj"
+ ],
+ "license": "MIT",
"name": "get-stream",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "2.3.1"
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/get-stream.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0",
+ "xo": {
+ "esnext": true
+ }
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/readme.md
index a74866bb29..73b188fb42 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/readme.md
@@ -46,7 +46,7 @@ getStream(stream).then(str => {
## API
-The methods returns a promise that is resolved when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode.
+The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode.
### getStream(stream, [options])
@@ -93,8 +93,10 @@ If the input stream emits an `error` event, the promise will be rejected with th
```js
getStream(streamThatErrorsAtTheEnd('unicorn'))
- .catch(err => console.log(err.bufferedData));
-// unicorn
+ .catch(err => {
+ console.log(err.bufferedData);
+ //=> 'unicorn'
+ });
```
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/package.json
index 1bceaf633b..e448f7b6ac 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/package.json
@@ -1,8 +1,8 @@
{
- "_from": "execa@^0.5.0",
- "_id": "execa@0.5.1",
+ "_from": "execa@^0.7.0",
+ "_id": "execa@0.7.0",
"_inBundle": false,
- "_integrity": "sha1-3j+4XLjW6RyFvLzrFkWBeFy1ezY=",
+ "_integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
"_location": "/libnpx/yargs/os-locale/execa",
"_phantomChildren": {
"lru-cache": "4.1.1",
@@ -11,26 +11,32 @@
"_requested": {
"type": "range",
"registry": true,
- "raw": "execa@^0.5.0",
+ "raw": "execa@^0.7.0",
"name": "execa",
"escapedName": "execa",
- "rawSpec": "^0.5.0",
+ "rawSpec": "^0.7.0",
"saveSpec": null,
- "fetchSpec": "^0.5.0"
+ "fetchSpec": "^0.7.0"
},
"_requiredBy": [
"/libnpx/yargs/os-locale"
],
- "_resolved": "https://registry.npmjs.org/execa/-/execa-0.5.1.tgz",
- "_shasum": "de3fb85cb8d6e91c85bcbceb164581785cb57b36",
- "_shrinkwrap": null,
- "_spec": "execa@^0.5.0",
+ "_resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
+ "_shasum": "944becd34cc41ee32a63a9faf27ad5a65fc59777",
+ "_spec": "execa@^0.7.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale",
- "bin": null,
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/execa/issues"
+ },
"bundleDependencies": false,
"dependencies": {
- "cross-spawn": "^4.0.0",
- "get-stream": "^2.2.0",
+ "cross-spawn": "^5.0.1",
+ "get-stream": "^3.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
@@ -38,22 +44,68 @@
"strip-eof": "^1.0.0"
},
"deprecated": false,
- "description": "> A better [`child_process`](https://nodejs.org/api/child_process.html)",
+ "description": "A better `child_process`",
"devDependencies": {
"ava": "*",
"cat-names": "^1.0.2",
"coveralls": "^2.11.9",
- "delay": "^1.3.1",
+ "delay": "^2.0.0",
"is-running": "^2.0.0",
- "nyc": "^8.3.0",
+ "nyc": "^11.0.2",
+ "tempfile": "^2.0.0",
"xo": "*"
},
"engines": {
"node": ">=4"
},
+ "files": [
+ "index.js",
+ "lib"
+ ],
+ "homepage": "https://github.com/sindresorhus/execa#readme",
+ "keywords": [
+ "exec",
+ "child",
+ "process",
+ "execute",
+ "fork",
+ "execfile",
+ "spawn",
+ "file",
+ "shell",
+ "bin",
+ "binary",
+ "binaries",
+ "npm",
+ "path",
+ "local"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "James Talmage",
+ "email": "james@talmage.io",
+ "url": "github.com/jamestalmage"
+ }
+ ],
"name": "execa",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "0.5.1"
+ "nyc": {
+ "reporter": [
+ "text",
+ "lcov"
+ ],
+ "exclude": [
+ "**/fixtures/**",
+ "**/test.js",
+ "**/test/**"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/execa.git"
+ },
+ "scripts": {
+ "test": "xo && nyc ava"
+ },
+ "version": "0.7.0"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/readme.md
index 16189acb27..18c808aa69 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/readme.md
@@ -64,8 +64,6 @@ execa.shell('exit 3').catch(error => {
Execute a file.
-Same options as [`child_process.execFile`](https://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback).
-
Think of this as a mix of `child_process.execFile` and `child_process.spawn`.
Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties.
@@ -82,8 +80,6 @@ Same as `execa()`, but returns only `stderr`.
Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer.
-Same options as [`child_process.exec`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback).
-
Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess).
The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties.
@@ -92,21 +88,78 @@ The `child_process` instance is enhanced to also be promise for a result object
Execute a file synchronously.
-Same options as [`child_process.execFileSync`](https://nodejs.org/api/child_process.html#child_process_child_process_execfilesync_file_args_options), except the default encoding is `utf8` instead of `buffer`.
-
Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options).
+This method throws an `Error` if the command fails.
+
### execa.shellSync(file, [options])
Execute a command synchronously through the system shell.
-Same options as [`child_process.execSync`](https://nodejs.org/api/child_process.html#child_process_child_process_execsync_command_options), except the default encoding is `utf8` instead of `buffer`.
-
Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options).
### options
-Additional options:
+Type: `Object`
+
+#### cwd
+
+Type: `string`<br>
+Default: `process.cwd()`
+
+Current working directory of the child process.
+
+#### env
+
+Type: `Object`<br>
+Default: `process.env`
+
+Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this.
+
+#### extendEnv
+
+Type: `boolean`<br>
+Default: `true`
+
+Set to `false` if you don't want to extend the environment variables when providing the `env` property.
+
+#### argv0
+
+Type: `string`
+
+Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified.
+
+#### stdio
+
+Type: `Array` `string`<br>
+Default: `pipe`
+
+Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration.
+
+#### detached
+
+Type: `boolean`
+
+Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached).
+
+#### uid
+
+Type: `number`
+
+Sets the user identity of the process.
+
+#### gid
+
+Type: `number`
+
+Sets the group identity of the process.
+
+#### shell
+
+Type: `boolean` `string`<br>
+Default: `false`
+
+If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows.
#### stripEof
@@ -123,9 +176,16 @@ Default: `true`
Prefer locally installed binaries when looking for a binary to execute.<br>
If you `$ npm install foo`, you can then `execa('foo')`.
+#### localDir
+
+Type: `string`<br>
+Default: `process.cwd()`
+
+Preferred path to find locally installed binaries in (use with `preferLocal`).
+
#### input
-Type: `string` `Buffer` `ReadableStream`
+Type: `string` `Buffer` `stream.Readable`
Write some input to the `stdin` of your binary.<br>
Streams are not allowed when using the synchronous methods.
@@ -144,6 +204,75 @@ Default: `true`
Keep track of the spawned process and `kill` it when the parent process exits.
+#### encoding
+
+Type: `string`<br>
+Default: `utf8`
+
+Specify the character encoding used to decode the `stdout` and `stderr` output.
+
+#### timeout
+
+Type: `number`<br>
+Default: `0`
+
+If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds.
+
+#### maxBuffer
+
+Type: `number`<br>
+Default: `10000000` (10MB)
+
+Largest amount of data in bytes allowed on `stdout` or `stderr`.
+
+#### killSignal
+
+Type: `string` `number`<br>
+Default: `SIGTERM`
+
+Signal value to be used when the spawned process will be killed.
+
+#### stdin
+
+Type: `string` `number` `Stream` `undefined` `null`<br>
+Default: `pipe`
+
+Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
+
+#### stdout
+
+Type: `string` `number` `Stream` `undefined` `null`<br>
+Default: `pipe`
+
+Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
+
+#### stderr
+
+Type: `string` `number` `Stream` `undefined` `null`<br>
+Default: `pipe`
+
+Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
+
+
+## Tips
+
+### Save and pipe output from a child process
+
+Let's say you want to show the output of a child process in real-time while also saving it to a variable.
+
+```js
+const execa = require('execa');
+const getStream = require('get-stream');
+
+const stream = execa('echo', ['foo']).stdout;
+
+stream.pipe(process.stdout);
+
+getStream(stream).then(value => {
+ console.log('child output:', value);
+});
+```
+
## License
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/package.json
index b52d010e41..bda5c72d19 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/package.json
@@ -1,8 +1,8 @@
{
"_from": "os-locale@^2.0.0",
- "_id": "os-locale@2.0.0",
+ "_id": "os-locale@2.1.0",
"_inBundle": false,
- "_integrity": "sha1-FZGN7VEFIrge565aMJ1U9jn8OaQ=",
+ "_integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
"_location": "/libnpx/yargs/os-locale",
"_phantomChildren": {
"lru-cache": "4.1.1",
@@ -21,31 +21,60 @@
"_requiredBy": [
"/libnpx/yargs"
],
- "_resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.0.0.tgz",
- "_shasum": "15918ded510522b81ee7ae5a309d54f639fc39a4",
- "_shrinkwrap": null,
+ "_resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
+ "_shasum": "42bc2900a6b5b8bd17376c8e882b65afccf24bf2",
"_spec": "os-locale@^2.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs",
- "bin": null,
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/os-locale/issues"
+ },
"bundleDependencies": false,
"dependencies": {
- "execa": "^0.5.0",
+ "execa": "^0.7.0",
"lcid": "^1.0.0",
"mem": "^1.1.0"
},
"deprecated": false,
- "description": "> Get the system [locale](https://en.wikipedia.org/wiki/Locale_(computer_software))",
+ "description": "Get the system locale",
"devDependencies": {
"ava": "*",
- "require-uncached": "^1.0.2",
+ "import-fresh": "^2.0.0",
"xo": "*"
},
"engines": {
"node": ">=4"
},
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/os-locale#readme",
+ "keywords": [
+ "locale",
+ "lang",
+ "language",
+ "system",
+ "os",
+ "string",
+ "str",
+ "user",
+ "country",
+ "id",
+ "identifier",
+ "region"
+ ],
+ "license": "MIT",
"name": "os-locale",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "2.0.0"
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/os-locale.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.1.0"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/readme.md
index b867c55ee6..7c80d33589 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/readme.md
@@ -19,7 +19,7 @@ $ npm install --save os-locale
```js
const osLocale = require('os-locale');
-osLocale.then(locale => {
+osLocale().then(locale => {
console.log(locale);
//=> 'en_US'
});
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/index.js
index 1f8a1f1134..bbc49d29b1 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/index.js
@@ -7,10 +7,10 @@ module.exports = str => {
return 0;
}
- let width = 0;
-
str = stripAnsi(str);
+ let width = 0;
+
for (let i = 0; i < str.length; i++) {
const code = str.codePointAt(i);
@@ -19,16 +19,17 @@ module.exports = str => {
continue;
}
+ // Ignore combining characters
+ if (code >= 0x300 && code <= 0x36F) {
+ continue;
+ }
+
// Surrogates
- if (code >= 0x10000) {
+ if (code > 0xFFFF) {
i++;
}
- if (isFullwidthCodePoint(code)) {
- width += 2;
- } else {
- width++;
- }
+ width += isFullwidthCodePoint(code) ? 2 : 1;
}
return width;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/package.json
index c2f5b95842..3bc2c04b62 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/package.json
@@ -1,8 +1,8 @@
{
"_from": "string-width@^2.0.0",
- "_id": "string-width@2.1.0",
+ "_id": "string-width@2.1.1",
"_inBundle": false,
- "_integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=",
+ "_integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"_location": "/libnpx/yargs/string-width",
"_phantomChildren": {},
"_requested": {
@@ -18,19 +18,25 @@
"_requiredBy": [
"/libnpx/yargs"
],
- "_resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz",
- "_shasum": "030664561fc146c9423ec7d978fe2457437fe6d0",
- "_shrinkwrap": null,
+ "_resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+ "_shasum": "ab93f27a8dc13d28cac815c462143a6d9012ae9e",
"_spec": "string-width@^2.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs",
- "bin": null,
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/string-width/issues"
+ },
"bundleDependencies": false,
"dependencies": {
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^4.0.0"
},
"deprecated": false,
- "description": "> Get the visual width of a string - the number of columns required to display it",
+ "description": "Get the visual width of a string - the number of columns required to display it",
"devDependencies": {
"ava": "*",
"xo": "*"
@@ -38,9 +44,44 @@
"engines": {
"node": ">=4"
},
+ "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",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "2.1.0"
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/string-width.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.1.1"
}