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:
authorForrest L Norvell <forrest@npmjs.com>2015-10-15 08:17:03 +0300
committerRebecca Turner <me@re-becca.org>2015-10-16 01:25:33 +0300
commit25a234b4595ee3f1a2c09e2a39e3c238aa642557 (patch)
treedef772e3c15c7bd3d0b05eeeb6069898617cbf23 /node_modules/node-gyp
parent4cd74b0cdc639081fcf292eb9a03dbd93451c7c0 (diff)
src: install npm@3 with npm@2
Restore the ability to do one-shot upgrades from the versions of npm bundled with Node 0.8 to npm@3, which simplifies using Travis with old Node and new npm, for compatibility testing purposes. Older versions of npm repack packages on install, which works poorly with the way npm@3 handles bundledDependencies with flat trees. Fixes: #9668 PR-URL: https://github.com/npm/npm/pull/9981
Diffstat (limited to 'node_modules/node-gyp')
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore3
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md122
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js8
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js191
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore2
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml4
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile6
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md80
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js5
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js38
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json56
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js56
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml4
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE18
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown62
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js6
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js13
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json83
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js39
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json75
-rw-r--r--node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json98
-rw-r--r--node_modules/node-gyp/node_modules/glob/package.json104
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.npmignore1
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.travis.yml8
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS14
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/LICENSE15
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/README.md119
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js318
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/package.json37
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/basic.js396
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/foreach.js120
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js51
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/serialize.js216
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/LICENSE15
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/README.md53
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/bench.js283
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json44
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/sigmund.js39
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/test/basic.js24
-rw-r--r--node_modules/node-gyp/node_modules/minimatch/package.json89
-rw-r--r--node_modules/node-gyp/node_modules/path-array/.npmignore1
-rw-r--r--node_modules/node-gyp/node_modules/path-array/.travis.yml6
-rw-r--r--node_modules/node-gyp/node_modules/path-array/History.md22
-rw-r--r--node_modules/node-gyp/node_modules/path-array/README.md92
-rw-r--r--node_modules/node-gyp/node_modules/path-array/index.js137
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/.npmignore1
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/.travis.yml5
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/History.md39
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/Makefile11
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/README.md156
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/component.json22
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/index.js180
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/.npmignore6
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/History.md195
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/Makefile36
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/Readme.md188
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/bower.json28
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/browser.js168
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/component.json19
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/debug.js197
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node.js209
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/.npmignore5
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/History.md66
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/LICENSE20
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/README.md35
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/index.js125
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/package.json30
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/package.json51
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json58
-rw-r--r--node_modules/node-gyp/node_modules/path-array/node_modules/array-index/test.js76
-rw-r--r--node_modules/node-gyp/node_modules/path-array/package.json56
-rw-r--r--node_modules/node-gyp/node_modules/path-array/test/test.js68
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENCE25
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENSE15
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/README.md14
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js70
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/block-stream.js68
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js70
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/dropper.js68
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/block-stream.js209
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/package.json55
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/basic.js27
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js68
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/nopad.js57
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/pause-resume.js73
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/thorough.js68
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/two-stream.js59
-rw-r--r--node_modules/node-gyp/node_modules/tar/package.json87
-rw-r--r--node_modules/node-gyp/package.json119
89 files changed, 6045 insertions, 330 deletions
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore
new file mode 100644
index 000000000..353546af2
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore
@@ -0,0 +1,3 @@
+test
+.gitignore
+.travis.yml
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md
new file mode 100644
index 000000000..179392978
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md
@@ -0,0 +1,122 @@
+# brace-expansion
+
+[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
+as known from sh/bash, in JavaScript.
+
+[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
+[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
+
+[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
+
+## Example
+
+```js
+var expand = require('brace-expansion');
+
+expand('file-{a,b,c}.jpg')
+// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
+
+expand('-v{,,}')
+// => ['-v', '-v', '-v']
+
+expand('file{0..2}.jpg')
+// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
+
+expand('file-{a..c}.jpg')
+// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
+
+expand('file{2..0}.jpg')
+// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
+
+expand('file{0..4..2}.jpg')
+// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
+
+expand('file-{a..e..2}.jpg')
+// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
+
+expand('file{00..10..5}.jpg')
+// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
+
+expand('{{A..C},{a..c}}')
+// => ['A', 'B', 'C', 'a', 'b', 'c']
+
+expand('ppp{,config,oe{,conf}}')
+// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
+```
+
+## API
+
+```js
+var expand = require('brace-expansion');
+```
+
+### var expanded = expand(str)
+
+Return an array of all possible and valid expansions of `str`. If none are
+found, `[str]` is returned.
+
+Valid expansions are:
+
+```js
+/^(.*,)+(.+)?$/
+// {a,b,...}
+```
+
+A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
+
+```js
+/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
+// {x..y[..incr]}
+```
+
+A numeric sequence from `x` to `y` inclusive, with optional increment.
+If `x` or `y` start with a leading `0`, all the numbers will be padded
+to have equal length. Negative numbers and backwards iteration work too.
+
+```js
+/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
+// {x..y[..incr]}
+```
+
+An alphabetic sequence from `x` to `y` inclusive, with optional increment.
+`x` and `y` must be exactly one character, and if given, `incr` must be a
+number.
+
+For compatibility reasons, the string `${` is not eligible for brace expansion.
+
+## Installation
+
+With [npm](https://npmjs.org) do:
+
+```bash
+npm install brace-expansion
+```
+
+## Contributors
+
+- [Julian Gruber](https://github.com/juliangruber)
+- [Isaac Z. Schlueter](https://github.com/isaacs)
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js
new file mode 100644
index 000000000..60ecfc74d
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js
@@ -0,0 +1,8 @@
+var expand = require('./');
+
+console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html'));
+console.log(expand('http://www.numericals.com/file{1..100..10}.txt'));
+console.log(expand('http://www.letters.com/file{a..z..2}.txt'));
+console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}'));
+console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}'));
+
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js
new file mode 100644
index 000000000..a23104e95
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js
@@ -0,0 +1,191 @@
+var concatMap = require('concat-map');
+var balanced = require('balanced-match');
+
+module.exports = expandTop;
+
+var escSlash = '\0SLASH'+Math.random()+'\0';
+var escOpen = '\0OPEN'+Math.random()+'\0';
+var escClose = '\0CLOSE'+Math.random()+'\0';
+var escComma = '\0COMMA'+Math.random()+'\0';
+var escPeriod = '\0PERIOD'+Math.random()+'\0';
+
+function numeric(str) {
+ return parseInt(str, 10) == str
+ ? parseInt(str, 10)
+ : str.charCodeAt(0);
+}
+
+function escapeBraces(str) {
+ return str.split('\\\\').join(escSlash)
+ .split('\\{').join(escOpen)
+ .split('\\}').join(escClose)
+ .split('\\,').join(escComma)
+ .split('\\.').join(escPeriod);
+}
+
+function unescapeBraces(str) {
+ return str.split(escSlash).join('\\')
+ .split(escOpen).join('{')
+ .split(escClose).join('}')
+ .split(escComma).join(',')
+ .split(escPeriod).join('.');
+}
+
+
+// Basically just str.split(","), but handling cases
+// where we have nested braced sections, which should be
+// treated as individual members, like {a,{b,c},d}
+function parseCommaParts(str) {
+ if (!str)
+ return [''];
+
+ var parts = [];
+ var m = balanced('{', '}', str);
+
+ if (!m)
+ return str.split(',');
+
+ var pre = m.pre;
+ var body = m.body;
+ var post = m.post;
+ var p = pre.split(',');
+
+ p[p.length-1] += '{' + body + '}';
+ var postParts = parseCommaParts(post);
+ if (post.length) {
+ p[p.length-1] += postParts.shift();
+ p.push.apply(p, postParts);
+ }
+
+ parts.push.apply(parts, p);
+
+ return parts;
+}
+
+function expandTop(str) {
+ if (!str)
+ return [];
+
+ return expand(escapeBraces(str), true).map(unescapeBraces);
+}
+
+function identity(e) {
+ return e;
+}
+
+function embrace(str) {
+ return '{' + str + '}';
+}
+function isPadded(el) {
+ return /^-?0\d/.test(el);
+}
+
+function lte(i, y) {
+ return i <= y;
+}
+function gte(i, y) {
+ return i >= y;
+}
+
+function expand(str, isTop) {
+ var expansions = [];
+
+ var m = balanced('{', '}', str);
+ if (!m || /\$$/.test(m.pre)) return [str];
+
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
+ var isSequence = isNumericSequence || isAlphaSequence;
+ var isOptions = /^(.*,)+(.+)?$/.test(m.body);
+ if (!isSequence && !isOptions) {
+ // {a},b}
+ if (m.post.match(/,.*}/)) {
+ str = m.pre + '{' + m.body + escClose + m.post;
+ return expand(str);
+ }
+ return [str];
+ }
+
+ var n;
+ if (isSequence) {
+ n = m.body.split(/\.\./);
+ } else {
+ n = parseCommaParts(m.body);
+ if (n.length === 1) {
+ // x{{a,b}}y ==> x{a}y x{b}y
+ n = expand(n[0], false).map(embrace);
+ if (n.length === 1) {
+ var post = m.post.length
+ ? expand(m.post, false)
+ : [''];
+ return post.map(function(p) {
+ return m.pre + n[0] + p;
+ });
+ }
+ }
+ }
+
+ // at this point, n is the parts, and we know it's not a comma set
+ // with a single entry.
+
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
+ var pre = m.pre;
+ var post = m.post.length
+ ? expand(m.post, false)
+ : [''];
+
+ var N;
+
+ if (isSequence) {
+ var x = numeric(n[0]);
+ var y = numeric(n[1]);
+ var width = Math.max(n[0].length, n[1].length)
+ var incr = n.length == 3
+ ? Math.abs(numeric(n[2]))
+ : 1;
+ var test = lte;
+ var reverse = y < x;
+ if (reverse) {
+ incr *= -1;
+ test = gte;
+ }
+ var pad = n.some(isPadded);
+
+ N = [];
+
+ for (var i = x; test(i, y); i += incr) {
+ var c;
+ if (isAlphaSequence) {
+ c = String.fromCharCode(i);
+ if (c === '\\')
+ c = '';
+ } else {
+ c = String(i);
+ if (pad) {
+ var need = width - c.length;
+ if (need > 0) {
+ var z = new Array(need + 1).join('0');
+ if (i < 0)
+ c = '-' + z + c.slice(1);
+ else
+ c = z + c;
+ }
+ }
+ }
+ N.push(c);
+ }
+ } else {
+ N = concatMap(n, function(el) { return expand(el, false) });
+ }
+
+ for (var j = 0; j < N.length; j++) {
+ for (var k = 0; k < post.length; k++) {
+ var expansion = pre + N[j] + post[k];
+ if (!isTop || isSequence || expansion)
+ expansions.push(expansion);
+ }
+ }
+
+ return expansions;
+}
+
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
new file mode 100644
index 000000000..fd4f2b066
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
@@ -0,0 +1,2 @@
+node_modules
+.DS_Store
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml
new file mode 100644
index 000000000..cc4dba29d
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile
new file mode 100644
index 000000000..fa5da71a6
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile
@@ -0,0 +1,6 @@
+
+test:
+ @node_modules/.bin/tape test/*.js
+
+.PHONY: test
+
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
new file mode 100644
index 000000000..2aff0ebff
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
@@ -0,0 +1,80 @@
+# balanced-match
+
+Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`.
+
+[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
+[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
+
+[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
+
+## Example
+
+Get the first matching pair of braces:
+
+```js
+var balanced = require('balanced-match');
+
+console.log(balanced('{', '}', 'pre{in{nested}}post'));
+console.log(balanced('{', '}', 'pre{first}between{second}post'));
+```
+
+The matches are:
+
+```bash
+$ node example.js
+{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
+{ start: 3,
+ end: 9,
+ pre: 'pre',
+ body: 'first',
+ post: 'between{second}post' }
+```
+
+## API
+
+### var m = balanced(a, b, str)
+
+For the first non-nested matching pair of `a` and `b` in `str`, return an
+object with those keys:
+
+* **start** the index of the first match of `a`
+* **end** the index of the matching `b`
+* **pre** the preamble, `a` and `b` not included
+* **body** the match, `a` and `b` not included
+* **post** the postscript, `a` and `b` not included
+
+If there's no match, `undefined` will be returned.
+
+If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`.
+
+## Installation
+
+With [npm](https://npmjs.org) do:
+
+```bash
+npm install balanced-match
+```
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js
new file mode 100644
index 000000000..c02ad348e
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js
@@ -0,0 +1,5 @@
+var balanced = require('./');
+
+console.log(balanced('{', '}', 'pre{in{nested}}post'));
+console.log(balanced('{', '}', 'pre{first}between{second}post'));
+
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
new file mode 100644
index 000000000..d165ae817
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
@@ -0,0 +1,38 @@
+module.exports = balanced;
+function balanced(a, b, str) {
+ var bal = 0;
+ var m = {};
+ var ended = false;
+
+ for (var i = 0; i < str.length; i++) {
+ if (a == str.substr(i, a.length)) {
+ if (!('start' in m)) m.start = i;
+ bal++;
+ }
+ else if (b == str.substr(i, b.length) && 'start' in m) {
+ ended = true;
+ bal--;
+ if (!bal) {
+ m.end = i;
+ m.pre = str.substr(0, m.start);
+ m.body = (m.end - m.start > 1)
+ ? str.substring(m.start + a.length, m.end)
+ : '';
+ m.post = str.slice(m.end + b.length);
+ return m;
+ }
+ }
+ }
+
+ // if we opened more than we closed, find the one we closed
+ if (bal && ended) {
+ var start = m.start + a.length;
+ m = balanced(a, b, str.substr(start));
+ if (m) {
+ m.start += start;
+ m.end += start;
+ m.pre = str.slice(0, start) + m.pre;
+ }
+ return m;
+ }
+}
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
new file mode 100644
index 000000000..35332a3c4
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "balanced-match",
+ "description": "Match balanced character pairs, like \"{\" and \"}\"",
+ "version": "0.2.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/balanced-match.git"
+ },
+ "homepage": "https://github.com/juliangruber/balanced-match",
+ "main": "index.js",
+ "scripts": {
+ "test": "make test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tape": "~1.1.1"
+ },
+ "keywords": [
+ "match",
+ "regexp",
+ "test",
+ "balanced",
+ "parse"
+ ],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT",
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/20..latest",
+ "firefox/nightly",
+ "chrome/25..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ },
+ "readme": "# balanced-match\n\nMatch balanced string pairs, like `{` and `}` or `<b>` and `</b>`.\n\n[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)\n[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)\n\n[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)\n\n## Example\n\nGet the first matching pair of braces:\n\n```js\nvar balanced = require('balanced-match');\n\nconsole.log(balanced('{', '}', 'pre{in{nested}}post'));\nconsole.log(balanced('{', '}', 'pre{first}between{second}post'));\n```\n\nThe matches are:\n\n```bash\n$ node example.js\n{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }\n{ start: 3,\n end: 9,\n pre: 'pre',\n body: 'first',\n post: 'between{second}post' }\n```\n\n## API\n\n### var m = balanced(a, b, str)\n\nFor the first non-nested matching pair of `a` and `b` in `str`, return an\nobject with those keys:\n\n* **start** the index of the first match of `a`\n* **end** the index of the matching `b`\n* **pre** the preamble, `a` and `b` not included\n* **body** the match, `a` and `b` not included\n* **post** the postscript, `a` and `b` not included\n\nIf there's no match, `undefined` will be returned.\n\nIf the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`.\n\n## Installation\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install balanced-match\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/juliangruber/balanced-match/issues"
+ },
+ "_id": "balanced-match@0.2.0",
+ "_shasum": "38f6730c03aab6d5edbb52bd934885e756d71674",
+ "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz",
+ "_from": "balanced-match@>=0.2.0 <0.3.0"
+}
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js
new file mode 100644
index 000000000..36bfd3995
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js
@@ -0,0 +1,56 @@
+var test = require('tape');
+var balanced = require('..');
+
+test('balanced', function(t) {
+ t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), {
+ start: 3,
+ end: 12,
+ pre: 'pre',
+ body: 'in{nest}',
+ post: 'post'
+ });
+ t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), {
+ start: 8,
+ end: 11,
+ pre: '{{{{{{{{',
+ body: 'in',
+ post: 'post'
+ });
+ t.deepEqual(balanced('{', '}', 'pre{body{in}post'), {
+ start: 8,
+ end: 11,
+ pre: 'pre{body',
+ body: 'in',
+ post: 'post'
+ });
+ t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), {
+ start: 4,
+ end: 13,
+ pre: 'pre}',
+ body: 'in{nest}',
+ post: 'post'
+ });
+ t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), {
+ start: 3,
+ end: 8,
+ pre: 'pre',
+ body: 'body',
+ post: 'between{body2}post'
+ });
+ t.notOk(balanced('{', '}', 'nope'), 'should be notOk');
+ t.deepEqual(balanced('<b>', '</b>', 'pre<b>in<b>nest</b></b>post'), {
+ start: 3,
+ end: 19,
+ pre: 'pre',
+ body: 'in<b>nest</b>',
+ post: 'post'
+ });
+ t.deepEqual(balanced('<b>', '</b>', 'pre</b><b>in<b>nest</b></b>post'), {
+ start: 7,
+ end: 23,
+ pre: 'pre</b>',
+ body: 'in<b>nest</b>',
+ post: 'post'
+ });
+ t.end();
+});
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml
new file mode 100644
index 000000000..f1d0f13c8
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.4
+ - 0.6
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE
new file mode 100644
index 000000000..ee27ba4b4
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown
new file mode 100644
index 000000000..408f70a1b
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown
@@ -0,0 +1,62 @@
+concat-map
+==========
+
+Concatenative mapdashery.
+
+[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)
+
+[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)
+
+example
+=======
+
+``` js
+var concatMap = require('concat-map');
+var xs = [ 1, 2, 3, 4, 5, 6 ];
+var ys = concatMap(xs, function (x) {
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+});
+console.dir(ys);
+```
+
+***
+
+```
+[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]
+```
+
+methods
+=======
+
+``` js
+var concatMap = require('concat-map')
+```
+
+concatMap(xs, fn)
+-----------------
+
+Return an array of concatenated elements by calling `fn(x, i)` for each element
+`x` and each index `i` in the array `xs`.
+
+When `fn(x, i)` returns an array, its result will be concatenated with the
+result array. If `fn(x, i)` returns anything else, that value will be pushed
+onto the end of the result array.
+
+install
+=======
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install concat-map
+```
+
+license
+=======
+
+MIT
+
+notes
+=====
+
+This module was written while sitting high above the ground in a tree.
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js
new file mode 100644
index 000000000..33656217b
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js
@@ -0,0 +1,6 @@
+var concatMap = require('../');
+var xs = [ 1, 2, 3, 4, 5, 6 ];
+var ys = concatMap(xs, function (x) {
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+});
+console.dir(ys);
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js
new file mode 100644
index 000000000..b29a7812e
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js
@@ -0,0 +1,13 @@
+module.exports = function (xs, fn) {
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ var x = fn(xs[i], i);
+ if (isArray(x)) res.push.apply(res, x);
+ else res.push(x);
+ }
+ return res;
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
new file mode 100644
index 000000000..b51613809
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
@@ -0,0 +1,83 @@
+{
+ "name": "concat-map",
+ "description": "concatenative mapdashery",
+ "version": "0.0.1",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/node-concat-map.git"
+ },
+ "main": "index.js",
+ "keywords": [
+ "concat",
+ "concatMap",
+ "map",
+ "functional",
+ "higher-order"
+ ],
+ "directories": {
+ "example": "example",
+ "test": "test"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "devDependencies": {
+ "tape": "~2.4.0"
+ },
+ "license": "MIT",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": {
+ "ie": [
+ 6,
+ 7,
+ 8,
+ 9
+ ],
+ "ff": [
+ 3.5,
+ 10,
+ 15
+ ],
+ "chrome": [
+ 10,
+ 22
+ ],
+ "safari": [
+ 5.1
+ ],
+ "opera": [
+ 12
+ ]
+ }
+ },
+ "bugs": {
+ "url": "https://github.com/substack/node-concat-map/issues"
+ },
+ "homepage": "https://github.com/substack/node-concat-map",
+ "_id": "concat-map@0.0.1",
+ "dist": {
+ "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
+ "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
+ },
+ "_from": "concat-map@0.0.1",
+ "_npmVersion": "1.3.21",
+ "_npmUser": {
+ "name": "substack",
+ "email": "mail@substack.net"
+ },
+ "maintainers": [
+ {
+ "name": "substack",
+ "email": "mail@substack.net"
+ }
+ ],
+ "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
+ "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js
new file mode 100644
index 000000000..fdbd7022f
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js
@@ -0,0 +1,39 @@
+var concatMap = require('../');
+var test = require('tape');
+
+test('empty or not', function (t) {
+ var xs = [ 1, 2, 3, 4, 5, 6 ];
+ var ixes = [];
+ var ys = concatMap(xs, function (x, ix) {
+ ixes.push(ix);
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+ });
+ t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]);
+ t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]);
+ t.end();
+});
+
+test('always something', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function (x) {
+ return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ];
+ });
+ t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
+ t.end();
+});
+
+test('scalars', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function (x) {
+ return x === 'b' ? [ 'B', 'B', 'B' ] : x;
+ });
+ t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
+ t.end();
+});
+
+test('undefs', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function () {});
+ t.same(ys, [ undefined, undefined, undefined, undefined ]);
+ t.end();
+});
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
new file mode 100644
index 000000000..4cb3e05d7
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
@@ -0,0 +1,75 @@
+{
+ "name": "brace-expansion",
+ "description": "Brace expansion as known from sh/bash",
+ "version": "1.1.1",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/brace-expansion.git"
+ },
+ "homepage": "https://github.com/juliangruber/brace-expansion",
+ "main": "index.js",
+ "scripts": {
+ "test": "tape test/*.js",
+ "gentest": "bash test/generate.sh"
+ },
+ "dependencies": {
+ "balanced-match": "^0.2.0",
+ "concat-map": "0.0.1"
+ },
+ "devDependencies": {
+ "tape": "^3.0.3"
+ },
+ "keywords": [],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT",
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/20..latest",
+ "firefox/nightly",
+ "chrome/25..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ },
+ "gitHead": "f50da498166d76ea570cf3b30179f01f0f119612",
+ "bugs": {
+ "url": "https://github.com/juliangruber/brace-expansion/issues"
+ },
+ "_id": "brace-expansion@1.1.1",
+ "_shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045",
+ "_from": "brace-expansion@>=1.0.0 <2.0.0",
+ "_npmVersion": "2.6.1",
+ "_nodeVersion": "0.10.36",
+ "_npmUser": {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ },
+ "maintainers": [
+ {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ },
+ {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ }
+ ],
+ "dist": {
+ "shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045",
+ "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json
index 17ccc275e..e9256630a 100644
--- a/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json
+++ b/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json
@@ -1,88 +1,46 @@
{
- "_args": [
- [
- "minimatch@^2.0.1",
- "/Users/rebecca/code/npm/node_modules/glob"
- ],
- [
- "minimatch@^2.0.1",
- "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/glob"
- ]
- ],
- "_from": "minimatch@>=2.0.1 <3.0.0",
- "_id": "minimatch@2.0.10",
- "_inCache": true,
- "_location": "/node-gyp/glob/minimatch",
- "_nodeVersion": "2.2.1",
- "_npmUser": {
- "email": "isaacs@npmjs.com",
- "name": "isaacs"
- },
- "_npmVersion": "3.1.0",
- "_phantomChildren": {},
- "_requested": {
- "name": "minimatch",
- "raw": "minimatch@^2.0.1",
- "rawSpec": "^2.0.1",
- "scope": null,
- "spec": ">=2.0.1 <3.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/node-gyp/glob"
- ],
- "_shrinkwrap": null,
- "_spec": "minimatch@^2.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/glob",
"author": {
- "email": "i@izs.me",
"name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
"url": "http://blog.izs.me"
},
- "bugs": {
- "url": "https://github.com/isaacs/minimatch/issues"
+ "name": "minimatch",
+ "description": "a glob matcher in javascript",
+ "version": "2.0.10",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/minimatch.git"
+ },
+ "main": "minimatch.js",
+ "scripts": {
+ "posttest": "standard minimatch.js test/*.js",
+ "test": "tap test/*.js",
+ "prepublish": "browserify -o browser.js -e minimatch.js -s minimatch --bare"
+ },
+ "engines": {
+ "node": "*"
},
"dependencies": {
"brace-expansion": "^1.0.0"
},
- "description": "a glob matcher in javascript",
"devDependencies": {
"browserify": "^9.0.3",
"standard": "^3.7.2",
"tap": "^1.2.0"
},
- "directories": {},
- "dist": {
- "shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7",
- "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz"
- },
- "engines": {
- "node": "*"
- },
- "files": [
- "browser.js",
- "minimatch.js"
- ],
- "gitHead": "6afb85f0c324b321f76a38df81891e562693e257",
- "homepage": "https://github.com/isaacs/minimatch#readme",
"license": "ISC",
- "main": "minimatch.js",
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
+ "files": [
+ "minimatch.js",
+ "browser.js"
],
- "name": "minimatch",
- "optionalDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/minimatch.git"
- },
- "scripts": {
- "posttest": "standard minimatch.js test/*.js",
- "prepublish": "browserify -o browser.js -e minimatch.js -s minimatch --bare",
- "test": "tap test/*.js"
+ "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself if this option is set. When not set, an empty list\nis returned if there are no matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/minimatch/issues"
},
- "version": "2.0.10"
+ "homepage": "https://github.com/isaacs/minimatch#readme",
+ "_id": "minimatch@2.0.10",
+ "_shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7",
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
+ "_from": "minimatch@>=2.0.1 <3.0.0"
}
diff --git a/node_modules/node-gyp/node_modules/glob/package.json b/node_modules/node-gyp/node_modules/glob/package.json
index 5e32a7561..84b72480f 100644
--- a/node_modules/node-gyp/node_modules/glob/package.json
+++ b/node_modules/node-gyp/node_modules/glob/package.json
@@ -1,46 +1,24 @@
{
- "_args": [
- [
- "glob@3 || 4",
- "/Users/rebecca/code/npm/node_modules/node-gyp"
- ]
- ],
- "_from": "glob@>=3.0.0 <4.0.0||>=4.0.0 <5.0.0",
- "_id": "glob@4.5.3",
- "_inCache": true,
- "_location": "/node-gyp/glob",
- "_nodeVersion": "1.4.2",
- "_npmUser": {
- "email": "i@izs.me",
- "name": "isaacs"
- },
- "_npmVersion": "2.7.1",
- "_phantomChildren": {
- "brace-expansion": "1.1.0"
- },
- "_requested": {
- "name": "glob",
- "raw": "glob@3 || 4",
- "rawSpec": "3 || 4",
- "scope": null,
- "spec": ">=3.0.0 <4.0.0||>=4.0.0 <5.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/node-gyp"
- ],
- "_resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz",
- "_shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f",
- "_shrinkwrap": null,
- "_spec": "glob@3 || 4",
- "_where": "/Users/rebecca/code/npm/node_modules/node-gyp",
"author": {
- "email": "i@izs.me",
"name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
"url": "http://blog.izs.me/"
},
- "bugs": {
- "url": "https://github.com/isaacs/node-glob/issues"
+ "name": "glob",
+ "description": "a little globber",
+ "version": "4.5.3",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-glob.git"
+ },
+ "main": "glob.js",
+ "files": [
+ "glob.js",
+ "sync.js",
+ "common.js"
+ ],
+ "engines": {
+ "node": "*"
},
"dependencies": {
"inflight": "^1.0.4",
@@ -48,50 +26,30 @@
"minimatch": "^2.0.1",
"once": "^1.3.0"
},
- "description": "a little globber",
"devDependencies": {
"mkdirp": "0",
"rimraf": "^2.2.8",
"tap": "^0.5.0",
"tick": "0.0.6"
},
- "directories": {},
- "dist": {
- "shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f",
- "tarball": "http://registry.npmjs.org/glob/-/glob-4.5.3.tgz"
- },
- "engines": {
- "node": "*"
- },
- "files": [
- "common.js",
- "glob.js",
- "sync.js"
- ],
- "gitHead": "a4e461ab59a837eee80a4d8dbdbf5ae1054a646f",
- "homepage": "https://github.com/isaacs/node-glob",
- "license": "ISC",
- "main": "glob.js",
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "name": "glob",
- "optionalDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-glob.git"
- },
"scripts": {
- "bench": "bash benchmark.sh",
- "benchclean": "bash benchclean.sh",
"prepublish": "npm run benchclean",
- "prof": "bash prof.sh && cat profile.txt",
"profclean": "rm -f v8.log profile.txt",
"test": "npm run profclean && tap test/*.js",
- "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js"
+ "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js",
+ "bench": "bash benchmark.sh",
+ "prof": "bash prof.sh && cat profile.txt",
+ "benchclean": "bash benchclean.sh"
},
- "version": "4.5.3"
+ "license": "ISC",
+ "readme": "[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)\n\n# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n![](oh-my-glob.gif)\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Glob Primer\n\n\"Globs\" are the patterns you type when you do stuff like `ls *.js` on\nthe command line, or put `build/*` in a `.gitignore` file.\n\nBefore parsing the path part patterns, braced sections are expanded\ninto a set. Braced sections start with `{` and end with `}`, with any\nnumber of comma-delimited sections within. Braced sections may contain\nslash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.\n\nThe following characters have special magic meaning when used in a\npath portion:\n\n* `*` Matches 0 or more characters in a single path portion\n* `?` Matches 1 character\n* `[...]` Matches a range of characters, similar to a RegExp range.\n If the first character of the range is `!` or `^` then it matches\n any character not in the range.\n* `!(pattern|pattern|pattern)` Matches anything that does not match\n any of the patterns provided.\n* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the\n patterns provided.\n* `+(pattern|pattern|pattern)` Matches one or more occurrences of the\n patterns provided.\n* `*(a|b|c)` Matches zero or more occurrences of the patterns provided\n* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns\n provided\n* `**` If a \"globstar\" is alone in a path portion, then it matches\n zero or more directories and subdirectories searching for matches.\n It does not crawl symlinked directories.\n\n### Dots\n\nIf a file or directory path portion has a `.` as the first character,\nthen it will not match any glob pattern unless that pattern's\ncorresponding path part also has a `.` as its first character.\n\nFor example, the pattern `a/.*/c` would match the file at `a/.b/c`.\nHowever the pattern `a/*/c` would not, because `*` does not start with\na dot character.\n\nYou can make glob treat dots as normal characters by setting\n`dot:true` in the options.\n\n### Basename Matching\n\nIf you set `matchBase:true` in the options, and the pattern has no\nslashes in it, then it will seek for any file anywhere in the tree\nwith a matching basename. For example, `*.js` would match\n`test/simple/basic.js`.\n\n### Negation\n\nThe intent for negation would be for a pattern starting with `!` to\nmatch everything that *doesn't* match the supplied pattern. However,\nthe implementation is weird, and for the time being, this should be\navoided. The behavior will change or be deprecated in version 5.\n\n### Empty Sets\n\nIf no matching files are found, then an empty array is returned. This\ndiffers from the shell, where the pattern itself is returned. For\nexample:\n\n $ echo a*s*d*f\n a*s*d*f\n\nTo get the bash-style behavior, set the `nonull:true` in the options.\n\n### See Also:\n\n* `man sh`\n* `man bash` (Search for \"Pattern Matching\")\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob.hasMagic(pattern, [options])\n\nReturns `true` if there are any special characters in the pattern, and\n`false` otherwise.\n\nNote that the options affect the results. If `noext:true` is set in\nthe options object, then `+(a|b)` will not be considered a magic\npattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`\nthen that is considered magical, unless `nobrace:true` is set in the\noptions.\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instantiating the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n values:\n * `false` - Path does not exist\n * `true` - Path exists\n * `'DIR'` - Path exists, and is not a directory\n * `'FILE'` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n* `statCache` Cache of `fs.stat` results, to prevent statting the same\n path multiple times.\n* `symlinks` A record of which paths are symbolic links, which is\n relevant in resolving `**` patterns.\n* `realpathCache` An optional object which is passed to `fs.realpath`\n to minimize unnecessary syscalls. It is stored on the instantiated\n Glob object, and may be re-used.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `pause` Temporarily stop the search\n* `resume` Resume the search\n* `abort` Stop the search forever\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the Glob object, as well.\n\nIf you are running many `glob` operations, you can pass a Glob object\nas the `options` argument to a subsequent operation to shortcut some\n`stat` and `readdir` calls. At the very least, you may pass in shared\n`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that\nparallel glob operations will be sped up by sharing information about\nthe filesystem.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence.\n* `silent` When an unusual error is encountered when attempting to\n read a directory, a warning will be printed to stderr. Set the\n `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered when attempting to\n read a directory, the process will just continue on in search of\n other matches. Set the `strict` option to raise an error in these\n cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary\n to set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `symlinks` A cache of known symbolic links. You may pass in a\n previously generated `symlinks` object to save `lstat` calls when\n resolving `**` matches.\n* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set. Set this\n flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `debug` Set to enable debug logging in minimatch and glob.\n* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.\n* `noglobstar` Do not match `**` against multiple filenames. (Ie,\n treat it as a normal `*` instead.)\n* `noext` Do not match `+(a|b)` \"extglob\" patterns.\n* `nocase` Perform a case-insensitive match. Note: on\n case-insensitive filesystems, non-magic patterns will match by\n default, since `stat` and `readdir` will not raise errors.\n* `matchBase` Perform a basename-only match if the pattern does not\n contain any slash characters. That is, `*.js` would be treated as\n equivalent to `**/*.js`, matching all js files in all directories.\n* `nonegate` Suppress `negate` behavior. (See below.)\n* `nocomment` Suppress `comment` behavior. (See below.)\n* `nonull` Return the pattern when no matches are found.\n* `nodir` Do not match directories, only files. (Note: to match\n *only* directories, simply put a `/` at the end of the pattern.)\n* `ignore` Add a pattern or an array of patterns to exclude matches.\n* `follow` Follow symlinked directories when expanding `**` patterns.\n Note that this can result in a lot of duplicate references in the\n presence of cyclic links.\n* `realpath` Set to true to call `fs.realpath` on all of the results.\n In the case of a symlink that cannot be resolved, the full absolute\n path to the matched entry is returned (though it will usually be a\n broken symlink)\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.3, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nNote that symlinked directories are not crawled as part of a `**`,\nthough their contents may match against subsequent portions of the\npattern. This prevents infinite loops and duplicates and the like.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast majority\nof operations, this is never a problem.\n\n## Contributing\n\nAny change to behavior (including bugfixes) must come with a test.\n\nPatches that fail tests or reduce performance will be rejected.\n\n```\n# to run tests\nnpm test\n\n# to re-generate test fixtures\nnpm run test-regen\n\n# to benchmark against bash/zsh\nnpm run bench\n\n# to profile javascript\nnpm run prof\n```\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-glob/issues"
+ },
+ "homepage": "https://github.com/isaacs/node-glob#readme",
+ "_id": "glob@4.5.3",
+ "_shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f",
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz",
+ "_from": "glob@>=3.0.0 <4.0.0||>=4.0.0 <5.0.0"
}
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.npmignore b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.npmignore
new file mode 100644
index 000000000..07e6e472c
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.npmignore
@@ -0,0 +1 @@
+/node_modules
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.travis.yml b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.travis.yml
new file mode 100644
index 000000000..4af02b3d1
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - '0.8'
+ - '0.10'
+ - '0.12'
+ - 'iojs'
+before_install:
+ - npm install -g npm@latest
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS
new file mode 100644
index 000000000..4a0bc5033
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS
@@ -0,0 +1,14 @@
+# Authors, sorted by whether or not they are me
+Isaac Z. Schlueter <i@izs.me>
+Brian Cottingham <spiffytech@gmail.com>
+Carlos Brito Lage <carlos@carloslage.net>
+Jesse Dailey <jesse.dailey@gmail.com>
+Kevin O'Hara <kevinohara80@gmail.com>
+Marco Rogers <marco.rogers@gmail.com>
+Mark Cavage <mcavage@gmail.com>
+Marko Mikulicic <marko.mikulicic@isti.cnr.it>
+Nathan Rajlich <nathan@tootallnate.net>
+Satheesh Natesan <snateshan@myspace-inc.com>
+Trent Mick <trentm@gmail.com>
+ashleybrener <ashley@starlogik.com>
+n4kz <n4kz@n4kz.com>
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/LICENSE b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/LICENSE
new file mode 100644
index 000000000..19129e315
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/README.md b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/README.md
new file mode 100644
index 000000000..3fd6d0bca
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/README.md
@@ -0,0 +1,119 @@
+# lru cache
+
+A cache object that deletes the least-recently-used items.
+
+## Usage:
+
+```javascript
+var LRU = require("lru-cache")
+ , options = { max: 500
+ , length: function (n) { return n * 2 }
+ , dispose: function (key, n) { n.close() }
+ , maxAge: 1000 * 60 * 60 }
+ , cache = LRU(options)
+ , otherCache = LRU(50) // sets just the max size
+
+cache.set("key", "value")
+cache.get("key") // "value"
+
+cache.reset() // empty the cache
+```
+
+If you put more stuff in it, then items will fall out.
+
+If you try to put an oversized thing in it, then it'll fall out right
+away.
+
+## Options
+
+* `max` The maximum size of the cache, checked by applying the length
+ function to all values in the cache. Not setting this is kind of
+ silly, since that's the whole purpose of this lib, but it defaults
+ to `Infinity`.
+* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
+ as they age, but if you try to get an item that is too old, it'll
+ drop it and return undefined instead of giving it to you.
+* `length` Function that is used to calculate the length of stored
+ items. If you're storing strings or buffers, then you probably want
+ to do something like `function(n){return n.length}`. The default is
+ `function(n){return 1}`, which is fine if you want to store `max`
+ like-sized things.
+* `dispose` Function that is called on items when they are dropped
+ from the cache. This can be handy if you want to close file
+ descriptors or do other cleanup tasks when items are no longer
+ accessible. Called with `key, value`. It's called *before*
+ actually removing the item from the internal cache, so if you want
+ to immediately put it back in, you'll have to do that in a
+ `nextTick` or `setTimeout` callback or it won't do anything.
+* `stale` By default, if you set a `maxAge`, it'll only actually pull
+ stale items out of the cache when you `get(key)`. (That is, it's
+ not pre-emptively doing a `setTimeout` or anything.) If you set
+ `stale:true`, it'll return the stale value before deleting it. If
+ you don't set this, then it'll return `undefined` when you try to
+ get a stale entry, as if it had already been deleted.
+
+## API
+
+* `set(key, value, maxAge)`
+* `get(key) => value`
+
+ Both of these will update the "recently used"-ness of the key.
+ They do what you think. `max` is optional and overrides the
+ cache `max` option if provided.
+
+* `peek(key)`
+
+ Returns the key value (or `undefined` if not found) without
+ updating the "recently used"-ness of the key.
+
+ (If you find yourself using this a lot, you *might* be using the
+ wrong sort of data structure, but there are some use cases where
+ it's handy.)
+
+* `del(key)`
+
+ Deletes a key out of the cache.
+
+* `reset()`
+
+ Clear the cache entirely, throwing away all values.
+
+* `has(key)`
+
+ Check if a key is in the cache, without updating the recent-ness
+ or deleting it for being stale.
+
+* `forEach(function(value,key,cache), [thisp])`
+
+ Just like `Array.prototype.forEach`. Iterates over all the keys
+ in the cache, in order of recent-ness. (Ie, more recently used
+ items are iterated over first.)
+
+* `keys()`
+
+ Return an array of the keys in the cache.
+
+* `values()`
+
+ Return an array of the values in the cache.
+
+* `length()`
+
+ Return total length of objects in cache taking into account
+ `length` options function.
+
+* `itemCount`
+
+ Return total quantity of objects currently in cache. Note, that
+ `stale` (see options) items are returned as part of this item
+ count.
+
+* `dump()`
+
+ Return an array of the cache entries ready for serialization and usage
+ with 'destinationCache.load(arr)`.
+
+* `load(cacheEntriesArray)`
+
+ Loads another cache entries array, obtained with `sourceCache.dump()`,
+ into the cache. The destination cache is reset before loading new entries
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
new file mode 100644
index 000000000..32c2d2d90
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
@@ -0,0 +1,318 @@
+;(function () { // closure for web browsers
+
+if (typeof module === 'object' && module.exports) {
+ module.exports = LRUCache
+} else {
+ // just set the global for non-node platforms.
+ this.LRUCache = LRUCache
+}
+
+function hOP (obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key)
+}
+
+function naiveLength () { return 1 }
+
+function LRUCache (options) {
+ if (!(this instanceof LRUCache))
+ return new LRUCache(options)
+
+ if (typeof options === 'number')
+ options = { max: options }
+
+ if (!options)
+ options = {}
+
+ this._max = options.max
+ // Kind of weird to have a default max of Infinity, but oh well.
+ if (!this._max || !(typeof this._max === "number") || this._max <= 0 )
+ this._max = Infinity
+
+ this._lengthCalculator = options.length || naiveLength
+ if (typeof this._lengthCalculator !== "function")
+ this._lengthCalculator = naiveLength
+
+ this._allowStale = options.stale || false
+ this._maxAge = options.maxAge || null
+ this._dispose = options.dispose
+ this.reset()
+}
+
+// resize the cache when the max changes.
+Object.defineProperty(LRUCache.prototype, "max",
+ { set : function (mL) {
+ if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity
+ this._max = mL
+ if (this._length > this._max) trim(this)
+ }
+ , get : function () { return this._max }
+ , enumerable : true
+ })
+
+// resize the cache when the lengthCalculator changes.
+Object.defineProperty(LRUCache.prototype, "lengthCalculator",
+ { set : function (lC) {
+ if (typeof lC !== "function") {
+ this._lengthCalculator = naiveLength
+ this._length = this._itemCount
+ for (var key in this._cache) {
+ this._cache[key].length = 1
+ }
+ } else {
+ this._lengthCalculator = lC
+ this._length = 0
+ for (var key in this._cache) {
+ this._cache[key].length = this._lengthCalculator(this._cache[key].value)
+ this._length += this._cache[key].length
+ }
+ }
+
+ if (this._length > this._max) trim(this)
+ }
+ , get : function () { return this._lengthCalculator }
+ , enumerable : true
+ })
+
+Object.defineProperty(LRUCache.prototype, "length",
+ { get : function () { return this._length }
+ , enumerable : true
+ })
+
+
+Object.defineProperty(LRUCache.prototype, "itemCount",
+ { get : function () { return this._itemCount }
+ , enumerable : true
+ })
+
+LRUCache.prototype.forEach = function (fn, thisp) {
+ thisp = thisp || this
+ var i = 0
+ var itemCount = this._itemCount
+
+ for (var k = this._mru - 1; k >= 0 && i < itemCount; k--) if (this._lruList[k]) {
+ i++
+ var hit = this._lruList[k]
+ if (isStale(this, hit)) {
+ del(this, hit)
+ if (!this._allowStale) hit = undefined
+ }
+ if (hit) {
+ fn.call(thisp, hit.value, hit.key, this)
+ }
+ }
+}
+
+LRUCache.prototype.keys = function () {
+ var keys = new Array(this._itemCount)
+ var i = 0
+ for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) {
+ var hit = this._lruList[k]
+ keys[i++] = hit.key
+ }
+ return keys
+}
+
+LRUCache.prototype.values = function () {
+ var values = new Array(this._itemCount)
+ var i = 0
+ for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) {
+ var hit = this._lruList[k]
+ values[i++] = hit.value
+ }
+ return values
+}
+
+LRUCache.prototype.reset = function () {
+ if (this._dispose && this._cache) {
+ for (var k in this._cache) {
+ this._dispose(k, this._cache[k].value)
+ }
+ }
+
+ this._cache = Object.create(null) // hash of items by key
+ this._lruList = Object.create(null) // list of items in order of use recency
+ this._mru = 0 // most recently used
+ this._lru = 0 // least recently used
+ this._length = 0 // number of items in the list
+ this._itemCount = 0
+}
+
+LRUCache.prototype.dump = function () {
+ var arr = []
+ var i = 0
+
+ for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) {
+ var hit = this._lruList[k]
+ if (!isStale(this, hit)) {
+ //Do not store staled hits
+ ++i
+ arr.push({
+ k: hit.key,
+ v: hit.value,
+ e: hit.now + (hit.maxAge || 0)
+ });
+ }
+ }
+ //arr has the most read first
+ return arr
+}
+
+LRUCache.prototype.dumpLru = function () {
+ return this._lruList
+}
+
+LRUCache.prototype.set = function (key, value, maxAge) {
+ maxAge = maxAge || this._maxAge
+ var now = maxAge ? Date.now() : 0
+ var len = this._lengthCalculator(value)
+
+ if (hOP(this._cache, key)) {
+ if (len > this._max) {
+ del(this, this._cache[key])
+ return false
+ }
+ // dispose of the old one before overwriting
+ if (this._dispose)
+ this._dispose(key, this._cache[key].value)
+
+ this._cache[key].now = now
+ this._cache[key].maxAge = maxAge
+ this._cache[key].value = value
+ this._length += (len - this._cache[key].length)
+ this._cache[key].length = len
+ this.get(key)
+
+ if (this._length > this._max)
+ trim(this)
+
+ return true
+ }
+
+ var hit = new Entry(key, value, this._mru++, len, now, maxAge)
+
+ // oversized objects fall out of cache automatically.
+ if (hit.length > this._max) {
+ if (this._dispose) this._dispose(key, value)
+ return false
+ }
+
+ this._length += hit.length
+ this._lruList[hit.lu] = this._cache[key] = hit
+ this._itemCount ++
+
+ if (this._length > this._max)
+ trim(this)
+
+ return true
+}
+
+LRUCache.prototype.has = function (key) {
+ if (!hOP(this._cache, key)) return false
+ var hit = this._cache[key]
+ if (isStale(this, hit)) {
+ return false
+ }
+ return true
+}
+
+LRUCache.prototype.get = function (key) {
+ return get(this, key, true)
+}
+
+LRUCache.prototype.peek = function (key) {
+ return get(this, key, false)
+}
+
+LRUCache.prototype.pop = function () {
+ var hit = this._lruList[this._lru]
+ del(this, hit)
+ return hit || null
+}
+
+LRUCache.prototype.del = function (key) {
+ del(this, this._cache[key])
+}
+
+LRUCache.prototype.load = function (arr) {
+ //reset the cache
+ this.reset();
+
+ var now = Date.now()
+ //A previous serialized cache has the most recent items first
+ for (var l = arr.length - 1; l >= 0; l-- ) {
+ var hit = arr[l]
+ var expiresAt = hit.e || 0
+ if (expiresAt === 0) {
+ //the item was created without expiration in a non aged cache
+ this.set(hit.k, hit.v)
+ } else {
+ var maxAge = expiresAt - now
+ //dont add already expired items
+ if (maxAge > 0) this.set(hit.k, hit.v, maxAge)
+ }
+ }
+}
+
+function get (self, key, doUse) {
+ var hit = self._cache[key]
+ if (hit) {
+ if (isStale(self, hit)) {
+ del(self, hit)
+ if (!self._allowStale) hit = undefined
+ } else {
+ if (doUse) use(self, hit)
+ }
+ if (hit) hit = hit.value
+ }
+ return hit
+}
+
+function isStale(self, hit) {
+ if (!hit || (!hit.maxAge && !self._maxAge)) return false
+ var stale = false;
+ var diff = Date.now() - hit.now
+ if (hit.maxAge) {
+ stale = diff > hit.maxAge
+ } else {
+ stale = self._maxAge && (diff > self._maxAge)
+ }
+ return stale;
+}
+
+function use (self, hit) {
+ shiftLU(self, hit)
+ hit.lu = self._mru ++
+ self._lruList[hit.lu] = hit
+}
+
+function trim (self) {
+ while (self._lru < self._mru && self._length > self._max)
+ del(self, self._lruList[self._lru])
+}
+
+function shiftLU (self, hit) {
+ delete self._lruList[ hit.lu ]
+ while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++
+}
+
+function del (self, hit) {
+ if (hit) {
+ if (self._dispose) self._dispose(hit.key, hit.value)
+ self._length -= hit.length
+ self._itemCount --
+ delete self._cache[ hit.key ]
+ shiftLU(self, hit)
+ }
+}
+
+// classy, since V8 prefers predictable objects.
+function Entry (key, value, lu, length, now, maxAge) {
+ this.key = key
+ this.value = value
+ this.lu = lu
+ this.length = length
+ this.now = now
+ if (maxAge) this.maxAge = maxAge
+}
+
+})()
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/package.json b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/package.json
new file mode 100644
index 000000000..71a3544fd
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "lru-cache",
+ "description": "A cache object that deletes the least-recently-used items.",
+ "version": "2.7.0",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ "keywords": [
+ "mru",
+ "lru",
+ "cache"
+ ],
+ "scripts": {
+ "test": "tap test --gc"
+ },
+ "main": "lib/lru-cache.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-lru-cache.git"
+ },
+ "devDependencies": {
+ "tap": "^1.2.0",
+ "weak": ""
+ },
+ "license": "ISC",
+ "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `max`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value, maxAge)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think. `max` is optional and overrides the\n cache `max` option if provided.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n\n* `length()`\n\n Return total length of objects in cache taking into account\n `length` options function.\n\n* `itemCount`\n\n Return total quantity of objects currently in cache. Note, that\n `stale` (see options) items are returned as part of this item\n count.\n\n* `dump()`\n\n Return an array of the cache entries ready for serialization and usage\n with 'destinationCache.load(arr)`.\n\n* `load(cacheEntriesArray)`\n\n Loads another cache entries array, obtained with `sourceCache.dump()`,\n into the cache. The destination cache is reset before loading new entries\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-lru-cache/issues"
+ },
+ "homepage": "https://github.com/isaacs/node-lru-cache#readme",
+ "_id": "lru-cache@2.7.0",
+ "_shasum": "aaa376a4cd970f9cebf5ec1909566ec034f07ee6",
+ "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.0.tgz",
+ "_from": "lru-cache@>=2.0.0 <3.0.0"
+}
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/basic.js
new file mode 100644
index 000000000..b47225f10
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/basic.js
@@ -0,0 +1,396 @@
+var test = require("tap").test
+ , LRU = require("../")
+
+test("basic", function (t) {
+ var cache = new LRU({max: 10})
+ cache.set("key", "value")
+ t.equal(cache.get("key"), "value")
+ t.equal(cache.get("nada"), undefined)
+ t.equal(cache.length, 1)
+ t.equal(cache.max, 10)
+ t.end()
+})
+
+test("least recently set", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), "B")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("lru recently gotten", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.get("a")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("a"), "A")
+ t.end()
+})
+
+test("del", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.del("a")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("max", function (t) {
+ var cache = new LRU(3)
+
+ // test changing the max, verify that the LRU items get dropped.
+ cache.max = 100
+ for (var i = 0; i < 100; i ++) cache.set(i, i)
+ t.equal(cache.length, 100)
+ for (var i = 0; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ cache.max = 3
+ t.equal(cache.length, 3)
+ for (var i = 0; i < 97; i ++) {
+ t.equal(cache.get(i), undefined)
+ }
+ for (var i = 98; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+
+ // now remove the max restriction, and try again.
+ cache.max = "hello"
+ for (var i = 0; i < 100; i ++) cache.set(i, i)
+ t.equal(cache.length, 100)
+ for (var i = 0; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ // should trigger an immediate resize
+ cache.max = 3
+ t.equal(cache.length, 3)
+ for (var i = 0; i < 97; i ++) {
+ t.equal(cache.get(i), undefined)
+ }
+ for (var i = 98; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ t.end()
+})
+
+test("reset", function (t) {
+ var cache = new LRU(10)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.reset()
+ t.equal(cache.length, 0)
+ t.equal(cache.max, 10)
+ t.equal(cache.get("a"), undefined)
+ t.equal(cache.get("b"), undefined)
+ t.end()
+})
+
+
+test("basic with weighed length", function (t) {
+ var cache = new LRU({
+ max: 100,
+ length: function (item) { return item.size }
+ })
+ cache.set("key", {val: "value", size: 50})
+ t.equal(cache.get("key").val, "value")
+ t.equal(cache.get("nada"), undefined)
+ t.equal(cache.lengthCalculator(cache.get("key")), 50)
+ t.equal(cache.length, 50)
+ t.equal(cache.max, 100)
+ t.end()
+})
+
+
+test("weighed length item too large", function (t) {
+ var cache = new LRU({
+ max: 10,
+ length: function (item) { return item.size }
+ })
+ t.equal(cache.max, 10)
+
+ // should fall out immediately
+ cache.set("key", {val: "value", size: 50})
+
+ t.equal(cache.length, 0)
+ t.equal(cache.get("key"), undefined)
+ t.end()
+})
+
+test("least recently set with weighed length", function (t) {
+ var cache = new LRU({
+ max:8,
+ length: function (item) { return item.length }
+ })
+ cache.set("a", "A")
+ cache.set("b", "BB")
+ cache.set("c", "CCC")
+ cache.set("d", "DDDD")
+ t.equal(cache.get("d"), "DDDD")
+ t.equal(cache.get("c"), "CCC")
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("lru recently gotten with weighed length", function (t) {
+ var cache = new LRU({
+ max: 8,
+ length: function (item) { return item.length }
+ })
+ cache.set("a", "A")
+ cache.set("b", "BB")
+ cache.set("c", "CCC")
+ cache.get("a")
+ cache.get("b")
+ cache.set("d", "DDDD")
+ t.equal(cache.get("c"), undefined)
+ t.equal(cache.get("d"), "DDDD")
+ t.equal(cache.get("b"), "BB")
+ t.equal(cache.get("a"), "A")
+ t.end()
+})
+
+test("lru recently updated with weighed length", function (t) {
+ var cache = new LRU({
+ max: 8,
+ length: function (item) { return item.length }
+ })
+ cache.set("a", "A")
+ cache.set("b", "BB")
+ cache.set("c", "CCC")
+ t.equal(cache.length, 6) //CCC BB A
+ cache.set("a", "+A")
+ t.equal(cache.length, 7) //+A CCC BB
+ cache.set("b", "++BB")
+ t.equal(cache.length, 6) //++BB +A
+ t.equal(cache.get("c"), undefined)
+
+ cache.set("c", "oversized")
+ t.equal(cache.length, 6) //++BB +A
+ t.equal(cache.get("c"), undefined)
+
+ cache.set("a", "oversized")
+ t.equal(cache.length, 4) //++BB
+ t.equal(cache.get("a"), undefined)
+ t.equal(cache.get("b"), "++BB")
+ t.end()
+})
+
+test("set returns proper booleans", function(t) {
+ var cache = new LRU({
+ max: 5,
+ length: function (item) { return item.length }
+ })
+
+ t.equal(cache.set("a", "A"), true)
+
+ // should return false for max exceeded
+ t.equal(cache.set("b", "donuts"), false)
+
+ t.equal(cache.set("b", "B"), true)
+ t.equal(cache.set("c", "CCCC"), true)
+ t.end()
+})
+
+test("drop the old items", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 50
+ })
+
+ cache.set("a", "A")
+
+ setTimeout(function () {
+ cache.set("b", "b")
+ t.equal(cache.get("a"), "A")
+ }, 25)
+
+ setTimeout(function () {
+ cache.set("c", "C")
+ // timed out
+ t.notOk(cache.get("a"))
+ }, 60 + 25)
+
+ setTimeout(function () {
+ t.notOk(cache.get("b"))
+ t.equal(cache.get("c"), "C")
+ }, 90)
+
+ setTimeout(function () {
+ t.notOk(cache.get("c"))
+ t.end()
+ }, 155)
+})
+
+test("individual item can have it's own maxAge", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 50
+ })
+
+ cache.set("a", "A", 20)
+ setTimeout(function () {
+ t.notOk(cache.get("a"))
+ t.end()
+ }, 25)
+})
+
+test("individual item can have it's own maxAge > cache's", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 20
+ })
+
+ cache.set("a", "A", 50)
+ setTimeout(function () {
+ t.equal(cache.get("a"), "A")
+ t.end()
+ }, 25)
+})
+
+test("disposal function", function(t) {
+ var disposed = false
+ var cache = new LRU({
+ max: 1,
+ dispose: function (k, n) {
+ disposed = n
+ }
+ })
+
+ cache.set(1, 1)
+ cache.set(2, 2)
+ t.equal(disposed, 1)
+ cache.set(3, 3)
+ t.equal(disposed, 2)
+ cache.reset()
+ t.equal(disposed, 3)
+ t.end()
+})
+
+test("disposal function on too big of item", function(t) {
+ var disposed = false
+ var cache = new LRU({
+ max: 1,
+ length: function (k) {
+ return k.length
+ },
+ dispose: function (k, n) {
+ disposed = n
+ }
+ })
+ var obj = [ 1, 2 ]
+
+ t.equal(disposed, false)
+ cache.set("obj", obj)
+ t.equal(disposed, obj)
+ t.end()
+})
+
+test("has()", function(t) {
+ var cache = new LRU({
+ max: 1,
+ maxAge: 10
+ })
+
+ cache.set('foo', 'bar')
+ t.equal(cache.has('foo'), true)
+ cache.set('blu', 'baz')
+ t.equal(cache.has('foo'), false)
+ t.equal(cache.has('blu'), true)
+ setTimeout(function() {
+ t.equal(cache.has('blu'), false)
+ t.end()
+ }, 15)
+})
+
+test("stale", function(t) {
+ var cache = new LRU({
+ maxAge: 10,
+ stale: true
+ })
+
+ cache.set('foo', 'bar')
+ t.equal(cache.get('foo'), 'bar')
+ t.equal(cache.has('foo'), true)
+ setTimeout(function() {
+ t.equal(cache.has('foo'), false)
+ t.equal(cache.get('foo'), 'bar')
+ t.equal(cache.get('foo'), undefined)
+ t.end()
+ }, 15)
+})
+
+test("lru update via set", function(t) {
+ var cache = LRU({ max: 2 });
+
+ cache.set('foo', 1);
+ cache.set('bar', 2);
+ cache.del('bar');
+ cache.set('baz', 3);
+ cache.set('qux', 4);
+
+ t.equal(cache.get('foo'), undefined)
+ t.equal(cache.get('bar'), undefined)
+ t.equal(cache.get('baz'), 3)
+ t.equal(cache.get('qux'), 4)
+ t.end()
+})
+
+test("least recently set w/ peek", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ t.equal(cache.peek("a"), "A")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), "B")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("pop the least used item", function (t) {
+ var cache = new LRU(3)
+ , last
+
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.set("c", "C")
+
+ t.equal(cache.length, 3)
+ t.equal(cache.max, 3)
+
+ // Ensure we pop a, c, b
+ cache.get("b", "B")
+
+ last = cache.pop()
+ t.equal(last.key, "a")
+ t.equal(last.value, "A")
+ t.equal(cache.length, 2)
+ t.equal(cache.max, 3)
+
+ last = cache.pop()
+ t.equal(last.key, "c")
+ t.equal(last.value, "C")
+ t.equal(cache.length, 1)
+ t.equal(cache.max, 3)
+
+ last = cache.pop()
+ t.equal(last.key, "b")
+ t.equal(last.value, "B")
+ t.equal(cache.length, 0)
+ t.equal(cache.max, 3)
+
+ last = cache.pop()
+ t.equal(last, null)
+ t.equal(cache.length, 0)
+ t.equal(cache.max, 3)
+
+ t.end()
+})
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
new file mode 100644
index 000000000..4190417cb
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
@@ -0,0 +1,120 @@
+var test = require('tap').test
+var LRU = require('../')
+
+test('forEach', function (t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ var i = 9
+ l.forEach(function (val, key, cache) {
+ t.equal(cache, l)
+ t.equal(key, i.toString())
+ t.equal(val, i.toString(2))
+ i -= 1
+ })
+
+ // get in order of most recently used
+ l.get(6)
+ l.get(8)
+
+ var order = [ 8, 6, 9, 7, 5 ]
+ var i = 0
+
+ l.forEach(function (val, key, cache) {
+ var j = order[i ++]
+ t.equal(cache, l)
+ t.equal(key, j.toString())
+ t.equal(val, j.toString(2))
+ })
+ t.equal(i, order.length);
+
+ t.end()
+})
+
+test('keys() and values()', function (t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ t.similar(l.keys(), ['9', '8', '7', '6', '5'])
+ t.similar(l.values(), ['1001', '1000', '111', '110', '101'])
+
+ // get in order of most recently used
+ l.get(6)
+ l.get(8)
+
+ t.similar(l.keys(), ['8', '6', '9', '7', '5'])
+ t.similar(l.values(), ['1000', '110', '1001', '111', '101'])
+
+ t.end()
+})
+
+test('all entries are iterated over', function(t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ var i = 0
+ l.forEach(function (val, key, cache) {
+ if (i > 0) {
+ cache.del(key)
+ }
+ i += 1
+ })
+
+ t.equal(i, 5)
+ t.equal(l.keys().length, 1)
+
+ t.end()
+})
+
+test('all stale entries are removed', function(t) {
+ var l = new LRU({ max: 5, maxAge: -5, stale: true })
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ var i = 0
+ l.forEach(function () {
+ i += 1
+ })
+
+ t.equal(i, 5)
+ t.equal(l.keys().length, 0)
+
+ t.end()
+})
+
+test('expires', function (t) {
+ var l = new LRU({
+ max: 10,
+ maxAge: 50
+ })
+ for (var i = 0; i < 10; i++) {
+ l.set(i.toString(), i.toString(2), ((i % 2) ? 25 : undefined))
+ }
+
+ var i = 0
+ var order = [ 8, 6, 4, 2, 0 ]
+ setTimeout(function () {
+ l.forEach(function (val, key, cache) {
+ var j = order[i++]
+ t.equal(cache, l)
+ t.equal(key, j.toString())
+ t.equal(val, j.toString(2))
+ })
+ t.equal(i, order.length);
+
+ setTimeout(function () {
+ var count = 0;
+ l.forEach(function (val, key, cache) { count++; })
+ t.equal(0, count);
+ t.end()
+ }, 25)
+
+ }, 26)
+})
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
new file mode 100644
index 000000000..b5912f6f1
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
@@ -0,0 +1,51 @@
+#!/usr/bin/env node --expose_gc
+
+
+var weak = require('weak');
+var test = require('tap').test
+var LRU = require('../')
+var l = new LRU({ max: 10 })
+var refs = 0
+function X() {
+ refs ++
+ weak(this, deref)
+}
+
+function deref() {
+ refs --
+}
+
+test('no leaks', function (t) {
+ // fill up the cache
+ for (var i = 0; i < 100; i++) {
+ l.set(i, new X);
+ // throw some gets in there, too.
+ if (i % 2 === 0)
+ l.get(i / 2)
+ }
+
+ gc()
+
+ var start = process.memoryUsage()
+
+ // capture the memory
+ var startRefs = refs
+
+ // do it again, but more
+ for (var i = 0; i < 10000; i++) {
+ l.set(i, new X);
+ // throw some gets in there, too.
+ if (i % 2 === 0)
+ l.get(i / 2)
+ }
+
+ gc()
+
+ var end = process.memoryUsage()
+ t.equal(refs, startRefs, 'no leaky refs')
+
+ console.error('start: %j\n' +
+ 'end: %j', start, end);
+ t.pass();
+ t.end();
+})
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/serialize.js b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/serialize.js
new file mode 100644
index 000000000..1094194a0
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/serialize.js
@@ -0,0 +1,216 @@
+var test = require('tap').test
+var LRU = require('../')
+
+test('dump', function (t) {
+ var cache = new LRU()
+
+ t.equal(cache.dump().length, 0, "nothing in dump for empty cache")
+
+ cache.set("a", "A")
+ cache.set("b", "B")
+ t.deepEqual(cache.dump(), [
+ { k: "b", v: "B", e: 0 },
+ { k: "a", v: "A", e: 0 }
+ ])
+
+ cache.set("a", "A");
+ t.deepEqual(cache.dump(), [
+ { k: "a", v: "A", e: 0 },
+ { k: "b", v: "B", e: 0 }
+ ])
+
+ cache.get("b");
+ t.deepEqual(cache.dump(), [
+ { k: "b", v: "B", e: 0 },
+ { k: "a", v: "A", e: 0 }
+ ])
+
+ cache.del("a");
+ t.deepEqual(cache.dump(), [
+ { k: "b", v: "B", e: 0 }
+ ])
+
+ t.end()
+})
+
+test("do not dump stale items", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 50
+ })
+
+ //expires at 50
+ cache.set("a", "A")
+
+ setTimeout(function () {
+ //expires at 75
+ cache.set("b", "B")
+ var s = cache.dump()
+ t.equal(s.length, 2)
+ t.equal(s[0].k, "b")
+ t.equal(s[1].k, "a")
+ }, 25)
+
+ setTimeout(function () {
+ //expires at 110
+ cache.set("c", "C")
+ var s = cache.dump()
+ t.equal(s.length, 2)
+ t.equal(s[0].k, "c")
+ t.equal(s[1].k, "b")
+ }, 60)
+
+ setTimeout(function () {
+ //expires at 130
+ cache.set("d", "D", 40)
+ var s = cache.dump()
+ t.equal(s.length, 2)
+ t.equal(s[0].k, "d")
+ t.equal(s[1].k, "c")
+ }, 90)
+
+ setTimeout(function () {
+ var s = cache.dump()
+ t.equal(s.length, 1)
+ t.equal(s[0].k, "d")
+ }, 120)
+
+ setTimeout(function () {
+ var s = cache.dump()
+ t.deepEqual(s, [])
+ t.end()
+ }, 155)
+})
+
+test("load basic cache", function(t) {
+ var cache = new LRU(),
+ copy = new LRU()
+
+ cache.set("a", "A")
+ cache.set("b", "B")
+
+ copy.load(cache.dump())
+ t.deepEquals(cache.dump(), copy.dump())
+
+ t.end()
+})
+
+
+test("load staled cache", function(t) {
+ var cache = new LRU({maxAge: 50}),
+ copy = new LRU({maxAge: 50}),
+ arr
+
+ //expires at 50
+ cache.set("a", "A")
+ setTimeout(function () {
+ //expires at 80
+ cache.set("b", "B")
+ arr = cache.dump()
+ t.equal(arr.length, 2)
+ }, 30)
+
+ setTimeout(function () {
+ copy.load(arr)
+ t.equal(copy.get("a"), undefined)
+ t.equal(copy.get("b"), "B")
+ }, 60)
+
+ setTimeout(function () {
+ t.equal(copy.get("b"), undefined)
+ t.end()
+ }, 90)
+})
+
+test("load to other size cache", function(t) {
+ var cache = new LRU({max: 2}),
+ copy = new LRU({max: 1})
+
+ cache.set("a", "A")
+ cache.set("b", "B")
+
+ copy.load(cache.dump())
+ t.equal(copy.get("a"), undefined)
+ t.equal(copy.get("b"), "B")
+
+ //update the last read from original cache
+ cache.get("a")
+ copy.load(cache.dump())
+ t.equal(copy.get("a"), "A")
+ t.equal(copy.get("b"), undefined)
+
+ t.end()
+})
+
+
+test("load to other age cache", function(t) {
+ var cache = new LRU({maxAge: 50}),
+ aged = new LRU({maxAge: 100}),
+ simple = new LRU(),
+ arr,
+ expired
+
+ //created at 0
+ //a would be valid till 0 + 50
+ cache.set("a", "A")
+ setTimeout(function () {
+ //created at 20
+ //b would be valid till 20 + 50
+ cache.set("b", "B")
+ //b would be valid till 20 + 70
+ cache.set("c", "C", 70)
+ arr = cache.dump()
+ t.equal(arr.length, 3)
+ }, 20)
+
+ setTimeout(function () {
+ t.equal(cache.get("a"), undefined)
+ t.equal(cache.get("b"), "B")
+ t.equal(cache.get("c"), "C")
+
+ aged.load(arr)
+ t.equal(aged.get("a"), undefined)
+ t.equal(aged.get("b"), "B")
+ t.equal(aged.get("c"), "C")
+
+ simple.load(arr)
+ t.equal(simple.get("a"), undefined)
+ t.equal(simple.get("b"), "B")
+ t.equal(simple.get("c"), "C")
+ }, 60)
+
+ setTimeout(function () {
+ t.equal(cache.get("a"), undefined)
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("c"), "C")
+
+ aged.load(arr)
+ t.equal(aged.get("a"), undefined)
+ t.equal(aged.get("b"), undefined)
+ t.equal(aged.get("c"), "C")
+
+ simple.load(arr)
+ t.equal(simple.get("a"), undefined)
+ t.equal(simple.get("b"), undefined)
+ t.equal(simple.get("c"), "C")
+ }, 80)
+
+ setTimeout(function () {
+ t.equal(cache.get("a"), undefined)
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("c"), undefined)
+
+ aged.load(arr)
+ t.equal(aged.get("a"), undefined)
+ t.equal(aged.get("b"), undefined)
+ t.equal(aged.get("c"), undefined)
+
+ simple.load(arr)
+ t.equal(simple.get("a"), undefined)
+ t.equal(simple.get("b"), undefined)
+ t.equal(simple.get("c"), undefined)
+ t.end()
+ }, 100)
+
+})
+
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/LICENSE b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/LICENSE
new file mode 100644
index 000000000..19129e315
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/README.md b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/README.md
new file mode 100644
index 000000000..25a38a53f
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/README.md
@@ -0,0 +1,53 @@
+# sigmund
+
+Quick and dirty signatures for Objects.
+
+This is like a much faster `deepEquals` comparison, which returns a
+string key suitable for caches and the like.
+
+## Usage
+
+```javascript
+function doSomething (someObj) {
+ var key = sigmund(someObj, maxDepth) // max depth defaults to 10
+ var cached = cache.get(key)
+ if (cached) return cached
+
+ var result = expensiveCalculation(someObj)
+ cache.set(key, result)
+ return result
+}
+```
+
+The resulting key will be as unique and reproducible as calling
+`JSON.stringify` or `util.inspect` on the object, but is much faster.
+In order to achieve this speed, some differences are glossed over.
+For example, the object `{0:'foo'}` will be treated identically to the
+array `['foo']`.
+
+Also, just as there is no way to summon the soul from the scribblings
+of a cocaine-addled psychoanalyst, there is no way to revive the object
+from the signature string that sigmund gives you. In fact, it's
+barely even readable.
+
+As with `util.inspect` and `JSON.stringify`, larger objects will
+produce larger signature strings.
+
+Because sigmund is a bit less strict than the more thorough
+alternatives, the strings will be shorter, and also there is a
+slightly higher chance for collisions. For example, these objects
+have the same signature:
+
+ var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
+ var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
+
+Like a good Freudian, sigmund is most effective when you already have
+some understanding of what you're looking for. It can help you help
+yourself, but you must be willing to do some work as well.
+
+Cycles are handled, and cyclical objects are silently omitted (though
+the key is included in the signature output.)
+
+The second argument is the maximum depth, which defaults to 10,
+because that is the maximum object traversal depth covered by most
+insurance carriers.
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/bench.js b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/bench.js
new file mode 100644
index 000000000..5acfd6d90
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/bench.js
@@ -0,0 +1,283 @@
+// different ways to id objects
+// use a req/res pair, since it's crazy deep and cyclical
+
+// sparseFE10 and sigmund are usually pretty close, which is to be expected,
+// since they are essentially the same algorithm, except that sigmund handles
+// regular expression objects properly.
+
+
+var http = require('http')
+var util = require('util')
+var sigmund = require('./sigmund.js')
+var sreq, sres, creq, cres, test
+
+http.createServer(function (q, s) {
+ sreq = q
+ sres = s
+ sres.end('ok')
+ this.close(function () { setTimeout(function () {
+ start()
+ }, 200) })
+}).listen(1337, function () {
+ creq = http.get({ port: 1337 })
+ creq.on('response', function (s) { cres = s })
+})
+
+function start () {
+ test = [sreq, sres, creq, cres]
+ // test = sreq
+ // sreq.sres = sres
+ // sreq.creq = creq
+ // sreq.cres = cres
+
+ for (var i in exports.compare) {
+ console.log(i)
+ var hash = exports.compare[i]()
+ console.log(hash)
+ console.log(hash.length)
+ console.log('')
+ }
+
+ require('bench').runMain()
+}
+
+function customWs (obj, md, d) {
+ d = d || 0
+ var to = typeof obj
+ if (to === 'undefined' || to === 'function' || to === null) return ''
+ if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '')
+
+ if (Array.isArray(obj)) {
+ return obj.map(function (i, _, __) {
+ return customWs(i, md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+ }
+
+ var keys = Object.keys(obj)
+ return keys.map(function (k, _, __) {
+ return k + ':' + customWs(obj[k], md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+}
+
+function custom (obj, md, d) {
+ d = d || 0
+ var to = typeof obj
+ if (to === 'undefined' || to === 'function' || to === null) return ''
+ if (d > md || !obj || to !== 'object') return '' + obj
+
+ if (Array.isArray(obj)) {
+ return obj.map(function (i, _, __) {
+ return custom(i, md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+ }
+
+ var keys = Object.keys(obj)
+ return keys.map(function (k, _, __) {
+ return k + ':' + custom(obj[k], md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+}
+
+function sparseFE2 (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ Object.keys(v).forEach(function (k, _, __) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') return
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') return
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ })
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function sparseFE (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ Object.keys(v).forEach(function (k, _, __) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') return
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') return
+ soFar += k
+ ch(v[k], depth + 1)
+ })
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function sparse (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k
+ ch(v[k], depth + 1)
+ }
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function noCommas (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ }
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+
+function flatten (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ soFar += ','
+ }
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+exports.compare =
+{
+ // 'custom 2': function () {
+ // return custom(test, 2, 0)
+ // },
+ // 'customWs 2': function () {
+ // return customWs(test, 2, 0)
+ // },
+ 'JSON.stringify (guarded)': function () {
+ var seen = []
+ return JSON.stringify(test, function (k, v) {
+ if (typeof v !== 'object' || !v) return v
+ if (seen.indexOf(v) !== -1) return undefined
+ seen.push(v)
+ return v
+ })
+ },
+
+ 'flatten 10': function () {
+ return flatten(test, 10)
+ },
+
+ // 'flattenFE 10': function () {
+ // return flattenFE(test, 10)
+ // },
+
+ 'noCommas 10': function () {
+ return noCommas(test, 10)
+ },
+
+ 'sparse 10': function () {
+ return sparse(test, 10)
+ },
+
+ 'sparseFE 10': function () {
+ return sparseFE(test, 10)
+ },
+
+ 'sparseFE2 10': function () {
+ return sparseFE2(test, 10)
+ },
+
+ sigmund: function() {
+ return sigmund(test, 10)
+ },
+
+
+ // 'util.inspect 1': function () {
+ // return util.inspect(test, false, 1, false)
+ // },
+ // 'util.inspect undefined': function () {
+ // util.inspect(test)
+ // },
+ // 'util.inspect 2': function () {
+ // util.inspect(test, false, 2, false)
+ // },
+ // 'util.inspect 3': function () {
+ // util.inspect(test, false, 3, false)
+ // },
+ // 'util.inspect 4': function () {
+ // util.inspect(test, false, 4, false)
+ // },
+ // 'util.inspect Infinity': function () {
+ // util.inspect(test, false, Infinity, false)
+ // }
+}
+
+/** results
+**/
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json
new file mode 100644
index 000000000..0432d4e4c
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "sigmund",
+ "version": "1.0.1",
+ "description": "Quick and dirty signatures for Objects.",
+ "main": "sigmund.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.3.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js",
+ "bench": "node bench.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/sigmund.git"
+ },
+ "keywords": [
+ "object",
+ "signature",
+ "key",
+ "data",
+ "psychoanalysis"
+ ],
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "ISC",
+ "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocaine-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even readable.\n\nAs with `util.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/sigmund/issues"
+ },
+ "homepage": "https://github.com/isaacs/sigmund#readme",
+ "_id": "sigmund@1.0.1",
+ "_shasum": "3ff21f198cad2175f9f3b781853fd94d0d19b590",
+ "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
+ "_from": "sigmund@>=1.0.0 <1.1.0"
+}
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/sigmund.js b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/sigmund.js
new file mode 100644
index 000000000..82c7ab8ce
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/sigmund.js
@@ -0,0 +1,39 @@
+module.exports = sigmund
+function sigmund (subject, maxSessions) {
+ maxSessions = maxSessions || 10;
+ var notes = [];
+ var analysis = '';
+ var RE = RegExp;
+
+ function psychoAnalyze (subject, session) {
+ if (session > maxSessions) return;
+
+ if (typeof subject === 'function' ||
+ typeof subject === 'undefined') {
+ return;
+ }
+
+ if (typeof subject !== 'object' || !subject ||
+ (subject instanceof RE)) {
+ analysis += subject;
+ return;
+ }
+
+ if (notes.indexOf(subject) !== -1 || session === maxSessions) return;
+
+ notes.push(subject);
+ analysis += '{';
+ Object.keys(subject).forEach(function (issue, _, __) {
+ // pseudo-private values. skip those.
+ if (issue.charAt(0) === '_') return;
+ var to = typeof subject[issue];
+ if (to === 'function' || to === 'undefined') return;
+ analysis += issue;
+ psychoAnalyze(subject[issue], session + 1);
+ });
+ }
+ psychoAnalyze(subject, 0);
+ return analysis;
+}
+
+// vim: set softtabstop=4 shiftwidth=4:
diff --git a/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/test/basic.js b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/test/basic.js
new file mode 100644
index 000000000..50c53a13e
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/test/basic.js
@@ -0,0 +1,24 @@
+var test = require('tap').test
+var sigmund = require('../sigmund.js')
+
+
+// occasionally there are duplicates
+// that's an acceptable edge-case. JSON.stringify and util.inspect
+// have some collision potential as well, though less, and collision
+// detection is expensive.
+var hash = '{abc/def/g{0h1i2{jkl'
+var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
+var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
+
+var obj3 = JSON.parse(JSON.stringify(obj1))
+obj3.c = /def/
+obj3.g[2].cycle = obj3
+var cycleHash = '{abc/def/g{0h1i2{jklcycle'
+
+test('basic', function (t) {
+ t.equal(sigmund(obj1), hash)
+ t.equal(sigmund(obj2), hash)
+ t.equal(sigmund(obj3), cycleHash)
+ t.end()
+})
+
diff --git a/node_modules/node-gyp/node_modules/minimatch/package.json b/node_modules/node-gyp/node_modules/minimatch/package.json
index 7358ebfad..8bf46ccae 100644
--- a/node_modules/node-gyp/node_modules/minimatch/package.json
+++ b/node_modules/node-gyp/node_modules/minimatch/package.json
@@ -1,81 +1,58 @@
{
- "_args": [
- [
- "minimatch@1",
- "/Users/rebecca/code/npm/node_modules/node-gyp"
- ]
- ],
- "_from": "minimatch@>=1.0.0 <2.0.0",
- "_id": "minimatch@1.0.0",
- "_inCache": true,
- "_location": "/node-gyp/minimatch",
- "_npmUser": {
- "email": "i@izs.me",
- "name": "isaacs"
- },
- "_npmVersion": "1.4.21",
- "_phantomChildren": {},
- "_requested": {
- "name": "minimatch",
- "raw": "minimatch@1",
- "rawSpec": "1",
- "scope": null,
- "spec": ">=1.0.0 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/node-gyp"
- ],
- "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz",
- "_shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d",
- "_shrinkwrap": null,
- "_spec": "minimatch@1",
- "_where": "/Users/rebecca/code/npm/node_modules/node-gyp",
"author": {
- "email": "i@izs.me",
"name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
"url": "http://blog.izs.me"
},
- "bugs": {
- "url": "https://github.com/isaacs/minimatch/issues"
+ "name": "minimatch",
+ "description": "a glob matcher in javascript",
+ "version": "1.0.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/minimatch.git"
+ },
+ "main": "minimatch.js",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "engines": {
+ "node": "*"
},
"dependencies": {
"lru-cache": "2",
"sigmund": "~1.0.0"
},
- "description": "a glob matcher in javascript",
"devDependencies": {
"tap": ""
},
- "directories": {},
- "dist": {
- "shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d",
- "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz"
- },
- "engines": {
- "node": "*"
- },
- "gitHead": "b374a643976eb55cdc19c60b6dd51ebe9bcc607a",
- "homepage": "https://github.com/isaacs/minimatch",
"license": {
"type": "MIT",
"url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
},
- "main": "minimatch.js",
+ "gitHead": "b374a643976eb55cdc19c60b6dd51ebe9bcc607a",
+ "bugs": {
+ "url": "https://github.com/isaacs/minimatch/issues"
+ },
+ "homepage": "https://github.com/isaacs/minimatch",
+ "_id": "minimatch@1.0.0",
+ "_shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d",
+ "_from": "minimatch@>=1.0.0 <2.0.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
"maintainers": [
{
"name": "isaacs",
"email": "i@izs.me"
}
],
- "name": "minimatch",
- "optionalDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/minimatch.git"
- },
- "scripts": {
- "test": "tap test/*.js"
+ "dist": {
+ "shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d",
+ "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz"
},
- "version": "1.0.0"
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/node_modules/node-gyp/node_modules/path-array/.npmignore b/node_modules/node-gyp/node_modules/path-array/.npmignore
new file mode 100644
index 000000000..07e6e472c
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/.npmignore
@@ -0,0 +1 @@
+/node_modules
diff --git a/node_modules/node-gyp/node_modules/path-array/.travis.yml b/node_modules/node-gyp/node_modules/path-array/.travis.yml
new file mode 100644
index 000000000..c7d8e3d83
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - 0.8
+ - 0.9
+ - 0.10
+ - 0.11
diff --git a/node_modules/node-gyp/node_modules/path-array/History.md b/node_modules/node-gyp/node_modules/path-array/History.md
new file mode 100644
index 000000000..ff93a2a28
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/History.md
@@ -0,0 +1,22 @@
+
+1.0.0 / 2014-11-11
+==================
+
+ * index: add support for a configrable `property` name to use
+ * README: fix Travis badge
+
+0.0.2 / 2013-12-22
+==================
+
+ * README++
+ * test: add unshift() test
+ * test: add more tests
+ * index: ensure that the indexed getters/setters are set up in the constructor
+ * add .travis.yml file
+ * add initial tests
+
+0.0.1 / 2013-12-21
+==================
+
+ * add README.md
+ * initial commit
diff --git a/node_modules/node-gyp/node_modules/path-array/README.md b/node_modules/node-gyp/node_modules/path-array/README.md
new file mode 100644
index 000000000..2595316a1
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/README.md
@@ -0,0 +1,92 @@
+path-array
+==========
+### Treat your `$PATH` like a JavaScript Array
+[![Build Status](https://travis-ci.org/TooTallNate/path-array.svg?branch=master)](https://travis-ci.org/TooTallNate/path-array)
+
+This module provides a JavaScript `Array` implementation that is backed by your
+`$PATH` env variable. That is, you can use regular Array functions like `shift()`,
+`pop()`, `push()`, `unshift()`, etc. to mutate your `$PATH`.
+
+Also works for preparing an `env` object for passing to
+[`child_process.spawn()`][cp.spawn].
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install path-array
+```
+
+
+Example
+-------
+
+Interacting with your own `$PATH` env variable:
+
+``` js
+var PathArray = require('path-array');
+
+// no args uses `process.env` by default
+var p = new PathArray();
+
+console.log(p);
+// [ './node_modules/.bin',
+// '/opt/local/bin',
+// '/opt/local/sbin',
+// '/usr/local/bin',
+// '/usr/local/sbin',
+// '/usr/bin',
+// '/bin',
+// '/usr/sbin',
+// '/sbin',
+// '/usr/local/bin',
+// '/opt/X11/bin' ]
+
+// push another path entry. this function mutates the `process.env.PATH`
+p.unshift('/foo');
+
+console.log(process.env.PATH);
+// '/foo:./node_modules/.bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin'
+```
+
+
+API
+---
+
+### new PathArray([env]) → PathArray
+
+Creates and returns a new `PathArray` instance with the given `env` object. If no
+`env` is specified, then [`process.env`][process.env] is used by default.
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
+
+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.
+
+[process.env]: http://nodejs.org/docs/latest/api/process.html#process_process_env
+[cp.spawn]: http://nodejs.org/docs/latest/api/child_process.html#child_process_child_process_spawn_command_args_options
diff --git a/node_modules/node-gyp/node_modules/path-array/index.js b/node_modules/node-gyp/node_modules/path-array/index.js
new file mode 100644
index 000000000..40b982d2f
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/index.js
@@ -0,0 +1,137 @@
+
+/**
+ * Module dependencies.
+ */
+
+var inherits = require('util').inherits;
+var delimiter = require('path').delimiter || ':';
+var ArrayIndex = require('array-index');
+
+/**
+ * Module exports.
+ */
+
+module.exports = PathArray;
+
+/**
+ * `PathArray` constructor. Treat your `$PATH` like a mutable JavaScript Array!
+ *
+ * @param {Env} env - `process.env` object to use.
+ * @param {String} [property] - optional property name to use (`PATH` by default).
+ * @public
+ */
+
+function PathArray (env, property) {
+ if (!(this instanceof PathArray)) return new PathArray(env);
+ ArrayIndex.call(this);
+
+ this.property = property || 'PATH';
+
+ // overwrite only the `get` operator of the ".length" property
+ Object.defineProperty(this, 'length', {
+ get: this._getLength
+ });
+
+ // store the `process.env` object as a non-enumerable `_env`
+ Object.defineProperty(this, '_env', {
+ value: env || process.env,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+
+ // need to invoke the `length` getter to ensure that the
+ // indexed getters/setters are set up at this point
+ void(this.length);
+}
+
+// inherit from ArrayIndex
+inherits(PathArray, ArrayIndex);
+
+/**
+ * Returns the current $PATH representation as an Array.
+ *
+ * @api private
+ */
+
+PathArray.prototype._array = function () {
+ var path = this._env[this.property];
+ if (!path) return [];
+ return path.split(delimiter);
+};
+
+/**
+ * Sets the `env` object's `PATH` string to the values in the passed in Array
+ * instance.
+ *
+ * @api private
+ */
+
+PathArray.prototype._setArray = function (arr) {
+ // mutate the $PATH
+ this._env[this.property] = arr.join(delimiter);
+};
+
+/**
+ * `.length` getter operation implementation.
+ *
+ * @api private
+ */
+
+PathArray.prototype._getLength = function () {
+ var length = this._array().length;
+
+ // invoke the ArrayIndex internal `set` operator to ensure that
+ // there's getters/setters defined for the determined length so far...
+ this.length = length;
+
+ return length;
+};
+
+/**
+ * ArrayIndex [0] getter operator implementation.
+ *
+ * @api private
+ */
+
+PathArray.prototype.__get__ = function get (index) {
+ return this._array()[index];
+};
+
+/**
+ * ArrayIndex [0]= setter operator implementation.
+ *
+ * @api private
+ */
+
+PathArray.prototype.__set__ = function set (index, value) {
+ var arr = this._array();
+ arr[index] = value;
+ this._setArray(arr);
+ return value;
+};
+
+/**
+ * `toString()` returns the current $PATH string.
+ *
+ * @api public
+ */
+
+PathArray.prototype.toString = function toString () {
+ return this._env[this.property] || '';
+};
+
+// proxy the JavaScript Array functions, and mutate the $PATH
+Object.getOwnPropertyNames(Array.prototype).forEach(function (name) {
+ if ('constructor' == name) return;
+ if ('function' != typeof Array.prototype[name]) return;
+ if (/to(Locale)?String/.test(name)) return;
+ //console.log('proxy %s', name);
+
+ PathArray.prototype[name] = function () {
+ var arr = this._array();
+ var rtn = arr[name].apply(arr, arguments);
+ this._setArray(arr);
+ return rtn;
+ };
+});
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/.npmignore b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/.npmignore
new file mode 100644
index 000000000..3c3629e64
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/.travis.yml b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/.travis.yml
new file mode 100644
index 000000000..99cdc7439
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.11"
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/History.md b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/History.md
new file mode 100644
index 000000000..20b03e9a8
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/History.md
@@ -0,0 +1,39 @@
+
+0.1.1 / 2014-11-03
+==================
+
+ * index: use `%o` debug formatters
+ * .travis: don't test node v0.9.x
+ * README: use svg for Travis badge
+ * add .jshintrc file
+
+0.1.0 / 2013-12-01
+==================
+
+ * add `History.md` file
+ * .travis.yml: test node v0.8-v0.11
+ * add component.json
+ * package: update "main" field
+ * package: beautify
+
+0.0.4 / 2013-09-27
+==================
+
+ * ensure that the `length` property has the same maximum as regular Arrays
+
+0.0.3 / 2013-09-15
+==================
+
+ * add `toArray()`, `toJSON()`, and `toString()` functions
+ * add an `inspect()` function
+
+0.0.2 / 2013-09-15
+==================
+
+ * use "configurable: true"
+ * add `travis.yml` file
+
+0.0.1 / 2013-06-14
+==================
+
+ * Initial release
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/Makefile b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/Makefile
new file mode 100644
index 000000000..0f14dac30
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/Makefile
@@ -0,0 +1,11 @@
+
+build: components index.js
+ @component build --dev
+
+components: component.json
+ @component install --dev
+
+clean:
+ rm -fr build components template.js
+
+.PHONY: clean
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/README.md b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/README.md
new file mode 100644
index 000000000..ecd3498dd
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/README.md
@@ -0,0 +1,156 @@
+array-index
+===========
+### Invoke getter/setter functions on array-like objects
+[![Build Status](https://secure.travis-ci.org/TooTallNate/array-index.svg)](http://travis-ci.org/TooTallNate/array-index)
+
+
+This little module provides an `ArrayIndex` constructor function that you can
+inherit from with your own objects. When a numbered property gets read, then the
+`__get__` function on the object will be invoked. When a numbered property gets
+set, then the `__set__` function on the object will be invoked.
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install array-index
+```
+
+
+Examples
+--------
+
+A quick silly example, using `Math.sqrt()` for the "getter":
+
+``` js
+var ArrayIndex = require('array-index')
+
+// let's just create a singleton instance.
+var a = new ArrayIndex()
+
+// the "__get__" function is invoked for each "a[n]" access.
+// it is given a single argument, the "index" currently being accessed.
+// so here, we're passing in the `Math.sqrt()` function, so accessing
+// "a[9]" will return `Math.sqrt(9)`.
+a.__get__ = Math.sqrt
+
+// the "__get__" and "__set__" functions are only invoked up
+// to "a.length", so we must set that manually.
+a.length = 10
+
+console.log(a)
+// [ 0,
+// 1,
+// 1.4142135623730951,
+// 1.7320508075688772,
+// 2,
+// 2.23606797749979,
+// 2.449489742783178,
+// 2.6457513110645907,
+// 2.8284271247461903,
+// 3,
+// __get__: [Function: sqrt] ]
+```
+
+Here's an example of creating a subclass of `ArrayIndex` using `util.inherits()`:
+
+``` js
+var ArrayIndex = require('array-index')
+var inherits = require('util').inherits
+
+function MyArray (length) {
+ // be sure to call the ArrayIndex constructor in your own constructor
+ ArrayIndex.call(this, length)
+
+ // the "set" object will contain values at indexes previously set,
+ // so that they can be returned in the "getter" function. This is just a
+ // silly example, your subclass will have more meaningful logic.
+ Object.defineProperty(this, 'set', {
+ value: Object.create(null),
+ enumerable: false
+ })
+}
+
+// inherit from the ArrayIndex's prototype
+inherits(MyArray, ArrayIndex)
+
+MyArray.prototype.__get__ = function (index) {
+ if (index in this.set) return this.set[index]
+ return index * 2
+}
+
+MyArray.prototype.__set__ = function (index, v) {
+ this.set[index] = v
+}
+
+
+// and now you can create some instances
+var a = new MyArray(15)
+a[9] = a[10] = a[14] = '_'
+a[0] = 'nate'
+
+console.log(a)
+// [ 'nate', 2, 4, 6, 8, 10, 12, 14, 16, '_', '_', 22, 24, 26, '_' ]
+```
+
+API
+---
+
+The `ArrayIndex` base class is meant to be subclassed, but it also has a few
+convenient functions built-in.
+
+### "length" -> Number
+
+The length of the ArrayIndex instance. The `__get__` and `__set__` functions will
+only be invoked on the object up to this "length". You may set this length at any
+time to adjust the amount range where the getters/setters will be invoked.
+
+### "toArray()" -> Array
+
+Returns a new regular Array instance with the same values that this ArrayIndex
+class would have. This function calls the `__get__` function repeatedly from
+`0...length-1` and returns the "flattened" array instance.
+
+### "toJSON()" -> Array
+
+All `ArrayIndex` instances get basic support for `JSON.stringify()`, which is
+the same as a "flattened" Array being stringified.
+
+### "toString()" -> String
+
+The `toString()` override is basically just `array.toArray().toString()`.
+
+### "format()" -> String
+
+The `inspect()` implementation for the REPL attempts to mimic what a regular
+Array looks like in the REPL.
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2012 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/component.json b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/component.json
new file mode 100644
index 000000000..390d7a7fe
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/component.json
@@ -0,0 +1,22 @@
+{
+ "name": "array-index",
+ "repo": "TooTallNate/array-index",
+ "description": "Invoke getter/setter functions on array-like objects",
+ "keywords": [
+ "index",
+ "array",
+ "getter",
+ "setter",
+ "proxy"
+ ],
+ "version": "0.1.1",
+ "dependencies": {
+ "visionmedia/debug": "*"
+ },
+ "development": {},
+ "license": "MIT",
+ "main": "index.js",
+ "scripts": [
+ "index.js"
+ ]
+}
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/index.js b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/index.js
new file mode 100644
index 000000000..18069c6bc
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/index.js
@@ -0,0 +1,180 @@
+
+/**
+ * Module dependencies.
+ */
+
+var util = require('util')
+var debug = require('debug')('array-index')
+
+/**
+ * JavaScript Array "length" is bound to an unsigned 32-bit int.
+ * See: http://stackoverflow.com/a/6155063/376773
+ */
+
+var MAX_LENGTH = Math.pow(2, 32)
+
+/**
+ * Module exports.
+ */
+
+module.exports = ArrayIndex
+
+/**
+ * Subclass this.
+ */
+
+function ArrayIndex (length) {
+ Object.defineProperty(this, 'length', {
+ get: getLength,
+ set: setLength,
+ enumerable: false,
+ configurable: true
+ })
+
+ Object.defineProperty(this, '__length', {
+ value: 0,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ })
+
+ if (arguments.length > 0) {
+ this.length = length
+ }
+}
+
+/**
+ * You overwrite the "__get__" function in your subclass.
+ */
+
+ArrayIndex.prototype.__get__ = function () {
+ throw new Error('you must implement the __get__ function')
+}
+
+/**
+ * You overwrite the "__set__" function in your subclass.
+ */
+
+ArrayIndex.prototype.__set__ = function () {
+ throw new Error('you must implement the __set__ function')
+}
+
+/**
+ * Converts this array class into a real JavaScript Array. Note that this
+ * is a "flattened" array and your defined getters and setters won't be invoked
+ * when you interact with the returned Array. This function will call the
+ * getter on every array index of the object.
+ *
+ * @return {Array} The flattened array
+ * @api public
+ */
+
+ArrayIndex.prototype.toArray = function toArray () {
+ var i = 0, l = this.length, array = new Array(l)
+ for (; i < l; i++) {
+ array[i] = this[i]
+ }
+ return array
+}
+
+/**
+ * Basic support for `JSON.stringify()`.
+ */
+
+ArrayIndex.prototype.toJSON = function toJSON () {
+ return this.toArray()
+}
+
+/**
+ * toString() override. Use Array.prototype.toString().
+ */
+
+ArrayIndex.prototype.toString = function toString () {
+ var a = this.toArray()
+ return a.toString.apply(a, arguments)
+}
+
+/**
+ * inspect() override. For the REPL.
+ */
+
+ArrayIndex.prototype.inspect = function inspect () {
+ var a = this.toArray()
+ Object.keys(this).forEach(function (k) {
+ a[k] = this[k]
+ }, this)
+ return util.inspect(a)
+}
+
+/**
+ * Getter for the "length" property.
+ * Returns the value of the "__length" property.
+ */
+
+function getLength () {
+ debug('getting "length": %o', this.__length)
+ return this.__length
+}
+
+/**
+ * Setter for the "length" property.
+ * Calls "ensureLength()", then sets the "__length" property.
+ */
+
+function setLength (v) {
+ debug('setting "length": %o', v)
+ return this.__length = ensureLength(v)
+}
+
+/**
+ * Ensures that getters/setters from 0 up to "_length" have been defined
+ * on `ArrayIndex.prototype`.
+ *
+ * @api private
+ */
+
+function ensureLength (_length) {
+ var length
+ if (_length > MAX_LENGTH) {
+ length = MAX_LENGTH
+ } else {
+ length = _length | 0
+ }
+ var cur = ArrayIndex.prototype.__length__ | 0
+ var num = length - cur
+ if (num > 0) {
+ var desc = {}
+ debug('creating a descriptor object with %o entries', num)
+ for (var i = cur; i < length; i++) {
+ desc[i] = setup(i)
+ }
+ debug('done creating descriptor object')
+ debug('calling `Object.defineProperties()` with %o entries', num)
+ Object.defineProperties(ArrayIndex.prototype, desc)
+ debug('finished `Object.defineProperties()`')
+ ArrayIndex.prototype.__length__ = length
+ }
+ return length
+}
+
+/**
+ * Returns a property descriptor for the given "index", with "get" and "set"
+ * functions created within the closure.
+ *
+ * @api private
+ */
+
+function setup (index) {
+ function get () {
+ return this.__get__(index)
+ }
+ function set (v) {
+ return this.__set__(index, v)
+ }
+ return {
+ enumerable: true
+ , configurable: true
+ , get: get
+ , set: set
+ }
+}
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/.npmignore b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/.npmignore
new file mode 100644
index 000000000..7e6163db0
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/.npmignore
@@ -0,0 +1,6 @@
+support
+test
+examples
+example
+*.sock
+dist
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/History.md b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/History.md
new file mode 100644
index 000000000..854c9711c
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/History.md
@@ -0,0 +1,195 @@
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/Makefile b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/Makefile
new file mode 100644
index 000000000..5cf4a5962
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/Makefile
@@ -0,0 +1,36 @@
+
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# applications
+NODE ?= $(shell which node)
+NPM ?= $(NODE) $(shell which npm)
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+all: dist/debug.js
+
+install: node_modules
+
+clean:
+ @rm -rf dist
+
+dist:
+ @mkdir -p $@
+
+dist/debug.js: node_modules browser.js debug.js dist
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > $@
+
+distclean: clean
+ @rm -rf node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(NPM) install
+ @touch node_modules
+
+.PHONY: all install clean distclean
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/Readme.md b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/Readme.md
new file mode 100644
index 000000000..b4f45e3cc
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/Readme.md
@@ -0,0 +1,188 @@
+# debug
+
+ tiny node.js debugging utility modelled after node core's debugging technique.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+ With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+
+ ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Browser support
+
+ Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. Somewhere in the code on your page, include:
+
+```js
+window.myDebug = require("debug");
+```
+
+ ("debug" is a global object in the browser so we give this object a different name.) When your page is open in the browser, type the following in the console:
+
+```js
+myDebug.enable("worker:*")
+```
+
+ Refresh the page. Debug output will continue to be sent to the console until it is disabled by typing `myDebug.disable()` in the console.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
+
+### stderr vs stdout
+
+You can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+### Save debug output to a file
+
+You can save all debug statements to a file by piping them.
+
+Example:
+
+```bash
+$ DEBUG_FD=3 node your-app.js 3> whatever.log
+```
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/bower.json b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/bower.json
new file mode 100644
index 000000000..6af573ff5
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/bower.json
@@ -0,0 +1,28 @@
+{
+ "name": "visionmedia-debug",
+ "main": "dist/debug.js",
+ "version": "2.2.0",
+ "homepage": "https://github.com/visionmedia/debug",
+ "authors": [
+ "TJ Holowaychuk <tj@vision-media.ca>"
+ ],
+ "description": "visionmedia-debug",
+ "moduleType": [
+ "amd",
+ "es6",
+ "globals",
+ "node"
+ ],
+ "keywords": [
+ "visionmedia",
+ "debug"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/browser.js b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/browser.js
new file mode 100644
index 000000000..7c7645221
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/browser.js
@@ -0,0 +1,168 @@
+
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ return ('WebkitAppearance' in document.documentElement.style) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (window.console && (console.firebug || (console.exception && console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ return JSON.stringify(v);
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return args;
+
+ var c = 'color: ' + this.color;
+ args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+ return args;
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage(){
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/component.json b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/component.json
new file mode 100644
index 000000000..ca1063724
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.2.0",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "browser.js",
+ "scripts": [
+ "browser.js",
+ "debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/debug.js b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/debug.js
new file mode 100644
index 000000000..7571a8605
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/debug.js
@@ -0,0 +1,197 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = debug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lowercased letter, i.e. "n".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previously assigned color.
+ */
+
+var prevColor = 0;
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor() {
+ return exports.colors[prevColor++ % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function debug(namespace) {
+
+ // define the `disabled` version
+ function disabled() {
+ }
+ disabled.enabled = false;
+
+ // define the `enabled` version
+ function enabled() {
+
+ var self = enabled;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // add the `color` if not set
+ if (null == self.useColors) self.useColors = exports.useColors();
+ if (null == self.color && self.useColors) self.color = selectColor();
+
+ var args = Array.prototype.slice.call(arguments);
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %o
+ args = ['%o'].concat(args);
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ if ('function' === typeof exports.formatArgs) {
+ args = exports.formatArgs.apply(self, args);
+ }
+ var logFn = enabled.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+ enabled.enabled = true;
+
+ var fn = exports.enabled(namespace) ? enabled : disabled;
+
+ fn.namespace = namespace;
+
+ return fn;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ var split = (namespaces || '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node.js b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node.js
new file mode 100644
index 000000000..1d392a81d
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node.js
@@ -0,0 +1,209 @@
+
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase();
+ if (0 === debugColors.length) {
+ return tty.isatty(fd);
+ } else {
+ return '0' !== debugColors
+ && 'no' !== debugColors
+ && 'false' !== debugColors
+ && 'disabled' !== debugColors;
+ }
+}
+
+/**
+ * Map %o to `util.inspect()`, since Node doesn't do that out of the box.
+ */
+
+var inspect = (4 === util.inspect.length ?
+ // node <= 0.8.x
+ function (v, colors) {
+ return util.inspect(v, void 0, void 0, colors);
+ } :
+ // node > 0.8.x
+ function (v, colors) {
+ return util.inspect(v, { colors: colors });
+ }
+);
+
+exports.formatters.o = function(v) {
+ return inspect(v, this.useColors)
+ .replace(/\s*\n\s*/g, ' ');
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+ var name = this.namespace;
+
+ if (useColors) {
+ var c = this.color;
+
+ args[0] = ' \u001b[3' + c + ';1m' + name + ' '
+ + '\u001b[0m'
+ + args[0] + '\u001b[3' + c + 'm'
+ + ' +' + exports.humanize(this.diff) + '\u001b[0m';
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+ return args;
+}
+
+/**
+ * Invokes `console.error()` with the specified arguments.
+ */
+
+function log() {
+ return stream.write(util.format.apply(this, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/.npmignore b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/.npmignore
new file mode 100644
index 000000000..d1aa0ce42
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/.npmignore
@@ -0,0 +1,5 @@
+node_modules
+test
+History.md
+Makefile
+component.json
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/History.md b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/History.md
new file mode 100644
index 000000000..32fdfc176
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/History.md
@@ -0,0 +1,66 @@
+
+0.7.1 / 2015-04-20
+==================
+
+ * prevent extraordinary long inputs (@evilpacket)
+ * Fixed broken readme link
+
+0.7.0 / 2014-11-24
+==================
+
+ * add time abbreviations, updated tests and readme for the new units
+ * fix example in the readme.
+ * add LICENSE file
+
+0.6.2 / 2013-12-05
+==================
+
+ * Adding repository section to package.json to suppress warning from NPM.
+
+0.6.1 / 2013-05-10
+==================
+
+ * fix singularization [visionmedia]
+
+0.6.0 / 2013-03-15
+==================
+
+ * fix minutes
+
+0.5.1 / 2013-02-24
+==================
+
+ * add component namespace
+
+0.5.0 / 2012-11-09
+==================
+
+ * add short formatting as default and .long option
+ * add .license property to component.json
+ * add version to component.json
+
+0.4.0 / 2012-10-22
+==================
+
+ * add rounding to fix crazy decimals
+
+0.3.0 / 2012-09-07
+==================
+
+ * fix `ms(<String>)` [visionmedia]
+
+0.2.0 / 2012-09-03
+==================
+
+ * add component.json [visionmedia]
+ * add days support [visionmedia]
+ * add hours support [visionmedia]
+ * add minutes support [visionmedia]
+ * add seconds support [visionmedia]
+ * add ms string support [visionmedia]
+ * refactor tests to facilitate ms(number) [visionmedia]
+
+0.1.0 / 2012-03-07
+==================
+
+ * Initial release
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/LICENSE b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/LICENSE
new file mode 100644
index 000000000..6c07561b6
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/README.md b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/README.md
new file mode 100644
index 000000000..9b4fd0358
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/README.md
@@ -0,0 +1,35 @@
+# ms.js: miliseconds conversion utility
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('100') // 100
+```
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download).
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as
+a number (e.g: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of
+equivalent ms is returned.
+
+## License
+
+MIT
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/index.js b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/index.js
new file mode 100644
index 000000000..4f9277169
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/index.js
@@ -0,0 +1,125 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} options
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options){
+ options = options || {};
+ if ('string' == typeof val) return parse(val);
+ return options.long
+ ? long(val)
+ : short(val);
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = '' + str;
+ if (str.length > 10000) return;
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
+ if (!match) return;
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function short(ms) {
+ if (ms >= d) return Math.round(ms / d) + 'd';
+ if (ms >= h) return Math.round(ms / h) + 'h';
+ if (ms >= m) return Math.round(ms / m) + 'm';
+ if (ms >= s) return Math.round(ms / s) + 's';
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function long(ms) {
+ return plural(ms, d, 'day')
+ || plural(ms, h, 'hour')
+ || plural(ms, m, 'minute')
+ || plural(ms, s, 'second')
+ || ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) return;
+ if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/package.json b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/package.json
new file mode 100644
index 000000000..7b5d86dbb
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "ms",
+ "version": "0.7.1",
+ "description": "Tiny ms conversion utility",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/guille/ms.js.git"
+ },
+ "main": "./index",
+ "devDependencies": {
+ "mocha": "*",
+ "expect.js": "*",
+ "serve": "*"
+ },
+ "component": {
+ "scripts": {
+ "ms/index.js": "index.js"
+ }
+ },
+ "readme": "# ms.js: miliseconds conversion utility\n\n```js\nms('2 days') // 172800000\nms('1d') // 86400000\nms('10h') // 36000000\nms('2.5 hrs') // 9000000\nms('2h') // 7200000\nms('1m') // 60000\nms('5s') // 5000\nms('100') // 100\n```\n\n```js\nms(60000) // \"1m\"\nms(2 * 60000) // \"2m\"\nms(ms('10 hours')) // \"10h\"\n```\n\n```js\nms(60000, { long: true }) // \"1 minute\"\nms(2 * 60000, { long: true }) // \"2 minutes\"\nms(ms('10 hours'), { long: true }) // \"10 hours\"\n```\n\n- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download).\n- If a number is supplied to `ms`, a string with a unit is returned.\n- If a string that contains the number is supplied, it returns it as\na number (e.g: it returns `100` for `'100'`).\n- If you pass a string with a number and a valid unit, the number of\nequivalent ms is returned.\n\n## License\n\nMIT\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/guille/ms.js/issues"
+ },
+ "homepage": "https://github.com/guille/ms.js#readme",
+ "_id": "ms@0.7.1",
+ "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "_from": "ms@0.7.1"
+}
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/package.json b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/package.json
new file mode 100644
index 000000000..ebe311fad
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "debug",
+ "version": "2.2.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "contributors": [
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "0.7.1"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "mocha": "*"
+ },
+ "main": "./node.js",
+ "browser": "./browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ },
+ "readme": "# debug\n\n tiny node.js debugging utility modelled after node core's debugging technique.\n\n## Installation\n\n```bash\n$ npm install debug\n```\n\n## Usage\n\n With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.\n\nExample _app.js_:\n\n```js\nvar debug = require('debug')('http')\n , http = require('http')\n , name = 'My App';\n\n// fake app\n\ndebug('booting %s', name);\n\nhttp.createServer(function(req, res){\n debug(req.method + ' ' + req.url);\n res.end('hello\\n');\n}).listen(3000, function(){\n debug('listening');\n});\n\n// fake worker of some kind\n\nrequire('./worker');\n```\n\nExample _worker.js_:\n\n```js\nvar debug = require('debug')('worker');\n\nsetInterval(function(){\n debug('doing some work');\n}, 1000);\n```\n\n The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:\n\n ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)\n\n ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)\n\n#### Windows note\n\n On Windows the environment variable is set using the `set` command.\n\n ```cmd\n set DEBUG=*,-not_this\n ```\n\nThen, run the program to be debugged as usual.\n\n## Millisecond diff\n\n When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the \"+NNNms\" will show you how much time was spent between calls.\n\n ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)\n\n When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:\n\n ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)\n\n## Conventions\n\n If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use \":\" to separate features. For example \"bodyParser\" from Connect would then be \"connect:bodyParser\".\n\n## Wildcards\n\n The `*` character may be used as a wildcard. Suppose for example your library has debuggers named \"connect:bodyParser\", \"connect:compress\", \"connect:session\", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.\n\n You can also exclude specific debuggers by prefixing them with a \"-\" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with \"connect:\".\n\n## Browser support\n\n Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. Somewhere in the code on your page, include:\n\n```js\nwindow.myDebug = require(\"debug\");\n```\n\n (\"debug\" is a global object in the browser so we give this object a different name.) When your page is open in the browser, type the following in the console:\n\n```js\nmyDebug.enable(\"worker:*\")\n```\n\n Refresh the page. Debug output will continue to be sent to the console until it is disabled by typing `myDebug.disable()` in the console.\n\n```js\na = debug('worker:a');\nb = debug('worker:b');\n\nsetInterval(function(){\n a('doing some work');\n}, 1000);\n\nsetInterval(function(){\n b('doing some work');\n}, 1200);\n```\n\n#### Web Inspector Colors\n\n Colors are also enabled on \"Web Inspectors\" that understand the `%c` formatting\n option. These are WebKit web inspectors, Firefox ([since version\n 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))\n and the Firebug plugin for Firefox (any version).\n\n Colored output looks something like:\n\n ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)\n\n### stderr vs stdout\n\nYou can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally:\n\nExample _stdout.js_:\n\n```js\nvar debug = require('debug');\nvar error = debug('app:error');\n\n// by default stderr is used\nerror('goes to stderr!');\n\nvar log = debug('app:log');\n// set this namespace to log via console.log\nlog.log = console.log.bind(console); // don't forget to bind to console!\nlog('goes to stdout');\nerror('still goes to stderr!');\n\n// set all output to go via console.info\n// overrides all per-namespace log settings\ndebug.log = console.info.bind(console);\nerror('now goes to stdout via console.info');\nlog('still goes to stdout, but via console.info now');\n```\n\n### Save debug output to a file\n\nYou can save all debug statements to a file by piping them.\n\nExample:\n\n```bash\n$ DEBUG_FD=3 node your-app.js 3> whatever.log\n```\n\n## Authors\n\n - TJ Holowaychuk\n - Nathan Rajlich\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
+ "readmeFilename": "Readme.md",
+ "bugs": {
+ "url": "https://github.com/visionmedia/debug/issues"
+ },
+ "homepage": "https://github.com/visionmedia/debug#readme",
+ "_id": "debug@2.2.0",
+ "_shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da",
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "_from": "debug@*"
+}
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json
new file mode 100644
index 000000000..6ba9df72c
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "array-index",
+ "description": "Invoke getter/setter functions on array-like objects",
+ "keywords": [
+ "index",
+ "array",
+ "getter",
+ "setter",
+ "proxy"
+ ],
+ "version": "0.1.1",
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://tootallnate.net"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/array-index.git"
+ },
+ "main": "index.js",
+ "scripts": {
+ "test": "node test"
+ },
+ "dependencies": {
+ "debug": "*"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "gitHead": "65a5d884f25b4b7a1608e367d715d713dbd3b3d6",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/array-index/issues"
+ },
+ "homepage": "https://github.com/TooTallNate/array-index",
+ "_id": "array-index@0.1.1",
+ "_shasum": "4d5eaf06cc3d925847cd73d1535c217ba306d3e1",
+ "_from": "array-index@>=0.1.0 <0.2.0",
+ "_npmVersion": "2.1.3",
+ "_nodeVersion": "0.10.32",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "4d5eaf06cc3d925847cd73d1535c217ba306d3e1",
+ "tarball": "http://registry.npmjs.org/array-index/-/array-index-0.1.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/array-index/-/array-index-0.1.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/test.js b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/test.js
new file mode 100644
index 000000000..d9e9c1828
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/test.js
@@ -0,0 +1,76 @@
+
+var ArrayIndex = require('./')
+var inherits = require('util').inherits
+var assert = require('assert')
+
+
+/**
+ * Create a "subclass".
+ */
+
+function Arrayish (length) {
+ ArrayIndex.call(this, length)
+ this.sets = Object.create(null)
+}
+
+// inherit from `ArrayIndex`
+inherits(Arrayish, ArrayIndex)
+
+
+// create an instance and run some tests
+var a = new Arrayish(11)
+
+assert.throws(function () {
+ a[0]
+}, /__get__/)
+
+assert.throws(function () {
+ a[0] = 0
+}, /__set__/)
+
+
+/**
+ * This "getter" function checks if the index has previosly been "set", and if so
+ * returns the index * the value previously set. If the index hasn't been set,
+ * return the index as-is.
+ */
+
+Arrayish.prototype.__get__ = function get (index) {
+ if (index in this.sets) {
+ return +this.sets[index] * index
+ } else {
+ return index
+ }
+}
+
+/**
+ * Store the last value set for this index.
+ */
+
+Arrayish.prototype.__set__ = function set (index, value) {
+ this.sets[index] = value
+}
+
+
+// test getters without being "set"
+assert.equal(0, a[0])
+assert.equal(1, a[1])
+assert.equal(2, a[2])
+assert.equal(3, a[3])
+assert.equal(4, a[4])
+
+// test setters, followed by getters
+a[10] = 1
+assert.equal(10, a[10])
+a[10] = 2
+assert.equal(20, a[10])
+a[10] = 3
+assert.equal(30, a[10])
+
+// test "length"
+assert.equal(11, a.length)
+
+a[4] = 20
+a[6] = 5.55432
+var b = [0, 1, 2, 3, 80, 5, 33.325919999999996, 7, 8, 9, 30]
+assert.equal(JSON.stringify(b), JSON.stringify(a))
diff --git a/node_modules/node-gyp/node_modules/path-array/package.json b/node_modules/node-gyp/node_modules/path-array/package.json
new file mode 100644
index 000000000..41d25482b
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "path-array",
+ "version": "1.0.0",
+ "description": "Treat your $PATH like a JavaScript Array",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha --reporter spec"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/node-path-array.git"
+ },
+ "keywords": [
+ "PATH",
+ "env",
+ "array"
+ ],
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/node-path-array/issues"
+ },
+ "homepage": "https://github.com/TooTallNate/node-path-array",
+ "dependencies": {
+ "array-index": "~0.1.0"
+ },
+ "devDependencies": {
+ "mocha": "~1.16.1"
+ },
+ "gitHead": "5d1fedd54e4413459f67e4a4babb024144cd00d0",
+ "_id": "path-array@1.0.0",
+ "_shasum": "6c14130c33084f0150553c657b38397ab67aaa4e",
+ "_from": "path-array@>=1.0.0 <2.0.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "6c14130c33084f0150553c657b38397ab67aaa4e",
+ "tarball": "http://registry.npmjs.org/path-array/-/path-array-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/path-array/-/path-array-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/node_modules/node-gyp/node_modules/path-array/test/test.js b/node_modules/node-gyp/node_modules/path-array/test/test.js
new file mode 100644
index 000000000..fc1f3736f
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/path-array/test/test.js
@@ -0,0 +1,68 @@
+
+/**
+ * Module dependencies.
+ */
+
+var assert = require('assert');
+var PathArray = require('../');
+var delimiter = require('path').delimiter || ':';
+
+describe('PathArray', function () {
+ it('should use `process.env` by default', function () {
+ var p = new PathArray();
+ assert.equal(p._env, process.env);
+ });
+ it('should return the $PATH string for .toString()', function () {
+ var p = new PathArray();
+ assert.equal(p.toString(), process.env.PATH);
+ });
+ it('should accept an arbitrary `env` object', function () {
+ var env = { PATH: '/foo' + delimiter + '/bar' };
+ var p = new PathArray(env);
+ assert.equal(p.toString(), env.PATH);
+ });
+ it('should work for [n] getter syntax', function () {
+ var env = { PATH: '/foo' + delimiter + '/bar' };
+ var p = new PathArray(env);
+ assert.equal('/foo', p[0]);
+ assert.equal('/bar', p[1]);
+ });
+ it('should work for [n]= setter syntax', function () {
+ var env = { PATH: '/foo' + delimiter + '/bar' };
+ var p = new PathArray(env);
+ p[0] = '/baz';
+ assert.equal('/baz' + delimiter + '/bar', env.PATH);
+ });
+ it('should work with .push()', function () {
+ var env = { PATH: '/foo' + delimiter + '/bar' };
+ var p = new PathArray(env);
+ p.push('/baz');
+ assert.equal('/foo' + delimiter + '/bar' + delimiter + '/baz', env.PATH);
+ });
+ it('should work with .shift()', function () {
+ var env = { PATH: '/foo' + delimiter + '/bar' };
+ var p = new PathArray(env);
+ assert.equal('/foo', p.shift());
+ assert.equal('/bar', env.PATH);
+ });
+ it('should work with .pop()', function () {
+ var env = { PATH: '/foo' + delimiter + '/bar' };
+ var p = new PathArray(env);
+ assert.equal('/bar', p.pop());
+ assert.equal('/foo', env.PATH);
+ });
+ it('should work with .unshift()', function () {
+ var env = { PATH: '/foo' + delimiter + '/bar' };
+ var p = new PathArray(env);
+ p.unshift('/baz');
+ assert.equal('/baz' + delimiter + '/foo' + delimiter + '/bar', env.PATH);
+ });
+ it('should be able to specify property name to use with second argument', function () {
+ var env = { PYTHONPATH: '/foo' };
+ var p = new PathArray(env, 'PYTHONPATH');
+ assert.equal(1, p.length);
+ p.push('/baz');
+ assert.equal(2, p.length);
+ assert.equal('/foo' + delimiter + '/baz', env.PYTHONPATH);
+ });
+});
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENCE b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENCE
new file mode 100644
index 000000000..74489e2e2
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENCE
@@ -0,0 +1,25 @@
+Copyright (c) Isaac Z. Schlueter
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENSE b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENSE
new file mode 100644
index 000000000..19129e315
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/README.md b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/README.md
new file mode 100644
index 000000000..c16e9c468
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/README.md
@@ -0,0 +1,14 @@
+# block-stream
+
+A stream of blocks.
+
+Write data into it, and it'll output data in buffer blocks the size you
+specify, padding with zeroes if necessary.
+
+```javascript
+var block = new BlockStream(512)
+fs.createReadStream("some-file").pipe(block)
+block.pipe(fs.createWriteStream("block-file"))
+```
+
+When `.end()` or `.flush()` is called, it'll pad the block with zeroes.
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js
new file mode 100644
index 000000000..9328844aa
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js
@@ -0,0 +1,70 @@
+var BlockStream = require("../block-stream.js")
+
+var blockSizes = [16, 25, 1024]
+ , writeSizes = [4, 8, 15, 16, 17, 64, 100]
+ , writeCounts = [1, 10, 100]
+ , tap = require("tap")
+
+writeCounts.forEach(function (writeCount) {
+blockSizes.forEach(function (blockSize) {
+writeSizes.forEach(function (writeSize) {
+ tap.test("writeSize=" + writeSize +
+ " blockSize="+blockSize +
+ " writeCount="+writeCount, function (t) {
+ var f = new BlockStream(blockSize, {nopad: true })
+
+ var actualChunks = 0
+ var actualBytes = 0
+ var timeouts = 0
+
+ f.on("data", function (c) {
+ timeouts ++
+
+ actualChunks ++
+ actualBytes += c.length
+
+ // make sure that no data gets corrupted, and basic sanity
+ var before = c.toString()
+ // simulate a slow write operation
+ f.pause()
+ setTimeout(function () {
+ timeouts --
+
+ var after = c.toString()
+ t.equal(after, before, "should not change data")
+
+ // now corrupt it, to find leaks.
+ for (var i = 0; i < c.length; i ++) {
+ c[i] = "x".charCodeAt(0)
+ }
+ f.resume()
+ }, 100)
+ })
+
+ f.on("end", function () {
+ // round up to the nearest block size
+ var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
+ var expectBytes = writeSize * writeCount * 2
+ t.equal(actualBytes, expectBytes,
+ "bytes=" + expectBytes + " writeSize=" + writeSize)
+ t.equal(actualChunks, expectChunks,
+ "chunks=" + expectChunks + " writeSize=" + writeSize)
+
+ // wait for all the timeout checks to finish, then end the test
+ setTimeout(function WAIT () {
+ if (timeouts > 0) return setTimeout(WAIT)
+ t.end()
+ }, 100)
+ })
+
+ for (var i = 0; i < writeCount; i ++) {
+ var a = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
+ var b = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
+ f.write(a)
+ f.write(b)
+ }
+ f.end()
+ })
+}) }) })
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/block-stream.js b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/block-stream.js
new file mode 100644
index 000000000..1141f3a84
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/block-stream.js
@@ -0,0 +1,68 @@
+var BlockStream = require("../block-stream.js")
+
+var blockSizes = [16, 25, 1024]
+ , writeSizes = [4, 8, 15, 16, 17, 64, 100]
+ , writeCounts = [1, 10, 100]
+ , tap = require("tap")
+
+writeCounts.forEach(function (writeCount) {
+blockSizes.forEach(function (blockSize) {
+writeSizes.forEach(function (writeSize) {
+ tap.test("writeSize=" + writeSize +
+ " blockSize="+blockSize +
+ " writeCount="+writeCount, function (t) {
+ var f = new BlockStream(blockSize, {nopad: true })
+
+ var actualChunks = 0
+ var actualBytes = 0
+ var timeouts = 0
+
+ f.on("data", function (c) {
+ timeouts ++
+
+ actualChunks ++
+ actualBytes += c.length
+
+ // make sure that no data gets corrupted, and basic sanity
+ var before = c.toString()
+ // simulate a slow write operation
+ setTimeout(function () {
+ timeouts --
+
+ var after = c.toString()
+ t.equal(after, before, "should not change data")
+
+ // now corrupt it, to find leaks.
+ for (var i = 0; i < c.length; i ++) {
+ c[i] = "x".charCodeAt(0)
+ }
+ }, 100)
+ })
+
+ f.on("end", function () {
+ // round up to the nearest block size
+ var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
+ var expectBytes = writeSize * writeCount * 2
+ t.equal(actualBytes, expectBytes,
+ "bytes=" + expectBytes + " writeSize=" + writeSize)
+ t.equal(actualChunks, expectChunks,
+ "chunks=" + expectChunks + " writeSize=" + writeSize)
+
+ // wait for all the timeout checks to finish, then end the test
+ setTimeout(function WAIT () {
+ if (timeouts > 0) return setTimeout(WAIT)
+ t.end()
+ }, 100)
+ })
+
+ for (var i = 0; i < writeCount; i ++) {
+ var a = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
+ var b = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
+ f.write(a)
+ f.write(b)
+ }
+ f.end()
+ })
+}) }) })
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js
new file mode 100644
index 000000000..93e4068ee
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js
@@ -0,0 +1,70 @@
+var BlockStream = require("dropper")
+
+var blockSizes = [16, 25, 1024]
+ , writeSizes = [4, 8, 15, 16, 17, 64, 100]
+ , writeCounts = [1, 10, 100]
+ , tap = require("tap")
+
+writeCounts.forEach(function (writeCount) {
+blockSizes.forEach(function (blockSize) {
+writeSizes.forEach(function (writeSize) {
+ tap.test("writeSize=" + writeSize +
+ " blockSize="+blockSize +
+ " writeCount="+writeCount, function (t) {
+ var f = new BlockStream(blockSize, {nopad: true })
+
+ var actualChunks = 0
+ var actualBytes = 0
+ var timeouts = 0
+
+ f.on("data", function (c) {
+ timeouts ++
+
+ actualChunks ++
+ actualBytes += c.length
+
+ // make sure that no data gets corrupted, and basic sanity
+ var before = c.toString()
+ // simulate a slow write operation
+ f.pause()
+ setTimeout(function () {
+ timeouts --
+
+ var after = c.toString()
+ t.equal(after, before, "should not change data")
+
+ // now corrupt it, to find leaks.
+ for (var i = 0; i < c.length; i ++) {
+ c[i] = "x".charCodeAt(0)
+ }
+ f.resume()
+ }, 100)
+ })
+
+ f.on("end", function () {
+ // round up to the nearest block size
+ var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
+ var expectBytes = writeSize * writeCount * 2
+ t.equal(actualBytes, expectBytes,
+ "bytes=" + expectBytes + " writeSize=" + writeSize)
+ t.equal(actualChunks, expectChunks,
+ "chunks=" + expectChunks + " writeSize=" + writeSize)
+
+ // wait for all the timeout checks to finish, then end the test
+ setTimeout(function WAIT () {
+ if (timeouts > 0) return setTimeout(WAIT)
+ t.end()
+ }, 100)
+ })
+
+ for (var i = 0; i < writeCount; i ++) {
+ var a = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
+ var b = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
+ f.write(a)
+ f.write(b)
+ }
+ f.end()
+ })
+}) }) })
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/dropper.js b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/dropper.js
new file mode 100644
index 000000000..55fa13305
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/bench/dropper.js
@@ -0,0 +1,68 @@
+var BlockStream = require("dropper")
+
+var blockSizes = [16, 25, 1024]
+ , writeSizes = [4, 8, 15, 16, 17, 64, 100]
+ , writeCounts = [1, 10, 100]
+ , tap = require("tap")
+
+writeCounts.forEach(function (writeCount) {
+blockSizes.forEach(function (blockSize) {
+writeSizes.forEach(function (writeSize) {
+ tap.test("writeSize=" + writeSize +
+ " blockSize="+blockSize +
+ " writeCount="+writeCount, function (t) {
+ var f = new BlockStream(blockSize, {nopad: true })
+
+ var actualChunks = 0
+ var actualBytes = 0
+ var timeouts = 0
+
+ f.on("data", function (c) {
+ timeouts ++
+
+ actualChunks ++
+ actualBytes += c.length
+
+ // make sure that no data gets corrupted, and basic sanity
+ var before = c.toString()
+ // simulate a slow write operation
+ setTimeout(function () {
+ timeouts --
+
+ var after = c.toString()
+ t.equal(after, before, "should not change data")
+
+ // now corrupt it, to find leaks.
+ for (var i = 0; i < c.length; i ++) {
+ c[i] = "x".charCodeAt(0)
+ }
+ }, 100)
+ })
+
+ f.on("end", function () {
+ // round up to the nearest block size
+ var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
+ var expectBytes = writeSize * writeCount * 2
+ t.equal(actualBytes, expectBytes,
+ "bytes=" + expectBytes + " writeSize=" + writeSize)
+ t.equal(actualChunks, expectChunks,
+ "chunks=" + expectChunks + " writeSize=" + writeSize)
+
+ // wait for all the timeout checks to finish, then end the test
+ setTimeout(function WAIT () {
+ if (timeouts > 0) return setTimeout(WAIT)
+ t.end()
+ }, 100)
+ })
+
+ for (var i = 0; i < writeCount; i ++) {
+ var a = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
+ var b = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
+ f.write(a)
+ f.write(b)
+ }
+ f.end()
+ })
+}) }) })
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/block-stream.js b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/block-stream.js
new file mode 100644
index 000000000..008de035c
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/block-stream.js
@@ -0,0 +1,209 @@
+// write data to it, and it'll emit data in 512 byte blocks.
+// if you .end() or .flush(), it'll emit whatever it's got,
+// padded with nulls to 512 bytes.
+
+module.exports = BlockStream
+
+var Stream = require("stream").Stream
+ , inherits = require("inherits")
+ , assert = require("assert").ok
+ , debug = process.env.DEBUG ? console.error : function () {}
+
+function BlockStream (size, opt) {
+ this.writable = this.readable = true
+ this._opt = opt || {}
+ this._chunkSize = size || 512
+ this._offset = 0
+ this._buffer = []
+ this._bufferLength = 0
+ if (this._opt.nopad) this._zeroes = false
+ else {
+ this._zeroes = new Buffer(this._chunkSize)
+ for (var i = 0; i < this._chunkSize; i ++) {
+ this._zeroes[i] = 0
+ }
+ }
+}
+
+inherits(BlockStream, Stream)
+
+BlockStream.prototype.write = function (c) {
+ // debug(" BS write", c)
+ if (this._ended) throw new Error("BlockStream: write after end")
+ if (c && !Buffer.isBuffer(c)) c = new Buffer(c + "")
+ if (c.length) {
+ this._buffer.push(c)
+ this._bufferLength += c.length
+ }
+ // debug("pushed onto buffer", this._bufferLength)
+ if (this._bufferLength >= this._chunkSize) {
+ if (this._paused) {
+ // debug(" BS paused, return false, need drain")
+ this._needDrain = true
+ return false
+ }
+ this._emitChunk()
+ }
+ return true
+}
+
+BlockStream.prototype.pause = function () {
+ // debug(" BS pausing")
+ this._paused = true
+}
+
+BlockStream.prototype.resume = function () {
+ // debug(" BS resume")
+ this._paused = false
+ return this._emitChunk()
+}
+
+BlockStream.prototype.end = function (chunk) {
+ // debug("end", chunk)
+ if (typeof chunk === "function") cb = chunk, chunk = null
+ if (chunk) this.write(chunk)
+ this._ended = true
+ this.flush()
+}
+
+BlockStream.prototype.flush = function () {
+ this._emitChunk(true)
+}
+
+BlockStream.prototype._emitChunk = function (flush) {
+ // debug("emitChunk flush=%j emitting=%j paused=%j", flush, this._emitting, this._paused)
+
+ // emit a <chunkSize> chunk
+ if (flush && this._zeroes) {
+ // debug(" BS push zeroes", this._bufferLength)
+ // push a chunk of zeroes
+ var padBytes = (this._bufferLength % this._chunkSize)
+ if (padBytes !== 0) padBytes = this._chunkSize - padBytes
+ if (padBytes > 0) {
+ // debug("padBytes", padBytes, this._zeroes.slice(0, padBytes))
+ this._buffer.push(this._zeroes.slice(0, padBytes))
+ this._bufferLength += padBytes
+ // debug(this._buffer[this._buffer.length - 1].length, this._bufferLength)
+ }
+ }
+
+ if (this._emitting || this._paused) return
+ this._emitting = true
+
+ // debug(" BS entering loops")
+ var bufferIndex = 0
+ while (this._bufferLength >= this._chunkSize &&
+ (flush || !this._paused)) {
+ // debug(" BS data emission loop", this._bufferLength)
+
+ var out
+ , outOffset = 0
+ , outHas = this._chunkSize
+
+ while (outHas > 0 && (flush || !this._paused) ) {
+ // debug(" BS data inner emit loop", this._bufferLength)
+ var cur = this._buffer[bufferIndex]
+ , curHas = cur.length - this._offset
+ // debug("cur=", cur)
+ // debug("curHas=%j", curHas)
+ // If it's not big enough to fill the whole thing, then we'll need
+ // to copy multiple buffers into one. However, if it is big enough,
+ // then just slice out the part we want, to save unnecessary copying.
+ // Also, need to copy if we've already done some copying, since buffers
+ // can't be joined like cons strings.
+ if (out || curHas < outHas) {
+ out = out || new Buffer(this._chunkSize)
+ cur.copy(out, outOffset,
+ this._offset, this._offset + Math.min(curHas, outHas))
+ } else if (cur.length === outHas && this._offset === 0) {
+ // shortcut -- cur is exactly long enough, and no offset.
+ out = cur
+ } else {
+ // slice out the piece of cur that we need.
+ out = cur.slice(this._offset, this._offset + outHas)
+ }
+
+ if (curHas > outHas) {
+ // means that the current buffer couldn't be completely output
+ // update this._offset to reflect how much WAS written
+ this._offset += outHas
+ outHas = 0
+ } else {
+ // output the entire current chunk.
+ // toss it away
+ outHas -= curHas
+ outOffset += curHas
+ bufferIndex ++
+ this._offset = 0
+ }
+ }
+
+ this._bufferLength -= this._chunkSize
+ assert(out.length === this._chunkSize)
+ // debug("emitting data", out)
+ // debug(" BS emitting, paused=%j", this._paused, this._bufferLength)
+ this.emit("data", out)
+ out = null
+ }
+ // debug(" BS out of loops", this._bufferLength)
+
+ // whatever is left, it's not enough to fill up a block, or we're paused
+ this._buffer = this._buffer.slice(bufferIndex)
+ if (this._paused) {
+ // debug(" BS paused, leaving", this._bufferLength)
+ this._needsDrain = true
+ this._emitting = false
+ return
+ }
+
+ // if flushing, and not using null-padding, then need to emit the last
+ // chunk(s) sitting in the queue. We know that it's not enough to
+ // fill up a whole block, because otherwise it would have been emitted
+ // above, but there may be some offset.
+ var l = this._buffer.length
+ if (flush && !this._zeroes && l) {
+ if (l === 1) {
+ if (this._offset) {
+ this.emit("data", this._buffer[0].slice(this._offset))
+ } else {
+ this.emit("data", this._buffer[0])
+ }
+ } else {
+ var outHas = this._bufferLength
+ , out = new Buffer(outHas)
+ , outOffset = 0
+ for (var i = 0; i < l; i ++) {
+ var cur = this._buffer[i]
+ , curHas = cur.length - this._offset
+ cur.copy(out, outOffset, this._offset)
+ this._offset = 0
+ outOffset += curHas
+ this._bufferLength -= curHas
+ }
+ this.emit("data", out)
+ }
+ // truncate
+ this._buffer.length = 0
+ this._bufferLength = 0
+ this._offset = 0
+ }
+
+ // now either drained or ended
+ // debug("either draining, or ended", this._bufferLength, this._ended)
+ // means that we've flushed out all that we can so far.
+ if (this._needDrain) {
+ // debug("emitting drain", this._bufferLength)
+ this._needDrain = false
+ this.emit("drain")
+ }
+
+ if ((this._bufferLength === 0) && this._ended && !this._endEmitted) {
+ // debug("emitting end", this._bufferLength)
+ this._endEmitted = true
+ this.emit("end")
+ }
+
+ this._emitting = false
+
+ // debug(" BS no longer emitting", flush, this._paused, this._emitting, this._bufferLength, this._chunkSize)
+}
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/package.json b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/package.json
new file mode 100644
index 000000000..97d9d42ab
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/package.json
@@ -0,0 +1,55 @@
+{
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "name": "block-stream",
+ "description": "a stream of blocks",
+ "version": "0.0.8",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/block-stream.git"
+ },
+ "engines": {
+ "node": "0.4 || >=0.5.8"
+ },
+ "main": "block-stream.js",
+ "dependencies": {
+ "inherits": "~2.0.0"
+ },
+ "devDependencies": {
+ "tap": "0.x"
+ },
+ "scripts": {
+ "test": "tap test/"
+ },
+ "license": "ISC",
+ "gitHead": "b35520314f4763af0788d65a846bb43d9c0a8f02",
+ "bugs": {
+ "url": "https://github.com/isaacs/block-stream/issues"
+ },
+ "homepage": "https://github.com/isaacs/block-stream#readme",
+ "_id": "block-stream@0.0.8",
+ "_shasum": "0688f46da2bbf9cff0c4f68225a0cb95cbe8a46b",
+ "_from": "block-stream@*",
+ "_npmVersion": "2.10.0",
+ "_nodeVersion": "2.0.1",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ "dist": {
+ "shasum": "0688f46da2bbf9cff0c4f68225a0cb95cbe8a46b",
+ "tarball": "http://registry.npmjs.org/block-stream/-/block-stream-0.0.8.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.8.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/basic.js b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/basic.js
new file mode 100644
index 000000000..b4b930511
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/basic.js
@@ -0,0 +1,27 @@
+var tap = require("tap")
+ , BlockStream = require("../block-stream.js")
+
+tap.test("basic test", function (t) {
+ var b = new BlockStream(16)
+ var fs = require("fs")
+ var fstr = fs.createReadStream(__filename, {encoding: "utf8"})
+ fstr.pipe(b)
+
+ var stat
+ t.doesNotThrow(function () {
+ stat = fs.statSync(__filename)
+ }, "stat should not throw")
+
+ var totalBytes = 0
+ b.on("data", function (c) {
+ t.equal(c.length, 16, "chunks should be 16 bytes long")
+ t.type(c, Buffer, "chunks should be buffer objects")
+ totalBytes += c.length
+ })
+ b.on("end", function () {
+ var expectedBytes = stat.size + (16 - stat.size % 16)
+ t.equal(totalBytes, expectedBytes, "Should be multiple of 16")
+ t.end()
+ })
+
+})
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js
new file mode 100644
index 000000000..7a8de88b5
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js
@@ -0,0 +1,68 @@
+var BlockStream = require("../block-stream.js")
+
+var blockSizes = [16]//, 25]//, 1024]
+ , writeSizes = [4, 15, 16, 17, 64 ]//, 64, 100]
+ , writeCounts = [1, 10]//, 100]
+ , tap = require("tap")
+
+writeCounts.forEach(function (writeCount) {
+blockSizes.forEach(function (blockSize) {
+writeSizes.forEach(function (writeSize) {
+ tap.test("writeSize=" + writeSize +
+ " blockSize="+blockSize +
+ " writeCount="+writeCount, function (t) {
+ var f = new BlockStream(blockSize, {nopad: true })
+
+ var actualChunks = 0
+ var actualBytes = 0
+ var timeouts = 0
+
+ f.on("data", function (c) {
+ timeouts ++
+
+ actualChunks ++
+ actualBytes += c.length
+
+ // make sure that no data gets corrupted, and basic sanity
+ var before = c.toString()
+ // simulate a slow write operation
+ setTimeout(function () {
+ timeouts --
+
+ var after = c.toString()
+ t.equal(after, before, "should not change data")
+
+ // now corrupt it, to find leaks.
+ for (var i = 0; i < c.length; i ++) {
+ c[i] = "x".charCodeAt(0)
+ }
+ }, 100)
+ })
+
+ f.on("end", function () {
+ // round up to the nearest block size
+ var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
+ var expectBytes = writeSize * writeCount * 2
+ t.equal(actualBytes, expectBytes,
+ "bytes=" + expectBytes + " writeSize=" + writeSize)
+ t.equal(actualChunks, expectChunks,
+ "chunks=" + expectChunks + " writeSize=" + writeSize)
+
+ // wait for all the timeout checks to finish, then end the test
+ setTimeout(function WAIT () {
+ if (timeouts > 0) return setTimeout(WAIT)
+ t.end()
+ }, 100)
+ })
+
+ for (var i = 0; i < writeCount; i ++) {
+ var a = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
+ var b = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
+ f.write(a)
+ f.write(b)
+ }
+ f.end()
+ })
+}) }) })
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/nopad.js b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/nopad.js
new file mode 100644
index 000000000..6d38429fb
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/nopad.js
@@ -0,0 +1,57 @@
+var BlockStream = require("../")
+var tap = require("tap")
+
+
+tap.test("don't pad, small writes", function (t) {
+ var f = new BlockStream(16, { nopad: true })
+ t.plan(1)
+
+ f.on("data", function (c) {
+ t.equal(c.toString(), "abc", "should get 'abc'")
+ })
+
+ f.on("end", function () { t.end() })
+
+ f.write(new Buffer("a"))
+ f.write(new Buffer("b"))
+ f.write(new Buffer("c"))
+ f.end()
+})
+
+tap.test("don't pad, exact write", function (t) {
+ var f = new BlockStream(16, { nopad: true })
+ t.plan(1)
+
+ var first = true
+ f.on("data", function (c) {
+ if (first) {
+ first = false
+ t.equal(c.toString(), "abcdefghijklmnop", "first chunk")
+ } else {
+ t.fail("should only get one")
+ }
+ })
+
+ f.on("end", function () { t.end() })
+
+ f.end(new Buffer("abcdefghijklmnop"))
+})
+
+tap.test("don't pad, big write", function (t) {
+ var f = new BlockStream(16, { nopad: true })
+ t.plan(2)
+
+ var first = true
+ f.on("data", function (c) {
+ if (first) {
+ first = false
+ t.equal(c.toString(), "abcdefghijklmnop", "first chunk")
+ } else {
+ t.equal(c.toString(), "q")
+ }
+ })
+
+ f.on("end", function () { t.end() })
+
+ f.end(new Buffer("abcdefghijklmnopq"))
+})
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/pause-resume.js b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/pause-resume.js
new file mode 100644
index 000000000..64d0d091d
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/pause-resume.js
@@ -0,0 +1,73 @@
+var BlockStream = require("../block-stream.js")
+
+var blockSizes = [16]
+ , writeSizes = [15, 16, 17]
+ , writeCounts = [1, 10]//, 100]
+ , tap = require("tap")
+
+writeCounts.forEach(function (writeCount) {
+blockSizes.forEach(function (blockSize) {
+writeSizes.forEach(function (writeSize) {
+ tap.test("writeSize=" + writeSize +
+ " blockSize="+blockSize +
+ " writeCount="+writeCount, function (t) {
+ var f = new BlockStream(blockSize)
+
+ var actualChunks = 0
+ var actualBytes = 0
+ var timeouts = 0
+ var paused = false
+
+ f.on("data", function (c) {
+ timeouts ++
+ t.notOk(paused, "should not be paused when emitting data")
+
+ actualChunks ++
+ actualBytes += c.length
+
+ // make sure that no data gets corrupted, and basic sanity
+ var before = c.toString()
+ // simulate a slow write operation
+ paused = true
+ f.pause()
+ process.nextTick(function () {
+ var after = c.toString()
+ t.equal(after, before, "should not change data")
+
+ // now corrupt it, to find leaks.
+ for (var i = 0; i < c.length; i ++) {
+ c[i] = "x".charCodeAt(0)
+ }
+ paused = false
+ f.resume()
+ timeouts --
+ })
+ })
+
+ f.on("end", function () {
+ // round up to the nearest block size
+ var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
+ var expectBytes = expectChunks * blockSize
+ t.equal(actualBytes, expectBytes,
+ "bytes=" + expectBytes + " writeSize=" + writeSize)
+ t.equal(actualChunks, expectChunks,
+ "chunks=" + expectChunks + " writeSize=" + writeSize)
+
+ // wait for all the timeout checks to finish, then end the test
+ setTimeout(function WAIT () {
+ if (timeouts > 0) return setTimeout(WAIT)
+ t.end()
+ }, 200)
+ })
+
+ for (var i = 0; i < writeCount; i ++) {
+ var a = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
+ var b = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
+ f.write(a)
+ f.write(b)
+ }
+ f.end()
+ })
+}) }) })
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/thorough.js b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/thorough.js
new file mode 100644
index 000000000..1cc9ea08a
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/thorough.js
@@ -0,0 +1,68 @@
+var BlockStream = require("../block-stream.js")
+
+var blockSizes = [16]//, 25]//, 1024]
+ , writeSizes = [4, 15, 16, 17, 64 ]//, 64, 100]
+ , writeCounts = [1, 10]//, 100]
+ , tap = require("tap")
+
+writeCounts.forEach(function (writeCount) {
+blockSizes.forEach(function (blockSize) {
+writeSizes.forEach(function (writeSize) {
+ tap.test("writeSize=" + writeSize +
+ " blockSize="+blockSize +
+ " writeCount="+writeCount, function (t) {
+ var f = new BlockStream(blockSize)
+
+ var actualChunks = 0
+ var actualBytes = 0
+ var timeouts = 0
+
+ f.on("data", function (c) {
+ timeouts ++
+
+ actualChunks ++
+ actualBytes += c.length
+
+ // make sure that no data gets corrupted, and basic sanity
+ var before = c.toString()
+ // simulate a slow write operation
+ setTimeout(function () {
+ timeouts --
+
+ var after = c.toString()
+ t.equal(after, before, "should not change data")
+
+ // now corrupt it, to find leaks.
+ for (var i = 0; i < c.length; i ++) {
+ c[i] = "x".charCodeAt(0)
+ }
+ }, 100)
+ })
+
+ f.on("end", function () {
+ // round up to the nearest block size
+ var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
+ var expectBytes = expectChunks * blockSize
+ t.equal(actualBytes, expectBytes,
+ "bytes=" + expectBytes + " writeSize=" + writeSize)
+ t.equal(actualChunks, expectChunks,
+ "chunks=" + expectChunks + " writeSize=" + writeSize)
+
+ // wait for all the timeout checks to finish, then end the test
+ setTimeout(function WAIT () {
+ if (timeouts > 0) return setTimeout(WAIT)
+ t.end()
+ }, 100)
+ })
+
+ for (var i = 0; i < writeCount; i ++) {
+ var a = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
+ var b = new Buffer(writeSize);
+ for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
+ f.write(a)
+ f.write(b)
+ }
+ f.end()
+ })
+}) }) })
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/two-stream.js b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/two-stream.js
new file mode 100644
index 000000000..c6db79a43
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/test/two-stream.js
@@ -0,0 +1,59 @@
+var log = console.log,
+ assert = require( 'assert' ),
+ BlockStream = require("../block-stream.js"),
+ isize = 0, tsize = 0, fsize = 0, psize = 0, i = 0,
+ filter = null, paper = null, stack = null,
+
+// a source data buffer
+tsize = 1 * 1024; // <- 1K
+stack = new Buffer( tsize );
+for ( ; i < tsize; i++) stack[i] = "x".charCodeAt(0);
+
+isize = 1 * 1024; // <- initial packet size with 4K no bug!
+fsize = 2 * 1024 ; // <- first block-stream size
+psize = Math.ceil( isize / 6 ); // <- second block-stream size
+
+fexpected = Math.ceil( tsize / fsize ); // <- packets expected for first
+pexpected = Math.ceil( tsize / psize ); // <- packets expected for second
+
+
+filter = new BlockStream( fsize, { nopad : true } );
+paper = new BlockStream( psize, { nopad : true } );
+
+
+var fcounter = 0;
+filter.on( 'data', function (c) {
+ // verify that they're not null-padded
+ for (var i = 0; i < c.length; i ++) {
+ assert.strictEqual(c[i], "x".charCodeAt(0))
+ }
+ ++fcounter;
+} );
+
+var pcounter = 0;
+paper.on( 'data', function (c) {
+ // verify that they're not null-padded
+ for (var i = 0; i < c.length; i ++) {
+ assert.strictEqual(c[i], "x".charCodeAt(0))
+ }
+ ++pcounter;
+} );
+
+filter.pipe( paper );
+
+filter.on( 'end', function () {
+ log("fcounter: %s === %s", fcounter, fexpected)
+ assert.strictEqual( fcounter, fexpected );
+} );
+
+paper.on( 'end', function () {
+ log("pcounter: %s === %s", pcounter, pexpected);
+ assert.strictEqual( pcounter, pexpected );
+} );
+
+
+for ( i = 0, j = isize; j <= tsize; j += isize ) {
+ filter.write( stack.slice( j - isize, j ) );
+}
+
+filter.end();
diff --git a/node_modules/node-gyp/node_modules/tar/package.json b/node_modules/node-gyp/node_modules/tar/package.json
index c8bfe8fda..7fab5394c 100644
--- a/node_modules/node-gyp/node_modules/tar/package.json
+++ b/node_modules/node-gyp/node_modules/tar/package.json
@@ -1,66 +1,46 @@
{
- "_args": [
- [
- "tar@^1.0.0",
- "/Users/rebecca/code/npm/node_modules/node-gyp"
- ]
- ],
- "_from": "tar@>=1.0.0 <2.0.0",
- "_id": "tar@1.0.3",
- "_inCache": true,
- "_location": "/node-gyp/tar",
- "_nodeVersion": "0.10.33",
- "_npmUser": {
- "email": "ogd@aoaioxxysz.net",
- "name": "othiym23"
- },
- "_npmVersion": "2.1.10",
- "_phantomChildren": {},
- "_requested": {
- "name": "tar",
- "raw": "tar@^1.0.0",
- "rawSpec": "^1.0.0",
- "scope": null,
- "spec": ">=1.0.0 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/node-gyp"
- ],
- "_resolved": "https://registry.npmjs.org/tar/-/tar-1.0.3.tgz",
- "_shasum": "15bcdab244fa4add44e4244a0176edb8aa9a2b44",
- "_shrinkwrap": null,
- "_spec": "tar@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/node-gyp",
"author": {
- "email": "i@izs.me",
"name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
"url": "http://blog.izs.me/"
},
- "bugs": {
- "url": "https://github.com/isaacs/node-tar/issues"
+ "name": "tar",
+ "description": "tar for node",
+ "version": "1.0.3",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-tar.git"
+ },
+ "main": "tar.js",
+ "scripts": {
+ "test": "tap test/*.js"
},
"dependencies": {
"block-stream": "*",
"fstream": "^1.0.2",
"inherits": "2"
},
- "description": "tar for node",
"devDependencies": {
"graceful-fs": "^3.0.2",
- "mkdirp": "^0.5.0",
"rimraf": "1.x",
- "tap": "0.x"
- },
- "directories": {},
- "dist": {
- "shasum": "15bcdab244fa4add44e4244a0176edb8aa9a2b44",
- "tarball": "http://registry.npmjs.org/tar/-/tar-1.0.3.tgz"
+ "tap": "0.x",
+ "mkdirp": "^0.5.0"
},
+ "license": "BSD",
"gitHead": "f4151128c585da236c6b1e278b762ecaedc20c15",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-tar/issues"
+ },
"homepage": "https://github.com/isaacs/node-tar",
- "license": "BSD",
- "main": "tar.js",
+ "_id": "tar@1.0.3",
+ "_shasum": "15bcdab244fa4add44e4244a0176edb8aa9a2b44",
+ "_from": "tar@>=1.0.0 <2.0.0",
+ "_npmVersion": "2.1.10",
+ "_nodeVersion": "0.10.33",
+ "_npmUser": {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ },
"maintainers": [
{
"name": "isaacs",
@@ -71,14 +51,11 @@
"email": "ogd@aoaioxxysz.net"
}
],
- "name": "tar",
- "optionalDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-tar.git"
- },
- "scripts": {
- "test": "tap test/*.js"
+ "dist": {
+ "shasum": "15bcdab244fa4add44e4244a0176edb8aa9a2b44",
+ "tarball": "http://registry.npmjs.org/tar/-/tar-1.0.3.tgz"
},
- "version": "1.0.3"
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/tar/-/tar-1.0.3.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/node_modules/node-gyp/package.json b/node_modules/node-gyp/package.json
index 6b0bef6e6..6ec7ec502 100644
--- a/node_modules/node-gyp/package.json
+++ b/node_modules/node-gyp/package.json
@@ -1,57 +1,32 @@
{
- "_args": [
- [
- "node-gyp@~3.0.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "node-gyp@>=3.0.1 <3.1.0",
- "_id": "node-gyp@3.0.3",
- "_inCache": true,
- "_location": "/node-gyp",
- "_nodeVersion": "4.0.0",
- "_npmUser": {
- "email": "rod@vagg.org",
- "name": "rvagg"
- },
- "_npmVersion": "2.14.2",
- "_phantomChildren": {
- "block-stream": "0.0.8",
- "brace-expansion": "1.1.0",
- "fstream": "1.0.8",
- "inflight": "1.0.4",
- "inherits": "2.0.1",
- "lru-cache": "2.6.5",
- "once": "1.3.2",
- "sigmund": "1.0.1"
- },
- "_requested": {
- "name": "node-gyp",
- "raw": "node-gyp@~3.0.1",
- "rawSpec": "~3.0.1",
- "scope": null,
- "spec": ">=3.0.1 <3.1.0",
- "type": "range"
- },
- "_requiredBy": [
- "/"
+ "name": "node-gyp",
+ "description": "Node.js native addon build tool",
+ "license": "MIT",
+ "keywords": [
+ "native",
+ "addon",
+ "module",
+ "c",
+ "c++",
+ "bindings",
+ "gyp"
],
- "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.0.3.tgz",
- "_shasum": "9b004219f4fa9efbfd78c5fc674aa12e58fb8694",
- "_shrinkwrap": null,
- "_spec": "node-gyp@~3.0.1",
- "_where": "/Users/rebecca/code/npm",
+ "version": "3.0.3",
+ "installVersion": 9,
"author": {
- "email": "nathan@tootallnate.net",
"name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
"url": "http://tootallnate.net"
},
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/node-gyp.git"
+ },
+ "preferGlobal": true,
"bin": {
"node-gyp": "./bin/node-gyp.js"
},
- "bugs": {
- "url": "https://github.com/nodejs/node-gyp/issues"
- },
+ "main": "./lib/node-gyp.js",
"dependencies": {
"fstream": "^1.0.0",
"glob": "3 || 4",
@@ -68,33 +43,29 @@
"tar": "^1.0.0",
"which": "1"
},
- "description": "Node.js native addon build tool",
+ "engines": {
+ "node": ">= 0.8.0"
+ },
"devDependencies": {
"tape": "~4.2.0"
},
- "directories": {},
- "dist": {
- "shasum": "9b004219f4fa9efbfd78c5fc674aa12e58fb8694",
- "tarball": "http://registry.npmjs.org/node-gyp/-/node-gyp-3.0.3.tgz"
- },
- "engines": {
- "node": ">= 0.8.0"
+ "scripts": {
+ "test": "tape test/test-*"
},
"gitHead": "d6b03851d366c7fa78e7d2f57c61bb074ea45ea3",
+ "bugs": {
+ "url": "https://github.com/nodejs/node-gyp/issues"
+ },
"homepage": "https://github.com/nodejs/node-gyp",
- "installVersion": 9,
- "installable": true,
- "keywords": [
- "addon",
- "bindings",
- "c",
- "c++",
- "gyp",
- "module",
- "native"
- ],
- "license": "MIT",
- "main": "./lib/node-gyp.js",
+ "_id": "node-gyp@3.0.3",
+ "_shasum": "9b004219f4fa9efbfd78c5fc674aa12e58fb8694",
+ "_from": "node-gyp@>=3.0.3 <3.1.0",
+ "_npmVersion": "2.14.2",
+ "_nodeVersion": "4.0.0",
+ "_npmUser": {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ },
"maintainers": [
{
"name": "TooTallNate",
@@ -117,15 +88,11 @@
"email": "nathan@tootallnate.net"
}
],
- "name": "node-gyp",
- "optionalDependencies": {},
- "preferGlobal": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/nodejs/node-gyp.git"
- },
- "scripts": {
- "test": "tape test/test-*"
+ "dist": {
+ "shasum": "9b004219f4fa9efbfd78c5fc674aa12e58fb8694",
+ "tarball": "http://registry.npmjs.org/node-gyp/-/node-gyp-3.0.3.tgz"
},
- "version": "3.0.3"
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.0.3.tgz",
+ "readme": "ERROR: No README data found!"
}