summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-08-14 20:27:28 -0700
committerisaacs <i@izs.me>2012-08-14 20:27:28 -0700
commit3ccee087597c6a14c1b171d43a618c10889d4169 (patch)
tree5fa6ce0f7c3a7402c6138eba01495aa4a851d14d
parent2c13cbbc0b43287dfb86aef91e402a0719363e11 (diff)
downloadnode-new-3ccee087597c6a14c1b171d43a618c10889d4169.tar.gz
npm: Upgrade to 1.1.49
- node-gyp@0.6.5 - abstracted-out configs - publishing over proxies - bugfixes to all the deps
-rw-r--r--deps/npm/README.md47
-rwxr-xr-xdeps/npm/bin/npm-cli.js11
-rw-r--r--deps/npm/html/api/bin.html2
-rw-r--r--deps/npm/html/api/bugs.html2
-rw-r--r--deps/npm/html/api/commands.html2
-rw-r--r--deps/npm/html/api/config.html2
-rw-r--r--deps/npm/html/api/deprecate.html2
-rw-r--r--deps/npm/html/api/docs.html2
-rw-r--r--deps/npm/html/api/edit.html2
-rw-r--r--deps/npm/html/api/explore.html2
-rw-r--r--deps/npm/html/api/help-search.html2
-rw-r--r--deps/npm/html/api/init.html2
-rw-r--r--deps/npm/html/api/install.html2
-rw-r--r--deps/npm/html/api/link.html2
-rw-r--r--deps/npm/html/api/load.html2
-rw-r--r--deps/npm/html/api/ls.html2
-rw-r--r--deps/npm/html/api/npm.html4
-rw-r--r--deps/npm/html/api/outdated.html2
-rw-r--r--deps/npm/html/api/owner.html2
-rw-r--r--deps/npm/html/api/pack.html2
-rw-r--r--deps/npm/html/api/prefix.html2
-rw-r--r--deps/npm/html/api/prune.html2
-rw-r--r--deps/npm/html/api/publish.html2
-rw-r--r--deps/npm/html/api/rebuild.html2
-rw-r--r--deps/npm/html/api/restart.html2
-rw-r--r--deps/npm/html/api/root.html2
-rw-r--r--deps/npm/html/api/run-script.html2
-rw-r--r--deps/npm/html/api/search.html2
-rw-r--r--deps/npm/html/api/shrinkwrap.html2
-rw-r--r--deps/npm/html/api/start.html2
-rw-r--r--deps/npm/html/api/stop.html2
-rw-r--r--deps/npm/html/api/submodule.html2
-rw-r--r--deps/npm/html/api/tag.html2
-rw-r--r--deps/npm/html/api/test.html2
-rw-r--r--deps/npm/html/api/uninstall.html2
-rw-r--r--deps/npm/html/api/unpublish.html2
-rw-r--r--deps/npm/html/api/update.html2
-rw-r--r--deps/npm/html/api/version.html2
-rw-r--r--deps/npm/html/api/view.html2
-rw-r--r--deps/npm/html/api/whoami.html2
-rw-r--r--deps/npm/html/doc/README.html49
-rw-r--r--deps/npm/html/doc/adduser.html2
-rw-r--r--deps/npm/html/doc/bin.html2
-rw-r--r--deps/npm/html/doc/bugs.html2
-rw-r--r--deps/npm/html/doc/build.html2
-rw-r--r--deps/npm/html/doc/bundle.html2
-rw-r--r--deps/npm/html/doc/cache.html2
-rw-r--r--deps/npm/html/doc/changelog.html2
-rw-r--r--deps/npm/html/doc/coding-style.html2
-rw-r--r--deps/npm/html/doc/completion.html2
-rw-r--r--deps/npm/html/doc/config.html2
-rw-r--r--deps/npm/html/doc/deprecate.html2
-rw-r--r--deps/npm/html/doc/developers.html2
-rw-r--r--deps/npm/html/doc/disputes.html2
-rw-r--r--deps/npm/html/doc/docs.html2
-rw-r--r--deps/npm/html/doc/edit.html2
-rw-r--r--deps/npm/html/doc/explore.html2
-rw-r--r--deps/npm/html/doc/faq.html2
-rw-r--r--deps/npm/html/doc/folders.html2
-rw-r--r--deps/npm/html/doc/help-search.html2
-rw-r--r--deps/npm/html/doc/help.html2
-rw-r--r--deps/npm/html/doc/index.html2
-rw-r--r--deps/npm/html/doc/init.html2
-rw-r--r--deps/npm/html/doc/install.html2
-rw-r--r--deps/npm/html/doc/json.html2
-rw-r--r--deps/npm/html/doc/link.html2
-rw-r--r--deps/npm/html/doc/list.html4
-rw-r--r--deps/npm/html/doc/npm.html4
-rw-r--r--deps/npm/html/doc/outdated.html2
-rw-r--r--deps/npm/html/doc/owner.html2
-rw-r--r--deps/npm/html/doc/pack.html2
-rw-r--r--deps/npm/html/doc/prefix.html2
-rw-r--r--deps/npm/html/doc/prune.html2
-rw-r--r--deps/npm/html/doc/publish.html2
-rw-r--r--deps/npm/html/doc/rebuild.html2
-rw-r--r--deps/npm/html/doc/registry.html2
-rw-r--r--deps/npm/html/doc/removing-npm.html2
-rw-r--r--deps/npm/html/doc/restart.html2
-rw-r--r--deps/npm/html/doc/root.html2
-rw-r--r--deps/npm/html/doc/run-script.html2
-rw-r--r--deps/npm/html/doc/scripts.html2
-rw-r--r--deps/npm/html/doc/search.html2
-rw-r--r--deps/npm/html/doc/semver.html2
-rw-r--r--deps/npm/html/doc/shrinkwrap.html2
-rw-r--r--deps/npm/html/doc/star.html2
-rw-r--r--deps/npm/html/doc/start.html2
-rw-r--r--deps/npm/html/doc/stop.html2
-rw-r--r--deps/npm/html/doc/submodule.html2
-rw-r--r--deps/npm/html/doc/tag.html2
-rw-r--r--deps/npm/html/doc/test.html2
-rw-r--r--deps/npm/html/doc/uninstall.html2
-rw-r--r--deps/npm/html/doc/unpublish.html2
-rw-r--r--deps/npm/html/doc/update.html2
-rw-r--r--deps/npm/html/doc/version.html2
-rw-r--r--deps/npm/html/doc/view.html2
-rw-r--r--deps/npm/html/doc/whoami.html2
-rw-r--r--deps/npm/lib/adduser.js11
-rw-r--r--deps/npm/lib/build.js8
-rw-r--r--deps/npm/lib/completion.js4
-rw-r--r--deps/npm/lib/config.js183
-rw-r--r--deps/npm/lib/npm.js59
-rw-r--r--deps/npm/lib/publish.js7
-rw-r--r--deps/npm/lib/utils/error-handler.js5
-rw-r--r--deps/npm/lib/utils/ini.js352
-rw-r--r--deps/npm/lib/utils/lifecycle.js9
-rw-r--r--deps/npm/lib/version.js20
-rw-r--r--deps/npm/lib/view.js1
-rw-r--r--deps/npm/man/man1/README.1100
-rw-r--r--deps/npm/man/man1/list.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/couch-login/couch-login.js4
-rw-r--r--deps/npm/node_modules/couch-login/package.json6
-rw-r--r--deps/npm/node_modules/glob/glob.js2
-rw-r--r--deps/npm/node_modules/glob/package.json4
-rw-r--r--deps/npm/node_modules/ini/ini.js32
-rw-r--r--deps/npm/node_modules/ini/package.json16
-rw-r--r--deps/npm/node_modules/ini/test/bar.js23
-rw-r--r--deps/npm/node_modules/ini/test/fixtures/foo.ini29
-rw-r--r--deps/npm/node_modules/ini/test/foo.js59
-rw-r--r--deps/npm/node_modules/lru-cache/README.md53
-rw-r--r--deps/npm/node_modules/lru-cache/lib/lru-cache.js72
-rw-r--r--deps/npm/node_modules/lru-cache/package.json11
-rw-r--r--deps/npm/node_modules/lru-cache/test/basic.js78
-rw-r--r--deps/npm/node_modules/minimatch/minimatch.js2
-rw-r--r--deps/npm/node_modules/minimatch/package.json24
-rw-r--r--deps/npm/node_modules/node-gyp/addon.gypi24
-rw-r--r--deps/npm/node_modules/node-gyp/lib/configure.js68
-rw-r--r--deps/npm/node_modules/node-gyp/lib/install.js28
-rw-r--r--deps/npm/node_modules/node-gyp/package.json6
-rwxr-xr-xdeps/npm/node_modules/node-gyp/updateLegacy.sh9
-rw-r--r--deps/npm/node_modules/npm-registry-client/index.js1
-rw-r--r--deps/npm/node_modules/npm-registry-client/package.json6
-rw-r--r--deps/npm/node_modules/npmconf/.npmignore1
-rw-r--r--deps/npm/node_modules/npmconf/README.md33
-rw-r--r--deps/npm/node_modules/npmconf/config-defs.js (renamed from deps/npm/lib/utils/config-defs.js)14
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/.npmignore3
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/LICENCE22
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/index.js282
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE (renamed from deps/npm/node_modules/proto-list/LICENSE)0
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md (renamed from deps/npm/node_modules/proto-list/README.md)0
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json28
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js (renamed from deps/npm/node_modules/proto-list/proto-list.js)73
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js61
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/package.json28
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown228
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.js10
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.json21
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/test/chain-class.js100
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/test/env.js10
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/test/find-file.js13
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js5
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/test/ini.js18
-rw-r--r--deps/npm/node_modules/npmconf/node_modules/config-chain/test/save.js59
-rw-r--r--deps/npm/node_modules/npmconf/npmconf.js324
-rw-r--r--deps/npm/node_modules/npmconf/package.json42
-rw-r--r--deps/npm/node_modules/npmconf/test/00-setup.js27
-rw-r--r--deps/npm/node_modules/npmconf/test/basic.js72
-rw-r--r--deps/npm/node_modules/npmconf/test/builtin.js72
-rw-r--r--deps/npm/node_modules/npmconf/test/fixtures/builtin1
-rw-r--r--deps/npm/node_modules/npmconf/test/fixtures/globalconfig1
-rw-r--r--deps/npm/node_modules/npmconf/test/fixtures/userconfig22
-rw-r--r--deps/npm/node_modules/npmconf/test/save.js74
-rw-r--r--deps/npm/node_modules/once/LICENSE27
-rw-r--r--deps/npm/node_modules/once/README.md33
-rw-r--r--deps/npm/node_modules/once/once.js19
-rw-r--r--deps/npm/node_modules/once/package.json35
-rw-r--r--deps/npm/node_modules/once/test/once.js18
-rw-r--r--deps/npm/node_modules/proto-list/package.json9
-rw-r--r--deps/npm/node_modules/read-package-json/package.json6
-rw-r--r--deps/npm/node_modules/read-package-json/read-json.js2
-rw-r--r--deps/npm/node_modules/read/lib/read.js9
-rw-r--r--deps/npm/node_modules/read/package.json4
-rw-r--r--deps/npm/node_modules/read/test/many.js76
-rw-r--r--deps/npm/package.json29
175 files changed, 2549 insertions, 983 deletions
diff --git a/deps/npm/README.md b/deps/npm/README.md
index 1257f14716..0c138134e4 100644
--- a/deps/npm/README.md
+++ b/deps/npm/README.md
@@ -35,31 +35,18 @@ paths, etc.) then read on.
## Fancy Install (Unix)
-To install npm with one command, do this:
-
- curl http://npmjs.org/install.sh | sh
-
-To skip the npm 0.x cleanup, do this:
-
- curl http://npmjs.org/install.sh | clean=no sh
-
-To say "yes" to the 0.x cleanup, but skip the prompt:
-
- curl http://npmjs.org/install.sh | clean=yes sh
-
-If you get permission errors, you'll need to **run** the script as root.
-(Note, just putting `sudo` in front of the `curl` will **fetch** the script
-as root.)
+There's a pretty robust install script at
+<https://npmjs.org/install.sh>. You can download that and run it.
### Slightly Fancier
You can set any npm configuration params with that script:
- curl http://npmjs.org/install.sh | npm_config_prefix=/some/path sh
+npm_config_prefix=/some/path sh install.sh
Or, you can run it in uber-debuggery mode:
- curl http://npmjs.org/install.sh | npm_debug=1 sh
+npm_debug=1 sh install.sh
### Even Fancier
@@ -83,21 +70,6 @@ git, and mess with it directly.
No.
-## Dev Install
-
-To install the latest **unstable** development version from git:
-
- git clone https://github.com/isaacs/npm.git
- cd npm
- sudo make install # (or: `node cli.js install -gf`)
-
-If you're sitting in the code folder reading this document in your
-terminal, then you've already got the code. Just do:
-
- sudo make install
-
-and npm will install itself.
-
## Permissions when Using npm to Install Other Stuff
**tl;dr**
@@ -163,6 +135,14 @@ you have chosen.
If you would like to use npm programmatically, you can do that.
It's not very well documented, but it *is* rather simple.
+Most of the time, unless you actually want to do all the things that
+npm does, you should try using one of npm's dependencies rather than
+using npm itself, if possible.
+
+Eventually, npm will be just a thin cli wrapper around the modules
+that it depends on, but for now, there are some things that you must
+use npm itself to do.
+
var npm = require("npm")
npm.load(myConfigObject, function (er) {
if (er) return handlError(er)
@@ -195,8 +175,7 @@ especially the [faq](http://npmjs.org/doc/faq.html).
You can use the `npm help` command to read any of them.
If you're a developer, and you want to use npm to publish your program,
-you should
-[read this](http://npmjs.org/doc/developers.html)
+you should [read this](http://npmjs.org/doc/developers.html)
## Legal Stuff
diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js
index a71985b37b..ef8873542b 100755
--- a/deps/npm/bin/npm-cli.js
+++ b/deps/npm/bin/npm-cli.js
@@ -22,10 +22,10 @@ log.info("it worked if it ends with", "ok")
var fs = require("graceful-fs")
, path = require("path")
, npm = require("../lib/npm.js")
- , ini = require("../lib/utils/ini.js")
+ , npmconf = require("npmconf")
, errorHandler = require("../lib/utils/error-handler.js")
- , configDefs = require("../lib/utils/config-defs.js")
+ , configDefs = npmconf.defs
, shorthands = configDefs.shorthands
, types = configDefs.types
, nopt = require("nopt")
@@ -50,10 +50,9 @@ if (conf.version) {
}
if (conf.versions) {
- var v = process.versions
- v.npm = npm.version
- console.log(v)
- return
+ npm.command = "version"
+ conf.usage = false
+ npm.argv = []
}
log.info("using", "npm@%s", npm.version)
diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html
index 8d7fbc97d6..d3650c2777 100644
--- a/deps/npm/html/api/bin.html
+++ b/deps/npm/html/api/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">bin &mdash; npm@1.1.48</p>
+<p id="footer">bin &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/bugs.html b/deps/npm/html/api/bugs.html
index 2b7f949b24..41c5d2bfbe 100644
--- a/deps/npm/html/api/bugs.html
+++ b/deps/npm/html/api/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">bugs &mdash; npm@1.1.48</p>
+<p id="footer">bugs &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/commands.html b/deps/npm/html/api/commands.html
index ebf864872c..2003aca946 100644
--- a/deps/npm/html/api/commands.html
+++ b/deps/npm/html/api/commands.html
@@ -28,7 +28,7 @@ usage, or <code>man 3 npm-&lt;command&gt;</code> for programmatic usage.</p>
<ul><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">commands &mdash; npm@1.1.48</p>
+<p id="footer">commands &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/config.html b/deps/npm/html/api/config.html
index 4ad387c646..01e720390b 100644
--- a/deps/npm/html/api/config.html
+++ b/deps/npm/html/api/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">config &mdash; npm@1.1.48</p>
+<p id="footer">config &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/deprecate.html b/deps/npm/html/api/deprecate.html
index c6ef435e86..2ba085bd2a 100644
--- a/deps/npm/html/api/deprecate.html
+++ b/deps/npm/html/api/deprecate.html
@@ -30,7 +30,7 @@ install the package.</p></li></ul>
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../api/unpublish.html">unpublish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate &mdash; npm@1.1.48</p>
+<p id="footer">deprecate &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/docs.html b/deps/npm/html/api/docs.html
index aa9a229511..79e6b98f39 100644
--- a/deps/npm/html/api/docs.html
+++ b/deps/npm/html/api/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">docs &mdash; npm@1.1.48</p>
+<p id="footer">docs &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/edit.html b/deps/npm/html/api/edit.html
index 1508bbd543..576a866c0e 100644
--- a/deps/npm/html/api/edit.html
+++ b/deps/npm/html/api/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">edit &mdash; npm@1.1.48</p>
+<p id="footer">edit &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/explore.html b/deps/npm/html/api/explore.html
index c6c8447123..92dcc7d8c7 100644
--- a/deps/npm/html/api/explore.html
+++ b/deps/npm/html/api/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">explore &mdash; npm@1.1.48</p>
+<p id="footer">explore &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/help-search.html b/deps/npm/html/api/help-search.html
index 3c6f93dad3..5ca7c75681 100644
--- a/deps/npm/html/api/help-search.html
+++ b/deps/npm/html/api/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">help-search &mdash; npm@1.1.48</p>
+<p id="footer">help-search &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/init.html b/deps/npm/html/api/init.html
index 7bc6fcdf5c..720ef2b463 100644
--- a/deps/npm/html/api/init.html
+++ b/deps/npm/html/api/init.html
@@ -35,7 +35,7 @@ then go ahead and use this programmatically.</p>
<p><a href="../doc/json.html">json(1)</a></p>
</div>
-<p id="footer">init &mdash; npm@1.1.48</p>
+<p id="footer">init &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/install.html b/deps/npm/html/api/install.html
index c50494d3f1..6faf410bf9 100644
--- a/deps/npm/html/api/install.html
+++ b/deps/npm/html/api/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">install &mdash; npm@1.1.48</p>
+<p id="footer">install &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/link.html b/deps/npm/html/api/link.html
index dc232c1f34..28334bc31b 100644
--- a/deps/npm/html/api/link.html
+++ b/deps/npm/html/api/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">link &mdash; npm@1.1.48</p>
+<p id="footer">link &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/load.html b/deps/npm/html/api/load.html
index 3aee7f3a7b..075e1aa43f 100644
--- a/deps/npm/html/api/load.html
+++ b/deps/npm/html/api/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">load &mdash; npm@1.1.48</p>
+<p id="footer">load &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/ls.html b/deps/npm/html/api/ls.html
index 8df2da31ef..8eeb35b406 100644
--- a/deps/npm/html/api/ls.html
+++ b/deps/npm/html/api/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">ls &mdash; npm@1.1.48</p>
+<p id="footer">ls &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/npm.html b/deps/npm/html/api/npm.html
index 95dfd2f885..e761aee1c5 100644
--- a/deps/npm/html/api/npm.html
+++ b/deps/npm/html/api/npm.html
@@ -24,7 +24,7 @@ npm.load(configObject, function (er, npm) {
<h2 id="VERSION">VERSION</h2>
-<p>1.1.48</p>
+<p>1.1.49</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
@@ -91,7 +91,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.1.48</p>
+<p id="footer">npm &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/outdated.html b/deps/npm/html/api/outdated.html
index 9b672e7219..e867abf73b 100644
--- a/deps/npm/html/api/outdated.html
+++ b/deps/npm/html/api/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">outdated &mdash; npm@1.1.48</p>
+<p id="footer">outdated &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/owner.html b/deps/npm/html/api/owner.html
index 3bb2c18153..df85a9dddb 100644
--- a/deps/npm/html/api/owner.html
+++ b/deps/npm/html/api/owner.html
@@ -34,7 +34,7 @@ that is not implemented at this time.</p>
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">owner &mdash; npm@1.1.48</p>
+<p id="footer">owner &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/pack.html b/deps/npm/html/api/pack.html
index 3edb54f50b..0409c5c949 100644
--- a/deps/npm/html/api/pack.html
+++ b/deps/npm/html/api/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">pack &mdash; npm@1.1.48</p>
+<p id="footer">pack &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/prefix.html b/deps/npm/html/api/prefix.html
index 5fac2df5d3..ecc978e720 100644
--- a/deps/npm/html/api/prefix.html
+++ b/deps/npm/html/api/prefix.html
@@ -21,7 +21,7 @@
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">prefix &mdash; npm@1.1.48</p>
+<p id="footer">prefix &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/prune.html b/deps/npm/html/api/prune.html
index 4d47a66126..6b9c3a8892 100644
--- a/deps/npm/html/api/prune.html
+++ b/deps/npm/html/api/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">prune &mdash; npm@1.1.48</p>
+<p id="footer">prune &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/publish.html b/deps/npm/html/api/publish.html
index 247e7aee86..48dce3f7a3 100644
--- a/deps/npm/html/api/publish.html
+++ b/deps/npm/html/api/publish.html
@@ -32,7 +32,7 @@ the registry. Overwrites when the &quot;force&quot; environment variable is set
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul>
</div>
-<p id="footer">publish &mdash; npm@1.1.48</p>
+<p id="footer">publish &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/rebuild.html b/deps/npm/html/api/rebuild.html
index 5480d0fd0b..dcde5ae6f7 100644
--- a/deps/npm/html/api/rebuild.html
+++ b/deps/npm/html/api/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">rebuild &mdash; npm@1.1.48</p>
+<p id="footer">rebuild &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/restart.html b/deps/npm/html/api/restart.html
index 20be52f32b..7edf903a10 100644
--- a/deps/npm/html/api/restart.html
+++ b/deps/npm/html/api/restart.html
@@ -27,7 +27,7 @@ in the <code>packages</code> parameter.</p>
<ul><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">restart &mdash; npm@1.1.48</p>
+<p id="footer">restart &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/root.html b/deps/npm/html/api/root.html
index 2429376c16..4237ca80e1 100644
--- a/deps/npm/html/api/root.html
+++ b/deps/npm/html/api/root.html
@@ -21,7 +21,7 @@
<p>This function is not useful programmatically.</p>
</div>
-<p id="footer">root &mdash; npm@1.1.48</p>
+<p id="footer">root &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/run-script.html b/deps/npm/html/api/run-script.html
index 221cc0e14c..3ee6d88895 100644
--- a/deps/npm/html/api/run-script.html
+++ b/deps/npm/html/api/run-script.html
@@ -29,7 +29,7 @@ assumed to be the command to run. All other elements are ignored.</p>
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../api/test.html">test(3)</a></li><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/restart.html">restart(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">run-script &mdash; npm@1.1.48</p>
+<p id="footer">run-script &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/search.html b/deps/npm/html/api/search.html
index 7906dd3ecf..4d9ce2b159 100644
--- a/deps/npm/html/api/search.html
+++ b/deps/npm/html/api/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">search &mdash; npm@1.1.48</p>
+<p id="footer">search &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/shrinkwrap.html b/deps/npm/html/api/shrinkwrap.html
index b548445250..2667ac658b 100644
--- a/deps/npm/html/api/shrinkwrap.html
+++ b/deps/npm/html/api/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">shrinkwrap &mdash; npm@1.1.48</p>
+<p id="footer">shrinkwrap &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/start.html b/deps/npm/html/api/start.html
index 55c87d6d12..8f5c26fffd 100644
--- a/deps/npm/html/api/start.html
+++ b/deps/npm/html/api/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">start &mdash; npm@1.1.48</p>
+<p id="footer">start &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/stop.html b/deps/npm/html/api/stop.html
index c0a181fad7..8888693a3f 100644
--- a/deps/npm/html/api/stop.html
+++ b/deps/npm/html/api/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">stop &mdash; npm@1.1.48</p>
+<p id="footer">stop &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/submodule.html b/deps/npm/html/api/submodule.html
index a04a4a31d2..c9a6fc4a74 100644
--- a/deps/npm/html/api/submodule.html
+++ b/deps/npm/html/api/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">submodule &mdash; npm@1.1.48</p>
+<p id="footer">submodule &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/tag.html b/deps/npm/html/api/tag.html
index 486ca3e646..dc8e9e416b 100644
--- a/deps/npm/html/api/tag.html
+++ b/deps/npm/html/api/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">tag &mdash; npm@1.1.48</p>
+<p id="footer">tag &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/test.html b/deps/npm/html/api/test.html
index d4f4b71348..9de59596dc 100644
--- a/deps/npm/html/api/test.html
+++ b/deps/npm/html/api/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">test &mdash; npm@1.1.48</p>
+<p id="footer">test &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/uninstall.html b/deps/npm/html/api/uninstall.html
index 8b5d0e05fc..dfdf1c6c94 100644
--- a/deps/npm/html/api/uninstall.html
+++ b/deps/npm/html/api/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">uninstall &mdash; npm@1.1.48</p>
+<p id="footer">uninstall &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/unpublish.html b/deps/npm/html/api/unpublish.html
index 850bea3b89..ca4dd634a5 100644
--- a/deps/npm/html/api/unpublish.html
+++ b/deps/npm/html/api/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">unpublish &mdash; npm@1.1.48</p>
+<p id="footer">unpublish &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/update.html b/deps/npm/html/api/update.html
index 95d65e83b5..5149b3555d 100644
--- a/deps/npm/html/api/update.html
+++ b/deps/npm/html/api/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">update &mdash; npm@1.1.48</p>
+<p id="footer">update &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/version.html b/deps/npm/html/api/version.html
index ba2a62070d..a4104a84de 100644
--- a/deps/npm/html/api/version.html
+++ b/deps/npm/html/api/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">version &mdash; npm@1.1.48</p>
+<p id="footer">version &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/view.html b/deps/npm/html/api/view.html
index 0317f78b81..056b39b59b 100644
--- a/deps/npm/html/api/view.html
+++ b/deps/npm/html/api/view.html
@@ -99,7 +99,7 @@ the field name.</p>
<p>corresponding to the list of fields selected.</p>
</div>
-<p id="footer">view &mdash; npm@1.1.48</p>
+<p id="footer">view &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/whoami.html b/deps/npm/html/api/whoami.html
index 018c3d1649..0c694baa89 100644
--- a/deps/npm/html/api/whoami.html
+++ b/deps/npm/html/api/whoami.html
@@ -21,7 +21,7 @@
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">whoami &mdash; npm@1.1.48</p>
+<p id="footer">whoami &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html
index f7a2c0bb68..c97a90d146 100644
--- a/deps/npm/html/doc/README.html
+++ b/deps/npm/html/doc/README.html
@@ -42,31 +42,18 @@ paths, etc.) then read on.</p>
<h2 id="Fancy-Install-Unix">Fancy Install (Unix)</h2>
-<p>To install npm with one command, do this:</p>
-
-<pre><code>curl http://npmjs.org/install.sh | sh</code></pre>
-
-<p>To skip the npm 0.x cleanup, do this:</p>
-
-<pre><code>curl http://npmjs.org/install.sh | clean=no sh</code></pre>
-
-<p>To say &quot;yes&quot; to the 0.x cleanup, but skip the prompt:</p>
-
-<pre><code>curl http://npmjs.org/install.sh | clean=yes sh</code></pre>
-
-<p>If you get permission errors, you&#39;ll need to <strong>run</strong> the script as root.
-(Note, just putting <code>sudo</code> in front of the <code>curl</code> will <strong>fetch</strong> the script
-as root.)</p>
+<p>There&#39;s a pretty robust install script at
+<a href="https://npmjs.org/install.sh">https://npmjs.org/install.sh</a>. You can download that and run it.</p>
<h3 id="Slightly-Fancier">Slightly Fancier</h3>
<p>You can set any npm configuration params with that script:</p>
-<pre><code>curl http://npmjs.org/install.sh | npm_config_prefix=/some/path sh</code></pre>
+<p>npm<em>config</em>prefix=/some/path sh install.sh</p>
<p>Or, you can run it in uber-debuggery mode:</p>
-<pre><code>curl http://npmjs.org/install.sh | npm_debug=1 sh</code></pre>
+<p>npm_debug=1 sh install.sh</p>
<h3 id="Even-Fancier">Even Fancier</h3>
@@ -90,21 +77,6 @@ git, and mess with it directly.</p>
<p>No.</p>
-<h2 id="Dev-Install">Dev Install</h2>
-
-<p>To install the latest <strong>unstable</strong> development version from git:</p>
-
-<pre><code>git clone https://github.com/isaacs/npm.git
-cd npm
-sudo make install # (or: `node cli.js install -gf`)</code></pre>
-
-<p>If you&#39;re sitting in the code folder reading this document in your
-terminal, then you&#39;ve already got the code. Just do:</p>
-
-<pre><code>sudo make install</code></pre>
-
-<p>and npm will install itself.</p>
-
<h2 id="Permissions-when-Using-npm-to-Install-Other-Stuff">Permissions when Using npm to Install Other Stuff</h2>
<p><strong>tl;dr</strong></p>
@@ -169,6 +141,14 @@ you have chosen.</p>
<p>If you would like to use npm programmatically, you can do that.
It&#39;s not very well documented, but it <em>is</em> rather simple.</p>
+<p>Most of the time, unless you actually want to do all the things that
+npm does, you should try using one of npm&#39;s dependencies rather than
+using npm itself, if possible.</p>
+
+<p>Eventually, npm will be just a thin cli wrapper around the modules
+that it depends on, but for now, there are some things that you must
+use npm itself to do.</p>
+
<pre><code>var npm = require(&quot;npm&quot;)
npm.load(myConfigObject, function (er) {
if (er) return handlError(er)
@@ -201,8 +181,7 @@ especially the <a href="http://npmjs.org/doc/faq.html">faq</a>.</p>
<p>You can use the <code>npm help</code> command to read any of them.</p>
<p>If you&#39;re a developer, and you want to use npm to publish your program,
-you should
-<a href="http://npmjs.org/doc/developers.html">read this</a></p>
+you should <a href="http://npmjs.org/doc/developers.html">read this</a></p>
<h2 id="Legal-Stuff">Legal Stuff</h2>
@@ -261,7 +240,7 @@ will no doubt tell you to put the output in a gist or email.</p>
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.1.48</p>
+<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/adduser.html b/deps/npm/html/doc/adduser.html
index 1d70581499..4eddcd1295 100644
--- a/deps/npm/html/doc/adduser.html
+++ b/deps/npm/html/doc/adduser.html
@@ -39,7 +39,7 @@ authorize on a new machine.</p>
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li></ul>
</div>
-<p id="footer">adduser &mdash; npm@1.1.48</p>
+<p id="footer">adduser &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/bin.html b/deps/npm/html/doc/bin.html
index 6afd7953bf..211c2aab45 100644
--- a/deps/npm/html/doc/bin.html
+++ b/deps/npm/html/doc/bin.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">bin &mdash; npm@1.1.48</p>
+<p id="footer">bin &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/bugs.html b/deps/npm/html/doc/bugs.html
index 4b42a5d345..e933cace77 100644
--- a/deps/npm/html/doc/bugs.html
+++ b/deps/npm/html/doc/bugs.html
@@ -36,7 +36,7 @@ config param.</p>
<ul><li><a href="../doc/docs.html">docs(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">bugs &mdash; npm@1.1.48</p>
+<p id="footer">bugs &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/build.html b/deps/npm/html/doc/build.html
index 86b9f3e2ed..d15f2ea2f7 100644
--- a/deps/npm/html/doc/build.html
+++ b/deps/npm/html/doc/build.html
@@ -25,7 +25,7 @@ A folder containing a <code>package.json</code> file in its root.</li></ul>
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">build &mdash; npm@1.1.48</p>
+<p id="footer">build &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/bundle.html b/deps/npm/html/doc/bundle.html
index 6ea7a8688d..40f049eb36 100644
--- a/deps/npm/html/doc/bundle.html
+++ b/deps/npm/html/doc/bundle.html
@@ -20,7 +20,7 @@ install packages into the local space.</p>
<ul><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">bundle &mdash; npm@1.1.48</p>
+<p id="footer">bundle &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cache.html b/deps/npm/html/doc/cache.html
index a9529a7799..f4dfc77e82 100644
--- a/deps/npm/html/doc/cache.html
+++ b/deps/npm/html/doc/cache.html
@@ -66,7 +66,7 @@ they do not make an HTTP request to the registry.</p>
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li></ul>
</div>
-<p id="footer">cache &mdash; npm@1.1.48</p>
+<p id="footer">cache &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/changelog.html b/deps/npm/html/doc/changelog.html
index 13433ac78d..87c98d4e80 100644
--- a/deps/npm/html/doc/changelog.html
+++ b/deps/npm/html/doc/changelog.html
@@ -65,7 +65,7 @@
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li></ul>
</div>
-<p id="footer">changelog &mdash; npm@1.1.48</p>
+<p id="footer">changelog &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/coding-style.html b/deps/npm/html/doc/coding-style.html
index 1b7f46f8ec..b13fee073d 100644
--- a/deps/npm/html/doc/coding-style.html
+++ b/deps/npm/html/doc/coding-style.html
@@ -180,7 +180,7 @@ set to anything.&quot;</p>
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">coding-style &mdash; npm@1.1.48</p>
+<p id="footer">coding-style &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/completion.html b/deps/npm/html/doc/completion.html
index e8b9060279..34084fa183 100644
--- a/deps/npm/html/doc/completion.html
+++ b/deps/npm/html/doc/completion.html
@@ -33,7 +33,7 @@ completions based on the arguments.</p>
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">completion &mdash; npm@1.1.48</p>
+<p id="footer">completion &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/config.html b/deps/npm/html/doc/config.html
index c96a420dde..86dbd2b460 100644
--- a/deps/npm/html/doc/config.html
+++ b/deps/npm/html/doc/config.html
@@ -748,7 +748,7 @@ then answer &quot;no&quot; to any prompt.</p>
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">config &mdash; npm@1.1.48</p>
+<p id="footer">config &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/deprecate.html b/deps/npm/html/doc/deprecate.html
index c81debd111..68f7d3013e 100644
--- a/deps/npm/html/doc/deprecate.html
+++ b/deps/npm/html/doc/deprecate.html
@@ -29,7 +29,7 @@ something like this:</p>
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate &mdash; npm@1.1.48</p>
+<p id="footer">deprecate &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/developers.html b/deps/npm/html/doc/developers.html
index 93d6eb87a7..a6c30b0132 100644
--- a/deps/npm/html/doc/developers.html
+++ b/deps/npm/html/doc/developers.html
@@ -160,7 +160,7 @@ from a fresh checkout.</p>
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">developers &mdash; npm@1.1.48</p>
+<p id="footer">developers &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/disputes.html b/deps/npm/html/doc/disputes.html
index 7560583e91..5cda8b1af1 100644
--- a/deps/npm/html/doc/disputes.html
+++ b/deps/npm/html/doc/disputes.html
@@ -80,7 +80,7 @@ license statement)</li><li>Illegal content.</li></ol>
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
</div>
-<p id="footer">disputes &mdash; npm@1.1.48</p>
+<p id="footer">disputes &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/docs.html b/deps/npm/html/doc/docs.html
index 5ec3fba2f4..887cfddd81 100644
--- a/deps/npm/html/doc/docs.html
+++ b/deps/npm/html/doc/docs.html
@@ -37,7 +37,7 @@ config param.</p>
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">docs &mdash; npm@1.1.48</p>
+<p id="footer">docs &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/edit.html b/deps/npm/html/doc/edit.html
index ac3bc30d9f..ab81081dcd 100644
--- a/deps/npm/html/doc/edit.html
+++ b/deps/npm/html/doc/edit.html
@@ -37,7 +37,7 @@ or <code>&quot;notepad&quot;</code> on Windows.</li><li>Type: path</li></ul>
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/explore.html">explore(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">edit &mdash; npm@1.1.48</p>
+<p id="footer">edit &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/explore.html b/deps/npm/html/doc/explore.html
index 2a830c4678..90d8d68c48 100644
--- a/deps/npm/html/doc/explore.html
+++ b/deps/npm/html/doc/explore.html
@@ -40,7 +40,7 @@ Windows</li><li>Type: path</li></ul>
<ul><li><a href="../doc/submodule.html">submodule(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/edit.html">edit(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">explore &mdash; npm@1.1.48</p>
+<p id="footer">explore &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/faq.html b/deps/npm/html/doc/faq.html
index 31c12c12a1..f9337fc6be 100644
--- a/deps/npm/html/doc/faq.html
+++ b/deps/npm/html/doc/faq.html
@@ -241,7 +241,7 @@ We&#39;ll have someone kick it or something.</p>
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">faq &mdash; npm@1.1.48</p>
+<p id="footer">faq &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/folders.html b/deps/npm/html/doc/folders.html
index 85adf5a8f1..c5ab5d42b6 100644
--- a/deps/npm/html/doc/folders.html
+++ b/deps/npm/html/doc/folders.html
@@ -205,7 +205,7 @@ cannot be found elsewhere. See <code><a href="../doc/json.html">json(1)</a></co
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul>
</div>
-<p id="footer">folders &mdash; npm@1.1.48</p>
+<p id="footer">folders &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/help-search.html b/deps/npm/html/doc/help-search.html
index edc2f1025e..c1780e75e8 100644
--- a/deps/npm/html/doc/help-search.html
+++ b/deps/npm/html/doc/help-search.html
@@ -38,7 +38,7 @@ where the terms were found in the documentation.</p>
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li></ul>
</div>
-<p id="footer">help-search &mdash; npm@1.1.48</p>
+<p id="footer">help-search &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/help.html b/deps/npm/html/doc/help.html
index 484863a182..df582efbf7 100644
--- a/deps/npm/html/doc/help.html
+++ b/deps/npm/html/doc/help.html
@@ -36,7 +36,7 @@ matches are equivalent to specifying a topic name.</p>
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/help-search.html">help-search(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">help &mdash; npm@1.1.48</p>
+<p id="footer">help &mdash; npm@1.1.49</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 f1a754aa5e..e430b5b4df 100644
--- a/deps/npm/html/doc/index.html
+++ b/deps/npm/html/doc/index.html
@@ -384,7 +384,7 @@
<p> Display npm username</p>
</div>
-<p id="footer">index &mdash; npm@1.1.48</p>
+<p id="footer">index &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/init.html b/deps/npm/html/doc/init.html
index c893191795..5fed6472a0 100644
--- a/deps/npm/html/doc/init.html
+++ b/deps/npm/html/doc/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="../doc/json.html">json(1)</a></li><li><a href="../doc/version.html">version(1)</a></li></ul>
</div>
-<p id="footer">init &mdash; npm@1.1.48</p>
+<p id="footer">init &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/install.html b/deps/npm/html/doc/install.html
index c8a7624d14..257a45cc49 100644
--- a/deps/npm/html/doc/install.html
+++ b/deps/npm/html/doc/install.html
@@ -133,7 +133,7 @@ affects a real use-case, it will be investigated.</p>
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></li></ul>
</div>
-<p id="footer">install &mdash; npm@1.1.48</p>
+<p id="footer">install &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/json.html b/deps/npm/html/doc/json.html
index de38c12cc5..cdeeaa1fcd 100644
--- a/deps/npm/html/doc/json.html
+++ b/deps/npm/html/doc/json.html
@@ -525,7 +525,7 @@ overridden.</p>
<ul><li><a href="../doc/semver.html">semver(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/version.html">version(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
</div>
-<p id="footer">json &mdash; npm@1.1.48</p>
+<p id="footer">json &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/link.html b/deps/npm/html/doc/link.html
index 9cdf1c720d..fc953920e5 100644
--- a/deps/npm/html/doc/link.html
+++ b/deps/npm/html/doc/link.html
@@ -58,7 +58,7 @@ installation target into your project&#39;s <code>node_modules</code> folder.</p
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">link &mdash; npm@1.1.48</p>
+<p id="footer">link &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/list.html b/deps/npm/html/doc/list.html
index 4617fbf5d9..b17f6fc97f 100644
--- a/deps/npm/html/doc/list.html
+++ b/deps/npm/html/doc/list.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.1.48 /path/to/npm
+<pre><code>npm@1.1.49 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5</code></pre>
@@ -64,7 +64,7 @@ project.</p>
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul>
</div>
-<p id="footer">list &mdash; npm@1.1.48</p>
+<p id="footer">list &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/npm.html b/deps/npm/html/doc/npm.html
index faf0e11f68..83324b92cd 100644
--- a/deps/npm/html/doc/npm.html
+++ b/deps/npm/html/doc/npm.html
@@ -14,7 +14,7 @@
<h2 id="VERSION">VERSION</h2>
-<p>1.1.48</p>
+<p>1.1.49</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="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/index.html">index(1)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm &mdash; npm@1.1.48</p>
+<p id="footer">npm &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/outdated.html b/deps/npm/html/doc/outdated.html
index bc3fdea1f5..607bdd070c 100644
--- a/deps/npm/html/doc/outdated.html
+++ b/deps/npm/html/doc/outdated.html
@@ -21,7 +21,7 @@ packages are currently outdated.</p>
<ul><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">outdated &mdash; npm@1.1.48</p>
+<p id="footer">outdated &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/owner.html b/deps/npm/html/doc/owner.html
index 074fd7586f..c2991bac80 100644
--- a/deps/npm/html/doc/owner.html
+++ b/deps/npm/html/doc/owner.html
@@ -34,7 +34,7 @@ that is not implemented at this time.</p>
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">owner &mdash; npm@1.1.48</p>
+<p id="footer">owner &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/pack.html b/deps/npm/html/doc/pack.html
index 8701450b71..f7223cee8d 100644
--- a/deps/npm/html/doc/pack.html
+++ b/deps/npm/html/doc/pack.html
@@ -29,7 +29,7 @@ overwritten the second time.</p>
<ul><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">pack &mdash; npm@1.1.48</p>
+<p id="footer">pack &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/prefix.html b/deps/npm/html/doc/prefix.html
index 27f0690229..4c74d1f37d 100644
--- a/deps/npm/html/doc/prefix.html
+++ b/deps/npm/html/doc/prefix.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">prefix &mdash; npm@1.1.48</p>
+<p id="footer">prefix &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/prune.html b/deps/npm/html/doc/prune.html
index 53cf8ad8cc..05bd29bcbd 100644
--- a/deps/npm/html/doc/prune.html
+++ b/deps/npm/html/doc/prune.html
@@ -25,7 +25,7 @@ package&#39;s dependencies list.</p>
<ul><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">prune &mdash; npm@1.1.48</p>
+<p id="footer">prune &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/publish.html b/deps/npm/html/doc/publish.html
index 6fc17d626d..d028b84793 100644
--- a/deps/npm/html/doc/publish.html
+++ b/deps/npm/html/doc/publish.html
@@ -29,7 +29,7 @@ the registry. Overwrites when the &quot;--force&quot; flag is set.</p>
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li></ul>
</div>
-<p id="footer">publish &mdash; npm@1.1.48</p>
+<p id="footer">publish &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/rebuild.html b/deps/npm/html/doc/rebuild.html
index 8e9e3d3a63..ca1ad33ba3 100644
--- a/deps/npm/html/doc/rebuild.html
+++ b/deps/npm/html/doc/rebuild.html
@@ -25,7 +25,7 @@ the new binary.</p>
<ul><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">rebuild &mdash; npm@1.1.48</p>
+<p id="footer">rebuild &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/registry.html b/deps/npm/html/doc/registry.html
index c5dbb58dfa..5ef97da141 100644
--- a/deps/npm/html/doc/registry.html
+++ b/deps/npm/html/doc/registry.html
@@ -97,7 +97,7 @@ ask for help on the <a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">registry &mdash; npm@1.1.48</p>
+<p id="footer">registry &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/removing-npm.html b/deps/npm/html/doc/removing-npm.html
index fc14965934..024122a2c5 100644
--- a/deps/npm/html/doc/removing-npm.html
+++ b/deps/npm/html/doc/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="../doc/rm.html">rm(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li></ul>
</div>
-<p id="footer">removing-npm &mdash; npm@1.1.48</p>
+<p id="footer">removing-npm &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/restart.html b/deps/npm/html/doc/restart.html
index a76889acfe..251780cb63 100644
--- a/deps/npm/html/doc/restart.html
+++ b/deps/npm/html/doc/restart.html
@@ -24,7 +24,7 @@ the &quot;start&quot; script.</p>
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">restart &mdash; npm@1.1.48</p>
+<p id="footer">restart &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/root.html b/deps/npm/html/doc/root.html
index b982740f90..fc8ecad30b 100644
--- a/deps/npm/html/doc/root.html
+++ b/deps/npm/html/doc/root.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">root &mdash; npm@1.1.48</p>
+<p id="footer">root &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/run-script.html b/deps/npm/html/doc/run-script.html
index d0c09bc6e8..d28e1b2db5 100644
--- a/deps/npm/html/doc/run-script.html
+++ b/deps/npm/html/doc/run-script.html
@@ -23,7 +23,7 @@ called directly, as well.</p>
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">run-script &mdash; npm@1.1.48</p>
+<p id="footer">run-script &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/scripts.html b/deps/npm/html/doc/scripts.html
index 9a3d6c6a1d..e71d621cc5 100644
--- a/deps/npm/html/doc/scripts.html
+++ b/deps/npm/html/doc/scripts.html
@@ -177,7 +177,7 @@ will sudo the npm command in question.</li></ul>
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">scripts &mdash; npm@1.1.48</p>
+<p id="footer">scripts &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/search.html b/deps/npm/html/doc/search.html
index 6b069ae2b2..e002a40f2d 100644
--- a/deps/npm/html/doc/search.html
+++ b/deps/npm/html/doc/search.html
@@ -24,7 +24,7 @@ expression characters must be escaped or quoted in most shells.)</p>
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/view.html">view(1)</a></li></ul>
</div>
-<p id="footer">search &mdash; npm@1.1.48</p>
+<p id="footer">search &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/semver.html b/deps/npm/html/doc/semver.html
index b3f9d295f5..46bce35f05 100644
--- a/deps/npm/html/doc/semver.html
+++ b/deps/npm/html/doc/semver.html
@@ -104,7 +104,7 @@ that satisfies the range, or null if none of them do.</li></ul>
<ul><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">semver &mdash; npm@1.1.48</p>
+<p id="footer">semver &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/shrinkwrap.html b/deps/npm/html/doc/shrinkwrap.html
index 3c0ccab972..de942cc051 100644
--- a/deps/npm/html/doc/shrinkwrap.html
+++ b/deps/npm/html/doc/shrinkwrap.html
@@ -169,7 +169,7 @@ versions.</p>
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">shrinkwrap &mdash; npm@1.1.48</p>
+<p id="footer">shrinkwrap &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/star.html b/deps/npm/html/doc/star.html
index 0e22a1d55c..b06ce6afa2 100644
--- a/deps/npm/html/doc/star.html
+++ b/deps/npm/html/doc/star.html
@@ -26,7 +26,7 @@ a vaguely positive way to show that you care.</p>
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">star &mdash; npm@1.1.48</p>
+<p id="footer">star &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/start.html b/deps/npm/html/doc/start.html
index 2cbb990089..792c5ef258 100644
--- a/deps/npm/html/doc/start.html
+++ b/deps/npm/html/doc/start.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">start &mdash; npm@1.1.48</p>
+<p id="footer">start &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/stop.html b/deps/npm/html/doc/stop.html
index c87acd4585..a73dc1c7f5 100644
--- a/deps/npm/html/doc/stop.html
+++ b/deps/npm/html/doc/stop.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li></ul>
</div>
-<p id="footer">stop &mdash; npm@1.1.48</p>
+<p id="footer">stop &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/submodule.html b/deps/npm/html/doc/submodule.html
index 2a32b187d8..45660e8ba6 100644
--- a/deps/npm/html/doc/submodule.html
+++ b/deps/npm/html/doc/submodule.html
@@ -33,7 +33,7 @@ dependencies into the submodule folder.</p>
<ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul>
</div>
-<p id="footer">submodule &mdash; npm@1.1.48</p>
+<p id="footer">submodule &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/tag.html b/deps/npm/html/doc/tag.html
index c32112549e..b42386d01b 100644
--- a/deps/npm/html/doc/tag.html
+++ b/deps/npm/html/doc/tag.html
@@ -21,7 +21,7 @@
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">tag &mdash; npm@1.1.48</p>
+<p id="footer">tag &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/test.html b/deps/npm/html/doc/test.html
index e36f93dc16..93a49d0d3d 100644
--- a/deps/npm/html/doc/test.html
+++ b/deps/npm/html/doc/test.html
@@ -23,7 +23,7 @@ true.</p>
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">test &mdash; npm@1.1.48</p>
+<p id="footer">test &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/uninstall.html b/deps/npm/html/doc/uninstall.html
index f90ae71f92..6b3c715f06 100644
--- a/deps/npm/html/doc/uninstall.html
+++ b/deps/npm/html/doc/uninstall.html
@@ -22,7 +22,7 @@ on its behalf.</p>
<ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">uninstall &mdash; npm@1.1.48</p>
+<p id="footer">uninstall &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/unpublish.html b/deps/npm/html/doc/unpublish.html
index 28fdc9f6f5..e1a6560a05 100644
--- a/deps/npm/html/doc/unpublish.html
+++ b/deps/npm/html/doc/unpublish.html
@@ -34,7 +34,7 @@ the root package entry is removed from the registry entirely.</p>
<ul><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
</div>
-<p id="footer">unpublish &mdash; npm@1.1.48</p>
+<p id="footer">unpublish &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/update.html b/deps/npm/html/doc/update.html
index e3ad90e771..64a0a820cf 100644
--- a/deps/npm/html/doc/update.html
+++ b/deps/npm/html/doc/update.html
@@ -23,7 +23,7 @@
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">update &mdash; npm@1.1.48</p>
+<p id="footer">update &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/version.html b/deps/npm/html/doc/version.html
index 3b2e2a422d..b9a0acd3bc 100644
--- a/deps/npm/html/doc/version.html
+++ b/deps/npm/html/doc/version.html
@@ -40,7 +40,7 @@ in your git config for this to work properly.</p>
<ul><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/semver.html">semver(1)</a></li></ul>
</div>
-<p id="footer">version &mdash; npm@1.1.48</p>
+<p id="footer">version &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/view.html b/deps/npm/html/doc/view.html
index f8f98b41de..0742a1fb4a 100644
--- a/deps/npm/html/doc/view.html
+++ b/deps/npm/html/doc/view.html
@@ -88,7 +88,7 @@ the field name.</p>
<ul><li><a href="../doc/search.html">search(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/docs.html">docs(1)</a></li></ul>
</div>
-<p id="footer">view &mdash; npm@1.1.48</p>
+<p id="footer">view &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/whoami.html b/deps/npm/html/doc/whoami.html
index a8309abbc1..1d4ee84cfc 100644
--- a/deps/npm/html/doc/whoami.html
+++ b/deps/npm/html/doc/whoami.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">whoami &mdash; npm@1.1.48</p>
+<p id="footer">whoami &mdash; npm@1.1.49</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js
index 4a89f87c3c..2d6d6bcd0c 100644
--- a/deps/npm/lib/adduser.js
+++ b/deps/npm/lib/adduser.js
@@ -1,8 +1,7 @@
module.exports = adduser
-var ini = require("./utils/ini.js")
- , log = require("npmlog")
+var log = require("npmlog")
, npm = require("./npm.js")
, registry = npm.registry
, read = require("read")
@@ -130,10 +129,10 @@ function save (c, u, cb) {
registry.username = u.u
registry.password = u.p
registry.email = u.e
- ini.set("username", u.u, "user")
- ini.set("_password", u.p, "user")
- ini.set("email", u.e, "user")
+ npm.config.set("username", u.u, "user")
+ npm.config.set("_password", u.p, "user")
+ npm.config.set("email", u.e, "user")
log.info("adduser", "Authorized user %s", u.u)
- ini.save("user", cb)
+ npm.config.save("user", cb)
})
}
diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js
index fd55b9e9bd..815739c460 100644
--- a/deps/npm/lib/build.js
+++ b/deps/npm/lib/build.js
@@ -1,4 +1,3 @@
-
// npm build command
// everything about the installation after the creation of
@@ -62,8 +61,11 @@ function build_ (global, didPre, didRB) { return function (folder, cb) {
function writeBuiltinConf (folder, cb) {
// the builtin config is "sticky". Any time npm installs itself,
// it puts its builtin config file there, as well.
- var ini = require("./utils/ini.js")
- ini.saveConfig("builtin", path.resolve(folder, "npmrc"), cb)
+ if (!npm.config.usingBuiltin
+ || folder !== path.dirname(__dirname)) {
+ return cb()
+ }
+ npm.config.save("builtin", cb)
}
function linkStuff (pkg, folder, global, didRB, cb) {
diff --git a/deps/npm/lib/completion.js b/deps/npm/lib/completion.js
index 697f2d1668..87bb7a0cfe 100644
--- a/deps/npm/lib/completion.js
+++ b/deps/npm/lib/completion.js
@@ -5,7 +5,9 @@ completion.usage = "npm completion >> ~/.bashrc\n"
+ "npm completion >> ~/.zshrc\n"
+ "source <(npm completion)"
-var configDefs = require("./utils/config-defs.js")
+var npm = require("./npm.js")
+ , npmconf = require("npmconf")
+ , configDefs = npmconf.defs
, configTypes = configDefs.types
, shorthands = configDefs.shorthands
, nopt = require("nopt")
diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js
index 9c632c082a..27a5f3546b 100644
--- a/deps/npm/lib/config.js
+++ b/deps/npm/lib/config.js
@@ -9,13 +9,13 @@ config.usage = "npm config set <key> <value>"
+ "\nnpm set <key> <value>"
+ "\nnpm get [<key>]"
-var ini = require("./utils/ini.js")
- , log = require("npmlog")
+var log = require("npmlog")
, npm = require("./npm.js")
, exec = require("./utils/exec.js")
, fs = require("graceful-fs")
- , dc
- , types = require("./utils/config-defs.js").types
+ , npmconf = require("npmconf")
+ , types = npmconf.defs.types
+ , ini = require("ini")
config.completion = function (opts, cb) {
var argv = opts.conf.argv.remain
@@ -59,18 +59,17 @@ function config (args, cb) {
}
function edit (cb) {
- var e = ini.get("editor")
- , which = ini.get("global") ? "global" : "user"
- , f = ini.get(which + "config")
+ var e = npm.config.get("editor")
+ , which = npm.config.get("global") ? "global" : "user"
+ , f = npm.config.get(which + "config")
, eol = process.platform === "win32" ? "\r\n" : "\n"
if (!e) return cb(new Error("No EDITOR config or environ set."))
- ini.save(which, function (er) {
+ npm.config.save(which, function (er) {
if (er) return cb(er)
fs.readFile(f, "utf8", function (er, data) {
if (er) data = ""
- dc = dc || require("./utils/config-defs.js").defaults
data = [ ";;;;"
- , "; npm "+(ini.get("global") ?
+ , "; npm "+(npm.config.get("global") ?
"globalconfig" : "userconfig")+" file"
, "; this is a simple ini-formatted file"
, "; lines that start with semi-colons are comments."
@@ -83,8 +82,8 @@ function edit (cb) {
, ";;;;"
]
)
- .concat(Object.keys(dc).map(function (k) {
- return "; " + k + " = " + ini.unParseField(dc[k],k)
+ .concat(Object.keys(npmconf.defaults).map(function (k) {
+ return "; " + k + " = " + npmconf.defaults[k]
}))
.concat([""])
.join(eol)
@@ -94,13 +93,7 @@ function edit (cb) {
, "utf8"
, function (er) {
if (er) return cb(er)
- exec(e, [f], function (er) {
- if (er) return cb(er)
- ini.resolveConfigs(function (er) {
- if (er) return cb(er)
- ini.save(which, cb)
- })
- })
+ exec(e, [f], cb)
}
)
})
@@ -109,8 +102,9 @@ function edit (cb) {
function del (key, cb) {
if (!key) return cb(new Error("no key provided"))
- ini.del(key)
- ini.save(ini.get("global") ? "global" : "user", cb)
+ var where = npm.config.get("global") ? "global" : "user"
+ npm.config.del(key, where)
+ npm.config.save(where, cb)
}
function set (key, val, cb) {
@@ -129,9 +123,9 @@ function set (key, val, cb) {
key = key.trim()
val = val.trim()
log.info("config", "set %j %j", key, val)
- var where = ini.get("global") ? "global" : "user"
- ini.set(key, val, where)
- ini.save(where, cb)
+ var where = npm.config.get("global") ? "global" : "user"
+ npm.config.set(key, val, where)
+ npm.config.save(where, cb)
}
function get (key, cb) {
@@ -151,140 +145,127 @@ function reverse (a, b) {
return a > b ? -1 : 1
}
+function public (k) {
+ return !(k.charAt(0) === "_" || types[k] !== types[k])
+}
+
+function getKeys (data) {
+ return Object.keys(data).filter(public).sort(sort)
+}
+
function list (cb) {
var msg = ""
, long = npm.config.get("long")
- // cli configs.
- // show any that aren't secret
- var cli = ini.configList.list[ini.TRANS.cli]
- , eol = process.platform === "win32" ? "\r\n" : "\n"
- , cliKeys = Object.keys(cli).filter(function (k) {
- return !(k.charAt(0) === "_" || types[k] !== types[k])
- }).sort(function (a, b) {
- return a > b ? 1 : -1
- })
+ var cli = npm.config.sources.cli.data
+ , cliKeys = getKeys(cli)
if (cliKeys.length) {
- msg += "; cli configs" + eol
+ msg += "; cli configs\n"
cliKeys.forEach(function (k) {
if (cli[k] && typeof cli[k] === "object") return
if (k === "argv") return
- msg += k + " = " + JSON.stringify(cli[k]) + eol
+ msg += k + " = " + JSON.stringify(cli[k]) + "\n"
})
- msg += eol
+ msg += "\n"
}
// env configs
- var env = ini.configList.list[ini.TRANS.env]
- , envKeys = Object.keys(env).filter(function (k) {
- return !(k.charAt(0) === "_" || types[k] !== types[k])
- }).sort(function (a, b) {
- return a > b ? 1 : -1
- })
+ var env = npm.config.sources.env.data
+ , envKeys = getKeys(env)
if (envKeys.length) {
- msg += "; environment configs" + eol
+ msg += "; environment configs\n"
envKeys.forEach(function (k) {
- if (env[k] !== ini.get(k)) {
+ if (env[k] !== npm.config.get(k)) {
if (!long) return
msg += "; " + k + " = " + JSON.stringify(env[k])
- + " (overridden)" + eol
- } else msg += k + " = " + JSON.stringify(env[k]) + eol
+ + " (overridden)\n"
+ } else msg += k + " = " + JSON.stringify(env[k]) + "\n"
})
- msg += eol
+ msg += "\n"
}
// user config file
- var uconf = ini.configList.list[ini.TRANS.user]
- , uconfKeys = Object.keys(uconf).filter(function (k) {
- return types[k] === types[k]
- }).sort(function (a, b) {
- return a > b ? 1 : -1
- })
+ var uconf = npm.config.sources.user.data
+ , uconfKeys = getKeys(uconf)
if (uconfKeys.length) {
- msg += "; userconfig " + ini.get("userconfig") + eol
+ msg += "; userconfig " + npm.config.get("userconfig") + "\n"
uconfKeys.forEach(function (k) {
var val = (k.charAt(0) === "_")
? "---sekretz---"
: JSON.stringify(uconf[k])
- if (uconf[k] !== ini.get(k)) {
+ if (uconf[k] !== npm.config.get(k)) {
if (!long) return
msg += "; " + k + " = " + val
- + " (overridden)" + eol
- } else msg += k + " = " + val + eol
+ + " (overridden)\n"
+ } else msg += k + " = " + val + "\n"
})
- msg += eol
+ msg += "\n"
}
// global config file
- var gconf = ini.configList.list[ini.TRANS.global]
- , gconfKeys = Object.keys(gconf).filter(function (k) {
- return types[k] === types[k]
- }).sort(function (a, b) {
- return a > b ? 1 : -1
- })
+ var gconf = npm.config.sources.global.data
+ , gconfKeys = getKeys(gconf)
if (gconfKeys.length) {
- msg += "; globalconfig " + ini.get("globalconfig") + eol
+ msg += "; globalconfig " + npm.config.get("globalconfig") + "\n"
gconfKeys.forEach(function (k) {
var val = (k.charAt(0) === "_")
? "---sekretz---"
: JSON.stringify(gconf[k])
- if (gconf[k] !== ini.get(k)) {
+ if (gconf[k] !== npm.config.get(k)) {
if (!long) return
msg += "; " + k + " = " + val
- + " (overridden)" + eol
- } else msg += k + " = " + val + eol
+ + " (overridden)\n"
+ } else msg += k + " = " + val + "\n"
})
- msg += eol
+ msg += "\n"
}
// builtin config file
- var bconf = ini.configList.list[ini.TRANS.builtin]
- , bconfKeys = Object.keys(bconf).filter(function (k) {
- return types[k] === types[k]
- }).sort(function (a, b) {
- return a > b ? 1 : -1
+ var builtin = npm.config.sources.builtin || {}
+ if (builtin && builtin.data) {
+ var bconf = builtin.data
+ , bpath = builtin.path
+ , bconfKeys = getKeys(bconf)
+ if (bconfKeys.length) {
+ var path = require("path")
+ msg += "; builtin config " + bpath + "\n"
+ bconfKeys.forEach(function (k) {
+ var val = (k.charAt(0) === "_")
+ ? "---sekretz---"
+ : JSON.stringify(bconf[k])
+ if (bconf[k] !== npm.config.get(k)) {
+ if (!long) return
+ msg += "; " + k + " = " + val
+ + " (overridden)\n"
+ } else msg += k + " = " + val + "\n"
})
- if (bconfKeys.length) {
- var path = require("path")
- msg += "; builtin config " + path.resolve(__dirname, "../npmrc") + eol
- bconfKeys.forEach(function (k) {
- var val = (k.charAt(0) === "_")
- ? "---sekretz---"
- : JSON.stringify(bconf[k])
- if (bconf[k] !== ini.get(k)) {
- if (!long) return
- msg += "; " + k + " = " + val
- + " (overridden)" + eol
- } else msg += k + " = " + val + eol
- })
- msg += eol
+ msg += "\n"
+ }
}
// only show defaults if --long
if (!long) {
- msg += "; node install prefix = " + process.installPrefix + eol
- + "; node bin location = " + process.execPath + eol
- + "; cwd = " + process.cwd() + eol
- + "; HOME = " + process.env.HOME + eol
- + "; 'npm config ls -l' to show all defaults." + eol
+ msg += "; node bin location = " + process.execPath + "\n"
+ + "; cwd = " + process.cwd() + "\n"
+ + "; HOME = " + process.env.HOME + "\n"
+ + "; 'npm config ls -l' to show all defaults.\n"
console.log(msg)
return cb()
}
- var defaults = ini.defaultConfig
- , defKeys = Object.keys(defaults)
- msg += "; default values" + eol
+ var defaults = npmconf.defaults
+ , defKeys = getKeys(defaults)
+ msg += "; default values\n"
defKeys.forEach(function (k) {
if (defaults[k] && typeof defaults[k] === "object") return
var val = JSON.stringify(defaults[k])
- if (defaults[k] !== ini.get(k)) {
- if (!long) return
+ if (defaults[k] !== npm.config.get(k)) {
msg += "; " + k + " = " + val
- + " (overridden)" + eol
- } else msg += k + " = " + val + eol
+ + " (overridden)\n"
+ } else msg += k + " = " + val + "\n"
})
- msg += eol
+ msg += "\n"
console.log(msg)
return cb()
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index e5d4b24507..0a321b284a 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -17,7 +17,7 @@ require("path").SPLIT_CHAR = process.platform === "win32" ? "\\" : "/"
var EventEmitter = require("events").EventEmitter
, npm = module.exports = new EventEmitter
, config = require("./config.js")
- , ini = require("./utils/ini.js")
+ , npmconf = require("npmconf")
, log = require("npmlog")
, fs = require("graceful-fs")
, path = require("path")
@@ -31,6 +31,8 @@ var EventEmitter = require("events").EventEmitter
, chain = slide.chain
, RegClient = require("npm-registry-client")
+npm.config = {loaded: false}
+
// /usr/local is often a read-only fs, which is not
// well handled by node or mkdirp. Just double-check
// in the case of errors when making the prefix dirs.
@@ -223,11 +225,10 @@ function loadCb (er) {
loadListeners.length = 0
}
-
-npm.load = function (conf, cb_) {
- if (!cb_ && typeof conf === "function") cb_ = conf , conf = {}
+npm.load = function (cli, cb_) {
+ if (!cb_ && typeof cli === "function") cb_ = cli , cli = {}
if (!cb_) cb_ = function () {}
- if (!conf) conf = {}
+ if (!cli) cli = {}
loadListeners.push(cb_)
if (loaded || loadErr) return cb(loadErr)
if (loading) return
@@ -236,6 +237,7 @@ npm.load = function (conf, cb_) {
function cb (er) {
if (loadErr) return
+ npm.config.loaded = true
loaded = true
loadCb(loadErr = er)
if (onload = onload && npm.config.get("onload-script")) {
@@ -246,11 +248,10 @@ npm.load = function (conf, cb_) {
log.pause()
- load(npm, conf, cb)
+ load(npm, cli, cb)
}
-
-function load (npm, conf, cb) {
+function load (npm, cli, cb) {
which(process.argv[0], function (er, node) {
if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) {
log.verbose("node symlink", node)
@@ -261,12 +262,16 @@ function load (npm, conf, cb) {
// look up configs
//console.error("about to look up configs")
- ini.resolveConfigs(conf, function (er) {
- var color = npm.config.get("color")
+ npmconf.load(cli, function (er, conf) {
+ if (er === conf) er = null
+
+ npm.config = conf
- log.level = npm.config.get("loglevel")
+ var color = conf.get("color")
+
+ log.level = conf.get("loglevel")
log.heading = "npm"
- log.stream = npm.config.get("logstream")
+ log.stream = conf.get("logstream")
switch (color) {
case "always": log.enableColor(); break
case false: log.disableColor(); break
@@ -294,12 +299,12 @@ function load (npm, conf, cb) {
// at this point the configs are all set.
// go ahead and spin up the registry client.
- var token = npm.config.get("_token")
+ var token = conf.get("_token")
if (typeof token === "string") {
try {
token = JSON.parse(token)
- npm.config.set("_token", token, "user")
- ini.save("user", function () {})
+ conf.set("_token", token, "user")
+ conf.save("user")
} catch (e) { token = null }
}
@@ -329,20 +334,20 @@ function load (npm, conf, cb) {
// save the token cookie in the config file
if (npm.registry.couchLogin) {
npm.registry.couchLogin.tokenSet = function (tok) {
- ini.set("_token", tok, "user")
+ npm.config.set("_token", tok, "user")
// ignore save error. best effort.
- ini.save("user", function () {})
+ npm.config.save("user")
}
}
- var umask = parseInt(conf.umask, 8)
+ var umask = parseInt(cli.umask, 8)
npm.modes = { exec: 0777 & (~umask)
, file: 0666 & (~umask)
, umask: umask }
- chain([ [ loadPrefix, npm, conf ]
- , [ setUser, ini.configList, ini.defaultConfig ]
- , [ loadUid, npm, conf ]
+ chain([ [ loadPrefix, npm, cli ]
+ , [ setUser, conf, conf.root ]
+ , [ loadUid, npm ]
], cb)
})
})
@@ -352,7 +357,7 @@ function loadPrefix (npm, conf, cb) {
// try to guess at a good node_modules location.
var p
, gp
- if (!conf.hasOwnProperty("prefix")) {
+ if (!Object.prototype.hasOwnProperty.call(conf, "prefix")) {
p = process.cwd()
} else {
p = npm.config.get("prefix")
@@ -393,7 +398,7 @@ function loadPrefix (npm, conf, cb) {
}
-function loadUid (npm, conf, cb) {
+function loadUid (npm, cb) {
// if we're not in unsafe-perm mode, then figure out who
// to run stuff as. Do this first, to support `npm update npm -g`
if (!npm.config.get("unsafe-perm")) {
@@ -427,12 +432,6 @@ function setUser (cl, dc, cb) {
}
-npm.config =
- { get : function (key) { return ini.get(key) }
- , set : function (key, val, which) { return ini.set(key, val, which) }
- , del : function (key, val, which) { return ini.del(key, val, which) }
- }
-
Object.defineProperty(npm, "prefix",
{ get : function () {
return npm.config.get("global") ? npm.globalPrefix : npm.localPrefix
@@ -497,7 +496,7 @@ Object.defineProperty(npm, "tmp",
// the better to repl you with
Object.getOwnPropertyNames(npm.commands).forEach(function (n) {
- if (npm.hasOwnProperty(n)) return
+ if (npm.hasOwnProperty(n) || n === "config") return
Object.defineProperty(npm, n, { get: function () {
return function () {
diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js
index 1c103f7e5e..51a9de767b 100644
--- a/deps/npm/lib/publish.js
+++ b/deps/npm/lib/publish.js
@@ -36,9 +36,6 @@ function publish (args, isRetry, cb) {
// the prepublish script, since that gets run when adding a folder
// to the cache.
if (er) return cacheAddPublish(arg, false, isRetry, cb)
-
- data._npmUser = { name: npm.config.get("username")
- , email: npm.config.get("email") }
cacheAddPublish(arg, true, isRetry, cb)
})
}
@@ -71,6 +68,10 @@ function publish_ (arg, data, isRetry, cachedir, cb) {
})
}
+ data._npmVersion = npm.version
+ data._npmUser = { name: npm.config.get("username")
+ , email: npm.config.get("email") }
+
delete data.modules
if (data.private) return cb(new Error
("This package has been marked as private\n"
diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js
index 566bfa143e..68ede5f699 100644
--- a/deps/npm/lib/utils/error-handler.js
+++ b/deps/npm/lib/utils/error-handler.js
@@ -7,14 +7,13 @@ var cbCalled = false
, rm = require("rimraf")
, itWorked = false
, path = require("path")
- , ini = require("./ini.js")
, wroteLogFile = false
, exitCode = 0
process.on("exit", function (code) {
// console.error("exit", code)
- if (!ini.resolved) return
+ if (!npm.config.loaded) return
if (code) itWorked = false
if (itWorked) log.info("ok")
else {
@@ -71,7 +70,7 @@ function exit (code, noLog) {
function errorHandler (er) {
var printStack = false
// console.error("errorHandler", er)
- if (!ini.resolved) {
+ if (!npm.config.loaded) {
// logging won't work unless we pretend that it's ready
er = er || new Error("Exit prior to config file resolving.")
console.error(er.stack || er.message)
diff --git a/deps/npm/lib/utils/ini.js b/deps/npm/lib/utils/ini.js
deleted file mode 100644
index 3bbffb09c6..0000000000
--- a/deps/npm/lib/utils/ini.js
+++ /dev/null
@@ -1,352 +0,0 @@
-// Create a chain of config objects, in this priority order:
-//
-// CLI - the --foo things in the command line.
-// ENV - all the things starting with npm_config_ in the environment
-// USER - $HOME/.npmrc
-// GLOBAL - $PREFIX/etc/npmrc
-//
-// If the CLI or ENV specify a userconfig, then that file is used
-// as the USER config.
-//
-// If the CLI or ENV specify a globalconfig, then that file is used
-// as the GLOBAL config.
-//
-// export npm_config_userconfig=/some/other/file
-// export npm_config_globalconfig=global
-//
-// For implementation reasons, "_" in env vars is turned into "-". So,
-// export npm_config_node_version
-
-exports.resolveConfigs = resolveConfigs
-exports.save = save
-exports.saveConfig = saveConfig
-exports.del = del
-exports.get = get
-exports.set = set
-exports.unParseField = unParseField
-exports.defaultConfig = null
-
-Object.defineProperty(exports, "keys",
- { get : function () { return configList.keys }})
-
-var fs = require("graceful-fs")
- , fstream = require("fstream")
- , rimraf = require("rimraf")
- , path = require("path")
- , nopt = require("nopt")
- , ini = require("ini")
- , ProtoList = require("proto-list")
- , mkdir = require("mkdirp")
- , npm = require("../npm.js")
-
- , log = require("npmlog")
- , configDefs = require("./config-defs.js")
-
- , myUid = process.env.SUDO_UID !== undefined
- ? process.env.SUDO_UID : (process.getuid && process.getuid())
- , myGid = process.env.SUDO_GID !== undefined
- ? process.env.SUDO_GID : (process.getgid && process.getgid())
-
- , eol = process.platform === "win32" ? "\r\n" : "\n"
- , privateKey = null
- , defaultConfig
- , configList = new ProtoList()
- , types = configDefs.types
-
- , TRANS = exports.TRANS =
- { "default" : 5
- , "builtin": 4
- , "global" : 3
- , "user" : 2
- , "env" : 1
- , "cli" : 0
- }
-
-exports.configList = configList
-
-// just put this here for a moment, so that the logs
-// in the config-loading phase don't cause it to blow up.
-
-function resolveConfigs (cli, cb_) {
- defaultConfig = defaultConfig || configDefs.defaults
- exports.defaultConfig = defaultConfig
- configList.pop()
- configList.push(defaultConfig)
- var cl = configList
- , dc = cl.pop()
- if (!cb_) cb_ = cli, cli = {}
-
- function cb (er) {
- //console.error("resolving configs")
- exports.resolved = true
- cb_(er)
- }
-
- cl.list.length = 0
- Object.keys(cli).forEach(function (k) {
- cli[k] = parseField(cli[k], k)
- })
- cl.push(cli)
- cl.push(parseEnv(process.env))
-
- parseFile(cl.get("userconfig") || dc.userconfig, function (er, conf) {
- if (er) return cb(er)
- cl.push(conf)
-
- // globalconfig and globalignorefile defaults
- // need to respond to the "prefix" setting up to this point.
- // Eg, `npm config get globalconfig --prefix ~/local` should
- // return `~/local/etc/npmrc`
- if (cl.get("prefix")) {
- dc.globalconfig = path.resolve(cl.get("prefix"), "etc", "npmrc")
- dc.globalignorefile = path.resolve(cl.get("prefix"), "etc", "npmignore")
- }
-
- parseFile( cl.get("globalconfig") || dc.globalconfig
- , function (er, conf) {
- if (er) return cb(er)
-
- if (conf.hasOwnProperty("prefix")) {
- log.warn( "globalconfig"
- , "Cannot set prefix in globalconfig file"
- , cl.get("globalconfig"))
- delete conf.prefix
- }
-
- cl.push(conf)
- // the builtin config file, for distros to use.
-
- parseFile(path.resolve(__dirname, "../../npmrc"), function (er, conf) {
- if (er) conf = {}
- cl.push(conf)
- cl.push(dc)
- validate(cl)
- cb()
- })
- })
- })
-}
-
-function validate (cl) {
- // warn about invalid configs at every level.
- cl.list.forEach(function (conf, level) {
- // clean(data, types, typeDefs)
- nopt.clean(conf, configDefs.types)
- })
-}
-
-
-function parseEnv (env) {
- var conf = {}
- Object.keys(env)
- .filter(function (k) { return k.match(/^npm_config_[^_]/i) })
- .forEach(function (k) {
- if (!env[k]) return
-
- conf[k.replace(/^npm_config_/i, "")
- .toLowerCase()
- .replace(/_/g, "-")] = parseField(env[k], k)
- })
- return conf
-}
-
-function unParseField (f, k) {
- // type can be an array or single thing.
- var isPath = -1 !== [].concat(types[k]).indexOf(path)
- if (isPath) {
- if (typeof process.env.HOME !== 'undefined') {
- if (process.env.HOME.substr(-1) === "/") {
- process.env.HOME = process.env.HOME.slice(0, process.env.HOME.length-1)
- }
- if (f.indexOf(process.env.HOME) === 0) {
- f = "~"+f.substr(process.env.HOME.length)
- }
- }
- }
- return (!f || typeof f !== "object") ? ini.safe(f) : f
- return ini.safe(f)
-}
-
-function parseField (f, k, emptyIsFalse) {
- if (typeof f !== "string" && !(f instanceof String)) return f
- // type can be an array or single thing.
- var isPath = -1 !== [].concat(types[k]).indexOf(path)
- , isBool = -1 !== [].concat(types[k]).indexOf(Boolean)
- , isString = -1 !== [].concat(types[k]).indexOf(String)
- f = ini.unsafe((""+f).trim())
- if (isBool && !isString && f === "") return f = true
- switch (f) {
- case "true": return true
- case "false": return false
- case "null": return null
- case "undefined": return undefined
- }
-
- f = envReplace(f)
-
- if (isPath) {
- var homePattern = process.platform === "win32" ? /^~(\/|\\)/ : /^~\//
- if (f.match(homePattern) && process.env.HOME) {
- f = path.resolve(process.env.HOME, f.substr(2))
- }
- f = path.resolve(f)
- }
-
- return f
-}
-
-function parseFile (file, cb) {
- if (!file) return cb(null, {})
- log.verbose("config file", file)
- fs.readFile(file, function (er, data) {
- // treat all errors as just an empty file
- if (er) return cb(null, {})
- var d = ini.parse(""+data)
- , f = {}
- Object.keys(d).forEach(function (k) {
- f[k] = parseField(d[k], k)
- })
- cb(null, parseAuth(f))
- })
-}
-
-function encryptAuth (config, cb) {
- if (config.username && config._password) {
- var b = new Buffer(config.username+":"+config._password)
- config._auth = b.toString("base64")
- }
- delete config.username
- delete config._password
- return cb(null, config)
-}
-
-function parseAuth (config) {
- if (!config._auth) return config
- var b = new Buffer(config._auth, "base64")
- , unpw = b.toString().split(":")
- , un = unpw.shift()
- , pw = unpw.join(":")
- config.username = un = (config.username || un)
- config._password = pw = (config._password || pw)
- b = new Buffer(un + ":" + pw)
- config._auth = b.toString("base64")
- return config
-}
-
-function save (which, cb) {
- if (typeof which === "function") cb = which, which = null
- if (!which) which = ["global", "user", "builtin"]
- if (!Array.isArray(which)) which = [which]
- var errState = null
- , done = which.length
- , failed = []
- which.forEach(function (c) {
- saveConfig(c, function (er) {
- if (errState) return
- if (er) return cb(errState = er)
- if (-- done === 0) return cb()
- })
- })
-}
-
-function saveConfig (which, file, cb) {
- if (typeof file === "function") cb = file, file = null
- if (!file) {
- switch (which) {
- case "builtin":
- file = path.resolve(__dirname, "../../npmrc")
- break
- case "global":
- file = configList.get("globalconfig")
- break
- default:
- file = configList.get("userconfig")
- which = "user"
- }
- }
-
- saveConfigfile
- ( file
- , configList.list[TRANS[which]]
- , which
- , cb )
-}
-
-function saveConfigfile (file, config, which, cb) {
- encryptAuth(config, function () { // ignore errors
- var data = {}
- Object.keys(config).forEach(function (k) {
- data[k] = unParseField(config[k], k)
- })
- data = ini.stringify(data)
- return (data.trim())
- ? writeConfigfile(file, data, which, cb)
- : rimraf(file, cb)
- })
-}
-
-function writeConfigfile (configfile, data, which, cb) {
- data = data.split(/\r*\n/).join(eol)
- var props = { type: "File", path: configfile }
- if (which === "user") {
- props.mode = 0600
- if (typeof myUid === "number") {
- props.uid = +myUid
- props.gid = +myGid
- }
- } else {
- props.mode = 0644
- }
- fstream.Writer(props)
- .on("close", cb)
- .on("error", cb)
- .end(data)
-}
-
-function snapshot (which) {
- var x = (!which) ? configList.snapshot
- : configList.list[TRANS[which]] ? configList.list[TRANS[which]]
- : undefined
- if (!x) return
- Object.keys(x).forEach(function (k) { if (k.match(/^_/)) delete x[k] })
- return x
-}
-function get (key, which) {
- return (!key) ? snapshot(which)
- : (!which) ? configList.get(key) // resolved
- : configList.list[TRANS[which]]
- ? envReplace(configList.list[TRANS[which]][key])
- : undefined
-}
-
-function envReplace (f) {
- if (typeof f !== "string" || !f) return f
-
- // replace any ${ENV} values with the appropriate environ.
- var envExpr = /(\\*)\$\{([^}]+)\}/g
- return f.replace(envExpr, function (orig, esc, name, i, s) {
- esc = esc.length && esc.length % 2
- if (esc) return orig
- if (undefined === process.env[name]) {
- throw new Error("Failed to replace env in config: "+orig)
- }
- return process.env[name]
- })
-}
-
-function del (key, which) {
- if (!which) configList.list.forEach(function (l) {
- delete l[key]
- })
- else if (configList.list[TRANS[which]]) {
- delete configList.list[TRANS[which]]
- }
-}
-function set (key, value, which) {
- which = which || "cli"
- if (configList.length === 1) {
- return new Error("trying to set before loading")
- }
- configList.list[TRANS[which]][key] = value
- return value
-}
diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js
index 1d5815ac5a..2ddf02df0f 100644
--- a/deps/npm/lib/utils/lifecycle.js
+++ b/deps/npm/lib/utils/lifecycle.js
@@ -78,6 +78,10 @@ function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) {
// the bundled one will be used for installing things.
pathArr.unshift(path.join(__dirname, "..", "..", "bin", "node-gyp-bin"))
+ // add the directory containing the `node` executable currently running, so
+ // that any lifecycle script that invoke "node" will execute this same one.
+ pathArr.unshift(path.dirname(process.execPath))
+
if (env[PATH]) pathArr.push(env[PATH])
env[PATH] = pathArr.join(process.platform === "win32" ? ";" : ":")
@@ -238,8 +242,7 @@ function makeEnv (data, prefix, env) {
prefix = "npm_config_"
var pkgConfig = {}
- , ini = require("./ini.js")
- , keys = ini.keys
+ , keys = npm.config.keys
, pkgVerConfig = {}
, namePref = data.name + ":"
, verPref = data.name + "@" + data.version + ":"
@@ -248,7 +251,7 @@ function makeEnv (data, prefix, env) {
if (i.charAt(0) === "_" && i.indexOf("_"+namePref) !== 0) {
return
}
- var value = ini.get(i)
+ var value = npm.config.get(i)
if (value instanceof Stream) return
if (!value) value = ""
else if (typeof value !== "string") value = JSON.stringify(value)
diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js
index a1edf85755..fb00e21d3c 100644
--- a/deps/npm/lib/version.js
+++ b/deps/npm/lib/version.js
@@ -20,8 +20,26 @@ version.usage = "npm version [<newversion> | major | minor | patch | build]\n"
function version (args, silent, cb_) {
if (typeof cb_ !== "function") cb_ = silent, silent = false
- if (args.length !== 1) return cb_(version.usage)
+ if (args.length > 1) return cb_(version.usage)
fs.readFile(path.join(process.cwd(), "package.json"), function (er, data) {
+ if (!args.length) {
+ var v = {}
+ Object.keys(process.versions).forEach(function (k) {
+ v[k] = process.versions[k]
+ })
+ v.npm = npm.version
+ try {
+ data = JSON.parse(data.toString())
+ } catch (er) {
+ data = null
+ }
+ if (data && data.name && data.version) {
+ v[data.name] = data.version
+ }
+ console.log(v)
+ return cb_()
+ }
+
if (er) {
log.error("version", "No package.json found")
return cb_(er)
diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js
index 9b34df3bf2..bdfd48165b 100644
--- a/deps/npm/lib/view.js
+++ b/deps/npm/lib/view.js
@@ -41,7 +41,6 @@ view.completion = function (opts, cb) {
var npm = require("./npm.js")
, registry = npm.registry
- , ini = require("ini")
, log = require("npmlog")
, util = require("util")
, semver = require("semver")
diff --git a/deps/npm/man/man1/README.1 b/deps/npm/man/man1/README.1
index 4d4fa06a78..4fec26e57a 100644
--- a/deps/npm/man/man1/README.1
+++ b/deps/npm/man/man1/README.1
@@ -36,69 +36,19 @@ If you want a more fancy pants install (a different version, customized
paths, etc\.) then read on\.
.
.SH "Fancy Install (Unix)"
-To install npm with one command, do this:
-.
-.IP "" 4
-.
-.nf
-curl http://npmjs\.org/install\.sh | sh
-.
-.fi
-.
-.IP "" 0
-.
-.P
-To skip the npm 0\.x cleanup, do this:
-.
-.IP "" 4
-.
-.nf
-curl http://npmjs\.org/install\.sh | clean=no sh
-.
-.fi
-.
-.IP "" 0
-.
-.P
-To say "yes" to the 0\.x cleanup, but skip the prompt:
-.
-.IP "" 4
-.
-.nf
-curl http://npmjs\.org/install\.sh | clean=yes sh
-.
-.fi
-.
-.IP "" 0
-.
-.P
-If you get permission errors, you\'ll need to \fBrun\fR the script as root\.
-(Note, just putting \fBsudo\fR in front of the \fBcurl\fR will \fBfetch\fR the script
-as root\.)
+There\'s a pretty robust install script at \fIhttps://npmjs\.org/install\.sh\fR\|\. You can download that and run it\.
.
.SS "Slightly Fancier"
You can set any npm configuration params with that script:
.
-.IP "" 4
-.
-.nf
-curl http://npmjs\.org/install\.sh | npm_config_prefix=/some/path sh
-.
-.fi
-.
-.IP "" 0
+.P
+npm\fIconfig\fRprefix=/some/path sh install\.sh
.
.P
Or, you can run it in uber\-debuggery mode:
.
-.IP "" 4
-.
-.nf
-curl http://npmjs\.org/install\.sh | npm_debug=1 sh
-.
-.fi
-.
-.IP "" 0
+.P
+npm_debug=1 sh install\.sh
.
.SS "Even Fancier"
Get the code with git\. Use \fBmake\fR to build the docs and do other stuff\.
@@ -121,36 +71,6 @@ git, and mess with it directly\.
.SH "Installing on Cygwin"
No\.
.
-.SH "Dev Install"
-To install the latest \fBunstable\fR development version from git:
-.
-.IP "" 4
-.
-.nf
-git clone https://github\.com/isaacs/npm\.git
-cd npm
-sudo make install # (or: `node cli\.js install \-gf`)
-.
-.fi
-.
-.IP "" 0
-.
-.P
-If you\'re sitting in the code folder reading this document in your
-terminal, then you\'ve already got the code\. Just do:
-.
-.IP "" 4
-.
-.nf
-sudo make install
-.
-.fi
-.
-.IP "" 0
-.
-.P
-and npm will install itself\.
-.
.SH "Permissions when Using npm to Install Other Stuff"
\fBtl;dr\fR
.
@@ -258,6 +178,16 @@ you have chosen\.
If you would like to use npm programmatically, you can do that\.
It\'s not very well documented, but it \fIis\fR rather simple\.
.
+.P
+Most of the time, unless you actually want to do all the things that
+npm does, you should try using one of npm\'s dependencies rather than
+using npm itself, if possible\.
+.
+.P
+Eventually, npm will be just a thin cli wrapper around the modules
+that it depends on, but for now, there are some things that you must
+use npm itself to do\.
+.
.IP "" 4
.
.nf
diff --git a/deps/npm/man/man1/list.1 b/deps/npm/man/man1/list.1
index 6c2834ce37..65db45c02a 100644
--- a/deps/npm/man/man1/list.1
+++ b/deps/npm/man/man1/list.1
@@ -29,7 +29,7 @@ For example, running \fBnpm ls promzard\fR in npm\'s source tree will show:
.IP "" 4
.
.nf
-npm@1.1.48 /path/to/npm
+npm@1.1.49 /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 914077d780..522d451aa2 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.1.48
+1.1.49
.
.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 e6443fc204..cdbccc90cd 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.1.48
+1.1.49
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
diff --git a/deps/npm/node_modules/couch-login/couch-login.js b/deps/npm/node_modules/couch-login/couch-login.js
index ac159cb69f..cd7b12c143 100644
--- a/deps/npm/node_modules/couch-login/couch-login.js
+++ b/deps/npm/node_modules/couch-login/couch-login.js
@@ -20,6 +20,7 @@ function CouchLogin (couch, tok) {
if (tok === 'anonymous') tok = NaN
this.token = tok
this.couch = url.format(couch)
+ this.proxy = null
this.maxAge = YEAR
}
@@ -99,6 +100,9 @@ function makeReq (meth, body, f) { return function madeReq (p, d, cb) {
if (this.token) {
h.cookie = 'AuthSession=' + this.token.AuthSession
}
+ if (this.proxy) {
+ req.proxy = this.proxy
+ }
request(req, function (er, res, data) {
// update cookie.
diff --git a/deps/npm/node_modules/couch-login/package.json b/deps/npm/node_modules/couch-login/package.json
index 9ec49ed46d..a485486a8f 100644
--- a/deps/npm/node_modules/couch-login/package.json
+++ b/deps/npm/node_modules/couch-login/package.json
@@ -6,7 +6,7 @@
},
"name": "couch-login",
"description": "A module for doing logged-in requests to a couchdb server",
- "version": "0.1.8",
+ "version": "0.1.9",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/couch-login.git"
@@ -22,6 +22,6 @@
"tap": "~0.2.4"
},
"readme": "# couch-login\n\nThis module lets you log into couchdb to get a session token, then make\nrequests using that session. It is basically just a thin wrapper around\n[@mikeal's request module](https://github.com/mikeal/request).\n\nThis is handy if you want a user to take actions in a couchdb database\non behalf of a user, without having to store their couchdb username and\npassword anywhere. (You do need to store the AuthSession token\nsomewhere, though.)\n\n## Usage\n\n```javascript\nvar CouchLogin = require('couch-login')\n\n// Nothing about this module is http-server specific of course.\n// You could also use it to do authenticated requests against\n// a couchdb using sessions and storing the token somewhere else.\n\nhttp.createServer(function (req, res) {\n var couch = new CouchLogin('http://my-couch.iriscouch.com:5984/')\n\n // .. look up the token in the user's session or whatever ..\n // Look at couch.decorate(req, res) for more on doing that\n // automatically, below.\n\n if (sessionToken) {\n // this user already logged in.\n couch.token = sessionToken\n\n // now we can do things on their behalf, like:\n // 1. View their session info.\n // like doing request.get({ uri: couch + '/_session', ... })\n // but with the cookie and whatnot\n\n couch.get('/_session', function (er, resp, data) {\n // er = some kind of communication error.\n // resp = response object from the couchdb request.\n // data = parsed JSON response body.\n if (er || resp.statusCode !== 200) {\n res.statusCode = resp.statusCode || 403\n return res.end('Invalid login or something')\n }\n\n // now we have the session info, we know who this user is.\n // hitting couchdb for this on every request is kinda costly,\n // so maybe you should store the username wherever you're storing\n // the sessionToken. RedSess is a good util for this, if you're\n // into redis. And if you're not into redis, you're crazy,\n // because it is awesome.\n\n // now let's get the user record.\n // note that this will 404 for anyone other than the user,\n // unless they're a server admin.\n couch.get('/_users/org.couchdb.user:' + data.userCtx.name, etc)\n\n // PUTs and DELETEs will also use their session, of course, so\n // your validate_doc_update's will see their info in userCtx\n })\n\n } else {\n // don't have a sessionToken.\n // get a username and password from the post body or something.\n // maybe redirect to a /login page or something to ask for that.\n var login = { name: name, password: password }\n couch.login(login, function (er, resp, data) {\n // again, er is an error, resp is the response obj, data is the json\n if (er || resp.statusCode !== 200) {\n res.statusCode = resp.statusCode || 403\n return res.end('Invalid login or something')\n }\n\n // the data is something like\n // {\"ok\":true,\"name\":\"testuser\",\"roles\":[]}\n // and couch.token is the token you'll need to save somewhere.\n\n // at this point, you can start making authenticated requests to\n // couchdb, or save data in their session, or do whatever it is\n // that you need to do.\n\n res.statusCode = 200\n res.write(\"Who's got two thumbs and just logged you into couch?\\n\")\n setTimeout(function () {\n res.end(\"THIS GUY!\")\n }, 500)\n })\n }\n})\n```\n\n## Class: CouchLogin\n### new CouchLogin(couchdbUrl, token)\n\nCreate a new CouchLogin object bound to the couchdb url.\n\nIn addition to these, the `get`, `post`, `put`, and `del` methods all\nproxy to the associated method on [request](https://github.com/mikeal/request).\n\nHowever, as you'll note in the example above, only the pathname portion\nof the url is required. Urls will be appended to the couchdb url passed\ninto the constructor.\n\nIf you have to talk to more than one couchdb, then you'll need more than\none CouchLogin object, for somewhat obvious reasons.\n\nAll callbacks get called with the following arguments, which are exactly\nidentical to the arguments passed to a `request` callback.\n\n* `er` {Error | null} Set if a communication error happens.\n* `resp` {HTTP Response} The response from the request to couchdb\n* `data` {Object} The parsed JSON data from couch\n\nIf the token is the string \"anonymous\", then it will not attempt to log\nin before making requests. If the token is not \"anonymous\", then it\nmust be an object with the appropriate fields.\n\n### couch.token\n\n* {Object}\n\nAn object representing the couchdb session token. (Basically just a\ncookie and a timeout.)\n\nIf the token has already timed out, then setting it will have no effect.\n\n### couch.tokenSet\n\nIf set, this method is called whenever the token is saved.\n\nFor example, you could assign a function to this method to save the\ntoken into a redis session, a cookie, or in some other database.\n\nTakes a callback which should be called when the token is saved.\n\n### couch.tokenGet\n\nIf set, this method is called to look up the token on demand.\n\nThe inverse of couch.tokenSet. Takes a callback which is called with\nthe `cb(er || null, token)`.\n\n### couch.tokenDel\n\nIf set, this method is called to delete the token when it should be\ndiscarded.\n\nRelated to tokenGet and tokenSet. Takes a callback which should be\ncalled when the token is deleted.\n\n### couch.anonymous()\n\nReturn a new CouchLogin object that points at the same couchdb server,\nbut doesn't try to log in before making requests.\n\nThis is handy for situations where the user is not logged in at the\nmoment, but a request needs to be made anyway, and does not require\nauthorization.\n\n### couch.login(auth, callback)\n\n* `auth` {Object} The login details\n * `name` {String}\n * `password` {String}\n* `callback` {Function}\n\nWhen the callback is called, the `couch.token` will already have been\nset (assuming it worked!), so subsequent requests will be done as that\nuser.\n\n### couch.get(path, callback)\n\nGET the supplied path from the couchdb using the credentials on the\ntoken.\n\nFails if the token is invalid or expired.\n\n### couch.del(path, callback)\n\nDELETE the supplied path from the couchdb using the credentials on the\ntoken.\n\nFails if the token is invalid or expired.\n\n### couch.post(path, data, callback)\n\nPOST the data to the supplied path in the couchdb, using the credentials\non the token.\n\nFails if the token is invalid or expired.\n\n### couch.put(path, data, callback)\n\nPUT the data to the supplied path in the couchdb, using the credentials\non the token.\n\nFails if the token is invalid or expired.\n\n### couch.changePass(newAuth, callback)\n\nMust already be logged in. Updates the `_users` document with new salt\nand hash, and re-logs in with the new credentials. Callback is called\nwith the same arguments as login, or the first step of the process that\nfailed.\n\n### couch.signup(userData, callback)\n\nCreate a new user account. The userData must contain at least a `name`\nand `password` field. Any additional data will be copied to the user\nrecord. The `_id`, `name`, `roles`, `type`, `password_sha`, `salt`, and\n`date` fields are generated.\n\nAlso signs in as the newly created user, on successful account creation.\n\n### couch.deleteAccount(name, callback)\n\nDeletes a user account. If not logged in as the user, or a server\nadmin, then the request will fail.\n\nNote that this immediately invalidates any session tokens for the\ndeleted user account. If you are deleting the user's record, then you\nought to follow this with `couch.logout(callback)` so that it won't try\nto re-use the invalid session.\n\n### couch.logout(callback)\n\nDelete the session out of couchdb. This makes the token permanently\ninvalid, and deletes it.\n\n### couch.decorate(req, res)\n\nSet up `req.couch` and `res.couch` as references to this couch login\ninstance.\n\nAdditionall, if `req.session` or `res.session` is set, then it'll call\n`session.get('couch_token', cb)` as the tokenGet method,\n`session.set('couch_token', token, cb)` as the tokenSet method, and\n`session.del('couch_token', cb)` as the tokenDel method.\n\nThis works really nice with\n[RedSess](https://github.com/isaacs/redsess).\n",
- "_id": "couch-login@0.1.8",
- "_from": "couch-login@~0.1.6"
+ "_id": "couch-login@0.1.9",
+ "_from": "couch-login@latest"
}
diff --git a/deps/npm/node_modules/glob/glob.js b/deps/npm/node_modules/glob/glob.js
index 6285962a91..f58c4bbb34 100644
--- a/deps/npm/node_modules/glob/glob.js
+++ b/deps/npm/node_modules/glob/glob.js
@@ -178,7 +178,7 @@ Glob.prototype._finish = function () {
if (this.nonull) {
var literal = this.minimatch.globSet[i]
if (nou) all.push(literal)
- else nou[literal] = true
+ else all[literal] = true
}
} else {
// had matches
diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json
index e7415c2dd1..d2ab0125f9 100644
--- a/deps/npm/node_modules/glob/package.json
+++ b/deps/npm/node_modules/glob/package.json
@@ -6,7 +6,7 @@
},
"name": "glob",
"description": "a little globber",
- "version": "3.1.11",
+ "version": "3.1.12",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
@@ -30,6 +30,6 @@
},
"license": "BSD",
"readme": "# Glob\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options]\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the statCache object is reused between glob calls.\n\nUsers are thus advised not to use a glob result as a\nguarantee of filesystem state in the face of rapid changes.\nFor the vast majority of operations, this is never a problem.\n",
- "_id": "glob@3.1.11",
+ "_id": "glob@3.1.12",
"_from": "glob@~3.1.9"
}
diff --git a/deps/npm/node_modules/ini/ini.js b/deps/npm/node_modules/ini/ini.js
index e8a949f944..7939f20e5c 100644
--- a/deps/npm/node_modules/ini/ini.js
+++ b/deps/npm/node_modules/ini/ini.js
@@ -5,6 +5,8 @@ exports.stringify = exports.encode = encode
exports.safe = safe
exports.unsafe = unsafe
+var eol = process.platform === "win32" ? "\r\n" : "\n"
+
function encode (obj, section) {
var children = []
, out = ""
@@ -14,18 +16,19 @@ function encode (obj, section) {
if (val && typeof val === "object") {
children.push(k)
} else {
- out += safe(k) + " = " + safe(val) + "\n"
+ out += safe(k) + " = " + safe(val) + eol
}
})
if (section && out.length) {
- out = "[" + safe(section) + "]" + "\n" + out
+ out = "[" + safe(section) + "]" + eol + out
}
children.forEach(function (k, _, __) {
- var child = encode(obj[k], (section ? section + "." : "") + k)
+ var nk = dotSplit(k).join('\\.')
+ var child = encode(obj[k], (section ? section + "." : "") + nk)
if (out.length && child.length) {
- out += "\n"
+ out += eol
}
out += child
})
@@ -33,6 +36,15 @@ function encode (obj, section) {
return out
}
+function dotSplit (str) {
+ return str.replace(/\1/g, '\2LITERAL\\1LITERAL\2')
+ .replace(/\\\./g, '\1')
+ .split(/\./).map(function (part) {
+ return part.replace(/\1/g, '\\.')
+ .replace(/\2LITERAL\\1LITERAL\2/g, '\1')
+ })
+}
+
function decode (str) {
var out = {}
, p = out
@@ -57,6 +69,11 @@ function decode (str) {
}
var key = unsafe(match[2])
, value = match[3] ? unsafe((match[4] || "")) : true
+ switch (value) {
+ case 'true':
+ case 'false':
+ case 'null': value = JSON.parse(value)
+ }
p[key] = value
})
@@ -66,15 +83,16 @@ function decode (str) {
if (!out[k] || typeof out[k] !== "object") return false
// see if the parent section is also an object.
// if so, add it to that, and mark this one for deletion
- var parts = k.split(".")
+ var parts = dotSplit(k)
, p = out
, l = parts.pop()
+ , nl = l.replace(/\\\./g, '.')
parts.forEach(function (part, _, __) {
if (!p[part] || typeof p[part] !== "object") p[part] = {}
p = p[part]
})
- if (p === out) return false
- p[l] = out[k]
+ if (p === out && nl === l) return false
+ p[nl] = out[k]
return true
}).forEach(function (del, _, __) {
delete out[del]
diff --git a/deps/npm/node_modules/ini/package.json b/deps/npm/node_modules/ini/package.json
index a022b598ff..1ab1488972 100644
--- a/deps/npm/node_modules/ini/package.json
+++ b/deps/npm/node_modules/ini/package.json
@@ -1,15 +1,19 @@
{
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
"name": "ini",
"description": "An ini encoder/decoder for node",
- "version": "1.0.2",
+ "version": "1.0.4",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/ini.git"
},
"main": "ini.js",
"scripts": {
- "test": "node ini.js"
+ "test": "tap test/*.js"
},
"engines": {
"node": "*"
@@ -18,7 +22,7 @@
"devDependencies": {
"tap": "~0.0.9"
},
- "scripts": {
- "test": "tap test/*.js"
- }
+ "readme": "An ini format parser and serializer for node.\n\nSections are treated as nested objects. Items before the first heading\nare saved on the object directly.\n\n## Usage\n\nConsider an ini-file `config.ini` that looks like this:\n\n ; this comment is being ignored\n scope = global\n\n [database]\n user = dbuser\n password = dbpassword\n database = use_this_database\n\n [paths.default]\n datadir = /var/lib/data\n\nYou can read, manipulate and write the ini-file like so:\n\n var fs = require('fs')\n , ini = require('ini')\n\n var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))\n\n config.scope = 'local'\n config.database.database = 'use_another_database'\n config.paths.default.tmpdir = '/tmp'\n delete config.paths.default.datadir\n\n fs.writeFileSync('./config_modified.ini', ini.stringify(config, 'section'))\n\nThis will result in a file called `config_modified.ini` being written to the filesystem with the following content:\n\n [section]\n scope = local\n [section.database]\n user = dbuser\n password = dbpassword\n database = use_another_database\n [section.paths.default]\n tmpdir = /tmp\n\n## API\n\n### decode(inistring)\nDecode the ini-style formatted `inistring` into a nested object.\n\n### parse(inistring)\nAlias for `decode(inistring)`\n\n### encode(object, [section])\nEncode the object `object` into an ini-style formatted string. If the optional parameter `section` is given, then all top-level properties of the object are put into this section and the `section`-string is prepended to all sub-sections, see the usage example above.\n\n### stringify(object, [section])\nAlias for `encode(object, [section])`\n\n### safe(val)\nEscapes the string `val` such that it is safe to be used as a key or value in an ini-file. Basically escapes quotes. For example\n\n ini.safe('\"unsafe string\"')\n\nwould result in\n\n \"\\\"unsafe string\\\"\"\n\n### unsafe(val)\nUnescapes the string `val`\n\n",
+ "_id": "ini@1.0.4",
+ "_from": "ini@latest"
}
diff --git a/deps/npm/node_modules/ini/test/bar.js b/deps/npm/node_modules/ini/test/bar.js
new file mode 100644
index 0000000000..cb16176efa
--- /dev/null
+++ b/deps/npm/node_modules/ini/test/bar.js
@@ -0,0 +1,23 @@
+//test that parse(stringify(obj) deepEqu
+
+var ini = require('../')
+var test = require('tap').test
+
+var data = {
+ 'number': {count: 10},
+ 'string': {drink: 'white russian'},
+ 'boolean': {isTrue: true},
+ 'nested boolean': {theDude: {abides: true, rugCount: 1}}
+}
+
+
+test('parse(stringify(x)) deepEqual x', function (t) {
+
+ for (var k in data) {
+ var s = ini.stringify(data[k])
+ console.log(s, data[k])
+ t.deepEqual(ini.parse(s), data[k])
+ }
+
+ t.end()
+})
diff --git a/deps/npm/node_modules/ini/test/fixtures/foo.ini b/deps/npm/node_modules/ini/test/fixtures/foo.ini
new file mode 100644
index 0000000000..e5b186604e
--- /dev/null
+++ b/deps/npm/node_modules/ini/test/fixtures/foo.ini
@@ -0,0 +1,29 @@
+o = p
+
+ a with spaces = b c
+
+; wrap in quotes to JSON-decode and preserve spaces
+" xa n p " = "\"\r\nyoyoyo\r\r\n"
+
+; wrap in quotes to get a key with a bracket, not a section.
+"[disturbing]" = hey you never know
+
+; a section
+[a]
+av = a val
+e = { o: p, a: { av: a val, b: { c: { e: "this [value]" } } } }
+j = "{ o: "p", a: { av: "a val", b: { c: { e: "this [value]" } } } }"
+"[]" = a square?
+
+; nested child without middle parent
+; should create otherwise-empty a.b
+[a.b.c]
+e = 1
+j = 2
+
+; dots in the section name should be literally interpreted
+[x\.y\.z]
+x.y.z = xyz
+
+[x\.y\.z.a\.b\.c]
+a.b.c = abc
diff --git a/deps/npm/node_modules/ini/test/foo.js b/deps/npm/node_modules/ini/test/foo.js
new file mode 100644
index 0000000000..2b32bb62f6
--- /dev/null
+++ b/deps/npm/node_modules/ini/test/foo.js
@@ -0,0 +1,59 @@
+var i = require("../")
+ , tap = require("tap")
+ , test = tap.test
+ , fs = require("fs")
+ , path = require("path")
+ , fixture = path.resolve(__dirname, "./fixtures/foo.ini")
+ , data = fs.readFileSync(fixture, "utf8")
+ , d
+ , expectE = 'o = p\n'
+ + 'a with spaces = b c\n'
+ + '" xa n p " = "\\"\\r\\nyoyoyo\\r\\r\\n"\n'
+ + '"[disturbing]" = hey you never know\n'
+ + '\n'
+ + '[a]\n'
+ + 'av = a val\n'
+ + 'e = { o: p, a: '
+ + '{ av: a val, b: { c: { e: "this [value]" '
+ + '} } } }\nj = "\\"{ o: \\"p\\", a: { av:'
+ + ' \\"a val\\", b: { c: { e: \\"this [value]'
+ + '\\" } } } }\\""\n"[]" = a square?\n\n[a.b.c]\ne = 1\n'
+ + 'j = 2\n\n[x\\.y\\.z]\nx.y.z = xyz\n\n'
+ + '[x\\.y\\.z.a\\.b\\.c]\n'
+ + 'a.b.c = abc\n'
+ , expectD =
+ { o: 'p',
+ 'a with spaces': 'b c',
+ " xa n p ":'"\r\nyoyoyo\r\r\n',
+ '[disturbing]': 'hey you never know',
+ a:
+ { av: 'a val',
+ e: '{ o: p, a: { av: a val, b: { c: { e: "this [value]" } } } }',
+ j: '"{ o: "p", a: { av: "a val", b: { c: { e: "this [value]" } } } }"',
+ "[]": "a square?",
+ b: { c: { e: '1', j: '2' } } },
+ 'x.y.z': {
+ 'x.y.z': 'xyz',
+ 'a.b.c': {
+ 'a.b.c': 'abc'
+ }
+ }
+ }
+
+test("decode from file", function (t) {
+ var d = i.decode(data)
+ t.deepEqual(d, expectD)
+ t.end()
+})
+
+test("encode from data", function (t) {
+ var e = i.encode(expectD)
+ t.deepEqual(e, expectE)
+
+ var obj = {log: { type:'file', level: {label:'debug', value:10} } }
+ e = i.encode(obj)
+ t.notEqual(e.slice(0, 1), '\n', 'Never a blank first line')
+ t.notEqual(e.slice(-2), '\n\n', 'Never a blank final line')
+
+ t.end()
+})
diff --git a/deps/npm/node_modules/lru-cache/README.md b/deps/npm/node_modules/lru-cache/README.md
index 7033fea892..8ea0dd963d 100644
--- a/deps/npm/node_modules/lru-cache/README.md
+++ b/deps/npm/node_modules/lru-cache/README.md
@@ -2,32 +2,45 @@
A cache object that deletes the least-recently-used items.
-Usage:
+## Usage:
- var LRU = require("lru-cache")
- , cache = LRU(10, // max length. default = Infinity
+```javascript
+var LRU = require("lru-cache")
+ , options = { max: 500
+ , length: function (n) { return n * 2 }
+ , dispose: function (key, n) { n.close() }
+ , maxAge: 1000 * 60 * 60 }
+ , cache = LRU(options)
+ , otherCache = LRU(50) // sets just the max size
- // calculate how "big" each item is
- //
- // defaults to function(){return 1}, ie, just limit
- // the item count, without any knowledge as to their
- // relative size.
- function (item) { return item.length },
+cache.set("key", "value")
+cache.get("key") // "value"
- // maxAge in ms
- // defaults to infinite
- // items are not pre-emptively pruned, but they
- // are deleted when fetched if they're too old.
- 1000 * 60)
-
- cache.set("key", "value")
- cache.get("key") // "value"
-
- cache.reset() // empty the cache
+cache.reset() // empty the cache
+```
If you put more stuff in it, then items will fall out.
If you try to put an oversized thing in it, then it'll fall out right
away.
-RTFS for more info.
+## Options
+
+* `max` The maximum number of items. Not setting this is kind of
+ silly, since that's the whole purpose of this lib, but it defaults
+ to `Infinity`.
+* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
+ as they age, but if you try to get an item that is too old, it'll
+ drop it and return undefined instead of giving it to you.
+* `length` Function that is used to calculate the length of stored
+ items. If you're storing strings or buffers, then you probably want
+ to do something like `function(n){return n.length}`. The default is
+ `function(n){return 1}`, which is fine if you want to store `n`
+ like-sized things.
+* `dispose` Function that is called on items when they are dropped
+ from the cache. This can be handy if you want to close file
+ descriptors or do other cleanup tasks when items are no longer
+ accessible. Called with `key, value`. It's called *before*
+ actually removing the item from the internal cache, so if you want
+ to immediately put it back in, you'll have to do that in a
+ `nextTick` or `setTimeout` callback or it won't do anything.
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 407ee6857c..27a9a5e93b 100644
--- a/deps/npm/node_modules/lru-cache/lib/lru-cache.js
+++ b/deps/npm/node_modules/lru-cache/lib/lru-cache.js
@@ -13,18 +13,32 @@ function hOP (obj, key) {
function naiveLength () { return 1 }
-function LRUCache (maxLength, lengthCalculator, maxAge) {
+function LRUCache (options) {
if (!(this instanceof LRUCache)) {
- return new LRUCache(maxLength, lengthCalculator)
+ return new LRUCache(options)
}
+ var max
+ if (typeof options === 'number') {
+ max = options
+ options = {max: max}
+ }
+ max = options.max
+
+ if (!options) options = {}
+
+ var lengthCalculator = options.length || naiveLength
+
if (typeof lengthCalculator !== "function") {
lengthCalculator = naiveLength
}
- if (!maxLength || !(typeof maxLength === "number") || maxLength <= 0 ) {
- maxLength = Infinity
+ if (!max || !(typeof max === "number") || max <= 0 ) {
+ max = Infinity
}
+ var maxAge = options.maxAge || null
+
+ var dispose = options.dispose
var cache = {} // hash of items by key
, lruList = {} // list of items in order of use recency
@@ -34,16 +48,16 @@ function LRUCache (maxLength, lengthCalculator, maxAge) {
, itemCount = 0
- // resize the cache when the maxLength changes.
- Object.defineProperty(this, "maxLength",
+ // resize the cache when the max changes.
+ Object.defineProperty(this, "max",
{ set : function (mL) {
if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity
- maxLength = mL
- // if it gets above double maxLength, trim right away.
+ max = mL
+ // if it gets above double max, trim right away.
// otherwise, do it whenever it's convenient.
- if (length > maxLength) trim()
+ if (length > max) trim()
}
- , get : function () { return maxLength }
+ , get : function () { return max }
, enumerable : true
})
@@ -65,7 +79,7 @@ function LRUCache (maxLength, lengthCalculator, maxAge) {
})
}
- if (length > maxLength) trim()
+ if (length > max) trim()
}
, get : function () { return lengthCalculator }
, enumerable : true
@@ -83,6 +97,11 @@ function LRUCache (maxLength, lengthCalculator, maxAge) {
})
this.reset = function () {
+ if (dispose) {
+ Object.keys(cache).forEach(function (k) {
+ dispose(k, cache[k].value)
+ })
+ }
cache = {}
lruList = {}
lru = 0
@@ -99,29 +118,37 @@ function LRUCache (maxLength, lengthCalculator, maxAge) {
this.set = function (key, value) {
if (hOP(cache, key)) {
- this.get(key)
+ // dispose of the old one before overwriting
+ if (dispose) dispose(key, cache[key].value)
+ if (maxAge) cache[key].now = Date.now()
cache[key].value = value
+ this.get(key)
return true
}
- var hit = {key:key, value:value, lu:mru++, length:lengthCalculator(value)}
- if (maxAge) hit.now = Date.now()
+ var hit = {
+ key:key,
+ value:value,
+ lu:mru++,
+ length:lengthCalculator(value),
+ now: (maxAge) ? Date.now() : 0
+ }
// oversized objects fall out of cache automatically.
- if (hit.length > maxLength) return false
+ if (hit.length > max) return false
length += hit.length
lruList[hit.lu] = cache[key] = hit
itemCount ++
- if (length > maxLength) trim()
+ if (length > max) trim()
return true
}
this.get = function (key) {
if (!hOP(cache, key)) return
var hit = cache[key]
- if (maxAge && Date.now() - hit.now > maxAge) {
+ if (maxAge && (Date.now() - hit.now > maxAge)) {
this.del(key)
return
}
@@ -135,6 +162,7 @@ function LRUCache (maxLength, lengthCalculator, maxAge) {
this.del = function (key) {
if (!hOP(cache, key)) return
var hit = cache[key]
+ if (dispose) dispose(key, hit.value)
delete cache[key]
delete lruList[hit.lu]
if (hit.lu === lru) lruWalk()
@@ -148,11 +176,13 @@ function LRUCache (maxLength, lengthCalculator, maxAge) {
}
function trim () {
- if (length <= maxLength) return
+ if (length <= max) return
var prune = Object.keys(lruList)
- for (var i = 0; i < prune.length && length > maxLength; i ++) {
- length -= lruList[prune[i]].length
- delete cache[ lruList[prune[i]].key ]
+ for (var i = 0; i < prune.length && length > max; i ++) {
+ var hit = lruList[prune[i]]
+ if (dispose) dispose(hit.key, hit.value)
+ length -= hit.length
+ delete cache[ hit.key ]
delete lruList[prune[i]]
}
diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json
index 73c011b72e..e2457f720c 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": "1.1.1",
+ "version": "2.0.1",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me"
@@ -47,7 +47,10 @@
"email": "marco.rogers@gmail.com"
}
],
- "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\nUsage:\n\n var LRU = require(\"lru-cache\")\n , cache = LRU(10, // max length. default = Infinity\n\n // calculate how \"big\" each item is\n //\n // defaults to function(){return 1}, ie, just limit\n // the item count, without any knowledge as to their\n // relative size.\n function (item) { return item.length },\n\n // maxAge in ms\n // defaults to infinite\n // items are not pre-emptively pruned, but they\n // are deleted when fetched if they're too old.\n 1000 * 60)\n\n cache.set(\"key\", \"value\")\n cache.get(\"key\") // \"value\"\n\n cache.reset() // empty the cache\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\nRTFS for more info.\n",
- "_id": "lru-cache@1.1.1",
- "_from": "lru-cache@~1.1.0"
+ "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 number of items. 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",
+ "_id": "lru-cache@2.0.1",
+ "dist": {
+ "shasum": "8cbbcca2f72b07e18510cb1451073cd4afab0826"
+ },
+ "_from": "lru-cache@2.0.1"
}
diff --git a/deps/npm/node_modules/lru-cache/test/basic.js b/deps/npm/node_modules/lru-cache/test/basic.js
index c5b25de8b4..d04af0bbcb 100644
--- a/deps/npm/node_modules/lru-cache/test/basic.js
+++ b/deps/npm/node_modules/lru-cache/test/basic.js
@@ -2,12 +2,12 @@ var test = require("tap").test
, LRU = require("../")
test("basic", function (t) {
- var cache = new LRU(10)
+ var cache = new LRU({max: 10})
cache.set("key", "value")
t.equal(cache.get("key"), "value")
t.equal(cache.get("nada"), undefined)
t.equal(cache.length, 1)
- t.equal(cache.maxLength, 10)
+ t.equal(cache.max, 10)
t.end()
})
@@ -42,17 +42,17 @@ test("del", function (t) {
t.end()
})
-test("maxLength", function (t) {
+test("max", function (t) {
var cache = new LRU(3)
- // test changing the maxLength, verify that the LRU items get dropped.
- cache.maxLength = 100
+ // test changing the max, verify that the LRU items get dropped.
+ cache.max = 100
for (var i = 0; i < 100; i ++) cache.set(i, i)
t.equal(cache.length, 100)
for (var i = 0; i < 100; i ++) {
t.equal(cache.get(i), i)
}
- cache.maxLength = 3
+ cache.max = 3
t.equal(cache.length, 3)
for (var i = 0; i < 97; i ++) {
t.equal(cache.get(i), undefined)
@@ -61,15 +61,15 @@ test("maxLength", function (t) {
t.equal(cache.get(i), i)
}
- // now remove the maxLength restriction, and try again.
- cache.maxLength = "hello"
+ // now remove the max restriction, and try again.
+ cache.max = "hello"
for (var i = 0; i < 100; i ++) cache.set(i, i)
t.equal(cache.length, 100)
for (var i = 0; i < 100; i ++) {
t.equal(cache.get(i), i)
}
// should trigger an immediate resize
- cache.maxLength = 3
+ cache.max = 3
t.equal(cache.length, 3)
for (var i = 0; i < 97; i ++) {
t.equal(cache.get(i), undefined)
@@ -86,7 +86,7 @@ test("reset", function (t) {
cache.set("b", "B")
cache.reset()
t.equal(cache.length, 0)
- t.equal(cache.maxLength, 10)
+ t.equal(cache.max, 10)
t.equal(cache.get("a"), undefined)
t.equal(cache.get("b"), undefined)
t.end()
@@ -119,20 +119,26 @@ test("dump", function (t) {
test("basic with weighed length", function (t) {
- var cache = new LRU(100, function (item) { return item.size } )
+ var cache = new LRU({
+ max: 100,
+ length: function (item) { return item.size }
+ })
cache.set("key", {val: "value", size: 50})
t.equal(cache.get("key").val, "value")
t.equal(cache.get("nada"), undefined)
t.equal(cache.lengthCalculator(cache.get("key")), 50)
t.equal(cache.length, 50)
- t.equal(cache.maxLength, 100)
+ t.equal(cache.max, 100)
t.end()
})
test("weighed length item too large", function (t) {
- var cache = new LRU(10, function (item) { return item.size } )
- t.equal(cache.maxLength, 10)
+ var cache = new LRU({
+ max: 10,
+ length: function (item) { return item.size }
+ })
+ t.equal(cache.max, 10)
// should fall out immediately
cache.set("key", {val: "value", size: 50})
@@ -143,7 +149,10 @@ test("weighed length item too large", function (t) {
})
test("least recently set with weighed length", function (t) {
- var cache = new LRU(8, function (item) { return item.length })
+ var cache = new LRU({
+ max:8,
+ length: function (item) { return item.length }
+ })
cache.set("a", "A")
cache.set("b", "BB")
cache.set("c", "CCC")
@@ -156,7 +165,10 @@ test("least recently set with weighed length", function (t) {
})
test("lru recently gotten with weighed length", function (t) {
- var cache = new LRU(8, function (item) { return item.length })
+ var cache = new LRU({
+ max: 8,
+ length: function (item) { return item.length }
+ })
cache.set("a", "A")
cache.set("b", "BB")
cache.set("c", "CCC")
@@ -171,10 +183,14 @@ test("lru recently gotten with weighed length", function (t) {
})
test("set returns proper booleans", function(t) {
- var cache = new LRU(5, function (item) { return item.length })
+ var cache = new LRU({
+ max: 5,
+ length: function (item) { return item.length }
+ })
+
t.equal(cache.set("a", "A"), true)
- // should return false for maxLength exceeded
+ // should return false for max exceeded
t.equal(cache.set("b", "donuts"), false)
t.equal(cache.set("b", "B"), true)
@@ -183,7 +199,10 @@ test("set returns proper booleans", function(t) {
})
test("drop the old items", function(t) {
- var cache = new LRU(5, null, 50)
+ var cache = new LRU({
+ max: 5,
+ maxAge: 50
+ })
cache.set("a", "A")
@@ -196,7 +215,7 @@ test("drop the old items", function(t) {
cache.set("c", "C")
// timed out
t.notOk(cache.get("a"))
- }, 51)
+ }, 60)
setTimeout(function () {
t.notOk(cache.get("b"))
@@ -208,3 +227,22 @@ test("drop the old items", function(t) {
t.end()
}, 155)
})
+
+test("disposal function", function(t) {
+ var disposed = false
+ var cache = new LRU({
+ max: 1,
+ dispose: function (k, n) {
+ disposed = n
+ }
+ })
+
+ cache.set(1, 1)
+ cache.set(2, 2)
+ t.equal(disposed, 1)
+ cache.set(3, 3)
+ t.equal(disposed, 2)
+ cache.reset()
+ t.equal(disposed, 3)
+ t.end()
+})
diff --git a/deps/npm/node_modules/minimatch/minimatch.js b/deps/npm/node_modules/minimatch/minimatch.js
index 00873594b5..a2221ee10d 100644
--- a/deps/npm/node_modules/minimatch/minimatch.js
+++ b/deps/npm/node_modules/minimatch/minimatch.js
@@ -30,7 +30,7 @@ if (!require) {
minimatch.Minimatch = Minimatch
var LRU = require("lru-cache")
- , cache = minimatch.cache = new LRU(100)
+ , cache = minimatch.cache = new LRU({max: 100})
, GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
var path = require("path")
diff --git a/deps/npm/node_modules/minimatch/package.json b/deps/npm/node_modules/minimatch/package.json
index 2f24186031..6f182773d5 100644
--- a/deps/npm/node_modules/minimatch/package.json
+++ b/deps/npm/node_modules/minimatch/package.json
@@ -6,7 +6,7 @@
},
"name": "minimatch",
"description": "a glob matcher in javascript",
- "version": "0.2.5",
+ "version": "0.2.6",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/minimatch.git"
@@ -19,26 +19,16 @@
"node": "*"
},
"dependencies": {
- "lru-cache": "~1"
+ "lru-cache": "~2.0.0"
},
"devDependencies": {
"tap": ""
},
- "licenses": [
- {
- "type": "MIT",
- "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
- }
- ],
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
+ "license": {
+ "type": "MIT",
+ "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
},
- "_id": "minimatch@0.2.5",
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.25",
- "_nodeVersion": "v0.7.10-pre",
- "_defaultsLoaded": true,
+ "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",
+ "_id": "minimatch@0.2.6",
"_from": "minimatch@~0.2"
}
diff --git a/deps/npm/node_modules/node-gyp/addon.gypi b/deps/npm/node_modules/node-gyp/addon.gypi
new file mode 100644
index 0000000000..89e71c0c50
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/addon.gypi
@@ -0,0 +1,24 @@
+{
+ 'target_defaults': {
+ 'type': 'loadable_module',
+ 'product_extension': 'node',
+ 'product_prefix': '',
+ 'include_dirs': [
+ '<(node_root_dir)/src',
+ '<(node_root_dir)/deps/uv/include',
+ '<(node_root_dir)/deps/v8/include'
+ ],
+
+ 'conditions': [
+ [ 'OS=="mac"', {
+ 'libraries': [ '-undefined dynamic_lookup' ],
+ }],
+ [ 'OS=="win"', {
+ 'libraries': [ '-l<(node_root_dir)/$(Configuration)/node.lib' ],
+ }],
+ [ 'OS=="freebsd" or OS=="openbsd" or OS=="solaris" or (OS=="linux" and target_arch!="ia32")', {
+ 'cflags': [ '-fPIC' ],
+ }]
+ ]
+ }
+}
diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js
index fcd8d7149f..2e1ac504e3 100644
--- a/deps/npm/node_modules/node-gyp/lib/configure.js
+++ b/deps/npm/node_modules/node-gyp/lib/configure.js
@@ -13,11 +13,10 @@ var fs = require('graceful-fs')
, which = require('which')
, semver = require('semver')
, mkdirp = require('mkdirp')
- , exec = require('child_process').exec
- , spawn = require('child_process').spawn
+ , cp = require('child_process')
+ , exec = cp.exec
+ , spawn = cp.spawn
, win = process.platform == 'win32'
- , hasVCExpress = false
- , hasWin71SDK = false
exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module'
@@ -25,6 +24,8 @@ function configure (gyp, argv, callback) {
var python = process.env.PYTHON || gyp.opts.python || 'python'
, buildDir = path.resolve('build')
+ , hasVCExpress = false
+ , hasWin71SDK = false
, configPath
, nodeDir
@@ -38,28 +39,30 @@ function configure (gyp, argv, callback) {
checkPython()
}
})
- } else
+ } else {
checkPython()
+ }
- // Make sure that Python is in the $PATH
+ // Check if Python is in the $PATH
function checkPython () {
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)
if (win) {
guessPython()
} else {
failNoPython()
}
- return
+ } else {
+ log.verbose('`which` succeeded for `%s`', python, execPath)
+ checkPythonVersion()
}
- log.verbose('`which` succeeded for `' + python + '`', execPath)
- checkPythonVersion()
})
}
// Called on Windows when "python" isn't available in the current $PATH.
- // We're gonna glob C:\python2*
+ // We're gonna check if "%SystemDrive%\python27\python.exe" exists.
function guessPython () {
log.verbose('could not find "' + python + '". guessing location')
var rootDir = process.env.SystemDrive || 'C:\\'
@@ -273,22 +276,19 @@ function configure (gyp, argv, callback) {
var prefix = '# Do not edit. File was generated by node-gyp\'s "configure" step'
, json = JSON.stringify(config, boolsToString, 2)
log.verbose(configFilename, 'writing out config file: %s', configPath)
- fs.writeFile(configPath, [prefix, json, ''].join('\n'), runGypAddon)
+ fs.writeFile(configPath, [prefix, json, ''].join('\n'), runGyp)
}
- function runGypAddon (err) {
+ function runGyp (err) {
if (err) return callback(err)
- // location of the `gyp_addon` python script for the target nodedir
- var gyp_addon = path.resolve(nodeDir, 'tools', 'gyp_addon')
-
if (!~argv.indexOf('-f') && !~argv.indexOf('--format')) {
if (win) {
- log.verbose('gyp_addon', 'gyp format was not specified; forcing "msvs"')
+ log.verbose('gyp', 'gyp format was not specified; forcing "msvs"')
// force the 'make' target for non-Windows
argv.push('-f', 'msvs')
} else {
- log.verbose('gyp_addon', 'gyp format was not specified; forcing "make"')
+ log.verbose('gyp', 'gyp format was not specified; forcing "make"')
// force the 'make' target for non-Windows
argv.push('-f', 'make')
}
@@ -309,25 +309,49 @@ function configure (gyp, argv, callback) {
}
// include the "config.gypi" file that was generated
- argv.unshift('-I' + configPath)
+ argv.push('-I', configPath)
+
+ // this logic ported from the old `gyp_addon` python file
+ var gyp_script = path.resolve(nodeDir, 'tools', 'gyp', 'gyp')
+ var addon_gypi = path.resolve(__dirname, '..', 'addon.gypi')
+ var common_gypi = path.resolve(nodeDir, 'common.gypi')
+ var output_dir = 'build'
+ if (win) {
+ // Windows expects an absolute path
+ output_dir = buildDir
+ }
+
+ argv.push('-I', addon_gypi)
+ argv.push('-I', common_gypi)
+ argv.push('-Dlibrary=shared_library')
+ argv.push('-Dvisibility=default')
+ argv.push('-Dnode_root_dir=' + nodeDir)
+ argv.push('-Dmodule_root_dir=' + process.cwd())
+ argv.push('--depth=.');
+
+ // tell gyp to write the Makefile/Solution files into output_dir
+ argv.push('--generator-output', output_dir)
+
+ // tell make to write its output into the same dir
+ argv.push('-Goutput_dir=.')
// enforce use of the "binding.gyp" file
argv.unshift('binding.gyp')
- // execute `gyp_addon` from the current target nodedir
- argv.unshift(gyp_addon)
+ // execute `gyp` from the current target nodedir
+ argv.unshift(gyp_script)
var cp = gyp.spawn(python, argv)
cp.on('exit', onCpExit)
}
/**
- * Called when the `gyp_addon` child process exits.
+ * Called when the `gyp` child process exits.
*/
function onCpExit (code, signal) {
if (code !== 0) {
- callback(new Error('`gyp_addon` failed with exit code: ' + code))
+ callback(new Error('`gyp` failed with exit code: ' + code))
} else {
// we're done
callback()
diff --git a/deps/npm/node_modules/node-gyp/lib/install.js b/deps/npm/node_modules/node-gyp/lib/install.js
index a23735f076..f90b0fd091 100644
--- a/deps/npm/node_modules/node-gyp/lib/install.js
+++ b/deps/npm/node_modules/node-gyp/lib/install.js
@@ -116,6 +116,7 @@ function install (gyp, argv, callback) {
function download (url) {
log.http('GET', url)
+ var req = null
var requestOpts = {
uri: url
}
@@ -126,13 +127,25 @@ function install (gyp, argv, callback) {
|| process.env.HTTP_PROXY
|| process.env.npm_config_proxy
if (proxyUrl) {
- log.verbose('proxy', proxyUrl)
- requestOpts.proxy = proxyUrl
+ if (/^https?:\/\//i.test(proxyUrl)) {
+ log.verbose('download', 'using proxy url: "%s"', proxyUrl)
+ requestOpts.proxy = proxyUrl
+ } else {
+ log.warn('download', 'ignoring invalid "proxy" config setting: "%s"', proxyUrl)
+ }
+ }
+ try {
+ // The "request" constructor can throw sometimes apparently :(
+ // See: https://github.com/TooTallNate/node-gyp/issues/114
+ req = request(requestOpts)
+ } catch (e) {
+ cb(e)
+ }
+ if (req) {
+ req.on('response', function (res) {
+ log.http(res.statusCode, url)
+ })
}
- var req = request(requestOpts)
- req.on('response', function (res) {
- log.http(res.statusCode, url)
- })
return req
}
@@ -201,6 +214,7 @@ function install (gyp, argv, callback) {
// download the tarball, gunzip and extract!
var req = download(tarballUrl)
+ if (!req) return
// something went wrong downloading the tarball?
req.on('error', function (err) {
@@ -307,6 +321,7 @@ function install (gyp, argv, callback) {
log.verbose('streaming 32-bit node.lib to:', nodeLibPath32)
var req = download(nodeLibUrl32)
+ if (!req) return
req.on('error', done)
req.on('response', function (res) {
if (res.statusCode !== 200) {
@@ -327,6 +342,7 @@ function install (gyp, argv, callback) {
log.verbose('streaming 64-bit node.lib to:', nodeLibPath64)
var req = download(nodeLibUrl64)
+ if (!req) return
req.on('error', done)
req.on('response', function (res) {
if (res.statusCode !== 200) {
diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json
index c2db8f8e7a..7fa75a8985 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.6.3",
+ "version": "0.6.5",
"installVersion": 9,
"author": {
"name": "Nathan Rajlich",
@@ -45,6 +45,6 @@
"node": ">= 0.6.0"
},
"readme": "node-gyp\n=========\n### Node.js native addon build tool\n\n`node-gyp` is a cross-platform command-line tool written in Node.js for compiling\nnative addon modules for Node.js, which takes away the pain of dealing with the\nvarious differences in build platforms. It is the replacement to the `node-waf`\nprogram which is removed for node `v0.8`. If you have a native addon for node that\nstill has a `wscript` file, then you should definitely add a `binding.gyp` file\nto support the latest versions of node.\n\nMultiple target versions of node are supported (i.e. `0.6`, `0.7`,..., `1.0`,\netc.), regardless of what version of node is actually installed on your system\n(`node-gyp` downloads the necessary development files for the target version).\n\n#### Features:\n\n * Easy to use, consistent interface\n * Same commands to build your module on every platform\n * Supports multiple target versions of Node\n\n\nInstallation\n------------\n\nYou can install with `npm`:\n\n``` bash\n$ npm install -g node-gyp\n```\n\nYou will also need to install:\n\n * On Unix:\n * `python`\n * `make`\n * A proper C/C++ compiler toolchain, like GCC\n * On Windows:\n * [Python][windows-python] ([`v2.7.2`][windows-python-v2.7.2] recommended, `v3.x.x` not yet supported)\n * Microsoft Visual C++ ([Express][msvc] version works well)\n * For 64-bit builds of node and native modules you will _also_ need the [Windows 7 64-bit SDK][win7sdk]\n\nHow to Use\n----------\n\nTo compile your native addon, first go to its root directory:\n\n``` bash\n$ cd my_node_addon\n```\n\nThe next step is to generate the appropriate project build files for the current\nplatform. Use `configure` for that:\n\n``` bash\n$ node-gyp configure\n```\n\n__Note__: The `configure` step looks for the `binding.gyp` file in the current\ndirectory to processs. See below for instructions on creating the `binding.gyp` file.\n\nNow you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file\n(on Windows) in the `build/` directory. Next invoke the `build` command:\n\n``` bash\n$ node-gyp build\n```\n\nNow you have your compiled `.node` bindings file! The compiled bindings end up\nin `build/Debug/` or `build/Release/`, depending on the build mode. At this point\nyou can require the `.node` file with Node and run your tests!\n\n__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or\n`-d`) switch when running the either `configure` or `build` command.\n\n\nThe \"binding.gyp\" file\n----------------------\n\nPreviously when node had `node-waf` you had to write a `wscript` file. The\nreplacement for that is the `binding.gyp` file, which describes the configuration\nto build your module in a JSON-like format. This file gets placed in the root of\nyour package, alongside the `package.json` file.\n\nA barebones `gyp` file appropriate for building a node addon looks like:\n\n``` json\n{\n \"targets\": [\n {\n \"target_name\": \"binding\",\n \"sources\": [ \"src/binding.cc\" ]\n }\n ]\n}\n```\n\nSome additional resources for writing `gyp` files:\n\n * [\"Hello World\" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world)\n * [gyp user documentation](http://code.google.com/p/gyp/wiki/GypUserDocumentation)\n * [gyp input format reference](http://code.google.com/p/gyp/wiki/InputFormatReference)\n * [*\"binding.gyp\" files out in the wild* wiki page](https://github.com/TooTallNate/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)\n\n\nCommands\n--------\n\n`node-gyp` responds to the following commands:\n\n| **Command** | **Description**\n|:--------------|:---------------------------------------------------------------\n| `build` | Invokes `make`/`msbuild.exe` and builds the native addon\n| `clean` | Removes any the `build` dir if it exists\n| `configure` | Generates project build files for the current platform\n| `rebuild` | Runs \"clean\", \"configure\" and \"build\" all in a row\n| `install` | Installs node development header files for the given version\n| `list` | Lists the currently installed node development file versions\n| `remove` | Removes the node development header files for the given version\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich &lt;nathan@tootallnate.net&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[windows-python]: http://www.python.org/getit/windows\n[windows-python-v2.7.2]: http://www.python.org/download/releases/2.7.2#download\n[msvc]: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express\n[win7sdk]: http://www.microsoft.com/download/en/details.aspx?displayLang=en&id=8279\n",
- "_id": "node-gyp@0.6.3",
- "_from": "node-gyp@~0.6.1"
+ "_id": "node-gyp@0.6.5",
+ "_from": "node-gyp@~0.6.4"
}
diff --git a/deps/npm/node_modules/node-gyp/updateLegacy.sh b/deps/npm/node_modules/node-gyp/updateLegacy.sh
deleted file mode 100755
index 941c699edd..0000000000
--- a/deps/npm/node_modules/node-gyp/updateLegacy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env sh
-
-cp -fpv ~/node/common.gypi legacy/
-cp -fpv ~/node/tools/addon.gypi legacy/tools/
-cp -fpv ~/node/tools/gyp_addon legacy/tools/
-cp -rfpv ~/node/tools/gyp legacy/tools/
-
-# we don't care about gyp's test suite and it's rather big...
-rm -rf legacy/tools/gyp/test
diff --git a/deps/npm/node_modules/npm-registry-client/index.js b/deps/npm/node_modules/npm-registry-client/index.js
index c7bc21efcb..377f787f4e 100644
--- a/deps/npm/node_modules/npm-registry-client/index.js
+++ b/deps/npm/node_modules/npm-registry-client/index.js
@@ -68,6 +68,7 @@ function RegClient (options) {
// session, and use that.
this.token = options.token
this.couchLogin = new CouchLogin(this.registry, this.token)
+ this.couchLogin.proxy = this.proxy
}
this.email = options.email || null
diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json
index 8d73ce2ae1..709027af4c 100644
--- a/deps/npm/node_modules/npm-registry-client/package.json
+++ b/deps/npm/node_modules/npm-registry-client/package.json
@@ -6,7 +6,7 @@
},
"name": "npm-registry-client",
"description": "Client for the npm registry",
- "version": "0.1.3",
+ "version": "0.1.4",
"repository": {
"url": "git://github.com/isaacs/npm-registry-client"
},
@@ -35,6 +35,6 @@
},
"license": "BSD",
"readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(options)\n\nclient.get(\"npm\", \"latest\", 1000, function (er, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Options\n\n* `registry` **Required** {String} URL to the registry\n* `cache` **Required** {String} Path to the cache folder\n* `alwaysAuth` {Boolean} Auth even for GET requests.\n* `auth` {String} A base64-encoded `username:password`\n* `email` {String} User's email address\n* `tag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `ca` {String} Cerficate signing authority certificates to trust.\n* `strictSSL` {Boolean} Whether or not to be strict with SSL\n certificates. Default = `true`\n* `userAgent` {String} User agent header to send. Default =\n `\"node/{process.version}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `retries` {Number} Number of times to retry on GET failures.\n Default=2\n* `retryFactor` {Number} `factor` setting for `node-retry`. Default=10\n* `retryMinTimeout` {Number} `minTimeout` setting for `node-retry`.\n Default=10000 (10 seconds)\n* `retryMaxTimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default=60000 (60 seconds)\n\n# client.request(method, where, [what], [etag], [nofollow], cb)\n\n* `method` {String} HTTP method\n* `where` {String} Path to request on the server\n* `what` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON.\n* `etag` {String} The cached ETag\n* `nofollow` {Boolean} Prevent following 302/301 responses\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a request to the registry. All the other methods are wrappers\naround this. one.\n\n# client.adduser(username, password, email, cb)\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `cb` {Function}\n\nAdd a user account to the registry, or verify the credentials.\n\n# client.get(url, [timeout], [nofollow], [staleOk], cb)\n\n* `url` {String} The url path to fetch\n* `timeout` {Number} Number of seconds old that a cached copy must be\n before a new request will be made.\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `staleOk` {Boolean} If there's cached data available, then return that\n to the callback quickly, and update the cache the background.\n\nFetches data from the registry via a GET request, saving it in\nthe cache folder with the ETag.\n\n# client.publish(data, tarball, [readme], cb)\n\n* `data` {Object} Package data\n* `tarball` {String | Stream} Filename or stream of the package tarball\n* `readme` {String} Contents of the README markdown file\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder. However, it\ncan accept a gzipped tar stream or a filename to a tarball.\n\n# client.star(package, starred, cb)\n\n* `package` {String} Name of the package to star\n* `starred` {Boolean} True to star the package, false to unstar it.\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or\nunstar a package, though other writes do require that the user be the\npackage owner.\n\n# client.tag(project, version, tag, cb)\n\n* `project` {String} Project name\n* `version` {String} Version to tag\n* `tag` {String} Tag name to apply\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag`\nwill fetch the specified version.\n\n# client.unpublish(name, [ver], cb)\n\n* `name` {String} package name\n* `ver` {String} version to unpublish. Leave blank to unpublish all\n versions.\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When\nthe last version us unpublished, the entire document is removed from the\ndatabase.\n\n# client.upload(where, file, [etag], [nofollow], cb)\n\n* `where` {String} URL path to upload to\n* `file` {String | Stream} Either the filename or a readable stream\n* `etag` {String} Cache ETag\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `cb` {Function}\n\nUpload an attachment. Mostly used by `client.publish()`.\n",
- "_id": "npm-registry-client@0.1.3",
- "_from": "npm-registry-client@0"
+ "_id": "npm-registry-client@0.1.4",
+ "_from": "npm-registry-client@latest"
}
diff --git a/deps/npm/node_modules/npmconf/.npmignore b/deps/npm/node_modules/npmconf/.npmignore
new file mode 100644
index 0000000000..baa471ca80
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/.npmignore
@@ -0,0 +1 @@
+/test/fixtures/userconfig-with-gc
diff --git a/deps/npm/node_modules/npmconf/README.md b/deps/npm/node_modules/npmconf/README.md
new file mode 100644
index 0000000000..afc995d1af
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/README.md
@@ -0,0 +1,33 @@
+# npmconf
+
+The config thing npm uses
+
+If you are interested in interacting with the config settings that npm
+uses, then use this module.
+
+However, if you are writing a new Node.js program, and want
+configuration functionality similar to what npm has, but for your
+own thing, then I'd recommend using [rc](https://github.com/dominictarr/rc),
+which is probably what you want.
+
+If I were to do it all over again, that's what I'd do for npm. But,
+alas, there are many systems depending on many of the particulars of
+npm's configuration setup, so it's not worth the cost of changing.
+
+## USAGE
+
+```javascript
+var npmconf = require('npmconf')
+
+// pass in the cli options that you read from the cli
+// or whatever top-level configs you want npm to use for now.
+npmconf.load({some:'configs'}, function (er, conf) {
+ // do stuff with conf
+ conf.get('some', 'cli') // 'configs'
+ conf.get('username') // 'joebobwhatevers'
+ conf.set('foo', 'bar', 'user')
+ conf.save('user', function (er) {
+ // foo = bar is now saved to ~/.npmrc or wherever
+ })
+})
+```
diff --git a/deps/npm/lib/utils/config-defs.js b/deps/npm/node_modules/npmconf/config-defs.js
index 763f5b7312..32c13d5209 100644
--- a/deps/npm/lib/utils/config-defs.js
+++ b/deps/npm/node_modules/npmconf/config-defs.js
@@ -7,10 +7,18 @@ var path = require("path")
, semver = require("semver")
, stableFamily = semver.parse(process.version)
, nopt = require("nopt")
- , log = require("npmlog")
- , npm = require("../npm.js")
, osenv = require("osenv")
+try {
+ var log = require("npmlog")
+} catch (er) {
+ var util = require('util')
+ var log = { warn: function (m) {
+ console.warn(m + util.format.apply(util, [].slice.call(arguments, 1)))
+ } }
+}
+
+exports.Octal = Octal
function Octal () {}
function validateOctal (data, k, val) {
// must be either an integer or an octal string.
@@ -176,7 +184,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
, proxy : process.env.HTTP_PROXY || process.env.http_proxy || null
, "https-proxy" : process.env.HTTPS_PROXY || process.env.https_proxy ||
process.env.HTTP_PROXY || process.env.http_proxy || null
- , "user-agent" : "npm/" + npm.version + " node/" + process.version
+ , "user-agent" : "node/" + process.version
, "rebuild-bundle" : true
, registry : "https://registry.npmjs.org/"
, rollback : true
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/.npmignore b/deps/npm/node_modules/npmconf/node_modules/config-chain/.npmignore
new file mode 100644
index 0000000000..13abef4f58
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/.npmignore
@@ -0,0 +1,3 @@
+node_modules
+node_modules/*
+npm_debug.log
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/LICENCE b/deps/npm/node_modules/npmconf/node_modules/config-chain/LICENCE
new file mode 100644
index 0000000000..171dd97005
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/LICENCE
@@ -0,0 +1,22 @@
+Copyright (c) 2011 Dominic Tarr
+
+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/npmconf/node_modules/config-chain/index.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/index.js
new file mode 100644
index 0000000000..59dabf216b
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/index.js
@@ -0,0 +1,282 @@
+
+var ProtoList = require('proto-list')
+ , path = require('path')
+ , fs = require('fs')
+ , ini = require('ini')
+ , EE = require('events').EventEmitter
+ , url = require('url')
+ , http = require('http')
+
+var exports = module.exports = function () {
+ var args = [].slice.call(arguments)
+ , conf = new ConfigChain()
+
+ while(args.length) {
+ var a = args.shift()
+ if(a) conf.push
+ ( 'string' === typeof a
+ ? json(a)
+ : a )
+ }
+
+ return conf
+}
+
+//recursively find a file...
+
+var find = exports.find = function () {
+ var rel = path.join.apply(null, [].slice.call(arguments))
+
+ function find(start, rel) {
+ var file = path.join(start, rel)
+ try {
+ fs.statSync(file)
+ return file
+ } catch (err) {
+ if(start != '/')
+ return find(path.dirname(start), rel)
+ }
+ }
+ return find(__dirname, rel)
+}
+
+var parse = exports.parse = function (content, file, type) {
+ content = '' + content
+ // if we don't know what it is, try json and fall back to ini
+ // if we know what it is, then it must be that.
+ if (!type) {
+ try { return JSON.parse(content) }
+ catch (er) { return ini.parse(content) }
+ } if (type === 'json') {
+ if (this.emit) {
+ try { return JSON.parse(content) }
+ catch (er) { this.emit('error', er) }
+ } else {
+ return JSON.parse(content)
+ }
+ } else {
+ return ini.parse(content)
+ }
+}
+
+var json = exports.json = function () {
+ var file = path.join.apply(null, [].slice.call(arguments))
+ var content
+ try {
+ content = fs.readFileSync(file,'utf-8')
+ } catch (err) {
+ return
+ }
+ return parse(content, file, 'json')
+}
+
+var env = exports.env = function (prefix, env) {
+ env = env || process.env
+ var obj = {}
+ var l = prefix.length
+ for(var k in env) {
+ if((i =k.indexOf(prefix)) === 0)
+ obj[k.substring(l)] = env[k]
+ }
+
+ return obj
+}
+
+exports.ConfigChain = ConfigChain
+function ConfigChain () {
+ EE.apply(this)
+ ProtoList.apply(this, arguments)
+ this._awaiting = 0
+ this._saving = 0
+ this.sources = {}
+}
+
+// multi-inheritance-ish
+var extras = {
+ constructor: { value: ConfigChain }
+}
+Object.keys(EE.prototype).forEach(function (k) {
+ extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k)
+})
+ConfigChain.prototype = Object.create(ProtoList.prototype, extras)
+
+ConfigChain.prototype.del = function (key, where) {
+ // if not specified where, then delete from the whole chain, scorched
+ // earth style
+ if (where) {
+ var target = this.sources[where]
+ target = target && target.data
+ if (!target) {
+ return this.emit('error', new Error('not found '+where))
+ }
+ delete target[key]
+ } else {
+ for (var i = 0, l = this.list.length; i < l; i ++) {
+ delete this.list[i][key]
+ }
+ }
+ return this
+}
+
+ConfigChain.prototype.set = function (key, value, where) {
+ var target
+
+ if (where) {
+ target = this.sources[where]
+ target = target && target.data
+ if (!target) {
+ return this.emit('error', new Error('not found '+where))
+ }
+ } else {
+ target = this.list[0]
+ if (!target) {
+ return this.emit('error', new Error('cannot set, no confs!'))
+ }
+ }
+ target[key] = value
+ return this
+}
+
+ConfigChain.prototype.get = function (key, where) {
+ if (where) {
+ where = this.sources[where]
+ if (where) where = where.data
+ if (where && where.hasOwnProperty(key)) return where[key]
+ return undefined
+ }
+ return this.list[0][key]
+}
+
+ConfigChain.prototype.save = function (where, type, cb) {
+ if (typeof type === 'function') cb = type, type = null
+ var target = this.sources[where]
+ if (!target || !(target.path || target.source) || !target.data) {
+ // TODO: maybe save() to a url target could be a PUT or something?
+ // would be easy to swap out with a reddis type thing, too
+ return this.emit('error', new Error('bad save target: '+where))
+ }
+
+ if (target.source) {
+ var pref = target.prefix || ''
+ Object.keys(target.data).forEach(function (k) {
+ target.source[pref + k] = target.data[k]
+ })
+ return this
+ }
+
+ var type = type || target.type
+ var data = target.data
+ if (target.type === 'json') {
+ data = JSON.stringify(data)
+ } else {
+ data = ini.stringify(data)
+ }
+
+ this._saving ++
+ fs.writeFile(target.path, data, 'utf8', function (er) {
+ this._saving --
+ if (er) {
+ if (cb) return cb(er)
+ else return this.emit('error', er)
+ }
+ if (this._saving === 0) {
+ if (cb) cb()
+ this.emit('save')
+ }
+ }.bind(this))
+ return this
+}
+
+ConfigChain.prototype.addFile = function (file, type, name) {
+ name = name || file
+ var marker = {__source__:name}
+ this.sources[name] = { path: file, type: type }
+ this.push(marker)
+ this._await()
+ fs.readFile(file, 'utf8', function (er, data) {
+ if (er) this.emit('error', er)
+ this.addString(data, file, type, marker)
+ }.bind(this))
+ return this
+}
+
+ConfigChain.prototype.addEnv = function (prefix, env, name) {
+ name = name || 'env'
+ var data = exports.env(prefix, env)
+ this.sources[name] = { data: data, source: env, prefix: prefix }
+ return this.add(data, name)
+}
+
+ConfigChain.prototype.addUrl = function (req, type, name) {
+ this._await()
+ var href = url.format(req)
+ name = name || href
+ var marker = {__source__:name}
+ this.sources[name] = { href: href, type: type }
+ this.push(marker)
+ http.request(req, function (res) {
+ var c = []
+ var ct = res.headers['content-type']
+ if (!type) {
+ type = ct.indexOf('json') !== -1 ? 'json'
+ : ct.indexOf('ini') !== -1 ? 'ini'
+ : href.match(/\.json$/) ? 'json'
+ : href.match(/\.ini$/) ? 'ini'
+ : null
+ marker.type = type
+ }
+
+ res.on('data', c.push.bind(c))
+ .on('end', function () {
+ this.addString(Buffer.concat(c), href, type, marker)
+ }.bind(this))
+ .on('error', this.emit.bind(this, 'error'))
+
+ }.bind(this))
+ .on('error', this.emit.bind(this, 'error'))
+ .end()
+
+ return this
+}
+
+ConfigChain.prototype.addString = function (data, file, type, marker) {
+ data = this.parse(data, file, type)
+ this.add(data, marker)
+ return this
+}
+
+ConfigChain.prototype.add = function (data, marker) {
+ if (marker && typeof marker === 'object') {
+ var i = this.list.indexOf(marker)
+ if (i === -1) {
+ return this.emit('error', new Error('bad marker'))
+ }
+ this.splice(i, 1, data)
+ marker = marker.__source__
+ this.sources[marker] = this.sources[marker] || {}
+ this.sources[marker].data = data
+ // we were waiting for this. maybe emit 'load'
+ this._resolve()
+ } else {
+ if (typeof marker === 'string') {
+ this.sources[marker] = this.sources[marker] || {}
+ this.sources[marker].data = data
+ }
+ // trigger the load event if nothing was already going to do so.
+ this._await()
+ this.push(data)
+ process.nextTick(this._resolve.bind(this))
+ }
+ return this
+}
+
+ConfigChain.prototype.parse = exports.parse
+
+ConfigChain.prototype._await = function () {
+ this._awaiting++
+}
+
+ConfigChain.prototype._resolve = function () {
+ this._awaiting--
+ if (this._awaiting === 0) this.emit('load', this)
+}
diff --git a/deps/npm/node_modules/proto-list/LICENSE b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE
index 05a4010949..05a4010949 100644
--- a/deps/npm/node_modules/proto-list/LICENSE
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE
diff --git a/deps/npm/node_modules/proto-list/README.md b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md
index 43cfa35893..43cfa35893 100644
--- a/deps/npm/node_modules/proto-list/README.md
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json
new file mode 100644
index 0000000000..98ff78d202
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "proto-list",
+ "version": "1.2.2",
+ "description": "A utility for managing a prototype chain",
+ "main": "./proto-list.js",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/isaacs/proto-list"
+ },
+ "license": {
+ "type": "MIT",
+ "url": "https://github.com/isaacs/proto-list/blob/master/LICENSE"
+ },
+ "devDependencies": {
+ "tap": "0"
+ },
+ "readme": "A list of objects, bound by their prototype chain.\n\nUsed in npm's config stuff.\n",
+ "_id": "proto-list@1.2.2",
+ "_from": "proto-list@~1.2.1"
+}
diff --git a/deps/npm/node_modules/proto-list/proto-list.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js
index 759d827382..67d250387c 100644
--- a/deps/npm/node_modules/proto-list/proto-list.js
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js
@@ -1,7 +1,22 @@
module.exports = ProtoList
-function ProtoList () { this.list = [] }
+function ProtoList () {
+ this.list = []
+ var root = null
+ Object.defineProperty(this, 'root', {
+ get: function () { return root },
+ set: function (r) {
+ root = r
+ if (this.list.length) {
+ this.list[this.list.length - 1].__proto__ = r
+ }
+ },
+ enumerable: true,
+ configurable: true
+ })
+}
+
ProtoList.prototype =
{ get length () { return this.list.length }
, get keys () {
@@ -14,27 +29,30 @@ ProtoList.prototype =
this.keys.forEach(function (k) { o[k] = this.get(k) }, this)
return o
}
+ , get store () {
+ return this.list[0]
+ }
, push : function (obj) {
if (typeof obj !== "object") obj = {valueOf:obj}
if (this.list.length >= 1) {
this.list[this.list.length - 1].__proto__ = obj
}
- obj.__proto__ = Object.prototype
+ obj.__proto__ = this.root
return this.list.push(obj)
}
, pop : function () {
if (this.list.length >= 2) {
- this.list[this.list.length - 2].__proto__ = Object.prototype
+ this.list[this.list.length - 2].__proto__ = this.root
}
return this.list.pop()
}
, unshift : function (obj) {
- obj.__proto__ = this.list[0] || Object.prototype
+ obj.__proto__ = this.list[0] || this.root
return this.list.unshift(obj)
}
, shift : function () {
- if (this.list.length >= 1) {
- this.list[0].__proto__ = Object.prototype
+ if (this.list.length === 1) {
+ this.list[0].__proto__ = this.root
}
return this.list.shift()
}
@@ -53,42 +71,11 @@ ProtoList.prototype =
return this.list.slice.apply(this.list, arguments)
}
, splice : function () {
- return this.list.splice.apply(this.list, arguments)
+ // handle injections
+ var ret = this.list.splice.apply(this.list, arguments)
+ for (var i = 0, l = this.list.length; i < l; i++) {
+ this.list[i].__proto__ = this.list[i + 1] || this.root
+ }
+ return ret
}
}
-
-if (module === require.main) {
-
-var tap = require("tap")
- , test = tap.test
-
-tap.plan(1)
-
-tap.test("protoList tests", function (t) {
- var p = new ProtoList
- p.push({foo:"bar"})
- p.push({})
- p.set("foo", "baz")
- t.equal(p.get("foo"), "baz")
-
- var p = new ProtoList
- p.push({foo:"bar"})
- p.set("foo", "baz")
- t.equal(p.get("foo"), "baz")
- t.equal(p.length, 1)
- p.pop()
- t.equal(p.length, 0)
- p.set("foo", "asdf")
- t.equal(p.length, 1)
- t.equal(p.get("foo"), "asdf")
- p.push({bar:"baz"})
- t.equal(p.length, 2)
- t.equal(p.get("foo"), "asdf")
- p.shift()
- t.equal(p.length, 1)
- t.equal(p.get("foo"), undefined)
- t.end()
-})
-
-
-}
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js
new file mode 100644
index 0000000000..5cd66bef15
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js
@@ -0,0 +1,61 @@
+var tap = require("tap")
+ , test = tap.test
+ , ProtoList = require("../proto-list.js")
+
+tap.plan(1)
+
+tap.test("protoList tests", function (t) {
+ var p = new ProtoList
+ p.push({foo:"bar"})
+ p.push({})
+ p.set("foo", "baz")
+ t.equal(p.get("foo"), "baz")
+
+ var p = new ProtoList
+ p.push({foo:"bar"})
+ p.set("foo", "baz")
+ t.equal(p.get("foo"), "baz")
+ t.equal(p.length, 1)
+ p.pop()
+ t.equal(p.length, 0)
+ p.set("foo", "asdf")
+ t.equal(p.length, 1)
+ t.equal(p.get("foo"), "asdf")
+ p.push({bar:"baz"})
+ t.equal(p.length, 2)
+ t.equal(p.get("foo"), "asdf")
+ p.shift()
+ t.equal(p.length, 1)
+ t.equal(p.get("foo"), undefined)
+
+
+ p.unshift({foo:"blo", bar:"rab"})
+ p.unshift({foo:"boo"})
+ t.equal(p.length, 3)
+ t.equal(p.get("foo"), "boo")
+ t.equal(p.get("bar"), "rab")
+
+ var ret = p.splice(1, 1, {bar:"bar"})
+ t.same(ret, [{foo:"blo", bar:"rab"}])
+ t.equal(p.get("bar"), "bar")
+
+ // should not inherit default object properties
+ t.equal(p.get('hasOwnProperty'), undefined)
+
+ // unless we give it those.
+ p.root = {}
+ t.equal(p.get('hasOwnProperty'), {}.hasOwnProperty)
+
+ p.root = {default:'monkey'}
+ t.equal(p.get('default'), 'monkey')
+
+ p.push({red:'blue'})
+ p.push({red:'blue'})
+ p.push({red:'blue'})
+ while (p.length) {
+ t.equal(p.get('default'), 'monkey')
+ p.shift()
+ }
+
+ t.end()
+})
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/package.json b/deps/npm/node_modules/npmconf/node_modules/config-chain/package.json
new file mode 100644
index 0000000000..379c3d68ca
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "config-chain",
+ "version": "1.1.1",
+ "description": "HANDLE CONFIGURATION ONCE AND FOR ALL",
+ "homepage": "http://github.com/dominictarr/config-chain",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dominictarr/config-chain.git"
+ },
+ "dependencies": {
+ "proto-list": "~1.2.1",
+ "ini": "~1.0.2"
+ },
+ "devDependencies": {
+ "tap": "0.3.0"
+ },
+ "author": {
+ "name": "Dominic Tarr",
+ "email": "dominic.tarr@gmail.com",
+ "url": "http://dominictarr.com"
+ },
+ "scripts": {
+ "test": "tap test/"
+ },
+ "readme": "#config-chain\n\nUSE THIS MODULE TO LOAD ALL YOUR CONFIGURATIONS\n\n``` js\n\n //npm install config-chain\n\n var cc = require('config-chain')\n , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS.\n , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS.\n\n // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN\n // EARLIER ITEMS OVERIDE LATER ITEMS\n // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST!\n\n //strings are interpereted as filenames.\n //will be loaded synchronously\n\n var conf =\n cc(\n //OVERRIDE SETTINGS WITH COMMAND LINE OPTS\n opts,\n\n //ENV VARS IF PREFIXED WITH 'myApp_'\n\n cc.env('myApp_'), //myApp_foo = 'like this'\n\n //FILE NAMED BY ENV\n path.join(__dirname, 'config.' + env + '.json'),\n\n //IF `env` is PRODUCTION\n env === 'prod'\n ? path.join(__dirname, 'special.json') //load a special file\n : null //NULL IS IGNORED!\n\n //SUBDIR FOR ENV CONFIG\n path.join(__dirname, 'config', env, 'config.json'),\n\n //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE\n cc.find('config.json'),\n\n //PUT DEFAULTS LAST\n {\n host: 'localhost'\n port: 8000\n })\n\n var host = conf.get('host')\n\n // or\n\n var host = conf.store.host\n\n```\n\nFINALLY, EASY FLEXIBLE CONFIGURATIONS!\n\n##see also: [proto-list](https://github.com/isaacs/proto-list/)\n\nWHATS THAT YOU SAY?\n\nYOU WANT A \"CLASS\" SO THAT YOU CAN DO CRAYCRAY JQUERY CRAPS?\n\nEXTEND WITH YOUR OWN FUNCTIONALTY!?\n\n## CONFIGCHAIN LIVES TO SERVE ONLY YOU!\n\n```javascript\nvar cc = require('config-chain')\n\n// all the stuff you did before\nvar config = cc({\n some: 'object'\n },\n cc.find('config.json'),\n cc.env('myApp_')\n )\n // CONFIGS AS A SERVICE, aka \"CaaS\", aka EVERY DEVOPS DREAM OMG!\n .addUrl('http://configurator:1234/my-configs')\n // ASYNC FTW!\n .addFile('/path/to/file.json')\n\n // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT\n // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST\n // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE\n .add({ another: 'object' })\n\n // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!!\n .on('error', function (er) {\n // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW\n // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\\\n throw er\n })\n\n // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!!\n .on('load', function (config) {\n console.awesome('HOLY SHIT!')\n })\n```\n\n# BORING API DOCS\n\n## cc(...args)\n\nMAKE A CHAIN AND ADD ALL THE ARGS.\n\nIf the arg is a STRING, then it shall be a JSON FILENAME.\n\nSYNC I/O!\n\nRETURN THE CHAIN!\n\n## cc.json(...args)\n\nJoin the args INTO A JSON FILENAME!\n\nSYNC I/O!\n\n## cc.find(relativePath)\n\nSEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES.\n\nRETURN THE FOUND PATH!\n\nSYNC I/O!\n\n## cc.parse(content, file, type)\n\nParse the content string, and guess the type from either the\nspecified type or the filename.\n\nRETURN THE RESULTING OBJECT!\n\nNO I/O!\n\n## cc.env(prefix, env=process.env)\n\nGet all the keys on the provided env object (or process.env) which are\nprefixed by the specified prefix, and put the values on a new object.\n\nRETURN THE RESULTING OBJECT!\n\nNO I/O!\n\n## cc.ConfigChain()\n\nThe ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING!\n\nOne of these is returned by the main exported function, as well.\n\nIt inherits (prototypically) from\n[ProtoList](https://github.com/isaacs/proto-list/), and also inherits\n(parasitically) from\n[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)\n\nIt has all the methods from both, and except where noted, they are\nunchanged.\n\n### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain.\n\n## chain.sources\n\nA list of all the places where it got stuff. The keys are the names\npassed to addFile or addUrl etc, and the value is an object with some\ninfo about the data source.\n\n## chain.addFile(filename, type, [name=filename])\n\nFilename is the name of the file. Name is an arbitrary string to be\nused later if you desire. Type is either 'ini' or 'json', and will\ntry to guess intelligently if omitted.\n\nLoaded files can be saved later.\n\n## chain.addUrl(url, type, [name=url])\n\nSame as the filename thing, but with a url.\n\nCan't be saved later.\n\n## chain.addEnv(prefix, env, [name='env'])\n\nAdd all the keys from the env object that start with the prefix.\n\n## chain.addString(data, file, type, [name])\n\nParse the string and add it to the set. (Mainly used internally.)\n\n## chain.add(object, [name])\n\nAdd the object to the set.\n\n## chain.root {Object}\n\nThe root from which all the other config objects in the set descend\nprototypically.\n\nPut your defaults here.\n\n## chain.set(key, value, name)\n\nSet the key to the value on the named config object. If name is\nunset, then set it on the first config object in the set. (That is,\nthe one with the highest priority, which was added first.)\n\n## chain.get(key, [name])\n\nGet the key from the named config object explicitly, or from the\nresolved configs if not specified.\n\n## chain.save(name, type)\n\nWrite the named config object back to its origin.\n\nCurrently only supported for env and file config types.\n\nFor files, encode the data according to the type.\n\n## chain.on('save', function () {})\n\nWhen one or more files are saved, emits `save` event when they're all\nsaved.\n\n## chain.on('load', function (chain) {})\n\nWhen the config chain has loaded all the specified files and urls and\nsuch, the 'load' event fires.\n",
+ "_id": "config-chain@1.1.1",
+ "_from": "config-chain@~1.1.1"
+}
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown b/deps/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown
new file mode 100644
index 0000000000..c83a43067b
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown
@@ -0,0 +1,228 @@
+#config-chain
+
+USE THIS MODULE TO LOAD ALL YOUR CONFIGURATIONS
+
+``` js
+
+ //npm install config-chain
+
+ var cc = require('config-chain')
+ , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS.
+ , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS.
+
+ // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN
+ // EARLIER ITEMS OVERIDE LATER ITEMS
+ // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST!
+
+ //strings are interpereted as filenames.
+ //will be loaded synchronously
+
+ var conf =
+ cc(
+ //OVERRIDE SETTINGS WITH COMMAND LINE OPTS
+ opts,
+
+ //ENV VARS IF PREFIXED WITH 'myApp_'
+
+ cc.env('myApp_'), //myApp_foo = 'like this'
+
+ //FILE NAMED BY ENV
+ path.join(__dirname, 'config.' + env + '.json'),
+
+ //IF `env` is PRODUCTION
+ env === 'prod'
+ ? path.join(__dirname, 'special.json') //load a special file
+ : null //NULL IS IGNORED!
+
+ //SUBDIR FOR ENV CONFIG
+ path.join(__dirname, 'config', env, 'config.json'),
+
+ //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE
+ cc.find('config.json'),
+
+ //PUT DEFAULTS LAST
+ {
+ host: 'localhost'
+ port: 8000
+ })
+
+ var host = conf.get('host')
+
+ // or
+
+ var host = conf.store.host
+
+```
+
+FINALLY, EASY FLEXIBLE CONFIGURATIONS!
+
+##see also: [proto-list](https://github.com/isaacs/proto-list/)
+
+WHATS THAT YOU SAY?
+
+YOU WANT A "CLASS" SO THAT YOU CAN DO CRAYCRAY JQUERY CRAPS?
+
+EXTEND WITH YOUR OWN FUNCTIONALTY!?
+
+## CONFIGCHAIN LIVES TO SERVE ONLY YOU!
+
+```javascript
+var cc = require('config-chain')
+
+// all the stuff you did before
+var config = cc({
+ some: 'object'
+ },
+ cc.find('config.json'),
+ cc.env('myApp_')
+ )
+ // CONFIGS AS A SERVICE, aka "CaaS", aka EVERY DEVOPS DREAM OMG!
+ .addUrl('http://configurator:1234/my-configs')
+ // ASYNC FTW!
+ .addFile('/path/to/file.json')
+
+ // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT
+ // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST
+ // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE
+ .add({ another: 'object' })
+
+ // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!!
+ .on('error', function (er) {
+ // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW
+ // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\
+ throw er
+ })
+
+ // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!!
+ .on('load', function (config) {
+ console.awesome('HOLY SHIT!')
+ })
+```
+
+# BORING API DOCS
+
+## cc(...args)
+
+MAKE A CHAIN AND ADD ALL THE ARGS.
+
+If the arg is a STRING, then it shall be a JSON FILENAME.
+
+SYNC I/O!
+
+RETURN THE CHAIN!
+
+## cc.json(...args)
+
+Join the args INTO A JSON FILENAME!
+
+SYNC I/O!
+
+## cc.find(relativePath)
+
+SEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES.
+
+RETURN THE FOUND PATH!
+
+SYNC I/O!
+
+## cc.parse(content, file, type)
+
+Parse the content string, and guess the type from either the
+specified type or the filename.
+
+RETURN THE RESULTING OBJECT!
+
+NO I/O!
+
+## cc.env(prefix, env=process.env)
+
+Get all the keys on the provided env object (or process.env) which are
+prefixed by the specified prefix, and put the values on a new object.
+
+RETURN THE RESULTING OBJECT!
+
+NO I/O!
+
+## cc.ConfigChain()
+
+The ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING!
+
+One of these is returned by the main exported function, as well.
+
+It inherits (prototypically) from
+[ProtoList](https://github.com/isaacs/proto-list/), and also inherits
+(parasitically) from
+[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)
+
+It has all the methods from both, and except where noted, they are
+unchanged.
+
+### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain.
+
+## chain.sources
+
+A list of all the places where it got stuff. The keys are the names
+passed to addFile or addUrl etc, and the value is an object with some
+info about the data source.
+
+## chain.addFile(filename, type, [name=filename])
+
+Filename is the name of the file. Name is an arbitrary string to be
+used later if you desire. Type is either 'ini' or 'json', and will
+try to guess intelligently if omitted.
+
+Loaded files can be saved later.
+
+## chain.addUrl(url, type, [name=url])
+
+Same as the filename thing, but with a url.
+
+Can't be saved later.
+
+## chain.addEnv(prefix, env, [name='env'])
+
+Add all the keys from the env object that start with the prefix.
+
+## chain.addString(data, file, type, [name])
+
+Parse the string and add it to the set. (Mainly used internally.)
+
+## chain.add(object, [name])
+
+Add the object to the set.
+
+## chain.root {Object}
+
+The root from which all the other config objects in the set descend
+prototypically.
+
+Put your defaults here.
+
+## chain.set(key, value, name)
+
+Set the key to the value on the named config object. If name is
+unset, then set it on the first config object in the set. (That is,
+the one with the highest priority, which was added first.)
+
+## chain.get(key, [name])
+
+Get the key from the named config object explicitly, or from the
+resolved configs if not specified.
+
+## chain.save(name, type)
+
+Write the named config object back to its origin.
+
+Currently only supported for env and file config types.
+
+For files, encode the data according to the type.
+
+## chain.on('save', function () {})
+
+When one or more files are saved, emits `save` event when they're all
+saved.
+
+## chain.on('load', function (chain) {})
+
+When the config chain has loaded all the specified files and urls and
+such, the 'load' event fires.
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.js
new file mode 100644
index 0000000000..101a3e4f5c
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.js
@@ -0,0 +1,10 @@
+
+
+var cc = require('..')
+var assert = require('assert')
+
+
+//throw on invalid json
+assert.throws(function () {
+ cc(__dirname + '/broken.json')
+})
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.json b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.json
new file mode 100644
index 0000000000..2107ac18d9
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.json
@@ -0,0 +1,21 @@
+{
+ "name": "config-chain",
+ "version": "0.3.0",
+ "description": "HANDLE CONFIGURATION ONCE AND FOR ALL",
+ "homepage": "http://github.com/dominictarr/config-chain",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dominictarr/config-chain.git"
+ }
+ //missing , and then this comment. this json is intensionally invalid
+ "dependencies": {
+ "proto-list": "1",
+ "ini": "~1.0.2"
+ },
+ "bundleDependencies": ["ini"],
+ "REM": "REMEMBER TO REMOVE BUNDLING WHEN/IF ISAACS MERGES ini#7",
+ "author": "Dominic Tarr <dominic.tarr@gmail.com> (http://dominictarr.com)",
+ "scripts": {
+ "test": "node test/find-file.js && node test/ini.js && node test/env.js"
+ }
+}
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/chain-class.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/chain-class.js
new file mode 100644
index 0000000000..bbc0d4cb2d
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/chain-class.js
@@ -0,0 +1,100 @@
+var test = require('tap').test
+var CC = require('../index.js').ConfigChain
+
+var env = { foo_blaz : 'blzaa', foo_env : 'myenv' }
+var jsonObj = { blaz: 'json', json: true }
+var iniObj = { 'x.y.z': 'xyz', blaz: 'ini' }
+
+var fs = require('fs')
+var ini = require('ini')
+
+fs.writeFileSync('/tmp/config-chain-class.json', JSON.stringify(jsonObj))
+fs.writeFileSync('/tmp/config-chain-class.ini', ini.stringify(iniObj))
+
+var http = require('http')
+var reqs = 0
+http.createServer(function (q, s) {
+ if (++reqs === 2) this.close()
+ if (q.url === '/json') {
+ // make sure that the requests come back from the server
+ // out of order. they should still be ordered properly
+ // in the resulting config object set.
+ setTimeout(function () {
+ s.setHeader('content-type', 'application/json')
+ s.end(JSON.stringify({
+ blaz: 'http',
+ http: true,
+ json: true
+ }))
+ }, 200)
+ } else {
+ s.setHeader('content-type', 'application/ini')
+ s.end(ini.stringify({
+ blaz: 'http',
+ http: true,
+ ini: true,
+ json: false
+ }))
+ }
+}).listen(1337)
+
+test('basic class test', function (t) {
+ var cc = new CC()
+ var expectlist =
+ [ { blaz: 'json', json: true },
+ { 'x.y.z': 'xyz', blaz: 'ini' },
+ { blaz: 'blzaa', env: 'myenv' },
+ { blaz: 'http', http: true, json: true },
+ { blaz: 'http', http: true, ini: true, json: false } ]
+
+ cc.addFile('/tmp/config-chain-class.json')
+ .addFile('/tmp/config-chain-class.ini')
+ .addEnv('foo_', env)
+ .addUrl('http://localhost:1337/json')
+ .addUrl('http://localhost:1337/ini')
+ .on('load', function () {
+ t.same(cc.list, expectlist)
+ t.same(cc.snapshot, { blaz: 'json',
+ json: true,
+ 'x.y.z': 'xyz',
+ env: 'myenv',
+ http: true,
+ ini: true })
+
+ cc.del('blaz', '/tmp/config-chain-class.json')
+ t.same(cc.snapshot, { blaz: 'ini',
+ json: true,
+ 'x.y.z': 'xyz',
+ env: 'myenv',
+ http: true,
+ ini: true })
+ cc.del('blaz')
+ t.same(cc.snapshot, { json: true,
+ 'x.y.z': 'xyz',
+ env: 'myenv',
+ http: true,
+ ini: true })
+ cc.shift()
+ t.same(cc.snapshot, { 'x.y.z': 'xyz',
+ env: 'myenv',
+ http: true,
+ json: true,
+ ini: true })
+ cc.shift()
+ t.same(cc.snapshot, { env: 'myenv',
+ http: true,
+ json: true,
+ ini: true })
+ cc.shift()
+ t.same(cc.snapshot, { http: true,
+ json: true,
+ ini: true })
+ cc.shift()
+ t.same(cc.snapshot, { http: true,
+ ini: true,
+ json: false })
+ cc.shift()
+ t.same(cc.snapshot, {})
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/env.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/env.js
new file mode 100644
index 0000000000..fb718f32b7
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/env.js
@@ -0,0 +1,10 @@
+var cc = require('..')
+var assert = require('assert')
+
+assert.deepEqual({
+ hello: true
+}, cc.env('test_', {
+ 'test_hello': true,
+ 'ignore_this': 4,
+ 'ignore_test_this_too': []
+}))
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/find-file.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/find-file.js
new file mode 100644
index 0000000000..23cde52ea9
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/find-file.js
@@ -0,0 +1,13 @@
+
+var fs = require('fs')
+ , assert = require('assert')
+ , objx = {
+ rand: Math.random()
+ }
+
+fs.writeFileSync('/tmp/random-test-config.json', JSON.stringify(objx))
+
+var cc = require('../')
+var path = cc.find('tmp/random-test-config.json')
+
+assert.equal(path, '/tmp/random-test-config.json') \ No newline at end of file
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js
new file mode 100644
index 0000000000..d742b82ba7
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js
@@ -0,0 +1,5 @@
+
+var cc = require('..')
+
+//should not throw
+cc(__dirname, 'non_existing_file')
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ini.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ini.js
new file mode 100644
index 0000000000..5572a6ed6f
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ini.js
@@ -0,0 +1,18 @@
+
+
+var cc =require('..')
+var INI = require('ini')
+var assert = require('assert')
+
+function test(obj) {
+
+ var _json, _ini
+ var json = cc.parse (_json = JSON.stringify(obj))
+ var ini = cc.parse (_ini = INI.stringify(obj))
+console.log(_ini, _json)
+ assert.deepEqual(json, ini)
+}
+
+
+test({hello: true})
+
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/save.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/save.js
new file mode 100644
index 0000000000..783461317c
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/save.js
@@ -0,0 +1,59 @@
+var CC = require('../index.js').ConfigChain
+var test = require('tap').test
+
+var f1 = '/tmp/f1.ini'
+var f2 = '/tmp/f2.json'
+
+var ini = require('ini')
+
+var f1data = {foo: {bar: 'baz'}, bloo: 'jaus'}
+var f2data = {oof: {rab: 'zab'}, oolb: 'suaj'}
+
+var fs = require('fs')
+
+fs.writeFileSync(f1, ini.stringify(f1data), 'utf8')
+fs.writeFileSync(f2, JSON.stringify(f2data), 'utf8')
+
+test('test saving and loading ini files', function (t) {
+ new CC()
+ .add({grelb:'blerg'}, 'opt')
+ .addFile(f1, 'ini', 'inifile')
+ .addFile(f2, 'json', 'jsonfile')
+ .on('load', function (cc) {
+
+ t.same(cc.snapshot, { grelb: 'blerg',
+ bloo: 'jaus',
+ foo: { bar: 'baz' },
+ oof: { rab: 'zab' },
+ oolb: 'suaj' })
+
+ t.same(cc.list, [ { grelb: 'blerg' },
+ { bloo: 'jaus', foo: { bar: 'baz' } },
+ { oof: { rab: 'zab' }, oolb: 'suaj' } ])
+
+ cc.set('grelb', 'brelg', 'opt')
+ .set('foo', 'zoo', 'inifile')
+ .set('oof', 'ooz', 'jsonfile')
+ .save('inifile')
+ .save('jsonfile')
+ .on('save', function () {
+ t.equal(fs.readFileSync(f1, 'utf8'),
+ "bloo = jaus\nfoo = zoo\n")
+ t.equal(fs.readFileSync(f2, 'utf8'),
+ "{\"oof\":\"ooz\",\"oolb\":\"suaj\"}")
+
+ t.same(cc.snapshot, { grelb: 'brelg',
+ bloo: 'jaus',
+ foo: 'zoo',
+ oof: 'ooz',
+ oolb: 'suaj' })
+
+ t.same(cc.list, [ { grelb: 'brelg' },
+ { bloo: 'jaus', foo: 'zoo' },
+ { oof: 'ooz', oolb: 'suaj' } ])
+
+ t.pass('ok')
+ t.end()
+ })
+ })
+})
diff --git a/deps/npm/node_modules/npmconf/npmconf.js b/deps/npm/node_modules/npmconf/npmconf.js
new file mode 100644
index 0000000000..da4b422907
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/npmconf.js
@@ -0,0 +1,324 @@
+
+var CC = require('config-chain').ConfigChain
+var inherits = require('inherits')
+var configDefs = require('./config-defs.js')
+var types = configDefs.types
+var once = require('once')
+var fs = require('fs')
+var path = require('path')
+var nopt = require('nopt')
+var ini = require('ini')
+var Octal = configDefs.Octal
+
+exports.load = load
+exports.Conf = Conf
+exports.loaded = false
+exports.rootConf = null
+exports.usingBuiltin = false
+exports.defs = configDefs
+Object.defineProperty(exports, 'defaults', { get: function () {
+ return configDefs.defaults
+}, enumerable: true })
+Object.defineProperty(exports, 'types', { get: function () {
+ return configDefs.types
+}, enumerable: true })
+
+exports.validate = validate
+
+var myUid = process.env.SUDO_UID !== undefined
+ ? process.env.SUDO_UID : (process.getuid && process.getuid())
+var myGid = process.env.SUDO_GID !== undefined
+ ? process.env.SUDO_GID : (process.getgid && process.getgid())
+
+
+var loading = false
+var loadCbs = []
+function load (cli_, builtin_, cb_) {
+ var cli, builtin, cb
+ for (var i = 0; i < arguments.length; i++)
+ switch (typeof arguments[i]) {
+ case 'string': builtin = arguments[i]; break
+ case 'object': cli = arguments[i]; break
+ case 'function': cb = arguments[i]; break
+ }
+
+ if (!cb)
+ cb = function () {}
+
+ if (exports.loaded) {
+ var ret = exports.loaded
+ if (cli) {
+ ret = new Conf(ret)
+ ret.unshift(cli)
+ }
+ return process.nextTick(cb.bind(null, null, ret))
+ }
+
+ // either a fresh object, or a clone of the passed in obj
+ if (!cli)
+ cli = {}
+ else
+ cli = Object.keys(cli).reduce(function (c, k) {
+ c[k] = cli[k]
+ return c
+ }, {})
+
+ loadCbs.push(cb)
+ if (loading)
+ return
+ loading = true
+
+ cb = once(function (er, conf) {
+ if (!er)
+ exports.loaded = conf
+ loadCbs.forEach(function (fn) {
+ fn(er, conf)
+ })
+ loadCbs.length = 0
+ })
+
+ // check for a builtin if provided.
+ exports.usingBuiltin = !!builtin
+ var rc = exports.rootConf = new Conf()
+ var defaults = configDefs.defaults
+ if (builtin)
+ rc.addFile(builtin, 'builtin')
+ else
+ rc.add({}, 'builtin')
+
+ rc.on('load', function () {
+ var conf = new Conf(rc)
+ conf.usingBuiltin = !!builtin
+ conf.add(cli, 'cli')
+ conf.addEnv()
+ conf.addFile(conf.get('userconfig'), 'user')
+ conf.once('error', cb)
+ conf.once('load', function () {
+ // globalconfig and globalignorefile defaults
+ // need to respond to the "prefix" setting up to this point.
+ // Eg, `npm config get globalconfig --prefix ~/local` should
+ // return `~/local/etc/npmrc`
+ // annoying humans and their expectations!
+ if (conf.get('prefix')) {
+ var etc = path.resolve(conf.get("prefix"), "etc")
+ defaults.globalconfig = path.resolve(etc, "npmrc")
+ defaults.globalignorefile = path.resolve(etc, "npmignore")
+ }
+ conf.addFile(conf.get('globalconfig'), 'global')
+
+ // move the builtin into the conf stack now.
+ conf.root = defaults
+ conf.add(rc.shift(), 'builtin')
+ conf.once('load', function () {
+ // warn about invalid bits.
+ validate(conf)
+ exports.loaded = conf
+ cb(null, conf)
+ })
+ })
+ })
+}
+
+
+// Basically the same as CC, but:
+// 1. Always ini
+// 2. Parses environment variable names in field values
+// 3. Field values that start with ~/ are replaced with process.env.HOME
+// 4. Can inherit from another Conf object, using it as the base.
+inherits(Conf, CC)
+function Conf (base) {
+ if (!(this instanceof Conf))
+ return new Conf(base)
+
+ CC.apply(this)
+
+ if (base)
+ if (base instanceof Conf)
+ this.root = base.list[0] || base.root
+ else
+ this.root = base
+ else
+ this.root = configDefs.defaults
+}
+
+Conf.prototype.save = function (where, cb) {
+ var target = this.sources[where]
+ if (!target || !(target.path || target.source) || !target.data)
+ return this.emit('error', new Error('bad save target: '+where))
+
+ if (target.source) {
+ var pref = target.prefix || ''
+ Object.keys(target.data).forEach(function (k) {
+ target.source[pref + k] = target.data[k]
+ })
+ return this
+ }
+
+ var data = target.data
+
+ if (typeof data._password === 'string' &&
+ typeof data.username === 'string') {
+ var auth = data.username + ':' + data._password
+ data = Object.keys(data).reduce(function (c, k) {
+ if (k === 'username' || k === '_password')
+ return c
+ c[k] = data[k]
+ return c
+ }, { _auth: new Buffer(auth, 'utf8').toString('base64') })
+ delete data.username
+ delete data._password
+ }
+
+ data = ini.stringify(data)
+
+ then = then.bind(this)
+ done = done.bind(this)
+ this._saving ++
+ var mode = where === 'user' ? 0600 : 0666
+ if (!data.trim())
+ fs.unlink(target.path, done)
+ else {
+ fs.writeFile(target.path, data, 'utf8', function (er) {
+ if (er)
+ return then(er)
+ if (where === 'user' && myUid && myGid)
+ fs.chown(target.path, +myUid, +myGid, then)
+ else
+ then()
+ }.bind(this))
+ }
+
+ function then (er) {
+ if (er)
+ return done(er)
+ fs.chmod(target.path, mode, done)
+ }
+
+ function done (er) {
+ if (er) {
+ if (cb) return cb(er)
+ else return this.emit('error', er)
+ }
+ this._saving --
+ if (this._saving === 0) {
+ if (cb) cb()
+ this.emit('save')
+ }
+ }
+
+ return this
+}
+
+Conf.prototype.addFile = function (file, name) {
+ name = name || file
+ var marker = {__source__:name}
+ this.sources[name] = { path: file, type: 'ini' }
+ this.push(marker)
+ this._await()
+ fs.readFile(file, 'utf8', function (er, data) {
+ if (er) // just ignore missing files.
+ return this.add({}, marker)
+ this.addString(data, file, 'ini', marker)
+ }.bind(this))
+ return this
+}
+
+// always ini files.
+Conf.prototype.parse = function (content, file) {
+ return CC.prototype.parse.call(this, content, file, 'ini')
+}
+
+Conf.prototype.add = function (data, marker) {
+ Object.keys(data).forEach(function (k) {
+ data[k] = parseField(data[k], k)
+ })
+ if (Object.prototype.hasOwnProperty.call(data, '_auth')) {
+ var auth = new Buffer(data._auth, 'base64').toString('utf8').split(':')
+ var username = auth.shift()
+ var password = auth.join(':')
+ data.username = username
+ data._password = password
+ }
+ return CC.prototype.add.call(this, data, marker)
+}
+
+Conf.prototype.addEnv = function (env) {
+ env = env || process.env
+ var conf = {}
+ Object.keys(env)
+ .filter(function (k) { return k.match(/^npm_config_[^_]/i) })
+ .forEach(function (k) {
+ if (!env[k])
+ return
+
+ conf[k.replace(/^npm_config_/i, '')
+ .toLowerCase()
+ .replace(/_/g, '-')] = env[k]
+ })
+ return CC.prototype.addEnv.call(this, '', conf, 'env')
+}
+
+function parseField (f, k, emptyIsFalse) {
+ if (typeof f !== 'string' && !(f instanceof String))
+ return f
+
+ // type can be an array or single thing.
+ var typeList = [].concat(types[k])
+ var isPath = -1 !== typeList.indexOf(path)
+ var isBool = -1 !== typeList.indexOf(Boolean)
+ var isString = -1 !== typeList.indexOf(String)
+ var isNumber = -1 !== typeList.indexOf(Number) ||
+ -1 !== typeList.indexOf(Octal)
+
+ f = (''+f).trim()
+
+ if (f.match(/^".*"$/))
+ f = JSON.parse(f)
+
+ if (isBool && !isString && f === '')
+ return true
+
+ switch (f) {
+ case 'true': return true
+ case 'false': return false
+ case 'null': return null
+ case 'undefined': return undefined
+ }
+
+ f = envReplace(f)
+
+ if (isPath) {
+ var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\//
+ if (f.match(homePattern) && process.env.HOME) {
+ f = path.resolve(process.env.HOME, f.substr(2))
+ }
+ f = path.resolve(f)
+ }
+
+ if (isNumber && !isNaN(f))
+ f = +f
+
+ return f
+}
+
+function envReplace (f) {
+ if (typeof f !== "string" || !f) return f
+
+ // replace any ${ENV} values with the appropriate environ.
+ var envExpr = /(\\*)\$\{([^}]+)\}/g
+ return f.replace(envExpr, function (orig, esc, name, i, s) {
+ esc = esc.length && esc.length % 2
+ if (esc)
+ return orig
+ if (undefined === process.env[name])
+ throw new Error("Failed to replace env in config: "+orig)
+ return process.env[name]
+ })
+}
+
+function validate (cl) {
+ // warn about invalid configs at every level.
+ cl.list.forEach(function (conf, level) {
+ nopt.clean(conf, configDefs.types)
+ })
+}
diff --git a/deps/npm/node_modules/npmconf/package.json b/deps/npm/node_modules/npmconf/package.json
new file mode 100644
index 0000000000..3a50fe9a4d
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "npmconf",
+ "version": "0.0.6",
+ "description": "The config thing npm uses",
+ "main": "npmconf.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {
+ "config-chain": "~1.1.1",
+ "inherits": "~1.0.0",
+ "once": "~1.1.1",
+ "nopt": "~2.0.0"
+ },
+ "devDependencies": {},
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/npmconf"
+ },
+ "keywords": [
+ "npm",
+ "config",
+ "config-chain",
+ "conf",
+ "ini"
+ ],
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me"
+ },
+ "license": "BSD",
+ "optionalDependencies": {
+ "nopt": "~2.0.0"
+ },
+ "readme": "# npmconf\n\nThe config thing npm uses\n\nIf you are interested in interacting with the config settings that npm\nuses, then use this module.\n\nHowever, if you are writing a new Node.js program, and want\nconfiguration functionality similar to what npm has, but for your\nown thing, then I'd recommend using [rc](https://github.com/dominictarr/rc),\nwhich is probably what you want.\n\nIf I were to do it all over again, that's what I'd do for npm. But,\nalas, there are many systems depending on many of the particulars of\nnpm's configuration setup, so it's not worth the cost of changing.\n\n## USAGE\n\n```javascript\nvar npmconf = require('npmconf')\n\n// pass in the cli options that you read from the cli\n// or whatever top-level configs you want npm to use for now.\nnpmconf.load({some:'configs'}, function (er, conf) {\n // do stuff with conf\n conf.get('some', 'cli') // 'configs'\n conf.get('username') // 'joebobwhatevers'\n conf.set('foo', 'bar', 'user')\n conf.save('user', function (er) {\n // foo = bar is now saved to ~/.npmrc or wherever\n })\n})\n```\n",
+ "_id": "npmconf@0.0.6",
+ "_from": "npmconf@latest"
+}
diff --git a/deps/npm/node_modules/npmconf/test/00-setup.js b/deps/npm/node_modules/npmconf/test/00-setup.js
new file mode 100644
index 0000000000..79cbbb127f
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/test/00-setup.js
@@ -0,0 +1,27 @@
+var path = require('path')
+var userconfigSrc = path.resolve(__dirname, 'fixtures', 'userconfig')
+exports.userconfig = userconfigSrc + '-with-gc'
+exports.globalconfig = path.resolve(__dirname, 'fixtures', 'globalconfig')
+exports.builtin = path.resolve(__dirname, 'fixtures', 'builtin')
+
+// set the userconfig in the env
+// unset anything else that npm might be trying to foist on us
+Object.keys(process.env).forEach(function (k) {
+ if (k.match(/^npm_config_/i)) {
+ delete process.env[k]
+ }
+})
+process.env.npm_config_userconfig = exports.userconfig
+process.env.npm_config_other_env_thing = 1000
+process.env.random_env_var = 'asdf'
+
+if (module === require.main) {
+ // set the globalconfig in the userconfig
+ var fs = require('fs')
+ var uc = fs.readFileSync(userconfigSrc)
+ var gcini = 'globalconfig = ' + exports.globalconfig + '\n'
+ fs.writeFileSync(exports.userconfig, gcini + uc)
+
+ console.log('0..1')
+ console.log('ok 1 setup done')
+}
diff --git a/deps/npm/node_modules/npmconf/test/basic.js b/deps/npm/node_modules/npmconf/test/basic.js
new file mode 100644
index 0000000000..9825c8457b
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/test/basic.js
@@ -0,0 +1,72 @@
+var test = require('tap').test
+var npmconf = require('../npmconf.js')
+var common = require('./00-setup.js')
+
+var ucData =
+ { globalconfig: common.globalconfig,
+ email: 'i@izs.me',
+ 'env-thing': 'asdf',
+ 'init.author.name': 'Isaac Z. Schlueter',
+ 'init.author.email': 'i@izs.me',
+ 'init.author.url': 'http://blog.izs.me/',
+ 'proprietary-attribs': false,
+ 'npm:publishtest': true,
+ '_npmjs.org:couch': 'https://admin:password@localhost:5984/registry',
+ _auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=',
+ 'npm-www:nocache': '1',
+ nodedir: '/Users/isaacs/dev/js/node-v0.8',
+ 'sign-git-tag': true,
+ message: 'v%s',
+ 'strict-ssl': false,
+ 'tmp': process.env.HOME + '/.tmp',
+ username : "username",
+ _password : "password",
+ _token:
+ { AuthSession: 'yabba-dabba-doodle',
+ version: '1',
+ expires: '1345001053415',
+ path: '/',
+ httponly: true } }
+
+var envData = { userconfig: common.userconfig, 'other-env-thing': '1000' }
+
+var gcData = { 'package-config:foo': 'boo' }
+
+var biData = {}
+
+var cli = { foo: 'bar' }
+
+var expectList =
+[ cli,
+ envData,
+ ucData,
+ gcData,
+ biData ]
+
+var expectSources =
+{ cli: { data: cli },
+ env:
+ { data: envData,
+ source: envData,
+ prefix: '' },
+ user:
+ { path: common.userconfig,
+ type: 'ini',
+ data: ucData },
+ global:
+ { path: common.globalconfig,
+ type: 'ini',
+ data: gcData },
+ builtin: { data: biData } }
+
+test('no builtin', function (t) {
+ npmconf.load(cli, function (er, conf) {
+ if (er) throw er
+ t.same(conf.list, expectList)
+ t.same(conf.sources, expectSources)
+ t.same(npmconf.rootConf.list, [])
+ t.equal(npmconf.rootConf.root, npmconf.defs.defaults)
+ t.equal(conf.root, npmconf.defs.defaults)
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/npmconf/test/builtin.js b/deps/npm/node_modules/npmconf/test/builtin.js
new file mode 100644
index 0000000000..814259493c
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/test/builtin.js
@@ -0,0 +1,72 @@
+var test = require('tap').test
+var npmconf = require('../npmconf.js')
+var common = require('./00-setup.js')
+
+var ucData =
+ { globalconfig: common.globalconfig,
+ email: 'i@izs.me',
+ 'env-thing': 'asdf',
+ 'init.author.name': 'Isaac Z. Schlueter',
+ 'init.author.email': 'i@izs.me',
+ 'init.author.url': 'http://blog.izs.me/',
+ 'proprietary-attribs': false,
+ 'npm:publishtest': true,
+ '_npmjs.org:couch': 'https://admin:password@localhost:5984/registry',
+ _auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=',
+ 'npm-www:nocache': '1',
+ nodedir: '/Users/isaacs/dev/js/node-v0.8',
+ 'sign-git-tag': true,
+ message: 'v%s',
+ 'strict-ssl': false,
+ 'tmp': process.env.HOME + '/.tmp',
+ username : "username",
+ _password : "password",
+ _token:
+ { AuthSession: 'yabba-dabba-doodle',
+ version: '1',
+ expires: '1345001053415',
+ path: '/',
+ httponly: true } }
+
+var envData = { userconfig: common.userconfig, 'other-env-thing': '1000' }
+
+var gcData = { 'package-config:foo': 'boo' }
+
+var biData = { 'builtin-config': true }
+
+var cli = { foo: 'bar' }
+
+var expectList =
+[ cli,
+ envData,
+ ucData,
+ gcData,
+ biData ]
+
+var expectSources =
+{ cli: { data: cli },
+ env:
+ { data: envData,
+ source: envData,
+ prefix: '' },
+ user:
+ { path: common.userconfig,
+ type: 'ini',
+ data: ucData },
+ global:
+ { path: common.globalconfig,
+ type: 'ini',
+ data: gcData },
+ builtin: { data: biData } }
+
+test('with builtin', function (t) {
+ npmconf.load(cli, common.builtin, function (er, conf) {
+ if (er) throw er
+ t.same(conf.list, expectList)
+ t.same(conf.sources, expectSources)
+ t.same(npmconf.rootConf.list, [])
+ t.equal(npmconf.rootConf.root, npmconf.defs.defaults)
+ t.equal(conf.root, npmconf.defs.defaults)
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/npmconf/test/fixtures/builtin b/deps/npm/node_modules/npmconf/test/fixtures/builtin
new file mode 100644
index 0000000000..dcd542c0ce
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/test/fixtures/builtin
@@ -0,0 +1 @@
+builtin-config = true
diff --git a/deps/npm/node_modules/npmconf/test/fixtures/globalconfig b/deps/npm/node_modules/npmconf/test/fixtures/globalconfig
new file mode 100644
index 0000000000..41c0b70c80
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/test/fixtures/globalconfig
@@ -0,0 +1 @@
+package-config:foo = boo
diff --git a/deps/npm/node_modules/npmconf/test/fixtures/userconfig b/deps/npm/node_modules/npmconf/test/fixtures/userconfig
new file mode 100644
index 0000000000..bda1eb82ae
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/test/fixtures/userconfig
@@ -0,0 +1,22 @@
+email = i@izs.me
+env-thing = ${random_env_var}
+init.author.name = Isaac Z. Schlueter
+init.author.email = i@izs.me
+init.author.url = http://blog.izs.me/
+proprietary-attribs = false
+npm:publishtest = true
+_npmjs.org:couch = https://admin:password@localhost:5984/registry
+_auth = dXNlcm5hbWU6cGFzc3dvcmQ=
+npm-www:nocache = 1
+nodedir = /Users/isaacs/dev/js/node-v0.8
+sign-git-tag = true
+message = v%s
+strict-ssl = false
+tmp = ~/.tmp
+
+[_token]
+AuthSession = yabba-dabba-doodle
+version = 1
+expires = 1345001053415
+path = /
+httponly = true
diff --git a/deps/npm/node_modules/npmconf/test/save.js b/deps/npm/node_modules/npmconf/test/save.js
new file mode 100644
index 0000000000..05230cd0a6
--- /dev/null
+++ b/deps/npm/node_modules/npmconf/test/save.js
@@ -0,0 +1,74 @@
+var test = require('tap').test
+var npmconf = require('../npmconf.js')
+var common = require('./00-setup.js')
+var fs = require('fs')
+var ini = require('ini')
+var expectConf =
+ [ 'globalconfig = ' + common.globalconfig,
+ 'email = i@izs.me',
+ 'env-thing = asdf',
+ 'init.author.name = Isaac Z. Schlueter',
+ 'init.author.email = i@izs.me',
+ 'init.author.url = http://blog.izs.me/',
+ 'proprietary-attribs = false',
+ 'npm:publishtest = true',
+ '_npmjs.org:couch = https://admin:password@localhost:5984/registry',
+ '_auth = dXNlcm5hbWU6cGFzc3dvcmQ=',
+ 'npm-www:nocache = 1',
+ 'sign-git-tag = false',
+ 'message = v%s',
+ 'strict-ssl = false',
+ 'username = username',
+ '_password = password',
+ '',
+ '[_token]',
+ 'AuthSession = yabba-dabba-doodle',
+ 'version = 1',
+ 'expires = 1345001053415',
+ 'path = /',
+ 'httponly = true',
+ '' ].join('\n')
+var expectFile =
+ [ 'globalconfig = ' + common.globalconfig,
+ 'email = i@izs.me',
+ 'env-thing = asdf',
+ 'init.author.name = Isaac Z. Schlueter',
+ 'init.author.email = i@izs.me',
+ 'init.author.url = http://blog.izs.me/',
+ 'proprietary-attribs = false',
+ 'npm:publishtest = true',
+ '_npmjs.org:couch = https://admin:password@localhost:5984/registry',
+ '_auth = dXNlcm5hbWU6cGFzc3dvcmQ=',
+ 'npm-www:nocache = 1',
+ 'sign-git-tag = false',
+ 'message = v%s',
+ 'strict-ssl = false',
+ '',
+ '[_token]',
+ 'AuthSession = yabba-dabba-doodle',
+ 'version = 1',
+ 'expires = 1345001053415',
+ 'path = /',
+ 'httponly = true',
+ '' ].join('\n')
+
+test('saving configs', function (t) {
+ npmconf.load(function (er, conf) {
+ if (er)
+ throw er
+ conf.set('sign-git-tag', false, 'user')
+ conf.del('nodedir')
+ conf.del('tmp')
+ var foundConf = ini.stringify(conf.sources.user.data)
+ t.same(ini.parse(foundConf), ini.parse(expectConf))
+ fs.unlinkSync(common.userconfig)
+ conf.save('user', function (er) {
+ if (er)
+ throw er
+ var uc = fs.readFileSync(conf.get('userconfig'), 'utf8')
+ t.same(ini.parse(uc), ini.parse(expectFile))
+ t.end()
+ })
+ })
+})
+
diff --git a/deps/npm/node_modules/once/LICENSE b/deps/npm/node_modules/once/LICENSE
new file mode 100644
index 0000000000..0c44ae716d
--- /dev/null
+++ b/deps/npm/node_modules/once/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE 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/once/README.md b/deps/npm/node_modules/once/README.md
new file mode 100644
index 0000000000..e833b83d22
--- /dev/null
+++ b/deps/npm/node_modules/once/README.md
@@ -0,0 +1,33 @@
+# once
+
+Only call a function once.
+
+## usage
+
+```javascript
+var once = require('once')
+
+function load (file, cb) {
+ cb = once(cb)
+ loader.load('file')
+ loader.once('load', cb)
+ loader.once('error', cb)
+}
+```
+
+Or add to the Function.prototype in a responsible way:
+
+```javascript
+// only has to be done once
+require('once').proto()
+
+function load (file, cb) {
+ cb = cb.once()
+ loader.load('file')
+ loader.once('load', cb)
+ loader.once('error', cb)
+}
+```
+
+Ironically, the prototype feature makes this module twice as
+complicated as necessary.
diff --git a/deps/npm/node_modules/once/once.js b/deps/npm/node_modules/once/once.js
new file mode 100644
index 0000000000..effc50a475
--- /dev/null
+++ b/deps/npm/node_modules/once/once.js
@@ -0,0 +1,19 @@
+module.exports = once
+
+once.proto = once(function () {
+ Object.defineProperty(Function.prototype, 'once', {
+ value: function () {
+ return once(this)
+ },
+ configurable: true
+ })
+})
+
+function once (fn) {
+ var called = false
+ return function () {
+ if (called) return
+ called = true
+ return fn.apply(this, arguments)
+ }
+}
diff --git a/deps/npm/node_modules/once/package.json b/deps/npm/node_modules/once/package.json
new file mode 100644
index 0000000000..22671632ef
--- /dev/null
+++ b/deps/npm/node_modules/once/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "once",
+ "version": "1.1.1",
+ "description": "Run a function exactly one time",
+ "main": "once.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.3.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/once"
+ },
+ "keywords": [
+ "once",
+ "function",
+ "one",
+ "single"
+ ],
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "BSD",
+ "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n",
+ "_id": "once@1.1.1",
+ "_from": "once"
+}
diff --git a/deps/npm/node_modules/once/test/once.js b/deps/npm/node_modules/once/test/once.js
new file mode 100644
index 0000000000..f0291a44f0
--- /dev/null
+++ b/deps/npm/node_modules/once/test/once.js
@@ -0,0 +1,18 @@
+var test = require('tap').test
+var once = require('../once.js')
+
+test('once', function (t) {
+ var f = 0
+ var foo = once(function (g) {
+ t.equal(f, 0)
+ f ++
+ return f + g + this
+ })
+ for (var i = 0; i < 1E3; i++) {
+ t.same(f, i === 0 ? 0 : 1)
+ var g = foo.call(1, 1)
+ t.same(g, i === 0 ? 3 : undefined)
+ t.same(f, 1)
+ }
+ t.end()
+})
diff --git a/deps/npm/node_modules/proto-list/package.json b/deps/npm/node_modules/proto-list/package.json
deleted file mode 100644
index 5cab34befe..0000000000
--- a/deps/npm/node_modules/proto-list/package.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "name" : "proto-list"
-, "version" : "1.0.0"
-, "description" : "A utility for managing a prototype chain"
-, "main" : "./proto-list.js"
-, "author" : "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)"
-, "scripts" : { "test" : "node proto-list.js" }
-, "repository": { "type": "git", "url": "https://github.com/isaacs/proto-list" }
-, "license": { "type": "MIT", "url": "https://github.com/isaacs/proto-list/blob/master/LICENSE" }
-, "devDependencies" : { "tap" : "0" } }
diff --git a/deps/npm/node_modules/read-package-json/package.json b/deps/npm/node_modules/read-package-json/package.json
index e585627ec8..42d0611272 100644
--- a/deps/npm/node_modules/read-package-json/package.json
+++ b/deps/npm/node_modules/read-package-json/package.json
@@ -1,6 +1,6 @@
{
"name": "read-package-json",
- "version": "0.1.2",
+ "version": "0.1.3",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -17,7 +17,7 @@
},
"dependencies": {
"glob": "~3.1.9",
- "lru-cache": "~1.1.0",
+ "lru-cache": "~2.0.0",
"semver": "~1.0.14",
"slide": "~1.1.3",
"npmlog": "0",
@@ -31,6 +31,6 @@
"graceful-fs": "~1.1.8"
},
"readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\nreadJson('/path/to/package.json', function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n}\n```\n\n## readJson(file, cb)\n\n* `file` {String} The path to the package.json file\n* `cb` {Function}\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n",
- "_id": "read-package-json@0.1.2",
+ "_id": "read-package-json@0.1.3",
"_from": "read-package-json@~0.1.1"
}
diff --git a/deps/npm/node_modules/read-package-json/read-json.js b/deps/npm/node_modules/read-package-json/read-json.js
index 385fc3304e..837c6b7c4a 100644
--- a/deps/npm/node_modules/read-package-json/read-json.js
+++ b/deps/npm/node_modules/read-package-json/read-json.js
@@ -21,7 +21,7 @@ try {
module.exports = readJson
var LRU = require("lru-cache")
-readJson.cache = new LRU(1000)
+readJson.cache = new LRU({max: 1000})
var path = require("path")
var glob = require("glob")
var slide = require("slide")
diff --git a/deps/npm/node_modules/read/lib/read.js b/deps/npm/node_modules/read/lib/read.js
index 363e7e85fe..4b0e303f6c 100644
--- a/deps/npm/node_modules/read/lib/read.js
+++ b/deps/npm/node_modules/read/lib/read.js
@@ -9,10 +9,16 @@ function read (opts, cb) {
throw new Error('read() no longer accepts a char number limit')
}
+ if (typeof opts.default !== 'undefined' &&
+ typeof opts.default !== 'string' &&
+ typeof opts.default !== 'number') {
+ throw new Error('default value must be string or number')
+ }
+
var input = opts.input || process.stdin
var output = opts.output || process.stdout
var m = new Mute({ replace: opts.replace })
- m.pipe(output)
+ m.pipe(output, {end: false})
output = m
var def = opts.default || ''
var terminal = !!(opts.terminal || output.isTTY)
@@ -65,6 +71,7 @@ function read (opts, cb) {
rl.close()
clearTimeout(timer)
output.mute()
+ output.end()
}
function onError (er) {
diff --git a/deps/npm/node_modules/read/package.json b/deps/npm/node_modules/read/package.json
index 698cf40d9d..79e5b7ce2c 100644
--- a/deps/npm/node_modules/read/package.json
+++ b/deps/npm/node_modules/read/package.json
@@ -1,6 +1,6 @@
{
"name": "read",
- "version": "1.0.2",
+ "version": "1.0.3",
"main": "lib/read.js",
"dependencies": {
"mute-stream": "~0.0.2"
@@ -26,6 +26,6 @@
"test": "tap test/*.js"
},
"readme": "## read\n\nFor reading user input from stdin.\n\nSimilar to the `readline` builtin's `question()` method, but with a\nfew more features.\n\n## USAGE\n\n```javascript\nvar read = require(\"read\")\nread(options, callback)\n```\n\nThe callback gets called with either the user input, or the default\nspecified, or an error, as `callback(error, result, isDefault)`\nnode style.\n\n## OPTIONS\n\nEvery option is optional.\n\n* `prompt` What to write to stdout before reading input.\n* `silent` Don't echo the output as the user types it.\n* `replace` Replace silenced characters with the supplied character value.\n* `timeout` Number of ms to wait for user input before giving up.\n* `default` The default value if the user enters nothing.\n* `edit` Allow the user to edit the default value.\n* `terminal` Treat the output as a TTY, whether it is or not.\n* `stdin` Readable stream to get input data from. (default `process.stdin`)\n* `stdout` Writeable stream to write prompts to. (default: `process.stdout`)\n\nIf silent is true, and the input is a TTY, then read will set raw\nmode, and read character by character.\n\n## CONTRIBUTING\n\nPatches welcome.\n",
- "_id": "read@1.0.2",
+ "_id": "read@1.0.3",
"_from": "read@~1"
}
diff --git a/deps/npm/node_modules/read/test/many.js b/deps/npm/node_modules/read/test/many.js
new file mode 100644
index 0000000000..0d32dae8af
--- /dev/null
+++ b/deps/npm/node_modules/read/test/many.js
@@ -0,0 +1,76 @@
+var tap = require('tap')
+var read = require('../lib/read.js')
+
+if (process.argv[2] === 'child') {
+ return child()
+}
+
+var spawn = require('child_process').spawn
+function child () {
+ read({prompt:'1'}, function (er, r1) {if (er) throw er
+ read({prompt:'2'}, function (er, r2) {if (er) throw er
+ read({prompt:'3'}, function (er, r3) {if (er) throw er
+ read({prompt:'4'}, function (er, r4) {if (er) throw er
+ read({prompt:'5'}, function (er, r5) {if (er) throw er
+ read({prompt:'6'}, function (er, r6) {if (er) throw er
+ read({prompt:'7'}, function (er, r7) {if (er) throw er
+ read({prompt:'8'}, function (er, r8) {if (er) throw er
+ read({prompt:'9'}, function (er, r9) {if (er) throw er
+ read({prompt:'10'}, function (er, r10) {if (er) throw er
+ read({prompt:'11'}, function (er, r11) {if (er) throw er
+ read({prompt:'12'}, function (er, r12) {if (er) throw er
+ read({prompt:'13'}, function (er, r13) {if (er) throw er
+ read({prompt:'14'}, function (er, r14) {if (er) throw er
+ read({prompt:'15'}, function (er, r15) {if (er) throw er
+ read({prompt:'16'}, function (er, r16) {if (er) throw er
+ read({prompt:'17'}, function (er, r17) {if (er) throw er
+ read({prompt:'18'}, function (er, r18) {if (er) throw er
+ console.log(r1, r2, r3, r4, r5, r6, r7, r8, r9, r10,
+ r11, r12, r13, r14, r15, r16, r17, r18)
+ })})})})})})})})})})})})})})})})})})
+}
+
+tap.test('many reads', function (t) {
+ var child = spawn(process.execPath, [__filename, 'child'])
+ var n = 0
+ var output = ''
+ var expect = '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ' +
+ '16 17 18 1 2 3 4 5 6 7 8 9 10 11 12 ' +
+ '13 14 15 16 17 18\n'
+ var write = child.stdin.write.bind(child.stdin)
+ var answers =
+ [ '1\n',
+ '2\n',
+ '3\n',
+ '4\n',
+ '5\n',
+ '6\n',
+ '7\n',
+ '8\n',
+ '9\n',
+ '10\n',
+ '11\n',
+ '12\n',
+ '13\n',
+ '14\n',
+ '15\n',
+ '16\n',
+ '17\n',
+ '18\n' ]
+ child.stdout.on('data', function (c) {
+ n++;
+ output += c
+ if (answers.length) {
+ write(answers.shift())
+ }
+ })
+ child.stderr.on('data', function (c) {
+ output += c
+ console.error('' + c)
+ })
+ child.on('close', function (c) {
+ t.equal(output, expect)
+ t.equal(n, 19)
+ t.end()
+ })
+})
diff --git a/deps/npm/package.json b/deps/npm/package.json
index ae234a0ab9..d0b4d7be7c 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "1.1.48",
+ "version": "1.1.49",
"name": "npm",
"publishConfig": {
"proprietary-attribs": false
@@ -39,10 +39,9 @@
"slide": "1",
"abbrev": "1",
"graceful-fs": "~1.1.1",
- "minimatch": "~0.2",
+ "minimatch": "~0.2.6",
"nopt": "~2.0",
"node-uuid": "~1.3",
- "proto-list": "1",
"rimraf": "2",
"request": "~2.9",
"which": "1",
@@ -51,24 +50,26 @@
"block-stream": "*",
"inherits": "1",
"mkdirp": "~0.3.3",
- "read": "~1",
- "lru-cache": "~1.1.0",
- "node-gyp": "~0.6.1",
+ "read": "~1.0.3",
+ "lru-cache": "~2.0.0",
+ "node-gyp": "~0.6.4",
"fstream-npm": "0.1",
"uid-number": "0",
"archy": "0",
"chownr": "0",
"npmlog": "0",
"ansi": "~0.1.2",
- "npm-registry-client": "0",
- "read-package-json": "~0.1.1",
+ "npm-registry-client": "~0.1.4",
+ "read-package-json": "~0.1.3",
"read-installed": "0",
- "glob": "~3.1.9",
+ "glob": "~3.1.12",
"init-package-json": "0",
"osenv": "0",
"lockfile": ">=0.2",
"retry": "~0.6.0",
- "couch-login": "~0.1.6"
+ "couch-login": "~0.1.9",
+ "once": "~1.1.1",
+ "npmconf": "~0.0.6"
},
"bundleDependencies": [
"semver",
@@ -79,7 +80,6 @@
"minimatch",
"nopt",
"node-uuid",
- "proto-list",
"rimraf",
"request",
"which",
@@ -105,7 +105,9 @@
"osenv",
"lockfile",
"retry",
- "couch-login"
+ "couch-login",
+ "once",
+ "npmconf"
],
"devDependencies": {
"ronn": "~0.3.6",
@@ -118,7 +120,8 @@
"scripts": {
"test": "node ./test/run.js && tap test/tap/*.js",
"prepublish": "npm prune ; make -j4 doc",
- "dumpconf": "env | grep npm | sort | uniq"
+ "dumpconf": "env | grep npm | sort | uniq",
+ "echo": "node bin/npm-cli.js"
},
"licenses": [
{