summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-09-07 14:31:04 -0500
committerisaacs <i@izs.me>2013-09-07 14:31:04 -0500
commitebeae2df518af168a8ebd9117540238f0df916a3 (patch)
treeecfedcf075d58e910f520a42407876577e4fc617 /deps
parent1be09dfc25816acc87d96f82348d3bb3844d328e (diff)
downloadnode-new-ebeae2df518af168a8ebd9117540238f0df916a3.tar.gz
npm: upgrade to 1.3.11
Diffstat (limited to 'deps')
-rw-r--r--deps/npm/html/doc/README.html2
-rw-r--r--deps/npm/html/doc/api/npm-bin.html2
-rw-r--r--deps/npm/html/doc/api/npm-bugs.html2
-rw-r--r--deps/npm/html/doc/api/npm-commands.html2
-rw-r--r--deps/npm/html/doc/api/npm-config.html2
-rw-r--r--deps/npm/html/doc/api/npm-deprecate.html2
-rw-r--r--deps/npm/html/doc/api/npm-docs.html2
-rw-r--r--deps/npm/html/doc/api/npm-edit.html2
-rw-r--r--deps/npm/html/doc/api/npm-explore.html2
-rw-r--r--deps/npm/html/doc/api/npm-help-search.html2
-rw-r--r--deps/npm/html/doc/api/npm-init.html2
-rw-r--r--deps/npm/html/doc/api/npm-install.html2
-rw-r--r--deps/npm/html/doc/api/npm-link.html2
-rw-r--r--deps/npm/html/doc/api/npm-load.html2
-rw-r--r--deps/npm/html/doc/api/npm-ls.html2
-rw-r--r--deps/npm/html/doc/api/npm-outdated.html2
-rw-r--r--deps/npm/html/doc/api/npm-owner.html2
-rw-r--r--deps/npm/html/doc/api/npm-pack.html2
-rw-r--r--deps/npm/html/doc/api/npm-prefix.html2
-rw-r--r--deps/npm/html/doc/api/npm-prune.html2
-rw-r--r--deps/npm/html/doc/api/npm-publish.html2
-rw-r--r--deps/npm/html/doc/api/npm-rebuild.html2
-rw-r--r--deps/npm/html/doc/api/npm-restart.html2
-rw-r--r--deps/npm/html/doc/api/npm-root.html2
-rw-r--r--deps/npm/html/doc/api/npm-run-script.html2
-rw-r--r--deps/npm/html/doc/api/npm-search.html2
-rw-r--r--deps/npm/html/doc/api/npm-shrinkwrap.html2
-rw-r--r--deps/npm/html/doc/api/npm-start.html2
-rw-r--r--deps/npm/html/doc/api/npm-stop.html2
-rw-r--r--deps/npm/html/doc/api/npm-submodule.html2
-rw-r--r--deps/npm/html/doc/api/npm-tag.html2
-rw-r--r--deps/npm/html/doc/api/npm-test.html2
-rw-r--r--deps/npm/html/doc/api/npm-uninstall.html2
-rw-r--r--deps/npm/html/doc/api/npm-unpublish.html2
-rw-r--r--deps/npm/html/doc/api/npm-update.html2
-rw-r--r--deps/npm/html/doc/api/npm-version.html2
-rw-r--r--deps/npm/html/doc/api/npm-view.html2
-rw-r--r--deps/npm/html/doc/api/npm-whoami.html2
-rw-r--r--deps/npm/html/doc/api/npm.html4
-rw-r--r--deps/npm/html/doc/api/repo.html2
-rw-r--r--deps/npm/html/doc/cli/npm-adduser.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bin.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bugs.html2
-rw-r--r--deps/npm/html/doc/cli/npm-build.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bundle.html2
-rw-r--r--deps/npm/html/doc/cli/npm-cache.html2
-rw-r--r--deps/npm/html/doc/cli/npm-completion.html2
-rw-r--r--deps/npm/html/doc/cli/npm-config.html2
-rw-r--r--deps/npm/html/doc/cli/npm-dedupe.html2
-rw-r--r--deps/npm/html/doc/cli/npm-deprecate.html2
-rw-r--r--deps/npm/html/doc/cli/npm-docs.html2
-rw-r--r--deps/npm/html/doc/cli/npm-edit.html2
-rw-r--r--deps/npm/html/doc/cli/npm-explore.html2
-rw-r--r--deps/npm/html/doc/cli/npm-help-search.html2
-rw-r--r--deps/npm/html/doc/cli/npm-help.html2
-rw-r--r--deps/npm/html/doc/cli/npm-init.html2
-rw-r--r--deps/npm/html/doc/cli/npm-install.html2
-rw-r--r--deps/npm/html/doc/cli/npm-link.html2
-rw-r--r--deps/npm/html/doc/cli/npm-ls.html4
-rw-r--r--deps/npm/html/doc/cli/npm-outdated.html2
-rw-r--r--deps/npm/html/doc/cli/npm-owner.html2
-rw-r--r--deps/npm/html/doc/cli/npm-pack.html2
-rw-r--r--deps/npm/html/doc/cli/npm-prefix.html2
-rw-r--r--deps/npm/html/doc/cli/npm-prune.html2
-rw-r--r--deps/npm/html/doc/cli/npm-publish.html2
-rw-r--r--deps/npm/html/doc/cli/npm-rebuild.html2
-rw-r--r--deps/npm/html/doc/cli/npm-restart.html2
-rw-r--r--deps/npm/html/doc/cli/npm-rm.html2
-rw-r--r--deps/npm/html/doc/cli/npm-root.html2
-rw-r--r--deps/npm/html/doc/cli/npm-run-script.html2
-rw-r--r--deps/npm/html/doc/cli/npm-search.html2
-rw-r--r--deps/npm/html/doc/cli/npm-shrinkwrap.html2
-rw-r--r--deps/npm/html/doc/cli/npm-star.html2
-rw-r--r--deps/npm/html/doc/cli/npm-stars.html2
-rw-r--r--deps/npm/html/doc/cli/npm-start.html2
-rw-r--r--deps/npm/html/doc/cli/npm-stop.html2
-rw-r--r--deps/npm/html/doc/cli/npm-submodule.html2
-rw-r--r--deps/npm/html/doc/cli/npm-tag.html2
-rw-r--r--deps/npm/html/doc/cli/npm-test.html2
-rw-r--r--deps/npm/html/doc/cli/npm-uninstall.html2
-rw-r--r--deps/npm/html/doc/cli/npm-unpublish.html2
-rw-r--r--deps/npm/html/doc/cli/npm-update.html2
-rw-r--r--deps/npm/html/doc/cli/npm-version.html2
-rw-r--r--deps/npm/html/doc/cli/npm-view.html2
-rw-r--r--deps/npm/html/doc/cli/npm-whoami.html2
-rw-r--r--deps/npm/html/doc/cli/npm.html4
-rw-r--r--deps/npm/html/doc/cli/repo.html2
-rw-r--r--deps/npm/html/doc/files/npm-folders.html2
-rw-r--r--deps/npm/html/doc/files/npm-global.html2
-rw-r--r--deps/npm/html/doc/files/npm-json.html2
-rw-r--r--deps/npm/html/doc/files/npmrc.html2
-rw-r--r--deps/npm/html/doc/files/package.json.html2
-rw-r--r--deps/npm/html/doc/index.html2
-rw-r--r--deps/npm/html/doc/misc/npm-coding-style.html2
-rw-r--r--deps/npm/html/doc/misc/npm-config.html2
-rw-r--r--deps/npm/html/doc/misc/npm-developers.html2
-rw-r--r--deps/npm/html/doc/misc/npm-disputes.html2
-rw-r--r--deps/npm/html/doc/misc/npm-faq.html2
-rw-r--r--deps/npm/html/doc/misc/npm-index.html2
-rw-r--r--deps/npm/html/doc/misc/npm-registry.html2
-rw-r--r--deps/npm/html/doc/misc/npm-scripts.html2
-rw-r--r--deps/npm/html/doc/misc/removing-npm.html2
-rw-r--r--deps/npm/html/doc/misc/semver.html2
-rw-r--r--deps/npm/man/man1/npm-ls.12
-rw-r--r--deps/npm/man/man1/npm.12
-rw-r--r--deps/npm/man/man3/npm.32
-rw-r--r--deps/npm/node_modules/graceful-fs/README.md13
-rw-r--r--deps/npm/node_modules/graceful-fs/graceful-fs.js11
-rw-r--r--deps/npm/node_modules/graceful-fs/package.json8
-rw-r--r--deps/npm/node_modules/inherits/LICENSE22
-rw-r--r--deps/npm/node_modules/inherits/inherits_browser.js23
-rw-r--r--deps/npm/node_modules/inherits/package.json17
-rw-r--r--deps/npm/node_modules/inherits/test.js25
-rw-r--r--deps/npm/node_modules/lockfile/lockfile.js16
-rw-r--r--deps/npm/node_modules/lockfile/package.json10
-rw-r--r--deps/npm/node_modules/lockfile/test/basic.js26
-rw-r--r--deps/npm/node_modules/lru-cache/bench.js (renamed from deps/npm/node_modules/lru-cache/s.js)2
-rw-r--r--deps/npm/node_modules/lru-cache/lib/lru-cache.js8
-rw-r--r--deps/npm/node_modules/lru-cache/package.json13
-rw-r--r--deps/npm/node_modules/node-gyp/lib/configure.js4
-rw-r--r--deps/npm/node_modules/node-gyp/lib/install.js3
-rw-r--r--deps/npm/node_modules/node-gyp/package.json6
-rw-r--r--deps/npm/node_modules/npmconf/package.json8
-rw-r--r--deps/npm/node_modules/read-installed/LICENSE35
-rw-r--r--deps/npm/node_modules/read-installed/package.json7
-rw-r--r--deps/npm/node_modules/request/README.md36
-rwxr-xr-xdeps/npm/node_modules/request/index.js1251
-rw-r--r--deps/npm/node_modules/request/lib/copy.js8
-rw-r--r--deps/npm/node_modules/request/lib/debug.js5
-rw-r--r--deps/npm/node_modules/request/lib/getSafe.js34
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/Readme.md18
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js73
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/package.json16
-rw-r--r--deps/npm/node_modules/request/node_modules/mime/mime.js2
-rw-r--r--deps/npm/node_modules/request/node_modules/mime/package.json4
-rw-r--r--deps/npm/node_modules/request/node_modules/mime/test.js24
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md5
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/README.md10
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/component.json18
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/package.json6
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/uuid.js10
-rwxr-xr-xdeps/npm/node_modules/request/package.json8
-rw-r--r--deps/npm/node_modules/request/request.js1235
-rw-r--r--deps/npm/node_modules/request/tests/test-basic-auth.js20
-rw-r--r--deps/npm/node_modules/request/tests/test-isUrl.js28
-rw-r--r--deps/npm/node_modules/sha/.npmignore6
-rw-r--r--deps/npm/node_modules/sha/LICENSE90
-rw-r--r--deps/npm/node_modules/sha/README.md96
-rw-r--r--deps/npm/node_modules/sha/index.js238
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/float.patch68
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js123
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js11
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js30
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/package.json10
-rw-r--r--deps/npm/node_modules/sha/package.json8
-rw-r--r--deps/npm/node_modules/slide/LICENSE32
-rw-r--r--deps/npm/node_modules/slide/package.json7
-rw-r--r--deps/npm/package.json10
158 files changed, 2179 insertions, 1836 deletions
diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html
index 345e6458b1..94f7abc340 100644
--- a/deps/npm/html/doc/README.html
+++ b/deps/npm/html/doc/README.html
@@ -239,7 +239,7 @@ will no doubt tell you to put the output in a gist or email.</p>
<ul><li><a href="cli/npm.html">npm(1)</a></li><li><a href="misc/npm-faq.html">npm-faq(7)</a></li><li><a href="cli/npm-help.html">npm-help(1)</a></li><li><a href="misc/npm-index.html">npm-index(7)</a></li></ul>
</div>
-<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.3.10</p>
+<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html
index 39cdf52b2f..89928adb30 100644
--- a/deps/npm/html/doc/api/npm-bin.html
+++ b/deps/npm/html/doc/api/npm-bin.html
@@ -19,7 +19,7 @@
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
</div>
-<p id="footer">npm-bin &mdash; npm@1.3.10</p>
+<p id="footer">npm-bin &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html
index 4d369ac2e3..c6e641dd55 100644
--- a/deps/npm/html/doc/api/npm-bugs.html
+++ b/deps/npm/html/doc/api/npm-bugs.html
@@ -25,7 +25,7 @@ optional version number.</p>
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">npm-bugs &mdash; npm@1.3.10</p>
+<p id="footer">npm-bugs &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html
index 2aece67479..91d08fa38b 100644
--- a/deps/npm/html/doc/api/npm-commands.html
+++ b/deps/npm/html/doc/api/npm-commands.html
@@ -28,7 +28,7 @@ usage, or <code>man 3 npm-&lt;command&gt;</code> for programmatic usage.</p>
<ul><li><a href="../misc/npm-index.html">npm-index(7)</a></li></ul>
</div>
-<p id="footer">npm-commands &mdash; npm@1.3.10</p>
+<p id="footer">npm-commands &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html
index f29d191589..5fd9f62ed1 100644
--- a/deps/npm/html/doc/api/npm-config.html
+++ b/deps/npm/html/doc/api/npm-config.html
@@ -33,7 +33,7 @@ functions instead.</p>
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm-config &mdash; npm@1.3.10</p>
+<p id="footer">npm-config &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html
index 2c21245cf1..60721d24c3 100644
--- a/deps/npm/html/doc/api/npm-deprecate.html
+++ b/deps/npm/html/doc/api/npm-deprecate.html
@@ -32,7 +32,7 @@ install the package.</p></li></ul>
<ul><li><a href="../api/npm-publish.html">npm-publish(3)</a></li><li><a href="../api/npm-unpublish.html">npm-unpublish(3)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-deprecate &mdash; npm@1.3.10</p>
+<p id="footer">npm-deprecate &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html
index 278f9b2829..0be72b3039 100644
--- a/deps/npm/html/doc/api/npm-docs.html
+++ b/deps/npm/html/doc/api/npm-docs.html
@@ -25,7 +25,7 @@ optional version number.</p>
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">npm-docs &mdash; npm@1.3.10</p>
+<p id="footer">npm-docs &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html
index eda5b08ce1..919ece1b53 100644
--- a/deps/npm/html/doc/api/npm-edit.html
+++ b/deps/npm/html/doc/api/npm-edit.html
@@ -30,7 +30,7 @@ to open. The package can optionally have a version number attached.</p>
<p>Since this command opens an editor in a new process, be careful about where
and how this is used.</p>
</div>
-<p id="footer">npm-edit &mdash; npm@1.3.10</p>
+<p id="footer">npm-edit &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html
index abb4d860e7..75719c4757 100644
--- a/deps/npm/html/doc/api/npm-explore.html
+++ b/deps/npm/html/doc/api/npm-explore.html
@@ -24,7 +24,7 @@ sure to use <code>npm rebuild &lt;pkg&gt;</code> if you make any changes.</p>
<p>The first element in the &#39;args&#39; parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p>
</div>
-<p id="footer">npm-explore &mdash; npm@1.3.10</p>
+<p id="footer">npm-explore &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html
index df790caa0d..cb904b0f6c 100644
--- a/deps/npm/html/doc/api/npm-help-search.html
+++ b/deps/npm/html/doc/api/npm-help-search.html
@@ -32,7 +32,7 @@ Name of the file that matched</li></ul>
<p>The silent parameter is not neccessary not used, but it may in the future.</p>
</div>
-<p id="footer">npm-help-search &mdash; npm@1.3.10</p>
+<p id="footer">npm-help-search &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html
index e8faf7c3d4..6bab28dce4 100644
--- a/deps/npm/html/doc/api/npm-init.html
+++ b/deps/npm/html/doc/api/npm-init.html
@@ -35,7 +35,7 @@ then go ahead and use this programmatically.</p>
<p><a href="../files/package.json.html">package.json(5)</a></p>
</div>
-<p id="footer">npm-init &mdash; npm@1.3.10</p>
+<p id="footer">npm-init &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html
index d4034480a5..0e2c848ea6 100644
--- a/deps/npm/html/doc/api/npm-install.html
+++ b/deps/npm/html/doc/api/npm-install.html
@@ -25,7 +25,7 @@ the name of a package to be installed.</p>
<p>Finally, &#39;callback&#39; is a function that will be called when all packages have been
installed or when an error has been encountered.</p>
</div>
-<p id="footer">npm-install &mdash; npm@1.3.10</p>
+<p id="footer">npm-install &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html
index 0825126fa3..0136ea840b 100644
--- a/deps/npm/html/doc/api/npm-link.html
+++ b/deps/npm/html/doc/api/npm-link.html
@@ -39,7 +39,7 @@ npm.commands.link(&#39;redis&#39;, cb) # link-install the package</code></pre>
<p>Now, any changes to the redis package will be reflected in
the package in the current working directory</p>
</div>
-<p id="footer">npm-link &mdash; npm@1.3.10</p>
+<p id="footer">npm-link &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html
index b679f937f4..59dd74011c 100644
--- a/deps/npm/html/doc/api/npm-load.html
+++ b/deps/npm/html/doc/api/npm-load.html
@@ -32,7 +32,7 @@ config object.</p>
<p>For a list of all the available command-line configs, see <code>npm help config</code></p>
</div>
-<p id="footer">npm-load &mdash; npm@1.3.10</p>
+<p id="footer">npm-load &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html
index 7a7f9d5130..ff0ecdcca2 100644
--- a/deps/npm/html/doc/api/npm-ls.html
+++ b/deps/npm/html/doc/api/npm-ls.html
@@ -59,7 +59,7 @@ project.</p>
This means that if a submodule a same dependency as a parent module, then the
dependency will only be output once.</p>
</div>
-<p id="footer">npm-ls &mdash; npm@1.3.10</p>
+<p id="footer">npm-ls &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html
index 86a996608d..38f9d6bc1a 100644
--- a/deps/npm/html/doc/api/npm-outdated.html
+++ b/deps/npm/html/doc/api/npm-outdated.html
@@ -19,7 +19,7 @@ currently outdated.</p>
<p>If the &#39;packages&#39; parameter is left out, npm will check all packages.</p>
</div>
-<p id="footer">npm-outdated &mdash; npm@1.3.10</p>
+<p id="footer">npm-outdated &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html
index cd617ea6f9..ea2f6e6f68 100644
--- a/deps/npm/html/doc/api/npm-owner.html
+++ b/deps/npm/html/doc/api/npm-owner.html
@@ -34,7 +34,7 @@ that is not implemented at this time.</p>
<ul><li><a href="../api/npm-publish.html">npm-publish(3)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-owner &mdash; npm@1.3.10</p>
+<p id="footer">npm-owner &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html
index 333366bd03..58c9051c0d 100644
--- a/deps/npm/html/doc/api/npm-pack.html
+++ b/deps/npm/html/doc/api/npm-pack.html
@@ -25,7 +25,7 @@ overwritten the second time.</p>
<p>If no arguments are supplied, then npm packs the current package folder.</p>
</div>
-<p id="footer">npm-pack &mdash; npm@1.3.10</p>
+<p id="footer">npm-pack &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html
index 98d0869ba7..8ebc410674 100644
--- a/deps/npm/html/doc/api/npm-prefix.html
+++ b/deps/npm/html/doc/api/npm-prefix.html
@@ -21,7 +21,7 @@
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">npm-prefix &mdash; npm@1.3.10</p>
+<p id="footer">npm-prefix &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html
index 798150f57f..86b21861c1 100644
--- a/deps/npm/html/doc/api/npm-prune.html
+++ b/deps/npm/html/doc/api/npm-prune.html
@@ -23,7 +23,7 @@
<p>Extraneous packages are packages that are not listed on the parent
package&#39;s dependencies list.</p>
</div>
-<p id="footer">npm-prune &mdash; npm@1.3.10</p>
+<p id="footer">npm-prune &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html
index 7e0a36d5cb..7b36ffbcbb 100644
--- a/deps/npm/html/doc/api/npm-publish.html
+++ b/deps/npm/html/doc/api/npm-publish.html
@@ -32,7 +32,7 @@ the registry. Overwrites when the &quot;force&quot; environment variable is set
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../api/npm-owner.html">npm-owner(3)</a></li></ul>
</div>
-<p id="footer">npm-publish &mdash; npm@1.3.10</p>
+<p id="footer">npm-publish &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html
index c660b29309..658edd1fef 100644
--- a/deps/npm/html/doc/api/npm-rebuild.html
+++ b/deps/npm/html/doc/api/npm-rebuild.html
@@ -22,7 +22,7 @@ the new binary. If no &#39;packages&#39; parameter is specify, every package wil
<p>See <code>npm help build</code></p>
</div>
-<p id="footer">npm-rebuild &mdash; npm@1.3.10</p>
+<p id="footer">npm-rebuild &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html
index 6a101d5433..0b9e0f42b2 100644
--- a/deps/npm/html/doc/api/npm-restart.html
+++ b/deps/npm/html/doc/api/npm-restart.html
@@ -27,7 +27,7 @@ in the <code>packages</code> parameter.</p>
<ul><li><a href="../api/npm-start.html">npm-start(3)</a></li><li><a href="../api/npm-stop.html">npm-stop(3)</a></li></ul>
</div>
-<p id="footer">npm-restart &mdash; npm@1.3.10</p>
+<p id="footer">npm-restart &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html
index a0af6b5d7f..5519e5df99 100644
--- a/deps/npm/html/doc/api/npm-root.html
+++ b/deps/npm/html/doc/api/npm-root.html
@@ -21,7 +21,7 @@
<p>This function is not useful programmatically.</p>
</div>
-<p id="footer">npm-root &mdash; npm@1.3.10</p>
+<p id="footer">npm-root &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html
index 75532d6acf..a005f89fd9 100644
--- a/deps/npm/html/doc/api/npm-run-script.html
+++ b/deps/npm/html/doc/api/npm-run-script.html
@@ -29,7 +29,7 @@ assumed to be the command to run. All other elements are ignored.</p>
<ul><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../api/npm-test.html">npm-test(3)</a></li><li><a href="../api/npm-start.html">npm-start(3)</a></li><li><a href="../api/npm-restart.html">npm-restart(3)</a></li><li><a href="../api/npm-stop.html">npm-stop(3)</a></li></ul>
</div>
-<p id="footer">npm-run-script &mdash; npm@1.3.10</p>
+<p id="footer">npm-run-script &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html
index d9e643353d..ef2f38b90b 100644
--- a/deps/npm/html/doc/api/npm-search.html
+++ b/deps/npm/html/doc/api/npm-search.html
@@ -32,7 +32,7 @@ excluded term (the &quot;searchexclude&quot; config). The search is case insensi
and doesn&#39;t try to read your mind (it doesn&#39;t do any verb tense matching or the
like).</p>
</div>
-<p id="footer">npm-search &mdash; npm@1.3.10</p>
+<p id="footer">npm-search &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html
index e5fc848698..30ca6b8e08 100644
--- a/deps/npm/html/doc/api/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/api/npm-shrinkwrap.html
@@ -26,7 +26,7 @@ but the shrinkwrap file will still be written.</p>
<p>Finally, &#39;callback&#39; is a function that will be called when the shrinkwrap has
been saved.</p>
</div>
-<p id="footer">npm-shrinkwrap &mdash; npm@1.3.10</p>
+<p id="footer">npm-shrinkwrap &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html
index 5355bd8f81..d90c7df85f 100644
--- a/deps/npm/html/doc/api/npm-start.html
+++ b/deps/npm/html/doc/api/npm-start.html
@@ -19,7 +19,7 @@
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">npm-start &mdash; npm@1.3.10</p>
+<p id="footer">npm-start &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html
index 01d9518404..d0967515cd 100644
--- a/deps/npm/html/doc/api/npm-stop.html
+++ b/deps/npm/html/doc/api/npm-stop.html
@@ -19,7 +19,7 @@
<p>npm can run stop on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">npm-stop &mdash; npm@1.3.10</p>
+<p id="footer">npm-stop &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-submodule.html b/deps/npm/html/doc/api/npm-submodule.html
index b634852b91..c93e0d3427 100644
--- a/deps/npm/html/doc/api/npm-submodule.html
+++ b/deps/npm/html/doc/api/npm-submodule.html
@@ -33,7 +33,7 @@ dependencies into the submodule folder.</p>
<ul><li>npm help json</li><li>git help submodule</li></ul>
</div>
-<p id="footer">npm-submodule &mdash; npm@1.3.10</p>
+<p id="footer">npm-submodule &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html
index e6249f7769..3a2e6f7e98 100644
--- a/deps/npm/html/doc/api/npm-tag.html
+++ b/deps/npm/html/doc/api/npm-tag.html
@@ -29,7 +29,7 @@ parameter is missing or falsey (empty), the default froom the config will be
used. For more information about how to set this config, check
<code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
</div>
-<p id="footer">npm-tag &mdash; npm@1.3.10</p>
+<p id="footer">npm-tag &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html
index b974b12f4f..0b996e8731 100644
--- a/deps/npm/html/doc/api/npm-test.html
+++ b/deps/npm/html/doc/api/npm-test.html
@@ -22,7 +22,7 @@ true.</p>
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">npm-test &mdash; npm@1.3.10</p>
+<p id="footer">npm-test &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html
index b19ab6f6d7..2bb0318f71 100644
--- a/deps/npm/html/doc/api/npm-uninstall.html
+++ b/deps/npm/html/doc/api/npm-uninstall.html
@@ -22,7 +22,7 @@ the name of a package to be uninstalled.</p>
<p>Finally, &#39;callback&#39; is a function that will be called when all packages have been
uninstalled or when an error has been encountered.</p>
</div>
-<p id="footer">npm-uninstall &mdash; npm@1.3.10</p>
+<p id="footer">npm-uninstall &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html
index 382e9ef3d0..3f20fa5c7e 100644
--- a/deps/npm/html/doc/api/npm-unpublish.html
+++ b/deps/npm/html/doc/api/npm-unpublish.html
@@ -26,7 +26,7 @@ is what is meant.</p>
<p>If no version is specified, or if all versions are removed then
the root package entry is removed from the registry entirely.</p>
</div>
-<p id="footer">npm-unpublish &mdash; npm@1.3.10</p>
+<p id="footer">npm-unpublish &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html
index f3c62d3bce..2770d1f092 100644
--- a/deps/npm/html/doc/api/npm-update.html
+++ b/deps/npm/html/doc/api/npm-update.html
@@ -18,7 +18,7 @@
<p>The &#39;packages&#39; argument is an array of packages to update. The &#39;callback&#39; parameter will be called when done or when an error occurs.</p>
</div>
-<p id="footer">npm-update &mdash; npm@1.3.10</p>
+<p id="footer">npm-update &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html
index a0b5779027..3601c2122c 100644
--- a/deps/npm/html/doc/api/npm-version.html
+++ b/deps/npm/html/doc/api/npm-version.html
@@ -24,7 +24,7 @@ fail if the repo is not clean.</p>
parameter. The difference, however, is this function will fail if it does
not have exactly one element. The only element should be a version number.</p>
</div>
-<p id="footer">npm-version &mdash; npm@1.3.10</p>
+<p id="footer">npm-version &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html
index f09f87755b..0ab690e18e 100644
--- a/deps/npm/html/doc/api/npm-view.html
+++ b/deps/npm/html/doc/api/npm-view.html
@@ -99,7 +99,7 @@ the field name.</p>
<p>corresponding to the list of fields selected.</p>
</div>
-<p id="footer">npm-view &mdash; npm@1.3.10</p>
+<p id="footer">npm-view &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html
index b8960a8d90..b895c915b2 100644
--- a/deps/npm/html/doc/api/npm-whoami.html
+++ b/deps/npm/html/doc/api/npm-whoami.html
@@ -21,7 +21,7 @@
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">npm-whoami &mdash; npm@1.3.10</p>
+<p id="footer">npm-whoami &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html
index ec4e302a64..4d6a4049e0 100644
--- a/deps/npm/html/doc/api/npm.html
+++ b/deps/npm/html/doc/api/npm.html
@@ -24,7 +24,7 @@ npm.load([configObject], function (er, npm) {
<h2 id="VERSION">VERSION</h2>
-<p>1.3.10</p>
+<p>1.3.11</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
@@ -92,7 +92,7 @@ method names. Use the <code>npm.deref</code> method to find the real name.</p>
<pre><code>var cmd = npm.deref(&quot;unp&quot;) // cmd === &quot;unpublish&quot;</code></pre>
</div>
-<p id="footer">npm &mdash; npm@1.3.10</p>
+<p id="footer">npm &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/api/repo.html b/deps/npm/html/doc/api/repo.html
index 5a4705ca07..4b247bfc98 100644
--- a/deps/npm/html/doc/api/repo.html
+++ b/deps/npm/html/doc/api/repo.html
@@ -25,7 +25,7 @@ optional version number.</p>
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">repo &mdash; npm@1.3.10</p>
+<p id="footer">repo &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html
index 8ef76b772c..a23ee290c5 100644
--- a/deps/npm/html/doc/cli/npm-adduser.html
+++ b/deps/npm/html/doc/cli/npm-adduser.html
@@ -39,7 +39,7 @@ authorize on a new machine.</p>
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li></ul>
</div>
-<p id="footer">npm-adduser &mdash; npm@1.3.10</p>
+<p id="footer">npm-adduser &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html
index 1d3da86f1f..0bd871723e 100644
--- a/deps/npm/html/doc/cli/npm-bin.html
+++ b/deps/npm/html/doc/cli/npm-bin.html
@@ -20,7 +20,7 @@
<ul><li><a href="../cli/npm-prefix.html">npm-prefix(1)</a></li><li><a href="../cli/npm-root.html">npm-root(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-bin &mdash; npm@1.3.10</p>
+<p id="footer">npm-bin &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html
index 39bc7dc40b..defabb0223 100644
--- a/deps/npm/html/doc/cli/npm-bugs.html
+++ b/deps/npm/html/doc/cli/npm-bugs.html
@@ -36,7 +36,7 @@ config param.</p>
<ul><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul>
</div>
-<p id="footer">npm-bugs &mdash; npm@1.3.10</p>
+<p id="footer">npm-bugs &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html
index aae17642f5..022fc1b590 100644
--- a/deps/npm/html/doc/cli/npm-build.html
+++ b/deps/npm/html/doc/cli/npm-build.html
@@ -25,7 +25,7 @@ A folder containing a <code>package.json</code> file in its root.</li></ul>
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul>
</div>
-<p id="footer">npm-build &mdash; npm@1.3.10</p>
+<p id="footer">npm-build &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html
index 12a37415a5..4295dbccf9 100644
--- a/deps/npm/html/doc/cli/npm-bundle.html
+++ b/deps/npm/html/doc/cli/npm-bundle.html
@@ -20,7 +20,7 @@ install packages into the local space.</p>
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-bundle &mdash; npm@1.3.10</p>
+<p id="footer">npm-bundle &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html
index fdede7e090..e159a12f58 100644
--- a/deps/npm/html/doc/cli/npm-cache.html
+++ b/deps/npm/html/doc/cli/npm-cache.html
@@ -66,7 +66,7 @@ they do not make an HTTP request to the registry.</p>
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li></ul>
</div>
-<p id="footer">npm-cache &mdash; npm@1.3.10</p>
+<p id="footer">npm-cache &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html
index 7d6e5fac4e..e095c83a42 100644
--- a/deps/npm/html/doc/cli/npm-completion.html
+++ b/deps/npm/html/doc/cli/npm-completion.html
@@ -33,7 +33,7 @@ completions based on the arguments.</p>
<ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-completion &mdash; npm@1.3.10</p>
+<p id="footer">npm-completion &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html
index 5b9e323520..96d499a2d4 100644
--- a/deps/npm/html/doc/cli/npm-config.html
+++ b/deps/npm/html/doc/cli/npm-config.html
@@ -73,7 +73,7 @@ global config.</p>
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-config &mdash; npm@1.3.10</p>
+<p id="footer">npm-config &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html
index d7c0a47471..22233e2c99 100644
--- a/deps/npm/html/doc/cli/npm-dedupe.html
+++ b/deps/npm/html/doc/cli/npm-dedupe.html
@@ -58,7 +58,7 @@ registry.</p>
<ul><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-dedupe &mdash; npm@1.3.10</p>
+<p id="footer">npm-dedupe &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html
index 337d57ccfe..2780be421b 100644
--- a/deps/npm/html/doc/cli/npm-deprecate.html
+++ b/deps/npm/html/doc/cli/npm-deprecate.html
@@ -31,7 +31,7 @@ something like this:</p>
<ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-deprecate &mdash; npm@1.3.10</p>
+<p id="footer">npm-deprecate &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html
index 63964ea243..cb20c569d2 100644
--- a/deps/npm/html/doc/cli/npm-docs.html
+++ b/deps/npm/html/doc/cli/npm-docs.html
@@ -37,7 +37,7 @@ config param.</p>
<ul><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul>
</div>
-<p id="footer">npm-docs &mdash; npm@1.3.10</p>
+<p id="footer">npm-docs &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html
index 4b1dba061b..3fdcd45a35 100644
--- a/deps/npm/html/doc/cli/npm-edit.html
+++ b/deps/npm/html/doc/cli/npm-edit.html
@@ -37,7 +37,7 @@ or <code>&quot;notepad&quot;</code> on Windows.</li><li>Type: path</li></ul>
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-explore.html">npm-explore(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-edit &mdash; npm@1.3.10</p>
+<p id="footer">npm-edit &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html
index c8655fe7bd..f2d5418fdd 100644
--- a/deps/npm/html/doc/cli/npm-explore.html
+++ b/deps/npm/html/doc/cli/npm-explore.html
@@ -40,7 +40,7 @@ Windows</li><li>Type: path</li></ul>
<ul><li><a href="../cli/npm-submodule.html">npm-submodule(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-edit.html">npm-edit(1)</a></li><li><a href="../cli/npm-rebuild.html">npm-rebuild(1)</a></li><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-explore &mdash; npm@1.3.10</p>
+<p id="footer">npm-explore &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html
index c423369a16..1d6e358bb4 100644
--- a/deps/npm/html/doc/cli/npm-help-search.html
+++ b/deps/npm/html/doc/cli/npm-help-search.html
@@ -38,7 +38,7 @@ where the terms were found in the documentation.</p>
<ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li></ul>
</div>
-<p id="footer">npm-help-search &mdash; npm@1.3.10</p>
+<p id="footer">npm-help-search &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html
index 7566d1d141..58d6f26dd2 100644
--- a/deps/npm/html/doc/cli/npm-help.html
+++ b/deps/npm/html/doc/cli/npm-help.html
@@ -36,7 +36,7 @@ matches are equivalent to specifying a topic name.</p>
<ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../../doc/README.html">README</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-help-search.html">npm-help-search(1)</a></li><li><a href="../misc/npm-index.html">npm-index(7)</a></li></ul>
</div>
-<p id="footer">npm-help &mdash; npm@1.3.10</p>
+<p id="footer">npm-help &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html
index 2781d65e40..e6a15f235c 100644
--- a/deps/npm/html/doc/cli/npm-init.html
+++ b/deps/npm/html/doc/cli/npm-init.html
@@ -29,7 +29,7 @@ without a really good reason to do so.</p>
<ul><li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li></ul>
</div>
-<p id="footer">npm-init &mdash; npm@1.3.10</p>
+<p id="footer">npm-init &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html
index c9df0f800b..39043f4dba 100644
--- a/deps/npm/html/doc/cli/npm-install.html
+++ b/deps/npm/html/doc/cli/npm-install.html
@@ -142,7 +142,7 @@ affects a real use-case, it will be investigated.</p>
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../cli/npm-rebuild.html">npm-rebuild(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-tag.html">npm-tag(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../cli/npm-shrinkwrap.html">npm-shrinkwrap(1)</a></li></ul>
</div>
-<p id="footer">npm-install &mdash; npm@1.3.10</p>
+<p id="footer">npm-install &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html
index 4c0f874297..88b03cca82 100644
--- a/deps/npm/html/doc/cli/npm-link.html
+++ b/deps/npm/html/doc/cli/npm-link.html
@@ -62,7 +62,7 @@ installation target into your project&#39;s <code>node_modules</code> folder.</p
<ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-link &mdash; npm@1.3.10</p>
+<p id="footer">npm-link &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html
index c8762048fe..63a3c1ba2a 100644
--- a/deps/npm/html/doc/cli/npm-ls.html
+++ b/deps/npm/html/doc/cli/npm-ls.html
@@ -25,7 +25,7 @@ limit the results to only the paths to the packages named. Note that
nested packages will <em>also</em> show the paths to the specified packages.
For example, running <code>npm ls promzard</code> in npm&#39;s source tree will show:</p>
-<pre><code>npm@1.3.10 /path/to/npm
+<pre><code>npm@1.3.11 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5</code></pre>
@@ -68,7 +68,7 @@ project.</p>
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-outdated.html">npm-outdated(1)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li></ul>
</div>
-<p id="footer">npm-ls &mdash; npm@1.3.10</p>
+<p id="footer">npm-ls &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html
index 2e38f59b92..5b54fc453f 100644
--- a/deps/npm/html/doc/cli/npm-outdated.html
+++ b/deps/npm/html/doc/cli/npm-outdated.html
@@ -21,7 +21,7 @@ packages are currently outdated.</p>
<ul><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li></ul>
</div>
-<p id="footer">npm-outdated &mdash; npm@1.3.10</p>
+<p id="footer">npm-outdated &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html
index 0656cb4a77..8b7d875fb5 100644
--- a/deps/npm/html/doc/cli/npm-owner.html
+++ b/deps/npm/html/doc/cli/npm-owner.html
@@ -34,7 +34,7 @@ that is not implemented at this time.</p>
<ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../misc/npm-disputes.html">npm-disputes(7)</a></li></ul>
</div>
-<p id="footer">npm-owner &mdash; npm@1.3.10</p>
+<p id="footer">npm-owner &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html
index 9e07cbceb3..5c89f7fff1 100644
--- a/deps/npm/html/doc/cli/npm-pack.html
+++ b/deps/npm/html/doc/cli/npm-pack.html
@@ -29,7 +29,7 @@ overwritten the second time.</p>
<ul><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-pack &mdash; npm@1.3.10</p>
+<p id="footer">npm-pack &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html
index aae5c9ace2..cb8fce9172 100644
--- a/deps/npm/html/doc/cli/npm-prefix.html
+++ b/deps/npm/html/doc/cli/npm-prefix.html
@@ -20,7 +20,7 @@
<ul><li><a href="../cli/npm-root.html">npm-root(1)</a></li><li><a href="../cli/npm-bin.html">npm-bin(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-prefix &mdash; npm@1.3.10</p>
+<p id="footer">npm-prefix &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html
index 0920055d17..79a9252ab7 100644
--- a/deps/npm/html/doc/cli/npm-prune.html
+++ b/deps/npm/html/doc/cli/npm-prune.html
@@ -25,7 +25,7 @@ package&#39;s dependencies list.</p>
<ul><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul>
</div>
-<p id="footer">npm-prune &mdash; npm@1.3.10</p>
+<p id="footer">npm-prune &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html
index 354e128485..92b785e2e7 100644
--- a/deps/npm/html/doc/cli/npm-publish.html
+++ b/deps/npm/html/doc/cli/npm-publish.html
@@ -29,7 +29,7 @@ the registry. Overwrites when the &quot;--force&quot; flag is set.</p>
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li><li><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></li><li><a href="../cli/npm-tag.html">npm-tag(1)</a></li></ul>
</div>
-<p id="footer">npm-publish &mdash; npm@1.3.10</p>
+<p id="footer">npm-publish &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html
index fc0979c81b..140aadc531 100644
--- a/deps/npm/html/doc/cli/npm-rebuild.html
+++ b/deps/npm/html/doc/cli/npm-rebuild.html
@@ -26,7 +26,7 @@ the new binary.</p>
<ul><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-rebuild &mdash; npm@1.3.10</p>
+<p id="footer">npm-rebuild &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html
index f8a02152ac..480af1e117 100644
--- a/deps/npm/html/doc/cli/npm-restart.html
+++ b/deps/npm/html/doc/cli/npm-restart.html
@@ -24,7 +24,7 @@ the &quot;start&quot; script.</p>
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-restart &mdash; npm@1.3.10</p>
+<p id="footer">npm-restart &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html
index 492b6f9b75..b2d4fdf358 100644
--- a/deps/npm/html/doc/cli/npm-rm.html
+++ b/deps/npm/html/doc/cli/npm-rm.html
@@ -24,7 +24,7 @@ on its behalf.</p>
<ul><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-rm &mdash; npm@1.3.10</p>
+<p id="footer">npm-rm &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html
index 9cd65b2b21..cff181d420 100644
--- a/deps/npm/html/doc/cli/npm-root.html
+++ b/deps/npm/html/doc/cli/npm-root.html
@@ -20,7 +20,7 @@
<ul><li><a href="../cli/npm-prefix.html">npm-prefix(1)</a></li><li><a href="../cli/npm-bin.html">npm-bin(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-root &mdash; npm@1.3.10</p>
+<p id="footer">npm-root &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html
index 9e1788330e..2527e05bc9 100644
--- a/deps/npm/html/doc/cli/npm-run-script.html
+++ b/deps/npm/html/doc/cli/npm-run-script.html
@@ -23,7 +23,7 @@ called directly, as well.</p>
<ul><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-run-script &mdash; npm@1.3.10</p>
+<p id="footer">npm-run-script &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html
index ef9a4bce8d..c468502210 100644
--- a/deps/npm/html/doc/cli/npm-search.html
+++ b/deps/npm/html/doc/cli/npm-search.html
@@ -26,7 +26,7 @@ expression characters must be escaped or quoted in most shells.)</p>
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li></ul>
</div>
-<p id="footer">npm-search &mdash; npm@1.3.10</p>
+<p id="footer">npm-search &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html
index e199e6bf23..479193dfe9 100644
--- a/deps/npm/html/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html
@@ -183,7 +183,7 @@ contents rather than versions.</p>
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul>
</div>
-<p id="footer">npm-shrinkwrap &mdash; npm@1.3.10</p>
+<p id="footer">npm-shrinkwrap &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html
index daeaf71f51..7779dad57a 100644
--- a/deps/npm/html/doc/cli/npm-star.html
+++ b/deps/npm/html/doc/cli/npm-star.html
@@ -26,7 +26,7 @@ a vaguely positive way to show that you care.</p>
<ul><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul>
</div>
-<p id="footer">npm-star &mdash; npm@1.3.10</p>
+<p id="footer">npm-star &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html
index db4e964204..640dbcbcba 100644
--- a/deps/npm/html/doc/cli/npm-stars.html
+++ b/deps/npm/html/doc/cli/npm-stars.html
@@ -25,7 +25,7 @@ you will most certainly enjoy this command.</p>
<ul><li><a href="../cli/npm-star.html">npm-star(1)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul>
</div>
-<p id="footer">npm-stars &mdash; npm@1.3.10</p>
+<p id="footer">npm-stars &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html
index f7a040a09b..6416f918af 100644
--- a/deps/npm/html/doc/cli/npm-start.html
+++ b/deps/npm/html/doc/cli/npm-start.html
@@ -20,7 +20,7 @@
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-start &mdash; npm@1.3.10</p>
+<p id="footer">npm-start &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html
index 011b3e7523..376cbc4693 100644
--- a/deps/npm/html/doc/cli/npm-stop.html
+++ b/deps/npm/html/doc/cli/npm-stop.html
@@ -20,7 +20,7 @@
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li></ul>
</div>
-<p id="footer">npm-stop &mdash; npm@1.3.10</p>
+<p id="footer">npm-stop &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-submodule.html b/deps/npm/html/doc/cli/npm-submodule.html
index 6e45fd07ff..37679f3d2c 100644
--- a/deps/npm/html/doc/cli/npm-submodule.html
+++ b/deps/npm/html/doc/cli/npm-submodule.html
@@ -33,7 +33,7 @@ dependencies into the submodule folder.</p>
<ul><li><a href="../files/package.json.html">package.json(5)</a></li><li>git help submodule</li></ul>
</div>
-<p id="footer">npm-submodule &mdash; npm@1.3.10</p>
+<p id="footer">npm-submodule &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html
index d9b7f477f2..627aff0a67 100644
--- a/deps/npm/html/doc/cli/npm-tag.html
+++ b/deps/npm/html/doc/cli/npm-tag.html
@@ -21,7 +21,7 @@
<ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-tag &mdash; npm@1.3.10</p>
+<p id="footer">npm-tag &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html
index 13d0a611a2..eb0e7481d0 100644
--- a/deps/npm/html/doc/cli/npm-test.html
+++ b/deps/npm/html/doc/cli/npm-test.html
@@ -24,7 +24,7 @@ true.</p>
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-test &mdash; npm@1.3.10</p>
+<p id="footer">npm-test &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html
index 246204948d..4042b10b71 100644
--- a/deps/npm/html/doc/cli/npm-uninstall.html
+++ b/deps/npm/html/doc/cli/npm-uninstall.html
@@ -22,7 +22,7 @@ on its behalf.</p>
<ul><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-uninstall &mdash; npm@1.3.10</p>
+<p id="footer">npm-uninstall &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html
index 2dae24824d..5ed32e8ab7 100644
--- a/deps/npm/html/doc/cli/npm-unpublish.html
+++ b/deps/npm/html/doc/cli/npm-unpublish.html
@@ -34,7 +34,7 @@ the root package entry is removed from the registry entirely.</p>
<ul><li><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li></ul>
</div>
-<p id="footer">npm-unpublish &mdash; npm@1.3.10</p>
+<p id="footer">npm-unpublish &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html
index 818b0d3618..f214812678 100644
--- a/deps/npm/html/doc/cli/npm-update.html
+++ b/deps/npm/html/doc/cli/npm-update.html
@@ -26,7 +26,7 @@ If no package name is specified, all packages in the specified location (global
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-outdated.html">npm-outdated(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul>
</div>
-<p id="footer">npm-update &mdash; npm@1.3.10</p>
+<p id="footer">npm-update &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html
index bb980e7fcf..6ea244bc0c 100644
--- a/deps/npm/html/doc/cli/npm-version.html
+++ b/deps/npm/html/doc/cli/npm-version.html
@@ -49,7 +49,7 @@ Enter passphrase:</code></pre>
<ul><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/semver.html">semver(7)</a></li></ul>
</div>
-<p id="footer">npm-version &mdash; npm@1.3.10</p>
+<p id="footer">npm-version &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html
index 616619f5ab..bba637fe95 100644
--- a/deps/npm/html/doc/cli/npm-view.html
+++ b/deps/npm/html/doc/cli/npm-view.html
@@ -91,7 +91,7 @@ the field name.</p>
<ul><li><a href="../cli/npm-search.html">npm-search(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li></ul>
</div>
-<p id="footer">npm-view &mdash; npm@1.3.10</p>
+<p id="footer">npm-view &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html
index cf3085e3f1..2086787215 100644
--- a/deps/npm/html/doc/cli/npm-whoami.html
+++ b/deps/npm/html/doc/cli/npm-whoami.html
@@ -20,7 +20,7 @@
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul>
</div>
-<p id="footer">npm-whoami &mdash; npm@1.3.10</p>
+<p id="footer">npm-whoami &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html
index 59b6e7a1a6..6853bb9632 100644
--- a/deps/npm/html/doc/cli/npm.html
+++ b/deps/npm/html/doc/cli/npm.html
@@ -14,7 +14,7 @@
<h2 id="VERSION">VERSION</h2>
-<p>1.3.10</p>
+<p>1.3.11</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
@@ -135,7 +135,7 @@ will no doubt tell you to put the output in a gist or email.</p>
<ul><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../../doc/README.html">README</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-index.html">npm-index(7)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm &mdash; npm@1.3.10</p>
+<p id="footer">npm &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cli/repo.html b/deps/npm/html/doc/cli/repo.html
index c68ba42592..82163efaab 100644
--- a/deps/npm/html/doc/cli/repo.html
+++ b/deps/npm/html/doc/cli/repo.html
@@ -30,7 +30,7 @@ config param.</p>
<ul><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li></ul>
</div>
-<p id="footer">repo &mdash; npm@1.3.10</p>
+<p id="footer">repo &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html
index 78c9c7bc17..6264bf9c15 100644
--- a/deps/npm/html/doc/files/npm-folders.html
+++ b/deps/npm/html/doc/files/npm-folders.html
@@ -205,7 +205,7 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa
<ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li></ul>
</div>
-<p id="footer">npm-folders &mdash; npm@1.3.10</p>
+<p id="footer">npm-folders &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html
index 78c9c7bc17..6264bf9c15 100644
--- a/deps/npm/html/doc/files/npm-global.html
+++ b/deps/npm/html/doc/files/npm-global.html
@@ -205,7 +205,7 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa
<ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li></ul>
</div>
-<p id="footer">npm-folders &mdash; npm@1.3.10</p>
+<p id="footer">npm-folders &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html
index 5a7521e3cb..10f789b568 100644
--- a/deps/npm/html/doc/files/npm-json.html
+++ b/deps/npm/html/doc/files/npm-json.html
@@ -550,7 +550,7 @@ overridden.</p>
<ul><li><a href="../misc/semver.html">semver(7)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li></ul>
</div>
-<p id="footer">package.json &mdash; npm@1.3.10</p>
+<p id="footer">package.json &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html
index 23b502ec0a..8e7ed5d1bb 100644
--- a/deps/npm/html/doc/files/npmrc.html
+++ b/deps/npm/html/doc/files/npmrc.html
@@ -59,7 +59,7 @@ manner.</p>
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npmrc &mdash; npm@1.3.10</p>
+<p id="footer">npmrc &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html
index 5a7521e3cb..10f789b568 100644
--- a/deps/npm/html/doc/files/package.json.html
+++ b/deps/npm/html/doc/files/package.json.html
@@ -550,7 +550,7 @@ overridden.</p>
<ul><li><a href="../misc/semver.html">semver(7)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li></ul>
</div>
-<p id="footer">package.json &mdash; npm@1.3.10</p>
+<p id="footer">package.json &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html
index 0b123a1972..8c0fd239cf 100644
--- a/deps/npm/html/doc/index.html
+++ b/deps/npm/html/doc/index.html
@@ -416,7 +416,7 @@
<p>The semantic versioner for npm</p>
</div>
-<p id="footer">npm-index &mdash; npm@1.3.10</p>
+<p id="footer">npm-index &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html
index 0ef4086312..3d1acda907 100644
--- a/deps/npm/html/doc/misc/npm-coding-style.html
+++ b/deps/npm/html/doc/misc/npm-coding-style.html
@@ -182,7 +182,7 @@ set to anything.&quot;</p>
<ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-coding-style &mdash; npm@1.3.10</p>
+<p id="footer">npm-coding-style &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html
index e1441137bb..9c95a872c7 100644
--- a/deps/npm/html/doc/misc/npm-config.html
+++ b/deps/npm/html/doc/misc/npm-config.html
@@ -717,7 +717,7 @@ then answer &quot;no&quot; to any prompt.</p>
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-config &mdash; npm@1.3.10</p>
+<p id="footer">npm-config &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html
index a1425fb190..cf88e4ab54 100644
--- a/deps/npm/html/doc/misc/npm-developers.html
+++ b/deps/npm/html/doc/misc/npm-developers.html
@@ -174,7 +174,7 @@ from a fresh checkout.</p>
<ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-developers &mdash; npm@1.3.10</p>
+<p id="footer">npm-developers &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html
index f071547d0f..69e37f3f31 100644
--- a/deps/npm/html/doc/misc/npm-disputes.html
+++ b/deps/npm/html/doc/misc/npm-disputes.html
@@ -91,7 +91,7 @@ things into it.</li></ol>
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li></ul>
</div>
-<p id="footer">npm-disputes &mdash; npm@1.3.10</p>
+<p id="footer">npm-disputes &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/misc/npm-faq.html b/deps/npm/html/doc/misc/npm-faq.html
index 1b6978c171..9e5ea97d59 100644
--- a/deps/npm/html/doc/misc/npm-faq.html
+++ b/deps/npm/html/doc/misc/npm-faq.html
@@ -340,7 +340,7 @@ There is not sufficient need to impose namespace rules on everyone.</p>
<ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li></ul>
</div>
-<p id="footer">npm-faq &mdash; npm@1.3.10</p>
+<p id="footer">npm-faq &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html
index 9499b97ffd..28002604ec 100644
--- a/deps/npm/html/doc/misc/npm-index.html
+++ b/deps/npm/html/doc/misc/npm-index.html
@@ -416,7 +416,7 @@
<p>The semantic versioner for npm</p>
</div>
-<p id="footer">npm-index &mdash; npm@1.3.10</p>
+<p id="footer">npm-index &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html
index 845bb93693..7dec703852 100644
--- a/deps/npm/html/doc/misc/npm-registry.html
+++ b/deps/npm/html/doc/misc/npm-registry.html
@@ -71,7 +71,7 @@ effectively implement the entire CouchDB API anyway.</p>
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-disputes.html">npm-disputes(7)</a></li></ul>
</div>
-<p id="footer">npm-registry &mdash; npm@1.3.10</p>
+<p id="footer">npm-registry &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html
index e23e65016d..bda77b912f 100644
--- a/deps/npm/html/doc/misc/npm-scripts.html
+++ b/deps/npm/html/doc/misc/npm-scripts.html
@@ -223,7 +223,7 @@ the user will sudo the npm command in question.</li></ul>
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-scripts &mdash; npm@1.3.10</p>
+<p id="footer">npm-scripts &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html
index 625d8aaadf..21ea83d53c 100644
--- a/deps/npm/html/doc/misc/removing-npm.html
+++ b/deps/npm/html/doc/misc/removing-npm.html
@@ -58,7 +58,7 @@ modules. To track those down, you can do the following:</p>
<ul><li><a href="../../doc/README.html">README</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li></ul>
</div>
-<p id="footer">removing-npm &mdash; npm@1.3.10</p>
+<p id="footer">removing-npm &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html
index ceee58358b..ff4da2d144 100644
--- a/deps/npm/html/doc/misc/semver.html
+++ b/deps/npm/html/doc/misc/semver.html
@@ -94,7 +94,7 @@ in descending order when passed to Array.sort().</li></ul>
range.</li><li>maxSatisfying(versions, range): Return the highest version in the list
that satisfies the range, or null if none of them do.</li></ul>
</div>
-<p id="footer">semver &mdash; npm@1.3.10</p>
+<p id="footer">semver &mdash; npm@1.3.11</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 9cfaf5b08b..f85c4f0b32 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -29,7 +29,7 @@ For example, running \fBnpm ls promzard\fR in npm\'s source tree will show:
.IP "" 4
.
.nf
-npm@1.3.10 /path/to/npm
+npm@1.3.11 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index b5973c70e9..7a060361d8 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -14,7 +14,7 @@ npm <command> [args]
.fi
.
.SH "VERSION"
-1.3.10
+1.3.11
.
.SH "DESCRIPTION"
npm is the package manager for the Node JavaScript platform\. It puts
diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3
index e52f4f5ffe..f7eb24c60d 100644
--- a/deps/npm/man/man3/npm.3
+++ b/deps/npm/man/man3/npm.3
@@ -21,7 +21,7 @@ npm\.load([configObject], function (er, npm) {
.fi
.
.SH "VERSION"
-1.3.10
+1.3.11
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
diff --git a/deps/npm/node_modules/graceful-fs/README.md b/deps/npm/node_modules/graceful-fs/README.md
index 01af3d6b63..eb1a109356 100644
--- a/deps/npm/node_modules/graceful-fs/README.md
+++ b/deps/npm/node_modules/graceful-fs/README.md
@@ -11,10 +11,9 @@ resilient to errors.
graceful-fs:
-* keeps track of how many file descriptors are open, and by default
- limits this to 1024. Any further requests to open a file are put in a
- queue until new slots become available. If 1024 turns out to be too
- much, it decreases the limit further.
+* Queues up `open` and `readdir` calls, and retries them once
+ something closes if there is an EMFILE error from too many file
+ descriptors.
* fixes `lchmod` for Node versions prior to 0.6.2.
* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
@@ -25,9 +24,3 @@ graceful-fs:
On Windows, it retries renaming a file for up to one second if `EACCESS`
or `EPERM` error occurs, likely because antivirus software has locked
the directory.
-
-## Configuration
-
-The maximum number of open file descriptors that graceful-fs manages may
-be adjusted by setting `fs.MAX_OPEN` to a different number. The default
-is 1024.
diff --git a/deps/npm/node_modules/graceful-fs/graceful-fs.js b/deps/npm/node_modules/graceful-fs/graceful-fs.js
index a46b5b2a18..1865f92cc0 100644
--- a/deps/npm/node_modules/graceful-fs/graceful-fs.js
+++ b/deps/npm/node_modules/graceful-fs/graceful-fs.js
@@ -126,8 +126,15 @@ function Req () {
}
Req.prototype.done = function (er, result) {
- // if an error, and the code is EMFILE, then get in the queue
- if (er && er.code === "EMFILE") {
+ var tryAgain = false
+ if (er) {
+ var code = er.code
+ var tryAgain = code === "EMFILE"
+ if (process.platform === "win32")
+ tryAgain = tryAgain || code === "OK"
+ }
+
+ if (tryAgain) {
this.failures ++
enqueue(this)
} else {
diff --git a/deps/npm/node_modules/graceful-fs/package.json b/deps/npm/node_modules/graceful-fs/package.json
index 4766b4b251..1b4a21c75a 100644
--- a/deps/npm/node_modules/graceful-fs/package.json
+++ b/deps/npm/node_modules/graceful-fs/package.json
@@ -6,7 +6,7 @@
},
"name": "graceful-fs",
"description": "A drop-in replacement for fs, making various improvements.",
- "version": "2.0.0",
+ "version": "2.0.1",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-graceful-fs.git"
@@ -38,11 +38,11 @@
"EACCESS"
],
"license": "BSD",
- "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* keeps track of how many file descriptors are open, and by default\n limits this to 1024. Any further requests to open a file are put in a\n queue until new slots become available. If 1024 turns out to be too\n much, it decreases the limit further.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n\n## Configuration\n\nThe maximum number of open file descriptors that graceful-fs manages may\nbe adjusted by setting `fs.MAX_OPEN` to a different number. The default\nis 1024.\n",
+ "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* Queues up `open` and `readdir` calls, and retries them once\n something closes if there is an EMFILE error from too many file\n descriptors.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/node-graceful-fs/issues"
},
- "_id": "graceful-fs@2.0.0",
- "_from": "graceful-fs@2"
+ "_id": "graceful-fs@2.0.1",
+ "_from": "graceful-fs@~2.0.0"
}
diff --git a/deps/npm/node_modules/inherits/LICENSE b/deps/npm/node_modules/inherits/LICENSE
index 5a8e332545..dea3013d67 100644
--- a/deps/npm/node_modules/inherits/LICENSE
+++ b/deps/npm/node_modules/inherits/LICENSE
@@ -1,14 +1,16 @@
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
+The ISC License
- Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+Copyright (c) Isaac Z. Schlueter
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
+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.
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
+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/deps/npm/node_modules/inherits/inherits_browser.js b/deps/npm/node_modules/inherits/inherits_browser.js
new file mode 100644
index 0000000000..c1e78a75e6
--- /dev/null
+++ b/deps/npm/node_modules/inherits/inherits_browser.js
@@ -0,0 +1,23 @@
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
diff --git a/deps/npm/node_modules/inherits/package.json b/deps/npm/node_modules/inherits/package.json
index deec27456a..3b4843a6d6 100644
--- a/deps/npm/node_modules/inherits/package.json
+++ b/deps/npm/node_modules/inherits/package.json
@@ -1,7 +1,7 @@
{
"name": "inherits",
"description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
- "version": "2.0.0",
+ "version": "2.0.1",
"keywords": [
"inheritance",
"class",
@@ -16,16 +16,9 @@
"browser": "./inherits_browser.js",
"repository": {
"type": "git",
- "url": "https://github.com/isaacs/inherits"
- },
- "license": {
- "type": "WTFPL2"
- },
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
+ "url": "git://github.com/isaacs/inherits"
},
+ "license": "ISC",
"scripts": {
"test": "node test"
},
@@ -34,6 +27,6 @@
"bugs": {
"url": "https://github.com/isaacs/inherits/issues"
},
- "_id": "inherits@2.0.0",
- "_from": "inherits@2"
+ "_id": "inherits@2.0.1",
+ "_from": "inherits@"
}
diff --git a/deps/npm/node_modules/inherits/test.js b/deps/npm/node_modules/inherits/test.js
new file mode 100644
index 0000000000..fc53012d31
--- /dev/null
+++ b/deps/npm/node_modules/inherits/test.js
@@ -0,0 +1,25 @@
+var inherits = require('./inherits.js')
+var assert = require('assert')
+
+function test(c) {
+ assert(c.constructor === Child)
+ assert(c.constructor.super_ === Parent)
+ assert(Object.getPrototypeOf(c) === Child.prototype)
+ assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype)
+ assert(c instanceof Child)
+ assert(c instanceof Parent)
+}
+
+function Child() {
+ Parent.call(this)
+ test(this)
+}
+
+function Parent() {}
+
+inherits(Child, Parent)
+
+var c = new Child
+test(c)
+
+console.log('ok')
diff --git a/deps/npm/node_modules/lockfile/lockfile.js b/deps/npm/node_modules/lockfile/lockfile.js
index 1eecd5f798..b82f1f0d65 100644
--- a/deps/npm/node_modules/lockfile/lockfile.js
+++ b/deps/npm/node_modules/lockfile/lockfile.js
@@ -6,6 +6,12 @@ if (process.version.match(/^v0\.[0-6]/)) {
wx = c.O_TRUNC | c.O_CREAT | c.O_WRONLY | c.O_EXCL
}
+var os = require('os')
+var filetime = 'ctime'
+if (os.platform() == "win32") {
+ filetime = 'mtime'
+}
+
var debug
var util = require('util')
if (util.debuglog)
@@ -32,7 +38,7 @@ process.on('exit', function () {
// XXX https://github.com/joyent/node/issues/3555
// Remove when node 0.8 is deprecated.
-if (/^v0\.[0-8]/.test(process.version)) {
+if (/^v0\.[0-8]\./.test(process.version)) {
debug('uncaughtException, version = %s', process.version)
process.on('uncaughtException', function H (er) {
debug('uncaughtException')
@@ -86,7 +92,7 @@ exports.check = function (path, opts, cb) {
})
fs.close(fd, function (er) {
- var age = Date.now() - st.ctime.getTime()
+ var age = Date.now() - st[filetime].getTime()
return cb(er, age <= opts.stale)
})
})
@@ -119,7 +125,7 @@ exports.checkSync = function (path, opts) {
} finally {
fs.closeSync(fd)
}
- var age = Date.now() - st.ctime.getTime()
+ var age = Date.now() - st[filetime].getTime()
return (age <= opts.stale)
}
}
@@ -173,7 +179,7 @@ exports.lock = function (path, opts, cb) {
return cb(statEr)
}
- var age = Date.now() - st.ctime.getTime()
+ var age = Date.now() - st[filetime].getTime()
if (age > opts.stale) {
debug('lock stale', path, opts_)
exports.unlock(path, function (er) {
@@ -230,7 +236,7 @@ exports.lockSync = function (path, opts) {
if (opts.stale) {
var st = fs.statSync(path)
- var ct = st.ctime.getTime()
+ var ct = st[filetime].getTime()
if (!(ct % 1000) && (opts.stale % 1000)) {
// probably don't have subsecond resolution.
// round up the staleness indicator.
diff --git a/deps/npm/node_modules/lockfile/package.json b/deps/npm/node_modules/lockfile/package.json
index ea1f5a9193..39d9a857cd 100644
--- a/deps/npm/node_modules/lockfile/package.json
+++ b/deps/npm/node_modules/lockfile/package.json
@@ -1,6 +1,6 @@
{
"name": "lockfile",
- "version": "0.4.0",
+ "version": "0.4.2",
"main": "lockfile.js",
"directories": {
"test": "test"
@@ -36,6 +36,10 @@
"bugs": {
"url": "https://github.com/isaacs/lockfile/issues"
},
- "_id": "lockfile@0.4.0",
- "_from": "lockfile@latest"
+ "_id": "lockfile@0.4.2",
+ "dist": {
+ "shasum": "ab91f5d3745bc005ae4fa34d078910d1f2b9612d"
+ },
+ "_from": "lockfile@0.4.2",
+ "_resolved": "https://registry.npmjs.org/lockfile/-/lockfile-0.4.2.tgz"
}
diff --git a/deps/npm/node_modules/lockfile/test/basic.js b/deps/npm/node_modules/lockfile/test/basic.js
index fb01de3f4b..23e8248796 100644
--- a/deps/npm/node_modules/lockfile/test/basic.js
+++ b/deps/npm/node_modules/lockfile/test/basic.js
@@ -13,6 +13,7 @@ test('setup', function (t) {
try { lockFile.unlockSync('retry-lock') } catch (er) {}
try { lockFile.unlockSync('contentious-lock') } catch (er) {}
try { lockFile.unlockSync('stale-wait-lock') } catch (er) {}
+ try { lockFile.unlockSync('stale-windows-lock') } catch (er) {}
t.end()
})
@@ -249,6 +250,30 @@ test('wait and stale together', function (t) {
})
})
+
+test('stale windows file tunneling test', function (t) {
+ // for windows only
+ // nt file system tunneling feature will make file creation time not updated
+ var opts = { stale: 1000 }
+ lockFile.lockSync('stale-windows-lock')
+ setTimeout(next, 2000)
+ function next () {
+ var locked
+ lockFile.unlockSync('stale-windows-lock')
+ lockFile.lockSync('stale-windows-lock', opts)
+ locked = lockFile.checkSync('stale-windows-lock', opts)
+ t.ok(locked, "should be locked and not stale")
+ lockFile.lock('stale-windows-lock', opts, function (er) {
+ if (!er)
+ t.fail('got second lock? impossible, windows file tunneling problem!')
+ else
+ t.pass('second lock failed, windows file tunneling problem fixed')
+ t.end()
+ })
+ }
+})
+
+
test('cleanup', function (t) {
try { lockFile.unlockSync('basic-lock') } catch (er) {}
try { lockFile.unlockSync('sync-lock') } catch (er) {}
@@ -258,6 +283,7 @@ test('cleanup', function (t) {
try { lockFile.unlockSync('retry-lock') } catch (er) {}
try { lockFile.unlockSync('contentious-lock') } catch (er) {}
try { lockFile.unlockSync('stale-wait-lock') } catch (er) {}
+ try { lockFile.unlockSync('stale-windows-lock') } catch (er) {}
t.end()
})
diff --git a/deps/npm/node_modules/lru-cache/s.js b/deps/npm/node_modules/lru-cache/bench.js
index c2a9e548f2..91115400b7 100644
--- a/deps/npm/node_modules/lru-cache/s.js
+++ b/deps/npm/node_modules/lru-cache/bench.js
@@ -1,7 +1,7 @@
var LRU = require('lru-cache');
var max = +process.argv[2] || 10240;
-var more = 1024;
+var more = 102400;
var cache = LRU({
max: max, maxAge: 86400e3
diff --git a/deps/npm/node_modules/lru-cache/lib/lru-cache.js b/deps/npm/node_modules/lru-cache/lib/lru-cache.js
index 8c80853fd9..49c1dc6de6 100644
--- a/deps/npm/node_modules/lru-cache/lib/lru-cache.js
+++ b/deps/npm/node_modules/lru-cache/lib/lru-cache.js
@@ -107,7 +107,13 @@ function LRUCache (options) {
for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) {
i++
var hit = lruList[k]
- fn.call(thisp, hit.value, hit.key, this)
+ if (maxAge && (Date.now() - hit.now > maxAge)) {
+ del(hit)
+ if (!allowStale) hit = undefined
+ }
+ if (hit) {
+ fn.call(thisp, hit.value, hit.key, this)
+ }
}
}
diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json
index d5a4e8c6dc..e8df4d32b2 100644
--- a/deps/npm/node_modules/lru-cache/package.json
+++ b/deps/npm/node_modules/lru-cache/package.json
@@ -1,7 +1,7 @@
{
"name": "lru-cache",
"description": "A cache object that deletes the least-recently-used items.",
- "version": "2.3.0",
+ "version": "2.3.1",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me"
@@ -54,6 +54,13 @@
],
"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 `n`\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)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\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",
"readmeFilename": "README.md",
- "_id": "lru-cache@2.3.0",
- "_from": "lru-cache@latest"
+ "bugs": {
+ "url": "https://github.com/isaacs/node-lru-cache/issues"
+ },
+ "_id": "lru-cache@2.3.1",
+ "dist": {
+ "shasum": "b3adf6b3d856e954e2c390e6cef22081245a53d6"
+ },
+ "_from": "lru-cache@2.3.1",
+ "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.3.1.tgz"
}
diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js
index 37c9ad37d7..357f27d7f5 100644
--- a/deps/npm/node_modules/node-gyp/lib/configure.js
+++ b/deps/npm/node_modules/node-gyp/lib/configure.js
@@ -52,14 +52,14 @@ function configure (gyp, argv, callback) {
log.verbose('check python', 'checking for Python executable "%s" in the PATH', python)
which(python, function (err, execPath) {
if (err) {
- log.verbose('`which` failed for `%s`', python, err)
+ log.verbose('`which` failed', python, err)
if (win) {
guessPython()
} else {
failNoPython()
}
} else {
- log.verbose('`which` succeeded for `%s`', python, execPath)
+ log.verbose('`which` succeeded', python, execPath)
checkPythonVersion()
}
})
diff --git a/deps/npm/node_modules/node-gyp/lib/install.js b/deps/npm/node_modules/node-gyp/lib/install.js
index 2baaa82240..9f5b80b916 100644
--- a/deps/npm/node_modules/node-gyp/lib/install.js
+++ b/deps/npm/node_modules/node-gyp/lib/install.js
@@ -118,6 +118,9 @@ function install (gyp, argv, callback) {
var req = null
var requestOpts = {
uri: url
+ , headers: {
+ 'User-Agent': 'node-gyp v' + gyp.version + ' (node ' + process.version + ')'
+ }
}
// basic support for a proxy server
diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json
index 41bf9bfdb4..4d0bc21de0 100644
--- a/deps/npm/node_modules/node-gyp/package.json
+++ b/deps/npm/node_modules/node-gyp/package.json
@@ -10,7 +10,7 @@
"bindings",
"gyp"
],
- "version": "0.10.9",
+ "version": "0.10.10",
"installVersion": 9,
"author": {
"name": "Nathan Rajlich",
@@ -49,6 +49,6 @@
"bugs": {
"url": "https://github.com/TooTallNate/node-gyp/issues"
},
- "_id": "node-gyp@0.10.9",
- "_from": "node-gyp@latest"
+ "_id": "node-gyp@0.10.10",
+ "_from": "node-gyp@0.10.10"
}
diff --git a/deps/npm/node_modules/npmconf/package.json b/deps/npm/node_modules/npmconf/package.json
index c0febec4a3..2f188df37d 100644
--- a/deps/npm/node_modules/npmconf/package.json
+++ b/deps/npm/node_modules/npmconf/package.json
@@ -1,6 +1,6 @@
{
"name": "npmconf",
- "version": "0.1.2",
+ "version": "0.1.3",
"description": "The config thing npm uses",
"main": "npmconf.js",
"directories": {
@@ -16,7 +16,9 @@
"semver": "2",
"ini": "~1.1.0"
},
- "devDependencies": {},
+ "devDependencies": {
+ "tap": "~0.4.0"
+ },
"scripts": {
"test": "tap test/*.js"
},
@@ -42,6 +44,6 @@
"bugs": {
"url": "https://github.com/isaacs/npmconf/issues"
},
- "_id": "npmconf@0.1.2",
+ "_id": "npmconf@0.1.3",
"_from": "npmconf@latest"
}
diff --git a/deps/npm/node_modules/read-installed/LICENSE b/deps/npm/node_modules/read-installed/LICENSE
index 0c44ae716d..dea3013d67 100644
--- a/deps/npm/node_modules/read-installed/LICENSE
+++ b/deps/npm/node_modules/read-installed/LICENSE
@@ -1,27 +1,16 @@
-Copyright (c) Isaac Z. Schlueter ("Author")
-All rights reserved.
+The ISC License
-The BSD License
+Copyright (c) Isaac Z. Schlueter
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
+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.
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+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.
-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 AUTHOR 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 AUTHOR 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/deps/npm/node_modules/read-installed/package.json b/deps/npm/node_modules/read-installed/package.json
index 4eb4502a75..08fabd7797 100644
--- a/deps/npm/node_modules/read-installed/package.json
+++ b/deps/npm/node_modules/read-installed/package.json
@@ -1,7 +1,7 @@
{
"name": "read-installed",
"description": "Read all the installed packages in a folder, and return a tree structure with all the data.",
- "version": "0.2.3",
+ "version": "0.2.4",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/read-installed"
@@ -24,11 +24,12 @@
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
+ "license": "ISC",
"readme": "# read-installed\n\nRead all the installed packages in a folder, and return a tree\nstructure with all the data.\n\nnpm uses this.\n\n## Usage\n\n```javascript\nvar readInstalled = require(\"read-installed\")\n// depth is optional, defaults to Infinity\nreadInstalled(folder, depth, logFunction, function (er, data) {\n ...\n})\n```\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/read-installed/issues"
},
- "_id": "read-installed@0.2.3",
- "_from": "read-installed@latest"
+ "_id": "read-installed@0.2.4",
+ "_from": "read-installed@~0.2.2"
}
diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md
index 1d2f79b47d..712bbe193a 100644
--- a/deps/npm/node_modules/request/README.md
+++ b/deps/npm/node_modules/request/README.md
@@ -1,18 +1,6 @@
-# Request -- Simplified HTTP request method
+# Request -- Simplified HTTP client
-## Install
-
-<pre>
- npm install request
-</pre>
-
-Or from source:
-
-<pre>
- git clone git://github.com/mikeal/request.git
- cd request
- npm link
-</pre>
+[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)
## Super simple to use
@@ -56,7 +44,7 @@ http.createServer(function (req, resp) {
req.pipe(request.put('http://mysite.com/doodle.png'))
} else if (req.method === 'GET' || req.method === 'HEAD') {
request.get('http://mysite.com/doodle.png').pipe(resp)
- }
+ }
}
})
```
@@ -150,10 +138,10 @@ var qs = require('querystring')
request.post({url:url, oauth:oauth}, function (e, r, body) {
// Ideally, you would take the body in the response
// and construct a URL that a user clicks on (like a sign in button).
- // The verifier is only available in the response after a user has
+ // The verifier is only available in the response after a user has
// verified with twitter that they are authorizing your app.
var access_token = qs.parse(body)
- , oauth =
+ , oauth =
{ consumer_key: CONSUMER_KEY
, consumer_secret: CONSUMER_SECRET
, token: access_token.oauth_token
@@ -163,14 +151,14 @@ request.post({url:url, oauth:oauth}, function (e, r, body) {
;
request.post({url:url, oauth:oauth}, function (e, r, body) {
var perm_token = qs.parse(body)
- , oauth =
+ , oauth =
{ consumer_key: CONSUMER_KEY
, consumer_secret: CONSUMER_SECRET
, token: perm_token.oauth_token
, token_secret: perm_token.oauth_token_secret
}
, url = 'https://api.twitter.com/1/users/show.json?'
- , params =
+ , params =
{ screen_name: perm_token.screen_name
, user_id: perm_token.user_id
}
@@ -204,7 +192,7 @@ The first argument can be either a url or an options object. The only required o
* `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.
* `pool` - A hash object containing the agents for these requests. If omitted this request will use the global pool which is set to node's default maxSockets.
* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.
-* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request
+* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request
* `proxy` - An HTTP proxy to be used. Support proxy Auth with Basic Auth the same way it's supported with the `url` parameter by embedding the auth info in the uri.
* `oauth` - Options for OAuth HMAC-SHA1 signing, see documentation above.
* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).
@@ -221,8 +209,8 @@ The callback argument gets 3 arguments. The first is an error when applicable (u
There are also shorthand methods for different HTTP METHODs and some other conveniences.
-### request.defaults(options)
-
+### request.defaults(options)
+
This method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.
### request.put
@@ -297,12 +285,12 @@ request.jar()
request(
{ method: 'PUT'
, uri: 'http://mikeal.iriscouch.com/testjs/' + rand
- , multipart:
+ , multipart:
[ { 'content-type': 'application/json'
, body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
}
, { body: 'I am an attachment' }
- ]
+ ]
}
, function (error, response, body) {
if(response.statusCode == 201){
diff --git a/deps/npm/node_modules/request/index.js b/deps/npm/node_modules/request/index.js
index d56f9ecff1..06b407df09 100755
--- a/deps/npm/node_modules/request/index.js
+++ b/deps/npm/node_modules/request/index.js
@@ -12,1218 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-var http = require('http')
- , https = false
- , tls = false
- , url = require('url')
- , util = require('util')
- , stream = require('stream')
- , qs = require('qs')
- , querystring = require('querystring')
- , crypto = require('crypto')
-
- , oauth = require('oauth-sign')
- , hawk = require('hawk')
- , aws = require('aws-sign')
- , httpSignature = require('http-signature')
- , uuid = require('node-uuid')
- , mime = require('mime')
- , tunnel = require('tunnel-agent')
- , safeStringify = require('json-stringify-safe')
-
- , ForeverAgent = require('forever-agent')
- , FormData = require('form-data')
-
- , Cookie = require('cookie-jar')
+var Cookie = require('cookie-jar')
, CookieJar = Cookie.Jar
, cookieJar = new CookieJar
- ;
-
-try {
- https = require('https')
-} catch (e) {}
-
-try {
- tls = require('tls')
-} catch (e) {}
-
-var debug
-if (/\brequest\b/.test(process.env.NODE_DEBUG)) {
- debug = function() {
- console.error('REQUEST %s', util.format.apply(util, arguments))
- }
-} else {
- debug = function() {}
-}
-
-function toBase64 (str) {
- return (new Buffer(str || "", "ascii")).toString("base64")
-}
-
-function md5 (str) {
- return crypto.createHash('md5').update(str).digest('hex')
-}
-
-// Hacky fix for pre-0.4.4 https
-if (https && !https.Agent) {
- https.Agent = function (options) {
- http.Agent.call(this, options)
- }
- util.inherits(https.Agent, http.Agent)
- https.Agent.prototype._getConnection = function (host, port, cb) {
- var s = tls.connect(port, host, this.options, function () {
- // do other checks here?
- if (cb) cb()
- })
- return s
- }
-}
-
-function isReadStream (rs) {
- if (rs.readable && rs.path && rs.mode) {
- return true
- }
-}
-
-function copy (obj) {
- var o = {}
- Object.keys(obj).forEach(function (i) {
- o[i] = obj[i]
- })
- return o
-}
-
-var isUrl = /^https?:/
-
-var globalPool = {}
-
-function Request (options) {
- stream.Stream.call(this)
- this.readable = true
- this.writable = true
-
- if (typeof options === 'string') {
- options = {uri:options}
- }
-
- var reserved = Object.keys(Request.prototype)
- for (var i in options) {
- if (reserved.indexOf(i) === -1) {
- this[i] = options[i]
- } else {
- if (typeof options[i] === 'function') {
- delete options[i]
- }
- }
- }
-
- if (options.method) {
- this.explicitMethod = true
- }
-
- this.init(options)
-}
-util.inherits(Request, stream.Stream)
-Request.prototype.init = function (options) {
- // init() contains all the code to setup the request object.
- // the actual outgoing request is not started until start() is called
- // this function is called from both the constructor and on redirect.
- var self = this
- if (!options) options = {}
-
- if (!self.method) self.method = options.method || 'GET'
- self.localAddress = options.localAddress
-
- debug(options)
- if (!self.pool && self.pool !== false) self.pool = globalPool
- self.dests = self.dests || []
- self.__isRequestRequest = true
-
- // Protect against double callback
- if (!self._callback && self.callback) {
- self._callback = self.callback
- self.callback = function () {
- if (self._callbackCalled) return // Print a warning maybe?
- self._callbackCalled = true
- self._callback.apply(self, arguments)
- }
- self.on('error', self.callback.bind())
- self.on('complete', self.callback.bind(self, null))
- }
-
- if (self.url && !self.uri) {
- // People use this property instead all the time so why not just support it.
- self.uri = self.url
- delete self.url
- }
-
- if (!self.uri) {
- // this will throw if unhandled but is handleable when in a redirect
- return self.emit('error', new Error("options.uri is a required argument"))
- } else {
- if (typeof self.uri == "string") self.uri = url.parse(self.uri)
- }
-
- if (self.strictSSL === false) {
- self.rejectUnauthorized = false
- }
-
- if (self.proxy) {
- if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy)
-
- // do the HTTP CONNECT dance using koichik/node-tunnel
- if (http.globalAgent && self.uri.protocol === "https:") {
- var tunnelFn = self.proxy.protocol === "http:"
- ? tunnel.httpsOverHttp : tunnel.httpsOverHttps
-
- var tunnelOptions = { proxy: { host: self.proxy.hostname
- , port: +self.proxy.port
- , proxyAuth: self.proxy.auth
- , headers: { Host: self.uri.hostname + ':' +
- (self.uri.port || self.uri.protocol === 'https:' ? 443 : 80) }}
- , rejectUnauthorized: self.rejectUnauthorized
- , ca: this.ca }
-
- self.agent = tunnelFn(tunnelOptions)
- self.tunnel = true
- }
- }
-
- if (!self.uri.host || !self.uri.pathname) {
- // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar
- // Detect and reject it as soon as possible
- var faultyUri = url.format(self.uri)
- var message = 'Invalid URI "' + faultyUri + '"'
- if (Object.keys(options).length === 0) {
- // No option ? This can be the sign of a redirect
- // As this is a case where the user cannot do anything (he didn't call request directly with this URL)
- // he should be warned that it can be caused by a redirection (can save some hair)
- message += '. This can be caused by a crappy redirection.'
- }
- self.emit('error', new Error(message))
- return // This error was fatal
- }
-
- self._redirectsFollowed = self._redirectsFollowed || 0
- self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10
- self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true
- self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false
- if (self.followRedirect || self.followAllRedirects)
- self.redirects = self.redirects || []
-
- self.headers = self.headers ? copy(self.headers) : {}
-
- self.setHost = false
- if (!(self.headers.host || self.headers.Host)) {
- self.headers.host = self.uri.hostname
- if (self.uri.port) {
- if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') &&
- !(self.uri.port === 443 && self.uri.protocol === 'https:') )
- self.headers.host += (':'+self.uri.port)
- }
- self.setHost = true
- }
-
- self.jar(self._jar || options.jar)
-
- if (!self.uri.pathname) {self.uri.pathname = '/'}
- if (!self.uri.port) {
- if (self.uri.protocol == 'http:') {self.uri.port = 80}
- else if (self.uri.protocol == 'https:') {self.uri.port = 443}
- }
-
- if (self.proxy && !self.tunnel) {
- self.port = self.proxy.port
- self.host = self.proxy.hostname
- } else {
- self.port = self.uri.port
- self.host = self.uri.hostname
- }
-
- self.clientErrorHandler = function (error) {
- if (self._aborted) return
-
- if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET'
- && self.agent.addRequestNoreuse) {
- self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
- self.start()
- self.req.end()
- return
- }
- if (self.timeout && self.timeoutTimer) {
- clearTimeout(self.timeoutTimer)
- self.timeoutTimer = null
- }
- self.emit('error', error)
- }
-
- self._parserErrorHandler = function (error) {
- if (this.res) {
- if (this.res.request) {
- this.res.request.emit('error', error)
- } else {
- this.res.emit('error', error)
- }
- } else {
- this._httpMessage.emit('error', error)
- }
- }
-
- if (options.form) {
- self.form(options.form)
- }
-
- if (options.qs) self.qs(options.qs)
-
- if (self.uri.path) {
- self.path = self.uri.path
- } else {
- self.path = self.uri.pathname + (self.uri.search || "")
- }
-
- if (self.path.length === 0) self.path = '/'
-
-
- // Auth must happen last in case signing is dependent on other headers
- if (options.oauth) {
- self.oauth(options.oauth)
- }
-
- if (options.aws) {
- self.aws(options.aws)
- }
-
- if (options.hawk) {
- self.hawk(options.hawk)
- }
-
- if (options.httpSignature) {
- self.httpSignature(options.httpSignature)
- }
-
- if (options.auth) {
- self.auth(
- (options.auth.user==="") ? options.auth.user : (options.auth.user || options.auth.username ),
- options.auth.pass || options.auth.password,
- options.auth.sendImmediately)
- }
-
- if (self.uri.auth && !self.headers.authorization) {
- var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) })
- self.auth(authPieces[0], authPieces.slice(1).join(':'), true)
- }
- if (self.proxy && self.proxy.auth && !self.headers['proxy-authorization'] && !self.tunnel) {
- self.headers['proxy-authorization'] = "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':'))
- }
-
-
- if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
-
- if (options.json) {
- self.json(options.json)
- } else if (options.multipart) {
- self.boundary = uuid()
- self.multipart(options.multipart)
- }
-
- if (self.body) {
- var length = 0
- if (!Buffer.isBuffer(self.body)) {
- if (Array.isArray(self.body)) {
- for (var i = 0; i < self.body.length; i++) {
- length += self.body[i].length
- }
- } else {
- self.body = new Buffer(self.body)
- length = self.body.length
- }
- } else {
- length = self.body.length
- }
- if (length) {
- if(!self.headers['content-length'] && !self.headers['Content-Length'])
- self.headers['content-length'] = length
- } else {
- throw new Error('Argument error, options.body.')
- }
- }
-
- var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
- , defaultModules = {'http:':http, 'https:':https}
- , httpModules = self.httpModules || {}
- ;
- self.httpModule = httpModules[protocol] || defaultModules[protocol]
-
- if (!self.httpModule) return this.emit('error', new Error("Invalid protocol"))
-
- if (options.ca) self.ca = options.ca
-
- if (!self.agent) {
- if (options.agentOptions) self.agentOptions = options.agentOptions
-
- if (options.agentClass) {
- self.agentClass = options.agentClass
- } else if (options.forever) {
- self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
- } else {
- self.agentClass = self.httpModule.Agent
- }
- }
-
- if (self.pool === false) {
- self.agent = false
- } else {
- self.agent = self.agent || self.getAgent()
- if (self.maxSockets) {
- // Don't use our pooling if node has the refactored client
- self.agent.maxSockets = self.maxSockets
- }
- if (self.pool.maxSockets) {
- // Don't use our pooling if node has the refactored client
- self.agent.maxSockets = self.pool.maxSockets
- }
- }
-
- self.on('pipe', function (src) {
- if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.")
- self.src = src
- if (isReadStream(src)) {
- if (!self.headers['content-type'] && !self.headers['Content-Type'])
- self.headers['content-type'] = mime.lookup(src.path)
- } else {
- if (src.headers) {
- for (var i in src.headers) {
- if (!self.headers[i]) {
- self.headers[i] = src.headers[i]
- }
- }
- }
- if (self._json && !self.headers['content-type'] && !self.headers['Content-Type'])
- self.headers['content-type'] = 'application/json'
- if (src.method && !self.explicitMethod) {
- self.method = src.method
- }
- }
-
- // self.on('pipe', function () {
- // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.")
- // })
- })
-
- process.nextTick(function () {
- if (self._aborted) return
-
- if (self._form) {
- self.setHeaders(self._form.getHeaders())
- self._form.pipe(self)
- }
- if (self.body) {
- if (Array.isArray(self.body)) {
- self.body.forEach(function (part) {
- self.write(part)
- })
- } else {
- self.write(self.body)
- }
- self.end()
- } else if (self.requestBodyStream) {
- console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.")
- self.requestBodyStream.pipe(self)
- } else if (!self.src) {
- if (self.method !== 'GET' && typeof self.method !== 'undefined') {
- self.headers['content-length'] = 0
- }
- self.end()
- }
- self.ntick = true
- })
-}
-
-// Must call this when following a redirect from https to http or vice versa
-// Attempts to keep everything as identical as possible, but update the
-// httpModule, Tunneling agent, and/or Forever Agent in use.
-Request.prototype._updateProtocol = function () {
- var self = this
- var protocol = self.uri.protocol
-
- if (protocol === 'https:') {
- // previously was doing http, now doing https
- // if it's https, then we might need to tunnel now.
- if (self.proxy) {
- self.tunnel = true
- var tunnelFn = self.proxy.protocol === 'http:'
- ? tunnel.httpsOverHttp : tunnel.httpsOverHttps
- var tunnelOptions = { proxy: { host: self.proxy.hostname
- , port: +self.proxy.port
- , proxyAuth: self.proxy.auth }
- , rejectUnauthorized: self.rejectUnauthorized
- , ca: self.ca }
- self.agent = tunnelFn(tunnelOptions)
- return
- }
-
- self.httpModule = https
- switch (self.agentClass) {
- case ForeverAgent:
- self.agentClass = ForeverAgent.SSL
- break
- case http.Agent:
- self.agentClass = https.Agent
- break
- default:
- // nothing we can do. Just hope for the best.
- return
- }
-
- // if there's an agent, we need to get a new one.
- if (self.agent) self.agent = self.getAgent()
-
- } else {
- // previously was doing https, now doing http
- // stop any tunneling.
- if (self.tunnel) self.tunnel = false
- self.httpModule = http
- switch (self.agentClass) {
- case ForeverAgent.SSL:
- self.agentClass = ForeverAgent
- break
- case https.Agent:
- self.agentClass = http.Agent
- break
- default:
- // nothing we can do. just hope for the best
- return
- }
-
- // if there's an agent, then get a new one.
- if (self.agent) {
- self.agent = null
- self.agent = self.getAgent()
- }
- }
-}
-
-Request.prototype.getAgent = function () {
- var Agent = this.agentClass
- var options = {}
- if (this.agentOptions) {
- for (var i in this.agentOptions) {
- options[i] = this.agentOptions[i]
- }
- }
- if (this.ca) options.ca = this.ca
- if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized
-
- if (this.cert && this.key) {
- options.key = this.key
- options.cert = this.cert
- }
-
- var poolKey = ''
-
- // different types of agents are in different pools
- if (Agent !== this.httpModule.Agent) {
- poolKey += Agent.name
- }
-
- if (!this.httpModule.globalAgent) {
- // node 0.4.x
- options.host = this.host
- options.port = this.port
- if (poolKey) poolKey += ':'
- poolKey += this.host + ':' + this.port
- }
-
- // ca option is only relevant if proxy or destination are https
- var proxy = this.proxy
- if (typeof proxy === 'string') proxy = url.parse(proxy)
- var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:'
- if (isHttps) {
- if (options.ca) {
- if (poolKey) poolKey += ':'
- poolKey += options.ca
- }
-
- if (typeof options.rejectUnauthorized !== 'undefined') {
- if (poolKey) poolKey += ':'
- poolKey += options.rejectUnauthorized
- }
-
- if (options.cert)
- poolKey += options.cert.toString('ascii') + options.key.toString('ascii')
-
- if (options.ciphers) {
- if (poolKey) poolKey += ':'
- poolKey += options.ciphers
- }
-
- if (options.secureOptions) {
- if (poolKey) poolKey += ':'
- poolKey += options.secureOptions
- }
- }
-
- if (this.pool === globalPool && !poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) {
- // not doing anything special. Use the globalAgent
- return this.httpModule.globalAgent
- }
-
- // we're using a stored agent. Make sure it's protocol-specific
- poolKey = this.uri.protocol + poolKey
-
- // already generated an agent for this setting
- if (this.pool[poolKey]) return this.pool[poolKey]
-
- return this.pool[poolKey] = new Agent(options)
-}
-
-Request.prototype.start = function () {
- // start() is called once we are ready to send the outgoing HTTP request.
- // this is usually called on the first write(), end() or on nextTick()
- var self = this
- if (self._aborted) return
-
- self._started = true
- self.method = self.method || 'GET'
- self.href = self.uri.href
-
- if (self.src && self.src.stat && self.src.stat.size && !self.headers['content-length'] && !self.headers['Content-Length']) {
- self.headers['content-length'] = self.src.stat.size
- }
- if (self._aws) {
- self.aws(self._aws, true)
- }
-
- // We have a method named auth, which is completely different from the http.request
- // auth option. If we don't remove it, we're gonna have a bad time.
- var reqOptions = copy(self)
- delete reqOptions.auth
-
- debug('make request', self.uri.href)
- self.req = self.httpModule.request(reqOptions, self.onResponse.bind(self))
-
- if (self.timeout && !self.timeoutTimer) {
- self.timeoutTimer = setTimeout(function () {
- self.req.abort()
- var e = new Error("ETIMEDOUT")
- e.code = "ETIMEDOUT"
- self.emit("error", e)
- }, self.timeout)
-
- // Set additional timeout on socket - in case if remote
- // server freeze after sending headers
- if (self.req.setTimeout) { // only works on node 0.6+
- self.req.setTimeout(self.timeout, function () {
- if (self.req) {
- self.req.abort()
- var e = new Error("ESOCKETTIMEDOUT")
- e.code = "ESOCKETTIMEDOUT"
- self.emit("error", e)
- }
- })
- }
- }
-
- self.req.on('error', self.clientErrorHandler)
- self.req.on('drain', function() {
- self.emit('drain')
- })
- self.on('end', function() {
- if ( self.req.connection ) self.req.connection.removeListener('error', self._parserErrorHandler)
- })
- self.emit('request', self.req)
-}
-Request.prototype.onResponse = function (response) {
- var self = this
- debug('onResponse', self.uri.href, response.statusCode, response.headers)
- response.on('end', function() {
- debug('response end', self.uri.href, response.statusCode, response.headers)
- });
-
- if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) {
- response.connection.once('error', self._parserErrorHandler)
- }
- if (self._aborted) {
- debug('aborted', self.uri.href)
- response.resume()
- return
- }
- if (self._paused) response.pause()
- else response.resume()
-
- self.response = response
- response.request = self
- response.toJSON = toJSON
-
- // XXX This is different on 0.10, because SSL is strict by default
- if (self.httpModule === https &&
- self.strictSSL &&
- !response.client.authorized) {
- debug('strict ssl error', self.uri.href)
- var sslErr = response.client.authorizationError
- self.emit('error', new Error('SSL Error: '+ sslErr))
- return
- }
-
- if (self.setHost) delete self.headers.host
- if (self.timeout && self.timeoutTimer) {
- clearTimeout(self.timeoutTimer)
- self.timeoutTimer = null
- }
-
- var addCookie = function (cookie) {
- if (self._jar){
- if(self._jar.add){
- self._jar.add(new Cookie(cookie))
- }
- else cookieJar.add(new Cookie(cookie))
- }
-
- }
-
- if (response.headers['set-cookie'] && (!self._disableCookies)) {
- if (Array.isArray(response.headers['set-cookie'])) response.headers['set-cookie'].forEach(addCookie)
- else addCookie(response.headers['set-cookie'])
- }
-
- var redirectTo = null
- if (response.statusCode >= 300 && response.statusCode < 400 && response.headers.location) {
- debug('redirect', response.headers.location)
-
- if (self.followAllRedirects) {
- redirectTo = response.headers.location
- } else if (self.followRedirect) {
- switch (self.method) {
- case 'PATCH':
- case 'PUT':
- case 'POST':
- case 'DELETE':
- // Do not follow redirects
- break
- default:
- redirectTo = response.headers.location
- break
- }
- }
- } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) {
- var authHeader = response.headers['www-authenticate']
- var authVerb = authHeader && authHeader.split(' ')[0]
- debug('reauth', authVerb)
-
- switch (authVerb) {
- case 'Basic':
- self.auth(self._user, self._pass, true)
- redirectTo = self.uri
- break
-
- case 'Digest':
- // TODO: More complete implementation of RFC 2617. For reference:
- // http://tools.ietf.org/html/rfc2617#section-3
- // https://github.com/bagder/curl/blob/master/lib/http_digest.c
-
- var matches = authHeader.match(/([a-z0-9_-]+)="([^"]+)"/gi)
- var challenge = {}
-
- for (var i = 0; i < matches.length; i++) {
- var eqPos = matches[i].indexOf('=')
- var key = matches[i].substring(0, eqPos)
- var quotedValue = matches[i].substring(eqPos + 1)
- challenge[key] = quotedValue.substring(1, quotedValue.length - 1)
- }
-
- var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass)
- var ha2 = md5(self.method + ':' + self.uri.path)
- var digestResponse = md5(ha1 + ':' + challenge.nonce + ':1::auth:' + ha2)
- var authValues = {
- username: self._user,
- realm: challenge.realm,
- nonce: challenge.nonce,
- uri: self.uri.path,
- qop: challenge.qop,
- response: digestResponse,
- nc: 1,
- cnonce: ''
- }
-
- authHeader = []
- for (var k in authValues) {
- authHeader.push(k + '="' + authValues[k] + '"')
- }
- authHeader = 'Digest ' + authHeader.join(', ')
- self.setHeader('authorization', authHeader)
- self._sentAuth = true
-
- redirectTo = self.uri
- break
- }
- }
-
- if (redirectTo) {
- debug('redirect to', redirectTo)
-
- // ignore any potential response body. it cannot possibly be useful
- // to us at this point.
- if (self._paused) response.resume()
-
- if (self._redirectsFollowed >= self.maxRedirects) {
- self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href))
- return
- }
- self._redirectsFollowed += 1
-
- if (!isUrl.test(redirectTo)) {
- redirectTo = url.resolve(self.uri.href, redirectTo)
- }
-
- var uriPrev = self.uri
- self.uri = url.parse(redirectTo)
-
- // handle the case where we change protocol from https to http or vice versa
- if (self.uri.protocol !== uriPrev.protocol) {
- self._updateProtocol()
- }
-
- self.redirects.push(
- { statusCode : response.statusCode
- , redirectUri: redirectTo
- }
- )
- if (self.followAllRedirects && response.statusCode != 401) self.method = 'GET'
- // self.method = 'GET' // Force all redirects to use GET || commented out fixes #215
- delete self.src
- delete self.req
- delete self.agent
- delete self._started
- if (response.statusCode != 401) {
- // Remove parameters from the previous response, unless this is the second request
- // for a server that requires digest authentication.
- delete self.body
- delete self._form
- if (self.headers) {
- delete self.headers.host
- delete self.headers['content-type']
- delete self.headers['content-length']
- }
- }
-
- self.emit('redirect');
-
- self.init()
- return // Ignore the rest of the response
- } else {
- self._redirectsFollowed = self._redirectsFollowed || 0
- // Be a good stream and emit end when the response is finished.
- // Hack to emit end on close because of a core bug that never fires end
- response.on('close', function () {
- if (!self._ended) self.response.emit('end')
- })
-
- if (self.encoding) {
- if (self.dests.length !== 0) {
- console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")
- } else {
- response.setEncoding(self.encoding)
- }
- }
-
- self.emit('response', response)
-
- self.dests.forEach(function (dest) {
- self.pipeDest(dest)
- })
-
- response.on("data", function (chunk) {
- self._destdata = true
- self.emit("data", chunk)
- })
- response.on("end", function (chunk) {
- self._ended = true
- self.emit("end", chunk)
- })
- response.on("close", function () {self.emit("close")})
-
- if (self.callback) {
- var buffer = []
- var bodyLen = 0
- self.on("data", function (chunk) {
- buffer.push(chunk)
- bodyLen += chunk.length
- })
- self.on("end", function () {
- debug('end event', self.uri.href)
- if (self._aborted) {
- debug('aborted', self.uri.href)
- return
- }
-
- if (buffer.length && Buffer.isBuffer(buffer[0])) {
- debug('has body', self.uri.href, bodyLen)
- var body = new Buffer(bodyLen)
- var i = 0
- buffer.forEach(function (chunk) {
- chunk.copy(body, i, 0, chunk.length)
- i += chunk.length
- })
- if (self.encoding === null) {
- response.body = body
- } else {
- response.body = body.toString(self.encoding)
- }
- } else if (buffer.length) {
- // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation.
- // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse().
- if (self.encoding === 'utf8' && buffer[0].length > 0 && buffer[0][0] === "\uFEFF") {
- buffer[0] = buffer[0].substring(1)
- }
- response.body = buffer.join('')
- }
-
- if (self._json) {
- try {
- response.body = JSON.parse(response.body)
- } catch (e) {}
- }
- debug('emitting complete', self.uri.href)
- if(response.body == undefined && !self._json) {
- response.body = "";
- }
- self.emit('complete', response, response.body)
- })
- }
- //if no callback
- else{
- self.on("end", function () {
- if (self._aborted) {
- debug('aborted', self.uri.href)
- return
- }
- self.emit('complete', response);
- });
- }
- }
- debug('finish init function', self.uri.href)
-}
-
-Request.prototype.abort = function () {
- this._aborted = true
-
- if (this.req) {
- this.req.abort()
- }
- else if (this.response) {
- this.response.abort()
- }
-
- this.emit("abort")
-}
-
-Request.prototype.pipeDest = function (dest) {
- var response = this.response
- // Called after the response is received
- if (dest.headers) {
- dest.headers['content-type'] = response.headers['content-type']
- if (response.headers['content-length']) {
- dest.headers['content-length'] = response.headers['content-length']
- }
- }
- if (dest.setHeader && !dest.headersSent) {
- for (var i in response.headers) {
- dest.setHeader(i, response.headers[i])
- }
- dest.statusCode = response.statusCode
- }
- if (this.pipefilter) this.pipefilter(response, dest)
-}
-
-// Composable API
-Request.prototype.setHeader = function (name, value, clobber) {
- if (clobber === undefined) clobber = true
- if (clobber || !this.headers.hasOwnProperty(name)) this.headers[name] = value
- else this.headers[name] += ',' + value
- return this
-}
-Request.prototype.setHeaders = function (headers) {
- for (var i in headers) {this.setHeader(i, headers[i])}
- return this
-}
-Request.prototype.qs = function (q, clobber) {
- var base
- if (!clobber && this.uri.query) base = qs.parse(this.uri.query)
- else base = {}
-
- for (var i in q) {
- base[i] = q[i]
- }
-
- if (qs.stringify(base) === ''){
- return this
- }
-
- this.uri = url.parse(this.uri.href.split('?')[0] + '?' + qs.stringify(base))
- this.url = this.uri
- this.path = this.uri.path
-
- return this
-}
-Request.prototype.form = function (form) {
- if (form) {
- this.headers['content-type'] = 'application/x-www-form-urlencoded; charset=utf-8'
- this.body = qs.stringify(form).toString('utf8')
- return this
- }
- // create form-data object
- this._form = new FormData()
- return this._form
-}
-Request.prototype.multipart = function (multipart) {
- var self = this
- self.body = []
-
- if (!self.headers['content-type']) {
- self.headers['content-type'] = 'multipart/related; boundary=' + self.boundary
- } else {
- self.headers['content-type'] = self.headers['content-type'].split(';')[0] + '; boundary=' + self.boundary
- }
-
- if (!multipart.forEach) throw new Error('Argument error, options.multipart.')
-
- if (self.preambleCRLF) {
- self.body.push(new Buffer('\r\n'))
- }
-
- multipart.forEach(function (part) {
- var body = part.body
- if(body == null) throw Error('Body attribute missing in multipart.')
- delete part.body
- var preamble = '--' + self.boundary + '\r\n'
- Object.keys(part).forEach(function (key) {
- preamble += key + ': ' + part[key] + '\r\n'
- })
- preamble += '\r\n'
- self.body.push(new Buffer(preamble))
- self.body.push(new Buffer(body))
- self.body.push(new Buffer('\r\n'))
- })
- self.body.push(new Buffer('--' + self.boundary + '--'))
- return self
-}
-Request.prototype.json = function (val) {
- var self = this;
- var setAcceptHeader = function() {
- if (!self.headers['accept'] && !self.headers['Accept']) {
- self.setHeader('accept', 'application/json')
- }
- }
- setAcceptHeader();
- this._json = true
- if (typeof val === 'boolean') {
- if (typeof this.body === 'object') {
- setAcceptHeader();
- this.body = safeStringify(this.body)
- self.setHeader('content-type', 'application/json')
- }
- } else {
- setAcceptHeader();
- this.body = safeStringify(val)
- self.setHeader('content-type', 'application/json')
- }
- return this
-}
-function getHeader(name, headers) {
- var result, re, match
- Object.keys(headers).forEach(function (key) {
- re = new RegExp(name, 'i')
- match = key.match(re)
- if (match) result = headers[key]
- })
- return result
-}
-Request.prototype.auth = function (user, pass, sendImmediately) {
- if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) {
- throw new Error('auth() received invalid user or password')
- }
- this._user = user
- this._pass = pass
- this._hasAuth = true
- if (sendImmediately || typeof sendImmediately == 'undefined') {
- this.setHeader('authorization', 'Basic ' + toBase64(user + ':' + pass))
- this._sentAuth = true
- }
- return this
-}
-Request.prototype.aws = function (opts, now) {
- if (!now) {
- this._aws = opts
- return this
- }
- var date = new Date()
- this.setHeader('date', date.toUTCString())
- var auth =
- { key: opts.key
- , secret: opts.secret
- , verb: this.method.toUpperCase()
- , date: date
- , contentType: getHeader('content-type', this.headers) || ''
- , md5: getHeader('content-md5', this.headers) || ''
- , amazonHeaders: aws.canonicalizeHeaders(this.headers)
- }
- if (opts.bucket && this.path) {
- auth.resource = '/' + opts.bucket + this.path
- } else if (opts.bucket && !this.path) {
- auth.resource = '/' + opts.bucket
- } else if (!opts.bucket && this.path) {
- auth.resource = this.path
- } else if (!opts.bucket && !this.path) {
- auth.resource = '/'
- }
- auth.resource = aws.canonicalizeResource(auth.resource)
- this.setHeader('authorization', aws.authorization(auth))
-
- return this
-}
-Request.prototype.httpSignature = function (opts) {
- var req = this
- httpSignature.signRequest({
- getHeader: function(header) {
- return getHeader(header, req.headers)
- },
- setHeader: function(header, value) {
- req.setHeader(header, value)
- },
- method: this.method,
- path: this.path
- }, opts)
- debug('httpSignature authorization', getHeader('authorization', this.headers))
-
- return this
-}
-
-Request.prototype.hawk = function (opts) {
- this.headers.Authorization = hawk.client.header(this.uri, this.method, opts).field
-}
-
-Request.prototype.oauth = function (_oauth) {
- var form
- if (this.headers['content-type'] &&
- this.headers['content-type'].slice(0, 'application/x-www-form-urlencoded'.length) ===
- 'application/x-www-form-urlencoded'
- ) {
- form = qs.parse(this.body)
- }
- if (this.uri.query) {
- form = qs.parse(this.uri.query)
- }
- if (!form) form = {}
- var oa = {}
- for (var i in form) oa[i] = form[i]
- for (var i in _oauth) oa['oauth_'+i] = _oauth[i]
- if (!oa.oauth_version) oa.oauth_version = '1.0'
- if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString()
- if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '')
-
- oa.oauth_signature_method = 'HMAC-SHA1'
-
- var consumer_secret = oa.oauth_consumer_secret
- delete oa.oauth_consumer_secret
- var token_secret = oa.oauth_token_secret
- delete oa.oauth_token_secret
- var timestamp = oa.oauth_timestamp
-
- var baseurl = this.uri.protocol + '//' + this.uri.host + this.uri.pathname
- var signature = oauth.hmacsign(this.method, baseurl, oa, consumer_secret, token_secret)
-
- // oa.oauth_signature = signature
- for (var i in form) {
- if ( i.slice(0, 'oauth_') in _oauth) {
- // skip
- } else {
- delete oa['oauth_'+i]
- if (i !== 'x_auth_mode') delete oa[i]
- }
- }
- oa.oauth_timestamp = timestamp
- this.headers.Authorization =
- 'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',')
- this.headers.Authorization += ',oauth_signature="' + oauth.rfc3986(signature) + '"'
- return this
-}
-Request.prototype.jar = function (jar) {
- var cookies
-
- if (this._redirectsFollowed === 0) {
- this.originalCookieHeader = this.headers.cookie
- }
-
- if (!jar) {
- // disable cookies
- cookies = false
- this._disableCookies = true
- } else if (jar && jar.get) {
- // fetch cookie from the user defined cookie jar
- cookies = jar.get({ url: this.uri.href })
- } else {
- // fetch cookie from the global cookie jar
- cookies = cookieJar.get({ url: this.uri.href })
- }
-
- if (cookies && cookies.length) {
- var cookieString = cookies.map(function (c) {
- return c.name + "=" + c.value
- }).join("; ")
+ , copy = require('./lib/copy')
+ , Request = require('./request')
+ ;
- if (this.originalCookieHeader) {
- // Don't overwrite existing Cookie header
- this.headers.cookie = this.originalCookieHeader + '; ' + cookieString
- } else {
- this.headers.cookie = cookieString
- }
- }
- this._jar = jar
- return this
-}
-// Stream API
-Request.prototype.pipe = function (dest, opts) {
- if (this.response) {
- if (this._destdata) {
- throw new Error("You cannot pipe after data has been emitted from the response.")
- } else if (this._ended) {
- throw new Error("You cannot pipe after the response has been ended.")
- } else {
- stream.Stream.prototype.pipe.call(this, dest, opts)
- this.pipeDest(dest)
- return dest
- }
- } else {
- this.dests.push(dest)
- stream.Stream.prototype.pipe.call(this, dest, opts)
- return dest
- }
-}
-Request.prototype.write = function () {
- if (!this._started) this.start()
- return this.req.write.apply(this.req, arguments)
-}
-Request.prototype.end = function (chunk) {
- if (chunk) this.write(chunk)
- if (!this._started) this.start()
- this.req.end()
-}
-Request.prototype.pause = function () {
- if (!this.response) this._paused = true
- else this.response.pause.apply(this.response, arguments)
-}
-Request.prototype.resume = function () {
- if (!this.response) this._paused = false
- else this.response.resume.apply(this.response, arguments)
-}
-Request.prototype.destroy = function () {
- if (!this._ended) this.end()
- else if (this.response) this.response.destroy()
-}
-
// organize params for patch, post, put, head, del
function initParams(uri, options, callback) {
if ((typeof options === 'function') && !callback) callback = options
@@ -1349,44 +147,3 @@ request.cookie = function (str) {
if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param")
return new Cookie(str)
}
-
-// Safe toJSON
-
-function getSafe (self, uuid) {
- if (typeof self === 'object' || typeof self === 'function') var safe = {}
- if (Array.isArray(self)) var safe = []
-
- var recurse = []
-
- Object.defineProperty(self, uuid, {})
-
- var attrs = Object.keys(self).filter(function (i) {
- if (i === uuid) return false
- if ( (typeof self[i] !== 'object' && typeof self[i] !== 'function') || self[i] === null) return true
- return !(Object.getOwnPropertyDescriptor(self[i], uuid))
- })
-
-
- for (var i=0;i<attrs.length;i++) {
- if ( (typeof self[attrs[i]] !== 'object' && typeof self[attrs[i]] !== 'function') ||
- self[attrs[i]] === null
- ) {
- safe[attrs[i]] = self[attrs[i]]
- } else {
- recurse.push(attrs[i])
- Object.defineProperty(self[attrs[i]], uuid, {})
- }
- }
-
- for (var i=0;i<recurse.length;i++) {
- safe[recurse[i]] = getSafe(self[recurse[i]], uuid)
- }
-
- return safe
-}
-
-function toJSON () {
- return getSafe(this, '__' + (((1+Math.random())*0x10000)|0).toString(16))
-}
-
-Request.prototype.toJSON = toJSON
diff --git a/deps/npm/node_modules/request/lib/copy.js b/deps/npm/node_modules/request/lib/copy.js
new file mode 100644
index 0000000000..56831ff80f
--- /dev/null
+++ b/deps/npm/node_modules/request/lib/copy.js
@@ -0,0 +1,8 @@
+module.exports =
+function copy (obj) {
+ var o = {}
+ Object.keys(obj).forEach(function (i) {
+ o[i] = obj[i]
+ })
+ return o
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/lib/debug.js b/deps/npm/node_modules/request/lib/debug.js
new file mode 100644
index 0000000000..462259f4db
--- /dev/null
+++ b/deps/npm/node_modules/request/lib/debug.js
@@ -0,0 +1,5 @@
+module.exports =
+function debug () {
+ if (/\brequest\b/.test(process.env.NODE_DEBUG))
+ console.error('REQUEST %s', util.format.apply(util, arguments))
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/lib/getSafe.js b/deps/npm/node_modules/request/lib/getSafe.js
new file mode 100644
index 0000000000..28e07ea561
--- /dev/null
+++ b/deps/npm/node_modules/request/lib/getSafe.js
@@ -0,0 +1,34 @@
+// Safe toJSON
+module.exports =
+function getSafe (self, uuid) {
+ if (typeof self === 'object' || typeof self === 'function') var safe = {}
+ if (Array.isArray(self)) var safe = []
+
+ var recurse = []
+
+ Object.defineProperty(self, uuid, {})
+
+ var attrs = Object.keys(self).filter(function (i) {
+ if (i === uuid) return false
+ if ( (typeof self[i] !== 'object' && typeof self[i] !== 'function') || self[i] === null) return true
+ return !(Object.getOwnPropertyDescriptor(self[i], uuid))
+ })
+
+
+ for (var i=0;i<attrs.length;i++) {
+ if ( (typeof self[attrs[i]] !== 'object' && typeof self[attrs[i]] !== 'function') ||
+ self[attrs[i]] === null
+ ) {
+ safe[attrs[i]] = self[attrs[i]]
+ } else {
+ recurse.push(attrs[i])
+ Object.defineProperty(self[attrs[i]], uuid, {})
+ }
+ }
+
+ for (var i=0;i<recurse.length;i++) {
+ safe[recurse[i]] = getSafe(self[recurse[i]], uuid)
+ }
+
+ return safe
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/form-data/Readme.md b/deps/npm/node_modules/request/node_modules/form-data/Readme.md
index ca5ebade4f..21fe5916fc 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/Readme.md
+++ b/deps/npm/node_modules/request/node_modules/form-data/Readme.md
@@ -55,8 +55,20 @@ form.append('my_buffer', new Buffer(10));
form.append('my_logo', request('http://nodejs.org/images/logo.png'));
```
-In order to submit this form to a web application, you can use node's http
-client interface:
+In order to submit this form to a web application, call ```submit(url, [callback])``` method:
+
+``` javascript
+form.submit('http://example.org/', function(err, res) {
+ // res – response object (http.IncomingMessage)
+});
+
+```
+
+For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.
+
+### Alternative submission methods
+
+You can use node's http client interface:
``` javascript
var http = require('http');
@@ -102,7 +114,7 @@ form.submit('http://example.com/', function(err, res) {
});
```
-Form-Data can recognize and fetch all the required information from common types of streams (fs.readStream, http.response and mikeal's request), for some other types of streams you'd need to provide "file"-related information manually:
+Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually:
``` javascript
someModule.stream(function(err, stdout, stderr) {
diff --git a/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js b/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js
index c95c915abf..51ae166d24 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js
+++ b/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js
@@ -251,49 +251,56 @@ FormData.prototype.getLength = function(cb) {
};
FormData.prototype.submit = function(params, cb) {
+
+ var request
+ , options
+ , defaults = {
+ method : 'post',
+ port : 80,
+ headers: this.getHeaders()
+ };
+
+ // parse provided url if it's string
+ // or treat it as options object
+ if (typeof params == 'string') {
+ params = parseUrl(params);
+
+ options = populate({
+ port: params.port,
+ path: params.pathname,
+ host: params.hostname
+ }, defaults);
+ }
+ else // use custom params
+ {
+ options = populate(params, defaults);
+ }
+
+ // https if specified, fallback to http in any other case
+ if (params.protocol == 'https:') {
+ // override default port
+ if (!params.port) options.port = 443;
+ request = https.request(options);
+ } else {
+ request = http.request(options);
+ }
+
+ // get content length and fire away
this.getLength(function(err, length) {
- var request
- , options
- , defaults = {
- method : 'post',
- port : 80,
- headers: this.getHeaders({'Content-Length': length})
- };
-
- // parse provided url if it's string
- // or treat it as options object
- if (typeof params == 'string') {
- params = parseUrl(params);
-
- options = populate({
- port: params.port,
- path: params.pathname,
- host: params.hostname
- }, defaults);
- }
- else // use custom params
- {
- options = populate(params, defaults);
- }
+ // TODO: Add chunked encoding when no length (if err)
- // https if specified, fallback to http in any other case
- if (params.protocol == 'https:') {
- // override default port
- if (!params.port) options.port = 443;
- request = https.request(options);
- } else {
- request = http.request(options);
- }
+ // add content length
+ request.setHeader('Content-Length', length);
this.pipe(request);
if (cb) {
request.on('error', cb);
request.on('response', cb.bind(this, null));
}
-
- return request;
}.bind(this));
+
+ return request;
};
FormData.prototype._error = function(err) {
diff --git a/deps/npm/node_modules/request/node_modules/form-data/package.json b/deps/npm/node_modules/request/node_modules/form-data/package.json
index 79fb6ef3da..3900bf2dac 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/package.json
+++ b/deps/npm/node_modules/request/node_modules/form-data/package.json
@@ -6,7 +6,7 @@
},
"name": "form-data",
"description": "A module to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
- "version": "0.1.0",
+ "version": "0.1.1",
"repository": {
"type": "git",
"url": "git://github.com/felixge/node-form-data.git"
@@ -20,20 +20,26 @@
},
"dependencies": {
"combined-stream": "~0.0.4",
- "mime": "~1.2.9",
+ "mime": "~1.2.11",
"async": "~0.2.9"
},
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.github.com/felixge/node-form-data/master/License"
+ }
+ ],
"devDependencies": {
"fake": "~0.2.2",
"far": "~0.0.7",
"formidable": "~1.0.14",
- "request": "~2.22.0"
+ "request": "~2.27.0"
},
- "readme": "# Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data)\n\nA module to create readable ```\"multipart/form-data\"``` streams. Can be used to submit forms and file uploads to other web applications.\n\nThe API of this module is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].\n\n[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface\n\n## Install\n\n```\nnpm install form-data\n```\n\n## Usage\n\nIn this example we are constructing a form with 3 fields that contain a string,\na buffer and a file stream.\n\n``` javascript\nvar FormData = require('form-data');\nvar fs = require('fs');\n\nvar form = new FormData();\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_file', fs.createReadStream('/foo/bar.jpg'));\n```\n\nAlso you can use http-response stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar http = require('http');\n\nvar form = new FormData();\n\nhttp.request('http://nodejs.org/images/logo.png', function(response) {\n form.append('my_field', 'my value');\n form.append('my_buffer', new Buffer(10));\n form.append('my_logo', response);\n});\n```\n\nOr @mikeal's request stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar request = require('request');\n\nvar form = new FormData();\n\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_logo', request('http://nodejs.org/images/logo.png'));\n```\n\nIn order to submit this form to a web application, you can use node's http\nclient interface:\n\n``` javascript\nvar http = require('http');\n\nvar request = http.request({\n method: 'post',\n host: 'example.org',\n path: '/upload',\n headers: form.getHeaders()\n});\n\nform.pipe(request);\n\nrequest.on('response', function(res) {\n console.log(res.statusCode);\n});\n```\n\nOr if you would prefer the `'Content-Length'` header to be set for you:\n\n``` javascript\nform.submit('example.org/upload', function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nTo use custom headers and pre-known length in parts:\n\n``` javascript\nvar CRLF = '\\r\\n';\nvar form = new FormData();\n\nvar options = {\n header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,\n knownLength: 1\n};\n\nform.append('my_buffer', buffer, options);\n\nform.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n});\n```\n\nForm-Data can recognize and fetch all the required information from common types of streams (fs.readStream, http.response and mikeal's request), for some other types of streams you'd need to provide \"file\"-related information manually:\n\n``` javascript\nsomeModule.stream(function(err, stdout, stderr) {\n if (err) throw err;\n\n var form = new FormData();\n\n form.append('file', stdout, {\n filename: 'unicycle.jpg',\n contentType: 'image/jpg',\n knownLength: 19806\n });\n\n form.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n });\n});\n```\n\nFor edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/probably.php?extra=params',\n auth: 'username:password'\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\n## Notes\n\n- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.\n\n## TODO\n\n- Add new streams (0.10) support and try really hard not to break it for 0.8.x.\n\n## License\n\nForm-Data is licensed under the MIT license.\n",
+ "readme": "# Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data)\n\nA module to create readable ```\"multipart/form-data\"``` streams. Can be used to submit forms and file uploads to other web applications.\n\nThe API of this module is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].\n\n[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface\n\n## Install\n\n```\nnpm install form-data\n```\n\n## Usage\n\nIn this example we are constructing a form with 3 fields that contain a string,\na buffer and a file stream.\n\n``` javascript\nvar FormData = require('form-data');\nvar fs = require('fs');\n\nvar form = new FormData();\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_file', fs.createReadStream('/foo/bar.jpg'));\n```\n\nAlso you can use http-response stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar http = require('http');\n\nvar form = new FormData();\n\nhttp.request('http://nodejs.org/images/logo.png', function(response) {\n form.append('my_field', 'my value');\n form.append('my_buffer', new Buffer(10));\n form.append('my_logo', response);\n});\n```\n\nOr @mikeal's request stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar request = require('request');\n\nvar form = new FormData();\n\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_logo', request('http://nodejs.org/images/logo.png'));\n```\n\nIn order to submit this form to a web application, call ```submit(url, [callback])``` method:\n\n``` javascript\nform.submit('http://example.org/', function(err, res) {\n // res – response object (http.IncomingMessage)\n});\n\n```\n\nFor more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.\n\n### Alternative submission methods\n\nYou can use node's http client interface:\n\n``` javascript\nvar http = require('http');\n\nvar request = http.request({\n method: 'post',\n host: 'example.org',\n path: '/upload',\n headers: form.getHeaders()\n});\n\nform.pipe(request);\n\nrequest.on('response', function(res) {\n console.log(res.statusCode);\n});\n```\n\nOr if you would prefer the `'Content-Length'` header to be set for you:\n\n``` javascript\nform.submit('example.org/upload', function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nTo use custom headers and pre-known length in parts:\n\n``` javascript\nvar CRLF = '\\r\\n';\nvar form = new FormData();\n\nvar options = {\n header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,\n knownLength: 1\n};\n\nform.append('my_buffer', buffer, options);\n\nform.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n});\n```\n\nForm-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide \"file\"-related information manually:\n\n``` javascript\nsomeModule.stream(function(err, stdout, stderr) {\n if (err) throw err;\n\n var form = new FormData();\n\n form.append('file', stdout, {\n filename: 'unicycle.jpg',\n contentType: 'image/jpg',\n knownLength: 19806\n });\n\n form.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n });\n});\n```\n\nFor edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/probably.php?extra=params',\n auth: 'username:password'\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\n## Notes\n\n- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.\n\n## TODO\n\n- Add new streams (0.10) support and try really hard not to break it for 0.8.x.\n\n## License\n\nForm-Data is licensed under the MIT license.\n",
"readmeFilename": "Readme.md",
"bugs": {
"url": "https://github.com/felixge/node-form-data/issues"
},
- "_id": "form-data@0.1.0",
+ "_id": "form-data@0.1.1",
"_from": "form-data@~0.1.0"
}
diff --git a/deps/npm/node_modules/request/node_modules/mime/mime.js b/deps/npm/node_modules/request/node_modules/mime/mime.js
index 8a7eb093f3..48be0c5e42 100644
--- a/deps/npm/node_modules/request/node_modules/mime/mime.js
+++ b/deps/npm/node_modules/request/node_modules/mime/mime.js
@@ -69,7 +69,7 @@ Mime.prototype.load = function(file) {
* Lookup a mime type based on extension
*/
Mime.prototype.lookup = function(path, fallback) {
- var ext = path.replace(/.*[\.\/]/, '').toLowerCase();
+ var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase();
return this.types[ext] || fallback || this.default_type;
};
diff --git a/deps/npm/node_modules/request/node_modules/mime/package.json b/deps/npm/node_modules/request/node_modules/mime/package.json
index cb57777d39..4e7b0fdb26 100644
--- a/deps/npm/node_modules/request/node_modules/mime/package.json
+++ b/deps/npm/node_modules/request/node_modules/mime/package.json
@@ -24,12 +24,12 @@
"url": "https://github.com/broofa/node-mime",
"type": "git"
},
- "version": "1.2.10",
+ "version": "1.2.11",
"readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/broofa/node-mime/issues"
},
- "_id": "mime@1.2.10",
+ "_id": "mime@1.2.11",
"_from": "mime@~1.2.9"
}
diff --git a/deps/npm/node_modules/request/node_modules/mime/test.js b/deps/npm/node_modules/request/node_modules/mime/test.js
index 27df440302..2cda1c7ad1 100644
--- a/deps/npm/node_modules/request/node_modules/mime/test.js
+++ b/deps/npm/node_modules/request/node_modules/mime/test.js
@@ -18,16 +18,16 @@ console.log(Object.keys(mime.types).length + ' extensions\n');
// Test mime lookups
//
-eq('text/plain', mime.lookup('text.txt'));
-eq('text/plain', mime.lookup('.text.txt'));
-eq('text/plain', mime.lookup('.txt'));
-eq('text/plain', mime.lookup('txt'));
-eq('application/octet-stream', mime.lookup('text.nope'));
-eq('fallback', mime.lookup('text.fallback', 'fallback'));
-eq('application/octet-stream', mime.lookup('constructor'));
-eq('text/plain', mime.lookup('TEXT.TXT'));
-eq('text/event-stream', mime.lookup('text/event-stream'));
-eq('application/x-web-app-manifest+json', mime.lookup('text.webapp'));
+eq('text/plain', mime.lookup('text.txt')); // normal file
+eq('text/plain', mime.lookup('TEXT.TXT')); // uppercase
+eq('text/plain', mime.lookup('dir/text.txt')); // dir + file
+eq('text/plain', mime.lookup('.text.txt')); // hidden file
+eq('text/plain', mime.lookup('.txt')); // nameless
+eq('text/plain', mime.lookup('txt')); // extension-only
+eq('text/plain', mime.lookup('/txt')); // extension-less ()
+eq('text/plain', mime.lookup('\\txt')); // Windows, extension-less
+eq('application/octet-stream', mime.lookup('text.nope')); // unrecognized
+eq('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default
//
// Test extensions
@@ -43,10 +43,10 @@ eq('html', mime.extension('text/html; charset=UTF-8'));
eq('html', mime.extension('text/html ; charset=UTF-8'));
eq('html', mime.extension('text/html;charset=UTF-8'));
eq('html', mime.extension('text/Html;charset=UTF-8'));
-eq(undefined, mime.extension('constructor'));
+eq(undefined, mime.extension('unrecognized'));
//
-// Test node types
+// Test node.types lookups
//
eq('application/font-woff', mime.lookup('file.woff'));
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md b/deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md
index bcdddf9a05..f039427fa9 100644
--- a/deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md
+++ b/deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md
@@ -1,3 +1,2 @@
-Copyright (c) 2010 Robert Kieffer
-
-Dual licensed under the [MIT](http://en.wikipedia.org/wiki/MIT_License) and [GPL](http://en.wikipedia.org/wiki/GNU_General_Public_License) licenses.
+Copyright (c) 2010-2012 Robert Kieffer
+MIT License - http://opensource.org/licenses/mit-license.php
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/README.md b/deps/npm/node_modules/request/node_modules/node-uuid/README.md
index d62f7a14d4..e436a89f82 100644
--- a/deps/npm/node_modules/request/node_modules/node-uuid/README.md
+++ b/deps/npm/node_modules/request/node_modules/node-uuid/README.md
@@ -6,6 +6,7 @@ Features:
* Generate RFC4122 version 1 or version 4 UUIDs
* Runs in node.js and all browsers.
+* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').
* Cryptographically strong random # generation on supporting platforms
* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )
* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)
@@ -189,15 +190,18 @@ For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-
## Release notes
-v1.4
+### 1.4.0
+
* Improved module context detection
* Removed public RNG functions
-v1.3.2:
+### 1.3.2
+
* Improve tests and handling of v1() options (Issue #24)
* Expose RNG option to allow for perf testing with different generators
-v1.3:
+### 1.3.0
+
* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
* Support for node.js crypto API
* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/component.json b/deps/npm/node_modules/request/node_modules/node-uuid/component.json
new file mode 100644
index 0000000000..ace213481c
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/node-uuid/component.json
@@ -0,0 +1,18 @@
+{
+ "name": "node-uuid",
+ "repo": "broofa/node-uuid",
+ "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
+ "version": "1.4.0",
+ "author": "Robert Kieffer <robert@broofa.com>",
+ "contributors": [
+ {"name": "Christoph Tavan <dev@tavan.de>", "github": "https://github.com/ctavan"}
+ ],
+ "keywords": ["uuid", "guid", "rfc4122"],
+ "dependencies": {},
+ "development": {},
+ "main": "uuid.js",
+ "scripts": [
+ "uuid.js"
+ ],
+ "license": "MIT"
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/package.json b/deps/npm/node_modules/request/node_modules/node-uuid/package.json
index 11733e8f54..3fb5825b5a 100644
--- a/deps/npm/node_modules/request/node_modules/node-uuid/package.json
+++ b/deps/npm/node_modules/request/node_modules/node-uuid/package.json
@@ -23,12 +23,12 @@
"type": "git",
"url": "https://github.com/broofa/node-uuid.git"
},
- "version": "1.4.0",
- "readme": "# node-uuid\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n<script src=\"uuid.js\"></script>\n```\n\nOr in node.js:\n\n```\nnpm install node-uuid\n```\n\n```javascript\nvar uuid = require('node-uuid');\n```\n\nThen create some ids ...\n\n```javascript\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>\nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the node-uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Testing\n\nIn node.js\n\n```\n> cd test\n> node test.js\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\nv1.4\n* Improved module context detection\n* Removed public RNG functions\n\nv1.3.2:\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\nv1.3:\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n",
+ "version": "1.4.1",
+ "readme": "# node-uuid\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n<script src=\"uuid.js\"></script>\n```\n\nOr in node.js:\n\n```\nnpm install node-uuid\n```\n\n```javascript\nvar uuid = require('node-uuid');\n```\n\nThen create some ids ...\n\n```javascript\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>\nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the node-uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Testing\n\nIn node.js\n\n```\n> cd test\n> node test.js\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\n### 1.4.0\n\n* Improved module context detection\n* Removed public RNG functions\n\n### 1.3.2\n\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\n### 1.3.0\n\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/broofa/node-uuid/issues"
},
- "_id": "node-uuid@1.4.0",
+ "_id": "node-uuid@1.4.1",
"_from": "node-uuid@~1.4.0"
}
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js b/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js
index 4795b9d8a6..2fac6dc4b9 100644
--- a/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js
+++ b/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js
@@ -1,8 +1,8 @@
// uuid.js
//
-// (c) 2010-2012 Robert Kieffer
-// MIT License
-// https://github.com/broofa/node-uuid
+// Copyright (c) 2010-2012 Robert Kieffer
+// MIT License - http://opensource.org/licenses/mit-license.php
+
(function() {
var _global = this;
@@ -224,7 +224,7 @@
uuid.unparse = unparse;
uuid.BufferClass = BufferClass;
- if (_global.define && define.amd) {
+ if (typeof define === 'function' && define.amd) {
// Publish as AMD module
define(function() {return uuid;});
} else if (typeof(module) != 'undefined' && module.exports) {
@@ -242,4 +242,4 @@
_global.uuid = uuid;
}
-}());
+}).call(this);
diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json
index 471472789c..5999579c63 100755
--- a/deps/npm/node_modules/request/package.json
+++ b/deps/npm/node_modules/request/package.json
@@ -7,7 +7,7 @@
"util",
"utility"
],
- "version": "2.25.0",
+ "version": "2.27.0",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
@@ -40,8 +40,8 @@
"scripts": {
"test": "node tests/run.js"
},
- "readme": "# Request -- Simplified HTTP request method\n\n## Install\n\n<pre>\n npm install request\n</pre>\n\nOr from source:\n\n<pre>\n git clone git://github.com/mikeal/request.git \n cd request\n npm link\n</pre>\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types, in this case `application/json`, and use the proper content-type in the PUT request if one is not already provided in the headers.\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also pipe to itself. When doing so the content-type and content-length will be preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let's get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n } \n }\n})\n```\n\nYou can also pipe() from a http.ServerRequest instance and to a http.ServerResponse instance. The HTTP method and headers will be sent as well as the entity-body data. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since pipe() returns the destination stream in node 0.5.x you can do one line proxying :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nUrl encoded forms are simple\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don't need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to true, which will cause a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a 401 response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false` (otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail).\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has \n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth = \n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth = \n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1/users/show.json?'\n , params = \n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n\n\n### request(options, callback)\n\nThe first argument can be either a url or an options object. The only required option is uri, all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from url.parse()\n* `qs` - object containing querystring values to be appended to the uri\n* `method` - http method, defaults to GET\n* `headers` - http headers, defaults to {}\n* `body` - entity body for PATCH, POST and PUT requests. Must be buffer or string.\n* `form` - when passed an object this will set `body` but to a querystring representation of value and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no option a FormData instance is returned that will be piped to request.\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as json.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects. defaults to true.\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects. defaults to false.\n* `maxRedirects` - the maximum number of redirects to follow, defaults to 10.\n* `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.\n* `pool` - A hash object containing the agents for these requests. If omitted this request will use the global pool which is set to node's default maxSockets.\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\t\n* `proxy` - An HTTP proxy to be used. Support proxy Auth with Basic Auth the same way it's supported with the `url` parameter by embedding the auth info in the uri.\n* `oauth` - Options for OAuth HMAC-SHA1 signing, see documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - Set to `true` to require that SSL certificates be valid. Note: to use your own certificate authority, you need to specify an agent that was created with that ca as an option.\n* `jar` - Set to `true` if you want cookies to be remembered for future use, or define your custom cookie jar (see examples section)\n* `aws` - object containing aws signing information, should have the properties `key` and `secret` as well as `bucket` unless you're specifying your bucket as part of the path, or you are making a request that doesn't use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second is an http.ClientResponse object. The third is the response body String or Buffer.\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options) \n \nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as request() but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as request() but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as request() but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as request() but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nAlias to normal request method for uniformity.\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart: \n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ] \n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies set jar to true (either in defaults or in the options sent).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nIf you to use a custom cookie jar (instead of letting request use its own global cookie jar) you do so by setting the jar default or by specifying it as an option:\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.add(cookie)\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n",
+ "readme": "# Request -- Simplified HTTP client\n\n[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types, in this case `application/json`, and use the proper content-type in the PUT request if one is not already provided in the headers.\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also pipe to itself. When doing so the content-type and content-length will be preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let's get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also pipe() from a http.ServerRequest instance and to a http.ServerResponse instance. The HTTP method and headers will be sent as well as the entity-body data. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since pipe() returns the destination stream in node 0.5.x you can do one line proxying :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nUrl encoded forms are simple\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don't need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to true, which will cause a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a 401 response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false` (otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail).\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1/users/show.json?'\n , params =\n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n\n\n### request(options, callback)\n\nThe first argument can be either a url or an options object. The only required option is uri, all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from url.parse()\n* `qs` - object containing querystring values to be appended to the uri\n* `method` - http method, defaults to GET\n* `headers` - http headers, defaults to {}\n* `body` - entity body for PATCH, POST and PUT requests. Must be buffer or string.\n* `form` - when passed an object this will set `body` but to a querystring representation of value and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no option a FormData instance is returned that will be piped to request.\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as json.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects. defaults to true.\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects. defaults to false.\n* `maxRedirects` - the maximum number of redirects to follow, defaults to 10.\n* `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.\n* `pool` - A hash object containing the agents for these requests. If omitted this request will use the global pool which is set to node's default maxSockets.\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\n* `proxy` - An HTTP proxy to be used. Support proxy Auth with Basic Auth the same way it's supported with the `url` parameter by embedding the auth info in the uri.\n* `oauth` - Options for OAuth HMAC-SHA1 signing, see documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - Set to `true` to require that SSL certificates be valid. Note: to use your own certificate authority, you need to specify an agent that was created with that ca as an option.\n* `jar` - Set to `true` if you want cookies to be remembered for future use, or define your custom cookie jar (see examples section)\n* `aws` - object containing aws signing information, should have the properties `key` and `secret` as well as `bucket` unless you're specifying your bucket as part of the path, or you are making a request that doesn't use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second is an http.ClientResponse object. The third is the response body String or Buffer.\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options)\n\nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as request() but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as request() but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as request() but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as request() but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nAlias to normal request method for uniformity.\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies set jar to true (either in defaults or in the options sent).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nIf you to use a custom cookie jar (instead of letting request use its own global cookie jar) you do so by setting the jar default or by specifying it as an option:\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.add(cookie)\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n",
"readmeFilename": "README.md",
- "_id": "request@2.25.0",
- "_from": "request@latest"
+ "_id": "request@2.27.0",
+ "_from": "request@2.27.0"
}
diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js
new file mode 100644
index 0000000000..0311f743dd
--- /dev/null
+++ b/deps/npm/node_modules/request/request.js
@@ -0,0 +1,1235 @@
+var http = require('http')
+ , https = false
+ , tls = false
+ , url = require('url')
+ , util = require('util')
+ , stream = require('stream')
+ , qs = require('qs')
+ , querystring = require('querystring')
+ , crypto = require('crypto')
+
+ , oauth = require('oauth-sign')
+ , hawk = require('hawk')
+ , aws = require('aws-sign')
+ , httpSignature = require('http-signature')
+ , uuid = require('node-uuid')
+ , mime = require('mime')
+ , tunnel = require('tunnel-agent')
+ , _safeStringify = require('json-stringify-safe')
+
+ , ForeverAgent = require('forever-agent')
+ , FormData = require('form-data')
+
+ , Cookie = require('cookie-jar')
+ , CookieJar = Cookie.Jar
+ , cookieJar = new CookieJar
+
+ , copy = require('./lib/copy')
+ , debug = require('./lib/debug')
+ , getSafe = require('./lib/getSafe')
+ ;
+
+function safeStringify (obj) {
+ var ret
+ try { ret = JSON.stringify(obj) }
+ catch (e) { ret = _safeStringify(obj) }
+ return ret
+}
+
+var globalPool = {}
+var isUrl = /^https?:/i
+
+try {
+ https = require('https')
+} catch (e) {}
+
+try {
+ tls = require('tls')
+} catch (e) {}
+
+
+
+// Hacky fix for pre-0.4.4 https
+if (https && !https.Agent) {
+ https.Agent = function (options) {
+ http.Agent.call(this, options)
+ }
+ util.inherits(https.Agent, http.Agent)
+ https.Agent.prototype._getConnection = function (host, port, cb) {
+ var s = tls.connect(port, host, this.options, function () {
+ // do other checks here?
+ if (cb) cb()
+ })
+ return s
+ }
+}
+
+function isReadStream (rs) {
+ if (rs.readable && rs.path && rs.mode) {
+ return true
+ }
+}
+
+function toBase64 (str) {
+ return (new Buffer(str || "", "ascii")).toString("base64")
+}
+
+function md5 (str) {
+ return crypto.createHash('md5').update(str).digest('hex')
+}
+
+function Request (options) {
+ stream.Stream.call(this)
+ this.readable = true
+ this.writable = true
+
+ if (typeof options === 'string') {
+ options = {uri:options}
+ }
+
+ var reserved = Object.keys(Request.prototype)
+ for (var i in options) {
+ if (reserved.indexOf(i) === -1) {
+ this[i] = options[i]
+ } else {
+ if (typeof options[i] === 'function') {
+ delete options[i]
+ }
+ }
+ }
+
+ if (options.method) {
+ this.explicitMethod = true
+ }
+
+ this.init(options)
+}
+util.inherits(Request, stream.Stream)
+Request.prototype.init = function (options) {
+ // init() contains all the code to setup the request object.
+ // the actual outgoing request is not started until start() is called
+ // this function is called from both the constructor and on redirect.
+ var self = this
+ if (!options) options = {}
+
+ if (!self.method) self.method = options.method || 'GET'
+ self.localAddress = options.localAddress
+
+ debug(options)
+ if (!self.pool && self.pool !== false) self.pool = globalPool
+ self.dests = self.dests || []
+ self.__isRequestRequest = true
+
+ // Protect against double callback
+ if (!self._callback && self.callback) {
+ self._callback = self.callback
+ self.callback = function () {
+ if (self._callbackCalled) return // Print a warning maybe?
+ self._callbackCalled = true
+ self._callback.apply(self, arguments)
+ }
+ self.on('error', self.callback.bind())
+ self.on('complete', self.callback.bind(self, null))
+ }
+
+ if (self.url && !self.uri) {
+ // People use this property instead all the time so why not just support it.
+ self.uri = self.url
+ delete self.url
+ }
+
+ if (!self.uri) {
+ // this will throw if unhandled but is handleable when in a redirect
+ return self.emit('error', new Error("options.uri is a required argument"))
+ } else {
+ if (typeof self.uri == "string") self.uri = url.parse(self.uri)
+ }
+
+ if (self.strictSSL === false) {
+ self.rejectUnauthorized = false
+ }
+
+ if (self.proxy) {
+ if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy)
+
+ // do the HTTP CONNECT dance using koichik/node-tunnel
+ if (http.globalAgent && self.uri.protocol === "https:") {
+ var tunnelFn = self.proxy.protocol === "http:"
+ ? tunnel.httpsOverHttp : tunnel.httpsOverHttps
+
+ var tunnelOptions = { proxy: { host: self.proxy.hostname
+ , port: +self.proxy.port
+ , proxyAuth: self.proxy.auth
+ , headers: { Host: self.uri.hostname + ':' +
+ (self.uri.port || self.uri.protocol === 'https:' ? 443 : 80) }}
+ , rejectUnauthorized: self.rejectUnauthorized
+ , ca: this.ca }
+
+ self.agent = tunnelFn(tunnelOptions)
+ self.tunnel = true
+ }
+ }
+
+ if (!self.uri.pathname) {self.uri.pathname = '/'}
+
+ if (!self.uri.host) {
+ // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar
+ // Detect and reject it as soon as possible
+ var faultyUri = url.format(self.uri)
+ var message = 'Invalid URI "' + faultyUri + '"'
+ if (Object.keys(options).length === 0) {
+ // No option ? This can be the sign of a redirect
+ // As this is a case where the user cannot do anything (he didn't call request directly with this URL)
+ // he should be warned that it can be caused by a redirection (can save some hair)
+ message += '. This can be caused by a crappy redirection.'
+ }
+ self.emit('error', new Error(message))
+ return // This error was fatal
+ }
+
+ self._redirectsFollowed = self._redirectsFollowed || 0
+ self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10
+ self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true
+ self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false
+ if (self.followRedirect || self.followAllRedirects)
+ self.redirects = self.redirects || []
+
+ self.headers = self.headers ? copy(self.headers) : {}
+
+ self.setHost = false
+ if (!self.hasHeader('host')) {
+ self.setHeader('host', self.uri.hostname)
+ if (self.uri.port) {
+ if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') &&
+ !(self.uri.port === 443 && self.uri.protocol === 'https:') )
+ self.setHeader('host', self.getHeader('host') + (':'+self.uri.port) )
+ }
+ self.setHost = true
+ }
+
+ self.jar(self._jar || options.jar)
+
+ if (!self.uri.port) {
+ if (self.uri.protocol == 'http:') {self.uri.port = 80}
+ else if (self.uri.protocol == 'https:') {self.uri.port = 443}
+ }
+
+ if (self.proxy && !self.tunnel) {
+ self.port = self.proxy.port
+ self.host = self.proxy.hostname
+ } else {
+ self.port = self.uri.port
+ self.host = self.uri.hostname
+ }
+
+ self.clientErrorHandler = function (error) {
+ if (self._aborted) return
+
+ if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET'
+ && self.agent.addRequestNoreuse) {
+ self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
+ self.start()
+ self.req.end()
+ return
+ }
+ if (self.timeout && self.timeoutTimer) {
+ clearTimeout(self.timeoutTimer)
+ self.timeoutTimer = null
+ }
+ self.emit('error', error)
+ }
+
+ self._parserErrorHandler = function (error) {
+ if (this.res) {
+ if (this.res.request) {
+ this.res.request.emit('error', error)
+ } else {
+ this.res.emit('error', error)
+ }
+ } else {
+ this._httpMessage.emit('error', error)
+ }
+ }
+
+ if (options.form) {
+ self.form(options.form)
+ }
+
+ if (options.qs) self.qs(options.qs)
+
+ if (self.uri.path) {
+ self.path = self.uri.path
+ } else {
+ self.path = self.uri.pathname + (self.uri.search || "")
+ }
+
+ if (self.path.length === 0) self.path = '/'
+
+
+ // Auth must happen last in case signing is dependent on other headers
+ if (options.oauth) {
+ self.oauth(options.oauth)
+ }
+
+ if (options.aws) {
+ self.aws(options.aws)
+ }
+
+ if (options.hawk) {
+ self.hawk(options.hawk)
+ }
+
+ if (options.httpSignature) {
+ self.httpSignature(options.httpSignature)
+ }
+
+ if (options.auth) {
+ self.auth(
+ (options.auth.user==="") ? options.auth.user : (options.auth.user || options.auth.username ),
+ options.auth.pass || options.auth.password,
+ options.auth.sendImmediately)
+ }
+
+ if (self.uri.auth && !self.hasHeader('authorization')) {
+ var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) })
+ self.auth(authPieces[0], authPieces.slice(1).join(':'), true)
+ }
+ if (self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization') && !self.tunnel) {
+ self.setHeader('proxy-authorization', "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':')))
+ }
+
+
+ if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
+
+ if (options.json) {
+ self.json(options.json)
+ } else if (options.multipart) {
+ self.boundary = uuid()
+ self.multipart(options.multipart)
+ }
+
+ if (self.body) {
+ var length = 0
+ if (!Buffer.isBuffer(self.body)) {
+ if (Array.isArray(self.body)) {
+ for (var i = 0; i < self.body.length; i++) {
+ length += self.body[i].length
+ }
+ } else {
+ self.body = new Buffer(self.body)
+ length = self.body.length
+ }
+ } else {
+ length = self.body.length
+ }
+ if (length) {
+ if (!self.hasHeader('content-length')) self.setHeader('content-length', length)
+ } else {
+ throw new Error('Argument error, options.body.')
+ }
+ }
+
+ var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
+ , defaultModules = {'http:':http, 'https:':https}
+ , httpModules = self.httpModules || {}
+ ;
+ self.httpModule = httpModules[protocol] || defaultModules[protocol]
+
+ if (!self.httpModule) return this.emit('error', new Error("Invalid protocol"))
+
+ if (options.ca) self.ca = options.ca
+
+ if (!self.agent) {
+ if (options.agentOptions) self.agentOptions = options.agentOptions
+
+ if (options.agentClass) {
+ self.agentClass = options.agentClass
+ } else if (options.forever) {
+ self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
+ } else {
+ self.agentClass = self.httpModule.Agent
+ }
+ }
+
+ if (self.pool === false) {
+ self.agent = false
+ } else {
+ self.agent = self.agent || self.getAgent()
+ if (self.maxSockets) {
+ // Don't use our pooling if node has the refactored client
+ self.agent.maxSockets = self.maxSockets
+ }
+ if (self.pool.maxSockets) {
+ // Don't use our pooling if node has the refactored client
+ self.agent.maxSockets = self.pool.maxSockets
+ }
+ }
+
+ self.on('pipe', function (src) {
+ if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.")
+ self.src = src
+ if (isReadStream(src)) {
+ if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path))
+ } else {
+ if (src.headers) {
+ for (var i in src.headers) {
+ if (!self.hasHeader(i)) {
+ self.setHeader(i, src.headers[i])
+ }
+ }
+ }
+ if (self._json && !self.hasHeader('content-type'))
+ self.setHeader('content-type', 'application/json')
+ if (src.method && !self.explicitMethod) {
+ self.method = src.method
+ }
+ }
+
+ // self.on('pipe', function () {
+ // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.")
+ // })
+ })
+
+ process.nextTick(function () {
+ if (self._aborted) return
+
+ if (self._form) {
+ self.setHeaders(self._form.getHeaders())
+ self._form.pipe(self)
+ }
+ if (self.body) {
+ if (Array.isArray(self.body)) {
+ self.body.forEach(function (part) {
+ self.write(part)
+ })
+ } else {
+ self.write(self.body)
+ }
+ self.end()
+ } else if (self.requestBodyStream) {
+ console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.")
+ self.requestBodyStream.pipe(self)
+ } else if (!self.src) {
+ if (self.method !== 'GET' && typeof self.method !== 'undefined') {
+ self.setHeader('content-length', 0)
+ }
+ self.end()
+ }
+ self.ntick = true
+ })
+}
+
+// Must call this when following a redirect from https to http or vice versa
+// Attempts to keep everything as identical as possible, but update the
+// httpModule, Tunneling agent, and/or Forever Agent in use.
+Request.prototype._updateProtocol = function () {
+ var self = this
+ var protocol = self.uri.protocol
+
+ if (protocol === 'https:') {
+ // previously was doing http, now doing https
+ // if it's https, then we might need to tunnel now.
+ if (self.proxy) {
+ self.tunnel = true
+ var tunnelFn = self.proxy.protocol === 'http:'
+ ? tunnel.httpsOverHttp : tunnel.httpsOverHttps
+ var tunnelOptions = { proxy: { host: self.proxy.hostname
+ , port: +self.proxy.port
+ , proxyAuth: self.proxy.auth }
+ , rejectUnauthorized: self.rejectUnauthorized
+ , ca: self.ca }
+ self.agent = tunnelFn(tunnelOptions)
+ return
+ }
+
+ self.httpModule = https
+ switch (self.agentClass) {
+ case ForeverAgent:
+ self.agentClass = ForeverAgent.SSL
+ break
+ case http.Agent:
+ self.agentClass = https.Agent
+ break
+ default:
+ // nothing we can do. Just hope for the best.
+ return
+ }
+
+ // if there's an agent, we need to get a new one.
+ if (self.agent) self.agent = self.getAgent()
+
+ } else {
+ // previously was doing https, now doing http
+ // stop any tunneling.
+ if (self.tunnel) self.tunnel = false
+ self.httpModule = http
+ switch (self.agentClass) {
+ case ForeverAgent.SSL:
+ self.agentClass = ForeverAgent
+ break
+ case https.Agent:
+ self.agentClass = http.Agent
+ break
+ default:
+ // nothing we can do. just hope for the best
+ return
+ }
+
+ // if there's an agent, then get a new one.
+ if (self.agent) {
+ self.agent = null
+ self.agent = self.getAgent()
+ }
+ }
+}
+
+Request.prototype.getAgent = function () {
+ var Agent = this.agentClass
+ var options = {}
+ if (this.agentOptions) {
+ for (var i in this.agentOptions) {
+ options[i] = this.agentOptions[i]
+ }
+ }
+ if (this.ca) options.ca = this.ca
+ if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized
+
+ if (this.cert && this.key) {
+ options.key = this.key
+ options.cert = this.cert
+ }
+
+ var poolKey = ''
+
+ // different types of agents are in different pools
+ if (Agent !== this.httpModule.Agent) {
+ poolKey += Agent.name
+ }
+
+ if (!this.httpModule.globalAgent) {
+ // node 0.4.x
+ options.host = this.host
+ options.port = this.port
+ if (poolKey) poolKey += ':'
+ poolKey += this.host + ':' + this.port
+ }
+
+ // ca option is only relevant if proxy or destination are https
+ var proxy = this.proxy
+ if (typeof proxy === 'string') proxy = url.parse(proxy)
+ var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:'
+ if (isHttps) {
+ if (options.ca) {
+ if (poolKey) poolKey += ':'
+ poolKey += options.ca
+ }
+
+ if (typeof options.rejectUnauthorized !== 'undefined') {
+ if (poolKey) poolKey += ':'
+ poolKey += options.rejectUnauthorized
+ }
+
+ if (options.cert)
+ poolKey += options.cert.toString('ascii') + options.key.toString('ascii')
+
+ if (options.ciphers) {
+ if (poolKey) poolKey += ':'
+ poolKey += options.ciphers
+ }
+
+ if (options.secureOptions) {
+ if (poolKey) poolKey += ':'
+ poolKey += options.secureOptions
+ }
+ }
+
+ if (this.pool === globalPool && !poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) {
+ // not doing anything special. Use the globalAgent
+ return this.httpModule.globalAgent
+ }
+
+ // we're using a stored agent. Make sure it's protocol-specific
+ poolKey = this.uri.protocol + poolKey
+
+ // already generated an agent for this setting
+ if (this.pool[poolKey]) return this.pool[poolKey]
+
+ return this.pool[poolKey] = new Agent(options)
+}
+
+Request.prototype.start = function () {
+ // start() is called once we are ready to send the outgoing HTTP request.
+ // this is usually called on the first write(), end() or on nextTick()
+ var self = this
+
+ if (self._aborted) return
+
+ self._started = true
+ self.method = self.method || 'GET'
+ self.href = self.uri.href
+
+ if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) {
+ self.setHeader('content-length', self.src.stat.size)
+ }
+ if (self._aws) {
+ self.aws(self._aws, true)
+ }
+
+ // We have a method named auth, which is completely different from the http.request
+ // auth option. If we don't remove it, we're gonna have a bad time.
+ var reqOptions = copy(self)
+ delete reqOptions.auth
+
+ debug('make request', self.uri.href)
+ self.req = self.httpModule.request(reqOptions, self.onResponse.bind(self))
+
+ if (self.timeout && !self.timeoutTimer) {
+ self.timeoutTimer = setTimeout(function () {
+ self.req.abort()
+ var e = new Error("ETIMEDOUT")
+ e.code = "ETIMEDOUT"
+ self.emit("error", e)
+ }, self.timeout)
+
+ // Set additional timeout on socket - in case if remote
+ // server freeze after sending headers
+ if (self.req.setTimeout) { // only works on node 0.6+
+ self.req.setTimeout(self.timeout, function () {
+ if (self.req) {
+ self.req.abort()
+ var e = new Error("ESOCKETTIMEDOUT")
+ e.code = "ESOCKETTIMEDOUT"
+ self.emit("error", e)
+ }
+ })
+ }
+ }
+
+ self.req.on('error', self.clientErrorHandler)
+ self.req.on('drain', function() {
+ self.emit('drain')
+ })
+ self.on('end', function() {
+ if ( self.req.connection ) self.req.connection.removeListener('error', self._parserErrorHandler)
+ })
+ self.emit('request', self.req)
+}
+Request.prototype.onResponse = function (response) {
+ var self = this
+ debug('onResponse', self.uri.href, response.statusCode, response.headers)
+ response.on('end', function() {
+ debug('response end', self.uri.href, response.statusCode, response.headers)
+ });
+
+ if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) {
+ response.connection.once('error', self._parserErrorHandler)
+ }
+ if (self._aborted) {
+ debug('aborted', self.uri.href)
+ response.resume()
+ return
+ }
+ if (self._paused) response.pause()
+ else response.resume()
+
+ self.response = response
+ response.request = self
+ response.toJSON = toJSON
+
+ // XXX This is different on 0.10, because SSL is strict by default
+ if (self.httpModule === https &&
+ self.strictSSL &&
+ !response.client.authorized) {
+ debug('strict ssl error', self.uri.href)
+ var sslErr = response.client.authorizationError
+ self.emit('error', new Error('SSL Error: '+ sslErr))
+ return
+ }
+
+ if (self.setHost && self.hasHeader('host')) delete self.headers[self.hasHeader('host')]
+ if (self.timeout && self.timeoutTimer) {
+ clearTimeout(self.timeoutTimer)
+ self.timeoutTimer = null
+ }
+
+ var addCookie = function (cookie) {
+ if (self._jar){
+ if(self._jar.add){
+ self._jar.add(new Cookie(cookie))
+ }
+ else cookieJar.add(new Cookie(cookie))
+ }
+
+ }
+
+ if (hasHeader('set-cookie', response.headers) && (!self._disableCookies)) {
+ var headerName = hasHeader('set-cookie', response.headers)
+ if (Array.isArray(response.headers[headerName])) response.headers[headerName].forEach(addCookie)
+ else addCookie(response.headers[headerName])
+ }
+
+ var redirectTo = null
+ if (response.statusCode >= 300 && response.statusCode < 400 && hasHeader('location', response.headers)) {
+ var location = response.headers[hasHeader('location', response.headers)]
+ debug('redirect', location)
+
+ if (self.followAllRedirects) {
+ redirectTo = location
+ } else if (self.followRedirect) {
+ switch (self.method) {
+ case 'PATCH':
+ case 'PUT':
+ case 'POST':
+ case 'DELETE':
+ // Do not follow redirects
+ break
+ default:
+ redirectTo = location
+ break
+ }
+ }
+ } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) {
+ var authHeader = response.headers[hasHeader('www-authenticate', response.headers)]
+ var authVerb = authHeader && authHeader.split(' ')[0]
+ debug('reauth', authVerb)
+
+ switch (authVerb) {
+ case 'Basic':
+ self.auth(self._user, self._pass, true)
+ redirectTo = self.uri
+ break
+
+ case 'Digest':
+ // TODO: More complete implementation of RFC 2617. For reference:
+ // http://tools.ietf.org/html/rfc2617#section-3
+ // https://github.com/bagder/curl/blob/master/lib/http_digest.c
+
+ var matches = authHeader.match(/([a-z0-9_-]+)="([^"]+)"/gi)
+ var challenge = {}
+
+ for (var i = 0; i < matches.length; i++) {
+ var eqPos = matches[i].indexOf('=')
+ var key = matches[i].substring(0, eqPos)
+ var quotedValue = matches[i].substring(eqPos + 1)
+ challenge[key] = quotedValue.substring(1, quotedValue.length - 1)
+ }
+
+ var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass)
+ var ha2 = md5(self.method + ':' + self.uri.path)
+ var digestResponse = md5(ha1 + ':' + challenge.nonce + ':1::auth:' + ha2)
+ var authValues = {
+ username: self._user,
+ realm: challenge.realm,
+ nonce: challenge.nonce,
+ uri: self.uri.path,
+ qop: challenge.qop,
+ response: digestResponse,
+ nc: 1,
+ cnonce: ''
+ }
+
+ authHeader = []
+ for (var k in authValues) {
+ authHeader.push(k + '="' + authValues[k] + '"')
+ }
+ authHeader = 'Digest ' + authHeader.join(', ')
+ self.setHeader('authorization', authHeader)
+ self._sentAuth = true
+
+ redirectTo = self.uri
+ break
+ }
+ }
+
+ if (redirectTo) {
+ debug('redirect to', redirectTo)
+
+ // ignore any potential response body. it cannot possibly be useful
+ // to us at this point.
+ if (self._paused) response.resume()
+
+ if (self._redirectsFollowed >= self.maxRedirects) {
+ self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href))
+ return
+ }
+ self._redirectsFollowed += 1
+
+ if (!isUrl.test(redirectTo)) {
+ redirectTo = url.resolve(self.uri.href, redirectTo)
+ }
+
+ var uriPrev = self.uri
+ self.uri = url.parse(redirectTo)
+
+ // handle the case where we change protocol from https to http or vice versa
+ if (self.uri.protocol !== uriPrev.protocol) {
+ self._updateProtocol()
+ }
+
+ self.redirects.push(
+ { statusCode : response.statusCode
+ , redirectUri: redirectTo
+ }
+ )
+ if (self.followAllRedirects && response.statusCode != 401) self.method = 'GET'
+ // self.method = 'GET' // Force all redirects to use GET || commented out fixes #215
+ delete self.src
+ delete self.req
+ delete self.agent
+ delete self._started
+ if (response.statusCode != 401) {
+ // Remove parameters from the previous response, unless this is the second request
+ // for a server that requires digest authentication.
+ delete self.body
+ delete self._form
+ if (self.headers) {
+ if (self.hasHeader('host')) delete self.headers[self.hasHeader('host')]
+ if (self.hasHeader('content-type')) delete self.headers[self.hasHeader('content-type')]
+ if (self.hasHeader('content-length')) delete self.headers[self.hasHeader('content-length')]
+ }
+ }
+
+ self.emit('redirect');
+
+ self.init()
+ return // Ignore the rest of the response
+ } else {
+ self._redirectsFollowed = self._redirectsFollowed || 0
+ // Be a good stream and emit end when the response is finished.
+ // Hack to emit end on close because of a core bug that never fires end
+ response.on('close', function () {
+ if (!self._ended) self.response.emit('end')
+ })
+
+ if (self.encoding) {
+ if (self.dests.length !== 0) {
+ console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")
+ } else {
+ response.setEncoding(self.encoding)
+ }
+ }
+
+ self.emit('response', response)
+
+ self.dests.forEach(function (dest) {
+ self.pipeDest(dest)
+ })
+
+ response.on("data", function (chunk) {
+ self._destdata = true
+ self.emit("data", chunk)
+ })
+ response.on("end", function (chunk) {
+ self._ended = true
+ self.emit("end", chunk)
+ })
+ response.on("close", function () {self.emit("close")})
+
+ if (self.callback) {
+ var buffer = []
+ var bodyLen = 0
+ self.on("data", function (chunk) {
+ buffer.push(chunk)
+ bodyLen += chunk.length
+ })
+ self.on("end", function () {
+ debug('end event', self.uri.href)
+ if (self._aborted) {
+ debug('aborted', self.uri.href)
+ return
+ }
+
+ if (buffer.length && Buffer.isBuffer(buffer[0])) {
+ debug('has body', self.uri.href, bodyLen)
+ var body = new Buffer(bodyLen)
+ var i = 0
+ buffer.forEach(function (chunk) {
+ chunk.copy(body, i, 0, chunk.length)
+ i += chunk.length
+ })
+ if (self.encoding === null) {
+ response.body = body
+ } else {
+ response.body = body.toString(self.encoding)
+ }
+ } else if (buffer.length) {
+ // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation.
+ // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse().
+ if (self.encoding === 'utf8' && buffer[0].length > 0 && buffer[0][0] === "\uFEFF") {
+ buffer[0] = buffer[0].substring(1)
+ }
+ response.body = buffer.join('')
+ }
+
+ if (self._json) {
+ try {
+ response.body = JSON.parse(response.body)
+ } catch (e) {}
+ }
+ debug('emitting complete', self.uri.href)
+ if(response.body == undefined && !self._json) {
+ response.body = "";
+ }
+ self.emit('complete', response, response.body)
+ })
+ }
+ //if no callback
+ else{
+ self.on("end", function () {
+ if (self._aborted) {
+ debug('aborted', self.uri.href)
+ return
+ }
+ self.emit('complete', response);
+ });
+ }
+ }
+ debug('finish init function', self.uri.href)
+}
+
+Request.prototype.abort = function () {
+ this._aborted = true
+
+ if (this.req) {
+ this.req.abort()
+ }
+ else if (this.response) {
+ this.response.abort()
+ }
+
+ this.emit("abort")
+}
+
+Request.prototype.pipeDest = function (dest) {
+ var response = this.response
+ // Called after the response is received
+ if (dest.headers && !dest.headersSent) {
+ if (hasHeader('content-type', response.headers)) {
+ var ctname = hasHeader('content-type', response.headers)
+ if (dest.setHeader) dest.setHeader(ctname, response.headers[ctname])
+ else dest.headers[ctname] = response.headers[ctname]
+ }
+
+ if (hasHeader('content-length', response.headers)) {
+ var clname = hasHeader('content-length', response.headers)
+ if (dest.setHeader) dest.setHeader(clname, response.headers[clname])
+ else dest.headers[clname] = response.headers[clname]
+ }
+ }
+ if (dest.setHeader && !dest.headersSent) {
+ for (var i in response.headers) {
+ dest.setHeader(i, response.headers[i])
+ }
+ dest.statusCode = response.statusCode
+ }
+ if (this.pipefilter) this.pipefilter(response, dest)
+}
+
+// Composable API
+Request.prototype.setHeader = function (name, value, clobber) {
+ if (clobber === undefined) clobber = true
+ if (clobber || !this.hasHeader(name)) this.headers[name] = value
+ else this.headers[this.hasHeader(name)] += ',' + value
+ return this
+}
+Request.prototype.setHeaders = function (headers) {
+ for (var i in headers) {this.setHeader(i, headers[i])}
+ return this
+}
+Request.prototype.hasHeader = function (header, headers) {
+ var headers = Object.keys(headers || this.headers)
+ , lheaders = headers.map(function (h) {return h.toLowerCase()})
+ ;
+ header = header.toLowerCase()
+ for (var i=0;i<lheaders.length;i++) {
+ if (lheaders[i] === header) return headers[i]
+ }
+ return false
+}
+
+var hasHeader = Request.prototype.hasHeader
+
+Request.prototype.qs = function (q, clobber) {
+ var base
+ if (!clobber && this.uri.query) base = qs.parse(this.uri.query)
+ else base = {}
+
+ for (var i in q) {
+ base[i] = q[i]
+ }
+
+ if (qs.stringify(base) === ''){
+ return this
+ }
+
+ this.uri = url.parse(this.uri.href.split('?')[0] + '?' + qs.stringify(base))
+ this.url = this.uri
+ this.path = this.uri.path
+
+ return this
+}
+Request.prototype.form = function (form) {
+ if (form) {
+ this.setHeader('content-type', 'application/x-www-form-urlencoded; charset=utf-8')
+ this.body = qs.stringify(form).toString('utf8')
+ return this
+ }
+ // create form-data object
+ this._form = new FormData()
+ return this._form
+}
+Request.prototype.multipart = function (multipart) {
+ var self = this
+ self.body = []
+
+ if (!self.hasHeader('content-type')) {
+ self.setHeader('content-type', 'multipart/related; boundary=' + self.boundary)
+ } else {
+ self.setHeader('content-type', self.headers['content-type'].split(';')[0] + '; boundary=' + self.boundary)
+ }
+
+ if (!multipart.forEach) throw new Error('Argument error, options.multipart.')
+
+ if (self.preambleCRLF) {
+ self.body.push(new Buffer('\r\n'))
+ }
+
+ multipart.forEach(function (part) {
+ var body = part.body
+ if(body == null) throw Error('Body attribute missing in multipart.')
+ delete part.body
+ var preamble = '--' + self.boundary + '\r\n'
+ Object.keys(part).forEach(function (key) {
+ preamble += key + ': ' + part[key] + '\r\n'
+ })
+ preamble += '\r\n'
+ self.body.push(new Buffer(preamble))
+ self.body.push(new Buffer(body))
+ self.body.push(new Buffer('\r\n'))
+ })
+ self.body.push(new Buffer('--' + self.boundary + '--'))
+ return self
+}
+Request.prototype.json = function (val) {
+ var self = this
+
+ if (!self.hasHeader('accept')) self.setHeader('accept', 'application/json')
+
+ this._json = true
+ if (typeof val === 'boolean') {
+ if (typeof this.body === 'object') {
+ this.body = safeStringify(this.body)
+ self.setHeader('content-type', 'application/json')
+ }
+ } else {
+ this.body = safeStringify(val)
+ self.setHeader('content-type', 'application/json')
+ }
+ return this
+}
+Request.prototype.getHeader = function (name, headers) {
+ var result, re, match
+ if (!headers) headers = this.headers
+ Object.keys(headers).forEach(function (key) {
+ re = new RegExp(name, 'i')
+ match = key.match(re)
+ if (match) result = headers[key]
+ })
+ return result
+}
+var getHeader = Request.prototype.getHeader
+
+Request.prototype.auth = function (user, pass, sendImmediately) {
+ if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) {
+ throw new Error('auth() received invalid user or password')
+ }
+ this._user = user
+ this._pass = pass
+ this._hasAuth = true
+ var header = typeof pass !== 'undefined' ? user + ':' + pass : user
+ if (sendImmediately || typeof sendImmediately == 'undefined') {
+ this.setHeader('authorization', 'Basic ' + toBase64(header))
+ this._sentAuth = true
+ }
+ return this
+}
+Request.prototype.aws = function (opts, now) {
+ if (!now) {
+ this._aws = opts
+ return this
+ }
+ var date = new Date()
+ this.setHeader('date', date.toUTCString())
+ var auth =
+ { key: opts.key
+ , secret: opts.secret
+ , verb: this.method.toUpperCase()
+ , date: date
+ , contentType: this.getHeader('content-type') || ''
+ , md5: this.getHeader('content-md5') || ''
+ , amazonHeaders: aws.canonicalizeHeaders(this.headers)
+ }
+ if (opts.bucket && this.path) {
+ auth.resource = '/' + opts.bucket + this.path
+ } else if (opts.bucket && !this.path) {
+ auth.resource = '/' + opts.bucket
+ } else if (!opts.bucket && this.path) {
+ auth.resource = this.path
+ } else if (!opts.bucket && !this.path) {
+ auth.resource = '/'
+ }
+ auth.resource = aws.canonicalizeResource(auth.resource)
+ this.setHeader('authorization', aws.authorization(auth))
+
+ return this
+}
+Request.prototype.httpSignature = function (opts) {
+ var req = this
+ httpSignature.signRequest({
+ getHeader: function(header) {
+ return getHeader(header, req.headers)
+ },
+ setHeader: function(header, value) {
+ req.setHeader(header, value)
+ },
+ method: this.method,
+ path: this.path
+ }, opts)
+ debug('httpSignature authorization', this.getHeader('authorization'))
+
+ return this
+}
+
+Request.prototype.hawk = function (opts) {
+ this.setHeader('Authorization', hawk.client.header(this.uri, this.method, opts).field)
+}
+
+Request.prototype.oauth = function (_oauth) {
+ var form
+ if (this.hasHeader('content-type') &&
+ this.getHeader('content-type').slice(0, 'application/x-www-form-urlencoded'.length) ===
+ 'application/x-www-form-urlencoded'
+ ) {
+ form = qs.parse(this.body)
+ }
+ if (this.uri.query) {
+ form = qs.parse(this.uri.query)
+ }
+ if (!form) form = {}
+ var oa = {}
+ for (var i in form) oa[i] = form[i]
+ for (var i in _oauth) oa['oauth_'+i] = _oauth[i]
+ if (!oa.oauth_version) oa.oauth_version = '1.0'
+ if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString()
+ if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '')
+
+ oa.oauth_signature_method = 'HMAC-SHA1'
+
+ var consumer_secret = oa.oauth_consumer_secret
+ delete oa.oauth_consumer_secret
+ var token_secret = oa.oauth_token_secret
+ delete oa.oauth_token_secret
+ var timestamp = oa.oauth_timestamp
+
+ var baseurl = this.uri.protocol + '//' + this.uri.host + this.uri.pathname
+ var signature = oauth.hmacsign(this.method, baseurl, oa, consumer_secret, token_secret)
+
+ // oa.oauth_signature = signature
+ for (var i in form) {
+ if ( i.slice(0, 'oauth_') in _oauth) {
+ // skip
+ } else {
+ delete oa['oauth_'+i]
+ if (i !== 'x_auth_mode') delete oa[i]
+ }
+ }
+ oa.oauth_timestamp = timestamp
+ var authHeader = 'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',')
+ authHeader += ',oauth_signature="' + oauth.rfc3986(signature) + '"'
+ this.setHeader('Authorization', authHeader)
+ return this
+}
+Request.prototype.jar = function (jar) {
+ var cookies
+
+ if (this._redirectsFollowed === 0) {
+ this.originalCookieHeader = this.getHeader('cookie')
+ }
+
+ if (!jar) {
+ // disable cookies
+ cookies = false
+ this._disableCookies = true
+ } else if (jar && jar.get) {
+ // fetch cookie from the user defined cookie jar
+ cookies = jar.get({ url: this.uri.href })
+ } else {
+ // fetch cookie from the global cookie jar
+ cookies = cookieJar.get({ url: this.uri.href })
+ }
+
+ if (cookies && cookies.length) {
+ var cookieString = cookies.map(function (c) {
+ return c.name + "=" + c.value
+ }).join("; ")
+
+ if (this.originalCookieHeader) {
+ // Don't overwrite existing Cookie header
+ this.setHeader('cookie', this.originalCookieHeader + '; ' + cookieString)
+ } else {
+ this.setHeader('cookie', cookieString)
+ }
+ }
+ this._jar = jar
+ return this
+}
+
+
+// Stream API
+Request.prototype.pipe = function (dest, opts) {
+ if (this.response) {
+ if (this._destdata) {
+ throw new Error("You cannot pipe after data has been emitted from the response.")
+ } else if (this._ended) {
+ throw new Error("You cannot pipe after the response has been ended.")
+ } else {
+ stream.Stream.prototype.pipe.call(this, dest, opts)
+ this.pipeDest(dest)
+ return dest
+ }
+ } else {
+ this.dests.push(dest)
+ stream.Stream.prototype.pipe.call(this, dest, opts)
+ return dest
+ }
+}
+Request.prototype.write = function () {
+ if (!this._started) this.start()
+ return this.req.write.apply(this.req, arguments)
+}
+Request.prototype.end = function (chunk) {
+ if (chunk) this.write(chunk)
+ if (!this._started) this.start()
+ this.req.end()
+}
+Request.prototype.pause = function () {
+ if (!this.response) this._paused = true
+ else this.response.pause.apply(this.response, arguments)
+}
+Request.prototype.resume = function () {
+ if (!this.response) this._paused = false
+ else this.response.resume.apply(this.response, arguments)
+}
+Request.prototype.destroy = function () {
+ if (!this._ended) this.end()
+ else if (this.response) this.response.destroy()
+}
+
+function toJSON () {
+ return getSafe(this, '__' + (((1+Math.random())*0x10000)|0).toString(16))
+}
+
+Request.prototype.toJSON = toJSON
+
+
+module.exports = Request \ No newline at end of file
diff --git a/deps/npm/node_modules/request/tests/test-basic-auth.js b/deps/npm/node_modules/request/tests/test-basic-auth.js
index 3f4804883f..7cf1d6d820 100644
--- a/deps/npm/node_modules/request/tests/test-basic-auth.js
+++ b/deps/npm/node_modules/request/tests/test-basic-auth.js
@@ -16,6 +16,8 @@ var basicServer = http.createServer(function (req, res) {
ok = true;
} else if ( req.headers.authorization == 'Basic ' + new Buffer(':apassword').toString('base64')) {
ok = true;
+ } else if ( req.headers.authorization == 'Basic ' + new Buffer('justauser').toString('base64')) {
+ ok = true;
} else {
// Bad auth header, don't send back WWW-Authenticate header
ok = false;
@@ -126,6 +128,24 @@ var tests = [
next();
});
})
+ },
+
+ function(next) {
+ assert.doesNotThrow( function() {
+ request({
+ 'method': 'GET',
+ 'uri': 'http://localhost:6767/allow_undefined_password/',
+ 'auth': {
+ 'user': 'justauser',
+ 'pass': undefined,
+ 'sendImmediately': false
+ }
+ }, function(error, res, body ) {
+ assert.equal(res.statusCode, 200);
+ assert.equal(numBasicRequests, 10);
+ next();
+ });
+ })
}
];
diff --git a/deps/npm/node_modules/request/tests/test-isUrl.js b/deps/npm/node_modules/request/tests/test-isUrl.js
new file mode 100644
index 0000000000..4a51ad0189
--- /dev/null
+++ b/deps/npm/node_modules/request/tests/test-isUrl.js
@@ -0,0 +1,28 @@
+var assert = require('assert')
+ , request = require('../index')
+ , http = require('http')
+ ;
+
+var s = http.createServer(function(req, res) {
+ res.statusCode = 200;
+ res.end('');
+}).listen(6767, function () {
+
+ // Test lowercase
+ request('http://localhost:6767', function (err, resp, body) {
+ // just need to get here without throwing an error
+ assert.equal(true, true);
+ })
+
+ // Test uppercase
+ request('HTTP://localhost:6767', function (err, resp, body) {
+ assert.equal(true, true);
+ })
+
+ // Test mixedcase
+ request('HtTp://localhost:6767', function (err, resp, body) {
+ assert.equal(true, true);
+ // clean up
+ s.close();
+ })
+}) \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/.npmignore b/deps/npm/node_modules/sha/.npmignore
index fcfd944947..ac4d7d173b 100644
--- a/deps/npm/node_modules/sha/.npmignore
+++ b/deps/npm/node_modules/sha/.npmignore
@@ -1,4 +1,4 @@
-node_modules
-test
-.gitignore
+node_modules
+test
+.gitignore
.travis.yml \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/LICENSE b/deps/npm/node_modules/sha/LICENSE
index 048a6f99d2..3d8f089d21 100644
--- a/deps/npm/node_modules/sha/LICENSE
+++ b/deps/npm/node_modules/sha/LICENSE
@@ -1,46 +1,46 @@
-Copyright (c) 2013 Forbes Lindesay
-
-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 AUTHOR 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 AUTHOR 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.
-
-The MIT License (MIT)
-
-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
+Copyright (c) 2013 Forbes Lindesay
+
+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 AUTHOR 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 AUTHOR 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.
+
+The MIT License (MIT)
+
+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. \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/README.md b/deps/npm/node_modules/sha/README.md
index 1743236b22..b1b45f0c3c 100644
--- a/deps/npm/node_modules/sha/README.md
+++ b/deps/npm/node_modules/sha/README.md
@@ -1,49 +1,49 @@
-# sha
-
-Check and get file hashes (using any algorithm)
-
-[![Build Status](https://travis-ci.org/ForbesLindesay/sha.png?branch=master)](https://travis-ci.org/ForbesLindesay/sha)
-[![Dependency Status](https://gemnasium.com/ForbesLindesay/sha.png)](https://gemnasium.com/ForbesLindesay/sha)
-[![NPM version](https://badge.fury.io/js/sha.png)](http://badge.fury.io/js/sha)
-
-## Installation
-
- $ npm install sha
-
-## API
-
-### check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])
-
-Asynchronously check that `fileName` has a "hash" of `expected`. The callback will be called with either `null` or an error (indicating that they did not match).
-
-Options:
-
-- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
-
-### get(fileName, [options,] cb) / getSync(filename, [options])
-
-Asynchronously get the "hash" of `fileName`. The callback will be called with an optional `error` object and the (lower cased) hex digest of the hash.
-
-Options:
-
-- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
-
-### stream(expected, [options])
-
-Check the hash of a stream without ever buffering it. This is a pass through stream so you can do things like:
-
-```js
-fs.createReadStream('src')
- .pipe(sha.stream('expected'))
- .pipe(fs.createWriteStream('dest'))
-```
-
-`dest` will be a complete copy of `src` and an error will be emitted if the hash did not match `'expected'`.
-
-Options:
-
-- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
-
-## License
-
+# sha
+
+Check and get file hashes (using any algorithm)
+
+[![Build Status](https://travis-ci.org/ForbesLindesay/sha.png?branch=master)](https://travis-ci.org/ForbesLindesay/sha)
+[![Dependency Status](https://gemnasium.com/ForbesLindesay/sha.png)](https://gemnasium.com/ForbesLindesay/sha)
+[![NPM version](https://badge.fury.io/js/sha.png)](http://badge.fury.io/js/sha)
+
+## Installation
+
+ $ npm install sha
+
+## API
+
+### check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])
+
+Asynchronously check that `fileName` has a "hash" of `expected`. The callback will be called with either `null` or an error (indicating that they did not match).
+
+Options:
+
+- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
+
+### get(fileName, [options,] cb) / getSync(filename, [options])
+
+Asynchronously get the "hash" of `fileName`. The callback will be called with an optional `error` object and the (lower cased) hex digest of the hash.
+
+Options:
+
+- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
+
+### stream(expected, [options])
+
+Check the hash of a stream without ever buffering it. This is a pass through stream so you can do things like:
+
+```js
+fs.createReadStream('src')
+ .pipe(sha.stream('expected'))
+ .pipe(fs.createWriteStream('dest'))
+```
+
+`dest` will be a complete copy of `src` and an error will be emitted if the hash did not match `'expected'`.
+
+Options:
+
+- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
+
+## License
+
You may use this software under the BSD or MIT. Take your pick. If you want me to release it under another license, open a pull request. \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/index.js b/deps/npm/node_modules/sha/index.js
index 4d05a18888..45f152c8d4 100644
--- a/deps/npm/node_modules/sha/index.js
+++ b/deps/npm/node_modules/sha/index.js
@@ -1,120 +1,120 @@
-'use strict'
-
-var Transform = require('stream').Transform || require('readable-stream').Transform
-var crypto = require('crypto')
-var fs
-try {
- fs = require('graceful-fs')
-} catch (ex) {
- fs = require('fs')
-}
-try {
- process.binding('crypto')
-} catch (e) {
- var er = new Error( 'crypto binding not found.\n'
- + 'Please build node with openssl.\n'
- + e.message )
- throw er
-}
-
-exports.check = check
-exports.checkSync = checkSync
-exports.get = get
-exports.getSync = getSync
-exports.stream = stream
-
-function check(file, expected, options, cb) {
- if (typeof options === 'function') {
- cb = options
- options = undefined
- }
- expected = expected.toLowerCase().trim()
- get(file, options, function (er, actual) {
- if (er) {
- if (er.message) er.message += ' while getting shasum for ' + file
- return cb(er)
- }
- if (actual === expected) return cb(null)
- cb(new Error(
- 'shasum check failed for ' + file + '\n'
- + 'Expected: ' + expected + '\n'
- + 'Actual: ' + actual))
- })
-}
-function checkSync(file, expected, options, cb) {
- expected = expected.toLowerCase().trim()
- var actual
- try {
- actual = getSync(file, options)
- } catch (er) {
- if (er.message) er.message += ' while getting shasum for ' + file
- throw er
- }
- if (actual !== expected) {
- var ex = new Error(
- 'shasum check failed for ' + file + '\n'
- + 'Expected: ' + expected + '\n'
- + 'Actual: ' + actual)
- throw ex
- }
-}
-
-
-function get(file, options, cb) {
- if (typeof options === 'function') {
- cb = options
- options = undefined
- }
- options = options || {}
- var algorithm = options.algorithm || 'sha1'
- var hash = crypto.createHash(algorithm)
- var source = fs.createReadStream(file)
- var errState = null
- source
- .on('error', function (er) {
- if (errState) return
- return cb(errState = er)
- })
- .on('data', function (chunk) {
- if (errState) return
- hash.update(chunk)
- })
- .on('end', function () {
- if (errState) return
- var actual = hash.digest("hex").toLowerCase().trim()
- cb(null, actual)
- })
-}
-
-function getSync(file, options) {
- options = options || {}
- var algorithm = options.algorithm || 'sha1'
- var hash = crypto.createHash(algorithm)
- var source = fs.readFileSync(file)
- hash.update(source)
- return hash.digest("hex").toLowerCase().trim()
-}
-
-function stream(expected, options) {
- expected = expected.toLowerCase().trim()
- options = options || {}
- var algorithm = options.algorithm || 'sha1'
- var hash = crypto.createHash(algorithm)
-
- var stream = new Transform()
- stream._transform = function (chunk, encoding, callback) {
- hash.update(chunk)
- stream.push(chunk)
- callback()
- }
- stream._flush = function (cb) {
- var actual = hash.digest("hex").toLowerCase().trim()
- if (actual === expected) return cb(null)
- cb(new Error(
- 'shasum check failed for:\n'
- + ' Expected: ' + expected + '\n'
- + ' Actual: ' + actual))
- this.push(null)
- }
- return stream
+'use strict'
+
+var Transform = require('stream').Transform || require('readable-stream').Transform
+var crypto = require('crypto')
+var fs
+try {
+ fs = require('graceful-fs')
+} catch (ex) {
+ fs = require('fs')
+}
+try {
+ process.binding('crypto')
+} catch (e) {
+ var er = new Error( 'crypto binding not found.\n'
+ + 'Please build node with openssl.\n'
+ + e.message )
+ throw er
+}
+
+exports.check = check
+exports.checkSync = checkSync
+exports.get = get
+exports.getSync = getSync
+exports.stream = stream
+
+function check(file, expected, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = undefined
+ }
+ expected = expected.toLowerCase().trim()
+ get(file, options, function (er, actual) {
+ if (er) {
+ if (er.message) er.message += ' while getting shasum for ' + file
+ return cb(er)
+ }
+ if (actual === expected) return cb(null)
+ cb(new Error(
+ 'shasum check failed for ' + file + '\n'
+ + 'Expected: ' + expected + '\n'
+ + 'Actual: ' + actual))
+ })
+}
+function checkSync(file, expected, options) {
+ expected = expected.toLowerCase().trim()
+ var actual
+ try {
+ actual = getSync(file, options)
+ } catch (er) {
+ if (er.message) er.message += ' while getting shasum for ' + file
+ throw er
+ }
+ if (actual !== expected) {
+ var ex = new Error(
+ 'shasum check failed for ' + file + '\n'
+ + 'Expected: ' + expected + '\n'
+ + 'Actual: ' + actual)
+ throw ex
+ }
+}
+
+
+function get(file, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = undefined
+ }
+ options = options || {}
+ var algorithm = options.algorithm || 'sha1'
+ var hash = crypto.createHash(algorithm)
+ var source = fs.createReadStream(file)
+ var errState = null
+ source
+ .on('error', function (er) {
+ if (errState) return
+ return cb(errState = er)
+ })
+ .on('data', function (chunk) {
+ if (errState) return
+ hash.update(chunk)
+ })
+ .on('end', function () {
+ if (errState) return
+ var actual = hash.digest("hex").toLowerCase().trim()
+ cb(null, actual)
+ })
+}
+
+function getSync(file, options) {
+ options = options || {}
+ var algorithm = options.algorithm || 'sha1'
+ var hash = crypto.createHash(algorithm)
+ var source = fs.readFileSync(file)
+ hash.update(source)
+ return hash.digest("hex").toLowerCase().trim()
+}
+
+function stream(expected, options) {
+ expected = expected.toLowerCase().trim()
+ options = options || {}
+ var algorithm = options.algorithm || 'sha1'
+ var hash = crypto.createHash(algorithm)
+
+ var stream = new Transform()
+ stream._transform = function (chunk, encoding, callback) {
+ hash.update(chunk)
+ stream.push(chunk)
+ callback()
+ }
+ stream._flush = function (cb) {
+ var actual = hash.digest("hex").toLowerCase().trim()
+ if (actual === expected) return cb(null)
+ cb(new Error(
+ 'shasum check failed for:\n'
+ + ' Expected: ' + expected + '\n'
+ + ' Actual: ' + actual))
+ this.push(null)
+ }
+ return stream
} \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/float.patch b/deps/npm/node_modules/sha/node_modules/readable-stream/float.patch
new file mode 100644
index 0000000000..0ad71a1f0d
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/float.patch
@@ -0,0 +1,68 @@
+diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js
+index c5a741c..a2e0d8e 100644
+--- a/lib/_stream_duplex.js
++++ b/lib/_stream_duplex.js
+@@ -26,8 +26,8 @@
+
+ module.exports = Duplex;
+ var util = require('util');
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('./_stream_readable');
++var Writable = require('./_stream_writable');
+
+ util.inherits(Duplex, Readable);
+
+diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js
+index a5e9864..330c247 100644
+--- a/lib/_stream_passthrough.js
++++ b/lib/_stream_passthrough.js
+@@ -25,7 +25,7 @@
+
+ module.exports = PassThrough;
+
+-var Transform = require('_stream_transform');
++var Transform = require('./_stream_transform');
+ var util = require('util');
+ util.inherits(PassThrough, Transform);
+
+diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js
+index 2259d2e..e6681ee 100644
+--- a/lib/_stream_readable.js
++++ b/lib/_stream_readable.js
+@@ -23,6 +23,9 @@ module.exports = Readable;
+ Readable.ReadableState = ReadableState;
+
+ var EE = require('events').EventEmitter;
++if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
++ return emitter.listeners(type).length;
++};
+ var Stream = require('stream');
+ var util = require('util');
+ var StringDecoder;
+diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js
+index e925b4b..f08b05e 100644
+--- a/lib/_stream_transform.js
++++ b/lib/_stream_transform.js
+@@ -64,7 +64,7 @@
+
+ module.exports = Transform;
+
+-var Duplex = require('_stream_duplex');
++var Duplex = require('./_stream_duplex');
+ var util = require('util');
+ util.inherits(Transform, Duplex);
+
+diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js
+index a26f711..56ca47d 100644
+--- a/lib/_stream_writable.js
++++ b/lib/_stream_writable.js
+@@ -109,7 +109,7 @@ function WritableState(options, stream) {
+ function Writable(options) {
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex))
++ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex')))
+ return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js
index 11580bc402..3c9da084a2 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js
@@ -68,12 +68,18 @@ function ReadableState(options, stream) {
// that we're awaiting a 'readable' event emission.
this.needReadable = false;
this.emittedReadable = false;
+ this.readableListening = false;
// object stream flag. Used to make read(n) ignore n and to
// make all the buffer merging and length checks go away
this.objectMode = !!options.objectMode;
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
// when piping, we only care about 'readable' events that happen
// after read()ing all the bytes and not getting any pushback.
this.ranOut = false;
@@ -85,10 +91,12 @@ function ReadableState(options, stream) {
this.readingMore = false;
this.decoder = null;
+ this.encoding = null;
if (options.encoding) {
if (!StringDecoder)
StringDecoder = require('string_decoder').StringDecoder;
this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
}
}
@@ -108,43 +116,61 @@ function Readable(options) {
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.
-Readable.prototype.push = function(chunk) {
+Readable.prototype.push = function(chunk, encoding) {
var state = this._readableState;
- if (typeof chunk === 'string' && !state.objectMode)
- chunk = new Buffer(chunk, arguments[1]);
- return readableAddChunk(this, state, chunk, false);
+
+ if (typeof chunk === 'string' && !state.objectMode) {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = new Buffer(chunk, encoding);
+ encoding = '';
+ }
+ }
+
+ return readableAddChunk(this, state, chunk, encoding, false);
};
+// Unshift should *always* be something directly out of read()
Readable.prototype.unshift = function(chunk) {
var state = this._readableState;
- if (typeof chunk === 'string' && !state.objectMode)
- chunk = new Buffer(chunk, arguments[1]);
- return readableAddChunk(this, state, chunk, true);
+ return readableAddChunk(this, state, chunk, '', true);
};
-function readableAddChunk(stream, state, chunk, addToFront) {
- state.reading = false;
-
+function readableAddChunk(stream, state, chunk, encoding, addToFront) {
var er = chunkInvalid(state, chunk);
if (er) {
stream.emit('error', er);
} else if (chunk === null || chunk === undefined) {
- onEofChunk(stream, state);
+ state.reading = false;
+ if (!state.ended)
+ onEofChunk(stream, state);
} else if (state.objectMode || chunk && chunk.length > 0) {
- if (state.decoder)
- chunk = state.decoder.write(chunk);
+ if (state.ended && !addToFront) {
+ var e = new Error('stream.push() after EOF');
+ stream.emit('error', e);
+ } else if (state.endEmitted && addToFront) {
+ var e = new Error('stream.unshift() after end event');
+ stream.emit('error', e);
+ } else {
+ if (state.decoder && !addToFront && !encoding)
+ chunk = state.decoder.write(chunk);
- // update the buffer info.
- state.length += state.objectMode ? 1 : chunk.length;
- if (addToFront)
- state.buffer.unshift(chunk);
- else
- state.buffer.push(chunk);
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) {
+ state.buffer.unshift(chunk);
+ } else {
+ state.reading = false;
+ state.buffer.push(chunk);
+ }
- if (state.needReadable)
- emitReadable(stream);
+ if (state.needReadable)
+ emitReadable(stream);
- maybeReadMore(stream, state);
+ maybeReadMore(stream, state);
+ }
+ } else if (!addToFront) {
+ state.reading = false;
}
return needMoreData(state);
@@ -171,6 +197,7 @@ Readable.prototype.setEncoding = function(enc) {
if (!StringDecoder)
StringDecoder = require('string_decoder').StringDecoder;
this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
};
// Don't raise the hwm > 128MB
@@ -238,7 +265,7 @@ Readable.prototype.read = function(n) {
// the 'readable' event and move on.
if (n === 0 &&
state.needReadable &&
- state.length >= state.highWaterMark) {
+ (state.length >= state.highWaterMark || state.ended)) {
emitReadable(this);
return null;
}
@@ -345,14 +372,14 @@ function chunkInvalid(state, chunk) {
function onEofChunk(stream, state) {
- state.ended = true;
- if (state.decoder && state.decoder.end) {
+ if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
if (chunk && chunk.length) {
state.buffer.push(chunk);
state.length += state.objectMode ? 1 : chunk.length;
}
}
+ state.ended = true;
// if we've ended and we have some data left, then emit
// 'readable' now to make sure it gets picked up.
@@ -381,7 +408,6 @@ function emitReadable(stream) {
}
function emitReadable_(stream) {
- var state = stream._readableState;
stream.emit('readable');
}
@@ -490,10 +516,20 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
// however, don't suppress the throwing behavior for this.
function onerror(er) {
unpipe();
+ dest.removeListener('error', onerror);
if (EE.listenerCount(dest, 'error') === 0)
dest.emit('error', er);
}
- dest.once('error', onerror);
+ // This is a brutally ugly hack to make sure that our error handler
+ // is attached before any userland ones. NEVER DO THIS.
+ if (!dest._events.error)
+ dest.on('error', onerror);
+ else if (Array.isArray(dest._events.error))
+ dest._events.error.unshift(onerror);
+ else
+ dest._events.error = [onerror, dest._events.error];
+
+
// Both close and finish should trigger unpipe, but only once.
function onclose() {
@@ -658,8 +694,19 @@ Readable.prototype.on = function(ev, fn) {
if (ev === 'data' && !this._readableState.flowing)
emitDataEvents(this);
- if (ev === 'readable' && !this._readableState.reading)
- this.read(0);
+ if (ev === 'readable' && this.readable) {
+ var state = this._readableState;
+ if (!state.readableListening) {
+ state.readableListening = true;
+ state.emittedReadable = false;
+ state.needReadable = true;
+ if (!state.reading) {
+ this.read(0);
+ } else if (state.length) {
+ emitReadable(this, state);
+ }
+ }
+ }
return res;
};
@@ -736,8 +783,7 @@ Readable.prototype.wrap = function(stream) {
var self = this;
stream.on('end', function() {
- state.ended = true;
- if (state.decoder && state.decoder.end) {
+ if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
if (chunk && chunk.length)
self.push(chunk);
@@ -749,7 +795,7 @@ Readable.prototype.wrap = function(stream) {
stream.on('data', function(chunk) {
if (state.decoder)
chunk = state.decoder.write(chunk);
- if (!chunk || !chunk.length)
+ if (!chunk || !state.objectMode && !chunk.length)
return;
var ret = self.push(chunk);
@@ -780,10 +826,12 @@ Readable.prototype.wrap = function(stream) {
// underlying stream.
self._read = function(n) {
if (paused) {
- stream.resume();
paused = false;
+ stream.resume();
}
};
+
+ return self;
};
@@ -867,10 +915,13 @@ function endReadable(stream) {
if (!state.endEmitted && state.calledRead) {
state.ended = true;
- state.endEmitted = true;
process.nextTick(function() {
- stream.readable = false;
- stream.emit('end');
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
});
}
}
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js
index f0e52b8834..f08b05e525 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js
@@ -70,8 +70,6 @@ util.inherits(Transform, Duplex);
function TransformState(options, stream) {
- var ts = this;
-
this.afterTransform = function(er, data) {
return afterTransform(stream, er, data);
};
@@ -101,6 +99,7 @@ function afterTransform(stream, er, data) {
cb(er);
var rs = stream._readableState;
+ rs.reading = false;
if (rs.needReadable || rs.length < rs.highWaterMark) {
stream._read(rs.highWaterMark);
}
@@ -136,9 +135,9 @@ function Transform(options) {
});
}
-Transform.prototype.push = function(chunk) {
+Transform.prototype.push = function(chunk, encoding) {
this._transformState.needTransform = false;
- return Duplex.prototype.push.call(this, chunk);
+ return Duplex.prototype.push.call(this, chunk, encoding);
};
// This is the part where you do stuff!
@@ -151,7 +150,7 @@ Transform.prototype.push = function(chunk) {
// Call `cb(err)` when you are done with this chunk. If you pass
// an error, then that'll put the hurt on the whole operation. If you
// never call cb(), then you'll never get another chunk.
-Transform.prototype._transform = function(chunk, output, cb) {
+Transform.prototype._transform = function(chunk, encoding, cb) {
throw new Error('not implemented');
};
@@ -170,7 +169,7 @@ Transform.prototype._write = function(chunk, encoding, cb) {
};
// Doesn't matter what the args are here.
-// the output and callback functions passed to _transform do all the work.
+// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function(n) {
var ts = this._transformState;
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js
index b689be9f8f..56ca47ddfe 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js
@@ -68,6 +68,11 @@ function WritableState(options, stream) {
var noDecode = options.decodeStrings === false;
this.decodeStrings = !noDecode;
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
// not an actual buffer we keep track of, but a measurement
// of how much we're waiting to get pushed to some underlying
// socket or file.
@@ -160,8 +165,11 @@ Writable.prototype.write = function(chunk, encoding, cb) {
cb = encoding;
encoding = null;
}
- if (!encoding)
- encoding = 'utf8';
+
+ if (Buffer.isBuffer(chunk))
+ encoding = 'buffer';
+ else if (!encoding)
+ encoding = state.defaultEncoding;
if (typeof cb !== 'function')
cb = function() {};
@@ -240,7 +248,8 @@ function onwrite(stream, er) {
if (er)
onwriteError(stream, state, sync, er, cb);
else {
- var finished = finishMaybe(stream, state);
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(stream, state);
if (!finished && !state.bufferProcessing && state.buffer.length)
clearBuffer(stream, state);
@@ -259,6 +268,8 @@ function afterWrite(stream, state, finished, cb) {
if (!finished)
onwriteDrain(stream, state);
cb();
+ if (finished)
+ finishMaybe(stream, state);
}
// Must force callback to be called on nextTick, so that we don't
@@ -326,12 +337,21 @@ Writable.prototype.end = function(chunk, encoding, cb) {
endWritable(this, state, cb);
};
+
+function needFinish(stream, state) {
+ return (state.ending &&
+ state.length === 0 &&
+ !state.finished &&
+ !state.writing);
+}
+
function finishMaybe(stream, state) {
- if (state.ending && state.length === 0 && !state.finished) {
+ var need = needFinish(stream, state);
+ if (need) {
state.finished = true;
stream.emit('finish');
}
- return state.finished;
+ return need;
}
function endWritable(stream, state, cb) {
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/package.json b/deps/npm/node_modules/sha/node_modules/readable-stream/package.json
index 066d29eb26..9297062d47 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/package.json
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/package.json
@@ -1,6 +1,6 @@
{
"name": "readable-stream",
- "version": "1.0.2",
+ "version": "1.0.17",
"description": "An exploration of a new kind of readable streams for Node.js",
"main": "readable.js",
"dependencies": {},
@@ -30,6 +30,10 @@
"bugs": {
"url": "https://github.com/isaacs/readable-stream/issues"
},
- "_id": "readable-stream@1.0.2",
- "_from": "readable-stream@1.0"
+ "_id": "readable-stream@1.0.17",
+ "dist": {
+ "shasum": "cbc295fdf394dfa1225d225d02e6b6d0f409fd4b"
+ },
+ "_from": "readable-stream@1.0",
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.17.tgz"
}
diff --git a/deps/npm/node_modules/sha/package.json b/deps/npm/node_modules/sha/package.json
index f19b78cdd1..a5f40090ca 100644
--- a/deps/npm/node_modules/sha/package.json
+++ b/deps/npm/node_modules/sha/package.json
@@ -1,6 +1,6 @@
{
"name": "sha",
- "version": "1.2.1",
+ "version": "1.2.3",
"description": "Check and get file hashes",
"scripts": {
"test": "mocha -R spec"
@@ -17,7 +17,7 @@
"devDependencies": {
"mocha": "~1.9.0"
},
- "readme": "# sha\n\nCheck and get file hashes (using any algorithm)\n\n[![Build Status](https://travis-ci.org/ForbesLindesay/sha.png?branch=master)](https://travis-ci.org/ForbesLindesay/sha)\n[![Dependency Status](https://gemnasium.com/ForbesLindesay/sha.png)](https://gemnasium.com/ForbesLindesay/sha)\n[![NPM version](https://badge.fury.io/js/sha.png)](http://badge.fury.io/js/sha)\n\n## Installation\n\n $ npm install sha\n\n## API\n\n### check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])\n\nAsynchronously check that `fileName` has a \"hash\" of `expected`. The callback will be called with either `null` or an error (indicating that they did not match).\n\nOptions:\n\n- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`\n\n### get(fileName, [options,] cb) / getSync(filename, [options])\n\nAsynchronously get the \"hash\" of `fileName`. The callback will be called with an optional `error` object and the (lower cased) hex digest of the hash.\n\nOptions:\n\n- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`\n\n### stream(expected, [options])\n\nCheck the hash of a stream without ever buffering it. This is a pass through stream so you can do things like:\n\n```js\nfs.createReadStream('src')\n .pipe(sha.stream('expected'))\n .pipe(fs.createWriteStream('dest'))\n```\n\n`dest` will be a complete copy of `src` and an error will be emitted if the hash did not match `'expected'`.\n\nOptions:\n\n- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`\n\n## License\n\nYou may use this software under the BSD or MIT. Take your pick. If you want me to release it under another license, open a pull request.",
+ "readme": "# sha\r\n\r\nCheck and get file hashes (using any algorithm)\r\n\r\n[![Build Status](https://travis-ci.org/ForbesLindesay/sha.png?branch=master)](https://travis-ci.org/ForbesLindesay/sha)\r\n[![Dependency Status](https://gemnasium.com/ForbesLindesay/sha.png)](https://gemnasium.com/ForbesLindesay/sha)\r\n[![NPM version](https://badge.fury.io/js/sha.png)](http://badge.fury.io/js/sha)\r\n\r\n## Installation\r\n\r\n $ npm install sha\r\n\r\n## API\r\n\r\n### check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])\r\n\r\nAsynchronously check that `fileName` has a \"hash\" of `expected`. The callback will be called with either `null` or an error (indicating that they did not match).\r\n\r\nOptions:\r\n\r\n- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`\r\n\r\n### get(fileName, [options,] cb) / getSync(filename, [options])\r\n\r\nAsynchronously get the \"hash\" of `fileName`. The callback will be called with an optional `error` object and the (lower cased) hex digest of the hash.\r\n\r\nOptions:\r\n\r\n- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`\r\n\r\n### stream(expected, [options])\r\n\r\nCheck the hash of a stream without ever buffering it. This is a pass through stream so you can do things like:\r\n\r\n```js\r\nfs.createReadStream('src')\r\n .pipe(sha.stream('expected'))\r\n .pipe(fs.createWriteStream('dest'))\r\n```\r\n\r\n`dest` will be a complete copy of `src` and an error will be emitted if the hash did not match `'expected'`.\r\n\r\nOptions:\r\n\r\n- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`\r\n\r\n## License\r\n\r\nYou may use this software under the BSD or MIT. Take your pick. If you want me to release it under another license, open a pull request.",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/ForbesLindesay/sha/issues"
@@ -26,6 +26,6 @@
"graceful-fs": "2",
"readable-stream": "1.0"
},
- "_id": "sha@1.2.1",
- "_from": "sha@~1.2.1"
+ "_id": "sha@1.2.3",
+ "_from": "sha@latest"
}
diff --git a/deps/npm/node_modules/slide/LICENSE b/deps/npm/node_modules/slide/LICENSE
index 05a4010949..05eeeb88c2 100644
--- a/deps/npm/node_modules/slide/LICENSE
+++ b/deps/npm/node_modules/slide/LICENSE
@@ -1,23 +1,15 @@
-Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
-All rights reserved.
+The ISC 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:
+Copyright (c) Isaac Z. Schlueter
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+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", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS" 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/deps/npm/node_modules/slide/package.json b/deps/npm/node_modules/slide/package.json
index 0ec0140418..f433955ee0 100644
--- a/deps/npm/node_modules/slide/package.json
+++ b/deps/npm/node_modules/slide/package.json
@@ -1,6 +1,6 @@
{
"name": "slide",
- "version": "1.1.4",
+ "version": "1.1.5",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -24,11 +24,12 @@
"type": "git",
"url": "git://github.com/isaacs/slide-flow-control.git"
},
+ "license": "ISC",
"readme": "# Controlling Flow: callbacks are easy\n\n## What's actually hard?\n\n- Doing a bunch of things in a specific order.\n- Knowing when stuff is done.\n- Handling failures.\n- Breaking up functionality into parts (avoid nested inline callbacks)\n\n\n## Common Mistakes\n\n- Abandoning convention and consistency.\n- Putting all callbacks inline.\n- Using libraries without grokking them.\n- Trying to make async code look sync.\n\n## Define Conventions\n\n- Two kinds of functions: *actors* take action, *callbacks* get results.\n- Essentially the continuation pattern. Resulting code *looks* similar\n to fibers, but is *much* simpler to implement.\n- Node works this way in the lowlevel APIs already, and it's very flexible.\n\n## Callbacks\n\n- Simple responders\n- Must always be prepared to handle errors, that's why it's the first argument.\n- Often inline anonymous, but not always.\n- Can trap and call other callbacks with modified data, or pass errors upwards.\n\n## Actors\n\n- Last argument is a callback.\n- If any error occurs, and can't be handled, pass it to the callback and return.\n- Must not throw. Return value ignored.\n- return x ==> return cb(null, x)\n- throw er ==> return cb(er)\n\n```javascript\n// return true if a path is either\n// a symlink or a directory.\nfunction isLinkOrDir (path, cb) {\n fs.lstat(path, function (er, s) {\n if (er) return cb(er)\n return cb(null, s.isDirectory() || s.isSymbolicLink())\n })\n}\n```\n\n# asyncMap\n\n## Usecases\n\n- I have a list of 10 files, and need to read all of them, and then continue when they're all done.\n- I have a dozen URLs, and need to fetch them all, and then continue when they're all done.\n- I have 4 connected users, and need to send a message to all of them, and then continue when that's done.\n- I have a list of n things, and I need to dosomething with all of them, in parallel, and get the results once they're all complete.\n\n\n## Solution\n\n```javascript\nvar asyncMap = require(\"slide\").asyncMap\nfunction writeFiles (files, what, cb) {\n asyncMap(files, function (f, cb) {\n fs.writeFile(f, what, cb)\n }, cb)\n}\nwriteFiles([my, file, list], \"foo\", cb)\n```\n\n# chain\n\n## Usecases\n\n- I have to do a bunch of things, in order. Get db credentials out of a file,\n read the data from the db, write that data to another file.\n- If anything fails, do not continue.\n- I still have to provide an array of functions, which is a lot of boilerplate,\n and a pita if your functions take args like\n\n```javascript\nfunction (cb) {\n blah(a, b, c, cb)\n}\n```\n\n- Results are discarded, which is a bit lame.\n- No way to branch.\n\n## Solution\n\n- reduces boilerplate by converting an array of [fn, args] to an actor\n that takes no arguments (except cb)\n- A bit like Function#bind, but tailored for our use-case.\n- bindActor(obj, \"method\", a, b, c)\n- bindActor(fn, a, b, c)\n- bindActor(obj, fn, a, b, c)\n- branching, skipping over falsey arguments\n\n```javascript\nchain([\n doThing && [thing, a, b, c]\n, isFoo && [doFoo, \"foo\"]\n, subChain && [chain, [one, two]]\n], cb)\n```\n\n- tracking results: results are stored in an optional array passed as argument,\n last result is always in results[results.length - 1].\n- treat chain.first and chain.last as placeholders for the first/last\n result up until that point.\n\n\n## Non-trivial example\n\n- Read number files in a directory\n- Add the results together\n- Ping a web service with the result\n- Write the response to a file\n- Delete the number files\n\n```javascript\nvar chain = require(\"slide\").chain\nfunction myProgram (cb) {\n var res = [], last = chain.last, first = chain.first\n chain([\n [fs, \"readdir\", \"the-directory\"]\n , [readFiles, \"the-directory\", last]\n , [sum, last]\n , [ping, \"POST\", \"example.com\", 80, \"/foo\", last]\n , [fs, \"writeFile\", \"result.txt\", last]\n , [rmFiles, \"./the-directory\", first]\n ], res, cb)\n}\n```\n\n# Conclusion: Convention Profits\n\n- Consistent API from top to bottom.\n- Sneak in at any point to inject functionality. Testable, reusable, ...\n- When ruby and python users whine, you can smile condescendingly.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/slide-flow-control/issues"
},
- "_id": "slide@1.1.4",
- "_from": "slide@latest"
+ "_id": "slide@1.1.5",
+ "_from": "slide@~1.1.4"
}
diff --git a/deps/npm/package.json b/deps/npm/package.json
index b534a50c92..d181514d6f 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "1.3.10",
+ "version": "1.3.11",
"name": "npm",
"publishConfig": {
"proprietary-attribs": false
@@ -36,21 +36,21 @@
"dependencies": {
"semver": "~2.1.0",
"ini": "~1.1.0",
- "slide": "~1.1.4",
+ "slide": "~1.1.5",
"abbrev": "~1.0.4",
"graceful-fs": "~2.0.0",
"minimatch": "~0.2.12",
"nopt": "~2.1.2",
"rimraf": "~2.2.0",
- "request": "~2.25.0",
+ "request": "~2.27.0",
"which": "1",
"tar": "~0.1.18",
"fstream": "~0.1.23",
"block-stream": "0.0.7",
"mkdirp": "~0.3.3",
"read": "~1.0.4",
- "lru-cache": "~2.3.0",
- "node-gyp": "~0.10.9",
+ "lru-cache": "~2.3.1",
+ "node-gyp": "~0.10.10",
"fstream-npm": "~0.1.3",
"uid-number": "0",
"archy": "0",