Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2016-01-21 02:40:47 +0300
committerRebecca Turner <me@re-becca.org>2016-01-21 04:44:07 +0300
commitcf7b36142c2af8c4c86c04efa46a386a85d4bc31 (patch)
tree1487b33a2b918b72b0155611adb23a9433afec35 /node_modules/request
parent4f30571fdea965760093577f46fa4f1f06b79c36 (diff)
deps: request subdeps updates
bl@1.0.1 async@1.5.2 har-validator@2.0.6 escape-string-regexp@1.0.4 is-my-json-valid@2.12.4 sshpk@1.7.3 dashdash@1.12.2 tweetnacl@0.13.3 mime-types@2.1.9 mime-db@1.21.0
Diffstat (limited to 'node_modules/request')
-rw-r--r--node_modules/request/node_modules/bl/.jshintrc59
-rw-r--r--node_modules/request/node_modules/bl/.travis.yml10
-rw-r--r--node_modules/request/node_modules/bl/bl.js5
-rw-r--r--node_modules/request/node_modules/bl/package.json109
-rw-r--r--node_modules/request/node_modules/bl/test/basic-test.js16
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md12
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/README.md114
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/dist/async.js47
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/dist/async.min.js2
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/lib/async.js47
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/package.json22
-rw-r--r--node_modules/request/node_modules/har-validator/README.md167
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/index.js2
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json118
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/readme.md8
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/formats.js2
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json34
-rw-r--r--node_modules/request/node_modules/har-validator/package.json33
l---------node_modules/request/node_modules/http-signature/node_modules/.bin/sshpk-sign1
l---------node_modules/request/node_modules/http-signature/node_modules/.bin/sshpk-verify1
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/.npmignore1
-rwxr-xr-xnode_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv2
-rwxr-xr-xnode_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign176
-rwxr-xr-xnode_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-verify166
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ed-compat.js2
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js6
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js3
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-conv.1135
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-sign.181
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-verify.168
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/README.md84
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/etc/dashdash.bash_completion.in388
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js215
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/README.md126
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/assert.js245
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/package.json71
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json22
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md2
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json24
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json37
-rw-r--r--node_modules/request/node_modules/mime-types/HISTORY.md6
-rw-r--r--node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md19
-rw-r--r--node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md2
-rw-r--r--node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json48
-rw-r--r--node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json38
-rw-r--r--node_modules/request/node_modules/mime-types/package.json20
46 files changed, 1954 insertions, 842 deletions
diff --git a/node_modules/request/node_modules/bl/.jshintrc b/node_modules/request/node_modules/bl/.jshintrc
new file mode 100644
index 000000000..c8ef3ca40
--- /dev/null
+++ b/node_modules/request/node_modules/bl/.jshintrc
@@ -0,0 +1,59 @@
+{
+ "predef": [ ]
+ , "bitwise": false
+ , "camelcase": false
+ , "curly": false
+ , "eqeqeq": false
+ , "forin": false
+ , "immed": false
+ , "latedef": false
+ , "noarg": true
+ , "noempty": true
+ , "nonew": true
+ , "plusplus": false
+ , "quotmark": true
+ , "regexp": false
+ , "undef": true
+ , "unused": true
+ , "strict": false
+ , "trailing": true
+ , "maxlen": 120
+ , "asi": true
+ , "boss": true
+ , "debug": true
+ , "eqnull": true
+ , "esnext": true
+ , "evil": true
+ , "expr": true
+ , "funcscope": false
+ , "globalstrict": false
+ , "iterator": false
+ , "lastsemic": true
+ , "laxbreak": true
+ , "laxcomma": true
+ , "loopfunc": true
+ , "multistr": false
+ , "onecase": false
+ , "proto": false
+ , "regexdash": false
+ , "scripturl": true
+ , "smarttabs": false
+ , "shadow": false
+ , "sub": true
+ , "supernew": false
+ , "validthis": true
+ , "browser": true
+ , "couch": false
+ , "devel": false
+ , "dojo": false
+ , "mootools": false
+ , "node": true
+ , "nonstandard": true
+ , "prototypejs": false
+ , "rhino": false
+ , "worker": true
+ , "wsh": false
+ , "nomen": false
+ , "onevar": false
+ , "passfail": false
+} \ No newline at end of file
diff --git a/node_modules/request/node_modules/bl/.travis.yml b/node_modules/request/node_modules/bl/.travis.yml
index 81c081418..e431a1bd0 100644
--- a/node_modules/request/node_modules/bl/.travis.yml
+++ b/node_modules/request/node_modules/bl/.travis.yml
@@ -1,14 +1,12 @@
+sudo: false
language: node_js
-before_install:
- - curl --location http://git.io/1OcIZA | bash -s
node_js:
- - 0.8
- - 0.10
- - 0.11
+ - '0.10'
+ - node
+ - iojs
branches:
only:
- master
notifications:
email:
- rod@vagg.org
-script: npm test
diff --git a/node_modules/request/node_modules/bl/bl.js b/node_modules/request/node_modules/bl/bl.js
index 7a2f99788..b979ba82e 100644
--- a/node_modules/request/node_modules/bl/bl.js
+++ b/node_modules/request/node_modules/bl/bl.js
@@ -52,6 +52,11 @@ BufferList.prototype.append = function (buf) {
var isBuffer = Buffer.isBuffer(buf) ||
buf instanceof BufferList
+ // coerce number arguments to strings, since Buffer(number) does
+ // uninitialized memory allocation
+ if (typeof buf == 'number')
+ buf = buf.toString()
+
this._bufs.push(isBuffer ? buf : new Buffer(buf))
this.length += buf.length
return this
diff --git a/node_modules/request/node_modules/bl/package.json b/node_modules/request/node_modules/bl/package.json
index 151384703..61b85c139 100644
--- a/node_modules/request/node_modules/bl/package.json
+++ b/node_modules/request/node_modules/bl/package.json
@@ -1,62 +1,87 @@
{
- "name": "bl",
- "version": "1.0.0",
- "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
- "main": "bl.js",
- "scripts": {
- "test": "node test/test.js | faucet",
- "test-local": "brtapsauce-local test/basic-test.js"
+ "_args": [
+ [
+ "bl@~1.0.0",
+ "/Users/rebecca/code/npm/node_modules/request"
+ ]
+ ],
+ "_from": "bl@>=1.0.0 <1.1.0",
+ "_id": "bl@1.0.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/request/bl",
+ "_nodeVersion": "6.0.0-nightly2016011666b9c0d8bd",
+ "_npmUser": {
+ "email": "rod@vagg.org",
+ "name": "rvagg"
},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/rvagg/bl.git"
+ "_npmVersion": "3.3.12",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "bl",
+ "raw": "bl@~1.0.0",
+ "rawSpec": "~1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <1.1.0",
+ "type": "range"
},
- "homepage": "https://github.com/rvagg/bl",
+ "_requiredBy": [
+ "/request"
+ ],
+ "_resolved": "https://registry.npmjs.org/bl/-/bl-1.0.1.tgz",
+ "_shasum": "0e6df7330308c46515751676cafa7334dc9852fd",
+ "_shrinkwrap": null,
+ "_spec": "bl@~1.0.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/request",
"authors": [
- "Rod Vagg <rod@vagg.org> (https://github.com/rvagg)",
+ "Jarett Cruger <jcrugzz@gmail.com> (https://github.com/jcrugzz)",
"Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)",
- "Jarett Cruger <jcrugzz@gmail.com> (https://github.com/jcrugzz)"
- ],
- "keywords": [
- "buffer",
- "buffers",
- "stream",
- "awesomesauce"
+ "Rod Vagg <rod@vagg.org> (https://github.com/rvagg)"
],
- "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/rvagg/bl/issues"
+ },
"dependencies": {
- "readable-stream": "~2.0.0"
+ "readable-stream": "~2.0.5"
},
+ "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
"devDependencies": {
- "tape": "~2.12.3",
- "hash_file": "~0.1.1",
+ "brtapsauce": "~0.3.0",
"faucet": "~0.0.1",
- "brtapsauce": "~0.3.0"
- },
- "gitHead": "1794938be6697a6d1e02cd942a4eea59b353347a",
- "bugs": {
- "url": "https://github.com/rvagg/bl/issues"
+ "hash_file": "~0.1.1",
+ "tape": "~2.12.3"
},
- "_id": "bl@1.0.0",
- "_shasum": "ada9a8a89a6d7ac60862f7dec7db207873e0c3f5",
- "_from": "bl@>=1.0.0 <1.1.0",
- "_npmVersion": "2.9.0",
- "_nodeVersion": "2.0.1-nightly20150618d2e4e03444",
- "_npmUser": {
- "name": "rvagg",
- "email": "rod@vagg.org"
+ "directories": {},
+ "dist": {
+ "shasum": "0e6df7330308c46515751676cafa7334dc9852fd",
+ "tarball": "http://registry.npmjs.org/bl/-/bl-1.0.1.tgz"
},
+ "gitHead": "9eced07e8c4f4b44b42e6e99ac33d4c390b4e74a",
+ "homepage": "https://github.com/rvagg/bl",
+ "keywords": [
+ "awesomesauce",
+ "buffer",
+ "buffers",
+ "stream"
+ ],
+ "license": "MIT",
+ "main": "bl.js",
"maintainers": [
{
"name": "rvagg",
"email": "rod@vagg.org"
}
],
- "dist": {
- "shasum": "ada9a8a89a6d7ac60862f7dec7db207873e0c3f5",
- "tarball": "http://registry.npmjs.org/bl/-/bl-1.0.0.tgz"
+ "name": "bl",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/rvagg/bl.git"
},
- "directories": {},
- "_resolved": "https://registry.npmjs.org/bl/-/bl-1.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "scripts": {
+ "test": "node test/test.js | faucet",
+ "test-local": "brtapsauce-local test/basic-test.js"
+ },
+ "version": "1.0.1"
}
diff --git a/node_modules/request/node_modules/bl/test/basic-test.js b/node_modules/request/node_modules/bl/test/basic-test.js
index 75116a30f..92572642f 100644
--- a/node_modules/request/node_modules/bl/test/basic-test.js
+++ b/node_modules/request/node_modules/bl/test/basic-test.js
@@ -336,6 +336,22 @@ tape('test String appendage', function (t) {
t.end()
})
+tape('test Number appendage', function (t) {
+ var bl = new BufferList()
+ , b = new Buffer('1234567890')
+
+ bl.append(1234)
+ bl.append(567)
+ bl.append(89)
+ bl.append(0)
+
+ encodings.forEach(function (enc) {
+ t.equal(bl.toString(enc), b.toString(enc))
+ })
+
+ t.end()
+})
+
tape('write nothing, should get empty buffer', function (t) {
t.plan(3)
BufferList(function (err, data) {
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md b/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md
index 8b4d8c22b..f15e08121 100644
--- a/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md
+++ b/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md
@@ -1,3 +1,15 @@
+# v1.5.2
+- Allow using `"consructor"` as an argument in `memoize` (#998)
+- Give a better error messsage when `auto` dependency checking fails (#994)
+- Various doc updates (#936, #956, #979, #1002)
+
+# v1.5.1
+- Fix issue with `pause` in `queue` with concurrency enabled (#946)
+- `while` and `until` now pass the final result to callback (#963)
+- `auto` will properly handle concurrency when there is no callback (#966)
+- `auto` will now properly stop execution when an error occurs (#988, #993)
+- Various doc fixes (#971, #980)
+
# v1.5.0
- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) (#892)
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/README.md b/node_modules/request/node_modules/form-data/node_modules/async/README.md
index 071d069b7..316c40505 100644
--- a/node_modules/request/node_modules/form-data/node_modules/async/README.md
+++ b/node_modules/request/node_modules/form-data/node_modules/async/README.md
@@ -627,9 +627,9 @@ __Arguments__
* `iterator(item, callback)` - A truth test to apply to each item in the array
in parallel. The iterator is passed a `callback(truthValue)` which must be
called with a boolean argument once it has completed.
-* `callback(result)` - *Optional* A callback which is called after all the `iterator`
- functions have finished. Result will be either `true` or `false` depending on
- the values of the async tests.
+* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns
+ `false`, or after all the iterator functions have finished. Result will be
+ either `true` or `false` depending on the values of the async tests.
**Note: the callbacks do not take an error as their first argument.**
@@ -773,7 +773,7 @@ __Arguments__
a `callback(err, result)` which it must call on completion with an error `err`
(which can be `null`) and an optional `result` value.
* `callback(err, results)` - An optional callback to run once all the functions
- have completed. This function gets a results array (or object) containing all
+ have completed successfully. This function gets a results array (or object) containing all
the result arguments passed to the task callbacks.
__Example__
@@ -834,8 +834,9 @@ __Arguments__
* `fn(callback)` - A function which is called each time `test` passes. The function is
passed a `callback(err)`, which must be called once it has completed with an
optional `err` argument.
-* `callback(err)` - A callback which is called after the test fails and repeated
- execution of `fn` has stopped.
+* `callback(err, [results])` - A callback which is called after the test
+ function has failed and repeated execution of `fn` has stopped. `callback`
+ will be passed an error and any arguments passed to the final `fn`'s callback.
__Example__
@@ -846,10 +847,12 @@ async.whilst(
function () { return count < 5; },
function (callback) {
count++;
- setTimeout(callback, 1000);
+ setTimeout(function () {
+ callback(null, count);
+ }, 1000);
},
- function (err) {
- // 5 seconds have passed
+ function (err, n) {
+ // 5 seconds have passed, n = 5
}
);
```
@@ -870,7 +873,8 @@ the order of operations, the arguments `test` and `fn` are switched.
### until(test, fn, callback)
Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped,
-or an error occurs.
+or an error occurs. `callback` will be passed an error and any arguments passed
+to the final `fn`'s callback.
The inverse of [`whilst`](#whilst).
@@ -981,6 +985,52 @@ async.waterfall([
// result now equals 'done'
});
```
+Or, with named functions:
+
+```js
+async.waterfall([
+ myFirstFunction,
+ mySecondFunction,
+ myLastFunction,
+], function (err, result) {
+ // result now equals 'done'
+});
+function myFirstFunction(callback) {
+ callback(null, 'one', 'two');
+}
+function mySecondFunction(arg1, arg2, callback) {
+ // arg1 now equals 'one' and arg2 now equals 'two'
+ callback(null, 'three');
+}
+function myLastFunction(arg1, callback) {
+ // arg1 now equals 'three'
+ callback(null, 'done');
+}
+```
+
+Or, if you need to pass any argument to the first function:
+
+```js
+async.waterfall([
+ async.apply(myFirstFunction, 'zero'),
+ mySecondFunction,
+ myLastFunction,
+], function (err, result) {
+ // result now equals 'done'
+});
+function myFirstFunction(arg1, callback) {
+ // arg1 now equals 'zero'
+ callback(null, 'one', 'two');
+}
+function mySecondFunction(arg1, arg2, callback) {
+ // arg1 now equals 'one' and arg2 now equals 'two'
+ callback(null, 'three');
+}
+function myLastFunction(arg1, callback) {
+ // arg1 now equals 'three'
+ callback(null, 'done');
+}
+```
---------------------------------------
<a name="compose" />
@@ -1395,8 +1445,10 @@ result (if any) of the final attempt.
__Arguments__
-* `opts` - Can be either an object with `times` and `interval` or a number. `times` is how many attempts should be made before giving up. `interval` is how long to wait inbetween attempts. Defaults to {times: 5, interval: 0}
- * if a number is passed in it sets `times` only (with `interval` defaulting to 0).
+* `opts` - Can be either an object with `times` and `interval` or a number.
+ * `times` - The number of attempts to make before giving up. The default is `5`.
+ * `interval` - The time to wait between retries, in milliseconds. The default is `0`.
+ * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`.
* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)`
which must be called when finished, passing `err` (which can be `null`) and the `result` of
the function's execution, and (2) a `results` object, containing the results of
@@ -1404,21 +1456,29 @@ __Arguments__
* `callback(err, results)` - An optional callback which is called when the
task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`.
-The [`retry`](#retry) function can be used as a stand-alone control flow by passing a
-callback, as shown below:
+The [`retry`](#retry) function can be used as a stand-alone control flow by passing a callback, as shown below:
```js
+// try calling apiMethod 3 times
async.retry(3, apiMethod, function(err, result) {
// do something with the result
});
```
```js
+// try calling apiMethod 3 times, waiting 200 ms between each retry
async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {
// do something with the result
});
```
+```js
+// try calling apiMethod the default 5 times no delay between each retry
+async.retry(apiMethod, function(err, result) {
+ // do something with the result
+});
+```
+
It can also be embedded within other control flow functions to retry individual methods
that are not as reliable, like this:
@@ -1723,6 +1783,32 @@ async.waterfall([
], callback)
```
+If the function passed to `asyncify` returns a Promise, that promises's resolved/rejected state will be used to call the callback, rather than simply the synchronous return value. Example:
+
+```js
+async.waterfall([
+ async.apply(fs.readFile, filename, "utf8"),
+ async.asyncify(function (contents) {
+ return db.model.create(contents);
+ }),
+ function (model, next) {
+ // `model` is the instantiated model object.
+ // If there was an error, this function would be skipped.
+ }
+], callback)
+```
+
+This also means you can asyncify ES2016 `async` functions.
+
+```js
+var q = async.queue(async.asyncify(async function (file) {
+ var intermediateStep = await processFile(file);
+ return await somePromise(intermediateStep)
+}));
+
+q.push(files);
+```
+
---------------------------------------
<a name="log" />
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/dist/async.js b/node_modules/request/node_modules/form-data/node_modules/async/dist/async.js
index 888934402..31e7620fb 100644
--- a/node_modules/request/node_modules/form-data/node_modules/async/dist/async.js
+++ b/node_modules/request/node_modules/form-data/node_modules/async/dist/async.js
@@ -510,7 +510,7 @@
};
async.auto = function (tasks, concurrency, callback) {
- if (!callback) {
+ if (typeof arguments[1] === 'function') {
// concurrency is optional, shift the args.
callback = concurrency;
concurrency = null;
@@ -528,6 +528,8 @@
var results = {};
var runningTasks = 0;
+ var hasError = false;
+
var listeners = [];
function addListener(fn) {
listeners.unshift(fn);
@@ -550,6 +552,7 @@
});
_arrayEach(keys, function (k) {
+ if (hasError) return;
var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
var taskCallback = _restParam(function(err, args) {
runningTasks--;
@@ -562,6 +565,8 @@
safeResults[rkey] = val;
});
safeResults[k] = args;
+ hasError = true;
+
callback(err, safeResults);
}
else {
@@ -575,7 +580,7 @@
var dep;
while (len--) {
if (!(dep = tasks[requires[len]])) {
- throw new Error('Has inexistant dependency');
+ throw new Error('Has nonexistent dependency in ' + requires.join(', '));
}
if (_isArray(dep) && _indexOf(dep, k) >= 0) {
throw new Error('Has cyclic dependencies');
@@ -781,7 +786,7 @@
} else if (test.apply(this, args)) {
iterator(next);
} else {
- callback(null);
+ callback.apply(null, [null].concat(args));
}
});
iterator(next);
@@ -929,24 +934,23 @@
_insert(q, data, true, callback);
},
process: function () {
- if (!q.paused && workers < q.concurrency && q.tasks.length) {
- while(workers < q.concurrency && q.tasks.length){
- var tasks = q.payload ?
- q.tasks.splice(0, q.payload) :
- q.tasks.splice(0, q.tasks.length);
-
- var data = _map(tasks, function (task) {
- return task.data;
- });
+ while(!q.paused && workers < q.concurrency && q.tasks.length){
- if (q.tasks.length === 0) {
- q.empty();
- }
- workers += 1;
- workersList.push(tasks[0]);
- var cb = only_once(_next(q, tasks));
- worker(data, cb);
+ var tasks = q.payload ?
+ q.tasks.splice(0, q.payload) :
+ q.tasks.splice(0, q.tasks.length);
+
+ var data = _map(tasks, function (task) {
+ return task.data;
+ });
+
+ if (q.tasks.length === 0) {
+ q.empty();
}
+ workers += 1;
+ workersList.push(tasks[0]);
+ var cb = only_once(_next(q, tasks));
+ worker(data, cb);
}
},
length: function () {
@@ -1081,16 +1085,17 @@
async.memoize = function (fn, hasher) {
var memo = {};
var queues = {};
+ var has = Object.prototype.hasOwnProperty;
hasher = hasher || identity;
var memoized = _restParam(function memoized(args) {
var callback = args.pop();
var key = hasher.apply(null, args);
- if (key in memo) {
+ if (has.call(memo, key)) {
async.setImmediate(function () {
callback.apply(null, memo[key]);
});
}
- else if (key in queues) {
+ else if (has.call(queues, key)) {
queues[key].push(callback);
}
else {
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/dist/async.min.js b/node_modules/request/node_modules/form-data/node_modules/async/dist/async.min.js
index b947fc489..2490016a0 100644
--- a/node_modules/request/node_modules/form-data/node_modules/async/dist/async.min.js
+++ b/node_modules/request/node_modules/form-data/node_modules/async/dist/async.min.js
@@ -1,2 +1,2 @@
-!function(){function n(){}function t(n){return n}function e(n){return!!n}function r(n){return!n}function u(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function i(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}function o(n){return M(n)||"number"==typeof n.length&&n.length>=0&&n.length%1===0}function c(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function a(n,t){for(var e=-1,r=n.length,u=Array(r);++e<r;)u[e]=t(n[e],e,n);return u}function f(n){return a(Array(n),function(n,t){return t})}function l(n,t,e){return c(n,function(n,r,u){e=t(e,n,r,u)}),e}function s(n,t){c(W(n),function(e){t(n[e],e)})}function p(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}function h(n){var t,e,r=-1;return o(n)?(t=n.length,function(){return r++,t>r?r:null}):(e=W(n),t=e.length,function(){return r++,t>r?e[r]:null})}function m(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),u=0;e>u;u++)r[u]=arguments[u+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r)}}}function y(n){return function(t,e,r){return n(t,r)}}function v(t){return function(e,r,o){o=i(o||n),e=e||[];var c=h(e);if(0>=t)return o(null);var a=!1,f=0,l=!1;!function s(){if(a&&0>=f)return o(null);for(;t>f&&!l;){var n=c();if(null===n)return a=!0,void(0>=f&&o(null));f+=1,r(e[n],n,u(function(n){f-=1,n?(o(n),l=!0):s()}))}}()}}function d(n){return function(t,e,r){return n(C.eachOf,t,e,r)}}function g(n){return function(t,e,r,u){return n(v(e),t,r,u)}}function k(n){return function(t,e,r){return n(C.eachOfSeries,t,e,r)}}function b(t,e,r,u){u=i(u||n),e=e||[];var c=o(e)?[]:{};t(e,function(n,t,e){r(n,function(n,r){c[t]=r,e(n)})},function(n){u(n,c)})}function w(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(e){e&&u.push({index:t,value:n}),r()})},function(){r(a(u.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function O(n,t,e,r){w(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function S(n,t,e){return function(r,u,i,o){function c(){o&&o(e(!1,void 0))}function a(n,r,u){return o?void i(n,function(r){o&&t(r)&&(o(e(!0,n)),o=i=!1),u()}):u()}arguments.length>3?n(r,u,a,c):(o=i,i=u,n(r,a,c))}}function E(n,t){return t}function L(t,e,r){r=r||n;var u=o(e)?[]:{};t(e,function(n,t,e){n(m(function(n,r){r.length<=1&&(r=r[0]),u[t]=r,e(n)}))},function(n){r(n,u)})}function I(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(n,t){u=u.concat(t||[]),r(n)})},function(n){r(n,u)})}function x(t,e,r){function i(t,e,r,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");return t.started=!0,M(e)||(e=[e]),0===e.length&&t.idle()?C.setImmediate(function(){t.drain()}):(c(e,function(e){var i={data:e,callback:u||n};r?t.tasks.unshift(i):t.tasks.push(i),t.tasks.length===t.concurrency&&t.saturated()}),void C.setImmediate(t.process))}function o(n,t){return function(){f-=1;var e=!1,r=arguments;c(t,function(n){c(l,function(t,r){t!==n||e||(l.splice(r,1),e=!0)}),n.callback.apply(n,r)}),n.tasks.length+f===0&&n.drain(),n.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var f=0,l=[],s={tasks:[],concurrency:e,payload:r,saturated:n,empty:n,drain:n,started:!1,paused:!1,push:function(n,t){i(s,n,!1,t)},kill:function(){s.drain=n,s.tasks=[]},unshift:function(n,t){i(s,n,!0,t)},process:function(){if(!s.paused&&f<s.concurrency&&s.tasks.length)for(;f<s.concurrency&&s.tasks.length;){var n=s.payload?s.tasks.splice(0,s.payload):s.tasks.splice(0,s.tasks.length),e=a(n,function(n){return n.data});0===s.tasks.length&&s.empty(),f+=1,l.push(n[0]);var r=u(o(s,n));t(e,r)}},length:function(){return s.tasks.length},running:function(){return f},workersList:function(){return l},idle:function(){return s.tasks.length+f===0},pause:function(){s.paused=!0},resume:function(){if(s.paused!==!1){s.paused=!1;for(var n=Math.min(s.concurrency,s.tasks.length),t=1;n>=t;t++)C.setImmediate(s.process)}}};return s}function j(n){return m(function(t,e){t.apply(null,e.concat([m(function(t,e){"object"==typeof console&&(t?console.error&&console.error(t):console[n]&&c(e,function(t){console[n](t)}))})]))})}function A(n){return function(t,e,r){n(f(t),e,r)}}function T(n){return m(function(t,e){var r=m(function(e){var r=this,u=e.pop();return n(t,function(n,t,u){n.apply(r,e.concat([u]))},u)});return e.length?r.apply(this,e):r})}function z(n){return m(function(t){var e=t.pop();t.push(function(){var n=arguments;r?C.setImmediate(function(){e.apply(null,n)}):e.apply(null,n)});var r=!0;n.apply(this,t),r=!1})}var q,C={},P="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;null!=P&&(q=P.async),C.noConflict=function(){return P.async=q,C};var H=Object.prototype.toString,M=Array.isArray||function(n){return"[object Array]"===H.call(n)},U=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},W=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t},B="function"==typeof setImmediate&&setImmediate,D=B?function(n){B(n)}:function(n){setTimeout(n,0)};"object"==typeof process&&"function"==typeof process.nextTick?C.nextTick=process.nextTick:C.nextTick=D,C.setImmediate=B?D:C.nextTick,C.forEach=C.each=function(n,t,e){return C.eachOf(n,y(t),e)},C.forEachSeries=C.eachSeries=function(n,t,e){return C.eachOfSeries(n,y(t),e)},C.forEachLimit=C.eachLimit=function(n,t,e,r){return v(t)(n,y(e),r)},C.forEachOf=C.eachOf=function(t,e,r){function o(n){f--,n?r(n):null===c&&0>=f&&r(null)}r=i(r||n),t=t||[];for(var c,a=h(t),f=0;null!=(c=a());)f+=1,e(t[c],c,u(o));0===f&&r(null)},C.forEachOfSeries=C.eachOfSeries=function(t,e,r){function o(){var n=!0;return null===a?r(null):(e(t[a],a,u(function(t){if(t)r(t);else{if(a=c(),null===a)return r(null);n?C.setImmediate(o):o()}})),void(n=!1))}r=i(r||n),t=t||[];var c=h(t),a=c();o()},C.forEachOfLimit=C.eachOfLimit=function(n,t,e,r){v(t)(n,e,r)},C.map=d(b),C.mapSeries=k(b),C.mapLimit=g(b),C.inject=C.foldl=C.reduce=function(n,t,e,r){C.eachOfSeries(n,function(n,r,u){e(t,n,function(n,e){t=e,u(n)})},function(n){r(n,t)})},C.foldr=C.reduceRight=function(n,e,r,u){var i=a(n,t).reverse();C.reduce(i,e,r,u)},C.transform=function(n,t,e,r){3===arguments.length&&(r=e,e=t,t=M(n)?[]:{}),C.eachOf(n,function(n,r,u){e(t,n,r,u)},function(n){r(n,t)})},C.select=C.filter=d(w),C.selectLimit=C.filterLimit=g(w),C.selectSeries=C.filterSeries=k(w),C.reject=d(O),C.rejectLimit=g(O),C.rejectSeries=k(O),C.any=C.some=S(C.eachOf,e,t),C.someLimit=S(C.eachOfLimit,e,t),C.all=C.every=S(C.eachOf,r,r),C.everyLimit=S(C.eachOfLimit,r,r),C.detect=S(C.eachOf,t,E),C.detectSeries=S(C.eachOfSeries,t,E),C.detectLimit=S(C.eachOfLimit,t,E),C.sortBy=function(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return r>e?-1:e>r?1:0}C.map(n,function(n,e){t(n,function(t,r){t?e(t):e(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,a(t.sort(r),function(n){return n.value}))})},C.auto=function(t,e,r){function u(n){d.unshift(n)}function o(n){var t=p(d,n);t>=0&&d.splice(t,1)}function a(){h--,c(d.slice(0),function(n){n()})}r||(r=e,e=null),r=i(r||n);var f=W(t),h=f.length;if(!h)return r(null);e||(e=h);var y={},v=0,d=[];u(function(){h||r(null,y)}),c(f,function(n){function i(){return e>v&&l(g,function(n,t){return n&&y.hasOwnProperty(t)},!0)&&!y.hasOwnProperty(n)}function c(){i()&&(v++,o(c),h[h.length-1](d,y))}for(var f,h=M(t[n])?t[n]:[t[n]],d=m(function(t,e){if(v--,e.length<=1&&(e=e[0]),t){var u={};s(y,function(n,t){u[t]=n}),u[n]=e,r(t,u)}else y[n]=e,C.setImmediate(a)}),g=h.slice(0,h.length-1),k=g.length;k--;){if(!(f=t[g[k]]))throw new Error("Has inexistant dependency");if(M(f)&&p(f,n)>=0)throw new Error("Has cyclic dependencies")}i()?(v++,h[h.length-1](d,y)):u(c)})},C.retry=function(n,t,e){function r(n,t){if("number"==typeof t)n.times=parseInt(t,10)||i;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);n.times=parseInt(t.times,10)||i,n.interval=parseInt(t.interval,10)||o}}function u(n,t){function e(n,e){return function(r){n(function(n,t){r(!n||e,{err:n,result:t})},t)}}function r(n){return function(t){setTimeout(function(){t(null)},n)}}for(;a.times;){var u=!(a.times-=1);c.push(e(a.task,u)),!u&&a.interval>0&&c.push(r(a.interval))}C.series(c,function(t,e){e=e[e.length-1],(n||a.callback)(e.err,e.result)})}var i=5,o=0,c=[],a={times:i,interval:o},f=arguments.length;if(1>f||f>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");return 2>=f&&"function"==typeof n&&(e=t,t=n),"function"!=typeof n&&r(a,n),a.callback=e,a.task=t,a.callback?u():u},C.waterfall=function(t,e){function r(n){return m(function(t,u){if(t)e.apply(null,[t].concat(u));else{var i=n.next();i?u.push(r(i)):u.push(e),z(n).apply(null,u)}})}if(e=i(e||n),!M(t)){var u=new Error("First argument to waterfall must be an array of functions");return e(u)}return t.length?void r(C.iterator(t))():e()},C.parallel=function(n,t){L(C.eachOf,n,t)},C.parallelLimit=function(n,t,e){L(v(t),n,e)},C.series=function(n,t){L(C.eachOfSeries,n,t)},C.iterator=function(n){function t(e){function r(){return n.length&&n[e].apply(null,arguments),r.next()}return r.next=function(){return e<n.length-1?t(e+1):null},r}return t(0)},C.apply=m(function(n,t){return m(function(e){return n.apply(null,t.concat(e))})}),C.concat=d(I),C.concatSeries=k(I),C.whilst=function(t,e,r){if(r=r||n,t()){var u=m(function(n,i){n?r(n):t.apply(this,i)?e(u):r(null)});e(u)}else r(null)},C.doWhilst=function(n,t,e){var r=0;return C.whilst(function(){return++r<=1||t.apply(this,arguments)},n,e)},C.until=function(n,t,e){return C.whilst(function(){return!n.apply(this,arguments)},t,e)},C.doUntil=function(n,t,e){return C.doWhilst(n,function(){return!t.apply(this,arguments)},e)},C.during=function(t,e,r){r=r||n;var u=m(function(n,e){n?r(n):(e.push(i),t.apply(this,e))}),i=function(n,t){n?r(n):t?e(u):r(null)};t(i)},C.doDuring=function(n,t,e){var r=0;C.during(function(n){r++<1?n(null,!0):t.apply(this,arguments)},n,e)},C.queue=function(n,t){var e=x(function(t,e){n(t[0],e)},t,1);return e},C.priorityQueue=function(t,e){function r(n,t){return n.priority-t.priority}function u(n,t,e){for(var r=-1,u=n.length-1;u>r;){var i=r+(u-r+1>>>1);e(t,n[i])>=0?r=i:u=i-1}return r}function i(t,e,i,o){if(null!=o&&"function"!=typeof o)throw new Error("task callback must be a function");return t.started=!0,M(e)||(e=[e]),0===e.length?C.setImmediate(function(){t.drain()}):void c(e,function(e){var c={data:e,priority:i,callback:"function"==typeof o?o:n};t.tasks.splice(u(t.tasks,c,r)+1,0,c),t.tasks.length===t.concurrency&&t.saturated(),C.setImmediate(t.process)})}var o=C.queue(t,e);return o.push=function(n,t,e){i(o,n,t,e)},delete o.unshift,o},C.cargo=function(n,t){return x(n,1,t)},C.log=j("log"),C.dir=j("dir"),C.memoize=function(n,e){var r={},u={};e=e||t;var i=m(function(t){var i=t.pop(),o=e.apply(null,t);o in r?C.setImmediate(function(){i.apply(null,r[o])}):o in u?u[o].push(i):(u[o]=[i],n.apply(null,t.concat([m(function(n){r[o]=n;var t=u[o];delete u[o];for(var e=0,i=t.length;i>e;e++)t[e].apply(null,n)})])))});return i.memo=r,i.unmemoized=n,i},C.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},C.times=A(C.map),C.timesSeries=A(C.mapSeries),C.timesLimit=function(n,t,e,r){return C.mapLimit(f(n),t,e,r)},C.seq=function(){var t=arguments;return m(function(e){var r=this,u=e[e.length-1];"function"==typeof u?e.pop():u=n,C.reduce(t,e,function(n,t,e){t.apply(r,n.concat([m(function(n,t){e(n,t)})]))},function(n,t){u.apply(r,[n].concat(t))})})},C.compose=function(){return C.seq.apply(null,Array.prototype.reverse.call(arguments))},C.applyEach=T(C.eachOf),C.applyEachSeries=T(C.eachOfSeries),C.forever=function(t,e){function r(n){return n?i(n):void o(r)}var i=u(e||n),o=z(t);r()},C.ensureAsync=z,C.constant=m(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),C.wrapSync=C.asyncify=function(n){return m(function(t){var e,r=t.pop();try{e=n.apply(this,t)}catch(u){return r(u)}U(e)&&"function"==typeof e.then?e.then(function(n){r(null,n)})["catch"](function(n){r(n.message?n:new Error(n))}):r(null,e)})},"object"==typeof module&&module.exports?module.exports=C:"function"==typeof define&&define.amd?define([],function(){return C}):P.async=C}();
+!function(){function n(){}function t(n){return n}function e(n){return!!n}function r(n){return!n}function u(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function i(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}function o(n){return M(n)||"number"==typeof n.length&&n.length>=0&&n.length%1===0}function c(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function a(n,t){for(var e=-1,r=n.length,u=Array(r);++e<r;)u[e]=t(n[e],e,n);return u}function f(n){return a(Array(n),function(n,t){return t})}function l(n,t,e){return c(n,function(n,r,u){e=t(e,n,r,u)}),e}function s(n,t){c(W(n),function(e){t(n[e],e)})}function p(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}function h(n){var t,e,r=-1;return o(n)?(t=n.length,function(){return r++,t>r?r:null}):(e=W(n),t=e.length,function(){return r++,t>r?e[r]:null})}function m(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),u=0;e>u;u++)r[u]=arguments[u+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r)}}}function y(n){return function(t,e,r){return n(t,r)}}function v(t){return function(e,r,o){o=i(o||n),e=e||[];var c=h(e);if(0>=t)return o(null);var a=!1,f=0,l=!1;!function s(){if(a&&0>=f)return o(null);for(;t>f&&!l;){var n=c();if(null===n)return a=!0,void(0>=f&&o(null));f+=1,r(e[n],n,u(function(n){f-=1,n?(o(n),l=!0):s()}))}}()}}function d(n){return function(t,e,r){return n(P.eachOf,t,e,r)}}function g(n){return function(t,e,r,u){return n(v(e),t,r,u)}}function k(n){return function(t,e,r){return n(P.eachOfSeries,t,e,r)}}function b(t,e,r,u){u=i(u||n),e=e||[];var c=o(e)?[]:{};t(e,function(n,t,e){r(n,function(n,r){c[t]=r,e(n)})},function(n){u(n,c)})}function w(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(e){e&&u.push({index:t,value:n}),r()})},function(){r(a(u.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function O(n,t,e,r){w(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function S(n,t,e){return function(r,u,i,o){function c(){o&&o(e(!1,void 0))}function a(n,r,u){return o?void i(n,function(r){o&&t(r)&&(o(e(!0,n)),o=i=!1),u()}):u()}arguments.length>3?n(r,u,a,c):(o=i,i=u,n(r,a,c))}}function E(n,t){return t}function L(t,e,r){r=r||n;var u=o(e)?[]:{};t(e,function(n,t,e){n(m(function(n,r){r.length<=1&&(r=r[0]),u[t]=r,e(n)}))},function(n){r(n,u)})}function j(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(n,t){u=u.concat(t||[]),r(n)})},function(n){r(n,u)})}function I(t,e,r){function i(t,e,r,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");return t.started=!0,M(e)||(e=[e]),0===e.length&&t.idle()?P.setImmediate(function(){t.drain()}):(c(e,function(e){var i={data:e,callback:u||n};r?t.tasks.unshift(i):t.tasks.push(i),t.tasks.length===t.concurrency&&t.saturated()}),void P.setImmediate(t.process))}function o(n,t){return function(){f-=1;var e=!1,r=arguments;c(t,function(n){c(l,function(t,r){t!==n||e||(l.splice(r,1),e=!0)}),n.callback.apply(n,r)}),n.tasks.length+f===0&&n.drain(),n.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var f=0,l=[],s={tasks:[],concurrency:e,payload:r,saturated:n,empty:n,drain:n,started:!1,paused:!1,push:function(n,t){i(s,n,!1,t)},kill:function(){s.drain=n,s.tasks=[]},unshift:function(n,t){i(s,n,!0,t)},process:function(){for(;!s.paused&&f<s.concurrency&&s.tasks.length;){var n=s.payload?s.tasks.splice(0,s.payload):s.tasks.splice(0,s.tasks.length),e=a(n,function(n){return n.data});0===s.tasks.length&&s.empty(),f+=1,l.push(n[0]);var r=u(o(s,n));t(e,r)}},length:function(){return s.tasks.length},running:function(){return f},workersList:function(){return l},idle:function(){return s.tasks.length+f===0},pause:function(){s.paused=!0},resume:function(){if(s.paused!==!1){s.paused=!1;for(var n=Math.min(s.concurrency,s.tasks.length),t=1;n>=t;t++)P.setImmediate(s.process)}}};return s}function x(n){return m(function(t,e){t.apply(null,e.concat([m(function(t,e){"object"==typeof console&&(t?console.error&&console.error(t):console[n]&&c(e,function(t){console[n](t)}))})]))})}function A(n){return function(t,e,r){n(f(t),e,r)}}function T(n){return m(function(t,e){var r=m(function(e){var r=this,u=e.pop();return n(t,function(n,t,u){n.apply(r,e.concat([u]))},u)});return e.length?r.apply(this,e):r})}function z(n){return m(function(t){var e=t.pop();t.push(function(){var n=arguments;r?P.setImmediate(function(){e.apply(null,n)}):e.apply(null,n)});var r=!0;n.apply(this,t),r=!1})}var q,P={},C="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;null!=C&&(q=C.async),P.noConflict=function(){return C.async=q,P};var H=Object.prototype.toString,M=Array.isArray||function(n){return"[object Array]"===H.call(n)},U=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},W=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t},B="function"==typeof setImmediate&&setImmediate,D=B?function(n){B(n)}:function(n){setTimeout(n,0)};"object"==typeof process&&"function"==typeof process.nextTick?P.nextTick=process.nextTick:P.nextTick=D,P.setImmediate=B?D:P.nextTick,P.forEach=P.each=function(n,t,e){return P.eachOf(n,y(t),e)},P.forEachSeries=P.eachSeries=function(n,t,e){return P.eachOfSeries(n,y(t),e)},P.forEachLimit=P.eachLimit=function(n,t,e,r){return v(t)(n,y(e),r)},P.forEachOf=P.eachOf=function(t,e,r){function o(n){f--,n?r(n):null===c&&0>=f&&r(null)}r=i(r||n),t=t||[];for(var c,a=h(t),f=0;null!=(c=a());)f+=1,e(t[c],c,u(o));0===f&&r(null)},P.forEachOfSeries=P.eachOfSeries=function(t,e,r){function o(){var n=!0;return null===a?r(null):(e(t[a],a,u(function(t){if(t)r(t);else{if(a=c(),null===a)return r(null);n?P.setImmediate(o):o()}})),void(n=!1))}r=i(r||n),t=t||[];var c=h(t),a=c();o()},P.forEachOfLimit=P.eachOfLimit=function(n,t,e,r){v(t)(n,e,r)},P.map=d(b),P.mapSeries=k(b),P.mapLimit=g(b),P.inject=P.foldl=P.reduce=function(n,t,e,r){P.eachOfSeries(n,function(n,r,u){e(t,n,function(n,e){t=e,u(n)})},function(n){r(n,t)})},P.foldr=P.reduceRight=function(n,e,r,u){var i=a(n,t).reverse();P.reduce(i,e,r,u)},P.transform=function(n,t,e,r){3===arguments.length&&(r=e,e=t,t=M(n)?[]:{}),P.eachOf(n,function(n,r,u){e(t,n,r,u)},function(n){r(n,t)})},P.select=P.filter=d(w),P.selectLimit=P.filterLimit=g(w),P.selectSeries=P.filterSeries=k(w),P.reject=d(O),P.rejectLimit=g(O),P.rejectSeries=k(O),P.any=P.some=S(P.eachOf,e,t),P.someLimit=S(P.eachOfLimit,e,t),P.all=P.every=S(P.eachOf,r,r),P.everyLimit=S(P.eachOfLimit,r,r),P.detect=S(P.eachOf,t,E),P.detectSeries=S(P.eachOfSeries,t,E),P.detectLimit=S(P.eachOfLimit,t,E),P.sortBy=function(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return r>e?-1:e>r?1:0}P.map(n,function(n,e){t(n,function(t,r){t?e(t):e(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,a(t.sort(r),function(n){return n.value}))})},P.auto=function(t,e,r){function u(n){g.unshift(n)}function o(n){var t=p(g,n);t>=0&&g.splice(t,1)}function a(){h--,c(g.slice(0),function(n){n()})}"function"==typeof arguments[1]&&(r=e,e=null),r=i(r||n);var f=W(t),h=f.length;if(!h)return r(null);e||(e=h);var y={},v=0,d=!1,g=[];u(function(){h||r(null,y)}),c(f,function(n){function i(){return e>v&&l(k,function(n,t){return n&&y.hasOwnProperty(t)},!0)&&!y.hasOwnProperty(n)}function c(){i()&&(v++,o(c),h[h.length-1](g,y))}if(!d){for(var f,h=M(t[n])?t[n]:[t[n]],g=m(function(t,e){if(v--,e.length<=1&&(e=e[0]),t){var u={};s(y,function(n,t){u[t]=n}),u[n]=e,d=!0,r(t,u)}else y[n]=e,P.setImmediate(a)}),k=h.slice(0,h.length-1),b=k.length;b--;){if(!(f=t[k[b]]))throw new Error("Has nonexistent dependency in "+k.join(", "));if(M(f)&&p(f,n)>=0)throw new Error("Has cyclic dependencies")}i()?(v++,h[h.length-1](g,y)):u(c)}})},P.retry=function(n,t,e){function r(n,t){if("number"==typeof t)n.times=parseInt(t,10)||i;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);n.times=parseInt(t.times,10)||i,n.interval=parseInt(t.interval,10)||o}}function u(n,t){function e(n,e){return function(r){n(function(n,t){r(!n||e,{err:n,result:t})},t)}}function r(n){return function(t){setTimeout(function(){t(null)},n)}}for(;a.times;){var u=!(a.times-=1);c.push(e(a.task,u)),!u&&a.interval>0&&c.push(r(a.interval))}P.series(c,function(t,e){e=e[e.length-1],(n||a.callback)(e.err,e.result)})}var i=5,o=0,c=[],a={times:i,interval:o},f=arguments.length;if(1>f||f>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");return 2>=f&&"function"==typeof n&&(e=t,t=n),"function"!=typeof n&&r(a,n),a.callback=e,a.task=t,a.callback?u():u},P.waterfall=function(t,e){function r(n){return m(function(t,u){if(t)e.apply(null,[t].concat(u));else{var i=n.next();i?u.push(r(i)):u.push(e),z(n).apply(null,u)}})}if(e=i(e||n),!M(t)){var u=new Error("First argument to waterfall must be an array of functions");return e(u)}return t.length?void r(P.iterator(t))():e()},P.parallel=function(n,t){L(P.eachOf,n,t)},P.parallelLimit=function(n,t,e){L(v(t),n,e)},P.series=function(n,t){L(P.eachOfSeries,n,t)},P.iterator=function(n){function t(e){function r(){return n.length&&n[e].apply(null,arguments),r.next()}return r.next=function(){return e<n.length-1?t(e+1):null},r}return t(0)},P.apply=m(function(n,t){return m(function(e){return n.apply(null,t.concat(e))})}),P.concat=d(j),P.concatSeries=k(j),P.whilst=function(t,e,r){if(r=r||n,t()){var u=m(function(n,i){n?r(n):t.apply(this,i)?e(u):r.apply(null,[null].concat(i))});e(u)}else r(null)},P.doWhilst=function(n,t,e){var r=0;return P.whilst(function(){return++r<=1||t.apply(this,arguments)},n,e)},P.until=function(n,t,e){return P.whilst(function(){return!n.apply(this,arguments)},t,e)},P.doUntil=function(n,t,e){return P.doWhilst(n,function(){return!t.apply(this,arguments)},e)},P.during=function(t,e,r){r=r||n;var u=m(function(n,e){n?r(n):(e.push(i),t.apply(this,e))}),i=function(n,t){n?r(n):t?e(u):r(null)};t(i)},P.doDuring=function(n,t,e){var r=0;P.during(function(n){r++<1?n(null,!0):t.apply(this,arguments)},n,e)},P.queue=function(n,t){var e=I(function(t,e){n(t[0],e)},t,1);return e},P.priorityQueue=function(t,e){function r(n,t){return n.priority-t.priority}function u(n,t,e){for(var r=-1,u=n.length-1;u>r;){var i=r+(u-r+1>>>1);e(t,n[i])>=0?r=i:u=i-1}return r}function i(t,e,i,o){if(null!=o&&"function"!=typeof o)throw new Error("task callback must be a function");return t.started=!0,M(e)||(e=[e]),0===e.length?P.setImmediate(function(){t.drain()}):void c(e,function(e){var c={data:e,priority:i,callback:"function"==typeof o?o:n};t.tasks.splice(u(t.tasks,c,r)+1,0,c),t.tasks.length===t.concurrency&&t.saturated(),P.setImmediate(t.process)})}var o=P.queue(t,e);return o.push=function(n,t,e){i(o,n,t,e)},delete o.unshift,o},P.cargo=function(n,t){return I(n,1,t)},P.log=x("log"),P.dir=x("dir"),P.memoize=function(n,e){var r={},u={},i=Object.prototype.hasOwnProperty;e=e||t;var o=m(function(t){var o=t.pop(),c=e.apply(null,t);i.call(r,c)?P.setImmediate(function(){o.apply(null,r[c])}):i.call(u,c)?u[c].push(o):(u[c]=[o],n.apply(null,t.concat([m(function(n){r[c]=n;var t=u[c];delete u[c];for(var e=0,i=t.length;i>e;e++)t[e].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o},P.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},P.times=A(P.map),P.timesSeries=A(P.mapSeries),P.timesLimit=function(n,t,e,r){return P.mapLimit(f(n),t,e,r)},P.seq=function(){var t=arguments;return m(function(e){var r=this,u=e[e.length-1];"function"==typeof u?e.pop():u=n,P.reduce(t,e,function(n,t,e){t.apply(r,n.concat([m(function(n,t){e(n,t)})]))},function(n,t){u.apply(r,[n].concat(t))})})},P.compose=function(){return P.seq.apply(null,Array.prototype.reverse.call(arguments))},P.applyEach=T(P.eachOf),P.applyEachSeries=T(P.eachOfSeries),P.forever=function(t,e){function r(n){return n?i(n):void o(r)}var i=u(e||n),o=z(t);r()},P.ensureAsync=z,P.constant=m(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),P.wrapSync=P.asyncify=function(n){return m(function(t){var e,r=t.pop();try{e=n.apply(this,t)}catch(u){return r(u)}U(e)&&"function"==typeof e.then?e.then(function(n){r(null,n)})["catch"](function(n){r(n.message?n:new Error(n))}):r(null,e)})},"object"==typeof module&&module.exports?module.exports=P:"function"==typeof define&&define.amd?define([],function(){return P}):C.async=P}();
//# sourceMappingURL=dist/async.min.map \ No newline at end of file
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js b/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
index 888934402..31e7620fb 100644
--- a/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
+++ b/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
@@ -510,7 +510,7 @@
};
async.auto = function (tasks, concurrency, callback) {
- if (!callback) {
+ if (typeof arguments[1] === 'function') {
// concurrency is optional, shift the args.
callback = concurrency;
concurrency = null;
@@ -528,6 +528,8 @@
var results = {};
var runningTasks = 0;
+ var hasError = false;
+
var listeners = [];
function addListener(fn) {
listeners.unshift(fn);
@@ -550,6 +552,7 @@
});
_arrayEach(keys, function (k) {
+ if (hasError) return;
var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
var taskCallback = _restParam(function(err, args) {
runningTasks--;
@@ -562,6 +565,8 @@
safeResults[rkey] = val;
});
safeResults[k] = args;
+ hasError = true;
+
callback(err, safeResults);
}
else {
@@ -575,7 +580,7 @@
var dep;
while (len--) {
if (!(dep = tasks[requires[len]])) {
- throw new Error('Has inexistant dependency');
+ throw new Error('Has nonexistent dependency in ' + requires.join(', '));
}
if (_isArray(dep) && _indexOf(dep, k) >= 0) {
throw new Error('Has cyclic dependencies');
@@ -781,7 +786,7 @@
} else if (test.apply(this, args)) {
iterator(next);
} else {
- callback(null);
+ callback.apply(null, [null].concat(args));
}
});
iterator(next);
@@ -929,24 +934,23 @@
_insert(q, data, true, callback);
},
process: function () {
- if (!q.paused && workers < q.concurrency && q.tasks.length) {
- while(workers < q.concurrency && q.tasks.length){
- var tasks = q.payload ?
- q.tasks.splice(0, q.payload) :
- q.tasks.splice(0, q.tasks.length);
-
- var data = _map(tasks, function (task) {
- return task.data;
- });
+ while(!q.paused && workers < q.concurrency && q.tasks.length){
- if (q.tasks.length === 0) {
- q.empty();
- }
- workers += 1;
- workersList.push(tasks[0]);
- var cb = only_once(_next(q, tasks));
- worker(data, cb);
+ var tasks = q.payload ?
+ q.tasks.splice(0, q.payload) :
+ q.tasks.splice(0, q.tasks.length);
+
+ var data = _map(tasks, function (task) {
+ return task.data;
+ });
+
+ if (q.tasks.length === 0) {
+ q.empty();
}
+ workers += 1;
+ workersList.push(tasks[0]);
+ var cb = only_once(_next(q, tasks));
+ worker(data, cb);
}
},
length: function () {
@@ -1081,16 +1085,17 @@
async.memoize = function (fn, hasher) {
var memo = {};
var queues = {};
+ var has = Object.prototype.hasOwnProperty;
hasher = hasher || identity;
var memoized = _restParam(function memoized(args) {
var callback = args.pop();
var key = hasher.apply(null, args);
- if (key in memo) {
+ if (has.call(memo, key)) {
async.setImmediate(function () {
callback.apply(null, memo[key]);
});
}
- else if (key in queues) {
+ else if (has.call(queues, key)) {
queues[key].push(callback);
}
else {
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/package.json b/node_modules/request/node_modules/form-data/node_modules/async/package.json
index 3072aa7ac..97921ec00 100644
--- a/node_modules/request/node_modules/form-data/node_modules/async/package.json
+++ b/node_modules/request/node_modules/form-data/node_modules/async/package.json
@@ -2,20 +2,20 @@
"_args": [
[
"async@^1.4.0",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/form-data"
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/form-data"
]
],
"_from": "async@>=1.4.0 <2.0.0",
- "_id": "async@1.5.0",
+ "_id": "async@1.5.2",
"_inCache": true,
"_installable": true,
"_location": "/request/form-data/async",
- "_nodeVersion": "0.10.26",
+ "_nodeVersion": "4.2.3",
"_npmUser": {
"email": "alexander.early@gmail.com",
"name": "aearly"
},
- "_npmVersion": "2.14.2",
+ "_npmVersion": "3.5.2",
"_phantomChildren": {},
"_requested": {
"name": "async",
@@ -28,11 +28,11 @@
"_requiredBy": [
"/request/form-data"
],
- "_resolved": "https://registry.npmjs.org/async/-/async-1.5.0.tgz",
- "_shasum": "2796642723573859565633fc6274444bee2f8ce3",
+ "_resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+ "_shasum": "ec6a61ae56480c0c3cb241c95618e20892f9672a",
"_shrinkwrap": null,
"_spec": "async@^1.4.0",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/form-data",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/form-data",
"author": {
"name": "Caolan McMahon"
},
@@ -68,15 +68,15 @@
},
"directories": {},
"dist": {
- "shasum": "2796642723573859565633fc6274444bee2f8ce3",
- "tarball": "http://registry.npmjs.org/async/-/async-1.5.0.tgz"
+ "shasum": "ec6a61ae56480c0c3cb241c95618e20892f9672a",
+ "tarball": "http://registry.npmjs.org/async/-/async-1.5.2.tgz"
},
"files": [
"dist/async.js",
"dist/async.min.js",
"lib"
],
- "gitHead": "621f13805aa326865b85dbbf7128baf7146ab976",
+ "gitHead": "9ab5c67b7cb3a4c3dad4a2d4552a2f6775545d6c",
"homepage": "https://github.com/caolan/async#readme",
"jam": {
"categories": [
@@ -135,7 +135,7 @@
"spm": {
"main": "lib/async.js"
},
- "version": "1.5.0",
+ "version": "1.5.2",
"volo": {
"ignore": [
"**/.*",
diff --git a/node_modules/request/node_modules/har-validator/README.md b/node_modules/request/node_modules/har-validator/README.md
index 2399b316e..91526e6dd 100644
--- a/node_modules/request/node_modules/har-validator/README.md
+++ b/node_modules/request/node_modules/har-validator/README.md
@@ -52,16 +52,9 @@ har-validator --schema request request.json
a full [HAR](http://www.softwareishard.com/blog/har-12-spec/) object
```js
-var HAR = require('./har.json')
-var validate = require('har-validator')
-
-validate(HAR)
- .then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.log(data)
@@ -72,14 +65,9 @@ validate(HAR)
a [log](http://www.softwareishard.com/blog/har-12-spec/#log) object
```js
-var validate = require('har-validator')
-
-validate.log(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.log(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.cache(data)
@@ -90,14 +78,9 @@ validate.log(data.then(function (HAR) {
a [cache](http://www.softwareishard.com/blog/har-12-spec/#cache) object
```js
-var validate = require('har-validator')
-
-validate.cache(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.cache(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.cacheEntry(data)
@@ -108,14 +91,9 @@ validate.cache(data.then(function (HAR) {
a ["beforeRequest" or "afterRequest"](http://www.softwareishard.com/blog/har-12-spec/#cache) objects
```js
-var validate = require('har-validator')
-
-validate.cacheEntry(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.cacheEntry(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.content(data)
@@ -126,14 +104,9 @@ validate.cacheEntry(data.then(function (HAR) {
a [content](http://www.softwareishard.com/blog/har-12-spec/#content) object
```js
-var validate = require('har-validator')
-
-validate.content(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.content(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.cookie(data)
@@ -144,14 +117,9 @@ validate.content(data.then(function (HAR) {
a [cookie](http://www.softwareishard.com/blog/har-12-spec/#cookies) object
```js
-var validate = require('har-validator')
-
-validate.cookie(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.cookie(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.creator(data)
@@ -162,14 +130,9 @@ validate.cookie(data.then(function (HAR) {
a [creator](http://www.softwareishard.com/blog/har-12-spec/#creator) object
```js
-var validate = require('har-validator')
-
-validate.creator(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.creator(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.entry(data)
@@ -180,14 +143,9 @@ validate.creator(data.then(function (HAR) {
an [entry](http://www.softwareishard.com/blog/har-12-spec/#entries) object
```js
-var validate = require('har-validator')
-
-validate.entry(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.entry(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.log(data)
@@ -202,14 +160,9 @@ alias of [`Validate(data)`](#validate-data-callback-)
a [page](http://www.softwareishard.com/blog/har-12-spec/#pages) object
```js
-var validate = require('har-validator')
-
-validate.page(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.page(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.pageTimings(data)
@@ -220,14 +173,9 @@ validate.page(data.then(function (HAR) {
a [pageTimings](http://www.softwareishard.com/blog/har-12-spec/#pageTimings) object
```js
-var validate = require('har-validator')
-
-validate.pageTimings(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.pageTimings(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.postData(data)
@@ -238,14 +186,9 @@ validate.pageTimings(data.then(function (HAR) {
a [postData](http://www.softwareishard.com/blog/har-12-spec/#postData) object
```js
-var validate = require('har-validator')
-
-validate.postData(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.postData(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.record(data)
@@ -256,14 +199,9 @@ validate.postData(data.then(function (HAR) {
a [record](http://www.softwareishard.com/blog/har-12-spec/#headers) object
```js
-var validate = require('har-validator')
-
-validate.record(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.record(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.request(data)
@@ -274,14 +212,9 @@ validate.record(data.then(function (HAR) {
a [request](http://www.softwareishard.com/blog/har-12-spec/#request) object
```js
-var validate = require('har-validator')
-
-validate.request(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.request(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.response(data)
@@ -292,14 +225,9 @@ validate.request(data.then(function (HAR) {
a [response](http://www.softwareishard.com/blog/har-12-spec/#response) object
```js
-var validate = require('har-validator')
-
-validate.cacheEntry(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.cacheEntry(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
### Validate.timings(data)
@@ -310,14 +238,9 @@ validate.cacheEntry(data.then(function (HAR) {
a [timings](http://www.softwareishard.com/blog/har-12-spec/#timings) object
```js
-var validate = require('har-validator')
-
-validate.timings(data.then(function (HAR) {
- console.log('horray!')
- })
- .catch(function (error) {
- console.error(error)
- })
+validate.timings(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
```
----
diff --git a/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/index.js b/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/index.js
index ac6572cab..7834bf9b2 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/index.js
+++ b/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/index.js
@@ -7,5 +7,5 @@ module.exports = function (str) {
throw new TypeError('Expected a string');
}
- return str.replace(matchOperatorsRe, '\\$&');
+ return str.replace(matchOperatorsRe, '\\$&');
};
diff --git a/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json b/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json
index b2bafb26a..5811067ac 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json
+++ b/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json
@@ -1,61 +1,97 @@
{
- "name": "escape-string-regexp",
- "version": "1.0.3",
- "description": "Escape RegExp special characters",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/escape-string-regexp.git"
+ "_args": [
+ [
+ "escape-string-regexp@^1.0.2",
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator/node_modules/chalk"
+ ]
+ ],
+ "_from": "escape-string-regexp@>=1.0.2 <2.0.0",
+ "_id": "escape-string-regexp@1.0.4",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/request/har-validator/chalk/escape-string-regexp",
+ "_nodeVersion": "4.2.1",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "2.14.7",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "escape-string-regexp",
+ "raw": "escape-string-regexp@^1.0.2",
+ "rawSpec": "^1.0.2",
+ "scope": null,
+ "spec": ">=1.0.2 <2.0.0",
+ "type": "range"
},
+ "_requiredBy": [
+ "/request/har-validator/chalk"
+ ],
+ "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.4.tgz",
+ "_shasum": "b85e679b46f72d03fbbe8a3bf7259d535c21b62f",
+ "_shrinkwrap": null,
+ "_spec": "escape-string-regexp@^1.0.2",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator/node_modules/chalk",
"author": {
- "name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
+ "name": "Sindre Sorhus",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/escape-string-regexp/issues"
+ },
+ "dependencies": {},
+ "description": "Escape RegExp special characters",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "b85e679b46f72d03fbbe8a3bf7259d535c21b62f",
+ "tarball": "http://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.4.tgz"
},
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- {
- "name": "Joshua Appelman",
- "email": "jappelman@xebia.com",
- "url": "http://jbnicolai.com"
- }
- ],
"engines": {
"node": ">=0.8.0"
},
- "scripts": {
- "test": "mocha"
- },
"files": [
"index.js"
],
+ "gitHead": "e9ca6832a9506ca26402cb0e6dc95efcf35b0b97",
+ "homepage": "https://github.com/sindresorhus/escape-string-regexp",
"keywords": [
+ "characters",
+ "escape",
+ "expression",
+ "re",
"regex",
"regexp",
- "re",
"regular",
- "expression",
- "escape",
- "string",
- "str",
"special",
- "characters"
+ "str",
+ "string"
],
- "devDependencies": {
- "mocha": "*"
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ }
+ ],
+ "name": "escape-string-regexp",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/escape-string-regexp.git"
},
- "readme": "# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)\n\n> Escape RegExp special characters\n\n\n## Install\n\n```sh\n$ npm install --save escape-string-regexp\n```\n\n\n## Usage\n\n```js\nvar escapeStringRegexp = require('escape-string-regexp');\n\nvar escapedString = escapeStringRegexp('how much $ for a unicorn?');\n//=> how much \\$ for a unicorn\\?\n\nnew RegExp(escapedString);\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n",
- "readmeFilename": "readme.md",
- "bugs": {
- "url": "https://github.com/sindresorhus/escape-string-regexp/issues"
+ "scripts": {
+ "test": "xo && ava"
},
- "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme",
- "_id": "escape-string-regexp@1.0.3",
- "_shasum": "9e2d8b25bc2555c3336723750e03f099c2735bb5",
- "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz",
- "_from": "escape-string-regexp@>=1.0.2 <2.0.0"
+ "version": "1.0.4"
}
diff --git a/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/readme.md b/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/readme.md
index 808a963a8..87ac82d5e 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/readme.md
+++ b/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/readme.md
@@ -5,7 +5,7 @@
## Install
-```sh
+```
$ npm install --save escape-string-regexp
```
@@ -13,10 +13,10 @@ $ npm install --save escape-string-regexp
## Usage
```js
-var escapeStringRegexp = require('escape-string-regexp');
+const escapeStringRegexp = require('escape-string-regexp');
-var escapedString = escapeStringRegexp('how much $ for a unicorn?');
-//=> how much \$ for a unicorn\?
+const escapedString = escapeStringRegexp('how much $ for a unicorn?');
+//=> 'how much \$ for a unicorn\?'
new RegExp(escapedString);
```
diff --git a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/formats.js b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/formats.js
index 3038daea9..9cb8380bc 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/formats.js
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/formats.js
@@ -11,4 +11,4 @@ exports['alpha'] = /^[a-zA-Z]+$/
exports['alphanumeric'] = /^[a-zA-Z0-9]+$/
exports['style'] = /\s*(.+?):\s*([^;]+);?/g
exports['phone'] = /^\+(?:[0-9] ?){6,14}[0-9]$/
-exports['utc-millisec'] = /^[0-9]+(\.?[0-9]+)?$/
+exports['utc-millisec'] = /^[0-9]{1,15}\.?[0-9]{0,15}$/
diff --git a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json
index 837c529e6..5a7c28832 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json
@@ -1,38 +1,38 @@
{
"_args": [
[
- "is-my-json-valid@^2.12.3",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/har-validator"
+ "is-my-json-valid@^2.12.4",
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator"
]
],
- "_from": "is-my-json-valid@>=2.12.3 <3.0.0",
- "_id": "is-my-json-valid@2.12.3",
+ "_from": "is-my-json-valid@>=2.12.4 <3.0.0",
+ "_id": "is-my-json-valid@2.12.4",
"_inCache": true,
"_installable": true,
"_location": "/request/har-validator/is-my-json-valid",
- "_nodeVersion": "4.1.1",
+ "_nodeVersion": "4.2.3",
"_npmUser": {
"email": "mathiasbuus@gmail.com",
"name": "mafintosh"
},
- "_npmVersion": "2.14.4",
+ "_npmVersion": "2.14.7",
"_phantomChildren": {},
"_requested": {
"name": "is-my-json-valid",
- "raw": "is-my-json-valid@^2.12.3",
- "rawSpec": "^2.12.3",
+ "raw": "is-my-json-valid@^2.12.4",
+ "rawSpec": "^2.12.4",
"scope": null,
- "spec": ">=2.12.3 <3.0.0",
+ "spec": ">=2.12.4 <3.0.0",
"type": "range"
},
"_requiredBy": [
"/request/har-validator"
],
- "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.3.tgz",
- "_shasum": "5a39d1d76b2dbb83140bbd157b1d5ee4bdc85ad6",
+ "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.4.tgz",
+ "_shasum": "d4ed2bc1d7f88daf8d0f763b3e3e39a69bd37880",
"_shrinkwrap": null,
- "_spec": "is-my-json-valid@^2.12.3",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/har-validator",
+ "_spec": "is-my-json-valid@^2.12.4",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator",
"author": {
"name": "Mathias Buus"
},
@@ -51,10 +51,10 @@
},
"directories": {},
"dist": {
- "shasum": "5a39d1d76b2dbb83140bbd157b1d5ee4bdc85ad6",
- "tarball": "http://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.3.tgz"
+ "shasum": "d4ed2bc1d7f88daf8d0f763b3e3e39a69bd37880",
+ "tarball": "http://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.4.tgz"
},
- "gitHead": "822c5815f7ae4c50ed0c71451cb4dc3ea177be14",
+ "gitHead": "8978aa8f40eef4ac47a5d18270c13abd48927ddb",
"homepage": "https://github.com/mafintosh/is-my-json-valid",
"keywords": [
"json",
@@ -92,5 +92,5 @@
"scripts": {
"test": "tape test/*.js"
},
- "version": "2.12.3"
+ "version": "2.12.4"
}
diff --git a/node_modules/request/node_modules/har-validator/package.json b/node_modules/request/node_modules/har-validator/package.json
index a04e2467c..76f57480e 100644
--- a/node_modules/request/node_modules/har-validator/package.json
+++ b/node_modules/request/node_modules/har-validator/package.json
@@ -2,20 +2,20 @@
"_args": [
[
"har-validator@~2.0.2",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request"
+ "/Users/rebecca/code/npm/node_modules/request"
]
],
"_from": "har-validator@>=2.0.2 <2.1.0",
- "_id": "har-validator@2.0.3",
+ "_id": "har-validator@2.0.6",
"_inCache": true,
"_installable": true,
"_location": "/request/har-validator",
- "_nodeVersion": "4.1.2",
+ "_nodeVersion": "5.2.0",
"_npmUser": {
"email": "ahmad@ahmadnassri.com",
"name": "ahmadnassri"
},
- "_npmVersion": "2.14.4",
+ "_npmVersion": "3.3.12",
"_phantomChildren": {
"ansi-regex": "2.0.0",
"strip-ansi": "3.0.0"
@@ -31,11 +31,11 @@
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.3.tgz",
- "_shasum": "5a9e12564a571cf0b81ef93c2157bd1617168883",
+ "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
+ "_shasum": "cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d",
"_shrinkwrap": null,
"_spec": "har-validator@~2.0.2",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request",
+ "_where": "/Users/rebecca/code/npm/node_modules/request",
"author": {
"email": "ahmad@ahmadnassri.com",
"name": "Ahmad Nassri",
@@ -50,24 +50,23 @@
"dependencies": {
"chalk": "^1.1.1",
"commander": "^2.9.0",
- "is-my-json-valid": "^2.12.3",
+ "is-my-json-valid": "^2.12.4",
"pinkie-promise": "^2.0.0"
},
"description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema",
"devDependencies": {
- "codeclimate-test-reporter": "0.1.1",
- "echint": "^1.5.0",
- "istanbul": "^0.4.0",
+ "codeclimate-test-reporter": "0.2.1",
+ "echint": "^1.5.1",
+ "istanbul": "^0.4.2",
"mocha": "^2.3.4",
"require-directory": "^2.1.1",
- "should": "^7.1.1",
- "should-promised": "^0.3.1",
+ "should": "^8.1.1",
"standard": "^5.4.1"
},
"directories": {},
"dist": {
- "shasum": "5a9e12564a571cf0b81ef93c2157bd1617168883",
- "tarball": "http://registry.npmjs.org/har-validator/-/har-validator-2.0.3.tgz"
+ "shasum": "cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d",
+ "tarball": "http://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz"
},
"echint": {
"ignore": [
@@ -81,7 +80,7 @@
"bin",
"lib"
],
- "gitHead": "a71163c62b8786a41d503248fb60893598f3c26f",
+ "gitHead": "92ccddad2e5d13e6e32c764e06c347d67805b211",
"homepage": "https://github.com/ahmadnassri/har-validator",
"keywords": [
"archive",
@@ -112,5 +111,5 @@
"pretest": "standard && echint",
"test": "mocha"
},
- "version": "2.0.3"
+ "version": "2.0.6"
}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/.bin/sshpk-sign b/node_modules/request/node_modules/http-signature/node_modules/.bin/sshpk-sign
new file mode 120000
index 000000000..766b9b3a7
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/.bin/sshpk-sign
@@ -0,0 +1 @@
+../sshpk/bin/sshpk-sign \ No newline at end of file
diff --git a/node_modules/request/node_modules/http-signature/node_modules/.bin/sshpk-verify b/node_modules/request/node_modules/http-signature/node_modules/.bin/sshpk-verify
new file mode 120000
index 000000000..bfd7e3ade
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/.bin/sshpk-verify
@@ -0,0 +1 @@
+../sshpk/bin/sshpk-verify \ No newline at end of file
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/.npmignore b/node_modules/request/node_modules/http-signature/node_modules/sshpk/.npmignore
index a4261fc06..8000b595b 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/.npmignore
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/.npmignore
@@ -6,3 +6,4 @@ node_modules
test
tools
coverage
+man/src
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv b/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv
index b592af71a..8eec411ff 100755
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv
@@ -166,7 +166,7 @@ if (require.main === module) {
});
} else {
var kind = 'public';
- if (PrivateKey.isPrivateKey(key))
+ if (sshpk.PrivateKey.isPrivateKey(key))
kind = 'private';
console.log('%s: a %d bit %s %s key', inFileName,
key.size, key.type.toUpperCase(), kind);
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign b/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign
new file mode 100755
index 000000000..c8b91932a
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign
@@ -0,0 +1,176 @@
+#!/usr/bin/env node
+// -*- mode: js -*-
+// vim: set filetype=javascript :
+// Copyright 2015 Joyent, Inc. All rights reserved.
+
+var dashdash = require('dashdash');
+var sshpk = require('../lib/index');
+var fs = require('fs');
+var path = require('path');
+
+var options = [
+ {
+ names: ['hash', 'H'],
+ type: 'string',
+ help: 'Hash algorithm (sha1, sha256, sha384, sha512)'
+ },
+ {
+ names: ['verbose', 'v'],
+ type: 'bool',
+ help: 'Display verbose info about key and hash used'
+ },
+ {
+ names: ['identity', 'i'],
+ type: 'string',
+ help: 'Path to key to use'
+ },
+ {
+ names: ['file', 'f'],
+ type: 'string',
+ help: 'Input filename'
+ },
+ {
+ names: ['out', 'o'],
+ type: 'string',
+ help: 'Output filename'
+ },
+ {
+ names: ['format', 't'],
+ type: 'string',
+ help: 'Signature format (asn1, ssh, raw)'
+ },
+ {
+ names: ['binary', 'b'],
+ type: 'bool',
+ help: 'Output raw binary instead of base64'
+ },
+ {
+ names: ['help', 'h'],
+ type: 'bool',
+ help: 'Shows this help text'
+ }
+];
+
+if (require.main === module) {
+ var parser = dashdash.createParser({
+ options: options
+ });
+
+ try {
+ var opts = parser.parse(process.argv);
+ } catch (e) {
+ console.error('sshpk-sign: error: %s', e.message);
+ process.exit(1);
+ }
+
+ if (opts.help || opts._args.length > 1) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-sign: sign data using an SSH key\n');
+ console.error(help);
+ process.exit(1);
+ }
+
+ if (!opts.identity) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-sign: the -i or --identity option ' +
+ 'is required\n');
+ console.error(help);
+ process.exit(1);
+ }
+
+ var keyData = fs.readFileSync(opts.identity);
+
+ var key;
+ try {
+ key = sshpk.parsePrivateKey(keyData);
+ } catch (e) {
+ console.error('sshpk-sign: error loading private key "' +
+ opts.identity + '": ' + e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ var hash = opts.hash || key.defaultHashAlgorithm();
+
+ var signer;
+ try {
+ signer = key.createSign(hash);
+ } catch (e) {
+ console.error('sshpk-sign: error creating signer: ' +
+ e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ if (opts.verbose) {
+ console.error('sshpk-sign: using %s-%s with a %d bit key',
+ key.type, hash, key.size);
+ }
+
+ var inFile = process.stdin;
+ var inFileName = 'stdin';
+
+ var inFilePath;
+ if (opts.file) {
+ inFilePath = opts.file;
+ } else if (opts._args.length === 1) {
+ inFilePath = opts._args[0];
+ }
+
+ if (inFilePath)
+ inFileName = path.basename(inFilePath);
+
+ try {
+ if (inFilePath) {
+ fs.accessSync(inFilePath, fs.R_OK);
+ inFile = fs.createReadStream(inFilePath);
+ }
+ } catch (e) {
+ console.error('sshpk-sign: error opening input file' +
+ ': ' + e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ var outFile = process.stdout;
+
+ try {
+ if (opts.out && !opts.identify) {
+ fs.accessSync(path.dirname(opts.out), fs.W_OK);
+ outFile = fs.createWriteStream(opts.out);
+ }
+ } catch (e) {
+ console.error('sshpk-sign: error opening output file' +
+ ': ' + e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ inFile.pipe(signer);
+ inFile.on('end', function () {
+ var sig;
+ try {
+ sig = signer.sign();
+ } catch (e) {
+ console.error('sshpk-sign: error signing data: ' +
+ e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ var fmt = opts.format || 'asn1';
+ var output;
+ try {
+ output = sig.toBuffer(fmt);
+ if (!opts.binary)
+ output = output.toString('base64');
+ } catch (e) {
+ console.error('sshpk-sign: error converting signature' +
+ ' to ' + fmt + ' format: ' + e.name + ': ' +
+ e.message);
+ process.exit(1);
+ }
+
+ outFile.write(output);
+ if (!opts.binary)
+ outFile.write('\n');
+ outFile.once('drain', function () {
+ process.exit(0);
+ });
+ });
+}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-verify b/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-verify
new file mode 100755
index 000000000..a1669f409
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-verify
@@ -0,0 +1,166 @@
+#!/usr/bin/env node
+// -*- mode: js -*-
+// vim: set filetype=javascript :
+// Copyright 2015 Joyent, Inc. All rights reserved.
+
+var dashdash = require('dashdash');
+var sshpk = require('../lib/index');
+var fs = require('fs');
+var path = require('path');
+
+var options = [
+ {
+ names: ['hash', 'H'],
+ type: 'string',
+ help: 'Hash algorithm (sha1, sha256, sha384, sha512)'
+ },
+ {
+ names: ['verbose', 'v'],
+ type: 'bool',
+ help: 'Display verbose info about key and hash used'
+ },
+ {
+ names: ['identity', 'i'],
+ type: 'string',
+ help: 'Path to (public) key to use'
+ },
+ {
+ names: ['file', 'f'],
+ type: 'string',
+ help: 'Input filename'
+ },
+ {
+ names: ['format', 't'],
+ type: 'string',
+ help: 'Signature format (asn1, ssh, raw)'
+ },
+ {
+ names: ['signature', 's'],
+ type: 'string',
+ help: 'base64-encoded signature data'
+ },
+ {
+ names: ['help', 'h'],
+ type: 'bool',
+ help: 'Shows this help text'
+ }
+];
+
+if (require.main === module) {
+ var parser = dashdash.createParser({
+ options: options
+ });
+
+ try {
+ var opts = parser.parse(process.argv);
+ } catch (e) {
+ console.error('sshpk-verify: error: %s', e.message);
+ process.exit(3);
+ }
+
+ if (opts.help || opts._args.length > 1) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-verify: sign data using an SSH key\n');
+ console.error(help);
+ process.exit(3);
+ }
+
+ if (!opts.identity) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-verify: the -i or --identity option ' +
+ 'is required\n');
+ console.error(help);
+ process.exit(3);
+ }
+
+ if (!opts.signature) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-verify: the -s or --signature option ' +
+ 'is required\n');
+ console.error(help);
+ process.exit(3);
+ }
+
+ var keyData = fs.readFileSync(opts.identity);
+
+ var key;
+ try {
+ key = sshpk.parseKey(keyData);
+ } catch (e) {
+ console.error('sshpk-verify: error loading key "' +
+ opts.identity + '": ' + e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ var fmt = opts.format || 'asn1';
+ var sigData = new Buffer(opts.signature, 'base64');
+
+ var sig;
+ try {
+ sig = sshpk.parseSignature(sigData, key.type, fmt);
+ } catch (e) {
+ console.error('sshpk-verify: error parsing signature: ' +
+ e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ var hash = opts.hash || key.defaultHashAlgorithm();
+
+ var verifier;
+ try {
+ verifier = key.createVerify(hash);
+ } catch (e) {
+ console.error('sshpk-verify: error creating verifier: ' +
+ e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ if (opts.verbose) {
+ console.error('sshpk-verify: using %s-%s with a %d bit key',
+ key.type, hash, key.size);
+ }
+
+ var inFile = process.stdin;
+ var inFileName = 'stdin';
+
+ var inFilePath;
+ if (opts.file) {
+ inFilePath = opts.file;
+ } else if (opts._args.length === 1) {
+ inFilePath = opts._args[0];
+ }
+
+ if (inFilePath)
+ inFileName = path.basename(inFilePath);
+
+ try {
+ if (inFilePath) {
+ fs.accessSync(inFilePath, fs.R_OK);
+ inFile = fs.createReadStream(inFilePath);
+ }
+ } catch (e) {
+ console.error('sshpk-verify: error opening input file' +
+ ': ' + e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ inFile.pipe(verifier);
+ inFile.on('end', function () {
+ var ret;
+ try {
+ ret = verifier.verify(sig);
+ } catch (e) {
+ console.error('sshpk-verify: error verifying data: ' +
+ e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ if (ret) {
+ console.error('OK');
+ process.exit(0);
+ }
+
+ console.error('NOT OK');
+ process.exit(1);
+ });
+}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ed-compat.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ed-compat.js
index ad46339b9..5365fb140 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ed-compat.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ed-compat.js
@@ -40,6 +40,8 @@ Verifier.prototype.update = function (chunk) {
Verifier.prototype.verify = function (signature, fmt) {
var sig;
if (Signature.isSignature(signature, [2, 0])) {
+ if (signature.type !== 'ed25519')
+ return (false);
sig = signature.toBuffer('raw');
} else if (typeof (signature) === 'string') {
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js
index 0a841b962..d140f0e54 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js
@@ -175,8 +175,14 @@ Key.prototype.createVerify = function (hashAlgo) {
assert.ok(v, 'failed to create verifier');
var oldVerify = v.verify.bind(v);
var key = this.toBuffer('pkcs8');
+ var self = this;
v.verify = function (signature, fmt) {
if (Signature.isSignature(signature, [2, 0])) {
+ if (signature.type !== self.type)
+ return (false);
+ if (signature.hashAlgorithm &&
+ signature.hashAlgorithm !== hashAlgo)
+ return (false);
return (oldVerify(key, signature.toBuffer('asn1')));
} else if (typeof (signature) === 'string' ||
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js
index c22c8a3f3..0b0027734 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js
@@ -45,7 +45,8 @@ SSHBuffer.prototype.readBuffer = function () {
var len = this._buffer.readUInt32BE(this._offset);
this._offset += 4;
assert.ok(this._offset + len <= this._buffer.length,
- 'length out of bounds at +0x' + this._offset.toString(16));
+ 'length out of bounds at +0x' + this._offset.toString(16) +
+ ' (data truncated?)');
var buf = this._buffer.slice(this._offset, this._offset + len);
this._offset += len;
return (buf);
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-conv.1 b/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-conv.1
new file mode 100644
index 000000000..0887dce27
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-conv.1
@@ -0,0 +1,135 @@
+.TH sshpk\-conv 1 "Jan 2016" sshpk "sshpk Commands"
+.SH NAME
+.PP
+sshpk\-conv \- convert between key formats
+.SH SYNOPSYS
+.PP
+\fB\fCsshpk\-conv\fR \-t FORMAT [FILENAME] [OPTIONS...]
+.PP
+\fB\fCsshpk\-conv\fR \-i [FILENAME] [OPTIONS...]
+.SH DESCRIPTION
+.PP
+Reads in a public or private key and converts it between different formats,
+particularly formats used in the SSH protocol and the well\-known PEM PKCS#1/7
+formats.
+.PP
+In the second form, with the \fB\fC\-i\fR option given, identifies a key and prints to
+stderr information about its nature, size and fingerprint.
+.SH EXAMPLES
+.PP
+Assume the following SSH\-format public key in \fB\fCid_ecdsa.pub\fR:
+.PP
+.RS
+.nf
+ecdsa\-sha2\-nistp256 AAAAE2VjZHNhLXNoYTI...9M/4c4= user@host
+.fi
+.RE
+.PP
+Identify it with \fB\fC\-i\fR:
+.PP
+.RS
+.nf
+$ sshpk\-conv \-i id_ecdsa.pub
+id_ecdsa: a 256 bit ECDSA public key
+ECDSA curve: nistp256
+Comment: user@host
+Fingerprint:
+ SHA256:vCNX7eUkdvqqW0m4PoxQAZRv+CM4P4fS8+CbliAvS4k
+ 81:ad:d5:57:e5:6f:7d:a2:93:79:56:af:d7:c0:38:51
+.fi
+.RE
+.PP
+Convert it to \fB\fCpkcs8\fR format, for use with e.g. OpenSSL:
+.PP
+.RS
+.nf
+$ sshpk\-conv \-t pkcs8 id_ecdsa
+\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-
+MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAsA4R6N6AS3gzaPBeLjG2ObSgUsR
+zOt+kWJoijLnw3ZMYUKmAx+lD0I5XUxdrPcs1vH5f3cn9TvRvO9L0z/hzg==
+\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
+.fi
+.RE
+.PP
+Retrieve the public half of a private key:
+.PP
+.RS
+.nf
+$ openssl genrsa 2048 | sshpk\-conv \-t ssh \-c foo@bar
+ssh\-rsa AAAAB3NzaC1yc2EAAA...koK7 foo@bar
+.fi
+.RE
+.PP
+Convert a private key to PKCS#1 (OpenSSL) format from a new\-style OpenSSH key
+format (the \fB\fCssh\-keygen \-o\fR format):
+.PP
+.RS
+.nf
+$ ssh\-keygen \-o \-f foobar
+\&...
+$ sshpk\-conv \-p \-t pkcs1 foobar
+\-\-\-\-\-BEGIN RSA PRIVATE KEY\-\-\-\-\-
+MIIDpAIBAAKCAQEA6T/GYJndb1TRH3+NL....
+\-\-\-\-\-END RSA PRIVATE KEY\-\-\-\-\-
+.fi
+.RE
+.SH OPTIONS
+.TP
+\fB\fC\-i, \-\-identify\fR
+Instead of converting the key, output identifying information about it to
+stderr, including its type, size and fingerprints.
+.TP
+\fB\fC\-p, \-\-private\fR
+Treat the key as a private key instead of a public key (the default). If you
+supply \fB\fCsshpk\-conv\fR with a private key and do not give this option, it will
+extract only the public half of the key from it and work with that.
+.TP
+\fB\fC\-f PATH, \-\-file=PATH\fR
+Input file to take the key from instead of stdin. If a filename is supplied
+as a positional argument, it is equivalent to using this option.
+.TP
+\fB\fC\-o PATH, \-\-out=PATH\fR
+Output file name to use instead of stdout.
+.PP
+\fB\fC\-T FORMAT, \-\-informat=FORMAT\fR
+.TP
+\fB\fC\-t FORMAT, \-\-outformat=FORMAT\fR
+Selects the input and output formats to be used (see FORMATS, below).
+.TP
+\fB\fC\-c TEXT, \-\-comment=TEXT\fR
+Sets the key comment for the output file, if supported.
+.SH FORMATS
+.PP
+Currently supported formats:
+.TP
+\fB\fCpem, pkcs1\fR
+The standard PEM format used by older OpenSSH and most TLS libraries such as
+OpenSSL. The classic \fB\fCid_rsa\fR file is usually in this format. It is an ASN.1
+encoded structure, base64\-encoded and placed between PEM headers.
+.TP
+\fB\fCssh\fR
+The SSH public key text format (the format of an \fB\fCid_rsa.pub\fR file). A single
+line, containing 3 space separated parts: the key type, key body and optional
+key comment.
+.TP
+\fB\fCpkcs8\fR
+A newer PEM format, usually used only for public keys by TLS libraries such
+as OpenSSL. The ASN.1 structure is more generic than that of \fB\fCpkcs1\fR\&.
+.TP
+\fB\fCopenssh\fR
+The new \fB\fCssh\-keygen \-o\fR format from OpenSSH. This can be mistaken for a PEM
+encoding but is actually an OpenSSH internal format.
+.TP
+\fB\fCrfc4253\fR
+The internal binary format of keys when sent over the wire in the SSH
+protocol. This is also the format that the \fB\fCssh\-agent\fR uses in its protocol.
+.SH SEE ALSO
+.PP
+.BR ssh-keygen (1),
+.BR openssl (1)
+.SH BUGS
+.PP
+Encrypted (password\-protected) keys are not supported.
+.PP
+Report bugs at Github
+\[la]https://github.com/arekinath/node-sshpk/issues\[ra]
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-sign.1 b/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-sign.1
new file mode 100644
index 000000000..749916ba8
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-sign.1
@@ -0,0 +1,81 @@
+.TH sshpk\-sign 1 "Jan 2016" sshpk "sshpk Commands"
+.SH NAME
+.PP
+sshpk\-sign \- sign data using an SSH key
+.SH SYNOPSYS
+.PP
+\fB\fCsshpk\-sign\fR \-i KEYPATH [OPTION...]
+.SH DESCRIPTION
+.PP
+Takes in arbitrary bytes, and signs them using an SSH private key. The key can
+be of any type or format supported by the \fB\fCsshpk\fR library, including the
+standard OpenSSH formats, as well as PEM PKCS#1 and PKCS#8.
+.PP
+The signature is printed out in Base64 encoding, unless the \fB\fC\-\-binary\fR or \fB\fC\-b\fR
+option is given.
+.SH EXAMPLES
+.PP
+Signing with default settings:
+.PP
+.RS
+.nf
+$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa
+MEUCIAMdLS/vXrrtWFepwe...
+.fi
+.RE
+.PP
+Signing in SSH (RFC 4253) format (rather than the default ASN.1):
+.PP
+.RS
+.nf
+$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \-t ssh
+AAAAFGVjZHNhLXNoYTIt...
+.fi
+.RE
+.PP
+Saving the binary signature to a file:
+.PP
+.RS
+.nf
+$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \\
+ \-o signature.bin \-b
+$ cat signature.bin | base64
+MEUCIAMdLS/vXrrtWFepwe...
+.fi
+.RE
+.SH OPTIONS
+.TP
+\fB\fC\-v, \-\-verbose\fR
+Print extra information about the key and signature to stderr when signing.
+.TP
+\fB\fC\-b, \-\-binary\fR
+Don't base64\-encode the signature before outputting it.
+.TP
+\fB\fC\-i KEY, \-\-identity=KEY\fR
+Select the key to be used for signing. \fB\fCKEY\fR must be a relative or absolute
+filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR library
+is supported, including OpenSSH formats and standard PEM PKCS.
+.TP
+\fB\fC\-f PATH, \-\-file=PATH\fR
+Input file to sign instead of stdin.
+.TP
+\fB\fC\-o PATH, \-\-out=PATH\fR
+Output file to save signature in instead of stdout.
+.TP
+\fB\fC\-H HASH, \-\-hash=HASH\fR
+Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR,
+\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash
+algorithms may be used (e.g. ED25519 keys can only use SHA\-512).
+.TP
+\fB\fC\-t FORMAT, \-\-format=FORMAT\fR
+Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for
+ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format
+used with TLS and typically the standard in most non\-SSH libraries (e.g.
+OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent.
+.SH SEE ALSO
+.PP
+.BR sshpk-verify (1)
+.SH BUGS
+.PP
+Report bugs at Github
+\[la]https://github.com/arekinath/node-sshpk/issues\[ra]
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-verify.1 b/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-verify.1
new file mode 100644
index 000000000..f79169d27
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-verify.1
@@ -0,0 +1,68 @@
+.TH sshpk\-verify 1 "Jan 2016" sshpk "sshpk Commands"
+.SH NAME
+.PP
+sshpk\-verify \- verify a signature on data using an SSH key
+.SH SYNOPSYS
+.PP
+\fB\fCsshpk\-verify\fR \-i KEYPATH \-s SIGNATURE [OPTION...]
+.SH DESCRIPTION
+.PP
+Takes in arbitrary bytes and a Base64\-encoded signature, and verifies that the
+signature was produced by the private half of the given SSH public key.
+.SH EXAMPLES
+.PP
+.RS
+.nf
+$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s MEUCIQCYp...
+OK
+$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s GARBAGE...
+NOT OK
+.fi
+.RE
+.SH EXIT STATUS
+.TP
+\fB\fC0\fR
+Signature validates and matches the key.
+.TP
+\fB\fC1\fR
+Signature is parseable and the correct length but does not match the key or
+otherwise is invalid.
+.TP
+\fB\fC2\fR
+The signature or key could not be parsed.
+.TP
+\fB\fC3\fR
+Invalid commandline options were supplied.
+.SH OPTIONS
+.TP
+\fB\fC\-v, \-\-verbose\fR
+Print extra information about the key and signature to stderr when verifying.
+.TP
+\fB\fC\-i KEY, \-\-identity=KEY\fR
+Select the key to be used for verification. \fB\fCKEY\fR must be a relative or
+absolute filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR
+library is supported, including OpenSSH formats and standard PEM PKCS.
+.TP
+\fB\fC\-s BASE64, \-\-signature=BASE64\fR
+Supplies the base64\-encoded signature to be verified.
+.TP
+\fB\fC\-f PATH, \-\-file=PATH\fR
+Input file to verify instead of stdin.
+.TP
+\fB\fC\-H HASH, \-\-hash=HASH\fR
+Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR,
+\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash
+algorithms may be used (e.g. ED25519 keys can only use SHA\-512).
+.TP
+\fB\fC\-t FORMAT, \-\-format=FORMAT\fR
+Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for
+ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format
+used with TLS and typically the standard in most non\-SSH libraries (e.g.
+OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent.
+.SH SEE ALSO
+.PP
+.BR sshpk-sign (1)
+.SH BUGS
+.PP
+Report bugs at Github
+\[la]https://github.com/arekinath/node-sshpk/issues\[ra]
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/README.md b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/README.md
index fdbe5f42a..e47b106e6 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/README.md
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/README.md
@@ -232,6 +232,52 @@ variable can also be included in **help output**:
-f FILE, --file=FILE File to process
+# Bash completion
+
+Dashdash provides a simple way to create a Bash completion file that you
+can place in your "bash_completion.d" directory -- sometimes that is
+"/usr/local/etc/bash_completion.d/"). Features:
+
+- Support for short and long opts
+- Support for knowing which options take arguments
+- Support for subcommands (e.g. 'git log <TAB>' to show just options for the
+ log subcommand). See
+ [node-cmdln](https://github.com/trentm/node-cmdln#bash-completion) for
+ how to integrate that.
+- Does the right thing with "--" to stop options.
+- Custom optarg and arg types for custom completions.
+
+Dashdash will return bash completion file content given a parser instance:
+
+ var parser = dashdash.createParser({options: options});
+ console.log( parser.bashCompletion({name: 'mycli'}) );
+
+or directly from a `options` array of options specs:
+
+ var code = dashdash.bashCompletionFromOptions({
+ name: 'mycli',
+ options: OPTIONS
+ });
+
+Write that content to "/usr/local/etc/bash_completion.d/mycli" and you will
+have Bash completions for `mycli`. Alternatively you can write it to
+any file (e.g. "~/.bashrc") and source it.
+
+You could add a `--completion` hidden option to your tool that emits the
+completion content and document for your users to call that to install
+Bash completions.
+
+See [examples/ddcompletion.js](examples/ddcompletion.js) for a complete
+example, including how one can define bash functions for completion of custom
+option types. Also see [node-cmdln](https://github.com/trentm/node-cmdln) for
+how it uses this for Bash completion for full multi-subcommand tools.
+
+- TODO: document specExtra
+- TODO: document includeHidden
+- TODO: document custom types, `function complete\_FOO` guide, completionType
+- TODO: document argtypes
+
+
# Parser config
Parser construction (i.e. `dashdash.createParser(CONFIG)`) takes the
@@ -279,12 +325,13 @@ following fields:
# Option specs
-Example using all fields:
+Example using all fields (required fields are noted):
```javascript
{
- names: ['file', 'f'], // Required (or `name`).
+ names: ['file', 'f'], // Required (one of `names` or `name`).
type: 'string', // Required.
+ completionType: 'filename',
env: 'MYTOOL_FILE',
help: 'Config file to load before running "mytool"',
helpArg: 'PATH',
@@ -320,6 +367,20 @@ Each option spec in the `options` array must/can have the following fields:
You can add your own custom option types with `dashdash.addOptionType`.
See below.
+- `completionType` (String). Optional. This is used for [Bash
+ completion](#bash-completion) for an option argument. If not specified,
+ then the value of `type` is used. Any string may be specified, but only the
+ following values have meaning:
+
+ - `none`: Provide no completions.
+ - `file`: Bash's default completion (i.e. `complete -o default`), which
+ includes filenames.
+ - *Any string FOO for which a `function complete_FOO` Bash function is
+ defined.* This is for custom completions for a given tool. Typically
+ these custom functions are provided in the `specExtra` argument to
+ `dashdash.bashCompletionFromOptions()`. See
+ ["examples/ddcompletion.js"](examples/ddcompletion.js) for an example.
+
- `env` (String or Array of String). Optional. An environment variable name
(or names) that can be used as a fallback for this option. For example,
given a "foo.js" like this:
@@ -349,7 +410,8 @@ Each option spec in the `options` array must/can have the following fields:
option isn't specified in argv.
- `hidden` (Boolean). Optional, default false. If true, help output will not
- include this option.
+ include this option. See also the `includeHidden` option to
+ `bashCompletionFromOptions()` for [Bash completion](#bash-completion).
# Option group headings
@@ -423,7 +485,7 @@ The `parser.help(...)` function is configurable as follows:
# Custom option types
Dashdash includes a good starter set of option types that it will parse for
-you. However you can add your own via:
+you. However, you can add your own via:
var dashdash = require('dashdash');
dashdash.addOptionType({
@@ -433,7 +495,10 @@ you. However you can add your own via:
parseArg: function (option, optstr, arg) {
...
},
- default: ... // optional
+ array: false, // optional
+ arrayFlatten: false, // optional
+ default: ..., // optional
+ completionType: ... // optional
});
For example, a simple option type that accepts 'yes', 'y', 'no' or 'n' as
@@ -466,10 +531,11 @@ a boolean argument would look like:
};
var opts = dashdash.parse({options: options});
-See "examples/custom-option-duration.js" for another example adding a "duration"
-option type. Please let me know [on twitter](https://twitter.com/trentmick)
-or [with an issue](https://github.com/trentm/node-dashdash/issues/new) if you
-write a generally useful one.
+See "examples/custom-option-\*.js" for other examples.
+See the `addOptionType` block comment in "lib/dashdash.js" for more details.
+Please let me know [with an
+issue](https://github.com/trentm/node-dashdash/issues/new) if you write a
+generally useful one.
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/etc/dashdash.bash_completion.in b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/etc/dashdash.bash_completion.in
new file mode 100644
index 000000000..50b7d6e0e
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/etc/dashdash.bash_completion.in
@@ -0,0 +1,388 @@
+#!/bin/bash
+#
+# Bash completion generated for '{{name}}' at {{date}}.
+#
+# The original template lives here:
+# https://github.com/trentm/node-dashdash/blob/master/etc/dashdash.bash_completion.in
+#
+
+#
+# Copyright 2016 Trent Mick
+# Copyright 2016 Joyent, Inc.
+#
+#
+# A generic Bash completion driver script.
+#
+# This is meant to provide a re-usable chunk of Bash to use for
+# "etc/bash_completion.d/" files for individual tools. Only the "Configuration"
+# section with tool-specific info need differ. Features:
+#
+# - support for short and long opts
+# - support for knowing which options take arguments
+# - support for subcommands (e.g. 'git log <TAB>' to show just options for the
+# log subcommand)
+# - does the right thing with "--" to stop options
+# - custom optarg and arg types for custom completions
+# - (TODO) support for shells other than Bash (tcsh, zsh, fish?, etc.)
+#
+#
+# Examples/design:
+#
+# 1. Bash "default" completion. By default Bash's 'complete -o default' is
+# enabled. That means when there are no completions (e.g. if no opts match
+# the current word), then you'll get Bash's default completion. Most notably
+# that means you get filename completion. E.g.:
+# $ tool ./<TAB>
+# $ tool READ<TAB>
+#
+# 2. all opts and subcmds:
+# $ tool <TAB>
+# $ tool -v <TAB> # assuming '-v' doesn't take an arg
+# $ tool -<TAB> # matching opts
+# $ git lo<TAB> # matching subcmds
+#
+# Long opt completions are given *without* the '=', i.e. we prefer space
+# separated because that's easier for good completions.
+#
+# 3. long opt arg with '='
+# $ tool --file=<TAB>
+# $ tool --file=./d<TAB>
+# We maintain the "--file=" prefix. Limitation: With the attached prefix
+# the 'complete -o filenames' doesn't know to do dirname '/' suffixing. Meh.
+#
+# 4. envvars:
+# $ tool $<TAB>
+# $ tool $P<TAB>
+# Limitation: Currently only getting exported vars, so we miss "PS1" and
+# others.
+#
+# 5. Defer to other completion in a subshell:
+# $ tool --file $(cat ./<TAB>
+# We get this from 'complete -o default ...'.
+#
+# 6. Custom completion types from a provided bash function.
+# $ tool --profile <TAB> # complete available "profiles"
+#
+#
+# Dev Notes:
+# - compgen notes, from http://unix.stackexchange.com/questions/151118/understand-compgen-builtin-command
+# - https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion-Builtins.html
+#
+
+
+# Debugging this completion:
+# 1. Uncomment the "_{{name}}_log_file=..." line.
+# 2. 'tail -f /var/tmp/dashdash-completion.log' in one terminal.
+# 3. Re-source this bash completion file.
+#_{{name}}_log=/var/tmp/dashdash-completion.log
+
+function _{{name}}_completer {
+
+ # ---- cmd definition
+
+ {{spec}}
+
+
+ # ---- locals
+
+ declare -a argv
+
+
+ # ---- support functions
+
+ function trace {
+ [[ -n "$_{{name}}_log" ]] && echo "$*" >&2
+ }
+
+ function _dashdash_complete {
+ local idx context
+ idx=$1
+ context=$2
+
+ local shortopts longopts optargs subcmds allsubcmds argtypes
+ shortopts="$(eval "echo \${cmd${context}_shortopts}")"
+ longopts="$(eval "echo \${cmd${context}_longopts}")"
+ optargs="$(eval "echo \${cmd${context}_optargs}")"
+ subcmds="$(eval "echo \${cmd${context}_subcmds}")"
+ allsubcmds="$(eval "echo \${cmd${context}_allsubcmds}")"
+ IFS=', ' read -r -a argtypes <<< "$(eval "echo \${cmd${context}_argtypes}")"
+
+ trace ""
+ trace "_dashdash_complete(idx=$idx, context=$context)"
+ trace " shortopts: $shortopts"
+ trace " longopts: $longopts"
+ trace " optargs: $optargs"
+ trace " subcmds: $subcmds"
+ trace " allsubcmds: $allsubcmds"
+
+ # Get 'state' of option parsing at this COMP_POINT.
+ # Copying "dashdash.js#parse()" behaviour here.
+ local state=
+ local nargs=0
+ local i=$idx
+ local argtype
+ local optname
+ local prefix
+ local word
+ local dashdashseen=
+ while [[ $i -lt $len && $i -le $COMP_CWORD ]]; do
+ argtype=
+ optname=
+ prefix=
+ word=
+
+ arg=${argv[$i]}
+ trace " consider argv[$i]: '$arg'"
+
+ if [[ "$arg" == "--" && $i -lt $COMP_CWORD ]]; then
+ trace " dashdash seen"
+ dashdashseen=yes
+ state=arg
+ word=$arg
+ elif [[ -z "$dashdashseen" && "${arg:0:2}" == "--" ]]; then
+ arg=${arg:2}
+ if [[ "$arg" == *"="* ]]; then
+ optname=${arg%%=*}
+ val=${arg##*=}
+ trace " long opt: optname='$optname' val='$val'"
+ state=arg
+ argtype=$(echo "$optargs" | awk -F "-$optname=" '{print $2}' | cut -d' ' -f1)
+ word=$val
+ prefix="--$optname="
+ else
+ optname=$arg
+ val=
+ trace " long opt: optname='$optname'"
+ state=longopt
+ word=--$optname
+
+ if [[ "$optargs" == *"-$optname="* && $i -lt $COMP_CWORD ]]; then
+ i=$(( $i + 1 ))
+ state=arg
+ argtype=$(echo "$optargs" | awk -F "-$optname=" '{print $2}' | cut -d' ' -f1)
+ word=${argv[$i]}
+ trace " takes arg (consume argv[$i], word='$word')"
+ fi
+ fi
+ elif [[ -z "$dashdashseen" && "${arg:0:1}" == "-" ]]; then
+ trace " short opt group"
+ state=shortopt
+ word=$arg
+
+ local j=1
+ while [[ $j -lt ${#arg} ]]; do
+ optname=${arg:$j:1}
+ trace " consider index $j: optname '$optname'"
+
+ if [[ "$optargs" == *"-$optname="* ]]; then
+ argtype=$(echo "$optargs" | awk -F "-$optname=" '{print $2}' | cut -d' ' -f1)
+ if [[ $(( $j + 1 )) -lt ${#arg} ]]; then
+ state=arg
+ word=${arg:$(( $j + 1 ))}
+ trace " takes arg (rest of this arg, word='$word', argtype='$argtype')"
+ elif [[ $i -lt $COMP_CWORD ]]; then
+ state=arg
+ i=$(( $i + 1 ))
+ word=${argv[$i]}
+ trace " takes arg (word='$word', argtype='$argtype')"
+ fi
+ break
+ fi
+
+ j=$(( $j + 1 ))
+ done
+ elif [[ $i -lt $COMP_CWORD && -n "$arg" ]] && $(echo "$allsubcmds" | grep -w "$arg" >/dev/null); then
+ trace " complete subcmd: recurse _dashdash_complete"
+ _dashdash_complete $(( $i + 1 )) "${context}__${arg/-/_}"
+ return
+ else
+ trace " not an opt or a complete subcmd"
+ state=arg
+ word=$arg
+ nargs=$(( $nargs + 1 ))
+ if [[ ${#argtypes[@]} -gt 0 ]]; then
+ argtype="${argtypes[$(( $nargs - 1 ))]}"
+ if [[ -z "$argtype" ]]; then
+ # If we have more args than argtypes, we use the
+ # last type.
+ argtype="${argtypes[@]: -1:1}"
+ fi
+ fi
+ fi
+
+ trace " state=$state prefix='$prefix' word='$word'"
+ i=$(( $i + 1 ))
+ done
+
+ trace " parsed: state=$state optname='$optname' argtype='$argtype' prefix='$prefix' word='$word' dashdashseen=$dashdashseen"
+ local compgen_opts=
+ if [[ -n "$prefix" ]]; then
+ compgen_opts="$compgen_opts -P $prefix"
+ fi
+
+ case $state in
+ shortopt)
+ compgen $compgen_opts -W "$shortopts $longopts" -- "$word"
+ ;;
+ longopt)
+ compgen $compgen_opts -W "$longopts" -- "$word"
+ ;;
+ arg)
+ # If we don't know what completion to do, then emit nothing. We
+ # expect that we are running with:
+ # complete -o default ...
+ # where "default" means: "Use Readline's default completion if
+ # the compspec generates no matches." This gives us the good filename
+ # completion, completion in subshells/backticks.
+ #
+ # We cannot support an argtype="directory" because
+ # compgen -S '/' -A directory -- "$word"
+ # doesn't give a satisfying result. It doesn't stop at the trailing '/'
+ # so you cannot descend into dirs.
+ if [[ "${word:0:1}" == '$' ]]; then
+ # By default, Bash will complete '$<TAB>' to all envvars. Apparently
+ # 'complete -o default' does *not* give us that. The following
+ # gets *close* to the same completions: '-A export' misses envvars
+ # like "PS1".
+ trace " completing envvars"
+ compgen $compgen_opts -P '$' -A export -- "${word:1}"
+ elif [[ -z "$argtype" ]]; then
+ # Only include opts in completions if $word is not empty.
+ # This is to avoid completing the leading '-', which foils
+ # using 'default' completion.
+ if [[ -n "$dashdashseen" ]]; then
+ trace " completing subcmds, if any (no argtype, dashdash seen)"
+ compgen $compgen_opts -W "$subcmds" -- "$word"
+ elif [[ -z "$word" ]]; then
+ trace " completing subcmds, if any (no argtype, empty word)"
+ compgen $compgen_opts -W "$subcmds" -- "$word"
+ else
+ trace " completing opts & subcmds (no argtype)"
+ compgen $compgen_opts -W "$shortopts $longopts $subcmds" -- "$word"
+ fi
+ elif [[ $argtype == "none" ]]; then
+ # We want *no* completions, i.e. some way to get the active
+ # 'complete -o default' to not do filename completion.
+ trace " completing 'none' (hack to imply no completions)"
+ echo "##-no completions-##"
+ elif [[ $argtype == "file" ]]; then
+ # 'complete -o default' gives the best filename completion, at least
+ # on Mac.
+ trace " completing 'file' (let 'complete -o default' handle it)"
+ echo ""
+ elif ! type complete_$argtype 2>/dev/null >/dev/null; then
+ trace " completing '$argtype' (fallback to default b/c complete_$argtype is unknown)"
+ echo ""
+ else
+ trace " completing custom '$argtype'"
+ completions=$(complete_$argtype "$word")
+ if [[ -z "$completions" ]]; then
+ trace " no custom '$argtype' completions"
+ # These are in alpha order so they show up correctly.
+ echo "##-no -$argtype- completions-##"
+ else
+ echo $completions
+ fi
+ fi
+ ;;
+ *)
+ trace " unknown state: $state"
+ ;;
+ esac
+ }
+
+
+ trace ""
+ trace "-- $(date)"
+ #trace "\$IFS: '$IFS'"
+ #trace "\$@: '$@'"
+ #trace "COMP_WORDBREAKS: '$COMP_WORDBREAKS'"
+ trace "COMP_CWORD: '$COMP_CWORD'"
+ trace "COMP_LINE: '$COMP_LINE'"
+ trace "COMP_POINT: $COMP_POINT"
+
+ # Guard against negative COMP_CWORD. This is a Bash bug at least on
+ # Mac 10.10.4's bash. See
+ # <https://lists.gnu.org/archive/html/bug-bash/2009-07/msg00125.html>.
+ if [[ $COMP_CWORD -lt 0 ]]; then
+ trace "abort on negative COMP_CWORD"
+ exit 1;
+ fi
+
+ # I don't know how to do array manip on argv vars,
+ # so copy over to argv array to work on them.
+ shift # the leading '--'
+ i=0
+ len=$#
+ while [[ $# -gt 0 ]]; do
+ argv[$i]=$1
+ shift;
+ i=$(( $i + 1 ))
+ done
+ trace "argv: '${argv[@]}'"
+ trace "argv[COMP_CWORD-1]: '${argv[$(( $COMP_CWORD - 1 ))]}'"
+ trace "argv[COMP_CWORD]: '${argv[$COMP_CWORD]}'"
+ trace "argv len: '$len'"
+
+ _dashdash_complete 1 ""
+}
+
+
+# ---- mainline
+
+# Note: This if-block to help work with 'compdef' and 'compctl' is
+# adapted from 'npm completion'.
+if type complete &>/dev/null; then
+ function _{{name}}_completion {
+ local _log_file=/dev/null
+ [[ -z "$_{{name}}_log" ]] || _log_file="$_{{name}}_log"
+ COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
+ COMP_LINE="$COMP_LINE" \
+ COMP_POINT="$COMP_POINT" \
+ _{{name}}_completer -- "${COMP_WORDS[@]}" \
+ 2>$_log_file)) || return $?
+ }
+ complete -o default -F _{{name}}_completion {{name}}
+elif type compdef &>/dev/null; then
+ function _{{name}}_completion {
+ local _log_file=/dev/null
+ [[ -z "$_{{name}}_log" ]] || _log_file="$_{{name}}_log"
+ compadd -- $(COMP_CWORD=$((CURRENT-1)) \
+ COMP_LINE=$BUFFER \
+ COMP_POINT=0 \
+ _{{name}}_completer -- "${words[@]}" \
+ 2>$_log_file)
+ }
+ compdef _{{name}}_completion {{name}}
+elif type compctl &>/dev/null; then
+ function _{{name}}_completion {
+ local cword line point words si
+ read -Ac words
+ read -cn cword
+ let cword-=1
+ read -l line
+ read -ln point
+ local _log_file=/dev/null
+ [[ -z "$_{{name}}_log" ]] || _log_file="$_{{name}}_log"
+ reply=($(COMP_CWORD="$cword" \
+ COMP_LINE="$line" \
+ COMP_POINT="$point" \
+ _{{name}}_completer -- "${words[@]}" \
+ 2>$_log_file)) || return $?
+ }
+ compctl -K _{{name}}_completion {{name}}
+fi
+
+
+##
+## This is a Bash completion file for the '{{name}}' command. You can install
+## with either:
+##
+## cp FILE /usr/local/etc/bash_completion.d/{{name}} # Mac
+## cp FILE /etc/bash_completion.d/{{name}} # Linux
+##
+## or:
+##
+## cp FILE > ~/.{{name}}.completion
+## echo "source ~/.{{name}}.completion" >> ~/.bashrc
+## \ No newline at end of file
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js
index 014b2ed0e..d57285aeb 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js
@@ -4,10 +4,11 @@
*/
// vim: set ts=4 sts=4 sw=4 et:
-var p = console.log;
+var assert = require('assert-plus');
var format = require('util').format;
+var fs = require('fs');
+var path = require('path');
-var assert = require('assert-plus');
var DEBUG = true;
if (DEBUG) {
@@ -20,6 +21,13 @@ if (DEBUG) {
// ---- internal support stuff
+// Replace {{variable}} in `s` with the template data in `d`.
+function renderTemplate(s, d) {
+ return s.replace(/{{([a-zA-Z]+)}}/g, function (match, key) {
+ return d.hasOwnProperty(key) ? d[key] : match;
+ });
+}
+
/**
* Return a shallow copy of the given object;
*/
@@ -372,7 +380,13 @@ Parser.prototype.parse = function parse(inputs) {
if (!opts[key]) {
opts[key] = [];
}
- opts[key].push(parsedVal);
+ if (type.arrayFlatten && Array.isArray(parsedVal)) {
+ for (var i = 0; i < parsedVal.length; i++) {
+ opts[key].push(parsedVal[i]);
+ }
+ } else {
+ opts[key].push(parsedVal);
+ }
} else {
opts[key] = parsedVal;
}
@@ -728,6 +742,186 @@ Parser.prototype.help = function help(config) {
};
+/**
+ * Return a string suitable for a Bash completion file for this tool.
+ *
+ * @param args.name {String} The tool name.
+ * @param args.specExtra {String} Optional. Extra Bash code content to add
+ * to the end of the "spec". Typically this is used to append Bash
+ * "complete_TYPE" functions for custom option types. See
+ * "examples/ddcompletion.js" for an example.
+ * @param args.argtypes {Array} Optional. Array of completion types for
+ * positional args (i.e. non-options). E.g.
+ * argtypes = ['fruit', 'veggie', 'file']
+ * will result in completion of fruits for the first arg, veggies for the
+ * second, and filenames for the third and subsequent positional args.
+ * If not given, positional args will use Bash's 'default' completion.
+ * See `specExtra` for providing Bash `complete_TYPE` functions, e.g.
+ * `complete_fruit` and `complete_veggie` in this example.
+ */
+Parser.prototype.bashCompletion = function bashCompletion(args) {
+ assert.object(args, 'args');
+ assert.string(args.name, 'args.name');
+ assert.optionalString(args.specExtra, 'args.specExtra');
+ assert.optionalArrayOfString(args.argtypes, 'args.argtypes');
+
+ return bashCompletionFromOptions({
+ name: args.name,
+ specExtra: args.specExtra,
+ argtypes: args.argtypes,
+ options: this.options
+ });
+};
+
+
+// ---- Bash completion
+
+const BASH_COMPLETION_TEMPLATE_PATH = path.join(
+ __dirname, '../etc/dashdash.bash_completion.in');
+
+/**
+ * Return the Bash completion "spec" (the string value for the "{{spec}}"
+ * var in the "dashdash.bash_completion.in" template) for this tool.
+ *
+ * The "spec" is Bash code that defines the CLI options and subcmds for
+ * the template's completion code. It looks something like this:
+ *
+ * local cmd_shortopts="-J ..."
+ * local cmd_longopts="--help ..."
+ * local cmd_optargs="-p=tritonprofile ..."
+ *
+ * @param args.options {Array} The array of dashdash option specs.
+ * @param args.context {String} Optional. A context string for the "local cmd*"
+ * vars in the spec. By default it is the empty string. When used to
+ * scope for completion on a *sub-command* (e.g. for "git log" on a "git"
+ * tool), then it would have a value (e.g. "__log"). See
+ * <http://github.com/trentm/node-cmdln> Bash completion for details.
+ * @param opts.includeHidden {Boolean} Optional. Default false. By default
+ * hidden options and subcmds are "excluded". Here excluded means they
+ * won't be offered as a completion, but if used, their argument type
+ * will be completed. "Hidden" options and subcmds are ones with the
+ * `hidden: true` attribute to exclude them from default help output.
+ * @param args.argtypes {Array} Optional. Array of completion types for
+ * positional args (i.e. non-options). E.g.
+ * argtypes = ['fruit', 'veggie', 'file']
+ * will result in completion of fruits for the first arg, veggies for the
+ * second, and filenames for the third and subsequent positional args.
+ * If not given, positional args will use Bash's 'default' completion.
+ * See `specExtra` for providing Bash `complete_TYPE` functions, e.g.
+ * `complete_fruit` and `complete_veggie` in this example.
+ */
+function bashCompletionSpecFromOptions(args) {
+ assert.object(args, 'args');
+ assert.object(args.options, 'args.options');
+ assert.optionalString(args.context, 'args.context');
+ assert.optionalBool(args.includeHidden, 'args.includeHidden');
+ assert.optionalArrayOfString(args.argtypes, 'args.argtypes');
+
+ var context = args.context || '';
+ var includeHidden = (args.includeHidden === undefined
+ ? false : args.includeHidden);
+
+ var spec = [];
+ var shortopts = [];
+ var longopts = [];
+ var optargs = [];
+ (args.options || []).forEach(function (o) {
+ if (o.group) {
+ // Skip group headers.
+ return;
+ }
+
+ var optNames = o.names || [o.name];
+ var optType = getOptionType(o.type);
+ if (optType.takesArg) {
+ var completionType = o.completionType ||
+ optType.completionType || o.type;
+ optNames.forEach(function (optName) {
+ if (optName.length === 1) {
+ if (includeHidden || !o.hidden) {
+ shortopts.push('-' + optName);
+ }
+ // Include even hidden options in `optargs` so that bash
+ // completion of its arg still works.
+ optargs.push('-' + optName + '=' + completionType);
+ } else {
+ if (includeHidden || !o.hidden) {
+ longopts.push('--' + optName);
+ }
+ optargs.push('--' + optName + '=' + completionType);
+ }
+ });
+ } else {
+ optNames.forEach(function (optName) {
+ if (includeHidden || !o.hidden) {
+ if (optName.length === 1) {
+ shortopts.push('-' + optName);
+ } else {
+ longopts.push('--' + optName);
+ }
+ }
+ });
+ }
+ });
+
+ spec.push(format('local cmd%s_shortopts="%s"',
+ context, shortopts.sort().join(' ')));
+ spec.push(format('local cmd%s_longopts="%s"',
+ context, longopts.sort().join(' ')));
+ spec.push(format('local cmd%s_optargs="%s"',
+ context, optargs.sort().join(' ')));
+ if (args.argtypes) {
+ spec.push(format('local cmd%s_argtypes="%s"',
+ context, args.argtypes.join(' ')));
+ }
+ return spec.join('\n');
+}
+
+
+/**
+ * Return a string suitable for a Bash completion file for this tool.
+ *
+ * @param args.name {String} The tool name.
+ * @param args.options {Array} The array of dashdash option specs.
+ * @param args.specExtra {String} Optional. Extra Bash code content to add
+ * to the end of the "spec". Typically this is used to append Bash
+ * "complete_TYPE" functions for custom option types. See
+ * "examples/ddcompletion.js" for an example.
+ * @param args.argtypes {Array} Optional. Array of completion types for
+ * positional args (i.e. non-options). E.g.
+ * argtypes = ['fruit', 'veggie', 'file']
+ * will result in completion of fruits for the first arg, veggies for the
+ * second, and filenames for the third and subsequent positional args.
+ * If not given, positional args will use Bash's 'default' completion.
+ * See `specExtra` for providing Bash `complete_TYPE` functions, e.g.
+ * `complete_fruit` and `complete_veggie` in this example.
+ */
+function bashCompletionFromOptions(args) {
+ assert.object(args, 'args');
+ assert.object(args.options, 'args.options');
+ assert.string(args.name, 'args.name');
+ assert.optionalString(args.specExtra, 'args.specExtra');
+ assert.optionalArrayOfString(args.argtypes, 'args.argtypes');
+
+ // Gather template data.
+ var data = {
+ name: args.name,
+ date: new Date(),
+ spec: bashCompletionSpecFromOptions({
+ options: args.options,
+ argtypes: args.argtypes
+ }),
+ };
+ if (args.specExtra) {
+ data.spec += '\n\n' + args.specExtra;
+ }
+
+ // Render template.
+ var template = fs.readFileSync(BASH_COMPLETION_TEMPLATE_PATH, 'utf8');
+ return renderTemplate(template, data);
+}
+
+
// ---- exports
@@ -773,6 +967,7 @@ function parse(config) {
* - array {Boolean} Optional. Set to true if this is an 'arrayOf' type
* that collects multiple usages of the option in process.argv and
* puts results in an array.
+ * - arrayFlatten {Boolean} Optional. XXX
* - default Optional. Default value for options of this type, if no
* default is specified in the option type usage.
*/
@@ -785,22 +980,36 @@ function addOptionType(optionType) {
}
assert.func(optionType.parseArg, 'optionType.parseArg');
assert.optionalBool(optionType.array, 'optionType.array');
+ assert.optionalBool(optionType.arrayFlatten, 'optionType.arrayFlatten');
optionTypes[optionType.name] = {
takesArg: optionType.takesArg,
helpArg: optionType.helpArg,
parseArg: optionType.parseArg,
array: optionType.array,
+ arrayFlatten: optionType.arrayFlatten,
default: optionType.default
}
}
+function getOptionType(name) {
+ assert.string(name, 'name');
+ return optionTypes[name];
+}
+
+
module.exports = {
createParser: createParser,
Parser: Parser,
parse: parse,
addOptionType: addOptionType,
+ getOptionType: getOptionType,
+
+ // Bash completion-related exports
+ BASH_COMPLETION_TEMPLATE_PATH: BASH_COMPLETION_TEMPLATE_PATH,
+ bashCompletionFromOptions: bashCompletionFromOptions,
+ bashCompletionSpecFromOptions: bashCompletionSpecFromOptions,
// Export the parseFoo parsers because they might be useful as primitives
// for custom option types.
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/README.md b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/README.md
deleted file mode 100644
index c0c3a5308..000000000
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/README.md
+++ /dev/null
@@ -1,126 +0,0 @@
-# node-assert-plus
-
-This library is a super small wrapper over node's assert module that has two
-things: (1) the ability to disable assertions with the environment variable
-NODE_NDEBUG, and (2) some API wrappers for argument testing. Like
-`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
-like this:
-
- var assert = require('assert-plus');
-
- function fooAccount(options, callback) {
- assert.object(options, 'options');
- assert.number(options.id, 'options.id);
- assert.bool(options.isManager, 'options.isManager');
- assert.string(options.name, 'options.name');
- assert.arrayOfString(options.email, 'options.email');
- assert.func(callback, 'callback');
-
- // Do stuff
- callback(null, {});
- }
-
-# API
-
-All methods that *aren't* part of node's core assert API are simply assumed to
-take an argument, and then a string 'name' that's not a message; `AssertionError`
-will be thrown if the assertion fails with a message like:
-
- AssertionError: foo (string) is required
- at test (/home/mark/work/foo/foo.js:3:9)
- at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)
- at Module._compile (module.js:446:26)
- at Object..js (module.js:464:10)
- at Module.load (module.js:353:31)
- at Function._load (module.js:311:12)
- at Array.0 (module.js:484:10)
- at EventEmitter._tickCallback (node.js:190:38)
-
-from:
-
- function test(foo) {
- assert.string(foo, 'foo');
- }
-
-There you go. You can check that arrays are of a homogenous type with `Arrayof$Type`:
-
- function test(foo) {
- assert.arrayOfString(foo, 'foo');
- }
-
-You can assert IFF an argument is not `undefined` (i.e., an optional arg):
-
- assert.optionalString(foo, 'foo');
-
-Lastly, you can opt-out of assertion checking altogether by setting the
-environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
-lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
-production.
-
-The complete list of APIs is:
-
-* assert.bool
-* assert.buffer
-* assert.func
-* assert.number
-* assert.object
-* assert.string
-* assert.arrayOfBool
-* assert.arrayOfFunc
-* assert.arrayOfNumber
-* assert.arrayOfObject
-* assert.arrayOfString
-* assert.optionalBool
-* assert.optionalBuffer
-* assert.optionalFunc
-* assert.optionalNumber
-* assert.optionalObject
-* assert.optionalString
-* assert.optionalArrayOfBool
-* assert.optionalArrayOfFunc
-* assert.optionalArrayOfNumber
-* assert.optionalArrayOfObject
-* assert.optionalArrayOfString
-* assert.AssertionError
-* assert.fail
-* assert.ok
-* assert.equal
-* assert.notEqual
-* assert.deepEqual
-* assert.notDeepEqual
-* assert.strictEqual
-* assert.notStrictEqual
-* assert.throws
-* assert.doesNotThrow
-* assert.ifError
-
-# Installation
-
- npm install assert-plus
-
-## License
-
-The MIT License (MIT)
-Copyright (c) 2012 Mark Cavage
-
-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.
-
-## Bugs
-
-See <https://github.com/mcavage/node-assert-plus/issues>.
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/assert.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/assert.js
deleted file mode 100644
index ff2ba02de..000000000
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/assert.js
+++ /dev/null
@@ -1,245 +0,0 @@
-// Copyright (c) 2012, Mark Cavage. All rights reserved.
-
-var assert = require('assert');
-var Stream = require('stream').Stream;
-var util = require('util');
-
-
-
-///--- Globals
-
-var NDEBUG = process.env.NODE_NDEBUG || false;
-var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
-
-
-
-///--- Messages
-
-var ARRAY_TYPE_REQUIRED = '%s ([%s]) required';
-var TYPE_REQUIRED = '%s (%s) is required';
-
-
-
-///--- Internal
-
-function capitalize(str) {
- return (str.charAt(0).toUpperCase() + str.slice(1));
-}
-
-function uncapitalize(str) {
- return (str.charAt(0).toLowerCase() + str.slice(1));
-}
-
-function _() {
- return (util.format.apply(util, arguments));
-}
-
-
-function _assert(arg, type, name, stackFunc) {
- if (!NDEBUG) {
- name = name || type;
- stackFunc = stackFunc || _assert.caller;
- var t = typeof (arg);
-
- if (t !== type) {
- throw new assert.AssertionError({
- message: _(TYPE_REQUIRED, name, type),
- actual: t,
- expected: type,
- operator: '===',
- stackStartFunction: stackFunc
- });
- }
- }
-}
-
-
-function _instanceof(arg, type, name, stackFunc) {
- if (!NDEBUG) {
- name = name || type;
- stackFunc = stackFunc || _instanceof.caller;
-
- if (!(arg instanceof type)) {
- throw new assert.AssertionError({
- message: _(TYPE_REQUIRED, name, type.name),
- actual: _getClass(arg),
- expected: type.name,
- operator: 'instanceof',
- stackStartFunction: stackFunc
- });
- }
- }
-}
-
-function _getClass(object) {
- return (Object.prototype.toString.call(object).slice(8, -1));
-};
-
-
-
-///--- API
-
-function array(arr, type, name) {
- if (!NDEBUG) {
- name = name || type;
-
- if (!Array.isArray(arr)) {
- throw new assert.AssertionError({
- message: _(ARRAY_TYPE_REQUIRED, name, type),
- actual: typeof (arr),
- expected: 'array',
- operator: 'Array.isArray',
- stackStartFunction: array.caller
- });
- }
-
- for (var i = 0; i < arr.length; i++) {
- _assert(arr[i], type, name, array);
- }
- }
-}
-
-
-function bool(arg, name) {
- _assert(arg, 'boolean', name, bool);
-}
-
-
-function buffer(arg, name) {
- if (!Buffer.isBuffer(arg)) {
- throw new assert.AssertionError({
- message: _(TYPE_REQUIRED, name || '', 'Buffer'),
- actual: typeof (arg),
- expected: 'buffer',
- operator: 'Buffer.isBuffer',
- stackStartFunction: buffer
- });
- }
-}
-
-
-function func(arg, name) {
- _assert(arg, 'function', name);
-}
-
-
-function number(arg, name) {
- _assert(arg, 'number', name);
- if (!NDEBUG && (isNaN(arg) || !isFinite(arg))) {
- throw new assert.AssertionError({
- message: _(TYPE_REQUIRED, name, 'number'),
- actual: arg,
- expected: 'number',
- operator: 'isNaN',
- stackStartFunction: number
- });
- }
-}
-
-
-function object(arg, name) {
- _assert(arg, 'object', name);
-}
-
-
-function stream(arg, name) {
- _instanceof(arg, Stream, name);
-}
-
-
-function date(arg, name) {
- _instanceof(arg, Date, name);
-}
-
-function regexp(arg, name) {
- _instanceof(arg, RegExp, name);
-}
-
-
-function string(arg, name) {
- _assert(arg, 'string', name);
-}
-
-
-function uuid(arg, name) {
- string(arg, name);
- if (!NDEBUG && !UUID_REGEXP.test(arg)) {
- throw new assert.AssertionError({
- message: _(TYPE_REQUIRED, name, 'uuid'),
- actual: 'string',
- expected: 'uuid',
- operator: 'test',
- stackStartFunction: uuid
- });
- }
-}
-
-
-///--- Exports
-
-module.exports = {
- bool: bool,
- buffer: buffer,
- date: date,
- func: func,
- number: number,
- object: object,
- regexp: regexp,
- stream: stream,
- string: string,
- uuid: uuid
-};
-
-
-Object.keys(module.exports).forEach(function (k) {
- if (k === 'buffer')
- return;
-
- var name = 'arrayOf' + capitalize(k);
-
- if (k === 'bool')
- k = 'boolean';
- if (k === 'func')
- k = 'function';
- module.exports[name] = function (arg, name) {
- array(arg, k, name);
- };
-});
-
-Object.keys(module.exports).forEach(function (k) {
- var _name = 'optional' + capitalize(k);
- var s = uncapitalize(k.replace('arrayOf', ''));
- if (s === 'bool')
- s = 'boolean';
- if (s === 'func')
- s = 'function';
-
- if (k.indexOf('arrayOf') !== -1) {
- module.exports[_name] = function (arg, name) {
- if (!NDEBUG && arg !== undefined) {
- array(arg, s, name);
- }
- };
- } else {
- module.exports[_name] = function (arg, name) {
- if (!NDEBUG && arg !== undefined) {
- _assert(arg, s, name);
- }
- };
- }
-});
-
-
-// Reexport built-in assertions
-Object.keys(assert).forEach(function (k) {
- if (k === 'AssertionError') {
- module.exports[k] = assert[k];
- return;
- }
-
- module.exports[k] = function () {
- if (!NDEBUG) {
- assert[k].apply(assert[k], arguments);
- }
- };
-});
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/package.json b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/package.json
deleted file mode 100644
index e5663d99a..000000000
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/package.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- "_args": [
- [
- "assert-plus@0.1.x",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash"
- ],
- [
- "assert-plus@^0.1.5",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature"
- ]
- ],
- "_from": "assert-plus@>=0.1.0 <0.2.0",
- "_id": "assert-plus@0.1.5",
- "_inCache": true,
- "_installable": true,
- "_location": "/request/http-signature/sshpk/dashdash/assert-plus",
- "_npmUser": {
- "email": "mcavage@gmail.com",
- "name": "mcavage"
- },
- "_npmVersion": "1.3.11",
- "_phantomChildren": {},
- "_requested": {
- "name": "assert-plus",
- "raw": "assert-plus@0.1.x",
- "rawSpec": "0.1.x",
- "scope": null,
- "spec": ">=0.1.0 <0.2.0",
- "type": "range"
- },
- "_requiredBy": [
- "/request/http-signature/sshpk/dashdash"
- ],
- "_shrinkwrap": null,
- "_spec": "assert-plus@0.1.x",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash",
- "author": {
- "email": "mcavage@gmail.com",
- "name": "Mark Cavage"
- },
- "bugs": {
- "url": "https://github.com/mcavage/node-assert-plus/issues"
- },
- "dependencies": {},
- "description": "Extra assertions on top of node's assert module",
- "devDependencies": {},
- "directories": {},
- "dist": {
- "shasum": "ee74009413002d84cec7219c6ac811812e723160",
- "tarball": "http://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz"
- },
- "engines": {
- "node": ">=0.8"
- },
- "homepage": "https://github.com/mcavage/node-assert-plus#readme",
- "main": "./assert.js",
- "maintainers": [
- {
- "name": "mcavage",
- "email": "mcavage@gmail.com"
- }
- ],
- "name": "assert-plus",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mcavage/node-assert-plus.git"
- },
- "version": "0.1.5"
-}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
index 5df7c555c..75331bae2 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
@@ -2,11 +2,11 @@
"_args": [
[
"dashdash@>=1.10.1 <2.0.0",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
]
],
"_from": "dashdash@>=1.10.1 <2.0.0",
- "_id": "dashdash@1.10.1",
+ "_id": "dashdash@1.12.2",
"_inCache": true,
"_installable": true,
"_location": "/request/http-signature/sshpk/dashdash",
@@ -27,11 +27,11 @@
"_requiredBy": [
"/request/http-signature/sshpk"
],
- "_resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.10.1.tgz",
- "_shasum": "0abf1af89a8f5129a81f18c2b35b21df22622f60",
+ "_resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.12.2.tgz",
+ "_shasum": "1c6f70588498d047b8cd5777b32ba85a5e25be36",
"_shrinkwrap": null,
"_spec": "dashdash@>=1.10.1 <2.0.0",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
"author": {
"email": "trentm@gmail.com",
"name": "Trent Mick",
@@ -60,7 +60,7 @@
}
],
"dependencies": {
- "assert-plus": "0.1.x"
+ "assert-plus": "^0.2.0"
},
"description": "A light, featureful and explicit option parsing library.",
"devDependencies": {
@@ -68,18 +68,20 @@
},
"directories": {},
"dist": {
- "shasum": "0abf1af89a8f5129a81f18c2b35b21df22622f60",
- "tarball": "http://registry.npmjs.org/dashdash/-/dashdash-1.10.1.tgz"
+ "shasum": "1c6f70588498d047b8cd5777b32ba85a5e25be36",
+ "tarball": "http://registry.npmjs.org/dashdash/-/dashdash-1.12.2.tgz"
},
"engines": {
"node": ">=0.8"
},
- "gitHead": "e95a66a095553ef045283b34d7615bf02f0dfaac",
+ "gitHead": "d4248f21da0b30bd89c88ccee9bf6eac0e59f9f6",
"homepage": "https://github.com/trentm/node-dashdash",
"keywords": [
"args",
+ "bash",
"cli",
"command",
+ "completion",
"option",
"parser",
"parsing"
@@ -102,5 +104,5 @@
"scripts": {
"test": "nodeunit test/*.test.js"
},
- "version": "1.10.1"
+ "version": "1.12.2"
}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md
index c40721d59..11bd3472c 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md
@@ -53,7 +53,7 @@ There are two versions, you can use either of them:
Installation
------------
-You can install TweetNaCl.is via a package manager:
+You can install TweetNaCl.js via a package manager:
[Bower](http://bower.io):
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
index fb2b119df..7cca76eb5 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
@@ -2,20 +2,20 @@
"_args": [
[
"tweetnacl@>=0.13.0 <1.0.0",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
]
],
"_from": "tweetnacl@>=0.13.0 <1.0.0",
- "_id": "tweetnacl@0.13.2",
+ "_id": "tweetnacl@0.13.3",
"_inCache": true,
"_installable": true,
"_location": "/request/http-signature/sshpk/tweetnacl",
- "_nodeVersion": "0.12.7",
+ "_nodeVersion": "4.2.3",
"_npmUser": {
"email": "dmitry@codingrobots.com",
"name": "dchest"
},
- "_npmVersion": "2.12.1",
+ "_npmVersion": "2.14.7",
"_phantomChildren": {},
"_requested": {
"name": "tweetnacl",
@@ -28,11 +28,11 @@
"_requiredBy": [
"/request/http-signature/sshpk"
],
- "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.2.tgz",
- "_shasum": "453161770469d45cd266c36404e2bc99a8fa9944",
+ "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz",
+ "_shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56",
"_shrinkwrap": null,
"_spec": "tweetnacl@>=0.13.0 <1.0.0",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
"author": {
"name": "TweetNaCl-js contributors"
},
@@ -58,10 +58,10 @@
"test": "test"
},
"dist": {
- "shasum": "453161770469d45cd266c36404e2bc99a8fa9944",
- "tarball": "http://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.2.tgz"
+ "shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56",
+ "tarball": "http://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz"
},
- "gitHead": "f093f0c34fbab5caf51f3ed9a48149c37041abb3",
+ "gitHead": "2bb422cb707fba4a5ec9654688564a4fb861b068",
"homepage": "https://dchest.github.io/tweetnacl-js",
"keywords": [
"crypto",
@@ -77,7 +77,7 @@
"salsa20",
"signatures"
],
- "license": "CC0-1.0",
+ "license": "Public domain",
"main": "nacl-fast.js",
"maintainers": [
{
@@ -116,5 +116,5 @@
],
"files": "test/*.js"
},
- "version": "0.13.2"
+ "version": "0.13.3"
}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json b/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
index 8639c1a6a..6fce0e320 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
@@ -2,20 +2,20 @@
"_args": [
[
"sshpk@^1.7.0",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature"
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature"
]
],
"_from": "sshpk@>=1.7.0 <2.0.0",
- "_id": "sshpk@1.7.1",
+ "_id": "sshpk@1.7.3",
"_inCache": true,
"_installable": true,
"_location": "/request/http-signature/sshpk",
- "_nodeVersion": "0.12.7",
+ "_nodeVersion": "0.12.9",
"_npmUser": {
"email": "alex@cooperi.net",
"name": "arekinath"
},
- "_npmVersion": "2.14.4",
+ "_npmVersion": "2.14.9",
"_phantomChildren": {},
"_requested": {
"name": "sshpk",
@@ -28,16 +28,18 @@
"_requiredBy": [
"/request/http-signature"
],
- "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.7.1.tgz",
- "_shasum": "565e386c42a77e6062fbd14c0472ff21cd53398c",
+ "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.7.3.tgz",
+ "_shasum": "caa8ef95e30765d856698b7025f9f211ab65962f",
"_shrinkwrap": null,
"_spec": "sshpk@^1.7.0",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature",
"author": {
"name": "Joyent, Inc"
},
"bin": {
- "sshpk-conv": "bin/sshpk-conv"
+ "sshpk-conv": "bin/sshpk-conv",
+ "sshpk-sign": "bin/sshpk-sign",
+ "sshpk-verify": "bin/sshpk-verify"
},
"bugs": {
"url": "https://github.com/arekinath/node-sshpk/issues"
@@ -69,20 +71,22 @@
"devDependencies": {
"benchmark": ">=1.0.0 <2.0.0",
"sinon": ">=1.17.2 <2.0.0",
- "tape": ">=3.5.0 <4.0.0"
+ "tape": ">=3.5.0 <4.0.0",
+ "temp": "0.8.2"
},
"directories": {
"bin": "./bin",
- "lib": "./lib"
+ "lib": "./lib",
+ "man": "./man/man1"
},
"dist": {
- "shasum": "565e386c42a77e6062fbd14c0472ff21cd53398c",
- "tarball": "http://registry.npmjs.org/sshpk/-/sshpk-1.7.1.tgz"
+ "shasum": "caa8ef95e30765d856698b7025f9f211ab65962f",
+ "tarball": "http://registry.npmjs.org/sshpk/-/sshpk-1.7.3.tgz"
},
"engines": {
"node": ">=0.8.0"
},
- "gitHead": "71dd768e94d6214a0b8e1196ca78297b582c6fb0",
+ "gitHead": "3d98bfc22bb1c09f0747244acbb408f3ca9448b5",
"homepage": "https://github.com/arekinath/node-sshpk#readme",
"license": "MIT",
"main": "lib/index.js",
@@ -92,6 +96,11 @@
"email": "alex@cooperi.net"
}
],
+ "man": [
+ "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-conv.1",
+ "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-sign.1",
+ "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-verify.1"
+ ],
"name": "sshpk",
"optionalDependencies": {
"ecc-jsbn": ">=0.0.1 <1.0.0",
@@ -107,5 +116,5 @@
"scripts": {
"test": "tape test/*.js"
},
- "version": "1.7.1"
+ "version": "1.7.3"
}
diff --git a/node_modules/request/node_modules/mime-types/HISTORY.md b/node_modules/request/node_modules/mime-types/HISTORY.md
index 64241d971..61b54b420 100644
--- a/node_modules/request/node_modules/mime-types/HISTORY.md
+++ b/node_modules/request/node_modules/mime-types/HISTORY.md
@@ -1,3 +1,9 @@
+2.1.9 / 2016-01-06
+==================
+
+ * deps: mime-db@~1.21.0
+ - Add new mime types
+
2.1.8 / 2015-11-30
==================
diff --git a/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
index c7f8b5a3e..41a667af5 100644
--- a/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
+++ b/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -1,3 +1,22 @@
+1.21.0 / 2016-01-06
+===================
+
+ * Add `application/emergencycalldata.comment+xml`
+ * Add `application/emergencycalldata.deviceinfo+xml`
+ * Add `application/emergencycalldata.providerinfo+xml`
+ * Add `application/emergencycalldata.serviceinfo+xml`
+ * Add `application/emergencycalldata.subscriberinfo+xml`
+ * Add `application/vnd.filmit.zfc`
+ * Add `application/vnd.google-apps.document`
+ * Add `application/vnd.google-apps.presentation`
+ * Add `application/vnd.google-apps.spreadsheet`
+ * Add `application/vnd.mapbox-vector-tile`
+ * Add `application/vnd.ms-printdevicecapabilities+xml`
+ * Add `application/vnd.ms-windows.devicepairing`
+ * Add `application/vnd.ms-windows.nwprinting.oob`
+ * Add `application/vnd.tml`
+ * Add `audio/evs`
+
1.20.0 / 2015-11-10
===================
diff --git a/node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md b/node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md
index 164cca030..7662440bb 100644
--- a/node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md
+++ b/node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md
@@ -52,7 +52,7 @@ Each mime type has the following properties:
- `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
- `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types)
- `.extensions[]` - known extensions associated with this mime type.
-- `.compressible` - whether a file of this type is can be gzipped.
+- `.compressible` - whether a file of this type can be gzipped.
- `.charset` - the default charset associated with this type, if any.
If unknown, every property could be `undefined`.
diff --git a/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json b/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
index 123e7f951..412ba9ed6 100644
--- a/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
+++ b/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
@@ -284,6 +284,21 @@
"source": "iana",
"compressible": false
},
+ "application/emergencycalldata.comment+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.deviceinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.providerinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.serviceinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.subscriberinfo+xml": {
+ "source": "iana"
+ },
"application/emma+xml": {
"source": "iana",
"extensions": ["emma"]
@@ -1858,6 +1873,9 @@
"application/vnd.ffsns": {
"source": "iana"
},
+ "application/vnd.filmit.zfc": {
+ "source": "iana"
+ },
"application/vnd.fints": {
"source": "iana"
},
@@ -1990,6 +2008,18 @@
"source": "iana",
"extensions": ["gmx"]
},
+ "application/vnd.google-apps.document": {
+ "compressible": false,
+ "extensions": ["gdoc"]
+ },
+ "application/vnd.google-apps.presentation": {
+ "compressible": false,
+ "extensions": ["gslides"]
+ },
+ "application/vnd.google-apps.spreadsheet": {
+ "compressible": false,
+ "extensions": ["gsheet"]
+ },
"application/vnd.google-earth.kml+xml": {
"source": "iana",
"compressible": true,
@@ -2407,6 +2437,9 @@
"source": "iana",
"extensions": ["portpkg"]
},
+ "application/vnd.mapbox-vector-tile": {
+ "source": "iana"
+ },
"application/vnd.marlin.drm.actiontoken+xml": {
"source": "iana"
},
@@ -2648,6 +2681,9 @@
"source": "iana",
"extensions": ["potm"]
},
+ "application/vnd.ms-printdevicecapabilities+xml": {
+ "source": "iana"
+ },
"application/vnd.ms-printing.printticket+xml": {
"source": "apache"
},
@@ -2658,6 +2694,12 @@
"application/vnd.ms-tnef": {
"source": "iana"
},
+ "application/vnd.ms-windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.nwprinting.oob": {
+ "source": "iana"
+ },
"application/vnd.ms-windows.printerpairing": {
"source": "iana"
},
@@ -3822,6 +3864,9 @@
"application/vnd.tmd.mediaflex.api+xml": {
"source": "iana"
},
+ "application/vnd.tml": {
+ "source": "iana"
+ },
"application/vnd.tmobile-livetv": {
"source": "iana",
"extensions": ["tmo"]
@@ -4886,6 +4931,9 @@
"audio/evrcwb1": {
"source": "iana"
},
+ "audio/evs": {
+ "source": "iana"
+ },
"audio/fwdred": {
"source": "iana"
},
diff --git a/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json b/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
index 16fa6c1ae..bb48d8cf5 100644
--- a/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
+++ b/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
@@ -1,12 +1,12 @@
{
"_args": [
[
- "mime-db@~1.20.0",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/mime-types"
+ "mime-db@~1.21.0",
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/mime-types"
]
],
- "_from": "mime-db@>=1.20.0 <1.21.0",
- "_id": "mime-db@1.20.0",
+ "_from": "mime-db@>=1.21.0 <1.22.0",
+ "_id": "mime-db@1.21.0",
"_inCache": true,
"_installable": true,
"_location": "/request/mime-types/mime-db",
@@ -18,20 +18,20 @@
"_phantomChildren": {},
"_requested": {
"name": "mime-db",
- "raw": "mime-db@~1.20.0",
- "rawSpec": "~1.20.0",
+ "raw": "mime-db@~1.21.0",
+ "rawSpec": "~1.21.0",
"scope": null,
- "spec": ">=1.20.0 <1.21.0",
+ "spec": ">=1.21.0 <1.22.0",
"type": "range"
},
"_requiredBy": [
"/request/mime-types"
],
- "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.20.0.tgz",
- "_shasum": "496f90fd01fe0e031c8823ec3aa9450ffda18ed8",
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.21.0.tgz",
+ "_shasum": "9b5239e3353cf6eb015a00d890261027c36d4bac",
"_shrinkwrap": null,
- "_spec": "mime-db@~1.20.0",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/mime-types",
+ "_spec": "mime-db@~1.21.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/mime-types",
"bugs": {
"url": "https://github.com/jshttp/mime-db/issues"
},
@@ -54,20 +54,20 @@
"dependencies": {},
"description": "Media Type Database",
"devDependencies": {
- "bluebird": "2.10.0",
+ "bluebird": "3.1.1",
"co": "4.6.0",
"cogent": "1.0.1",
- "csv-parse": "1.0.0",
+ "csv-parse": "1.0.1",
"gnode": "0.1.1",
- "istanbul": "0.4.0",
+ "istanbul": "0.4.1",
"mocha": "1.21.5",
- "raw-body": "2.1.4",
+ "raw-body": "2.1.5",
"stream-to-array": "2.2.0"
},
"directories": {},
"dist": {
- "shasum": "496f90fd01fe0e031c8823ec3aa9450ffda18ed8",
- "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.20.0.tgz"
+ "shasum": "9b5239e3353cf6eb015a00d890261027c36d4bac",
+ "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.21.0.tgz"
},
"engines": {
"node": ">= 0.6"
@@ -79,7 +79,7 @@
"db.json",
"index.js"
],
- "gitHead": "20c99312645c05ab8466701ede01bd5cd3ac7bc4",
+ "gitHead": "9ab92f0a912a602408a64db5741dfef6f82c597f",
"homepage": "https://github.com/jshttp/mime-db",
"keywords": [
"charset",
@@ -116,5 +116,5 @@
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
"update": "npm run fetch && npm run build"
},
- "version": "1.20.0"
+ "version": "1.21.0"
}
diff --git a/node_modules/request/node_modules/mime-types/package.json b/node_modules/request/node_modules/mime-types/package.json
index 2e8262823..aba63f70e 100644
--- a/node_modules/request/node_modules/mime-types/package.json
+++ b/node_modules/request/node_modules/mime-types/package.json
@@ -2,11 +2,11 @@
"_args": [
[
"mime-types@~2.1.7",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request"
+ "/Users/rebecca/code/npm/node_modules/request"
]
],
"_from": "mime-types@>=2.1.7 <2.2.0",
- "_id": "mime-types@2.1.8",
+ "_id": "mime-types@2.1.9",
"_inCache": true,
"_installable": true,
"_location": "/request/mime-types",
@@ -28,11 +28,11 @@
"/request",
"/request/form-data"
],
- "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.8.tgz",
- "_shasum": "faf57823de04bc7cbff4ee82c6b63946e812ae72",
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.9.tgz",
+ "_shasum": "dfb396764b5fdf75be34b1f4104bc3687fb635f8",
"_shrinkwrap": null,
"_spec": "mime-types@~2.1.7",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request",
+ "_where": "/Users/rebecca/code/npm/node_modules/request",
"bugs": {
"url": "https://github.com/jshttp/mime-types/issues"
},
@@ -53,7 +53,7 @@
}
],
"dependencies": {
- "mime-db": "~1.20.0"
+ "mime-db": "~1.21.0"
},
"description": "The ultimate javascript content-type utility.",
"devDependencies": {
@@ -62,8 +62,8 @@
},
"directories": {},
"dist": {
- "shasum": "faf57823de04bc7cbff4ee82c6b63946e812ae72",
- "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.1.8.tgz"
+ "shasum": "dfb396764b5fdf75be34b1f4104bc3687fb635f8",
+ "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.1.9.tgz"
},
"engines": {
"node": ">= 0.6"
@@ -73,7 +73,7 @@
"LICENSE",
"index.js"
],
- "gitHead": "100876a23fab896d8cf0d904fc9778dbdfc1695b",
+ "gitHead": "329f1c77e1a77c8fac59b15038e3808e9e314d96",
"homepage": "https://github.com/jshttp/mime-types",
"keywords": [
"mime",
@@ -106,5 +106,5 @@
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
},
- "version": "2.1.8"
+ "version": "2.1.9"
}