summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2015-04-23 23:21:11 -0700
committerJulien Gilli <julien.gilli@joyent.com>2015-04-30 17:21:18 -0700
commit8fc40af034f5b526f0d7e421401786e11a2c50cf (patch)
treeed5f87cb22c30204004eae33714f87c0bb248575
parent03b4f443d5fd3d65c77c93db445f22c4ff097a8f (diff)
downloadnode-new-8fc40af034f5b526f0d7e421401786e11a2c50cf.tar.gz
deps: upgrade npm to 2.8.4
Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/20311
-rw-r--r--deps/npm/.mailmap12
-rw-r--r--deps/npm/.travis.yml2
-rw-r--r--deps/npm/AUTHORS9
-rw-r--r--deps/npm/CHANGELOG.md499
-rw-r--r--deps/npm/README.md10
-rwxr-xr-xdeps/npm/bin/node-gyp-bin/node-gyp.cmd10
-rw-r--r--deps/npm/doc/cli/npm-dist-tag.md3
-rw-r--r--deps/npm/doc/cli/npm-install.md42
-rw-r--r--deps/npm/doc/cli/npm-link.md2
-rw-r--r--deps/npm/doc/files/package.json.md12
-rw-r--r--deps/npm/doc/misc/npm-config.md2
-rw-r--r--deps/npm/html/doc/README.html14
-rw-r--r--deps/npm/html/doc/api/npm-bin.html2
-rw-r--r--deps/npm/html/doc/api/npm-bugs.html2
-rw-r--r--deps/npm/html/doc/api/npm-cache.html2
-rw-r--r--deps/npm/html/doc/api/npm-commands.html2
-rw-r--r--deps/npm/html/doc/api/npm-config.html2
-rw-r--r--deps/npm/html/doc/api/npm-deprecate.html2
-rw-r--r--deps/npm/html/doc/api/npm-docs.html2
-rw-r--r--deps/npm/html/doc/api/npm-edit.html2
-rw-r--r--deps/npm/html/doc/api/npm-explore.html2
-rw-r--r--deps/npm/html/doc/api/npm-help-search.html2
-rw-r--r--deps/npm/html/doc/api/npm-init.html2
-rw-r--r--deps/npm/html/doc/api/npm-install.html2
-rw-r--r--deps/npm/html/doc/api/npm-link.html2
-rw-r--r--deps/npm/html/doc/api/npm-load.html2
-rw-r--r--deps/npm/html/doc/api/npm-ls.html2
-rw-r--r--deps/npm/html/doc/api/npm-outdated.html2
-rw-r--r--deps/npm/html/doc/api/npm-owner.html2
-rw-r--r--deps/npm/html/doc/api/npm-pack.html2
-rw-r--r--deps/npm/html/doc/api/npm-prefix.html2
-rw-r--r--deps/npm/html/doc/api/npm-prune.html2
-rw-r--r--deps/npm/html/doc/api/npm-publish.html2
-rw-r--r--deps/npm/html/doc/api/npm-rebuild.html2
-rw-r--r--deps/npm/html/doc/api/npm-repo.html2
-rw-r--r--deps/npm/html/doc/api/npm-restart.html2
-rw-r--r--deps/npm/html/doc/api/npm-root.html2
-rw-r--r--deps/npm/html/doc/api/npm-run-script.html2
-rw-r--r--deps/npm/html/doc/api/npm-search.html2
-rw-r--r--deps/npm/html/doc/api/npm-shrinkwrap.html2
-rw-r--r--deps/npm/html/doc/api/npm-start.html2
-rw-r--r--deps/npm/html/doc/api/npm-stop.html2
-rw-r--r--deps/npm/html/doc/api/npm-tag.html2
-rw-r--r--deps/npm/html/doc/api/npm-test.html2
-rw-r--r--deps/npm/html/doc/api/npm-uninstall.html2
-rw-r--r--deps/npm/html/doc/api/npm-unpublish.html2
-rw-r--r--deps/npm/html/doc/api/npm-update.html2
-rw-r--r--deps/npm/html/doc/api/npm-version.html2
-rw-r--r--deps/npm/html/doc/api/npm-view.html2
-rw-r--r--deps/npm/html/doc/api/npm-whoami.html2
-rw-r--r--deps/npm/html/doc/api/npm.html4
-rw-r--r--deps/npm/html/doc/cli/npm-access.html2
-rw-r--r--deps/npm/html/doc/cli/npm-adduser.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bin.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bugs.html2
-rw-r--r--deps/npm/html/doc/cli/npm-build.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bundle.html2
-rw-r--r--deps/npm/html/doc/cli/npm-cache.html2
-rw-r--r--deps/npm/html/doc/cli/npm-completion.html2
-rw-r--r--deps/npm/html/doc/cli/npm-config.html2
-rw-r--r--deps/npm/html/doc/cli/npm-dedupe.html2
-rw-r--r--deps/npm/html/doc/cli/npm-deprecate.html2
-rw-r--r--deps/npm/html/doc/cli/npm-dist-tag.html5
-rw-r--r--deps/npm/html/doc/cli/npm-docs.html2
-rw-r--r--deps/npm/html/doc/cli/npm-edit.html2
-rw-r--r--deps/npm/html/doc/cli/npm-explore.html2
-rw-r--r--deps/npm/html/doc/cli/npm-help-search.html2
-rw-r--r--deps/npm/html/doc/cli/npm-help.html2
-rw-r--r--deps/npm/html/doc/cli/npm-init.html2
-rw-r--r--deps/npm/html/doc/cli/npm-install.html32
-rw-r--r--deps/npm/html/doc/cli/npm-link.html2
-rw-r--r--deps/npm/html/doc/cli/npm-logout.html2
-rw-r--r--deps/npm/html/doc/cli/npm-ls.html4
-rw-r--r--deps/npm/html/doc/cli/npm-outdated.html2
-rw-r--r--deps/npm/html/doc/cli/npm-owner.html2
-rw-r--r--deps/npm/html/doc/cli/npm-pack.html2
-rw-r--r--deps/npm/html/doc/cli/npm-prefix.html2
-rw-r--r--deps/npm/html/doc/cli/npm-prune.html2
-rw-r--r--deps/npm/html/doc/cli/npm-publish.html2
-rw-r--r--deps/npm/html/doc/cli/npm-rebuild.html2
-rw-r--r--deps/npm/html/doc/cli/npm-repo.html2
-rw-r--r--deps/npm/html/doc/cli/npm-restart.html2
-rw-r--r--deps/npm/html/doc/cli/npm-rm.html2
-rw-r--r--deps/npm/html/doc/cli/npm-root.html2
-rw-r--r--deps/npm/html/doc/cli/npm-run-script.html2
-rw-r--r--deps/npm/html/doc/cli/npm-search.html2
-rw-r--r--deps/npm/html/doc/cli/npm-shrinkwrap.html2
-rw-r--r--deps/npm/html/doc/cli/npm-star.html2
-rw-r--r--deps/npm/html/doc/cli/npm-stars.html2
-rw-r--r--deps/npm/html/doc/cli/npm-start.html2
-rw-r--r--deps/npm/html/doc/cli/npm-stop.html2
-rw-r--r--deps/npm/html/doc/cli/npm-tag.html2
-rw-r--r--deps/npm/html/doc/cli/npm-test.html2
-rw-r--r--deps/npm/html/doc/cli/npm-uninstall.html2
-rw-r--r--deps/npm/html/doc/cli/npm-unpublish.html2
-rw-r--r--deps/npm/html/doc/cli/npm-update.html2
-rw-r--r--deps/npm/html/doc/cli/npm-version.html2
-rw-r--r--deps/npm/html/doc/cli/npm-view.html2
-rw-r--r--deps/npm/html/doc/cli/npm-whoami.html2
-rw-r--r--deps/npm/html/doc/cli/npm.html10
-rw-r--r--deps/npm/html/doc/files/npm-folders.html2
-rw-r--r--deps/npm/html/doc/files/npm-global.html2
-rw-r--r--deps/npm/html/doc/files/npm-json.html14
-rw-r--r--deps/npm/html/doc/files/npmrc.html2
-rw-r--r--deps/npm/html/doc/files/package.json.html14
-rw-r--r--deps/npm/html/doc/index.html2
-rw-r--r--deps/npm/html/doc/misc/npm-coding-style.html2
-rw-r--r--deps/npm/html/doc/misc/npm-config.html4
-rw-r--r--deps/npm/html/doc/misc/npm-developers.html2
-rw-r--r--deps/npm/html/doc/misc/npm-disputes.html8
-rw-r--r--deps/npm/html/doc/misc/npm-faq.html4
-rw-r--r--deps/npm/html/doc/misc/npm-index.html2
-rw-r--r--deps/npm/html/doc/misc/npm-registry.html2
-rw-r--r--deps/npm/html/doc/misc/npm-scope.html2
-rw-r--r--deps/npm/html/doc/misc/npm-scripts.html2
-rw-r--r--deps/npm/html/doc/misc/removing-npm.html2
-rw-r--r--deps/npm/html/doc/misc/semver.html2
-rw-r--r--deps/npm/html/partial/doc/README.html12
-rw-r--r--deps/npm/html/partial/doc/api/npm.html2
-rw-r--r--deps/npm/html/partial/doc/cli/npm-dist-tag.html3
-rw-r--r--deps/npm/html/partial/doc/cli/npm-install.html30
-rw-r--r--deps/npm/html/partial/doc/cli/npm-ls.html2
-rw-r--r--deps/npm/html/partial/doc/cli/npm.html8
-rw-r--r--deps/npm/html/partial/doc/files/npm-json.html12
-rw-r--r--deps/npm/html/partial/doc/files/package.json.html12
-rw-r--r--deps/npm/html/partial/doc/misc/npm-config.html2
-rw-r--r--deps/npm/html/partial/doc/misc/npm-disputes.html6
-rw-r--r--deps/npm/html/partial/doc/misc/npm-faq.html2
-rw-r--r--deps/npm/lib/build.js34
-rw-r--r--deps/npm/lib/cache.js11
-rw-r--r--deps/npm/lib/cache/add-named.js19
-rw-r--r--deps/npm/lib/cache/add-remote-git.js547
-rw-r--r--deps/npm/lib/cache/maybe-github.js33
-rw-r--r--deps/npm/lib/cache/update-index.js124
-rw-r--r--deps/npm/lib/config/core.js4
-rw-r--r--deps/npm/lib/config/load-cafile.js6
-rw-r--r--deps/npm/lib/init.js2
-rw-r--r--deps/npm/lib/install.js93
-rw-r--r--deps/npm/lib/link.js2
-rw-r--r--deps/npm/lib/npm.js3
-rw-r--r--deps/npm/lib/run-script.js3
-rw-r--r--deps/npm/lib/search.js30
-rw-r--r--deps/npm/lib/unbuild.js3
-rw-r--r--deps/npm/lib/utils/git.js6
-rw-r--r--deps/npm/lib/utils/link.js5
-rw-r--r--deps/npm/lib/utils/spawn.js13
-rw-r--r--deps/npm/man/man1/npm-README.112
-rw-r--r--deps/npm/man/man1/npm-access.12
-rw-r--r--deps/npm/man/man1/npm-adduser.12
-rw-r--r--deps/npm/man/man1/npm-bin.12
-rw-r--r--deps/npm/man/man1/npm-bugs.12
-rw-r--r--deps/npm/man/man1/npm-build.12
-rw-r--r--deps/npm/man/man1/npm-bundle.12
-rw-r--r--deps/npm/man/man1/npm-cache.12
-rw-r--r--deps/npm/man/man1/npm-completion.12
-rw-r--r--deps/npm/man/man1/npm-config.12
-rw-r--r--deps/npm/man/man1/npm-dedupe.12
-rw-r--r--deps/npm/man/man1/npm-deprecate.12
-rw-r--r--deps/npm/man/man1/npm-dist-tag.15
-rw-r--r--deps/npm/man/man1/npm-docs.12
-rw-r--r--deps/npm/man/man1/npm-edit.12
-rw-r--r--deps/npm/man/man1/npm-explore.12
-rw-r--r--deps/npm/man/man1/npm-help-search.12
-rw-r--r--deps/npm/man/man1/npm-help.12
-rw-r--r--deps/npm/man/man1/npm-init.12
-rw-r--r--deps/npm/man/man1/npm-install.152
-rw-r--r--deps/npm/man/man1/npm-link.14
-rw-r--r--deps/npm/man/man1/npm-logout.12
-rw-r--r--deps/npm/man/man1/npm-ls.14
-rw-r--r--deps/npm/man/man1/npm-outdated.12
-rw-r--r--deps/npm/man/man1/npm-owner.12
-rw-r--r--deps/npm/man/man1/npm-pack.12
-rw-r--r--deps/npm/man/man1/npm-prefix.12
-rw-r--r--deps/npm/man/man1/npm-prune.12
-rw-r--r--deps/npm/man/man1/npm-publish.12
-rw-r--r--deps/npm/man/man1/npm-rebuild.12
-rw-r--r--deps/npm/man/man1/npm-repo.12
-rw-r--r--deps/npm/man/man1/npm-restart.12
-rw-r--r--deps/npm/man/man1/npm-rm.12
-rw-r--r--deps/npm/man/man1/npm-root.12
-rw-r--r--deps/npm/man/man1/npm-run-script.12
-rw-r--r--deps/npm/man/man1/npm-search.12
-rw-r--r--deps/npm/man/man1/npm-shrinkwrap.12
-rw-r--r--deps/npm/man/man1/npm-star.12
-rw-r--r--deps/npm/man/man1/npm-stars.12
-rw-r--r--deps/npm/man/man1/npm-start.12
-rw-r--r--deps/npm/man/man1/npm-stop.12
-rw-r--r--deps/npm/man/man1/npm-tag.12
-rw-r--r--deps/npm/man/man1/npm-test.12
-rw-r--r--deps/npm/man/man1/npm-uninstall.12
-rw-r--r--deps/npm/man/man1/npm-unpublish.12
-rw-r--r--deps/npm/man/man1/npm-update.12
-rw-r--r--deps/npm/man/man1/npm-version.12
-rw-r--r--deps/npm/man/man1/npm-view.12
-rw-r--r--deps/npm/man/man1/npm-whoami.12
-rw-r--r--deps/npm/man/man1/npm.14
-rw-r--r--deps/npm/man/man3/npm-bin.32
-rw-r--r--deps/npm/man/man3/npm-bugs.32
-rw-r--r--deps/npm/man/man3/npm-cache.32
-rw-r--r--deps/npm/man/man3/npm-commands.32
-rw-r--r--deps/npm/man/man3/npm-config.32
-rw-r--r--deps/npm/man/man3/npm-deprecate.32
-rw-r--r--deps/npm/man/man3/npm-docs.32
-rw-r--r--deps/npm/man/man3/npm-edit.32
-rw-r--r--deps/npm/man/man3/npm-explore.32
-rw-r--r--deps/npm/man/man3/npm-help-search.32
-rw-r--r--deps/npm/man/man3/npm-init.32
-rw-r--r--deps/npm/man/man3/npm-install.32
-rw-r--r--deps/npm/man/man3/npm-link.32
-rw-r--r--deps/npm/man/man3/npm-load.32
-rw-r--r--deps/npm/man/man3/npm-ls.32
-rw-r--r--deps/npm/man/man3/npm-outdated.32
-rw-r--r--deps/npm/man/man3/npm-owner.32
-rw-r--r--deps/npm/man/man3/npm-pack.32
-rw-r--r--deps/npm/man/man3/npm-prefix.32
-rw-r--r--deps/npm/man/man3/npm-prune.32
-rw-r--r--deps/npm/man/man3/npm-publish.32
-rw-r--r--deps/npm/man/man3/npm-rebuild.32
-rw-r--r--deps/npm/man/man3/npm-repo.32
-rw-r--r--deps/npm/man/man3/npm-restart.32
-rw-r--r--deps/npm/man/man3/npm-root.32
-rw-r--r--deps/npm/man/man3/npm-run-script.32
-rw-r--r--deps/npm/man/man3/npm-search.32
-rw-r--r--deps/npm/man/man3/npm-shrinkwrap.32
-rw-r--r--deps/npm/man/man3/npm-start.32
-rw-r--r--deps/npm/man/man3/npm-stop.32
-rw-r--r--deps/npm/man/man3/npm-tag.32
-rw-r--r--deps/npm/man/man3/npm-test.32
-rw-r--r--deps/npm/man/man3/npm-uninstall.32
-rw-r--r--deps/npm/man/man3/npm-unpublish.32
-rw-r--r--deps/npm/man/man3/npm-update.34
-rw-r--r--deps/npm/man/man3/npm-version.32
-rw-r--r--deps/npm/man/man3/npm-view.32
-rw-r--r--deps/npm/man/man3/npm-whoami.32
-rw-r--r--deps/npm/man/man3/npm.34
-rw-r--r--deps/npm/man/man5/npm-folders.52
-rw-r--r--deps/npm/man/man5/npm-global.52
-rw-r--r--deps/npm/man/man5/npm-json.514
-rw-r--r--deps/npm/man/man5/npmrc.52
-rw-r--r--deps/npm/man/man5/package.json.514
-rw-r--r--deps/npm/man/man7/npm-coding-style.72
-rw-r--r--deps/npm/man/man7/npm-config.74
-rw-r--r--deps/npm/man/man7/npm-developers.72
-rw-r--r--deps/npm/man/man7/npm-disputes.72
-rw-r--r--deps/npm/man/man7/npm-faq.72
-rw-r--r--deps/npm/man/man7/npm-index.72
-rw-r--r--deps/npm/man/man7/npm-registry.72
-rw-r--r--deps/npm/man/man7/npm-scope.72
-rw-r--r--deps/npm/man/man7/npm-scripts.72
-rw-r--r--deps/npm/man/man7/removing-npm.72
-rw-r--r--deps/npm/man/man7/semver.72
-rw-r--r--deps/npm/node_modules/ansi-regex/index.js (renamed from deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js)0
-rw-r--r--deps/npm/node_modules/ansi-regex/license21
-rw-r--r--deps/npm/node_modules/ansi-regex/package.json (renamed from deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json)44
-rw-r--r--deps/npm/node_modules/ansi-regex/readme.md (renamed from deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md)0
-rw-r--r--deps/npm/node_modules/child-process-close/index.js48
-rw-r--r--deps/npm/node_modules/child-process-close/package.json37
-rw-r--r--deps/npm/node_modules/child-process-close/test/test-exec.js50
-rw-r--r--deps/npm/node_modules/child-process-close/test/test-fork.js41
-rw-r--r--deps/npm/node_modules/child-process-close/test/test-spawn-and-execfile.js73
-rw-r--r--deps/npm/node_modules/child-process-close/test/test.js41
-rw-r--r--deps/npm/node_modules/child-process-close/test/worker-fork.js3
-rw-r--r--deps/npm/node_modules/child-process-close/test/worker-spawn.js5
-rw-r--r--deps/npm/node_modules/columnify/Makefile2
-rw-r--r--deps/npm/node_modules/columnify/Readme.md14
-rw-r--r--deps/npm/node_modules/columnify/columnify.js82
-rw-r--r--deps/npm/node_modules/columnify/index.js6
-rw-r--r--deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/LICENSE21
-rw-r--r--deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/README.md2
-rw-r--r--deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json3
-rw-r--r--deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json29
-rw-r--r--deps/npm/node_modules/columnify/node_modules/wcwidth/package.json3
-rw-r--r--deps/npm/node_modules/columnify/package.json30
-rw-r--r--deps/npm/node_modules/glob/common.js22
-rw-r--r--deps/npm/node_modules/glob/glob.js2
-rw-r--r--deps/npm/node_modules/glob/node_modules/path-is-absolute/index.js20
-rw-r--r--deps/npm/node_modules/glob/node_modules/path-is-absolute/license21
-rw-r--r--deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json69
-rw-r--r--deps/npm/node_modules/glob/node_modules/path-is-absolute/readme.md51
-rw-r--r--deps/npm/node_modules/glob/package.json22
-rw-r--r--deps/npm/node_modules/glob/sync.js2
-rw-r--r--deps/npm/node_modules/hosted-git-info/README.md20
-rw-r--r--deps/npm/node_modules/hosted-git-info/README.md~87
-rw-r--r--deps/npm/node_modules/hosted-git-info/git-host-info.js64
-rw-r--r--deps/npm/node_modules/hosted-git-info/git-host.js96
-rw-r--r--deps/npm/node_modules/hosted-git-info/index.js255
-rw-r--r--deps/npm/node_modules/hosted-git-info/package.json34
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/basic.js20
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js27
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/bitbucket.js30
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/gist.js56
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/github.js55
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/gitlab.js31
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/https-with-inline-auth.js39
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js43
-rw-r--r--deps/npm/node_modules/inflight/.eslintrc17
-rw-r--r--deps/npm/node_modules/init-package-json/.travis.yml4
-rw-r--r--deps/npm/node_modules/init-package-json/README.md2
-rw-r--r--deps/npm/node_modules/init-package-json/default-input.js25
-rw-r--r--deps/npm/node_modules/init-package-json/init-package-json.js5
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/LICENSE15
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/README.md369
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/common.js237
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/glob.js740
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/package.json72
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/sync.js457
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/promzard/example/buffer.js12
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/promzard/package.json19
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/promzard/promzard.js28
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/promzard/test/buffer.js84
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/promzard/test/validate.input8
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/promzard/test/validate.js20
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/.npmignore1
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/README.md86
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/index.js101
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/.travis.yml4
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/History.md39
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/Readme.md18
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/builtins.json31
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/package.json45
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/package.json57
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/test/index.js97
-rw-r--r--deps/npm/node_modules/init-package-json/package.json53
-rw-r--r--deps/npm/node_modules/init-package-json/test/basic.input2
-rw-r--r--deps/npm/node_modules/init-package-json/test/basic.js33
-rw-r--r--deps/npm/node_modules/init-package-json/test/npm-defaults.js2
-rw-r--r--deps/npm/node_modules/init-package-json/test/scope-in-config.js47
-rw-r--r--deps/npm/node_modules/init-package-json/test/scope.js45
-rw-r--r--deps/npm/node_modules/init-package-json/test/yes-defaults.js27
-rw-r--r--deps/npm/node_modules/lru-cache/README.md16
-rw-r--r--deps/npm/node_modules/lru-cache/lib/lru-cache.js47
-rw-r--r--deps/npm/node_modules/lru-cache/package.json37
-rw-r--r--deps/npm/node_modules/lru-cache/test/basic.js28
-rw-r--r--deps/npm/node_modules/lru-cache/test/foreach.js69
-rw-r--r--deps/npm/node_modules/lru-cache/test/timeout.js21
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md2
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js1
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js1
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile1
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js1
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js1
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js1
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js1
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js1
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js1
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json1
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/glob/package.json2
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json6
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json3
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore5
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml4
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/LICENCE25
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/README.md48
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js19
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js24
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js36
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js30
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js169
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js213
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js191
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js140
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js86
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js14
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js385
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js231
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js271
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/package.json60
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/tar.js173
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js53
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js132
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js367
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgzbin0 -> 19352 bytes
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js183
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js886
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js934
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js359
-rw-r--r--deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js20
-rw-r--r--deps/npm/node_modules/node-gyp/package.json3
-rw-r--r--deps/npm/node_modules/normalize-git-url/.eslintrc19
-rw-r--r--deps/npm/node_modules/normalize-package-data/README.md6
-rw-r--r--deps/npm/node_modules/normalize-package-data/lib/fixer.js42
-rw-r--r--deps/npm/node_modules/normalize-package-data/package.json38
-rw-r--r--deps/npm/node_modules/normalize-package-data/test/normalize.js17
-rw-r--r--deps/npm/node_modules/normalize-package-data/test/typo.js13
-rw-r--r--deps/npm/node_modules/npm-package-arg/npa.js2
-rw-r--r--deps/npm/node_modules/npm-package-arg/package.json40
-rw-r--r--deps/npm/node_modules/npm-package-arg/test/bitbucket.js12
-rw-r--r--deps/npm/node_modules/npm-package-arg/test/github.js20
-rw-r--r--deps/npm/node_modules/npm-package-arg/test/gitlab.js12
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/adduser.js2
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/index.js8
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json5
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json2
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json20
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md2
-rw-r--r--deps/npm/node_modules/npm-registry-client/package.json18
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/README.md2
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js2
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json4
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/.npmignore5
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE18
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/README.md15
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/float.patch923
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js89
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js46
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js951
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js209
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js477
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/README.md3
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/float.patch604
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/lib/util.js107
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/package.json53
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/util.js106
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/README.md54
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/build/build.js209
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/component.json19
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/index.js3
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/package.json53
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/.npmignore2
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/LICENSE20
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/README.md7
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/index.js221
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/package.json54
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/package.json70
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/readable.js7
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/writable.js1
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json21
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js4
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js2
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/README.md4
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/README.md~4
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/LICENSE1
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/README.md3
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/package.json3
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/LICENSE.txt (renamed from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/LICENSE.txt)2
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/README.md (renamed from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/README.md)10
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/index.js (renamed from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/index.js)13
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE.txt (renamed from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/LICENSE.txt)0
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md (renamed from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/README.md)0
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js (renamed from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/index.js)0
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json (renamed from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/package.json)0
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/package.json (renamed from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/package.json)38
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE.txt2
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md4
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js13
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json35
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/LICENSE.txt2
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/README.md4
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/index.js30
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/package.json35
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/LICENSE.txt2
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/README.md4
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/index.js30
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/package.json35
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/package.json3
-rw-r--r--deps/npm/node_modules/npmlog/package.json3
-rw-r--r--deps/npm/node_modules/npmlog/test/progress.js2
-rw-r--r--deps/npm/node_modules/opener/LICENSE.txt2
-rwxr-xr-xdeps/npm/node_modules/opener/opener.js5
-rw-r--r--deps/npm/node_modules/opener/package.json38
-rw-r--r--deps/npm/node_modules/read-installed/node_modules/readdir-scoped-modules/.eslintrc17
-rw-r--r--deps/npm/node_modules/read-installed/node_modules/readdir-scoped-modules/package.json26
-rw-r--r--deps/npm/node_modules/read-installed/package.json12
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/glob/LICENSE15
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/glob/README.md369
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/glob/common.js237
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/glob/glob.js740
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/glob/package.json72
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/glob/sync.js457
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/LICENSE1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/README.md1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/docs/Grammar.md6
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/analyze.js1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/document.js1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_analyze.js1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_errors.js1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_parse.js1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_portable.js1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_tokenize.js1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_updates.js1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/author.yaml1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/deep-object.yaml1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/delete.yaml1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/norm-array.yaml1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/norm-object.yaml1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/npm-array-bin.yaml1
-rw-r--r--deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/pkg-json5.yaml1
-rw-r--r--deps/npm/node_modules/read-package-json/package.json45
-rw-r--r--deps/npm/node_modules/read-package-json/read-json.js615
-rw-r--r--deps/npm/node_modules/read-package-json/test/basic.js75
-rw-r--r--deps/npm/node_modules/read-package-json/test/bin.js68
-rw-r--r--deps/npm/node_modules/read-package-json/test/bom.js31
-rw-r--r--deps/npm/node_modules/read-package-json/test/helpful.js25
-rw-r--r--deps/npm/node_modules/read-package-json/test/non-json.js74
-rw-r--r--deps/npm/node_modules/read-package-json/test/readmes.js41
-rw-r--r--deps/npm/node_modules/realize-package-specifier/package.json33
-rw-r--r--deps/npm/node_modules/realize-package-specifier/test/npa-bitbucket.js12
-rw-r--r--deps/npm/node_modules/realize-package-specifier/test/npa-github.js18
-rw-r--r--deps/npm/node_modules/realize-package-specifier/test/npa-gitlab.js12
-rw-r--r--deps/npm/node_modules/request/.travis.yml4
-rw-r--r--deps/npm/node_modules/request/CHANGELOG.md37
-rw-r--r--deps/npm/node_modules/request/README.md637
-rwxr-xr-xdeps/npm/node_modules/request/index.js162
-rw-r--r--deps/npm/node_modules/request/lib/auth.js32
-rw-r--r--deps/npm/node_modules/request/lib/getProxyFromURI.js4
-rw-r--r--deps/npm/node_modules/request/lib/har.js205
-rw-r--r--deps/npm/node_modules/request/lib/helpers.js48
-rw-r--r--deps/npm/node_modules/request/lib/multipart.js109
-rw-r--r--deps/npm/node_modules/request/lib/oauth.js38
-rw-r--r--deps/npm/node_modules/request/lib/redirect.js154
-rw-r--r--deps/npm/node_modules/request/node_modules/aws-sign2/package.json4
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/package.json3
-rw-r--r--deps/npm/node_modules/request/node_modules/caseless/package.json3
-rw-r--r--deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json6
-rw-r--r--deps/npm/node_modules/request/node_modules/combined-stream/package.json3
-rw-r--r--deps/npm/node_modules/request/node_modules/forever-agent/index.js23
-rw-r--r--deps/npm/node_modules/request/node_modules/forever-agent/package.json37
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json3
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/package.json3
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/LICENSE21
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/README.md341
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/har-validator/bin/har-validator45
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/LICENSE21
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/README.md676
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/changelog.md1630
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.js5095
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.min.js31
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/any.js21
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/assert.js55
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/async.js202
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/bind.js73
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/bluebird.js11
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/call_get.js123
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/cancel.js48
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/captured_trace.js492
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/catch_filter.js66
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/context.js38
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/debuggability.js147
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/direct_resolve.js54
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/each.js12
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/errors.js111
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/es5.js80
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/filter.js12
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/finally.js99
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/generators.js136
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/join.js107
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/map.js131
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/method.js44
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/nodeify.js58
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/progress.js76
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise.js700
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise_array.js142
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise_resolver.js123
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promisify.js291
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/props.js79
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/queue.js90
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/race.js47
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/reduce.js146
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/schedule.js39
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/settle.js40
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/some.js125
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/synchronous_inspection.js94
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/thenables.js89
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/timers.js58
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/using.js202
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/util.js280
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/package.json96
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/index.js100
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/license21
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/index.js56
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/license21
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/package.json79
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/readme.md86
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/index.js11
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/license21
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json69
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/readme.md27
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/cli.js45
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/index.js4
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/license21
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js49
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json63
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md44
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/package.json91
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/readme.md45
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/cli.js29
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/index.js43
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/license21
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/package.json84
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/readme.md46
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/package.json82
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/readme.md197
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/History.md239
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/LICENSE22
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/Readme.md311
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/index.js1051
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/.npmignore3
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/.travis.yml5
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/LICENSE22
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/README.md17
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/index.js12
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/package.json47
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/package.json73
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/.npmignore2
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/.travis.yml3
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/LICENSE21
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/README.md173
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/example.js18
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/formats.js14
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js553
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/.npmignore1
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/.travis.yml3
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/README.md72
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/example.js27
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/index.js61
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json52
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/test.js33
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/.npmignore1
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/.travis.yml3
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/LICENSE21
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/README.md19
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/index.js8
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/.npmignore17
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/LICENSE (renamed from deps/npm/node_modules/child-process-close/README.md)27
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/README.md28
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/is-property.js5
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json58
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json50
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/test.js12
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml6
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md31
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js79
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json60
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js100
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.npmignore1
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/LICENCE19
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/Makefile4
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/README.md32
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/immutable.js17
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/mutable.js15
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json72
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/test.js63
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json62
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/require.js12
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/fixtures/cosmic.js84
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json82
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json88
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json112
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json68
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json107
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/default.json49
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json32
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json113
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json72
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/format.json143
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/items.json46
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json28
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json28
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json28
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json42
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json28
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json28
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json28
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json42
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json60
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/not.json96
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json18
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json68
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json23
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json110
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json92
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json128
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json74
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/required.json39
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/type.json330
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json79
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js23
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js366
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/require-directory/.jshintrc67
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/package.json78
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/error.js10
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/index.js39
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cache.json13
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cacheEntry.json25
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/content.json27
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cookie.json34
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/creator.json18
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/entry.json48
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/har.json11
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/index.js49
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/log.json34
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/page.json30
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/pageTimings.json16
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/postData.json41
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/record.json18
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/request.json55
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/response.json52
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/src/schemas/timings.json40
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml2
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/boom/Makefile9
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md3
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js3
-rw-r--r--[-rwxr-xr-x]deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json25
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js9
-rw-r--r--[-rwxr-xr-x]deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json3
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml2
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md12
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js44
-rw-r--r--deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json19
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js44
-rw-r--r--[-rwxr-xr-x]deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json3
-rw-r--r--[-rwxr-xr-x]deps/npm/node_modules/request/node_modules/hawk/package.json3
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json9
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json5
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json7
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/package.json3
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/LICENSE39
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/LICENSE.md11
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/README.md2
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/package.json18
-rw-r--r--deps/npm/node_modules/request/node_modules/json-stringify-safe/package.json4
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md13
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/README.md3
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md14
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md11
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json18
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json45
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/package.json19
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/bower.json23
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/component.json4
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/package.json15
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/uuid.js10
-rw-r--r--deps/npm/node_modules/request/node_modules/oauth-sign/package.json3
-rw-r--r--deps/npm/node_modules/request/node_modules/qs/.travis.yml4
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/Readme.md11
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/lib/parse.js4
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/lib/stringify.js38
-rw-r--r--deps/npm/node_modules/request/node_modules/qs/package.json21
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/test/parse.js2
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/test/stringify.js30
-rw-r--r--deps/npm/node_modules/request/node_modules/stringstream/package.json7
-rw-r--r--deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json3
-rw-r--r--deps/npm/node_modules/request/node_modules/tunnel-agent/package.json4
-rw-r--r--deps/npm/node_modules/request/package.json41
-rw-r--r--deps/npm/node_modules/request/request.js328
-rw-r--r--deps/npm/node_modules/rimraf/README.md2
-rw-r--r--deps/npm/node_modules/semver/package.json23
-rw-r--r--deps/npm/node_modules/semver/semver.browser.js40
-rw-r--r--deps/npm/node_modules/semver/semver.browser.js.gzbin7786 -> 7970 bytes
-rw-r--r--deps/npm/node_modules/semver/semver.js40
-rw-r--r--deps/npm/node_modules/semver/semver.min.js2
-rw-r--r--deps/npm/node_modules/semver/semver.min.js.gzbin3606 -> 3776 bytes
-rw-r--r--deps/npm/node_modules/semver/test/big-numbers.js31
-rwxr-xr-xdeps/npm/node_modules/strip-ansi/cli.js (renamed from deps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js)0
-rw-r--r--deps/npm/node_modules/strip-ansi/index.js (renamed from deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js)0
-rw-r--r--deps/npm/node_modules/strip-ansi/package.json (renamed from deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json)5
-rw-r--r--deps/npm/node_modules/strip-ansi/readme.md (renamed from deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md)0
-rw-r--r--deps/npm/node_modules/tar/README.md4
-rw-r--r--deps/npm/node_modules/tar/lib/extract.js24
-rw-r--r--deps/npm/node_modules/tar/lib/pack.js7
-rw-r--r--deps/npm/node_modules/tar/lib/parse.js2
-rw-r--r--deps/npm/node_modules/tar/package.json14
-rw-r--r--deps/npm/node_modules/tar/test/cb-never-called-1.0.1.tgzbin0 -> 4096 bytes
-rw-r--r--deps/npm/node_modules/tar/test/dir-normalization.js177
-rw-r--r--deps/npm/node_modules/tar/test/dir-normalization.tarbin0 -> 4608 bytes
-rw-r--r--deps/npm/node_modules/tar/test/error-on-broken.js33
-rw-r--r--deps/npm/node_modules/tar/test/pack.js22
-rw-r--r--deps/npm/package.json50
-rwxr-xr-xdeps/npm/scripts/doc-build.sh2
-rw-r--r--deps/npm/test/common-tap.js83
-rw-r--r--deps/npm/test/fixtures/forked-underscore-1.5.1.tgz (renamed from deps/npm/test/tap/cache-shasum-fork/underscore-1.5.1.tgz)bin583 -> 583 bytes
-rw-r--r--deps/npm/test/fixtures/gitignore-and-npmignore-2.tar (renamed from deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore-2.tar)bin4096 -> 4096 bytes
-rw-r--r--deps/npm/test/fixtures/gitignore-and-npmignore.tar (renamed from deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tar)bin10240 -> 10240 bytes
-rw-r--r--deps/npm/test/fixtures/gitignore-and-npmignore.tgz (renamed from deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tgz)bin360 -> 360 bytes
-rw-r--r--deps/npm/test/fixtures/gitignore.tgz (renamed from deps/npm/test/tap/unpack-foreign-tarball/gitignore.tgz)bin319 -> 319 bytes
-rw-r--r--deps/npm/test/fixtures/npmignore.tgz (renamed from deps/npm/test/tap/unpack-foreign-tarball/npmignore.tgz)bin320 -> 320 bytes
-rw-r--r--deps/npm/test/tap/add-remote-git-fake-windows.js113
-rw-r--r--deps/npm/test/tap/add-remote-git-file.js29
-rw-r--r--deps/npm/test/tap/add-remote-git-get-resolved.js101
-rw-r--r--deps/npm/test/tap/add-remote-git-shrinkwrap.js21
-rw-r--r--deps/npm/test/tap/add-remote-git.js105
-rw-r--r--deps/npm/test/tap/adduser-legacy-auth.js96
-rw-r--r--deps/npm/test/tap/bitbucket-https-url-with-creds-package.js83
-rw-r--r--deps/npm/test/tap/bitbucket-https-url-with-creds.js80
-rw-r--r--deps/npm/test/tap/bitbucket-shortcut-package.js84
-rw-r--r--deps/npm/test/tap/bitbucket-shortcut.js81
-rw-r--r--deps/npm/test/tap/cache-shasum-fork.js154
-rw-r--r--deps/npm/test/tap/circular-dep.js123
-rw-r--r--deps/npm/test/tap/circular-dep/minimist/package.json7
-rw-r--r--deps/npm/test/tap/config-new-cafile.js56
-rw-r--r--deps/npm/test/tap/dedupe.js111
-rw-r--r--deps/npm/test/tap/dedupe/package.json9
-rw-r--r--deps/npm/test/tap/dev-dep-duplicate/desired-ls-results.json9
-rw-r--r--deps/npm/test/tap/dev-dep-duplicate/package.json11
-rw-r--r--deps/npm/test/tap/false-name.js85
-rw-r--r--deps/npm/test/tap/false_name.js55
-rw-r--r--deps/npm/test/tap/false_name/index.js1
-rw-r--r--deps/npm/test/tap/false_name/package.json8
-rw-r--r--deps/npm/test/tap/gist-short-shortcut-package.js84
-rw-r--r--deps/npm/test/tap/gist-short-shortcut.js81
-rw-r--r--deps/npm/test/tap/gist-shortcut-package.js84
-rw-r--r--deps/npm/test/tap/gist-shortcut.js81
-rw-r--r--deps/npm/test/tap/git-cache-locking.js44
-rw-r--r--deps/npm/test/tap/git-dependency-install-link.js21
-rw-r--r--deps/npm/test/tap/github-shortcut-package.js84
-rw-r--r--deps/npm/test/tap/github-shortcut.js81
-rw-r--r--deps/npm/test/tap/gitlab-shortcut-package.js83
-rw-r--r--deps/npm/test/tap/gitlab-shortcut.js80
-rw-r--r--deps/npm/test/tap/ignore-scripts.js134
-rw-r--r--deps/npm/test/tap/ignore-scripts/binding.gyp1
-rw-r--r--deps/npm/test/tap/ignore-scripts/package.json28
-rw-r--r--deps/npm/test/tap/ignore-shrinkwrap.js164
-rw-r--r--deps/npm/test/tap/ignore-shrinkwrap/npm-shrinkwrap.json17
-rw-r--r--deps/npm/test/tap/ignore-shrinkwrap/package.json8
-rw-r--r--deps/npm/test/tap/install-at-locally.js85
-rw-r--r--deps/npm/test/tap/install-at-locally/package@1.2.3/package.json5
-rw-r--r--deps/npm/test/tap/install-cli-production.js108
-rw-r--r--deps/npm/test/tap/install-cli-production/dependency/package.json5
-rw-r--r--deps/npm/test/tap/install-cli-production/dev-dependency/package.json5
-rw-r--r--deps/npm/test/tap/install-cli-production/package.json14
-rw-r--r--deps/npm/test/tap/install-cli-unicode.js84
-rw-r--r--deps/npm/test/tap/install-cli/README.md1
-rw-r--r--deps/npm/test/tap/install-cli/index.js1
-rw-r--r--deps/npm/test/tap/install-cli/package.json10
-rw-r--r--deps/npm/test/tap/install-from-local.js117
-rw-r--r--deps/npm/test/tap/install-from-local/package-local-dependency/package.json5
-rw-r--r--deps/npm/test/tap/install-from-local/package-local-dev-dependency/package.json5
-rw-r--r--deps/npm/test/tap/install-from-local/package-scoped-dependency/package.json5
-rw-r--r--deps/npm/test/tap/install-from-local/package-with-local-paths/package.json10
-rw-r--r--deps/npm/test/tap/install-from-local/package-with-scoped-paths/package.json8
-rw-r--r--deps/npm/test/tap/install-save-exact.js186
-rw-r--r--deps/npm/test/tap/install-save-exact/README.md1
-rw-r--r--deps/npm/test/tap/install-save-exact/index.js1
-rw-r--r--deps/npm/test/tap/install-save-exact/package.json7
-rw-r--r--deps/npm/test/tap/install-save-local.js159
-rw-r--r--deps/npm/test/tap/install-save-local/package-local-dependency/package.json5
-rw-r--r--deps/npm/test/tap/install-save-local/package-local-dev-dependency/package.json5
-rw-r--r--deps/npm/test/tap/install-save-local/package/package.json4
-rw-r--r--deps/npm/test/tap/install-save-prefix.js289
-rw-r--r--deps/npm/test/tap/install-save-prefix/README.md1
-rw-r--r--deps/npm/test/tap/install-save-prefix/index.js1
-rw-r--r--deps/npm/test/tap/install-save-prefix/package.json7
-rw-r--r--deps/npm/test/tap/install-scoped-already-installed.js167
-rw-r--r--deps/npm/test/tap/install-scoped-link.js99
-rw-r--r--deps/npm/test/tap/install-scoped-with-peer-dependency.js60
-rw-r--r--deps/npm/test/tap/install-scoped/package.json7
-rw-r--r--deps/npm/test/tap/install-scoped/world.js1
-rw-r--r--deps/npm/test/tap/install-with-dev-dep-duplicate.js82
-rw-r--r--deps/npm/test/tap/lifecycle-path.js78
-rw-r--r--deps/npm/test/tap/lifecycle-path/package.json1
-rw-r--r--deps/npm/test/tap/lifecycle-path/print-path.js1
-rw-r--r--deps/npm/test/tap/lifecycle-signal.js57
-rw-r--r--deps/npm/test/tap/lifecycle-signal/package.json3
-rw-r--r--deps/npm/test/tap/link.js119
-rw-r--r--deps/npm/test/tap/ls-depth-cli.js161
-rw-r--r--deps/npm/test/tap/ls-depth-unmet.js230
-rw-r--r--deps/npm/test/tap/ls-depth-unmet/package.json10
-rw-r--r--deps/npm/test/tap/ls-depth/package.json8
-rw-r--r--deps/npm/test/tap/ls-env.js52
-rw-r--r--deps/npm/test/tap/ls-l-depth-0.js98
-rw-r--r--deps/npm/test/tap/map-to-registry.js124
-rw-r--r--deps/npm/test/tap/maybe-github.js72
-rw-r--r--deps/npm/test/tap/optional-metadep-rollback-collision.js247
-rw-r--r--deps/npm/test/tap/optional-metadep-rollback-collision/deps/d1/package.json13
-rw-r--r--deps/npm/test/tap/optional-metadep-rollback-collision/deps/d2/blart.js52
-rw-r--r--deps/npm/test/tap/optional-metadep-rollback-collision/deps/d2/package.json15
-rw-r--r--deps/npm/test/tap/optional-metadep-rollback-collision/deps/opdep/bad-server.js35
-rw-r--r--deps/npm/test/tap/optional-metadep-rollback-collision/deps/opdep/package.json15
-rw-r--r--deps/npm/test/tap/optional-metadep-rollback-collision/package.json10
-rw-r--r--deps/npm/test/tap/outdated-color.js77
-rw-r--r--deps/npm/test/tap/outdated-depth.js81
-rw-r--r--deps/npm/test/tap/outdated-depth/README.md1
-rw-r--r--deps/npm/test/tap/outdated-depth/index.js1
-rw-r--r--deps/npm/test/tap/outdated-depth/package.json11
-rw-r--r--deps/npm/test/tap/outdated-git.js35
-rw-r--r--deps/npm/test/tap/outdated-include-devdependencies.js57
-rw-r--r--deps/npm/test/tap/outdated-include-devdependencies/package.json8
-rw-r--r--deps/npm/test/tap/outdated-json.js147
-rw-r--r--deps/npm/test/tap/outdated-long.js123
-rw-r--r--deps/npm/test/tap/outdated-new-versions.js62
-rw-r--r--deps/npm/test/tap/outdated-new-versions/package.json11
-rw-r--r--deps/npm/test/tap/outdated.js118
-rw-r--r--deps/npm/test/tap/outdated/README.md1
-rw-r--r--deps/npm/test/tap/outdated/index.js1
-rw-r--r--deps/npm/test/tap/outdated/package.json10
-rw-r--r--deps/npm/test/tap/package-with-peer-dep/package.json7
-rw-r--r--deps/npm/test/tap/peer-deps-invalid.js127
-rw-r--r--deps/npm/test/tap/peer-deps-invalid/file-fail.js10
-rw-r--r--deps/npm/test/tap/peer-deps-invalid/file-ok.js11
-rw-r--r--deps/npm/test/tap/peer-deps-invalid/package.json9
-rw-r--r--deps/npm/test/tap/peer-deps-toplevel.js102
-rw-r--r--deps/npm/test/tap/peer-deps-toplevel/desired-ls-results.json20
-rw-r--r--deps/npm/test/tap/peer-deps-toplevel/package.json11
-rw-r--r--deps/npm/test/tap/peer-deps-without-package-json.js85
-rw-r--r--deps/npm/test/tap/peer-deps-without-package-json/.gitkeep0
-rw-r--r--deps/npm/test/tap/peer-deps-without-package-json/file-js.js11
-rw-r--r--deps/npm/test/tap/peer-deps.js88
-rw-r--r--deps/npm/test/tap/peer-deps/desired-ls-results.json17
-rw-r--r--deps/npm/test/tap/peer-deps/package.json8
-rw-r--r--deps/npm/test/tap/prune.js153
-rw-r--r--deps/npm/test/tap/prune/package.json13
-rw-r--r--deps/npm/test/tap/publish-scoped.js8
-rw-r--r--deps/npm/test/tap/run-script.js4
-rw-r--r--deps/npm/test/tap/scripts-whitespace-windows.js109
-rw-r--r--deps/npm/test/tap/scripts-whitespace-windows/README.md1
-rw-r--r--deps/npm/test/tap/scripts-whitespace-windows/dep/README.md1
-rw-r--r--deps/npm/test/tap/scripts-whitespace-windows/dep/bin/foo4
-rw-r--r--deps/npm/test/tap/scripts-whitespace-windows/dep/package.json6
-rw-r--r--deps/npm/test/tap/scripts-whitespace-windows/package.json11
-rw-r--r--deps/npm/test/tap/search.js325
-rw-r--r--deps/npm/test/tap/shrinkwrap-dev-dependency.js27
-rw-r--r--deps/npm/test/tap/shrinkwrap-empty-deps.js98
-rw-r--r--deps/npm/test/tap/shrinkwrap-empty-deps/package.json7
-rw-r--r--deps/npm/test/tap/shrinkwrap-prod-dependency.js8
-rw-r--r--deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js82
-rw-r--r--deps/npm/test/tap/shrinkwrap-shared-dev-dependency/desired-shrinkwrap-results.json12
-rw-r--r--deps/npm/test/tap/shrinkwrap-shared-dev-dependency/package.json11
-rw-r--r--deps/npm/test/tap/startstop.js76
-rw-r--r--deps/npm/test/tap/startstop/package.json7
-rw-r--r--deps/npm/test/tap/umask-lifecycle.js58
-rw-r--r--deps/npm/test/tap/uninstall-package.js103
-rw-r--r--deps/npm/test/tap/uninstall-package/package.json11
-rw-r--r--deps/npm/test/tap/unpack-foreign-tarball.js98
-rw-r--r--deps/npm/test/tap/update-index.js226
-rw-r--r--deps/npm/test/tap/update-save.js270
-rw-r--r--deps/npm/test/tap/update-save/README.md1
-rw-r--r--deps/npm/test/tap/update-save/index.js1
-rw-r--r--deps/npm/test/tap/update-save/package.json10
-rw-r--r--deps/npm/test/tap/url-dependencies.js131
-rw-r--r--deps/npm/test/tap/url-dependencies/package.json8
-rw-r--r--deps/npm/test/tap/version-message-config.js62
-rw-r--r--deps/npm/test/tap/version-update-shrinkwrap.js289
939 files changed, 42215 insertions, 10867 deletions
diff --git a/deps/npm/.mailmap b/deps/npm/.mailmap
index 1f5332c470..c9117dde31 100644
--- a/deps/npm/.mailmap
+++ b/deps/npm/.mailmap
@@ -1,7 +1,7 @@
-Arlo Breault <arlolra@gmail.com>
Alex K. Wolfe <alexkwolfe@gmail.com>
Andrew Bradley <cspotcode@gmail.com>
Andrew Lunny <alunny@gmail.com>
+Arlo Breault <arlolra@gmail.com>
Benjamin Coe <bencoe@gmail.com>
Brian White <mscdex@mscdex.net> <mscdex@gmail.com>
Charlie Robbins <charlie.robbins@gmail.com>
@@ -9,8 +9,8 @@ Dalmais Maxence <root@ip-10-195-202-5.ec2.internal>
David Beitey <david@davidjb.com>
Domenic Denicola <domenic@domenicdenicola.com>
Einar Otto Stangvik <einaros@gmail.com>
-Evan Lucas <evan@btc.com> <evanlucas@me.com>
Evan Lucas <evan@btc.com> <evan.lucas@hattiesburgclinic.com>
+Evan Lucas <evan@btc.com> <evanlucas@me.com>
Faiq Raza <faiqrazarizvi@gmail.com>
Forbes Lindesay <forbes@lindesay.co.uk>
Forrest L Norvell <ogd@aoaioxxysz.net> <forrest@npmjs.com>
@@ -22,16 +22,20 @@ Jake Verbaten <raynos2@gmail.com>
James Sanders <jimmyjazz14@gmail.com>
Jason Smith <jhs@iriscouch.com>
Jonas Weber <github@jonasw.de>
+Julien Meddah <julien.meddah@deveryware.com>
Kris Windham <kriswindham@gmail.com>
Lin Clark <lin.w.clark@gmail.com>
Maciej Małecki <me@mmalecki.com> <maciej.malecki@notimplemented.org>
-Maximilian Antoni <mail@maxantoni.de> <maximilian.antoni@juliusbaer.com>
-Maxim Bogushevich <boga1@mail.ru>
Max Goodman <c@chromakode.com>
+Maxim Bogushevich <boga1@mail.ru>
+Maximilian Antoni <mail@maxantoni.de> <maximilian.antoni@juliusbaer.com>
Nicolas Morel <marsup@gmail.com>
Olivier Melcher <olivier.melcher@gmail.com>
+Ra'Shaun Stovall <rashaunstovall@gmail.com>
+Rebecca Turner <me@re-becca.org> <turner@mikomi.org>
Ryan Emery <seebees@gmail.com>
Sam Mikes <smikes@cubane.com>
+Takaya Kobayashi <jigsaw@live.jp>
Tony <zearin@gonk.net>
Visnu Pitiyanuvath <visnupx@gmail.com>
Will Elwood <w.elwood08@gmail.com>
diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml
index 3ed21bf417..e971a85534 100644
--- a/deps/npm/.travis.yml
+++ b/deps/npm/.travis.yml
@@ -8,7 +8,7 @@ env:
- DEPLOY_VERSION=testing
before_install:
- "npm config set spin false"
- - "npm install -g npm@~2"
+ - "npm install -g npm/npm"
- "sudo mkdir -p /var/run/couchdb"
script: "npm run-script test-all"
notifications:
diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS
index 0ccd3b04e1..94afe5752b 100644
--- a/deps/npm/AUTHORS
+++ b/deps/npm/AUTHORS
@@ -201,7 +201,7 @@ Chulki Lee <chulki.lee@gmail.com>
dead_horse <dead_horse@qq.com>
Kenan Yildirim <kenan@kenany.me>
Laurie Voss <git@seldo.com>
-Rebecca Turner <turner@mikomi.org>
+Rebecca Turner <me@re-becca.org>
Hunter Loftis <hunter@hunterloftis.com>
Peter Richardson <github@zoomy.net>
Jussi Kalliokoski <jussi.kalliokoski@gmail.com>
@@ -264,3 +264,10 @@ Oli Evans <oli@zilla.org.uk>
Matt Brennan <mattyb1000@gmail.com>
Jeff Barczewski <jeff.barczewski@gmail.com>
Danny Fritz <dannyfritz@gmail.com>
+Takaya Kobayashi <jigsaw@live.jp>
+Ra'Shaun Stovall <rashaunstovall@gmail.com>
+Julien Meddah <julien.meddah@deveryware.com>
+Michiel Sikma <michiel@wedemandhtml.com>
+Jakob Krigovsky <jakob.krigovsky@gmail.com>
+Charmander <~@charmander.me>
+erik wienhold <git@ewie.name>
diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md
index ee2004cd5b..e34f36772c 100644
--- a/deps/npm/CHANGELOG.md
+++ b/deps/npm/CHANGELOG.md
@@ -1,3 +1,500 @@
+### v2.8.4 (2015-04-16):
+
+This is the fourth release of npm this week, so it's mostly just landing a few
+small outstanding PRs on dependencies and some tiny documentation tweaks.
+`npm@2.8.3` is where the real action is.
+
+* [`ee2bd77`](https://github.com/npm/npm/commit/ee2bd77f3c64d38735d1d31028224a5c40422a9b)
+ [#7983](https://github.com/npm/npm/issues/7983) `tar@2.1.0`: Better error
+ reporting in corrupted tar files, and add support for the `fromBase` flag
+ (rescued from the dustbin of history by
+ [@deanmarano](https://github.com/deanmarano)).
+ ([@othiym23](https://github.com/othiym23))
+* [`d8eee6c`](https://github.com/npm/npm/commit/d8eee6cf9d2ff7aca68dfaed2de76824a3e0d9af)
+ `init-package-json@1.4.1`: Add support for a default author, and only add
+ scope to a package name once. ([@othiym23](https://github.com/othiym23))
+* [`4fc5d98`](https://github.com/npm/npm/commit/4fc5d98b785f601c60d4dc0a2c8674f0cccf6262)
+ `lru-cache@2.6.1`: Small tweaks to cache value aging and entry counting that
+ are irrelevant to npm. ([@isaacs](https://github.com/isaacs))
+* [`1fe5840`](https://github.com/npm/npm/commit/1fe584089f5bef133de5518aa26eaf6064be2bf7)
+ [#7946](https://github.com/npm/npm/issues/7946) Make `npm init` text
+ friendlier. ([@sandfox](https://github.com/sandfox))
+
+### v2.8.3 (2015-04-15):
+
+#### TWO SMALL GIT TWEAKS
+
+This is the last of a set of releases intended to ensure npm's git support is
+robust enough that we can stop working on it for a while. These fixes are
+small, but prevent a common crasher and clear up one of the more confusing
+error messages coming out of npm when working with repositories hosted on git.
+
+* [`387f889`](https://github.com/npm/npm/commit/387f889c0e8fb617d9cc9a42ed0a3ec49424ab5d)
+ [#7961](https://github.com/npm/npm/issues/7961) Ensure that hosted git SSH
+ URLs always have a valid protocol when stored in `resolved` fields in
+ `npm-shrinkwrap.json`. ([@othiym23](https://github.com/othiym23))
+* [`394c2f5`](https://github.com/npm/npm/commit/394c2f5a1227232c0baf42fbba1402aafe0d6ffb)
+ Switch the order in which hosted Git providers are checked to `git:`,
+ `git+https:`, then `git+ssh:` (from `git:`, `git+ssh:`, then `git+https:`) in
+ an effort to go from most to least likely to succeed, to make for less
+ confusing error message. ([@othiym23](https://github.com/othiym23))
+
+### v2.8.2 (2015-04-14):
+
+#### PEACE IN OUR TIME
+
+npm has been having an issue with CouchDB's web server since the release
+of io.js and Node.js 0.12.0 that has consumed a huge amount of my time
+to little visible effect. Sam Mikes picked up the thread from me, and
+after a [_lot_ of effort](https://github.com/npm/npm/issues/7699#issuecomment-93091111)
+figured out that ultimately there are probably a couple problems with
+the new HTTP Agent keep-alive handling in new versions of Node. In
+addition, `npm-registry-client` was gratuitously sending a body along
+with a GET request which was triggering the bugs. Sam removed about 10 bytes from
+one file in `npm-registry-client`, and this problem, which has been bugging us for months,
+completely went away.
+
+In conclusion, Sam Mikes is great, and anybody using a private registry
+hosted on CouchDB should thank him for his hard work. Also, thanks to
+the community at large for pitching in on this bug, which has been
+around for months now.
+
+* [`431c3bf`](https://github.com/npm/npm/commit/431c3bf6cdec50f9f0c735f478cb2f3f337d3313)
+ [#7699](https://github.com/npm/npm/issues/7699) `npm-registry-client@6.3.2`:
+ Don't send body with HTTP GET requests when logging in.
+ ([@smikes](https://github.com/smikes))
+
+### v2.8.1 (2015-04-12):
+
+#### CORRECTION: NPM'S GIT INTEGRATION IS DOING OKAY
+
+A [helpful bug report](https://github.com/npm/npm/issues/7872#issuecomment-91809553)
+led to another round of changes to
+[`hosted-git-info`](https://github.com/npm/hosted-git-info/commit/827163c74531b69985d1ede7abced4861e7b0cd4),
+some additional test-writing, and a bunch of hands-on testing against actual
+private repositories. While the complexity of npm's git dependency handling is
+nearly fractal (because npm is very complex, and git is even more complex),
+it's feeling way more solid than it has for a while. We think this is a
+substantial improvement over what we had before, so give `npm@2.8.1` a shot if
+you have particularly complex git use cases and
+[let us know](https://github.com/npm/npm/issues/new) how it goes.
+
+(NOTE: These changes mostly affect cloning and saving references to packages
+hosted in git repositories, and don't address some known issues with things
+like lifecycle scripts not being run on npm dependencies. Work continues on
+other issues that affect parity between git and npm registry packages.)
+
+* [`66377c6`](https://github.com/npm/npm/commit/66377c6ece2cf4d53d9a618b7d9824e1452bc293)
+ [#7872](https://github.com/npm/npm/issues/7872) `hosted-git-info@2.1.2`: Pass
+ through credentials embedded in SSH and HTTPs git URLs.
+ ([@othiym23](https://github.com/othiym23))
+* [`15efe12`](https://github.com/npm/npm/commit/15efe124753257728a0ddc64074fa5a4b9c2eb30)
+ [#7872](https://github.com/npm/npm/issues/7872) Use the new version of
+ `hosted-git-info` to pass along credentials embedded in git URLs. Test it.
+ Test it a lot. ([@othiym23](https://github.com/othiym23))
+
+#### SCOPED DEPENDENCIES AND PEER DEPENDENCIES: NOT QUITE REESE'S
+
+Big thanks to [@ewie](https://github.com/ewie) for identifying an issue with
+how npm was handling `peerDependencies` that were implicitly installed from the
+`package.json` files of scoped dependencies. This
+[will be a moot point](https://github.com/npm/npm/issues/6565#issuecomment-74971689)
+with the release of `npm@3`, but until then, it's important that
+`peerDependency` auto-installation work as expected.
+
+* [`b027319`](https://github.com/npm/npm/commit/b0273190c71eba14395ddfdd1d9f7ba625297523)
+ [#7920](https://github.com/npm/npm/issues/7920) Scoped packages with
+ `peerDependencies` were installing the `peerDependencies` into the wrong
+ directory. ([@ewie](https://github.com/ewie))
+* [`649e31a`](https://github.com/npm/npm/commit/649e31ae4fd02568bae5dc6b4ea783431ce3d63e)
+ [#7920](https://github.com/npm/npm/issues/7920) Test `peerDependency`
+ installs involving scoped packages using `npm-package-arg` instead of simple
+ path tests, for consistency. ([@othiym23](https://github.com/othiym23))
+
+#### MAKING IT EASIER TO WRITE NPM TESTS, VERSION 0.0.1
+
+[@iarna](https://github.com/iarna) and I
+([@othiym23](https://github.com/othiym23)) have been discussing a
+[candidate plan](https://github.com/npm/npm/wiki/rewriting-npm's-tests:-a-plan-maybe)
+for improving npm's test suite, with the goal of making it easier for new
+contributors to get involved with npm by reducing the learning curve
+necessary to be able to write good tests for proposed changes. This is the
+first substantial piece of that effort. Here's what the commit message for
+[`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf)
+had to say about this work:
+
+> It's too difficult for npm contributors to figure out what the conventional
+> style is for tests. Part of the problem is that the documentation in
+> CONTRIBUTING.md is inadequate, but another important factor is that the tests
+> themselves are written in a variety of styles. One of the most notable
+> examples of this is the fact that many tests use fixture directories to store
+> precooked test scenarios and package.json files.
+>
+> This had some negative consequences:
+>
+> * tests weren't idempotent
+> * subtle dependencies between tests existed
+> * new tests get written in this deprecated style because it's not
+> obvious that the style is out of favor
+> * it's hard to figure out why a lot of those directories existed,
+> because they served a variety of purposes, so it was difficult to
+> tell when it was safe to remove them
+>
+> All in all, the fixture directories were a major source of technical debt, and
+> cleaning them up, while time-consuming, makes the whole test suite much more
+> approachable, and makes it more likely that new tests written by outside
+> contributors will follow a conventional style. To support that, all of the
+> tests touched by this changed were cleaned up to pass the `standard` style
+> checker.
+
+And here's a little extra context from a comment I left on [#7929](https://github.com/npm/npm/issues/7929):
+
+> One of the other things that encouraged me was looking at this
+> [presentation on technical debt](http://www.slideshare.net/nnja/pycon-2015-technical-debt-the-monster-in-your-closet)
+> from Pycon 2015, especially slide 53, which I interpreted in terms of
+> difficulty getting new contributors to submit patches to an OSS project like
+> npm. npm has a long ways to go, but I feel good about this change.
+
+* [`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf)
+ [#7929](https://github.com/npm/npm/issues/7929) Eliminate fixture directories
+ from `test/tap`, leaving each test self-contained.
+ ([@othiym23](https://github.com/othiym23))
+* [`4928d30`](https://github.com/npm/npm/commit/4928d30140821c63e03fffed73f8d88ebdc43710)
+ [#7929](https://github.com/npm/npm/issues/7929) Move fixture files from
+ `test/tap/*` to `test/fixtures`. ([@othiym23](https://github.com/othiym23))
+* [`e925deb`](https://github.com/npm/npm/commit/e925debca91092a814c1a00933babc3a8cf975be)
+ [#7929](https://github.com/npm/npm/issues/7929) Tweak the run scripts to stop
+ slaughtering the CPU on doc rebuild.
+ ([@othiym23](https://github.com/othiym23))
+* [`65bf7cf`](https://github.com/npm/npm/commit/65bf7cffaf91c426b676c47529eee796f8b8b75c)
+ [#7923](https://github.com/npm/npm/issues/7923) Use an alias of scripts and
+ run-scripts in `npm run test-all` ([@watilde](https://github.com/watilde))
+* [`756a3fb`](https://github.com/npm/npm/commit/756a3fbb852a2469afe706635ed88d22c37743e5)
+ [#7923](https://github.com/npm/npm/issues/7923) Sync timeout time of `npm
+ run-script test-all` to be the same as `test` and `tap` scripts.
+ ([@watilde](https://github.com/watilde))
+* [`8299b5f`](https://github.com/npm/npm/commit/8299b5fb6373354a7fbaab6f333863758812ae90)
+ Set a timeout for tap tests for `npm run-script test-all`.
+ ([@othiym23](https://github.com/othiym23))
+
+#### THE EVER-BEATING DRUM OF DEPENDENCY UPDATES
+
+* [`d90d0b9`](https://github.com/npm/npm/commit/d90d0b992acbf62fd5d68debf9d1dbd6cfa20804)
+ [#7924](https://github.com/npm/npm/issues/7924) Remove `child-process-close`,
+ as it was included for Node 0.6 compatibility, and npm no longer supports
+ 0.6. ([@robertkowalski](https://github.com/robertkowalski))
+* [`16427c1`](https://github.com/npm/npm/commit/16427c1f3ea3d71ee753c62eb4c2663c7b32b84f)
+ `lru-cache@2.5.2`: More accurate updating of expiry times when `maxAge` is
+ set. ([@isaacs](https://github.com/isaacs))
+* [`03cce83`](https://github.com/npm/npm/commit/03cce83b64344a9e0fe036dce214f4d68cfcc9e7)
+ `nock@1.6.0`: Mocked network error handling.
+ ([@pgte](https://github.com/pgte))
+* [`f93b1f0`](https://github.com/npm/npm/commit/f93b1f0b7eb5d1b8a7967e837bbd756db1091d00)
+ `glob@5.0.5`: Use `path-is-absolute` polyfill, allowing newer Node.js and
+ io.js versions to use `path.isAbsolute()`.
+ ([@sindresorhus](https://github.com/sindresorhus))
+* [`a70d694`](https://github.com/npm/npm/commit/a70d69495a6e96997e64855d9e749d943ee6d64f)
+ `request@2.55.0`: Bug fixes and simplification.
+ ([@simov](https://github.com/simov))
+* [`2aecc6f`](https://github.com/npm/npm/commit/2aecc6f4083526feeb14615b4e5484edc66175b5)
+ `columnify@1.5.1`: Switch to using babel from 6to5.
+ ([@timoxley](https://github.com/timoxley))
+
+### v2.8.0 (2015-04-09):
+
+#### WE WILL NEVER BE DONE FIXING NPM'S GIT SUPPORT
+
+If you look at [the last release's release
+notes](https://github.com/npm/npm/blob/master/CHANGELOG.md#git-mean-git-tuff-git-all-the-way-away-from-my-stuff),
+you will note that they confidently assert that it's perfectly OK to force all
+GitHub URLs through the same `git:` -> `git+ssh:` fallback flow for cloning. It
+turns out that many users depend on `git+https:` URLs in their build
+environments because they use GitHub auth tokens instead of SSH keys. Also, in
+some cases you just want to be able to explicitly say how a given dependency
+should be cloned from GitHub.
+
+Because of the way we resolved the inconsistency in GitHub shorthand handling
+[before](https://github.com/npm/npm/blob/master/CHANGELOG.md#bug-fixes-1), this
+turned out to be difficult to work around. So instead of hacking around it, we
+completely redid how git is handled within npm and its attendant packages.
+Again. This time, we changed things so that `normalize-package-data` and
+`read-package-json` leave more of the git logic to npm itself, which makes
+handling shorthand syntax consistently much easier, and also allows users to
+resume using explicit, fully-qualified git URLs without npm messing with them.
+
+Here's a summary of what's changed:
+
+* Instead of converting the GitHub shorthand syntax to a `git+ssh:`, `git:`, or
+ `git+https:` URL and saving that, save the shorthand itself to
+ `package.json`.
+* If presented with shortcuts, try cloning via the git protocol, SSH, and HTTPS
+ (in that order).
+* No longer prompt for credentials -- it didn't work right with the spinner,
+ and wasn't guaranteed to work anyway. We may experiment with doing this a
+ better way in the future. Users can override this by setting `GIT_ASKPASS` in
+ their environment if they want to experiment with interactive cloning, but
+ should also set `--no-spin` on the npm command line (or run `npm config set
+ spin=false`).
+* **EXPERIMENTAL FEATURE**: Add support for `github:`, `gist:`, `bitbucket:`,
+ and `gitlab:` shorthand prefixes. GitHub shortcuts will continue to be
+ normalized to `org/repo` instead of being saved as `github:org/repo`, but
+ `gitlab:`, `gist:`, and `bitbucket:` prefixes will be used on the command
+ line and from `package.json`. BE CAREFUL WITH THIS. `package.json` files
+ published with the new shorthand syntax can _only_ be read by `npm@2.8.0` and
+ later, and this feature is mostly meant for playing around with it. If you
+ want to save git dependencies in a form that older versions of npm can read,
+ use `--save-exact`, which will save the git URL and resolved commit hash of
+ the head of the branch in a manner similar to the way that `--save-exact`
+ pins versions for registry dependencies. This is documented (so check `npm
+ help install` for details), but we're not going to make a lot of noise about
+ it until it has a chance to bake in a little more.
+
+It is [@othiym23](https://github.com/othiym23)'s sincere hope that this will
+resolve all of the inconsistencies users were seeing with GitHub and git-hosted
+packages, but given the level of change here, that may just be a fond wish.
+Extra testing of this change is requested.
+
+* [`6b0f588`](https://github.com/npm/npm/commit/6b0f58877f37df9904490ffbaaad33862bd36dce)
+ [#7867](https://github.com/npm/npm/issues/7867) Use git shorthand and git
+ URLs as presented by user. Support new `hosted-git-info` shortcut syntax.
+ Save shorthand in `package.json`. Try cloning via `git:`, `git+ssh:`, and
+ `git+https:`, in that order, when supported by the underlying hosting
+ provider. ([@othiym23](https://github.com/othiym23))
+* [`75d4267`](https://github.com/npm/npm/commit/75d426787869d54ca7400408f562f971b34649ef)
+ [#7867](https://github.com/npm/npm/issues/7867) Document new GitHub, GitHub
+ gist, Bitbucket, and GitLab shorthand syntax.
+ ([@othiym23](https://github.com/othiym23))
+* [`7d92c75`](https://github.com/npm/npm/commit/7d92c7592998d90ec883fa989ca74f04ec1b93de)
+ [#7867](https://github.com/npm/npm/issues/7867) When `--save-exact` is used
+ with git shorthand or URLs, save the fully-resolved URL, with branch name
+ resolved to the exact hash for the commit checked out.
+ ([@othiym23](https://github.com/othiym23))
+* [`9220e59`](https://github.com/npm/npm/commit/9220e59f8def8c82c6d331a39ba29ad4c44e3a9b)
+ [#7867](https://github.com/npm/npm/issues/7867) Ensure that non-prefixed and
+ non-normalized GitHub shortcuts are saved to `package.json`.
+ ([@othiym23](https://github.com/othiym23))
+* [`dd398e9`](https://github.com/npm/npm/commit/dd398e98a8eba27eeba84378200da3d078fdf980)
+ [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.1`:
+ Ensure that `gist:` shorthand survives being round-tripped through
+ `package.json`. ([@othiym23](https://github.com/othiym23))
+* [`33d1420`](https://github.com/npm/npm/commit/33d1420bf2f629332fceb2ac7e174e63ac48f96a)
+ [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.0`: Add
+ support for auth embedded directly in git URLs.
+ ([@othiym23](https://github.com/othiym23))
+* [`23a1d5a`](https://github.com/npm/npm/commit/23a1d5a540e8db27f5cd0245de7c3694e2bddad1)
+ [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.0.2`: Make
+ it possible to determine in which form a hosted git URL was passed.
+ ([@iarna](https://github.com/iarna))
+* [`eaf75ac`](https://github.com/npm/npm/commit/eaf75acb718611ad5cfb360084ec86938d9c66c5)
+ [#7867](https://github.com/npm/npm/issues/7867)
+ `normalize-package-data@2.0.0`: Normalize GitHub specifiers so they pass
+ through shortcut syntax and preserve explicit URLs.
+ ([@iarna](https://github.com/iarna))
+* [`95e0535`](https://github.com/npm/npm/commit/95e0535e365e0aca49c634dd2061a0369b0475f1)
+ [#7867](https://github.com/npm/npm/issues/7867) `npm-package-arg@4.0.0`: Add
+ git URL and shortcut to hosted git spec and use `hosted-git-info@2.0.2`.
+ ([@iarna](https://github.com/iarna))
+* [`a808926`](https://github.com/npm/npm/commit/a8089268d5f3d57f42dbaba02ff6437da5121191)
+ [#7867](https://github.com/npm/npm/issues/7867)
+ `realize-package-specifier@3.0.0`: Use `npm-package-arg@4.0.0` and test
+ shortcut specifier behavior. ([@iarna](https://github.com/iarna))
+* [`6dd1e03`](https://github.com/npm/npm/commit/6dd1e039bddf8cf5383343f91d84bc5d78acd083)
+ [#7867](https://github.com/npm/npm/issues/7867) `init-package-json@1.4.0`:
+ Allow dependency on `read-package-json@2.0.0`.
+ ([@iarna](https://github.com/iarna))
+* [`63254bb`](https://github.com/npm/npm/commit/63254bb6358f66752aca6aa1a275271b3ae03f7c)
+ [#7867](https://github.com/npm/npm/issues/7867) `read-installed@4.0.0`: Use
+ `read-package-json@2.0.0`. ([@iarna](https://github.com/iarna))
+* [`254b887`](https://github.com/npm/npm/commit/254b8871f5a173bb464cc5b0ace460c7878b8097)
+ [#7867](https://github.com/npm/npm/issues/7867) `read-package-json@2.0.0`:
+ Use `normalize-package-data@2.0.0`. ([@iarna](https://github.com/iarna))
+* [`0b9f8be`](https://github.com/npm/npm/commit/0b9f8be62fe5252abe54d49e36a696f4816c2eca)
+ [#7867](https://github.com/npm/npm/issues/7867) `npm-registry-client@6.3.0`:
+ Mark compatibility with `normalize-package-data@2.0.0` and
+ `npm-package-arg@4.0.0`. ([@iarna](https://github.com/iarna))
+* [`f40ecaa`](https://github.com/npm/npm/commit/f40ecaad68f77abc50eb6f5b224e31dec3d250fc)
+ [#7867](https://github.com/npm/npm/issues/7867) Extract a common method to
+ use when cloning git repos for testing.
+ ([@othiym23](https://github.com/othiym23))
+
+#### TEST FIXES FOR NODE 0.8
+
+npm continues to [get closer](https://github.com/npm/npm/issues/7842) to being
+completely green on Travis for Node 0.8.
+
+* [`26d36e9`](https://github.com/npm/npm/commit/26d36e9cf0eca69fe1863d2ea536c28555b9e8de)
+ [#7842](https://github.com/npm/npm/issues/7842) When spawning child
+ processes, map exit code 127 to ENOENT so Node 0.8 handles child process
+ failures the same as later versions.
+ ([@SonicHedgehog](https://github.com/SonicHedgehog))
+* [`54cd895`](https://github.com/npm/npm/commit/54cd8956ea783f96749e46597d8c2cb9397c5d5f)
+ [#7842](https://github.com/npm/npm/issues/7842) Node 0.8 requires -e with -p
+ when evaluating snippets; fix test.
+ ([@SonicHedgehog](https://github.com/SonicHedgehog))
+
+#### SMALL FIX AND DOC TWEAK
+
+* [`20e9003`](https://github.com/npm/npm/commit/20e90031b847e9f7c7168f3dad8b1e526f9a2586)
+ `tar@2.0.1`: Fix regression where relative symbolic links within an
+ extraction root that pointed within an extraction root would get normalized
+ to absolute symbolic links. ([@isaacs](https://github.com/isaacs))
+* [`2ef8898`](https://github.com/npm/npm/commit/2ef88989c41bee1578570bb2172c90ede129dbd1)
+ [#7879](https://github.com/npm/npm/issues/7879) Better document that `npm
+ publish --tag=foo` will not set `latest` to that version.
+ ([@linclark](https://github.com/linclark))
+
+### v2.7.6 (2015-04-02):
+
+#### GIT MEAN, GIT TUFF, GIT ALL THE WAY AWAY FROM MY STUFF
+
+Part of the reason that we're reluctant to take patches to how npm deals with
+git dependencies is that every time we touch the git support, something breaks.
+The last few releases are a case in point. `npm@2.7.4` completely broke
+installing private modules from GitHub, and `npm@2.7.5` fixed them at the cost
+of logging a misleading error message that caused many people to believe that
+their dependencies hadn't been successfully installed when they actually had
+been.
+
+This all started from a desire to ensure that GitHub shortcut syntax is being
+handled correctly. The correct behavior is for npm to try to clone all
+dependencies on GitHub (whether they're specified with the GitHub
+`organization/repository` shortcut syntax or not) via the plain `git:` protocol
+first, and to fall back to using `git+ssh:` if `git:` doesn't work. Previously,
+sometimes npm would use `git:` and `git+ssh:` in some cases (most notably when
+using GitHub shortcut syntax on the command line), and use `git+https:` in
+others (when the GitHub shortcut syntax was present in `package.json`). This
+led to subtle and hard-to-understand inconsistencies, and we're glad that as of
+`npm@2.7.6`, we've finally gotten things to where they were before we started,
+only slightly more consistent overall.
+
+We are now going to go back to our policy of being extremely reluctant to touch
+the code that handles Git dependencies.
+
+* [`b747593`](https://github.com/npm/npm/commit/b7475936f473f029e6a027ba1b16277523747d0b)
+ [#7630](https://github.com/npm/npm/issues/7630) Don't automatically log all
+ git failures as errors. `maybeGithub` needs to be able to fail without
+ logging to support its fallback logic.
+ ([@othiym23](https://github.com/othiym23))
+* [`cd67a0d`](https://github.com/npm/npm/commit/cd67a0db07891d20871822696c26692c8a84866a)
+ [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote
+ URL, handle failures gracefully (without assuming standard output exists).
+ ([@othiym23](https://github.com/othiym23))
+* [`637c7d1`](https://github.com/npm/npm/commit/637c7d1411fe07f409cf91f2e65fd70685cb253c)
+ [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote
+ URL, handle failures gracefully (without assuming standard _error_ exists).
+ ([@othiym23](https://github.com/othiym23))
+
+#### OTHER SIGNIFICANT FIXES
+
+* [`78005eb`](https://github.com/npm/npm/commit/78005ebb6f4103c20f077669c3929b7ea46a4c0d)
+ [#7743](https://github.com/npm/npm/issues/7743) Always quote arguments passed
+ to `npm run-script`. This allows build systems and the like to safely escape
+ glob patterns passed as arguments to `run-scripts` with `npm run-script
+ <script> -- <arguments>`. This is a tricky change to test, and may be
+ reverted or moved to `npm@3` if it turns out it breaks things for users.
+ ([@mantoni](https://github.com/mantoni))
+* [`da015ee`](https://github.com/npm/npm/commit/da015eee45f6daf384598151d06a9b57ffce136e)
+ [#7074](https://github.com/npm/npm/issues/7074) `read-package-json@1.3.3`:
+ `read-package-json` no longer caches `package.json` files, which trades a
+ very small performance loss for the elimination of a large class of really
+ annoying race conditions. See [#7074](https://github.com/npm/npm/issues/7074)
+ for the grisly details. ([@othiym23](https://github.com/othiym23))
+* [`dd20f57`](https://github.com/npm/npm/commit/dd20f5755291b9433f0d298ee0eead22cda6db36)
+ `init-package-json@1.3.2`: Only add the `@` to scoped package names if it's
+ not already there when reading from the filesystem
+ ([@watilde](https://github.com/watilde)), and support inline validation of
+ package names ([@michaelnisi](https://github.com/michaelnisi)).
+
+#### SMALL FIXES AND DEPENDENCY UPGRADES
+
+* [`1f380f6`](https://github.com/npm/npm/commit/1f380f66c1e944b8ffbf096fa94d09e931626e12)
+ [#7820](https://github.com/npm/npm/issues/7820) `are-we-there-yet@1.0.4`: Use
+ `readable-stream` instead of built-in `stream` module to better support
+ Node.js 0.8.x. ([@SonicHedgehog](https://github.com/SonicHedgehog))
+* [`d380188`](https://github.com/npm/npm/commit/d380188e161be31f5a4f53947de6bc28df4732d8)
+ `semver@4.3.3`: Don't throw on `semver.parse(null)`, and parse numeric
+ version strings more robustly. ([@isaacs](https://github.com/isaacs))
+* [`01d9964`](https://github.com/npm/npm/commit/01d99649265f921e1c61cf406613e7042bcea008)
+ `nock@1.4.0`: This change may need to be rolled back, or rolled forward,
+ because [nock depends on
+ `setImmediate`](https://github.com/npm/npm/issues/7842), which causes tests
+ to fail when run with Node.js 0.8. ([@othiym23](https://github.com/othiym23))
+* [`91f5cb1`](https://github.com/npm/npm/commit/91f5cb1fb91520fbe25a4da5b80848ed540b9ad3)
+ [#7791](https://github.com/npm/npm/issues/7791) Fix brackets in npmconf so
+ that `loaded` is set correctly.
+ ([@charmander](https://github.com/charmander))
+* [`1349e27`](https://github.com/npm/npm/commit/1349e27c936a8b0fc9f6440a6d6404ef3b19c587)
+ [#7818](https://github.com/npm/npm/issues/7818) Update `README.md` to point
+ out that the install script now lives on https://www.npmjs.com.
+ ([@weisjohn](https://github.com/weisjohn))
+
+### v2.7.5 (2015-03-26):
+
+#### SECURITY FIXES
+
+* [`300834e`](https://github.com/npm/npm/commit/300834e91a4e2a95fb7fb59c309e7c3fc91d2312)
+ `tar@2.0.0`: Normalize symbolic links that point to targets outside the
+ extraction root. This prevents packages containing symbolic links from
+ overwriting targets outside the expected paths for a package. Thanks to [Tim
+ Cuthbertson](http://gfxmonk.net/) and the team at [Lift
+ Security](https://liftsecurity.io/) for working with the npm team to identify
+ this issue. ([@othiym23](https://github.com/othiym23))
+* [`0dc6875`](https://github.com/npm/npm/commit/0dc68757cffd5397c280bc71365d106523a5a052)
+ `semver@4.3.2`: Package versions can be no more than 256 characters long.
+ This prevents a situation in which parsing the version number can use
+ exponentially more time and memory to parse, leading to a potential denial of
+ service. Thanks to Adam Baldwin at Lift Security for bringing this to our
+ attention. ([@isaacs](https://github.com/isaacs))
+
+#### BUG FIXES
+
+* [`5811468`](https://github.com/npm/npm/commit/5811468e104ccb6b26b8715dff390d68daa10066)
+ [#7713](https://github.com/npm/npm/issues/7713) Add a test for `npm link` and
+ `npm link <package>`. ([@watilde](https://github.com/watilde))
+* [`3cf3b0c`](https://github.com/npm/npm/commit/3cf3b0c8fddb6b66f969969feebea85fabd0360b)
+ [#7713](https://github.com/npm/npm/issues/7713) Only use absolute symbolic
+ links when `npm link`ing. ([@hokaccha](https://github.com/hokaccha))
+* [`f35aa93`](https://github.com/npm/npm/commit/f35aa933e136228a89e3fcfdebe8c7cc4f1e7c00)
+ [#7443](https://github.com/npm/npm/issues/7443) Keep relative URLs when
+ hitting search endpoint. ([@othiym23](https://github.com/othiym23))
+* [`eab6184`](https://github.com/npm/npm/commit/eab618425c51e3aa4416da28dcd8ca4ba63aec41)
+ [#7766](https://github.com/npm/npm/issues/7766) One last tweak to ensure that
+ GitHub shortcuts work with private repositories.
+ ([@iarna](https://github.com/iarna))
+* [`5d7f704`](https://github.com/npm/npm/commit/5d7f704823f5f92ddd7ff3e7dd2b8bcc66c73005)
+ [#7656](https://github.com/npm/npm/issues/7656) Don't try to load a deleted
+ CA file, allowing the `cafile` config to be changed.
+ ([@KenanY](https://github.com/KenanY))
+* [`a840a13`](https://github.com/npm/npm/commit/a840a13bbf0330157536381ea8e58d0bd93b4c05)
+ [#7746](https://github.com/npm/npm/issues/7746) Only fix up URL paths when
+ there are paths to fix up. ([@othiym23](https://github.com/othiym23))
+
+#### DEPENDENCY UPDATES
+
+* [`94df809`](https://github.com/npm/npm/commit/94df8095985bf5ba9d8db99dc445d05dac136aaf)
+ `request@2.54.0`: Fixes for Node.js 0.12 and io.js.
+ ([@simov](https://github.com/simov))
+* [`98a13ea`](https://github.com/npm/npm/commit/98a13eafdf098b53069ad15297008fcab9c61653)
+ `opener@1.4.1`: Deal with `start` on Windows more conventionally.
+ ([@domenic](https://github.com/domenic))
+* [`c2417c7`](https://github.com/npm/npm/commit/c2417c7702459a446f07d43ca3c4e99bde7fe9d6)
+ `require-inject@1.2.0`: Add installGlobally to bypass cleanups.
+ ([@iarna](https://github.com/iarna))
+
+#### DOCUMENTATION FIXES
+
+* [`f87c728`](https://github.com/npm/npm/commit/f87c728f8732c9e977c0dc2060c0610649e79155)
+ [#7696](https://github.com/npm/npm/issues/7696) Months and minutes were
+ swapped in doc-build.sh ([@MeddahJ](https://github.com/MeddahJ))
+* [`4e216b2`](https://github.com/npm/npm/commit/4e216b29b30463f06afe6e3c645e205da5f50922)
+ [#7752](https://github.com/npm/npm/issues/7752) Update string examples to be
+ properly quoted. ([@snuggs](https://github.com/snuggs))
+* [`402f52a`](https://github.com/npm/npm/commit/402f52ab201efa348feb87cad753fc4b91e8a3fb)
+ [#7635](https://github.com/npm/npm/issues/7635) Clarify Windows installation
+ instructions. ([@msikma](https://github.com/msikma))
+* [`c910399`](https://github.com/npm/npm/commit/c910399ecfd8db49fe4496dd26887765a8aed20f)
+ small typo fix to `CHANGELOG.md` ([@e-jigsaw](https://github.com/e-jigsaw))
+
### v2.7.4 (2015-03-20):
#### BUG FIXES
@@ -105,7 +602,7 @@
* [`6823807`](https://github.com/npm/npm/commit/6823807bba6c00228a724e1205ae90d67df0adad)
[#7121](https://github.com/npm/npm/issues/7121) `npm install --save` for Git
dependencies saves the URL passed in, instead of the temporary directory used
- to clone the remote repo. Fixes using Git dependencies when shrinkwwapping.
+ to clone the remote repo. Fixes using Git dependencies when shrinkwrapping.
In the process, rewrote the Git dependency caching code. Again. No more
single-letter variable names, and a much clearer workflow.
([@othiym23](https://github.com/othiym23))
diff --git a/deps/npm/README.md b/deps/npm/README.md
index 9ed084297a..f696825009 100644
--- a/deps/npm/README.md
+++ b/deps/npm/README.md
@@ -40,7 +40,7 @@ There's a pretty robust install script at
Here's an example using curl:
- curl -L https://npmjs.com/install.sh | sh
+ curl -L https://www.npmjs.com/install.sh | sh
### Slightly Fancier
@@ -64,11 +64,11 @@ for testing, or running stuff without actually installing npm itself.)
## Windows Install or Upgrade
-You can download a zip file from <https://github.com/npm/npm/releases>, and unpack it
-in the same folder where node.exe lives.
+You can download a zip file from <https://github.com/npm/npm/releases>, and
+unpack it in the `node_modules\npm\` folder inside node's installation folder.
-The latest version in a zip file is 1.4.12. To upgrade to npm 2, follow the
-Windows upgrade instructions in the npm Troubleshooting Guide:
+To upgrade to npm 2, follow the Windows upgrade instructions in
+the npm Troubleshooting Guide:
<https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows>
diff --git a/deps/npm/bin/node-gyp-bin/node-gyp.cmd b/deps/npm/bin/node-gyp-bin/node-gyp.cmd
index a8c18cdb0a..a05fd8caed 100755
--- a/deps/npm/bin/node-gyp-bin/node-gyp.cmd
+++ b/deps/npm/bin/node-gyp-bin/node-gyp.cmd
@@ -1,5 +1,5 @@
-if not defined npm_config_node_gyp (
- node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
-) else (
- %npm_config_node_gyp% %*
-)
+if not defined npm_config_node_gyp (
+ node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
+) else (
+ %npm_config_node_gyp% %*
+)
diff --git a/deps/npm/doc/cli/npm-dist-tag.md b/deps/npm/doc/cli/npm-dist-tag.md
index f8e4566ca7..ce4f7ed4d5 100644
--- a/deps/npm/doc/cli/npm-dist-tag.md
+++ b/deps/npm/doc/cli/npm-dist-tag.md
@@ -33,7 +33,8 @@ When installing dependencies, a preferred tagged version may be specified:
This also applies to `npm dedupe`.
-Publishing a package always sets the "latest" tag to the published version.
+Publishing a package sets the "latest" tag to the published version unless the
+`--tag` option is used. For example, `npm publish --tag=beta`.
## PURPOSE
diff --git a/deps/npm/doc/cli/npm-install.md b/deps/npm/doc/cli/npm-install.md
index acc221d31f..6c732c4f67 100644
--- a/deps/npm/doc/cli/npm-install.md
+++ b/deps/npm/doc/cli/npm-install.md
@@ -164,15 +164,51 @@ after packing it up into a tarball (b).
npm install mygithubuser/myproject
- To reference a package in a git repo that is not on GitHub, see git
- remote urls below.
+ To reference a package in a generic git repo (not on GitHub), see git remote
+ urls below.
+
+* `npm install github:<githubname>/<githubrepo>`:
+
+ The same as the above, but explicitly marked as a GitHub dependency.
+
+ Example:
+
+ npm install github:npm/npm
+
+* `npm install gist:[<githubname>/]<gistID>`:
+
+ Install the package at `https://gist.github.com/gistID` by attempting to
+ clone it using `git`. The GitHub username associated with the gist is
+ optional and will not be saved in `package.json` if `--save` is used.
+
+ Example:
+
+ npm install gist:101a11beef
+
+* `npm install bitbucket:<bitbucketname>/<bitbucketrepo>`:
+
+ Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo`
+ by attempting to clone it using `git`.
+
+ Example:
+
+ npm install bitbucket:mybitbucketuser/myproject
+
+* `npm install gitlab:<gitlabname>/<gitlabrepo>`:
+
+ Install the package at `https://gitlab.com/gitlabname/gitlabrepo`
+ by attempting to clone it using `git`.
+
+ Example:
+
+ npm install gitlab:mygitlabuser/myproject
* `npm install <git remote url>`:
Install a package by cloning a git remote url. The format of the git
url is:
- <protocol>://[<user>@]<hostname><separator><path>[#<commit-ish>]
+ <protocol>://[<user>[:<password>]@]<hostname><separator><path>[#<commit-ish>]
`<protocol>` is one of `git`, `git+ssh`, `git+http`, or
`git+https`. If no `<commit-ish>` is specified, then `master` is
diff --git a/deps/npm/doc/cli/npm-link.md b/deps/npm/doc/cli/npm-link.md
index d634e3458c..b6d0c143ad 100644
--- a/deps/npm/doc/cli/npm-link.md
+++ b/deps/npm/doc/cli/npm-link.md
@@ -39,7 +39,7 @@ For example:
Now, any changes to ~/projects/node-redis will be reflected in
~/projects/node-bloggy/node_modules/node-redis/. Note that the link should
-be to the package name, not the directory name for that package.
+be to the package name, not the directory name for that package.
You may also shortcut the two steps in one. For example, to do the
above use-case in a shorter way:
diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md
index 3f29a8c35c..b1c8f210f4 100644
--- a/deps/npm/doc/files/package.json.md
+++ b/deps/npm/doc/files/package.json.md
@@ -114,7 +114,7 @@ is an object with a "name" field and optionally "url" and "email", like this:
Or you can shorten that all into a single string, and npm will parse it for you:
- "Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)
+ "Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)"
Both email and url are optional either way.
@@ -272,11 +272,17 @@ The URL should be a publicly available (perhaps read-only) url that can be hande
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It's for computers.
-For GitHub repositories you can use the same shortcut syntax you use for `npm
-install`:
+For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same
+shortcut syntax you use for `npm install`:
"repository": "npm/npm"
+ "repository": "gist:11081aaa281"
+
+ "repository": "bitbucket:example/repo"
+
+ "repository": "gitlab:another/repo"
+
## scripts
The "scripts" property is a dictionary containing script commands that are run
diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md
index e727e16664..d96b07fb6b 100644
--- a/deps/npm/doc/misc/npm-config.md
+++ b/deps/npm/doc/misc/npm-config.md
@@ -3,7 +3,7 @@ npm-config(7) -- More than you probably want to know about npm configuration
## DESCRIPTION
-npm gets its configuration values from 6 sources, in this priority:
+npm gets its configuration values from the following sources, sorted by priority:
### Command Line Flags
diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html
index 72c7ec0136..af9e717187 100644
--- a/deps/npm/html/doc/README.html
+++ b/deps/npm/html/doc/README.html
@@ -32,7 +32,7 @@ paths, etc.) then read on.</p>
<p>There&#39;s a pretty robust install script at
<a href="https://www.npmjs.com/install.sh">https://www.npmjs.com/install.sh</a>. You can download that and run it.</p>
<p>Here&#39;s an example using curl:</p>
-<pre><code>curl -L https://npmjs.com/install.sh | sh
+<pre><code>curl -L https://www.npmjs.com/install.sh | sh
</code></pre><h3 id="slightly-fancier">Slightly Fancier</h3>
<p>You can set any npm configuration params with that script:</p>
<pre><code>npm_config_prefix=/some/path sh install.sh
@@ -46,10 +46,10 @@ arbitrary config keys using the <code>./configure --key=val ...</code>, and then
run npm commands by doing <code>node cli.js &lt;cmd&gt; &lt;args&gt;</code>. (This is helpful
for testing, or running stuff without actually installing npm itself.)</p>
<h2 id="windows-install-or-upgrade">Windows Install or Upgrade</h2>
-<p>You can download a zip file from <a href="https://github.com/npm/npm/releases">https://github.com/npm/npm/releases</a>, and unpack it
-in the same folder where node.exe lives.</p>
-<p>The latest version in a zip file is 1.4.12. To upgrade to npm 2, follow the
-Windows upgrade instructions in the npm Troubleshooting Guide:</p>
+<p>You can download a zip file from <a href="https://github.com/npm/npm/releases">https://github.com/npm/npm/releases</a>, and
+unpack it in the <code>node_modules\npm\</code> folder inside node&#39;s installation folder.</p>
+<p>To upgrade to npm 2, follow the Windows upgrade instructions in
+the npm Troubleshooting Guide:</p>
<p><a href="https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows">https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows</a></p>
<p>If that&#39;s not fancy enough for you, then you can fetch the code with
git, and mess with it directly.</p>
@@ -126,7 +126,7 @@ specific purpose, or lack of malice in any given npm package.</p>
<p>If you have a complaint about a package in the public npm registry,
and cannot <a href="https://docs.npmjs.com/misc/disputes">resolve it with the package
owner</a>, please email
-<a href="&#x6d;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#115;&#x75;&#x70;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#112;&#x6d;&#106;&#x73;&#x2e;&#x63;&#x6f;&#x6d;">&#115;&#x75;&#x70;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#112;&#x6d;&#106;&#x73;&#x2e;&#x63;&#x6f;&#x6d;</a> and explain the situation.</p>
+<a href="&#109;&#97;&#105;&#108;&#x74;&#x6f;&#x3a;&#x73;&#x75;&#112;&#x70;&#111;&#x72;&#x74;&#x40;&#110;&#x70;&#109;&#x6a;&#115;&#x2e;&#x63;&#111;&#x6d;">&#x73;&#x75;&#112;&#x70;&#111;&#x72;&#x74;&#x40;&#110;&#x70;&#109;&#x6a;&#115;&#x2e;&#x63;&#111;&#x6d;</a> and explain the situation.</p>
<p>Any data published to The npm Registry (including user account
information) may be removed or modified at the sole discretion of the
npm server administrators.</p>
@@ -169,5 +169,5 @@ will no doubt tell you to put the output in a gist or email.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@2.7.4</p>
+<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html
index 3fd6088c58..df663bbc3f 100644
--- a/deps/npm/html/doc/api/npm-bin.html
+++ b/deps/npm/html/doc/api/npm-bin.html
@@ -28,5 +28,5 @@ to the <code>npm.bin</code> property.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-bin &mdash; npm@2.7.4</p>
+<p id="footer">npm-bin &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html
index 2eb2c43488..38ff025dc9 100644
--- a/deps/npm/html/doc/api/npm-bugs.html
+++ b/deps/npm/html/doc/api/npm-bugs.html
@@ -33,5 +33,5 @@ friendly for programmatic use.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-bugs &mdash; npm@2.7.4</p>
+<p id="footer">npm-bugs &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html
index 0cb4d14cfd..369af85273 100644
--- a/deps/npm/html/doc/api/npm-cache.html
+++ b/deps/npm/html/doc/api/npm-cache.html
@@ -42,5 +42,5 @@ incrementation.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-cache &mdash; npm@2.7.4</p>
+<p id="footer">npm-cache &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html
index 7fcced1b69..19b12418ee 100644
--- a/deps/npm/html/doc/api/npm-commands.html
+++ b/deps/npm/html/doc/api/npm-commands.html
@@ -36,5 +36,5 @@ usage, or <code>man 3 npm-&lt;command&gt;</code> for programmatic usage.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-commands &mdash; npm@2.7.4</p>
+<p id="footer">npm-commands &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html
index b1b6801e6a..cdca1f39c5 100644
--- a/deps/npm/html/doc/api/npm-config.html
+++ b/deps/npm/html/doc/api/npm-config.html
@@ -57,5 +57,5 @@ functions instead.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-config &mdash; npm@2.7.4</p>
+<p id="footer">npm-config &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html
index eb3572ad55..fa4b88a995 100644
--- a/deps/npm/html/doc/api/npm-deprecate.html
+++ b/deps/npm/html/doc/api/npm-deprecate.html
@@ -47,5 +47,5 @@ a deprecation warning to all who attempt to install it.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-deprecate &mdash; npm@2.7.4</p>
+<p id="footer">npm-deprecate &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html
index ca14313c03..ecbc4f53e8 100644
--- a/deps/npm/html/doc/api/npm-docs.html
+++ b/deps/npm/html/doc/api/npm-docs.html
@@ -33,5 +33,5 @@ friendly for programmatic use.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-docs &mdash; npm@2.7.4</p>
+<p id="footer">npm-docs &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html
index 73c306cee2..3845ed62a3 100644
--- a/deps/npm/html/doc/api/npm-edit.html
+++ b/deps/npm/html/doc/api/npm-edit.html
@@ -36,5 +36,5 @@ and how this is used.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-edit &mdash; npm@2.7.4</p>
+<p id="footer">npm-edit &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html
index 79f4093633..561b58a4dc 100644
--- a/deps/npm/html/doc/api/npm-explore.html
+++ b/deps/npm/html/doc/api/npm-explore.html
@@ -31,5 +31,5 @@ sure to use <code>npm rebuild &lt;pkg&gt;</code> if you make any changes.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-explore &mdash; npm@2.7.4</p>
+<p id="footer">npm-explore &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html
index 1245b350b3..3f712ef90d 100644
--- a/deps/npm/html/doc/api/npm-help-search.html
+++ b/deps/npm/html/doc/api/npm-help-search.html
@@ -44,5 +44,5 @@ Name of the file that matched</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-help-search &mdash; npm@2.7.4</p>
+<p id="footer">npm-help-search &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html
index 0ec6d0c7a9..c070ca2859 100644
--- a/deps/npm/html/doc/api/npm-init.html
+++ b/deps/npm/html/doc/api/npm-init.html
@@ -39,5 +39,5 @@ then go ahead and use this programmatically.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-init &mdash; npm@2.7.4</p>
+<p id="footer">npm-init &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html
index bdc174d03c..fdf46b2b4e 100644
--- a/deps/npm/html/doc/api/npm-install.html
+++ b/deps/npm/html/doc/api/npm-install.html
@@ -32,5 +32,5 @@ installed or when an error has been encountered.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-install &mdash; npm@2.7.4</p>
+<p id="footer">npm-install &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html
index 1ce84e0618..08e7d665c2 100644
--- a/deps/npm/html/doc/api/npm-link.html
+++ b/deps/npm/html/doc/api/npm-link.html
@@ -42,5 +42,5 @@ the package in the current working directory</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-link &mdash; npm@2.7.4</p>
+<p id="footer">npm-link &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html
index 4a99f46334..7ff77ad9fc 100644
--- a/deps/npm/html/doc/api/npm-load.html
+++ b/deps/npm/html/doc/api/npm-load.html
@@ -37,5 +37,5 @@ config object.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-load &mdash; npm@2.7.4</p>
+<p id="footer">npm-load &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html
index 8bd1400e97..ebc3224c0b 100644
--- a/deps/npm/html/doc/api/npm-ls.html
+++ b/deps/npm/html/doc/api/npm-ls.html
@@ -63,5 +63,5 @@ dependency will only be output once.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-ls &mdash; npm@2.7.4</p>
+<p id="footer">npm-ls &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html
index e81d4ad97c..1944792443 100644
--- a/deps/npm/html/doc/api/npm-outdated.html
+++ b/deps/npm/html/doc/api/npm-outdated.html
@@ -28,5 +28,5 @@ currently outdated.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-outdated &mdash; npm@2.7.4</p>
+<p id="footer">npm-outdated &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html
index c501d1b383..2248eeb0c1 100644
--- a/deps/npm/html/doc/api/npm-owner.html
+++ b/deps/npm/html/doc/api/npm-owner.html
@@ -47,5 +47,5 @@ that is not implemented at this time.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-owner &mdash; npm@2.7.4</p>
+<p id="footer">npm-owner &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html
index 01b0291a0d..dc5362dd1d 100644
--- a/deps/npm/html/doc/api/npm-pack.html
+++ b/deps/npm/html/doc/api/npm-pack.html
@@ -33,5 +33,5 @@ overwritten the second time.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-pack &mdash; npm@2.7.4</p>
+<p id="footer">npm-pack &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html
index f063710709..5b905676f0 100644
--- a/deps/npm/html/doc/api/npm-prefix.html
+++ b/deps/npm/html/doc/api/npm-prefix.html
@@ -29,5 +29,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-prefix &mdash; npm@2.7.4</p>
+<p id="footer">npm-prefix &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html
index f7929be9df..5b33b8cce2 100644
--- a/deps/npm/html/doc/api/npm-prune.html
+++ b/deps/npm/html/doc/api/npm-prune.html
@@ -30,5 +30,5 @@ package&#39;s dependencies list.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-prune &mdash; npm@2.7.4</p>
+<p id="footer">npm-prune &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html
index 6d53de2723..8cc53f7459 100644
--- a/deps/npm/html/doc/api/npm-publish.html
+++ b/deps/npm/html/doc/api/npm-publish.html
@@ -46,5 +46,5 @@ the registry. Overwrites when the &quot;force&quot; environment variable is set
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-publish &mdash; npm@2.7.4</p>
+<p id="footer">npm-publish &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html
index 93b4fe4935..331ae4b2a8 100644
--- a/deps/npm/html/doc/api/npm-rebuild.html
+++ b/deps/npm/html/doc/api/npm-rebuild.html
@@ -30,5 +30,5 @@ the new binary. If no &#39;packages&#39; parameter is specify, every package wil
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-rebuild &mdash; npm@2.7.4</p>
+<p id="footer">npm-rebuild &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html
index 75f841d5fe..bc76cda29b 100644
--- a/deps/npm/html/doc/api/npm-repo.html
+++ b/deps/npm/html/doc/api/npm-repo.html
@@ -33,5 +33,5 @@ friendly for programmatic use.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-repo &mdash; npm@2.7.4</p>
+<p id="footer">npm-repo &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html
index f1133a38ff..5708d3dd3c 100644
--- a/deps/npm/html/doc/api/npm-restart.html
+++ b/deps/npm/html/doc/api/npm-restart.html
@@ -52,5 +52,5 @@ behavior will be accompanied by an increase in major version number</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-restart &mdash; npm@2.7.4</p>
+<p id="footer">npm-restart &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html
index 85c2df9af5..9a78ea6f26 100644
--- a/deps/npm/html/doc/api/npm-root.html
+++ b/deps/npm/html/doc/api/npm-root.html
@@ -29,5 +29,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-root &mdash; npm@2.7.4</p>
+<p id="footer">npm-root &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html
index 3655f4c286..e61d568f7a 100644
--- a/deps/npm/html/doc/api/npm-run-script.html
+++ b/deps/npm/html/doc/api/npm-run-script.html
@@ -41,5 +41,5 @@ assumed to be the command to run. All other elements are ignored.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-run-script &mdash; npm@2.7.4</p>
+<p id="footer">npm-run-script &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html
index 83f59d0af9..816cc2977d 100644
--- a/deps/npm/html/doc/api/npm-search.html
+++ b/deps/npm/html/doc/api/npm-search.html
@@ -53,5 +53,5 @@ like).</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-search &mdash; npm@2.7.4</p>
+<p id="footer">npm-search &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html
index d40c5bd112..2758f319a0 100644
--- a/deps/npm/html/doc/api/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/api/npm-shrinkwrap.html
@@ -33,5 +33,5 @@ been saved.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-shrinkwrap &mdash; npm@2.7.4</p>
+<p id="footer">npm-shrinkwrap &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html
index 608de64957..d0b5b5283b 100644
--- a/deps/npm/html/doc/api/npm-start.html
+++ b/deps/npm/html/doc/api/npm-start.html
@@ -28,5 +28,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-start &mdash; npm@2.7.4</p>
+<p id="footer">npm-start &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html
index dd31b08e89..101418f7c1 100644
--- a/deps/npm/html/doc/api/npm-stop.html
+++ b/deps/npm/html/doc/api/npm-stop.html
@@ -28,5 +28,5 @@ in the <code>packages</code> parameter.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-stop &mdash; npm@2.7.4</p>
+<p id="footer">npm-stop &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html
index 935da0c26b..94970b9f09 100644
--- a/deps/npm/html/doc/api/npm-tag.html
+++ b/deps/npm/html/doc/api/npm-tag.html
@@ -36,5 +36,5 @@ used. For more information about how to set this config, check
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-tag &mdash; npm@2.7.4</p>
+<p id="footer">npm-tag &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html
index ccc93c07ca..004b7a165c 100644
--- a/deps/npm/html/doc/api/npm-test.html
+++ b/deps/npm/html/doc/api/npm-test.html
@@ -30,5 +30,5 @@ in the <code>packages</code> parameter.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-test &mdash; npm@2.7.4</p>
+<p id="footer">npm-test &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html
index 739796752b..76b22b19b3 100644
--- a/deps/npm/html/doc/api/npm-uninstall.html
+++ b/deps/npm/html/doc/api/npm-uninstall.html
@@ -30,5 +30,5 @@ uninstalled or when an error has been encountered.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-uninstall &mdash; npm@2.7.4</p>
+<p id="footer">npm-uninstall &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html
index 4ce0faadfd..8b5f0c46a1 100644
--- a/deps/npm/html/doc/api/npm-unpublish.html
+++ b/deps/npm/html/doc/api/npm-unpublish.html
@@ -33,5 +33,5 @@ the root package entry is removed from the registry entirely.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-unpublish &mdash; npm@2.7.4</p>
+<p id="footer">npm-unpublish &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html
index 52be0c53c6..c60b25f204 100644
--- a/deps/npm/html/doc/api/npm-update.html
+++ b/deps/npm/html/doc/api/npm-update.html
@@ -33,5 +33,5 @@ parameter will be called when done or when an error occurs.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-update &mdash; npm@2.7.4</p>
+<p id="footer">npm-update &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html
index 5d96ffe812..3b9a8d6dd1 100644
--- a/deps/npm/html/doc/api/npm-version.html
+++ b/deps/npm/html/doc/api/npm-version.html
@@ -32,5 +32,5 @@ not have exactly one element. The only element should be a version number.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-version &mdash; npm@2.7.4</p>
+<p id="footer">npm-version &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html
index df2f03c40f..61ff364c26 100644
--- a/deps/npm/html/doc/api/npm-view.html
+++ b/deps/npm/html/doc/api/npm-view.html
@@ -81,5 +81,5 @@ the field name.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-view &mdash; npm@2.7.4</p>
+<p id="footer">npm-view &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html
index 017f49618a..0a9f75d8e3 100644
--- a/deps/npm/html/doc/api/npm-whoami.html
+++ b/deps/npm/html/doc/api/npm-whoami.html
@@ -29,5 +29,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-whoami &mdash; npm@2.7.4</p>
+<p id="footer">npm-whoami &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html
index 74cd146f8e..3f1dee14bf 100644
--- a/deps/npm/html/doc/api/npm.html
+++ b/deps/npm/html/doc/api/npm.html
@@ -23,7 +23,7 @@ npm.load([configObject, ]function (er, npm) {
npm.commands.install([&quot;package&quot;], cb)
})
</code></pre><h2 id="version">VERSION</h2>
-<p>2.7.4</p>
+<p>2.8.4</p>
<h2 id="description">DESCRIPTION</h2>
<p>This is the API documentation for npm.
To find documentation of the command line
@@ -109,5 +109,5 @@ method names. Use the <code>npm.deref</code> method to find the real name.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm &mdash; npm@2.7.4</p>
+<p id="footer">npm &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html
index a4aea8b89d..415ea5df4a 100644
--- a/deps/npm/html/doc/cli/npm-access.html
+++ b/deps/npm/html/doc/cli/npm-access.html
@@ -75,5 +75,5 @@ with an HTTP 402 status code (logically enough), unless you use
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-access &mdash; npm@2.7.4</p>
+<p id="footer">npm-access &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html
index c7865b4e14..97599f19ea 100644
--- a/deps/npm/html/doc/cli/npm-adduser.html
+++ b/deps/npm/html/doc/cli/npm-adduser.html
@@ -68,5 +68,5 @@ precedence over any global configuration.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-adduser &mdash; npm@2.7.4</p>
+<p id="footer">npm-adduser &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html
index 94b778bd9f..850a5b5368 100644
--- a/deps/npm/html/doc/cli/npm-bin.html
+++ b/deps/npm/html/doc/cli/npm-bin.html
@@ -35,5 +35,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-bin &mdash; npm@2.7.4</p>
+<p id="footer">npm-bin &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html
index 04a23c05b6..e715ce3856 100644
--- a/deps/npm/html/doc/cli/npm-bugs.html
+++ b/deps/npm/html/doc/cli/npm-bugs.html
@@ -54,5 +54,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-bugs &mdash; npm@2.7.4</p>
+<p id="footer">npm-bugs &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html
index 4dfe30b3db..82bbfcddb5 100644
--- a/deps/npm/html/doc/cli/npm-build.html
+++ b/deps/npm/html/doc/cli/npm-build.html
@@ -38,5 +38,5 @@ A folder containing a <code>package.json</code> file in its root.</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-build &mdash; npm@2.7.4</p>
+<p id="footer">npm-build &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html
index 298d7ebb18..c073c70faa 100644
--- a/deps/npm/html/doc/cli/npm-bundle.html
+++ b/deps/npm/html/doc/cli/npm-bundle.html
@@ -31,5 +31,5 @@ install packages into the local space.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-bundle &mdash; npm@2.7.4</p>
+<p id="footer">npm-bundle &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html
index 781f252776..1e502d8dae 100644
--- a/deps/npm/html/doc/cli/npm-cache.html
+++ b/deps/npm/html/doc/cli/npm-cache.html
@@ -81,5 +81,5 @@ they do not make an HTTP request to the registry.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-cache &mdash; npm@2.7.4</p>
+<p id="footer">npm-cache &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html
index 14ee7e7686..fc2fa12e01 100644
--- a/deps/npm/html/doc/cli/npm-completion.html
+++ b/deps/npm/html/doc/cli/npm-completion.html
@@ -42,5 +42,5 @@ completions based on the arguments.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-completion &mdash; npm@2.7.4</p>
+<p id="footer">npm-completion &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html
index 6afdbb4bf5..b1319a489c 100644
--- a/deps/npm/html/doc/cli/npm-config.html
+++ b/deps/npm/html/doc/cli/npm-config.html
@@ -66,5 +66,5 @@ global config.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-config &mdash; npm@2.7.4</p>
+<p id="footer">npm-config &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html
index aac9b262ab..8442e64f1b 100644
--- a/deps/npm/html/doc/cli/npm-dedupe.html
+++ b/deps/npm/html/doc/cli/npm-dedupe.html
@@ -63,5 +63,5 @@ versions.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-dedupe &mdash; npm@2.7.4</p>
+<p id="footer">npm-dedupe &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html
index 57dc15ea08..fe1a2d49fd 100644
--- a/deps/npm/html/doc/cli/npm-deprecate.html
+++ b/deps/npm/html/doc/cli/npm-deprecate.html
@@ -38,5 +38,5 @@ something like this:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-deprecate &mdash; npm@2.7.4</p>
+<p id="footer">npm-deprecate &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html
index 855b3370d8..2bc242a831 100644
--- a/deps/npm/html/doc/cli/npm-dist-tag.html
+++ b/deps/npm/html/doc/cli/npm-dist-tag.html
@@ -35,7 +35,8 @@ of using a specific version number:</p>
</code></pre><p>When installing dependencies, a preferred tagged version may be specified:</p>
<pre><code>npm install --tag &lt;tag&gt;
</code></pre><p>This also applies to <code>npm dedupe</code>.</p>
-<p>Publishing a package always sets the &quot;latest&quot; tag to the published version.</p>
+<p>Publishing a package sets the &quot;latest&quot; tag to the published version unless the
+<code>--tag</code> option is used. For example, <code>npm publish --tag=beta</code>.</p>
<h2 id="purpose">PURPOSE</h2>
<p>Tags can be used to provide an alias instead of version numbers. For
example, <code>npm</code> currently uses the tag &quot;next&quot; to identify the upcoming
@@ -76,5 +77,5 @@ begin with a number or the letter <code>v</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-dist-tag &mdash; npm@2.7.4</p>
+<p id="footer">npm-dist-tag &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html
index 57bca77658..744b929dea 100644
--- a/deps/npm/html/doc/cli/npm-docs.html
+++ b/deps/npm/html/doc/cli/npm-docs.html
@@ -56,5 +56,5 @@ the current folder and use the <code>name</code> property.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-docs &mdash; npm@2.7.4</p>
+<p id="footer">npm-docs &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html
index e62355b4ba..e97b201dcd 100644
--- a/deps/npm/html/doc/cli/npm-edit.html
+++ b/deps/npm/html/doc/cli/npm-edit.html
@@ -49,5 +49,5 @@ or <code>&quot;notepad&quot;</code> on Windows.</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-edit &mdash; npm@2.7.4</p>
+<p id="footer">npm-edit &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html
index 11e2852fe7..32de30041a 100644
--- a/deps/npm/html/doc/cli/npm-explore.html
+++ b/deps/npm/html/doc/cli/npm-explore.html
@@ -49,5 +49,5 @@ Windows</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-explore &mdash; npm@2.7.4</p>
+<p id="footer">npm-explore &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html
index 00e24251d8..d19f7a4ed5 100644
--- a/deps/npm/html/doc/cli/npm-help-search.html
+++ b/deps/npm/html/doc/cli/npm-help-search.html
@@ -46,5 +46,5 @@ where the terms were found in the documentation.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-help-search &mdash; npm@2.7.4</p>
+<p id="footer">npm-help-search &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html
index e27a7041b5..8c88874c90 100644
--- a/deps/npm/html/doc/cli/npm-help.html
+++ b/deps/npm/html/doc/cli/npm-help.html
@@ -52,5 +52,5 @@ matches are equivalent to specifying a topic name.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-help &mdash; npm@2.7.4</p>
+<p id="footer">npm-help &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html
index f440313882..eff69630e9 100644
--- a/deps/npm/html/doc/cli/npm-init.html
+++ b/deps/npm/html/doc/cli/npm-init.html
@@ -48,5 +48,5 @@ defaults and not prompt you for any options.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-init &mdash; npm@2.7.4</p>
+<p id="footer">npm-init &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html
index 2daed14b23..6134f1c011 100644
--- a/deps/npm/html/doc/cli/npm-install.html
+++ b/deps/npm/html/doc/cli/npm-install.html
@@ -136,13 +136,37 @@ fetch the package by name if it is not valid.
attempting to clone it using <code>git</code>.</p>
<p> Example:</p>
<pre><code> npm install mygithubuser/myproject
-</code></pre><p> To reference a package in a git repo that is not on GitHub, see git
- remote urls below.</p>
+</code></pre><p> To reference a package in a generic git repo (not on GitHub), see git remote
+ urls below.</p>
</li>
+<li><p><code>npm install github:&lt;githubname&gt;/&lt;githubrepo&gt;</code>:</p>
+<p> The same as the above, but explicitly marked as a GitHub dependency.</p>
+<p> Example:</p>
+<pre><code> npm install github:npm/npm
+</code></pre></li>
+<li><p><code>npm install gist:[&lt;githubname&gt;/]&lt;gistID&gt;</code>:</p>
+<p> Install the package at <code>https://gist.github.com/gistID</code> by attempting to
+ clone it using <code>git</code>. The GitHub username associated with the gist is
+ optional and will not be saved in <code>package.json</code> if <code>--save</code> is used.</p>
+<p> Example:</p>
+<pre><code> npm install gist:101a11beef
+</code></pre></li>
+<li><p><code>npm install bitbucket:&lt;bitbucketname&gt;/&lt;bitbucketrepo&gt;</code>:</p>
+<p> Install the package at <code>https://bitbucket.org/bitbucketname/bitbucketrepo</code>
+ by attempting to clone it using <code>git</code>.</p>
+<p> Example:</p>
+<pre><code> npm install bitbucket:mybitbucketuser/myproject
+</code></pre></li>
+<li><p><code>npm install gitlab:&lt;gitlabname&gt;/&lt;gitlabrepo&gt;</code>:</p>
+<p> Install the package at <code>https://gitlab.com/gitlabname/gitlabrepo</code>
+ by attempting to clone it using <code>git</code>.</p>
+<p> Example:</p>
+<pre><code> npm install gitlab:mygitlabuser/myproject
+</code></pre></li>
<li><p><code>npm install &lt;git remote url&gt;</code>:</p>
<p> Install a package by cloning a git remote url. The format of the git
url is:</p>
-<pre><code> &lt;protocol&gt;://[&lt;user&gt;@]&lt;hostname&gt;&lt;separator&gt;&lt;path&gt;[#&lt;commit-ish&gt;]
+<pre><code> &lt;protocol&gt;://[&lt;user&gt;[:&lt;password&gt;]@]&lt;hostname&gt;&lt;separator&gt;&lt;path&gt;[#&lt;commit-ish&gt;]
</code></pre><p> <code>&lt;protocol&gt;</code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, or
<code>git+https</code>. If no <code>&lt;commit-ish&gt;</code> is specified, then <code>master</code> is
used.</p>
@@ -240,5 +264,5 @@ affects a real use-case, it will be investigated.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-install &mdash; npm@2.7.4</p>
+<p id="footer">npm-install &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html
index 4a14ee51b2..3e8e1539b2 100644
--- a/deps/npm/html/doc/cli/npm-link.html
+++ b/deps/npm/html/doc/cli/npm-link.html
@@ -72,5 +72,5 @@ include that scope, e.g.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-link &mdash; npm@2.7.4</p>
+<p id="footer">npm-link &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html
index 5fd1de1d36..2a84981fd1 100644
--- a/deps/npm/html/doc/cli/npm-logout.html
+++ b/deps/npm/html/doc/cli/npm-logout.html
@@ -55,5 +55,5 @@ that registry at the same time.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-logout &mdash; npm@2.7.4</p>
+<p id="footer">npm-logout &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html
index 65b527209d..d14e56135e 100644
--- a/deps/npm/html/doc/cli/npm-ls.html
+++ b/deps/npm/html/doc/cli/npm-ls.html
@@ -22,7 +22,7 @@ installed, as well as their dependencies, in a tree-structure.</p>
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@2.7.4 /path/to/npm
+<pre><code>npm@2.8.4 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre><p>It will print out extraneous, missing, and invalid packages.</p>
@@ -97,5 +97,5 @@ project.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-ls &mdash; npm@2.7.4</p>
+<p id="footer">npm-ls &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html
index b93706992c..484f3dd553 100644
--- a/deps/npm/html/doc/cli/npm-outdated.html
+++ b/deps/npm/html/doc/cli/npm-outdated.html
@@ -67,5 +67,5 @@ project.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-outdated &mdash; npm@2.7.4</p>
+<p id="footer">npm-outdated &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html
index 4a35d71aab..5294b23392 100644
--- a/deps/npm/html/doc/cli/npm-owner.html
+++ b/deps/npm/html/doc/cli/npm-owner.html
@@ -49,5 +49,5 @@ that is not implemented at this time.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-owner &mdash; npm@2.7.4</p>
+<p id="footer">npm-owner &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html
index 9d63fa076f..967c9f9493 100644
--- a/deps/npm/html/doc/cli/npm-pack.html
+++ b/deps/npm/html/doc/cli/npm-pack.html
@@ -41,5 +41,5 @@ overwritten the second time.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-pack &mdash; npm@2.7.4</p>
+<p id="footer">npm-pack &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html
index e0aab08004..1b7a4cd2e1 100644
--- a/deps/npm/html/doc/cli/npm-prefix.html
+++ b/deps/npm/html/doc/cli/npm-prefix.html
@@ -38,5 +38,5 @@ to contain a package.json file unless <code>-g</code> is also specified.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-prefix &mdash; npm@2.7.4</p>
+<p id="footer">npm-prefix &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html
index 5b19ac5b8a..ccdf64acf9 100644
--- a/deps/npm/html/doc/cli/npm-prune.html
+++ b/deps/npm/html/doc/cli/npm-prune.html
@@ -39,5 +39,5 @@ packages specified in your <code>devDependencies</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-prune &mdash; npm@2.7.4</p>
+<p id="footer">npm-prune &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html
index 5ec4e988ee..fb808802ed 100644
--- a/deps/npm/html/doc/cli/npm-publish.html
+++ b/deps/npm/html/doc/cli/npm-publish.html
@@ -66,5 +66,5 @@ it is removed with <a href="../cli/npm-unpublish.html"><a href="../cli/npm-unpub
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-publish &mdash; npm@2.7.4</p>
+<p id="footer">npm-publish &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html
index ed0dd148ce..de6b36bea4 100644
--- a/deps/npm/html/doc/cli/npm-rebuild.html
+++ b/deps/npm/html/doc/cli/npm-rebuild.html
@@ -38,5 +38,5 @@ the new binary.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-rebuild &mdash; npm@2.7.4</p>
+<p id="footer">npm-rebuild &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html
index 09bc008dee..329a1a1c55 100644
--- a/deps/npm/html/doc/cli/npm-repo.html
+++ b/deps/npm/html/doc/cli/npm-repo.html
@@ -42,5 +42,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-repo &mdash; npm@2.7.4</p>
+<p id="footer">npm-repo &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html
index dde4bc9f28..479fa955f7 100644
--- a/deps/npm/html/doc/cli/npm-restart.html
+++ b/deps/npm/html/doc/cli/npm-restart.html
@@ -53,5 +53,5 @@ behavior will be accompanied by an increase in major version number</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-restart &mdash; npm@2.7.4</p>
+<p id="footer">npm-restart &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html
index f3d4e6fc0d..a447d9ebe7 100644
--- a/deps/npm/html/doc/cli/npm-rm.html
+++ b/deps/npm/html/doc/cli/npm-rm.html
@@ -39,5 +39,5 @@ on its behalf.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-rm &mdash; npm@2.7.4</p>
+<p id="footer">npm-rm &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html
index 98907fe361..68b20f1777 100644
--- a/deps/npm/html/doc/cli/npm-root.html
+++ b/deps/npm/html/doc/cli/npm-root.html
@@ -35,5 +35,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-root &mdash; npm@2.7.4</p>
+<p id="footer">npm-root &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html
index 7a6b3923d5..a408df39f0 100644
--- a/deps/npm/html/doc/cli/npm-run-script.html
+++ b/deps/npm/html/doc/cli/npm-run-script.html
@@ -56,5 +56,5 @@ you should write <code>&quot;scripts&quot;: {&quot;test&quot;: &quot;tap test/\*
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-run-script &mdash; npm@2.7.4</p>
+<p id="footer">npm-run-script &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html
index 8df680055a..69cc90db96 100644
--- a/deps/npm/html/doc/cli/npm-search.html
+++ b/deps/npm/html/doc/cli/npm-search.html
@@ -49,5 +49,5 @@ fall on multiple lines.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-search &mdash; npm@2.7.4</p>
+<p id="footer">npm-search &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html
index 0cc001ad3f..e997a2cbe7 100644
--- a/deps/npm/html/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html
@@ -164,5 +164,5 @@ contents rather than versions.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-shrinkwrap &mdash; npm@2.7.4</p>
+<p id="footer">npm-shrinkwrap &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html
index ca70668397..e5b060e060 100644
--- a/deps/npm/html/doc/cli/npm-star.html
+++ b/deps/npm/html/doc/cli/npm-star.html
@@ -36,5 +36,5 @@ a vaguely positive way to show that you care.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-star &mdash; npm@2.7.4</p>
+<p id="footer">npm-star &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html
index 05c72e30fe..43c974d814 100644
--- a/deps/npm/html/doc/cli/npm-stars.html
+++ b/deps/npm/html/doc/cli/npm-stars.html
@@ -37,5 +37,5 @@ you will most certainly enjoy this command.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-stars &mdash; npm@2.7.4</p>
+<p id="footer">npm-stars &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html
index dbd9417392..9cff46e7ad 100644
--- a/deps/npm/html/doc/cli/npm-start.html
+++ b/deps/npm/html/doc/cli/npm-start.html
@@ -34,5 +34,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-start &mdash; npm@2.7.4</p>
+<p id="footer">npm-start &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html
index 7dc2bf7de6..167cec8381 100644
--- a/deps/npm/html/doc/cli/npm-stop.html
+++ b/deps/npm/html/doc/cli/npm-stop.html
@@ -34,5 +34,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-stop &mdash; npm@2.7.4</p>
+<p id="footer">npm-stop &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html
index 3a671610ac..4361b3df8d 100644
--- a/deps/npm/html/doc/cli/npm-tag.html
+++ b/deps/npm/html/doc/cli/npm-tag.html
@@ -62,5 +62,5 @@ that do not begin with a number or the letter <code>v</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-tag &mdash; npm@2.7.4</p>
+<p id="footer">npm-tag &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html
index d461e5f966..e6a80f5db2 100644
--- a/deps/npm/html/doc/cli/npm-test.html
+++ b/deps/npm/html/doc/cli/npm-test.html
@@ -37,5 +37,5 @@ true.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-test &mdash; npm@2.7.4</p>
+<p id="footer">npm-test &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html
index 6921b46270..491a9ef65d 100644
--- a/deps/npm/html/doc/cli/npm-uninstall.html
+++ b/deps/npm/html/doc/cli/npm-uninstall.html
@@ -57,5 +57,5 @@ npm uninstall dtrace-provider --save-optional
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-uninstall &mdash; npm@2.7.4</p>
+<p id="footer">npm-uninstall &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html
index 202c0a1586..edefefd113 100644
--- a/deps/npm/html/doc/cli/npm-unpublish.html
+++ b/deps/npm/html/doc/cli/npm-unpublish.html
@@ -47,5 +47,5 @@ package again, a new version number must be used.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-unpublish &mdash; npm@2.7.4</p>
+<p id="footer">npm-unpublish &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html
index 03f83bdc88..e977a34b78 100644
--- a/deps/npm/html/doc/cli/npm-update.html
+++ b/deps/npm/html/doc/cli/npm-update.html
@@ -119,5 +119,5 @@ be <em>downgraded</em>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-update &mdash; npm@2.7.4</p>
+<p id="footer">npm-update &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html
index bd323a1ab1..c379b5204c 100644
--- a/deps/npm/html/doc/cli/npm-version.html
+++ b/deps/npm/html/doc/cli/npm-version.html
@@ -65,5 +65,5 @@ Enter passphrase:
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-version &mdash; npm@2.7.4</p>
+<p id="footer">npm-version &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html
index cb1c1b21bb..3e58a94e5f 100644
--- a/deps/npm/html/doc/cli/npm-view.html
+++ b/deps/npm/html/doc/cli/npm-view.html
@@ -82,5 +82,5 @@ the field name.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-view &mdash; npm@2.7.4</p>
+<p id="footer">npm-view &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html
index 54f7eb8822..064de90df6 100644
--- a/deps/npm/html/doc/cli/npm-whoami.html
+++ b/deps/npm/html/doc/cli/npm-whoami.html
@@ -33,5 +33,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-whoami &mdash; npm@2.7.4</p>
+<p id="footer">npm-whoami &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html
index 059d6f3437..9d2bc2cf15 100644
--- a/deps/npm/html/doc/cli/npm.html
+++ b/deps/npm/html/doc/cli/npm.html
@@ -13,7 +13,7 @@
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm &lt;command&gt; [args]
</code></pre><h2 id="version">VERSION</h2>
-<p>2.7.4</p>
+<p>2.8.4</p>
<h2 id="description">DESCRIPTION</h2>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@@ -110,7 +110,7 @@ easily by doing <code>npm view npm contributors</code>.</p>
the issues list or ask on the mailing list.</p>
<ul>
<li><a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
-<li><a href="&#x6d;&#97;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#x6e;&#x70;&#109;&#45;&#64;&#x67;&#111;&#x6f;&#x67;&#108;&#101;&#x67;&#114;&#x6f;&#x75;&#112;&#115;&#x2e;&#x63;&#x6f;&#x6d;">&#x6e;&#x70;&#109;&#45;&#64;&#x67;&#111;&#x6f;&#x67;&#108;&#101;&#x67;&#114;&#x6f;&#x75;&#112;&#115;&#x2e;&#x63;&#x6f;&#x6d;</a></li>
+<li><a href="&#109;&#97;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#x6e;&#112;&#109;&#45;&#x40;&#x67;&#x6f;&#x6f;&#103;&#108;&#x65;&#x67;&#x72;&#111;&#x75;&#x70;&#115;&#46;&#x63;&#111;&#109;">&#x6e;&#112;&#109;&#45;&#x40;&#x67;&#x6f;&#x6f;&#103;&#108;&#x65;&#x67;&#x72;&#111;&#x75;&#x70;&#115;&#46;&#x63;&#111;&#109;</a></li>
</ul>
<h2 id="bugs">BUGS</h2>
<p>When you find issues, please report them:</p>
@@ -118,7 +118,7 @@ the issues list or ask on the mailing list.</p>
<li>web:
<a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
<li>email:
-<a href="&#109;&#97;&#105;&#108;&#x74;&#111;&#58;&#110;&#112;&#109;&#45;&#64;&#x67;&#x6f;&#x6f;&#x67;&#x6c;&#x65;&#103;&#114;&#x6f;&#117;&#x70;&#115;&#46;&#99;&#111;&#109;">&#110;&#112;&#109;&#45;&#64;&#x67;&#x6f;&#x6f;&#x67;&#x6c;&#x65;&#103;&#114;&#x6f;&#117;&#x70;&#115;&#46;&#99;&#111;&#109;</a></li>
+<a href="&#x6d;&#97;&#x69;&#x6c;&#116;&#111;&#58;&#x6e;&#112;&#109;&#45;&#x40;&#x67;&#x6f;&#111;&#x67;&#x6c;&#101;&#x67;&#x72;&#111;&#x75;&#x70;&#115;&#46;&#99;&#x6f;&#x6d;">&#x6e;&#112;&#109;&#45;&#x40;&#x67;&#x6f;&#111;&#x67;&#x6c;&#101;&#x67;&#x72;&#111;&#x75;&#x70;&#115;&#46;&#99;&#x6f;&#x6d;</a></li>
</ul>
<p>Be sure to include <em>all</em> of the output from the npm command that didn&#39;t work
as expected. The <code>npm-debug.log</code> file is also helpful to provide.</p>
@@ -128,7 +128,7 @@ will no doubt tell you to put the output in a gist or email.</p>
<p><a href="http://blog.izs.me/">Isaac Z. Schlueter</a> ::
<a href="https://github.com/isaacs/">isaacs</a> ::
<a href="http://twitter.com/izs">@izs</a> ::
-<a href="&#x6d;&#x61;&#105;&#108;&#x74;&#111;&#x3a;&#x69;&#x40;&#105;&#122;&#115;&#x2e;&#109;&#101;">&#x69;&#x40;&#105;&#122;&#115;&#x2e;&#109;&#101;</a></p>
+<a href="&#x6d;&#x61;&#105;&#x6c;&#116;&#111;&#x3a;&#x69;&#x40;&#x69;&#x7a;&#115;&#x2e;&#x6d;&#x65;">&#x69;&#x40;&#x69;&#x7a;&#115;&#x2e;&#x6d;&#x65;</a></p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-help.html"><a href="../cli/npm-help.html">npm-help(1)</a></a></li>
@@ -154,5 +154,5 @@ will no doubt tell you to put the output in a gist or email.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm &mdash; npm@2.7.4</p>
+<p id="footer">npm &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html
index 168fc2ec81..62ee094c57 100644
--- a/deps/npm/html/doc/files/npm-folders.html
+++ b/deps/npm/html/doc/files/npm-folders.html
@@ -184,5 +184,5 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html"><a hr
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-folders &mdash; npm@2.7.4</p>
+<p id="footer">npm-folders &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html
index 86a81d44d6..9e25e37927 100644
--- a/deps/npm/html/doc/files/npm-global.html
+++ b/deps/npm/html/doc/files/npm-global.html
@@ -184,5 +184,5 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html"><a hr
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-global &mdash; npm@2.7.4</p>
+<p id="footer">npm-global &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html
index 37eadfebad..46c8292638 100644
--- a/deps/npm/html/doc/files/npm-json.html
+++ b/deps/npm/html/doc/files/npm-json.html
@@ -89,7 +89,7 @@ is an object with a &quot;name&quot; field and optionally &quot;url&quot; and &q
, &quot;url&quot; : &quot;http://barnyrubble.tumblr.com/&quot;
}
</code></pre><p>Or you can shorten that all into a single string, and npm will parse it for you:</p>
-<pre><code>&quot;Barney Rubble &lt;b@rubble.com&gt; (http://barnyrubble.tumblr.com/)
+<pre><code>&quot;Barney Rubble &lt;b@rubble.com&gt; (http://barnyrubble.tumblr.com/)&quot;
</code></pre><p>Both email and url are optional either way.</p>
<p>npm also sets a top-level &quot;maintainers&quot; field with your npm user info.</p>
<h2 id="files">files</h2>
@@ -196,9 +196,15 @@ command will be able to find you.</p>
</code></pre><p>The URL should be a publicly available (perhaps read-only) url that can be handed
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It&#39;s for computers.</p>
-<p>For GitHub repositories you can use the same shortcut syntax you use for <code>npm
-install</code>:</p>
+<p>For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same
+shortcut syntax you use for <code>npm install</code>:</p>
<pre><code>&quot;repository&quot;: &quot;npm/npm&quot;
+
+&quot;repository&quot;: &quot;gist:11081aaa281&quot;
+
+&quot;repository&quot;: &quot;bitbucket:example/repo&quot;
+
+&quot;repository&quot;: &quot;gitlab:another/repo&quot;
</code></pre><h2 id="scripts">scripts</h2>
<p>The &quot;scripts&quot; property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
@@ -496,5 +502,5 @@ ignored.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-json &mdash; npm@2.7.4</p>
+<p id="footer">npm-json &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html
index 9aea72e9a4..4ab1559855 100644
--- a/deps/npm/html/doc/files/npmrc.html
+++ b/deps/npm/html/doc/files/npmrc.html
@@ -77,5 +77,5 @@ manner.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npmrc &mdash; npm@2.7.4</p>
+<p id="footer">npmrc &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html
index 13dba5edeb..dd971145e4 100644
--- a/deps/npm/html/doc/files/package.json.html
+++ b/deps/npm/html/doc/files/package.json.html
@@ -89,7 +89,7 @@ is an object with a &quot;name&quot; field and optionally &quot;url&quot; and &q
, &quot;url&quot; : &quot;http://barnyrubble.tumblr.com/&quot;
}
</code></pre><p>Or you can shorten that all into a single string, and npm will parse it for you:</p>
-<pre><code>&quot;Barney Rubble &lt;b@rubble.com&gt; (http://barnyrubble.tumblr.com/)
+<pre><code>&quot;Barney Rubble &lt;b@rubble.com&gt; (http://barnyrubble.tumblr.com/)&quot;
</code></pre><p>Both email and url are optional either way.</p>
<p>npm also sets a top-level &quot;maintainers&quot; field with your npm user info.</p>
<h2 id="files">files</h2>
@@ -196,9 +196,15 @@ command will be able to find you.</p>
</code></pre><p>The URL should be a publicly available (perhaps read-only) url that can be handed
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It&#39;s for computers.</p>
-<p>For GitHub repositories you can use the same shortcut syntax you use for <code>npm
-install</code>:</p>
+<p>For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same
+shortcut syntax you use for <code>npm install</code>:</p>
<pre><code>&quot;repository&quot;: &quot;npm/npm&quot;
+
+&quot;repository&quot;: &quot;gist:11081aaa281&quot;
+
+&quot;repository&quot;: &quot;bitbucket:example/repo&quot;
+
+&quot;repository&quot;: &quot;gitlab:another/repo&quot;
</code></pre><h2 id="scripts">scripts</h2>
<p>The &quot;scripts&quot; property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
@@ -496,5 +502,5 @@ ignored.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">package.json &mdash; npm@2.7.4</p>
+<p id="footer">package.json &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html
index 7f8fff793b..5e1c31ddfb 100644
--- a/deps/npm/html/doc/index.html
+++ b/deps/npm/html/doc/index.html
@@ -236,5 +236,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">index &mdash; npm@2.7.4</p>
+<p id="footer">index &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html
index c8d521861f..3fd3cff5af 100644
--- a/deps/npm/html/doc/misc/npm-coding-style.html
+++ b/deps/npm/html/doc/misc/npm-coding-style.html
@@ -147,5 +147,5 @@ set to anything.&quot;</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-coding-style &mdash; npm@2.7.4</p>
+<p id="footer">npm-coding-style &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html
index c1060330b2..8c897bbae2 100644
--- a/deps/npm/html/doc/misc/npm-config.html
+++ b/deps/npm/html/doc/misc/npm-config.html
@@ -11,7 +11,7 @@
<h1><a href="../misc/npm-config.html">npm-config</a></h1> <p>More than you probably want to know about npm configuration</p>
<h2 id="description">DESCRIPTION</h2>
-<p>npm gets its configuration values from 6 sources, in this priority:</p>
+<p>npm gets its configuration values from the following sources, sorted by priority:</p>
<h3 id="command-line-flags">Command Line Flags</h3>
<p>Putting <code>--foo bar</code> on the command line sets the <code>foo</code> configuration
parameter to <code>&quot;bar&quot;</code>. A <code>--</code> argument tells the cli parser to stop
@@ -788,5 +788,5 @@ exit successfully.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-config &mdash; npm@2.7.4</p>
+<p id="footer">npm-config &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html
index b837dfa85b..cfb19d46a6 100644
--- a/deps/npm/html/doc/misc/npm-developers.html
+++ b/deps/npm/html/doc/misc/npm-developers.html
@@ -189,5 +189,5 @@ from a fresh checkout.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-developers &mdash; npm@2.7.4</p>
+<p id="footer">npm-developers &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html
index e4f8e17920..83c98b733f 100644
--- a/deps/npm/html/doc/misc/npm-disputes.html
+++ b/deps/npm/html/doc/misc/npm-disputes.html
@@ -13,7 +13,7 @@
<h2 id="synopsis">SYNOPSIS</h2>
<ol>
<li>Get the author email with <code>npm owner ls &lt;pkgname&gt;</code></li>
-<li>Email the author, CC <a href="&#x6d;&#97;&#105;&#108;&#x74;&#x6f;&#58;&#x73;&#x75;&#x70;&#x70;&#x6f;&#x72;&#x74;&#64;&#110;&#112;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;">&#x73;&#x75;&#x70;&#x70;&#x6f;&#x72;&#x74;&#64;&#110;&#112;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;</a></li>
+<li>Email the author, CC <a href="&#x6d;&#97;&#x69;&#108;&#116;&#x6f;&#58;&#115;&#x75;&#x70;&#112;&#111;&#114;&#x74;&#64;&#x6e;&#112;&#109;&#106;&#115;&#46;&#99;&#x6f;&#x6d;">&#115;&#x75;&#x70;&#112;&#111;&#114;&#x74;&#64;&#x6e;&#112;&#109;&#106;&#115;&#46;&#99;&#x6f;&#x6d;</a></li>
<li>After a few weeks, if there&#39;s no resolution, we&#39;ll sort it out.</li>
</ol>
<p>Don&#39;t squat on package names. Publish code or move out of the way.</p>
@@ -51,12 +51,12 @@ Joe&#39;s appropriate course of action in each case is the same.</p>
owner (Bob).</li>
<li>Joe emails Bob, explaining the situation <strong>as respectfully as
possible</strong>, and what he would like to do with the module name. He
-adds the npm support staff <a href="&#109;&#x61;&#x69;&#108;&#116;&#x6f;&#x3a;&#115;&#x75;&#112;&#x70;&#x6f;&#114;&#x74;&#64;&#110;&#112;&#x6d;&#x6a;&#115;&#46;&#x63;&#111;&#x6d;">&#115;&#x75;&#112;&#x70;&#x6f;&#114;&#x74;&#64;&#110;&#112;&#x6d;&#x6a;&#115;&#46;&#x63;&#111;&#x6d;</a> to the CC list of
+adds the npm support staff <a href="&#109;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#x73;&#117;&#112;&#x70;&#x6f;&#x72;&#x74;&#x40;&#x6e;&#x70;&#109;&#x6a;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#x73;&#117;&#112;&#x70;&#x6f;&#x72;&#x74;&#x40;&#x6e;&#x70;&#109;&#x6a;&#115;&#x2e;&#99;&#x6f;&#x6d;</a> to the CC list of
the email. Mention in the email that Bob can run <code>npm owner add
joe foo</code> to add Joe as an owner of the <code>foo</code> package.</li>
<li>After a reasonable amount of time, if Bob has not responded, or if
Bob and Joe can&#39;t come to any sort of resolution, email support
-<a href="&#109;&#97;&#105;&#108;&#x74;&#111;&#x3a;&#x73;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#x73;&#x2e;&#x63;&#111;&#109;">&#x73;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#x73;&#x2e;&#x63;&#111;&#109;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
+<a href="&#x6d;&#97;&#x69;&#108;&#116;&#111;&#x3a;&#115;&#117;&#112;&#112;&#111;&#114;&#116;&#64;&#110;&#112;&#x6d;&#106;&#x73;&#x2e;&#x63;&#111;&#x6d;">&#115;&#117;&#112;&#112;&#111;&#114;&#116;&#64;&#110;&#112;&#x6d;&#106;&#x73;&#x2e;&#x63;&#111;&#x6d;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
usually at least 4 weeks, but extra time is allowed around common
holidays.)</li>
</ol>
@@ -112,5 +112,5 @@ things into it.</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-disputes &mdash; npm@2.7.4</p>
+<p id="footer">npm-disputes &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/misc/npm-faq.html b/deps/npm/html/doc/misc/npm-faq.html
index 221fd18e84..72a810e4e2 100644
--- a/deps/npm/html/doc/misc/npm-faq.html
+++ b/deps/npm/html/doc/misc/npm-faq.html
@@ -236,7 +236,7 @@ that has a package.json in its root, or a git url.
<p>To check if the registry is down, open up
<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a> in a web browser. This will also tell
you if you are just unable to access the internet for some reason.</p>
-<p>If the registry IS down, let us know by emailing <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#x3a;&#x73;&#x75;&#112;&#x70;&#x6f;&#x72;&#116;&#x40;&#x6e;&#112;&#x6d;&#x6a;&#x73;&#46;&#x63;&#111;&#109;">&#x73;&#x75;&#112;&#x70;&#x6f;&#x72;&#116;&#x40;&#x6e;&#112;&#x6d;&#x6a;&#x73;&#46;&#x63;&#111;&#109;</a>
+<p>If the registry IS down, let us know by emailing <a href="&#x6d;&#97;&#x69;&#108;&#x74;&#111;&#x3a;&#x73;&#117;&#112;&#112;&#x6f;&#114;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#x73;&#x2e;&#99;&#x6f;&#109;">&#x73;&#117;&#112;&#112;&#x6f;&#114;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#x73;&#x2e;&#99;&#x6f;&#109;</a>
or posting an issue at <a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a>. If it&#39;s
down for the world (and not just on your local network) then we&#39;re
probably already being pinged about it.</p>
@@ -307,5 +307,5 @@ good folks at <a href="http://www.npmjs.com">npm, Inc.</a></p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-faq &mdash; npm@2.7.4</p>
+<p id="footer">npm-faq &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html
index cc2aab8025..e349ce89e1 100644
--- a/deps/npm/html/doc/misc/npm-index.html
+++ b/deps/npm/html/doc/misc/npm-index.html
@@ -236,5 +236,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-index &mdash; npm@2.7.4</p>
+<p id="footer">npm-index &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html
index c59e94efe1..465d2decc5 100644
--- a/deps/npm/html/doc/misc/npm-registry.html
+++ b/deps/npm/html/doc/misc/npm-registry.html
@@ -70,5 +70,5 @@ effectively implement the entire CouchDB API anyway.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-registry &mdash; npm@2.7.4</p>
+<p id="footer">npm-registry &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html
index 99c1a90bf6..67957765a1 100644
--- a/deps/npm/html/doc/misc/npm-scope.html
+++ b/deps/npm/html/doc/misc/npm-scope.html
@@ -78,5 +78,5 @@ that registry instead.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-scope &mdash; npm@2.7.4</p>
+<p id="footer">npm-scope &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html
index 050fa1a03f..311058bf51 100644
--- a/deps/npm/html/doc/misc/npm-scripts.html
+++ b/deps/npm/html/doc/misc/npm-scripts.html
@@ -203,5 +203,5 @@ scripts is for compilation which must be done on the target architecture.</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-scripts &mdash; npm@2.7.4</p>
+<p id="footer">npm-scripts &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html
index f6e1e0fcbe..f4cff51366 100644
--- a/deps/npm/html/doc/misc/removing-npm.html
+++ b/deps/npm/html/doc/misc/removing-npm.html
@@ -57,5 +57,5 @@ modules. To track those down, you can do the following:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">removing-npm &mdash; npm@2.7.4</p>
+<p id="footer">removing-npm &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html
index 32c8014701..891d83bc93 100644
--- a/deps/npm/html/doc/misc/semver.html
+++ b/deps/npm/html/doc/misc/semver.html
@@ -282,5 +282,5 @@ range, use the <code>satisfies(version, range)</code> function.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">semver &mdash; npm@2.7.4</p>
+<p id="footer">semver &mdash; npm@2.8.4</p>
diff --git a/deps/npm/html/partial/doc/README.html b/deps/npm/html/partial/doc/README.html
index 0ee224499e..cb7e420ca2 100644
--- a/deps/npm/html/partial/doc/README.html
+++ b/deps/npm/html/partial/doc/README.html
@@ -21,7 +21,7 @@ paths, etc.) then read on.</p>
<p>There&#39;s a pretty robust install script at
<a href="https://www.npmjs.com/install.sh">https://www.npmjs.com/install.sh</a>. You can download that and run it.</p>
<p>Here&#39;s an example using curl:</p>
-<pre><code>curl -L https://npmjs.com/install.sh | sh
+<pre><code>curl -L https://www.npmjs.com/install.sh | sh
</code></pre><h3 id="slightly-fancier">Slightly Fancier</h3>
<p>You can set any npm configuration params with that script:</p>
<pre><code>npm_config_prefix=/some/path sh install.sh
@@ -35,10 +35,10 @@ arbitrary config keys using the <code>./configure --key=val ...</code>, and then
run npm commands by doing <code>node cli.js &lt;cmd&gt; &lt;args&gt;</code>. (This is helpful
for testing, or running stuff without actually installing npm itself.)</p>
<h2 id="windows-install-or-upgrade">Windows Install or Upgrade</h2>
-<p>You can download a zip file from <a href="https://github.com/npm/npm/releases">https://github.com/npm/npm/releases</a>, and unpack it
-in the same folder where node.exe lives.</p>
-<p>The latest version in a zip file is 1.4.12. To upgrade to npm 2, follow the
-Windows upgrade instructions in the npm Troubleshooting Guide:</p>
+<p>You can download a zip file from <a href="https://github.com/npm/npm/releases">https://github.com/npm/npm/releases</a>, and
+unpack it in the <code>node_modules\npm\</code> folder inside node&#39;s installation folder.</p>
+<p>To upgrade to npm 2, follow the Windows upgrade instructions in
+the npm Troubleshooting Guide:</p>
<p><a href="https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows">https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows</a></p>
<p>If that&#39;s not fancy enough for you, then you can fetch the code with
git, and mess with it directly.</p>
@@ -115,7 +115,7 @@ specific purpose, or lack of malice in any given npm package.</p>
<p>If you have a complaint about a package in the public npm registry,
and cannot <a href="https://docs.npmjs.com/misc/disputes">resolve it with the package
owner</a>, please email
-<a href="&#x6d;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#115;&#x75;&#x70;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#112;&#x6d;&#106;&#x73;&#x2e;&#x63;&#x6f;&#x6d;">&#115;&#x75;&#x70;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#112;&#x6d;&#106;&#x73;&#x2e;&#x63;&#x6f;&#x6d;</a> and explain the situation.</p>
+<a href="&#109;&#97;&#105;&#108;&#x74;&#x6f;&#x3a;&#x73;&#x75;&#112;&#x70;&#111;&#x72;&#x74;&#x40;&#110;&#x70;&#109;&#x6a;&#115;&#x2e;&#x63;&#111;&#x6d;">&#x73;&#x75;&#112;&#x70;&#111;&#x72;&#x74;&#x40;&#110;&#x70;&#109;&#x6a;&#115;&#x2e;&#x63;&#111;&#x6d;</a> and explain the situation.</p>
<p>Any data published to The npm Registry (including user account
information) may be removed or modified at the sole discretion of the
npm server administrators.</p>
diff --git a/deps/npm/html/partial/doc/api/npm.html b/deps/npm/html/partial/doc/api/npm.html
index 706cf0a9e4..9842ab7798 100644
--- a/deps/npm/html/partial/doc/api/npm.html
+++ b/deps/npm/html/partial/doc/api/npm.html
@@ -12,7 +12,7 @@ npm.load([configObject, ]function (er, npm) {
npm.commands.install([&quot;package&quot;], cb)
})
</code></pre><h2 id="version">VERSION</h2>
-<p>2.7.4</p>
+<p>2.8.4</p>
<h2 id="description">DESCRIPTION</h2>
<p>This is the API documentation for npm.
To find documentation of the command line
diff --git a/deps/npm/html/partial/doc/cli/npm-dist-tag.html b/deps/npm/html/partial/doc/cli/npm-dist-tag.html
index 8abcf222ab..e99e059aee 100644
--- a/deps/npm/html/partial/doc/cli/npm-dist-tag.html
+++ b/deps/npm/html/partial/doc/cli/npm-dist-tag.html
@@ -24,7 +24,8 @@ of using a specific version number:</p>
</code></pre><p>When installing dependencies, a preferred tagged version may be specified:</p>
<pre><code>npm install --tag &lt;tag&gt;
</code></pre><p>This also applies to <code>npm dedupe</code>.</p>
-<p>Publishing a package always sets the &quot;latest&quot; tag to the published version.</p>
+<p>Publishing a package sets the &quot;latest&quot; tag to the published version unless the
+<code>--tag</code> option is used. For example, <code>npm publish --tag=beta</code>.</p>
<h2 id="purpose">PURPOSE</h2>
<p>Tags can be used to provide an alias instead of version numbers. For
example, <code>npm</code> currently uses the tag &quot;next&quot; to identify the upcoming
diff --git a/deps/npm/html/partial/doc/cli/npm-install.html b/deps/npm/html/partial/doc/cli/npm-install.html
index dc601780c3..9dc85785de 100644
--- a/deps/npm/html/partial/doc/cli/npm-install.html
+++ b/deps/npm/html/partial/doc/cli/npm-install.html
@@ -125,13 +125,37 @@ fetch the package by name if it is not valid.
attempting to clone it using <code>git</code>.</p>
<p> Example:</p>
<pre><code> npm install mygithubuser/myproject
-</code></pre><p> To reference a package in a git repo that is not on GitHub, see git
- remote urls below.</p>
+</code></pre><p> To reference a package in a generic git repo (not on GitHub), see git remote
+ urls below.</p>
</li>
+<li><p><code>npm install github:&lt;githubname&gt;/&lt;githubrepo&gt;</code>:</p>
+<p> The same as the above, but explicitly marked as a GitHub dependency.</p>
+<p> Example:</p>
+<pre><code> npm install github:npm/npm
+</code></pre></li>
+<li><p><code>npm install gist:[&lt;githubname&gt;/]&lt;gistID&gt;</code>:</p>
+<p> Install the package at <code>https://gist.github.com/gistID</code> by attempting to
+ clone it using <code>git</code>. The GitHub username associated with the gist is
+ optional and will not be saved in <code>package.json</code> if <code>--save</code> is used.</p>
+<p> Example:</p>
+<pre><code> npm install gist:101a11beef
+</code></pre></li>
+<li><p><code>npm install bitbucket:&lt;bitbucketname&gt;/&lt;bitbucketrepo&gt;</code>:</p>
+<p> Install the package at <code>https://bitbucket.org/bitbucketname/bitbucketrepo</code>
+ by attempting to clone it using <code>git</code>.</p>
+<p> Example:</p>
+<pre><code> npm install bitbucket:mybitbucketuser/myproject
+</code></pre></li>
+<li><p><code>npm install gitlab:&lt;gitlabname&gt;/&lt;gitlabrepo&gt;</code>:</p>
+<p> Install the package at <code>https://gitlab.com/gitlabname/gitlabrepo</code>
+ by attempting to clone it using <code>git</code>.</p>
+<p> Example:</p>
+<pre><code> npm install gitlab:mygitlabuser/myproject
+</code></pre></li>
<li><p><code>npm install &lt;git remote url&gt;</code>:</p>
<p> Install a package by cloning a git remote url. The format of the git
url is:</p>
-<pre><code> &lt;protocol&gt;://[&lt;user&gt;@]&lt;hostname&gt;&lt;separator&gt;&lt;path&gt;[#&lt;commit-ish&gt;]
+<pre><code> &lt;protocol&gt;://[&lt;user&gt;[:&lt;password&gt;]@]&lt;hostname&gt;&lt;separator&gt;&lt;path&gt;[#&lt;commit-ish&gt;]
</code></pre><p> <code>&lt;protocol&gt;</code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, or
<code>git+https</code>. If no <code>&lt;commit-ish&gt;</code> is specified, then <code>master</code> is
used.</p>
diff --git a/deps/npm/html/partial/doc/cli/npm-ls.html b/deps/npm/html/partial/doc/cli/npm-ls.html
index 76fc9a7e15..aacb182d7e 100644
--- a/deps/npm/html/partial/doc/cli/npm-ls.html
+++ b/deps/npm/html/partial/doc/cli/npm-ls.html
@@ -11,7 +11,7 @@ installed, as well as their dependencies, in a tree-structure.</p>
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@2.7.4 /path/to/npm
+<pre><code>npm@2.8.4 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre><p>It will print out extraneous, missing, and invalid packages.</p>
diff --git a/deps/npm/html/partial/doc/cli/npm.html b/deps/npm/html/partial/doc/cli/npm.html
index c2272b8f0d..54ca77a574 100644
--- a/deps/npm/html/partial/doc/cli/npm.html
+++ b/deps/npm/html/partial/doc/cli/npm.html
@@ -2,7 +2,7 @@
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm &lt;command&gt; [args]
</code></pre><h2 id="version">VERSION</h2>
-<p>2.7.4</p>
+<p>2.8.4</p>
<h2 id="description">DESCRIPTION</h2>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@@ -99,7 +99,7 @@ easily by doing <code>npm view npm contributors</code>.</p>
the issues list or ask on the mailing list.</p>
<ul>
<li><a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
-<li><a href="&#x6d;&#97;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#x6e;&#x70;&#109;&#45;&#64;&#x67;&#111;&#x6f;&#x67;&#108;&#101;&#x67;&#114;&#x6f;&#x75;&#112;&#115;&#x2e;&#x63;&#x6f;&#x6d;">&#x6e;&#x70;&#109;&#45;&#64;&#x67;&#111;&#x6f;&#x67;&#108;&#101;&#x67;&#114;&#x6f;&#x75;&#112;&#115;&#x2e;&#x63;&#x6f;&#x6d;</a></li>
+<li><a href="&#109;&#97;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#x6e;&#112;&#109;&#45;&#x40;&#x67;&#x6f;&#x6f;&#103;&#108;&#x65;&#x67;&#x72;&#111;&#x75;&#x70;&#115;&#46;&#x63;&#111;&#109;">&#x6e;&#112;&#109;&#45;&#x40;&#x67;&#x6f;&#x6f;&#103;&#108;&#x65;&#x67;&#x72;&#111;&#x75;&#x70;&#115;&#46;&#x63;&#111;&#109;</a></li>
</ul>
<h2 id="bugs">BUGS</h2>
<p>When you find issues, please report them:</p>
@@ -107,7 +107,7 @@ the issues list or ask on the mailing list.</p>
<li>web:
<a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
<li>email:
-<a href="&#109;&#97;&#105;&#108;&#x74;&#111;&#58;&#110;&#112;&#109;&#45;&#64;&#x67;&#x6f;&#x6f;&#x67;&#x6c;&#x65;&#103;&#114;&#x6f;&#117;&#x70;&#115;&#46;&#99;&#111;&#109;">&#110;&#112;&#109;&#45;&#64;&#x67;&#x6f;&#x6f;&#x67;&#x6c;&#x65;&#103;&#114;&#x6f;&#117;&#x70;&#115;&#46;&#99;&#111;&#109;</a></li>
+<a href="&#x6d;&#97;&#x69;&#x6c;&#116;&#111;&#58;&#x6e;&#112;&#109;&#45;&#x40;&#x67;&#x6f;&#111;&#x67;&#x6c;&#101;&#x67;&#x72;&#111;&#x75;&#x70;&#115;&#46;&#99;&#x6f;&#x6d;">&#x6e;&#112;&#109;&#45;&#x40;&#x67;&#x6f;&#111;&#x67;&#x6c;&#101;&#x67;&#x72;&#111;&#x75;&#x70;&#115;&#46;&#99;&#x6f;&#x6d;</a></li>
</ul>
<p>Be sure to include <em>all</em> of the output from the npm command that didn&#39;t work
as expected. The <code>npm-debug.log</code> file is also helpful to provide.</p>
@@ -117,7 +117,7 @@ will no doubt tell you to put the output in a gist or email.</p>
<p><a href="http://blog.izs.me/">Isaac Z. Schlueter</a> ::
<a href="https://github.com/isaacs/">isaacs</a> ::
<a href="http://twitter.com/izs">@izs</a> ::
-<a href="&#x6d;&#x61;&#105;&#108;&#x74;&#111;&#x3a;&#x69;&#x40;&#105;&#122;&#115;&#x2e;&#109;&#101;">&#x69;&#x40;&#105;&#122;&#115;&#x2e;&#109;&#101;</a></p>
+<a href="&#x6d;&#x61;&#105;&#x6c;&#116;&#111;&#x3a;&#x69;&#x40;&#x69;&#x7a;&#115;&#x2e;&#x6d;&#x65;">&#x69;&#x40;&#x69;&#x7a;&#115;&#x2e;&#x6d;&#x65;</a></p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-help.html">npm-help(1)</a></li>
diff --git a/deps/npm/html/partial/doc/files/npm-json.html b/deps/npm/html/partial/doc/files/npm-json.html
index 401d27aec8..ac4bfbc980 100644
--- a/deps/npm/html/partial/doc/files/npm-json.html
+++ b/deps/npm/html/partial/doc/files/npm-json.html
@@ -78,7 +78,7 @@ is an object with a &quot;name&quot; field and optionally &quot;url&quot; and &q
, &quot;url&quot; : &quot;http://barnyrubble.tumblr.com/&quot;
}
</code></pre><p>Or you can shorten that all into a single string, and npm will parse it for you:</p>
-<pre><code>&quot;Barney Rubble &lt;b@rubble.com&gt; (http://barnyrubble.tumblr.com/)
+<pre><code>&quot;Barney Rubble &lt;b@rubble.com&gt; (http://barnyrubble.tumblr.com/)&quot;
</code></pre><p>Both email and url are optional either way.</p>
<p>npm also sets a top-level &quot;maintainers&quot; field with your npm user info.</p>
<h2 id="files">files</h2>
@@ -185,9 +185,15 @@ command will be able to find you.</p>
</code></pre><p>The URL should be a publicly available (perhaps read-only) url that can be handed
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It&#39;s for computers.</p>
-<p>For GitHub repositories you can use the same shortcut syntax you use for <code>npm
-install</code>:</p>
+<p>For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same
+shortcut syntax you use for <code>npm install</code>:</p>
<pre><code>&quot;repository&quot;: &quot;npm/npm&quot;
+
+&quot;repository&quot;: &quot;gist:11081aaa281&quot;
+
+&quot;repository&quot;: &quot;bitbucket:example/repo&quot;
+
+&quot;repository&quot;: &quot;gitlab:another/repo&quot;
</code></pre><h2 id="scripts">scripts</h2>
<p>The &quot;scripts&quot; property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
diff --git a/deps/npm/html/partial/doc/files/package.json.html b/deps/npm/html/partial/doc/files/package.json.html
index 401d27aec8..ac4bfbc980 100644
--- a/deps/npm/html/partial/doc/files/package.json.html
+++ b/deps/npm/html/partial/doc/files/package.json.html
@@ -78,7 +78,7 @@ is an object with a &quot;name&quot; field and optionally &quot;url&quot; and &q
, &quot;url&quot; : &quot;http://barnyrubble.tumblr.com/&quot;
}
</code></pre><p>Or you can shorten that all into a single string, and npm will parse it for you:</p>
-<pre><code>&quot;Barney Rubble &lt;b@rubble.com&gt; (http://barnyrubble.tumblr.com/)
+<pre><code>&quot;Barney Rubble &lt;b@rubble.com&gt; (http://barnyrubble.tumblr.com/)&quot;
</code></pre><p>Both email and url are optional either way.</p>
<p>npm also sets a top-level &quot;maintainers&quot; field with your npm user info.</p>
<h2 id="files">files</h2>
@@ -185,9 +185,15 @@ command will be able to find you.</p>
</code></pre><p>The URL should be a publicly available (perhaps read-only) url that can be handed
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It&#39;s for computers.</p>
-<p>For GitHub repositories you can use the same shortcut syntax you use for <code>npm
-install</code>:</p>
+<p>For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same
+shortcut syntax you use for <code>npm install</code>:</p>
<pre><code>&quot;repository&quot;: &quot;npm/npm&quot;
+
+&quot;repository&quot;: &quot;gist:11081aaa281&quot;
+
+&quot;repository&quot;: &quot;bitbucket:example/repo&quot;
+
+&quot;repository&quot;: &quot;gitlab:another/repo&quot;
</code></pre><h2 id="scripts">scripts</h2>
<p>The &quot;scripts&quot; property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
diff --git a/deps/npm/html/partial/doc/misc/npm-config.html b/deps/npm/html/partial/doc/misc/npm-config.html
index 0c334591db..6feb0d4fbd 100644
--- a/deps/npm/html/partial/doc/misc/npm-config.html
+++ b/deps/npm/html/partial/doc/misc/npm-config.html
@@ -1,6 +1,6 @@
<h1><a href="../misc/npm-config.html">npm-config</a></h1> <p>More than you probably want to know about npm configuration</p>
<h2 id="description">DESCRIPTION</h2>
-<p>npm gets its configuration values from 6 sources, in this priority:</p>
+<p>npm gets its configuration values from the following sources, sorted by priority:</p>
<h3 id="command-line-flags">Command Line Flags</h3>
<p>Putting <code>--foo bar</code> on the command line sets the <code>foo</code> configuration
parameter to <code>&quot;bar&quot;</code>. A <code>--</code> argument tells the cli parser to stop
diff --git a/deps/npm/html/partial/doc/misc/npm-disputes.html b/deps/npm/html/partial/doc/misc/npm-disputes.html
index 6291bafaf8..f94687f8bf 100644
--- a/deps/npm/html/partial/doc/misc/npm-disputes.html
+++ b/deps/npm/html/partial/doc/misc/npm-disputes.html
@@ -2,7 +2,7 @@
<h2 id="synopsis">SYNOPSIS</h2>
<ol>
<li>Get the author email with <code>npm owner ls &lt;pkgname&gt;</code></li>
-<li>Email the author, CC <a href="&#x6d;&#97;&#105;&#108;&#x74;&#x6f;&#58;&#x73;&#x75;&#x70;&#x70;&#x6f;&#x72;&#x74;&#64;&#110;&#112;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;">&#x73;&#x75;&#x70;&#x70;&#x6f;&#x72;&#x74;&#64;&#110;&#112;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;</a></li>
+<li>Email the author, CC <a href="&#x6d;&#97;&#x69;&#108;&#116;&#x6f;&#58;&#115;&#x75;&#x70;&#112;&#111;&#114;&#x74;&#64;&#x6e;&#112;&#109;&#106;&#115;&#46;&#99;&#x6f;&#x6d;">&#115;&#x75;&#x70;&#112;&#111;&#114;&#x74;&#64;&#x6e;&#112;&#109;&#106;&#115;&#46;&#99;&#x6f;&#x6d;</a></li>
<li>After a few weeks, if there&#39;s no resolution, we&#39;ll sort it out.</li>
</ol>
<p>Don&#39;t squat on package names. Publish code or move out of the way.</p>
@@ -40,12 +40,12 @@ Joe&#39;s appropriate course of action in each case is the same.</p>
owner (Bob).</li>
<li>Joe emails Bob, explaining the situation <strong>as respectfully as
possible</strong>, and what he would like to do with the module name. He
-adds the npm support staff <a href="&#109;&#x61;&#x69;&#108;&#116;&#x6f;&#x3a;&#115;&#x75;&#112;&#x70;&#x6f;&#114;&#x74;&#64;&#110;&#112;&#x6d;&#x6a;&#115;&#46;&#x63;&#111;&#x6d;">&#115;&#x75;&#112;&#x70;&#x6f;&#114;&#x74;&#64;&#110;&#112;&#x6d;&#x6a;&#115;&#46;&#x63;&#111;&#x6d;</a> to the CC list of
+adds the npm support staff <a href="&#109;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#x73;&#117;&#112;&#x70;&#x6f;&#x72;&#x74;&#x40;&#x6e;&#x70;&#109;&#x6a;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#x73;&#117;&#112;&#x70;&#x6f;&#x72;&#x74;&#x40;&#x6e;&#x70;&#109;&#x6a;&#115;&#x2e;&#99;&#x6f;&#x6d;</a> to the CC list of
the email. Mention in the email that Bob can run <code>npm owner add
joe foo</code> to add Joe as an owner of the <code>foo</code> package.</li>
<li>After a reasonable amount of time, if Bob has not responded, or if
Bob and Joe can&#39;t come to any sort of resolution, email support
-<a href="&#109;&#97;&#105;&#108;&#x74;&#111;&#x3a;&#x73;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#x73;&#x2e;&#x63;&#111;&#109;">&#x73;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#x73;&#x2e;&#x63;&#111;&#109;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
+<a href="&#x6d;&#97;&#x69;&#108;&#116;&#111;&#x3a;&#115;&#117;&#112;&#112;&#111;&#114;&#116;&#64;&#110;&#112;&#x6d;&#106;&#x73;&#x2e;&#x63;&#111;&#x6d;">&#115;&#117;&#112;&#112;&#111;&#114;&#116;&#64;&#110;&#112;&#x6d;&#106;&#x73;&#x2e;&#x63;&#111;&#x6d;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
usually at least 4 weeks, but extra time is allowed around common
holidays.)</li>
</ol>
diff --git a/deps/npm/html/partial/doc/misc/npm-faq.html b/deps/npm/html/partial/doc/misc/npm-faq.html
index b8cc31c725..1615a54f04 100644
--- a/deps/npm/html/partial/doc/misc/npm-faq.html
+++ b/deps/npm/html/partial/doc/misc/npm-faq.html
@@ -225,7 +225,7 @@ that has a package.json in its root, or a git url.
<p>To check if the registry is down, open up
<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a> in a web browser. This will also tell
you if you are just unable to access the internet for some reason.</p>
-<p>If the registry IS down, let us know by emailing <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#x3a;&#x73;&#x75;&#112;&#x70;&#x6f;&#x72;&#116;&#x40;&#x6e;&#112;&#x6d;&#x6a;&#x73;&#46;&#x63;&#111;&#109;">&#x73;&#x75;&#112;&#x70;&#x6f;&#x72;&#116;&#x40;&#x6e;&#112;&#x6d;&#x6a;&#x73;&#46;&#x63;&#111;&#109;</a>
+<p>If the registry IS down, let us know by emailing <a href="&#x6d;&#97;&#x69;&#108;&#x74;&#111;&#x3a;&#x73;&#117;&#112;&#112;&#x6f;&#114;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#x73;&#x2e;&#99;&#x6f;&#109;">&#x73;&#117;&#112;&#112;&#x6f;&#114;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#x73;&#x2e;&#99;&#x6f;&#109;</a>
or posting an issue at <a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a>. If it&#39;s
down for the world (and not just on your local network) then we&#39;re
probably already being pinged about it.</p>
diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js
index 47f1055967..c5ee76e5c8 100644
--- a/deps/npm/lib/build.js
+++ b/deps/npm/lib/build.js
@@ -85,20 +85,26 @@ function linkStuff (pkg, folder, global, didRB, cb) {
// if it's global, and folder is in {prefix}/node_modules,
// then bins are in {prefix}/bin
// otherwise, then bins are in folder/../.bin
- var parent = pkg.name[0] === "@" ? path.dirname(path.dirname(folder)) : path.dirname(folder)
- , gnm = global && npm.globalDir
- , gtop = parent === gnm
-
- log.verbose("linkStuff", [global, gnm, gtop, parent])
- log.info("linkStuff", pkg._id)
-
- shouldWarn(pkg, folder, global, function() {
- asyncMap( [linkBins, linkMans, !didRB && rebuildBundles]
- , function (fn, cb) {
- if (!fn) return cb()
- log.verbose(fn.name, pkg._id)
- fn(pkg, folder, parent, gtop, cb)
- }, cb)
+ var parent = pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder)
+ var gnm = global && npm.globalDir
+ var gtop = parent === gnm
+
+ log.info('linkStuff', pkg._id)
+ log.silly('linkStuff', pkg._id, 'has', parent, 'as its parent node_modules')
+ if (global) log.silly('linkStuff', pkg._id, 'is part of a global install')
+ if (gnm) log.silly('linkStuff', pkg._id, 'is installed into a global node_modules')
+ if (gtop) log.silly('linkStuff', pkg._id, 'is installed into the top-level global node_modules')
+
+ shouldWarn(pkg, folder, global, function () {
+ asyncMap(
+ [linkBins, linkMans, !didRB && rebuildBundles],
+ function (fn, cb) {
+ if (!fn) return cb()
+ log.verbose(fn.name, pkg._id)
+ fn(pkg, folder, parent, gtop, cb)
+ },
+ cb
+ )
})
}
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js
index b5a9fae0e4..cae09b1813 100644
--- a/deps/npm/lib/cache.js
+++ b/deps/npm/lib/cache.js
@@ -76,7 +76,6 @@ var npm = require("./npm.js")
, addLocal = require("./cache/add-local.js")
, addRemoteTarball = require("./cache/add-remote-tarball.js")
, addRemoteGit = require("./cache/add-remote-git.js")
- , maybeGithub = require("./cache/maybe-github.js")
, inflight = require("inflight")
, realizePackageSpecifier = require("realize-package-specifier")
, npa = require("npm-package-arg")
@@ -135,9 +134,7 @@ function read (name, ver, forceBypass, cb) {
var root = cachedPackageRoot({name : name, version : ver})
function c (er, data) {
- log.silly("cache", "addNamed cb", name+"@"+ver)
if (er) log.verbose("cache", "addNamed error for", name+"@"+ver, er)
-
if (data) deprCheck(data)
return cb(er, data)
@@ -298,14 +295,8 @@ function add (args, where, cb) {
})
break
case "git":
- addRemoteGit(p.spec, false, cb)
- break
case "hosted":
- if (p.hosted.type === "github") {
- maybeGithub(p.rawSpec, cb)
- } else {
- addRemoteGit(p.spec, false, cb)
- }
+ addRemoteGit(p.rawSpec, cb)
break
default:
if (p.name) return addNamed(p.name, p.spec, null, cb)
diff --git a/deps/npm/lib/cache/add-named.js b/deps/npm/lib/cache/add-named.js
index cb5a3fa8a6..07d5b7f01b 100644
--- a/deps/npm/lib/cache/add-named.js
+++ b/deps/npm/lib/cache/add-named.js
@@ -34,20 +34,23 @@ function addNamed (name, version, data, cb_) {
assert(typeof cb_ === "function", "must have callback")
var key = name + "@" + version
- log.verbose("addNamed", key)
+ log.silly("addNamed", key)
function cb (er, data) {
if (data && !data._fromGithub) data._from = key
cb_(er, data)
}
- log.silly("addNamed", "semver.valid", semver.valid(version))
- log.silly("addNamed", "semver.validRange", semver.validRange(version))
- var fn = ( semver.valid(version, true) ? addNameVersion
- : semver.validRange(version, true) ? addNameRange
- : addNameTag
- )
- fn(name, version, data, cb)
+ if (semver.valid(version, true)) {
+ log.verbose('addNamed', JSON.stringify(version), 'is a plain semver version for', name)
+ addNameVersion(name, version, data, cb)
+ } else if (semver.validRange(version, true)) {
+ log.verbose('addNamed', JSON.stringify(version), 'is a valid semver range for', name)
+ addNameRange(name, version, data, cb)
+ } else {
+ log.verbose('addNamed', JSON.stringify(version), 'is being treated as a dist-tag for', name)
+ addNameTag(name, version, data, cb)
+ }
}
function addNameTag (name, tag, data, cb) {
diff --git a/deps/npm/lib/cache/add-remote-git.js b/deps/npm/lib/cache/add-remote-git.js
index 9eaf6b18a5..3ec9c46d1e 100644
--- a/deps/npm/lib/cache/add-remote-git.js
+++ b/deps/npm/lib/cache/add-remote-git.js
@@ -1,73 +1,137 @@
-var mkdir = require('mkdirp')
var assert = require('assert')
-var git = require('../utils/git.js')
+var crypto = require('crypto')
var fs = require('graceful-fs')
-var log = require('npmlog')
var path = require('path')
var url = require('url')
+
var chownr = require('chownr')
-var crypto = require('crypto')
-var npm = require('../npm.js')
-var rm = require('../utils/gently-rm.js')
+var dezalgo = require('dezalgo')
+var hostedFromURL = require('hosted-git-info').fromUrl
var inflight = require('inflight')
-var getCacheStat = require('./get-stat.js')
-var addLocal = require('./add-local.js')
-var realizePackageSpecifier = require('realize-package-specifier')
+var log = require('npmlog')
+var mkdir = require('mkdirp')
var normalizeGitUrl = require('normalize-git-url')
-var randomBytes = require('crypto').pseudoRandomBytes // only need uniqueness
+var npa = require('npm-package-arg')
+var realizePackageSpecifier = require('realize-package-specifier')
+
+var addLocal = require('./add-local.js')
+var getCacheStat = require('./get-stat.js')
+var git = require('../utils/git.js')
+var npm = require('../npm.js')
+var rm = require('../utils/gently-rm.js')
var remotes = path.resolve(npm.config.get('cache'), '_git-remotes')
var templates = path.join(remotes, '_templates')
var VALID_VARIABLES = [
- 'GIT_SSH',
- 'GIT_SSL_NO_VERIFY',
+ 'GIT_ASKPASS',
'GIT_PROXY_COMMAND',
- 'GIT_SSL_CAINFO'
+ 'GIT_SSH',
+ 'GIT_SSL_CAINFO',
+ 'GIT_SSL_NO_VERIFY'
]
-module.exports = function addRemoteGit (uri, silent, cb) {
+module.exports = addRemoteGit
+function addRemoteGit (uri, _cb) {
assert(typeof uri === 'string', 'must have git URL')
- assert(typeof cb === 'function', 'must have callback')
+ assert(typeof _cb === 'function', 'must have callback')
+ var cb = dezalgo(_cb)
+
+ log.verbose('addRemoteGit', 'caching', uri)
+
+ // the URL comes in exactly as it was passed on the command line, or as
+ // normalized by normalize-package-data / read-package-json / read-installed,
+ // so figure out what to do with it using hosted-git-info
+ var parsed = hostedFromURL(uri)
+ if (parsed) {
+ // normalize GitHub syntax to org/repo (for now)
+ var from
+ if (parsed.type === 'github' && parsed.default === 'shortcut') {
+ from = parsed.path()
+ } else {
+ from = parsed.toString()
+ }
- // reconstruct the URL as it was passed in – realizePackageSpecifier
- // strips off `git+` and `maybeGithub` doesn't include it.
- var originalURL
- if (!/^git[+:]/.test(uri)) {
- originalURL = 'git+' + uri
+ log.verbose('addRemoteGit', from, 'is a repository hosted by', parsed.type)
+
+ // prefer explicit URLs to pushing everything through shortcuts
+ if (parsed.default !== 'shortcut') {
+ return tryClone(from, parsed.toString(), false, cb)
+ }
+
+ // try git:, then git+ssh:, then git+https: before failing
+ tryGitProto(from, parsed, cb)
} else {
- originalURL = uri
+ // verify that this is a Git URL before continuing
+ parsed = npa(uri)
+ if (parsed.type !== 'git') {
+ return cb(new Error(uri + 'is not a Git or GitHub URL'))
+ }
+
+ tryClone(parsed.rawSpec, uri, false, cb)
+ }
+}
+
+function tryGitProto (from, hostedInfo, cb) {
+ var gitURL = hostedInfo.git()
+ if (!gitURL) return trySSH(from, hostedInfo, cb)
+
+ log.silly('tryGitProto', 'attempting to clone', gitURL)
+ tryClone(from, gitURL, true, function (er) {
+ if (er) return tryHTTPS(from, hostedInfo, cb)
+
+ cb.apply(this, arguments)
+ })
+}
+
+function tryHTTPS (from, hostedInfo, cb) {
+ var httpsURL = hostedInfo.https()
+ if (!httpsURL) {
+ return cb(new Error(from + ' can not be cloned via Git, SSH, or HTTPS'))
}
- // break apart the origin URL and the branch / tag / commitish
- var normalized = normalizeGitUrl(uri)
- var gitURL = normalized.url
+ log.silly('tryHTTPS', 'attempting to clone', httpsURL)
+ tryClone(from, httpsURL, true, function (er) {
+ if (er) return trySSH(from, hostedInfo, cb)
+
+ cb.apply(this, arguments)
+ })
+}
+
+function trySSH (from, hostedInfo, cb) {
+ var sshURL = hostedInfo.ssh()
+ if (!sshURL) return tryHTTPS(from, hostedInfo, cb)
+
+ log.silly('trySSH', 'attempting to clone', sshURL)
+ tryClone(from, sshURL, false, cb)
+}
+
+function tryClone (from, combinedURL, silent, cb) {
+ log.silly('tryClone', 'cloning', from, 'via', combinedURL)
+
+ var normalized = normalizeGitUrl(combinedURL)
+ var cloneURL = normalized.url
var treeish = normalized.branch
// ensure that similarly-named remotes don't collide
- var repoID = gitURL.replace(/[^a-zA-Z0-9]+/g, '-') + '-' +
- crypto.createHash('sha1').update(gitURL).digest('hex').slice(0, 8)
+ var repoID = cloneURL.replace(/[^a-zA-Z0-9]+/g, '-') + '-' +
+ crypto.createHash('sha1').update(cloneURL).digest('hex').slice(0, 8)
var cachedRemote = path.join(remotes, repoID)
- // set later, as the callback flow proceeds
- var resolvedURL
- var resolvedTreeish
- var tmpdir
-
cb = inflight(repoID, cb)
if (!cb) {
- return log.verbose('addRemoteGit', repoID, 'already in flight; waiting')
+ return log.verbose('tryClone', repoID, 'already in flight; waiting')
}
- log.verbose('addRemoteGit', repoID, 'not in flight; caching')
+ log.verbose('tryClone', repoID, 'not in flight; caching')
// initialize the remotes cache with the correct perms
getGitDir(function (er) {
if (er) return cb(er)
fs.stat(cachedRemote, function (er, s) {
- if (er) return mirrorRemote(finish)
- if (!s.isDirectory()) return resetRemote(finish)
+ if (er) return mirrorRemote(from, cloneURL, treeish, cachedRemote, silent, finish)
+ if (!s.isDirectory()) return resetRemote(from, cloneURL, treeish, cachedRemote, finish)
- validateExistingRemote(finish)
+ validateExistingRemote(from, cloneURL, treeish, cachedRemote, finish)
})
// always set permissions on the cached remote
@@ -78,232 +142,240 @@ module.exports = function addRemoteGit (uri, silent, cb) {
})
}
})
+}
- // don't try too hard to hold on to a remote
- function resetRemote (cb) {
- log.info('addRemoteGit', 'resetting', cachedRemote)
- rm(cachedRemote, function (er) {
- if (er) return cb(er)
- mirrorRemote(cb)
- })
- }
-
- // reuse a cached remote when possible, but nuke it if it's in an
- // inconsistent state
- function validateExistingRemote (cb) {
- git.whichAndExec(
- ['config', '--get', 'remote.origin.url'],
- { cwd: cachedRemote, env: gitEnv() },
- function (er, stdout, stderr) {
- var originURL = stdout.trim()
- stderr = stderr.trim()
- log.verbose('addRemoteGit', 'remote.origin.url:', originURL)
-
- if (stderr || er) {
- log.warn('addRemoteGit', 'resetting remote', cachedRemote, 'because of error:', stderr || er)
- return resetRemote(cb)
- } else if (gitURL !== originURL) {
- log.warn(
- 'addRemoteGit',
- 'pre-existing cached repo', cachedRemote, 'points to', originURL, 'and not', gitURL
- )
- return resetRemote(cb)
- }
+// don't try too hard to hold on to a remote
+function resetRemote (from, cloneURL, treeish, cachedRemote, cb) {
+ log.info('resetRemote', 'resetting', cachedRemote, 'for', from)
+ rm(cachedRemote, function (er) {
+ if (er) return cb(er)
+ mirrorRemote(from, cloneURL, treeish, cachedRemote, false, cb)
+ })
+}
- log.verbose('addRemoteGit', 'updating existing cached remote', cachedRemote)
- updateRemote(cb)
+// reuse a cached remote when possible, but nuke it if it's in an
+// inconsistent state
+function validateExistingRemote (from, cloneURL, treeish, cachedRemote, cb) {
+ git.whichAndExec(
+ ['config', '--get', 'remote.origin.url'],
+ { cwd: cachedRemote, env: gitEnv() },
+ function (er, stdout, stderr) {
+ var originURL
+ if (stdout) {
+ originURL = stdout.trim()
+ log.silly('validateExistingRemote', from, 'remote.origin.url:', originURL)
}
- )
- }
-
- // make a complete bare mirror of the remote repo
- // NOTE: npm uses a blank template directory to prevent weird inconsistencies
- // https://github.com/npm/npm/issues/5867
- function mirrorRemote (cb) {
- mkdir(cachedRemote, function (er) {
- if (er) return cb(er)
-
- var args = [
- 'clone',
- '--template=' + templates,
- '--mirror',
- gitURL, cachedRemote
- ]
- git.whichAndExec(
- ['clone', '--template=' + templates, '--mirror', gitURL, cachedRemote],
- { cwd: cachedRemote, env: gitEnv() },
- function (er, stdout, stderr) {
- if (er) {
- var combined = (stdout + '\n' + stderr).trim()
- var command = 'git ' + args.join(' ') + ':'
- if (silent) {
- log.verbose(command, combined)
- } else {
- log.error(command, combined)
- }
- return cb(er)
- }
- log.verbose('addRemoteGit', 'git clone ' + gitURL, stdout.trim())
- setPermissions(cb)
- }
- )
- })
- }
- function setPermissions (cb) {
- if (process.platform === 'win32') {
- log.verbose('addRemoteGit', 'skipping chownr on Windows')
- resolveHead(cb)
- } else {
- getGitDir(function (er, cs) {
- if (er) {
- log.error('addRemoteGit', 'could not get cache stat')
- return cb(er)
- }
-
- chownr(cachedRemote, cs.uid, cs.gid, function (er) {
- if (er) {
- log.error(
- 'addRemoteGit',
- 'Failed to change folder ownership under npm cache for',
- cachedRemote
- )
- return cb(er)
- }
+ if (stderr) stderr = stderr.trim()
+ if (stderr || er) {
+ log.warn('addRemoteGit', from, 'resetting remote', cachedRemote, 'because of error:', stderr || er)
+ return resetRemote(from, cloneURL, treeish, cachedRemote, cb)
+ } else if (cloneURL !== originURL) {
+ log.warn(
+ 'addRemoteGit',
+ from,
+ 'pre-existing cached repo', cachedRemote, 'points to', originURL, 'and not', cloneURL
+ )
+ return resetRemote(from, cloneURL, treeish, cachedRemote, cb)
+ }
- log.verbose('addRemoteGit', 'set permissions on', cachedRemote)
- resolveHead(cb)
- })
- })
+ log.verbose('validateExistingRemote', from, 'is updating existing cached remote', cachedRemote)
+ updateRemote(from, cloneURL, treeish, cachedRemote, cb)
}
- }
+ )
+}
- // always fetch the origin, even right after mirroring, because this way
- // permissions will get set correctly
- function updateRemote (cb) {
+// make a complete bare mirror of the remote repo
+// NOTE: npm uses a blank template directory to prevent weird inconsistencies
+// https://github.com/npm/npm/issues/5867
+function mirrorRemote (from, cloneURL, treeish, cachedRemote, silent, cb) {
+ mkdir(cachedRemote, function (er) {
+ if (er) return cb(er)
+
+ var args = [
+ 'clone',
+ '--template=' + templates,
+ '--mirror',
+ cloneURL, cachedRemote
+ ]
git.whichAndExec(
- ['fetch', '-a', 'origin'],
+ ['clone', '--template=' + templates, '--mirror', cloneURL, cachedRemote],
{ cwd: cachedRemote, env: gitEnv() },
function (er, stdout, stderr) {
if (er) {
var combined = (stdout + '\n' + stderr).trim()
- log.error('git fetch -a origin (' + gitURL + ')', combined)
+ var command = 'git ' + args.join(' ') + ':'
+ if (silent) {
+ log.verbose(command, combined)
+ } else {
+ log.error(command, combined)
+ }
return cb(er)
}
- log.verbose('addRemoteGit', 'git fetch -a origin (' + gitURL + ')', stdout.trim())
-
- setPermissions(cb)
+ log.verbose('mirrorRemote', from, 'git clone ' + cloneURL, stdout.trim())
+ setPermissions(from, cloneURL, treeish, cachedRemote, cb)
}
)
- }
+ })
+}
- // branches and tags are both symbolic labels that can be attached to different
- // commits, so resolve the commitish to the current actual treeish the label
- // corresponds to
- //
- // important for shrinkwrap
- function resolveHead (cb) {
- log.verbose('addRemoteGit', 'original treeish:', treeish)
- var args = ['rev-list', '-n1', treeish]
- git.whichAndExec(
- args,
- { cwd: cachedRemote, env: gitEnv() },
- function (er, stdout, stderr) {
+function setPermissions (from, cloneURL, treeish, cachedRemote, cb) {
+ if (process.platform === 'win32') {
+ log.verbose('setPermissions', from, 'skipping chownr on Windows')
+ resolveHead(from, cloneURL, treeish, cachedRemote, cb)
+ } else {
+ getGitDir(function (er, cs) {
+ if (er) {
+ log.error('setPermissions', from, 'could not get cache stat')
+ return cb(er)
+ }
+
+ chownr(cachedRemote, cs.uid, cs.gid, function (er) {
if (er) {
- log.error('git ' + args.join(' ') + ':', stderr)
+ log.error(
+ 'setPermissions',
+ 'Failed to change git repository ownership under npm cache for',
+ cachedRemote
+ )
return cb(er)
}
- resolvedTreeish = stdout.trim()
- log.silly('addRemoteGit', 'resolved treeish:', resolvedTreeish)
+ log.verbose('setPermissions', from, 'set permissions on', cachedRemote)
+ resolveHead(from, cloneURL, treeish, cachedRemote, cb)
+ })
+ })
+ }
+}
+
+// always fetch the origin, even right after mirroring, because this way
+// permissions will get set correctly
+function updateRemote (from, cloneURL, treeish, cachedRemote, cb) {
+ git.whichAndExec(
+ ['fetch', '-a', 'origin'],
+ { cwd: cachedRemote, env: gitEnv() },
+ function (er, stdout, stderr) {
+ if (er) {
+ var combined = (stdout + '\n' + stderr).trim()
+ log.error('git fetch -a origin (' + cloneURL + ')', combined)
+ return cb(er)
+ }
+ log.verbose('updateRemote', 'git fetch -a origin (' + cloneURL + ')', stdout.trim())
- resolvedURL = getResolved(originalURL, resolvedTreeish)
- log.verbose('addRemoteGit', 'resolved Git URL:', resolvedURL)
+ setPermissions(from, cloneURL, treeish, cachedRemote, cb)
+ }
+ )
+}
- // generate a unique filename
- tmpdir = path.join(
- npm.tmp,
- 'git-cache-' + randomBytes(6).toString('hex'),
- resolvedTreeish
- )
- log.silly('addRemoteGit', 'Git working directory:', tmpdir)
+// branches and tags are both symbolic labels that can be attached to different
+// commits, so resolve the commitish to the current actual treeish the label
+// corresponds to
+//
+// important for shrinkwrap
+function resolveHead (from, cloneURL, treeish, cachedRemote, cb) {
+ log.verbose('resolveHead', from, 'original treeish:', treeish)
+ var args = ['rev-list', '-n1', treeish]
+ git.whichAndExec(
+ args,
+ { cwd: cachedRemote, env: gitEnv() },
+ function (er, stdout, stderr) {
+ if (er) {
+ log.error('git ' + args.join(' ') + ':', stderr)
+ return cb(er)
+ }
- mkdir(tmpdir, function (er) {
- if (er) return cb(er)
+ var resolvedTreeish = stdout.trim()
+ log.silly('resolveHead', from, 'resolved treeish:', resolvedTreeish)
- cloneResolved(cb)
- })
+ var resolvedURL = getResolved(cloneURL, resolvedTreeish)
+ if (!resolvedURL) {
+ return cb(new Error(
+ 'unable to clone ' + from + ' because git clone string ' +
+ cloneURL + ' is in a form npm can\'t handle'
+ ))
}
- )
- }
+ log.verbose('resolveHead', from, 'resolved Git URL:', resolvedURL)
- // make a clone from the mirrored cache so we have a temporary directory in
- // which we can check out the resolved treeish
- function cloneResolved (cb) {
- var args = ['clone', cachedRemote, tmpdir]
- git.whichAndExec(
- args,
- { cwd: cachedRemote, env: gitEnv() },
- function (er, stdout, stderr) {
- stdout = (stdout + '\n' + stderr).trim()
- if (er) {
- log.error('git ' + args.join(' ') + ':', stderr)
- return cb(er)
- }
- log.verbose('addRemoteGit', 'clone', stdout)
+ // generate a unique filename
+ var tmpdir = path.join(
+ npm.tmp,
+ 'git-cache-' + crypto.pseudoRandomBytes(6).toString('hex'),
+ resolvedTreeish
+ )
+ log.silly('resolveHead', 'Git working directory:', tmpdir)
+
+ mkdir(tmpdir, function (er) {
+ if (er) return cb(er)
+
+ cloneResolved(from, resolvedURL, resolvedTreeish, cachedRemote, tmpdir, cb)
+ })
+ }
+ )
+}
- checkoutTreeish(cb)
+// make a clone from the mirrored cache so we have a temporary directory in
+// which we can check out the resolved treeish
+function cloneResolved (from, resolvedURL, resolvedTreeish, cachedRemote, tmpdir, cb) {
+ var args = ['clone', cachedRemote, tmpdir]
+ git.whichAndExec(
+ args,
+ { cwd: cachedRemote, env: gitEnv() },
+ function (er, stdout, stderr) {
+ stdout = (stdout + '\n' + stderr).trim()
+ if (er) {
+ log.error('git ' + args.join(' ') + ':', stderr)
+ return cb(er)
}
- )
- }
+ log.verbose('cloneResolved', from, 'clone', stdout)
- // there is no safe way to do a one-step clone to a treeish that isn't
- // guaranteed to be a branch, so explicitly check out the treeish once it's
- // cloned
- function checkoutTreeish (cb) {
- var args = ['checkout', resolvedTreeish]
- git.whichAndExec(
- args,
- { cwd: tmpdir, env: gitEnv() },
- function (er, stdout, stderr) {
- stdout = (stdout + '\n' + stderr).trim()
+ checkoutTreeish(from, resolvedURL, resolvedTreeish, tmpdir, cb)
+ }
+ )
+}
+
+// there is no safe way to do a one-step clone to a treeish that isn't
+// guaranteed to be a branch, so explicitly check out the treeish once it's
+// cloned
+function checkoutTreeish (from, resolvedURL, resolvedTreeish, tmpdir, cb) {
+ var args = ['checkout', resolvedTreeish]
+ git.whichAndExec(
+ args,
+ { cwd: tmpdir, env: gitEnv() },
+ function (er, stdout, stderr) {
+ stdout = (stdout + '\n' + stderr).trim()
+ if (er) {
+ log.error('git ' + args.join(' ') + ':', stderr)
+ return cb(er)
+ }
+ log.verbose('checkoutTreeish', from, 'checkout', stdout)
+
+ // convince addLocal that the checkout is a local dependency
+ realizePackageSpecifier(tmpdir, function (er, spec) {
if (er) {
- log.error('git ' + args.join(' ') + ':', stderr)
+ log.error('addRemoteGit', 'Failed to map', tmpdir, 'to a package specifier')
return cb(er)
}
- log.verbose('addRemoteGit', 'checkout', stdout)
-
- // convince addLocal that the checkout is a local dependency
- realizePackageSpecifier(tmpdir, function (er, spec) {
- if (er) {
- log.error('addRemoteGit', 'Failed to map', tmpdir, 'to a package specifier')
- return cb(er)
- }
- // ensure pack logic is applied
- // https://github.com/npm/npm/issues/6400
- addLocal(spec, null, function (er, data) {
- if (data) {
- log.verbose('addRemoteGit', 'data._resolved:', resolvedURL)
- data._resolved = resolvedURL
-
- // the spec passed to addLocal is not what the user originally requested,
- // so remap
- // https://github.com/npm/npm/issues/7121
- if (!data._fromGitHub) {
- log.silly('addRemoteGit', 'data._from:', originalURL)
- data._from = originalURL
- } else {
- log.silly('addRemoteGit', 'data._from:', data._from, '(GitHub)')
- }
+ // ensure pack logic is applied
+ // https://github.com/npm/npm/issues/6400
+ addLocal(spec, null, function (er, data) {
+ if (data) {
+ if (npm.config.get('save-exact')) {
+ log.verbose('addRemoteGit', 'data._from:', resolvedURL, '(save-exact)')
+ data._from = resolvedURL
+ } else {
+ log.verbose('addRemoteGit', 'data._from:', from)
+ data._from = from
}
- cb(er, data)
- })
+ log.verbose('addRemoteGit', 'data._resolved:', resolvedURL)
+ data._resolved = resolvedURL
+ }
+
+ cb(er, data)
})
- }
- )
- }
+ })
+ }
+ )
}
function getGitDir (cb) {
@@ -333,7 +405,12 @@ function gitEnv () {
// git responds to env vars in some weird ways in post-receive hooks
// so don't carry those along.
if (gitEnv_) return gitEnv_
- gitEnv_ = {}
+
+ // allow users to override npm's insistence on not prompting for
+ // passphrases, but default to just failing when credentials
+ // aren't available
+ gitEnv_ = { GIT_ASKPASS: 'echo' }
+
for (var k in process.env) {
if (!~VALID_VARIABLES.indexOf(k) && k.match(/^GIT/)) continue
gitEnv_[k] = process.env[k]
@@ -341,20 +418,32 @@ function gitEnv () {
return gitEnv_
}
+addRemoteGit.getResolved = getResolved
function getResolved (uri, treeish) {
+ // normalize hosted-git-info clone URLs back into regular URLs
+ // this will only work on URLs that hosted-git-info recognizes
+ // https://github.com/npm/npm/issues/7961
+ var rehydrated = hostedFromURL(uri)
+ if (rehydrated) uri = rehydrated.toString()
+
var parsed = url.parse(uri)
+
+ // non-hosted SSH strings that are not URLs (git@whatever.com:foo.git) are
+ // no bueno
+ // https://github.com/npm/npm/issues/7961
+ if (!parsed.protocol) return
+
parsed.hash = treeish
if (!/^git[+:]/.test(parsed.protocol)) {
parsed.protocol = 'git+' + parsed.protocol
}
- var resolved = url.format(parsed)
// node incorrectly sticks a / at the start of the path We know that the host
// won't change, so split and detect this
// https://github.com/npm/npm/issues/3224
var spo = uri.split(parsed.host)
- var spr = resolved.split(parsed.host)
- if (spo[1].charAt(0) === ':' && spr[1].charAt(0) === '/') {
+ var spr = url.format(parsed).split(parsed.host)
+ if (spo[1] && spo[1].charAt(0) === ':' && spr[1] && spr[1].charAt(0) === '/') {
spr[1] = spr[1].slice(1)
}
return spr.join(parsed.host)
diff --git a/deps/npm/lib/cache/maybe-github.js b/deps/npm/lib/cache/maybe-github.js
deleted file mode 100644
index 44d9031066..0000000000
--- a/deps/npm/lib/cache/maybe-github.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var assert = require("assert")
- , log = require("npmlog")
- , addRemoteGit = require("./add-remote-git.js")
- , hosted = require("hosted-git-info")
-
-module.exports = function maybeGithub (p, cb) {
- assert(typeof p === "string", "must pass package name")
- assert(typeof cb === "function", "must pass callback")
-
- var parsed = hosted.fromUrl(p)
- log.info("maybeGithub", "Attempting %s from %s", p, parsed.git())
-
- return addRemoteGit(parsed.git(), true, function (er, data) {
- if (er) {
- log.info("maybeGithub", "Couldn't clone %s", parsed.git())
- log.info("maybeGithub", "Now attempting %s from %s", p, parsed.ssh())
-
- return addRemoteGit(parsed.ssh(), false, function (er, data) {
- if (er) return cb(er)
-
- success(parsed.ssh(), data)
- })
- }
-
- success(parsed.git(), data)
- })
-
- function success (u, data) {
- data._from = u
- data._fromGithub = true
- return cb(null, data)
- }
-}
diff --git a/deps/npm/lib/cache/update-index.js b/deps/npm/lib/cache/update-index.js
index 2955f6a148..ab1ede120b 100644
--- a/deps/npm/lib/cache/update-index.js
+++ b/deps/npm/lib/cache/update-index.js
@@ -1,82 +1,86 @@
module.exports = updateIndex
-var fs = require("graceful-fs")
- , assert = require("assert")
- , path = require("path")
- , mkdir = require("mkdirp")
- , chownr = require("chownr")
- , url = require("url")
- , npm = require("../npm.js")
- , log = require("npmlog")
- , cacheFile = require("npm-cache-filename")
- , getCacheStat = require("./get-stat.js")
+var fs = require('graceful-fs')
+var assert = require('assert')
+var path = require('path')
+var mkdir = require('mkdirp')
+var chownr = require('chownr')
+var npm = require('../npm.js')
+var log = require('npmlog')
+var cacheFile = require('npm-cache-filename')
+var getCacheStat = require('./get-stat.js')
+var mapToRegistry = require('../utils/map-to-registry.js')
/* /-/all is special.
* It uses timestamp-based caching and partial updates,
* because it is a monster.
*/
-function updateIndex (uri, params, cb) {
- assert(typeof uri === "string", "must pass registry URI to updateIndex")
- assert(params && typeof params === "object", "must pass params to updateIndex")
- assert(typeof cb === "function", "must pass callback to updateIndex")
-
- var parsed = url.parse(uri)
- assert(
- parsed.protocol === "http:" || parsed.protocol === "https:",
- "must have a URL that starts with http: or https:"
- )
-
- var cacheBase = cacheFile(npm.config.get("cache"))(uri)
- var cachePath = path.join(cacheBase, ".cache.json")
- log.info("updateIndex", cachePath)
-
- getCacheStat(function (er, st) {
+function updateIndex (staleness, cb) {
+ assert(typeof cb === 'function', 'must pass callback to updateIndex')
+
+ mapToRegistry('-/all', npm.config, function (er, uri, auth) {
if (er) return cb(er)
- mkdir(cacheBase, function (er, made) {
- if (er) return cb(er)
+ var params = {
+ timeout: staleness,
+ follow: true,
+ staleOk: true,
+ auth: auth
+ }
+ var cacheBase = cacheFile(npm.config.get('cache'))(uri)
+ var cachePath = path.join(cacheBase, '.cache.json')
+ log.info('updateIndex', cachePath)
- fs.readFile(cachePath, function (er, data) {
- if (er) return updateIndex_(uri, params, 0, {}, cachePath, cb)
+ getCacheStat(function (er, st) {
+ if (er) return cb(er)
- try {
- data = JSON.parse(data)
- }
- catch (ex) {
- fs.writeFile(cachePath, "{}", function (er) {
- if (er) return cb(new Error("Broken cache."))
+ mkdir(cacheBase, function (er, made) {
+ if (er) return cb(er)
- return updateIndex_(uri, params, 0, {}, cachePath, cb)
+ fs.readFile(cachePath, function (er, data) {
+ if (er) {
+ log.warn('', 'Building the local index for the first time, please be patient')
+ return updateIndex_(uri, params, {}, cachePath, cb)
+ }
+
+ chownr(made || cachePath, st.uid, st.gid, function (er) {
+ if (er) return cb(er)
+
+ try {
+ data = JSON.parse(data)
+ } catch (ex) {
+ fs.writeFile(cachePath, '{}', function (er) {
+ if (er) return cb(new Error('Broken cache.'))
+
+ log.warn('', 'Building the local index for the first time, please be patient')
+ return updateIndex_(uri, params, {}, cachePath, cb)
+ })
+ }
+
+ var t = +data._updated || 0
+ // use the cache and update in the background if it's not too old
+ if (Date.now() - t < 60000) {
+ cb(null, data)
+ cb = function () {}
+ }
+
+ if (t === 0) {
+ log.warn('', 'Building the local index for the first time, please be patient')
+ } else {
+ log.verbose('updateIndex', 'Cached search data present with timestamp', t)
+ uri += '/since?stale=update_after&startkey=' + t
+ }
+ updateIndex_(uri, params, data, cachePath, cb)
})
- }
- var t = +data._updated || 0
- chownr(made || cachePath, st.uid, st.gid, function (er) {
- if (er) return cb(er)
-
- updateIndex_(uri, params, t, data, cachePath, cb)
})
})
})
})
}
-function updateIndex_ (uri, params, t, data, cachePath, cb) {
- // use the cache and update in the background if it's not too old
- if (Date.now() - t < 60000) {
- cb(null, data)
- cb = function () {}
- }
-
- var full
- if (t === 0) {
- log.warn("", "Building the local index for the first time, please be patient")
- full = url.resolve(uri, "/-/all")
- }
- else {
- full = url.resolve(uri, "/-/all/since?stale=update_after&startkey=" + t)
- }
-
- npm.registry.request(full, params, function (er, updates, _, res) {
+function updateIndex_ (all, params, data, cachePath, cb) {
+ log.silly('update-index', 'fetching', all)
+ npm.registry.request(all, params, function (er, updates, _, res) {
if (er) return cb(er, data)
var headers = res.headers
diff --git a/deps/npm/lib/config/core.js b/deps/npm/lib/config/core.js
index 97c17919d2..f11a98dfb8 100644
--- a/deps/npm/lib/config/core.js
+++ b/deps/npm/lib/config/core.js
@@ -74,8 +74,10 @@ function load () {
loading = true
cb = once(function (er, conf) {
- if (!er)
+ if (!er) {
exports.loaded = conf
+ loading = false
+ }
loadCbs.forEach(function (fn) {
fn(er, conf)
})
diff --git a/deps/npm/lib/config/load-cafile.js b/deps/npm/lib/config/load-cafile.js
index dc1ff9f03a..cc63615ff5 100644
--- a/deps/npm/lib/config/load-cafile.js
+++ b/deps/npm/lib/config/load-cafile.js
@@ -9,8 +9,12 @@ function loadCAFile(cafilePath, cb) {
fs.readFile(cafilePath, "utf8", afterCARead.bind(this))
function afterCARead(er, cadata) {
- if (er)
+
+ if (er) {
+ // previous cafile no longer exists, so just continue on gracefully
+ if (er.code === 'ENOENT') return cb()
return cb(er)
+ }
var delim = "-----END CERTIFICATE-----"
var output
diff --git a/deps/npm/lib/init.js b/deps/npm/lib/init.js
index 401e700af3..a889774b02 100644
--- a/deps/npm/lib/init.js
+++ b/deps/npm/lib/init.js
@@ -17,7 +17,7 @@ function init (args, cb) {
if (!initJson.yes(npm.config)) {
console.log(
["This utility will walk you through creating a package.json file."
- ,"It only covers the most common items, and tries to guess sane defaults."
+ ,"It only covers the most common items, and tries to guess sensible defaults."
,""
,"See `npm help json` for definitive documentation on these fields"
,"and exactly what they do."
diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js
index d9a8c9af0d..799f0de943 100644
--- a/deps/npm/lib/install.js
+++ b/deps/npm/lib/install.js
@@ -223,8 +223,9 @@ function install (args, cb_) {
// initial "family" is the name:version of the root, if it's got
// a package.json file.
- var jsonFile = path.resolve(where, "package.json")
- readJson(jsonFile, log.warn, function (er, data) {
+ var jsonPath = path.resolve(where, "package.json")
+ log.verbose('install', 'initial load of', jsonPath)
+ readJson(jsonPath, log.warn, function (er, data) {
if (er
&& er.code !== "ENOENT"
&& er.code !== "ENOTDIR") return cb(er)
@@ -246,7 +247,9 @@ function install (args, cb_) {
}
function validateInstall (where, cb) {
- readJson(path.resolve(where, 'package.json'), log.warn, function (er, data) {
+ var jsonPath = path.resolve(where, 'package.json')
+ log.verbose('validateInstall', 'loading', jsonPath, 'for validation')
+ readJson(jsonPath, log.warn, function (er, data) {
if (er
&& er.code !== 'ENOENT'
&& er.code !== 'ENOTDIR') return cb(er)
@@ -314,11 +317,11 @@ function findPeerInvalid_ (packageMap, fpiList) {
function readDependencies (context, where, opts, cb) {
var wrap = context ? context.wrap : null
- readJson( path.resolve(where, "package.json")
- , log.warn
- , function (er, data) {
+ var jsonPath = path.resolve(where, 'package.json')
+ log.verbose('readDependencies', 'loading dependencies from', jsonPath)
+ readJson(jsonPath, log.warn, function (er, data) {
if (er && er.code === "ENOENT") er.code = "ENOPACKAGEJSON"
- if (er) return cb(er)
+ if (er) return cb(er)
if (opts && opts.dev) {
if (!data.dependencies) data.dependencies = {}
@@ -420,9 +423,9 @@ function save (where, installed, tree, pretty, hasArguments, cb) {
var saveTarget = path.resolve(where, "package.json")
asyncMap(Object.keys(tree), function (k, cb) {
- // if "what" was a url, then save that instead.
+ // if "from" is remote, git, or hosted, then save that instead.
var t = tree[k]
- , u = url.parse(t.from)
+ , f = npa(t.from)
, a = npa(t.what)
, w = [a.name, a.spec]
@@ -430,7 +433,7 @@ function save (where, installed, tree, pretty, hasArguments, cb) {
fs.stat(t.from, function (er){
if (!er) {
w[1] = "file:" + t.from
- } else if (u && u.protocol) {
+ } else if (['hosted', 'git', 'remote'].indexOf(f.type) !== -1) {
w[1] = t.from
}
cb(null, [w])
@@ -472,7 +475,7 @@ function save (where, installed, tree, pretty, hasArguments, cb) {
data.bundleDependencies = bundle.sort()
}
- log.verbose("saving", things)
+ log.verbose("save", "saving", things)
data[deps] = data[deps] || {}
Object.keys(things).forEach(function (t) {
data[deps][t] = things[t]
@@ -485,6 +488,7 @@ function save (where, installed, tree, pretty, hasArguments, cb) {
data[deps] = sortedObject(data[deps])
+ log.silly("save", "writing", saveTarget)
data = JSON.stringify(data, null, 2) + "\n"
writeFileAtomic(saveTarget, data, function (er) {
cb(er, installed, tree, pretty)
@@ -601,7 +605,9 @@ function installManyTop (what, where, context, cb_) {
if (context.explicit) return next()
- readJson(path.join(where, "package.json"), log.warn, function (er, data) {
+ var jsonPath = path.join(where, 'package.json')
+ log.verbose('installManyTop', 'reading for lifecycle', jsonPath)
+ readJson(jsonPath, log.warn, function (er, data) {
if (er) return next(er)
lifecycle(data, "preinstall", where, next)
})
@@ -636,8 +642,9 @@ function installManyTop_ (what, where, context, cb) {
// recombine unscoped with @scope/package packages
asyncMap(unscoped.concat(scoped).map(function (p) {
return path.resolve(nm, p, "package.json")
- }), function (jsonfile, cb) {
- readJson(jsonfile, log.warn, function (er, data) {
+ }), function (jsonPath, cb) {
+ log.verbose('installManyTop', 'reading scoped package data from', jsonPath)
+ readJson(jsonPath, log.warn, function (er, data) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
if (er) return cb(null, [])
cb(null, [[data.name, data.version]])
@@ -789,7 +796,9 @@ function targetResolver (where, context, deps) {
})
asyncMap(inst, function (pkg, cb) {
- readJson(path.resolve(name, pkg, "package.json"), log.warn, function (er, d) {
+ var jsonPath = path.resolve(name, pkg, 'package.json')
+ log.verbose('targetResolver', 'reading package data from', jsonPath)
+ readJson(jsonPath, log.warn, function (er, d) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
// error means it's not a package, most likely.
if (er) return cb(null, [])
@@ -930,11 +939,11 @@ function installOne (target, where, context, cb) {
function localLink (target, where, context, cb) {
log.verbose("localLink", target._id)
- var jsonFile = path.resolve( npm.globalDir, target.name
- , "package.json" )
- , parent = context.parent
+ var jsonPath = path.resolve(npm.globalDir, target.name , 'package.json')
+ var parent = context.parent
- readJson(jsonFile, log.warn, function (er, data) {
+ log.verbose('localLink', 'reading data to link', target.name, 'from', jsonPath)
+ readJson(jsonPath, log.warn, function (er, data) {
function thenLink () {
npm.commands.link([target.name], function (er, d) {
log.silly("localLink", "back from link", [er, d])
@@ -1057,23 +1066,24 @@ function write (target, targetFolder, context, cb_) {
log.silly("install write", "writing", target.name, target.version, "to", targetFolder)
chain(
- [ [ cache.unpack, target.name, target.version, targetFolder
- , null, null, user, group ]
- , [ fs, "writeFile"
- , path.resolve(targetFolder, "package.json")
- , JSON.stringify(target, null, 2) + "\n" ]
- , [ lifecycle, target, "preinstall", targetFolder ]
- , function (cb) {
- if (!target.bundleDependencies) return cb()
-
- var bd = path.resolve(targetFolder, "node_modules")
- fs.readdir(bd, function (er, b) {
- // nothing bundled, maybe
- if (er) return cb()
- bundled = b || []
- cb()
- })
- } ]
+ [ [ cache.unpack, target.name, target.version, targetFolder, null, null, user, group ],
+ function writePackageJSON (cb) {
+ var jsonPath = path.resolve(targetFolder, 'package.json')
+ log.verbose('write', 'writing to', jsonPath)
+ writeFileAtomic(jsonPath, JSON.stringify(target, null, 2) + '\n', cb)
+ },
+ [ lifecycle, target, "preinstall", targetFolder ],
+ function collectBundled (cb) {
+ if (!target.bundleDependencies) return cb()
+
+ var bd = path.resolve(targetFolder, "node_modules")
+ fs.readdir(bd, function (er, b) {
+ // nothing bundled, maybe
+ if (er) return cb()
+ bundled = b || []
+ cb()
+ })
+ } ]
// nest the chain so that we can throw away the results returned
// up until this point, since we really don't care about it.
@@ -1118,7 +1128,16 @@ function write (target, targetFolder, context, cb_) {
"in npm 3+. Your application will need to depend on it explicitly."
], pd+","+data.name)
})
- var pdTargetFolder = path.resolve(targetFolder, "..", "..")
+
+ // Package scopes cause an addditional tree level which needs to be
+ // considered when resolving a peerDependency's target folder.
+ var pdTargetFolder
+ if (npa(target.name).scope) {
+ pdTargetFolder = path.resolve(targetFolder, '../../..')
+ } else {
+ pdTargetFolder = path.resolve(targetFolder, '../..')
+ }
+
var pdContext = context
if (peerDeps.length > 0) {
actions.push(
diff --git a/deps/npm/lib/link.js b/deps/npm/lib/link.js
index 387fb35c3a..916ebd6afe 100644
--- a/deps/npm/lib/link.js
+++ b/deps/npm/lib/link.js
@@ -127,7 +127,7 @@ function linkPkg (folder, cb_) {
return cb(er)
}
var target = path.resolve(npm.globalDir, d.name)
- symlink(me, target, function (er) {
+ symlink(me, target, false, true, function (er) {
if (er) return cb(er)
log.verbose("link", "build target", target)
// also install missing dependencies.
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index 459a3c3245..a2756ed7d2 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -11,9 +11,6 @@ if (typeof WScript !== "undefined") {
}
-// monkey-patch support for 0.6 child processes
-require('child-process-close')
-
var EventEmitter = require("events").EventEmitter
, npm = module.exports = new EventEmitter()
, npmconf = require("./config/core.js")
diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js
index b6aa5fe7e8..bf72bf814d 100644
--- a/deps/npm/lib/run-script.js
+++ b/deps/npm/lib/run-script.js
@@ -189,8 +189,7 @@ function run (pkg, wd, cmd, args, cb) {
function joinArgs (args) {
var joinedArgs = ""
args.forEach(function(arg) {
- if (arg.match(/[ '"]/)) arg = '"' + arg.replace(/"/g, '\\"') + '"'
- joinedArgs += " " + arg
+ joinedArgs += ' "' + arg.replace(/"/g, '\\"') + '"'
})
return joinedArgs
}
diff --git a/deps/npm/lib/search.js b/deps/npm/lib/search.js
index ad3f312e54..840bc2f6b7 100644
--- a/deps/npm/lib/search.js
+++ b/deps/npm/lib/search.js
@@ -3,7 +3,6 @@ module.exports = exports = search
var npm = require("./npm.js")
, columnify = require("columnify")
- , mapToRegistry = require("./utils/map-to-registry.js")
, updateIndex = require("./cache/update-index.js")
search.usage = "npm search [some search terms ...]"
@@ -35,19 +34,24 @@ function search (args, silent, staleness, cb) {
if (typeof cb !== "function") cb = silent, silent = false
var searchopts = npm.config.get("searchopts")
- , searchexclude = npm.config.get("searchexclude")
+ var searchexclude = npm.config.get("searchexclude")
+
if (typeof searchopts !== "string") searchopts = ""
searchopts = searchopts.split(/\s+/)
- if (typeof searchexclude === "string") {
- searchexclude = searchexclude.split(/\s+/)
- } else searchexclude = []
var opts = searchopts.concat(args).map(function (s) {
return s.toLowerCase()
}).filter(function (s) { return s })
+
+ if (typeof searchexclude === "string") {
+ searchexclude = searchexclude.split(/\s+/)
+ } else {
+ searchexclude = []
+ }
searchexclude = searchexclude.map(function (s) {
return s.toLowerCase()
})
- getFilteredData( staleness, opts, searchexclude, function (er, data) {
+
+ getFilteredData(staleness, opts, searchexclude, function (er, data) {
// now data is the list of data that we want to show.
// prettify and print it, and then provide the raw
// data to the cb.
@@ -58,19 +62,9 @@ function search (args, silent, staleness, cb) {
}
function getFilteredData (staleness, args, notArgs, cb) {
- mapToRegistry("-/all", npm.config, function (er, uri, auth) {
+ updateIndex(staleness, function (er, data) {
if (er) return cb(er)
-
- var params = {
- timeout : staleness,
- follow : true,
- staleOk : true,
- auth : auth
- }
- updateIndex(uri, params, function (er, data) {
- if (er) return cb(er)
- return cb(null, filter(data, args, notArgs))
- })
+ return cb(null, filter(data, args, notArgs))
})
}
diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js
index ede8482c40..d5fe0e6a0d 100644
--- a/deps/npm/lib/unbuild.js
+++ b/deps/npm/lib/unbuild.js
@@ -30,7 +30,6 @@ function unbuild_ (silent) { return function (folder, cb_) {
readJson(path.resolve(folder, "package.json"), function (er, pkg) {
// if no json, then just trash it, but no scripts or whatever.
if (er) return gentlyRm(folder, false, base, cb)
- readJson.cache.del(folder)
chain
( [ [lifecycle, pkg, "preuninstall", folder, false, true]
, [lifecycle, pkg, "uninstall", folder, false, true]
@@ -53,8 +52,6 @@ function rmStuff (pkg, folder, cb) {
, gnm = npm.dir
, top = gnm === parent
- readJson.cache.del(path.resolve(folder, "package.json"))
-
log.verbose("unbuild rmStuff", pkg._id, "from", gnm)
if (!top) log.verbose("unbuild rmStuff", "in", parent)
asyncMap([rmBins, rmMans], function (fn, cb) {
diff --git a/deps/npm/lib/utils/git.js b/deps/npm/lib/utils/git.js
index a312770a88..9c80ea5537 100644
--- a/deps/npm/lib/utils/git.js
+++ b/deps/npm/lib/utils/git.js
@@ -20,11 +20,7 @@ function prefixGitArgs () {
function execGit (args, options, cb) {
log.info('git', args)
var fullArgs = prefixGitArgs().concat(args || [])
- return exec(git, fullArgs, options, function (err) {
- if (err) log.error('git', fullArgs.join(' '))
-
- cb.apply(null, arguments)
- })
+ return exec(git, fullArgs, options, cb)
}
function spawnGit (args, options) {
diff --git a/deps/npm/lib/utils/link.js b/deps/npm/lib/utils/link.js
index 9e01d82e61..e353bfae93 100644
--- a/deps/npm/lib/utils/link.js
+++ b/deps/npm/lib/utils/link.js
@@ -16,13 +16,14 @@ function linkIfExists (from, to, gently, cb) {
})
}
-function link (from, to, gently, cb) {
+function link (from, to, gently, abs, cb) {
+ if (typeof cb !== "function") cb = abs, abs = false
if (typeof cb !== "function") cb = gently, gently = null
if (npm.config.get("force")) gently = false
to = path.resolve(to)
var target = from = path.resolve(from)
- if (process.platform !== "win32") {
+ if (!abs && process.platform !== "win32") {
// junctions on windows must be absolute
target = path.relative(path.dirname(to), from)
// if there is no folder in common, then it will be much
diff --git a/deps/npm/lib/utils/spawn.js b/deps/npm/lib/utils/spawn.js
index 953671857d..74684521f7 100644
--- a/deps/npm/lib/utils/spawn.js
+++ b/deps/npm/lib/utils/spawn.js
@@ -11,7 +11,18 @@ function spawn (cmd, args, options) {
er.file = cmd
cooked.emit("error", er)
}).on("close", function (code, signal) {
- cooked.emit("close", code, signal)
+ // Create ENOENT error because Node.js v0.8 will not emit
+ // an `error` event if the command could not be found.
+ if (code === 127) {
+ var er = new Error('spawn ENOENT')
+ er.code = 'ENOENT'
+ er.errno = 'ENOENT'
+ er.syscall = 'spawn'
+ er.file = cmd
+ cooked.emit('error', er)
+ } else {
+ cooked.emit("close", code, signal)
+ }
})
cooked.stdin = raw.stdin
diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1
index 6f1d12f777..3e34011cf1 100644
--- a/deps/npm/man/man1/npm-README.1
+++ b/deps/npm/man/man1/npm-README.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "March 2015" "" ""
+.TH "NPM" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm\fR \- a JavaScript package manager
.P
@@ -38,7 +38,7 @@ Here's an example using curl:
.P
.RS 2
.nf
-curl \-L https://npmjs\.com/install\.sh | sh
+curl \-L https://www\.npmjs\.com/install\.sh | sh
.fi
.RE
.SS Slightly Fancier
@@ -69,11 +69,11 @@ run npm commands by doing \fBnode cli\.js <cmd> <args>\fR\|\. (This is helpful
for testing, or running stuff without actually installing npm itself\.)
.SH Windows Install or Upgrade
.P
-You can download a zip file from https://github\.com/npm/npm/releases, and unpack it
-in the same folder where node\.exe lives\.
+You can download a zip file from https://github\.com/npm/npm/releases, and
+unpack it in the \fBnode_modules\\npm\\\fR folder inside node's installation folder\.
.P
-The latest version in a zip file is 1\.4\.12\. To upgrade to npm 2, follow the
-Windows upgrade instructions in the npm Troubleshooting Guide:
+To upgrade to npm 2, follow the Windows upgrade instructions in
+the npm Troubleshooting Guide:
.P
https://github\.com/npm/npm/wiki/Troubleshooting#upgrading\-on\-windows
.P
diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1
index a8ac57e3d5..68c3233b31 100644
--- a/deps/npm/man/man1/npm-access.1
+++ b/deps/npm/man/man1/npm-access.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ACCESS" "1" "March 2015" "" ""
+.TH "NPM\-ACCESS" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-access\fR \- Set access level on published packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1
index ed2a8bc5e9..ba2248a2b1 100644
--- a/deps/npm/man/man1/npm-adduser.1
+++ b/deps/npm/man/man1/npm-adduser.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ADDUSER" "1" "March 2015" "" ""
+.TH "NPM\-ADDUSER" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1
index 5b604fafa3..830eae6e31 100644
--- a/deps/npm/man/man1/npm-bin.1
+++ b/deps/npm/man/man1/npm-bin.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BIN" "1" "March 2015" "" ""
+.TH "NPM\-BIN" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1
index a0fdc0d346..05fdcb1cf1 100644
--- a/deps/npm/man/man1/npm-bugs.1
+++ b/deps/npm/man/man1/npm-bugs.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUGS" "1" "March 2015" "" ""
+.TH "NPM\-BUGS" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1
index 4653cccf89..f40c185af0 100644
--- a/deps/npm/man/man1/npm-build.1
+++ b/deps/npm/man/man1/npm-build.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUILD" "1" "March 2015" "" ""
+.TH "NPM\-BUILD" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-build\fR \- Build a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1
index a8b2e21ec7..b5dad2f4e6 100644
--- a/deps/npm/man/man1/npm-bundle.1
+++ b/deps/npm/man/man1/npm-bundle.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUNDLE" "1" "March 2015" "" ""
+.TH "NPM\-BUNDLE" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-bundle\fR \- REMOVED
.SH DESCRIPTION
diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1
index 4beaf5d410..84d952c193 100644
--- a/deps/npm/man/man1/npm-cache.1
+++ b/deps/npm/man/man1/npm-cache.1
@@ -1,4 +1,4 @@
-.TH "NPM\-CACHE" "1" "March 2015" "" ""
+.TH "NPM\-CACHE" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1
index 42142acfbc..3dfa1bd8e2 100644
--- a/deps/npm/man/man1/npm-completion.1
+++ b/deps/npm/man/man1/npm-completion.1
@@ -1,4 +1,4 @@
-.TH "NPM\-COMPLETION" "1" "March 2015" "" ""
+.TH "NPM\-COMPLETION" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-completion\fR \- Tab Completion for npm
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1
index 0c9334f2ef..8f6ff03fb5 100644
--- a/deps/npm/man/man1/npm-config.1
+++ b/deps/npm/man/man1/npm-config.1
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "1" "March 2015" "" ""
+.TH "NPM\-CONFIG" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1
index 0f0f8d17ba..ab4ad69475 100644
--- a/deps/npm/man/man1/npm-dedupe.1
+++ b/deps/npm/man/man1/npm-dedupe.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DEDUPE" "1" "March 2015" "" ""
+.TH "NPM\-DEDUPE" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index 936713e4ae..d9b8c40831 100644
--- a/deps/npm/man/man1/npm-deprecate.1
+++ b/deps/npm/man/man1/npm-deprecate.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DEPRECATE" "1" "March 2015" "" ""
+.TH "NPM\-DEPRECATE" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1
index 1833529718..568b6aeccd 100644
--- a/deps/npm/man/man1/npm-dist-tag.1
+++ b/deps/npm/man/man1/npm-dist-tag.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DIST\-TAG" "1" "March 2015" "" ""
+.TH "NPM\-DIST\-TAG" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR \- Modify package distribution tags
.SH SYNOPSIS
@@ -47,7 +47,8 @@ npm install \-\-tag <tag>
.P
This also applies to \fBnpm dedupe\fR\|\.
.P
-Publishing a package always sets the "latest" tag to the published version\.
+Publishing a package sets the "latest" tag to the published version unless the
+\fB\-\-tag\fR option is used\. For example, \fBnpm publish \-\-tag=beta\fR\|\.
.SH PURPOSE
.P
Tags can be used to provide an alias instead of version numbers\. For
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index 3b6dfa0782..fc3c6dff56 100644
--- a/deps/npm/man/man1/npm-docs.1
+++ b/deps/npm/man/man1/npm-docs.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DOCS" "1" "March 2015" "" ""
+.TH "NPM\-DOCS" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1
index e5ca2b3fc1..c8aad7e410 100644
--- a/deps/npm/man/man1/npm-edit.1
+++ b/deps/npm/man/man1/npm-edit.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EDIT" "1" "March 2015" "" ""
+.TH "NPM\-EDIT" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1
index e1fd0a053d..318075d38f 100644
--- a/deps/npm/man/man1/npm-explore.1
+++ b/deps/npm/man/man1/npm-explore.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EXPLORE" "1" "March 2015" "" ""
+.TH "NPM\-EXPLORE" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1
index 17a5346a19..80bb25f472 100644
--- a/deps/npm/man/man1/npm-help-search.1
+++ b/deps/npm/man/man1/npm-help-search.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP\-SEARCH" "1" "March 2015" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search npm help documentation
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1
index eddc08b838..45533fb6d1 100644
--- a/deps/npm/man/man1/npm-help.1
+++ b/deps/npm/man/man1/npm-help.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP" "1" "March 2015" "" ""
+.TH "NPM\-HELP" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-help\fR \- Get help on npm
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index 1161f17c34..112e727695 100644
--- a/deps/npm/man/man1/npm-init.1
+++ b/deps/npm/man/man1/npm-init.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INIT" "1" "March 2015" "" ""
+.TH "NPM\-INIT" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-init\fR \- Interactively create a package\.json file
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index e8416eb4c3..c27de4cadc 100644
--- a/deps/npm/man/man1/npm-install.1
+++ b/deps/npm/man/man1/npm-install.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INSTALL" "1" "March 2015" "" ""
+.TH "NPM\-INSTALL" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SH SYNOPSIS
@@ -191,8 +191,52 @@ fetch the package by name if it is not valid\.
npm install mygithubuser/myproject
.fi
.RE
- To reference a package in a git repo that is not on GitHub, see git
- remote urls below\.
+ To reference a package in a generic git repo (not on GitHub), see git remote
+ urls below\.
+.IP \(bu 2
+\fBnpm install github:<githubname>/<githubrepo>\fR:
+ The same as the above, but explicitly marked as a GitHub dependency\.
+ Example:
+.P
+.RS 2
+.nf
+ npm install github:npm/npm
+.fi
+.RE
+.IP \(bu 2
+\fBnpm install gist:[<githubname>/]<gistID>\fR:
+ Install the package at \fBhttps://gist\.github\.com/gistID\fR by attempting to
+ clone it using \fBgit\fR\|\. The GitHub username associated with the gist is
+ optional and will not be saved in \fBpackage\.json\fR if \fB\-\-save\fR is used\.
+ Example:
+.P
+.RS 2
+.nf
+ npm install gist:101a11beef
+.fi
+.RE
+.IP \(bu 2
+\fBnpm install bitbucket:<bitbucketname>/<bitbucketrepo>\fR:
+ Install the package at \fBhttps://bitbucket\.org/bitbucketname/bitbucketrepo\fR
+ by attempting to clone it using \fBgit\fR\|\.
+ Example:
+.P
+.RS 2
+.nf
+ npm install bitbucket:mybitbucketuser/myproject
+.fi
+.RE
+.IP \(bu 2
+\fBnpm install gitlab:<gitlabname>/<gitlabrepo>\fR:
+ Install the package at \fBhttps://gitlab\.com/gitlabname/gitlabrepo\fR
+ by attempting to clone it using \fBgit\fR\|\.
+ Example:
+.P
+.RS 2
+.nf
+ npm install gitlab:mygitlabuser/myproject
+.fi
+.RE
.IP \(bu 2
\fBnpm install <git remote url>\fR:
Install a package by cloning a git remote url\. The format of the git
@@ -200,7 +244,7 @@ fetch the package by name if it is not valid\.
.P
.RS 2
.nf
- <protocol>://[<user>@]<hostname><separator><path>[#<commit\-ish>]
+ <protocol>://[<user>[:<password>]@]<hostname><separator><path>[#<commit\-ish>]
.fi
.RE
\fB<protocol>\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, or
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 523731f3b5..007de6992d 100644
--- a/deps/npm/man/man1/npm-link.1
+++ b/deps/npm/man/man1/npm-link.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LINK" "1" "March 2015" "" ""
+.TH "NPM\-LINK" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
@@ -46,7 +46,7 @@ npm link redis # link\-install the package
.P
Now, any changes to ~/projects/node\-redis will be reflected in
~/projects/node\-bloggy/node_modules/node\-redis/\. Note that the link should
-be to the package name, not the directory name for that package\.
+be to the package name, not the directory name for that package\.
.P
You may also shortcut the two steps in one\. For example, to do the
above use\-case in a shorter way:
diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1
index 1ad6b900a9..2f3f824652 100644
--- a/deps/npm/man/man1/npm-logout.1
+++ b/deps/npm/man/man1/npm-logout.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LOGOUT" "1" "March 2015" "" ""
+.TH "NPM\-LOGOUT" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-logout\fR \- Log out of the registry
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 7c56469152..d65fa2aca3 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LS" "1" "March 2015" "" ""
+.TH "NPM\-LS" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
@@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fR in npm's source tree will show:
.P
.RS 2
.nf
-npm@2.7.4 /path/to/npm
+npm@2.8.4 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index c510fea971..87514f4ef5 100644
--- a/deps/npm/man/man1/npm-outdated.1
+++ b/deps/npm/man/man1/npm-outdated.1
@@ -1,4 +1,4 @@
-.TH "NPM\-OUTDATED" "1" "March 2015" "" ""
+.TH "NPM\-OUTDATED" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1
index 7ceaddce6e..f60a8e5398 100644
--- a/deps/npm/man/man1/npm-owner.1
+++ b/deps/npm/man/man1/npm-owner.1
@@ -1,4 +1,4 @@
-.TH "NPM\-OWNER" "1" "March 2015" "" ""
+.TH "NPM\-OWNER" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index 96e6f705f7..444e2b5d01 100644
--- a/deps/npm/man/man1/npm-pack.1
+++ b/deps/npm/man/man1/npm-pack.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PACK" "1" "March 2015" "" ""
+.TH "NPM\-PACK" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index 339896aac8..e8fd211416 100644
--- a/deps/npm/man/man1/npm-prefix.1
+++ b/deps/npm/man/man1/npm-prefix.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PREFIX" "1" "March 2015" "" ""
+.TH "NPM\-PREFIX" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1
index 7a34afe6f6..db458cc523 100644
--- a/deps/npm/man/man1/npm-prune.1
+++ b/deps/npm/man/man1/npm-prune.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PRUNE" "1" "March 2015" "" ""
+.TH "NPM\-PRUNE" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1
index c763aa660e..496e287a4a 100644
--- a/deps/npm/man/man1/npm-publish.1
+++ b/deps/npm/man/man1/npm-publish.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PUBLISH" "1" "March 2015" "" ""
+.TH "NPM\-PUBLISH" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index e6cb6c1029..0aa05dbecb 100644
--- a/deps/npm/man/man1/npm-rebuild.1
+++ b/deps/npm/man/man1/npm-rebuild.1
@@ -1,4 +1,4 @@
-.TH "NPM\-REBUILD" "1" "March 2015" "" ""
+.TH "NPM\-REBUILD" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1
index 5097e109ec..06e4cff9cd 100644
--- a/deps/npm/man/man1/npm-repo.1
+++ b/deps/npm/man/man1/npm-repo.1
@@ -1,4 +1,4 @@
-.TH "NPM\-REPO" "1" "March 2015" "" ""
+.TH "NPM\-REPO" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1
index 0cdde8b201..0213b47f4f 100644
--- a/deps/npm/man/man1/npm-restart.1
+++ b/deps/npm/man/man1/npm-restart.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RESTART" "1" "March 2015" "" ""
+.TH "NPM\-RESTART" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-rm.1 b/deps/npm/man/man1/npm-rm.1
index 26f4dad033..4fa2d9e32b 100644
--- a/deps/npm/man/man1/npm-rm.1
+++ b/deps/npm/man/man1/npm-rm.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RM" "1" "March 2015" "" ""
+.TH "NPM\-RM" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-rm\fR \- Remove a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index 10855e1c7f..2828c50eb9 100644
--- a/deps/npm/man/man1/npm-root.1
+++ b/deps/npm/man/man1/npm-root.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ROOT" "1" "March 2015" "" ""
+.TH "NPM\-ROOT" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index 7f94067d30..aa1ba4e56f 100644
--- a/deps/npm/man/man1/npm-run-script.1
+++ b/deps/npm/man/man1/npm-run-script.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RUN\-SCRIPT" "1" "March 2015" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1
index 04989533ca..f815c5116f 100644
--- a/deps/npm/man/man1/npm-search.1
+++ b/deps/npm/man/man1/npm-search.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SEARCH" "1" "March 2015" "" ""
+.TH "NPM\-SEARCH" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1
index d416f6666c..40eb480fc7 100644
--- a/deps/npm/man/man1/npm-shrinkwrap.1
+++ b/deps/npm/man/man1/npm-shrinkwrap.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SHRINKWRAP" "1" "March 2015" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- Lock down dependency versions
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index b249df62b7..a942d6da1b 100644
--- a/deps/npm/man/man1/npm-star.1
+++ b/deps/npm/man/man1/npm-star.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STAR" "1" "March 2015" "" ""
+.TH "NPM\-STAR" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-star\fR \- Mark your favorite packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1
index 2320a0c460..24ead178b8 100644
--- a/deps/npm/man/man1/npm-stars.1
+++ b/deps/npm/man/man1/npm-stars.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STARS" "1" "March 2015" "" ""
+.TH "NPM\-STARS" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-stars\fR \- View packages marked as favorites
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1
index 5cd7012563..d14bfa1485 100644
--- a/deps/npm/man/man1/npm-start.1
+++ b/deps/npm/man/man1/npm-start.1
@@ -1,4 +1,4 @@
-.TH "NPM\-START" "1" "March 2015" "" ""
+.TH "NPM\-START" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1
index 6f4de89fa8..4de2ed3a58 100644
--- a/deps/npm/man/man1/npm-stop.1
+++ b/deps/npm/man/man1/npm-stop.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STOP" "1" "March 2015" "" ""
+.TH "NPM\-STOP" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-tag.1 b/deps/npm/man/man1/npm-tag.1
index 91530fc076..6c31801c49 100644
--- a/deps/npm/man/man1/npm-tag.1
+++ b/deps/npm/man/man1/npm-tag.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TAG" "1" "March 2015" "" ""
+.TH "NPM\-TAG" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-tag\fR \- Tag a published version
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1
index 0a4e9e0c51..c447088e0a 100644
--- a/deps/npm/man/man1/npm-test.1
+++ b/deps/npm/man/man1/npm-test.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TEST" "1" "March 2015" "" ""
+.TH "NPM\-TEST" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1
index 29fe20a72b..c81f251ef2 100644
--- a/deps/npm/man/man1/npm-uninstall.1
+++ b/deps/npm/man/man1/npm-uninstall.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RM" "1" "March 2015" "" ""
+.TH "NPM\-RM" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-rm\fR \- Remove a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1
index 463e925aaa..914d02aa5c 100644
--- a/deps/npm/man/man1/npm-unpublish.1
+++ b/deps/npm/man/man1/npm-unpublish.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UNPUBLISH" "1" "March 2015" "" ""
+.TH "NPM\-UNPUBLISH" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1
index a8ee566e08..dd5a4efd53 100644
--- a/deps/npm/man/man1/npm-update.1
+++ b/deps/npm/man/man1/npm-update.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UPDATE" "1" "March 2015" "" ""
+.TH "NPM\-UPDATE" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1
index 78921acfd5..9e8d74c62f 100644
--- a/deps/npm/man/man1/npm-version.1
+++ b/deps/npm/man/man1/npm-version.1
@@ -1,4 +1,4 @@
-.TH "NPM\-VERSION" "1" "March 2015" "" ""
+.TH "NPM\-VERSION" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1
index 372696f0a4..2d659ebc39 100644
--- a/deps/npm/man/man1/npm-view.1
+++ b/deps/npm/man/man1/npm-view.1
@@ -1,4 +1,4 @@
-.TH "NPM\-VIEW" "1" "March 2015" "" ""
+.TH "NPM\-VIEW" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1
index 0d50afb665..b97bc0c449 100644
--- a/deps/npm/man/man1/npm-whoami.1
+++ b/deps/npm/man/man1/npm-whoami.1
@@ -1,4 +1,4 @@
-.TH "NPM\-WHOAMI" "1" "March 2015" "" ""
+.TH "NPM\-WHOAMI" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index 601d61a092..397d84b174 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "March 2015" "" ""
+.TH "NPM" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SH SYNOPSIS
@@ -10,7 +10,7 @@ npm <command> [args]
.RE
.SH VERSION
.P
-2.7.4
+2.8.4
.SH DESCRIPTION
.P
npm is the package manager for the Node JavaScript platform\. It puts
diff --git a/deps/npm/man/man3/npm-bin.3 b/deps/npm/man/man3/npm-bin.3
index ac236ad6ee..9b6f869c85 100644
--- a/deps/npm/man/man3/npm-bin.3
+++ b/deps/npm/man/man3/npm-bin.3
@@ -1,4 +1,4 @@
-.TH "NPM\-BIN" "3" "March 2015" "" ""
+.TH "NPM\-BIN" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-bugs.3 b/deps/npm/man/man3/npm-bugs.3
index 7b4597e2ba..ab93f58e6c 100644
--- a/deps/npm/man/man3/npm-bugs.3
+++ b/deps/npm/man/man3/npm-bugs.3
@@ -1,4 +1,4 @@
-.TH "NPM\-BUGS" "3" "March 2015" "" ""
+.TH "NPM\-BUGS" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-cache.3 b/deps/npm/man/man3/npm-cache.3
index bdd43226a6..127555dcb0 100644
--- a/deps/npm/man/man3/npm-cache.3
+++ b/deps/npm/man/man3/npm-cache.3
@@ -1,4 +1,4 @@
-.TH "NPM\-CACHE" "3" "March 2015" "" ""
+.TH "NPM\-CACHE" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-cache\fR \- manage the npm cache programmatically
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-commands.3 b/deps/npm/man/man3/npm-commands.3
index 61ce8a1f47..cde69b4c4d 100644
--- a/deps/npm/man/man3/npm-commands.3
+++ b/deps/npm/man/man3/npm-commands.3
@@ -1,4 +1,4 @@
-.TH "NPM\-COMMANDS" "3" "March 2015" "" ""
+.TH "NPM\-COMMANDS" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-commands\fR \- npm commands
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-config.3 b/deps/npm/man/man3/npm-config.3
index bd1ab1a117..c6a152d9d9 100644
--- a/deps/npm/man/man3/npm-config.3
+++ b/deps/npm/man/man3/npm-config.3
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "3" "March 2015" "" ""
+.TH "NPM\-CONFIG" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-deprecate.3 b/deps/npm/man/man3/npm-deprecate.3
index 2abbb245ca..2c4d22f55e 100644
--- a/deps/npm/man/man3/npm-deprecate.3
+++ b/deps/npm/man/man3/npm-deprecate.3
@@ -1,4 +1,4 @@
-.TH "NPM\-DEPRECATE" "3" "March 2015" "" ""
+.TH "NPM\-DEPRECATE" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-docs.3 b/deps/npm/man/man3/npm-docs.3
index e33b3562d4..bcdfe3f705 100644
--- a/deps/npm/man/man3/npm-docs.3
+++ b/deps/npm/man/man3/npm-docs.3
@@ -1,4 +1,4 @@
-.TH "NPM\-DOCS" "3" "March 2015" "" ""
+.TH "NPM\-DOCS" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-edit.3 b/deps/npm/man/man3/npm-edit.3
index faae5eb25c..5db96fd12c 100644
--- a/deps/npm/man/man3/npm-edit.3
+++ b/deps/npm/man/man3/npm-edit.3
@@ -1,4 +1,4 @@
-.TH "NPM\-EDIT" "3" "March 2015" "" ""
+.TH "NPM\-EDIT" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-explore.3 b/deps/npm/man/man3/npm-explore.3
index 042b8a5aab..c9e1e69b32 100644
--- a/deps/npm/man/man3/npm-explore.3
+++ b/deps/npm/man/man3/npm-explore.3
@@ -1,4 +1,4 @@
-.TH "NPM\-EXPLORE" "3" "March 2015" "" ""
+.TH "NPM\-EXPLORE" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-help-search.3 b/deps/npm/man/man3/npm-help-search.3
index c10fd683a0..42b58d3f47 100644
--- a/deps/npm/man/man3/npm-help-search.3
+++ b/deps/npm/man/man3/npm-help-search.3
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP\-SEARCH" "3" "March 2015" "" ""
+.TH "NPM\-HELP\-SEARCH" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search the help pages
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-init.3 b/deps/npm/man/man3/npm-init.3
index 340cf3ff05..1fe406f258 100644
--- a/deps/npm/man/man3/npm-init.3
+++ b/deps/npm/man/man3/npm-init.3
@@ -1,4 +1,4 @@
-.TH "NPM" "" "March 2015" "" ""
+.TH "NPM" "" "April 2015" "" ""
.SH "NAME"
\fBnpm\fR
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-install.3 b/deps/npm/man/man3/npm-install.3
index 6c140102cc..7eaa388536 100644
--- a/deps/npm/man/man3/npm-install.3
+++ b/deps/npm/man/man3/npm-install.3
@@ -1,4 +1,4 @@
-.TH "NPM\-INSTALL" "3" "March 2015" "" ""
+.TH "NPM\-INSTALL" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-install\fR \- install a package programmatically
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-link.3 b/deps/npm/man/man3/npm-link.3
index 86fef62a43..050a42b13f 100644
--- a/deps/npm/man/man3/npm-link.3
+++ b/deps/npm/man/man3/npm-link.3
@@ -1,4 +1,4 @@
-.TH "NPM\-LINK" "3" "March 2015" "" ""
+.TH "NPM\-LINK" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-load.3 b/deps/npm/man/man3/npm-load.3
index fd57800a40..aa344d025e 100644
--- a/deps/npm/man/man3/npm-load.3
+++ b/deps/npm/man/man3/npm-load.3
@@ -1,4 +1,4 @@
-.TH "NPM\-LOAD" "3" "March 2015" "" ""
+.TH "NPM\-LOAD" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-load\fR \- Load config settings
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-ls.3 b/deps/npm/man/man3/npm-ls.3
index eb3eb53bcc..df7c3c77ca 100644
--- a/deps/npm/man/man3/npm-ls.3
+++ b/deps/npm/man/man3/npm-ls.3
@@ -1,4 +1,4 @@
-.TH "NPM\-LS" "3" "March 2015" "" ""
+.TH "NPM\-LS" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-outdated.3 b/deps/npm/man/man3/npm-outdated.3
index 49211088c6..83409223f1 100644
--- a/deps/npm/man/man3/npm-outdated.3
+++ b/deps/npm/man/man3/npm-outdated.3
@@ -1,4 +1,4 @@
-.TH "NPM\-OUTDATED" "3" "March 2015" "" ""
+.TH "NPM\-OUTDATED" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-owner.3 b/deps/npm/man/man3/npm-owner.3
index f95c79aef5..2508a312f4 100644
--- a/deps/npm/man/man3/npm-owner.3
+++ b/deps/npm/man/man3/npm-owner.3
@@ -1,4 +1,4 @@
-.TH "NPM\-OWNER" "3" "March 2015" "" ""
+.TH "NPM\-OWNER" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-pack.3 b/deps/npm/man/man3/npm-pack.3
index 1a0f5910e8..4a2401136f 100644
--- a/deps/npm/man/man3/npm-pack.3
+++ b/deps/npm/man/man3/npm-pack.3
@@ -1,4 +1,4 @@
-.TH "NPM\-PACK" "3" "March 2015" "" ""
+.TH "NPM\-PACK" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-prefix.3 b/deps/npm/man/man3/npm-prefix.3
index 5289c9e898..e0ceb93b3f 100644
--- a/deps/npm/man/man3/npm-prefix.3
+++ b/deps/npm/man/man3/npm-prefix.3
@@ -1,4 +1,4 @@
-.TH "NPM\-PREFIX" "3" "March 2015" "" ""
+.TH "NPM\-PREFIX" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-prune.3 b/deps/npm/man/man3/npm-prune.3
index b50fc9e8fe..024e933b6f 100644
--- a/deps/npm/man/man3/npm-prune.3
+++ b/deps/npm/man/man3/npm-prune.3
@@ -1,4 +1,4 @@
-.TH "NPM\-PRUNE" "3" "March 2015" "" ""
+.TH "NPM\-PRUNE" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-publish.3 b/deps/npm/man/man3/npm-publish.3
index 2ca3987226..2d0d0e0dae 100644
--- a/deps/npm/man/man3/npm-publish.3
+++ b/deps/npm/man/man3/npm-publish.3
@@ -1,4 +1,4 @@
-.TH "NPM\-PUBLISH" "3" "March 2015" "" ""
+.TH "NPM\-PUBLISH" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-rebuild.3 b/deps/npm/man/man3/npm-rebuild.3
index f0bf76155f..c94e1d8eaa 100644
--- a/deps/npm/man/man3/npm-rebuild.3
+++ b/deps/npm/man/man3/npm-rebuild.3
@@ -1,4 +1,4 @@
-.TH "NPM\-REBUILD" "3" "March 2015" "" ""
+.TH "NPM\-REBUILD" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-repo.3 b/deps/npm/man/man3/npm-repo.3
index e36b160e92..4db47172f9 100644
--- a/deps/npm/man/man3/npm-repo.3
+++ b/deps/npm/man/man3/npm-repo.3
@@ -1,4 +1,4 @@
-.TH "NPM\-REPO" "3" "March 2015" "" ""
+.TH "NPM\-REPO" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-restart.3 b/deps/npm/man/man3/npm-restart.3
index 8027bd49ed..876b8b9a54 100644
--- a/deps/npm/man/man3/npm-restart.3
+++ b/deps/npm/man/man3/npm-restart.3
@@ -1,4 +1,4 @@
-.TH "NPM\-RESTART" "3" "March 2015" "" ""
+.TH "NPM\-RESTART" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-root.3 b/deps/npm/man/man3/npm-root.3
index 0932b77189..f3a3e0fbd1 100644
--- a/deps/npm/man/man3/npm-root.3
+++ b/deps/npm/man/man3/npm-root.3
@@ -1,4 +1,4 @@
-.TH "NPM\-ROOT" "3" "March 2015" "" ""
+.TH "NPM\-ROOT" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-run-script.3 b/deps/npm/man/man3/npm-run-script.3
index 411ffeedd7..8b16b3ce77 100644
--- a/deps/npm/man/man3/npm-run-script.3
+++ b/deps/npm/man/man3/npm-run-script.3
@@ -1,4 +1,4 @@
-.TH "NPM\-RUN\-SCRIPT" "3" "March 2015" "" ""
+.TH "NPM\-RUN\-SCRIPT" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-search.3 b/deps/npm/man/man3/npm-search.3
index 071cab9f48..7698f74deb 100644
--- a/deps/npm/man/man3/npm-search.3
+++ b/deps/npm/man/man3/npm-search.3
@@ -1,4 +1,4 @@
-.TH "NPM\-SEARCH" "3" "March 2015" "" ""
+.TH "NPM\-SEARCH" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-shrinkwrap.3 b/deps/npm/man/man3/npm-shrinkwrap.3
index da7134c1e7..294f307511 100644
--- a/deps/npm/man/man3/npm-shrinkwrap.3
+++ b/deps/npm/man/man3/npm-shrinkwrap.3
@@ -1,4 +1,4 @@
-.TH "NPM\-SHRINKWRAP" "3" "March 2015" "" ""
+.TH "NPM\-SHRINKWRAP" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- programmatically generate package shrinkwrap file
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-start.3 b/deps/npm/man/man3/npm-start.3
index fee38728b0..f3ac79acb9 100644
--- a/deps/npm/man/man3/npm-start.3
+++ b/deps/npm/man/man3/npm-start.3
@@ -1,4 +1,4 @@
-.TH "NPM\-START" "3" "March 2015" "" ""
+.TH "NPM\-START" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-stop.3 b/deps/npm/man/man3/npm-stop.3
index c17766074a..7ea9ee95e1 100644
--- a/deps/npm/man/man3/npm-stop.3
+++ b/deps/npm/man/man3/npm-stop.3
@@ -1,4 +1,4 @@
-.TH "NPM\-STOP" "3" "March 2015" "" ""
+.TH "NPM\-STOP" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-tag.3 b/deps/npm/man/man3/npm-tag.3
index 4aec0b138d..ace3a0a8a1 100644
--- a/deps/npm/man/man3/npm-tag.3
+++ b/deps/npm/man/man3/npm-tag.3
@@ -1,4 +1,4 @@
-.TH "NPM\-TAG" "3" "March 2015" "" ""
+.TH "NPM\-TAG" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-tag\fR \- Tag a published version
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-test.3 b/deps/npm/man/man3/npm-test.3
index 71d40fa8eb..d6aad659c4 100644
--- a/deps/npm/man/man3/npm-test.3
+++ b/deps/npm/man/man3/npm-test.3
@@ -1,4 +1,4 @@
-.TH "NPM\-TEST" "3" "March 2015" "" ""
+.TH "NPM\-TEST" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-uninstall.3 b/deps/npm/man/man3/npm-uninstall.3
index dacca6337f..7b17c8faf0 100644
--- a/deps/npm/man/man3/npm-uninstall.3
+++ b/deps/npm/man/man3/npm-uninstall.3
@@ -1,4 +1,4 @@
-.TH "NPM\-UNINSTALL" "3" "March 2015" "" ""
+.TH "NPM\-UNINSTALL" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-uninstall\fR \- uninstall a package programmatically
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-unpublish.3 b/deps/npm/man/man3/npm-unpublish.3
index 073435f083..cab0bd3d98 100644
--- a/deps/npm/man/man3/npm-unpublish.3
+++ b/deps/npm/man/man3/npm-unpublish.3
@@ -1,4 +1,4 @@
-.TH "NPM\-UNPUBLISH" "3" "March 2015" "" ""
+.TH "NPM\-UNPUBLISH" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-update.3 b/deps/npm/man/man3/npm-update.3
index f5d6885853..e299ee2842 100644
--- a/deps/npm/man/man3/npm-update.3
+++ b/deps/npm/man/man3/npm-update.3
@@ -1,4 +1,4 @@
-.TH "NPM\-UPDATE" "3" "March 2015" "" ""
+.TH "NPM\-UPDATE" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
@@ -8,7 +8,7 @@
npm\.commands\.update(packages, callback)
.fi
.RE
-.TH "DESCRIPTION" "" "March 2015" "" ""
+.TH "DESCRIPTION" "" "April 2015" "" ""
.SH "NAME"
\fBDESCRIPTION\fR
.P
diff --git a/deps/npm/man/man3/npm-version.3 b/deps/npm/man/man3/npm-version.3
index e032f966d0..43a6805926 100644
--- a/deps/npm/man/man3/npm-version.3
+++ b/deps/npm/man/man3/npm-version.3
@@ -1,4 +1,4 @@
-.TH "NPM\-VERSION" "3" "March 2015" "" ""
+.TH "NPM\-VERSION" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-view.3 b/deps/npm/man/man3/npm-view.3
index 1267ff23f3..eb6d8d6f1b 100644
--- a/deps/npm/man/man3/npm-view.3
+++ b/deps/npm/man/man3/npm-view.3
@@ -1,4 +1,4 @@
-.TH "NPM\-VIEW" "3" "March 2015" "" ""
+.TH "NPM\-VIEW" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-whoami.3 b/deps/npm/man/man3/npm-whoami.3
index 6e427004b1..a7b968fe99 100644
--- a/deps/npm/man/man3/npm-whoami.3
+++ b/deps/npm/man/man3/npm-whoami.3
@@ -1,4 +1,4 @@
-.TH "NPM\-WHOAMI" "3" "March 2015" "" ""
+.TH "NPM\-WHOAMI" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3
index 05f330b5a4..6f9bb033f7 100644
--- a/deps/npm/man/man3/npm.3
+++ b/deps/npm/man/man3/npm.3
@@ -1,4 +1,4 @@
-.TH "NPM" "3" "March 2015" "" ""
+.TH "NPM" "3" "April 2015" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SH SYNOPSIS
@@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) {
.RE
.SH VERSION
.P
-2.7.4
+2.8.4
.SH DESCRIPTION
.P
This is the API documentation for npm\.
diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5
index b01d9245ec..454a6950ad 100644
--- a/deps/npm/man/man5/npm-folders.5
+++ b/deps/npm/man/man5/npm-folders.5
@@ -1,4 +1,4 @@
-.TH "NPM\-FOLDERS" "5" "March 2015" "" ""
+.TH "NPM\-FOLDERS" "5" "April 2015" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5
index b01d9245ec..454a6950ad 100644
--- a/deps/npm/man/man5/npm-global.5
+++ b/deps/npm/man/man5/npm-global.5
@@ -1,4 +1,4 @@
-.TH "NPM\-FOLDERS" "5" "March 2015" "" ""
+.TH "NPM\-FOLDERS" "5" "April 2015" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5
index 61420dee33..088e62bdc3 100644
--- a/deps/npm/man/man5/npm-json.5
+++ b/deps/npm/man/man5/npm-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\.JSON" "5" "March 2015" "" ""
+.TH "PACKAGE\.JSON" "5" "April 2015" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -126,7 +126,7 @@ Or you can shorten that all into a single string, and npm will parse it for you:
.P
.RS 2
.nf
-"Barney Rubble <b@rubble\.com> (http://barnyrubble\.tumblr\.com/)
+"Barney Rubble <b@rubble\.com> (http://barnyrubble\.tumblr\.com/)"
.fi
.RE
.P
@@ -302,12 +302,18 @@ The URL should be a publicly available (perhaps read\-only) url that can be hand
directly to a VCS program without any modification\. It should not be a url to an
html project page that you put in your browser\. It's for computers\.
.P
-For GitHub repositories you can use the same shortcut syntax you use for \fBnpm
-install\fR:
+For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same
+shortcut syntax you use for \fBnpm install\fR:
.P
.RS 2
.nf
"repository": "npm/npm"
+
+"repository": "gist:11081aaa281"
+
+"repository": "bitbucket:example/repo"
+
+"repository": "gitlab:another/repo"
.fi
.RE
.SH scripts
diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5
index 150729dcab..703176aaa5 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "March 2015" "" ""
+.TH "NPMRC" "5" "April 2015" "" ""
.SH "NAME"
\fBnpmrc\fR \- The npm config files
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5
index 61420dee33..088e62bdc3 100644
--- a/deps/npm/man/man5/package.json.5
+++ b/deps/npm/man/man5/package.json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\.JSON" "5" "March 2015" "" ""
+.TH "PACKAGE\.JSON" "5" "April 2015" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -126,7 +126,7 @@ Or you can shorten that all into a single string, and npm will parse it for you:
.P
.RS 2
.nf
-"Barney Rubble <b@rubble\.com> (http://barnyrubble\.tumblr\.com/)
+"Barney Rubble <b@rubble\.com> (http://barnyrubble\.tumblr\.com/)"
.fi
.RE
.P
@@ -302,12 +302,18 @@ The URL should be a publicly available (perhaps read\-only) url that can be hand
directly to a VCS program without any modification\. It should not be a url to an
html project page that you put in your browser\. It's for computers\.
.P
-For GitHub repositories you can use the same shortcut syntax you use for \fBnpm
-install\fR:
+For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same
+shortcut syntax you use for \fBnpm install\fR:
.P
.RS 2
.nf
"repository": "npm/npm"
+
+"repository": "gist:11081aaa281"
+
+"repository": "bitbucket:example/repo"
+
+"repository": "gitlab:another/repo"
.fi
.RE
.SH scripts
diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7
index bbe6dcc498..b018adbac1 100644
--- a/deps/npm/man/man7/npm-coding-style.7
+++ b/deps/npm/man/man7/npm-coding-style.7
@@ -1,4 +1,4 @@
-.TH "NPM\-CODING\-STYLE" "7" "March 2015" "" ""
+.TH "NPM\-CODING\-STYLE" "7" "April 2015" "" ""
.SH "NAME"
\fBnpm-coding-style\fR \- npm's "funny" coding style
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7
index 591da2c321..6301d1e65e 100644
--- a/deps/npm/man/man7/npm-config.7
+++ b/deps/npm/man/man7/npm-config.7
@@ -1,9 +1,9 @@
-.TH "NPM\-CONFIG" "7" "March 2015" "" ""
+.TH "NPM\-CONFIG" "7" "April 2015" "" ""
.SH "NAME"
\fBnpm-config\fR \- More than you probably want to know about npm configuration
.SH DESCRIPTION
.P
-npm gets its configuration values from 6 sources, in this priority:
+npm gets its configuration values from the following sources, sorted by priority:
.SS Command Line Flags
.P
Putting \fB\-\-foo bar\fR on the command line sets the \fBfoo\fR configuration
diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7
index 9b55e2a921..f3c85e453b 100644
--- a/deps/npm/man/man7/npm-developers.7
+++ b/deps/npm/man/man7/npm-developers.7
@@ -1,4 +1,4 @@
-.TH "NPM\-DEVELOPERS" "7" "March 2015" "" ""
+.TH "NPM\-DEVELOPERS" "7" "April 2015" "" ""
.SH "NAME"
\fBnpm-developers\fR \- Developer Guide
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7
index de9b873978..0db6f8a4db 100644
--- a/deps/npm/man/man7/npm-disputes.7
+++ b/deps/npm/man/man7/npm-disputes.7
@@ -1,4 +1,4 @@
-.TH "NPM\-DISPUTES" "7" "March 2015" "" ""
+.TH "NPM\-DISPUTES" "7" "April 2015" "" ""
.SH "NAME"
\fBnpm-disputes\fR \- Handling Module Name Disputes
.SH SYNOPSIS
diff --git a/deps/npm/man/man7/npm-faq.7 b/deps/npm/man/man7/npm-faq.7
index 39958c3f51..db84fbe8d7 100644
--- a/deps/npm/man/man7/npm-faq.7
+++ b/deps/npm/man/man7/npm-faq.7
@@ -1,4 +1,4 @@
-.TH "NPM\-FAQ" "7" "March 2015" "" ""
+.TH "NPM\-FAQ" "7" "April 2015" "" ""
.SH "NAME"
\fBnpm-faq\fR \- Frequently Asked Questions
.SH Where can I find these docs in HTML?
diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7
index a923d53e88..787668e656 100644
--- a/deps/npm/man/man7/npm-index.7
+++ b/deps/npm/man/man7/npm-index.7
@@ -1,4 +1,4 @@
-.TH "NPM\-INDEX" "7" "March 2015" "" ""
+.TH "NPM\-INDEX" "7" "April 2015" "" ""
.SH "NAME"
\fBnpm-index\fR \- Index of all npm documentation
.SS npm help README
diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7
index 761248031e..dd493a8b12 100644
--- a/deps/npm/man/man7/npm-registry.7
+++ b/deps/npm/man/man7/npm-registry.7
@@ -1,4 +1,4 @@
-.TH "NPM\-REGISTRY" "7" "March 2015" "" ""
+.TH "NPM\-REGISTRY" "7" "April 2015" "" ""
.SH "NAME"
\fBnpm-registry\fR \- The JavaScript Package Registry
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7
index 0a68fc3196..dca1c50322 100644
--- a/deps/npm/man/man7/npm-scope.7
+++ b/deps/npm/man/man7/npm-scope.7
@@ -1,4 +1,4 @@
-.TH "NPM\-SCOPE" "7" "March 2015" "" ""
+.TH "NPM\-SCOPE" "7" "April 2015" "" ""
.SH "NAME"
\fBnpm-scope\fR \- Scoped packages
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7
index bdd0813287..2ca079346a 100644
--- a/deps/npm/man/man7/npm-scripts.7
+++ b/deps/npm/man/man7/npm-scripts.7
@@ -1,4 +1,4 @@
-.TH "NPM\-SCRIPTS" "7" "March 2015" "" ""
+.TH "NPM\-SCRIPTS" "7" "April 2015" "" ""
.SH "NAME"
\fBnpm-scripts\fR \- How npm handles the "scripts" field
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7
index a63c66b9b1..f3e47cfefc 100644
--- a/deps/npm/man/man7/removing-npm.7
+++ b/deps/npm/man/man7/removing-npm.7
@@ -1,4 +1,4 @@
-.TH "NPM\-REMOVAL" "1" "March 2015" "" ""
+.TH "NPM\-REMOVAL" "1" "April 2015" "" ""
.SH "NAME"
\fBnpm-removal\fR \- Cleaning the Slate
.SH SYNOPSIS
diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7
index 7378be9862..f77a51ee5d 100644
--- a/deps/npm/man/man7/semver.7
+++ b/deps/npm/man/man7/semver.7
@@ -1,4 +1,4 @@
-.TH "SEMVER" "7" "March 2015" "" ""
+.TH "SEMVER" "7" "April 2015" "" ""
.SH "NAME"
\fBsemver\fR \- The semantic versioner for npm
.SH Usage
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/deps/npm/node_modules/ansi-regex/index.js
index 2fcdd1e472..2fcdd1e472 100644
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js
+++ b/deps/npm/node_modules/ansi-regex/index.js
diff --git a/deps/npm/node_modules/ansi-regex/license b/deps/npm/node_modules/ansi-regex/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/deps/npm/node_modules/ansi-regex/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/deps/npm/node_modules/ansi-regex/package.json
index ab8ea0388f..68962d0f16 100644
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json
+++ b/deps/npm/node_modules/ansi-regex/package.json
@@ -1,17 +1,27 @@
{
"name": "ansi-regex",
- "version": "1.1.0",
+ "version": "1.1.1",
"description": "Regular expression for matching ANSI escape codes",
"license": "MIT",
"repository": {
"type": "git",
- "url": "git://github.com/sindresorhus/ansi-regex"
+ "url": "https://github.com/sindresorhus/ansi-regex"
},
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ }
+ ],
"engines": {
"node": ">=0.10.0"
},
@@ -52,33 +62,25 @@
"devDependencies": {
"mocha": "*"
},
+ "gitHead": "47fb974630af70998157b30fad6eb5e5bd7c7cd6",
"bugs": {
"url": "https://github.com/sindresorhus/ansi-regex/issues"
},
"homepage": "https://github.com/sindresorhus/ansi-regex",
- "_id": "ansi-regex@1.1.0",
- "_shasum": "67792c5d6ad05c792d6cd6057ac8f5e69ebf4357",
- "_from": "ansi-regex@>=1.0.0 <2.0.0",
- "_npmVersion": "1.4.9",
+ "_id": "ansi-regex@1.1.1",
+ "_shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d",
+ "_from": "ansi-regex@>=1.1.1 <1.2.0",
+ "_npmVersion": "2.1.16",
+ "_nodeVersion": "0.10.35",
"_npmUser": {
- "name": "sindresorhus",
- "email": "sindresorhus@gmail.com"
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
},
- "maintainers": [
- {
- "name": "sindresorhus",
- "email": "sindresorhus@gmail.com"
- },
- {
- "name": "jbnicolai",
- "email": "jappelman@xebia.com"
- }
- ],
"dist": {
- "shasum": "67792c5d6ad05c792d6cd6057ac8f5e69ebf4357",
- "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.0.tgz"
+ "shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d",
+ "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.0.tgz",
+ "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/ansi-regex/readme.md
index ae876e7292..ae876e7292 100644
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md
+++ b/deps/npm/node_modules/ansi-regex/readme.md
diff --git a/deps/npm/node_modules/child-process-close/index.js b/deps/npm/node_modules/child-process-close/index.js
deleted file mode 100644
index 562516a323..0000000000
--- a/deps/npm/node_modules/child-process-close/index.js
+++ /dev/null
@@ -1,48 +0,0 @@
-
-var child_process = require('child_process');
-
-// Re-export the child_process module.
-module.exports = child_process;
-
-// Only node versions up to v0.7.6 need this hook.
-if (!/^v0\.([0-6]\.|7\.[0-6](\D|$))/.test(process.version))
- return;
-
-// Do not add the hook if already hooked.
-if (child_process.hasOwnProperty('_exit_hook'))
- return;
-
-// Version the hook in case there is ever the need to release a 0.2.0.
-child_process._exit_hook = 1;
-
-
-function hook(name) {
- var orig = child_process[name];
-
- // Older node versions may not have all functions, e.g. fork().
- if (!orig)
- return;
-
- // Store the unhooked version.
- child_process['_original_' + name] = orig;
-
- // Do the actual hooking.
- child_process[name] = function() {
- var child = orig.apply(this, arguments);
-
- child.once('exit', function(code, signal) {
- process.nextTick(function() {
- child.emit('close', code, signal);
- });
- });
-
- return child;
- }
-}
-
-hook('spawn');
-hook('fork');
-hook('execFile');
-
-// Don't hook 'exec': it calls `exports.execFile` internally, so hooking it
-// would trigger the close event twice.
diff --git a/deps/npm/node_modules/child-process-close/package.json b/deps/npm/node_modules/child-process-close/package.json
deleted file mode 100644
index 23b19e0104..0000000000
--- a/deps/npm/node_modules/child-process-close/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "child-process-close",
- "version": "0.1.1",
- "description": "Make child_process objects emit 'close' events in node v0.6 like they do in v0.8. This makes it easier to write code that works correctly on both version of node.",
- "main": "index.js",
- "scripts": {
- "test": "node test/test.js"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/piscisaureus/child-process-close.git"
- },
- "keywords": [
- "child_process",
- "spawn",
- "fork",
- "exec",
- "execFile",
- "close",
- "exit"
- ],
- "author": {
- "name": "Bert Belder"
- },
- "license": "MIT",
- "readme": "\n# child-process-close\n\nThis module makes child process objects, (created with `spawn`, `fork`, `exec`\nor `execFile`) emit the `close` event in node v0.6 like they do in node v0.8.\nThis makes it easier to write code that works correctly on both version of\nnode.\n\n\n## Usage\n\nJust make sure to `require('child-process-close')` anywhere. It will patch the `child_process` module.\n\n```js\nrequire('child-process-close');\nvar spawn = require('child_process').spawn;\n\nvar cp = spawn('foo');\ncp.on('close', function(exitCode, signal) {\n // This now works on all node versions.\n});\n```\n\n\n## License\n\nCopyright (C) 2012 Bert Belder\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/piscisaureus/child-process-close/issues"
- },
- "_id": "child-process-close@0.1.1",
- "dist": {
- "shasum": "c1909c6c3bbcea623e3bd74493ddb1c94c47c500"
- },
- "_from": "child-process-close@",
- "_resolved": "https://registry.npmjs.org/child-process-close/-/child-process-close-0.1.1.tgz"
-}
diff --git a/deps/npm/node_modules/child-process-close/test/test-exec.js b/deps/npm/node_modules/child-process-close/test/test-exec.js
deleted file mode 100644
index 5072d02951..0000000000
--- a/deps/npm/node_modules/child-process-close/test/test-exec.js
+++ /dev/null
@@ -1,50 +0,0 @@
-
-require('../index');
-
-var assert = require('assert'),
- exec = require('child_process').exec;
-
-var cp = exec('echo hello', function(err) {
- assert(!err);
-});
-
-var stdoutData = '',
- stdoutEnd = false,
- gotExit = false,
- gotClose = false;
-
-cp.stdout.setEncoding('ascii');
-
-cp.stdout.on('data', function(data) {
- assert(!stdoutEnd);
- stdoutData += data;
-});
-
-cp.stdout.on('end', function() {
- assert(!stdoutEnd);
- assert(/^hello/.test(stdoutData));
- stdoutEnd = true;
-});
-
-cp.on('exit', function(code, signal) {
- assert.strictEqual(code, 0);
- assert(!signal);
- assert(!gotExit);
- assert(!gotClose);
- gotExit = true;
-});
-
-cp.on('close', function(code, signal) {
- assert.strictEqual(code, 0);
- assert(!signal);
- assert(gotExit);
- assert(stdoutEnd);
- assert(!gotClose);
- gotClose = true;
-});
-
-process.on('exit', function() {
- assert(stdoutEnd);
- assert(gotExit);
- assert(gotClose);
-});
diff --git a/deps/npm/node_modules/child-process-close/test/test-fork.js b/deps/npm/node_modules/child-process-close/test/test-fork.js
deleted file mode 100644
index 9743c028e4..0000000000
--- a/deps/npm/node_modules/child-process-close/test/test-fork.js
+++ /dev/null
@@ -1,41 +0,0 @@
-
-require('../index');
-
-var assert = require('assert'),
- fork = require('child_process').fork;
-
-var cp = fork('worker-fork');
-
-var gotMessage = false,
- gotExit = false,
- gotClose = false;
-
-cp.on('message', function(msg) {
- assert.strictEqual(msg, 'hello');
- assert(!gotMessage);
- assert(!gotClose);
- gotMessage = true;
-});
-
-cp.on('exit', function(code, signal) {
- assert.strictEqual(code, 0);
- assert(!signal);
- assert(!gotExit);
- assert(!gotClose);
- gotExit = true;
-});
-
-cp.on('close', function(code, signal) {
- assert.strictEqual(code, 0);
- assert(!signal);
- assert(gotExit);
- assert(gotMessage);
- assert(!gotClose);
- gotClose = true;
-});
-
-process.on('exit', function() {
- assert(gotMessage);
- assert(gotExit);
- assert(gotClose);
-});
diff --git a/deps/npm/node_modules/child-process-close/test/test-spawn-and-execfile.js b/deps/npm/node_modules/child-process-close/test/test-spawn-and-execfile.js
deleted file mode 100644
index 82f9fa978b..0000000000
--- a/deps/npm/node_modules/child-process-close/test/test-spawn-and-execfile.js
+++ /dev/null
@@ -1,73 +0,0 @@
-
-require('../index');
-
-var assert = require('assert'),
- spawn = require('child_process').spawn;
- execFile = require('child_process').execFile;
-
-
-var cp1 = spawn(process.execPath, ['worker-spawn']);
-check(cp1);
-
-var cp2 = execFile(process.execPath, ['worker-spawn'], function(err) {
- assert(!err);
-});
-check(cp2);
-
-
-function check(cp) {
- var gotExit = false,
- gotClose = false,
- stdoutData = '',
- stdoutEnd = false,
- stderrData = '',
- stderrEnd = false;
-
- cp.stdout.setEncoding('ascii');
-
- cp.stdout.on('data', function(data) {
- assert(!stdoutEnd);
- stdoutData += data;
- });
-
- cp.stdout.on('end', function(data) {
- assert(!stdoutEnd)
- assert.strictEqual(stdoutData.length, 100000);
- stdoutEnd = true;
- });
-
- cp.stderr.setEncoding('ascii');
-
- cp.stderr.on('data', function(data) {
- stderrData += data;
- });
-
- cp.stderr.on('end', function(data) {
- assert(!stderrEnd)
- assert.strictEqual(stderrData.length, 100000);
- stderrEnd = true;
- });
-
- cp.on('exit', function(code, signal) {
- assert.strictEqual(code, 0);
- assert(!signal);
- assert(!gotExit);
- assert(!gotClose);
- gotExit = true;
- });
-
- cp.on('close', function(code, signal) {
- assert.strictEqual(code, 0);
- assert(!signal);
- assert(!cp.stdout || stdoutEnd);
- assert(!cp.stderr || stderrEnd);
- assert(gotExit);
- assert(!gotClose);
- gotClose = true;
- });
-
- process.on('exit', function() {
- assert(gotExit);
- assert(gotClose);
- });
-}
diff --git a/deps/npm/node_modules/child-process-close/test/test.js b/deps/npm/node_modules/child-process-close/test/test.js
deleted file mode 100644
index 99047452de..0000000000
--- a/deps/npm/node_modules/child-process-close/test/test.js
+++ /dev/null
@@ -1,41 +0,0 @@
-
-var TESTS = [
- 'test-spawn-and-execfile',
- 'test-fork',
- 'test-exec',
-];
-
-var execFile = require('child_process').execFile;
-var passed = 0, failed = 0;
-
-function next() {
- var test = TESTS.shift();
- if (!test)
- done();
-
- console.log("Running test: %s", test);
- execFile(process.execPath, [test], { cwd: __dirname }, onExit);
-}
-
-function onExit(err, stdout, stderr) {
- if (err) {
- console.log("... failed:\n%s%s\n", stdout, stderr);
- failed++;
- } else {
- console.log("... pass");
- passed++;
- }
-
- next();
-}
-
-function done() {
- console.log("Tests run: %d. Passed: %d. Failed: %d",
- passed + failed,
- passed,
- failed);
-
- process.exit(+(failed > 0));
-}
-
-next();
diff --git a/deps/npm/node_modules/child-process-close/test/worker-fork.js b/deps/npm/node_modules/child-process-close/test/worker-fork.js
deleted file mode 100644
index 56e83ce801..0000000000
--- a/deps/npm/node_modules/child-process-close/test/worker-fork.js
+++ /dev/null
@@ -1,3 +0,0 @@
-
-process.send('hello');
-process.exit(0);
diff --git a/deps/npm/node_modules/child-process-close/test/worker-spawn.js b/deps/npm/node_modules/child-process-close/test/worker-spawn.js
deleted file mode 100644
index f45d898194..0000000000
--- a/deps/npm/node_modules/child-process-close/test/worker-spawn.js
+++ /dev/null
@@ -1,5 +0,0 @@
-
-var out = new Array(100000).join('x');
-
-console.log(out);
-console.error(out);
diff --git a/deps/npm/node_modules/columnify/Makefile b/deps/npm/node_modules/columnify/Makefile
index 3ae543a947..3a67c57a3b 100644
--- a/deps/npm/node_modules/columnify/Makefile
+++ b/deps/npm/node_modules/columnify/Makefile
@@ -4,6 +4,6 @@ all: columnify.js
prepublish: all
columnify.js: index.js package.json
- 6to5 index.js > columnify.js
+ babel index.js > columnify.js
.PHONY: all prepublish
diff --git a/deps/npm/node_modules/columnify/Readme.md b/deps/npm/node_modules/columnify/Readme.md
index b2b846f366..4a37928a76 100644
--- a/deps/npm/node_modules/columnify/Readme.md
+++ b/deps/npm/node_modules/columnify/Readme.md
@@ -1,6 +1,9 @@
# columnify
-[![Build Status](https://travis-ci.org/timoxley/columnify.png?branch=master)](https://travis-ci.org/timoxley/columnify)
+[![NPM](https://nodei.co/npm/columnify.png?downloads=true&downloadRank=true&stars=true&chrome)](https://nodei.co/npm-dl/columnify/)
+[![NPM](https://nodei.co/npm-dl/columnify.png?months=3&height=3&chrome)](https://nodei.co/npm/columnify/)
+
+[![Build Status](https://img.shields.io/travis/timoxley/columnify.svg?style=flat)](https://travis-ci.org/timoxley/columnify)
[![NPM Version](https://img.shields.io/npm/v/columnify.svg?style=flat)](https://npmjs.org/package/columnify)
[![License](http://img.shields.io/npm/l/columnify.svg?style=flat)](LICENSE)
[![Dependency Status](https://david-dm.org/timoxley/columnify.svg)](https://david-dm.org/timoxley/columnify)
@@ -366,6 +369,15 @@ var columns = columnify(data, {
})
```
+This also works well for hiding a single column header, like an `id` column:
+```javascript
+var columns = columnify(data, {
+ config: {
+ id: { showHeaders: false }
+ }
+})
+```
+
### Transforming Column Data and Headers
If you need to modify the presentation of column content or heading content there are two useful options for doing that: `dataTransform` and `headerTransform`. Both of these take a function and need to return a valid string.
diff --git a/deps/npm/node_modules/columnify/columnify.js b/deps/npm/node_modules/columnify/columnify.js
index 548efc679d..db10a01181 100644
--- a/deps/npm/node_modules/columnify/columnify.js
+++ b/deps/npm/node_modules/columnify/columnify.js
@@ -1,9 +1,10 @@
-"use strict";
+'use strict';
-var _toArray = function (arr) { return Array.isArray(arr) ? arr : Array.from(arr); };
+var _toConsumableArray = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } };
-var wcwidth = require("./width");
-var _require = require("./utils");
+var wcwidth = require('./width');
+
+var _require = require('./utils');
var padRight = _require.padRight;
var padCenter = _require.padCenter;
@@ -12,23 +13,22 @@ var splitIntoLines = _require.splitIntoLines;
var splitLongWords = _require.splitLongWords;
var truncateString = _require.truncateString;
-
-var DEFAULT_HEADING_TRANSFORM = function (key) {
+var DEFAULT_HEADING_TRANSFORM = function DEFAULT_HEADING_TRANSFORM(key) {
return key.toUpperCase();
};
-var DEFAULT_DATA_TRANSFORM = function (cell, column, index) {
+var DEFAULT_DATA_TRANSFORM = function DEFAULT_DATA_TRANSFORM(cell, column, index) {
return cell;
};
var DEFAULTS = Object.freeze({
maxWidth: Infinity,
minWidth: 0,
- columnSplitter: " ",
+ columnSplitter: ' ',
truncate: false,
- truncateMarker: "…",
+ truncateMarker: '…',
preserveNewLines: false,
- paddingChr: " ",
+ paddingChr: ' ',
showHeaders: true,
headingTransform: DEFAULT_HEADING_TRANSFORM,
dataTransform: DEFAULT_DATA_TRANSFORM
@@ -37,12 +37,11 @@ var DEFAULTS = Object.freeze({
module.exports = function (items) {
var options = arguments[1] === undefined ? {} : arguments[1];
-
var columnConfigs = options.config || {};
delete options.config; // remove config so doesn't appear on every column.
var maxLineWidth = options.maxLineWidth || Infinity;
- if (maxLineWidth === "auto") maxLineWidth = process.stdout.columns || Infinity;
+ if (maxLineWidth === 'auto') maxLineWidth = process.stdout.columns || Infinity;
delete options.maxLineWidth; // this is a line control option, don't pass it to column
// Option defaults inheritance:
@@ -51,7 +50,7 @@ module.exports = function (items) {
options.config = options.config || Object.create(null);
- options.spacing = options.spacing || "\n"; // probably useless
+ options.spacing = options.spacing || '\n'; // probably useless
options.preserveNewLines = !!options.preserveNewLines;
options.showHeaders = !!options.showHeaders;
options.columns = options.columns || options.include; // alias include/columns, prefer columns if supplied
@@ -82,7 +81,7 @@ module.exports = function (items) {
column.maxWidth = Math.ceil(column.maxWidth);
column.minWidth = Math.ceil(column.minWidth);
column.truncate = !!column.truncate;
- column.align = column.align || "left";
+ column.align = column.align || 'left';
});
// sanitize data
@@ -90,15 +89,15 @@ module.exports = function (items) {
var result = Object.create(null);
columnNames.forEach(function (columnName) {
// null/undefined -> ''
- result[columnName] = item[columnName] != null ? item[columnName] : "";
+ result[columnName] = item[columnName] != null ? item[columnName] : '';
// toString everything
- result[columnName] = "" + result[columnName];
+ result[columnName] = '' + result[columnName];
if (columns[columnName].preserveNewLines) {
// merge non-newline whitespace chars
- result[columnName] = result[columnName].replace(/[^\S\n]/gmi, " ");
+ result[columnName] = result[columnName].replace(/[^\S\n]/gmi, ' ');
} else {
// merge all whitespace chars
- result[columnName] = result[columnName].replace(/\s/gmi, " ");
+ result[columnName] = result[columnName].replace(/\s/gmi, ' ');
}
});
return result;
@@ -113,7 +112,7 @@ module.exports = function (items) {
var changedKeys = Object.keys(col);
// disable default heading transform if we wrote to column.name
- if (changedKeys.indexOf("name") !== -1) {
+ if (changedKeys.indexOf('name') !== -1) {
if (column.headingTransform !== DEFAULT_HEADING_TRANSFORM) return;
column.headingTransform = function (heading) {
return heading;
@@ -131,6 +130,12 @@ module.exports = function (items) {
if (options.showHeaders) {
columnNames.forEach(function (columnName) {
var column = columns[columnName];
+
+ if (!column.showHeaders) {
+ headers[columnName] = '';
+ return;
+ }
+
headers[columnName] = column.headingTransform(column.name);
});
items.unshift(headers);
@@ -185,7 +190,6 @@ module.exports = function (items) {
}, 0);
});
-
var rows = createRows(items, columns, columnNames, options.paddingChr); // merge lines into rows
// conceive output
return rows.reduce(function (output, row) {
@@ -213,16 +217,19 @@ function createRows(items, columns, columnNames, paddingChr) {
columnNames.forEach(function (columnName) {
numLines = Math.max(numLines, item[columnName].length);
});
+
+ var _loop = function (i) {
+ row[i] = row[i] || [];
+ columnNames.forEach(function (columnName) {
+ var column = columns[columnName];
+ var val = item[columnName][i] || ''; // || '' ensures empty columns get padded
+ if (column.align === 'right') row[i].push(padLeft(val, column.width, paddingChr));else if (column.align === 'center' || column.align === 'centre') row[i].push(padCenter(val, column.width, paddingChr));else row[i].push(padRight(val, column.width, paddingChr));
+ });
+ };
+
// combine matching lines of each rows
for (var i = 0; i < numLines; i++) {
- (function (i) {
- row[i] = row[i] || [];
- columnNames.forEach(function (columnName) {
- var column = columns[columnName];
- var val = item[columnName][i] || ""; // || '' ensures empty columns get padded
- if (column.align === "right") row[i].push(padLeft(val, column.width, paddingChr));else if (column.align === "center" || column.align === "centre") row[i].push(padCenter(val, column.width, paddingChr));else row[i].push(padRight(val, column.width, paddingChr));
- });
- })(i);
+ _loop(i);
}
return row;
});
@@ -239,13 +246,14 @@ function mixin() {
args[_key] = arguments[_key];
}
- if (Object.assign) return Object.assign.apply(Object, _toArray(args));
- return ObjectAssign.apply(undefined, _toArray(args));
+ if (Object.assign) {
+ return Object.assign.apply(Object, _toConsumableArray(args));
+ }return ObjectAssign.apply(undefined, _toConsumableArray(args));
}
function ObjectAssign(target, firstSource) {
- "use strict";
- if (target === undefined || target === null) throw new TypeError("Cannot convert first argument to object");
+ 'use strict';
+ if (target === undefined || target === null) throw new TypeError('Cannot convert first argument to object');
var to = Object(target);
@@ -286,14 +294,14 @@ function endsWith(target, searchString, position) {
return lastIndex !== -1 && lastIndex === position;
}
-
function toArray(items, columnNames) {
- if (Array.isArray(items)) return items;
- var rows = [];
+ if (Array.isArray(items)) {
+ return items;
+ }var rows = [];
for (var key in items) {
var item = {};
- item[columnNames[0] || "key"] = key;
- item[columnNames[1] || "value"] = items[key];
+ item[columnNames[0] || 'key'] = key;
+ item[columnNames[1] || 'value'] = items[key];
rows.push(item);
}
return rows;
diff --git a/deps/npm/node_modules/columnify/index.js b/deps/npm/node_modules/columnify/index.js
index 781e683aa8..227b41efc6 100644
--- a/deps/npm/node_modules/columnify/index.js
+++ b/deps/npm/node_modules/columnify/index.js
@@ -118,6 +118,12 @@ module.exports = function(items, options = {}) {
if(options.showHeaders) {
columnNames.forEach(columnName => {
let column = columns[columnName]
+
+ if(!column.showHeaders){
+ headers[columnName] = '';
+ return;
+ }
+
headers[columnName] = column.headingTransform(column.name)
})
items.unshift(headers)
diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/LICENSE b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/LICENSE
new file mode 100644
index 0000000000..d88b072078
--- /dev/null
+++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Elijah Insua
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/README.md b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/README.md
index a75e72e9fb..1a4a2ea9c9 100644
--- a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/README.md
+++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/README.md
@@ -40,4 +40,4 @@ Sidecases: if called with a falsy `options` value, options will be initialized t
## license
-MIT \ No newline at end of file
+[MIT](LICENSE)
diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json
index dc56f3f191..bc8e878a54 100644
--- a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json
+++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json
@@ -122,6 +122,5 @@
"tarball": "http://registry.npmjs.org/clone/-/clone-0.1.19.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/clone/-/clone-0.1.19.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/clone/-/clone-0.1.19.tgz"
}
diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json
index e3ee621919..fdd074d0f4 100644
--- a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json
+++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json
@@ -1,6 +1,6 @@
{
"name": "defaults",
- "version": "1.0.0",
+ "version": "1.0.2",
"description": "merge single level defaults over a config object",
"main": "index.js",
"scripts": {
@@ -19,20 +19,21 @@
"email": "tmpvar@gmail.com"
},
"license": "MIT",
- "readmeFilename": "README.md",
"dependencies": {
"clone": "~0.1.5"
},
"devDependencies": {
"tap": "~0.4.0"
},
- "readme": "# defaults\n\nA simple one level options merge utility\n\n## install\n\n`npm install defaults`\n\n## use\n\n```javascript\n\nvar defaults = require('defaults');\n\nvar handle = function(options, fn) {\n options = defaults(options, {\n timeout: 100\n });\n\n setTimeout(function() {\n fn(options);\n }, options.timeout);\n}\n\nhandle({ timeout: 1000 }, function() {\n // we're here 1000 ms later\n});\n\nhandle({ timeout: 10000 }, function() {\n // we're here 10s later\n});\n\n```\n\n## summary\n\nthis module exports a function that takes 2 arguments: `options` and `defaults`. When called, it overrides all of `undefined` properties in `options` with the clones of properties defined in `defaults`\n\nSidecases: if called with a falsy `options` value, options will be initialized to a new object before being merged onto.\n\n## license\n\nMIT",
- "_id": "defaults@1.0.0",
- "dist": {
- "shasum": "3ae25f44416c6c01f9809a25fcdd285912d2a6b1",
- "tarball": "http://registry.npmjs.org/defaults/-/defaults-1.0.0.tgz"
+ "gitHead": "22c57d1f87a2f03c1f9d21bd39c67db8553a0064",
+ "bugs": {
+ "url": "https://github.com/tmpvar/defaults/issues"
},
- "_npmVersion": "1.1.65",
+ "homepage": "https://github.com/tmpvar/defaults",
+ "_id": "defaults@1.0.2",
+ "_shasum": "6902e25aa047649a501e19ef9e98f3e8365c109a",
+ "_from": "defaults@>=1.0.0 <2.0.0",
+ "_npmVersion": "1.4.23",
"_npmUser": {
"name": "tmpvar",
"email": "tmpvar@gmail.com"
@@ -43,12 +44,10 @@
"email": "tmpvar@gmail.com"
}
],
- "directories": {},
- "_shasum": "3ae25f44416c6c01f9809a25fcdd285912d2a6b1",
- "_resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.0.tgz",
- "_from": "defaults@>=1.0.0 <2.0.0",
- "bugs": {
- "url": "https://github.com/tmpvar/defaults/issues"
+ "dist": {
+ "shasum": "6902e25aa047649a501e19ef9e98f3e8365c109a",
+ "tarball": "http://registry.npmjs.org/defaults/-/defaults-1.0.2.tgz"
},
- "homepage": "https://github.com/tmpvar/defaults"
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.2.tgz"
}
diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json b/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json
index 49fc6f0408..4744d9dc3f 100644
--- a/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json
+++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json
@@ -56,6 +56,5 @@
"shasum": "02d059ff7a8fc741e0f6b5da1e69b2b40daeca6f",
"tarball": "http://registry.npmjs.org/wcwidth/-/wcwidth-1.0.0.tgz"
},
- "_resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.0.tgz"
}
diff --git a/deps/npm/node_modules/columnify/package.json b/deps/npm/node_modules/columnify/package.json
index a275672342..195a7f092f 100644
--- a/deps/npm/node_modules/columnify/package.json
+++ b/deps/npm/node_modules/columnify/package.json
@@ -1,6 +1,6 @@
{
"name": "columnify",
- "version": "1.4.1",
+ "version": "1.5.1",
"description": "Render data in text columns. supports in-column text-wrap.",
"main": "columnify.js",
"scripts": {
@@ -14,10 +14,10 @@
},
"license": "MIT",
"devDependencies": {
- "6to5": "^3.0.9",
- "chalk": "^0.5.1",
- "tap-spec": "^2.1.1",
- "tape": "^3.0.3"
+ "babel": "^5.0.10",
+ "chalk": "^1.0.0",
+ "tap-spec": "^3.0.0",
+ "tape": "^4.0.0"
},
"repository": {
"type": "git",
@@ -37,18 +37,18 @@
},
"homepage": "https://github.com/timoxley/columnify",
"dependencies": {
- "strip-ansi": "^2.0.0",
+ "strip-ansi": "^2.0.1",
"wcwidth": "^1.0.0"
},
"directories": {
"test": "test"
},
- "gitHead": "24371e9c12287ce4d28f19d704a28059f3acd42b",
- "_id": "columnify@1.4.1",
- "_shasum": "30555796379865b016189c228cb0061764270ed0",
- "_from": "columnify@>=1.4.1 <1.5.0",
- "_npmVersion": "2.3.0",
- "_nodeVersion": "0.10.35",
+ "gitHead": "1e5f5ec9478d7dbd1e3d1d74343b552da7ae01ba",
+ "_id": "columnify@1.5.1",
+ "_shasum": "15fdda803a3875f87f9d302b3bc828932d664003",
+ "_from": "columnify@>=1.5.1 <1.6.0",
+ "_npmVersion": "2.7.6",
+ "_nodeVersion": "0.10.36",
"_npmUser": {
"name": "timoxley",
"email": "secoif@gmail.com"
@@ -60,8 +60,8 @@
}
],
"dist": {
- "shasum": "30555796379865b016189c228cb0061764270ed0",
- "tarball": "http://registry.npmjs.org/columnify/-/columnify-1.4.1.tgz"
+ "shasum": "15fdda803a3875f87f9d302b3bc828932d664003",
+ "tarball": "http://registry.npmjs.org/columnify/-/columnify-1.5.1.tgz"
},
- "_resolved": "https://registry.npmjs.org/columnify/-/columnify-1.4.1.tgz"
+ "_resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.1.tgz"
}
diff --git a/deps/npm/node_modules/glob/common.js b/deps/npm/node_modules/glob/common.js
index d6389591df..7bef9a27df 100644
--- a/deps/npm/node_modules/glob/common.js
+++ b/deps/npm/node_modules/glob/common.js
@@ -1,6 +1,5 @@
exports.alphasort = alphasort
exports.alphasorti = alphasorti
-exports.isAbsolute = process.platform === "win32" ? absWin : absUnix
exports.setopts = setopts
exports.ownProp = ownProp
exports.makeAbs = makeAbs
@@ -15,26 +14,9 @@ function ownProp (obj, field) {
var path = require("path")
var minimatch = require("minimatch")
+var isAbsolute = require("path-is-absolute")
var Minimatch = minimatch.Minimatch
-function absWin (p) {
- if (absUnix(p)) return true
- // pull off the device/UNC bit from a windows path.
- // from node's lib/path.js
- var splitDeviceRe =
- /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/
- var result = splitDeviceRe.exec(p)
- var device = result[1] || ''
- var isUnc = device && device.charAt(1) !== ':'
- var isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
-
- return isAbsolute
-}
-
-function absUnix (p) {
- return p.charAt(0) === "/" || p === ""
-}
-
function alphasorti (a, b) {
return a.toLowerCase().localeCompare(b.toLowerCase())
}
@@ -230,7 +212,7 @@ function makeAbs (self, f) {
var abs = f
if (f.charAt(0) === '/') {
abs = path.join(self.root, f)
- } else if (exports.isAbsolute(f)) {
+ } else if (isAbsolute(f) || f === '') {
abs = f
} else if (self.changedCwd) {
abs = path.resolve(self.cwd, f)
diff --git a/deps/npm/node_modules/glob/glob.js b/deps/npm/node_modules/glob/glob.js
index eac0693cc6..1bfed19d2e 100644
--- a/deps/npm/node_modules/glob/glob.js
+++ b/deps/npm/node_modules/glob/glob.js
@@ -47,11 +47,11 @@ var inherits = require('inherits')
var EE = require('events').EventEmitter
var path = require('path')
var assert = require('assert')
+var isAbsolute = require('path-is-absolute')
var globSync = require('./sync.js')
var common = require('./common.js')
var alphasort = common.alphasort
var alphasorti = common.alphasorti
-var isAbsolute = common.isAbsolute
var setopts = common.setopts
var ownProp = common.ownProp
var inflight = require('inflight')
diff --git a/deps/npm/node_modules/glob/node_modules/path-is-absolute/index.js b/deps/npm/node_modules/glob/node_modules/path-is-absolute/index.js
new file mode 100644
index 0000000000..19f103f908
--- /dev/null
+++ b/deps/npm/node_modules/glob/node_modules/path-is-absolute/index.js
@@ -0,0 +1,20 @@
+'use strict';
+
+function posix(path) {
+ return path.charAt(0) === '/';
+};
+
+function win32(path) {
+ // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
+ var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
+ var result = splitDeviceRe.exec(path);
+ var device = result[1] || '';
+ var isUnc = !!device && device.charAt(1) !== ':';
+
+ // UNC paths are always absolute
+ return !!result[2] || isUnc;
+};
+
+module.exports = process.platform === 'win32' ? win32 : posix;
+module.exports.posix = posix;
+module.exports.win32 = win32;
diff --git a/deps/npm/node_modules/glob/node_modules/path-is-absolute/license b/deps/npm/node_modules/glob/node_modules/path-is-absolute/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/deps/npm/node_modules/glob/node_modules/path-is-absolute/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json b/deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json
new file mode 100644
index 0000000000..fb42bcb345
--- /dev/null
+++ b/deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "path-is-absolute",
+ "version": "1.0.0",
+ "description": "Node.js 0.12 path.isAbsolute() ponyfill",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sindresorhus/path-is-absolute"
+ },
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "path",
+ "paths",
+ "file",
+ "dir",
+ "absolute",
+ "isabsolute",
+ "is-absolute",
+ "built-in",
+ "util",
+ "utils",
+ "core",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "is",
+ "detect",
+ "check"
+ ],
+ "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/path-is-absolute/issues"
+ },
+ "homepage": "https://github.com/sindresorhus/path-is-absolute",
+ "_id": "path-is-absolute@1.0.0",
+ "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912",
+ "_from": "path-is-absolute@>=1.0.0 <2.0.0",
+ "_npmVersion": "2.5.1",
+ "_nodeVersion": "0.12.0",
+ "_npmUser": {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912",
+ "tarball": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz"
+}
diff --git a/deps/npm/node_modules/glob/node_modules/path-is-absolute/readme.md b/deps/npm/node_modules/glob/node_modules/path-is-absolute/readme.md
new file mode 100644
index 0000000000..cdf94f4309
--- /dev/null
+++ b/deps/npm/node_modules/glob/node_modules/path-is-absolute/readme.md
@@ -0,0 +1,51 @@
+# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute)
+
+> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill
+
+> Ponyfill: A polyfill that doesn't overwrite the native method
+
+
+## Install
+
+```
+$ npm install --save path-is-absolute
+```
+
+
+## Usage
+
+```js
+var pathIsAbsolute = require('path-is-absolute');
+
+// Linux
+pathIsAbsolute('/home/foo');
+//=> true
+
+// Windows
+pathIsAbsolute('C:/Users/');
+//=> true
+
+// Any OS
+pathIsAbsolute.posix('/home/foo');
+//=> true
+```
+
+
+## API
+
+See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path).
+
+### pathIsAbsolute(path)
+
+### pathIsAbsolute.posix(path)
+
+The Posix specific version.
+
+### pathIsAbsolute.win32(path)
+
+The Windows specific version.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json
index cf31a8ded6..e60f438d3d 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": "5.0.3",
+ "version": "5.0.5",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
@@ -24,7 +24,8 @@
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^2.0.1",
- "once": "^1.3.0"
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
},
"devDependencies": {
"mkdirp": "0",
@@ -42,15 +43,15 @@
"benchclean": "bash benchclean.sh"
},
"license": "ISC",
- "gitHead": "2f63d487885fbb51ec8fcb21229bebd0e515c3fb",
+ "gitHead": "9db1a83b44da0c60f5fdd31b28b1f9917ee6316d",
"bugs": {
"url": "https://github.com/isaacs/node-glob/issues"
},
"homepage": "https://github.com/isaacs/node-glob",
- "_id": "glob@5.0.3",
- "_shasum": "15528c1c727e474a8e7731541c00b00ec802952d",
- "_from": "glob@>=5.0.3 <5.1.0",
- "_npmVersion": "2.7.1",
+ "_id": "glob@5.0.5",
+ "_shasum": "784431e4e29a900ae0d47fba6aa1c7f16a8e7df7",
+ "_from": "glob@>=5.0.5 <5.1.0",
+ "_npmVersion": "2.7.6",
"_nodeVersion": "1.4.2",
"_npmUser": {
"name": "isaacs",
@@ -63,10 +64,9 @@
}
],
"dist": {
- "shasum": "15528c1c727e474a8e7731541c00b00ec802952d",
- "tarball": "http://registry.npmjs.org/glob/-/glob-5.0.3.tgz"
+ "shasum": "784431e4e29a900ae0d47fba6aa1c7f16a8e7df7",
+ "tarball": "http://registry.npmjs.org/glob/-/glob-5.0.5.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.3.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.5.tgz"
}
diff --git a/deps/npm/node_modules/glob/sync.js b/deps/npm/node_modules/glob/sync.js
index f4f5e36d4b..92fe110194 100644
--- a/deps/npm/node_modules/glob/sync.js
+++ b/deps/npm/node_modules/glob/sync.js
@@ -8,10 +8,10 @@ var Glob = require('./glob.js').Glob
var util = require('util')
var path = require('path')
var assert = require('assert')
+var isAbsolute = require('path-is-absolute')
var common = require('./common.js')
var alphasort = common.alphasort
var alphasorti = common.alphasorti
-var isAbsolute = common.isAbsolute
var setopts = common.setopts
var ownProp = common.ownProp
var childrenIgnored = common.childrenIgnored
diff --git a/deps/npm/node_modules/hosted-git-info/README.md b/deps/npm/node_modules/hosted-git-info/README.md
index f1d799b173..55b5dbcbb5 100644
--- a/deps/npm/node_modules/hosted-git-info/README.md
+++ b/deps/npm/node_modules/hosted-git-info/README.md
@@ -61,7 +61,7 @@ eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme`
* info.https()
-eg, `https://github.com/npm/hosted-git-info.git`
+eg, `git+https://github.com/npm/hosted-git-info.git`
* info.sshurl()
@@ -75,7 +75,25 @@ eg, `git@github.com:npm/hosted-git-info.git`
eg, `npm/hosted-git-info`
+* info.getDefaultRepresentation()
+
+Returns the default output type. The default output type is based on the
+string you passed in to be parsed
+
+* info.toString()
+
+Uses the getDefaultRepresentation to call one of the other methods to get a URL for
+this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give
+you a normalized version of the URL that still uses the same protocol.
+
+Shortcuts will still be returned as shortcuts, but the special case github
+form of `org/project` will be normalized to `github:org/project`.
+
+SSH connect strings will be normalized into `git+ssh` URLs.
+
+
## Supported hosts
Currently this supports Github, Bitbucket and Gitlab. Pull requests for
additional hosts welcome.
+
diff --git a/deps/npm/node_modules/hosted-git-info/README.md~ b/deps/npm/node_modules/hosted-git-info/README.md~
deleted file mode 100644
index aadbbee1f4..0000000000
--- a/deps/npm/node_modules/hosted-git-info/README.md~
+++ /dev/null
@@ -1,87 +0,0 @@
-# hosted-git-info
-
-This will let you identify and transform various git hosts URLs between
-protocols. It also can tell you what the URL is for the raw path for
-particular file for direct access without git.
-
-## Usage
-
-```javascript
-var hostedGitInfo = require("hosted-git-info")
-var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git")
-/* info looks like:
-{
- type: "github",
- domain: "github.com",
- user: "npm",
- project: "hosted-git-info"
-}
-*/
-```
-
-If the URL can't be matched with a git host, `null` will be returned. We
-can match git, ssh and https urls. Additionally, we can match ssh connect
-strings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg,
-`github:npm/hosted-git-info`). Github specifically, is detected in the case
-of a third, unprefixed, form: `npm/hosted-git-info`.
-
-If it does match, the returned object has properties of:
-
-* info.type -- The short name of the service
-* info.domain -- The domain for git protocol use
-* info.user -- The name of the user/org on the git host
-* info.project -- The name of the project on the git host
-
-And methods of:
-
-* info.file(path)
-
-Given the path of a file relative to the repository, returns a URL for
-directly fetching it from the githost. If no comittish was set then
-`master` will be used as the default.
-
-<<<<<<< HEAD
-For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")`
-||||||| merged common ancestors
-For example `hostedGitInfo("git@github.com:npm/hosted-git-info.git").file("v1.0.0")`
-=======
-For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git").file("v1.0.0")`
->>>>>>> Another README fix
-would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json`
-
-* info.shortcut()
-
-eg, `github:npm/hosted-git-info`
-
-* info.browse()
-
-eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`
-
-* info.bugs()
-
-eg, `https://github.com/npm/hosted-git-info/issues`
-
-* info.docs()
-
-eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme`
-
-* info.https()
-
-eg, `https://github.com/npm/hosted-git-info.git`
-
-* info.sshurl()
-
-eg, `git+ssh://git@github.com/npm/hosted-git-info.git`
-
-* info.ssh()
-
-eg, `git@github.com:npm/hosted-git-info.git`
-
-* info.path()
-
-eg, `npm/hosted-git-info`
-
-## Supported hosts
-
-Currently this supports Github, Bitbucket and Gitlab. Pull requests for
-additional hosts welcome.
diff --git a/deps/npm/node_modules/hosted-git-info/git-host-info.js b/deps/npm/node_modules/hosted-git-info/git-host-info.js
new file mode 100644
index 0000000000..354d9fc0d2
--- /dev/null
+++ b/deps/npm/node_modules/hosted-git-info/git-host-info.js
@@ -0,0 +1,64 @@
+'use strict'
+
+var gitHosts = module.exports = {
+ github: {
+ // First two are insecure and generally shouldn't be used any more, but
+ // they are still supported.
+ 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ],
+ 'domain': 'github.com',
+ 'treepath': 'tree',
+ 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{comittish}/{path}',
+ 'bugstemplate': 'https://{domain}/{user}/{project}/issues',
+ 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#comittish}'
+ },
+ bitbucket: {
+ 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
+ 'domain': 'bitbucket.org',
+ 'treepath': 'src'
+ },
+ gitlab: {
+ 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
+ 'domain': 'gitlab.com',
+ 'treepath': 'tree',
+ 'docstemplate': 'https://{domain}/{user}/{project}{/tree/comittish}#README',
+ 'bugstemplate': 'https://{domain}/{user}/{project}/issues'
+ },
+ gist: {
+ 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ],
+ 'domain': 'gist.github.com',
+ 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]+)(?:[.]git)?$/,
+ 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/comittish}/{path}',
+ 'bugstemplate': 'https://{domain}/{project}',
+ 'gittemplate': 'git://{domain}/{project}.git{#comittish}',
+ 'sshtemplate': 'git@{domain}:/{project}.git{#comittish}',
+ 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#comittish}',
+ 'browsetemplate': 'https://{domain}/{project}{/comittish}',
+ 'docstemplate': 'https://{domain}/{project}{/comittish}',
+ 'httpstemplate': 'git+https://{domain}/{project}.git{#comittish}',
+ 'shortcuttemplate': '{type}:{project}{#comittish}',
+ 'pathtemplate': '{project}{#comittish}'
+ }
+}
+
+var gitHostDefaults = {
+ 'sshtemplate': 'git@{domain}:{user}/{project}.git{#comittish}',
+ 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#comittish}',
+ 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/comittish}',
+ 'docstemplate': 'https://{domain}/{user}/{project}{/tree/comittish}#readme',
+ 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#comittish}',
+ 'filetemplate': 'https://{domain}/{user}/{project}/raw/{comittish}/{path}',
+ 'shortcuttemplate': '{type}:{user}/{project}{#comittish}',
+ 'pathtemplate': '{user}/{project}{#comittish}',
+ 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git)?$/
+}
+
+Object.keys(gitHosts).forEach(function (name) {
+ Object.keys(gitHostDefaults).forEach(function (key) {
+ if (gitHosts[name][key]) return
+ gitHosts[name][key] = gitHostDefaults[key]
+ })
+ gitHosts[name].protocols_re = RegExp('^(' +
+ gitHosts[name].protocols.map(function (protocol) {
+ return protocol.replace(/([\\+*{}()\[\]$^|])/g, '\\$1')
+ }).join('|') + '):$')
+})
diff --git a/deps/npm/node_modules/hosted-git-info/git-host.js b/deps/npm/node_modules/hosted-git-info/git-host.js
new file mode 100644
index 0000000000..b69ad0f28a
--- /dev/null
+++ b/deps/npm/node_modules/hosted-git-info/git-host.js
@@ -0,0 +1,96 @@
+'use strict'
+var gitHosts = require('./git-host-info.js')
+
+var GitHost = module.exports = function (type, user, auth, project, comittish, defaultRepresentation) {
+ var gitHostInfo = this
+ gitHostInfo.type = type
+ Object.keys(gitHosts[type]).forEach(function (key) {
+ gitHostInfo[key] = gitHosts[type][key]
+ })
+ gitHostInfo.user = user
+ gitHostInfo.auth = auth
+ gitHostInfo.project = project
+ gitHostInfo.comittish = comittish
+ gitHostInfo.default = defaultRepresentation
+}
+GitHost.prototype = {}
+
+GitHost.prototype.hash = function () {
+ return this.comittish ? '#' + this.comittish : ''
+}
+
+GitHost.prototype._fill = function (template, vars) {
+ if (!template) return
+ if (!vars) vars = {}
+ var self = this
+ Object.keys(this).forEach(function (key) {
+ if (self[key] != null && vars[key] == null) vars[key] = self[key]
+ })
+ var rawAuth = vars.auth
+ var rawComittish = vars.comittish
+ Object.keys(vars).forEach(function (key) {
+ vars[key] = encodeURIComponent(vars[key])
+ })
+ vars['auth@'] = rawAuth ? rawAuth + '@' : ''
+ vars['#comittish'] = rawComittish ? '#' + rawComittish : ''
+ vars['/tree/comittish'] = vars.comittish
+ ? '/' + vars.treepath + '/' + vars.comittish
+ : ''
+ vars['/comittish'] = vars.comittish ? '/' + vars.comittish : ''
+ vars.comittish = vars.comittish || 'master'
+ var res = template
+ Object.keys(vars).forEach(function (key) {
+ res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key])
+ })
+ return res
+}
+
+GitHost.prototype.ssh = function () {
+ return this._fill(this.sshtemplate)
+}
+
+GitHost.prototype.sshurl = function () {
+ return this._fill(this.sshurltemplate)
+}
+
+GitHost.prototype.browse = function () {
+ return this._fill(this.browsetemplate)
+}
+
+GitHost.prototype.docs = function () {
+ return this._fill(this.docstemplate)
+}
+
+GitHost.prototype.bugs = function () {
+ return this._fill(this.bugstemplate)
+}
+
+GitHost.prototype.https = function () {
+ return this._fill(this.httpstemplate)
+}
+
+GitHost.prototype.git = function () {
+ return this._fill(this.gittemplate)
+}
+
+GitHost.prototype.shortcut = function () {
+ return this._fill(this.shortcuttemplate)
+}
+
+GitHost.prototype.path = function () {
+ return this._fill(this.pathtemplate)
+}
+
+GitHost.prototype.file = function (P) {
+ return this._fill(this.filetemplate, {
+ path: P.replace(/^[/]+/g, '')
+ })
+}
+
+GitHost.prototype.getDefaultRepresentation = function () {
+ return this.default
+}
+
+GitHost.prototype.toString = function () {
+ return (this[this.default] || this.sshurl).call(this)
+}
diff --git a/deps/npm/node_modules/hosted-git-info/index.js b/deps/npm/node_modules/hosted-git-info/index.js
index c2ad10a3bc..b8c6e10c6f 100644
--- a/deps/npm/node_modules/hosted-git-info/index.js
+++ b/deps/npm/node_modules/hosted-git-info/index.js
@@ -1,49 +1,65 @@
-"use strict"
-var url = require("url")
-
-var GitHost = exports = module.exports = function (type, user, project, comittish) {
- this.type = type
- this.domain = gitHosts[type].domain
- this.filetemplate = gitHosts[type].filetemplate
- this.sshtemplate = gitHosts[type].sshtemplate
- this.sshurltemplate = gitHosts[type].sshurltemplate
- this.browsetemplate = gitHosts[type].browsetemplate
- this.docstemplate = gitHosts[type].docstemplate
- this.bugstemplate = gitHosts[type].bugstemplate
- this.gittemplate = gitHosts[type].gittemplate
- this.httpstemplate = gitHosts[type].httpstemplate
- this.treepath = gitHosts[type].treepath
- this.user = user
- this.project = project
- this.comittish = comittish
-}
-GitHost.prototype = {}
-
-exports.fromUrl = function (giturl) {
- if (giturl == null || giturl == "") return
- var parsed = parseGitUrl(maybeGitHubShorthand(giturl) ? "github:" + giturl : giturl)
- var matches = Object.keys(gitHosts).map(function(V) {
- var gitHost = gitHosts[V]
+'use strict'
+var url = require('url')
+var gitHosts = require('./git-host-info.js')
+var GitHost = module.exports = require('./git-host.js')
+
+var protocolToRepresentationMap = {
+ 'git+ssh': 'sshurl',
+ 'git+https': 'https',
+ 'ssh': 'sshurl',
+ 'git': 'git'
+}
+
+function protocolToRepresentation (protocol) {
+ if (protocol.substr(-1) === ':') protocol = protocol.slice(0, -1)
+ return protocolToRepresentationMap[protocol] || protocol
+}
+
+var authProtocols = {
+ 'git:': true,
+ 'https:': true,
+ 'git+https:': true,
+ 'http:': true,
+ 'git+http:': true
+}
+
+module.exports.fromUrl = function (giturl) {
+ if (giturl == null || giturl === '') return
+ var url = fixupUnqualifiedGist(
+ isGitHubShorthand(giturl) ? 'github:' + giturl : giturl
+ )
+ var parsed = parseGitUrl(url)
+ var matches = Object.keys(gitHosts).map(function (gitHostName) {
+ var gitHostInfo = gitHosts[gitHostName]
+ var auth = null
+ if (parsed.auth && authProtocols[parsed.protocol]) {
+ auth = decodeURIComponent(parsed.auth)
+ }
var comittish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null
- if (parsed.protocol == V + ":") {
- return new GitHost(V,
- decodeURIComponent(parsed.host), decodeURIComponent(parsed.path.replace(/^[/](.*?)(?:[.]git)?$/, "$1")), comittish)
+ var user = null
+ var project = null
+ var defaultRepresentation = null
+ if (parsed.protocol === gitHostName + ':') {
+ user = decodeURIComponent(parsed.host)
+ project = parsed.path && decodeURIComponent(parsed.path.replace(/^[/](.*?)(?:[.]git)?$/, '$1'))
+ defaultRepresentation = 'shortcut'
+ } else {
+ if (parsed.host !== gitHostInfo.domain) return
+ if (!gitHostInfo.protocols_re.test(parsed.protocol)) return
+ var pathmatch = gitHostInfo.pathmatch
+ var matched = parsed.path.match(pathmatch)
+ if (!matched) return
+ if (matched[1] != null) user = decodeURIComponent(matched[1])
+ if (matched[2] != null) project = decodeURIComponent(matched[2])
+ defaultRepresentation = protocolToRepresentation(parsed.protocol)
}
- if (parsed.host != gitHost.domain) return
- if (! gitHost.protocols_re.test(parsed.protocol)) return
- var matched = parsed.path.match(gitHost.pathmatch)
- if (! matched) return
- return new GitHost(
- V,
- matched[1]!=null && decodeURIComponent(matched[1]),
- matched[2]!=null && decodeURIComponent(matched[2]),
- comittish)
- }).filter(function(V){ return V })
- if (matches.length != 1) return
+ return new GitHost(gitHostName, user, auth, project, comittish, defaultRepresentation)
+ }).filter(function (gitHostInfo) { return gitHostInfo })
+ if (matches.length !== 1) return
return matches[0]
}
-function maybeGitHubShorthand(arg) {
+function isGitHubShorthand (arg) {
// Note: This does not fully test the git ref format.
// See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html
//
@@ -55,12 +71,22 @@ function maybeGitHubShorthand(arg) {
return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg)
}
-var parseGitUrl = function (giturl) {
- if (typeof giturl != "string") giturl = "" + giturl
+function fixupUnqualifiedGist (giturl) {
+ // necessary for round-tripping gists
+ var parsed = url.parse(giturl)
+ if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) {
+ return parsed.protocol + '/' + parsed.host
+ } else {
+ return giturl
+ }
+}
+
+function parseGitUrl (giturl) {
+ if (typeof giturl !== 'string') giturl = '' + giturl
var matched = giturl.match(/^([^@]+)@([^:]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/)
- if (! matched) return url.parse(giturl)
+ if (!matched) return url.parse(giturl)
return {
- protocol: "git+ssh:",
+ protocol: 'git+ssh:',
slashes: true,
auth: matched[1],
host: matched[2],
@@ -69,140 +95,9 @@ var parseGitUrl = function (giturl) {
hash: matched[4],
search: null,
query: null,
- pathname: "/" + matched[3],
- path: "/" + matched[3],
- href: "git+ssh://" + matched[1] + "@" + matched[2] + "/" + matched[3] + (matched[4]||"")
+ pathname: '/' + matched[3],
+ path: '/' + matched[3],
+ href: 'git+ssh://' + matched[1] + '@' + matched[2] +
+ '/' + matched[3] + (matched[4] || '')
}
}
-
-var gitHostDefaults = {
- "sshtemplate": "git@{domain}:{user}/{project}.git{#comittish}",
- "sshurltemplate": "git+ssh://git@{domain}/{user}/{project}.git{#comittish}",
- "browsetemplate": "https://{domain}/{user}/{project}{/tree/comittish}",
- "docstemplate": "https://{domain}/{user}/{project}{/tree/comittish}#readme",
- "httpstemplate": "https://{domain}/{user}/{project}.git{#comittish}",
- "filetemplate": "https://{domain}/{user}/{project}/raw/{comittish}/{path}"
-}
-var gitHosts = {
- github: {
- // First two are insecure and generally shouldn't be used any more, but
- // they are still supported.
- "protocols": [ "git", "http", "git+ssh", "git+https", "ssh", "https" ],
- "domain": "github.com",
- "pathmatch": /^[/]([^/]+)[/]([^/]+?)(?:[.]git)?$/,
- "treepath": "tree",
- "filetemplate": "https://raw.githubusercontent.com/{user}/{project}/{comittish}/{path}",
- "bugstemplate": "https://{domain}/{user}/{project}/issues",
- "gittemplate": "git://{domain}/{user}/{project}.git{#comittish}"
- },
- bitbucket: {
- "protocols": [ "git+ssh", "git+https", "ssh", "https" ],
- "domain": "bitbucket.org",
- "pathmatch": /^[/]([^/]+)[/]([^/]+?)(?:[.]git)?$/,
- "treepath": "src"
- },
- gitlab: {
- "protocols": [ "git+ssh", "git+https", "ssh", "https" ],
- "domain": "gitlab.com",
- "pathmatch": /^[/]([^/]+)[/]([^/]+?)(?:[.]git)?$/,
- "treepath": "tree",
- "docstemplate": "https://{domain}/{user}/{project}{/tree/comittish}#README",
- "bugstemplate": "https://{domain}/{user}/{project}/issues"
- },
- gist: {
- "protocols": [ "git", "git+ssh", "git+https", "ssh", "https" ],
- "domain": "gist.github.com",
- "pathmatch": /^[/](?:([^/]+)[/])?([a-z0-9]+)(?:[.]git)?$/,
- "filetemplate": "https://gist.githubusercontent.com/{user}/{project}/raw{/comittish}/{path}",
- "bugstemplate": "https://{domain}/{project}",
- "gittemplate": "git://{domain}/{project}.git{#comittish}",
- "sshtemplate": "git@{domain}:/{project}.git{#comittish}",
- "sshurltemplate": "git+ssh://git@{domain}/{project}.git{#comittish}",
- "browsetemplate": "https://{domain}/{project}{/comittish}",
- "docstemplate": "https://{domain}/{project}{/comittish}",
- "httpstemplate": "https://{domain}/{project}.git{#comittish}",
- },
-}
-
-Object.keys(gitHosts).forEach(function(host) {
- gitHosts[host].protocols_re = RegExp("^(" +
- gitHosts[host].protocols.map(function(P){
- return P.replace(/([\\+*{}()\[\]$^|])/g, "\\$1")
- }).join("|") + "):$")
-})
-
-GitHost.prototype.shortcut = function () {
- return this.type + ":" + this.path()
-}
-
-GitHost.prototype.hash = function () {
- return this.comittish ? "#" + this.comittish : ""
-}
-
-GitHost.prototype.path = function () {
- return this.user + "/" + this.project + this.hash()
-}
-
-GitHost.prototype._fill = function (template, vars) {
- if (!template) throw new Error("Tried to fill without template")
- if (!vars) vars = {}
- var self = this
- Object.keys(this).forEach(function(K){ if (self[K]!=null && vars[K]==null) vars[K] = self[K] })
- var rawComittish = vars.comittish
- Object.keys(vars).forEach(function(K){ (K[0]!='#') && (vars[K] = encodeURIComponent(vars[K])) })
- vars["#comittish"] = rawComittish ? "#" + rawComittish : ""
- vars["/tree/comittish"] = vars.comittish ? "/"+vars.treepath+"/" + vars.comittish : "",
- vars["/comittish"] = vars.comittish ? "/" + vars.comittish : ""
- vars.comittish = vars.comittish || "master"
- var res = template
- Object.keys(vars).forEach(function(K){
- res = res.replace(new RegExp("[{]" + K + "[}]", "g"), vars[K])
- })
- return res
-}
-
-GitHost.prototype.ssh = function () {
- var sshtemplate = this.sshtemplate || gitHostDefaults.sshtemplate
- return this._fill(sshtemplate)
-}
-
-GitHost.prototype.sshurl = function () {
- var sshurltemplate = this.sshurltemplate || gitHostDefaults.sshurltemplate
- return this._fill(sshurltemplate)
-}
-
-GitHost.prototype.browse = function () {
- var browsetemplate = this.browsetemplate || gitHostDefaults.browsetemplate
- return this._fill(browsetemplate)
-}
-
-GitHost.prototype.docs = function () {
- var docstemplate = this.docstemplate || gitHostDefaults.docstemplate
- return this._fill(docstemplate)
-}
-
-GitHost.prototype.bugs = function() {
- if (! this.bugstemplate) return
- return this._fill(this.bugstemplate)
-}
-
-GitHost.prototype.https = function () {
- var httpstemplate = this.httpstemplate || gitHostDefaults.httpstemplate
- return this._fill(httpstemplate)
-}
-
-GitHost.prototype.git = function () {
- if (! this.gittemplate) return
- return this._fill(this.gittemplate)
-}
-
-GitHost.prototype.file = function (P) {
- var filetemplate = this.filetemplate || gitHostDefaults.filetemplate
- return this._fill(filetemplate, {
- path: P.replace(/^[/]+/g, "")
- })
-}
-
-GitHost.prototype.toString = function () {
- return this[this.default||"sshurl"]()
-}
diff --git a/deps/npm/node_modules/hosted-git-info/package.json b/deps/npm/node_modules/hosted-git-info/package.json
index 4e38cb439d..81f477ee61 100644
--- a/deps/npm/node_modules/hosted-git-info/package.json
+++ b/deps/npm/node_modules/hosted-git-info/package.json
@@ -1,6 +1,6 @@
{
"name": "hosted-git-info",
- "version": "1.5.3",
+ "version": "2.1.2",
"description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
"main": "index.js",
"repository": {
@@ -24,32 +24,16 @@
},
"homepage": "https://github.com/npm/hosted-git-info",
"scripts": {
- "test": "tap test/*.js"
+ "test": "standard && tap test/*.js"
},
"devDependencies": {
+ "standard": "^3.3.2",
"tap": "^0.4.13"
},
- "gitHead": "153325f997813ebf8a7ae07b322b4fa89aa25f7d",
- "_id": "hosted-git-info@1.5.3",
- "_shasum": "1f46e25e9c0e207852fb7a4b94422ed5f09a03f5",
- "_from": "hosted-git-info@>=1.5.3 <1.6.0",
- "_npmVersion": "2.4.0",
- "_nodeVersion": "0.10.33",
- "_npmUser": {
- "name": "iarna",
- "email": "me@re-becca.org"
- },
- "maintainers": [
- {
- "name": "iarna",
- "email": "me@re-becca.org"
- }
- ],
- "dist": {
- "shasum": "1f46e25e9c0e207852fb7a4b94422ed5f09a03f5",
- "tarball": "http://registry.npmjs.org/hosted-git-info/-/hosted-git-info-1.5.3.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-1.5.3.tgz",
- "readme": "ERROR: No README data found!"
+ "readme": "# hosted-git-info\n\nThis will let you identify and transform various git hosts URLs between\nprotocols. It also can tell you what the URL is for the raw path for\nparticular file for direct access without git.\n\n## Usage\n\n```javascript\nvar hostedGitInfo = require(\"hosted-git-info\")\nvar info = hostedGitInfo.fromUrl(\"git@github.com:npm/hosted-git-info.git\")\n/* info looks like:\n{\n type: \"github\",\n domain: \"github.com\",\n user: \"npm\",\n project: \"hosted-git-info\"\n}\n*/\n```\n\nIf the URL can't be matched with a git host, `null` will be returned. We\ncan match git, ssh and https urls. Additionally, we can match ssh connect\nstrings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg,\n`github:npm/hosted-git-info`). Github specifically, is detected in the case\nof a third, unprefixed, form: `npm/hosted-git-info`.\n\nIf it does match, the returned object has properties of:\n\n* info.type -- The short name of the service\n* info.domain -- The domain for git protocol use\n* info.user -- The name of the user/org on the git host\n* info.project -- The name of the project on the git host\n\nAnd methods of:\n\n* info.file(path)\n\nGiven the path of a file relative to the repository, returns a URL for\ndirectly fetching it from the githost. If no comittish was set then\n`master` will be used as the default.\n\nFor example `hostedGitInfo.fromUrl(\"git@github.com:npm/hosted-git-info.git#v1.0.0\").file(\"package.json\")`\nwould return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json`\n\n* info.shortcut()\n\neg, `github:npm/hosted-git-info`\n\n* info.browse()\n\neg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`\n\n* info.bugs()\n\neg, `https://github.com/npm/hosted-git-info/issues`\n\n* info.docs()\n\neg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme`\n\n* info.https()\n\neg, `git+https://github.com/npm/hosted-git-info.git`\n\n* info.sshurl()\n\neg, `git+ssh://git@github.com/npm/hosted-git-info.git`\n\n* info.ssh()\n\neg, `git@github.com:npm/hosted-git-info.git`\n\n* info.path()\n\neg, `npm/hosted-git-info`\n\n* info.getDefaultRepresentation()\n\nReturns the default output type. The default output type is based on the\nstring you passed in to be parsed\n\n* info.toString()\n\nUses the getDefaultRepresentation to call one of the other methods to get a URL for\nthis resource. As such `hostedGitInfo.fromUrl(url).toString()` will give\nyou a normalized version of the URL that still uses the same protocol.\n\nShortcuts will still be returned as shortcuts, but the special case github\nform of `org/project` will be normalized to `github:org/project`.\n\nSSH connect strings will be normalized into `git+ssh` URLs.\n\n\n## Supported hosts\n\nCurrently this supports Github, Bitbucket and Gitlab. Pull requests for\nadditional hosts welcome.\n\n",
+ "readmeFilename": "README.md",
+ "gitHead": "9f24fee147bb76595e234b7556ecc9d0448215fa",
+ "_id": "hosted-git-info@2.1.2",
+ "_shasum": "f947976852931851c33644bbce80d1e499795246",
+ "_from": "hosted-git-info@>=2.1.2 <2.2.0"
}
diff --git a/deps/npm/node_modules/hosted-git-info/test/basic.js b/deps/npm/node_modules/hosted-git-info/test/basic.js
index e56ef9a05a..0b93f50e20 100644
--- a/deps/npm/node_modules/hosted-git-info/test/basic.js
+++ b/deps/npm/node_modules/hosted-git-info/test/basic.js
@@ -1,9 +1,15 @@
-"use strict"
-var HostedGit = require("../index")
-var test = require("tap").test
+'use strict'
+var HostedGit = require('../index')
+var test = require('tap').test
-test("basic", function (t) {
- t.is(HostedGit.fromUrl("https://google.com"), undefined, "null on failure")
-
- t.end()
+test('basic', function (t) {
+ t.is(HostedGit.fromUrl('https://google.com'), undefined, 'null on failure')
+ t.is(HostedGit.fromUrl('https://github.com/abc/def').getDefaultRepresentation(), 'https', 'match https urls')
+ t.is(HostedGit.fromUrl('ssh://git@github.com/abc/def').getDefaultRepresentation(), 'sshurl', 'match ssh urls')
+ t.is(HostedGit.fromUrl('git+ssh://git@github.com/abc/def').getDefaultRepresentation(), 'sshurl', 'match git+ssh urls')
+ t.is(HostedGit.fromUrl('git+https://github.com/abc/def').getDefaultRepresentation(), 'https', 'match git+https urls')
+ t.is(HostedGit.fromUrl('git@github.com:abc/def').getDefaultRepresentation(), 'sshurl', 'match ssh connect strings')
+ t.is(HostedGit.fromUrl('git://github.com/abc/def').getDefaultRepresentation(), 'git', 'match git urls')
+ t.is(HostedGit.fromUrl('github:abc/def').getDefaultRepresentation(), 'shortcut', 'match shortcuts')
+ t.end()
})
diff --git a/deps/npm/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js b/deps/npm/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js
new file mode 100644
index 0000000000..a2feb2f0e1
--- /dev/null
+++ b/deps/npm/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js
@@ -0,0 +1,27 @@
+'use strict'
+var HostedGit = require('../index')
+var test = require('tap').test
+
+test('Bitbucket HTTPS URLs with embedded auth', function (t) {
+ t.is(
+ HostedGit.fromUrl('https://user:pass@bitbucket.org/user/repo.git').toString(),
+ 'git+https://user:pass@bitbucket.org/user/repo.git',
+ 'credentials were included in URL'
+ )
+ t.is(
+ HostedGit.fromUrl('https://user:pass@bitbucket.org/user/repo').toString(),
+ 'git+https://user:pass@bitbucket.org/user/repo.git',
+ 'credentials were included in URL'
+ )
+ t.is(
+ HostedGit.fromUrl('git+https://user:pass@bitbucket.org/user/repo.git').toString(),
+ 'git+https://user:pass@bitbucket.org/user/repo.git',
+ 'credentials were included in URL'
+ )
+ t.is(
+ HostedGit.fromUrl('git+https://user:pass@bitbucket.org/user/repo').toString(),
+ 'git+https://user:pass@bitbucket.org/user/repo.git',
+ 'credentials were included in URL'
+ )
+ t.end()
+})
diff --git a/deps/npm/node_modules/hosted-git-info/test/bitbucket.js b/deps/npm/node_modules/hosted-git-info/test/bitbucket.js
index 8712723145..72e4ba113d 100644
--- a/deps/npm/node_modules/hosted-git-info/test/bitbucket.js
+++ b/deps/npm/node_modules/hosted-git-info/test/bitbucket.js
@@ -1,23 +1,23 @@
-"use strict"
-var HostedGit = require("../index")
-var test = require("tap").test
+'use strict'
+var HostedGit = require('../index')
+var test = require('tap').test
-test("fromUrl(bitbucket url)", function (t) {
- function verify(host, label, branch) {
+test('fromUrl(bitbucket url)', function (t) {
+ function verify (host, label, branch) {
var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? "#" + branch : ""
+ var hash = branch ? '#' + branch : ''
t.ok(hostinfo, label)
- if (! hostinfo) return
- t.is( hostinfo.https(), "https://bitbucket.org/111/222.git" + hash, label + " -> https" )
- t.is( hostinfo.browse(), "https://bitbucket.org/111/222" + (branch ? "/src/" + branch : ""), label + " -> browse" )
- t.is( hostinfo.docs(), "https://bitbucket.org/111/222" + (branch ? "/src/" + branch : "") + "#readme", label + " -> docs" )
- t.is( hostinfo.ssh(), "git@bitbucket.org:111/222.git" + hash, label + " -> ssh" )
- t.is( hostinfo.sshurl(), "git+ssh://git@bitbucket.org/111/222.git" + hash, label + " -> sshurl" )
- t.is( (""+hostinfo), "git+ssh://git@bitbucket.org/111/222.git" + hash, label + " -> stringify" )
- t.is( hostinfo.file("C"), "https://bitbucket.org/111/222/raw/"+(branch||"master")+"/C", label + " -> file" )
+ if (!hostinfo) return
+ t.is(hostinfo.https(), 'git+https://bitbucket.org/111/222.git' + hash, label + ' -> https')
+ t.is(hostinfo.browse(), 'https://bitbucket.org/111/222' + (branch ? '/src/' + branch : ''), label + ' -> browse')
+ t.is(hostinfo.docs(), 'https://bitbucket.org/111/222' + (branch ? '/src/' + branch : '') + '#readme', label + ' -> docs')
+ t.is(hostinfo.ssh(), 'git@bitbucket.org:111/222.git' + hash, label + ' -> ssh')
+ t.is(hostinfo.sshurl(), 'git+ssh://git@bitbucket.org/111/222.git' + hash, label + ' -> sshurl')
+ t.is(hostinfo.shortcut(), 'bitbucket:111/222' + hash, label + ' -> shortcut')
+ t.is(hostinfo.file('C'), 'https://bitbucket.org/111/222/raw/' + (branch || 'master') + '/C', label + ' -> file')
}
- require('./lib/standard-tests')(verify, "bitbucket.org", "bitbucket")
+ require('./lib/standard-tests')(verify, 'bitbucket.org', 'bitbucket')
t.end()
})
diff --git a/deps/npm/node_modules/hosted-git-info/test/gist.js b/deps/npm/node_modules/hosted-git-info/test/gist.js
index 3081c3db42..cf36d3c8dd 100644
--- a/deps/npm/node_modules/hosted-git-info/test/gist.js
+++ b/deps/npm/node_modules/hosted-git-info/test/gist.js
@@ -1,39 +1,41 @@
-"use strict"
-var HostedGit = require("../index")
-var test = require("tap").test
+'use strict'
+var HostedGit = require('../index')
+var test = require('tap').test
-
-test("fromUrl(gist url)", function (t) {
- function verify(host, label, branch) {
+test('fromUrl(gist url)', function (t) {
+ function verify (host, label, branch) {
var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? "#" + branch : ""
+ var hash = branch ? '#' + branch : ''
t.ok(hostinfo, label)
- if (! hostinfo) return
- t.is( hostinfo.https(), "https://gist.github.com/222.git" + hash, label + " -> https" )
- t.is( hostinfo.git(), "git://gist.github.com/222.git" + hash, label + " -> git" )
- t.is( hostinfo.browse(), "https://gist.github.com/222" + (branch ? "/" + branch : ""), label + " -> browse" )
- t.is( hostinfo.bugs(), "https://gist.github.com/222", label + " -> bugs" )
- t.is( hostinfo.docs(), "https://gist.github.com/222" + (branch ? "/" + branch : ""), label + " -> docs" )
- t.is( hostinfo.ssh(), "git@gist.github.com:/222.git" + hash, label + " -> ssh" )
- t.is( hostinfo.sshurl(), "git+ssh://git@gist.github.com/222.git" + hash, label + " -> sshurl" )
- t.is( (""+hostinfo), "git+ssh://git@gist.github.com/222.git" + hash, label + " -> stringify" )
+ if (!hostinfo) return
+ t.is(hostinfo.https(), 'git+https://gist.github.com/222.git' + hash, label + ' -> https')
+ t.is(hostinfo.git(), 'git://gist.github.com/222.git' + hash, label + ' -> git')
+ t.is(hostinfo.browse(), 'https://gist.github.com/222' + (branch ? '/' + branch : ''), label + ' -> browse')
+ t.is(hostinfo.bugs(), 'https://gist.github.com/222', label + ' -> bugs')
+ t.is(hostinfo.docs(), 'https://gist.github.com/222' + (branch ? '/' + branch : ''), label + ' -> docs')
+ t.is(hostinfo.ssh(), 'git@gist.github.com:/222.git' + hash, label + ' -> ssh')
+ t.is(hostinfo.sshurl(), 'git+ssh://git@gist.github.com/222.git' + hash, label + ' -> sshurl')
+ t.is(hostinfo.shortcut(), 'gist:222' + hash, label + ' -> shortcut')
if (hostinfo.user) {
- t.is( hostinfo.file("C"), "https://gist.githubusercontent.com/111/222/raw/"+(branch?branch+"/":"")+"C", label + " -> file" )
+ t.is(hostinfo.file('C'), 'https://gist.githubusercontent.com/111/222/raw/' + (branch ? branch + '/' : '') + 'C', label + ' -> file')
}
}
- verify("git@gist.github.com:222.git", "git@")
- var hostinfo = HostedGit.fromUrl("git@gist.github.com:/ef860c7z5e0de3179341.git")
- if (t.ok(hostinfo, "git@hex")) {
- t.is( hostinfo.https(), "https://gist.github.com/ef860c7z5e0de3179341.git", "git@hex -> https" )
+ verify('git@gist.github.com:222.git', 'git@')
+ var hostinfo = HostedGit.fromUrl('git@gist.github.com:/ef860c7z5e0de3179341.git')
+ if (t.ok(hostinfo, 'git@hex')) {
+ t.is(hostinfo.https(), 'git+https://gist.github.com/ef860c7z5e0de3179341.git', 'git@hex -> https')
}
- verify("git@gist.github.com:/222.git", "git@/")
- verify("git://gist.github.com/222", "git")
- verify("git://gist.github.com/222.git", "git.git")
- verify("git://gist.github.com/222#branch", "git#branch", "branch")
- verify("git://gist.github.com/222.git#branch", "git.git#branch", "branch")
+ verify('git@gist.github.com:/222.git', 'git@/')
+ verify('git://gist.github.com/222', 'git')
+ verify('git://gist.github.com/222.git', 'git.git')
+ verify('git://gist.github.com/222#branch', 'git#branch', 'branch')
+ verify('git://gist.github.com/222.git#branch', 'git.git#branch', 'branch')
+
+ require('./lib/standard-tests')(verify, 'gist.github.com', 'gist')
- require('./lib/standard-tests')(verify, "gist.github.com", "gist")
+ verify(HostedGit.fromUrl('gist:111/222').toString(), 'round-tripped shortcut')
+ verify('gist:222', 'shortened shortcut')
t.end()
})
diff --git a/deps/npm/node_modules/hosted-git-info/test/github.js b/deps/npm/node_modules/hosted-git-info/test/github.js
index 1b945d26c3..56098a3e39 100644
--- a/deps/npm/node_modules/hosted-git-info/test/github.js
+++ b/deps/npm/node_modules/hosted-git-info/test/github.js
@@ -1,41 +1,40 @@
-"use strict"
-var HostedGit = require("../index")
-var test = require("tap").test
+'use strict'
+var HostedGit = require('../index')
+var test = require('tap').test
-
-test("fromUrl(github url)", function (t) {
- function verify(host, label, branch) {
+test('fromUrl(github url)', function (t) {
+ function verify (host, label, branch) {
var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? "#" + branch : ""
+ var hash = branch ? '#' + branch : ''
t.ok(hostinfo, label)
- if (! hostinfo) return
- t.is( hostinfo.https(), "https://github.com/111/222.git" + hash, label + " -> https" )
- t.is( hostinfo.git(), "git://github.com/111/222.git" + hash, label + " -> git" )
- t.is( hostinfo.browse(), "https://github.com/111/222" + (branch ? "/tree/" + branch : ""), label + " -> browse" )
- t.is( hostinfo.bugs(), "https://github.com/111/222/issues", label + " -> bugs" )
- t.is( hostinfo.docs(), "https://github.com/111/222" + (branch ? "/tree/" + branch : "") + "#readme", label + " -> docs" )
- t.is( hostinfo.ssh(), "git@github.com:111/222.git" + hash, label + " -> ssh" )
- t.is( hostinfo.sshurl(), "git+ssh://git@github.com/111/222.git" + hash, label + " -> sshurl" )
- t.is( (""+hostinfo), "git+ssh://git@github.com/111/222.git" + hash, label + " -> stringify" )
- t.is( hostinfo.file("C"), "https://raw.githubusercontent.com/111/222/"+(branch||"master")+"/C", label + " -> file" )
+ if (!hostinfo) return
+ t.is(hostinfo.https(), 'git+https://github.com/111/222.git' + hash, label + ' -> https')
+ t.is(hostinfo.git(), 'git://github.com/111/222.git' + hash, label + ' -> git')
+ t.is(hostinfo.browse(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : ''), label + ' -> browse')
+ t.is(hostinfo.bugs(), 'https://github.com/111/222/issues', label + ' -> bugs')
+ t.is(hostinfo.docs(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : '') + '#readme', label + ' -> docs')
+ t.is(hostinfo.ssh(), 'git@github.com:111/222.git' + hash, label + ' -> ssh')
+ t.is(hostinfo.sshurl(), 'git+ssh://git@github.com/111/222.git' + hash, label + ' -> sshurl')
+ t.is(hostinfo.shortcut(), 'github:111/222' + hash, label + ' -> shortcut')
+ t.is(hostinfo.file('C'), 'https://raw.githubusercontent.com/111/222/' + (branch || 'master') + '/C', label + ' -> file')
}
// github shorturls
- verify("111/222", "github-short")
- verify("111/222#branch", "github-short#branch", "branch")
+ verify('111/222', 'github-short')
+ verify('111/222#branch', 'github-short#branch', 'branch')
// insecure protocols
- verify("git://github.com/111/222", "git")
- verify("git://github.com/111/222.git", "git.git")
- verify("git://github.com/111/222#branch", "git#branch", "branch")
- verify("git://github.com/111/222.git#branch", "git.git#branch", "branch")
+ verify('git://github.com/111/222', 'git')
+ verify('git://github.com/111/222.git', 'git.git')
+ verify('git://github.com/111/222#branch', 'git#branch', 'branch')
+ verify('git://github.com/111/222.git#branch', 'git.git#branch', 'branch')
- verify("http://github.com/111/222", "http")
- verify("http://github.com/111/222.git", "http.git")
- verify("http://github.com/111/222#branch", "http#branch", "branch")
- verify("http://github.com/111/222.git#branch", "http.git#branch", "branch")
+ verify('http://github.com/111/222', 'http')
+ verify('http://github.com/111/222.git', 'http.git')
+ verify('http://github.com/111/222#branch', 'http#branch', 'branch')
+ verify('http://github.com/111/222.git#branch', 'http.git#branch', 'branch')
- require('./lib/standard-tests')(verify, "github.com", "github")
+ require('./lib/standard-tests')(verify, 'github.com', 'github')
t.end()
})
diff --git a/deps/npm/node_modules/hosted-git-info/test/gitlab.js b/deps/npm/node_modules/hosted-git-info/test/gitlab.js
index 1b25d60c7d..315c9085bd 100644
--- a/deps/npm/node_modules/hosted-git-info/test/gitlab.js
+++ b/deps/npm/node_modules/hosted-git-info/test/gitlab.js
@@ -1,24 +1,23 @@
-"use strict"
-var HostedGit = require("../index")
-var test = require("tap").test
+'use strict'
+var HostedGit = require('../index')
+var test = require('tap').test
-
-test("fromUrl(gitlab url)", function (t) {
- function verify(host, label, branch) {
+test('fromUrl(gitlab url)', function (t) {
+ function verify (host, label, branch) {
var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? "#" + branch : ""
+ var hash = branch ? '#' + branch : ''
t.ok(hostinfo, label)
- if (! hostinfo) return
- t.is( hostinfo.https(), "https://gitlab.com/111/222.git" + hash, label + " -> https" )
- t.is( hostinfo.browse(), "https://gitlab.com/111/222" + (branch ? "/tree/" + branch : ""), label + " -> browse" )
- t.is( hostinfo.docs(), "https://gitlab.com/111/222" + (branch ? "/tree/" + branch : "") + "#README", label + " -> docs" )
- t.is( hostinfo.ssh(), "git@gitlab.com:111/222.git" + hash, label + " -> ssh" )
- t.is( hostinfo.sshurl(), "git+ssh://git@gitlab.com/111/222.git" + hash, label + " -> sshurl" )
- t.is( (""+hostinfo), "git+ssh://git@gitlab.com/111/222.git" + hash, label + " -> stringify" )
- t.is( hostinfo.file("C"), "https://gitlab.com/111/222/raw/"+(branch||"master")+"/C", label + " -> file" )
+ if (!hostinfo) return
+ t.is(hostinfo.https(), 'git+https://gitlab.com/111/222.git' + hash, label + ' -> https')
+ t.is(hostinfo.browse(), 'https://gitlab.com/111/222' + (branch ? '/tree/' + branch : ''), label + ' -> browse')
+ t.is(hostinfo.docs(), 'https://gitlab.com/111/222' + (branch ? '/tree/' + branch : '') + '#README', label + ' -> docs')
+ t.is(hostinfo.ssh(), 'git@gitlab.com:111/222.git' + hash, label + ' -> ssh')
+ t.is(hostinfo.sshurl(), 'git+ssh://git@gitlab.com/111/222.git' + hash, label + ' -> sshurl')
+ t.is(hostinfo.shortcut(), 'gitlab:111/222' + hash, label + ' -> shortcut')
+ t.is(hostinfo.file('C'), 'https://gitlab.com/111/222/raw/' + (branch || 'master') + '/C', label + ' -> file')
}
- require('./lib/standard-tests')(verify, "gitlab.com", "gitlab")
+ require('./lib/standard-tests')(verify, 'gitlab.com', 'gitlab')
t.end()
})
diff --git a/deps/npm/node_modules/hosted-git-info/test/https-with-inline-auth.js b/deps/npm/node_modules/hosted-git-info/test/https-with-inline-auth.js
new file mode 100644
index 0000000000..5e2f5b5a38
--- /dev/null
+++ b/deps/npm/node_modules/hosted-git-info/test/https-with-inline-auth.js
@@ -0,0 +1,39 @@
+'use strict'
+var HostedGit = require('../index')
+var test = require('tap').test
+
+test('HTTPS GitHub URL with embedded auth -- generally not a good idea', function (t) {
+ function verify (host, label, branch) {
+ var hostinfo = HostedGit.fromUrl(host)
+ var hash = branch ? '#' + branch : ''
+ t.ok(hostinfo, label)
+ if (!hostinfo) return
+ t.is(hostinfo.https(), 'git+https://user:pass@github.com/111/222.git' + hash, label + ' -> https')
+ t.is(hostinfo.git(), 'git://user:pass@github.com/111/222.git' + hash, label + ' -> git')
+ t.is(hostinfo.browse(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : ''), label + ' -> browse')
+ t.is(hostinfo.bugs(), 'https://github.com/111/222/issues', label + ' -> bugs')
+ t.is(hostinfo.docs(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : '') + '#readme', label + ' -> docs')
+ t.is(hostinfo.ssh(), 'git@github.com:111/222.git' + hash, label + ' -> ssh')
+ t.is(hostinfo.sshurl(), 'git+ssh://git@github.com/111/222.git' + hash, label + ' -> sshurl')
+ t.is(hostinfo.shortcut(), 'github:111/222' + hash, label + ' -> shortcut')
+ t.is(hostinfo.file('C'), 'https://user:pass@raw.githubusercontent.com/111/222/' + (branch || 'master') + '/C', label + ' -> file')
+ }
+
+ // insecure protocols
+ verify('git://user:pass@github.com/111/222', 'git')
+ verify('git://user:pass@github.com/111/222.git', 'git.git')
+ verify('git://user:pass@github.com/111/222#branch', 'git#branch', 'branch')
+ verify('git://user:pass@github.com/111/222.git#branch', 'git.git#branch', 'branch')
+
+ verify('https://user:pass@github.com/111/222', 'https')
+ verify('https://user:pass@github.com/111/222.git', 'https.git')
+ verify('https://user:pass@github.com/111/222#branch', 'https#branch', 'branch')
+ verify('https://user:pass@github.com/111/222.git#branch', 'https.git#branch', 'branch')
+
+ verify('http://user:pass@github.com/111/222', 'http')
+ verify('http://user:pass@github.com/111/222.git', 'http.git')
+ verify('http://user:pass@github.com/111/222#branch', 'http#branch', 'branch')
+ verify('http://user:pass@github.com/111/222.git#branch', 'http.git#branch', 'branch')
+
+ t.end()
+})
diff --git a/deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js b/deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js
index c505342fa0..929fcca42e 100644
--- a/deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js
+++ b/deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js
@@ -1,28 +1,27 @@
-"use strict"
+'use strict'
module.exports = function (verify, domain, shortname) {
- verify("https://" + domain + "/111/222", "https")
- verify("https://" + domain + "/111/222.git", "https.git")
- verify("https://" + domain + "/111/222#branch", "https#branch", "branch")
- verify("https://" + domain + "/111/222.git#branch", "https.git#branch", "branch")
+ verify('https://' + domain + '/111/222', 'https')
+ verify('https://' + domain + '/111/222.git', 'https.git')
+ verify('https://' + domain + '/111/222#branch', 'https#branch', 'branch')
+ verify('https://' + domain + '/111/222.git#branch', 'https.git#branch', 'branch')
- verify("git+https://" + domain + "/111/222", "git+https")
- verify("git+https://" + domain + "/111/222.git", "git+https.git")
- verify("git+https://" + domain + "/111/222#branch", "git+https#branch", "branch")
- verify("git+https://" + domain + "/111/222.git#branch", "git+https.git#branch", "branch")
+ verify('git+https://' + domain + '/111/222', 'git+https')
+ verify('git+https://' + domain + '/111/222.git', 'git+https.git')
+ verify('git+https://' + domain + '/111/222#branch', 'git+https#branch', 'branch')
+ verify('git+https://' + domain + '/111/222.git#branch', 'git+https.git#branch', 'branch')
- verify("git@" + domain + ":111/222", "ssh")
- verify("git@" + domain + ":111/222.git", "ssh.git")
- verify("git@" + domain + ":111/222#branch", "ssh", "branch")
- verify("git@" + domain + ":111/222.git#branch", "ssh.git", "branch")
+ verify('git@' + domain + ':111/222', 'ssh')
+ verify('git@' + domain + ':111/222.git', 'ssh.git')
+ verify('git@' + domain + ':111/222#branch', 'ssh', 'branch')
+ verify('git@' + domain + ':111/222.git#branch', 'ssh.git', 'branch')
+ verify('git+ssh://git@' + domain + '/111/222', 'ssh url')
+ verify('git+ssh://git@' + domain + '/111/222.git', 'ssh url.git')
+ verify('git+ssh://git@' + domain + '/111/222#branch', 'ssh url#branch', 'branch')
+ verify('git+ssh://git@' + domain + '/111/222.git#branch', 'ssh url.git#branch', 'branch')
- verify("git+ssh://git@" + domain + "/111/222", "ssh url")
- verify("git+ssh://git@" + domain + "/111/222.git", "ssh url.git")
- verify("git+ssh://git@" + domain + "/111/222#branch", "ssh url#branch", "branch")
- verify("git+ssh://git@" + domain + "/111/222.git#branch", "ssh url.git#branch", "branch")
-
- verify(shortname + ":111/222", "shortcut")
- verify(shortname + ":111/222.git", "shortcut.git")
- verify(shortname + ":111/222#branch", "shortcut#branch", "branch")
- verify(shortname + ":111/222.git#branch", "shortcut.git#branch", "branch")
+ verify(shortname + ':111/222', 'shortcut')
+ verify(shortname + ':111/222.git', 'shortcut.git')
+ verify(shortname + ':111/222#branch', 'shortcut#branch', 'branch')
+ verify(shortname + ':111/222.git#branch', 'shortcut.git#branch', 'branch')
}
diff --git a/deps/npm/node_modules/inflight/.eslintrc b/deps/npm/node_modules/inflight/.eslintrc
deleted file mode 100644
index b7a1550efc..0000000000
--- a/deps/npm/node_modules/inflight/.eslintrc
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "env" : {
- "node" : true
- },
- "rules" : {
- "semi": [2, "never"],
- "strict": 0,
- "quotes": [1, "single", "avoid-escape"],
- "no-use-before-define": 0,
- "curly": 0,
- "no-underscore-dangle": 0,
- "no-lonely-if": 1,
- "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}],
- "no-mixed-requires": 0,
- "space-infix-ops": 0
- }
-}
diff --git a/deps/npm/node_modules/init-package-json/.travis.yml b/deps/npm/node_modules/init-package-json/.travis.yml
new file mode 100644
index 0000000000..05d299e676
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.11"
diff --git a/deps/npm/node_modules/init-package-json/README.md b/deps/npm/node_modules/init-package-json/README.md
index 3bdd35f6aa..2cc79c4bf7 100644
--- a/deps/npm/node_modules/init-package-json/README.md
+++ b/deps/npm/node_modules/init-package-json/README.md
@@ -2,6 +2,8 @@
A node module to get your node module started.
+[![Build Status](https://secure.travis-ci.org/npm/init-package-json.svg)](http://travis-ci.org/npm/init-package-json)
+
## Usage
```javascript
diff --git a/deps/npm/node_modules/init-package-json/default-input.js b/deps/npm/node_modules/init-package-json/default-input.js
index 95c799ebb7..3af2f62af1 100644
--- a/deps/npm/node_modules/init-package-json/default-input.js
+++ b/deps/npm/node_modules/init-package-json/default-input.js
@@ -1,6 +1,8 @@
var fs = require('fs')
-var path = require('path')
var glob = require('glob')
+var path = require('path')
+var validateName = require('validate-npm-package-name')
+var npa = require('npm-package-arg')
// more popular packages should go here, maybe?
function isTestPkg (p) {
@@ -39,10 +41,23 @@ function readDeps (test) { return function (cb) {
}}
var name = package.name || basename
-if (config.get('scope')) {
- name = '@' + config.get('scope') + '/' + name
+var spec = npa(name)
+var scope = config.get('scope')
+if (scope) {
+ if (scope.charAt(0) !== '@') scope = '@' + scope
+ if (spec.scope) {
+ name = scope + '/' + spec.name.split('/')[1]
+ } else {
+ name = scope + '/' + name
+ }
}
-exports.name = yes ? name : prompt('name', name)
+exports.name = yes ? name : prompt('name', name, function (data) {
+ var its = validateName(data)
+ if (its.validForNewPackages) return data
+ var er = new Error('Sorry, ' + its.errors.join(' and ') + '.')
+ er.notValid = true
+ return er
+})
var version = package.version ||
config.get('init.version') ||
@@ -193,7 +208,7 @@ if (!package.author) {
"url" : config.get('init.author.url') ||
config.get('init-author-url')
}
- : prompt('author')
+ : yes ? '' : prompt('author')
}
var license = package.license ||
diff --git a/deps/npm/node_modules/init-package-json/init-package-json.js b/deps/npm/node_modules/init-package-json/init-package-json.js
index cac761c39e..5e50e71274 100644
--- a/deps/npm/node_modules/init-package-json/init-package-json.js
+++ b/deps/npm/node_modules/init-package-json/init-package-json.js
@@ -98,6 +98,11 @@ function init (dir, input, config, cb) {
if (!pkg.repository)
delete pkg.repository
+ // readJson filters out empty descriptions, but init-package-json
+ // traditionally leaves them alone
+ if (!pkg.description)
+ pkg.description = data.description
+
var d = JSON.stringify(pkg, null, 2) + '\n'
function write (yes) {
fs.writeFile(package, d, 'utf8', function (er) {
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/LICENSE b/deps/npm/node_modules/init-package-json/node_modules/glob/LICENSE
deleted file mode 100644
index 19129e315f..0000000000
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/README.md b/deps/npm/node_modules/init-package-json/node_modules/glob/README.md
deleted file mode 100644
index 258257ecb1..0000000000
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/README.md
+++ /dev/null
@@ -1,369 +0,0 @@
-[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)
-
-# Glob
-
-Match files using the patterns the shell uses, like stars and stuff.
-
-This is a glob implementation in JavaScript. It uses the `minimatch`
-library to do its matching.
-
-![](oh-my-glob.gif)
-
-## Usage
-
-```javascript
-var glob = require("glob")
-
-// options is optional
-glob("**/*.js", options, function (er, files) {
- // files is an array of filenames.
- // If the `nonull` option is set, and nothing
- // was found, then files is ["**/*.js"]
- // er is an error object or null.
-})
-```
-
-## Glob Primer
-
-"Globs" are the patterns you type when you do stuff like `ls *.js` on
-the command line, or put `build/*` in a `.gitignore` file.
-
-Before parsing the path part patterns, braced sections are expanded
-into a set. Braced sections start with `{` and end with `}`, with any
-number of comma-delimited sections within. Braced sections may contain
-slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.
-
-The following characters have special magic meaning when used in a
-path portion:
-
-* `*` Matches 0 or more characters in a single path portion
-* `?` Matches 1 character
-* `[...]` Matches a range of characters, similar to a RegExp range.
- If the first character of the range is `!` or `^` then it matches
- any character not in the range.
-* `!(pattern|pattern|pattern)` Matches anything that does not match
- any of the patterns provided.
-* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the
- patterns provided.
-* `+(pattern|pattern|pattern)` Matches one or more occurrences of the
- patterns provided.
-* `*(a|b|c)` Matches zero or more occurrences of the patterns provided
-* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
- provided
-* `**` If a "globstar" is alone in a path portion, then it matches
- zero or more directories and subdirectories searching for matches.
- It does not crawl symlinked directories.
-
-### Dots
-
-If a file or directory path portion has a `.` as the first character,
-then it will not match any glob pattern unless that pattern's
-corresponding path part also has a `.` as its first character.
-
-For example, the pattern `a/.*/c` would match the file at `a/.b/c`.
-However the pattern `a/*/c` would not, because `*` does not start with
-a dot character.
-
-You can make glob treat dots as normal characters by setting
-`dot:true` in the options.
-
-### Basename Matching
-
-If you set `matchBase:true` in the options, and the pattern has no
-slashes in it, then it will seek for any file anywhere in the tree
-with a matching basename. For example, `*.js` would match
-`test/simple/basic.js`.
-
-### Negation
-
-The intent for negation would be for a pattern starting with `!` to
-match everything that *doesn't* match the supplied pattern. However,
-the implementation is weird, and for the time being, this should be
-avoided. The behavior will change or be deprecated in version 5.
-
-### Empty Sets
-
-If no matching files are found, then an empty array is returned. This
-differs from the shell, where the pattern itself is returned. For
-example:
-
- $ echo a*s*d*f
- a*s*d*f
-
-To get the bash-style behavior, set the `nonull:true` in the options.
-
-### See Also:
-
-* `man sh`
-* `man bash` (Search for "Pattern Matching")
-* `man 3 fnmatch`
-* `man 5 gitignore`
-* [minimatch documentation](https://github.com/isaacs/minimatch)
-
-## glob.hasMagic(pattern, [options])
-
-Returns `true` if there are any special characters in the pattern, and
-`false` otherwise.
-
-Note that the options affect the results. If `noext:true` is set in
-the options object, then `+(a|b)` will not be considered a magic
-pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`
-then that is considered magical, unless `nobrace:true` is set in the
-options.
-
-## glob(pattern, [options], cb)
-
-* `pattern` {String} Pattern to be matched
-* `options` {Object}
-* `cb` {Function}
- * `err` {Error | null}
- * `matches` {Array<String>} filenames found matching the pattern
-
-Perform an asynchronous glob search.
-
-## glob.sync(pattern, [options])
-
-* `pattern` {String} Pattern to be matched
-* `options` {Object}
-* return: {Array<String>} filenames found matching the pattern
-
-Perform a synchronous glob search.
-
-## Class: glob.Glob
-
-Create a Glob object by instantiating the `glob.Glob` class.
-
-```javascript
-var Glob = require("glob").Glob
-var mg = new Glob(pattern, options, cb)
-```
-
-It's an EventEmitter, and starts walking the filesystem to find matches
-immediately.
-
-### new glob.Glob(pattern, [options], [cb])
-
-* `pattern` {String} pattern to search for
-* `options` {Object}
-* `cb` {Function} Called when an error occurs, or matches are found
- * `err` {Error | null}
- * `matches` {Array<String>} filenames found matching the pattern
-
-Note that if the `sync` flag is set in the options, then matches will
-be immediately available on the `g.found` member.
-
-### Properties
-
-* `minimatch` The minimatch object that the glob uses.
-* `options` The options object passed in.
-* `aborted` Boolean which is set to true when calling `abort()`. There
- is no way at this time to continue a glob search after aborting, but
- you can re-use the statCache to avoid having to duplicate syscalls.
-* `statCache` Collection of all the stat results the glob search
- performed.
-* `cache` Convenience object. Each field has the following possible
- values:
- * `false` - Path does not exist
- * `true` - Path exists
- * `'DIR'` - Path exists, and is not a directory
- * `'FILE'` - Path exists, and is a directory
- * `[file, entries, ...]` - Path exists, is a directory, and the
- array value is the results of `fs.readdir`
-* `statCache` Cache of `fs.stat` results, to prevent statting the same
- path multiple times.
-* `symlinks` A record of which paths are symbolic links, which is
- relevant in resolving `**` patterns.
-* `realpathCache` An optional object which is passed to `fs.realpath`
- to minimize unnecessary syscalls. It is stored on the instantiated
- Glob object, and may be re-used.
-
-### Events
-
-* `end` When the matching is finished, this is emitted with all the
- matches found. If the `nonull` option is set, and no match was found,
- then the `matches` list contains the original pattern. The matches
- are sorted, unless the `nosort` flag is set.
-* `match` Every time a match is found, this is emitted with the matched.
-* `error` Emitted when an unexpected error is encountered, or whenever
- any fs error occurs if `options.strict` is set.
-* `abort` When `abort()` is called, this event is raised.
-
-### Methods
-
-* `pause` Temporarily stop the search
-* `resume` Resume the search
-* `abort` Stop the search forever
-
-### Options
-
-All the options that can be passed to Minimatch can also be passed to
-Glob to change pattern matching behavior. Also, some have been added,
-or have glob-specific ramifications.
-
-All options are false by default, unless otherwise noted.
-
-All options are added to the Glob object, as well.
-
-If you are running many `glob` operations, you can pass a Glob object
-as the `options` argument to a subsequent operation to shortcut some
-`stat` and `readdir` calls. At the very least, you may pass in shared
-`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that
-parallel glob operations will be sped up by sharing information about
-the filesystem.
-
-* `cwd` The current working directory in which to search. Defaults
- to `process.cwd()`.
-* `root` The place where patterns starting with `/` will be mounted
- onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
- systems, and `C:\` or some such on Windows.)
-* `dot` Include `.dot` files in normal matches and `globstar` matches.
- Note that an explicit dot in a portion of the pattern will always
- match dot files.
-* `nomount` By default, a pattern starting with a forward-slash will be
- "mounted" onto the root setting, so that a valid filesystem path is
- returned. Set this flag to disable that behavior.
-* `mark` Add a `/` character to directory matches. Note that this
- requires additional stat calls.
-* `nosort` Don't sort the results.
-* `stat` Set to true to stat *all* results. This reduces performance
- somewhat, and is completely unnecessary, unless `readdir` is presumed
- to be an untrustworthy indicator of file existence.
-* `silent` When an unusual error is encountered when attempting to
- read a directory, a warning will be printed to stderr. Set the
- `silent` option to true to suppress these warnings.
-* `strict` When an unusual error is encountered when attempting to
- read a directory, the process will just continue on in search of
- other matches. Set the `strict` option to raise an error in these
- cases.
-* `cache` See `cache` property above. Pass in a previously generated
- cache object to save some fs calls.
-* `statCache` A cache of results of filesystem information, to prevent
- unnecessary stat calls. While it should not normally be necessary
- to set this, you may pass the statCache from one glob() call to the
- options object of another, if you know that the filesystem will not
- change between calls. (See "Race Conditions" below.)
-* `symlinks` A cache of known symbolic links. You may pass in a
- previously generated `symlinks` object to save `lstat` calls when
- resolving `**` matches.
-* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.
-* `nounique` In some cases, brace-expanded patterns can result in the
- same file showing up multiple times in the result set. By default,
- this implementation prevents duplicates in the result set. Set this
- flag to disable that behavior.
-* `nonull` Set to never return an empty set, instead returning a set
- containing the pattern itself. This is the default in glob(3).
-* `debug` Set to enable debug logging in minimatch and glob.
-* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
-* `noglobstar` Do not match `**` against multiple filenames. (Ie,
- treat it as a normal `*` instead.)
-* `noext` Do not match `+(a|b)` "extglob" patterns.
-* `nocase` Perform a case-insensitive match. Note: on
- case-insensitive filesystems, non-magic patterns will match by
- default, since `stat` and `readdir` will not raise errors.
-* `matchBase` Perform a basename-only match if the pattern does not
- contain any slash characters. That is, `*.js` would be treated as
- equivalent to `**/*.js`, matching all js files in all directories.
-* `nonegate` Suppress `negate` behavior. (See below.)
-* `nocomment` Suppress `comment` behavior. (See below.)
-* `nonull` Return the pattern when no matches are found.
-* `nodir` Do not match directories, only files. (Note: to match
- *only* directories, simply put a `/` at the end of the pattern.)
-* `ignore` Add a pattern or an array of patterns to exclude matches.
-* `follow` Follow symlinked directories when expanding `**` patterns.
- Note that this can result in a lot of duplicate references in the
- presence of cyclic links.
-* `realpath` Set to true to call `fs.realpath` on all of the results.
- In the case of a symlink that cannot be resolved, the full absolute
- path to the matched entry is returned (though it will usually be a
- broken symlink)
-
-## Comparisons to other fnmatch/glob implementations
-
-While strict compliance with the existing standards is a worthwhile
-goal, some discrepancies exist between node-glob and other
-implementations, and are intentional.
-
-If the pattern starts with a `!` character, then it is negated. Set the
-`nonegate` flag to suppress this behavior, and treat leading `!`
-characters normally. This is perhaps relevant if you wish to start the
-pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
-characters at the start of a pattern will negate the pattern multiple
-times.
-
-If a pattern starts with `#`, then it is treated as a comment, and
-will not match anything. Use `\#` to match a literal `#` at the
-start of a line, or set the `nocomment` flag to suppress this behavior.
-
-The double-star character `**` is supported by default, unless the
-`noglobstar` flag is set. This is supported in the manner of bsdglob
-and bash 4.3, where `**` only has special significance if it is the only
-thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
-`a/**b` will not.
-
-Note that symlinked directories are not crawled as part of a `**`,
-though their contents may match against subsequent portions of the
-pattern. This prevents infinite loops and duplicates and the like.
-
-If an escaped pattern has no matches, and the `nonull` flag is set,
-then glob returns the pattern as-provided, rather than
-interpreting the character escapes. For example,
-`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
-`"*a?"`. This is akin to setting the `nullglob` option in bash, except
-that it does not resolve escaped pattern characters.
-
-If brace expansion is not disabled, then it is performed before any
-other interpretation of the glob pattern. Thus, a pattern like
-`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
-**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
-checked for validity. Since those two are valid, matching proceeds.
-
-## Windows
-
-**Please only use forward-slashes in glob expressions.**
-
-Though windows uses either `/` or `\` as its path separator, only `/`
-characters are used by this glob implementation. You must use
-forward-slashes **only** in glob expressions. Back-slashes will always
-be interpreted as escape characters, not path separators.
-
-Results from absolute patterns such as `/foo/*` are mounted onto the
-root setting using `path.join`. On windows, this will by default result
-in `/foo/*` matching `C:\foo\bar.txt`.
-
-## Race Conditions
-
-Glob searching, by its very nature, is susceptible to race conditions,
-since it relies on directory walking and such.
-
-As a result, it is possible that a file that exists when glob looks for
-it may have been deleted or modified by the time it returns the result.
-
-As part of its internal implementation, this program caches all stat
-and readdir calls that it makes, in order to cut down on system
-overhead. However, this also makes it even more susceptible to races,
-especially if the cache or statCache objects are reused between glob
-calls.
-
-Users are thus advised not to use a glob result as a guarantee of
-filesystem state in the face of rapid changes. For the vast majority
-of operations, this is never a problem.
-
-## Contributing
-
-Any change to behavior (including bugfixes) must come with a test.
-
-Patches that fail tests or reduce performance will be rejected.
-
-```
-# to run tests
-npm test
-
-# to re-generate test fixtures
-npm run test-regen
-
-# to benchmark against bash/zsh
-npm run bench
-
-# to profile javascript
-npm run prof
-```
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/common.js b/deps/npm/node_modules/init-package-json/node_modules/glob/common.js
deleted file mode 100644
index cd7c824481..0000000000
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/common.js
+++ /dev/null
@@ -1,237 +0,0 @@
-exports.alphasort = alphasort
-exports.alphasorti = alphasorti
-exports.isAbsolute = process.platform === "win32" ? absWin : absUnix
-exports.setopts = setopts
-exports.ownProp = ownProp
-exports.makeAbs = makeAbs
-exports.finish = finish
-exports.mark = mark
-exports.isIgnored = isIgnored
-exports.childrenIgnored = childrenIgnored
-
-function ownProp (obj, field) {
- return Object.prototype.hasOwnProperty.call(obj, field)
-}
-
-var path = require("path")
-var minimatch = require("minimatch")
-var Minimatch = minimatch.Minimatch
-
-function absWin (p) {
- if (absUnix(p)) return true
- // pull off the device/UNC bit from a windows path.
- // from node's lib/path.js
- var splitDeviceRe =
- /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/
- var result = splitDeviceRe.exec(p)
- var device = result[1] || ''
- var isUnc = device && device.charAt(1) !== ':'
- var isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
-
- return isAbsolute
-}
-
-function absUnix (p) {
- return p.charAt(0) === "/" || p === ""
-}
-
-function alphasorti (a, b) {
- return a.toLowerCase().localeCompare(b.toLowerCase())
-}
-
-function alphasort (a, b) {
- return a.localeCompare(b)
-}
-
-function setupIgnores (self, options) {
- self.ignore = options.ignore || []
-
- if (!Array.isArray(self.ignore))
- self.ignore = [self.ignore]
-
- if (self.ignore.length) {
- self.ignore = self.ignore.map(ignoreMap)
- }
-}
-
-function ignoreMap (pattern) {
- var gmatcher = null
- if (pattern.slice(-3) === '/**') {
- var gpattern = pattern.replace(/(\/\*\*)+$/, '')
- gmatcher = new Minimatch(gpattern, { nonegate: true })
- }
-
- return {
- matcher: new Minimatch(pattern, { nonegate: true }),
- gmatcher: gmatcher
- }
-}
-
-function setopts (self, pattern, options) {
- if (!options)
- options = {}
-
- // base-matching: just use globstar for that.
- if (options.matchBase && -1 === pattern.indexOf("/")) {
- if (options.noglobstar) {
- throw new Error("base matching requires globstar")
- }
- pattern = "**/" + pattern
- }
-
- self.pattern = pattern
- self.strict = options.strict !== false
- self.realpath = !!options.realpath
- self.realpathCache = options.realpathCache || Object.create(null)
- self.follow = !!options.follow
- self.dot = !!options.dot
- self.mark = !!options.mark
- self.nodir = !!options.nodir
- if (self.nodir)
- self.mark = true
- self.sync = !!options.sync
- self.nounique = !!options.nounique
- self.nonull = !!options.nonull
- self.nosort = !!options.nosort
- self.nocase = !!options.nocase
- self.stat = !!options.stat
- self.noprocess = !!options.noprocess
-
- self.maxLength = options.maxLength || Infinity
- self.cache = options.cache || Object.create(null)
- self.statCache = options.statCache || Object.create(null)
- self.symlinks = options.symlinks || Object.create(null)
-
- setupIgnores(self, options)
-
- self.changedCwd = false
- var cwd = process.cwd()
- if (!ownProp(options, "cwd"))
- self.cwd = cwd
- else {
- self.cwd = options.cwd
- self.changedCwd = path.resolve(options.cwd) !== cwd
- }
-
- self.root = options.root || path.resolve(self.cwd, "/")
- self.root = path.resolve(self.root)
- if (process.platform === "win32")
- self.root = self.root.replace(/\\/g, "/")
-
- self.nomount = !!options.nomount
-
- self.minimatch = new Minimatch(pattern, options)
- self.options = self.minimatch.options
-}
-
-function finish (self) {
- var nou = self.nounique
- var all = nou ? [] : Object.create(null)
-
- for (var i = 0, l = self.matches.length; i < l; i ++) {
- var matches = self.matches[i]
- if (!matches || Object.keys(matches).length === 0) {
- if (self.nonull) {
- // do like the shell, and spit out the literal glob
- var literal = self.minimatch.globSet[i]
- if (nou)
- all.push(literal)
- else
- all[literal] = true
- }
- } else {
- // had matches
- var m = Object.keys(matches)
- if (nou)
- all.push.apply(all, m)
- else
- m.forEach(function (m) {
- all[m] = true
- })
- }
- }
-
- if (!nou)
- all = Object.keys(all)
-
- if (!self.nosort)
- all = all.sort(self.nocase ? alphasorti : alphasort)
-
- // at *some* point we statted all of these
- if (self.mark) {
- for (var i = 0; i < all.length; i++) {
- all[i] = self._mark(all[i])
- }
- if (self.nodir) {
- all = all.filter(function (e) {
- return !(/\/$/.test(e))
- })
- }
- }
-
- if (self.ignore.length)
- all = all.filter(function(m) {
- return !isIgnored(self, m)
- })
-
- self.found = all
-}
-
-function mark (self, p) {
- var abs = makeAbs(self, p)
- var c = self.cache[abs]
- var m = p
- if (c) {
- var isDir = c === 'DIR' || Array.isArray(c)
- var slash = p.slice(-1) === '/'
-
- if (isDir && !slash)
- m += '/'
- else if (!isDir && slash)
- m = m.slice(0, -1)
-
- if (m !== p) {
- var mabs = makeAbs(self, m)
- self.statCache[mabs] = self.statCache[abs]
- self.cache[mabs] = self.cache[abs]
- }
- }
-
- return m
-}
-
-// lotta situps...
-function makeAbs (self, f) {
- var abs = f
- if (f.charAt(0) === '/') {
- abs = path.join(self.root, f)
- } else if (exports.isAbsolute(f)) {
- abs = f
- } else if (self.changedCwd) {
- abs = path.resolve(self.cwd, f)
- } else if (self.realpath) {
- abs = path.resolve(f)
- }
- return abs
-}
-
-
-// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
-// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
-function isIgnored (self, path) {
- if (!self.ignore.length)
- return false
-
- return self.ignore.some(function(item) {
- return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
- })
-}
-
-function childrenIgnored (self, path) {
- if (!self.ignore.length)
- return false
-
- return self.ignore.some(function(item) {
- return !!(item.gmatcher && item.gmatcher.match(path))
- })
-}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/glob.js b/deps/npm/node_modules/init-package-json/node_modules/glob/glob.js
deleted file mode 100644
index eac0693cc6..0000000000
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/glob.js
+++ /dev/null
@@ -1,740 +0,0 @@
-// Approach:
-//
-// 1. Get the minimatch set
-// 2. For each pattern in the set, PROCESS(pattern, false)
-// 3. Store matches per-set, then uniq them
-//
-// PROCESS(pattern, inGlobStar)
-// Get the first [n] items from pattern that are all strings
-// Join these together. This is PREFIX.
-// If there is no more remaining, then stat(PREFIX) and
-// add to matches if it succeeds. END.
-//
-// If inGlobStar and PREFIX is symlink and points to dir
-// set ENTRIES = []
-// else readdir(PREFIX) as ENTRIES
-// If fail, END
-//
-// with ENTRIES
-// If pattern[n] is GLOBSTAR
-// // handle the case where the globstar match is empty
-// // by pruning it out, and testing the resulting pattern
-// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
-// // handle other cases.
-// for ENTRY in ENTRIES (not dotfiles)
-// // attach globstar + tail onto the entry
-// // Mark that this entry is a globstar match
-// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
-//
-// else // not globstar
-// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
-// Test ENTRY against pattern[n]
-// If fails, continue
-// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
-//
-// Caveat:
-// Cache all stats and readdirs results to minimize syscall. Since all
-// we ever care about is existence and directory-ness, we can just keep
-// `true` for files, and [children,...] for directories, or `false` for
-// things that don't exist.
-
-module.exports = glob
-
-var fs = require('fs')
-var minimatch = require('minimatch')
-var Minimatch = minimatch.Minimatch
-var inherits = require('inherits')
-var EE = require('events').EventEmitter
-var path = require('path')
-var assert = require('assert')
-var globSync = require('./sync.js')
-var common = require('./common.js')
-var alphasort = common.alphasort
-var alphasorti = common.alphasorti
-var isAbsolute = common.isAbsolute
-var setopts = common.setopts
-var ownProp = common.ownProp
-var inflight = require('inflight')
-var util = require('util')
-var childrenIgnored = common.childrenIgnored
-
-var once = require('once')
-
-function glob (pattern, options, cb) {
- if (typeof options === 'function') cb = options, options = {}
- if (!options) options = {}
-
- if (options.sync) {
- if (cb)
- throw new TypeError('callback provided to sync glob')
- return globSync(pattern, options)
- }
-
- return new Glob(pattern, options, cb)
-}
-
-glob.sync = globSync
-var GlobSync = glob.GlobSync = globSync.GlobSync
-
-// old api surface
-glob.glob = glob
-
-glob.hasMagic = function (pattern, options_) {
- var options = util._extend({}, options_)
- options.noprocess = true
-
- var g = new Glob(pattern, options)
- var set = g.minimatch.set
- if (set.length > 1)
- return true
-
- for (var j = 0; j < set[0].length; j++) {
- if (typeof set[0][j] !== 'string')
- return true
- }
-
- return false
-}
-
-glob.Glob = Glob
-inherits(Glob, EE)
-function Glob (pattern, options, cb) {
- if (typeof options === 'function') {
- cb = options
- options = null
- }
-
- if (options && options.sync) {
- if (cb)
- throw new TypeError('callback provided to sync glob')
- return new GlobSync(pattern, options)
- }
-
- if (!(this instanceof Glob))
- return new Glob(pattern, options, cb)
-
- setopts(this, pattern, options)
- this._didRealPath = false
-
- // process each pattern in the minimatch set
- var n = this.minimatch.set.length
-
- // The matches are stored as {<filename>: true,...} so that
- // duplicates are automagically pruned.
- // Later, we do an Object.keys() on these.
- // Keep them as a list so we can fill in when nonull is set.
- this.matches = new Array(n)
-
- if (typeof cb === 'function') {
- cb = once(cb)
- this.on('error', cb)
- this.on('end', function (matches) {
- cb(null, matches)
- })
- }
-
- var self = this
- var n = this.minimatch.set.length
- this._processing = 0
- this.matches = new Array(n)
-
- this._emitQueue = []
- this._processQueue = []
- this.paused = false
-
- if (this.noprocess)
- return this
-
- if (n === 0)
- return done()
-
- for (var i = 0; i < n; i ++) {
- this._process(this.minimatch.set[i], i, false, done)
- }
-
- function done () {
- --self._processing
- if (self._processing <= 0)
- self._finish()
- }
-}
-
-Glob.prototype._finish = function () {
- assert(this instanceof Glob)
- if (this.aborted)
- return
-
- if (this.realpath && !this._didRealpath)
- return this._realpath()
-
- common.finish(this)
- this.emit('end', this.found)
-}
-
-Glob.prototype._realpath = function () {
- if (this._didRealpath)
- return
-
- this._didRealpath = true
-
- var n = this.matches.length
- if (n === 0)
- return this._finish()
-
- var self = this
- for (var i = 0; i < this.matches.length; i++)
- this._realpathSet(i, next)
-
- function next () {
- if (--n === 0)
- self._finish()
- }
-}
-
-Glob.prototype._realpathSet = function (index, cb) {
- var matchset = this.matches[index]
- if (!matchset)
- return cb()
-
- var found = Object.keys(matchset)
- var self = this
- var n = found.length
-
- if (n === 0)
- return cb()
-
- var set = this.matches[index] = Object.create(null)
- found.forEach(function (p, i) {
- // If there's a problem with the stat, then it means that
- // one or more of the links in the realpath couldn't be
- // resolved. just return the abs value in that case.
- p = self._makeAbs(p)
- fs.realpath(p, self.realpathCache, function (er, real) {
- if (!er)
- set[real] = true
- else if (er.syscall === 'stat')
- set[p] = true
- else
- self.emit('error', er) // srsly wtf right here
-
- if (--n === 0) {
- self.matches[index] = set
- cb()
- }
- })
- })
-}
-
-Glob.prototype._mark = function (p) {
- return common.mark(this, p)
-}
-
-Glob.prototype._makeAbs = function (f) {
- return common.makeAbs(this, f)
-}
-
-Glob.prototype.abort = function () {
- this.aborted = true
- this.emit('abort')
-}
-
-Glob.prototype.pause = function () {
- if (!this.paused) {
- this.paused = true
- this.emit('pause')
- }
-}
-
-Glob.prototype.resume = function () {
- if (this.paused) {
- this.emit('resume')
- this.paused = false
- if (this._emitQueue.length) {
- var eq = this._emitQueue.slice(0)
- this._emitQueue.length = 0
- for (var i = 0; i < eq.length; i ++) {
- var e = eq[i]
- this._emitMatch(e[0], e[1])
- }
- }
- if (this._processQueue.length) {
- var pq = this._processQueue.slice(0)
- this._processQueue.length = 0
- for (var i = 0; i < pq.length; i ++) {
- var p = pq[i]
- this._processing--
- this._process(p[0], p[1], p[2], p[3])
- }
- }
- }
-}
-
-Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
- assert(this instanceof Glob)
- assert(typeof cb === 'function')
-
- if (this.aborted)
- return
-
- this._processing++
- if (this.paused) {
- this._processQueue.push([pattern, index, inGlobStar, cb])
- return
- }
-
- //console.error('PROCESS %d', this._processing, pattern)
-
- // Get the first [n] parts of pattern that are all strings.
- var n = 0
- while (typeof pattern[n] === 'string') {
- n ++
- }
- // now n is the index of the first one that is *not* a string.
-
- // see if there's anything else
- var prefix
- switch (n) {
- // if not, then this is rather simple
- case pattern.length:
- this._processSimple(pattern.join('/'), index, cb)
- return
-
- case 0:
- // pattern *starts* with some non-trivial item.
- // going to readdir(cwd), but not include the prefix in matches.
- prefix = null
- break
-
- default:
- // pattern has some string bits in the front.
- // whatever it starts with, whether that's 'absolute' like /foo/bar,
- // or 'relative' like '../baz'
- prefix = pattern.slice(0, n).join('/')
- break
- }
-
- var remain = pattern.slice(n)
-
- // get the list of entries.
- var read
- if (prefix === null)
- read = '.'
- else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
- if (!prefix || !isAbsolute(prefix))
- prefix = '/' + prefix
- read = prefix
- } else
- read = prefix
-
- var abs = this._makeAbs(read)
-
- //if ignored, skip _processing
- if (childrenIgnored(this, read))
- return cb()
-
- var isGlobStar = remain[0] === minimatch.GLOBSTAR
- if (isGlobStar)
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
- else
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
-}
-
-Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
- var self = this
- this._readdir(abs, inGlobStar, function (er, entries) {
- return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
- })
-}
-
-Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
-
- // if the abs isn't a dir, then nothing can match!
- if (!entries)
- return cb()
-
- // It will only match dot entries if it starts with a dot, or if
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
- var pn = remain[0]
- var negate = !!this.minimatch.negate
- var rawGlob = pn._glob
- var dotOk = this.dot || rawGlob.charAt(0) === '.'
-
- var matchedEntries = []
- for (var i = 0; i < entries.length; i++) {
- var e = entries[i]
- if (e.charAt(0) !== '.' || dotOk) {
- var m
- if (negate && !prefix) {
- m = !e.match(pn)
- } else {
- m = e.match(pn)
- }
- if (m)
- matchedEntries.push(e)
- }
- }
-
- //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
-
- var len = matchedEntries.length
- // If there are no matched entries, then nothing matches.
- if (len === 0)
- return cb()
-
- // if this is the last remaining pattern bit, then no need for
- // an additional stat *unless* the user has specified mark or
- // stat explicitly. We know they exist, since readdir returned
- // them.
-
- if (remain.length === 1 && !this.mark && !this.stat) {
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- if (prefix) {
- if (prefix !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
-
- if (e.charAt(0) === '/' && !this.nomount) {
- e = path.join(this.root, e)
- }
- this._emitMatch(index, e)
- }
- // This was the last one, and no stats were needed
- return cb()
- }
-
- // now test all matched entries as stand-ins for that part
- // of the pattern.
- remain.shift()
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- var newPattern
- if (prefix) {
- if (prefix !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
- this._process([e].concat(remain), index, inGlobStar, cb)
- }
- cb()
-}
-
-Glob.prototype._emitMatch = function (index, e) {
- if (this.aborted)
- return
-
- if (this.matches[index][e])
- return
-
- if (this.paused) {
- this._emitQueue.push([index, e])
- return
- }
-
- var abs = this._makeAbs(e)
-
- if (this.nodir) {
- var c = this.cache[abs]
- if (c === 'DIR' || Array.isArray(c))
- return
- }
-
- if (this.mark)
- e = this._mark(e)
-
- this.matches[index][e] = true
-
- var st = this.statCache[abs]
- if (st)
- this.emit('stat', e, st)
-
- this.emit('match', e)
-}
-
-Glob.prototype._readdirInGlobStar = function (abs, cb) {
- if (this.aborted)
- return
-
- // follow all symlinked directories forever
- // just proceed as if this is a non-globstar situation
- if (this.follow)
- return this._readdir(abs, false, cb)
-
- var lstatkey = 'lstat\0' + abs
- var self = this
- var lstatcb = inflight(lstatkey, lstatcb_)
-
- if (lstatcb)
- fs.lstat(abs, lstatcb)
-
- function lstatcb_ (er, lstat) {
- if (er)
- return cb()
-
- var isSym = lstat.isSymbolicLink()
- self.symlinks[abs] = isSym
-
- // If it's not a symlink or a dir, then it's definitely a regular file.
- // don't bother doing a readdir in that case.
- if (!isSym && !lstat.isDirectory()) {
- self.cache[abs] = 'FILE'
- cb()
- } else
- self._readdir(abs, false, cb)
- }
-}
-
-Glob.prototype._readdir = function (abs, inGlobStar, cb) {
- if (this.aborted)
- return
-
- cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
- if (!cb)
- return
-
- //console.error('RD %j %j', +inGlobStar, abs)
- if (inGlobStar && !ownProp(this.symlinks, abs))
- return this._readdirInGlobStar(abs, cb)
-
- if (ownProp(this.cache, abs)) {
- var c = this.cache[abs]
- if (!c || c === 'FILE')
- return cb()
-
- if (Array.isArray(c))
- return cb(null, c)
- }
-
- var self = this
- fs.readdir(abs, readdirCb(this, abs, cb))
-}
-
-function readdirCb (self, abs, cb) {
- return function (er, entries) {
- if (er)
- self._readdirError(abs, er, cb)
- else
- self._readdirEntries(abs, entries, cb)
- }
-}
-
-Glob.prototype._readdirEntries = function (abs, entries, cb) {
- if (this.aborted)
- return
-
- // if we haven't asked to stat everything, then just
- // assume that everything in there exists, so we can avoid
- // having to stat it a second time.
- if (!this.mark && !this.stat) {
- for (var i = 0; i < entries.length; i ++) {
- var e = entries[i]
- if (abs === '/')
- e = abs + e
- else
- e = abs + '/' + e
- this.cache[e] = true
- }
- }
-
- this.cache[abs] = entries
- return cb(null, entries)
-}
-
-Glob.prototype._readdirError = function (f, er, cb) {
- if (this.aborted)
- return
-
- // handle errors, and cache the information
- switch (er.code) {
- case 'ENOTDIR': // totally normal. means it *does* exist.
- this.cache[this._makeAbs(f)] = 'FILE'
- break
-
- case 'ENOENT': // not terribly unusual
- case 'ELOOP':
- case 'ENAMETOOLONG':
- case 'UNKNOWN':
- this.cache[this._makeAbs(f)] = false
- break
-
- default: // some unusual error. Treat as failure.
- this.cache[this._makeAbs(f)] = false
- if (this.strict) return this.emit('error', er)
- if (!this.silent) console.error('glob error', er)
- break
- }
- return cb()
-}
-
-Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
- var self = this
- this._readdir(abs, inGlobStar, function (er, entries) {
- self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
- })
-}
-
-
-Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
- //console.error('pgs2', prefix, remain[0], entries)
-
- // no entries means not a dir, so it can never have matches
- // foo.txt/** doesn't match foo.txt
- if (!entries)
- return cb()
-
- // test without the globstar, and with every child both below
- // and replacing the globstar.
- var remainWithoutGlobStar = remain.slice(1)
- var gspref = prefix ? [ prefix ] : []
- var noGlobStar = gspref.concat(remainWithoutGlobStar)
-
- // the noGlobStar pattern exits the inGlobStar state
- this._process(noGlobStar, index, false, cb)
-
- var isSym = this.symlinks[abs]
- var len = entries.length
-
- // If it's a symlink, and we're in a globstar, then stop
- if (isSym && inGlobStar)
- return cb()
-
- for (var i = 0; i < len; i++) {
- var e = entries[i]
- if (e.charAt(0) === '.' && !this.dot)
- continue
-
- // these two cases enter the inGlobStar state
- var instead = gspref.concat(entries[i], remainWithoutGlobStar)
- this._process(instead, index, true, cb)
-
- var below = gspref.concat(entries[i], remain)
- this._process(below, index, true, cb)
- }
-
- cb()
-}
-
-Glob.prototype._processSimple = function (prefix, index, cb) {
- // XXX review this. Shouldn't it be doing the mounting etc
- // before doing stat? kinda weird?
- var self = this
- this._stat(prefix, function (er, exists) {
- self._processSimple2(prefix, index, er, exists, cb)
- })
-}
-Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
-
- //console.error('ps2', prefix, exists)
-
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- // If it doesn't exist, then just mark the lack of results
- if (!exists)
- return cb()
-
- if (prefix && isAbsolute(prefix) && !this.nomount) {
- var trail = /[\/\\]$/.test(prefix)
- if (prefix.charAt(0) === '/') {
- prefix = path.join(this.root, prefix)
- } else {
- prefix = path.resolve(this.root, prefix)
- if (trail)
- prefix += '/'
- }
- }
-
- if (process.platform === 'win32')
- prefix = prefix.replace(/\\/g, '/')
-
- // Mark this as a match
- this._emitMatch(index, prefix)
- cb()
-}
-
-// Returns either 'DIR', 'FILE', or false
-Glob.prototype._stat = function (f, cb) {
- var abs = this._makeAbs(f)
- var needDir = f.slice(-1) === '/'
-
- if (f.length > this.maxLength)
- return cb()
-
- if (!this.stat && ownProp(this.cache, abs)) {
- var c = this.cache[abs]
-
- if (Array.isArray(c))
- c = 'DIR'
-
- // It exists, but maybe not how we need it
- if (!needDir || c === 'DIR')
- return cb(null, c)
-
- if (needDir && c === 'FILE')
- return cb()
-
- // otherwise we have to stat, because maybe c=true
- // if we know it exists, but not what it is.
- }
-
- var exists
- var stat = this.statCache[abs]
- if (stat !== undefined) {
- if (stat === false)
- return cb(null, stat)
- else {
- var type = stat.isDirectory() ? 'DIR' : 'FILE'
- if (needDir && type === 'FILE')
- return cb()
- else
- return cb(null, type, stat)
- }
- }
-
- var self = this
- var statcb = inflight('stat\0' + abs, lstatcb_)
- if (statcb)
- fs.lstat(abs, statcb)
-
- function lstatcb_ (er, lstat) {
- if (lstat && lstat.isSymbolicLink()) {
- // If it's a symlink, then treat it as the target, unless
- // the target does not exist, then treat it as a file.
- return fs.stat(abs, function (er, stat) {
- if (er)
- self._stat2(f, abs, null, lstat, cb)
- else
- self._stat2(f, abs, er, stat, cb)
- })
- } else {
- self._stat2(f, abs, er, lstat, cb)
- }
- }
-}
-
-Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
- if (er) {
- this.statCache[abs] = false
- return cb()
- }
-
- var needDir = f.slice(-1) === '/'
- this.statCache[abs] = stat
-
- if (abs.slice(-1) === '/' && !stat.isDirectory())
- return cb(null, false, stat)
-
- var c = stat.isDirectory() ? 'DIR' : 'FILE'
- this.cache[abs] = this.cache[abs] || c
-
- if (needDir && c !== 'DIR')
- return cb()
-
- return cb(null, c, stat)
-}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/package.json b/deps/npm/node_modules/init-package-json/node_modules/glob/package.json
deleted file mode 100644
index 7a2cb4c634..0000000000
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/package.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "name": "glob",
- "description": "a little globber",
- "version": "4.5.3",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-glob.git"
- },
- "main": "glob.js",
- "files": [
- "glob.js",
- "sync.js",
- "common.js"
- ],
- "engines": {
- "node": "*"
- },
- "dependencies": {
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^2.0.1",
- "once": "^1.3.0"
- },
- "devDependencies": {
- "mkdirp": "0",
- "rimraf": "^2.2.8",
- "tap": "^0.5.0",
- "tick": "0.0.6"
- },
- "scripts": {
- "prepublish": "npm run benchclean",
- "profclean": "rm -f v8.log profile.txt",
- "test": "npm run profclean && tap test/*.js",
- "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js",
- "bench": "bash benchmark.sh",
- "prof": "bash prof.sh && cat profile.txt",
- "benchclean": "bash benchclean.sh"
- },
- "license": "ISC",
- "gitHead": "a4e461ab59a837eee80a4d8dbdbf5ae1054a646f",
- "bugs": {
- "url": "https://github.com/isaacs/node-glob/issues"
- },
- "homepage": "https://github.com/isaacs/node-glob",
- "_id": "glob@4.5.3",
- "_shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f",
- "_from": "glob@>=4.4.2 <5.0.0",
- "_npmVersion": "2.7.1",
- "_nodeVersion": "1.4.2",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "dist": {
- "shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f",
- "tarball": "http://registry.npmjs.org/glob/-/glob-4.5.3.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/sync.js b/deps/npm/node_modules/init-package-json/node_modules/glob/sync.js
deleted file mode 100644
index f4f5e36d4b..0000000000
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/sync.js
+++ /dev/null
@@ -1,457 +0,0 @@
-module.exports = globSync
-globSync.GlobSync = GlobSync
-
-var fs = require('fs')
-var minimatch = require('minimatch')
-var Minimatch = minimatch.Minimatch
-var Glob = require('./glob.js').Glob
-var util = require('util')
-var path = require('path')
-var assert = require('assert')
-var common = require('./common.js')
-var alphasort = common.alphasort
-var alphasorti = common.alphasorti
-var isAbsolute = common.isAbsolute
-var setopts = common.setopts
-var ownProp = common.ownProp
-var childrenIgnored = common.childrenIgnored
-
-function globSync (pattern, options) {
- if (typeof options === 'function' || arguments.length === 3)
- throw new TypeError('callback provided to sync glob\n'+
- 'See: https://github.com/isaacs/node-glob/issues/167')
-
- return new GlobSync(pattern, options).found
-}
-
-function GlobSync (pattern, options) {
- if (!pattern)
- throw new Error('must provide pattern')
-
- if (typeof options === 'function' || arguments.length === 3)
- throw new TypeError('callback provided to sync glob\n'+
- 'See: https://github.com/isaacs/node-glob/issues/167')
-
- if (!(this instanceof GlobSync))
- return new GlobSync(pattern, options)
-
- setopts(this, pattern, options)
-
- if (this.noprocess)
- return this
-
- var n = this.minimatch.set.length
- this.matches = new Array(n)
- for (var i = 0; i < n; i ++) {
- this._process(this.minimatch.set[i], i, false)
- }
- this._finish()
-}
-
-GlobSync.prototype._finish = function () {
- assert(this instanceof GlobSync)
- if (this.realpath) {
- var self = this
- this.matches.forEach(function (matchset, index) {
- var set = self.matches[index] = Object.create(null)
- for (var p in matchset) {
- try {
- p = self._makeAbs(p)
- var real = fs.realpathSync(p, this.realpathCache)
- set[real] = true
- } catch (er) {
- if (er.syscall === 'stat')
- set[self._makeAbs(p)] = true
- else
- throw er
- }
- }
- })
- }
- common.finish(this)
-}
-
-
-GlobSync.prototype._process = function (pattern, index, inGlobStar) {
- assert(this instanceof GlobSync)
-
- // Get the first [n] parts of pattern that are all strings.
- var n = 0
- while (typeof pattern[n] === 'string') {
- n ++
- }
- // now n is the index of the first one that is *not* a string.
-
- // See if there's anything else
- var prefix
- switch (n) {
- // if not, then this is rather simple
- case pattern.length:
- this._processSimple(pattern.join('/'), index)
- return
-
- case 0:
- // pattern *starts* with some non-trivial item.
- // going to readdir(cwd), but not include the prefix in matches.
- prefix = null
- break
-
- default:
- // pattern has some string bits in the front.
- // whatever it starts with, whether that's 'absolute' like /foo/bar,
- // or 'relative' like '../baz'
- prefix = pattern.slice(0, n).join('/')
- break
- }
-
- var remain = pattern.slice(n)
-
- // get the list of entries.
- var read
- if (prefix === null)
- read = '.'
- else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
- if (!prefix || !isAbsolute(prefix))
- prefix = '/' + prefix
- read = prefix
- } else
- read = prefix
-
- var abs = this._makeAbs(read)
-
- //if ignored, skip processing
- if (childrenIgnored(this, read))
- return
-
- var isGlobStar = remain[0] === minimatch.GLOBSTAR
- if (isGlobStar)
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
- else
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
-}
-
-
-GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
- var entries = this._readdir(abs, inGlobStar)
-
- // if the abs isn't a dir, then nothing can match!
- if (!entries)
- return
-
- // It will only match dot entries if it starts with a dot, or if
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
- var pn = remain[0]
- var negate = !!this.minimatch.negate
- var rawGlob = pn._glob
- var dotOk = this.dot || rawGlob.charAt(0) === '.'
-
- var matchedEntries = []
- for (var i = 0; i < entries.length; i++) {
- var e = entries[i]
- if (e.charAt(0) !== '.' || dotOk) {
- var m
- if (negate && !prefix) {
- m = !e.match(pn)
- } else {
- m = e.match(pn)
- }
- if (m)
- matchedEntries.push(e)
- }
- }
-
- var len = matchedEntries.length
- // If there are no matched entries, then nothing matches.
- if (len === 0)
- return
-
- // if this is the last remaining pattern bit, then no need for
- // an additional stat *unless* the user has specified mark or
- // stat explicitly. We know they exist, since readdir returned
- // them.
-
- if (remain.length === 1 && !this.mark && !this.stat) {
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- if (prefix) {
- if (prefix.slice(-1) !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
-
- if (e.charAt(0) === '/' && !this.nomount) {
- e = path.join(this.root, e)
- }
- this.matches[index][e] = true
- }
- // This was the last one, and no stats were needed
- return
- }
-
- // now test all matched entries as stand-ins for that part
- // of the pattern.
- remain.shift()
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- var newPattern
- if (prefix)
- newPattern = [prefix, e]
- else
- newPattern = [e]
- this._process(newPattern.concat(remain), index, inGlobStar)
- }
-}
-
-
-GlobSync.prototype._emitMatch = function (index, e) {
- var abs = this._makeAbs(e)
- if (this.mark)
- e = this._mark(e)
-
- if (this.matches[index][e])
- return
-
- if (this.nodir) {
- var c = this.cache[this._makeAbs(e)]
- if (c === 'DIR' || Array.isArray(c))
- return
- }
-
- this.matches[index][e] = true
- if (this.stat)
- this._stat(e)
-}
-
-
-GlobSync.prototype._readdirInGlobStar = function (abs) {
- // follow all symlinked directories forever
- // just proceed as if this is a non-globstar situation
- if (this.follow)
- return this._readdir(abs, false)
-
- var entries
- var lstat
- var stat
- try {
- lstat = fs.lstatSync(abs)
- } catch (er) {
- // lstat failed, doesn't exist
- return null
- }
-
- var isSym = lstat.isSymbolicLink()
- this.symlinks[abs] = isSym
-
- // If it's not a symlink or a dir, then it's definitely a regular file.
- // don't bother doing a readdir in that case.
- if (!isSym && !lstat.isDirectory())
- this.cache[abs] = 'FILE'
- else
- entries = this._readdir(abs, false)
-
- return entries
-}
-
-GlobSync.prototype._readdir = function (abs, inGlobStar) {
- var entries
-
- if (inGlobStar && !ownProp(this.symlinks, abs))
- return this._readdirInGlobStar(abs)
-
- if (ownProp(this.cache, abs)) {
- var c = this.cache[abs]
- if (!c || c === 'FILE')
- return null
-
- if (Array.isArray(c))
- return c
- }
-
- try {
- return this._readdirEntries(abs, fs.readdirSync(abs))
- } catch (er) {
- this._readdirError(abs, er)
- return null
- }
-}
-
-GlobSync.prototype._readdirEntries = function (abs, entries) {
- // if we haven't asked to stat everything, then just
- // assume that everything in there exists, so we can avoid
- // having to stat it a second time.
- if (!this.mark && !this.stat) {
- for (var i = 0; i < entries.length; i ++) {
- var e = entries[i]
- if (abs === '/')
- e = abs + e
- else
- e = abs + '/' + e
- this.cache[e] = true
- }
- }
-
- this.cache[abs] = entries
-
- // mark and cache dir-ness
- return entries
-}
-
-GlobSync.prototype._readdirError = function (f, er) {
- // handle errors, and cache the information
- switch (er.code) {
- case 'ENOTDIR': // totally normal. means it *does* exist.
- this.cache[this._makeAbs(f)] = 'FILE'
- break
-
- case 'ENOENT': // not terribly unusual
- case 'ELOOP':
- case 'ENAMETOOLONG':
- case 'UNKNOWN':
- this.cache[this._makeAbs(f)] = false
- break
-
- default: // some unusual error. Treat as failure.
- this.cache[this._makeAbs(f)] = false
- if (this.strict) throw er
- if (!this.silent) console.error('glob error', er)
- break
- }
-}
-
-GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
-
- var entries = this._readdir(abs, inGlobStar)
-
- // no entries means not a dir, so it can never have matches
- // foo.txt/** doesn't match foo.txt
- if (!entries)
- return
-
- // test without the globstar, and with every child both below
- // and replacing the globstar.
- var remainWithoutGlobStar = remain.slice(1)
- var gspref = prefix ? [ prefix ] : []
- var noGlobStar = gspref.concat(remainWithoutGlobStar)
-
- // the noGlobStar pattern exits the inGlobStar state
- this._process(noGlobStar, index, false)
-
- var len = entries.length
- var isSym = this.symlinks[abs]
-
- // If it's a symlink, and we're in a globstar, then stop
- if (isSym && inGlobStar)
- return
-
- for (var i = 0; i < len; i++) {
- var e = entries[i]
- if (e.charAt(0) === '.' && !this.dot)
- continue
-
- // these two cases enter the inGlobStar state
- var instead = gspref.concat(entries[i], remainWithoutGlobStar)
- this._process(instead, index, true)
-
- var below = gspref.concat(entries[i], remain)
- this._process(below, index, true)
- }
-}
-
-GlobSync.prototype._processSimple = function (prefix, index) {
- // XXX review this. Shouldn't it be doing the mounting etc
- // before doing stat? kinda weird?
- var exists = this._stat(prefix)
-
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- // If it doesn't exist, then just mark the lack of results
- if (!exists)
- return
-
- if (prefix && isAbsolute(prefix) && !this.nomount) {
- var trail = /[\/\\]$/.test(prefix)
- if (prefix.charAt(0) === '/') {
- prefix = path.join(this.root, prefix)
- } else {
- prefix = path.resolve(this.root, prefix)
- if (trail)
- prefix += '/'
- }
- }
-
- if (process.platform === 'win32')
- prefix = prefix.replace(/\\/g, '/')
-
- // Mark this as a match
- this.matches[index][prefix] = true
-}
-
-// Returns either 'DIR', 'FILE', or false
-GlobSync.prototype._stat = function (f) {
- var abs = this._makeAbs(f)
- var needDir = f.slice(-1) === '/'
-
- if (f.length > this.maxLength)
- return false
-
- if (!this.stat && ownProp(this.cache, abs)) {
- var c = this.cache[abs]
-
- if (Array.isArray(c))
- c = 'DIR'
-
- // It exists, but maybe not how we need it
- if (!needDir || c === 'DIR')
- return c
-
- if (needDir && c === 'FILE')
- return false
-
- // otherwise we have to stat, because maybe c=true
- // if we know it exists, but not what it is.
- }
-
- var exists
- var stat = this.statCache[abs]
- if (!stat) {
- var lstat
- try {
- lstat = fs.lstatSync(abs)
- } catch (er) {
- return false
- }
-
- if (lstat.isSymbolicLink()) {
- try {
- stat = fs.statSync(abs)
- } catch (er) {
- stat = lstat
- }
- } else {
- stat = lstat
- }
- }
-
- this.statCache[abs] = stat
-
- var c = stat.isDirectory() ? 'DIR' : 'FILE'
- this.cache[abs] = this.cache[abs] || c
-
- if (needDir && c !== 'DIR')
- return false
-
- return c
-}
-
-GlobSync.prototype._mark = function (p) {
- return common.mark(this, p)
-}
-
-GlobSync.prototype._makeAbs = function (f) {
- return common.makeAbs(this, f)
-}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/promzard/example/buffer.js b/deps/npm/node_modules/init-package-json/node_modules/promzard/example/buffer.js
new file mode 100644
index 0000000000..828f9d1df9
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/promzard/example/buffer.js
@@ -0,0 +1,12 @@
+var pz = require('../promzard')
+
+var path = require('path')
+var file = path.resolve(__dirname, 'substack-input.js')
+var buf = require('fs').readFileSync(file)
+var ctx = { basename: path.basename(path.dirname(file)) }
+
+pz.fromBuffer(buf, ctx, function (er, res) {
+ if (er)
+ throw er
+ console.error(JSON.stringify(res, null, 2))
+})
diff --git a/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json b/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json
index f66857539f..42900314b9 100644
--- a/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json
+++ b/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json
@@ -6,7 +6,7 @@
},
"name": "promzard",
"description": "prompting wizardly",
- "version": "0.2.2",
+ "version": "0.3.0",
"repository": {
"url": "git://github.com/isaacs/promzard"
},
@@ -21,14 +21,16 @@
"test": "tap test/*.js"
},
"license": "ISC",
+ "gitHead": "780ead051299aa28be2584199ab6fa503a32d354",
"bugs": {
"url": "https://github.com/isaacs/promzard/issues"
},
"homepage": "https://github.com/isaacs/promzard",
- "_id": "promzard@0.2.2",
- "_shasum": "918b9f2b29458cb001781a8856502e4a79b016e0",
- "_from": "promzard@>=0.2.0 <0.3.0",
- "_npmVersion": "1.4.10",
+ "_id": "promzard@0.3.0",
+ "_shasum": "26a5d6ee8c7dee4cb12208305acfb93ba382a9ee",
+ "_from": "promzard@>=0.3.0 <0.4.0",
+ "_npmVersion": "2.7.1",
+ "_nodeVersion": "1.4.2",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
@@ -40,10 +42,9 @@
}
],
"dist": {
- "shasum": "918b9f2b29458cb001781a8856502e4a79b016e0",
- "tarball": "http://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz"
+ "shasum": "26a5d6ee8c7dee4cb12208305acfb93ba382a9ee",
+ "tarball": "http://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz"
}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/promzard/promzard.js b/deps/npm/node_modules/init-package-json/node_modules/promzard/promzard.js
index 3afb567f77..da1abca953 100644
--- a/deps/npm/node_modules/init-package-json/node_modules/promzard/promzard.js
+++ b/deps/npm/node_modules/init-package-json/node_modules/promzard/promzard.js
@@ -21,6 +21,16 @@ function promzard (file, ctx, cb) {
cb(null, data)
})
}
+promzard.fromBuffer = function (buf, ctx, cb) {
+ var filename = 0
+ do {
+ filename = '\0' + Math.random();
+ } while (files[filename])
+ files[filename] = buf
+ var ret = promzard(filename, ctx, cb)
+ delete files[filename]
+ return ret
+}
function PromZard (file, ctx) {
if (!(this instanceof PromZard))
@@ -175,8 +185,14 @@ PromZard.prototype.walk = function (o, cb) {
prompt[1] = this.ctx[k]
return this.prompt(prompt, function (er, res) {
- if (er)
- return this.emit('error', this.error = er);
+ if (er) {
+ if (!er.notValid) {
+ return this.emit('error', this.error = er);
+ }
+ console.log(er.message)
+ i --
+ return L.call(this)
+ }
o[k] = res
L.call(this)
}.bind(this))
@@ -206,7 +222,13 @@ PromZard.prototype.prompt = function (pdt, cb) {
if (tx) {
cb = function (cb) { return function (er, data) {
- try { return cb(er, tx(data)) }
+ try {
+ var res = tx(data)
+ if (!er && res instanceof Error && !!res.notValid) {
+ return cb(res, null)
+ }
+ return cb(er, res)
+ }
catch (er) { this.emit('error', er) }
}}(cb).bind(this)
}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/promzard/test/buffer.js b/deps/npm/node_modules/init-package-json/node_modules/promzard/test/buffer.js
new file mode 100644
index 0000000000..e1d240e2e4
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/promzard/test/buffer.js
@@ -0,0 +1,84 @@
+var tap = require('tap')
+var pz = require('../promzard.js')
+var spawn = require('child_process').spawn
+
+tap.test('run the example using a buffer', function (t) {
+
+ var example = require.resolve('../example/buffer.js')
+ var node = process.execPath
+
+ var expect = {
+ "name": "example",
+ "version": "0.0.0",
+ "description": "testing description",
+ "main": "test-entry.js",
+ "directories": {
+ "example": "example",
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.2.5"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/example.git"
+ },
+ "homepage": "https://github.com/substack/example",
+ "keywords": [
+ "fugazi",
+ "function",
+ "waiting",
+ "room"
+ ],
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "license": "MIT",
+ "engine": {
+ "node": ">=0.6"
+ }
+ }
+
+ var c = spawn(node, [example], { customFds: [-1,-1,-1] })
+ var output = ''
+ c.stdout.on('data', function (d) {
+ output += d
+ respond()
+ })
+
+ var actual = ''
+ c.stderr.on('data', function (d) {
+ actual += d
+ })
+
+ function respond () {
+ if (output.match(/description: $/)) {
+ c.stdin.write('testing description\n')
+ return
+ }
+ if (output.match(/entry point: \(index\.js\) $/)) {
+ c.stdin.write('test-entry.js\n')
+ return
+ }
+ if (output.match(/keywords: $/)) {
+ c.stdin.write('fugazi function waiting room\n')
+ // "read" module is weird on node >= 0.10 when not a TTY
+ // requires explicit ending for reasons.
+ // could dig in, but really just wanna make tests pass, whatever.
+ c.stdin.end()
+ return
+ }
+ }
+
+ c.on('close', function () {
+ actual = JSON.parse(actual)
+ t.deepEqual(actual, expect)
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/init-package-json/node_modules/promzard/test/validate.input b/deps/npm/node_modules/init-package-json/node_modules/promzard/test/validate.input
new file mode 100644
index 0000000000..839c065229
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/promzard/test/validate.input
@@ -0,0 +1,8 @@
+module.exports = {
+ "name": prompt("name", function (data) {
+ if (data === 'cool') return data
+ var er = new Error('not cool')
+ er.notValid = true
+ return er
+ })
+}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/promzard/test/validate.js b/deps/npm/node_modules/init-package-json/node_modules/promzard/test/validate.js
new file mode 100644
index 0000000000..a120681494
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/promzard/test/validate.js
@@ -0,0 +1,20 @@
+
+var promzard = require('../')
+var test = require('tap').test
+
+test('validate', function (t) {
+ t.plan(2)
+ var ctx = { tmpdir : '/tmp' }
+ var file = __dirname + '/validate.input'
+ promzard(file, ctx, function (er, found) {
+ t.ok(!er)
+ var wanted = { name: 'cool' }
+ t.same(found, wanted)
+ })
+ setTimeout(function () {
+ process.stdin.emit('data', 'not cool\n')
+ }, 100)
+ setTimeout(function () {
+ process.stdin.emit('data', 'cool\n')
+ }, 200)
+})
diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/.npmignore b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/README.md b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/README.md
new file mode 100644
index 0000000000..97e7fc5207
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/README.md
@@ -0,0 +1,86 @@
+# validate-npm-package-name
+
+Give me a string and I'll tell you if it's a valid npm package name.
+
+This package exports a single synchronous function that takes a string as
+input and returns an object:
+
+## Valid Names
+
+```js
+var validate = require("validate-npm-package-name")
+
+validate("some-package")
+validate("example.com")
+validate("under_score")
+validate("123numeric")
+validate("crazy!")
+validate("@npm/thingy")
+validate("@jane/foo.js")
+```
+
+All of the above names are valid, so you'll get this object back:
+
+```js
+{
+ validForNewPackages: true,
+ validForOldPackages: true
+}
+```
+
+## Invalid Names
+
+```js
+ validate(" leading-space:and:weirdchars")
+```
+
+That was never a valid package name, so you get this:
+
+```js
+{
+ validForNewPackages: false,
+ validForOldPackages: false,
+ errors: [
+ 'name cannot contain leading or trailing spaces',
+ 'name can only contain URL-friendly characters'
+ ]
+}
+```
+
+## Legacy Names
+
+In the old days of npm, package names were wild. They could have capital
+letters in them. They could be really long. They could be the name of an
+existing module in node core.
+
+If you give this function a package name that **used to be valid**, you'll see
+a change in the value of `validForNewPackages` property, and a warnings array
+will be present:
+
+```js
+validate("cRaZY-paCkAgE-with-mixed-case-and-more-than-fifty-characters")
+```
+
+returns:
+
+```js
+{
+ validForNewPackages: false,
+ validForOldPackages: true,
+ warnings: [
+ "name can no longer contain capital letters",
+ "name can no longer contain more than 50 characters"
+ ]
+}
+```
+
+## Tests
+
+```sh
+npm install
+npm test
+```
+
+## License
+
+ISC
diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/index.js b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/index.js
new file mode 100644
index 0000000000..fde5b7e917
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/index.js
@@ -0,0 +1,101 @@
+var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");
+var builtins = require("builtins")
+var blacklist = [
+ "node_modules",
+ "favicon.ico"
+];
+
+var validate = module.exports = function(name) {
+
+ var warnings = []
+ var errors = []
+
+ if (name === null) {
+ errors.push("name cannot be null")
+ return done(warnings, errors)
+ }
+
+ if (name === undefined) {
+ errors.push("name cannot be undefined")
+ return done(warnings, errors)
+ }
+
+ if (typeof name !== "string") {
+ errors.push("name must be a string")
+ return done(warnings, errors)
+ }
+
+ if (!name.length) {
+ errors.push("name length must be greater than zero")
+ }
+
+ if (name.match(/^\./)) {
+ errors.push("name cannot start with a period")
+ }
+
+ if (name.match(/^_/)) {
+ errors.push("name cannot start with an underscore")
+ }
+
+ if (name.trim() !== name) {
+ errors.push("name cannot contain leading or trailing spaces")
+ }
+
+ // No funny business
+ blacklist.forEach(function(blacklistedName){
+ if (name.toLowerCase() === blacklistedName) {
+ errors.push(blacklistedName + " is a blacklisted name")
+ }
+ })
+
+ // Generate warnings for stuff that used to be allowed
+
+ // core module names like http, events, util, etc
+ builtins.forEach(function(builtin){
+ if (name.toLowerCase() === builtin) {
+ warnings.push(builtin + " is a core module name")
+ }
+ })
+
+ // really-long-package-names-------------------------------such--length-----many---wow
+ if (name.length > 50) {
+ warnings.push("name can no longer contain more than 50 characters")
+ }
+
+ // mIxeD CaSe nAMEs
+ if (name.toLowerCase() !== name) {
+ warnings.push("name can no longer contain capital letters")
+ }
+
+ if (encodeURIComponent(name) !== name) {
+
+ // Maybe it's a scoped package name, like @user/package
+ var nameMatch = name.match(scopedPackagePattern)
+ if (nameMatch) {
+ var user = nameMatch[1]
+ var pkg = nameMatch[2]
+ if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) {
+ return done(warnings, errors)
+ }
+ }
+
+ errors.push("name can only contain URL-friendly characters")
+ }
+
+ return done(warnings, errors)
+
+}
+
+validate.scopedPackagePattern = scopedPackagePattern
+
+var done = function (warnings, errors) {
+ var result = {
+ validForNewPackages: errors.length === 0 && warnings.length === 0,
+ validForOldPackages: errors.length === 0,
+ warnings: warnings,
+ errors: errors
+ }
+ if (!result.warnings.length) delete result.warnings
+ if (!result.errors.length) delete result.errors
+ return result
+}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/.travis.yml b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/.travis.yml
new file mode 100644
index 0000000000..cc4dba29d9
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/History.md b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/History.md
new file mode 100644
index 0000000000..0eb45c4207
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/History.md
@@ -0,0 +1,39 @@
+
+0.0.7 / 2014-09-01
+==================
+
+ * update .repository
+
+0.0.6 / 2014-09-01
+==================
+
+ * add travis
+ * add test script
+ * add constants
+
+0.0.5 / 2014-06-27
+==================
+
+ * add module
+ * publish to public npm
+
+0.0.4 / 2014-04-25
+==================
+
+ * add timers
+
+0.0.3 / 2014-02-22
+==================
+
+ * add buffer
+
+0.0.2 / 2014-02-11
+==================
+
+ * add assert
+
+0.0.1 / 2014-02-11
+==================
+
+ * add main
+ * initial commit
diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/Readme.md b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/Readme.md
new file mode 100644
index 0000000000..96f4b1f6c4
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/Readme.md
@@ -0,0 +1,18 @@
+
+# builtins
+
+ List of node.js [builtin modules](http://nodejs.org/api/).
+
+ [![build status](https://secure.travis-ci.org/juliangruber/builtins.svg)](http://travis-ci.org/juliangruber/builtins)
+
+## Example
+
+```js
+var builtins = require('builtins');
+
+assert(builtins.indexOf('http') > -1);
+```
+
+## License
+
+ MIT
diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/builtins.json b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/builtins.json
new file mode 100644
index 0000000000..c52221d771
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/builtins.json
@@ -0,0 +1,31 @@
+[
+ "assert",
+ "buffer",
+ "child_process",
+ "cluster",
+ "constants",
+ "crypto",
+ "dns",
+ "domain",
+ "events",
+ "fs",
+ "http",
+ "https",
+ "module",
+ "net",
+ "os",
+ "path",
+ "punycode",
+ "querystring",
+ "repl",
+ "stream",
+ "string_decoder",
+ "timers",
+ "tls",
+ "tty",
+ "dgram",
+ "url",
+ "util",
+ "vm",
+ "zlib"
+]
diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/package.json b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/package.json
new file mode 100644
index 0000000000..e650240c70
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/node_modules/builtins/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "builtins",
+ "version": "0.0.7",
+ "description": "List of node.js builtin modules",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/builtins"
+ },
+ "license": "MIT",
+ "main": "builtins.json",
+ "publishConfig": {
+ "registry": "https://registry.npmjs.org"
+ },
+ "scripts": {
+ "test": "node -e \"require('./builtins.json')\""
+ },
+ "bugs": {
+ "url": "https://github.com/juliangruber/builtins/issues"
+ },
+ "homepage": "https://github.com/juliangruber/builtins",
+ "_id": "builtins@0.0.7",
+ "dist": {
+ "shasum": "355219cd6cf18dbe7c01cc7fd2dce765cfdc549a",
+ "tarball": "http://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz"
+ },
+ "_from": "builtins@0.0.7",
+ "_npmVersion": "1.3.22",
+ "_npmUser": {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ },
+ "maintainers": [
+ {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ },
+ {
+ "name": "segment",
+ "email": "tj@segment.io"
+ }
+ ],
+ "directories": {},
+ "_shasum": "355219cd6cf18dbe7c01cc7fd2dce765cfdc549a",
+ "_resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz"
+}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/package.json b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/package.json
new file mode 100644
index 0000000000..d421ae9fa5
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "validate-npm-package-name",
+ "version": "2.0.1",
+ "description": "Give me a string and I'll tell you if it's a valid npm package name",
+ "main": "index.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {
+ "builtins": "0.0.7"
+ },
+ "devDependencies": {
+ "tap": "^0.4.13"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/npm/validate-npm-package-name"
+ },
+ "keywords": [
+ "npm",
+ "package",
+ "names",
+ "validation"
+ ],
+ "author": {
+ "name": "zeke"
+ },
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/npm/validate-npm-package-name/issues"
+ },
+ "homepage": "https://github.com/npm/validate-npm-package-name",
+ "gitHead": "69f5c629525feeccfc941a6f1b9280ceed8a4b3a",
+ "_id": "validate-npm-package-name@2.0.1",
+ "_shasum": "ca006761b2b325f107fab172fb0cfcfc5e412c58",
+ "_from": "validate-npm-package-name@>=2.0.1 <3.0.0",
+ "_npmVersion": "2.2.0",
+ "_nodeVersion": "0.10.31",
+ "_npmUser": {
+ "name": "zeke",
+ "email": "zeke@npmjs.com"
+ },
+ "maintainers": [
+ {
+ "name": "zeke",
+ "email": "zeke@sikelianos.com"
+ }
+ ],
+ "dist": {
+ "shasum": "ca006761b2b325f107fab172fb0cfcfc5e412c58",
+ "tarball": "http://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-2.0.1.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-2.0.1.tgz"
+}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/test/index.js b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/test/index.js
new file mode 100644
index 0000000000..0a976dcc82
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/test/index.js
@@ -0,0 +1,97 @@
+var validate = require("..")
+var test = require("tap").test
+var path = require("path")
+var fs = require("fs")
+
+test("validate-npm-package-name", function (t) {
+
+ // Traditional
+
+ t.deepEqual(validate("some-package"), {validForNewPackages: true, validForOldPackages: true})
+ t.deepEqual(validate("example.com"), {validForNewPackages: true, validForOldPackages: true})
+ t.deepEqual(validate("under_score"), {validForNewPackages: true, validForOldPackages: true})
+ t.deepEqual(validate("period.js"), {validForNewPackages: true, validForOldPackages: true})
+ t.deepEqual(validate("123numeric"), {validForNewPackages: true, validForOldPackages: true})
+ t.deepEqual(validate("crazy!"), {validForNewPackages: true, validForOldPackages: true})
+
+ // Scoped (npm 2+)
+
+ t.deepEqual(validate("@npm/thingy"), {validForNewPackages: true, validForOldPackages: true})
+ t.deepEqual(validate("@npm-zors/money!time.js"), {validForNewPackages: true, validForOldPackages: true})
+
+ // Invalid
+
+ t.deepEqual(validate(""), {
+ validForNewPackages: false,
+ validForOldPackages: false,
+ errors: ["name length must be greater than zero"]})
+
+ t.deepEqual(validate(""), {
+ validForNewPackages: false,
+ validForOldPackages: false,
+ errors: ["name length must be greater than zero"]})
+
+ t.deepEqual(validate(".start-with-period"), {
+ validForNewPackages: false,
+ validForOldPackages: false,
+ errors: ["name cannot start with a period"]})
+
+ t.deepEqual(validate("_start-with-underscore"), {
+ validForNewPackages: false,
+ validForOldPackages: false,
+ errors: ["name cannot start with an underscore"]})
+
+ t.deepEqual(validate("contain:colons"), {
+ validForNewPackages: false,
+ validForOldPackages: false,
+ errors: ["name can only contain URL-friendly characters"]})
+
+ t.deepEqual(validate(" leading-space"), {
+ validForNewPackages: false,
+ validForOldPackages: false,
+ errors: ["name cannot contain leading or trailing spaces", "name can only contain URL-friendly characters"]})
+
+ t.deepEqual(validate("trailing-space "), {
+ validForNewPackages: false,
+ validForOldPackages: false,
+ errors: ["name cannot contain leading or trailing spaces", "name can only contain URL-friendly characters"]})
+
+ t.deepEqual(validate("s/l/a/s/h/e/s"), {
+ validForNewPackages: false,
+ validForOldPackages: false,
+ errors: ["name can only contain URL-friendly characters"]})
+
+ t.deepEqual(validate("node_modules"), {
+ validForNewPackages: false,
+ validForOldPackages: false,
+ errors: ["node_modules is a blacklisted name"]})
+
+ t.deepEqual(validate("favicon.ico"), {
+ validForNewPackages: false,
+ validForOldPackages: false,
+ errors: ["favicon.ico is a blacklisted name"]})
+
+ // Node/IO Core
+
+ t.deepEqual(validate("http"), {
+ validForNewPackages: false,
+ validForOldPackages: true,
+ warnings: ["http is a core module name"]})
+
+ // Long Package Names
+
+ t.deepEqual(validate("1234567890123456789012345678901234567890-more-than-fifty"), {
+ validForNewPackages: false,
+ validForOldPackages: true,
+ warnings: ["name can no longer contain more than 50 characters"]
+ })
+
+ // Legacy Mixed-Case
+
+ t.deepEqual(validate("CAPITAL-LETTERS"), {
+ validForNewPackages: false,
+ validForOldPackages: true,
+ warnings: ["name can no longer contain capital letters"]})
+
+ t.end()
+})
diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json
index a2fb3c7165..a7deb88231 100644
--- a/deps/npm/node_modules/init-package-json/package.json
+++ b/deps/npm/node_modules/init-package-json/package.json
@@ -1,13 +1,13 @@
{
"name": "init-package-json",
- "version": "1.3.0",
+ "version": "1.4.1",
"main": "init-package-json.js",
"scripts": {
"test": "tap test/*.js"
},
"repository": {
"type": "git",
- "url": "git://github.com/isaacs/init-package-json"
+ "url": "git://github.com/isaacs/init-package-json.git"
},
"author": {
"name": "Isaac Z. Schlueter",
@@ -17,16 +17,18 @@
"license": "ISC",
"description": "A node module to get your node module started",
"dependencies": {
- "glob": "^4.0.2",
- "promzard": "~0.2.0",
+ "glob": "^5.0.3",
+ "npm-package-arg": "^4.0.0",
+ "promzard": "^0.3.0",
"read": "~1.0.1",
- "read-package-json": "1",
- "semver": "2.x || 3.x || 4"
+ "read-package-json": "1 || 2",
+ "semver": "2.x || 3.x || 4",
+ "validate-npm-package-name": "^2.0.1"
},
"devDependencies": {
- "npm": "^2.1.4",
+ "npm": "^2",
"rimraf": "^2.1.4",
- "tap": "^0.4.13"
+ "tap": "^0.7.1"
},
"keywords": [
"init",
@@ -38,35 +40,14 @@
"prompt",
"start"
],
- "gitHead": "53273513f3fbaa017435ca6254d717cc27a85ddc",
+ "readme": "# init-package-json\n\nA node module to get your node module started.\n\n[![Build Status](https://secure.travis-ci.org/npm/init-package-json.svg)](http://travis-ci.org/npm/init-package-json)\n\n## Usage\n\n```javascript\nvar init = require('init-package-json')\nvar path = require('path')\n\n// a path to a promzard module. In the event that this file is\n// not found, one will be provided for you.\nvar initFile = path.resolve(process.env.HOME, '.npm-init')\n\n// the dir where we're doin stuff.\nvar dir = process.cwd()\n\n// extra stuff that gets put into the PromZard module's context.\n// In npm, this is the resolved config object. Exposed as 'config'\n// Optional.\nvar configData = { some: 'extra stuff' }\n\n// Any existing stuff from the package.json file is also exposed in the\n// PromZard module as the `package` object. There will also be free\n// vars for:\n// * `filename` path to the package.json file\n// * `basename` the tip of the package dir\n// * `dirname` the parent of the package dir\n\ninit(dir, initFile, configData, function (er, data) {\n // the data's already been written to {dir}/package.json\n // now you can do stuff with it\n})\n```\n\nOr from the command line:\n\n```\n$ npm-init\n```\n\nSee [PromZard](https://github.com/isaacs/promzard) for details about\nwhat can go in the config file.\n",
+ "readmeFilename": "README.md",
+ "gitHead": "037635311227464c4e512e79792616288683c3b9",
"bugs": {
"url": "https://github.com/isaacs/init-package-json/issues"
},
- "homepage": "https://github.com/isaacs/init-package-json",
- "_id": "init-package-json@1.3.0",
- "_shasum": "6bb76ed69dd1359581a6f1507d37d309658074d6",
- "_from": "init-package-json@>=1.3.0 <1.4.0",
- "_npmVersion": "2.6.1",
- "_nodeVersion": "1.2.0",
- "_npmUser": {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- }
- ],
- "dist": {
- "shasum": "6bb76ed69dd1359581a6f1507d37d309658074d6",
- "tarball": "http://registry.npmjs.org/init-package-json/-/init-package-json-1.3.0.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.3.0.tgz",
- "readme": "ERROR: No README data found!"
+ "homepage": "https://github.com/isaacs/init-package-json#readme",
+ "_id": "init-package-json@1.4.1",
+ "_shasum": "6f68a14e181941849d84f6861f946e0028716cee",
+ "_from": "init-package-json@>=1.4.1 <1.5.0"
}
diff --git a/deps/npm/node_modules/init-package-json/test/basic.input b/deps/npm/node_modules/init-package-json/test/basic.input
index b41ba5040c..ca309e9226 100644
--- a/deps/npm/node_modules/init-package-json/test/basic.input
+++ b/deps/npm/node_modules/init-package-json/test/basic.input
@@ -3,7 +3,7 @@ var assert = require('assert')
exports.name = prompt('name', package.name || basename)
exports.version = '1.2.5'
exports.description = prompt('description', package.description)
-exports.author = 'me <em@i.l> (http://url)'
+exports.author = 'npmbot <n@p.m> (http://npm.im)'
exports.scripts = package.scripts || {}
exports.scripts.test = 'make test'
exports.main = package.main || 'main.js'
diff --git a/deps/npm/node_modules/init-package-json/test/basic.js b/deps/npm/node_modules/init-package-json/test/basic.js
index e1c4486566..7e3134ee6c 100644
--- a/deps/npm/node_modules/init-package-json/test/basic.js
+++ b/deps/npm/node_modules/init-package-json/test/basic.js
@@ -1,6 +1,7 @@
var tap = require('tap')
var init = require('../')
var rimraf = require('rimraf')
+var semver = require('semver')
tap.test('the basics', function (t) {
var i = __dirname + '/basic.input'
@@ -11,7 +12,7 @@ tap.test('the basics', function (t) {
{ name: 'the-name',
version: '1.2.5',
description: 'description',
- author: 'me <em@i.l> (http://url)',
+ author: 'npmbot <n@p.m> (http://npm.im)',
scripts: { test: 'make test' },
main: 'main.js',
config: { foo: 'bar' },
@@ -19,15 +20,27 @@ tap.test('the basics', function (t) {
t.same(data, expect)
t.end()
})
- setTimeout(function () {
- process.stdin.emit('data', 'the-name\n')
- }, 50)
- setTimeout(function () {
- process.stdin.emit('data', 'description\n')
- }, 100)
- setTimeout(function () {
- process.stdin.emit('data', 'yes\n')
- }, 150)
+ var stdin = process.stdin
+ var name = 'the-name\n'
+ var desc = 'description\n'
+ var yes = 'yes\n'
+ if (semver.gte(process.versions.node, '0.11.0')) {
+ ;[name, desc, yes].forEach(function (chunk) {
+ stdin.push(chunk)
+ })
+ } else {
+ function input (chunk, ms) {
+ setTimeout(function () {
+ stdin.emit('data', chunk)
+ }, ms)
+ }
+ stdin.once('readable', function () {
+ var ms = 0
+ ;[name, desc, yes].forEach(function (chunk) {
+ input(chunk, ms += 50)
+ })
+ })
+ }
})
tap.test('teardown', function (t) {
diff --git a/deps/npm/node_modules/init-package-json/test/npm-defaults.js b/deps/npm/node_modules/init-package-json/test/npm-defaults.js
index f65f646316..666e9a1c49 100644
--- a/deps/npm/node_modules/init-package-json/test/npm-defaults.js
+++ b/deps/npm/node_modules/init-package-json/test/npm-defaults.js
@@ -14,7 +14,7 @@ var EXPECTED = {
test : 'echo "Error: no test specified" && exit 1'
},
keywords : [],
- author : "npmbot <n@p.m> (http://npm.im)",
+ author : "npmbot <n@p.m> (http://npm.im/)",
license : "WTFPL"
}
diff --git a/deps/npm/node_modules/init-package-json/test/scope-in-config.js b/deps/npm/node_modules/init-package-json/test/scope-in-config.js
new file mode 100644
index 0000000000..1fa83d9c13
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/test/scope-in-config.js
@@ -0,0 +1,47 @@
+var fs = require('fs')
+var path = require('path')
+
+var rimraf = require('rimraf')
+var tap = require('tap')
+
+var init = require('../')
+
+var EXPECT = {
+ name: '@scoped/test',
+ version: '1.0.0',
+ description: '',
+ author: '',
+ scripts: { test: 'echo \"Error: no test specified\" && exit 1' },
+ main: 'basic.js',
+ keywords: [],
+ license: 'ISC'
+}
+
+tap.test('--yes with scope', function (t) {
+ init(__dirname, __dirname, { yes: 'yes', scope: '@scoped' }, function (er, data) {
+ if (er) throw er
+
+ t.same(EXPECT, data)
+ t.end()
+ })
+})
+
+var json = {
+ name: '@already/scoped',
+ version: '1.0.0'
+}
+
+tap.test('with existing package.json', function (t) {
+ fs.writeFileSync(path.join(__dirname, 'package.json'), JSON.stringify(json, null, 2))
+ init(__dirname, __dirname, { yes: 'yes', scope: '@still' }, function (er, data) {
+ if (er) throw er
+
+ t.equal(data.name, '@still/scoped', 'new scope is added, basic name is kept')
+ t.end()
+ })
+})
+
+tap.test('teardown', function (t) {
+ rimraf.sync(path.join(__dirname, 'package.json'))
+ t.end()
+})
diff --git a/deps/npm/node_modules/init-package-json/test/scope.js b/deps/npm/node_modules/init-package-json/test/scope.js
index 7049a4db40..05968fcc05 100644
--- a/deps/npm/node_modules/init-package-json/test/scope.js
+++ b/deps/npm/node_modules/init-package-json/test/scope.js
@@ -1,35 +1,38 @@
-var tap = require('tap')
-var init = require('../')
-var rimraf = require('rimraf')
+var tap = require("tap")
+var init = require("../")
+var rimraf = require("rimraf")
-tap.test('the scope', function (t) {
- var i = __dirname + '/basic.input'
+var EXPECT = {
+ name: "@foo/test"
+ , version: "1.2.5"
+ , description: "description"
+ , author: "npmbot <n@p.m> (http://npm.im)"
+ , scripts: { test: "make test" }
+ , main: "main.js"
+ , config: { scope: "@foo" }
+ , package: {}
+}
+
+tap.test("the scope", function (t) {
+ var i = __dirname + "/basic.input"
var dir = __dirname
- init(dir, i, {scope: 'foo'}, function (er, data) {
+ init(dir, i, {scope: "@foo"}, function (er, data) {
if (er) throw er
- var expect =
- { name: '@foo/test',
- version: '1.2.5',
- description: 'description',
- author: 'me <em@i.l> (http://url)',
- scripts: { test: 'make test' },
- main: 'main.js',
- config: { scope: 'foo' },
- package: {} }
- t.same(data, expect)
+
+ t.same(EXPECT, data)
t.end()
})
setTimeout(function () {
- process.stdin.emit('data', '@foo/test\n')
+ process.stdin.emit("data", "@foo/test\n")
}, 50)
setTimeout(function () {
- process.stdin.emit('data', 'description\n')
+ process.stdin.emit("data", "description\n")
}, 100)
setTimeout(function () {
- process.stdin.emit('data', 'yes\n')
+ process.stdin.emit("data", "yes\n")
}, 150)
})
-tap.test('teardown', function (t) {
- rimraf(__dirname + '/package.json', t.end.bind(t))
+tap.test("teardown", function (t) {
+ rimraf(__dirname + "/package.json", t.end.bind(t))
})
diff --git a/deps/npm/node_modules/init-package-json/test/yes-defaults.js b/deps/npm/node_modules/init-package-json/test/yes-defaults.js
new file mode 100644
index 0000000000..f1d50c025c
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/test/yes-defaults.js
@@ -0,0 +1,27 @@
+var tap = require("tap")
+var init = require("../")
+var rimraf = require("rimraf")
+
+var EXPECT = {
+ name: "test"
+ , version: "1.0.0"
+ , description: ""
+ , author: ""
+ , scripts: { test: "echo \"Error: no test specified\" && exit 1" }
+ , main: "basic.js"
+ , keywords: []
+ , license: "ISC"
+}
+
+tap.test("--yes defaults", function (t) {
+ init(__dirname, __dirname, {yes: "yes"}, function (er, data) {
+ if (er) throw er
+
+ t.same(EXPECT, data, 'used the default data')
+ t.end()
+ })
+})
+
+tap.test("teardown", function (t) {
+ rimraf(__dirname + "/package.json", t.end.bind(t))
+})
diff --git a/deps/npm/node_modules/lru-cache/README.md b/deps/npm/node_modules/lru-cache/README.md
index 03ee0f9850..82a6dabd53 100644
--- a/deps/npm/node_modules/lru-cache/README.md
+++ b/deps/npm/node_modules/lru-cache/README.md
@@ -54,11 +54,12 @@ away.
## API
-* `set(key, value)`
+* `set(key, value, max)`
* `get(key) => value`
Both of these will update the "recently used"-ness of the key.
- They do what you think.
+ They do what you think. `max` is optional and overrides the
+ cache `max` option if provided.
* `peek(key)`
@@ -95,3 +96,14 @@ away.
* `values()`
Return an array of the values in the cache.
+
+* `length()`
+
+ Return total length of objects in cache taking into account
+ `length` options function.
+
+* `itemCount()`
+
+ Return total quantity of objects currently in cache. Note, that
+ `stale` (see options) items are returned as part of this item
+ count.
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 d1d1381720..575b4476c1 100644
--- a/deps/npm/node_modules/lru-cache/lib/lru-cache.js
+++ b/deps/npm/node_modules/lru-cache/lib/lru-cache.js
@@ -86,11 +86,13 @@ Object.defineProperty(LRUCache.prototype, "itemCount",
LRUCache.prototype.forEach = function (fn, thisp) {
thisp = thisp || this
- var i = 0;
- for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) {
+ var i = 0
+ var itemCount = this._itemCount
+
+ for (var k = this._mru - 1; k >= 0 && i < itemCount; k--) if (this._lruList[k]) {
i++
var hit = this._lruList[k]
- if (this._maxAge && (Date.now() - hit.now > this._maxAge)) {
+ if (isStale(this, hit)) {
del(this, hit)
if (!this._allowStale) hit = undefined
}
@@ -145,19 +147,24 @@ LRUCache.prototype.dumpLru = function () {
return this._lruList
}
-LRUCache.prototype.set = function (key, value) {
+LRUCache.prototype.set = function (key, value, maxAge) {
+ maxAge = maxAge || this._maxAge
+ var now = maxAge ? Date.now() : 0
+
if (hOP(this._cache, key)) {
// dispose of the old one before overwriting
- if (this._dispose) this._dispose(key, this._cache[key].value)
- if (this._maxAge) this._cache[key].now = Date.now()
+ if (this._dispose)
+ this._dispose(key, this._cache[key].value)
+
+ this._cache[key].now = now
+ this._cache[key].maxAge = maxAge
this._cache[key].value = value
this.get(key)
return true
}
var len = this._lengthCalculator(value)
- var age = this._maxAge ? Date.now() : 0
- var hit = new Entry(key, value, this._mru++, len, age)
+ var hit = new Entry(key, value, this._mru++, len, now, maxAge)
// oversized objects fall out of cache automatically.
if (hit.length > this._max) {
@@ -169,14 +176,16 @@ LRUCache.prototype.set = function (key, value) {
this._lruList[hit.lu] = this._cache[key] = hit
this._itemCount ++
- if (this._length > this._max) trim(this)
+ if (this._length > this._max)
+ trim(this)
+
return true
}
LRUCache.prototype.has = function (key) {
if (!hOP(this._cache, key)) return false
var hit = this._cache[key]
- if (this._maxAge && (Date.now() - hit.now > this._maxAge)) {
+ if (isStale(this, hit)) {
return false
}
return true
@@ -203,7 +212,7 @@ LRUCache.prototype.del = function (key) {
function get (self, key, doUse) {
var hit = self._cache[key]
if (hit) {
- if (self._maxAge && (Date.now() - hit.now > self._maxAge)) {
+ if (isStale(self, hit)) {
del(self, hit)
if (!self._allowStale) hit = undefined
} else {
@@ -214,9 +223,22 @@ function get (self, key, doUse) {
return hit
}
+function isStale(self, hit) {
+ if (!hit || (!hit.maxAge && !self._maxAge)) return false
+ var stale = false;
+ var diff = Date.now() - hit.now
+ if (hit.maxAge) {
+ stale = diff > hit.maxAge
+ } else {
+ stale = self._maxAge && (diff > self._maxAge)
+ }
+ return stale;
+}
+
function use (self, hit) {
shiftLU(self, hit)
hit.lu = self._mru ++
+ if (self._maxAge) hit.now = Date.now()
self._lruList[hit.lu] = hit
}
@@ -241,12 +263,13 @@ function del (self, hit) {
}
// classy, since V8 prefers predictable objects.
-function Entry (key, value, lu, length, now) {
+function Entry (key, value, lu, length, now, maxAge) {
this.key = key
this.value = value
this.lu = lu
this.length = length
this.now = now
+ if (maxAge) this.maxAge = maxAge
}
})()
diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json
index d3fbddbdfd..f6c859c1eb 100644
--- a/deps/npm/node_modules/lru-cache/package.json
+++ b/deps/npm/node_modules/lru-cache/package.json
@@ -1,11 +1,16 @@
{
"name": "lru-cache",
"description": "A cache object that deletes the least-recently-used items.",
- "version": "2.5.0",
+ "version": "2.6.1",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me"
},
+ "keywords": [
+ "mru",
+ "lru",
+ "cache"
+ ],
"scripts": {
"test": "tap test --gc"
},
@@ -15,19 +20,37 @@
"url": "git://github.com/isaacs/node-lru-cache.git"
},
"devDependencies": {
- "tap": "",
+ "tap": "^0.7.1",
"weak": ""
},
"license": {
"type": "MIT",
"url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE"
},
- "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n",
- "readmeFilename": "README.md",
+ "gitHead": "ff3dfd40e437fa619f09610f45d1ac523bbf27c9",
"bugs": {
"url": "https://github.com/isaacs/node-lru-cache/issues"
},
- "homepage": "https://github.com/isaacs/node-lru-cache",
- "_id": "lru-cache@2.5.0",
- "_from": "lru-cache@latest"
+ "homepage": "https://github.com/isaacs/node-lru-cache#readme",
+ "_id": "lru-cache@2.6.1",
+ "_shasum": "9933eff15453fae1d27096365143c724e85c6cbd",
+ "_from": "lru-cache@>=2.6.1 <2.7.0",
+ "_npmVersion": "2.8.1",
+ "_nodeVersion": "1.4.2",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ "dist": {
+ "shasum": "9933eff15453fae1d27096365143c724e85c6cbd",
+ "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.6.1.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.1.tgz"
}
diff --git a/deps/npm/node_modules/lru-cache/test/basic.js b/deps/npm/node_modules/lru-cache/test/basic.js
index f72697c461..949113e9ce 100644
--- a/deps/npm/node_modules/lru-cache/test/basic.js
+++ b/deps/npm/node_modules/lru-cache/test/basic.js
@@ -215,7 +215,7 @@ test("drop the old items", function(t) {
cache.set("c", "C")
// timed out
t.notOk(cache.get("a"))
- }, 60)
+ }, 60 + 25)
setTimeout(function () {
t.notOk(cache.get("b"))
@@ -228,6 +228,32 @@ test("drop the old items", function(t) {
}, 155)
})
+test("individual item can have it's own maxAge", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 50
+ })
+
+ cache.set("a", "A", 20)
+ setTimeout(function () {
+ t.notOk(cache.get("a"))
+ t.end()
+ }, 25)
+})
+
+test("individual item can have it's own maxAge > cache's", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 20
+ })
+
+ cache.set("a", "A", 50)
+ setTimeout(function () {
+ t.equal(cache.get("a"), "A")
+ t.end()
+ }, 25)
+})
+
test("disposal function", function(t) {
var disposed = false
var cache = new LRU({
diff --git a/deps/npm/node_modules/lru-cache/test/foreach.js b/deps/npm/node_modules/lru-cache/test/foreach.js
index eefb80d9d1..429ebc1242 100644
--- a/deps/npm/node_modules/lru-cache/test/foreach.js
+++ b/deps/npm/node_modules/lru-cache/test/foreach.js
@@ -28,6 +28,7 @@ test('forEach', function (t) {
t.equal(key, j.toString())
t.equal(val, j.toString(2))
})
+ t.equal(i, order.length);
t.end()
})
@@ -50,3 +51,71 @@ test('keys() and values()', function (t) {
t.end()
})
+
+test('all entries are iterated over', function(t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ var i = 0
+ l.forEach(function (val, key, cache) {
+ if (i > 0) {
+ cache.del(key)
+ }
+ i += 1
+ })
+
+ t.equal(i, 5)
+ t.equal(l.keys().length, 1)
+
+ t.end()
+})
+
+test('all stale entries are removed', function(t) {
+ var l = new LRU({ max: 5, maxAge: -5, stale: true })
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ var i = 0
+ l.forEach(function () {
+ i += 1
+ })
+
+ t.equal(i, 5)
+ t.equal(l.keys().length, 0)
+
+ t.end()
+})
+
+test('expires', function (t) {
+ var l = new LRU({
+ max: 10,
+ maxAge: 50
+ })
+ for (var i = 0; i < 10; i++) {
+ l.set(i.toString(), i.toString(2), ((i % 2) ? 25 : undefined))
+ }
+
+ var i = 0
+ var order = [ 8, 6, 4, 2, 0 ]
+ setTimeout(function () {
+ l.forEach(function (val, key, cache) {
+ var j = order[i++]
+ t.equal(cache, l)
+ t.equal(key, j.toString())
+ t.equal(val, j.toString(2))
+ })
+ t.equal(i, order.length);
+ t.end()
+
+ setTimeout(function () {
+ var count = 0;
+ l.forEach(function (val, key, cache) { count++; })
+ t.equal(0, count);
+ t.end()
+ }, 25)
+
+ }, 26)
+})
diff --git a/deps/npm/node_modules/lru-cache/test/timeout.js b/deps/npm/node_modules/lru-cache/test/timeout.js
new file mode 100644
index 0000000000..5dce62a9e3
--- /dev/null
+++ b/deps/npm/node_modules/lru-cache/test/timeout.js
@@ -0,0 +1,21 @@
+var test = require("tap").test
+var LRU = require("../")
+
+var cache = LRU( {
+ max: 1,
+ maxAge: 500
+} );
+
+test('set the key', function (t) {
+ cache.set( "1234", 1 );
+ t.end()
+})
+
+for (var i = 0; i < 10; i ++) {
+ test('get after ' + i + '00ms', function (t) {
+ setTimeout(function () {
+ t.equal(cache.get('1234'), 1)
+ t.end()
+ }, 100)
+ })
+}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md
index 9b5c617974..62bc7bae3f 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md
@@ -1,6 +1,6 @@
# brace-expansion
-[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
+[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
as known from sh/bash, in JavaScript.
[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js
index 36cde4de5c..60ecfc74d4 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js
@@ -5,3 +5,4 @@ console.log(expand('http://www.numericals.com/file{1..100..10}.txt'));
console.log(expand('http://www.letters.com/file{a..z..2}.txt'));
console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}'));
console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}'));
+
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js
index f8d40f79ac..a23104e955 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js
@@ -188,3 +188,4 @@ function expand(str, isTop) {
return expansions;
}
+
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile
index dd2730cfde..fa5da71a6d 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile
@@ -3,3 +3,4 @@ test:
@node_modules/.bin/tape test/*.js
.PHONY: test
+
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js
index 9ce76f480a..c02ad348e6 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js
@@ -2,3 +2,4 @@ var balanced = require('./');
console.log(balanced('{', '}', 'pre{in{nested}}post'));
console.log(balanced('{', '}', 'pre{first}between{second}post'));
+
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js
index fd1132826a..e429121eab 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js
@@ -7,3 +7,4 @@ test('empty option', function(t) {
]);
t.end();
});
+
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js
index 54d1e88f68..0862dc51f9 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js
@@ -13,3 +13,4 @@ test('nested', function(t) {
]);
t.end();
});
+
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js
index d5f62566c9..c00ad155fe 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js
@@ -7,3 +7,4 @@ test('order', function(t) {
]);
t.end();
});
+
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js
index f830f7c466..e4158775f1 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js
@@ -10,3 +10,4 @@ test('pad', function(t) {
]);
t.end();
});
+
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js
index 18ee665fb9..f73a9579ab 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js
@@ -47,3 +47,4 @@ test('alphabetic sequences with step count', function(t) {
]);
t.end();
});
+
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json
index fa65e262a3..ed83501e92 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json
@@ -58,6 +58,7 @@
"shasum": "83bea115803e7a097a78022427287edb762fafed",
"tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.4.tgz"
},
+ "directories": {},
"_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.4.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/package.json b/deps/npm/node_modules/node-gyp/node_modules/glob/package.json
index 7a2cb4c634..434e4696f8 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/glob/package.json
+++ b/deps/npm/node_modules/node-gyp/node_modules/glob/package.json
@@ -49,7 +49,7 @@
"homepage": "https://github.com/isaacs/node-glob",
"_id": "glob@4.5.3",
"_shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f",
- "_from": "glob@>=4.4.2 <5.0.0",
+ "_from": "glob@>=3.0.0 <4.0.0||>=4.0.0 <5.0.0",
"_npmVersion": "2.7.1",
"_nodeVersion": "1.4.2",
"_npmUser": {
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json
index bd516c2977..86b783a1d9 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json
+++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json
@@ -50,9 +50,5 @@
],
"_shasum": "66a2b3a749ae8b5fb89efd4fcc01dc94fbe02296",
"_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz",
- "_from": "sigmund@>=1.0.0 <1.1.0",
- "bugs": {
- "url": "https://github.com/isaacs/sigmund/issues"
- },
- "homepage": "https://github.com/isaacs/sigmund"
+ "_from": "sigmund@>=1.0.0 <1.1.0"
}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json b/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json
index 8bf46ccae0..ed21c51376 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json
+++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json
@@ -53,6 +53,5 @@
"tarball": "http://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz"
}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore
new file mode 100644
index 0000000000..c167ad5b1c
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore
@@ -0,0 +1,5 @@
+.*.swp
+node_modules
+examples/extract/
+test/tmp/
+test/fixtures/
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml b/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml
new file mode 100644
index 0000000000..fca8ef0194
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.10
+ - 0.11
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/LICENCE b/deps/npm/node_modules/node-gyp/node_modules/tar/LICENCE
new file mode 100644
index 0000000000..74489e2e26
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/LICENCE
@@ -0,0 +1,25 @@
+Copyright (c) Isaac Z. Schlueter
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/README.md b/deps/npm/node_modules/node-gyp/node_modules/tar/README.md
new file mode 100644
index 0000000000..424a2782bf
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/README.md
@@ -0,0 +1,48 @@
+# node-tar
+
+Tar for Node.js.
+
+[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)
+
+## API
+
+See `examples/` for usage examples.
+
+### var tar = require('tar')
+
+Returns an object with `.Pack`, `.Extract` and `.Parse` methods.
+
+### tar.Pack([properties])
+
+Returns a through stream. Use
+[fstream](https://npmjs.org/package/fstream) to write files into the
+pack stream and you will receive tar archive data from the pack
+stream.
+
+This only works with directories, it does not work with individual files.
+
+The optional `properties` object are used to set properties in the tar
+'Global Extended Header'.
+
+### tar.Extract([options])
+
+Returns a through stream. Write tar data to the stream and the files
+in the tarball will be extracted onto the filesystem.
+
+`options` can be:
+
+```js
+{
+ path: '/path/to/extract/tar/into',
+ strip: 0, // how many path segments to strip from the root when extracting
+}
+```
+
+`options` also get passed to the `fstream.Writer` instance that `tar`
+uses internally.
+
+### tar.Parse()
+
+Returns a writable stream. Write tar data to it and it will emit
+`entry` events for each entry parsed from the tarball. This is used by
+`tar.Extract`.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js
new file mode 100644
index 0000000000..f6253a72c5
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js
@@ -0,0 +1,19 @@
+var tar = require("../tar.js")
+ , fs = require("fs")
+
+
+function onError(err) {
+ console.error('An error occurred:', err)
+}
+
+function onEnd() {
+ console.log('Extracted!')
+}
+
+var extractor = tar.Extract({path: __dirname + "/extract"})
+ .on('error', onError)
+ .on('end', onEnd);
+
+fs.createReadStream(__dirname + "/../test/fixtures/c.tar")
+ .on('error', onError)
+ .pipe(extractor);
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js
new file mode 100644
index 0000000000..039969ce30
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js
@@ -0,0 +1,24 @@
+var tar = require("../tar.js")
+ , fstream = require("fstream")
+ , fs = require("fs")
+
+var dirDest = fs.createWriteStream('dir.tar')
+
+
+function onError(err) {
+ console.error('An error occurred:', err)
+}
+
+function onEnd() {
+ console.log('Packed!')
+}
+
+var packer = tar.Pack({ noProprietary: true })
+ .on('error', onError)
+ .on('end', onEnd);
+
+// This must be a "directory"
+fstream.Reader({ path: __dirname, type: "Directory" })
+ .on('error', onError)
+ .pipe(packer)
+ .pipe(dirDest)
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js
new file mode 100644
index 0000000000..39f3f0888a
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js
@@ -0,0 +1,36 @@
+var tar = require("../tar.js")
+ , fs = require("fs")
+
+fs.createReadStream(__dirname + "/../test/fixtures/c.tar")
+ .pipe(tar.Parse())
+ .on("extendedHeader", function (e) {
+ console.error("extended pax header", e.props)
+ e.on("end", function () {
+ console.error("extended pax fields:", e.fields)
+ })
+ })
+ .on("ignoredEntry", function (e) {
+ console.error("ignoredEntry?!?", e.props)
+ })
+ .on("longLinkpath", function (e) {
+ console.error("longLinkpath entry", e.props)
+ e.on("end", function () {
+ console.error("value=%j", e.body.toString())
+ })
+ })
+ .on("longPath", function (e) {
+ console.error("longPath entry", e.props)
+ e.on("end", function () {
+ console.error("value=%j", e.body.toString())
+ })
+ })
+ .on("entry", function (e) {
+ console.error("entry", e.props)
+ e.on("data", function (c) {
+ console.error(" >>>" + c.toString().replace(/\n/g, "\\n"))
+ })
+ e.on("end", function () {
+ console.error(" <<<EOF")
+ })
+ })
+
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js
new file mode 100644
index 0000000000..6c1da2373a
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js
@@ -0,0 +1,30 @@
+// just like the Entry class, but it buffers the contents
+//
+// XXX It would be good to set a maximum BufferEntry filesize,
+// since it eats up memory. In normal operation,
+// these are only for long filenames or link names, which are
+// rarely very big.
+
+module.exports = BufferEntry
+
+var inherits = require("inherits")
+ , Entry = require("./entry.js")
+
+function BufferEntry () {
+ Entry.apply(this, arguments)
+ this._buffer = new Buffer(this.props.size)
+ this._offset = 0
+ this.body = ""
+ this.on("end", function () {
+ this.body = this._buffer.toString().slice(0, -1)
+ })
+}
+
+inherits(BufferEntry, Entry)
+
+// collect the bytes as they come in.
+BufferEntry.prototype.write = function (c) {
+ c.copy(this._buffer, this._offset)
+ this._offset += c.length
+ Entry.prototype.write.call(this, c)
+}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js
new file mode 100644
index 0000000000..8e09042d01
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js
@@ -0,0 +1,169 @@
+module.exports = EntryWriter
+
+var tar = require("../tar.js")
+ , TarHeader = require("./header.js")
+ , Entry = require("./entry.js")
+ , inherits = require("inherits")
+ , BlockStream = require("block-stream")
+ , ExtendedHeaderWriter
+ , Stream = require("stream").Stream
+ , EOF = {}
+
+inherits(EntryWriter, Stream)
+
+function EntryWriter (props) {
+ var me = this
+
+ if (!(me instanceof EntryWriter)) {
+ return new EntryWriter(props)
+ }
+
+ Stream.apply(this)
+
+ me.writable = true
+ me.readable = true
+
+ me._stream = new BlockStream(512)
+
+ me._stream.on("data", function (c) {
+ me.emit("data", c)
+ })
+
+ me._stream.on("drain", function () {
+ me.emit("drain")
+ })
+
+ me._stream.on("end", function () {
+ me.emit("end")
+ me.emit("close")
+ })
+
+ me.props = props
+ if (props.type === "Directory") {
+ props.size = 0
+ }
+ props.ustar = "ustar\0"
+ props.ustarver = "00"
+ me.path = props.path
+
+ me._buffer = []
+ me._didHeader = false
+ me._meta = false
+
+ me.on("pipe", function () {
+ me._process()
+ })
+}
+
+EntryWriter.prototype.write = function (c) {
+ // console.error(".. ew write")
+ if (this._ended) return this.emit("error", new Error("write after end"))
+ this._buffer.push(c)
+ this._process()
+ this._needDrain = this._buffer.length > 0
+ return !this._needDrain
+}
+
+EntryWriter.prototype.end = function (c) {
+ // console.error(".. ew end")
+ if (c) this._buffer.push(c)
+ this._buffer.push(EOF)
+ this._ended = true
+ this._process()
+ this._needDrain = this._buffer.length > 0
+}
+
+EntryWriter.prototype.pause = function () {
+ // console.error(".. ew pause")
+ this._paused = true
+ this.emit("pause")
+}
+
+EntryWriter.prototype.resume = function () {
+ // console.error(".. ew resume")
+ this._paused = false
+ this.emit("resume")
+ this._process()
+}
+
+EntryWriter.prototype.add = function (entry) {
+ // console.error(".. ew add")
+ if (!this.parent) return this.emit("error", new Error("no parent"))
+
+ // make sure that the _header and such is emitted, and clear out
+ // the _currentEntry link on the parent.
+ if (!this._ended) this.end()
+
+ return this.parent.add(entry)
+}
+
+EntryWriter.prototype._header = function () {
+ // console.error(".. ew header")
+ if (this._didHeader) return
+ this._didHeader = true
+
+ var headerBlock = TarHeader.encode(this.props)
+
+ if (this.props.needExtended && !this._meta) {
+ var me = this
+
+ ExtendedHeaderWriter = ExtendedHeaderWriter ||
+ require("./extended-header-writer.js")
+
+ ExtendedHeaderWriter(this.props)
+ .on("data", function (c) {
+ me.emit("data", c)
+ })
+ .on("error", function (er) {
+ me.emit("error", er)
+ })
+ .end()
+ }
+
+ // console.error(".. .. ew headerBlock emitting")
+ this.emit("data", headerBlock)
+ this.emit("header")
+}
+
+EntryWriter.prototype._process = function () {
+ // console.error(".. .. ew process")
+ if (!this._didHeader && !this._meta) {
+ this._header()
+ }
+
+ if (this._paused || this._processing) {
+ // console.error(".. .. .. paused=%j, processing=%j", this._paused, this._processing)
+ return
+ }
+
+ this._processing = true
+
+ var buf = this._buffer
+ for (var i = 0; i < buf.length; i ++) {
+ // console.error(".. .. .. i=%d", i)
+
+ var c = buf[i]
+
+ if (c === EOF) this._stream.end()
+ else this._stream.write(c)
+
+ if (this._paused) {
+ // console.error(".. .. .. paused mid-emission")
+ this._processing = false
+ if (i < buf.length) {
+ this._needDrain = true
+ this._buffer = buf.slice(i + 1)
+ }
+ return
+ }
+ }
+
+ // console.error(".. .. .. emitted")
+ this._buffer.length = 0
+ this._processing = false
+
+ // console.error(".. .. .. emitting drain")
+ this.emit("drain")
+}
+
+EntryWriter.prototype.destroy = function () {}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js
new file mode 100644
index 0000000000..4af5c41083
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js
@@ -0,0 +1,213 @@
+// A passthrough read/write stream that sets its properties
+// based on a header, extendedHeader, and globalHeader
+//
+// Can be either a file system object of some sort, or
+// a pax/ustar metadata entry.
+
+module.exports = Entry
+
+var TarHeader = require("./header.js")
+ , tar = require("../tar")
+ , assert = require("assert").ok
+ , Stream = require("stream").Stream
+ , inherits = require("inherits")
+ , fstream = require("fstream").Abstract
+
+function Entry (header, extended, global) {
+ Stream.call(this)
+ this.readable = true
+ this.writable = true
+
+ this._needDrain = false
+ this._paused = false
+ this._reading = false
+ this._ending = false
+ this._ended = false
+ this._remaining = 0
+ this._queue = []
+ this._index = 0
+ this._queueLen = 0
+
+ this._read = this._read.bind(this)
+
+ this.props = {}
+ this._header = header
+ this._extended = extended || {}
+
+ // globals can change throughout the course of
+ // a file parse operation. Freeze it at its current state.
+ this._global = {}
+ var me = this
+ Object.keys(global || {}).forEach(function (g) {
+ me._global[g] = global[g]
+ })
+
+ this._setProps()
+}
+
+inherits(Entry, Stream)
+
+Entry.prototype.write = function (c) {
+ if (this._ending) this.error("write() after end()", null, true)
+ if (this._remaining === 0) {
+ this.error("invalid bytes past eof")
+ }
+
+ // often we'll get a bunch of \0 at the end of the last write,
+ // since chunks will always be 512 bytes when reading a tarball.
+ if (c.length > this._remaining) {
+ c = c.slice(0, this._remaining)
+ }
+ this._remaining -= c.length
+
+ // put it on the stack.
+ var ql = this._queueLen
+ this._queue.push(c)
+ this._queueLen ++
+
+ this._read()
+
+ // either paused, or buffered
+ if (this._paused || ql > 0) {
+ this._needDrain = true
+ return false
+ }
+
+ return true
+}
+
+Entry.prototype.end = function (c) {
+ if (c) this.write(c)
+ this._ending = true
+ this._read()
+}
+
+Entry.prototype.pause = function () {
+ this._paused = true
+ this.emit("pause")
+}
+
+Entry.prototype.resume = function () {
+ // console.error(" Tar Entry resume", this.path)
+ this.emit("resume")
+ this._paused = false
+ this._read()
+ return this._queueLen - this._index > 1
+}
+
+ // This is bound to the instance
+Entry.prototype._read = function () {
+ // console.error(" Tar Entry _read", this.path)
+
+ if (this._paused || this._reading || this._ended) return
+
+ // set this flag so that event handlers don't inadvertently
+ // get multiple _read() calls running.
+ this._reading = true
+
+ // have any data to emit?
+ while (this._index < this._queueLen && !this._paused) {
+ var chunk = this._queue[this._index ++]
+ this.emit("data", chunk)
+ }
+
+ // check if we're drained
+ if (this._index >= this._queueLen) {
+ this._queue.length = this._queueLen = this._index = 0
+ if (this._needDrain) {
+ this._needDrain = false
+ this.emit("drain")
+ }
+ if (this._ending) {
+ this._ended = true
+ this.emit("end")
+ }
+ }
+
+ // if the queue gets too big, then pluck off whatever we can.
+ // this should be fairly rare.
+ var mql = this._maxQueueLen
+ if (this._queueLen > mql && this._index > 0) {
+ mql = Math.min(this._index, mql)
+ this._index -= mql
+ this._queueLen -= mql
+ this._queue = this._queue.slice(mql)
+ }
+
+ this._reading = false
+}
+
+Entry.prototype._setProps = function () {
+ // props = extended->global->header->{}
+ var header = this._header
+ , extended = this._extended
+ , global = this._global
+ , props = this.props
+
+ // first get the values from the normal header.
+ var fields = tar.fields
+ for (var f = 0; fields[f] !== null; f ++) {
+ var field = fields[f]
+ , val = header[field]
+ if (typeof val !== "undefined") props[field] = val
+ }
+
+ // next, the global header for this file.
+ // numeric values, etc, will have already been parsed.
+ ;[global, extended].forEach(function (p) {
+ Object.keys(p).forEach(function (f) {
+ if (typeof p[f] !== "undefined") props[f] = p[f]
+ })
+ })
+
+ // no nulls allowed in path or linkpath
+ ;["path", "linkpath"].forEach(function (p) {
+ if (props.hasOwnProperty(p)) {
+ props[p] = props[p].split("\0")[0]
+ }
+ })
+
+
+ // set date fields to be a proper date
+ ;["mtime", "ctime", "atime"].forEach(function (p) {
+ if (props.hasOwnProperty(p)) {
+ props[p] = new Date(props[p] * 1000)
+ }
+ })
+
+ // set the type so that we know what kind of file to create
+ var type
+ switch (tar.types[props.type]) {
+ case "OldFile":
+ case "ContiguousFile":
+ type = "File"
+ break
+
+ case "GNUDumpDir":
+ type = "Directory"
+ break
+
+ case undefined:
+ type = "Unknown"
+ break
+
+ case "Link":
+ case "SymbolicLink":
+ case "CharacterDevice":
+ case "BlockDevice":
+ case "Directory":
+ case "FIFO":
+ default:
+ type = tar.types[props.type]
+ }
+
+ this.type = type
+ this.path = props.path
+ this.size = props.size
+
+ // size is special, since it signals when the file needs to end.
+ this._remaining = props.size
+}
+
+Entry.prototype.warn = fstream.warn
+Entry.prototype.error = fstream.error
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js
new file mode 100644
index 0000000000..1728c4583a
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js
@@ -0,0 +1,191 @@
+
+module.exports = ExtendedHeaderWriter
+
+var inherits = require("inherits")
+ , EntryWriter = require("./entry-writer.js")
+
+inherits(ExtendedHeaderWriter, EntryWriter)
+
+var tar = require("../tar.js")
+ , path = require("path")
+ , TarHeader = require("./header.js")
+
+// props is the props of the thing we need to write an
+// extended header for.
+// Don't be shy with it. Just encode everything.
+function ExtendedHeaderWriter (props) {
+ // console.error(">> ehw ctor")
+ var me = this
+
+ if (!(me instanceof ExtendedHeaderWriter)) {
+ return new ExtendedHeaderWriter(props)
+ }
+
+ me.fields = props
+
+ var p =
+ { path : ("PaxHeader" + path.join("/", props.path || ""))
+ .replace(/\\/g, "/").substr(0, 100)
+ , mode : props.mode || 0666
+ , uid : props.uid || 0
+ , gid : props.gid || 0
+ , size : 0 // will be set later
+ , mtime : props.mtime || Date.now() / 1000
+ , type : "x"
+ , linkpath : ""
+ , ustar : "ustar\0"
+ , ustarver : "00"
+ , uname : props.uname || ""
+ , gname : props.gname || ""
+ , devmaj : props.devmaj || 0
+ , devmin : props.devmin || 0
+ }
+
+
+ EntryWriter.call(me, p)
+ // console.error(">> ehw props", me.props)
+ me.props = p
+
+ me._meta = true
+}
+
+ExtendedHeaderWriter.prototype.end = function () {
+ // console.error(">> ehw end")
+ var me = this
+
+ if (me._ended) return
+ me._ended = true
+
+ me._encodeFields()
+
+ if (me.props.size === 0) {
+ // nothing to write!
+ me._ready = true
+ me._stream.end()
+ return
+ }
+
+ me._stream.write(TarHeader.encode(me.props))
+ me.body.forEach(function (l) {
+ me._stream.write(l)
+ })
+ me._ready = true
+
+ // console.error(">> ehw _process calling end()", me.props)
+ this._stream.end()
+}
+
+ExtendedHeaderWriter.prototype._encodeFields = function () {
+ // console.error(">> ehw _encodeFields")
+ this.body = []
+ if (this.fields.prefix) {
+ this.fields.path = this.fields.prefix + "/" + this.fields.path
+ this.fields.prefix = ""
+ }
+ encodeFields(this.fields, "", this.body, this.fields.noProprietary)
+ var me = this
+ this.body.forEach(function (l) {
+ me.props.size += l.length
+ })
+}
+
+function encodeFields (fields, prefix, body, nop) {
+ // console.error(">> >> ehw encodeFields")
+ // "%d %s=%s\n", <length>, <keyword>, <value>
+ // The length is a decimal number, and includes itself and the \n
+ // Numeric values are decimal strings.
+
+ Object.keys(fields).forEach(function (k) {
+ var val = fields[k]
+ , numeric = tar.numeric[k]
+
+ if (prefix) k = prefix + "." + k
+
+ // already including NODETAR.type, don't need File=true also
+ if (k === fields.type && val === true) return
+
+ switch (k) {
+ // don't include anything that's always handled just fine
+ // in the normal header, or only meaningful in the context
+ // of nodetar
+ case "mode":
+ case "cksum":
+ case "ustar":
+ case "ustarver":
+ case "prefix":
+ case "basename":
+ case "dirname":
+ case "needExtended":
+ case "block":
+ case "filter":
+ return
+
+ case "rdev":
+ if (val === 0) return
+ break
+
+ case "nlink":
+ case "dev": // Truly a hero among men, Creator of Star!
+ case "ino": // Speak his name with reverent awe! It is:
+ k = "SCHILY." + k
+ break
+
+ default: break
+ }
+
+ if (val && typeof val === "object" &&
+ !Buffer.isBuffer(val)) encodeFields(val, k, body, nop)
+ else if (val === null || val === undefined) return
+ else body.push.apply(body, encodeField(k, val, nop))
+ })
+
+ return body
+}
+
+function encodeField (k, v, nop) {
+ // lowercase keys must be valid, otherwise prefix with
+ // "NODETAR."
+ if (k.charAt(0) === k.charAt(0).toLowerCase()) {
+ var m = k.split(".")[0]
+ if (!tar.knownExtended[m]) k = "NODETAR." + k
+ }
+
+ // no proprietary
+ if (nop && k.charAt(0) !== k.charAt(0).toLowerCase()) {
+ return []
+ }
+
+ if (typeof val === "number") val = val.toString(10)
+
+ var s = new Buffer(" " + k + "=" + v + "\n")
+ , digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1
+
+ // console.error("1 s=%j digits=%j s.length=%d", s.toString(), digits, s.length)
+
+ // if adding that many digits will make it go over that length,
+ // then add one to it. For example, if the string is:
+ // " foo=bar\n"
+ // then that's 9 characters. With the "9", that bumps the length
+ // up to 10. However, this is invalid:
+ // "10 foo=bar\n"
+ // but, since that's actually 11 characters, since 10 adds another
+ // character to the length, and the length includes the number
+ // itself. In that case, just bump it up again.
+ if (s.length + digits >= Math.pow(10, digits)) digits += 1
+ // console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length)
+
+ var len = digits + s.length
+ // console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len)
+ var lenBuf = new Buffer("" + len)
+ if (lenBuf.length + s.length !== len) {
+ throw new Error("Bad length calculation\n"+
+ "len="+len+"\n"+
+ "lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+
+ "lenBuf.length="+lenBuf.length+"\n"+
+ "digits="+digits+"\n"+
+ "s="+JSON.stringify(s.toString())+"\n"+
+ "s.length="+s.length)
+ }
+
+ return [lenBuf, s]
+}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js
new file mode 100644
index 0000000000..74f432ceee
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js
@@ -0,0 +1,140 @@
+// An Entry consisting of:
+//
+// "%d %s=%s\n", <length>, <keyword>, <value>
+//
+// The length is a decimal number, and includes itself and the \n
+// \0 does not terminate anything. Only the length terminates the string.
+// Numeric values are decimal strings.
+
+module.exports = ExtendedHeader
+
+var Entry = require("./entry.js")
+ , inherits = require("inherits")
+ , tar = require("../tar.js")
+ , numeric = tar.numeric
+ , keyTrans = { "SCHILY.dev": "dev"
+ , "SCHILY.ino": "ino"
+ , "SCHILY.nlink": "nlink" }
+
+function ExtendedHeader () {
+ Entry.apply(this, arguments)
+ this.on("data", this._parse)
+ this.fields = {}
+ this._position = 0
+ this._fieldPos = 0
+ this._state = SIZE
+ this._sizeBuf = []
+ this._keyBuf = []
+ this._valBuf = []
+ this._size = -1
+ this._key = ""
+}
+
+inherits(ExtendedHeader, Entry)
+ExtendedHeader.prototype._parse = parse
+
+var s = 0
+ , states = ExtendedHeader.states = {}
+ , SIZE = states.SIZE = s++
+ , KEY = states.KEY = s++
+ , VAL = states.VAL = s++
+ , ERR = states.ERR = s++
+
+Object.keys(states).forEach(function (s) {
+ states[states[s]] = states[s]
+})
+
+states[s] = null
+
+// char code values for comparison
+var _0 = "0".charCodeAt(0)
+ , _9 = "9".charCodeAt(0)
+ , point = ".".charCodeAt(0)
+ , a = "a".charCodeAt(0)
+ , Z = "Z".charCodeAt(0)
+ , a = "a".charCodeAt(0)
+ , z = "z".charCodeAt(0)
+ , space = " ".charCodeAt(0)
+ , eq = "=".charCodeAt(0)
+ , cr = "\n".charCodeAt(0)
+
+function parse (c) {
+ if (this._state === ERR) return
+
+ for ( var i = 0, l = c.length
+ ; i < l
+ ; this._position++, this._fieldPos++, i++) {
+ // console.error("top of loop, size="+this._size)
+
+ var b = c[i]
+
+ if (this._size >= 0 && this._fieldPos > this._size) {
+ error(this, "field exceeds length="+this._size)
+ return
+ }
+
+ switch (this._state) {
+ case ERR: return
+
+ case SIZE:
+ // console.error("parsing size, b=%d, rest=%j", b, c.slice(i).toString())
+ if (b === space) {
+ this._state = KEY
+ // this._fieldPos = this._sizeBuf.length
+ this._size = parseInt(new Buffer(this._sizeBuf).toString(), 10)
+ this._sizeBuf.length = 0
+ continue
+ }
+ if (b < _0 || b > _9) {
+ error(this, "expected [" + _0 + ".." + _9 + "], got " + b)
+ return
+ }
+ this._sizeBuf.push(b)
+ continue
+
+ case KEY:
+ // can be any char except =, not > size.
+ if (b === eq) {
+ this._state = VAL
+ this._key = new Buffer(this._keyBuf).toString()
+ if (keyTrans[this._key]) this._key = keyTrans[this._key]
+ this._keyBuf.length = 0
+ continue
+ }
+ this._keyBuf.push(b)
+ continue
+
+ case VAL:
+ // field must end with cr
+ if (this._fieldPos === this._size - 1) {
+ // console.error("finished with "+this._key)
+ if (b !== cr) {
+ error(this, "expected \\n at end of field")
+ return
+ }
+ var val = new Buffer(this._valBuf).toString()
+ if (numeric[this._key]) {
+ val = parseFloat(val)
+ }
+ this.fields[this._key] = val
+
+ this._valBuf.length = 0
+ this._state = SIZE
+ this._size = -1
+ this._fieldPos = -1
+ continue
+ }
+ this._valBuf.push(b)
+ continue
+ }
+ }
+}
+
+function error (me, msg) {
+ msg = "invalid header: " + msg
+ + "\nposition=" + me._position
+ + "\nfield position=" + me._fieldPos
+
+ me.error(msg)
+ me.state = ERR
+}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js
new file mode 100644
index 0000000000..9fb1e6fb1b
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js
@@ -0,0 +1,86 @@
+// give it a tarball and a path, and it'll dump the contents
+
+module.exports = Extract
+
+var tar = require("../tar.js")
+ , fstream = require("fstream")
+ , inherits = require("inherits")
+ , path = require("path")
+
+function Extract (opts) {
+ if (!(this instanceof Extract)) return new Extract(opts)
+ tar.Parse.apply(this)
+
+ // have to dump into a directory
+ opts.type = "Directory"
+ opts.Directory = true
+
+ if (typeof opts !== "object") {
+ opts = { path: opts }
+ }
+
+ // better to drop in cwd? seems more standard.
+ opts.path = opts.path || path.resolve("node-tar-extract")
+ opts.type = "Directory"
+ opts.Directory = true
+
+ // similar to --strip or --strip-components
+ opts.strip = +opts.strip
+ if (!opts.strip || opts.strip <= 0) opts.strip = 0
+
+ this._fst = fstream.Writer(opts)
+
+ this.pause()
+ var me = this
+
+ // Hardlinks in tarballs are relative to the root
+ // of the tarball. So, they need to be resolved against
+ // the target directory in order to be created properly.
+ me.on("entry", function (entry) {
+ // if there's a "strip" argument, then strip off that many
+ // path components.
+ if (opts.strip) {
+ var p = entry.path.split("/").slice(opts.strip).join("/")
+ entry.path = entry.props.path = p
+ if (entry.linkpath) {
+ var lp = entry.linkpath.split("/").slice(opts.strip).join("/")
+ entry.linkpath = entry.props.linkpath = lp
+ }
+ }
+ if (entry.type !== "Link") return
+ entry.linkpath = entry.props.linkpath =
+ path.join(opts.path, path.join("/", entry.props.linkpath))
+ })
+
+ this._fst.on("ready", function () {
+ me.pipe(me._fst, { end: false })
+ me.resume()
+ })
+
+ this._fst.on('error', function(err) {
+ me.emit('error', err)
+ })
+
+ this._fst.on('drain', function() {
+ me.emit('drain')
+ })
+
+ // this._fst.on("end", function () {
+ // console.error("\nEEEE Extract End", me._fst.path)
+ // })
+
+ this._fst.on("close", function () {
+ // console.error("\nEEEE Extract End", me._fst.path)
+ me.emit("end")
+ me.emit("close")
+ })
+}
+
+inherits(Extract, tar.Parse)
+
+Extract.prototype._streamEnd = function () {
+ var me = this
+ if (!me._ended) me.error("unexpected eof")
+ me._fst.end()
+ // my .end() is coming later.
+}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js
new file mode 100644
index 0000000000..0bfc7b80aa
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js
@@ -0,0 +1,14 @@
+module.exports = GlobalHeaderWriter
+
+var ExtendedHeaderWriter = require("./extended-header-writer.js")
+ , inherits = require("inherits")
+
+inherits(GlobalHeaderWriter, ExtendedHeaderWriter)
+
+function GlobalHeaderWriter (props) {
+ if (!(this instanceof GlobalHeaderWriter)) {
+ return new GlobalHeaderWriter(props)
+ }
+ ExtendedHeaderWriter.call(this, props)
+ this.props.type = "g"
+}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js
new file mode 100644
index 0000000000..05b237c0c7
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js
@@ -0,0 +1,385 @@
+// parse a 512-byte header block to a data object, or vice-versa
+// If the data won't fit nicely in a simple header, then generate
+// the appropriate extended header file, and return that.
+
+module.exports = TarHeader
+
+var tar = require("../tar.js")
+ , fields = tar.fields
+ , fieldOffs = tar.fieldOffs
+ , fieldEnds = tar.fieldEnds
+ , fieldSize = tar.fieldSize
+ , numeric = tar.numeric
+ , assert = require("assert").ok
+ , space = " ".charCodeAt(0)
+ , slash = "/".charCodeAt(0)
+ , bslash = process.platform === "win32" ? "\\".charCodeAt(0) : null
+
+function TarHeader (block) {
+ if (!(this instanceof TarHeader)) return new TarHeader(block)
+ if (block) this.decode(block)
+}
+
+TarHeader.prototype =
+ { decode : decode
+ , encode: encode
+ , calcSum: calcSum
+ , checkSum: checkSum
+ }
+
+TarHeader.parseNumeric = parseNumeric
+TarHeader.encode = encode
+TarHeader.decode = decode
+
+// note that this will only do the normal ustar header, not any kind
+// of extended posix header file. If something doesn't fit comfortably,
+// then it will set obj.needExtended = true, and set the block to
+// the closest approximation.
+function encode (obj) {
+ if (!obj && !(this instanceof TarHeader)) throw new Error(
+ "encode must be called on a TarHeader, or supplied an object")
+
+ obj = obj || this
+ var block = obj.block = new Buffer(512)
+
+ // if the object has a "prefix", then that's actually an extension of
+ // the path field.
+ if (obj.prefix) {
+ // console.error("%% header encoding, got a prefix", obj.prefix)
+ obj.path = obj.prefix + "/" + obj.path
+ // console.error("%% header encoding, prefixed path", obj.path)
+ obj.prefix = ""
+ }
+
+ obj.needExtended = false
+
+ if (obj.mode) {
+ if (typeof obj.mode === "string") obj.mode = parseInt(obj.mode, 8)
+ obj.mode = obj.mode & 0777
+ }
+
+ for (var f = 0; fields[f] !== null; f ++) {
+ var field = fields[f]
+ , off = fieldOffs[f]
+ , end = fieldEnds[f]
+ , ret
+
+ switch (field) {
+ case "cksum":
+ // special, done below, after all the others
+ break
+
+ case "prefix":
+ // special, this is an extension of the "path" field.
+ // console.error("%% header encoding, skip prefix later")
+ break
+
+ case "type":
+ // convert from long name to a single char.
+ var type = obj.type || "0"
+ if (type.length > 1) {
+ type = tar.types[obj.type]
+ if (!type) type = "0"
+ }
+ writeText(block, off, end, type)
+ break
+
+ case "path":
+ // uses the "prefix" field if > 100 bytes, but <= 255
+ var pathLen = Buffer.byteLength(obj.path)
+ , pathFSize = fieldSize[fields.path]
+ , prefFSize = fieldSize[fields.prefix]
+
+ // paths between 100 and 255 should use the prefix field.
+ // longer than 255
+ if (pathLen > pathFSize &&
+ pathLen <= pathFSize + prefFSize) {
+ // need to find a slash somewhere in the middle so that
+ // path and prefix both fit in their respective fields
+ var searchStart = pathLen - 1 - pathFSize
+ , searchEnd = prefFSize
+ , found = false
+ , pathBuf = new Buffer(obj.path)
+
+ for ( var s = searchStart
+ ; (s <= searchEnd)
+ ; s ++ ) {
+ if (pathBuf[s] === slash || pathBuf[s] === bslash) {
+ found = s
+ break
+ }
+ }
+
+ if (found !== false) {
+ prefix = pathBuf.slice(0, found).toString("utf8")
+ path = pathBuf.slice(found + 1).toString("utf8")
+
+ ret = writeText(block, off, end, path)
+ off = fieldOffs[fields.prefix]
+ end = fieldEnds[fields.prefix]
+ // console.error("%% header writing prefix", off, end, prefix)
+ ret = writeText(block, off, end, prefix) || ret
+ break
+ }
+ }
+
+ // paths less than 100 chars don't need a prefix
+ // and paths longer than 255 need an extended header and will fail
+ // on old implementations no matter what we do here.
+ // Null out the prefix, and fallthrough to default.
+ // console.error("%% header writing no prefix")
+ var poff = fieldOffs[fields.prefix]
+ , pend = fieldEnds[fields.prefix]
+ writeText(block, poff, pend, "")
+ // fallthrough
+
+ // all other fields are numeric or text
+ default:
+ ret = numeric[field]
+ ? writeNumeric(block, off, end, obj[field])
+ : writeText(block, off, end, obj[field] || "")
+ break
+ }
+ obj.needExtended = obj.needExtended || ret
+ }
+
+ var off = fieldOffs[fields.cksum]
+ , end = fieldEnds[fields.cksum]
+
+ writeNumeric(block, off, end, calcSum.call(this, block))
+
+ return block
+}
+
+// if it's a negative number, or greater than will fit,
+// then use write256.
+var MAXNUM = { 12: 077777777777
+ , 11: 07777777777
+ , 8 : 07777777
+ , 7 : 0777777 }
+function writeNumeric (block, off, end, num) {
+ var writeLen = end - off
+ , maxNum = MAXNUM[writeLen] || 0
+
+ num = num || 0
+ // console.error(" numeric", num)
+
+ if (num instanceof Date ||
+ Object.prototype.toString.call(num) === "[object Date]") {
+ num = num.getTime() / 1000
+ }
+
+ if (num > maxNum || num < 0) {
+ write256(block, off, end, num)
+ // need an extended header if negative or too big.
+ return true
+ }
+
+ // god, tar is so annoying
+ // if the string is small enough, you should put a space
+ // between the octal string and the \0, but if it doesn't
+ // fit, then don't.
+ var numStr = Math.floor(num).toString(8)
+ if (num < MAXNUM[writeLen - 1]) numStr += " "
+
+ // pad with "0" chars
+ if (numStr.length < writeLen) {
+ numStr = (new Array(writeLen - numStr.length).join("0")) + numStr
+ }
+
+ if (numStr.length !== writeLen - 1) {
+ throw new Error("invalid length: " + JSON.stringify(numStr) + "\n" +
+ "expected: "+writeLen)
+ }
+ block.write(numStr, off, writeLen, "utf8")
+ block[end - 1] = 0
+}
+
+function write256 (block, off, end, num) {
+ var buf = block.slice(off, end)
+ var positive = num >= 0
+ buf[0] = positive ? 0x80 : 0xFF
+
+ // get the number as a base-256 tuple
+ if (!positive) num *= -1
+ var tuple = []
+ do {
+ var n = num % 256
+ tuple.push(n)
+ num = (num - n) / 256
+ } while (num)
+
+ var bytes = tuple.length
+
+ var fill = buf.length - bytes
+ for (var i = 1; i < fill; i ++) {
+ buf[i] = positive ? 0 : 0xFF
+ }
+
+ // tuple is a base256 number, with [0] as the *least* significant byte
+ // if it's negative, then we need to flip all the bits once we hit the
+ // first non-zero bit. The 2's-complement is (0x100 - n), and the 1's-
+ // complement is (0xFF - n).
+ var zero = true
+ for (i = bytes; i > 0; i --) {
+ var byte = tuple[bytes - i]
+ if (positive) buf[fill + i] = byte
+ else if (zero && byte === 0) buf[fill + i] = 0
+ else if (zero) {
+ zero = false
+ buf[fill + i] = 0x100 - byte
+ } else buf[fill + i] = 0xFF - byte
+ }
+}
+
+function writeText (block, off, end, str) {
+ // strings are written as utf8, then padded with \0
+ var strLen = Buffer.byteLength(str)
+ , writeLen = Math.min(strLen, end - off)
+ // non-ascii fields need extended headers
+ // long fields get truncated
+ , needExtended = strLen !== str.length || strLen > writeLen
+
+ // write the string, and null-pad
+ if (writeLen > 0) block.write(str, off, writeLen, "utf8")
+ for (var i = off + writeLen; i < end; i ++) block[i] = 0
+
+ return needExtended
+}
+
+function calcSum (block) {
+ block = block || this.block
+ assert(Buffer.isBuffer(block) && block.length === 512)
+
+ if (!block) throw new Error("Need block to checksum")
+
+ // now figure out what it would be if the cksum was " "
+ var sum = 0
+ , start = fieldOffs[fields.cksum]
+ , end = fieldEnds[fields.cksum]
+
+ for (var i = 0; i < fieldOffs[fields.cksum]; i ++) {
+ sum += block[i]
+ }
+
+ for (var i = start; i < end; i ++) {
+ sum += space
+ }
+
+ for (var i = end; i < 512; i ++) {
+ sum += block[i]
+ }
+
+ return sum
+}
+
+
+function checkSum (block) {
+ var sum = calcSum.call(this, block)
+ block = block || this.block
+
+ var cksum = block.slice(fieldOffs[fields.cksum], fieldEnds[fields.cksum])
+ cksum = parseNumeric(cksum)
+
+ return cksum === sum
+}
+
+function decode (block) {
+ block = block || this.block
+ assert(Buffer.isBuffer(block) && block.length === 512)
+
+ this.block = block
+ this.cksumValid = this.checkSum()
+
+ var prefix = null
+
+ // slice off each field.
+ for (var f = 0; fields[f] !== null; f ++) {
+ var field = fields[f]
+ , val = block.slice(fieldOffs[f], fieldEnds[f])
+
+ switch (field) {
+ case "ustar":
+ // if not ustar, then everything after that is just padding.
+ if (val.toString() !== "ustar\0") {
+ this.ustar = false
+ return
+ } else {
+ // console.error("ustar:", val, val.toString())
+ this.ustar = val.toString()
+ }
+ break
+
+ // prefix is special, since it might signal the xstar header
+ case "prefix":
+ var atime = parseNumeric(val.slice(131, 131 + 12))
+ , ctime = parseNumeric(val.slice(131 + 12, 131 + 12 + 12))
+ if ((val[130] === 0 || val[130] === space) &&
+ typeof atime === "number" &&
+ typeof ctime === "number" &&
+ val[131 + 12] === space &&
+ val[131 + 12 + 12] === space) {
+ this.atime = atime
+ this.ctime = ctime
+ val = val.slice(0, 130)
+ }
+ prefix = val.toString("utf8").replace(/\0+$/, "")
+ // console.error("%% header reading prefix", prefix)
+ break
+
+ // all other fields are null-padding text
+ // or a number.
+ default:
+ if (numeric[field]) {
+ this[field] = parseNumeric(val)
+ } else {
+ this[field] = val.toString("utf8").replace(/\0+$/, "")
+ }
+ break
+ }
+ }
+
+ // if we got a prefix, then prepend it to the path.
+ if (prefix) {
+ this.path = prefix + "/" + this.path
+ // console.error("%% header got a prefix", this.path)
+ }
+}
+
+function parse256 (buf) {
+ // first byte MUST be either 80 or FF
+ // 80 for positive, FF for 2's comp
+ var positive
+ if (buf[0] === 0x80) positive = true
+ else if (buf[0] === 0xFF) positive = false
+ else return null
+
+ // build up a base-256 tuple from the least sig to the highest
+ var zero = false
+ , tuple = []
+ for (var i = buf.length - 1; i > 0; i --) {
+ var byte = buf[i]
+ if (positive) tuple.push(byte)
+ else if (zero && byte === 0) tuple.push(0)
+ else if (zero) {
+ zero = false
+ tuple.push(0x100 - byte)
+ } else tuple.push(0xFF - byte)
+ }
+
+ for (var sum = 0, i = 0, l = tuple.length; i < l; i ++) {
+ sum += tuple[i] * Math.pow(256, i)
+ }
+
+ return positive ? sum : -1 * sum
+}
+
+function parseNumeric (f) {
+ if (f[0] & 0x80) return parse256(f)
+
+ var str = f.toString("utf8").split("\0")[0].trim()
+ , res = parseInt(str, 8)
+
+ return isNaN(res) ? null : res
+}
+
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js
new file mode 100644
index 0000000000..3ff14dd695
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js
@@ -0,0 +1,231 @@
+// pipe in an fstream, and it'll make a tarball.
+// key-value pair argument is global extended header props.
+
+module.exports = Pack
+
+var EntryWriter = require("./entry-writer.js")
+ , Stream = require("stream").Stream
+ , path = require("path")
+ , inherits = require("inherits")
+ , GlobalHeaderWriter = require("./global-header-writer.js")
+ , collect = require("fstream").collect
+ , eof = new Buffer(512)
+
+for (var i = 0; i < 512; i ++) eof[i] = 0
+
+inherits(Pack, Stream)
+
+function Pack (props) {
+ // console.error("-- p ctor")
+ var me = this
+ if (!(me instanceof Pack)) return new Pack(props)
+
+ if (props) me._noProprietary = props.noProprietary
+ else me._noProprietary = false
+
+ me._global = props
+
+ me.readable = true
+ me.writable = true
+ me._buffer = []
+ // console.error("-- -- set current to null in ctor")
+ me._currentEntry = null
+ me._processing = false
+
+ me._pipeRoot = null
+ me.on("pipe", function (src) {
+ if (src.root === me._pipeRoot) return
+ me._pipeRoot = src
+ src.on("end", function () {
+ me._pipeRoot = null
+ })
+ me.add(src)
+ })
+}
+
+Pack.prototype.addGlobal = function (props) {
+ // console.error("-- p addGlobal")
+ if (this._didGlobal) return
+ this._didGlobal = true
+
+ var me = this
+ GlobalHeaderWriter(props)
+ .on("data", function (c) {
+ me.emit("data", c)
+ })
+ .end()
+}
+
+Pack.prototype.add = function (stream) {
+ if (this._global && !this._didGlobal) this.addGlobal(this._global)
+
+ if (this._ended) return this.emit("error", new Error("add after end"))
+
+ collect(stream)
+ this._buffer.push(stream)
+ this._process()
+ this._needDrain = this._buffer.length > 0
+ return !this._needDrain
+}
+
+Pack.prototype.pause = function () {
+ this._paused = true
+ if (this._currentEntry) this._currentEntry.pause()
+ this.emit("pause")
+}
+
+Pack.prototype.resume = function () {
+ this._paused = false
+ if (this._currentEntry) this._currentEntry.resume()
+ this.emit("resume")
+ this._process()
+}
+
+Pack.prototype.end = function () {
+ this._ended = true
+ this._buffer.push(eof)
+ this._process()
+}
+
+Pack.prototype._process = function () {
+ var me = this
+ if (me._paused || me._processing) {
+ return
+ }
+
+ var entry = me._buffer.shift()
+
+ if (!entry) {
+ if (me._needDrain) {
+ me.emit("drain")
+ }
+ return
+ }
+
+ if (entry.ready === false) {
+ // console.error("-- entry is not ready", entry)
+ me._buffer.unshift(entry)
+ entry.on("ready", function () {
+ // console.error("-- -- ready!", entry)
+ me._process()
+ })
+ return
+ }
+
+ me._processing = true
+
+ if (entry === eof) {
+ // need 2 ending null blocks.
+ me.emit("data", eof)
+ me.emit("data", eof)
+ me.emit("end")
+ me.emit("close")
+ return
+ }
+
+ // Change the path to be relative to the root dir that was
+ // added to the tarball.
+ //
+ // XXX This should be more like how -C works, so you can
+ // explicitly set a root dir, and also explicitly set a pathname
+ // in the tarball to use. That way we can skip a lot of extra
+ // work when resolving symlinks for bundled dependencies in npm.
+
+ var root = path.dirname((entry.root || entry).path)
+ var wprops = {}
+
+ Object.keys(entry.props || {}).forEach(function (k) {
+ wprops[k] = entry.props[k]
+ })
+
+ if (me._noProprietary) wprops.noProprietary = true
+
+ wprops.path = path.relative(root, entry.path || '')
+
+ // actually not a matter of opinion or taste.
+ if (process.platform === "win32") {
+ wprops.path = wprops.path.replace(/\\/g, "/")
+ }
+
+ if (!wprops.type)
+ wprops.type = 'Directory'
+
+ switch (wprops.type) {
+ // sockets not supported
+ case "Socket":
+ return
+
+ case "Directory":
+ wprops.path += "/"
+ wprops.size = 0
+ break
+
+ case "Link":
+ var lp = path.resolve(path.dirname(entry.path), entry.linkpath)
+ wprops.linkpath = path.relative(root, lp) || "."
+ wprops.size = 0
+ break
+
+ case "SymbolicLink":
+ var lp = path.resolve(path.dirname(entry.path), entry.linkpath)
+ wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "."
+ wprops.size = 0
+ break
+ }
+
+ // console.error("-- new writer", wprops)
+ // if (!wprops.type) {
+ // // console.error("-- no type?", entry.constructor.name, entry)
+ // }
+
+ // console.error("-- -- set current to new writer", wprops.path)
+ var writer = me._currentEntry = EntryWriter(wprops)
+
+ writer.parent = me
+
+ // writer.on("end", function () {
+ // // console.error("-- -- writer end", writer.path)
+ // })
+
+ writer.on("data", function (c) {
+ me.emit("data", c)
+ })
+
+ writer.on("header", function () {
+ Buffer.prototype.toJSON = function () {
+ return this.toString().split(/\0/).join(".")
+ }
+ // console.error("-- -- writer header %j", writer.props)
+ if (writer.props.size === 0) nextEntry()
+ })
+ writer.on("close", nextEntry)
+
+ var ended = false
+ function nextEntry () {
+ if (ended) return
+ ended = true
+
+ // console.error("-- -- writer close", writer.path)
+ // console.error("-- -- set current to null", wprops.path)
+ me._currentEntry = null
+ me._processing = false
+ me._process()
+ }
+
+ writer.on("error", function (er) {
+ // console.error("-- -- writer error", writer.path)
+ me.emit("error", er)
+ })
+
+ // if it's the root, then there's no need to add its entries,
+ // or data, since they'll be added directly.
+ if (entry === me._pipeRoot) {
+ // console.error("-- is the root, don't auto-add")
+ writer.add = null
+ }
+
+ entry.pipe(writer)
+}
+
+Pack.prototype.destroy = function () {}
+Pack.prototype.write = function () {}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js
new file mode 100644
index 0000000000..8517c481bc
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js
@@ -0,0 +1,271 @@
+
+// A writable stream.
+// It emits "entry" events, which provide a readable stream that has
+// header info attached.
+
+module.exports = Parse.create = Parse
+
+var stream = require("stream")
+ , Stream = stream.Stream
+ , BlockStream = require("block-stream")
+ , tar = require("../tar.js")
+ , TarHeader = require("./header.js")
+ , Entry = require("./entry.js")
+ , BufferEntry = require("./buffer-entry.js")
+ , ExtendedHeader = require("./extended-header.js")
+ , assert = require("assert").ok
+ , inherits = require("inherits")
+ , fstream = require("fstream")
+
+// reading a tar is a lot like reading a directory
+// However, we're actually not going to run the ctor,
+// since it does a stat and various other stuff.
+// This inheritance gives us the pause/resume/pipe
+// behavior that is desired.
+inherits(Parse, fstream.Reader)
+
+function Parse () {
+ var me = this
+ if (!(me instanceof Parse)) return new Parse()
+
+ // doesn't apply fstream.Reader ctor?
+ // no, becasue we don't want to stat/etc, we just
+ // want to get the entry/add logic from .pipe()
+ Stream.apply(me)
+
+ me.writable = true
+ me.readable = true
+ me._stream = new BlockStream(512)
+ me.position = 0
+ me._ended = false
+
+ me._stream.on("error", function (e) {
+ me.emit("error", e)
+ })
+
+ me._stream.on("data", function (c) {
+ me._process(c)
+ })
+
+ me._stream.on("end", function () {
+ me._streamEnd()
+ })
+
+ me._stream.on("drain", function () {
+ me.emit("drain")
+ })
+}
+
+// overridden in Extract class, since it needs to
+// wait for its DirWriter part to finish before
+// emitting "end"
+Parse.prototype._streamEnd = function () {
+ var me = this
+ if (!me._ended) me.error("unexpected eof")
+ me.emit("end")
+}
+
+// a tar reader is actually a filter, not just a readable stream.
+// So, you should pipe a tarball stream into it, and it needs these
+// write/end methods to do that.
+Parse.prototype.write = function (c) {
+ if (this._ended) {
+ // gnutar puts a LOT of nulls at the end.
+ // you can keep writing these things forever.
+ // Just ignore them.
+ for (var i = 0, l = c.length; i > l; i ++) {
+ if (c[i] !== 0) return this.error("write() after end()")
+ }
+ return
+ }
+ return this._stream.write(c)
+}
+
+Parse.prototype.end = function (c) {
+ this._ended = true
+ return this._stream.end(c)
+}
+
+// don't need to do anything, since we're just
+// proxying the data up from the _stream.
+// Just need to override the parent's "Not Implemented"
+// error-thrower.
+Parse.prototype._read = function () {}
+
+Parse.prototype._process = function (c) {
+ assert(c && c.length === 512, "block size should be 512")
+
+ // one of three cases.
+ // 1. A new header
+ // 2. A part of a file/extended header
+ // 3. One of two or more EOF null blocks
+
+ if (this._entry) {
+ var entry = this._entry
+ entry.write(c)
+ if (entry._remaining === 0) {
+ entry.end()
+ this._entry = null
+ }
+ } else {
+ // either zeroes or a header
+ var zero = true
+ for (var i = 0; i < 512 && zero; i ++) {
+ zero = c[i] === 0
+ }
+
+ // eof is *at least* 2 blocks of nulls, and then the end of the
+ // file. you can put blocks of nulls between entries anywhere,
+ // so appending one tarball to another is technically valid.
+ // ending without the eof null blocks is not allowed, however.
+ if (zero) {
+ if (this._eofStarted)
+ this._ended = true
+ this._eofStarted = true
+ } else {
+ this._eofStarted = false
+ this._startEntry(c)
+ }
+ }
+
+ this.position += 512
+}
+
+// take a header chunk, start the right kind of entry.
+Parse.prototype._startEntry = function (c) {
+ var header = new TarHeader(c)
+ , self = this
+ , entry
+ , ev
+ , EntryType
+ , onend
+ , meta = false
+
+ if (null === header.size || !header.cksumValid) {
+ var e = new Error("invalid tar file")
+ e.header = header
+ e.tar_file_offset = this.position
+ e.tar_block = this.position / 512
+ return this.emit("error", e)
+ }
+
+ switch (tar.types[header.type]) {
+ case "File":
+ case "OldFile":
+ case "Link":
+ case "SymbolicLink":
+ case "CharacterDevice":
+ case "BlockDevice":
+ case "Directory":
+ case "FIFO":
+ case "ContiguousFile":
+ case "GNUDumpDir":
+ // start a file.
+ // pass in any extended headers
+ // These ones consumers are typically most interested in.
+ EntryType = Entry
+ ev = "entry"
+ break
+
+ case "GlobalExtendedHeader":
+ // extended headers that apply to the rest of the tarball
+ EntryType = ExtendedHeader
+ onend = function () {
+ self._global = self._global || {}
+ Object.keys(entry.fields).forEach(function (k) {
+ self._global[k] = entry.fields[k]
+ })
+ }
+ ev = "globalExtendedHeader"
+ meta = true
+ break
+
+ case "ExtendedHeader":
+ case "OldExtendedHeader":
+ // extended headers that apply to the next entry
+ EntryType = ExtendedHeader
+ onend = function () {
+ self._extended = entry.fields
+ }
+ ev = "extendedHeader"
+ meta = true
+ break
+
+ case "NextFileHasLongLinkpath":
+ // set linkpath=<contents> in extended header
+ EntryType = BufferEntry
+ onend = function () {
+ self._extended = self._extended || {}
+ self._extended.linkpath = entry.body
+ }
+ ev = "longLinkpath"
+ meta = true
+ break
+
+ case "NextFileHasLongPath":
+ case "OldGnuLongPath":
+ // set path=<contents> in file-extended header
+ EntryType = BufferEntry
+ onend = function () {
+ self._extended = self._extended || {}
+ self._extended.path = entry.body
+ }
+ ev = "longPath"
+ meta = true
+ break
+
+ default:
+ // all the rest we skip, but still set the _entry
+ // member, so that we can skip over their data appropriately.
+ // emit an event to say that this is an ignored entry type?
+ EntryType = Entry
+ ev = "ignoredEntry"
+ break
+ }
+
+ var global, extended
+ if (meta) {
+ global = extended = null
+ } else {
+ var global = this._global
+ var extended = this._extended
+
+ // extendedHeader only applies to one entry, so once we start
+ // an entry, it's over.
+ this._extended = null
+ }
+ entry = new EntryType(header, extended, global)
+ entry.meta = meta
+
+ // only proxy data events of normal files.
+ if (!meta) {
+ entry.on("data", function (c) {
+ me.emit("data", c)
+ })
+ }
+
+ if (onend) entry.on("end", onend)
+
+ this._entry = entry
+ var me = this
+
+ entry.on("pause", function () {
+ me.pause()
+ })
+
+ entry.on("resume", function () {
+ me.resume()
+ })
+
+ if (this.listeners("*").length) {
+ this.emit("*", ev, entry)
+ }
+
+ this.emit(ev, entry)
+
+ // Zero-byte entry. End immediately.
+ if (entry.props.size === 0) {
+ entry.end()
+ this._entry = null
+ }
+}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/package.json b/deps/npm/node_modules/node-gyp/node_modules/tar/package.json
new file mode 100644
index 0000000000..5aa78aec30
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/package.json
@@ -0,0 +1,60 @@
+{
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "name": "tar",
+ "description": "tar for node",
+ "version": "1.0.3",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-tar.git"
+ },
+ "main": "tar.js",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "dependencies": {
+ "block-stream": "*",
+ "fstream": "^1.0.2",
+ "inherits": "2"
+ },
+ "devDependencies": {
+ "graceful-fs": "^3.0.2",
+ "rimraf": "1.x",
+ "tap": "0.x",
+ "mkdirp": "^0.5.0"
+ },
+ "license": "BSD",
+ "gitHead": "f4151128c585da236c6b1e278b762ecaedc20c15",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-tar/issues"
+ },
+ "homepage": "https://github.com/isaacs/node-tar",
+ "_id": "tar@1.0.3",
+ "_shasum": "15bcdab244fa4add44e4244a0176edb8aa9a2b44",
+ "_from": "tar@>=1.0.0 <2.0.0",
+ "_npmVersion": "2.1.10",
+ "_nodeVersion": "0.10.33",
+ "_npmUser": {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ }
+ ],
+ "dist": {
+ "shasum": "15bcdab244fa4add44e4244a0176edb8aa9a2b44",
+ "tarball": "http://registry.npmjs.org/tar/-/tar-1.0.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/tar/-/tar-1.0.3.tgz"
+}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js b/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js
new file mode 100644
index 0000000000..a81298b9a0
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js
@@ -0,0 +1,173 @@
+// field paths that every tar file must have.
+// header is padded to 512 bytes.
+var f = 0
+ , fields = {}
+ , path = fields.path = f++
+ , mode = fields.mode = f++
+ , uid = fields.uid = f++
+ , gid = fields.gid = f++
+ , size = fields.size = f++
+ , mtime = fields.mtime = f++
+ , cksum = fields.cksum = f++
+ , type = fields.type = f++
+ , linkpath = fields.linkpath = f++
+ , headerSize = 512
+ , blockSize = 512
+ , fieldSize = []
+
+fieldSize[path] = 100
+fieldSize[mode] = 8
+fieldSize[uid] = 8
+fieldSize[gid] = 8
+fieldSize[size] = 12
+fieldSize[mtime] = 12
+fieldSize[cksum] = 8
+fieldSize[type] = 1
+fieldSize[linkpath] = 100
+
+// "ustar\0" may introduce another bunch of headers.
+// these are optional, and will be nulled out if not present.
+
+var ustar = fields.ustar = f++
+ , ustarver = fields.ustarver = f++
+ , uname = fields.uname = f++
+ , gname = fields.gname = f++
+ , devmaj = fields.devmaj = f++
+ , devmin = fields.devmin = f++
+ , prefix = fields.prefix = f++
+ , fill = fields.fill = f++
+
+// terminate fields.
+fields[f] = null
+
+fieldSize[ustar] = 6
+fieldSize[ustarver] = 2
+fieldSize[uname] = 32
+fieldSize[gname] = 32
+fieldSize[devmaj] = 8
+fieldSize[devmin] = 8
+fieldSize[prefix] = 155
+fieldSize[fill] = 12
+
+// nb: prefix field may in fact be 130 bytes of prefix,
+// a null char, 12 bytes for atime, 12 bytes for ctime.
+//
+// To recognize this format:
+// 1. prefix[130] === ' ' or '\0'
+// 2. atime and ctime are octal numeric values
+// 3. atime and ctime have ' ' in their last byte
+
+var fieldEnds = {}
+ , fieldOffs = {}
+ , fe = 0
+for (var i = 0; i < f; i ++) {
+ fieldOffs[i] = fe
+ fieldEnds[i] = (fe += fieldSize[i])
+}
+
+// build a translation table of field paths.
+Object.keys(fields).forEach(function (f) {
+ if (fields[f] !== null) fields[fields[f]] = f
+})
+
+// different values of the 'type' field
+// paths match the values of Stats.isX() functions, where appropriate
+var types =
+ { 0: "File"
+ , "\0": "OldFile" // like 0
+ , "": "OldFile"
+ , 1: "Link"
+ , 2: "SymbolicLink"
+ , 3: "CharacterDevice"
+ , 4: "BlockDevice"
+ , 5: "Directory"
+ , 6: "FIFO"
+ , 7: "ContiguousFile" // like 0
+ // posix headers
+ , g: "GlobalExtendedHeader" // k=v for the rest of the archive
+ , x: "ExtendedHeader" // k=v for the next file
+ // vendor-specific stuff
+ , A: "SolarisACL" // skip
+ , D: "GNUDumpDir" // like 5, but with data, which should be skipped
+ , I: "Inode" // metadata only, skip
+ , K: "NextFileHasLongLinkpath" // data = link path of next file
+ , L: "NextFileHasLongPath" // data = path of next file
+ , M: "ContinuationFile" // skip
+ , N: "OldGnuLongPath" // like L
+ , S: "SparseFile" // skip
+ , V: "TapeVolumeHeader" // skip
+ , X: "OldExtendedHeader" // like x
+ }
+
+Object.keys(types).forEach(function (t) {
+ types[types[t]] = types[types[t]] || t
+})
+
+// values for the mode field
+var modes =
+ { suid: 04000 // set uid on extraction
+ , sgid: 02000 // set gid on extraction
+ , svtx: 01000 // set restricted deletion flag on dirs on extraction
+ , uread: 0400
+ , uwrite: 0200
+ , uexec: 0100
+ , gread: 040
+ , gwrite: 020
+ , gexec: 010
+ , oread: 4
+ , owrite: 2
+ , oexec: 1
+ , all: 07777
+ }
+
+var numeric =
+ { mode: true
+ , uid: true
+ , gid: true
+ , size: true
+ , mtime: true
+ , devmaj: true
+ , devmin: true
+ , cksum: true
+ , atime: true
+ , ctime: true
+ , dev: true
+ , ino: true
+ , nlink: true
+ }
+
+Object.keys(modes).forEach(function (t) {
+ modes[modes[t]] = modes[modes[t]] || t
+})
+
+var knownExtended =
+ { atime: true
+ , charset: true
+ , comment: true
+ , ctime: true
+ , gid: true
+ , gname: true
+ , linkpath: true
+ , mtime: true
+ , path: true
+ , realtime: true
+ , security: true
+ , size: true
+ , uid: true
+ , uname: true }
+
+
+exports.fields = fields
+exports.fieldSize = fieldSize
+exports.fieldOffs = fieldOffs
+exports.fieldEnds = fieldEnds
+exports.types = types
+exports.modes = modes
+exports.numeric = numeric
+exports.headerSize = headerSize
+exports.blockSize = blockSize
+exports.knownExtended = knownExtended
+
+exports.Pack = require("./lib/pack.js")
+exports.Parse = require("./lib/parse.js")
+exports.Extract = require("./lib/extract.js")
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js
new file mode 100644
index 0000000000..1524ff7af0
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js
@@ -0,0 +1,53 @@
+// the fixtures have some weird stuff that is painful
+// to include directly in the repo for various reasons.
+//
+// So, unpack the fixtures with the system tar first.
+//
+// This means, of course, that it'll only work if you
+// already have a tar implementation, and some of them
+// will not properly unpack the fixtures anyway.
+//
+// But, since usually those tests will fail on Windows
+// and other systems with less capable filesystems anyway,
+// at least this way we don't cause inconveniences by
+// merely cloning the repo or installing the package.
+
+var tap = require("tap")
+, child_process = require("child_process")
+, rimraf = require("rimraf")
+, test = tap.test
+, path = require("path")
+
+test("clean fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "fixtures"), function (er) {
+ t.ifError(er, "rimraf ./fixtures/")
+ t.end()
+ })
+})
+
+test("clean tmp", function (t) {
+ rimraf(path.resolve(__dirname, "tmp"), function (er) {
+ t.ifError(er, "rimraf ./tmp/")
+ t.end()
+ })
+})
+
+test("extract fixtures", function (t) {
+ var c = child_process.spawn("tar"
+ ,["xzvf", "fixtures.tgz"]
+ ,{ cwd: __dirname })
+
+ c.stdout.on("data", errwrite)
+ c.stderr.on("data", errwrite)
+ function errwrite (chunk) {
+ process.stderr.write(chunk)
+ }
+
+ c.on("exit", function (code) {
+ t.equal(code, 0, "extract fixtures should exit with 0")
+ if (code) {
+ t.comment("Note, all tests from here on out will fail because of this.")
+ }
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js
new file mode 100644
index 0000000000..45400cd9bb
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js
@@ -0,0 +1,132 @@
+// Set the umask, so that it works the same everywhere.
+process.umask(parseInt('22', 8))
+
+var tap = require("tap")
+ , tar = require("../tar.js")
+ , fs = require("fs")
+ , gfs = require("graceful-fs")
+ , path = require("path")
+ , file = path.resolve(__dirname, "fixtures/dir.tar")
+ , target = path.resolve(__dirname, "tmp/extract-test")
+ , index = 0
+ , fstream = require("fstream")
+ , rimraf = require("rimraf")
+ , mkdirp = require("mkdirp")
+
+ , ee = 0
+ , expectEntries = [
+ {
+ "path" : "dir/",
+ "mode" : "750",
+ "type" : "5",
+ "depth" : undefined,
+ "size" : 0,
+ "linkpath" : "",
+ "nlink" : undefined,
+ "dev" : undefined,
+ "ino" : undefined
+ },
+ {
+ "path" : "dir/sub/",
+ "mode" : "750",
+ "type" : "5",
+ "depth" : undefined,
+ "size" : 0,
+ "linkpath" : "",
+ "nlink" : undefined,
+ "dev" : undefined,
+ "ino" : undefined
+ } ]
+
+function slow (fs, method, t1, t2) {
+ var orig = fs[method]
+ if (!orig) return null
+ fs[method] = function () {
+ var args = [].slice.call(arguments)
+ console.error("slow", method, args[0])
+ var cb = args.pop()
+
+ setTimeout(function () {
+ orig.apply(fs, args.concat(function(er, data) {
+ setTimeout(function() {
+ cb(er, data)
+ }, t2)
+ }))
+ }, t1)
+ }
+}
+
+// Make sure we get the graceful-fs that fstream is using.
+var gfs2
+try {
+ gfs2 = require("fstream/node_modules/graceful-fs")
+} catch (er) {}
+
+var slowMethods = ["chown", "chmod", "utimes", "lutimes"]
+slowMethods.forEach(function (method) {
+ var t1 = 500
+ var t2 = 0
+ slow(fs, method, t1, t2)
+ slow(gfs, method, t1, t2)
+ if (gfs2) {
+ slow(gfs2, method, t1, t2)
+ }
+})
+
+
+
+// The extract class basically just pipes the input
+// to a Reader, and then to a fstream.DirWriter
+
+// So, this is as much a test of fstream.Reader and fstream.Writer
+// as it is of tar.Extract, but it sort of makes sense.
+
+tap.test("preclean", function (t) {
+ rimraf.sync(target)
+ /mkdirp.sync(target)
+ t.pass("cleaned!")
+ t.end()
+})
+
+tap.test("extract test", function (t) {
+ var extract = tar.Extract(target)
+ var inp = fs.createReadStream(file)
+
+ // give it a weird buffer size to try to break in odd places
+ inp.bufferSize = 1234
+
+ inp.pipe(extract)
+
+ extract.on("end", function () {
+ rimraf.sync(target)
+
+ t.equal(ee, expectEntries.length, "should see "+ee+" entries")
+
+ // should get no more entries after end
+ extract.removeAllListeners("entry")
+ extract.on("entry", function (e) {
+ t.fail("Should not get entries after end!")
+ })
+
+ t.end()
+ })
+
+
+ extract.on("entry", function (entry) {
+ var found =
+ { path: entry.path
+ , mode: entry.props.mode.toString(8)
+ , type: entry.props.type
+ , depth: entry.props.depth
+ , size: entry.props.size
+ , linkpath: entry.props.linkpath
+ , nlink: entry.props.nlink
+ , dev: entry.props.dev
+ , ino: entry.props.ino
+ }
+
+ var wanted = expectEntries[ee ++]
+
+ t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path)
+ })
+})
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js
new file mode 100644
index 0000000000..eca4e7cc96
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js
@@ -0,0 +1,367 @@
+// Set the umask, so that it works the same everywhere.
+process.umask(parseInt('22', 8))
+
+var tap = require("tap")
+ , tar = require("../tar.js")
+ , fs = require("fs")
+ , path = require("path")
+ , file = path.resolve(__dirname, "fixtures/c.tar")
+ , target = path.resolve(__dirname, "tmp/extract-test")
+ , index = 0
+ , fstream = require("fstream")
+
+ , ee = 0
+ , expectEntries =
+[ { path: 'c.txt',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 513,
+ linkpath: '',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: 'cc.txt',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 513,
+ linkpath: '',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 100,
+ linkpath: '',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: 'Ω.txt',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 2,
+ linkpath: '',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: 'Ω.txt',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 2,
+ linkpath: '',
+ nlink: 1,
+ dev: 234881026,
+ ino: 51693379 },
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 200,
+ linkpath: '',
+ nlink: 1,
+ dev: 234881026,
+ ino: 51681874 },
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 201,
+ linkpath: '',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL',
+ mode: '777',
+ type: '2',
+ depth: undefined,
+ size: 0,
+ linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: '200-hard',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 200,
+ linkpath: '',
+ nlink: 2,
+ dev: 234881026,
+ ino: 51681874 },
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '644',
+ type: '1',
+ depth: undefined,
+ size: 0,
+ linkpath: path.resolve(target, '200-hard'),
+ nlink: 2,
+ dev: 234881026,
+ ino: 51681874 } ]
+
+ , ef = 0
+ , expectFiles =
+[ { path: '',
+ mode: '40755',
+ type: 'Directory',
+ depth: 0,
+ linkpath: undefined },
+ { path: '/200-hard',
+ mode: '100644',
+ type: 'File',
+ depth: 1,
+ size: 200,
+ linkpath: undefined,
+ nlink: 2 },
+ { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL',
+ mode: '120777',
+ type: 'SymbolicLink',
+ depth: 1,
+ size: 200,
+ linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ nlink: 1 },
+ { path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '100644',
+ type: 'Link',
+ depth: 1,
+ size: 200,
+ linkpath: path.join(target, '200-hard'),
+ nlink: 2 },
+ { path: '/c.txt',
+ mode: '100644',
+ type: 'File',
+ depth: 1,
+ size: 513,
+ linkpath: undefined,
+ nlink: 1 },
+ { path: '/cc.txt',
+ mode: '100644',
+ type: 'File',
+ depth: 1,
+ size: 513,
+ linkpath: undefined,
+ nlink: 1 },
+ { path: '/r',
+ mode: '40755',
+ type: 'Directory',
+ depth: 1,
+ linkpath: undefined },
+ { path: '/r/e',
+ mode: '40755',
+ type: 'Directory',
+ depth: 2,
+ linkpath: undefined },
+ { path: '/r/e/a',
+ mode: '40755',
+ type: 'Directory',
+ depth: 3,
+ linkpath: undefined },
+ { path: '/r/e/a/l',
+ mode: '40755',
+ type: 'Directory',
+ depth: 4,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l',
+ mode: '40755',
+ type: 'Directory',
+ depth: 5,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y',
+ mode: '40755',
+ type: 'Directory',
+ depth: 6,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-',
+ mode: '40755',
+ type: 'Directory',
+ depth: 7,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d',
+ mode: '40755',
+ type: 'Directory',
+ depth: 8,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e',
+ mode: '40755',
+ type: 'Directory',
+ depth: 9,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e',
+ mode: '40755',
+ type: 'Directory',
+ depth: 10,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p',
+ mode: '40755',
+ type: 'Directory',
+ depth: 11,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-',
+ mode: '40755',
+ type: 'Directory',
+ depth: 12,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f',
+ mode: '40755',
+ type: 'Directory',
+ depth: 13,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o',
+ mode: '40755',
+ type: 'Directory',
+ depth: 14,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l',
+ mode: '40755',
+ type: 'Directory',
+ depth: 15,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d',
+ mode: '40755',
+ type: 'Directory',
+ depth: 16,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e',
+ mode: '40755',
+ type: 'Directory',
+ depth: 17,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r',
+ mode: '40755',
+ type: 'Directory',
+ depth: 18,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-',
+ mode: '40755',
+ type: 'Directory',
+ depth: 19,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p',
+ mode: '40755',
+ type: 'Directory',
+ depth: 20,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a',
+ mode: '40755',
+ type: 'Directory',
+ depth: 21,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t',
+ mode: '40755',
+ type: 'Directory',
+ depth: 22,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h',
+ mode: '40755',
+ type: 'Directory',
+ depth: 23,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '100644',
+ type: 'File',
+ depth: 24,
+ size: 100,
+ linkpath: undefined,
+ nlink: 1 },
+ { path: '/Ω.txt',
+ mode: '100644',
+ type: 'File',
+ depth: 1,
+ size: 2,
+ linkpath: undefined,
+ nlink: 1 } ]
+
+
+
+// The extract class basically just pipes the input
+// to a Reader, and then to a fstream.DirWriter
+
+// So, this is as much a test of fstream.Reader and fstream.Writer
+// as it is of tar.Extract, but it sort of makes sense.
+
+tap.test("preclean", function (t) {
+ require("rimraf").sync(__dirname + "/tmp/extract-test")
+ t.pass("cleaned!")
+ t.end()
+})
+
+tap.test("extract test", function (t) {
+ var extract = tar.Extract(target)
+ var inp = fs.createReadStream(file)
+
+ // give it a weird buffer size to try to break in odd places
+ inp.bufferSize = 1234
+
+ inp.pipe(extract)
+
+ extract.on("end", function () {
+ t.equal(ee, expectEntries.length, "should see "+ee+" entries")
+
+ // should get no more entries after end
+ extract.removeAllListeners("entry")
+ extract.on("entry", function (e) {
+ t.fail("Should not get entries after end!")
+ })
+
+ next()
+ })
+
+ extract.on("entry", function (entry) {
+ var found =
+ { path: entry.path
+ , mode: entry.props.mode.toString(8)
+ , type: entry.props.type
+ , depth: entry.props.depth
+ , size: entry.props.size
+ , linkpath: entry.props.linkpath
+ , nlink: entry.props.nlink
+ , dev: entry.props.dev
+ , ino: entry.props.ino
+ }
+
+ var wanted = expectEntries[ee ++]
+
+ t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path)
+ })
+
+ function next () {
+ var r = fstream.Reader({ path: target
+ , type: "Directory"
+ // this is just to encourage consistency
+ , sort: "alpha" })
+
+ r.on("ready", function () {
+ foundEntry(r)
+ })
+
+ r.on("end", finish)
+
+ function foundEntry (entry) {
+ var p = entry.path.substr(target.length)
+ var found =
+ { path: p
+ , mode: entry.props.mode.toString(8)
+ , type: entry.props.type
+ , depth: entry.props.depth
+ , size: entry.props.size
+ , linkpath: entry.props.linkpath
+ , nlink: entry.props.nlink
+ }
+
+ var wanted = expectFiles[ef ++]
+
+ t.has(found, wanted, "unpacked file " + ef + " " + wanted.path)
+
+ entry.on("entry", foundEntry)
+ }
+
+ function finish () {
+ t.equal(ef, expectFiles.length, "should have "+ef+" items")
+ t.end()
+ }
+ }
+})
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz b/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz
new file mode 100644
index 0000000000..f1676023af
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz
Binary files differ
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js
new file mode 100644
index 0000000000..8ea6f79500
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js
@@ -0,0 +1,183 @@
+var tap = require("tap")
+var TarHeader = require("../lib/header.js")
+var tar = require("../tar.js")
+var fs = require("fs")
+
+
+var headers =
+ { "a.txt file header":
+ [ "612e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303430312031313635313336303333332030313234353100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true
+ , path: 'a.txt'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 257
+ , mtime: 1319493851
+ , cksum: 5417
+ , type: '0'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' }
+ ]
+
+ , "omega pax": // the extended header from omega tar.
+ [ "5061784865616465722fcea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303137302031313534333731303631312030313530353100207800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true
+ , path: 'PaxHeader/Ω.txt'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 120
+ , mtime: 1301254537
+ , cksum: 6697
+ , type: 'x'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' } ]
+
+ , "omega file header":
+ [ "cea92e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030322031313534333731303631312030313330373200203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true
+ , path: 'Ω.txt'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 2
+ , mtime: 1301254537
+ , cksum: 5690
+ , type: '0'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' } ]
+
+ , "foo.js file header":
+ [ "666f6f2e6a730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030342031313534333637303734312030313236313700203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true
+ , path: 'foo.js'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 4
+ , mtime: 1301246433
+ , cksum: 5519
+ , type: '0'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' }
+ ]
+
+ , "b.txt file header":
+ [ "622e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030313030302031313635313336303637372030313234363100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true
+ , path: 'b.txt'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 512
+ , mtime: 1319494079
+ , cksum: 5425
+ , type: '0'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' }
+ ]
+
+ , "deep nested file":
+ [ "636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363633030303634342000303537373631200030303030323420003030303030303030313434203131363532313531353333203034333331340020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true,
+ path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 100
+ , mtime: 1319687003
+ , cksum: 18124
+ , type: '0'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' }
+ ]
+ }
+
+tap.test("parsing", function (t) {
+ Object.keys(headers).forEach(function (name) {
+ var h = headers[name]
+ , header = new Buffer(h[0], "hex")
+ , expect = h[1]
+ , parsed = new TarHeader(header)
+
+ // console.error(parsed)
+ t.has(parsed, expect, "parse " + name)
+ })
+ t.end()
+})
+
+tap.test("encoding", function (t) {
+ Object.keys(headers).forEach(function (name) {
+ var h = headers[name]
+ , expect = new Buffer(h[0], "hex")
+ , encoded = TarHeader.encode(h[1])
+
+ // might have slightly different bytes, since the standard
+ // isn't very strict, but should have the same semantics
+ // checkSum will be different, but cksumValid will be true
+
+ var th = new TarHeader(encoded)
+ delete h[1].block
+ delete h[1].needExtended
+ delete h[1].cksum
+ t.has(th, h[1], "fields "+name)
+ })
+ t.end()
+})
+
+// test these manually. they're a bit rare to find in the wild
+tap.test("parseNumeric tests", function (t) {
+ var parseNumeric = TarHeader.parseNumeric
+ , numbers =
+ { "303737373737373700": 2097151
+ , "30373737373737373737373700": 8589934591
+ , "303030303036343400": 420
+ , "800000ffffffffffff": 281474976710655
+ , "ffffff000000000001": -281474976710654
+ , "ffffff000000000000": -281474976710655
+ , "800000000000200000": 2097152
+ , "8000000000001544c5": 1393861
+ , "ffffffffffff1544c5": -15383354 }
+ Object.keys(numbers).forEach(function (n) {
+ var b = new Buffer(n, "hex")
+ t.equal(parseNumeric(b), numbers[n], n + " === " + numbers[n])
+ })
+ t.end()
+})
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js
new file mode 100644
index 0000000000..d4b03a1fe9
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js
@@ -0,0 +1,886 @@
+// This is exactly like test/pack.js, except that it's excluding
+// any proprietary headers.
+//
+// This loses some information about the filesystem, but creates
+// tarballs that are supported by more versions of tar, especially
+// old non-spec-compliant copies of gnutar.
+
+// the symlink file is excluded from git, because it makes
+// windows freak the hell out.
+var fs = require("fs")
+ , path = require("path")
+ , symlink = path.resolve(__dirname, "fixtures/symlink")
+try { fs.unlinkSync(symlink) } catch (e) {}
+fs.symlinkSync("./hardlink-1", symlink)
+process.on("exit", function () {
+ fs.unlinkSync(symlink)
+})
+
+var tap = require("tap")
+ , tar = require("../tar.js")
+ , pkg = require("../package.json")
+ , Pack = tar.Pack
+ , fstream = require("fstream")
+ , Reader = fstream.Reader
+ , Writer = fstream.Writer
+ , input = path.resolve(__dirname, "fixtures/")
+ , target = path.resolve(__dirname, "tmp/pack.tar")
+ , uid = process.getuid ? process.getuid() : 0
+ , gid = process.getgid ? process.getgid() : 0
+
+ , entries =
+
+ // the global header and root fixtures/ dir are going to get
+ // a different date each time, so omit that bit.
+ // Also, dev/ino values differ across machines, so that's not
+ // included.
+ [ [ 'entry',
+ { path: 'fixtures/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ uid: uid,
+ gid: gid,
+ size: 200 } ]
+
+ , [ 'entry',
+ { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 200,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/a.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 257,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/b.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 512,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/c.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 513,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/cc.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 513,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/dir/',
+ mode: 488,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/dir/sub/',
+ mode: 488,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/foo.js',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 4,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/hardlink-1',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 200,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/hardlink-2',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '1',
+ linkpath: 'fixtures/hardlink-1',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/omega.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/omega.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/star.4.html',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 54081,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/packtest/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: 'fixtures/packtest/Ω.txt',
+ uid: uid,
+ gid: gid,
+ size: 2 } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 100,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/symlink',
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '2',
+ linkpath: 'hardlink-1',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: "fixtures/Ω.txt"
+ , uid: uid
+ , gid: gid
+ , size: 2 } ]
+
+ , [ 'entry',
+ { path: 'fixtures/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+ ]
+
+
+// first, make sure that the hardlinks are actually hardlinks, or this
+// won't work. Git has a way of replacing them with a copy.
+var hard1 = path.resolve(__dirname, "fixtures/hardlink-1")
+ , hard2 = path.resolve(__dirname, "fixtures/hardlink-2")
+ , fs = require("fs")
+
+try { fs.unlinkSync(hard2) } catch (e) {}
+fs.linkSync(hard1, hard2)
+
+tap.test("with global header", { timeout: 10000 }, function (t) {
+ runTest(t, true)
+})
+
+tap.test("without global header", { timeout: 10000 }, function (t) {
+ runTest(t, false)
+})
+
+function alphasort (a, b) {
+ return a === b ? 0
+ : a.toLowerCase() > b.toLowerCase() ? 1
+ : a.toLowerCase() < b.toLowerCase() ? -1
+ : a > b ? 1
+ : -1
+}
+
+
+function runTest (t, doGH) {
+ var reader = Reader({ path: input
+ , filter: function () {
+ return !this.path.match(/\.(tar|hex)$/)
+ }
+ , sort: alphasort
+ })
+
+ var props = doGH ? pkg : {}
+ props.noProprietary = true
+ var pack = Pack(props)
+ var writer = Writer(target)
+
+ // global header should be skipped regardless, since it has no content.
+ var entry = 0
+
+ t.ok(reader, "reader ok")
+ t.ok(pack, "pack ok")
+ t.ok(writer, "writer ok")
+
+ pack.pipe(writer)
+
+ var parse = tar.Parse()
+ t.ok(parse, "parser should be ok")
+
+ pack.on("data", function (c) {
+ // console.error("PACK DATA")
+ if (c.length !== 512) {
+ // this one is too noisy, only assert if it'll be relevant
+ t.equal(c.length, 512, "parser should emit data in 512byte blocks")
+ }
+ parse.write(c)
+ })
+
+ pack.on("end", function () {
+ // console.error("PACK END")
+ t.pass("parser ends")
+ parse.end()
+ })
+
+ pack.on("error", function (er) {
+ t.fail("pack error", er)
+ })
+
+ parse.on("error", function (er) {
+ t.fail("parse error", er)
+ })
+
+ writer.on("error", function (er) {
+ t.fail("writer error", er)
+ })
+
+ reader.on("error", function (er) {
+ t.fail("reader error", er)
+ })
+
+ parse.on("*", function (ev, e) {
+ var wanted = entries[entry++]
+ if (!wanted) {
+ t.fail("unexpected event: "+ev)
+ return
+ }
+ t.equal(ev, wanted[0], "event type should be "+wanted[0])
+
+ if (ev !== wanted[0] || e.path !== wanted[1].path) {
+ console.error("wanted", wanted)
+ console.error([ev, e.props])
+ e.on("end", function () {
+ console.error(e.fields)
+ throw "break"
+ })
+ }
+
+ t.has(e.props, wanted[1], "properties "+wanted[1].path)
+ if (wanted[2]) {
+ e.on("end", function () {
+ if (!e.fields) {
+ t.ok(e.fields, "should get fields")
+ } else {
+ t.has(e.fields, wanted[2], "should get expected fields")
+ }
+ })
+ }
+ })
+
+ reader.pipe(pack)
+
+ writer.on("close", function () {
+ t.equal(entry, entries.length, "should get all expected entries")
+ t.pass("it finished")
+ t.end()
+ })
+
+}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js
new file mode 100644
index 0000000000..bf033c1298
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js
@@ -0,0 +1,934 @@
+
+// the symlink file is excluded from git, because it makes
+// windows freak the hell out.
+var fs = require("fs")
+ , path = require("path")
+ , symlink = path.resolve(__dirname, "fixtures/symlink")
+try { fs.unlinkSync(symlink) } catch (e) {}
+fs.symlinkSync("./hardlink-1", symlink)
+process.on("exit", function () {
+ fs.unlinkSync(symlink)
+})
+
+
+var tap = require("tap")
+ , tar = require("../tar.js")
+ , pkg = require("../package.json")
+ , Pack = tar.Pack
+ , fstream = require("fstream")
+ , Reader = fstream.Reader
+ , Writer = fstream.Writer
+ , input = path.resolve(__dirname, "fixtures/")
+ , target = path.resolve(__dirname, "tmp/pack.tar")
+ , uid = process.getuid ? process.getuid() : 0
+ , gid = process.getgid ? process.getgid() : 0
+
+ , entries =
+
+ // the global header and root fixtures/ dir are going to get
+ // a different date each time, so omit that bit.
+ // Also, dev/ino values differ across machines, so that's not
+ // included.
+ [ [ 'globalExtendedHeader',
+ { path: 'PaxHeader/',
+ mode: 438,
+ uid: 0,
+ gid: 0,
+ type: 'g',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { "NODETAR.author": pkg.author,
+ "NODETAR.name": pkg.name,
+ "NODETAR.description": pkg.description,
+ "NODETAR.version": pkg.version,
+ "NODETAR.repository.type": pkg.repository.type,
+ "NODETAR.repository.url": pkg.repository.url,
+ "NODETAR.main": pkg.main,
+ "NODETAR.scripts.test": pkg.scripts.test } ]
+
+ , [ 'entry',
+ { path: 'fixtures/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ 'NODETAR.depth': '1',
+ 'NODETAR.type': 'File',
+ nlink: 1,
+ uid: uid,
+ gid: gid,
+ size: 200,
+ 'NODETAR.blksize': '4096',
+ 'NODETAR.blocks': '8' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 200,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ 'NODETAR.depth': '1',
+ 'NODETAR.type': 'File',
+ nlink: 1,
+ 'NODETAR.blksize': '4096',
+ 'NODETAR.blocks': '8' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/a.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 257,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/b.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 512,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/c.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 513,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/cc.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 513,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/dir/',
+ mode: 488,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/dir/sub/',
+ mode: 488,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+
+ , [ 'entry',
+ { path: 'fixtures/foo.js',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 4,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/hardlink-1',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 200,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/hardlink-2',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '1',
+ linkpath: 'fixtures/hardlink-1',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/omega.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/omega.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/star.4.html',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 54081,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/packtest/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: 'fixtures/packtest/Ω.txt',
+ 'NODETAR.depth': '2',
+ 'NODETAR.type': 'File',
+ nlink: 1,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ 'NODETAR.blksize': '4096',
+ 'NODETAR.blocks': '8' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ 'NODETAR.depth': '2',
+ 'NODETAR.type': 'File',
+ nlink: 1,
+ 'NODETAR.blksize': '4096',
+ 'NODETAR.blocks': '8' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 100,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/symlink',
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '2',
+ linkpath: 'hardlink-1',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: "fixtures/Ω.txt"
+ , "NODETAR.depth": "1"
+ , "NODETAR.type": "File"
+ , nlink: 1
+ , uid: uid
+ , gid: gid
+ , size: 2
+ , "NODETAR.blksize": "4096"
+ , "NODETAR.blocks": "8" } ]
+
+ , [ 'entry',
+ { path: 'fixtures/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ 'NODETAR.depth': '1',
+ 'NODETAR.type': 'File',
+ nlink: 1,
+ 'NODETAR.blksize': '4096',
+ 'NODETAR.blocks': '8' } ]
+ ]
+
+
+// first, make sure that the hardlinks are actually hardlinks, or this
+// won't work. Git has a way of replacing them with a copy.
+var hard1 = path.resolve(__dirname, "fixtures/hardlink-1")
+ , hard2 = path.resolve(__dirname, "fixtures/hardlink-2")
+ , fs = require("fs")
+
+try { fs.unlinkSync(hard2) } catch (e) {}
+fs.linkSync(hard1, hard2)
+
+tap.test("with global header", { timeout: 10000 }, function (t) {
+ runTest(t, true)
+})
+
+tap.test("without global header", { timeout: 10000 }, function (t) {
+ runTest(t, false)
+})
+
+function alphasort (a, b) {
+ return a === b ? 0
+ : a.toLowerCase() > b.toLowerCase() ? 1
+ : a.toLowerCase() < b.toLowerCase() ? -1
+ : a > b ? 1
+ : -1
+}
+
+
+function runTest (t, doGH) {
+ var reader = Reader({ path: input
+ , filter: function () {
+ return !this.path.match(/\.(tar|hex)$/)
+ }
+ , sort: alphasort
+ })
+
+ var pack = Pack(doGH ? pkg : null)
+ var writer = Writer(target)
+
+ // skip the global header if we're not doing that.
+ var entry = doGH ? 0 : 1
+
+ t.ok(reader, "reader ok")
+ t.ok(pack, "pack ok")
+ t.ok(writer, "writer ok")
+
+ pack.pipe(writer)
+
+ var parse = tar.Parse()
+ t.ok(parse, "parser should be ok")
+
+ pack.on("data", function (c) {
+ // console.error("PACK DATA")
+ if (c.length !== 512) {
+ // this one is too noisy, only assert if it'll be relevant
+ t.equal(c.length, 512, "parser should emit data in 512byte blocks")
+ }
+ parse.write(c)
+ })
+
+ pack.on("end", function () {
+ // console.error("PACK END")
+ t.pass("parser ends")
+ parse.end()
+ })
+
+ pack.on("error", function (er) {
+ t.fail("pack error", er)
+ })
+
+ parse.on("error", function (er) {
+ t.fail("parse error", er)
+ })
+
+ writer.on("error", function (er) {
+ t.fail("writer error", er)
+ })
+
+ reader.on("error", function (er) {
+ t.fail("reader error", er)
+ })
+
+ parse.on("*", function (ev, e) {
+ var wanted = entries[entry++]
+ if (!wanted) {
+ t.fail("unexpected event: "+ev)
+ return
+ }
+ t.equal(ev, wanted[0], "event type should be "+wanted[0])
+
+ if (ev !== wanted[0] || e.path !== wanted[1].path) {
+ console.error("wanted", wanted)
+ console.error([ev, e.props])
+ e.on("end", function () {
+ console.error(e.fields)
+ throw "break"
+ })
+ }
+
+
+ t.has(e.props, wanted[1], "properties "+wanted[1].path)
+ if (wanted[2]) {
+ e.on("end", function () {
+ if (!e.fields) {
+ t.ok(e.fields, "should get fields")
+ } else {
+ t.has(e.fields, wanted[2], "should get expected fields")
+ }
+ })
+ }
+ })
+
+ reader.pipe(pack)
+
+ writer.on("close", function () {
+ t.equal(entry, entries.length, "should get all expected entries")
+ t.pass("it finished")
+ t.end()
+ })
+
+}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js
new file mode 100644
index 0000000000..f765a50129
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js
@@ -0,0 +1,359 @@
+var tap = require("tap")
+ , tar = require("../tar.js")
+ , fs = require("fs")
+ , path = require("path")
+ , file = path.resolve(__dirname, "fixtures/c.tar")
+ , index = 0
+
+ , expect =
+[ [ 'entry',
+ { path: 'c.txt',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 513,
+ mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'),
+ cksum: 5422,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ undefined ],
+ [ 'entry',
+ { path: 'cc.txt',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 513,
+ mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'),
+ cksum: 5525,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ undefined ],
+ [ 'entry',
+ { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 100,
+ mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'),
+ cksum: 18124,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ undefined ],
+ [ 'entry',
+ { path: 'Ω.txt',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 2,
+ mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
+ cksum: 5695,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ undefined ],
+ [ 'extendedHeader',
+ { path: 'PaxHeader/Ω.txt',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 120,
+ mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
+ cksum: 6702,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: 'Ω.txt',
+ ctime: 1319737909,
+ atime: 1319739061,
+ dev: 234881026,
+ ino: 51693379,
+ nlink: 1 } ],
+ [ 'entry',
+ { path: 'Ω.txt',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 2,
+ mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
+ cksum: 5695,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ ctime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
+ atime: new Date('Thu, 27 Oct 2011 18:11:01 GMT'),
+ dev: 234881026,
+ ino: 51693379,
+ nlink: 1 },
+ undefined ],
+ [ 'extendedHeader',
+ { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 353,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 14488,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ ctime: 1319686868,
+ atime: 1319741254,
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 1 } ],
+ [ 'entry',
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 200,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 14570,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ ctime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ atime: new Date('Thu, 27 Oct 2011 18:47:34 GMT'),
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 1 },
+ undefined ],
+ [ 'longPath',
+ { path: '././@LongLink',
+ mode: 0,
+ uid: 0,
+ gid: 0,
+ size: 201,
+ mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'),
+ cksum: 4976,
+ type: 'L',
+ linkpath: '',
+ ustar: false },
+ '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ],
+ [ 'entry',
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 1000,
+ gid: 1000,
+ size: 201,
+ mtime: new Date('Thu, 27 Oct 2011 22:21:50 GMT'),
+ cksum: 14086,
+ type: '0',
+ linkpath: '',
+ ustar: false },
+ undefined ],
+ [ 'longLinkpath',
+ { path: '././@LongLink',
+ mode: 0,
+ uid: 0,
+ gid: 0,
+ size: 201,
+ mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'),
+ cksum: 4975,
+ type: 'K',
+ linkpath: '',
+ ustar: false },
+ '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ],
+ [ 'longPath',
+ { path: '././@LongLink',
+ mode: 0,
+ uid: 0,
+ gid: 0,
+ size: 201,
+ mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'),
+ cksum: 4976,
+ type: 'L',
+ linkpath: '',
+ ustar: false },
+ '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL' ],
+ [ 'entry',
+ { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL',
+ mode: 511,
+ uid: 1000,
+ gid: 1000,
+ size: 0,
+ mtime: new Date('Fri, 28 Oct 2011 23:05:17 GMT'),
+ cksum: 21603,
+ type: '2',
+ linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ ustar: false },
+ undefined ],
+ [ 'extendedHeader',
+ { path: 'PaxHeader/200-hard',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 143,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 6533,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { ctime: 1320617144,
+ atime: 1320617232,
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 2 } ],
+ [ 'entry',
+ { path: '200-hard',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 200,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 5526,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'),
+ atime: new Date('Sun, 06 Nov 2011 22:07:12 GMT'),
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 2 },
+ undefined ],
+ [ 'extendedHeader',
+ { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 353,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 14488,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ ctime: 1320617144,
+ atime: 1320617406,
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 2 } ],
+ [ 'entry',
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 0,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 15173,
+ type: '1',
+ linkpath: '200-hard',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'),
+ atime: new Date('Sun, 06 Nov 2011 22:10:06 GMT'),
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 2 },
+ undefined ] ]
+
+
+tap.test("parser test", function (t) {
+ var parser = tar.Parse()
+
+ parser.on("end", function () {
+ t.equal(index, expect.length, "saw all expected events")
+ t.end()
+ })
+
+ fs.createReadStream(file)
+ .pipe(parser)
+ .on("*", function (ev, entry) {
+ var wanted = expect[index]
+ if (!wanted) {
+ return t.fail("Unexpected event: " + ev)
+ }
+ var result = [ev, entry.props]
+ entry.on("end", function () {
+ result.push(entry.fields || entry.body)
+
+ t.equal(ev, wanted[0], index + " event type")
+ t.equivalent(entry.props, wanted[1], wanted[1].path + " entry properties")
+ if (wanted[2]) {
+ t.equivalent(result[2], wanted[2], "metadata values")
+ }
+ index ++
+ })
+ })
+})
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js
new file mode 100644
index 0000000000..a00ff7faa0
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js
@@ -0,0 +1,20 @@
+// clean up the fixtures
+
+var tap = require("tap")
+, rimraf = require("rimraf")
+, test = tap.test
+, path = require("path")
+
+test("clean fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "fixtures"), function (er) {
+ t.ifError(er, "rimraf ./fixtures/")
+ t.end()
+ })
+})
+
+test("clean tmp", function (t) {
+ rimraf(path.resolve(__dirname, "tmp"), function (er) {
+ t.ifError(er, "rimraf ./tmp/")
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json
index 8b092ddca3..6015fe750a 100644
--- a/deps/npm/node_modules/node-gyp/package.json
+++ b/deps/npm/node_modules/node-gyp/package.json
@@ -77,6 +77,5 @@
"tarball": "http://registry.npmjs.org/node-gyp/-/node-gyp-1.0.3.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-1.0.3.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-1.0.3.tgz"
}
diff --git a/deps/npm/node_modules/normalize-git-url/.eslintrc b/deps/npm/node_modules/normalize-git-url/.eslintrc
deleted file mode 100644
index b54e30fd2a..0000000000
--- a/deps/npm/node_modules/normalize-git-url/.eslintrc
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "env" : {
- "node" : true
- },
- "rules" : {
- "semi": [2, "never"],
- "strict": 0,
- "quotes": [1, "double", "avoid-escape"],
- "no-use-before-define": 0,
- "curly": 0,
- "no-underscore-dangle": 0,
- "no-lonely-if": 1,
- "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}],
- "no-mixed-requires": 0,
- "space-infix-ops": 0,
- "key-spacing": 0,
- "no-multi-spaces": 0
- }
-}
diff --git a/deps/npm/node_modules/normalize-package-data/README.md b/deps/npm/node_modules/normalize-package-data/README.md
index 1429e40420..4b159126d9 100644
--- a/deps/npm/node_modules/normalize-package-data/README.md
+++ b/deps/npm/node_modules/normalize-package-data/README.md
@@ -1,4 +1,4 @@
-# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)
+# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data)
normalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.
@@ -68,9 +68,11 @@ If the supplied data has an invalid name or version vield, `normalizeData` will
* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.
* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.
* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.
+* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved.
+* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL.
* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.
* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`.
-* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git://github.com/[owner-name]/[repo-name]
+* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to https://github.com/[owner-name]/[repo-name]
* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.
* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.
diff --git a/deps/npm/node_modules/normalize-package-data/lib/fixer.js b/deps/npm/node_modules/normalize-package-data/lib/fixer.js
index 14c0abc8e9..59cd05f755 100644
--- a/deps/npm/node_modules/normalize-package-data/lib/fixer.js
+++ b/deps/npm/node_modules/normalize-package-data/lib/fixer.js
@@ -1,11 +1,10 @@
var semver = require("semver")
-var parseGitHubURL = require("github-url-from-git")
+var hostedGitInfo = require("hosted-git-info")
var depTypes = ["dependencies","devDependencies","optionalDependencies"]
var extractDescription = require("./extract_description")
var url = require("url")
var typos = require("./typos")
var coreModuleNames = require("./core_module_names")
-var githubUserRepo = require("github-url-from-username-repo")
var fixer = module.exports = {
// default warning function
@@ -25,12 +24,10 @@ var fixer = module.exports = {
}
var r = data.repository.url || ""
if (r) {
- var ghurl = parseGitHubURL(r)
- if (ghurl) {
- r = ghurl.replace(/^https?:\/\//, 'git://')
- } else if (githubUserRepo(r)) {
- // repo has 'user/reponame' filled in as repo
- data.repository.url = githubUserRepo(r)
+ var hosted = hostedGitInfo.fromUrl(r)
+ if (hosted) {
+ r = data.repository.url
+ = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString()
}
}
@@ -57,7 +54,7 @@ var fixer = module.exports = {
if (typeof data.scripts[k] !== "string") {
this.warn("nonStringScript")
delete data.scripts[k]
- } else if (typos.script[k]) {
+ } else if (typos.script[k] && !data.scripts[typos.script[k]]) {
this.warn("typo", k, typos.script[k], "scripts")
}
}, this)
@@ -143,11 +140,8 @@ var fixer = module.exports = {
this.warn("nonStringDependency", d, JSON.stringify(r))
delete data[deps][d]
}
- // "/" is not allowed as packagename for publishing, but for git-urls
- // normalize shorthand-urls
- if (githubUserRepo(data[deps][d])) {
- data[deps][d] = 'git+' + githubUserRepo(data[deps][d])
- }
+ var hosted = hostedGitInfo.fromUrl(data[deps][d])
+ if (hosted) data[deps][d] = hosted.toString()
}, this)
}, this)
}
@@ -234,12 +228,9 @@ var fixer = module.exports = {
, fixBugsField: function(data) {
if (!data.bugs && data.repository && data.repository.url) {
- var gh = parseGitHubURL(data.repository.url)
- if(gh) {
- if(gh.match(/^https:\/\/github.com\//))
- data.bugs = {url: gh + "/issues"}
- else // gist url
- data.bugs = {url: gh}
+ var hosted = hostedGitInfo.fromUrl(data.repository.url)
+ if(hosted && hosted.bugs()) {
+ data.bugs = {url: hosted.bugs()}
}
}
else if(data.bugs) {
@@ -278,13 +269,10 @@ var fixer = module.exports = {
, fixHomepageField: function(data) {
if (!data.homepage && data.repository && data.repository.url) {
- var gh = parseGitHubURL(data.repository.url)
- if (gh)
- data.homepage = gh
- else
- return true
- } else if (!data.homepage)
- return true
+ var hosted = hostedGitInfo.fromUrl(data.repository.url)
+ if (hosted && hosted.docs()) data.homepage = hosted.docs()
+ }
+ if (!data.homepage) return
if(typeof data.homepage !== "string") {
this.warn("nonUrlHomepage")
diff --git a/deps/npm/node_modules/normalize-package-data/package.json b/deps/npm/node_modules/normalize-package-data/package.json
index 6da54694c2..8f4aeadca2 100644
--- a/deps/npm/node_modules/normalize-package-data/package.json
+++ b/deps/npm/node_modules/normalize-package-data/package.json
@@ -1,6 +1,6 @@
{
"name": "normalize-package-data",
- "version": "1.0.3",
+ "version": "2.0.0",
"author": {
"name": "Meryn Stol",
"email": "merynstol@gmail.com"
@@ -8,15 +8,14 @@
"description": "Normalizes data that can be found in package.json files.",
"repository": {
"type": "git",
- "url": "git://github.com/meryn/normalize-package-data.git"
+ "url": "git://github.com/npm/normalize-package-data.git"
},
"main": "lib/normalize.js",
"scripts": {
"test": "tap test/*.js"
},
"dependencies": {
- "github-url-from-git": "^1.3.0",
- "github-url-from-username-repo": "^1.0.0",
+ "hosted-git-info": "^2.0.2",
"semver": "2 || 3 || 4"
},
"devDependencies": {
@@ -38,19 +37,19 @@
"email": "rok@kowalski.gd"
}
],
- "gitHead": "8c30091c83b1a41e113757148c4543ef61ff863d",
+ "gitHead": "ea0b959633e4803685bae2283d3d79a0115e6f8a",
"bugs": {
- "url": "https://github.com/meryn/normalize-package-data/issues"
+ "url": "https://github.com/npm/normalize-package-data/issues"
},
- "homepage": "https://github.com/meryn/normalize-package-data",
- "_id": "normalize-package-data@1.0.3",
- "_shasum": "8be955b8907af975f1a4584ea8bb9b41492312f5",
- "_from": "normalize-package-data@>=1.0.3 <1.1.0",
- "_npmVersion": "2.1.0",
- "_nodeVersion": "0.10.31",
+ "homepage": "https://github.com/npm/normalize-package-data",
+ "_id": "normalize-package-data@2.0.0",
+ "_shasum": "8795d0d5c70c0e9ca36f419548aac0abf1f638bc",
+ "_from": "normalize-package-data@>=2.0.0 <2.1.0",
+ "_npmVersion": "2.7.5",
+ "_nodeVersion": "1.6.2",
"_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
+ "name": "iarna",
+ "email": "me@re-becca.org"
},
"maintainers": [
{
@@ -64,12 +63,17 @@
{
"name": "othiym23",
"email": "ogd@aoaioxxysz.net"
+ },
+ {
+ "name": "iarna",
+ "email": "me@re-becca.org"
}
],
"dist": {
- "shasum": "8be955b8907af975f1a4584ea8bb9b41492312f5",
- "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-1.0.3.tgz"
+ "shasum": "8795d0d5c70c0e9ca36f419548aac0abf1f638bc",
+ "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.0.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-1.0.3.tgz"
+ "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.0.0.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/normalize-package-data/test/normalize.js b/deps/npm/node_modules/normalize-package-data/test/normalize.js
index b35eed7659..96b2544533 100644
--- a/deps/npm/node_modules/normalize-package-data/test/normalize.js
+++ b/deps/npm/node_modules/normalize-package-data/test/normalize.js
@@ -9,6 +9,7 @@ var warningMessages = require("../lib/warning_messages.json")
var safeFormat = require("../lib/safe_format")
var rpjPath = path.resolve(__dirname,"./fixtures/read-package-json.json")
+
tap.test("normalize some package data", function(t) {
var packageData = require(rpjPath)
var warnings = []
@@ -143,7 +144,7 @@ tap.test("gist bugs url", function(t) {
repository: "git@gist.github.com:123456.git"
}
normalize(d)
- t.same(d.repository, { type: 'git', url: 'git@gist.github.com:123456.git' })
+ t.same(d.repository, { type: 'git', url: 'git+ssh://git@gist.github.com/123456.git' })
t.same(d.bugs, { url: 'https://gist.github.com/123456' })
t.end();
});
@@ -151,21 +152,21 @@ tap.test("gist bugs url", function(t) {
tap.test("singularize repositories", function(t) {
var d = {repositories:["git@gist.github.com:123456.git"]}
normalize(d)
- t.same(d.repository, { type: 'git', url: 'git@gist.github.com:123456.git' })
+ t.same(d.repository, { type: 'git', url: 'git+ssh://git@gist.github.com/123456.git' })
t.end()
});
tap.test("treat visionmedia/express as github repo", function(t) {
var d = {repository: {type: "git", url: "visionmedia/express"}}
normalize(d)
- t.same(d.repository, { type: "git", url: "https://github.com/visionmedia/express" })
+ t.same(d.repository, { type: "git", url: "https://github.com/visionmedia/express.git" })
t.end()
});
tap.test("treat isaacs/node-graceful-fs as github repo", function(t) {
var d = {repository: {type: "git", url: "isaacs/node-graceful-fs"}}
normalize(d)
- t.same(d.repository, { type: "git", url: "https://github.com/isaacs/node-graceful-fs" })
+ t.same(d.repository, { type: "git", url: "https://github.com/isaacs/node-graceful-fs.git" })
t.end()
});
@@ -174,7 +175,7 @@ tap.test("homepage field will set to github url if repository is a github repo",
normalize(a={
repository: { type: "git", url: "https://github.com/isaacs/node-graceful-fs" }
})
- t.same(a.homepage, 'https://github.com/isaacs/node-graceful-fs')
+ t.same(a.homepage, 'https://github.com/isaacs/node-graceful-fs#readme')
t.end()
})
@@ -192,14 +193,14 @@ tap.test("homepage field will set to github gist url if repository is a shorthan
normalize(a={
repository: { type: "git", url: "sindresorhus/chalk" }
})
- t.same(a.homepage, 'https://github.com/sindresorhus/chalk')
+ t.same(a.homepage, 'https://github.com/sindresorhus/chalk#readme')
t.end()
})
-tap.test("treat isaacs/node-graceful-fs as github repo in dependencies", function(t) {
+tap.test("don't mangle github shortcuts in dependencies", function(t) {
var d = {dependencies: {"node-graceful-fs": "isaacs/node-graceful-fs"}}
normalize(d)
- t.same(d.dependencies, {"node-graceful-fs": "git+https://github.com/isaacs/node-graceful-fs" })
+ t.same(d.dependencies, {"node-graceful-fs": "github:isaacs/node-graceful-fs" })
t.end()
});
diff --git a/deps/npm/node_modules/normalize-package-data/test/typo.js b/deps/npm/node_modules/normalize-package-data/test/typo.js
index eda75545e9..dfa2b90e53 100644
--- a/deps/npm/node_modules/normalize-package-data/test/typo.js
+++ b/deps/npm/node_modules/normalize-package-data/test/typo.js
@@ -102,6 +102,19 @@ test('typos', function(t) {
t.same(warnings, expect)
warnings.length = 0
+ expect =
+ [ warningMessages.missingDescription,
+ warningMessages.missingRepository,
+ warningMessages.missingReadme ]
+
+ normalize({name:"name"
+ ,version:"1.2.5"
+ ,scripts:{server:"start",tests:"test"
+ ,start:"start",test:"test"}}, warn)
+
+ t.same(warnings, expect)
+
+ warnings.length = 0
expect = []
normalize({private: true
diff --git a/deps/npm/node_modules/npm-package-arg/npa.js b/deps/npm/node_modules/npm-package-arg/npa.js
index 883c5401b4..2cba4cfb15 100644
--- a/deps/npm/node_modules/npm-package-arg/npa.js
+++ b/deps/npm/node_modules/npm-package-arg/npa.js
@@ -134,6 +134,8 @@ function parseUrl (res, arg, urlparse) {
ssh: gitHost.ssh(),
sshUrl: gitHost.sshurl(),
httpsUrl: gitHost.https(),
+ gitUrl: gitHost.git(),
+ shortcut: gitHost.shortcut(),
directUrl: gitHost.file("package.json")
}
return res
diff --git a/deps/npm/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/npm-package-arg/package.json
index b742b6f4d2..5cf76757f8 100644
--- a/deps/npm/node_modules/npm-package-arg/package.json
+++ b/deps/npm/node_modules/npm-package-arg/package.json
@@ -1,13 +1,13 @@
{
"name": "npm-package-arg",
- "version": "3.1.1",
+ "version": "4.0.0",
"description": "Parse the things that can be arguments to `npm install`",
"main": "npa.js",
"directories": {
"test": "test"
},
"dependencies": {
- "hosted-git-info": "^1.5.3",
+ "hosted-git-info": "^2.0.2",
"semver": "4"
},
"devDependencies": {
@@ -30,34 +30,10 @@
"url": "https://github.com/npm/npm-package-arg/issues"
},
"homepage": "https://github.com/npm/npm-package-arg",
- "gitHead": "1dc802d4b449f1599c7275bb948c6ecd265c23a8",
- "_id": "npm-package-arg@3.1.1",
- "_shasum": "c9e5f7587f8484d1372a9b386fbf8b2443fc1bdb",
- "_from": "npm-package-arg@>=3.1.1 <3.2.0",
- "_npmVersion": "2.6.1",
- "_nodeVersion": "1.1.0",
- "_npmUser": {
- "name": "iarna",
- "email": "me@re-becca.org"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- },
- {
- "name": "iarna",
- "email": "me@re-becca.org"
- }
- ],
- "dist": {
- "shasum": "c9e5f7587f8484d1372a9b386fbf8b2443fc1bdb",
- "tarball": "http://registry.npmjs.org/npm-package-arg/-/npm-package-arg-3.1.1.tgz"
- },
- "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-3.1.1.tgz",
- "readme": "ERROR: No README data found!"
+ "gitHead": "25ac404d9f3b77b14be9b05a7dafd9cb99557fdc",
+ "readme": "# npm-package-arg\n\nParse package name and specifier passed to commands like `npm install` or\n`npm cache add`. This just parses the text given-- it's worth noting that\n`npm` has further logic it applies by looking at your disk to figure out\nwhat ambiguous specifiers are. If you want that logic, please see\n[realize-package-specifier].\n\n[realize-package-specifier]: https://www.npmjs.org/package/realize-package-specifier\n\nArguments look like: `foo@1.2`, `@bar/foo@1.2`, `foo@user/foo`, `http://x.com/foo.tgz`,\n`git+https://github.com/user/foo`, `bitbucket:user/foo`, `foo.tar.gz` or `bar`\n\n## EXAMPLES\n\n```javascript\nvar assert = require(\"assert\")\nvar npa = require(\"npm-package-arg\")\n\n// Pass in the descriptor, and it'll return an object\nvar parsed = npa(\"@bar/foo@1.2\")\n\n// Returns an object like:\n{\n raw: '@bar/foo@1.2', // what was passed in\n name: \"@bar/foo\", // the name of the package\n scope: \"@bar\", // the private scope of the package, or null\n type: \"range\", // the type of specifier this is\n spec: \">=1.2.0 <1.3.0\" // the expanded specifier\n rawSpec: \"1.2\" // the specifier as passed in\n }\n\n// Parsing urls pointing at hosted git services produces a variation:\nvar parsed = npa(\"git+https://github.com/user/foo\")\n\n// Returns an object like:\n{\n raw: 'git+https://github.com/user/foo',\n scope: null,\n name: null,\n rawSpec: 'git+https://github.com/user/foo',\n spec: 'user/foo',\n type: 'hosted',\n hosted: {\n type: 'github',\n ssh: 'git@github.com:user/foo.git',\n sshurl: 'git+ssh://git@github.com/user/foo.git',\n https: 'https://github.com/user/foo.git',\n directUrl: 'https://raw.githubusercontent.com/user/foo/master/package.json'\n }\n}\n\n// Completely unreasonable invalid garbage throws an error\n// Make sure you wrap this in a try/catch if you have not\n// already sanitized the inputs!\nassert.throws(function() {\n npa(\"this is not \\0 a valid package name or url\")\n})\n```\n\n## USING\n\n`var npa = require('npm-package-arg')`\n\n* var result = npa(*arg*)\n\nParses *arg* and returns a result object detailing what *arg* is.\n\n*arg* -- a package descriptor, like: `foo@1.2`, or `foo@user/foo`, or\n`http://x.com/foo.tgz`, or `git+https://github.com/user/foo`\n\n## RESULT OBJECT\n\nThe objects that are returned by npm-package-arg contain the following\nkeys:\n\n* `name` - If known, the `name` field expected in the resulting pkg.\n* `type` - One of the following strings:\n * `git` - A git repo\n * `hosted` - A hosted project, from github, bitbucket or gitlab. Originally\n either a full url pointing at one of these services or a shorthand like\n `user/project` or `github:user/project` for github or `bitbucket:user/project`\n for bitbucket.\n * `tag` - A tagged version, like `\"foo@latest\"`\n * `version` - A specific version number, like `\"foo@1.2.3\"`\n * `range` - A version range, like `\"foo@2.x\"`\n * `local` - A local file or folder path\n * `remote` - An http url (presumably to a tgz)\n* `spec` - The \"thing\". URL, the range, git repo, etc.\n* `hosted` - If type=hosted this will be an object with the following keys:\n * `type` - github, bitbucket or gitlab\n * `ssh` - The ssh path for this git repo\n * `sshUrl` - The ssh URL for this git repo\n * `httpsUrl` - The HTTPS URL for this git repo\n * `directUrl` - The URL for the package.json in this git repo\n* `raw` - The original un-modified string that was provided.\n* `rawSpec` - The part after the `name@...`, as it was originally\n provided.\n* `scope` - If a name is something like `@org/module` then the `scope`\n field will be set to `org`. If it doesn't have a scoped name, then\n scope is `null`.\n",
+ "readmeFilename": "README.md",
+ "_id": "npm-package-arg@4.0.0",
+ "_shasum": "04766dc98dbc19f6d627a5817075f4ce13d64a5d",
+ "_from": "npm-package-arg@>=4.0.0 <5.0.0"
}
diff --git a/deps/npm/node_modules/npm-package-arg/test/bitbucket.js b/deps/npm/node_modules/npm-package-arg/test/bitbucket.js
index 48bbdbcf9b..83f99fc1be 100644
--- a/deps/npm/node_modules/npm-package-arg/test/bitbucket.js
+++ b/deps/npm/node_modules/npm-package-arg/test/bitbucket.js
@@ -9,7 +9,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user/foo-js.git",
+ spec: "bitbucket:user/foo-js",
raw: "bitbucket:user/foo-js"
},
@@ -17,7 +17,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user/foo-js.git#bar/baz",
+ spec: "bitbucket:user/foo-js#bar/baz",
raw: "bitbucket:user/foo-js#bar/baz"
},
@@ -25,7 +25,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user..blerg--/..foo-js.git# . . . . . some . tags / / /",
+ spec: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /",
raw: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /"
},
@@ -33,7 +33,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user/foo-js.git#bar/baz/bin",
+ spec: "bitbucket:user/foo-js#bar/baz/bin",
raw: "bitbucket:user/foo-js#bar/baz/bin"
},
@@ -41,7 +41,7 @@ require("tap").test("basic", function (t) {
name: "foo",
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user/foo-js.git",
+ spec: "bitbucket:user/foo-js",
raw: "foo@bitbucket:user/foo-js"
},
@@ -57,7 +57,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user/foo.git",
+ spec: "https://bitbucket.org/user/foo.git",
raw: "https://bitbucket.org/user/foo.git"
},
diff --git a/deps/npm/node_modules/npm-package-arg/test/github.js b/deps/npm/node_modules/npm-package-arg/test/github.js
index 63fd26c10a..a51cd08866 100644
--- a/deps/npm/node_modules/npm-package-arg/test/github.js
+++ b/deps/npm/node_modules/npm-package-arg/test/github.js
@@ -9,7 +9,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo-js.git",
+ spec: "github:user/foo-js",
raw: "user/foo-js"
},
@@ -17,7 +17,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo-js.git#bar/baz",
+ spec: "github:user/foo-js#bar/baz",
raw: "user/foo-js#bar/baz"
},
@@ -25,7 +25,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user..blerg--/..foo-js.git# . . . . . some . tags / / /",
+ spec: "github:user..blerg--/..foo-js# . . . . . some . tags / / /",
raw: "user..blerg--/..foo-js# . . . . . some . tags / / /"
},
@@ -33,7 +33,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo-js.git#bar/baz/bin",
+ raw: "github:user/foo-js#bar/baz/bin",
raw: "user/foo-js#bar/baz/bin"
},
@@ -41,7 +41,7 @@ require("tap").test("basic", function (t) {
name: "foo",
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo-js.git",
+ spec: "github:user/foo-js",
raw: "foo@user/foo-js"
},
@@ -49,7 +49,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo-js.git",
+ spec: "github:user/foo-js",
raw: "github:user/foo-js"
},
@@ -65,7 +65,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo.git",
+ spec: "git://github.com/user/foo.git",
raw: "git://github.com/user/foo"
},
@@ -73,7 +73,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo.git",
+ spec: "https://github.com/user/foo.git",
raw: "https://github.com/user/foo.git"
},
@@ -90,8 +90,8 @@ require("tap").test("basic", function (t) {
"foo@bar/foo": {
name: "foo",
type: "hosted",
- hosted: { type: "github" },
- spec: "git+ssh://git@github.com/bar/foo.git",
+ hosted: { type: "github" },
+ spec: "github:bar/foo",
raw: "foo@bar/foo"
}
}
diff --git a/deps/npm/node_modules/npm-package-arg/test/gitlab.js b/deps/npm/node_modules/npm-package-arg/test/gitlab.js
index 36ea016db7..94c9548148 100644
--- a/deps/npm/node_modules/npm-package-arg/test/gitlab.js
+++ b/deps/npm/node_modules/npm-package-arg/test/gitlab.js
@@ -9,7 +9,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user/foo-js.git",
+ raw: "gitlab:user/foo-js",
raw: "gitlab:user/foo-js"
},
@@ -17,7 +17,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user/foo-js.git#bar/baz",
+ raw: "gitlab:user/foo-js#bar/baz",
raw: "gitlab:user/foo-js#bar/baz"
},
@@ -25,7 +25,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user..blerg--/..foo-js.git# . . . . . some . tags / / /",
+ spec: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /",
raw: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /"
},
@@ -33,7 +33,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user/foo-js.git#bar/baz/bin",
+ spec: "gitlab:user/foo-js#bar/baz/bin",
raw: "gitlab:user/foo-js#bar/baz/bin"
},
@@ -41,7 +41,7 @@ require("tap").test("basic", function (t) {
name: "foo",
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user/foo-js.git",
+ spec: "gitlab:user/foo-js",
raw: "foo@gitlab:user/foo-js"
},
@@ -57,7 +57,7 @@ require("tap").test("basic", function (t) {
name: null,
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user/foo.git",
+ spec: "https://gitlab.com/user/foo.git",
raw: "https://gitlab.com/user/foo.git"
},
diff --git a/deps/npm/node_modules/npm-registry-client/lib/adduser.js b/deps/npm/node_modules/npm-registry-client/lib/adduser.js
index bf0a048578..a6a779d8ca 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/adduser.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/adduser.js
@@ -76,7 +76,7 @@ function adduser (uri, params, cb) {
client.log.verbose('adduser', 'update existing user')
return client.request(
uri + '?write=true',
- { body: userobj, auth: auth },
+ { auth: auth },
function (er, data, json, response) {
if (er || data.error) {
return cb(er, data, json, response)
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/index.js
index 7511eed8ab..b55ae7e03d 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/index.js
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/index.js
@@ -1,7 +1,11 @@
var Writable = require('readable-stream').Writable
var inherits = require('inherits')
-var TA = require('typedarray')
-var U8 = typeof Uint8Array !== 'undefined' ? Uint8Array : TA.Uint8Array
+
+if (typeof Uint8Array === 'undefined') {
+ var U8 = require('typedarray').Uint8Array
+} else {
+ var U8 = Uint8Array
+}
function ConcatStream(opts, cb) {
if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb)
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json
index 4eb9ce4f3c..466dfdfe01 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json
@@ -5,7 +5,7 @@
"main": "lib/util.js",
"repository": {
"type": "git",
- "url": "git://github.com/isaacs/core-util-is"
+ "url": "git://github.com/isaacs/core-util-is.git"
},
"keywords": [
"util",
@@ -49,6 +49,5 @@
],
"directories": {},
"_shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538",
- "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz",
- "scripts": {}
+ "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz"
}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json
index 295adce713..23e9759b65 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json
@@ -17,7 +17,7 @@
},
"repository": {
"type": "git",
- "url": "git://github.com/isaacs/readable-stream"
+ "url": "git://github.com/isaacs/readable-stream.git"
},
"keywords": [
"readable",
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json
index 0cdb8416da..0a5652171d 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json
@@ -1,6 +1,6 @@
{
"name": "concat-stream",
- "version": "1.4.7",
+ "version": "1.4.8",
"description": "writable stream that concatenates strings or binary data and calls a callback with the result",
"tags": [
"stream",
@@ -14,7 +14,7 @@
},
"repository": {
"type": "git",
- "url": "http://github.com/maxogden/concat-stream.git"
+ "url": "git+ssh://git@github.com/maxogden/concat-stream.git"
},
"bugs": {
"url": "http://github.com/maxogden/concat-stream/issues"
@@ -51,13 +51,13 @@
"android-browser/4.2..latest"
]
},
- "gitHead": "41edc57536490dce9f015131c29a6470c9412b27",
+ "gitHead": "1f4ea1a7791b9366a133cab033eb0f3564cb0d92",
"homepage": "https://github.com/maxogden/concat-stream",
- "_id": "concat-stream@1.4.7",
- "_shasum": "0ceaa47b87a581d2a7a782b92b81d5020c3f9925",
+ "_id": "concat-stream@1.4.8",
+ "_shasum": "e8325bb89e55000e52b626d97466fde1a28cfe5d",
"_from": "concat-stream@>=1.4.6 <2.0.0",
- "_npmVersion": "2.1.8",
- "_nodeVersion": "0.10.28",
+ "_npmVersion": "2.7.0",
+ "_nodeVersion": "1.5.1",
"_npmUser": {
"name": "maxogden",
"email": "max@maxogden.com"
@@ -69,10 +69,10 @@
}
],
"dist": {
- "shasum": "0ceaa47b87a581d2a7a782b92b81d5020c3f9925",
- "tarball": "http://registry.npmjs.org/concat-stream/-/concat-stream-1.4.7.tgz"
+ "shasum": "e8325bb89e55000e52b626d97466fde1a28cfe5d",
+ "tarball": "http://registry.npmjs.org/concat-stream/-/concat-stream-1.4.8.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.7.tgz",
+ "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.8.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md
index e6dda4e34a..d028aec3c0 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md
@@ -73,7 +73,7 @@ By default `concat-stream` will give you back the same data type as the type of
* `uint8array`, `u8`, `uint8` - get back a Uint8Array
* `object`, get back an array of Objects
-If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't int he list above), it will try to convert concat them into a `Buffer`.
+If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`.
# error handling
diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json
index 5643d79a41..c46ed80ed2 100644
--- a/deps/npm/node_modules/npm-registry-client/package.json
+++ b/deps/npm/node_modules/npm-registry-client/package.json
@@ -6,9 +6,9 @@
},
"name": "npm-registry-client",
"description": "Client for the npm registry",
- "version": "6.1.2",
+ "version": "6.3.2",
"repository": {
- "url": "git://github.com/isaacs/npm-registry-client"
+ "url": "git://github.com/isaacs/npm-registry-client.git"
},
"main": "index.js",
"scripts": {
@@ -19,8 +19,8 @@
"concat-stream": "^1.4.6",
"graceful-fs": "^3.0.0",
"mkdirp": "^0.5.0",
- "normalize-package-data": "~1.0.1",
- "npm-package-arg": "^3.0.0",
+ "normalize-package-data": "~1.0.1 || ^2.0.0",
+ "npm-package-arg": "^3.0.0 || ^4.0.0",
"once": "^1.3.0",
"request": "^2.47.0",
"retry": "^0.6.1",
@@ -41,12 +41,12 @@
"license": "ISC",
"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(config)\nvar uri = \"npm://registry.npmjs.org/npm\"\nvar params = {timeout: 1000}\n\nclient.get(uri, params, function (error, 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# Registry URLs\n\nThe registry calls take either a full URL pointing to a resource in the\nregistry, or a base URL for the registry as a whole (including the registry\npath – but be sure to terminate the path with `/`). `http` and `https` URLs are\nthe only ones supported.\n\n## Using the client\n\nEvery call to the client follows the same pattern:\n\n* `uri` {String} The *fully-qualified* URI of the registry API method being\n invoked.\n* `params` {Object} Per-request parameters.\n* `callback` {Function} Callback to be invoked when the call is complete.\n\n### Credentials\n\nMany requests to the registry can by authenticated, and require credentials\nfor authorization. These credentials always look the same:\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n**or**\n\n* `token` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n## API\n\n### client.access(uri, params, cb)\n\n* `uri` {String} Registry URL for the package's access API endpoint.\n Looks like `/-/package/<package name>/access`.\n* `params` {Object} Object containing per-request properties.\n * `access` {String} New access level for the package. Can be either\n `public` or `restricted`. Registry will raise an error if trying\n to change the access level of an unscoped package.\n * `auth` {Credentials}\n\nSet the access level for scoped packages. For now, there are only two\naccess levels: \"public\" and \"restricted\".\n\n### client.adduser(uri, params, cb)\n\n* `uri` {String} Base registry URL.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\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\nAdd a user account to the registry, or verify the credentials.\n\n### client.deprecate(uri, params, cb)\n\n* `uri` {String} Full registry URI for the deprecated package.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Semver version range.\n * `message` {String} The message to use as a deprecation warning.\n * `auth` {Credentials}\n* `cb` {Function}\n\nDeprecate a version of a package in the registry.\n\n### client.distTags.fetch(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `auth` {Credentials}\n* `cb` {Function}\n\nFetch all of the `dist-tags` for the named package.\n\n### client.distTags.add(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTag` {String} Name of the new `dist-tag`.\n * `version` {String} Exact version to be mapped to the `dist-tag`.\n * `auth` {Credentials}\n* `cb` {Function}\n\nAdd (or replace) a single dist-tag onto the named package.\n\n### client.distTags.set(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTags` {Object} Object containing a map from tag names to package\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nSet all of the `dist-tags` for the named package at once, creating any\n`dist-tags` that do not already exit. Any `dist-tags` not included in the\n`distTags` map will be removed.\n\n### client.distTags.update(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTags` {Object} Object containing a map from tag names to package\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nUpdate the values of multiple `dist-tags`, creating any `dist-tags` that do\nnot already exist. Any pre-existing `dist-tags` not included in the `distTags`\nmap will be left alone.\n\n### client.distTags.rm(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTag` {String} Name of the new `dist-tag`.\n * `auth` {Credentials}\n* `cb` {Function}\n\nRemove a single `dist-tag` from the named package.\n\n### client.get(uri, params, cb)\n\n* `uri` {String} The complete registry URI to fetch\n* `params` {Object} Object containing per-request properties.\n * `timeout` {Number} Duration before the request times out. Optional\n (default: never).\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `staleOk` {Boolean} If there's cached data available, then return that to\n the callback quickly, and update the cache the background. Optional\n (default: false).\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n\nFetches data from the registry via a GET request, saving it in the cache folder\nwith the ETag or the \"Last Modified\" timestamp.\n\n### client.publish(uri, params, cb)\n\n* `uri` {String} The registry URI for the package to publish.\n* `params` {Object} Object containing per-request properties.\n * `metadata` {Object} Package metadata.\n * `access` {String} Access for the package. Can be `public` or `restricted` (no default).\n * `body` {Stream} Stream of the package body / tarball.\n * `auth` {Credentials}\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder.\n\n### client.star(uri, params, cb)\n\n* `uri` {String} The complete registry URI for the package to star.\n* `params` {Object} Object containing per-request properties.\n * `starred` {Boolean} True to star the package, false to unstar it. Optional\n (default: false).\n * `auth` {Credentials}\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 unstar a\npackage, though other writes do require that the user be the package owner.\n\n### client.stars(uri, params, cb)\n\n* `uri` {String} The base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `username` {String} Name of user to fetch starred packages for. Optional\n (default: user in `auth`).\n * `auth` {Credentials} Optional (required if `username` is omitted).\n* `cb` {Function}\n\nView your own or another user's starred packages.\n\n### client.tag(uri, params, cb)\n\n* `uri` {String} The complete registry URI to tag\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Version to tag.\n * `tag` {String} Tag name to apply.\n * `auth` {Credentials}\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the\nspecified version.\n\n### client.unpublish(uri, params, cb)\n\n* `uri` {String} The complete registry URI of the package to unpublish.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} version to unpublish. Optional – omit to unpublish all\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When the\nlast version us unpublished, the entire document is removed from the database.\n\n### client.whoami(uri, params, cb)\n\n* `uri` {String} The base registry for the URI.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\n* `cb` {Function}\n\nSimple call to see who the registry thinks you are. Especially useful with\ntoken-based auth.\n\n\n## PLUMBING\n\nThe below are primarily intended for use by the rest of the API, or by the npm\ncaching logic directly.\n\n### client.request(uri, params, cb)\n\n* `uri` {String} URI pointing to the resource to request.\n* `params` {Object} Object containing per-request properties.\n * `method` {String} HTTP method. Optional (default: \"GET\").\n * `body` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON. Optional – body\n only used for write operations.\n * `etag` {String} The cached ETag. Optional.\n * `lastModified` {String} The cached Last-Modified timestamp. Optional.\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `auth` {Credentials} Optional.\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 generic request to the registry. All the other methods are wrappers\naround `client.request`.\n\n### client.fetch(uri, params, cb)\n\n* `uri` {String} The complete registry URI to upload to\n* `params` {Object} Object containing per-request properties.\n * `headers` {Stream} HTTP headers to be included with the request. Optional.\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n\nFetch a package from a URL, with auth set appropriately if included. Used to\ncache remote tarballs as well as request package tarballs from the registry.\n\n# Configuration\n\nThe client uses its own configuration, which is just passed in as a simple\nnested object. The following are the supported values (with their defaults, if\nany):\n\n* `proxy.http` {URL} The URL to proxy HTTP requests through.\n* `proxy.https` {URL} The URL to proxy HTTPS requests through. Defaults to be\n the same as `proxy.http` if unset.\n* `proxy.localAddress` {IP} The local address to use on multi-homed systems.\n* `ssl.ca` {String} Certificate signing authority certificates to trust.\n* `ssl.certificate` {String} Client certificate (PEM encoded). Enable access\n to servers that require client certificates.\n* `ssl.key` {String} Private key (PEM encoded) for client certificate.\n* `ssl.strict` {Boolean} Whether or not to be strict with SSL certificates.\n Default = `true`\n* `retry.count` {Number} Number of times to retry on GET failures. Default = 2.\n* `retry.factor` {Number} `factor` setting for `node-retry`. Default = 10.\n* `retry.minTimeout` {Number} `minTimeout` setting for `node-retry`.\n Default = 10000 (10 seconds)\n* `retry.maxTimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default = 60000 (60 seconds)\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* `defaultTag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `couchToken` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login).\n* `sessionToken` {string} A random identifier for this set of client requests.\n Default = 8 random hexadecimal bytes.\n",
"readmeFilename": "README.md",
- "gitHead": "93606bb3d6c23971ff5d43763dfa10aada5775da",
+ "gitHead": "dd4029904febd6e0c30371b2addad5715526cd68",
"bugs": {
"url": "https://github.com/isaacs/npm-registry-client/issues"
},
- "homepage": "https://github.com/isaacs/npm-registry-client",
- "_id": "npm-registry-client@6.1.2",
- "_shasum": "b74ba7efa9bfbbce46a1bd15fa97dc7d784099cb",
- "_from": "npm-registry-client@>=6.1.2 <7.0.0"
+ "homepage": "https://github.com/isaacs/npm-registry-client#readme",
+ "_id": "npm-registry-client@6.3.2",
+ "_shasum": "a662a36c6eda56c184099631cf429ba69b73d65b",
+ "_from": "npm-registry-client@>=6.3.2 <6.4.0"
}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/README.md b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/README.md
index 3491c5956c..52f9f9ae1e 100644
--- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/README.md
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/README.md
@@ -25,7 +25,7 @@ single.completeWork(20)
console.log(top.completed()) // 0.2
fs.stat("file", function(er, stat) {
- if (er) throw er
+ if (er) throw er
var stream = top.newStream("file", stat.size)
console.log(top.completed()) // now 0.1 as single is 50% of the job and is 20% complete
// and 50% * 20% == 10%
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js
index ffbdfb174a..22f47ac885 100644
--- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js
@@ -1,5 +1,5 @@
"use strict"
-var stream = require("stream");
+var stream = require("readable-stream");
var EventEmitter = require("events").EventEmitter
var util = require("util")
var delegate = require("delegates")
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json
index 7c5dc77523..e22f637b83 100644
--- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json
@@ -43,7 +43,5 @@
"tarball": "http://registry.npmjs.org/delegates/-/delegates-0.1.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/delegates/-/delegates-0.1.0.tgz",
- "readme": "ERROR: No README data found!",
- "scripts": {}
+ "_resolved": "https://registry.npmjs.org/delegates/-/delegates-0.1.0.tgz"
}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/.npmignore b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/.npmignore
new file mode 100644
index 0000000000..38344f87a6
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/.npmignore
@@ -0,0 +1,5 @@
+build/
+test/
+examples/
+fs.js
+zlib.js \ No newline at end of file
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..e3d4e695a4
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE
@@ -0,0 +1,18 @@
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/README.md b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..e46b823903
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/README.md
@@ -0,0 +1,15 @@
+# readable-stream
+
+***Node-core streams for userland***
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+This package is a mirror of the Streams2 and Streams3 implementations in Node-core.
+
+If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core.
+
+**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12.
+
+**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"`
+
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000000..ca807af876
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_duplex.js")
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/float.patch b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/float.patch
new file mode 100644
index 0000000000..b984607a41
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/float.patch
@@ -0,0 +1,923 @@
+diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js
+index c5a741c..a2e0d8e 100644
+--- a/lib/_stream_duplex.js
++++ b/lib/_stream_duplex.js
+@@ -26,8 +26,8 @@
+
+ module.exports = Duplex;
+ var util = require('util');
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('./_stream_readable');
++var Writable = require('./_stream_writable');
+
+ util.inherits(Duplex, Readable);
+
+diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js
+index a5e9864..330c247 100644
+--- a/lib/_stream_passthrough.js
++++ b/lib/_stream_passthrough.js
+@@ -25,7 +25,7 @@
+
+ module.exports = PassThrough;
+
+-var Transform = require('_stream_transform');
++var Transform = require('./_stream_transform');
+ var util = require('util');
+ util.inherits(PassThrough, Transform);
+
+diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js
+index 0c3fe3e..90a8298 100644
+--- a/lib/_stream_readable.js
++++ b/lib/_stream_readable.js
+@@ -23,10 +23,34 @@ module.exports = Readable;
+ Readable.ReadableState = ReadableState;
+
+ var EE = require('events').EventEmitter;
++if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
++ return emitter.listeners(type).length;
++};
++
++if (!global.setImmediate) global.setImmediate = function setImmediate(fn) {
++ return setTimeout(fn, 0);
++};
++if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) {
++ return clearTimeout(i);
++};
++
+ var Stream = require('stream');
+ var util = require('util');
++if (!util.isUndefined) {
++ var utilIs = require('core-util-is');
++ for (var f in utilIs) {
++ util[f] = utilIs[f];
++ }
++}
+ var StringDecoder;
+-var debug = util.debuglog('stream');
++var debug;
++if (util.debuglog)
++ debug = util.debuglog('stream');
++else try {
++ debug = require('debuglog')('stream');
++} catch (er) {
++ debug = function() {};
++}
+
+ util.inherits(Readable, Stream);
+
+@@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) {
+
+
+ function onEofChunk(stream, state) {
+- if (state.decoder && !state.ended) {
++ if (state.decoder && !state.ended && state.decoder.end) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js
+index b1f9fcc..b0caf57 100644
+--- a/lib/_stream_transform.js
++++ b/lib/_stream_transform.js
+@@ -64,8 +64,14 @@
+
+ module.exports = Transform;
+
+-var Duplex = require('_stream_duplex');
++var Duplex = require('./_stream_duplex');
+ var util = require('util');
++if (!util.isUndefined) {
++ var utilIs = require('core-util-is');
++ for (var f in utilIs) {
++ util[f] = utilIs[f];
++ }
++}
+ util.inherits(Transform, Duplex);
+
+
+diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js
+index ba2e920..f49288b 100644
+--- a/lib/_stream_writable.js
++++ b/lib/_stream_writable.js
+@@ -27,6 +27,12 @@ module.exports = Writable;
+ Writable.WritableState = WritableState;
+
+ var util = require('util');
++if (!util.isUndefined) {
++ var utilIs = require('core-util-is');
++ for (var f in utilIs) {
++ util[f] = utilIs[f];
++ }
++}
+ var Stream = require('stream');
+
+ util.inherits(Writable, Stream);
+@@ -119,7 +125,7 @@ function WritableState(options, stream) {
+ function Writable(options) {
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex))
++ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex')))
+ return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
+diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js
+index e3787e4..8cd2127 100644
+--- a/test/simple/test-stream-big-push.js
++++ b/test/simple/test-stream-big-push.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+ var str = 'asdfasdfasdfasdfasdf';
+
+ var r = new stream.Readable({
+diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js
+index bb73777..d40efc7 100644
+--- a/test/simple/test-stream-end-paused.js
++++ b/test/simple/test-stream-end-paused.js
+@@ -25,7 +25,7 @@ var gotEnd = false;
+
+ // Make sure we don't miss the end event for paused 0-length streams
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var stream = new Readable();
+ var calledRead = false;
+ stream._read = function() {
+diff --git a/test/simple/test-stream-pipe-after-end.js b/test/simple/test-stream-pipe-after-end.js
+index b46ee90..0be8366 100644
+--- a/test/simple/test-stream-pipe-after-end.js
++++ b/test/simple/test-stream-pipe-after-end.js
+@@ -22,8 +22,8 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('../../lib/_stream_readable');
++var Writable = require('../../lib/_stream_writable');
+ var util = require('util');
+
+ util.inherits(TestReadable, Readable);
+diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js
+deleted file mode 100644
+index f689358..0000000
+--- a/test/simple/test-stream-pipe-cleanup.js
++++ /dev/null
+@@ -1,122 +0,0 @@
+-// Copyright Joyent, Inc. and other Node contributors.
+-//
+-// 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.
+-
+-// This test asserts that Stream.prototype.pipe does not leave listeners
+-// hanging on the source or dest.
+-
+-var common = require('../common');
+-var stream = require('stream');
+-var assert = require('assert');
+-var util = require('util');
+-
+-function Writable() {
+- this.writable = true;
+- this.endCalls = 0;
+- stream.Stream.call(this);
+-}
+-util.inherits(Writable, stream.Stream);
+-Writable.prototype.end = function() {
+- this.endCalls++;
+-};
+-
+-Writable.prototype.destroy = function() {
+- this.endCalls++;
+-};
+-
+-function Readable() {
+- this.readable = true;
+- stream.Stream.call(this);
+-}
+-util.inherits(Readable, stream.Stream);
+-
+-function Duplex() {
+- this.readable = true;
+- Writable.call(this);
+-}
+-util.inherits(Duplex, Writable);
+-
+-var i = 0;
+-var limit = 100;
+-
+-var w = new Writable();
+-
+-var r;
+-
+-for (i = 0; i < limit; i++) {
+- r = new Readable();
+- r.pipe(w);
+- r.emit('end');
+-}
+-assert.equal(0, r.listeners('end').length);
+-assert.equal(limit, w.endCalls);
+-
+-w.endCalls = 0;
+-
+-for (i = 0; i < limit; i++) {
+- r = new Readable();
+- r.pipe(w);
+- r.emit('close');
+-}
+-assert.equal(0, r.listeners('close').length);
+-assert.equal(limit, w.endCalls);
+-
+-w.endCalls = 0;
+-
+-r = new Readable();
+-
+-for (i = 0; i < limit; i++) {
+- w = new Writable();
+- r.pipe(w);
+- w.emit('close');
+-}
+-assert.equal(0, w.listeners('close').length);
+-
+-r = new Readable();
+-w = new Writable();
+-var d = new Duplex();
+-r.pipe(d); // pipeline A
+-d.pipe(w); // pipeline B
+-assert.equal(r.listeners('end').length, 2); // A.onend, A.cleanup
+-assert.equal(r.listeners('close').length, 2); // A.onclose, A.cleanup
+-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup
+-assert.equal(d.listeners('close').length, 3); // A.cleanup, B.onclose, B.cleanup
+-assert.equal(w.listeners('end').length, 0);
+-assert.equal(w.listeners('close').length, 1); // B.cleanup
+-
+-r.emit('end');
+-assert.equal(d.endCalls, 1);
+-assert.equal(w.endCalls, 0);
+-assert.equal(r.listeners('end').length, 0);
+-assert.equal(r.listeners('close').length, 0);
+-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup
+-assert.equal(d.listeners('close').length, 2); // B.onclose, B.cleanup
+-assert.equal(w.listeners('end').length, 0);
+-assert.equal(w.listeners('close').length, 1); // B.cleanup
+-
+-d.emit('end');
+-assert.equal(d.endCalls, 1);
+-assert.equal(w.endCalls, 1);
+-assert.equal(r.listeners('end').length, 0);
+-assert.equal(r.listeners('close').length, 0);
+-assert.equal(d.listeners('end').length, 0);
+-assert.equal(d.listeners('close').length, 0);
+-assert.equal(w.listeners('end').length, 0);
+-assert.equal(w.listeners('close').length, 0);
+diff --git a/test/simple/test-stream-pipe-error-handling.js b/test/simple/test-stream-pipe-error-handling.js
+index c5d724b..c7d6b7d 100644
+--- a/test/simple/test-stream-pipe-error-handling.js
++++ b/test/simple/test-stream-pipe-error-handling.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var Stream = require('stream').Stream;
++var Stream = require('../../').Stream;
+
+ (function testErrorListenerCatches() {
+ var source = new Stream();
+diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js
+index cb9d5fe..56f8d61 100644
+--- a/test/simple/test-stream-pipe-event.js
++++ b/test/simple/test-stream-pipe-event.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common');
+-var stream = require('stream');
++var stream = require('../../');
+ var assert = require('assert');
+ var util = require('util');
+
+diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js
+index f2e6ec2..a5c9bf9 100644
+--- a/test/simple/test-stream-push-order.js
++++ b/test/simple/test-stream-push-order.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var assert = require('assert');
+
+ var s = new Readable({
+diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js
+index 06f43dc..1701a9a 100644
+--- a/test/simple/test-stream-push-strings.js
++++ b/test/simple/test-stream-push-strings.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var util = require('util');
+
+ util.inherits(MyStream, Readable);
+diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js
+index ba6a577..a8e6f7b 100644
+--- a/test/simple/test-stream-readable-event.js
++++ b/test/simple/test-stream-readable-event.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ (function first() {
+ // First test, not reading when the readable is added.
+diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js
+index 2891ad6..11689ba 100644
+--- a/test/simple/test-stream-readable-flow-recursion.js
++++ b/test/simple/test-stream-readable-flow-recursion.js
+@@ -27,7 +27,7 @@ var assert = require('assert');
+ // more data continuously, but without triggering a nextTick
+ // warning or RangeError.
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ // throw an error if we trigger a nextTick warning.
+ process.throwDeprecation = true;
+diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js
+index 0c96476..7827538 100644
+--- a/test/simple/test-stream-unshift-empty-chunk.js
++++ b/test/simple/test-stream-unshift-empty-chunk.js
+@@ -24,7 +24,7 @@ var assert = require('assert');
+
+ // This test verifies that stream.unshift(Buffer(0)) or
+ // stream.unshift('') does not set state.reading=false.
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ var r = new Readable();
+ var nChunks = 10;
+diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js
+index 83fd9fa..17c18aa 100644
+--- a/test/simple/test-stream-unshift-read-race.js
++++ b/test/simple/test-stream-unshift-read-race.js
+@@ -29,7 +29,7 @@ var assert = require('assert');
+ // 3. push() after the EOF signaling null is an error.
+ // 4. _read() is not called after pushing the EOF null chunk.
+
+-var stream = require('stream');
++var stream = require('../../');
+ var hwm = 10;
+ var r = stream.Readable({ highWaterMark: hwm });
+ var chunks = 10;
+@@ -51,7 +51,14 @@ r._read = function(n) {
+
+ function push(fast) {
+ assert(!pushedNull, 'push() after null push');
+- var c = pos >= data.length ? null : data.slice(pos, pos + n);
++ var c;
++ if (pos >= data.length)
++ c = null;
++ else {
++ if (n + pos > data.length)
++ n = data.length - pos;
++ c = data.slice(pos, pos + n);
++ }
+ pushedNull = c === null;
+ if (fast) {
+ pos += n;
+diff --git a/test/simple/test-stream-writev.js b/test/simple/test-stream-writev.js
+index 5b49e6e..b5321f3 100644
+--- a/test/simple/test-stream-writev.js
++++ b/test/simple/test-stream-writev.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var stream = require('stream');
++var stream = require('../../');
+
+ var queue = [];
+ for (var decode = 0; decode < 2; decode++) {
+diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js
+index 3814bf0..248c1be 100644
+--- a/test/simple/test-stream2-basic.js
++++ b/test/simple/test-stream2-basic.js
+@@ -21,7 +21,7 @@
+
+
+ var common = require('../common.js');
+-var R = require('_stream_readable');
++var R = require('../../lib/_stream_readable');
+ var assert = require('assert');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js
+index 6cdd4e9..f0fa84b 100644
+--- a/test/simple/test-stream2-compatibility.js
++++ b/test/simple/test-stream2-compatibility.js
+@@ -21,7 +21,7 @@
+
+
+ var common = require('../common.js');
+-var R = require('_stream_readable');
++var R = require('../../lib/_stream_readable');
+ var assert = require('assert');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js
+index 39b274f..006a19b 100644
+--- a/test/simple/test-stream2-finish-pipe.js
++++ b/test/simple/test-stream2-finish-pipe.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var stream = require('stream');
++var stream = require('../../');
+ var Buffer = require('buffer').Buffer;
+
+ var r = new stream.Readable();
+diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js
+deleted file mode 100644
+index e162406..0000000
+--- a/test/simple/test-stream2-fs.js
++++ /dev/null
+@@ -1,72 +0,0 @@
+-// Copyright Joyent, Inc. and other Node contributors.
+-//
+-// 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.
+-
+-
+-var common = require('../common.js');
+-var R = require('_stream_readable');
+-var assert = require('assert');
+-
+-var fs = require('fs');
+-var FSReadable = fs.ReadStream;
+-
+-var path = require('path');
+-var file = path.resolve(common.fixturesDir, 'x1024.txt');
+-
+-var size = fs.statSync(file).size;
+-
+-var expectLengths = [1024];
+-
+-var util = require('util');
+-var Stream = require('stream');
+-
+-util.inherits(TestWriter, Stream);
+-
+-function TestWriter() {
+- Stream.apply(this);
+- this.buffer = [];
+- this.length = 0;
+-}
+-
+-TestWriter.prototype.write = function(c) {
+- this.buffer.push(c.toString());
+- this.length += c.length;
+- return true;
+-};
+-
+-TestWriter.prototype.end = function(c) {
+- if (c) this.buffer.push(c.toString());
+- this.emit('results', this.buffer);
+-}
+-
+-var r = new FSReadable(file);
+-var w = new TestWriter();
+-
+-w.on('results', function(res) {
+- console.error(res, w.length);
+- assert.equal(w.length, size);
+- var l = 0;
+- assert.deepEqual(res.map(function (c) {
+- return c.length;
+- }), expectLengths);
+- console.log('ok');
+-});
+-
+-r.pipe(w);
+diff --git a/test/simple/test-stream2-httpclient-response-end.js b/test/simple/test-stream2-httpclient-response-end.js
+deleted file mode 100644
+index 15cffc2..0000000
+--- a/test/simple/test-stream2-httpclient-response-end.js
++++ /dev/null
+@@ -1,52 +0,0 @@
+-// Copyright Joyent, Inc. and other Node contributors.
+-//
+-// 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.
+-
+-var common = require('../common.js');
+-var assert = require('assert');
+-var http = require('http');
+-var msg = 'Hello';
+-var readable_event = false;
+-var end_event = false;
+-var server = http.createServer(function(req, res) {
+- res.writeHead(200, {'Content-Type': 'text/plain'});
+- res.end(msg);
+-}).listen(common.PORT, function() {
+- http.get({port: common.PORT}, function(res) {
+- var data = '';
+- res.on('readable', function() {
+- console.log('readable event');
+- readable_event = true;
+- data += res.read();
+- });
+- res.on('end', function() {
+- console.log('end event');
+- end_event = true;
+- assert.strictEqual(msg, data);
+- server.close();
+- });
+- });
+-});
+-
+-process.on('exit', function() {
+- assert(readable_event);
+- assert(end_event);
+-});
+-
+diff --git a/test/simple/test-stream2-large-read-stall.js b/test/simple/test-stream2-large-read-stall.js
+index 2fbfbca..667985b 100644
+--- a/test/simple/test-stream2-large-read-stall.js
++++ b/test/simple/test-stream2-large-read-stall.js
+@@ -30,7 +30,7 @@ var PUSHSIZE = 20;
+ var PUSHCOUNT = 1000;
+ var HWM = 50;
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var r = new Readable({
+ highWaterMark: HWM
+ });
+@@ -39,23 +39,23 @@ var rs = r._readableState;
+ r._read = push;
+
+ r.on('readable', function() {
+- console.error('>> readable');
++ //console.error('>> readable');
+ do {
+- console.error(' > read(%d)', READSIZE);
++ //console.error(' > read(%d)', READSIZE);
+ var ret = r.read(READSIZE);
+- console.error(' < %j (%d remain)', ret && ret.length, rs.length);
++ //console.error(' < %j (%d remain)', ret && ret.length, rs.length);
+ } while (ret && ret.length === READSIZE);
+
+- console.error('<< after read()',
+- ret && ret.length,
+- rs.needReadable,
+- rs.length);
++ //console.error('<< after read()',
++ // ret && ret.length,
++ // rs.needReadable,
++ // rs.length);
+ });
+
+ var endEmitted = false;
+ r.on('end', function() {
+ endEmitted = true;
+- console.error('end');
++ //console.error('end');
+ });
+
+ var pushes = 0;
+@@ -64,11 +64,11 @@ function push() {
+ return;
+
+ if (pushes++ === PUSHCOUNT) {
+- console.error(' push(EOF)');
++ //console.error(' push(EOF)');
+ return r.push(null);
+ }
+
+- console.error(' push #%d', pushes);
++ //console.error(' push #%d', pushes);
+ if (r.push(new Buffer(PUSHSIZE)))
+ setTimeout(push);
+ }
+diff --git a/test/simple/test-stream2-objects.js b/test/simple/test-stream2-objects.js
+index 3e6931d..ff47d89 100644
+--- a/test/simple/test-stream2-objects.js
++++ b/test/simple/test-stream2-objects.js
+@@ -21,8 +21,8 @@
+
+
+ var common = require('../common.js');
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('../../lib/_stream_readable');
++var Writable = require('../../lib/_stream_writable');
+ var assert = require('assert');
+
+ // tiny node-tap lookalike.
+diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js
+index cf7531c..e3f3e4e 100644
+--- a/test/simple/test-stream2-pipe-error-handling.js
++++ b/test/simple/test-stream2-pipe-error-handling.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+
+ (function testErrorListenerCatches() {
+ var count = 1000;
+diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js
+index 5e8e3cb..53b2616 100755
+--- a/test/simple/test-stream2-pipe-error-once-listener.js
++++ b/test/simple/test-stream2-pipe-error-once-listener.js
+@@ -24,7 +24,7 @@ var common = require('../common.js');
+ var assert = require('assert');
+
+ var util = require('util');
+-var stream = require('stream');
++var stream = require('../../');
+
+
+ var Read = function() {
+diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js
+index b63edc3..eb2b0e9 100644
+--- a/test/simple/test-stream2-push.js
++++ b/test/simple/test-stream2-push.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var stream = require('stream');
++var stream = require('../../');
+ var Readable = stream.Readable;
+ var Writable = stream.Writable;
+ var assert = require('assert');
+diff --git a/test/simple/test-stream2-read-sync-stack.js b/test/simple/test-stream2-read-sync-stack.js
+index e8a7305..9740a47 100644
+--- a/test/simple/test-stream2-read-sync-stack.js
++++ b/test/simple/test-stream2-read-sync-stack.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var r = new Readable();
+ var N = 256 * 1024;
+
+diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js
+index cd30178..4b1659d 100644
+--- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js
++++ b/test/simple/test-stream2-readable-empty-buffer-no-eof.js
+@@ -22,10 +22,9 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ test1();
+-test2();
+
+ function test1() {
+ var r = new Readable();
+@@ -88,31 +87,3 @@ function test1() {
+ console.log('ok');
+ });
+ }
+-
+-function test2() {
+- var r = new Readable({ encoding: 'base64' });
+- var reads = 5;
+- r._read = function(n) {
+- if (!reads--)
+- return r.push(null); // EOF
+- else
+- return r.push(new Buffer('x'));
+- };
+-
+- var results = [];
+- function flow() {
+- var chunk;
+- while (null !== (chunk = r.read()))
+- results.push(chunk + '');
+- }
+- r.on('readable', flow);
+- r.on('end', function() {
+- results.push('EOF');
+- });
+- flow();
+-
+- process.on('exit', function() {
+- assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]);
+- console.log('ok');
+- });
+-}
+diff --git a/test/simple/test-stream2-readable-from-list.js b/test/simple/test-stream2-readable-from-list.js
+index 7c96ffe..04a96f5 100644
+--- a/test/simple/test-stream2-readable-from-list.js
++++ b/test/simple/test-stream2-readable-from-list.js
+@@ -21,7 +21,7 @@
+
+ var assert = require('assert');
+ var common = require('../common.js');
+-var fromList = require('_stream_readable')._fromList;
++var fromList = require('../../lib/_stream_readable')._fromList;
+
+ // tiny node-tap lookalike.
+ var tests = [];
+diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js
+index 675da8e..51fd3d5 100644
+--- a/test/simple/test-stream2-readable-legacy-drain.js
++++ b/test/simple/test-stream2-readable-legacy-drain.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Stream = require('stream');
++var Stream = require('../../');
+ var Readable = Stream.Readable;
+
+ var r = new Readable();
+diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js
+index 7314ae7..c971898 100644
+--- a/test/simple/test-stream2-readable-non-empty-end.js
++++ b/test/simple/test-stream2-readable-non-empty-end.js
+@@ -21,7 +21,7 @@
+
+ var assert = require('assert');
+ var common = require('../common.js');
+-var Readable = require('_stream_readable');
++var Readable = require('../../lib/_stream_readable');
+
+ var len = 0;
+ var chunks = new Array(10);
+diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js
+index 2e5cf25..fd8a3dc 100644
+--- a/test/simple/test-stream2-readable-wrap-empty.js
++++ b/test/simple/test-stream2-readable-wrap-empty.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('_stream_readable');
++var Readable = require('../../lib/_stream_readable');
+ var EE = require('events').EventEmitter;
+
+ var oldStream = new EE();
+diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js
+index 90eea01..6b177f7 100644
+--- a/test/simple/test-stream2-readable-wrap.js
++++ b/test/simple/test-stream2-readable-wrap.js
+@@ -22,8 +22,8 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('../../lib/_stream_readable');
++var Writable = require('../../lib/_stream_writable');
+ var EE = require('events').EventEmitter;
+
+ var testRuns = 0, completedRuns = 0;
+diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js
+index 5d2c32a..685531b 100644
+--- a/test/simple/test-stream2-set-encoding.js
++++ b/test/simple/test-stream2-set-encoding.js
+@@ -22,7 +22,7 @@
+
+ var common = require('../common.js');
+ var assert = require('assert');
+-var R = require('_stream_readable');
++var R = require('../../lib/_stream_readable');
+ var util = require('util');
+
+ // tiny node-tap lookalike.
+diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js
+index 9c9ddd8..a0cacc6 100644
+--- a/test/simple/test-stream2-transform.js
++++ b/test/simple/test-stream2-transform.js
+@@ -21,8 +21,8 @@
+
+ var assert = require('assert');
+ var common = require('../common.js');
+-var PassThrough = require('_stream_passthrough');
+-var Transform = require('_stream_transform');
++var PassThrough = require('../../').PassThrough;
++var Transform = require('../../').Transform;
+
+ // tiny node-tap lookalike.
+ var tests = [];
+diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js
+index d66dc3c..365b327 100644
+--- a/test/simple/test-stream2-unpipe-drain.js
++++ b/test/simple/test-stream2-unpipe-drain.js
+@@ -22,7 +22,7 @@
+
+ var common = require('../common.js');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+ var crypto = require('crypto');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js
+index 99f8746..17c92ae 100644
+--- a/test/simple/test-stream2-unpipe-leak.js
++++ b/test/simple/test-stream2-unpipe-leak.js
+@@ -22,7 +22,7 @@
+
+ var common = require('../common.js');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+
+ var chunk = new Buffer('hallo');
+
+diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js
+index 704100c..209c3a6 100644
+--- a/test/simple/test-stream2-writable.js
++++ b/test/simple/test-stream2-writable.js
+@@ -20,8 +20,8 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var W = require('_stream_writable');
+-var D = require('_stream_duplex');
++var W = require('../../').Writable;
++var D = require('../../').Duplex;
+ var assert = require('assert');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js
+index b91bde3..2f72c15 100644
+--- a/test/simple/test-stream3-pause-then-read.js
++++ b/test/simple/test-stream3-pause-then-read.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var stream = require('stream');
++var stream = require('../../');
+ var Readable = stream.Readable;
+ var Writable = stream.Writable;
+
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..b513d61a96
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,89 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ return keys;
+}
+/*</replacement>*/
+
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+forEach(objectKeys(Writable.prototype), function(method) {
+ if (!Duplex.prototype[method])
+ Duplex.prototype[method] = Writable.prototype[method];
+});
+
+function Duplex(options) {
+ if (!(this instanceof Duplex))
+ return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false)
+ this.readable = false;
+
+ if (options && options.writable === false)
+ this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false)
+ this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended)
+ return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ process.nextTick(this.end.bind(this));
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..895ca50a1d
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,46 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough))
+ return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function(chunk, encoding, cb) {
+ cb(null, chunk);
+};
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..19ab358898
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,951 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+
+/*<replacement>*/
+var Buffer = require('buffer').Buffer;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+var EE = require('events').EventEmitter;
+
+/*<replacement>*/
+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+var Stream = require('stream');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var StringDecoder;
+
+
+/*<replacement>*/
+var debug = require('util');
+if (debug && debug.debuglog) {
+ debug = debug.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+
+util.inherits(Readable, Stream);
+
+function ReadableState(options, stream) {
+ var Duplex = require('./_stream_duplex');
+
+ options = options || {};
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var defaultHwm = options.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.buffer = [];
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // when piping, we only care about 'readable' events that happen
+ // after read()ing all the bytes and not getting any pushback.
+ this.ranOut = false;
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ var Duplex = require('./_stream_duplex');
+
+ if (!(this instanceof Readable))
+ return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ Stream.call(this);
+}
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function(chunk, encoding) {
+ var state = this._readableState;
+
+ if (util.isString(chunk) && !state.objectMode) {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = new Buffer(chunk, encoding);
+ encoding = '';
+ }
+ }
+
+ return readableAddChunk(this, state, chunk, encoding, false);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function(chunk) {
+ var state = this._readableState;
+ return readableAddChunk(this, state, chunk, '', true);
+};
+
+function readableAddChunk(stream, state, chunk, encoding, addToFront) {
+ var er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (util.isNullOrUndefined(chunk)) {
+ state.reading = false;
+ if (!state.ended)
+ onEofChunk(stream, state);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (state.ended && !addToFront) {
+ var e = new Error('stream.push() after EOF');
+ stream.emit('error', e);
+ } else if (state.endEmitted && addToFront) {
+ var e = new Error('stream.unshift() after end event');
+ stream.emit('error', e);
+ } else {
+ if (state.decoder && !addToFront && !encoding)
+ chunk = state.decoder.write(chunk);
+
+ if (!addToFront)
+ state.reading = false;
+
+ // if we want the data now, just emit it.
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront)
+ state.buffer.unshift(chunk);
+ else
+ state.buffer.push(chunk);
+
+ if (state.needReadable)
+ emitReadable(stream);
+ }
+
+ maybeReadMore(stream, state);
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+
+ return needMoreData(state);
+}
+
+
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended &&
+ (state.needReadable ||
+ state.length < state.highWaterMark ||
+ state.length === 0);
+}
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function(enc) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 128MB
+var MAX_HWM = 0x800000;
+function roundUpToNextPowerOf2(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2
+ n--;
+ for (var p = 1; p < 32; p <<= 1) n |= n >> p;
+ n++;
+ }
+ return n;
+}
+
+function howMuchToRead(n, state) {
+ if (state.length === 0 && state.ended)
+ return 0;
+
+ if (state.objectMode)
+ return n === 0 ? 0 : 1;
+
+ if (isNaN(n) || util.isNull(n)) {
+ // only flow one buffer at a time
+ if (state.flowing && state.buffer.length)
+ return state.buffer[0].length;
+ else
+ return state.length;
+ }
+
+ if (n <= 0)
+ return 0;
+
+ // If we're asking for more than the target buffer level,
+ // then raise the water mark. Bump up to the next highest
+ // power of 2, to prevent increasing it excessively in tiny
+ // amounts.
+ if (n > state.highWaterMark)
+ state.highWaterMark = roundUpToNextPowerOf2(n);
+
+ // don't have that much. return null, unless we've ended.
+ if (n > state.length) {
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ } else
+ return state.length;
+ }
+
+ return n;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function(n) {
+ debug('read', n);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (!util.isNumber(n) || n > 0)
+ state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 &&
+ state.needReadable &&
+ (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended)
+ endReadable(this);
+ else
+ emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0)
+ endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ }
+
+ if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0)
+ state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ }
+
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (doRead && !state.reading)
+ n = howMuchToRead(nOrig, state);
+
+ var ret;
+ if (n > 0)
+ ret = fromList(n, state);
+ else
+ ret = null;
+
+ if (util.isNull(ret)) {
+ state.needReadable = true;
+ n = 0;
+ }
+
+ state.length -= n;
+
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (state.length === 0 && !state.ended)
+ state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended && state.length === 0)
+ endReadable(this);
+
+ if (!util.isNull(ret))
+ this.emit('data', ret);
+
+ return ret;
+};
+
+function chunkInvalid(state, chunk) {
+ var er = null;
+ if (!util.isBuffer(chunk) &&
+ !util.isString(chunk) &&
+ !util.isNullOrUndefined(chunk) &&
+ !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+
+function onEofChunk(stream, state) {
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync)
+ process.nextTick(function() {
+ emitReadable_(stream);
+ });
+ else
+ emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ process.nextTick(function() {
+ maybeReadMore_(stream, state);
+ });
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended &&
+ state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;
+ else
+ len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function(n) {
+ this.emit('error', new Error('not implemented'));
+};
+
+Readable.prototype.pipe = function(dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
+ dest !== process.stdout &&
+ dest !== process.stderr;
+
+ var endFn = doEnd ? onend : cleanup;
+ if (state.endEmitted)
+ process.nextTick(endFn);
+ else
+ src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable) {
+ debug('onunpipe');
+ if (readable === src) {
+ cleanup();
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', cleanup);
+ src.removeListener('data', ondata);
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain &&
+ (!dest._writableState || dest._writableState.needDrain))
+ ondrain();
+ }
+
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ var ret = dest.write(chunk);
+ if (false === ret) {
+ debug('false write response, pause',
+ src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EE.listenerCount(dest, 'error') === 0)
+ dest.emit('error', er);
+ }
+ // This is a brutally ugly hack to make sure that our error handler
+ // is attached before any userland ones. NEVER DO THIS.
+ if (!dest._events || !dest._events.error)
+ dest.on('error', onerror);
+ else if (isArray(dest._events.error))
+ dest._events.error.unshift(onerror);
+ else
+ dest._events.error = [onerror, dest._events.error];
+
+
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function() {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain)
+ state.awaitDrain--;
+ if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+
+Readable.prototype.unpipe = function(dest) {
+ var state = this._readableState;
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0)
+ return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes)
+ return this;
+
+ if (!dest)
+ dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest)
+ dest.emit('unpipe', this);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++)
+ dests[i].emit('unpipe', this);
+ return this;
+ }
+
+ // try to find the right one.
+ var i = indexOf(state.pipes, dest);
+ if (i === -1)
+ return this;
+
+ state.pipes.splice(i, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1)
+ state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function(ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ // If listening to data, and it has not explicitly been paused,
+ // then call resume to start the flow of data on the next tick.
+ if (ev === 'data' && false !== this._readableState.flowing) {
+ this.resume();
+ }
+
+ if (ev === 'readable' && this.readable) {
+ var state = this._readableState;
+ if (!state.readableListening) {
+ state.readableListening = true;
+ state.emittedReadable = false;
+ state.needReadable = true;
+ if (!state.reading) {
+ var self = this;
+ process.nextTick(function() {
+ debug('readable nexttick read 0');
+ self.read(0);
+ });
+ } else if (state.length) {
+ emitReadable(this, state);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function() {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ if (!state.reading) {
+ debug('resume read 0');
+ this.read(0);
+ }
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ process.nextTick(function() {
+ resume_(stream, state);
+ });
+ }
+}
+
+function resume_(stream, state) {
+ state.resumeScheduled = false;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading)
+ stream.read(0);
+}
+
+Readable.prototype.pause = function() {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ if (state.flowing) {
+ do {
+ var chunk = stream.read();
+ } while (null !== chunk && state.flowing);
+ }
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function(stream) {
+ var state = this._readableState;
+ var paused = false;
+
+ var self = this;
+ stream.on('end', function() {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length)
+ self.push(chunk);
+ }
+
+ self.push(null);
+ });
+
+ stream.on('data', function(chunk) {
+ debug('wrapped data');
+ if (state.decoder)
+ chunk = state.decoder.write(chunk);
+ if (!chunk || !state.objectMode && !chunk.length)
+ return;
+
+ var ret = self.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (util.isFunction(stream[i]) && util.isUndefined(this[i])) {
+ this[i] = function(method) { return function() {
+ return stream[method].apply(stream, arguments);
+ }}(i);
+ }
+ }
+
+ // proxy certain important events.
+ var events = ['error', 'close', 'destroy', 'pause', 'resume'];
+ forEach(events, function(ev) {
+ stream.on(ev, self.emit.bind(self, ev));
+ });
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ self._read = function(n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return self;
+};
+
+
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+function fromList(n, state) {
+ var list = state.buffer;
+ var length = state.length;
+ var stringMode = !!state.decoder;
+ var objectMode = !!state.objectMode;
+ var ret;
+
+ // nothing in the list, definitely empty.
+ if (list.length === 0)
+ return null;
+
+ if (length === 0)
+ ret = null;
+ else if (objectMode)
+ ret = list.shift();
+ else if (!n || n >= length) {
+ // read it all, truncate the array.
+ if (stringMode)
+ ret = list.join('');
+ else
+ ret = Buffer.concat(list, length);
+ list.length = 0;
+ } else {
+ // read just some of it.
+ if (n < list[0].length) {
+ // just take a part of the first list item.
+ // slice is the same for buffers and strings.
+ var buf = list[0];
+ ret = buf.slice(0, n);
+ list[0] = buf.slice(n);
+ } else if (n === list[0].length) {
+ // first list is a perfect match
+ ret = list.shift();
+ } else {
+ // complex case.
+ // we have enough to cover it, but it spans past the first buffer.
+ if (stringMode)
+ ret = '';
+ else
+ ret = new Buffer(n);
+
+ var c = 0;
+ for (var i = 0, l = list.length; i < l && c < n; i++) {
+ var buf = list[0];
+ var cpy = Math.min(n - c, buf.length);
+
+ if (stringMode)
+ ret += buf.slice(0, cpy);
+ else
+ buf.copy(ret, c, 0, cpy);
+
+ if (cpy < buf.length)
+ list[0] = buf.slice(cpy);
+ else
+ list.shift();
+
+ c += cpy;
+ }
+ }
+ }
+
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0)
+ throw new Error('endReadable called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ process.nextTick(function() {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+ });
+ }
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
+
+function indexOf (xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..905c5e4507
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,209 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+
+function TransformState(options, stream) {
+ this.afterTransform = function(er, data) {
+ return afterTransform(stream, er, data);
+ };
+
+ this.needTransform = false;
+ this.transforming = false;
+ this.writecb = null;
+ this.writechunk = null;
+}
+
+function afterTransform(stream, er, data) {
+ var ts = stream._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb)
+ return stream.emit('error', new Error('no writecb in Transform class'));
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (!util.isNullOrUndefined(data))
+ stream.push(data);
+
+ if (cb)
+ cb(er);
+
+ var rs = stream._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ stream._read(rs.highWaterMark);
+ }
+}
+
+
+function Transform(options) {
+ if (!(this instanceof Transform))
+ return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = new TransformState(options, this);
+
+ // when the writable side finishes, then flush out anything remaining.
+ var stream = this;
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ this.once('prefinish', function() {
+ if (util.isFunction(this._flush))
+ this._flush(function(er) {
+ done(stream, er);
+ });
+ else
+ done(stream);
+ });
+}
+
+Transform.prototype.push = function(chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function(chunk, encoding, cb) {
+ throw new Error('not implemented');
+};
+
+Transform.prototype._write = function(chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform ||
+ rs.needReadable ||
+ rs.length < rs.highWaterMark)
+ this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function(n) {
+ var ts = this._transformState;
+
+ if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+
+function done(stream, er) {
+ if (er)
+ return stream.emit('error', er);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ var ws = stream._writableState;
+ var ts = stream._transformState;
+
+ if (ws.length)
+ throw new Error('calling transform done when ws.length != 0');
+
+ if (ts.transforming)
+ throw new Error('calling transform done when still transforming');
+
+ return stream.push(null);
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..db8539cd5b
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,477 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, cb), and it'll handle all
+// the drain event emission and buffering.
+
+module.exports = Writable;
+
+/*<replacement>*/
+var Buffer = require('buffer').Buffer;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Stream = require('stream');
+
+util.inherits(Writable, Stream);
+
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+}
+
+function WritableState(options, stream) {
+ var Duplex = require('./_stream_duplex');
+
+ options = options || {};
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var defaultHwm = options.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function(er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.buffer = [];
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+}
+
+function Writable(options) {
+ var Duplex = require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+ if (!(this instanceof Writable) && !(this instanceof Duplex))
+ return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function() {
+ this.emit('error', new Error('Cannot pipe. Not readable.'));
+};
+
+
+function writeAfterEnd(stream, state, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ process.nextTick(function() {
+ cb(er);
+ });
+}
+
+// If we get something that is not a buffer, string, null, or undefined,
+// and we're not in objectMode, then that's an error.
+// Otherwise stream chunks are all considered to be of length=1, and the
+// watermarks determine how many objects to keep in the buffer, rather than
+// how many bytes or characters.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ if (!util.isBuffer(chunk) &&
+ !util.isString(chunk) &&
+ !util.isNullOrUndefined(chunk) &&
+ !state.objectMode) {
+ var er = new TypeError('Invalid non-string/buffer chunk');
+ stream.emit('error', er);
+ process.nextTick(function() {
+ cb(er);
+ });
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function(chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+
+ if (util.isFunction(encoding)) {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (util.isBuffer(chunk))
+ encoding = 'buffer';
+ else if (!encoding)
+ encoding = state.defaultEncoding;
+
+ if (!util.isFunction(cb))
+ cb = function() {};
+
+ if (state.ended)
+ writeAfterEnd(this, state, cb);
+ else if (validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function() {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function() {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing &&
+ !state.corked &&
+ !state.finished &&
+ !state.bufferProcessing &&
+ state.buffer.length)
+ clearBuffer(this, state);
+ }
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode &&
+ state.decodeStrings !== false &&
+ util.isString(chunk)) {
+ chunk = new Buffer(chunk, encoding);
+ }
+ return chunk;
+}
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, chunk, encoding, cb) {
+ chunk = decodeChunk(state, chunk, encoding);
+ if (util.isBuffer(chunk))
+ encoding = 'buffer';
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret)
+ state.needDrain = true;
+
+ if (state.writing || state.corked)
+ state.buffer.push(new WriteReq(chunk, encoding, cb));
+ else
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev)
+ stream._writev(chunk, state.onwrite);
+ else
+ stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ if (sync)
+ process.nextTick(function() {
+ state.pendingcb--;
+ cb(er);
+ });
+ else {
+ state.pendingcb--;
+ cb(er);
+ }
+
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er)
+ onwriteError(stream, state, sync, er, cb);
+ else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(stream, state);
+
+ if (!finished &&
+ !state.corked &&
+ !state.bufferProcessing &&
+ state.buffer.length) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ process.nextTick(function() {
+ afterWrite(stream, state, finished, cb);
+ });
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished)
+ onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+
+ if (stream._writev && state.buffer.length > 1) {
+ // Fast case, write everything using _writev()
+ var cbs = [];
+ for (var c = 0; c < state.buffer.length; c++)
+ cbs.push(state.buffer[c].callback);
+
+ // count the one we are adding, as well.
+ // TODO(isaacs) clean this up
+ state.pendingcb++;
+ doWrite(stream, state, true, state.length, state.buffer, '', function(err) {
+ for (var i = 0; i < cbs.length; i++) {
+ state.pendingcb--;
+ cbs[i](err);
+ }
+ });
+
+ // Clear buffer
+ state.buffer = [];
+ } else {
+ // Slow case, write chunks one-by-one
+ for (var c = 0; c < state.buffer.length; c++) {
+ var entry = state.buffer[c];
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ c++;
+ break;
+ }
+ }
+
+ if (c < state.buffer.length)
+ state.buffer = state.buffer.slice(c);
+ else
+ state.buffer.length = 0;
+ }
+
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function(chunk, encoding, cb) {
+ cb(new Error('not implemented'));
+
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function(chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (util.isFunction(chunk)) {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (util.isFunction(encoding)) {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (!util.isNullOrUndefined(chunk))
+ this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished)
+ endWritable(this, state, cb);
+};
+
+
+function needFinish(stream, state) {
+ return (state.ending &&
+ state.length === 0 &&
+ !state.finished &&
+ !state.writing);
+}
+
+function prefinish(stream, state) {
+ if (!state.prefinished) {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(stream, state);
+ if (need) {
+ if (state.pendingcb === 0) {
+ prefinish(stream, state);
+ state.finished = true;
+ stream.emit('finish');
+ } else
+ prefinish(stream, state);
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished)
+ process.nextTick(cb);
+ else
+ stream.once('finish', cb);
+ }
+ state.ended = true;
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/README.md b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/README.md
new file mode 100644
index 0000000000..5a76b4149c
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/README.md
@@ -0,0 +1,3 @@
+# core-util-is
+
+The `util.is*` functions introduced in Node v0.12.
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/float.patch b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/float.patch
new file mode 100644
index 0000000000..a06d5c05f7
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/float.patch
@@ -0,0 +1,604 @@
+diff --git a/lib/util.js b/lib/util.js
+index a03e874..9074e8e 100644
+--- a/lib/util.js
++++ b/lib/util.js
+@@ -19,430 +19,6 @@
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-var formatRegExp = /%[sdj%]/g;
+-exports.format = function(f) {
+- if (!isString(f)) {
+- var objects = [];
+- for (var i = 0; i < arguments.length; i++) {
+- objects.push(inspect(arguments[i]));
+- }
+- return objects.join(' ');
+- }
+-
+- var i = 1;
+- var args = arguments;
+- var len = args.length;
+- var str = String(f).replace(formatRegExp, function(x) {
+- if (x === '%%') return '%';
+- if (i >= len) return x;
+- switch (x) {
+- case '%s': return String(args[i++]);
+- case '%d': return Number(args[i++]);
+- case '%j':
+- try {
+- return JSON.stringify(args[i++]);
+- } catch (_) {
+- return '[Circular]';
+- }
+- default:
+- return x;
+- }
+- });
+- for (var x = args[i]; i < len; x = args[++i]) {
+- if (isNull(x) || !isObject(x)) {
+- str += ' ' + x;
+- } else {
+- str += ' ' + inspect(x);
+- }
+- }
+- return str;
+-};
+-
+-
+-// Mark that a method should not be used.
+-// Returns a modified function which warns once by default.
+-// If --no-deprecation is set, then it is a no-op.
+-exports.deprecate = function(fn, msg) {
+- // Allow for deprecating things in the process of starting up.
+- if (isUndefined(global.process)) {
+- return function() {
+- return exports.deprecate(fn, msg).apply(this, arguments);
+- };
+- }
+-
+- if (process.noDeprecation === true) {
+- return fn;
+- }
+-
+- var warned = false;
+- function deprecated() {
+- if (!warned) {
+- if (process.throwDeprecation) {
+- throw new Error(msg);
+- } else if (process.traceDeprecation) {
+- console.trace(msg);
+- } else {
+- console.error(msg);
+- }
+- warned = true;
+- }
+- return fn.apply(this, arguments);
+- }
+-
+- return deprecated;
+-};
+-
+-
+-var debugs = {};
+-var debugEnviron;
+-exports.debuglog = function(set) {
+- if (isUndefined(debugEnviron))
+- debugEnviron = process.env.NODE_DEBUG || '';
+- set = set.toUpperCase();
+- if (!debugs[set]) {
+- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+- var pid = process.pid;
+- debugs[set] = function() {
+- var msg = exports.format.apply(exports, arguments);
+- console.error('%s %d: %s', set, pid, msg);
+- };
+- } else {
+- debugs[set] = function() {};
+- }
+- }
+- return debugs[set];
+-};
+-
+-
+-/**
+- * Echos the value of a value. Trys to print the value out
+- * in the best way possible given the different types.
+- *
+- * @param {Object} obj The object to print out.
+- * @param {Object} opts Optional options object that alters the output.
+- */
+-/* legacy: obj, showHidden, depth, colors*/
+-function inspect(obj, opts) {
+- // default options
+- var ctx = {
+- seen: [],
+- stylize: stylizeNoColor
+- };
+- // legacy...
+- if (arguments.length >= 3) ctx.depth = arguments[2];
+- if (arguments.length >= 4) ctx.colors = arguments[3];
+- if (isBoolean(opts)) {
+- // legacy...
+- ctx.showHidden = opts;
+- } else if (opts) {
+- // got an "options" object
+- exports._extend(ctx, opts);
+- }
+- // set default options
+- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+- if (isUndefined(ctx.depth)) ctx.depth = 2;
+- if (isUndefined(ctx.colors)) ctx.colors = false;
+- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+- if (ctx.colors) ctx.stylize = stylizeWithColor;
+- return formatValue(ctx, obj, ctx.depth);
+-}
+-exports.inspect = inspect;
+-
+-
+-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
+-inspect.colors = {
+- 'bold' : [1, 22],
+- 'italic' : [3, 23],
+- 'underline' : [4, 24],
+- 'inverse' : [7, 27],
+- 'white' : [37, 39],
+- 'grey' : [90, 39],
+- 'black' : [30, 39],
+- 'blue' : [34, 39],
+- 'cyan' : [36, 39],
+- 'green' : [32, 39],
+- 'magenta' : [35, 39],
+- 'red' : [31, 39],
+- 'yellow' : [33, 39]
+-};
+-
+-// Don't use 'blue' not visible on cmd.exe
+-inspect.styles = {
+- 'special': 'cyan',
+- 'number': 'yellow',
+- 'boolean': 'yellow',
+- 'undefined': 'grey',
+- 'null': 'bold',
+- 'string': 'green',
+- 'date': 'magenta',
+- // "name": intentionally not styling
+- 'regexp': 'red'
+-};
+-
+-
+-function stylizeWithColor(str, styleType) {
+- var style = inspect.styles[styleType];
+-
+- if (style) {
+- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
+- '\u001b[' + inspect.colors[style][1] + 'm';
+- } else {
+- return str;
+- }
+-}
+-
+-
+-function stylizeNoColor(str, styleType) {
+- return str;
+-}
+-
+-
+-function arrayToHash(array) {
+- var hash = {};
+-
+- array.forEach(function(val, idx) {
+- hash[val] = true;
+- });
+-
+- return hash;
+-}
+-
+-
+-function formatValue(ctx, value, recurseTimes) {
+- // Provide a hook for user-specified inspect functions.
+- // Check that value is an object with an inspect function on it
+- if (ctx.customInspect &&
+- value &&
+- isFunction(value.inspect) &&
+- // Filter out the util module, it's inspect function is special
+- value.inspect !== exports.inspect &&
+- // Also filter out any prototype objects using the circular check.
+- !(value.constructor && value.constructor.prototype === value)) {
+- var ret = value.inspect(recurseTimes, ctx);
+- if (!isString(ret)) {
+- ret = formatValue(ctx, ret, recurseTimes);
+- }
+- return ret;
+- }
+-
+- // Primitive types cannot have properties
+- var primitive = formatPrimitive(ctx, value);
+- if (primitive) {
+- return primitive;
+- }
+-
+- // Look up the keys of the object.
+- var keys = Object.keys(value);
+- var visibleKeys = arrayToHash(keys);
+-
+- if (ctx.showHidden) {
+- keys = Object.getOwnPropertyNames(value);
+- }
+-
+- // Some type of object without properties can be shortcutted.
+- if (keys.length === 0) {
+- if (isFunction(value)) {
+- var name = value.name ? ': ' + value.name : '';
+- return ctx.stylize('[Function' + name + ']', 'special');
+- }
+- if (isRegExp(value)) {
+- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+- }
+- if (isDate(value)) {
+- return ctx.stylize(Date.prototype.toString.call(value), 'date');
+- }
+- if (isError(value)) {
+- return formatError(value);
+- }
+- }
+-
+- var base = '', array = false, braces = ['{', '}'];
+-
+- // Make Array say that they are Array
+- if (isArray(value)) {
+- array = true;
+- braces = ['[', ']'];
+- }
+-
+- // Make functions say that they are functions
+- if (isFunction(value)) {
+- var n = value.name ? ': ' + value.name : '';
+- base = ' [Function' + n + ']';
+- }
+-
+- // Make RegExps say that they are RegExps
+- if (isRegExp(value)) {
+- base = ' ' + RegExp.prototype.toString.call(value);
+- }
+-
+- // Make dates with properties first say the date
+- if (isDate(value)) {
+- base = ' ' + Date.prototype.toUTCString.call(value);
+- }
+-
+- // Make error with message first say the error
+- if (isError(value)) {
+- base = ' ' + formatError(value);
+- }
+-
+- if (keys.length === 0 && (!array || value.length == 0)) {
+- return braces[0] + base + braces[1];
+- }
+-
+- if (recurseTimes < 0) {
+- if (isRegExp(value)) {
+- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+- } else {
+- return ctx.stylize('[Object]', 'special');
+- }
+- }
+-
+- ctx.seen.push(value);
+-
+- var output;
+- if (array) {
+- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+- } else {
+- output = keys.map(function(key) {
+- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+- });
+- }
+-
+- ctx.seen.pop();
+-
+- return reduceToSingleString(output, base, braces);
+-}
+-
+-
+-function formatPrimitive(ctx, value) {
+- if (isUndefined(value))
+- return ctx.stylize('undefined', 'undefined');
+- if (isString(value)) {
+- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
+- .replace(/'/g, "\\'")
+- .replace(/\\"/g, '"') + '\'';
+- return ctx.stylize(simple, 'string');
+- }
+- if (isNumber(value)) {
+- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0,
+- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 .
+- if (value === 0 && 1 / value < 0)
+- return ctx.stylize('-0', 'number');
+- return ctx.stylize('' + value, 'number');
+- }
+- if (isBoolean(value))
+- return ctx.stylize('' + value, 'boolean');
+- // For some reason typeof null is "object", so special case here.
+- if (isNull(value))
+- return ctx.stylize('null', 'null');
+-}
+-
+-
+-function formatError(value) {
+- return '[' + Error.prototype.toString.call(value) + ']';
+-}
+-
+-
+-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+- var output = [];
+- for (var i = 0, l = value.length; i < l; ++i) {
+- if (hasOwnProperty(value, String(i))) {
+- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+- String(i), true));
+- } else {
+- output.push('');
+- }
+- }
+- keys.forEach(function(key) {
+- if (!key.match(/^\d+$/)) {
+- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+- key, true));
+- }
+- });
+- return output;
+-}
+-
+-
+-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+- var name, str, desc;
+- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
+- if (desc.get) {
+- if (desc.set) {
+- str = ctx.stylize('[Getter/Setter]', 'special');
+- } else {
+- str = ctx.stylize('[Getter]', 'special');
+- }
+- } else {
+- if (desc.set) {
+- str = ctx.stylize('[Setter]', 'special');
+- }
+- }
+- if (!hasOwnProperty(visibleKeys, key)) {
+- name = '[' + key + ']';
+- }
+- if (!str) {
+- if (ctx.seen.indexOf(desc.value) < 0) {
+- if (isNull(recurseTimes)) {
+- str = formatValue(ctx, desc.value, null);
+- } else {
+- str = formatValue(ctx, desc.value, recurseTimes - 1);
+- }
+- if (str.indexOf('\n') > -1) {
+- if (array) {
+- str = str.split('\n').map(function(line) {
+- return ' ' + line;
+- }).join('\n').substr(2);
+- } else {
+- str = '\n' + str.split('\n').map(function(line) {
+- return ' ' + line;
+- }).join('\n');
+- }
+- }
+- } else {
+- str = ctx.stylize('[Circular]', 'special');
+- }
+- }
+- if (isUndefined(name)) {
+- if (array && key.match(/^\d+$/)) {
+- return str;
+- }
+- name = JSON.stringify('' + key);
+- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+- name = name.substr(1, name.length - 2);
+- name = ctx.stylize(name, 'name');
+- } else {
+- name = name.replace(/'/g, "\\'")
+- .replace(/\\"/g, '"')
+- .replace(/(^"|"$)/g, "'");
+- name = ctx.stylize(name, 'string');
+- }
+- }
+-
+- return name + ': ' + str;
+-}
+-
+-
+-function reduceToSingleString(output, base, braces) {
+- var numLinesEst = 0;
+- var length = output.reduce(function(prev, cur) {
+- numLinesEst++;
+- if (cur.indexOf('\n') >= 0) numLinesEst++;
+- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+- }, 0);
+-
+- if (length > 60) {
+- return braces[0] +
+- (base === '' ? '' : base + '\n ') +
+- ' ' +
+- output.join(',\n ') +
+- ' ' +
+- braces[1];
+- }
+-
+- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+-}
+-
+-
+ // NOTE: These type checking functions intentionally don't use `instanceof`
+ // because it is fragile and can be easily faked with `Object.create()`.
+ function isArray(ar) {
+@@ -522,166 +98,10 @@ function isPrimitive(arg) {
+ exports.isPrimitive = isPrimitive;
+
+ function isBuffer(arg) {
+- return arg instanceof Buffer;
++ return Buffer.isBuffer(arg);
+ }
+ exports.isBuffer = isBuffer;
+
+ function objectToString(o) {
+ return Object.prototype.toString.call(o);
+-}
+-
+-
+-function pad(n) {
+- return n < 10 ? '0' + n.toString(10) : n.toString(10);
+-}
+-
+-
+-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+- 'Oct', 'Nov', 'Dec'];
+-
+-// 26 Feb 16:19:34
+-function timestamp() {
+- var d = new Date();
+- var time = [pad(d.getHours()),
+- pad(d.getMinutes()),
+- pad(d.getSeconds())].join(':');
+- return [d.getDate(), months[d.getMonth()], time].join(' ');
+-}
+-
+-
+-// log is just a thin wrapper to console.log that prepends a timestamp
+-exports.log = function() {
+- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+-};
+-
+-
+-/**
+- * Inherit the prototype methods from one constructor into another.
+- *
+- * The Function.prototype.inherits from lang.js rewritten as a standalone
+- * function (not on Function.prototype). NOTE: If this file is to be loaded
+- * during bootstrapping this function needs to be rewritten using some native
+- * functions as prototype setup using normal JavaScript does not work as
+- * expected during bootstrapping (see mirror.js in r114903).
+- *
+- * @param {function} ctor Constructor function which needs to inherit the
+- * prototype.
+- * @param {function} superCtor Constructor function to inherit prototype from.
+- */
+-exports.inherits = function(ctor, superCtor) {
+- ctor.super_ = superCtor;
+- ctor.prototype = Object.create(superCtor.prototype, {
+- constructor: {
+- value: ctor,
+- enumerable: false,
+- writable: true,
+- configurable: true
+- }
+- });
+-};
+-
+-exports._extend = function(origin, add) {
+- // Don't do anything if add isn't an object
+- if (!add || !isObject(add)) return origin;
+-
+- var keys = Object.keys(add);
+- var i = keys.length;
+- while (i--) {
+- origin[keys[i]] = add[keys[i]];
+- }
+- return origin;
+-};
+-
+-function hasOwnProperty(obj, prop) {
+- return Object.prototype.hasOwnProperty.call(obj, prop);
+-}
+-
+-
+-// Deprecated old stuff.
+-
+-exports.p = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- console.error(exports.inspect(arguments[i]));
+- }
+-}, 'util.p: Use console.error() instead');
+-
+-
+-exports.exec = exports.deprecate(function() {
+- return require('child_process').exec.apply(this, arguments);
+-}, 'util.exec is now called `child_process.exec`.');
+-
+-
+-exports.print = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(String(arguments[i]));
+- }
+-}, 'util.print: Use console.log instead');
+-
+-
+-exports.puts = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(arguments[i] + '\n');
+- }
+-}, 'util.puts: Use console.log instead');
+-
+-
+-exports.debug = exports.deprecate(function(x) {
+- process.stderr.write('DEBUG: ' + x + '\n');
+-}, 'util.debug: Use console.error instead');
+-
+-
+-exports.error = exports.deprecate(function(x) {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stderr.write(arguments[i] + '\n');
+- }
+-}, 'util.error: Use console.error instead');
+-
+-
+-exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
+- var callbackCalled = false;
+-
+- function call(a, b, c) {
+- if (callback && !callbackCalled) {
+- callback(a, b, c);
+- callbackCalled = true;
+- }
+- }
+-
+- readStream.addListener('data', function(chunk) {
+- if (writeStream.write(chunk) === false) readStream.pause();
+- });
+-
+- writeStream.addListener('drain', function() {
+- readStream.resume();
+- });
+-
+- readStream.addListener('end', function() {
+- writeStream.end();
+- });
+-
+- readStream.addListener('close', function() {
+- call();
+- });
+-
+- readStream.addListener('error', function(err) {
+- writeStream.end();
+- call(err);
+- });
+-
+- writeStream.addListener('error', function(err) {
+- readStream.destroy();
+- call(err);
+- });
+-}, 'util.pump(): Use readableStream.pipe() instead');
+-
+-
+-var uv;
+-exports._errnoException = function(err, syscall) {
+- if (isUndefined(uv)) uv = process.binding('uv');
+- var errname = uv.errname(err);
+- var e = new Error(syscall + ' ' + errname);
+- e.code = errname;
+- e.errno = errname;
+- e.syscall = syscall;
+- return e;
+-};
++} \ No newline at end of file
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
new file mode 100644
index 0000000000..9074e8ebcb
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
@@ -0,0 +1,107 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+function isArray(ar) {
+ return Array.isArray(ar);
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return isObject(re) && objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return isObject(d) && objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return isObject(e) &&
+ (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+function isBuffer(arg) {
+ return Buffer.isBuffer(arg);
+}
+exports.isBuffer = isBuffer;
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/package.json
new file mode 100644
index 0000000000..2155d11c62
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "core-util-is",
+ "version": "1.0.1",
+ "description": "The `util.is*` functions introduced in Node v0.12.",
+ "main": "lib/util.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/core-util-is"
+ },
+ "keywords": [
+ "util",
+ "isBuffer",
+ "isArray",
+ "isNumber",
+ "isString",
+ "isRegExp",
+ "isThis",
+ "isThat",
+ "polyfill"
+ ],
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/isaacs/core-util-is/issues"
+ },
+ "readme": "# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n",
+ "readmeFilename": "README.md",
+ "homepage": "https://github.com/isaacs/core-util-is",
+ "_id": "core-util-is@1.0.1",
+ "dist": {
+ "shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538",
+ "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz"
+ },
+ "_from": "core-util-is@>=1.0.0 <1.1.0",
+ "_npmVersion": "1.3.23",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "directories": {},
+ "_shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538",
+ "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz"
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/util.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/util.js
new file mode 100644
index 0000000000..007fa10575
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/util.js
@@ -0,0 +1,106 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+function isArray(ar) {
+ return Array.isArray(ar);
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return isObject(re) && objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return isObject(d) && objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return isObject(e) && objectToString(e) === '[object Error]';
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+function isBuffer(arg) {
+ return arg instanceof Buffer;
+}
+exports.isBuffer = isBuffer;
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/README.md b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/README.md
new file mode 100644
index 0000000000..052a62b8d7
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/README.md
@@ -0,0 +1,54 @@
+
+# isarray
+
+`Array#isArray` for older browsers.
+
+## Usage
+
+```js
+var isArray = require('isarray');
+
+console.log(isArray([])); // => true
+console.log(isArray({})); // => false
+```
+
+## Installation
+
+With [npm](http://npmjs.org) do
+
+```bash
+$ npm install isarray
+```
+
+Then bundle for the browser with
+[browserify](https://github.com/substack/browserify).
+
+With [component](http://component.io) do
+
+```bash
+$ component install juliangruber/isarray
+```
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/build/build.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/build/build.js
new file mode 100644
index 0000000000..ec58596aee
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/build/build.js
@@ -0,0 +1,209 @@
+
+/**
+ * Require the given path.
+ *
+ * @param {String} path
+ * @return {Object} exports
+ * @api public
+ */
+
+function require(path, parent, orig) {
+ var resolved = require.resolve(path);
+
+ // lookup failed
+ if (null == resolved) {
+ orig = orig || path;
+ parent = parent || 'root';
+ var err = new Error('Failed to require "' + orig + '" from "' + parent + '"');
+ err.path = orig;
+ err.parent = parent;
+ err.require = true;
+ throw err;
+ }
+
+ var module = require.modules[resolved];
+
+ // perform real require()
+ // by invoking the module's
+ // registered function
+ if (!module.exports) {
+ module.exports = {};
+ module.client = module.component = true;
+ module.call(this, module.exports, require.relative(resolved), module);
+ }
+
+ return module.exports;
+}
+
+/**
+ * Registered modules.
+ */
+
+require.modules = {};
+
+/**
+ * Registered aliases.
+ */
+
+require.aliases = {};
+
+/**
+ * Resolve `path`.
+ *
+ * Lookup:
+ *
+ * - PATH/index.js
+ * - PATH.js
+ * - PATH
+ *
+ * @param {String} path
+ * @return {String} path or null
+ * @api private
+ */
+
+require.resolve = function(path) {
+ if (path.charAt(0) === '/') path = path.slice(1);
+ var index = path + '/index.js';
+
+ var paths = [
+ path,
+ path + '.js',
+ path + '.json',
+ path + '/index.js',
+ path + '/index.json'
+ ];
+
+ for (var i = 0; i < paths.length; i++) {
+ var path = paths[i];
+ if (require.modules.hasOwnProperty(path)) return path;
+ }
+
+ if (require.aliases.hasOwnProperty(index)) {
+ return require.aliases[index];
+ }
+};
+
+/**
+ * Normalize `path` relative to the current path.
+ *
+ * @param {String} curr
+ * @param {String} path
+ * @return {String}
+ * @api private
+ */
+
+require.normalize = function(curr, path) {
+ var segs = [];
+
+ if ('.' != path.charAt(0)) return path;
+
+ curr = curr.split('/');
+ path = path.split('/');
+
+ for (var i = 0; i < path.length; ++i) {
+ if ('..' == path[i]) {
+ curr.pop();
+ } else if ('.' != path[i] && '' != path[i]) {
+ segs.push(path[i]);
+ }
+ }
+
+ return curr.concat(segs).join('/');
+};
+
+/**
+ * Register module at `path` with callback `definition`.
+ *
+ * @param {String} path
+ * @param {Function} definition
+ * @api private
+ */
+
+require.register = function(path, definition) {
+ require.modules[path] = definition;
+};
+
+/**
+ * Alias a module definition.
+ *
+ * @param {String} from
+ * @param {String} to
+ * @api private
+ */
+
+require.alias = function(from, to) {
+ if (!require.modules.hasOwnProperty(from)) {
+ throw new Error('Failed to alias "' + from + '", it does not exist');
+ }
+ require.aliases[to] = from;
+};
+
+/**
+ * Return a require function relative to the `parent` path.
+ *
+ * @param {String} parent
+ * @return {Function}
+ * @api private
+ */
+
+require.relative = function(parent) {
+ var p = require.normalize(parent, '..');
+
+ /**
+ * lastIndexOf helper.
+ */
+
+ function lastIndexOf(arr, obj) {
+ var i = arr.length;
+ while (i--) {
+ if (arr[i] === obj) return i;
+ }
+ return -1;
+ }
+
+ /**
+ * The relative require() itself.
+ */
+
+ function localRequire(path) {
+ var resolved = localRequire.resolve(path);
+ return require(resolved, parent, path);
+ }
+
+ /**
+ * Resolve relative to the parent.
+ */
+
+ localRequire.resolve = function(path) {
+ var c = path.charAt(0);
+ if ('/' == c) return path.slice(1);
+ if ('.' == c) return require.normalize(p, path);
+
+ // resolve deps by returning
+ // the dep in the nearest "deps"
+ // directory
+ var segs = parent.split('/');
+ var i = lastIndexOf(segs, 'deps') + 1;
+ if (!i) i = 0;
+ path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
+ return path;
+ };
+
+ /**
+ * Check if module is defined at `path`.
+ */
+
+ localRequire.exists = function(path) {
+ return require.modules.hasOwnProperty(localRequire.resolve(path));
+ };
+
+ return localRequire;
+};
+require.register("isarray/index.js", function(exports, require, module){
+module.exports = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]';
+};
+
+});
+require.alias("isarray/index.js", "isarray/index.js");
+
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/component.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/component.json
new file mode 100644
index 0000000000..9e31b68388
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/component.json
@@ -0,0 +1,19 @@
+{
+ "name" : "isarray",
+ "description" : "Array#isArray for older browsers",
+ "version" : "0.0.1",
+ "repository" : "juliangruber/isarray",
+ "homepage": "https://github.com/juliangruber/isarray",
+ "main" : "index.js",
+ "scripts" : [
+ "index.js"
+ ],
+ "dependencies" : {},
+ "keywords": ["browser","isarray","array"],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT"
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/index.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/index.js
new file mode 100644
index 0000000000..5f5ad45d46
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/index.js
@@ -0,0 +1,3 @@
+module.exports = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]';
+};
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/package.json
new file mode 100644
index 0000000000..19228ab6fd
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "isarray",
+ "description": "Array#isArray for older browsers",
+ "version": "0.0.1",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/isarray.git"
+ },
+ "homepage": "https://github.com/juliangruber/isarray",
+ "main": "index.js",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "*"
+ },
+ "keywords": [
+ "browser",
+ "isarray",
+ "array"
+ ],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT",
+ "_id": "isarray@0.0.1",
+ "dist": {
+ "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
+ "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
+ },
+ "_from": "isarray@0.0.1",
+ "_npmVersion": "1.2.18",
+ "_npmUser": {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ },
+ "maintainers": [
+ {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
+ "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "bugs": {
+ "url": "https://github.com/juliangruber/isarray/issues"
+ },
+ "readme": "ERROR: No README data found!"
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/.npmignore
new file mode 100644
index 0000000000..206320cc1d
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/.npmignore
@@ -0,0 +1,2 @@
+build
+test
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..6de584a48f
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/LICENSE
@@ -0,0 +1,20 @@
+Copyright Joyent, Inc. and other Node contributors.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to permit
+persons to whom the Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/README.md b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..4d2aa00150
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/README.md
@@ -0,0 +1,7 @@
+**string_decoder.js** (`require('string_decoder')`) from Node.js core
+
+Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details.
+
+Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**
+
+The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/index.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/index.js
new file mode 100644
index 0000000000..b00e54fb79
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/index.js
@@ -0,0 +1,221 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+var Buffer = require('buffer').Buffer;
+
+var isBufferEncoding = Buffer.isEncoding
+ || function(encoding) {
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
+ default: return false;
+ }
+ }
+
+
+function assertEncoding(encoding) {
+ if (encoding && !isBufferEncoding(encoding)) {
+ throw new Error('Unknown encoding: ' + encoding);
+ }
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters. CESU-8 is handled as part of the UTF-8 encoding.
+//
+// @TODO Handling all encodings inside a single object makes it very difficult
+// to reason about this code, so it should be split up in the future.
+// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
+// points as used by CESU-8.
+var StringDecoder = exports.StringDecoder = function(encoding) {
+ this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
+ assertEncoding(encoding);
+ switch (this.encoding) {
+ case 'utf8':
+ // CESU-8 represents each of Surrogate Pair by 3-bytes
+ this.surrogateSize = 3;
+ break;
+ case 'ucs2':
+ case 'utf16le':
+ // UTF-16 represents each of Surrogate Pair by 2-bytes
+ this.surrogateSize = 2;
+ this.detectIncompleteChar = utf16DetectIncompleteChar;
+ break;
+ case 'base64':
+ // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
+ this.surrogateSize = 3;
+ this.detectIncompleteChar = base64DetectIncompleteChar;
+ break;
+ default:
+ this.write = passThroughWrite;
+ return;
+ }
+
+ // Enough space to store all bytes of a single character. UTF-8 needs 4
+ // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
+ this.charBuffer = new Buffer(6);
+ // Number of bytes received for the current incomplete multi-byte character.
+ this.charReceived = 0;
+ // Number of bytes expected for the current incomplete multi-byte character.
+ this.charLength = 0;
+};
+
+
+// write decodes the given buffer and returns it as JS string that is
+// guaranteed to not contain any partial multi-byte characters. Any partial
+// character found at the end of the buffer is buffered up, and will be
+// returned when calling write again with the remaining bytes.
+//
+// Note: Converting a Buffer containing an orphan surrogate to a String
+// currently works, but converting a String to a Buffer (via `new Buffer`, or
+// Buffer#write) will replace incomplete surrogates with the unicode
+// replacement character. See https://codereview.chromium.org/121173009/ .
+StringDecoder.prototype.write = function(buffer) {
+ var charStr = '';
+ // if our last write ended with an incomplete multibyte character
+ while (this.charLength) {
+ // determine how many remaining bytes this buffer has to offer for this char
+ var available = (buffer.length >= this.charLength - this.charReceived) ?
+ this.charLength - this.charReceived :
+ buffer.length;
+
+ // add the new bytes to the char buffer
+ buffer.copy(this.charBuffer, this.charReceived, 0, available);
+ this.charReceived += available;
+
+ if (this.charReceived < this.charLength) {
+ // still not enough chars in this buffer? wait for more ...
+ return '';
+ }
+
+ // remove bytes belonging to the current character from the buffer
+ buffer = buffer.slice(available, buffer.length);
+
+ // get the character that was split
+ charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
+
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ var charCode = charStr.charCodeAt(charStr.length - 1);
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ this.charLength += this.surrogateSize;
+ charStr = '';
+ continue;
+ }
+ this.charReceived = this.charLength = 0;
+
+ // if there are no more bytes in this buffer, just emit our char
+ if (buffer.length === 0) {
+ return charStr;
+ }
+ break;
+ }
+
+ // determine and set charLength / charReceived
+ this.detectIncompleteChar(buffer);
+
+ var end = buffer.length;
+ if (this.charLength) {
+ // buffer the incomplete character bytes we got
+ buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
+ end -= this.charReceived;
+ }
+
+ charStr += buffer.toString(this.encoding, 0, end);
+
+ var end = charStr.length - 1;
+ var charCode = charStr.charCodeAt(end);
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ var size = this.surrogateSize;
+ this.charLength += size;
+ this.charReceived += size;
+ this.charBuffer.copy(this.charBuffer, size, 0, size);
+ buffer.copy(this.charBuffer, 0, 0, size);
+ return charStr.substring(0, end);
+ }
+
+ // or just emit the charStr
+ return charStr;
+};
+
+// detectIncompleteChar determines if there is an incomplete UTF-8 character at
+// the end of the given buffer. If so, it sets this.charLength to the byte
+// length that character, and sets this.charReceived to the number of bytes
+// that are available for this character.
+StringDecoder.prototype.detectIncompleteChar = function(buffer) {
+ // determine how many bytes we have to check at the end of this buffer
+ var i = (buffer.length >= 3) ? 3 : buffer.length;
+
+ // Figure out if one of the last i bytes of our buffer announces an
+ // incomplete char.
+ for (; i > 0; i--) {
+ var c = buffer[buffer.length - i];
+
+ // See http://en.wikipedia.org/wiki/UTF-8#Description
+
+ // 110XXXXX
+ if (i == 1 && c >> 5 == 0x06) {
+ this.charLength = 2;
+ break;
+ }
+
+ // 1110XXXX
+ if (i <= 2 && c >> 4 == 0x0E) {
+ this.charLength = 3;
+ break;
+ }
+
+ // 11110XXX
+ if (i <= 3 && c >> 3 == 0x1E) {
+ this.charLength = 4;
+ break;
+ }
+ }
+ this.charReceived = i;
+};
+
+StringDecoder.prototype.end = function(buffer) {
+ var res = '';
+ if (buffer && buffer.length)
+ res = this.write(buffer);
+
+ if (this.charReceived) {
+ var cr = this.charReceived;
+ var buf = this.charBuffer;
+ var enc = this.encoding;
+ res += buf.slice(0, cr).toString(enc);
+ }
+
+ return res;
+};
+
+function passThroughWrite(buffer) {
+ return buffer.toString(this.encoding);
+}
+
+function utf16DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 2;
+ this.charLength = this.charReceived ? 2 : 0;
+}
+
+function base64DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 3;
+ this.charLength = this.charReceived ? 3 : 0;
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..0364d54ba4
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "string_decoder",
+ "version": "0.10.31",
+ "description": "The string_decoder module from Node core",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.4.8"
+ },
+ "scripts": {
+ "test": "tap test/simple/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/rvagg/string_decoder.git"
+ },
+ "homepage": "https://github.com/rvagg/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0",
+ "bugs": {
+ "url": "https://github.com/rvagg/string_decoder/issues"
+ },
+ "_id": "string_decoder@0.10.31",
+ "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
+ "_from": "string_decoder@>=0.10.0 <0.11.0",
+ "_npmVersion": "1.4.23",
+ "_npmUser": {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ },
+ "maintainers": [
+ {
+ "name": "substack",
+ "email": "mail@substack.net"
+ },
+ {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ }
+ ],
+ "dist": {
+ "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
+ "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..749db2fe54
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "readable-stream",
+ "version": "1.1.13",
+ "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x",
+ "main": "readable.js",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x",
+ "inherits": "~2.0.1"
+ },
+ "devDependencies": {
+ "tap": "~0.2.6"
+ },
+ "scripts": {
+ "test": "tap test/simple/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/readable-stream"
+ },
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "browser": {
+ "util": false
+ },
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "MIT",
+ "gitHead": "3b672fd7ae92acf5b4ffdbabf74b372a0a56b051",
+ "bugs": {
+ "url": "https://github.com/isaacs/readable-stream/issues"
+ },
+ "homepage": "https://github.com/isaacs/readable-stream",
+ "_id": "readable-stream@1.1.13",
+ "_shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e",
+ "_from": "readable-stream@>=1.1.13 <2.0.0",
+ "_npmVersion": "1.4.23",
+ "_npmUser": {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ }
+ ],
+ "dist": {
+ "shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e",
+ "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000000..27e8d8a551
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_passthrough.js")
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/readable.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..09b8bf5091
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/readable.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = require('stream');
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/transform.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000000..5d482f0780
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_transform.js")
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/writable.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000000..e1e9efdf3c
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/writable.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_writable.js")
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json
index 6b6ce356cf..6c981da1c9 100644
--- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json
@@ -1,6 +1,6 @@
{
"name": "are-we-there-yet",
- "version": "1.0.3",
+ "version": "1.0.4",
"description": "Keep track of the overall completion of many dispirate processes",
"main": "index.js",
"scripts": {
@@ -23,14 +23,14 @@
"tap": "^0.4.13"
},
"dependencies": {
- "delegates": "^0.1.0"
+ "delegates": "^0.1.0",
+ "readable-stream": "^1.1.13"
},
- "gitHead": "a038607bf1617149cd3a0cf335b3ed08341f0565",
- "_id": "are-we-there-yet@1.0.3",
- "_shasum": "699fa10313a9e9d1a5d68b3883c605994161fddd",
+ "gitHead": "7ce414849b81ab83935a935275def01914821bde",
+ "_id": "are-we-there-yet@1.0.4",
+ "_shasum": "527fe389f7bcba90806106b99244eaa07e886f85",
"_from": "are-we-there-yet@>=1.0.0 <1.1.0",
- "_npmVersion": "2.6.1",
- "_nodeVersion": "0.10.36",
+ "_npmVersion": "2.0.0",
"_npmUser": {
"name": "iarna",
"email": "me@re-becca.org"
@@ -42,10 +42,9 @@
}
],
"dist": {
- "shasum": "699fa10313a9e9d1a5d68b3883c605994161fddd",
- "tarball": "http://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.3.tgz"
+ "shasum": "527fe389f7bcba90806106b99244eaa07e886f85",
+ "tarball": "http://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.4.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.3.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.4.tgz"
}
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js
index f97e1034ff..a64e121c03 100644
--- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js
@@ -49,7 +49,7 @@ test("TrackerGroup", function (t) {
t.is(er, null, "finishAll: on change event fired")
t.is(onChangeName, name, "finishAll: on change emits the correct name")
t.is(track.completed(), 1, "Finishing everything ")
-
+
track = new TrackerGroup(name)
a = track.newItem("a", 10, 2)
b = track.newItem("b", 10, 1)
@@ -68,7 +68,7 @@ test("TrackerGroup", function (t) {
t.is(er, null, "weightedFinishAll: on change event fired")
t.is(onChangeName, name, "weightedFinishAll: on change emits the correct name")
t.is(track.completed(), 1, "weightedFinishaAll: Finishing everything ")
-
+
track = new TrackerGroup(name)
a = track.newGroup("a", 10)
b = track.newGroup("b", 10)
diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js
index ca9a7879b9..72b6043097 100644
--- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js
+++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js
@@ -1,7 +1,7 @@
"use strict"
var test = require("tap").test
var util = require("util")
-var stream = require("stream")
+var stream = require("readable-stream")
var TrackerStream = require("../index.js").TrackerStream
var timeoutError = new Error("timeout")
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/README.md
index 2486d3ce30..fb9eb0a7d1 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/README.md
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/README.md
@@ -131,7 +131,7 @@ be be included verbatum in the output.
If the template element is an object, it can have the following keys:
* *type* can be:
- * `name` – The most recent name passed to `show`; if this is in response to a
+ * `name` – The most recent name passed to `show`; if this is in response to a
`pulse` then the name passed to `pulse` will be appended along with the
subsection property from the theme.
* `spinner` – If you've ever called `pulse` this will be one of the characters
@@ -148,7 +148,7 @@ If the template element is an object, it can have the following keys:
will be padded according to the *align* value.
* *align* – (Default: left) Possible values "left", "right" and "center". Works
as you'd expect from word processors.
-* *length* – Provides a single value for both *minLength* and *maxLength*. If both
+* *length* – Provides a single value for both *minLength* and *maxLength*. If both
*length* and *minLength or *maxLength* are specifed then the latter take precedence.
### Tracking Completion
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/README.md~ b/deps/npm/node_modules/npmlog/node_modules/gauge/README.md~
index cdab5bc27f..eec841b6ca 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/README.md~
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/README.md~
@@ -123,7 +123,7 @@ be be included verbatum in the output.
If the template element is an object, it can have the following keys:
* *type* can be:
- * `name` – The most recent name passed to `show`; if this is in response to a
+ * `name` – The most recent name passed to `show`; if this is in response to a
`pulse` then the name passed to `pulse` will be appended along with the
subsection property from the theme.
* `spinner` – If you've ever called `pulse` this will be one of the characters
@@ -140,7 +140,7 @@ If the template element is an object, it can have the following keys:
will be padded according to the *align* value.
* *align* – (Default: left) Possible values "left", "right" and "center". Works
as you'd expect from word processors.
-* *length* – Provides a single value for both *minLength* and *maxLength*. If both
+* *length* – Provides a single value for both *minLength* and *maxLength*. If both
*length* and *minLength or *maxLength* are specifed then the latter take precedence.
### Tracking Completion
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/LICENSE
index e756052969..d42e25e956 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/LICENSE
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/LICENSE
@@ -11,3 +11,4 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/README.md
index 4393106fda..e9d3cc326c 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/README.md
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/README.md
@@ -33,7 +33,8 @@ As such, we report any Windows installation as unicode capable.
### Unix Like Operating Systems
We look at the environment variables `LC_ALL`, `LC_CTYPE`, and `LANG` in
-that order. For `LC_ALL` and `LANG`, it looks for `.UTF-8` in the value.
+that order. For `LC_ALL` and `LANG`, it looks for `.UTF-8` in the value.
For `LC_CTYPE` it looks to see if the value is `UTF-8`. This is sufficient
for most POSIX systems. While locale data can be put in `/etc/locale.conf`
as well, AFAIK it's always copied into the environment.
+
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/package.json
index b2b2d2b9d7..7126e01259 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/package.json
@@ -48,6 +48,5 @@
"tarball": "http://registry.npmjs.org/has-unicode/-/has-unicode-1.0.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-1.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-1.0.0.tgz"
}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/LICENSE.txt b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/LICENSE.txt
index 17764328c8..9cd87e5dce 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/LICENSE.txt
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/README.md
index 7825373fdc..0e1c73128c 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/README.md
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/README.md
@@ -1,6 +1,6 @@
-# lodash._createpad v3.0.1
+# lodash._createpadding v3.6.0
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createPad` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createPadding` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
## Installation
@@ -8,13 +8,13 @@ Using npm:
```bash
$ {sudo -H} npm i -g npm
-$ npm i --save lodash._createpad
+$ npm i --save lodash._createpadding
```
In Node.js/io.js:
```js
-var createPad = require('lodash._createpad');
+var createPadding = require('lodash._createpadding');
```
-See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._createpad) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/3.6.0-npm-packages/lodash._createpadding) for more details.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/index.js
index d932de7c6e..72890bd2d8 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/index.js
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/index.js
@@ -1,8 +1,8 @@
/**
- * lodash 3.0.0 (Custom Build) <https://lodash.com/>
+ * lodash 3.6.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
+ * Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
@@ -15,9 +15,8 @@ var ceil = Math.ceil;
var nativeIsFinite = global.isFinite;
/**
- * Creates the pad required for `string` based on the given padding length.
- * The `chars` string may be truncated if the number of padding characters
- * exceeds the padding length.
+ * Creates the padding required for `string` based on the given `length`.
+ * The `chars` string is truncated if the number of characters exceeds `length`.
*
* @private
* @param {string} string The string to create padding for.
@@ -25,7 +24,7 @@ var nativeIsFinite = global.isFinite;
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the pad for `string`.
*/
-function createPad(string, length, chars) {
+function createPadding(string, length, chars) {
var strLength = string.length;
length = +length;
@@ -37,4 +36,4 @@ function createPad(string, length, chars) {
return repeat(chars, ceil(padLength / chars.length)).slice(0, padLength);
}
-module.exports = createPad;
+module.exports = createPadding;
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/LICENSE.txt b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE.txt
index 17764328c8..17764328c8 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/LICENSE.txt
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE.txt
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md
index d2796e3f73..d2796e3f73 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/README.md
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js
index 68e1008134..68e1008134 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/index.js
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json
index 1b1019b81d..1b1019b81d 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/node_modules/lodash.repeat/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/package.json
index 979ee46b7f..65ead27b02 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpad/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/package.json
@@ -1,7 +1,7 @@
{
- "name": "lodash._createpad",
- "version": "3.0.1",
- "description": "The modern build of lodash’s internal `createPad` as a module.",
+ "name": "lodash._createpadding",
+ "version": "3.6.0",
+ "description": "The modern build of lodash’s internal `createPadding` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
@@ -50,11 +50,11 @@
"bugs": {
"url": "https://github.com/lodash/lodash/issues"
},
- "_id": "lodash._createpad@3.0.1",
- "_shasum": "90c6bdbc84c48edfa026896e31856b1a0ec50842",
- "_from": "lodash._createpad@3.0.1",
- "_npmVersion": "2.3.0",
- "_nodeVersion": "0.10.35",
+ "_id": "lodash._createpadding@3.6.0",
+ "_shasum": "c466850dd1a05e6bfec54fd0cf0db28b68332d5e",
+ "_from": "lodash._createpadding@3.6.0",
+ "_npmVersion": "2.7.3",
+ "_nodeVersion": "0.12.0",
"_npmUser": {
"name": "jdalton",
"email": "john.david.dalton@gmail.com"
@@ -63,29 +63,13 @@
{
"name": "jdalton",
"email": "john.david.dalton@gmail.com"
- },
- {
- "name": "d10",
- "email": "demoneaux@gmail.com"
- },
- {
- "name": "kitcambridge",
- "email": "github@kitcambridge.be"
- },
- {
- "name": "mathias",
- "email": "mathias@qiwi.be"
- },
- {
- "name": "phated",
- "email": "blaine@iceddev.com"
}
],
"dist": {
- "shasum": "90c6bdbc84c48edfa026896e31856b1a0ec50842",
- "tarball": "http://registry.npmjs.org/lodash._createpad/-/lodash._createpad-3.0.1.tgz"
+ "shasum": "c466850dd1a05e6bfec54fd0cf0db28b68332d5e",
+ "tarball": "http://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/lodash._createpad/-/lodash._createpad-3.0.1.tgz",
+ "_resolved": "https://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE.txt b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE.txt
index 17764328c8..9cd87e5dce 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE.txt
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md
index 57c0bff72e..9b4891cd8c 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md
@@ -1,4 +1,4 @@
-# lodash.pad v3.0.0
+# lodash.pad v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.pad` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var pad = require('lodash.pad');
```
-See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.pad) for more details.
+See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.pad) for more details.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js
index f08b0fa639..d08251ba59 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js
@@ -1,13 +1,13 @@
/**
- * lodash 3.0.0 (Custom Build) <https://lodash.com/>
+ * lodash 3.1.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
+ * Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
var baseToString = require('lodash._basetostring'),
- createPad = require('lodash._createpad');
+ createPadding = require('lodash._createpadding');
/** Native method references. */
var ceil = Math.ceil,
@@ -17,9 +17,8 @@ var ceil = Math.ceil,
var nativeIsFinite = global.isFinite;
/**
- * Pads `string` on the left and right sides if it is shorter then the given
- * padding length. The `chars` string may be truncated if the number of padding
- * characters can't be evenly divided by the padding length.
+ * Pads `string` on the left and right sides if it is shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
*
* @static
* @memberOf _
@@ -51,7 +50,7 @@ function pad(string, length, chars) {
leftLength = floor(mid),
rightLength = ceil(mid);
- chars = createPad('', rightLength, chars);
+ chars = createPadding('', rightLength, chars);
return chars.slice(0, leftLength) + string + chars;
}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json
index 82085426ad..6813157b2a 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.pad",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.pad` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -52,16 +52,16 @@
},
"dependencies": {
"lodash._basetostring": "^3.0.0",
- "lodash._createpad": "^3.0.0"
+ "lodash._createpadding": "^3.0.0"
},
"bugs": {
"url": "https://github.com/lodash/lodash/issues"
},
- "_id": "lodash.pad@3.0.0",
- "_shasum": "1824e4756a3504b3af7b7a5b9d1f7501b43b2c25",
+ "_id": "lodash.pad@3.1.0",
+ "_shasum": "9f18b1f3749a95e197b5ff2ae752ea9851ada965",
"_from": "lodash.pad@>=3.0.0 <4.0.0",
- "_npmVersion": "2.3.0",
- "_nodeVersion": "0.10.35",
+ "_npmVersion": "2.7.3",
+ "_nodeVersion": "0.12.0",
"_npmUser": {
"name": "jdalton",
"email": "john.david.dalton@gmail.com"
@@ -70,13 +70,28 @@
{
"name": "jdalton",
"email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "d10",
+ "email": "demoneaux@gmail.com"
+ },
+ {
+ "name": "kitcambridge",
+ "email": "github@kitcambridge.be"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
}
],
"dist": {
- "shasum": "1824e4756a3504b3af7b7a5b9d1f7501b43b2c25",
- "tarball": "http://registry.npmjs.org/lodash.pad/-/lodash.pad-3.0.0.tgz"
+ "shasum": "9f18b1f3749a95e197b5ff2ae752ea9851ada965",
+ "tarball": "http://registry.npmjs.org/lodash.pad/-/lodash.pad-3.1.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-3.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-3.1.0.tgz"
}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/LICENSE.txt b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/LICENSE.txt
index 17764328c8..9cd87e5dce 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/LICENSE.txt
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/README.md
index cd29e458b3..bb634f538f 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/README.md
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/README.md
@@ -1,4 +1,4 @@
-# lodash.padleft v3.0.0
+# lodash.padleft v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.padLeft` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var padLeft = require('lodash.padleft');
```
-See the [documentation](https://lodash.com/docs#padLeft) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.padleft) for more details.
+See the [documentation](https://lodash.com/docs#padLeft) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.padleft) for more details.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/index.js
index 975619611c..69638d322d 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/index.js
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/index.js
@@ -1,18 +1,31 @@
/**
- * lodash 3.0.0 (Custom Build) <https://lodash.com/>
+ * lodash 3.1.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
+ * Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
var baseToString = require('lodash._basetostring'),
- createPad = require('lodash._createpad');
+ createPadding = require('lodash._createpadding');
/**
- * Pads `string` on the left side if it is shorter then the given padding
- * length. The `chars` string may be truncated if the number of padding
- * characters exceeds the padding length.
+ * Creates a function for `_.padLeft` or `_.padRight`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify padding from the right.
+ * @returns {Function} Returns the new pad function.
+ */
+function createPadDir(fromRight) {
+ return function(string, length, chars) {
+ string = baseToString(string);
+ return string && ((fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string));
+ };
+}
+
+/**
+ * Pads `string` on the left side if it is shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
*
* @static
* @memberOf _
@@ -32,9 +45,6 @@ var baseToString = require('lodash._basetostring'),
* _.padLeft('abc', 3);
* // => 'abc'
*/
-function padLeft(string, length, chars) {
- string = baseToString(string);
- return string && (createPad(string, length, chars) + string);
-}
+var padLeft = createPadDir();
module.exports = padLeft;
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/package.json
index 11d7a975ab..2fb935633e 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.padleft",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.padLeft` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -52,16 +52,16 @@
},
"dependencies": {
"lodash._basetostring": "^3.0.0",
- "lodash._createpad": "^3.0.0"
+ "lodash._createpadding": "^3.0.0"
},
"bugs": {
"url": "https://github.com/lodash/lodash/issues"
},
- "_id": "lodash.padleft@3.0.0",
- "_shasum": "448ac9e28ceb15d0ce9ae8e59dc9311ad17b4390",
+ "_id": "lodash.padleft@3.1.0",
+ "_shasum": "ac94eeeb3ec4df6394b893c6f4f7faa5cb96a5c1",
"_from": "lodash.padleft@>=3.0.0 <4.0.0",
- "_npmVersion": "2.3.0",
- "_nodeVersion": "0.10.35",
+ "_npmVersion": "2.7.3",
+ "_nodeVersion": "0.12.0",
"_npmUser": {
"name": "jdalton",
"email": "john.david.dalton@gmail.com"
@@ -70,13 +70,28 @@
{
"name": "jdalton",
"email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "d10",
+ "email": "demoneaux@gmail.com"
+ },
+ {
+ "name": "kitcambridge",
+ "email": "github@kitcambridge.be"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
}
],
"dist": {
- "shasum": "448ac9e28ceb15d0ce9ae8e59dc9311ad17b4390",
- "tarball": "http://registry.npmjs.org/lodash.padleft/-/lodash.padleft-3.0.0.tgz"
+ "shasum": "ac94eeeb3ec4df6394b893c6f4f7faa5cb96a5c1",
+ "tarball": "http://registry.npmjs.org/lodash.padleft/-/lodash.padleft-3.1.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/lodash.padleft/-/lodash.padleft-3.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/lodash.padleft/-/lodash.padleft-3.1.0.tgz"
}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/LICENSE.txt b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/LICENSE.txt
index 17764328c8..9cd87e5dce 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/LICENSE.txt
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/LICENSE.txt
@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/README.md
index b22b12d3e7..e1a742aeba 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/README.md
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/README.md
@@ -1,4 +1,4 @@
-# lodash.padright v3.0.0
+# lodash.padright v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.padRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var padRight = require('lodash.padright');
```
-See the [documentation](https://lodash.com/docs#padRight) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.padright) for more details.
+See the [documentation](https://lodash.com/docs#padRight) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.padright) for more details.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/index.js
index dea148f530..252e0a1315 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/index.js
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/index.js
@@ -1,18 +1,31 @@
/**
- * lodash 3.0.0 (Custom Build) <https://lodash.com/>
+ * lodash 3.1.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
+ * Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
var baseToString = require('lodash._basetostring'),
- createPad = require('lodash._createpad');
+ createPadding = require('lodash._createpadding');
/**
- * Pads `string` on the right side if it is shorter then the given padding
- * length. The `chars` string may be truncated if the number of padding
- * characters exceeds the padding length.
+ * Creates a function for `_.padLeft` or `_.padRight`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify padding from the right.
+ * @returns {Function} Returns the new pad function.
+ */
+function createPadDir(fromRight) {
+ return function(string, length, chars) {
+ string = baseToString(string);
+ return string && ((fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string));
+ };
+}
+
+/**
+ * Pads `string` on the right side if it is shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
*
* @static
* @memberOf _
@@ -32,9 +45,6 @@ var baseToString = require('lodash._basetostring'),
* _.padRight('abc', 3);
* // => 'abc'
*/
-function padRight(string, length, chars) {
- string = baseToString(string);
- return string && (string + createPad(string, length, chars));
-}
+var padRight = createPadDir(true);
module.exports = padRight;
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/package.json
index 1afbbe96c1..014e6de688 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.padright",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The modern build of lodash’s `_.padRight` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -52,16 +52,16 @@
},
"dependencies": {
"lodash._basetostring": "^3.0.0",
- "lodash._createpad": "^3.0.0"
+ "lodash._createpadding": "^3.0.0"
},
"bugs": {
"url": "https://github.com/lodash/lodash/issues"
},
- "_id": "lodash.padright@3.0.0",
- "_shasum": "caf2c8222c36d448fe0407b028630e6c5d1b06c6",
+ "_id": "lodash.padright@3.1.0",
+ "_shasum": "155aa4ed10f4103829031a14516dcb5f3f6c777f",
"_from": "lodash.padright@>=3.0.0 <4.0.0",
- "_npmVersion": "2.3.0",
- "_nodeVersion": "0.10.35",
+ "_npmVersion": "2.7.3",
+ "_nodeVersion": "0.12.0",
"_npmUser": {
"name": "jdalton",
"email": "john.david.dalton@gmail.com"
@@ -70,13 +70,28 @@
{
"name": "jdalton",
"email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "d10",
+ "email": "demoneaux@gmail.com"
+ },
+ {
+ "name": "kitcambridge",
+ "email": "github@kitcambridge.be"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
}
],
"dist": {
- "shasum": "caf2c8222c36d448fe0407b028630e6c5d1b06c6",
- "tarball": "http://registry.npmjs.org/lodash.padright/-/lodash.padright-3.0.0.tgz"
+ "shasum": "155aa4ed10f4103829031a14516dcb5f3f6c777f",
+ "tarball": "http://registry.npmjs.org/lodash.padright/-/lodash.padright-3.1.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/lodash.padright/-/lodash.padright-3.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/lodash.padright/-/lodash.padright-3.1.0.tgz"
}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/package.json
index 7014a31d6b..8e2f33196a 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/package.json
@@ -55,6 +55,5 @@
"tarball": "http://registry.npmjs.org/gauge/-/gauge-1.2.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.0.tgz"
}
diff --git a/deps/npm/node_modules/npmlog/package.json b/deps/npm/node_modules/npmlog/package.json
index 260ce66e71..da9bcd6c4d 100644
--- a/deps/npm/node_modules/npmlog/package.json
+++ b/deps/npm/node_modules/npmlog/package.json
@@ -53,6 +53,5 @@
"tarball": "http://registry.npmjs.org/npmlog/-/npmlog-1.2.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-1.2.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-1.2.0.tgz"
}
diff --git a/deps/npm/node_modules/npmlog/test/progress.js b/deps/npm/node_modules/npmlog/test/progress.js
index 14dfb32740..97b13ded2c 100644
--- a/deps/npm/node_modules/npmlog/test/progress.js
+++ b/deps/npm/node_modules/npmlog/test/progress.js
@@ -31,7 +31,7 @@ function didActions(t, msg, output) {
}
t.is(actions.length, output.length, msg)
tests.forEach(function (test) {
- t.is(actions[test.cmd] ? actions[test.cmd][test.arg] : null,
+ t.is(actions[test.cmd] ? actions[test.cmd][test.arg] : null,
output[test.cmd][test.arg],
msg + ': ' + output[test.cmd] + (test.arg ? ' arg #'+test.arg : ''))
})
diff --git a/deps/npm/node_modules/opener/LICENSE.txt b/deps/npm/node_modules/opener/LICENSE.txt
index 0407ecda83..f580e3d3af 100644
--- a/deps/npm/node_modules/opener/LICENSE.txt
+++ b/deps/npm/node_modules/opener/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright © 2012–2014 Domenic Denicola <domenic@domenicdenicola.com>
+Copyright © 2012–2015 Domenic Denicola <d@domenic.me>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
diff --git a/deps/npm/node_modules/opener/opener.js b/deps/npm/node_modules/opener/opener.js
index 3f95d0635a..8951fa2def 100755
--- a/deps/npm/node_modules/opener/opener.js
+++ b/deps/npm/node_modules/opener/opener.js
@@ -35,6 +35,11 @@ function opener(args, options, callback) {
//
// Furthermore, if "cmd /c" double-quoted the first parameter, then "start" will interpret it as a window title,
// so we need to add a dummy empty-string window title: http://stackoverflow.com/a/154090/3191
+ //
+ // Additionally, on Windows ampersand needs to be escaped when passed to "start"
+ args = args.map(function(value) {
+ return value.replace(/&/g, '^&');
+ });
args = ["/c", "start", '""'].concat(args);
}
diff --git a/deps/npm/node_modules/opener/package.json b/deps/npm/node_modules/opener/package.json
index b62915e6ef..aab02afc15 100644
--- a/deps/npm/node_modules/opener/package.json
+++ b/deps/npm/node_modules/opener/package.json
@@ -1,39 +1,43 @@
{
"name": "opener",
"description": "Opens stuff, like webpages and files and executables, cross-platform",
- "version": "1.4.0",
+ "version": "1.4.1",
"author": {
"name": "Domenic Denicola",
- "email": "domenic@domenicdenicola.com",
- "url": "http://domenic.me/"
+ "email": "d@domenic.me",
+ "url": "https://domenic.me/"
},
"license": "WTFPL",
"repository": {
"type": "git",
- "url": "git://github.com/domenic/opener.git"
- },
- "bugs": {
- "url": "http://github.com/domenic/opener/issues"
+ "url": "https://github.com/domenic/opener"
},
"main": "opener.js",
"bin": {
"opener": "opener.js"
},
+ "files": [
+ "opener.js"
+ ],
"scripts": {
"lint": "jshint opener.js"
},
"devDependencies": {
- "jshint": "^2.5.4"
+ "jshint": "^2.6.3"
+ },
+ "gitHead": "d0ee95b19951703462fa593baa16e81fdff7827c",
+ "bugs": {
+ "url": "https://github.com/domenic/opener/issues"
},
- "gitHead": "b9d36d4f82c26560acdadbabbb10ddba46a30dc5",
"homepage": "https://github.com/domenic/opener",
- "_id": "opener@1.4.0",
- "_shasum": "d11f86eeeb076883735c9d509f538fe82d10b941",
- "_from": "opener@>=1.4.0 <1.5.0",
- "_npmVersion": "1.4.23",
+ "_id": "opener@1.4.1",
+ "_shasum": "897590acd1aed3311b703b58bccb4d43f56f2895",
+ "_from": "opener@>=1.4.1 <1.5.0",
+ "_npmVersion": "2.7.0",
+ "_nodeVersion": "1.5.1",
"_npmUser": {
"name": "domenic",
- "email": "domenic@domenicdenicola.com"
+ "email": "d@domenic.me"
},
"maintainers": [
{
@@ -42,9 +46,9 @@
}
],
"dist": {
- "shasum": "d11f86eeeb076883735c9d509f538fe82d10b941",
- "tarball": "http://registry.npmjs.org/opener/-/opener-1.4.0.tgz"
+ "shasum": "897590acd1aed3311b703b58bccb4d43f56f2895",
+ "tarball": "http://registry.npmjs.org/opener/-/opener-1.4.1.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/opener/-/opener-1.4.0.tgz"
+ "_resolved": "https://registry.npmjs.org/opener/-/opener-1.4.1.tgz"
}
diff --git a/deps/npm/node_modules/read-installed/node_modules/readdir-scoped-modules/.eslintrc b/deps/npm/node_modules/read-installed/node_modules/readdir-scoped-modules/.eslintrc
deleted file mode 100644
index ba33150421..0000000000
--- a/deps/npm/node_modules/read-installed/node_modules/readdir-scoped-modules/.eslintrc
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "env" : {
- "node" : true
- },
- "rules" : {
- "semi": [2, "never"],
- "strict": 0,
- "quotes": [1, "double", "avoid-escape"],
- "no-use-before-define": 0,
- "curly": 0,
- "no-underscore-dangle": 0,
- "no-lonely-if": 1,
- "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}],
- "no-mixed-requires": 0,
- "space-infix-ops": 0
- }
-}
diff --git a/deps/npm/node_modules/read-installed/node_modules/readdir-scoped-modules/package.json b/deps/npm/node_modules/read-installed/node_modules/readdir-scoped-modules/package.json
index c33c391c2b..de45b2f4da 100644
--- a/deps/npm/node_modules/read-installed/node_modules/readdir-scoped-modules/package.json
+++ b/deps/npm/node_modules/read-installed/node_modules/readdir-scoped-modules/package.json
@@ -32,10 +32,30 @@
"url": "https://github.com/npm/readdir-scoped-modules/issues"
},
"homepage": "https://github.com/npm/readdir-scoped-modules",
- "readme": "# readdir-scoped-modules\n\nLike `fs.readdir` but handling `@org/module` dirs as if they were\na single entry.\n\nUsed by npm.\n\n## USAGE\n\n```javascript\nvar readdir = require('readdir-scoped-modules')\n\nreaddir('node_modules', function (er, entries) {\n // entries will be something like\n // ['a', '@org/foo', '@org/bar']\n})\n```\n",
- "readmeFilename": "README.md",
"gitHead": "451d38946c5b6b6c0db33a890f33536a11ed79f7",
"_id": "readdir-scoped-modules@1.0.1",
"_shasum": "5c2a77f3e08250a8fddf53fa58cdc17900b808b9",
- "_from": "readdir-scoped-modules@>=1.0.0 <2.0.0"
+ "_from": "readdir-scoped-modules@>=1.0.0 <2.0.0",
+ "_npmVersion": "2.1.9",
+ "_nodeVersion": "0.10.33",
+ "_npmUser": {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ }
+ ],
+ "dist": {
+ "shasum": "5c2a77f3e08250a8fddf53fa58cdc17900b808b9",
+ "tarball": "http://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.1.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.1.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/read-installed/package.json b/deps/npm/node_modules/read-installed/package.json
index 145205fcc1..7ecdc716e2 100644
--- a/deps/npm/node_modules/read-installed/package.json
+++ b/deps/npm/node_modules/read-installed/package.json
@@ -1,7 +1,7 @@
{
"name": "read-installed",
"description": "Read all the installed packages in a folder, and return a tree structure with all the data.",
- "version": "3.1.5",
+ "version": "4.0.0",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/read-installed"
@@ -12,7 +12,7 @@
},
"dependencies": {
"debuglog": "^1.0.1",
- "read-package-json": "1",
+ "read-package-json": "^2.0.0",
"readdir-scoped-modules": "^1.0.0",
"semver": "2 || 3 || 4",
"slide": "~1.1.3",
@@ -35,12 +35,12 @@
},
"readme": "# read-installed\n\nRead all the installed packages in a folder, and return a tree\nstructure with all the data.\n\nnpm uses this.\n\n## 2.0.0\n\nBreaking changes in `2.0.0`:\n\nThe second argument is now an `Object` that contains the following keys:\n\n * `depth` optional, defaults to Infinity\n * `log` optional log Function\n * `dev` optional, default false, set to true to include devDependencies\n\n## Usage\n\n```javascript\nvar readInstalled = require(\"read-installed\")\n// optional options\nvar options = { dev: false, log: fn, depth: 2 }\nreadInstalled(folder, options, function (er, data) {\n ...\n})\n```\n",
"readmeFilename": "README.md",
- "gitHead": "577c3f3f4f1e435f9bd944b8f99ce3f7552709ef",
+ "gitHead": "c1dea4823e2219a79d6184621917ee27d4283bc0",
"bugs": {
"url": "https://github.com/isaacs/read-installed/issues"
},
"homepage": "https://github.com/isaacs/read-installed",
- "_id": "read-installed@3.1.5",
- "_shasum": "4ae36081afd3e2204dc2e279807aaa52c30c8c0c",
- "_from": "read-installed@>=3.1.5 <3.2.0"
+ "_id": "read-installed@4.0.0",
+ "_shasum": "dbca08d6bd83e2a3b93c962053ba4d839e0769ba",
+ "_from": "read-installed@>=4.0.0 <4.1.0"
}
diff --git a/deps/npm/node_modules/read-package-json/node_modules/glob/LICENSE b/deps/npm/node_modules/read-package-json/node_modules/glob/LICENSE
deleted file mode 100644
index 19129e315f..0000000000
--- a/deps/npm/node_modules/read-package-json/node_modules/glob/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/read-package-json/node_modules/glob/README.md b/deps/npm/node_modules/read-package-json/node_modules/glob/README.md
deleted file mode 100644
index 258257ecb1..0000000000
--- a/deps/npm/node_modules/read-package-json/node_modules/glob/README.md
+++ /dev/null
@@ -1,369 +0,0 @@
-[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)
-
-# Glob
-
-Match files using the patterns the shell uses, like stars and stuff.
-
-This is a glob implementation in JavaScript. It uses the `minimatch`
-library to do its matching.
-
-![](oh-my-glob.gif)
-
-## Usage
-
-```javascript
-var glob = require("glob")
-
-// options is optional
-glob("**/*.js", options, function (er, files) {
- // files is an array of filenames.
- // If the `nonull` option is set, and nothing
- // was found, then files is ["**/*.js"]
- // er is an error object or null.
-})
-```
-
-## Glob Primer
-
-"Globs" are the patterns you type when you do stuff like `ls *.js` on
-the command line, or put `build/*` in a `.gitignore` file.
-
-Before parsing the path part patterns, braced sections are expanded
-into a set. Braced sections start with `{` and end with `}`, with any
-number of comma-delimited sections within. Braced sections may contain
-slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.
-
-The following characters have special magic meaning when used in a
-path portion:
-
-* `*` Matches 0 or more characters in a single path portion
-* `?` Matches 1 character
-* `[...]` Matches a range of characters, similar to a RegExp range.
- If the first character of the range is `!` or `^` then it matches
- any character not in the range.
-* `!(pattern|pattern|pattern)` Matches anything that does not match
- any of the patterns provided.
-* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the
- patterns provided.
-* `+(pattern|pattern|pattern)` Matches one or more occurrences of the
- patterns provided.
-* `*(a|b|c)` Matches zero or more occurrences of the patterns provided
-* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
- provided
-* `**` If a "globstar" is alone in a path portion, then it matches
- zero or more directories and subdirectories searching for matches.
- It does not crawl symlinked directories.
-
-### Dots
-
-If a file or directory path portion has a `.` as the first character,
-then it will not match any glob pattern unless that pattern's
-corresponding path part also has a `.` as its first character.
-
-For example, the pattern `a/.*/c` would match the file at `a/.b/c`.
-However the pattern `a/*/c` would not, because `*` does not start with
-a dot character.
-
-You can make glob treat dots as normal characters by setting
-`dot:true` in the options.
-
-### Basename Matching
-
-If you set `matchBase:true` in the options, and the pattern has no
-slashes in it, then it will seek for any file anywhere in the tree
-with a matching basename. For example, `*.js` would match
-`test/simple/basic.js`.
-
-### Negation
-
-The intent for negation would be for a pattern starting with `!` to
-match everything that *doesn't* match the supplied pattern. However,
-the implementation is weird, and for the time being, this should be
-avoided. The behavior will change or be deprecated in version 5.
-
-### Empty Sets
-
-If no matching files are found, then an empty array is returned. This
-differs from the shell, where the pattern itself is returned. For
-example:
-
- $ echo a*s*d*f
- a*s*d*f
-
-To get the bash-style behavior, set the `nonull:true` in the options.
-
-### See Also:
-
-* `man sh`
-* `man bash` (Search for "Pattern Matching")
-* `man 3 fnmatch`
-* `man 5 gitignore`
-* [minimatch documentation](https://github.com/isaacs/minimatch)
-
-## glob.hasMagic(pattern, [options])
-
-Returns `true` if there are any special characters in the pattern, and
-`false` otherwise.
-
-Note that the options affect the results. If `noext:true` is set in
-the options object, then `+(a|b)` will not be considered a magic
-pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`
-then that is considered magical, unless `nobrace:true` is set in the
-options.
-
-## glob(pattern, [options], cb)
-
-* `pattern` {String} Pattern to be matched
-* `options` {Object}
-* `cb` {Function}
- * `err` {Error | null}
- * `matches` {Array<String>} filenames found matching the pattern
-
-Perform an asynchronous glob search.
-
-## glob.sync(pattern, [options])
-
-* `pattern` {String} Pattern to be matched
-* `options` {Object}
-* return: {Array<String>} filenames found matching the pattern
-
-Perform a synchronous glob search.
-
-## Class: glob.Glob
-
-Create a Glob object by instantiating the `glob.Glob` class.
-
-```javascript
-var Glob = require("glob").Glob
-var mg = new Glob(pattern, options, cb)
-```
-
-It's an EventEmitter, and starts walking the filesystem to find matches
-immediately.
-
-### new glob.Glob(pattern, [options], [cb])
-
-* `pattern` {String} pattern to search for
-* `options` {Object}
-* `cb` {Function} Called when an error occurs, or matches are found
- * `err` {Error | null}
- * `matches` {Array<String>} filenames found matching the pattern
-
-Note that if the `sync` flag is set in the options, then matches will
-be immediately available on the `g.found` member.
-
-### Properties
-
-* `minimatch` The minimatch object that the glob uses.
-* `options` The options object passed in.
-* `aborted` Boolean which is set to true when calling `abort()`. There
- is no way at this time to continue a glob search after aborting, but
- you can re-use the statCache to avoid having to duplicate syscalls.
-* `statCache` Collection of all the stat results the glob search
- performed.
-* `cache` Convenience object. Each field has the following possible
- values:
- * `false` - Path does not exist
- * `true` - Path exists
- * `'DIR'` - Path exists, and is not a directory
- * `'FILE'` - Path exists, and is a directory
- * `[file, entries, ...]` - Path exists, is a directory, and the
- array value is the results of `fs.readdir`
-* `statCache` Cache of `fs.stat` results, to prevent statting the same
- path multiple times.
-* `symlinks` A record of which paths are symbolic links, which is
- relevant in resolving `**` patterns.
-* `realpathCache` An optional object which is passed to `fs.realpath`
- to minimize unnecessary syscalls. It is stored on the instantiated
- Glob object, and may be re-used.
-
-### Events
-
-* `end` When the matching is finished, this is emitted with all the
- matches found. If the `nonull` option is set, and no match was found,
- then the `matches` list contains the original pattern. The matches
- are sorted, unless the `nosort` flag is set.
-* `match` Every time a match is found, this is emitted with the matched.
-* `error` Emitted when an unexpected error is encountered, or whenever
- any fs error occurs if `options.strict` is set.
-* `abort` When `abort()` is called, this event is raised.
-
-### Methods
-
-* `pause` Temporarily stop the search
-* `resume` Resume the search
-* `abort` Stop the search forever
-
-### Options
-
-All the options that can be passed to Minimatch can also be passed to
-Glob to change pattern matching behavior. Also, some have been added,
-or have glob-specific ramifications.
-
-All options are false by default, unless otherwise noted.
-
-All options are added to the Glob object, as well.
-
-If you are running many `glob` operations, you can pass a Glob object
-as the `options` argument to a subsequent operation to shortcut some
-`stat` and `readdir` calls. At the very least, you may pass in shared
-`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that
-parallel glob operations will be sped up by sharing information about
-the filesystem.
-
-* `cwd` The current working directory in which to search. Defaults
- to `process.cwd()`.
-* `root` The place where patterns starting with `/` will be mounted
- onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
- systems, and `C:\` or some such on Windows.)
-* `dot` Include `.dot` files in normal matches and `globstar` matches.
- Note that an explicit dot in a portion of the pattern will always
- match dot files.
-* `nomount` By default, a pattern starting with a forward-slash will be
- "mounted" onto the root setting, so that a valid filesystem path is
- returned. Set this flag to disable that behavior.
-* `mark` Add a `/` character to directory matches. Note that this
- requires additional stat calls.
-* `nosort` Don't sort the results.
-* `stat` Set to true to stat *all* results. This reduces performance
- somewhat, and is completely unnecessary, unless `readdir` is presumed
- to be an untrustworthy indicator of file existence.
-* `silent` When an unusual error is encountered when attempting to
- read a directory, a warning will be printed to stderr. Set the
- `silent` option to true to suppress these warnings.
-* `strict` When an unusual error is encountered when attempting to
- read a directory, the process will just continue on in search of
- other matches. Set the `strict` option to raise an error in these
- cases.
-* `cache` See `cache` property above. Pass in a previously generated
- cache object to save some fs calls.
-* `statCache` A cache of results of filesystem information, to prevent
- unnecessary stat calls. While it should not normally be necessary
- to set this, you may pass the statCache from one glob() call to the
- options object of another, if you know that the filesystem will not
- change between calls. (See "Race Conditions" below.)
-* `symlinks` A cache of known symbolic links. You may pass in a
- previously generated `symlinks` object to save `lstat` calls when
- resolving `**` matches.
-* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.
-* `nounique` In some cases, brace-expanded patterns can result in the
- same file showing up multiple times in the result set. By default,
- this implementation prevents duplicates in the result set. Set this
- flag to disable that behavior.
-* `nonull` Set to never return an empty set, instead returning a set
- containing the pattern itself. This is the default in glob(3).
-* `debug` Set to enable debug logging in minimatch and glob.
-* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
-* `noglobstar` Do not match `**` against multiple filenames. (Ie,
- treat it as a normal `*` instead.)
-* `noext` Do not match `+(a|b)` "extglob" patterns.
-* `nocase` Perform a case-insensitive match. Note: on
- case-insensitive filesystems, non-magic patterns will match by
- default, since `stat` and `readdir` will not raise errors.
-* `matchBase` Perform a basename-only match if the pattern does not
- contain any slash characters. That is, `*.js` would be treated as
- equivalent to `**/*.js`, matching all js files in all directories.
-* `nonegate` Suppress `negate` behavior. (See below.)
-* `nocomment` Suppress `comment` behavior. (See below.)
-* `nonull` Return the pattern when no matches are found.
-* `nodir` Do not match directories, only files. (Note: to match
- *only* directories, simply put a `/` at the end of the pattern.)
-* `ignore` Add a pattern or an array of patterns to exclude matches.
-* `follow` Follow symlinked directories when expanding `**` patterns.
- Note that this can result in a lot of duplicate references in the
- presence of cyclic links.
-* `realpath` Set to true to call `fs.realpath` on all of the results.
- In the case of a symlink that cannot be resolved, the full absolute
- path to the matched entry is returned (though it will usually be a
- broken symlink)
-
-## Comparisons to other fnmatch/glob implementations
-
-While strict compliance with the existing standards is a worthwhile
-goal, some discrepancies exist between node-glob and other
-implementations, and are intentional.
-
-If the pattern starts with a `!` character, then it is negated. Set the
-`nonegate` flag to suppress this behavior, and treat leading `!`
-characters normally. This is perhaps relevant if you wish to start the
-pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
-characters at the start of a pattern will negate the pattern multiple
-times.
-
-If a pattern starts with `#`, then it is treated as a comment, and
-will not match anything. Use `\#` to match a literal `#` at the
-start of a line, or set the `nocomment` flag to suppress this behavior.
-
-The double-star character `**` is supported by default, unless the
-`noglobstar` flag is set. This is supported in the manner of bsdglob
-and bash 4.3, where `**` only has special significance if it is the only
-thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
-`a/**b` will not.
-
-Note that symlinked directories are not crawled as part of a `**`,
-though their contents may match against subsequent portions of the
-pattern. This prevents infinite loops and duplicates and the like.
-
-If an escaped pattern has no matches, and the `nonull` flag is set,
-then glob returns the pattern as-provided, rather than
-interpreting the character escapes. For example,
-`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
-`"*a?"`. This is akin to setting the `nullglob` option in bash, except
-that it does not resolve escaped pattern characters.
-
-If brace expansion is not disabled, then it is performed before any
-other interpretation of the glob pattern. Thus, a pattern like
-`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
-**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
-checked for validity. Since those two are valid, matching proceeds.
-
-## Windows
-
-**Please only use forward-slashes in glob expressions.**
-
-Though windows uses either `/` or `\` as its path separator, only `/`
-characters are used by this glob implementation. You must use
-forward-slashes **only** in glob expressions. Back-slashes will always
-be interpreted as escape characters, not path separators.
-
-Results from absolute patterns such as `/foo/*` are mounted onto the
-root setting using `path.join`. On windows, this will by default result
-in `/foo/*` matching `C:\foo\bar.txt`.
-
-## Race Conditions
-
-Glob searching, by its very nature, is susceptible to race conditions,
-since it relies on directory walking and such.
-
-As a result, it is possible that a file that exists when glob looks for
-it may have been deleted or modified by the time it returns the result.
-
-As part of its internal implementation, this program caches all stat
-and readdir calls that it makes, in order to cut down on system
-overhead. However, this also makes it even more susceptible to races,
-especially if the cache or statCache objects are reused between glob
-calls.
-
-Users are thus advised not to use a glob result as a guarantee of
-filesystem state in the face of rapid changes. For the vast majority
-of operations, this is never a problem.
-
-## Contributing
-
-Any change to behavior (including bugfixes) must come with a test.
-
-Patches that fail tests or reduce performance will be rejected.
-
-```
-# to run tests
-npm test
-
-# to re-generate test fixtures
-npm run test-regen
-
-# to benchmark against bash/zsh
-npm run bench
-
-# to profile javascript
-npm run prof
-```
diff --git a/deps/npm/node_modules/read-package-json/node_modules/glob/common.js b/deps/npm/node_modules/read-package-json/node_modules/glob/common.js
deleted file mode 100644
index cd7c824481..0000000000
--- a/deps/npm/node_modules/read-package-json/node_modules/glob/common.js
+++ /dev/null
@@ -1,237 +0,0 @@
-exports.alphasort = alphasort
-exports.alphasorti = alphasorti
-exports.isAbsolute = process.platform === "win32" ? absWin : absUnix
-exports.setopts = setopts
-exports.ownProp = ownProp
-exports.makeAbs = makeAbs
-exports.finish = finish
-exports.mark = mark
-exports.isIgnored = isIgnored
-exports.childrenIgnored = childrenIgnored
-
-function ownProp (obj, field) {
- return Object.prototype.hasOwnProperty.call(obj, field)
-}
-
-var path = require("path")
-var minimatch = require("minimatch")
-var Minimatch = minimatch.Minimatch
-
-function absWin (p) {
- if (absUnix(p)) return true
- // pull off the device/UNC bit from a windows path.
- // from node's lib/path.js
- var splitDeviceRe =
- /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/
- var result = splitDeviceRe.exec(p)
- var device = result[1] || ''
- var isUnc = device && device.charAt(1) !== ':'
- var isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
-
- return isAbsolute
-}
-
-function absUnix (p) {
- return p.charAt(0) === "/" || p === ""
-}
-
-function alphasorti (a, b) {
- return a.toLowerCase().localeCompare(b.toLowerCase())
-}
-
-function alphasort (a, b) {
- return a.localeCompare(b)
-}
-
-function setupIgnores (self, options) {
- self.ignore = options.ignore || []
-
- if (!Array.isArray(self.ignore))
- self.ignore = [self.ignore]
-
- if (self.ignore.length) {
- self.ignore = self.ignore.map(ignoreMap)
- }
-}
-
-function ignoreMap (pattern) {
- var gmatcher = null
- if (pattern.slice(-3) === '/**') {
- var gpattern = pattern.replace(/(\/\*\*)+$/, '')
- gmatcher = new Minimatch(gpattern, { nonegate: true })
- }
-
- return {
- matcher: new Minimatch(pattern, { nonegate: true }),
- gmatcher: gmatcher
- }
-}
-
-function setopts (self, pattern, options) {
- if (!options)
- options = {}
-
- // base-matching: just use globstar for that.
- if (options.matchBase && -1 === pattern.indexOf("/")) {
- if (options.noglobstar) {
- throw new Error("base matching requires globstar")
- }
- pattern = "**/" + pattern
- }
-
- self.pattern = pattern
- self.strict = options.strict !== false
- self.realpath = !!options.realpath
- self.realpathCache = options.realpathCache || Object.create(null)
- self.follow = !!options.follow
- self.dot = !!options.dot
- self.mark = !!options.mark
- self.nodir = !!options.nodir
- if (self.nodir)
- self.mark = true
- self.sync = !!options.sync
- self.nounique = !!options.nounique
- self.nonull = !!options.nonull
- self.nosort = !!options.nosort
- self.nocase = !!options.nocase
- self.stat = !!options.stat
- self.noprocess = !!options.noprocess
-
- self.maxLength = options.maxLength || Infinity
- self.cache = options.cache || Object.create(null)
- self.statCache = options.statCache || Object.create(null)
- self.symlinks = options.symlinks || Object.create(null)
-
- setupIgnores(self, options)
-
- self.changedCwd = false
- var cwd = process.cwd()
- if (!ownProp(options, "cwd"))
- self.cwd = cwd
- else {
- self.cwd = options.cwd
- self.changedCwd = path.resolve(options.cwd) !== cwd
- }
-
- self.root = options.root || path.resolve(self.cwd, "/")
- self.root = path.resolve(self.root)
- if (process.platform === "win32")
- self.root = self.root.replace(/\\/g, "/")
-
- self.nomount = !!options.nomount
-
- self.minimatch = new Minimatch(pattern, options)
- self.options = self.minimatch.options
-}
-
-function finish (self) {
- var nou = self.nounique
- var all = nou ? [] : Object.create(null)
-
- for (var i = 0, l = self.matches.length; i < l; i ++) {
- var matches = self.matches[i]
- if (!matches || Object.keys(matches).length === 0) {
- if (self.nonull) {
- // do like the shell, and spit out the literal glob
- var literal = self.minimatch.globSet[i]
- if (nou)
- all.push(literal)
- else
- all[literal] = true
- }
- } else {
- // had matches
- var m = Object.keys(matches)
- if (nou)
- all.push.apply(all, m)
- else
- m.forEach(function (m) {
- all[m] = true
- })
- }
- }
-
- if (!nou)
- all = Object.keys(all)
-
- if (!self.nosort)
- all = all.sort(self.nocase ? alphasorti : alphasort)
-
- // at *some* point we statted all of these
- if (self.mark) {
- for (var i = 0; i < all.length; i++) {
- all[i] = self._mark(all[i])
- }
- if (self.nodir) {
- all = all.filter(function (e) {
- return !(/\/$/.test(e))
- })
- }
- }
-
- if (self.ignore.length)
- all = all.filter(function(m) {
- return !isIgnored(self, m)
- })
-
- self.found = all
-}
-
-function mark (self, p) {
- var abs = makeAbs(self, p)
- var c = self.cache[abs]
- var m = p
- if (c) {
- var isDir = c === 'DIR' || Array.isArray(c)
- var slash = p.slice(-1) === '/'
-
- if (isDir && !slash)
- m += '/'
- else if (!isDir && slash)
- m = m.slice(0, -1)
-
- if (m !== p) {
- var mabs = makeAbs(self, m)
- self.statCache[mabs] = self.statCache[abs]
- self.cache[mabs] = self.cache[abs]
- }
- }
-
- return m
-}
-
-// lotta situps...
-function makeAbs (self, f) {
- var abs = f
- if (f.charAt(0) === '/') {
- abs = path.join(self.root, f)
- } else if (exports.isAbsolute(f)) {
- abs = f
- } else if (self.changedCwd) {
- abs = path.resolve(self.cwd, f)
- } else if (self.realpath) {
- abs = path.resolve(f)
- }
- return abs
-}
-
-
-// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
-// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
-function isIgnored (self, path) {
- if (!self.ignore.length)
- return false
-
- return self.ignore.some(function(item) {
- return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
- })
-}
-
-function childrenIgnored (self, path) {
- if (!self.ignore.length)
- return false
-
- return self.ignore.some(function(item) {
- return !!(item.gmatcher && item.gmatcher.match(path))
- })
-}
diff --git a/deps/npm/node_modules/read-package-json/node_modules/glob/glob.js b/deps/npm/node_modules/read-package-json/node_modules/glob/glob.js
deleted file mode 100644
index eac0693cc6..0000000000
--- a/deps/npm/node_modules/read-package-json/node_modules/glob/glob.js
+++ /dev/null
@@ -1,740 +0,0 @@
-// Approach:
-//
-// 1. Get the minimatch set
-// 2. For each pattern in the set, PROCESS(pattern, false)
-// 3. Store matches per-set, then uniq them
-//
-// PROCESS(pattern, inGlobStar)
-// Get the first [n] items from pattern that are all strings
-// Join these together. This is PREFIX.
-// If there is no more remaining, then stat(PREFIX) and
-// add to matches if it succeeds. END.
-//
-// If inGlobStar and PREFIX is symlink and points to dir
-// set ENTRIES = []
-// else readdir(PREFIX) as ENTRIES
-// If fail, END
-//
-// with ENTRIES
-// If pattern[n] is GLOBSTAR
-// // handle the case where the globstar match is empty
-// // by pruning it out, and testing the resulting pattern
-// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
-// // handle other cases.
-// for ENTRY in ENTRIES (not dotfiles)
-// // attach globstar + tail onto the entry
-// // Mark that this entry is a globstar match
-// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
-//
-// else // not globstar
-// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
-// Test ENTRY against pattern[n]
-// If fails, continue
-// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
-//
-// Caveat:
-// Cache all stats and readdirs results to minimize syscall. Since all
-// we ever care about is existence and directory-ness, we can just keep
-// `true` for files, and [children,...] for directories, or `false` for
-// things that don't exist.
-
-module.exports = glob
-
-var fs = require('fs')
-var minimatch = require('minimatch')
-var Minimatch = minimatch.Minimatch
-var inherits = require('inherits')
-var EE = require('events').EventEmitter
-var path = require('path')
-var assert = require('assert')
-var globSync = require('./sync.js')
-var common = require('./common.js')
-var alphasort = common.alphasort
-var alphasorti = common.alphasorti
-var isAbsolute = common.isAbsolute
-var setopts = common.setopts
-var ownProp = common.ownProp
-var inflight = require('inflight')
-var util = require('util')
-var childrenIgnored = common.childrenIgnored
-
-var once = require('once')
-
-function glob (pattern, options, cb) {
- if (typeof options === 'function') cb = options, options = {}
- if (!options) options = {}
-
- if (options.sync) {
- if (cb)
- throw new TypeError('callback provided to sync glob')
- return globSync(pattern, options)
- }
-
- return new Glob(pattern, options, cb)
-}
-
-glob.sync = globSync
-var GlobSync = glob.GlobSync = globSync.GlobSync
-
-// old api surface
-glob.glob = glob
-
-glob.hasMagic = function (pattern, options_) {
- var options = util._extend({}, options_)
- options.noprocess = true
-
- var g = new Glob(pattern, options)
- var set = g.minimatch.set
- if (set.length > 1)
- return true
-
- for (var j = 0; j < set[0].length; j++) {
- if (typeof set[0][j] !== 'string')
- return true
- }
-
- return false
-}
-
-glob.Glob = Glob
-inherits(Glob, EE)
-function Glob (pattern, options, cb) {
- if (typeof options === 'function') {
- cb = options
- options = null
- }
-
- if (options && options.sync) {
- if (cb)
- throw new TypeError('callback provided to sync glob')
- return new GlobSync(pattern, options)
- }
-
- if (!(this instanceof Glob))
- return new Glob(pattern, options, cb)
-
- setopts(this, pattern, options)
- this._didRealPath = false
-
- // process each pattern in the minimatch set
- var n = this.minimatch.set.length
-
- // The matches are stored as {<filename>: true,...} so that
- // duplicates are automagically pruned.
- // Later, we do an Object.keys() on these.
- // Keep them as a list so we can fill in when nonull is set.
- this.matches = new Array(n)
-
- if (typeof cb === 'function') {
- cb = once(cb)
- this.on('error', cb)
- this.on('end', function (matches) {
- cb(null, matches)
- })
- }
-
- var self = this
- var n = this.minimatch.set.length
- this._processing = 0
- this.matches = new Array(n)
-
- this._emitQueue = []
- this._processQueue = []
- this.paused = false
-
- if (this.noprocess)
- return this
-
- if (n === 0)
- return done()
-
- for (var i = 0; i < n; i ++) {
- this._process(this.minimatch.set[i], i, false, done)
- }
-
- function done () {
- --self._processing
- if (self._processing <= 0)
- self._finish()
- }
-}
-
-Glob.prototype._finish = function () {
- assert(this instanceof Glob)
- if (this.aborted)
- return
-
- if (this.realpath && !this._didRealpath)
- return this._realpath()
-
- common.finish(this)
- this.emit('end', this.found)
-}
-
-Glob.prototype._realpath = function () {
- if (this._didRealpath)
- return
-
- this._didRealpath = true
-
- var n = this.matches.length
- if (n === 0)
- return this._finish()
-
- var self = this
- for (var i = 0; i < this.matches.length; i++)
- this._realpathSet(i, next)
-
- function next () {
- if (--n === 0)
- self._finish()
- }
-}
-
-Glob.prototype._realpathSet = function (index, cb) {
- var matchset = this.matches[index]
- if (!matchset)
- return cb()
-
- var found = Object.keys(matchset)
- var self = this
- var n = found.length
-
- if (n === 0)
- return cb()
-
- var set = this.matches[index] = Object.create(null)
- found.forEach(function (p, i) {
- // If there's a problem with the stat, then it means that
- // one or more of the links in the realpath couldn't be
- // resolved. just return the abs value in that case.
- p = self._makeAbs(p)
- fs.realpath(p, self.realpathCache, function (er, real) {
- if (!er)
- set[real] = true
- else if (er.syscall === 'stat')
- set[p] = true
- else
- self.emit('error', er) // srsly wtf right here
-
- if (--n === 0) {
- self.matches[index] = set
- cb()
- }
- })
- })
-}
-
-Glob.prototype._mark = function (p) {
- return common.mark(this, p)
-}
-
-Glob.prototype._makeAbs = function (f) {
- return common.makeAbs(this, f)
-}
-
-Glob.prototype.abort = function () {
- this.aborted = true
- this.emit('abort')
-}
-
-Glob.prototype.pause = function () {
- if (!this.paused) {
- this.paused = true
- this.emit('pause')
- }
-}
-
-Glob.prototype.resume = function () {
- if (this.paused) {
- this.emit('resume')
- this.paused = false
- if (this._emitQueue.length) {
- var eq = this._emitQueue.slice(0)
- this._emitQueue.length = 0
- for (var i = 0; i < eq.length; i ++) {
- var e = eq[i]
- this._emitMatch(e[0], e[1])
- }
- }
- if (this._processQueue.length) {
- var pq = this._processQueue.slice(0)
- this._processQueue.length = 0
- for (var i = 0; i < pq.length; i ++) {
- var p = pq[i]
- this._processing--
- this._process(p[0], p[1], p[2], p[3])
- }
- }
- }
-}
-
-Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
- assert(this instanceof Glob)
- assert(typeof cb === 'function')
-
- if (this.aborted)
- return
-
- this._processing++
- if (this.paused) {
- this._processQueue.push([pattern, index, inGlobStar, cb])
- return
- }
-
- //console.error('PROCESS %d', this._processing, pattern)
-
- // Get the first [n] parts of pattern that are all strings.
- var n = 0
- while (typeof pattern[n] === 'string') {
- n ++
- }
- // now n is the index of the first one that is *not* a string.
-
- // see if there's anything else
- var prefix
- switch (n) {
- // if not, then this is rather simple
- case pattern.length:
- this._processSimple(pattern.join('/'), index, cb)
- return
-
- case 0:
- // pattern *starts* with some non-trivial item.
- // going to readdir(cwd), but not include the prefix in matches.
- prefix = null
- break
-
- default:
- // pattern has some string bits in the front.
- // whatever it starts with, whether that's 'absolute' like /foo/bar,
- // or 'relative' like '../baz'
- prefix = pattern.slice(0, n).join('/')
- break
- }
-
- var remain = pattern.slice(n)
-
- // get the list of entries.
- var read
- if (prefix === null)
- read = '.'
- else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
- if (!prefix || !isAbsolute(prefix))
- prefix = '/' + prefix
- read = prefix
- } else
- read = prefix
-
- var abs = this._makeAbs(read)
-
- //if ignored, skip _processing
- if (childrenIgnored(this, read))
- return cb()
-
- var isGlobStar = remain[0] === minimatch.GLOBSTAR
- if (isGlobStar)
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
- else
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
-}
-
-Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
- var self = this
- this._readdir(abs, inGlobStar, function (er, entries) {
- return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
- })
-}
-
-Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
-
- // if the abs isn't a dir, then nothing can match!
- if (!entries)
- return cb()
-
- // It will only match dot entries if it starts with a dot, or if
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
- var pn = remain[0]
- var negate = !!this.minimatch.negate
- var rawGlob = pn._glob
- var dotOk = this.dot || rawGlob.charAt(0) === '.'
-
- var matchedEntries = []
- for (var i = 0; i < entries.length; i++) {
- var e = entries[i]
- if (e.charAt(0) !== '.' || dotOk) {
- var m
- if (negate && !prefix) {
- m = !e.match(pn)
- } else {
- m = e.match(pn)
- }
- if (m)
- matchedEntries.push(e)
- }
- }
-
- //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
-
- var len = matchedEntries.length
- // If there are no matched entries, then nothing matches.
- if (len === 0)
- return cb()
-
- // if this is the last remaining pattern bit, then no need for
- // an additional stat *unless* the user has specified mark or
- // stat explicitly. We know they exist, since readdir returned
- // them.
-
- if (remain.length === 1 && !this.mark && !this.stat) {
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- if (prefix) {
- if (prefix !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
-
- if (e.charAt(0) === '/' && !this.nomount) {
- e = path.join(this.root, e)
- }
- this._emitMatch(index, e)
- }
- // This was the last one, and no stats were needed
- return cb()
- }
-
- // now test all matched entries as stand-ins for that part
- // of the pattern.
- remain.shift()
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- var newPattern
- if (prefix) {
- if (prefix !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
- this._process([e].concat(remain), index, inGlobStar, cb)
- }
- cb()
-}
-
-Glob.prototype._emitMatch = function (index, e) {
- if (this.aborted)
- return
-
- if (this.matches[index][e])
- return
-
- if (this.paused) {
- this._emitQueue.push([index, e])
- return
- }
-
- var abs = this._makeAbs(e)
-
- if (this.nodir) {
- var c = this.cache[abs]
- if (c === 'DIR' || Array.isArray(c))
- return
- }
-
- if (this.mark)
- e = this._mark(e)
-
- this.matches[index][e] = true
-
- var st = this.statCache[abs]
- if (st)
- this.emit('stat', e, st)
-
- this.emit('match', e)
-}
-
-Glob.prototype._readdirInGlobStar = function (abs, cb) {
- if (this.aborted)
- return
-
- // follow all symlinked directories forever
- // just proceed as if this is a non-globstar situation
- if (this.follow)
- return this._readdir(abs, false, cb)
-
- var lstatkey = 'lstat\0' + abs
- var self = this
- var lstatcb = inflight(lstatkey, lstatcb_)
-
- if (lstatcb)
- fs.lstat(abs, lstatcb)
-
- function lstatcb_ (er, lstat) {
- if (er)
- return cb()
-
- var isSym = lstat.isSymbolicLink()
- self.symlinks[abs] = isSym
-
- // If it's not a symlink or a dir, then it's definitely a regular file.
- // don't bother doing a readdir in that case.
- if (!isSym && !lstat.isDirectory()) {
- self.cache[abs] = 'FILE'
- cb()
- } else
- self._readdir(abs, false, cb)
- }
-}
-
-Glob.prototype._readdir = function (abs, inGlobStar, cb) {
- if (this.aborted)
- return
-
- cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
- if (!cb)
- return
-
- //console.error('RD %j %j', +inGlobStar, abs)
- if (inGlobStar && !ownProp(this.symlinks, abs))
- return this._readdirInGlobStar(abs, cb)
-
- if (ownProp(this.cache, abs)) {
- var c = this.cache[abs]
- if (!c || c === 'FILE')
- return cb()
-
- if (Array.isArray(c))
- return cb(null, c)
- }
-
- var self = this
- fs.readdir(abs, readdirCb(this, abs, cb))
-}
-
-function readdirCb (self, abs, cb) {
- return function (er, entries) {
- if (er)
- self._readdirError(abs, er, cb)
- else
- self._readdirEntries(abs, entries, cb)
- }
-}
-
-Glob.prototype._readdirEntries = function (abs, entries, cb) {
- if (this.aborted)
- return
-
- // if we haven't asked to stat everything, then just
- // assume that everything in there exists, so we can avoid
- // having to stat it a second time.
- if (!this.mark && !this.stat) {
- for (var i = 0; i < entries.length; i ++) {
- var e = entries[i]
- if (abs === '/')
- e = abs + e
- else
- e = abs + '/' + e
- this.cache[e] = true
- }
- }
-
- this.cache[abs] = entries
- return cb(null, entries)
-}
-
-Glob.prototype._readdirError = function (f, er, cb) {
- if (this.aborted)
- return
-
- // handle errors, and cache the information
- switch (er.code) {
- case 'ENOTDIR': // totally normal. means it *does* exist.
- this.cache[this._makeAbs(f)] = 'FILE'
- break
-
- case 'ENOENT': // not terribly unusual
- case 'ELOOP':
- case 'ENAMETOOLONG':
- case 'UNKNOWN':
- this.cache[this._makeAbs(f)] = false
- break
-
- default: // some unusual error. Treat as failure.
- this.cache[this._makeAbs(f)] = false
- if (this.strict) return this.emit('error', er)
- if (!this.silent) console.error('glob error', er)
- break
- }
- return cb()
-}
-
-Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
- var self = this
- this._readdir(abs, inGlobStar, function (er, entries) {
- self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
- })
-}
-
-
-Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
- //console.error('pgs2', prefix, remain[0], entries)
-
- // no entries means not a dir, so it can never have matches
- // foo.txt/** doesn't match foo.txt
- if (!entries)
- return cb()
-
- // test without the globstar, and with every child both below
- // and replacing the globstar.
- var remainWithoutGlobStar = remain.slice(1)
- var gspref = prefix ? [ prefix ] : []
- var noGlobStar = gspref.concat(remainWithoutGlobStar)
-
- // the noGlobStar pattern exits the inGlobStar state
- this._process(noGlobStar, index, false, cb)
-
- var isSym = this.symlinks[abs]
- var len = entries.length
-
- // If it's a symlink, and we're in a globstar, then stop
- if (isSym && inGlobStar)
- return cb()
-
- for (var i = 0; i < len; i++) {
- var e = entries[i]
- if (e.charAt(0) === '.' && !this.dot)
- continue
-
- // these two cases enter the inGlobStar state
- var instead = gspref.concat(entries[i], remainWithoutGlobStar)
- this._process(instead, index, true, cb)
-
- var below = gspref.concat(entries[i], remain)
- this._process(below, index, true, cb)
- }
-
- cb()
-}
-
-Glob.prototype._processSimple = function (prefix, index, cb) {
- // XXX review this. Shouldn't it be doing the mounting etc
- // before doing stat? kinda weird?
- var self = this
- this._stat(prefix, function (er, exists) {
- self._processSimple2(prefix, index, er, exists, cb)
- })
-}
-Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
-
- //console.error('ps2', prefix, exists)
-
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- // If it doesn't exist, then just mark the lack of results
- if (!exists)
- return cb()
-
- if (prefix && isAbsolute(prefix) && !this.nomount) {
- var trail = /[\/\\]$/.test(prefix)
- if (prefix.charAt(0) === '/') {
- prefix = path.join(this.root, prefix)
- } else {
- prefix = path.resolve(this.root, prefix)
- if (trail)
- prefix += '/'
- }
- }
-
- if (process.platform === 'win32')
- prefix = prefix.replace(/\\/g, '/')
-
- // Mark this as a match
- this._emitMatch(index, prefix)
- cb()
-}
-
-// Returns either 'DIR', 'FILE', or false
-Glob.prototype._stat = function (f, cb) {
- var abs = this._makeAbs(f)
- var needDir = f.slice(-1) === '/'
-
- if (f.length > this.maxLength)
- return cb()
-
- if (!this.stat && ownProp(this.cache, abs)) {
- var c = this.cache[abs]
-
- if (Array.isArray(c))
- c = 'DIR'
-
- // It exists, but maybe not how we need it
- if (!needDir || c === 'DIR')
- return cb(null, c)
-
- if (needDir && c === 'FILE')
- return cb()
-
- // otherwise we have to stat, because maybe c=true
- // if we know it exists, but not what it is.
- }
-
- var exists
- var stat = this.statCache[abs]
- if (stat !== undefined) {
- if (stat === false)
- return cb(null, stat)
- else {
- var type = stat.isDirectory() ? 'DIR' : 'FILE'
- if (needDir && type === 'FILE')
- return cb()
- else
- return cb(null, type, stat)
- }
- }
-
- var self = this
- var statcb = inflight('stat\0' + abs, lstatcb_)
- if (statcb)
- fs.lstat(abs, statcb)
-
- function lstatcb_ (er, lstat) {
- if (lstat && lstat.isSymbolicLink()) {
- // If it's a symlink, then treat it as the target, unless
- // the target does not exist, then treat it as a file.
- return fs.stat(abs, function (er, stat) {
- if (er)
- self._stat2(f, abs, null, lstat, cb)
- else
- self._stat2(f, abs, er, stat, cb)
- })
- } else {
- self._stat2(f, abs, er, lstat, cb)
- }
- }
-}
-
-Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
- if (er) {
- this.statCache[abs] = false
- return cb()
- }
-
- var needDir = f.slice(-1) === '/'
- this.statCache[abs] = stat
-
- if (abs.slice(-1) === '/' && !stat.isDirectory())
- return cb(null, false, stat)
-
- var c = stat.isDirectory() ? 'DIR' : 'FILE'
- this.cache[abs] = this.cache[abs] || c
-
- if (needDir && c !== 'DIR')
- return cb()
-
- return cb(null, c, stat)
-}
diff --git a/deps/npm/node_modules/read-package-json/node_modules/glob/package.json b/deps/npm/node_modules/read-package-json/node_modules/glob/package.json
deleted file mode 100644
index 7a2cb4c634..0000000000
--- a/deps/npm/node_modules/read-package-json/node_modules/glob/package.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "name": "glob",
- "description": "a little globber",
- "version": "4.5.3",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-glob.git"
- },
- "main": "glob.js",
- "files": [
- "glob.js",
- "sync.js",
- "common.js"
- ],
- "engines": {
- "node": "*"
- },
- "dependencies": {
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^2.0.1",
- "once": "^1.3.0"
- },
- "devDependencies": {
- "mkdirp": "0",
- "rimraf": "^2.2.8",
- "tap": "^0.5.0",
- "tick": "0.0.6"
- },
- "scripts": {
- "prepublish": "npm run benchclean",
- "profclean": "rm -f v8.log profile.txt",
- "test": "npm run profclean && tap test/*.js",
- "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js",
- "bench": "bash benchmark.sh",
- "prof": "bash prof.sh && cat profile.txt",
- "benchclean": "bash benchclean.sh"
- },
- "license": "ISC",
- "gitHead": "a4e461ab59a837eee80a4d8dbdbf5ae1054a646f",
- "bugs": {
- "url": "https://github.com/isaacs/node-glob/issues"
- },
- "homepage": "https://github.com/isaacs/node-glob",
- "_id": "glob@4.5.3",
- "_shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f",
- "_from": "glob@>=4.4.2 <5.0.0",
- "_npmVersion": "2.7.1",
- "_nodeVersion": "1.4.2",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "dist": {
- "shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f",
- "tarball": "http://registry.npmjs.org/glob/-/glob-4.5.3.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/read-package-json/node_modules/glob/sync.js b/deps/npm/node_modules/read-package-json/node_modules/glob/sync.js
deleted file mode 100644
index f4f5e36d4b..0000000000
--- a/deps/npm/node_modules/read-package-json/node_modules/glob/sync.js
+++ /dev/null
@@ -1,457 +0,0 @@
-module.exports = globSync
-globSync.GlobSync = GlobSync
-
-var fs = require('fs')
-var minimatch = require('minimatch')
-var Minimatch = minimatch.Minimatch
-var Glob = require('./glob.js').Glob
-var util = require('util')
-var path = require('path')
-var assert = require('assert')
-var common = require('./common.js')
-var alphasort = common.alphasort
-var alphasorti = common.alphasorti
-var isAbsolute = common.isAbsolute
-var setopts = common.setopts
-var ownProp = common.ownProp
-var childrenIgnored = common.childrenIgnored
-
-function globSync (pattern, options) {
- if (typeof options === 'function' || arguments.length === 3)
- throw new TypeError('callback provided to sync glob\n'+
- 'See: https://github.com/isaacs/node-glob/issues/167')
-
- return new GlobSync(pattern, options).found
-}
-
-function GlobSync (pattern, options) {
- if (!pattern)
- throw new Error('must provide pattern')
-
- if (typeof options === 'function' || arguments.length === 3)
- throw new TypeError('callback provided to sync glob\n'+
- 'See: https://github.com/isaacs/node-glob/issues/167')
-
- if (!(this instanceof GlobSync))
- return new GlobSync(pattern, options)
-
- setopts(this, pattern, options)
-
- if (this.noprocess)
- return this
-
- var n = this.minimatch.set.length
- this.matches = new Array(n)
- for (var i = 0; i < n; i ++) {
- this._process(this.minimatch.set[i], i, false)
- }
- this._finish()
-}
-
-GlobSync.prototype._finish = function () {
- assert(this instanceof GlobSync)
- if (this.realpath) {
- var self = this
- this.matches.forEach(function (matchset, index) {
- var set = self.matches[index] = Object.create(null)
- for (var p in matchset) {
- try {
- p = self._makeAbs(p)
- var real = fs.realpathSync(p, this.realpathCache)
- set[real] = true
- } catch (er) {
- if (er.syscall === 'stat')
- set[self._makeAbs(p)] = true
- else
- throw er
- }
- }
- })
- }
- common.finish(this)
-}
-
-
-GlobSync.prototype._process = function (pattern, index, inGlobStar) {
- assert(this instanceof GlobSync)
-
- // Get the first [n] parts of pattern that are all strings.
- var n = 0
- while (typeof pattern[n] === 'string') {
- n ++
- }
- // now n is the index of the first one that is *not* a string.
-
- // See if there's anything else
- var prefix
- switch (n) {
- // if not, then this is rather simple
- case pattern.length:
- this._processSimple(pattern.join('/'), index)
- return
-
- case 0:
- // pattern *starts* with some non-trivial item.
- // going to readdir(cwd), but not include the prefix in matches.
- prefix = null
- break
-
- default:
- // pattern has some string bits in the front.
- // whatever it starts with, whether that's 'absolute' like /foo/bar,
- // or 'relative' like '../baz'
- prefix = pattern.slice(0, n).join('/')
- break
- }
-
- var remain = pattern.slice(n)
-
- // get the list of entries.
- var read
- if (prefix === null)
- read = '.'
- else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
- if (!prefix || !isAbsolute(prefix))
- prefix = '/' + prefix
- read = prefix
- } else
- read = prefix
-
- var abs = this._makeAbs(read)
-
- //if ignored, skip processing
- if (childrenIgnored(this, read))
- return
-
- var isGlobStar = remain[0] === minimatch.GLOBSTAR
- if (isGlobStar)
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
- else
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
-}
-
-
-GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
- var entries = this._readdir(abs, inGlobStar)
-
- // if the abs isn't a dir, then nothing can match!
- if (!entries)
- return
-
- // It will only match dot entries if it starts with a dot, or if
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
- var pn = remain[0]
- var negate = !!this.minimatch.negate
- var rawGlob = pn._glob
- var dotOk = this.dot || rawGlob.charAt(0) === '.'
-
- var matchedEntries = []
- for (var i = 0; i < entries.length; i++) {
- var e = entries[i]
- if (e.charAt(0) !== '.' || dotOk) {
- var m
- if (negate && !prefix) {
- m = !e.match(pn)
- } else {
- m = e.match(pn)
- }
- if (m)
- matchedEntries.push(e)
- }
- }
-
- var len = matchedEntries.length
- // If there are no matched entries, then nothing matches.
- if (len === 0)
- return
-
- // if this is the last remaining pattern bit, then no need for
- // an additional stat *unless* the user has specified mark or
- // stat explicitly. We know they exist, since readdir returned
- // them.
-
- if (remain.length === 1 && !this.mark && !this.stat) {
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- if (prefix) {
- if (prefix.slice(-1) !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
-
- if (e.charAt(0) === '/' && !this.nomount) {
- e = path.join(this.root, e)
- }
- this.matches[index][e] = true
- }
- // This was the last one, and no stats were needed
- return
- }
-
- // now test all matched entries as stand-ins for that part
- // of the pattern.
- remain.shift()
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- var newPattern
- if (prefix)
- newPattern = [prefix, e]
- else
- newPattern = [e]
- this._process(newPattern.concat(remain), index, inGlobStar)
- }
-}
-
-
-GlobSync.prototype._emitMatch = function (index, e) {
- var abs = this._makeAbs(e)
- if (this.mark)
- e = this._mark(e)
-
- if (this.matches[index][e])
- return
-
- if (this.nodir) {
- var c = this.cache[this._makeAbs(e)]
- if (c === 'DIR' || Array.isArray(c))
- return
- }
-
- this.matches[index][e] = true
- if (this.stat)
- this._stat(e)
-}
-
-
-GlobSync.prototype._readdirInGlobStar = function (abs) {
- // follow all symlinked directories forever
- // just proceed as if this is a non-globstar situation
- if (this.follow)
- return this._readdir(abs, false)
-
- var entries
- var lstat
- var stat
- try {
- lstat = fs.lstatSync(abs)
- } catch (er) {
- // lstat failed, doesn't exist
- return null
- }
-
- var isSym = lstat.isSymbolicLink()
- this.symlinks[abs] = isSym
-
- // If it's not a symlink or a dir, then it's definitely a regular file.
- // don't bother doing a readdir in that case.
- if (!isSym && !lstat.isDirectory())
- this.cache[abs] = 'FILE'
- else
- entries = this._readdir(abs, false)
-
- return entries
-}
-
-GlobSync.prototype._readdir = function (abs, inGlobStar) {
- var entries
-
- if (inGlobStar && !ownProp(this.symlinks, abs))
- return this._readdirInGlobStar(abs)
-
- if (ownProp(this.cache, abs)) {
- var c = this.cache[abs]
- if (!c || c === 'FILE')
- return null
-
- if (Array.isArray(c))
- return c
- }
-
- try {
- return this._readdirEntries(abs, fs.readdirSync(abs))
- } catch (er) {
- this._readdirError(abs, er)
- return null
- }
-}
-
-GlobSync.prototype._readdirEntries = function (abs, entries) {
- // if we haven't asked to stat everything, then just
- // assume that everything in there exists, so we can avoid
- // having to stat it a second time.
- if (!this.mark && !this.stat) {
- for (var i = 0; i < entries.length; i ++) {
- var e = entries[i]
- if (abs === '/')
- e = abs + e
- else
- e = abs + '/' + e
- this.cache[e] = true
- }
- }
-
- this.cache[abs] = entries
-
- // mark and cache dir-ness
- return entries
-}
-
-GlobSync.prototype._readdirError = function (f, er) {
- // handle errors, and cache the information
- switch (er.code) {
- case 'ENOTDIR': // totally normal. means it *does* exist.
- this.cache[this._makeAbs(f)] = 'FILE'
- break
-
- case 'ENOENT': // not terribly unusual
- case 'ELOOP':
- case 'ENAMETOOLONG':
- case 'UNKNOWN':
- this.cache[this._makeAbs(f)] = false
- break
-
- default: // some unusual error. Treat as failure.
- this.cache[this._makeAbs(f)] = false
- if (this.strict) throw er
- if (!this.silent) console.error('glob error', er)
- break
- }
-}
-
-GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
-
- var entries = this._readdir(abs, inGlobStar)
-
- // no entries means not a dir, so it can never have matches
- // foo.txt/** doesn't match foo.txt
- if (!entries)
- return
-
- // test without the globstar, and with every child both below
- // and replacing the globstar.
- var remainWithoutGlobStar = remain.slice(1)
- var gspref = prefix ? [ prefix ] : []
- var noGlobStar = gspref.concat(remainWithoutGlobStar)
-
- // the noGlobStar pattern exits the inGlobStar state
- this._process(noGlobStar, index, false)
-
- var len = entries.length
- var isSym = this.symlinks[abs]
-
- // If it's a symlink, and we're in a globstar, then stop
- if (isSym && inGlobStar)
- return
-
- for (var i = 0; i < len; i++) {
- var e = entries[i]
- if (e.charAt(0) === '.' && !this.dot)
- continue
-
- // these two cases enter the inGlobStar state
- var instead = gspref.concat(entries[i], remainWithoutGlobStar)
- this._process(instead, index, true)
-
- var below = gspref.concat(entries[i], remain)
- this._process(below, index, true)
- }
-}
-
-GlobSync.prototype._processSimple = function (prefix, index) {
- // XXX review this. Shouldn't it be doing the mounting etc
- // before doing stat? kinda weird?
- var exists = this._stat(prefix)
-
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- // If it doesn't exist, then just mark the lack of results
- if (!exists)
- return
-
- if (prefix && isAbsolute(prefix) && !this.nomount) {
- var trail = /[\/\\]$/.test(prefix)
- if (prefix.charAt(0) === '/') {
- prefix = path.join(this.root, prefix)
- } else {
- prefix = path.resolve(this.root, prefix)
- if (trail)
- prefix += '/'
- }
- }
-
- if (process.platform === 'win32')
- prefix = prefix.replace(/\\/g, '/')
-
- // Mark this as a match
- this.matches[index][prefix] = true
-}
-
-// Returns either 'DIR', 'FILE', or false
-GlobSync.prototype._stat = function (f) {
- var abs = this._makeAbs(f)
- var needDir = f.slice(-1) === '/'
-
- if (f.length > this.maxLength)
- return false
-
- if (!this.stat && ownProp(this.cache, abs)) {
- var c = this.cache[abs]
-
- if (Array.isArray(c))
- c = 'DIR'
-
- // It exists, but maybe not how we need it
- if (!needDir || c === 'DIR')
- return c
-
- if (needDir && c === 'FILE')
- return false
-
- // otherwise we have to stat, because maybe c=true
- // if we know it exists, but not what it is.
- }
-
- var exists
- var stat = this.statCache[abs]
- if (!stat) {
- var lstat
- try {
- lstat = fs.lstatSync(abs)
- } catch (er) {
- return false
- }
-
- if (lstat.isSymbolicLink()) {
- try {
- stat = fs.statSync(abs)
- } catch (er) {
- stat = lstat
- }
- } else {
- stat = lstat
- }
- }
-
- this.statCache[abs] = stat
-
- var c = stat.isDirectory() ? 'DIR' : 'FILE'
- this.cache[abs] = this.cache[abs] || c
-
- if (needDir && c !== 'DIR')
- return false
-
- return c
-}
-
-GlobSync.prototype._mark = function (p) {
- return common.mark(this, p)
-}
-
-GlobSync.prototype._makeAbs = function (f) {
- return common.makeAbs(this, f)
-}
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/LICENSE b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/LICENSE
index c3d2eb3550..e637724b3b 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/LICENSE
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/LICENSE
@@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/README.md b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/README.md
index 3d61083fb0..85d52a2dce 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/README.md
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/README.md
@@ -240,3 +240,4 @@ JSON.stringify will split this into 15 lines, and it's hard to read.
Yet again, this feature comes with a performance hit, so if user experience matters to you more than performance, use this module. If your JSON will be consumed by machines, use JSON.stringify instead.
As a rule of thumb, if you use "space" argument to indent your JSON, you'd better use this module instead.
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/docs/Grammar.md b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/docs/Grammar.md
index 61ae49b380..eb7c8bc667 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/docs/Grammar.md
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/docs/Grammar.md
@@ -1,5 +1,5 @@
-JSON5 grammar expressed in EBNF form.
+JSON5 grammar expressed in EBNF form.
PS: I don't know what is appropriate syntax highlighter for this, so I'm using "modula2" because why not. I also inserted <ZWSP> after backslash to preserve syntax highlighting, this character has nothing to do with actual JSON5 syntax and should be ignored.
@@ -81,11 +81,11 @@ hex_digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'a'
ascii_letter = ascii_letter_lowercase
| ascii_letter_uppercase
-ascii_letter_lowercase = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i'
+ascii_letter_lowercase = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i'
| 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r'
| 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z'
-ascii_letter_uppercase = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I'
+ascii_letter_uppercase = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I'
| 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R'
| 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z'
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/analyze.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/analyze.js
index 39303b0969..9b0f9af01c 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/analyze.js
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/analyze.js
@@ -89,3 +89,4 @@ module.exports.analyze = function analyzeJSON(input, options) {
return result
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/document.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/document.js
index af1a01a03d..cfab8691fc 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/document.js
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/document.js
@@ -482,3 +482,4 @@ module.exports.Document = Document
module.exports.update = function updateJSON(source, new_value, options) {
return Document(source, options).update(new_value).toString()
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js
index 2b78949378..5f9fe99861 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js
@@ -749,3 +749,4 @@ module.exports.tokenize = function tokenizeJSON(input, options) {
tokens.data = module.exports.parse(input, options)
return tokens
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js
index 754019eac5..ce89d77ee1 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js
@@ -380,3 +380,4 @@ module.exports.stringify = function stringifyJSON(object, options, _space) {
return _stringify(object, options, 0, '')
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js
index dd4752c73a..a8476b6c46 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js
@@ -43,3 +43,4 @@ module.exports.middleware = function() {
throw Error('this function is removed, use express-json5 instead')
}
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml
index c971ba2826..cab7b5d0bc 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml
@@ -43,3 +43,4 @@ publishConfig:
license:
type: WTFPL
url: http://www.wtfpl.net/txt/copying/
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_analyze.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_analyze.js
index e353efcd1a..2a24e01eac 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_analyze.js
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_analyze.js
@@ -50,3 +50,4 @@ addTest(t.quote_keys, false)
var t = analyze("{foo:'bar', \"bar\":'baz', \"baz\":\"quux\"}")
addTest(t.quote, '"')
addTest(t.quote_keys, false)
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_errors.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_errors.js
index b88fcd3892..8b2cdb7dcb 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_errors.js
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_errors.js
@@ -53,3 +53,4 @@ try {
var x = err.stack.match(/parseObject/g)
assert(!x || x.length < 2, "shouldn't blow up the stack with internal calls")
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_parse.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_parse.js
index c539cc7858..d33e61ee7e 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_parse.js
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_parse.js
@@ -168,3 +168,4 @@ for (var i=0; i<100; i++) {
//console.log(rnd, x, y, z)
if (x !== y && x !== z) throw 'ERROR'
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_portable.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_portable.js
index bf24aa68b3..0143e7d8e5 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_portable.js
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_portable.js
@@ -57,3 +57,4 @@ for (var k in tests) {
})
})(k)
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_tokenize.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_tokenize.js
index 02726154ae..64fb7ec93d 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_tokenize.js
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_tokenize.js
@@ -96,3 +96,4 @@ addTest('[1,2,[[],[1]],{},{1:2},{q:{q:{}}},]',
{ raw: '}', type: 'separator', stack: [5] },
{ raw: ',', type: 'separator', stack: [] },
{ raw: ']', type: 'separator', stack: [] } ])
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_updates.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_updates.js
index 560f33692a..b7482519a9 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_updates.js
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_updates.js
@@ -19,3 +19,4 @@ FS.readdirSync(__dirname + '/update').filter(function(file) {
assert.strictEqual(test.test(jju, test.input), test.output)
})
})
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/author.yaml b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/author.yaml
index b991dc9a0d..4b08bb61b4 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/author.yaml
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/author.yaml
@@ -28,3 +28,4 @@ test: !!js/function |
}
return jju.update(input, obj)
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/deep-object.yaml b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/deep-object.yaml
index 1bc1681c88..e0795a3787 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/deep-object.yaml
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/deep-object.yaml
@@ -33,3 +33,4 @@ test: !!js/function |
obj.foo.bar.qwe = {rty: {aaa: {bbb: 1}}}
return jju.update(input, obj, {mode:'json'})
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/delete.yaml b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/delete.yaml
index c388332138..b964715d37 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/delete.yaml
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/delete.yaml
@@ -33,3 +33,4 @@ test: !!js/function |
delete obj.dependencies.bar
return jju.update(input, obj, {mode:'json'})
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/norm-array.yaml b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/norm-array.yaml
index 1a67db77ae..c5b9dd952d 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/norm-array.yaml
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/norm-array.yaml
@@ -29,3 +29,4 @@ test: !!js/function |
obj.bundleDependencies.push('quux')
return jju.update(input, obj, {mode:'json'})
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/norm-object.yaml b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/norm-object.yaml
index 1734f738e3..93878675b7 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/norm-object.yaml
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/norm-object.yaml
@@ -29,3 +29,4 @@ test: !!js/function |
obj.dependencies.qwerty = '1'
return jju.update(input, obj, {mode:'json'})
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/npm-array-bin.yaml b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/npm-array-bin.yaml
index 9308007e48..35e1639bfd 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/npm-array-bin.yaml
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/npm-array-bin.yaml
@@ -26,3 +26,4 @@ test: !!js/function |
_from: 'npm-test-array-bin/' }
return jju.update(input, obj)
}
+
diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/pkg-json5.yaml b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/pkg-json5.yaml
index 5721f41ac7..21a5c6eb14 100644
--- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/pkg-json5.yaml
+++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/update/pkg-json5.yaml
@@ -33,3 +33,4 @@ test: !!js/function |
}
return jju.update(input, upd)
}
+
diff --git a/deps/npm/node_modules/read-package-json/package.json b/deps/npm/node_modules/read-package-json/package.json
index 143d6d7396..e83b1f0890 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": "1.3.2",
+ "version": "2.0.0",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -13,53 +13,30 @@
},
"main": "read-json.js",
"scripts": {
- "test": "tap test/*.js"
+ "test": "standard && tap test/*.js"
},
"dependencies": {
- "github-url-from-git": "^1.3.0",
- "github-url-from-username-repo": "~1.0.0",
- "glob": "^4.0.2",
+ "glob": "^5.0.3",
"json-parse-helpfulerror": "^1.0.2",
- "lru-cache": "2",
- "normalize-package-data": "^1.0.0",
+ "normalize-package-data": "^2.0.0",
"graceful-fs": "2 || 3"
},
"devDependencies": {
+ "standard": "^3.3.1",
"tap": "^0.7.1"
},
"optionalDependencies": {
"graceful-fs": "2 || 3"
},
"license": "ISC",
- "gitHead": "d307d827f1a4f13a3a8bc4d747bb854779ad35c8",
+ "gitHead": "1a0476fef4ed8a70b48bfdc90070d897b8ad5469",
+ "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\n// readJson(filename, [logFunction=noop], [strict=false], cb)\nreadJson('/path/to/package.json', console.error, false, 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, [logFn = noop], [strict = false], cb)\n\n* `file` {String} The path to the package.json file\n* `logFn` {Function} Function to handle logging. Defaults to a noop.\n* `strict` {Boolean} True to enforce SemVer 2.0 version strings, and\n other strict requirements.\n* `cb` {Function} Gets called with `(er, data)`, as is The Node Way.\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",
+ "readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/read-package-json/issues"
},
"homepage": "https://github.com/isaacs/read-package-json",
- "_id": "read-package-json@1.3.2",
- "_shasum": "5228bc7ad1f33ded75184ece48710036101affa2",
- "_from": "read-package-json@>=1.3.2 <1.4.0",
- "_npmVersion": "2.7.0",
- "_nodeVersion": "1.2.0",
- "_npmUser": {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- }
- ],
- "dist": {
- "shasum": "5228bc7ad1f33ded75184ece48710036101affa2",
- "tarball": "http://registry.npmjs.org/read-package-json/-/read-package-json-1.3.2.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.3.2.tgz",
- "readme": "ERROR: No README data found!"
+ "_id": "read-package-json@2.0.0",
+ "_shasum": "ca7543298275028d27064b9118e6e501c9b3ae41",
+ "_from": "read-package-json@>=2.0.0 <2.1.0"
}
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 98ab9f16d2..3f93603f89 100644
--- a/deps/npm/node_modules/read-package-json/read-json.js
+++ b/deps/npm/node_modules/read-package-json/read-json.js
@@ -1,336 +1,304 @@
-// vim: set softtabstop=16 shiftwidth=16:
-
+var fs
try {
- var fs = require("graceful-fs")
+ fs = require('graceful-fs')
} catch (er) {
- var fs = require("fs")
+ fs = require('fs')
}
+var path = require('path')
-module.exports = readJson
+var glob = require('glob')
+var normalizeData = require('normalize-package-data')
+var safeJSON = require('json-parse-helpfulerror')
-var LRU = require("lru-cache")
-readJson.cache = new LRU({max: 1000})
-var path = require("path")
-var glob = require("glob")
-var normalizeData = require("normalize-package-data")
-var jsonparse = require("json-parse-helpfulerror")
+module.exports = readJson
// put more stuff on here to customize.
readJson.extraSet = [
- gypfile,
- serverjs,
- scriptpath,
- authors,
- readme,
- mans,
- bins,
- githead
+ gypfile,
+ serverjs,
+ scriptpath,
+ authors,
+ readme,
+ mans,
+ bins,
+ githead
]
var typoWarned = {}
-
function readJson (file, log_, strict_, cb_) {
- var log, strict, cb
- for (var i = 1; i < arguments.length - 1; i++) {
- if (typeof arguments[i] === 'boolean')
- strict = arguments[i]
- else if (typeof arguments[i] === 'function')
- log = arguments[i]
- }
- if (!log) log = function () {};
- cb = arguments[ arguments.length - 1 ]
-
- var c = readJson.cache.get(file)
- if (c) {
- cb = cb.bind(null, null, c)
- return process.nextTick(cb);
- }
- cb = (function (orig) { return function (er, data) {
- if (data) readJson.cache.set(file, data);
- return orig(er, data)
- } })(cb)
- readJson_(file, log, strict, cb)
-}
+ var log, strict, cb
+ for (var i = 1; i < arguments.length - 1; i++) {
+ if (typeof arguments[i] === 'boolean') {
+ strict = arguments[i]
+ } else if (typeof arguments[i] === 'function') {
+ log = arguments[i]
+ }
+ }
+ if (!log) log = function () {}
+ cb = arguments[ arguments.length - 1 ]
-function readJson_ (file, log, strict, cb) {
- fs.readFile(file, "utf8", function (er, d) {
- parseJson(file, er, d, log, strict, cb)
- })
+ readJson_(file, log, strict, cb)
}
-
-function stripBOM(content) {
- // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
- // because the buffer-to-string conversion in `fs.readFileSync()`
- // translates it to FEFF, the UTF-16 BOM.
- if (content.charCodeAt(0) === 0xFEFF) {
- content = content.slice(1);
- }
- return content;
+function readJson_ (file, log, strict, cb) {
+ fs.readFile(file, 'utf8', function (er, d) {
+ parseJson(file, er, d, log, strict, cb)
+ })
}
+function stripBOM (content) {
+ // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
+ // because the buffer-to-string conversion in `fs.readFileSync()`
+ // translates it to FEFF, the UTF-16 BOM.
+ if (content.charCodeAt(0) === 0xFEFF) content = content.slice(1)
+ return content
+}
function parseJson (file, er, d, log, strict, cb) {
- if (er && er.code === "ENOENT") {
- indexjs(file, er, log, strict, cb)
- return
- }
- if (er) return cb(er);
- try {
- d = jsonparse.parse(stripBOM(d))
- } catch (er) {
- d = parseIndex(d)
- if (!d) return cb(parseError(er, file));
- }
- extras(file, d, log, strict, cb)
-}
+ if (er && er.code === 'ENOENT') return indexjs(file, er, log, strict, cb)
+ if (er) return cb(er)
+ try {
+ d = safeJSON.parse(stripBOM(d))
+ } catch (er) {
+ d = parseIndex(d)
+ if (!d) return cb(parseError(er, file))
+ }
-function indexjs (file, er, log, strict, cb) {
- if (path.basename(file) === "index.js") {
- return cb(er);
- }
- var index = path.resolve(path.dirname(file), "index.js")
- fs.readFile(index, "utf8", function (er2, d) {
- if (er2) return cb(er);
- d = parseIndex(d)
- if (!d) return cb(er);
- extras(file, d, log, strict, cb)
- })
+ extras(file, d, log, strict, cb)
}
+function indexjs (file, er, log, strict, cb) {
+ if (path.basename(file) === 'index.js') return cb(er)
+
+ var index = path.resolve(path.dirname(file), 'index.js')
+ fs.readFile(index, 'utf8', function (er2, d) {
+ if (er2) return cb(er)
+
+ d = parseIndex(d)
+ if (!d) return cb(er)
+
+ extras(file, d, log, strict, cb)
+ })
+}
readJson.extras = extras
function extras (file, data, log_, strict_, cb_) {
- var log, strict, cb
- for (var i = 2; i < arguments.length - 1; i++) {
- if (typeof arguments[i] === 'boolean')
- strict = arguments[i]
- else if (typeof arguments[i] === 'function')
- log = arguments[i]
- }
- if (!log) log = function () {};
- cb = arguments[i]
- var set = readJson.extraSet
- var n = set.length
- var errState = null
- set.forEach(function (fn) {
- fn(file, data, then)
- })
- function then(er) {
- if (errState) return;
- if (er) return cb(errState = er);
- if (--n > 0) return;
- final(file, data, log, strict, cb);
- }
+ var log, strict, cb
+ for (var i = 2; i < arguments.length - 1; i++) {
+ if (typeof arguments[i] === 'boolean') {
+ strict = arguments[i]
+ } else if (typeof arguments[i] === 'function') {
+ log = arguments[i]
+ }
+ }
+
+ if (!log) log = function () {}
+ cb = arguments[i]
+
+ var set = readJson.extraSet
+ var n = set.length
+ var errState = null
+ set.forEach(function (fn) {
+ fn(file, data, then)
+ })
+
+ function then (er) {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (--n > 0) return
+ final(file, data, log, strict, cb)
+ }
}
function scriptpath (file, data, cb) {
- if (!data.scripts) return cb(null, data);
- var k = Object.keys(data.scripts)
- k.forEach(scriptpath_, data.scripts)
- cb(null, data);
+ if (!data.scripts) return cb(null, data)
+ var k = Object.keys(data.scripts)
+ k.forEach(scriptpath_, data.scripts)
+ cb(null, data)
}
-function scriptpath_(key) {
- s = this[key]
- // This is never allowed, and only causes problems
- if (typeof s !== 'string')
- return delete this[key]
- var spre = /^(\.[\/\\])?node_modules[\/\\].bin[\\\/]/
- if (s.match(spre))
- this[key] = this[key].replace(spre, '')
+
+function scriptpath_ (key) {
+ var s = this[key]
+ // This is never allowed, and only causes problems
+ if (typeof s !== 'string') return delete this[key]
+
+ var spre = /^(\.[\/\\])?node_modules[\/\\].bin[\\\/]/
+ if (s.match(spre)) {
+ this[key] = this[key].replace(spre, '')
+ }
}
function gypfile (file, data, cb) {
- var dir = path.dirname(file)
- var s = data.scripts || {}
- if (s.install || s.preinstall)
- return cb(null, data);
- glob("*.gyp", { cwd: dir }, function (er, files) {
- if (er) return cb(er);
- gypfile_(file, data, files, cb)
- })
+ var dir = path.dirname(file)
+ var s = data.scripts || {}
+ if (s.install || s.preinstall) return cb(null, data)
+
+ glob('*.gyp', { cwd: dir }, function (er, files) {
+ if (er) return cb(er)
+ gypfile_(file, data, files, cb)
+ })
}
function gypfile_ (file, data, files, cb) {
- if (!files.length) return cb(null, data);
- var s = data.scripts || {}
- s.install = "node-gyp rebuild"
- data.scripts = s
- data.gypfile = true
- return cb(null, data);
+ if (!files.length) return cb(null, data)
+ var s = data.scripts || {}
+ s.install = 'node-gyp rebuild'
+ data.scripts = s
+ data.gypfile = true
+ return cb(null, data)
}
function serverjs (file, data, cb) {
- var dir = path.dirname(file)
- var s = data.scripts || {}
- if (s.start) return cb(null, data)
- glob("server.js", { cwd: dir }, function (er, files) {
- if (er) return cb(er);
- serverjs_(file, data, files, cb)
- })
+ var dir = path.dirname(file)
+ var s = data.scripts || {}
+ if (s.start) return cb(null, data)
+ glob('server.js', { cwd: dir }, function (er, files) {
+ if (er) return cb(er)
+ serverjs_(file, data, files, cb)
+ })
}
+
function serverjs_ (file, data, files, cb) {
- if (!files.length) return cb(null, data);
- var s = data.scripts || {}
- s.start = "node server.js"
- data.scripts = s
- return cb(null, data)
+ if (!files.length) return cb(null, data)
+ var s = data.scripts || {}
+ s.start = 'node server.js'
+ data.scripts = s
+ return cb(null, data)
}
function authors (file, data, cb) {
- if (data.contributors) return cb(null, data);
- var af = path.resolve(path.dirname(file), "AUTHORS")
- fs.readFile(af, "utf8", function (er, ad) {
- // ignore error. just checking it.
- if (er) return cb(null, data);
- authors_(file, data, ad, cb)
- })
-}
-function authors_ (file, data, ad, cb) {
- ad = ad.split(/\r?\n/g).map(function (line) {
- return line.replace(/^\s*#.*$/, '').trim()
- }).filter(function (line) {
- return line
- })
- data.contributors = ad
- return cb(null, data)
-}
-
-var defDesc = "Unnamed repository; edit this file " +
- "'description' to name the repository."
-function gitDescription (file, data, cb) {
- if (data.description) return cb(null, data);
- var dir = path.dirname(file)
- // just cuz it'd be nice if this file mattered...
- var gitDesc = path.resolve(dir, '.git/description')
- fs.readFile(gitDesc, 'utf8', function (er, desc) {
- if (desc) desc = desc.trim()
- if (!er && desc !== defDesc)
- data.description = desc
- return cb(null, data)
- })
+ if (data.contributors) return cb(null, data)
+ var af = path.resolve(path.dirname(file), 'AUTHORS')
+ fs.readFile(af, 'utf8', function (er, ad) {
+ // ignore error. just checking it.
+ if (er) return cb(null, data)
+ authors_(file, data, ad, cb)
+ })
}
-function readmeDescription (file, data) {
- if (data.description) return cb(null, data);
- var d = data.readme
- if (!d) return;
- // the first block of text before the first heading
- // that isn't the first line heading
- d = d.trim().split('\n')
- for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++);
- var l = d.length
- for (var e = s + 1; e < l && d[e].trim(); e ++);
- data.description = d.slice(s, e).join(' ').trim()
+function authors_ (file, data, ad, cb) {
+ ad = ad.split(/\r?\n/g).map(function (line) {
+ return line.replace(/^\s*#.*$/, '').trim()
+ }).filter(function (line) {
+ return line
+ })
+ data.contributors = ad
+ return cb(null, data)
}
function readme (file, data, cb) {
- if (data.readme) return cb(null, data);
- var dir = path.dirname(file)
- var globOpts = { cwd: dir, nocase: true, mark: true }
- glob("{README,README.*}", globOpts, function (er, files) {
- if (er) return cb(er);
- // don't accept directories.
- files = files.filter(function (file) {
- return !file.match(/\/$/)
- })
- if (!files.length) return cb();
- var fn = preferMarkdownReadme(files)
- var rm = path.resolve(dir, fn)
- readme_(file, data, rm, cb)
- })
-}
-function preferMarkdownReadme(files) {
- var fallback = 0;
- var re = /\.m?a?r?k?d?o?w?n?$/i
- for (var i = 0; i < files.length; i++) {
- if (files[i].match(re))
- return files[i]
- else if (files[i].match(/README$/))
- fallback = i
- }
- // prefer README.md, followed by README; otherwise, return
- // the first filename (which could be README)
- return files[fallback];
-}
-function readme_(file, data, rm, cb) {
- var rmfn = path.basename(rm);
- fs.readFile(rm, "utf8", function (er, rm) {
- // maybe not readable, or something.
- if (er) return cb()
- data.readme = rm
- data.readmeFilename = rmfn
- return cb(er, data)
- })
+ if (data.readme) return cb(null, data)
+ var dir = path.dirname(file)
+ var globOpts = { cwd: dir, nocase: true, mark: true }
+ glob('{README,README.*}', globOpts, function (er, files) {
+ if (er) return cb(er)
+ // don't accept directories.
+ files = files.filter(function (file) {
+ return !file.match(/\/$/)
+ })
+ if (!files.length) return cb()
+ var fn = preferMarkdownReadme(files)
+ var rm = path.resolve(dir, fn)
+ readme_(file, data, rm, cb)
+ })
+}
+
+function preferMarkdownReadme (files) {
+ var fallback = 0
+ var re = /\.m?a?r?k?d?o?w?n?$/i
+ for (var i = 0; i < files.length; i++) {
+ if (files[i].match(re)) {
+ return files[i]
+ } else if (files[i].match(/README$/)) {
+ fallback = i
+ }
+ }
+ // prefer README.md, followed by README; otherwise, return
+ // the first filename (which could be README)
+ return files[fallback]
+}
+
+function readme_ (file, data, rm, cb) {
+ var rmfn = path.basename(rm)
+ fs.readFile(rm, 'utf8', function (er, rm) {
+ // maybe not readable, or something.
+ if (er) return cb()
+ data.readme = rm
+ data.readmeFilename = rmfn
+ return cb(er, data)
+ })
}
function mans (file, data, cb) {
- var m = data.directories && data.directories.man
- if (data.man || !m) return cb(null, data);
- m = path.resolve(path.dirname(file), m)
- glob("**/*.[0-9]", { cwd: m }, function (er, mans) {
- if (er) return cb(er);
- mans_(file, data, mans, cb)
- })
+ var m = data.directories && data.directories.man
+ if (data.man || !m) return cb(null, data)
+ m = path.resolve(path.dirname(file), m)
+ glob('**/*.[0-9]', { cwd: m }, function (er, mans) {
+ if (er) return cb(er)
+ mans_(file, data, mans, cb)
+ })
}
+
function mans_ (file, data, mans, cb) {
- var m = data.directories && data.directories.man
- data.man = mans.map(function (mf) {
- return path.resolve(path.dirname(file), m, mf)
- })
- return cb(null, data)
+ var m = data.directories && data.directories.man
+ data.man = mans.map(function (mf) {
+ return path.resolve(path.dirname(file), m, mf)
+ })
+ return cb(null, data)
}
function bins (file, data, cb) {
- if (Array.isArray(data.bin)) {
- return bins_(file, data, data.bin, cb)
- }
- var m = data.directories && data.directories.bin
- if (data.bin || !m) return cb(null, data);
- m = path.resolve(path.dirname(file), m)
- glob("**", { cwd: m }, function (er, bins) {
- if (er) return cb(er);
- bins_(file, data, bins, cb)
- })
+ if (Array.isArray(data.bin)) return bins_(file, data, data.bin, cb)
+
+ var m = data.directories && data.directories.bin
+ if (data.bin || !m) return cb(null, data)
+
+ m = path.resolve(path.dirname(file), m)
+ glob('**', { cwd: m }, function (er, bins) {
+ if (er) return cb(er)
+ bins_(file, data, bins, cb)
+ })
}
+
function bins_ (file, data, bins, cb) {
- var m = data.directories && data.directories.bin || '.'
- data.bin = bins.reduce(function (acc, mf) {
- if (mf && mf.charAt(0) !== '.') {
- var f = path.basename(mf)
- acc[f] = path.join(m, mf)
- }
- return acc
- }, {})
- return cb(null, data)
+ var m = data.directories && data.directories.bin || '.'
+ data.bin = bins.reduce(function (acc, mf) {
+ if (mf && mf.charAt(0) !== '.') {
+ var f = path.basename(mf)
+ acc[f] = path.join(m, mf)
+ }
+ return acc
+ }, {})
+ return cb(null, data)
}
function githead (file, data, cb) {
- if (data.gitHead) return cb(null, data);
- var dir = path.dirname(file)
- var head = path.resolve(dir, '.git/HEAD')
- fs.readFile(head, 'utf8', function (er, head) {
- if (er) return cb(null, data);
- githead_(file, data, dir, head, cb)
- })
+ if (data.gitHead) return cb(null, data)
+ var dir = path.dirname(file)
+ var head = path.resolve(dir, '.git/HEAD')
+ fs.readFile(head, 'utf8', function (er, head) {
+ if (er) return cb(null, data)
+ githead_(file, data, dir, head, cb)
+ })
}
+
function githead_ (file, data, dir, head, cb) {
- if (!head.match(/^ref: /)) {
- data.gitHead = head.trim()
- return cb(null, data)
- }
- var headFile = head.replace(/^ref: /, '').trim()
- headFile = path.resolve(dir, '.git', headFile)
- fs.readFile(headFile, 'utf8', function (er, head) {
- if (er || !head) return cb(null, data)
- head = head.replace(/^ref: /, '').trim()
- data.gitHead = head
- return cb(null, data)
- })
+ if (!head.match(/^ref: /)) {
+ data.gitHead = head.trim()
+ return cb(null, data)
+ }
+ var headFile = head.replace(/^ref: /, '').trim()
+ headFile = path.resolve(dir, '.git', headFile)
+ fs.readFile(headFile, 'utf8', function (er, head) {
+ if (er || !head) return cb(null, data)
+ head = head.replace(/^ref: /, '').trim()
+ data.gitHead = head
+ return cb(null, data)
+ })
}
/**
@@ -338,73 +306,78 @@ function githead_ (file, data, dir, head, cb) {
* normalize-package-data if it had access to the file path.
*/
function checkBinReferences_ (file, data, warn, cb) {
- if (!(data.bin instanceof Object)) return cb()
-
- var keys = Object.keys(data.bin)
- var keysLeft = keys.length
- if (!keysLeft) return cb()
-
- function handleExists(relName, result) {
- keysLeft--
- if (!result) warn("No bin file found at " + relName)
- if (!keysLeft) cb()
- }
-
- keys.forEach(function (key) {
- var dirName = path.dirname(file)
- var relName = data.bin[key]
- var binPath = path.resolve(dirName, relName)
- fs.exists(binPath, handleExists.bind(null, relName))
- })
+ if (!(data.bin instanceof Object)) return cb()
+
+ var keys = Object.keys(data.bin)
+ var keysLeft = keys.length
+ if (!keysLeft) return cb()
+
+ function handleExists (relName, result) {
+ keysLeft--
+ if (!result) warn('No bin file found at ' + relName)
+ if (!keysLeft) cb()
+ }
+
+ keys.forEach(function (key) {
+ var dirName = path.dirname(file)
+ var relName = data.bin[key]
+ var binPath = path.resolve(dirName, relName)
+ fs.exists(binPath, handleExists.bind(null, relName))
+ })
}
function final (file, data, log, strict, cb) {
- var pId = makePackageId(data)
- function warn(msg) {
- if (typoWarned[pId]) return;
- if (log) log("package.json", pId, msg);
- }
- try {
- normalizeData(data, warn, strict)
- }
- catch (error) {
- return cb(error)
- }
- checkBinReferences_(file, data, warn, function () {
- typoWarned[pId] = true
- readJson.cache.set(file, data)
- cb(null, data)
- })
+ var pId = makePackageId(data)
+
+ function warn (msg) {
+ if (typoWarned[pId]) return
+ if (log) log('package.json', pId, msg)
+ }
+
+ try {
+ normalizeData(data, warn, strict)
+ } catch (error) {
+ return cb(error)
+ }
+
+ checkBinReferences_(file, data, warn, function () {
+ typoWarned[pId] = true
+ cb(null, data)
+ })
}
function makePackageId (data) {
- var name = cleanString(data.name)
- var ver = cleanString(data.version)
- return name + "@" + ver
+ var name = cleanString(data.name)
+ var ver = cleanString(data.version)
+ return name + '@' + ver
}
-function cleanString(str) {
- return (!str || typeof(str) !== "string") ? "" : str.trim()
+
+function cleanString (str) {
+ return (!str || typeof (str) !== 'string') ? '' : str.trim()
}
// /**package { "name": "foo", "version": "1.2.3", ... } **/
function parseIndex (data) {
- data = data.split(/^\/\*\*package(?:\s|$)/m)
- if (data.length < 2) return null
- data = data[1]
- data = data.split(/\*\*\/$/m)
- if (data.length < 2) return null
- data = data[0]
- data = data.replace(/^\s*\*/mg, "")
- try {
- return jsonparse.parse(data)
- } catch (er) {
- return null
- }
+ data = data.split(/^\/\*\*package(?:\s|$)/m)
+
+ if (data.length < 2) return null
+ data = data[1]
+ data = data.split(/\*\*\/$/m)
+
+ if (data.length < 2) return null
+ data = data[0]
+ data = data.replace(/^\s*\*/mg, '')
+
+ try {
+ return safeJSON.parse(data)
+ } catch (er) {
+ return null
+ }
}
function parseError (ex, file) {
- var e = new Error("Failed to parse json\n"+ex.message)
- e.code = "EJSONPARSE"
- e.file = file
- return e
+ var e = new Error('Failed to parse json\n' + ex.message)
+ e.code = 'EJSONPARSE'
+ e.file = file
+ return e
}
diff --git a/deps/npm/node_modules/read-package-json/test/basic.js b/deps/npm/node_modules/read-package-json/test/basic.js
index 8590f23c07..5996c8e4ee 100644
--- a/deps/npm/node_modules/read-package-json/test/basic.js
+++ b/deps/npm/node_modules/read-package-json/test/basic.js
@@ -1,45 +1,46 @@
-// vim: set softtabstop=16 shiftwidth=16:
-var tap = require("tap")
-var readJson = require("../")
-var path = require("path")
-var fs = require("fs")
-var readme = fs.readFileSync(path.resolve(__dirname, "../README.md"), "utf8")
-var package = require("../package.json")
+var fs = require('fs')
+var path = require('path')
+
+var tap = require('tap')
+
+var readJson = require('../')
+
+var readme = fs.readFileSync(path.resolve(__dirname, '../README.md'), 'utf8')
+var pkg = require('../package.json')
var isGit
try {
- fs.readFileSync(path.resolve(__dirname, '../.git/HEAD'));
- isGit = true
+ fs.readFileSync(path.resolve(__dirname, '../.git/HEAD'))
+ isGit = true
} catch (e) {
- isGit = false
+ isGit = false
}
-console.error("basic test")
-tap.test("basic test", function (t) {
- var p = path.resolve(__dirname, "../package.json")
- readJson(p, function (er, data) {
- if (er) throw er;
- basic_(t, data)
- })
+tap.test('basic test', function (t) {
+ var p = path.resolve(__dirname, '../package.json')
+ readJson(p, function (er, data) {
+ if (er) throw er
+ basic_(t, data)
+ })
})
+
function basic_ (t, data) {
- t.ok(data)
- t.equal(data.version, package.version)
- t.equal(data._id, data.name + "@" + data.version)
- t.equal(data.name, package.name)
- t.type(data.author, "object")
- t.equal(data.readme, readme)
- t.deepEqual(data.scripts, package.scripts)
- t.equal(data.main, package.main)
- t.equal(data.readmeFilename, 'README.md')
-
- if (isGit) t.similar(data.gitHead, /^[a-f0-9]{40}$/);
-
- // optional deps are folded in.
- t.deepEqual(data.optionalDependencies,
- package.optionalDependencies)
- t.has(data.dependencies, package.optionalDependencies)
- t.has(data.dependencies, package.dependencies)
-
- t.deepEqual(data.devDependencies, package.devDependencies)
- t.end()
+ t.ok(data)
+ t.equal(data.version, pkg.version)
+ t.equal(data._id, data.name + '@' + data.version)
+ t.equal(data.name, pkg.name)
+ t.type(data.author, 'object')
+ t.equal(data.readme, readme)
+ t.deepEqual(data.scripts, pkg.scripts)
+ t.equal(data.main, pkg.main)
+ t.equal(data.readmeFilename, 'README.md')
+
+ if (isGit) t.similar(data.gitHead, /^[a-f0-9]{40}$/)
+
+ // optional deps are folded in.
+ t.deepEqual(data.optionalDependencies, pkg.optionalDependencies)
+ t.has(data.dependencies, pkg.optionalDependencies)
+ t.has(data.dependencies, pkg.dependencies)
+
+ t.deepEqual(data.devDependencies, pkg.devDependencies)
+ t.end()
}
diff --git a/deps/npm/node_modules/read-package-json/test/bin.js b/deps/npm/node_modules/read-package-json/test/bin.js
index 2ed4ec5ca5..3e0e0e9be6 100644
--- a/deps/npm/node_modules/read-package-json/test/bin.js
+++ b/deps/npm/node_modules/read-package-json/test/bin.js
@@ -1,43 +1,43 @@
-// vim: set softtabstop=16 shiftwidth=16:
-var tap = require("tap")
-var readJson = require("../")
-var path = require("path")
-var fs = require("fs")
+var path = require('path')
+
+var tap = require('tap')
+
+var readJson = require('../')
var createWarningCollector = function () {
- var warn = function (msg) {
- warn.warnings.push(arguments)
- }
- warn.warnings = []
- return warn
+ var warn = function (msg) {
+ warn.warnings.push(arguments)
+ }
+ warn.warnings = []
+ return warn
}
-tap.test("Bin test", function (t) {
- var p = path.resolve(__dirname, "fixtures/bin.json")
- var warn = createWarningCollector()
- readJson(p, warn, function (er, data) {
- t.equals(warn.warnings.length, 0)
- t.deepEqual(data.bin, {"bin-test": "./bin/echo"})
- t.end()
- })
+tap.test('Bin test', function (t) {
+ var p = path.resolve(__dirname, 'fixtures/bin.json')
+ var warn = createWarningCollector()
+ readJson(p, warn, function (er, data) {
+ t.equals(warn.warnings.length, 0)
+ t.deepEqual(data.bin, {'bin-test': './bin/echo'})
+ t.end()
+ })
})
-tap.test("Bad bin test", function (t) {
- var p = path.resolve(__dirname, "fixtures/badbin.json")
- var warn = createWarningCollector()
- readJson(p, warn, function (er, data) {
- t.equals(warn.warnings.length, 1)
- t.equals(warn.warnings[0][2], "No bin file found at ./bin/typo")
- t.end()
- })
+tap.test('Bad bin test', function (t) {
+ var p = path.resolve(__dirname, 'fixtures/badbin.json')
+ var warn = createWarningCollector()
+ readJson(p, warn, function (er, data) {
+ t.equals(warn.warnings.length, 1)
+ t.equals(warn.warnings[0][2], 'No bin file found at ./bin/typo')
+ t.end()
+ })
})
-tap.test("Empty bin test", function (t) {
- var p = path.resolve(__dirname, "fixtures/emptybin.json")
- var warn = createWarningCollector()
- readJson(p, warn, function (er, data) {
- t.equals(warn.warnings.length, 0)
- t.same(data.bin, {}, "no mapping to bin because object was empty")
- t.end()
- })
+tap.test('Empty bin test', function (t) {
+ var p = path.resolve(__dirname, 'fixtures/emptybin.json')
+ var warn = createWarningCollector()
+ readJson(p, warn, function (er, data) {
+ t.equals(warn.warnings.length, 0)
+ t.same(data.bin, {}, 'no mapping to bin because object was empty')
+ t.end()
+ })
})
diff --git a/deps/npm/node_modules/read-package-json/test/bom.js b/deps/npm/node_modules/read-package-json/test/bom.js
index 33c4f4a1a9..372a4f4abb 100644
--- a/deps/npm/node_modules/read-package-json/test/bom.js
+++ b/deps/npm/node_modules/read-package-json/test/bom.js
@@ -1,19 +1,16 @@
-// vim: set softtabstop=16 shiftwidth=16:
-var tap = require("tap")
-var readJson = require("../")
-var path = require("path")
-var fs = require("fs")
+var tap = require('tap')
+var readJson = require('../')
+var path = require('path')
-console.error("BOM test")
-tap.test("BOM test", function (t) {
- var p = path.resolve(__dirname, "fixtures/bom.json")
- readJson(p, function (er, data) {
- if (er) throw er;
- p = path.resolve(__dirname, "fixtures/nobom.json")
- readJson(p, function (er, data2) {
- if (er) throw er;
- t.deepEqual(data, data2)
- t.end()
- })
- })
+tap.test('BOM test', function (t) {
+ var p = path.resolve(__dirname, 'fixtures/bom.json')
+ readJson(p, function (er, data) {
+ if (er) throw er
+ p = path.resolve(__dirname, 'fixtures/nobom.json')
+ readJson(p, function (er, data2) {
+ if (er) throw er
+ t.deepEqual(data, data2)
+ t.end()
+ })
+ })
})
diff --git a/deps/npm/node_modules/read-package-json/test/helpful.js b/deps/npm/node_modules/read-package-json/test/helpful.js
index 579b558d0c..f5b1a8b130 100644
--- a/deps/npm/node_modules/read-package-json/test/helpful.js
+++ b/deps/npm/node_modules/read-package-json/test/helpful.js
@@ -1,17 +1,12 @@
-// vim: set softtabstop=16 shiftwidth=16:
-var tap = require("tap")
-var readJson = require("../")
-var path = require("path")
-var fs = require("fs")
-var p = path.resolve(__dirname, "fixtures/erroneous.json")
+var tap = require('tap')
+var readJson = require('../')
+var path = require('path')
+var p = path.resolve(__dirname, 'fixtures/erroneous.json')
-var expect = {}
-
-console.error("readme test")
-tap.test("readme test", function (t) {
- readJson(p, function (er, data) {
- t.ok(er instanceof Error)
- t.ok(er.message.match(/Unexpected token '\\''/))
- t.end()
- })
+tap.test('erroneous package data', function (t) {
+ readJson(p, function (er, data) {
+ t.ok(er instanceof Error)
+ t.ok(er.message.match(/Unexpected token '\\''/))
+ t.end()
+ })
})
diff --git a/deps/npm/node_modules/read-package-json/test/non-json.js b/deps/npm/node_modules/read-package-json/test/non-json.js
index e8d989b6f6..85186320a8 100644
--- a/deps/npm/node_modules/read-package-json/test/non-json.js
+++ b/deps/npm/node_modules/read-package-json/test/non-json.js
@@ -1,52 +1,57 @@
-// vim: set softtabstop=16 shiftwidth=16:
+var path = require('path')
+
var tap = require('tap')
+
var readJson = require('../')
-var path = require('path')
-var fs = require('fs')
-var expect =
-{ name: 'read-package-json',
+
+var expect = {
+ name: 'read-package-json',
version: '0.1.1',
- author:
- { name: 'Isaac Z. Schlueter',
- email: 'i@izs.me',
- url: 'http://blog.izs.me/' },
+ author: {
+ name: 'Isaac Z. Schlueter',
+ email: 'i@izs.me',
+ url: 'http://blog.izs.me/'
+ },
description: 'The thing npm uses to read package.json files with semantics and defaults and validation',
- repository:
- { type: 'git',
- url: 'git://github.com/isaacs/read-package-json.git' },
- bugs: {url: "https://github.com/isaacs/read-package-json/issues" },
+ repository: {
+ type: 'git',
+ url: 'git://github.com/isaacs/read-package-json.git'
+ },
+ bugs: {
+ url: 'https://github.com/isaacs/read-package-json/issues'
+ },
main: 'read-json.js',
scripts: { test: 'tap test/*.js' },
- dependencies:
- { glob: '~3.1.9',
- 'lru-cache': '~1.1.0',
- semver: '~1.0.14',
- slide: '~1.1.3',
- npmlog: '0',
- 'graceful-fs': '~1.1.8' },
+ dependencies: {
+ glob: '~3.1.9',
+ 'lru-cache': '~1.1.0',
+ semver: '~1.0.14',
+ slide: '~1.1.3',
+ npmlog: '0',
+ 'graceful-fs': '~1.1.8'
+ },
devDependencies: { tap: '~0.2.5' },
- homepage: "https://github.com/isaacs/read-package-json",
- optionalDependencies: { npmlog: '0', 'graceful-fs': '~1.1.8' },
+ homepage: 'https://github.com/isaacs/read-package-json#readme',
+ optionalDependencies: { npmlog: '0', 'graceful-fs': '~1.1.8' },
_id: 'read-package-json@0.1.1',
- readme: 'ERROR: No README data found!' }
+ readme: 'ERROR: No README data found!'
+}
tap.test('from css', function (t) {
- var c = path.join(__dirname, 'fixtures', 'not-json.css')
- readJson(c, function (er, d) {
- t.same(d, expect)
- t.end()
- })
+ var c = path.join(__dirname, 'fixtures', 'not-json.css')
+ readJson(c, function (er, d) {
+ t.same(d, expect)
+ t.end()
+ })
})
tap.test('from js', function (t) {
- readJson(__filename, function (er, d) {
- t.same(d, expect)
- t.end()
- })
+ readJson(__filename, function (er, d) {
+ t.same(d, expect)
+ t.end()
+ })
})
-
-
/**package
{
"name": "read-package-json",
@@ -76,4 +81,3 @@ tap.test('from js', function (t) {
}
}
**/
-
diff --git a/deps/npm/node_modules/read-package-json/test/readmes.js b/deps/npm/node_modules/read-package-json/test/readmes.js
index 1c1cee1b3c..c74cafb925 100644
--- a/deps/npm/node_modules/read-package-json/test/readmes.js
+++ b/deps/npm/node_modules/read-package-json/test/readmes.js
@@ -1,29 +1,28 @@
-// vim: set softtabstop=16 shiftwidth=16:
-var tap = require("tap")
-var readJson = require("../")
-var path = require("path")
-var fs = require("fs")
-var p = path.resolve(__dirname, "fixtures/readmes/package.json")
+var path = require('path')
+
+var tap = require('tap')
+var p = path.resolve(__dirname, 'fixtures/readmes/package.json')
+
+var readJson = require('../')
var expect = {}
var expect = {
- "name" : "readmes",
- "version" : "99.999.999999999",
- "readme" : "*markdown*\n",
- "readmeFilename" : "README.md",
- "description" : "*markdown*",
- "_id" : "readmes@99.999.999999999"
+ 'name': 'readmes',
+ 'version': '99.999.999999999',
+ 'readme': '*markdown*\n',
+ 'readmeFilename': 'README.md',
+ 'description': '*markdown*',
+ '_id': 'readmes@99.999.999999999'
}
-console.error("readme test")
-tap.test("readme test", function (t) {
- readJson(p, function (er, data) {
- if (er) throw er;
- test(t, data)
- })
+tap.test('readme test', function (t) {
+ readJson(p, function (er, data) {
+ t.ifError(er, 'read README without error')
+ test(t, data)
+ })
})
-function test(t, data) {
- t.deepEqual(data, expect)
- t.end()
+function test (t, data) {
+ t.deepEqual(data, expect)
+ t.end()
}
diff --git a/deps/npm/node_modules/realize-package-specifier/package.json b/deps/npm/node_modules/realize-package-specifier/package.json
index 0353dd96aa..6716b19145 100644
--- a/deps/npm/node_modules/realize-package-specifier/package.json
+++ b/deps/npm/node_modules/realize-package-specifier/package.json
@@ -1,6 +1,6 @@
{
"name": "realize-package-specifier",
- "version": "2.2.0",
+ "version": "3.0.0",
"description": "Like npm-package-arg, but more so, producing full file paths and differentiating local tar and directory sources.",
"main": "index.js",
"scripts": {
@@ -19,36 +19,19 @@
"homepage": "https://github.com/npm/realize-package-specifier",
"dependencies": {
"dezalgo": "^1.0.1",
- "npm-package-arg": "^3.1.0"
+ "npm-package-arg": "^4.0.0"
},
"devDependencies": {
"require-inject": "^1.1.0",
"tap": "^0.4.12"
},
- "gitHead": "8810720d191647f06a505fc5da8d0634a21526b8",
+ "readme": "realize-package-specifier\n-------------------------\n\nParse a package specifier, peeking at the disk to differentiate between\nlocal tarballs, directories and named modules. This implements the logic\nused by `npm install` and `npm cache` to determine where to get packages\nfrom.\n\n```javascript\nvar realizePackageSpecifier = require(\"realize-package-specifier\")\nrealizePackageSpecifier(\"foo.tar.gz\", \".\", function (err, package) {\n …\n})\n```\n\n## Using\n\n* realizePackageSpecifier(*spec*, [*where*,] *callback*)\n\nParses *spec* using `npm-package-arg` and then uses stat to check to see if\nit refers to a local tarball or package directory. Stats are done relative\nto *where*. If it does then the local module is loaded. If it doesn't then\ntarget is left as a remote package specifier. Package directories are\nrecognized by the presence of a package.json in them.\n\n*spec* -- a package specifier, like: `foo@1.2`, or `foo@user/foo`, or\n`http://x.com/foo.tgz`, or `git+https://github.com/user/foo`\n\n*where* (optional, default: .) -- The directory in which we should look for\nlocal tarballs or package directories.\n\n*callback* function(*err*, *result*) -- Called once we've determined what\nkind of specifier this is. The *result* object will be very like the one\nreturned by `npm-package-arg` except with three differences: 1) There's a\nnew type of `directory`. 2) The `local` type only refers to tarballs. 2)\nFor all `local` and `directory` type results spec will contain the full path of\nthe local package.\n\n## Result Object\n\nThe full definition of the result object is:\n\n* `name` - If known, the `name` field expected in the resulting pkg.\n* `type` - One of the following strings:\n * `git` - A git repo\n * `hosted` - A hosted project, from github, bitbucket or gitlab. Originally\n either a full url pointing at one of these services or a shorthand like\n `user/project` or `github:user/project` for github or `bitbucket:user/project`\n for bitbucket.\n * `tag` - A tagged version, like `\"foo@latest\"`\n * `version` - A specific version number, like `\"foo@1.2.3\"`\n * `range` - A version range, like `\"foo@2.x\"`\n * `local` - A local file path\n * `directory` - A local package directory\n * `remote` - An http url (presumably to a tgz)\n* `spec` - The \"thing\". URL, the range, git repo, etc.\n* `hosted` - If type=hosted this will be an object with the following keys:\n * `type` - github, bitbucket or gitlab\n * `ssh` - The ssh path for this git repo\n * `sshurl` - The ssh URL for this git repo\n * `https` - The HTTPS URL for this git repo\n * `directUrl` - The URL for the package.json in this git repo\n* `raw` - The original un-modified string that was provided.\n* `rawSpec` - The part after the `name@...`, as it was originally\n provided.\n* `scope` - If a name is something like `@org/module` then the `scope`\n field will be set to `org`. If it doesn't have a scoped name, then\n scope is `null`.\n\n",
+ "readmeFilename": "README.md",
+ "gitHead": "2a465b11a70b288d0fb56312dcb45ba8de45b320",
"bugs": {
"url": "https://github.com/npm/realize-package-specifier/issues"
},
- "_id": "realize-package-specifier@2.2.0",
- "_shasum": "95278b6021a39158f284e15756e827fc2998ed9c",
- "_from": "realize-package-specifier@>=2.2.0 <2.3.0",
- "_npmVersion": "2.4.1",
- "_nodeVersion": "1.0.4",
- "_npmUser": {
- "name": "iarna",
- "email": "me@re-becca.org"
- },
- "maintainers": [
- {
- "name": "iarna",
- "email": "me@re-becca.org"
- }
- ],
- "dist": {
- "shasum": "95278b6021a39158f284e15756e827fc2998ed9c",
- "tarball": "http://registry.npmjs.org/realize-package-specifier/-/realize-package-specifier-2.2.0.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/realize-package-specifier/-/realize-package-specifier-2.2.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_id": "realize-package-specifier@3.0.0",
+ "_shasum": "38224d63f546d4972f0a68cb6e91f6cf73ac67fa",
+ "_from": "realize-package-specifier@>=3.0.0 <4.0.0"
}
diff --git a/deps/npm/node_modules/realize-package-specifier/test/npa-bitbucket.js b/deps/npm/node_modules/realize-package-specifier/test/npa-bitbucket.js
index 7cc95d5589..4381e6c401 100644
--- a/deps/npm/node_modules/realize-package-specifier/test/npa-bitbucket.js
+++ b/deps/npm/node_modules/realize-package-specifier/test/npa-bitbucket.js
@@ -10,7 +10,7 @@ test("npa-bitbucket", function (t) {
name: null,
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user/foo-js.git",
+ spec: "bitbucket:user/foo-js",
raw: "bitbucket:user/foo-js"
},
@@ -18,7 +18,7 @@ test("npa-bitbucket", function (t) {
name: null,
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user/foo-js.git#bar/baz",
+ spec: "bitbucket:user/foo-js#bar/baz",
raw: "bitbucket:user/foo-js#bar/baz"
},
@@ -26,7 +26,7 @@ test("npa-bitbucket", function (t) {
name: null,
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user..blerg--/..foo-js.git# . . . . . some . tags / / /",
+ spec: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /",
raw: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /"
},
@@ -34,7 +34,7 @@ test("npa-bitbucket", function (t) {
name: null,
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user/foo-js.git#bar/baz/bin",
+ spec: "bitbucket:user/foo-js#bar/baz/bin",
raw: "bitbucket:user/foo-js#bar/baz/bin"
},
@@ -42,7 +42,7 @@ test("npa-bitbucket", function (t) {
name: "foo",
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user/foo-js.git",
+ spec: "bitbucket:user/foo-js",
raw: "foo@bitbucket:user/foo-js"
},
@@ -58,7 +58,7 @@ test("npa-bitbucket", function (t) {
name: null,
type: "hosted",
hosted: { type: "bitbucket" },
- spec: "git+ssh://git@bitbucket.org/user/foo.git",
+ spec: "https://bitbucket.org/user/foo.git",
raw: "https://bitbucket.org/user/foo.git"
},
diff --git a/deps/npm/node_modules/realize-package-specifier/test/npa-github.js b/deps/npm/node_modules/realize-package-specifier/test/npa-github.js
index 1e6b72e1e3..b0c405e7de 100644
--- a/deps/npm/node_modules/realize-package-specifier/test/npa-github.js
+++ b/deps/npm/node_modules/realize-package-specifier/test/npa-github.js
@@ -10,7 +10,7 @@ test("npa-github", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo-js.git",
+ spec: "github:user/foo-js",
raw: "user/foo-js"
},
@@ -18,7 +18,7 @@ test("npa-github", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo-js.git#bar/baz",
+ spec: "github:user/foo-js#bar/baz",
raw: "user/foo-js#bar/baz"
},
@@ -26,7 +26,7 @@ test("npa-github", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user..blerg--/..foo-js.git# . . . . . some . tags / / /",
+ spec: "github:user..blerg--/..foo-js# . . . . . some . tags / / /",
raw: "user..blerg--/..foo-js# . . . . . some . tags / / /"
},
@@ -34,7 +34,7 @@ test("npa-github", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo-js.git#bar/baz/bin",
+ spec: "github:user/foo-js#bar/baz/bin",
raw: "user/foo-js#bar/baz/bin"
},
@@ -42,7 +42,7 @@ test("npa-github", function (t) {
name: "foo",
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo-js.git",
+ spec: "github:user/foo-js",
raw: "foo@user/foo-js"
},
@@ -50,7 +50,7 @@ test("npa-github", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo-js.git",
+ spec: "github:user/foo-js",
raw: "github:user/foo-js"
},
@@ -66,7 +66,7 @@ test("npa-github", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo.git",
+ spec: "git://github.com/user/foo.git",
raw: "git://github.com/user/foo"
},
@@ -74,7 +74,7 @@ test("npa-github", function (t) {
name: null,
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/user/foo.git",
+ spec: "https://github.com/user/foo.git",
raw: "https://github.com/user/foo.git"
},
@@ -92,7 +92,7 @@ test("npa-github", function (t) {
name: "foo",
type: "hosted",
hosted: { type: "github" },
- spec: "git+ssh://git@github.com/bar/foo.git",
+ spec: "github:bar/foo",
raw: "foo@bar/foo"
}
}
diff --git a/deps/npm/node_modules/realize-package-specifier/test/npa-gitlab.js b/deps/npm/node_modules/realize-package-specifier/test/npa-gitlab.js
index b6efb29a39..cb1a625bc2 100644
--- a/deps/npm/node_modules/realize-package-specifier/test/npa-gitlab.js
+++ b/deps/npm/node_modules/realize-package-specifier/test/npa-gitlab.js
@@ -10,7 +10,7 @@ test("npa-gitlab", function (t) {
name: null,
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user/foo-js.git",
+ spec: "gitlab:user/foo-js",
raw: "gitlab:user/foo-js"
},
@@ -18,7 +18,7 @@ test("npa-gitlab", function (t) {
name: null,
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user/foo-js.git#bar/baz",
+ spec: "gitlab:user/foo-js#bar/baz",
raw: "gitlab:user/foo-js#bar/baz"
},
@@ -26,7 +26,7 @@ test("npa-gitlab", function (t) {
name: null,
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user..blerg--/..foo-js.git# . . . . . some . tags / / /",
+ spec: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /",
raw: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /"
},
@@ -34,7 +34,7 @@ test("npa-gitlab", function (t) {
name: null,
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user/foo-js.git#bar/baz/bin",
+ spec: "gitlab:user/foo-js#bar/baz/bin",
raw: "gitlab:user/foo-js#bar/baz/bin"
},
@@ -42,7 +42,7 @@ test("npa-gitlab", function (t) {
name: "foo",
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user/foo-js.git",
+ spec: "gitlab:user/foo-js",
raw: "foo@gitlab:user/foo-js"
},
@@ -58,7 +58,7 @@ test("npa-gitlab", function (t) {
name: null,
type: "hosted",
hosted: { type: "gitlab" },
- spec: "git+ssh://git@gitlab.com/user/foo.git",
+ spec: "https://gitlab.com/user/foo.git",
raw: "https://gitlab.com/user/foo.git"
},
diff --git a/deps/npm/node_modules/request/.travis.yml b/deps/npm/node_modules/request/.travis.yml
index 0988483f3b..bd0f638eb7 100644
--- a/deps/npm/node_modules/request/.travis.yml
+++ b/deps/npm/node_modules/request/.travis.yml
@@ -1,8 +1,8 @@
language: node_js
node_js:
- - "0.8"
+ - "io.js"
+ - "0.12"
- "0.10"
-before_install: npm install -g npm@~1.4.6
after_script: ./node_modules/.bin/istanbul cover ./node_modules/tape/bin/tape tests/test-*.js --report lcovonly && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js --verbose
webhooks:
urls: https://webhooks.gitter.im/e/237280ed4796c19cc626
diff --git a/deps/npm/node_modules/request/CHANGELOG.md b/deps/npm/node_modules/request/CHANGELOG.md
index cfaf173848..1c01d0875c 100644
--- a/deps/npm/node_modules/request/CHANGELOG.md
+++ b/deps/npm/node_modules/request/CHANGELOG.md
@@ -1,5 +1,42 @@
## Change Log
+### v2.55.0 (2015/04/05)
+- [#1520](https://github.com/request/request/pull/1520) Refactor defaults (@simov)
+- [#1525](https://github.com/request/request/pull/1525) Delete request headers with undefined value. (@froatsnook)
+- [#1521](https://github.com/request/request/pull/1521) Add promise tests (@simov)
+- [#1518](https://github.com/request/request/pull/1518) Fix defaults (@simov)
+- [#1515](https://github.com/request/request/pull/1515) Allow static invoking of convenience methods (@simov)
+- [#1505](https://github.com/request/request/pull/1505) Fix multipart boundary extraction regexp (@simov)
+- [#1510](https://github.com/request/request/pull/1510) Fix basic auth form data (@simov)
+
+### v2.54.0 (2015/03/24)
+- [#1501](https://github.com/request/request/pull/1501) HTTP Archive 1.2 support (@ahmadnassri)
+- [#1486](https://github.com/request/request/pull/1486) Add a test for the forever agent (@akshayp)
+- [#1500](https://github.com/request/request/pull/1500) Adding handling for no auth method and null bearer (@philberg)
+- [#1498](https://github.com/request/request/pull/1498) Add table of contents in readme (@simov)
+- [#1477](https://github.com/request/request/pull/1477) Add support for qs options via qsOptions key (@simov)
+- [#1496](https://github.com/request/request/pull/1496) Parameters encoded to base 64 should be decoded as UTF-8, not ASCII. (@albanm)
+- [#1494](https://github.com/request/request/pull/1494) Update eslint (@froatsnook)
+- [#1474](https://github.com/request/request/pull/1474) Require Colon in Basic Auth (@erykwalder)
+- [#1481](https://github.com/request/request/pull/1481) Fix baseUrl and redirections. (@burningtree)
+- [#1469](https://github.com/request/request/pull/1469) Feature/base url (@froatsnook)
+- [#1459](https://github.com/request/request/pull/1459) Add option to time request/response cycle (including rollup of redirects) (@aaron-em)
+- [#1468](https://github.com/request/request/pull/1468) Re-enable io.js/node 0.12 build (@simov, @BBB)
+- [#1442](https://github.com/request/request/pull/1442) Fixed the issue with strictSSL tests on 0.12 & io.js by explicitly setting a cipher that matches the cert. (@BBB, @nicolasmccurdy, @simov, @0x4139)
+- [#1460](https://github.com/request/request/pull/1460) localAddress or proxy config is lost when redirecting (@simov, @0x4139)
+- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nicolasmccurdy)
+- [#1426](https://github.com/request/request/pull/1426) Fixing tests to pass on io.js and node 0.12 (only test-https.js stiff failing) (@mikeal)
+- [#1446](https://github.com/request/request/pull/1446) Missing HTTP referer header with redirects Fixes #1038 (@simov, @guimonz)
+- [#1428](https://github.com/request/request/pull/1428) Deprecate Node v0.8.x (@nylen)
+- [#1436](https://github.com/request/request/pull/1436) Add ability to set a requester without setting default options (@tikotzky)
+- [#1435](https://github.com/request/request/pull/1435) dry up verb methods (@sethpollack)
+- [#1423](https://github.com/request/request/pull/1423) Allow fully qualified multipart content-type header (@simov)
+- [#1430](https://github.com/request/request/pull/1430) Fix recursive requester (@tikotzky)
+- [#1429](https://github.com/request/request/pull/1429) Throw error when making HEAD request with a body (@tikotzky)
+- [#1419](https://github.com/request/request/pull/1419) Add note that the project is broken in 0.12.x (@nylen)
+- [#1413](https://github.com/request/request/pull/1413) Fix basic auth (@simov)
+- [#1397](https://github.com/request/request/pull/1397) Improve pipe-from-file tests (@nylen)
+
### v2.53.0 (2015/02/02)
- [#1396](https://github.com/request/request/pull/1396) Do not rfc3986 escape JSON bodies (@nylen, @simov)
- [#1392](https://github.com/request/request/pull/1392) Improve `timeout` option description (@watson)
diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md
index 8b668f99f7..2abc9e1714 100644
--- a/deps/npm/node_modules/request/README.md
+++ b/deps/npm/node_modules/request/README.md
@@ -1,15 +1,18 @@
-# Request — Simplified HTTP client
+
+# Request - Simplified HTTP client
+
[![npm package](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/)
-[![Build status](https://img.shields.io/travis/request/request.svg?style=flat)](https://travis-ci.org/request/request)
-[![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat)](https://coveralls.io/r/request/request)
-[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat)](https://gitter.im/request/request?utm_source=badge)
+[![Build status](https://img.shields.io/travis/request/request.svg?style=flat-square)](https://travis-ci.org/request/request)
+[![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat-square)](https://coveralls.io/r/request/request)
+[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat-square)](https://gitter.im/request/request?utm_source=badge)
+
## Super simple to use
Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.
-```javascript
+```js
var request = require('request');
request('http://www.google.com', function (error, response, body) {
if (!error && response.statusCode == 200) {
@@ -18,29 +21,52 @@ request('http://www.google.com', function (error, response, body) {
})
```
+
+## Table of contents
+
+- [Streaming](#streaming)
+- [Forms](#forms)
+- [HTTP Authentication](#http-authentication)
+- [Custom HTTP Headers](#custom-http-headers)
+- [OAuth Signing](#oauth-signing)
+- [Proxies](#proxies)
+- [Unix Domain Sockets](#unix-domain-sockets)
+- [TLS/SSL Protocol](#tlsssl-protocol)
+- [Support for HAR 1.2](#support-for-har-12)
+- [**All Available Options**](#requestoptions-callback)
+
+Request also offers [convenience methods](#convenience-methods) like
+`request.defaults` and `request.post`, and there are
+lots of [usage examples](#examples) and several
+[debugging techniques](#debugging).
+
+
+---
+
+
## Streaming
You can stream any response to a file stream.
-```javascript
+```js
request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))
```
You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).
-```javascript
+```js
fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))
```
Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.
-```javascript
+```js
request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))
```
Request emits a "response" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](http://nodejs.org/api/http.html#http_http_incomingmessage).
-```javascript
+```js
request
.get('http://google.com/img.png')
.on('response', function(response) {
@@ -52,7 +78,7 @@ request
To easily handle errors when streaming requests, listen to the `error` event before piping:
-```javascript
+```js
request
.get('http://mysite.com/doodle.png')
.on('error', function(err) {
@@ -63,7 +89,7 @@ request
Now let’s get fancy.
-```javascript
+```js
http.createServer(function (req, resp) {
if (req.url === '/doodle.png') {
if (req.method === 'PUT') {
@@ -77,7 +103,7 @@ http.createServer(function (req, resp) {
You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:
-```javascript
+```js
http.createServer(function (req, resp) {
if (req.url === '/doodle.png') {
var x = request('http://mysite.com/doodle.png')
@@ -89,13 +115,13 @@ http.createServer(function (req, resp) {
And since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)
-```javascript
+```js
req.pipe(request('http://mysite.com/doodle.png')).pipe(resp)
```
Also, none of this new functionality conflicts with requests previous features, it just expands them.
-```javascript
+```js
var r = request.defaults({'proxy':'http://localproxy.com'})
http.createServer(function (req, resp) {
@@ -107,139 +133,22 @@ http.createServer(function (req, resp) {
You can still use intermediate proxies, the requests will still follow HTTP forwards, etc.
-## Proxies
-
-If you specify a `proxy` option, then the request (and any subsequent
-redirects) will be sent via a connection to the proxy server.
-
-If your endpoint is an `https` url, and you are using a proxy, then
-request will send a `CONNECT` request to the proxy server *first*, and
-then use the supplied connection to connect to the endpoint.
-
-That is, first it will make a request like:
-
-```
-HTTP/1.1 CONNECT endpoint-server.com:80
-Host: proxy-server.com
-User-Agent: whatever user agent you specify
-```
-
-and then the proxy server make a TCP connection to `endpoint-server`
-on port `80`, and return a response that looks like:
-
-```
-HTTP/1.1 200 OK
-```
-
-At this point, the connection is left open, and the client is
-communicating directly with the `endpoint-server.com` machine.
-
-See [the wikipedia page on HTTP Tunneling](http://en.wikipedia.org/wiki/HTTP_tunnel)
-for more information.
-
-By default, when proxying `http` traffic, request will simply make a
-standard proxied `http` request. This is done by making the `url`
-section of the initial line of the request a fully qualified url to
-the endpoint.
-
-For example, it will make a single request that looks like:
-
-```
-HTTP/1.1 GET http://endpoint-server.com/some-url
-Host: proxy-server.com
-Other-Headers: all go here
-
-request body or whatever
-```
-
-Because a pure "http over http" tunnel offers no additional security
-or other features, it is generally simpler to go with a
-straightforward HTTP proxy in this case. However, if you would like
-to force a tunneling proxy, you may set the `tunnel` option to `true`.
-
-You can also make a standard proxied `http` request by explicitly setting
-`tunnel : false`, but **note that this will allow the proxy to see the traffic
-to/from the destination server**.
-
-If you are using a tunneling proxy, you may set the
-`proxyHeaderWhiteList` to share certain headers with the proxy.
-
-You can also set the `proxyHeaderExclusiveList` to share certain
-headers only with the proxy and not with destination host.
-
-By default, this set is:
-
-```
-accept
-accept-charset
-accept-encoding
-accept-language
-accept-ranges
-cache-control
-content-encoding
-content-language
-content-length
-content-location
-content-md5
-content-range
-content-type
-connection
-date
-expect
-max-forwards
-pragma
-proxy-authorization
-referer
-te
-transfer-encoding
-user-agent
-via
-```
-
-Note that, when using a tunneling proxy, the `proxy-authorization`
-header and any headers from custom `proxyHeaderExclusiveList` are
-*never* sent to the endpoint server, but only to the proxy server.
-
-### Controlling proxy behaviour using environment variables
-
-The following environment variables are respected by `request`:
-
- * `HTTP_PROXY` / `http_proxy`
- * `HTTPS_PROXY` / `https_proxy`
- * `NO_PROXY` / `no_proxy`
+[back to top](#table-of-contents)
-When `HTTP_PROXY` / `http_proxy` are set, they will be used to proxy non-SSL requests that do not have an explicit `proxy` configuration option present. Similarly, `HTTPS_PROXY` / `https_proxy` will be respected for SSL requests that do not have an explicit `proxy` configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the `proxy` configuration option. Furthermore, the `proxy` configuration option can be explicitly set to false / null to opt out of proxying altogether for that request.
-`request` is also aware of the `NO_PROXY`/`no_proxy` environment variables. These variables provide a granular way to opt out of proxying, on a per-host basis. It should contain a comma separated list of hosts to opt out of proxying. It is also possible to opt of proxying when a particular destination port is used. Finally, the variable may be set to `*` to opt out of the implicit proxy configuration of the other environment variables.
-
-Here's some examples of valid `no_proxy` values:
-
- * `google.com` - don't proxy HTTP/HTTPS requests to Google.
- * `google.com:443` - don't proxy HTTPS requests to Google, but *do* proxy HTTP requests to Google.
- * `google.com:443, yahoo.com:80` - don't proxy HTTPS requests to Google, and don't proxy HTTP requests to Yahoo!
- * `*` - ignore `https_proxy`/`http_proxy` environment variables altogether.
-
-## UNIX Socket
-
-`request` supports making requests to [UNIX Domain Sockets](http://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme:
-
-```javascript
-/* Pattern */ 'http://unix:SOCKET:PATH'
-/* Example */ request.get('http://unix:/absolute/path/to/unix.socket:/request/path')
-```
-
-Note: The `SOCKET` path is assumed to be absolute to the root of the host file system.
+---
## Forms
`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.
+
#### application/x-www-form-urlencoded (URL-Encoded Forms)
URL-encoded forms are simple.
-```javascript
+```js
request.post('http://service.com/upload', {form:{key:'value'}})
// or
request.post('http://service.com/upload').form({key:'value'})
@@ -247,12 +156,13 @@ request.post('http://service.com/upload').form({key:'value'})
request.post({url:'http://service.com/upload', form: {key:'value'}}, function(err,httpResponse,body){ /* ... */ })
```
+
#### multipart/form-data (Multipart Form Uploads)
For `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option.
-```javascript
+```js
var formData = {
// Pass a simple key-value pair
my_field: 'my_value',
@@ -286,7 +196,7 @@ request.post({url:'http://service.com/upload', formData: formData}, function opt
For advanced cases, you can access the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.)
-```javascript
+```js
// NOTE: Advanced use-case, for normal use see 'formData' usage above
var r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) { // ...
@@ -297,11 +207,12 @@ form.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {fi
```
See the [form-data README](https://github.com/felixge/node-form-data) for more information & examples.
+
#### multipart/related
Some variations in different HTTP implementations require a newline/CRLF before, after, or both before and after the boundary of a `multipart/related` request (using the multipart option). This has been observed in the .NET WebAPI version 4.0. You can turn on a boundary preambleCRLF or postamble by passing them as `true` to your request options.
-```javascript
+```js
request({
method: 'PUT',
preambleCRLF: true,
@@ -335,10 +246,15 @@ Some variations in different HTTP implementations require a newline/CRLF before,
})
```
+[back to top](#table-of-contents)
+
+
+---
+
## HTTP Authentication
-```javascript
+```js
request.get('http://some.server.com/').auth('username', 'password', false);
// or
request.get('http://some.server.com/', {
@@ -378,7 +294,7 @@ Note that you can also specify basic authentication using the URL itself, as
detailed in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt). Simply pass the
`user:password` before the host with an `@` sign:
-```javascript
+```js
var username = 'username',
password = 'password',
url = 'http://' + username + ':' + password + '@some.server.com';
@@ -398,13 +314,53 @@ available. The value may be either a `String` or a `Function` returning a
used in conjuction with `defaults` to allow a single function to supply the
last known token at the time of sending a request, or to compute one on the fly.
+[back to top](#table-of-contents)
+
+
+---
+
+
+## Custom HTTP Headers
+
+HTTP Headers, such as `User-Agent`, can be set in the `options` object.
+In the example below, we call the github API to find out the number
+of stars and forks for the request repository. This requires a
+custom `User-Agent` header as well as https.
+
+```js
+var request = require('request');
+
+var options = {
+ url: 'https://api.github.com/repos/request/request',
+ headers: {
+ 'User-Agent': 'request'
+ }
+};
+
+function callback(error, response, body) {
+ if (!error && response.statusCode == 200) {
+ var info = JSON.parse(body);
+ console.log(info.stargazers_count + " Stars");
+ console.log(info.forks_count + " Forks");
+ }
+}
+
+request(options, callback);
+```
+
+[back to top](#table-of-contents)
+
+
+---
+
+
## OAuth Signing
[OAuth version 1.0](https://tools.ietf.org/html/rfc5849) is supported. The
default signing algorithm is
[HMAC-SHA1](https://tools.ietf.org/html/rfc5849#section-3.4.2):
-```javascript
+```js
// OAuth1.0 - 3-legged server side flow (Twitter example)
// step 1
var qs = require('querystring')
@@ -478,33 +434,147 @@ section of the oauth1 spec:
options object.
* `transport_method` defaults to `'header'`
-## Custom HTTP Headers
+[back to top](#table-of-contents)
-HTTP Headers, such as `User-Agent`, can be set in the `options` object.
-In the example below, we call the github API to find out the number
-of stars and forks for the request repository. This requires a
-custom `User-Agent` header as well as https.
-```javascript
-var request = require('request');
+---
-var options = {
- url: 'https://api.github.com/repos/request/request',
- headers: {
- 'User-Agent': 'request'
- }
-};
-function callback(error, response, body) {
- if (!error && response.statusCode == 200) {
- var info = JSON.parse(body);
- console.log(info.stargazers_count + " Stars");
- console.log(info.forks_count + " Forks");
- }
-}
+## Proxies
+
+If you specify a `proxy` option, then the request (and any subsequent
+redirects) will be sent via a connection to the proxy server.
+
+If your endpoint is an `https` url, and you are using a proxy, then
+request will send a `CONNECT` request to the proxy server *first*, and
+then use the supplied connection to connect to the endpoint.
+
+That is, first it will make a request like:
-request(options, callback);
```
+HTTP/1.1 CONNECT endpoint-server.com:80
+Host: proxy-server.com
+User-Agent: whatever user agent you specify
+```
+
+and then the proxy server make a TCP connection to `endpoint-server`
+on port `80`, and return a response that looks like:
+
+```
+HTTP/1.1 200 OK
+```
+
+At this point, the connection is left open, and the client is
+communicating directly with the `endpoint-server.com` machine.
+
+See [the wikipedia page on HTTP Tunneling](http://en.wikipedia.org/wiki/HTTP_tunnel)
+for more information.
+
+By default, when proxying `http` traffic, request will simply make a
+standard proxied `http` request. This is done by making the `url`
+section of the initial line of the request a fully qualified url to
+the endpoint.
+
+For example, it will make a single request that looks like:
+
+```
+HTTP/1.1 GET http://endpoint-server.com/some-url
+Host: proxy-server.com
+Other-Headers: all go here
+
+request body or whatever
+```
+
+Because a pure "http over http" tunnel offers no additional security
+or other features, it is generally simpler to go with a
+straightforward HTTP proxy in this case. However, if you would like
+to force a tunneling proxy, you may set the `tunnel` option to `true`.
+
+You can also make a standard proxied `http` request by explicitly setting
+`tunnel : false`, but **note that this will allow the proxy to see the traffic
+to/from the destination server**.
+
+If you are using a tunneling proxy, you may set the
+`proxyHeaderWhiteList` to share certain headers with the proxy.
+
+You can also set the `proxyHeaderExclusiveList` to share certain
+headers only with the proxy and not with destination host.
+
+By default, this set is:
+
+```
+accept
+accept-charset
+accept-encoding
+accept-language
+accept-ranges
+cache-control
+content-encoding
+content-language
+content-length
+content-location
+content-md5
+content-range
+content-type
+connection
+date
+expect
+max-forwards
+pragma
+proxy-authorization
+referer
+te
+transfer-encoding
+user-agent
+via
+```
+
+Note that, when using a tunneling proxy, the `proxy-authorization`
+header and any headers from custom `proxyHeaderExclusiveList` are
+*never* sent to the endpoint server, but only to the proxy server.
+
+
+### Controlling proxy behaviour using environment variables
+
+The following environment variables are respected by `request`:
+
+ * `HTTP_PROXY` / `http_proxy`
+ * `HTTPS_PROXY` / `https_proxy`
+ * `NO_PROXY` / `no_proxy`
+
+When `HTTP_PROXY` / `http_proxy` are set, they will be used to proxy non-SSL requests that do not have an explicit `proxy` configuration option present. Similarly, `HTTPS_PROXY` / `https_proxy` will be respected for SSL requests that do not have an explicit `proxy` configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the `proxy` configuration option. Furthermore, the `proxy` configuration option can be explicitly set to false / null to opt out of proxying altogether for that request.
+
+`request` is also aware of the `NO_PROXY`/`no_proxy` environment variables. These variables provide a granular way to opt out of proxying, on a per-host basis. It should contain a comma separated list of hosts to opt out of proxying. It is also possible to opt of proxying when a particular destination port is used. Finally, the variable may be set to `*` to opt out of the implicit proxy configuration of the other environment variables.
+
+Here's some examples of valid `no_proxy` values:
+
+ * `google.com` - don't proxy HTTP/HTTPS requests to Google.
+ * `google.com:443` - don't proxy HTTPS requests to Google, but *do* proxy HTTP requests to Google.
+ * `google.com:443, yahoo.com:80` - don't proxy HTTPS requests to Google, and don't proxy HTTP requests to Yahoo!
+ * `*` - ignore `https_proxy`/`http_proxy` environment variables altogether.
+
+[back to top](#table-of-contents)
+
+
+---
+
+
+## UNIX Domain Sockets
+
+`request` supports making requests to [UNIX Domain Sockets](http://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme:
+
+```js
+/* Pattern */ 'http://unix:SOCKET:PATH'
+/* Example */ request.get('http://unix:/absolute/path/to/unix.socket:/request/path')
+```
+
+Note: The `SOCKET` path is assumed to be absolute to the root of the host file system.
+
+[back to top](#table-of-contents)
+
+
+---
+
## TLS/SSL Protocol
@@ -513,7 +583,7 @@ set in the `agentOptions` property of the `options` object.
In the example below, we call an API requires client side SSL certificate
(in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol:
-```javascript
+```js
var fs = require('fs')
, path = require('path')
, certFile = path.resolve(__dirname, 'ssl/client.crt')
@@ -537,7 +607,7 @@ request.get(options);
It is able to force using SSLv3 only by specifying `secureProtocol`:
-```javascript
+```js
request.get({
url: 'https://api.some-server.com/',
agentOptions: {
@@ -550,7 +620,7 @@ It is possible to accept other certificates than those signed by generally allow
This can be useful, for example, when using self-signed certificates.
To allow a different certificate, you can specify the signing CA by adding the contents of the CA's certificate file to the `agentOptions`:
-```javascript
+```js
request.get({
url: 'https://api.some-server.com/',
agentOptions: {
@@ -559,73 +629,155 @@ request.get({
});
```
+[back to top](#table-of-contents)
+
+
+---
+
+## Support for HAR 1.2
+
+The `options.har` property will override the values: `url`, `method`, `qs`, `headers`, `form`, `formData`, `body`, `json`, as well as construct multipart data and read files from disk when `request.postData.params[].fileName` is present without a matching `value`.
+
+a validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching.
+
+```js
+ var request = require('request')
+ request({
+ // will be ignored
+ method: 'GET'
+ uri: 'http://www.google.com',
+
+ // HTTP Archive Request Object
+ har: {
+ url: 'http://www.mockbin.com/har'
+ method: 'POST',
+ headers: [
+ {
+ name: 'content-type',
+ value: 'application/x-www-form-urlencoded'
+ }
+ ],
+ postData: {
+ mimeType: 'application/x-www-form-urlencoded',
+ params: [
+ {
+ name: 'foo',
+ value: 'bar'
+ },
+ {
+ name: 'hello',
+ value: 'world'
+ }
+ ]
+ }
+ }
+ })
+
+ // a POST request will be sent to http://www.mockbin.com
+ // with body an application/x-www-form-urlencoded body:
+ // foo=bar&hello=world
+```
+
+[back to top](#table-of-contents)
+
+
+---
+
## request(options, callback)
The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.
-* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`
-* `qs` - object containing querystring values to be appended to the `uri`
-* `useQuerystring` - If true, use `querystring` to stringify and parse
+- `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`
+- `baseUrl` - fully qualified uri string used as the base url. Most useful with `request.defaults`, for example when you want to do many requests to the same domain. If `baseUrl` is `https://example.com/api/`, then requesting `/end/point?test=true` will fetch `https://example.com/api/end/point?test=true`. When `baseUrl` is given, `uri` must also be a string.
+- `method` - http method (default: `"GET"`)
+- `headers` - http headers (default: `{}`)
+
+---
+
+- `qs` - object containing querystring values to be appended to the `uri`
+- `qsParseOptions` - object containing options to pass to the [qs.parse](https://github.com/hapijs/qs#parsing-objects) method or [querystring.parse](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) method
+- `qsStringifyOptions` - object containing options to pass to the [qs.stringify](https://github.com/hapijs/qs#stringifying) method or to the [querystring.stringify](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) method. For example, to change the way arrays are converted to query strings pass the `arrayFormat` option with one of `indices|brackets|repeat`
+- `useQuerystring` - If true, use `querystring` to stringify and parse
querystrings, otherwise use `qs` (default: `false`). Set this option to
`true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the
default `foo[0]=bar&foo[1]=baz`.
-* `method` - http method (default: `"GET"`)
-* `headers` - http headers (default: `{}`)
-* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`, unless `json` is `true`. If `json` is `true`, then `body` must be a JSON-serializable object.
-* `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above.
-* `formData` - Data to pass for a `multipart/form-data` request. See
+
+---
+
+- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`, unless `json` is `true`. If `json` is `true`, then `body` must be a JSON-serializable object.
+- `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above.
+- `formData` - Data to pass for a `multipart/form-data` request. See
[Forms](#forms) section above.
-* `multipart` - array of objects which contain their own headers and `body`
+- `multipart` - array of objects which contain their own headers and `body`
attributes. Sends a `multipart/related` request. See [Forms](#forms) section
above.
- * Alternatively you can pass in an object `{chunked: false, data: []}` where
+ - Alternatively you can pass in an object `{chunked: false, data: []}` where
`chunked` is used to specify whether the request is sent in
[chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding)
In non-chunked requests, data items with body streams are not allowed.
-* `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
-* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.
-* `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body.
-* `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request.
-* `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request.
-* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise.
-* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)
-* `maxRedirects` - the maximum number of redirects to follow (default: `10`)
-* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default).
-* `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as [your options allow for it](request.js#L747)). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool.
- * A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`).
- * Note that if you are sending multiple requests in a loop and creating
+- `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request.
+- `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request.
+- `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.
+- `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body.
+
+---
+
+- `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
+- `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.
+- `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).
+- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)
+- `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.
+
+---
+
+- `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise.
+- `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)
+- `maxRedirects` - the maximum number of redirects to follow (default: `10`)
+
+---
+
+- `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default).
+- `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below.
+- `jar` - If `true` and `tough-cookie` is installed, remember cookies for future use (or define your custom cookie jar; see examples section)
+
+---
+
+- `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as [your options allow for it](request.js#L747)). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool.
+ - A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`).
+ - Note that if you are sending multiple requests in a loop and creating
multiple new `pool` objects, `maxSockets` will not work as intended. To
work around this, either use [`request.defaults`](#requestdefaultsoptions)
with your pool options or create the pool object with the `maxSockets`
property outside of the loop.
-* `timeout` - Integer containing the number of milliseconds to wait for a
+- `timeout` - Integer containing the number of milliseconds to wait for a
request to respond before aborting the request. Note that if the underlying
TCP connection cannot be established, the OS-wide TCP connection timeout will
overrule the `timeout` option ([the default in Linux is around 20 seconds](http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout)).
-* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)
-* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.
-* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).
-* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.
-* `agentOptions` - Object containing user agent options. See documentation above. **Note:** [see tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback).
-
-* `jar` - If `true` and `tough-cookie` is installed, remember cookies for future use (or define your custom cookie jar; see examples section)
-* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)
-* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.
-* `localAddress` - Local interface to bind for network connections.
-* `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below.
-* `tunnel` - controls the behavior of
+- `localAddress` - Local interface to bind for network connections.
+- `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)
+- `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.
+- `agentOptions` - Object containing user agent options. See documentation above. **Note:** [see tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback).
+- `tunnel` - controls the behavior of
[HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling)
as follows:
- * `undefined` (default) - `true` if the destination is `https` or a previous
+ - `undefined` (default) - `true` if the destination is `https` or a previous
request in the redirect chain used a tunneling proxy, `false` otherwise
- * `true` - always tunnel to the destination by making a `CONNECT` request to
+ - `true` - always tunnel to the destination by making a `CONNECT` request to
the proxy
- * `false` - request the destination as a `GET` request.
-* `proxyHeaderWhiteList` - A whitelist of headers to send to a
+ - `false` - request the destination as a `GET` request.
+- `proxyHeaderWhiteList` - A whitelist of headers to send to a
tunneling proxy.
-* `proxyHeaderExclusiveList` - A whitelist of headers to send
+- `proxyHeaderExclusiveList` - A whitelist of headers to send
exclusively to a tunneling proxy and not to destination.
+- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`).
+
+---
+
+- `time` - If `true`, the request-response cycle (including all redirects) is timed at millisecond resolution, and the result provided on the response's `elapsedTime` property.
+---
+
+- `har` - A [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)*
The callback argument gets 3 arguments:
@@ -633,10 +785,16 @@ The callback argument gets 3 arguments:
2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object
3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)
+[back to top](#table-of-contents)
+
+
+---
+
## Convenience methods
There are also shorthand methods for different HTTP METHODs and some other conveniences.
+
### request.defaults(options)
This method **returns a wrapper** around the normal request API that defaults
@@ -649,7 +807,7 @@ instead, it **returns a wrapper** that has your default settings applied to it.
`request.defaults` to add/override defaults that were previously defaulted.
For example:
-```javascript
+```js
//requests using baseRequest() will set the 'x-token' header
var baseRequest = request.defaults({
headers: {x-token: 'my-token'}
@@ -666,7 +824,7 @@ var specialRequest = baseRequest.defaults({
Same as `request()`, but defaults to `method: "PUT"`.
-```javascript
+```js
request.put(url)
```
@@ -674,7 +832,7 @@ request.put(url)
Same as `request()`, but defaults to `method: "PATCH"`.
-```javascript
+```js
request.patch(url)
```
@@ -682,7 +840,7 @@ request.patch(url)
Same as `request()`, but defaults to `method: "POST"`.
-```javascript
+```js
request.post(url)
```
@@ -690,7 +848,7 @@ request.post(url)
Same as `request()`, but defaults to `method: "HEAD"`.
-```javascript
+```js
request.head(url)
```
@@ -698,7 +856,7 @@ request.head(url)
Same as `request()`, but defaults to `method: "DELETE"`.
-```javascript
+```js
request.del(url)
```
@@ -706,28 +864,52 @@ request.del(url)
Same as `request()` (for uniformity).
-```javascript
+```js
request.get(url)
```
### request.cookie
Function that creates a new cookie.
-```javascript
+```js
request.cookie('key1=value1')
```
### request.jar()
Function that creates a new cookie jar.
-```javascript
+```js
request.jar()
```
+[back to top](#table-of-contents)
+
+
+---
+
+
+## Debugging
+
+There are at least three ways to debug the operation of `request`:
+
+1. Launch the node process like `NODE_DEBUG=request node script.js`
+ (`lib,request,otherlib` works too).
+
+2. Set `require('request').debug = true` at any time (this does the same thing
+ as #1).
+
+3. Use the [request-debug module](https://github.com/nylen/request-debug) to
+ view request and response headers and bodies.
+
+[back to top](#table-of-contents)
+
+
+---
+
## Examples:
-```javascript
+```js
var request = require('request')
, rand = Math.floor(Math.random()*100000000).toString()
;
@@ -758,7 +940,7 @@ that the body data passed through `request` is automatically decompressed
while the response object is unmodified and will contain compressed data if
the server sent a compressed response.
-```javascript
+```js
var request = require('request')
request(
{ method: 'GET'
@@ -785,7 +967,7 @@ the server sent a compressed response.
Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`) and install `tough-cookie`.
-```javascript
+```js
var request = request.defaults({jar: true})
request('http://www.google.com', function () {
request('http://images.google.com')
@@ -794,7 +976,7 @@ request('http://www.google.com', function () {
To use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)
-```javascript
+```js
var j = request.jar()
var request = request.defaults({jar:j})
request('http://www.google.com', function () {
@@ -804,7 +986,7 @@ request('http://www.google.com', function () {
OR
-```javascript
+```js
var j = request.jar();
var cookie = request.cookie('key1=value1');
var url = 'http://www.google.com';
@@ -819,7 +1001,7 @@ To use a custom cookie store (such as a
which supports saving to and restoring from JSON files), pass it as a parameter
to `request.jar()`:
-```javascript
+```js
var FileCookieStore = require('tough-cookie-filestore');
// NOTE - currently the 'cookies.json' file must already exist!
var j = request.jar(new FileCookieStore('cookies.json'));
@@ -837,7 +1019,7 @@ for details.
To inspect your cookie jar after a request:
-```javascript
+```js
var j = request.jar()
request({url: 'http://www.google.com', jar: j}, function () {
var cookie_string = j.getCookieString(uri); // "key1=value1; key2=value2; ..."
@@ -846,15 +1028,4 @@ request({url: 'http://www.google.com', jar: j}, function () {
})
```
-## Debugging
-
-There are at least three ways to debug the operation of `request`:
-
-1. Launch the node process like `NODE_DEBUG=request node script.js`
- (`lib,request,otherlib` works too).
-
-2. Set `require('request').debug = true` at any time (this does the same thing
- as #1).
-
-3. Use the [request-debug module](https://github.com/nylen/request-debug) to
- view request and response headers and bodies.
+[back to top](#table-of-contents)
diff --git a/deps/npm/node_modules/request/index.js b/deps/npm/node_modules/request/index.js
index 3581b83b46..3474840801 100755
--- a/deps/npm/node_modules/request/index.js
+++ b/deps/npm/node_modules/request/index.js
@@ -19,84 +19,53 @@ var extend = require('util')._extend
, helpers = require('./lib/helpers')
var isFunction = helpers.isFunction
- , constructObject = helpers.constructObject
- , filterForCallback = helpers.filterForCallback
- , constructOptionsFrom = helpers.constructOptionsFrom
, paramsHaveRequestBody = helpers.paramsHaveRequestBody
// organize params for patch, post, put, head, del
function initParams(uri, options, callback) {
- callback = filterForCallback([options, callback])
- options = constructOptionsFrom(uri, options)
-
- return constructObject()
- .extend({callback: callback})
- .extend({options: options})
- .extend({uri: options.uri})
- .done()
-}
-
-function request (uri, options, callback) {
- if (typeof uri === 'undefined') {
- throw new Error('undefined is not a valid uri or options object.')
+ if (typeof options === 'function') {
+ callback = options
}
- var params = initParams(uri, options, callback)
- options = params.options
- options.callback = params.callback
- options.uri = params.uri
+ var params = {}
+ if (typeof options === 'object') {
+ params = extend({}, options)
+ params = extend(params, {uri: uri})
+ } else if (typeof uri === 'string') {
+ params = extend({}, {uri: uri})
+ } else {
+ params = extend({}, uri)
+ }
- return new request.Request(options)
+ params.callback = callback
+ return params
}
-function requester(params) {
- if(typeof params.options._requester === 'function') {
- return params.options._requester
+function request (uri, options, callback) {
+ if (typeof uri === 'undefined') {
+ throw new Error('undefined is not a valid uri or options object.')
}
- return request
-}
-request.get = function (uri, options, callback) {
var params = initParams(uri, options, callback)
- params.options.method = 'GET'
- return requester(params)(params.uri || null, params.options, params.callback)
-}
-request.head = function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.options.method = 'HEAD'
-
- if (paramsHaveRequestBody(params)) {
+ if (params.method === 'HEAD' && paramsHaveRequestBody(params)) {
throw new Error('HTTP HEAD requests MUST NOT include a request body.')
}
- return requester(params)(params.uri || null, params.options, params.callback)
-}
-
-request.post = function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.options.method = 'POST'
- return requester(params)(params.uri || null, params.options, params.callback)
+ return new request.Request(params)
}
-request.put = function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.options.method = 'PUT'
- return requester(params)(params.uri || null, params.options, params.callback)
-}
+var verbs = ['get', 'head', 'post', 'put', 'patch', 'del']
-request.patch = function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.options.method = 'PATCH'
- return requester(params)(params.uri || null, params.options, params.callback)
-}
-
-request.del = function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.options.method = 'DELETE'
- return requester(params)(params.uri || null, params.options, params.callback)
-}
+verbs.forEach(function(verb) {
+ var method = verb === 'del' ? 'DELETE' : verb.toUpperCase()
+ request[verb] = function (uri, options, callback) {
+ var params = initParams(uri, options, callback)
+ params.method = method
+ return request(params, params.callback)
+ }
+})
request.jar = function (store) {
return cookies.jar(store)
@@ -106,66 +75,65 @@ request.cookie = function (str) {
return cookies.parse(str)
}
-request.defaults = function (options, requester) {
- var self = this
- var wrap = function (method) {
- var headerlessOptions = function (options) {
- options = extend({}, options)
- delete options.headers
- return options
+function wrapRequestMethod (method, options, requester) {
+
+ return function (uri, opts, callback) {
+ var params = initParams(uri, opts, callback)
+
+ var headerlessOptions = extend({}, options)
+ delete headerlessOptions.headers
+ params = extend(headerlessOptions, params)
+
+ if (options.headers) {
+ var headers = extend({}, options.headers)
+ params.headers = extend(headers, params.headers)
}
- var getHeaders = function (params, options) {
- return constructObject()
- .extend(options.headers)
- .extend(params.options.headers)
- .done()
+ if (typeof method === 'string') {
+ params.method = (method === 'del' ? 'DELETE' : method.toUpperCase())
+ method = request[method]
}
- return function (uri, opts, callback) {
- var params = initParams(uri, opts, callback)
- params.options = extend(headerlessOptions(options), params.options)
+ if (isFunction(requester)) {
+ method = requester
+ }
- if (options.headers) {
- params.options.headers = getHeaders(params, options)
- }
+ return method(params, params.callback)
+ }
+}
- if (isFunction(requester)) {
- if (method === self) {
- method = requester
- } else {
- params.options._requester = requester
- }
- }
+request.defaults = function (options, requester) {
+ var self = this
- return method(params.options, params.callback)
- }
+ if (typeof options === 'function') {
+ requester = options
+ options = {}
}
- var defaults = wrap(self)
- defaults.get = wrap(self.get)
- defaults.patch = wrap(self.patch)
- defaults.post = wrap(self.post)
- defaults.put = wrap(self.put)
- defaults.head = wrap(self.head)
- defaults.del = wrap(self.del)
- defaults.cookie = wrap(self.cookie)
+ var defaults = wrapRequestMethod(self, options, requester)
+
+ var verbs = ['get', 'head', 'post', 'put', 'patch', 'del']
+ verbs.forEach(function(verb) {
+ defaults[verb] = wrapRequestMethod(verb, options, requester)
+ })
+
+ defaults.cookie = wrapRequestMethod(self.cookie, options, requester)
defaults.jar = self.jar
defaults.defaults = self.defaults
return defaults
}
request.forever = function (agentOptions, optionsArg) {
- var options = constructObject()
+ var options = {}
if (optionsArg) {
- options.extend(optionsArg)
+ options = extend({}, optionsArg)
}
if (agentOptions) {
options.agentOptions = agentOptions
}
- options.extend({forever: true})
- return request.defaults(options.done())
+ options.forever = true
+ return request.defaults(options)
}
// Exports
diff --git a/deps/npm/node_modules/request/lib/auth.js b/deps/npm/node_modules/request/lib/auth.js
index abe6274536..13c3ac8f3c 100644
--- a/deps/npm/node_modules/request/lib/auth.js
+++ b/deps/npm/node_modules/request/lib/auth.js
@@ -8,8 +8,9 @@ var md5 = helpers.md5
, toBase64 = helpers.toBase64
-function Auth () {
+function Auth (request) {
// define all public properties here
+ this.request = request
this.hasAuth = false
this.sentAuth = false
this.bearerToken = null
@@ -25,7 +26,7 @@ Auth.prototype.basic = function (user, pass, sendImmediately) {
self.user = user
self.pass = pass
self.hasAuth = true
- var header = typeof pass !== 'undefined' ? user + ':' + pass : user
+ var header = user + ':' + (pass || '')
if (sendImmediately || typeof sendImmediately === 'undefined') {
var authHeader = 'Basic ' + toBase64(header)
self.sentAuth = true
@@ -41,7 +42,7 @@ Auth.prototype.bearer = function (bearer, sendImmediately) {
if (typeof bearer === 'function') {
bearer = bearer()
}
- var authHeader = 'Bearer ' + bearer
+ var authHeader = 'Bearer ' + (bearer || '')
self.sentAuth = true
return authHeader
}
@@ -108,11 +109,30 @@ Auth.prototype.digest = function (method, path, authHeader) {
return authHeader
}
-Auth.prototype.response = function (method, path, headers) {
+Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) {
var self = this
+ , request = self.request
+
+ var authHeader
+ if (bearer === undefined && user === undefined) {
+ throw new Error('no auth mechanism defined')
+ } else if (bearer !== undefined) {
+ authHeader = self.bearer(bearer, sendImmediately)
+ } else {
+ authHeader = self.basic(user, pass, sendImmediately)
+ }
+ if (authHeader) {
+ request.setHeader('authorization', authHeader)
+ }
+}
+
+Auth.prototype.onResponse = function (response) {
+ var self = this
+ , request = self.request
+
if (!self.hasAuth || self.sentAuth) { return null }
- var c = caseless(headers)
+ var c = caseless(response.headers)
var authHeader = c.get('www-authenticate')
var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase()
@@ -126,7 +146,7 @@ Auth.prototype.response = function (method, path, headers) {
return self.bearer(self.bearerToken, true)
case 'digest':
- return self.digest(method, path, authHeader)
+ return self.digest(request.method, request.path, authHeader)
}
}
diff --git a/deps/npm/node_modules/request/lib/getProxyFromURI.js b/deps/npm/node_modules/request/lib/getProxyFromURI.js
index 0e54767f54..c2013a6e12 100644
--- a/deps/npm/node_modules/request/lib/getProxyFromURI.js
+++ b/deps/npm/node_modules/request/lib/getProxyFromURI.js
@@ -49,7 +49,7 @@ function getProxyFromURI(uri) {
if (noProxy === '*') {
return null
}
-
+
// if the noProxy is not empty and the uri is found return null
if (noProxy !== '' && uriInNoProxy(uri, noProxy)) {
@@ -62,7 +62,7 @@ function getProxyFromURI(uri) {
return process.env.HTTP_PROXY ||
process.env.http_proxy || null
}
-
+
if (uri.protocol === 'https:') {
return process.env.HTTPS_PROXY ||
process.env.https_proxy ||
diff --git a/deps/npm/node_modules/request/lib/har.js b/deps/npm/node_modules/request/lib/har.js
new file mode 100644
index 0000000000..83453a3274
--- /dev/null
+++ b/deps/npm/node_modules/request/lib/har.js
@@ -0,0 +1,205 @@
+'use strict'
+
+var fs = require('fs')
+var qs = require('querystring')
+var validate = require('har-validator')
+var util = require('util')
+
+function Har (request) {
+ this.request = request
+}
+
+Har.prototype.reducer = function (obj, pair) {
+ // new property ?
+ if (obj[pair.name] === undefined) {
+ obj[pair.name] = pair.value
+ return obj
+ }
+
+ // existing? convert to array
+ var arr = [
+ obj[pair.name],
+ pair.value
+ ]
+
+ obj[pair.name] = arr
+
+ return obj
+}
+
+Har.prototype.prep = function (data) {
+ // construct utility properties
+ data.queryObj = {}
+ data.headersObj = {}
+ data.postData.jsonObj = false
+ data.postData.paramsObj = false
+
+ // construct query objects
+ if (data.queryString && data.queryString.length) {
+ data.queryObj = data.queryString.reduce(this.reducer, {})
+ }
+
+ // construct headers objects
+ if (data.headers && data.headers.length) {
+ // loweCase header keys
+ data.headersObj = data.headers.reduceRight(function (headers, header) {
+ headers[header.name] = header.value
+ return headers
+ }, {})
+ }
+
+ // construct Cookie header
+ if (data.cookies && data.cookies.length) {
+ var cookies = data.cookies.map(function (cookie) {
+ return cookie.name + '=' + cookie.value
+ })
+
+ if (cookies.length) {
+ data.headersObj.cookie = cookies.join('; ')
+ }
+ }
+
+ // prep body
+ switch (data.postData.mimeType) {
+ case 'multipart/mixed':
+ case 'multipart/related':
+ case 'multipart/form-data':
+ case 'multipart/alternative':
+ // reset values
+ data.postData.mimeType = 'multipart/form-data'
+ break
+
+ case 'application/x-www-form-urlencoded':
+ if (!data.postData.params) {
+ data.postData.text = ''
+ } else {
+ data.postData.paramsObj = data.postData.params.reduce(this.reducer, {})
+
+ // always overwrite
+ data.postData.text = qs.stringify(data.postData.paramsObj)
+ }
+ break
+
+ case 'text/json':
+ case 'text/x-json':
+ case 'application/json':
+ case 'application/x-json':
+ data.postData.mimeType = 'application/json'
+
+ if (data.postData.text) {
+ try {
+ data.postData.jsonObj = JSON.parse(data.postData.text)
+ } catch (e) {
+ this.request.debug(e)
+
+ // force back to text/plain
+ data.postData.mimeType = 'text/plain'
+ }
+ }
+ break
+ }
+
+ return data
+}
+
+Har.prototype.options = function (options) {
+ // skip if no har property defined
+ if (!options.har) {
+ return options
+ }
+
+ var har = util._extend({}, options.har)
+
+ // only process the first entry
+ if (har.log && har.log.entries) {
+ har = har.log.entries[0]
+ }
+
+ // add optional properties to make validation successful
+ har.url = har.url || options.url || options.uri || options.baseUrl || '/'
+ har.httpVersion = har.httpVersion || 'HTTP/1.1'
+ har.queryString = har.queryString || []
+ har.headers = har.headers || []
+ har.cookies = har.cookies || []
+ har.postData = har.postData || {}
+ har.postData.mimeType = har.postData.mimeType || 'application/octet-stream'
+
+ har.bodySize = 0
+ har.headersSize = 0
+ har.postData.size = 0
+
+ if (!validate.request(har)) {
+ return options
+ }
+
+ // clean up and get some utility properties
+ var req = this.prep(har)
+
+ // construct new options
+ if (req.url) {
+ options.url = req.url
+ }
+
+ if (req.method) {
+ options.method = req.method
+ }
+
+ if (Object.keys(req.queryObj).length) {
+ options.qs = req.queryObj
+ }
+
+ if (Object.keys(req.headersObj).length) {
+ options.headers = req.headersObj
+ }
+
+ switch (req.postData.mimeType) {
+ case 'application/x-www-form-urlencoded':
+ options.form = req.postData.paramsObj
+ break
+
+ case 'application/json':
+ if (req.postData.jsonObj) {
+ options.body = req.postData.jsonObj
+ options.json = true
+ }
+ break
+
+ case 'multipart/form-data':
+ options.formData = {}
+
+ req.postData.params.forEach(function (param) {
+ var attachment = {}
+
+ if (!param.fileName && !param.fileName && !param.contentType) {
+ options.formData[param.name] = param.value
+ return
+ }
+
+ // attempt to read from disk!
+ if (param.fileName && !param.value) {
+ attachment.value = fs.createReadStream(param.fileName)
+ } else if (param.value) {
+ attachment.value = param.value
+ }
+
+ if (param.fileName) {
+ attachment.options = {
+ filename: param.fileName,
+ contentType: param.contentType ? param.contentType : null
+ }
+ }
+
+ options.formData[param.name] = attachment
+ })
+ break
+
+ default:
+ if (req.postData.text) {
+ options.body = req.postData.text
+ }
+ }
+
+ return options
+}
+
+exports.Har = Har
diff --git a/deps/npm/node_modules/request/lib/helpers.js b/deps/npm/node_modules/request/lib/helpers.js
index fa5712ffbc..8530d4013b 100644
--- a/deps/npm/node_modules/request/lib/helpers.js
+++ b/deps/npm/node_modules/request/lib/helpers.js
@@ -1,57 +1,26 @@
'use strict'
-var extend = require('util')._extend
- , jsonSafeStringify = require('json-stringify-safe')
+var jsonSafeStringify = require('json-stringify-safe')
, crypto = require('crypto')
function deferMethod() {
if(typeof setImmediate === 'undefined') {
return process.nextTick
}
-
- return setImmediate
-}
-
-function constructObject(initialObject) {
- initialObject = initialObject || {}
-
- return {
- extend: function (object) {
- return constructObject(extend(initialObject, object))
- },
- done: function () {
- return initialObject
- }
- }
-}
-function constructOptionsFrom(uri, options) {
- var params = constructObject()
- if (typeof options === 'object') {
- params.extend(options).extend({uri: uri})
- } else if (typeof uri === 'string') {
- params.extend({uri: uri})
- } else {
- params.extend(uri)
- }
- return params.done()
+ return setImmediate
}
function isFunction(value) {
return typeof value === 'function'
}
-function filterForCallback(values) {
- var callbacks = values.filter(isFunction)
- return callbacks[0]
-}
-
function paramsHaveRequestBody(params) {
return (
- params.options.body ||
- params.options.requestBodyStream ||
- (params.options.json && typeof params.options.json !== 'boolean') ||
- params.options.multipart
+ params.body ||
+ params.requestBodyStream ||
+ (params.json && typeof params.json !== 'boolean') ||
+ params.multipart
)
}
@@ -74,13 +43,10 @@ function isReadStream (rs) {
}
function toBase64 (str) {
- return (new Buffer(str || '', 'ascii')).toString('base64')
+ return (new Buffer(str || '', 'utf8')).toString('base64')
}
exports.isFunction = isFunction
-exports.constructObject = constructObject
-exports.constructOptionsFrom = constructOptionsFrom
-exports.filterForCallback = filterForCallback
exports.paramsHaveRequestBody = paramsHaveRequestBody
exports.safeStringify = safeStringify
exports.md5 = md5
diff --git a/deps/npm/node_modules/request/lib/multipart.js b/deps/npm/node_modules/request/lib/multipart.js
new file mode 100644
index 0000000000..905a54b7f1
--- /dev/null
+++ b/deps/npm/node_modules/request/lib/multipart.js
@@ -0,0 +1,109 @@
+'use strict'
+
+var uuid = require('node-uuid')
+ , CombinedStream = require('combined-stream')
+ , isstream = require('isstream')
+
+
+function Multipart (request) {
+ this.request = request
+ this.boundary = uuid()
+ this.chunked = false
+ this.body = null
+}
+
+Multipart.prototype.isChunked = function (options) {
+ var self = this
+ , chunked = false
+ , parts = options.data || options
+
+ if (!parts.forEach) {
+ throw new Error('Argument error, options.multipart.')
+ }
+
+ if (options.chunked !== undefined) {
+ chunked = options.chunked
+ }
+
+ if (self.request.getHeader('transfer-encoding') === 'chunked') {
+ chunked = true
+ }
+
+ if (!chunked) {
+ parts.forEach(function (part) {
+ if(typeof part.body === 'undefined') {
+ throw new Error('Body attribute missing in multipart.')
+ }
+ if (isstream(part.body)) {
+ chunked = true
+ }
+ })
+ }
+
+ return chunked
+}
+
+Multipart.prototype.setHeaders = function (chunked) {
+ var self = this
+
+ if (chunked && !self.request.hasHeader('transfer-encoding')) {
+ self.request.setHeader('transfer-encoding', 'chunked')
+ }
+
+ var header = self.request.getHeader('content-type')
+
+ if (!header || header.indexOf('multipart') === -1) {
+ self.request.setHeader('content-type', 'multipart/related; boundary=' + self.boundary)
+ } else {
+ if (header.indexOf('boundary') !== -1) {
+ self.boundary = header.replace(/.*boundary=([^\s;]+).*/, '$1')
+ } else {
+ self.request.setHeader('content-type', header + '; boundary=' + self.boundary)
+ }
+ }
+}
+
+Multipart.prototype.build = function (parts, chunked) {
+ var self = this
+ var body = chunked ? new CombinedStream() : []
+
+ function add (part) {
+ return chunked ? body.append(part) : body.push(new Buffer(part))
+ }
+
+ if (self.request.preambleCRLF) {
+ add('\r\n')
+ }
+
+ parts.forEach(function (part) {
+ var preamble = '--' + self.boundary + '\r\n'
+ Object.keys(part).forEach(function (key) {
+ if (key === 'body') { return }
+ preamble += key + ': ' + part[key] + '\r\n'
+ })
+ preamble += '\r\n'
+ add(preamble)
+ add(part.body)
+ add('\r\n')
+ })
+ add('--' + self.boundary + '--')
+
+ if (self.request.postambleCRLF) {
+ add('\r\n')
+ }
+
+ return body
+}
+
+Multipart.prototype.onRequest = function (options) {
+ var self = this
+
+ var chunked = self.isChunked(options)
+ , parts = options.data || options
+
+ self.setHeaders(chunked)
+ self.chunked = chunked
+ self.body = self.build(parts, chunked)
+}
+
+exports.Multipart = Multipart
diff --git a/deps/npm/node_modules/request/lib/oauth.js b/deps/npm/node_modules/request/lib/oauth.js
index 3224601ccf..fc1cac6d5d 100644
--- a/deps/npm/node_modules/request/lib/oauth.js
+++ b/deps/npm/node_modules/request/lib/oauth.js
@@ -1,13 +1,16 @@
'use strict'
-var querystring = require('querystring')
- , qs = require('qs')
+var qs = require('qs')
, caseless = require('caseless')
, uuid = require('node-uuid')
, oauth = require('oauth-sign')
-exports.buildParams = function (_oauth, uri, method, query, form, qsLib) {
+function OAuth (request) {
+ this.request = request
+}
+
+OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) {
var oa = {}
for (var i in _oauth) {
oa['oauth_' + i] = _oauth[i]
@@ -54,7 +57,7 @@ exports.buildParams = function (_oauth, uri, method, query, form, qsLib) {
return oa
}
-exports.concatParams = function (oa, sep, wrap) {
+OAuth.prototype.concatParams = function (oa, sep, wrap) {
wrap = wrap || ''
var params = Object.keys(oa).filter(function (i) {
@@ -71,13 +74,15 @@ exports.concatParams = function (oa, sep, wrap) {
}).join(sep)
}
-exports.oauth = function (args) {
- var uri = args.uri || {}
- , method = args.method || ''
- , headers = caseless(args.headers)
- , body = args.body || ''
- , _oauth = args.oauth || {}
- , qsLib = args.qsLib || qs
+OAuth.prototype.onRequest = function (_oauth) {
+ var self = this
+ , request = self.request
+
+ var uri = request.uri || {}
+ , method = request.method || ''
+ , headers = caseless(request.headers)
+ , body = request.body || ''
+ , qsLib = request.qsLib || qs
var form
, query
@@ -99,23 +104,22 @@ exports.oauth = function (args) {
var oa = this.buildParams(_oauth, uri, method, query, form, qsLib)
- var data
switch (transport) {
case 'header':
- data = 'OAuth ' + this.concatParams(oa, ',', '"')
+ request.setHeader('Authorization', 'OAuth ' + this.concatParams(oa, ',', '"'))
break
case 'query':
- data = (query ? '&' : '?') + this.concatParams(oa, '&')
+ request.path = (query ? '&' : '?') + this.concatParams(oa, '&')
break
case 'body':
- data = (form ? form + '&' : '') + this.concatParams(oa, '&')
+ request.body = (form ? form + '&' : '') + this.concatParams(oa, '&')
break
default:
throw new Error('oauth: transport_method invalid')
}
-
- return {oauth:data, transport:transport}
}
+
+exports.OAuth = OAuth
diff --git a/deps/npm/node_modules/request/lib/redirect.js b/deps/npm/node_modules/request/lib/redirect.js
new file mode 100644
index 0000000000..7dd6c254c7
--- /dev/null
+++ b/deps/npm/node_modules/request/lib/redirect.js
@@ -0,0 +1,154 @@
+'use strict'
+
+var url = require('url')
+var isUrl = /^https?:/
+
+function Redirect (request) {
+ this.request = request
+ this.followRedirect = true
+ this.followRedirects = true
+ this.followAllRedirects = false
+ this.allowRedirect = function () {return true}
+ this.maxRedirects = 10
+ this.redirects = []
+ this.redirectsFollowed = 0
+ this.removeRefererHeader = false
+}
+
+Redirect.prototype.onRequest = function () {
+ var self = this
+ , request = self.request
+
+ if (request.maxRedirects !== undefined) {
+ self.maxRedirects = request.maxRedirects
+ }
+ if (typeof request.followRedirect === 'function') {
+ self.allowRedirect = request.followRedirect
+ }
+ if (request.followRedirect !== undefined) {
+ self.followRedirects = !!request.followRedirect
+ }
+ if (request.followAllRedirects !== undefined) {
+ self.followAllRedirects = request.followAllRedirects
+ }
+ if (self.followRedirects || self.followAllRedirects) {
+ self.redirects = self.redirects || []
+ }
+ if (request.removeRefererHeader !== undefined) {
+ self.removeRefererHeader = request.removeRefererHeader
+ }
+}
+
+Redirect.prototype.redirectTo = function (response) {
+ var self = this
+ , request = self.request
+
+ var redirectTo = null
+ if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) {
+ var location = response.caseless.get('location')
+ // debug('redirect', location)
+
+ if (self.followAllRedirects) {
+ redirectTo = location
+ } else if (self.followRedirects) {
+ switch (request.method) {
+ case 'PATCH':
+ case 'PUT':
+ case 'POST':
+ case 'DELETE':
+ // Do not follow redirects
+ break
+ default:
+ redirectTo = location
+ break
+ }
+ }
+ } else if (response.statusCode === 401) {
+ var authHeader = request._auth.onResponse(response)
+ if (authHeader) {
+ request.setHeader('authorization', authHeader)
+ redirectTo = request.uri
+ }
+ }
+ return redirectTo
+}
+
+Redirect.prototype.onResponse = function (response) {
+ var self = this
+ , request = self.request
+
+ var redirectTo = self.redirectTo(response)
+ if (!redirectTo || !self.allowRedirect.call(request, response)) {
+ return false
+ }
+
+
+ // debug('redirect to', redirectTo)
+
+ // ignore any potential response body. it cannot possibly be useful
+ // to us at this point.
+ if (request._paused) {
+ response.resume()
+ }
+
+ if (self.redirectsFollowed >= self.maxRedirects) {
+ request.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + request.uri.href))
+ return false
+ }
+ self.redirectsFollowed += 1
+
+ if (!isUrl.test(redirectTo)) {
+ redirectTo = url.resolve(request.uri.href, redirectTo)
+ }
+
+ var uriPrev = request.uri
+ request.uri = url.parse(redirectTo)
+
+ // handle the case where we change protocol from https to http or vice versa
+ if (request.uri.protocol !== uriPrev.protocol) {
+ request._updateProtocol()
+ }
+
+ self.redirects.push(
+ { statusCode : response.statusCode
+ , redirectUri: redirectTo
+ }
+ )
+ if (self.followAllRedirects && response.statusCode !== 401 && response.statusCode !== 307) {
+ request.method = 'GET'
+ }
+ // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215
+ delete request.src
+ delete request.req
+ delete request.agent
+ delete request._started
+ if (response.statusCode !== 401 && response.statusCode !== 307) {
+ // Remove parameters from the previous response, unless this is the second request
+ // for a server that requires digest authentication.
+ delete request.body
+ delete request._form
+ if (request.headers) {
+ request.removeHeader('host')
+ request.removeHeader('content-type')
+ request.removeHeader('content-length')
+ if (request.uri.hostname !== request.originalHost.split(':')[0]) {
+ // Remove authorization if changing hostnames (but not if just
+ // changing ports or protocols). This matches the behavior of curl:
+ // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710
+ request.removeHeader('authorization')
+ }
+ }
+ }
+
+ if (!self.removeRefererHeader) {
+ request.setHeader('referer', request.uri.href)
+ }
+
+ request.emit('redirect')
+
+ request.init()
+
+ return true
+}
+
+exports.Redirect = Redirect
diff --git a/deps/npm/node_modules/request/node_modules/aws-sign2/package.json b/deps/npm/node_modules/request/node_modules/aws-sign2/package.json
index 9104550c82..decba70fa0 100644
--- a/deps/npm/node_modules/request/node_modules/aws-sign2/package.json
+++ b/deps/npm/node_modules/request/node_modules/aws-sign2/package.json
@@ -41,7 +41,5 @@
],
"directories": {},
"_shasum": "c57103f7a17fc037f02d7c2e64b602ea223f7d63",
- "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz",
- "homepage": "https://github.com/mikeal/aws-sign",
- "scripts": {}
+ "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/bl/package.json b/deps/npm/node_modules/request/node_modules/bl/package.json
index 3ffbd6a8ad..8571244fce 100644
--- a/deps/npm/node_modules/request/node_modules/bl/package.json
+++ b/deps/npm/node_modules/request/node_modules/bl/package.json
@@ -57,6 +57,5 @@
"tarball": "http://registry.npmjs.org/bl/-/bl-0.9.4.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/bl/-/bl-0.9.4.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/bl/-/bl-0.9.4.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/caseless/package.json b/deps/npm/node_modules/request/node_modules/caseless/package.json
index 39153e6144..362113c6de 100644
--- a/deps/npm/node_modules/request/node_modules/caseless/package.json
+++ b/deps/npm/node_modules/request/node_modules/caseless/package.json
@@ -52,6 +52,5 @@
"tarball": "http://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json b/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json
index 3324a13e97..e76ce93184 100644
--- a/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json
+++ b/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json
@@ -34,9 +34,5 @@
"directories": {},
"_shasum": "d4b1f43a93e8296dfe02694f4680bc37a313c73f",
"_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz",
- "_from": "delayed-stream@0.0.5",
- "bugs": {
- "url": "https://github.com/felixge/node-delayed-stream/issues"
- },
- "readme": "ERROR: No README data found!"
+ "_from": "delayed-stream@0.0.5"
}
diff --git a/deps/npm/node_modules/request/node_modules/combined-stream/package.json b/deps/npm/node_modules/request/node_modules/combined-stream/package.json
index a44fef9845..a609ec1165 100644
--- a/deps/npm/node_modules/request/node_modules/combined-stream/package.json
+++ b/deps/npm/node_modules/request/node_modules/combined-stream/package.json
@@ -55,6 +55,5 @@
],
"directories": {},
"_shasum": "0137e657baa5a7541c57ac37ac5fc07d73b4dc1f",
- "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/forever-agent/index.js b/deps/npm/node_modules/request/node_modules/forever-agent/index.js
index 1e8efcdf25..416c7abd70 100644
--- a/deps/npm/node_modules/request/node_modules/forever-agent/index.js
+++ b/deps/npm/node_modules/request/node_modules/forever-agent/index.js
@@ -6,6 +6,17 @@ var util = require('util')
, net = require('net')
, tls = require('tls')
, AgentSSL = require('https').Agent
+
+function getConnectionName(host, port) {
+ var name = ''
+ if (typeof host === 'string') {
+ name = host + ':' + port
+ } else {
+ // For node.js v012.0 and iojs-v1.5.1, host is an object. And any existing localAddress is part of the connection name.
+ name = host.host + ':' + host.port + ':' + (host.localAddress ? (host.localAddress + ':') : ':')
+ }
+ return name
+}
function ForeverAgent(options) {
var self = this
@@ -16,7 +27,8 @@ function ForeverAgent(options) {
self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets
self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets
self.on('free', function(socket, host, port) {
- var name = host + ':' + port
+ var name = getConnectionName(host, port)
+
if (self.requests[name] && self.requests[name].length) {
self.requests[name].shift().onSocket(socket)
} else if (self.sockets[name].length < self.minSockets) {
@@ -47,7 +59,14 @@ ForeverAgent.defaultMinSockets = 5
ForeverAgent.prototype.createConnection = net.createConnection
ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
ForeverAgent.prototype.addRequest = function(req, host, port) {
- var name = host + ':' + port
+ var name = getConnectionName(host, port)
+
+ if (typeof host !== 'string') {
+ var options = host
+ port = options.port
+ host = options.host
+ }
+
if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) {
var idleSocket = this.freeSockets[name].pop()
idleSocket.removeListener('error', idleSocket._onIdleError)
diff --git a/deps/npm/node_modules/request/node_modules/forever-agent/package.json b/deps/npm/node_modules/request/node_modules/forever-agent/package.json
index 1bb4441936..562396419e 100644
--- a/deps/npm/node_modules/request/node_modules/forever-agent/package.json
+++ b/deps/npm/node_modules/request/node_modules/forever-agent/package.json
@@ -6,7 +6,8 @@
},
"name": "forever-agent",
"description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.",
- "version": "0.5.2",
+ "version": "0.6.1",
+ "license": "Apache-2.0",
"repository": {
"url": "https://github.com/mikeal/forever-agent"
},
@@ -17,30 +18,38 @@
"engines": {
"node": "*"
},
+ "gitHead": "1b3b6163f2b3c2c4122bbfa288c1325c0df9871d",
"bugs": {
"url": "https://github.com/mikeal/forever-agent/issues"
},
"homepage": "https://github.com/mikeal/forever-agent",
- "_id": "forever-agent@0.5.2",
- "dist": {
- "shasum": "6d0e09c4921f94a27f63d3b49c5feff1ea4c5130",
- "tarball": "http://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz"
- },
- "_from": "forever-agent@>=0.5.0 <0.6.0",
- "_npmVersion": "1.3.21",
+ "_id": "forever-agent@0.6.1",
+ "scripts": {},
+ "_shasum": "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91",
+ "_from": "forever-agent@>=0.6.0 <0.7.0",
+ "_npmVersion": "1.4.28",
"_npmUser": {
- "name": "mikeal",
- "email": "mikeal.rogers@gmail.com"
+ "name": "simov",
+ "email": "simeonvelichkov@gmail.com"
},
"maintainers": [
{
"name": "mikeal",
"email": "mikeal.rogers@gmail.com"
+ },
+ {
+ "name": "nylen",
+ "email": "jnylen@gmail.com"
+ },
+ {
+ "name": "simov",
+ "email": "simeonvelichkov@gmail.com"
}
],
+ "dist": {
+ "shasum": "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91",
+ "tarball": "http://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz"
+ },
"directories": {},
- "_shasum": "6d0e09c4921f94a27f63d3b49c5feff1ea4c5130",
- "_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz",
- "readme": "ERROR: No README data found!",
- "scripts": {}
+ "_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json
index e8f9ed81b6..3171f4af0c 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json
+++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json
@@ -55,6 +55,5 @@
],
"directories": {},
"_shasum": "ac3613b1da9bed1b47510bb4651b8931e47146c7",
- "_resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/form-data/package.json b/deps/npm/node_modules/request/node_modules/form-data/package.json
index 7f1adae962..9ec7fe59e9 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/package.json
+++ b/deps/npm/node_modules/request/node_modules/form-data/package.json
@@ -75,6 +75,5 @@
"tarball": "http://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/LICENSE b/deps/npm/node_modules/request/node_modules/har-validator/LICENSE
new file mode 100644
index 0000000000..d52787158d
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Ahmad Nassri (https://www.ahmadnassri.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/README.md b/deps/npm/node_modules/request/node_modules/har-validator/README.md
new file mode 100644
index 0000000000..2bfb624a3e
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/README.md
@@ -0,0 +1,341 @@
+# HAR Validator [![version][npm-version]][npm-url] [![License][npm-license]][license-url]
+
+Extremely fast HTTP Archive ([HAR](http://www.softwareishard.com/blog/har-12-spec/)) validator using JSON Schema.
+
+[![Build Status][travis-image]][travis-url]
+[![Downloads][npm-downloads]][npm-url]
+[![Code Climate][codeclimate-quality]][codeclimate-url]
+[![Coverage Status][codeclimate-coverage]][codeclimate-url]
+[![Dependencies][david-image]][david-url]
+
+## Install
+
+```shell
+# to use in cli
+npm install --global har-validator
+
+# to use as a module
+npm install --save har-validator
+```
+
+## Usage
+
+```
+
+ Usage: har-validator [options] <files ...>
+
+ Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+ -s, --schema [name] validate schema name (log, request, response, etc ...)
+
+```
+
+###### Example
+
+```shell
+har-validator har.json
+
+har-validator --schema request request.json
+```
+
+## API
+
+### Validate(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a full [HAR](http://www.softwareishard.com/blog/har-12-spec/) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var HAR = require('./har.json');
+var validate = require('har-validator');
+
+validate(HAR, function (e, valid) {
+ if (e) console.log(e.errors)
+
+ if (valid) console.log('horray!');
+});
+```
+
+### Validate.log(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [log](http://www.softwareishard.com/blog/har-12-spec/#log) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.log(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.cache(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [cache](http://www.softwareishard.com/blog/har-12-spec/#cache) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.cache(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.cacheEntry(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a ["beforeRequest" or "afterRequest"](http://www.softwareishard.com/blog/har-12-spec/#cache) objects
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.cacheEntry(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.content(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [content](http://www.softwareishard.com/blog/har-12-spec/#content) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.content(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.cookie(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [cookie](http://www.softwareishard.com/blog/har-12-spec/#cookies) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.cookie(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.creator(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [creator](http://www.softwareishard.com/blog/har-12-spec/#creator) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.creator(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.entry(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [entry](http://www.softwareishard.com/blog/har-12-spec/#entries) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.entry(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.log(data [, callback])
+
+alias of [`Validate(data [, callback])`](#validate-data-callback-)
+
+### Validate.page(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [page](http://www.softwareishard.com/blog/har-12-spec/#pages) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.page(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.pageTimings(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [pageTimings](http://www.softwareishard.com/blog/har-12-spec/#pageTimings) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.pageTimings(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.postData(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [postData](http://www.softwareishard.com/blog/har-12-spec/#postData) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.postData(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.record(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [record](http://www.softwareishard.com/blog/har-12-spec/#headers) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.record(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.request(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [request](http://www.softwareishard.com/blog/har-12-spec/#request) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.request(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.response(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [response](http://www.softwareishard.com/blog/har-12-spec/#response) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.cacheEntry(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+### Validate.timings(data [, callback])
+
+Returns `true` or `false`.
+
+- **data**: `Object` *(Required)*
+ a [timings](http://www.softwareishard.com/blog/har-12-spec/#timings) object
+
+- **callback**: `Function`
+ gets two arguments (err, valid)
+
+```js
+var validate = require('har-validator');
+
+validate.timings(data, function (e, valid) {
+ if (e) console.log(e.errors)
+});
+```
+
+## License
+
+[MIT](LICENSE) &copy; [Ahmad Nassri](https://www.ahmadnassri.com)
+
+[license-url]: https://github.com/ahmadnassri/har-validator/blob/master/LICENSE
+
+[travis-url]: https://travis-ci.org/ahmadnassri/har-validator
+[travis-image]: https://img.shields.io/travis/ahmadnassri/har-validator.svg?style=flat-square
+
+[npm-url]: https://www.npmjs.com/package/har-validator
+[npm-license]: https://img.shields.io/npm/l/har-validator.svg?style=flat-square
+[npm-version]: https://img.shields.io/npm/v/har-validator.svg?style=flat-square
+[npm-downloads]: https://img.shields.io/npm/dm/har-validator.svg?style=flat-square
+
+[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-validator
+[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-validator.svg?style=flat-square
+[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-validator.svg?style=flat-square
+
+[david-url]: https://david-dm.org/ahmadnassri/har-validator
+[david-image]: https://img.shields.io/david/ahmadnassri/har-validator.svg?style=flat-square
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/bin/har-validator b/deps/npm/node_modules/request/node_modules/har-validator/bin/har-validator
new file mode 100755
index 0000000000..ab1db256f7
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/bin/har-validator
@@ -0,0 +1,45 @@
+#!/usr/bin/env node
+
+'use strict'
+
+var Promise = require('bluebird')
+
+var chalk = require('chalk')
+var cmd = require('commander')
+var fs = Promise.promisifyAll(require('fs'))
+var path = require('path')
+var pkg = require('../package.json')
+var validate = Promise.promisifyAll(require('..'))
+
+cmd
+ .version(pkg.version)
+ .usage('[options] <files ...>')
+ .option('-s, --schema [name]', 'validate schema name (log, request, response, etc ...)')
+ .parse(process.argv)
+
+if (!cmd.args.length) {
+ cmd.help()
+}
+
+if (!cmd.schema) {
+ cmd.schema = 'har'
+}
+
+cmd.args.map(function (fileName) {
+ var file = chalk.yellow.italic(path.basename(fileName))
+
+ fs.readFileAsync(fileName)
+ .then(JSON.parse)
+ .then(validate[cmd.schema + 'Async'])
+ .then(function () {
+ console.log('%s [%s] is valid', chalk.green('✓'), file)
+ })
+ .catch(SyntaxError, function (e) {
+ console.error('%s [%s] failed to read JSON: %s', chalk.red('✖'), file, chalk.red(e.message))
+ })
+ .catch(function (e) {
+ e.errors.map(function (err) {
+ console.error('%s [%s] failed validation: (%s: %s) %s', chalk.red('✖'), file, chalk.cyan.italic(err.field), chalk.magenta.italic(err.value), chalk.red(err.message))
+ })
+ })
+})
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/LICENSE b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/LICENSE
new file mode 100644
index 0000000000..a3966cf935
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Petka Antonov
+
+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:</p>
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/README.md
new file mode 100644
index 0000000000..5e920957d2
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/README.md
@@ -0,0 +1,676 @@
+<a href="http://promisesaplus.com/">
+ <img src="http://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo"
+ title="Promises/A+ 1.1 compliant" align="right" />
+</a>
+[![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird)
+[![coverage-98%](http://img.shields.io/badge/coverage-98%-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html)
+
+
+# Introduction
+
+Bluebird is a fully featured [promise](#what-are-promises-and-why-should-i-use-them) library with focus on innovative features and performance
+
+
+
+# Topics
+
+- [Features](#features)
+- [Quick start](#quick-start)
+- [API Reference and examples](API.md)
+- [Support](#support)
+- [What are promises and why should I use them?](#what-are-promises-and-why-should-i-use-them)
+- [Questions and issues](#questions-and-issues)
+- [Error handling](#error-handling)
+- [Development](#development)
+ - [Testing](#testing)
+ - [Benchmarking](#benchmarks)
+ - [Custom builds](#custom-builds)
+ - [For library authors](#for-library-authors)
+- [What is the sync build?](#what-is-the-sync-build)
+- [License](#license)
+- [Snippets for common problems](https://github.com/petkaantonov/bluebird/wiki/Snippets)
+- [Promise anti-patterns](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns)
+- [Changelog](changelog.md)
+- [Optimization guide](#optimization-guide)
+
+# Features
+<img src="http://petkaantonov.github.io/bluebird/logo.png" alt="bluebird logo" align="right" />
+
+- [Promises A+](http://promisesaplus.com)
+- [Synchronous inspection](API.md#synchronous-inspection)
+- [Concurrency coordination](API.md#collections)
+- [Promisification on steroids](API.md#promisification)
+- [Resource management through a parallel of python `with`/C# `using`](API.md#resource-management)
+- [Cancellation and timeouts](API.md#cancellation)
+- [Parallel for C# `async` and `await`](API.md#generators)
+- Mind blowing utilities such as
+ - [`.bind()`](API.md#binddynamic-thisarg---promise)
+ - [`.call()`](API.md#callstring-propertyname--dynamic-arg---promise)
+ - [`Promise.join()`](API.md#promisejoinpromisethenablevalue-promises-function-handler---promise)
+ - [And](API.md#core) [much](API.md#timers) [more](API.md#utility)!
+- [Practical debugging solutions and sane defaults](#error-handling)
+- [Sick performance](benchmark/)
+
+<hr>
+
+# Quick start
+
+## Node.js
+
+ npm install bluebird
+
+Then:
+
+```js
+var Promise = require("bluebird");
+```
+
+## Browsers
+
+There are many ways to use bluebird in browsers:
+
+- Direct downloads
+ - Full build [bluebird.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.js)
+ - Full build minified [bluebird.min.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.min.js)
+- You may use browserify on the main export
+- You may use the [bower](http://bower.io) package.
+
+When using script tags the global variables `Promise` and `P` (alias for `Promise`) become available.
+
+A [minimal bluebird browser build](#custom-builds) is &asymp;38.92KB minified*, 11.65KB gzipped and has no external dependencies.
+
+*Google Closure Compiler using Simple.
+
+#### Browser support
+
+Browsers that [implement ECMA-262, edition 3](http://en.wikipedia.org/wiki/Ecmascript#Implementations) and later are supported.
+
+[![Selenium Test Status](https://saucelabs.com/browser-matrix/petka_antonov.svg)](https://saucelabs.com/u/petka_antonov)
+
+**Note** that in ECMA-262, edition 3 (IE7, IE8 etc.) it is not possible to use methods that have keyword names like `.catch` and `.finally`. The [API documentation](API.md) always lists a compatible alternative name that you can use if you need to support these browsers. For example `.catch` is replaced with `.caught` and `.finally` with `.lastly`.
+
+Also, [long stack trace](API.md#promiselongstacktraces---void) support is only available in Chrome, Firefox and Internet Explorer 10+.
+
+After quick start, see [API Reference and examples](API.md)
+
+<hr>
+
+# Support
+
+- Mailing list: [bluebird-js@googlegroups.com](https://groups.google.com/forum/#!forum/bluebird-js)
+- IRC: #promises @freenode
+- StackOverflow: [bluebird tag](http://stackoverflow.com/questions/tagged/bluebird)
+- Bugs and feature requests: [github issue tracker](https://github.com/petkaantonov/bluebird/issues?state=open)
+
+<hr>
+
+# What are promises and why should I use them?
+
+You should use promises to turn this:
+
+```js
+fs.readFile("file.json", function(err, val) {
+ if( err ) {
+ console.error("unable to read file");
+ }
+ else {
+ try {
+ val = JSON.parse(val);
+ console.log(val.success);
+ }
+ catch( e ) {
+ console.error("invalid json in file");
+ }
+ }
+});
+```
+
+Into this:
+
+```js
+fs.readFileAsync("file.json").then(JSON.parse).then(function(val) {
+ console.log(val.success);
+})
+.catch(SyntaxError, function(e) {
+ console.error("invalid json in file");
+})
+.catch(function(e) {
+ console.error("unable to read file")
+});
+```
+
+*If you are wondering "there is no `readFileAsync` method on `fs` that returns a promise", see [promisification](API.md#promisification)*
+
+Actually you might notice the latter has a lot in common with code that would do the same using synchronous I/O:
+
+```js
+try {
+ var val = JSON.parse(fs.readFileSync("file.json"));
+ console.log(val.success);
+}
+//Syntax actually not supported in JS but drives the point
+catch(SyntaxError e) {
+ console.error("invalid json in file");
+}
+catch(Error e) {
+ console.error("unable to read file")
+}
+```
+
+And that is the point - being able to have something that is a lot like `return` and `throw` in synchronous code.
+
+You can also use promises to improve code that was written with callback helpers:
+
+
+```js
+//Copyright Plato http://stackoverflow.com/a/19385911/995876
+//CC BY-SA 2.5
+mapSeries(URLs, function (URL, done) {
+ var options = {};
+ needle.get(URL, options, function (error, response, body) {
+ if (error) {
+ return done(error)
+ }
+ try {
+ var ret = JSON.parse(body);
+ return done(null, ret);
+ }
+ catch (e) {
+ done(e);
+ }
+ });
+}, function (err, results) {
+ if (err) {
+ console.log(err)
+ } else {
+ console.log('All Needle requests successful');
+ // results is a 1 to 1 mapping in order of URLs > needle.body
+ processAndSaveAllInDB(results, function (err) {
+ if (err) {
+ return done(err)
+ }
+ console.log('All Needle requests saved');
+ done(null);
+ });
+ }
+});
+```
+
+Is more pleasing to the eye when done with promises:
+
+```js
+Promise.promisifyAll(needle);
+var options = {};
+
+var current = Promise.resolve();
+Promise.map(URLs, function(URL) {
+ current = current.then(function () {
+ return needle.getAsync(URL, options);
+ });
+ return current;
+}).map(function(responseAndBody){
+ return JSON.parse(responseAndBody[1]);
+}).then(function (results) {
+ return processAndSaveAllInDB(results);
+}).then(function(){
+ console.log('All Needle requests saved');
+}).catch(function (e) {
+ console.log(e);
+});
+```
+
+Also promises don't just give you correspondences for synchronous features but can also be used as limited event emitters or callback aggregators.
+
+More reading:
+
+ - [Promise nuggets](https://promise-nuggets.github.io/)
+ - [Why I am switching to promises](http://spion.github.io/posts/why-i-am-switching-to-promises.html)
+ - [What is the the point of promises](http://domenic.me/2012/10/14/youre-missing-the-point-of-promises/#toc_1)
+ - [Snippets for common problems](https://github.com/petkaantonov/bluebird/wiki/Snippets)
+ - [Promise anti-patterns](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns)
+
+# Questions and issues
+
+If you find a bug in bluebird or have a feature request, file an issue in the [github issue tracker](https://github.com/petkaantonov/bluebird/issues). Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.
+
+# Error handling
+
+This is a problem every promise library needs to handle in some way. Unhandled rejections/exceptions don't really have a good agreed-on asynchronous correspondence. The problem is that it is impossible to predict the future and know if a rejected promise will eventually be handled.
+
+There are two common pragmatic attempts at solving the problem that promise libraries do.
+
+The more popular one is to have the user explicitly communicate that they are done and any unhandled rejections should be thrown, like so:
+
+```js
+download().then(...).then(...).done();
+```
+
+For handling this problem, in my opinion, this is completely unacceptable and pointless. The user must remember to explicitly call `.done` and that cannot be justified when the problem is forgetting to create an error handler in the first place.
+
+The second approach, which is what bluebird by default takes, is to call a registered handler if a rejection is unhandled by the start of a second turn. The default handler is to write the stack trace to `stderr` or `console.error` in browsers. This is close to what happens with synchronous code - your code doesn't work as expected and you open console and see a stack trace. Nice.
+
+Of course this is not perfect, if your code for some reason needs to swoop in and attach error handler to some promise after the promise has been hanging around a while then you will see annoying messages. In that case you can use the `.done()` method to signal that any hanging exceptions should be thrown.
+
+If you want to override the default handler for these possibly unhandled rejections, you can pass yours like so:
+
+```js
+Promise.onPossiblyUnhandledRejection(function(error){
+ throw error;
+});
+```
+
+If you want to also enable long stack traces, call:
+
+```js
+Promise.longStackTraces();
+```
+
+right after the library is loaded.
+
+In node.js use the environment flag `BLUEBIRD_DEBUG`:
+
+```
+BLUEBIRD_DEBUG=1 node server.js
+```
+
+to enable long stack traces in all instances of bluebird.
+
+Long stack traces cannot be disabled after being enabled, and cannot be enabled after promises have already been created. Long stack traces imply a substantial performance penalty, even after using every trick to optimize them.
+
+Long stack traces are enabled by default in the debug build.
+
+#### Expected and unexpected errors
+
+A practical problem with Promises/A+ is that it models Javascript `try-catch` too closely for its own good. Therefore by default promises inherit `try-catch` warts such as the inability to specify the error types that the catch block is eligible for. It is an anti-pattern in every other language to use catch-all handlers because they swallow exceptions that you might not know about.
+
+Now, Javascript does have a perfectly fine and working way of creating error type hierarchies. It is still quite awkward to use them with the built-in `try-catch` however:
+
+```js
+try {
+ //code
+}
+catch(e) {
+ if( e instanceof WhatIWantError) {
+ //handle
+ }
+ else {
+ throw e;
+ }
+}
+```
+
+Without such checking, unexpected errors would be silently swallowed. However, with promises, bluebird brings the future (hopefully) here now and extends the `.catch` to [accept potential error type eligibility](API.md#catchfunction-errorclass-function-handler---promise).
+
+For instance here it is expected that some evil or incompetent entity will try to crash our server from `SyntaxError` by providing syntactically invalid JSON:
+
+```js
+getJSONFromSomewhere().then(function(jsonString) {
+ return JSON.parse(jsonString);
+}).then(function(object) {
+ console.log("it was valid json: ", object);
+}).catch(SyntaxError, function(e){
+ console.log("don't be evil");
+});
+```
+
+Here any kind of unexpected error will automatically reported on `stderr` along with a stack trace because we only register a handler for the expected `SyntaxError`.
+
+Ok, so, that's pretty neat. But actually not many libraries define error types and it is in fact a complete ghetto out there with ad hoc strings being attached as some arbitrary property name like `.name`, `.type`, `.code`, not having any property at all or even throwing strings as errors and so on. So how can we still listen for expected errors?
+
+Bluebird defines a special error type `OperationalError` (you can get a reference from `Promise.OperationalError`). This type of error is given as rejection reason by promisified methods when
+their underlying library gives an untyped, but expected error. Primitives such as strings, and error objects that are directly created like `new Error("database didn't respond")` are considered untyped.
+
+Example of such library is the node core library `fs`. So if we promisify it, we can catch just the errors we want pretty easily and have programmer errors be redirected to unhandled rejection handler so that we notice them:
+
+```js
+//Read more about promisification in the API Reference:
+//API.md
+var fs = Promise.promisifyAll(require("fs"));
+
+fs.readFileAsync("myfile.json").then(JSON.parse).then(function (json) {
+ console.log("Successful json")
+}).catch(SyntaxError, function (e) {
+ console.error("file contains invalid json");
+}).catch(Promise.OperationalError, function (e) {
+ console.error("unable to read file, because: ", e.message);
+});
+```
+
+The last `catch` handler is only invoked when the `fs` module explicitly used the `err` argument convention of async callbacks to inform of an expected error. The `OperationalError` instance will contain the original error in its `.cause` property but it does have a direct copy of the `.message` and `.stack` too. In this code any unexpected error - be it in our code or the `fs` module - would not be caught by these handlers and therefore not swallowed.
+
+Since a `catch` handler typed to `Promise.OperationalError` is expected to be used very often, it has a neat shorthand:
+
+```js
+.error(function (e) {
+ console.error("unable to read file, because: ", e.message);
+});
+```
+
+See [API documentation for `.error()`](API.md#error-rejectedhandler----promise)
+
+Finally, Bluebird also supports predicate-based filters. If you pass a
+predicate function instead of an error type, the predicate will receive
+the error as an argument. The return result will be used to determine whether
+the error handler should be called.
+
+Predicates should allow for very fine grained control over caught errors:
+pattern matching, error typesets with set operations and many other techniques
+can be implemented on top of them.
+
+Example of using a predicate-based filter:
+
+```js
+var Promise = require("bluebird");
+var request = Promise.promisify(require("request"));
+
+function clientError(e) {
+ return e.code >= 400 && e.code < 500;
+}
+
+request("http://www.google.com").then(function(contents){
+ console.log(contents);
+}).catch(clientError, function(e){
+ //A client error like 400 Bad Request happened
+});
+```
+
+**Danger:** The JavaScript language allows throwing primitive values like strings. Throwing primitives can lead to worse or no stack traces. Primitives [are not exceptions](http://www.devthought.com/2011/12/22/a-string-is-not-an-error/). You should consider always throwing Error objects when handling exceptions.
+
+<hr>
+
+#### How do long stack traces differ from e.g. Q?
+
+Bluebird attempts to have more elaborate traces. Consider:
+
+```js
+Error.stackTraceLimit = 25;
+Q.longStackSupport = true;
+Q().then(function outer() {
+ return Q().then(function inner() {
+ return Q().then(function evenMoreInner() {
+ a.b.c.d();
+ }).catch(function catcher(e){
+ console.error(e.stack);
+ });
+ })
+});
+```
+
+You will see
+
+ ReferenceError: a is not defined
+ at evenMoreInner (<anonymous>:7:13)
+ From previous event:
+ at inner (<anonymous>:6:20)
+
+Compare to:
+
+```js
+Error.stackTraceLimit = 25;
+Promise.longStackTraces();
+Promise.resolve().then(function outer() {
+ return Promise.resolve().then(function inner() {
+ return Promise.resolve().then(function evenMoreInner() {
+ a.b.c.d()
+ }).catch(function catcher(e){
+ console.error(e.stack);
+ });
+ });
+});
+```
+
+ ReferenceError: a is not defined
+ at evenMoreInner (<anonymous>:7:13)
+ From previous event:
+ at inner (<anonymous>:6:36)
+ From previous event:
+ at outer (<anonymous>:5:32)
+ From previous event:
+ at <anonymous>:4:21
+ at Object.InjectedScript._evaluateOn (<anonymous>:572:39)
+ at Object.InjectedScript._evaluateAndWrap (<anonymous>:531:52)
+ at Object.InjectedScript.evaluate (<anonymous>:450:21)
+
+
+A better and more practical example of the differences can be seen in gorgikosev's [debuggability competition](https://github.com/spion/async-compare#debuggability).
+
+<hr>
+
+# Development
+
+For development tasks such as running benchmarks or testing, you need to clone the repository and install dev-dependencies.
+
+Install [node](http://nodejs.org/) and [npm](https://npmjs.org/)
+
+ git clone git@github.com:petkaantonov/bluebird.git
+ cd bluebird
+ npm install
+
+## Testing
+
+To run all tests, run
+
+ node tools/test
+
+If you need to run generator tests run the `tool/test.js` script with `--harmony` argument and node 0.11+:
+
+ node-dev --harmony tools/test
+
+You may specify an individual test file to run with the `--run` script flag:
+
+ node tools/test --run=cancel.js
+
+
+This enables output from the test and may give a better idea where the test is failing. The paramter to `--run` can be any file name located in `test/mocha` folder.
+
+#### Testing in browsers
+
+To run the test in a browser instead of node, pass the flag `--browser` to the test tool
+
+ node tools/test --run=cancel.js --browser
+
+This will automatically create a server (default port 9999) and open it in your default browser once the tests have been compiled.
+
+Keep the test tab active because some tests are timing-sensitive and will fail if the browser is throttling timeouts. Chrome will do this for example when the tab is not active.
+
+#### Supported options by the test tool
+
+The value of boolean flags is determined by presence, if you want to pass false value for a boolean flag, use the `no-`-prefix e.g. `--no-browser`.
+
+ - `--run=String`. Which tests to run (or compile when testing in browser). Default `"all"`. Can also be a glob string (relative to ./test/mocha folder)
+ - `--cover=String`. Create code coverage using the String as istanbul reporter. Coverage is created in the ./coverage folder. No coverage is created by default, default reporter is `"html"` (use `--cover` to use default reporter).
+ - `--browser` - Whether to compile tests for browsers. Default `false`.
+ - `--port=Number` - Whe port where local server is hosted when testing in browser. Default `9999`
+ - `--execute-browser-tests` - Whether to execute the compiled tests for browser when using `--browser`. Default `true`.
+ - `--open-browser` - Whether to open the default browser when executing browser tests. Default `true`.
+ - `--fake-timers` - Whether to use fake timers (`setTimeout` etc) when running tests in node. Default `true`.
+ - `--js-hint` - Whether to run JSHint on source files. Default `true`.
+ - `--saucelabs` Wheter to create a tunnel to sauce labs and run tests in their VMs instead of your browser when compiling tests for browser.Default `false`.
+
+## Benchmarks
+
+To run a benchmark, run the given command for a benchmark while on the project root. Requires bash (on windows the mingw32 that comes with git works fine too).
+
+Node 0.11.2+ is required to run the generator examples.
+
+### 1\. DoxBee sequential
+
+Currently the most relevant benchmark is @gorkikosev's benchmark in the article [Analysis of generators and other async patterns in node](http://spion.github.io/posts/analysis-generators-and-other-async-patterns-node.html). The benchmark emulates a situation where n amount of users are making a request in parallel to execute some mixed async/sync action. The benchmark has been modified to include a warm-up phase to minimize any JITing during timed sections.
+
+Command: `bench doxbee`
+
+### 2\. Made-up parallel
+
+This made-up scenario runs 15 shimmed queries in parallel.
+
+Command: `bench parallel`
+
+## Custom builds
+
+Custom builds for browsers are supported through a command-line utility.
+
+
+<table>
+ <caption>The following features can be disabled</caption>
+ <thead>
+ <tr>
+ <th>Feature(s)</th>
+ <th>Command line identifier</th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <tr><td><a href="API.md#any---promise"><code>.any</code></a> and <a href="API.md#promiseanyarraydynamicpromise-values---promise"><code>Promise.any</code></a></td><td><code>any</code></td></tr>
+ <tr><td><a href="API.md#race---promise"><code>.race</code></a> and <a href="API.md#promiseracearraypromise-promises---promise"><code>Promise.race</code></a></td><td><code>race</code></td></tr>
+ <tr><td><a href="API.md#callstring-propertyname--dynamic-arg---promise"><code>.call</code></a> and <a href="API.md#getstring-propertyname---promise"><code>.get</code></a></td><td><code>call_get</code></td></tr>
+ <tr><td><a href="API.md#filterfunction-filterer---promise"><code>.filter</code></a> and <a href="API.md#promisefilterarraydynamicpromise-values-function-filterer---promise"><code>Promise.filter</code></a></td><td><code>filter</code></td></tr>
+ <tr><td><a href="API.md#mapfunction-mapper---promise"><code>.map</code></a> and <a href="API.md#promisemaparraydynamicpromise-values-function-mapper---promise"><code>Promise.map</code></a></td><td><code>map</code></td></tr>
+ <tr><td><a href="API.md#reducefunction-reducer--dynamic-initialvalue---promise"><code>.reduce</code></a> and <a href="API.md#promisereducearraydynamicpromise-values-function-reducer--dynamic-initialvalue---promise"><code>Promise.reduce</code></a></td><td><code>reduce</code></td></tr>
+ <tr><td><a href="API.md#props---promise"><code>.props</code></a> and <a href="API.md#promisepropsobjectpromise-object---promise"><code>Promise.props</code></a></td><td><code>props</code></td></tr>
+ <tr><td><a href="API.md#settle---promise"><code>.settle</code></a> and <a href="API.md#promisesettlearraydynamicpromise-values---promise"><code>Promise.settle</code></a></td><td><code>settle</code></td></tr>
+ <tr><td><a href="API.md#someint-count---promise"><code>.some</code></a> and <a href="API.md#promisesomearraydynamicpromise-values-int-count---promise"><code>Promise.some</code></a></td><td><code>some</code></td></tr>
+ <tr><td><a href="API.md#nodeifyfunction-callback---promise"><code>.nodeify</code></a></td><td><code>nodeify</code></td></tr>
+ <tr><td><a href="API.md#promisecoroutinegeneratorfunction-generatorfunction---function"><code>Promise.coroutine</code></a> and <a href="API.md#promisespawngeneratorfunction-generatorfunction---promise"><code>Promise.spawn</code></a></td><td><code>generators</code></td></tr>
+ <tr><td><a href="API.md#progression">Progression</a></td><td><code>progress</code></td></tr>
+ <tr><td><a href="API.md#promisification">Promisification</a></td><td><code>promisify</code></td></tr>
+ <tr><td><a href="API.md#cancellation">Cancellation</a></td><td><code>cancel</code></td></tr>
+ <tr><td><a href="API.md#timers">Timers</a></td><td><code>timers</code></td></tr>
+ <tr><td><a href="API.md#resource-management">Resource management</a></td><td><code>using</code></td></tr>
+
+ </tbody>
+</table>
+
+
+Make sure you have cloned the repo somewhere and did `npm install` successfully.
+
+After that you can run:
+
+ node tools/build --features="core"
+
+
+The above builds the most minimal build you can get. You can add more features separated by spaces from the above list:
+
+ node tools/build --features="core filter map reduce"
+
+The custom build file will be found from `/js/browser/bluebird.js`. It will have a comment that lists the disabled and enabled features.
+
+Note that the build leaves the `/js/main` etc folders with same features so if you use the folder for node.js at the same time, don't forget to build
+a full version afterwards (after having taken a copy of the bluebird.js somewhere):
+
+ node tools/build --debug --main --zalgo --browser --minify
+
+#### Supported options by the build tool
+
+The value of boolean flags is determined by presence, if you want to pass false value for a boolean flag, use the `no-`-prefix e.g. `--no-debug`.
+
+ - `--main` - Whether to build the main build. The main build is placed at `js/main` directory. Default `false`.
+ - `--debug` - Whether to build the debug build. The debug build is placed at `js/debug` directory. Default `false`.
+ - `--zalgo` - Whether to build the zalgo build. The zalgo build is placed at `js/zalgo` directory. Default `false`.
+ - `--browser` - Whether to compile the browser build. The browser build file is placed at `js/browser/bluebird.js` Default `false`.
+ - `--minify` - Whether to minify the compiled browser build. The minified browser build file is placed at `js/browser/bluebird.min.js` Default `true`.
+ - `--features=String` - See [custom builds](#custom-builds)
+
+<hr>
+
+## For library authors
+
+Building a library that depends on bluebird? You should know about a few features.
+
+If your library needs to do something obtrusive like adding or modifying methods on the `Promise` prototype, uses long stack traces or uses a custom unhandled rejection handler then... that's totally ok as long as you don't use `require("bluebird")`. Instead you should create a file
+that creates an isolated copy. For example, creating a file called `bluebird-extended.js` that contains:
+
+```js
+ //NOTE the function call right after
+module.exports = require("bluebird/js/main/promise")();
+```
+
+Your library can then use `var Promise = require("bluebird-extended");` and do whatever it wants with it. Then if the application or other library uses their own bluebird promises they will all play well together because of Promises/A+ thenable assimilation magic.
+
+You should also know about [`.nodeify()`](API.md#nodeifyfunction-callback---promise) which makes it easy to provide a dual callback/promise API.
+
+<hr>
+
+## What is the sync build?
+
+You may now use sync build by:
+
+ var Promise = require("bluebird/zalgo");
+
+The sync build is provided to see how forced asynchronity affects benchmarks. It should not be used in real code due to the implied hazards.
+
+The normal async build gives Promises/A+ guarantees about asynchronous resolution of promises. Some people think this affects performance or just plain love their code having a possibility
+of stack overflow errors and non-deterministic behavior.
+
+The sync build skips the async call trampoline completely, e.g code like:
+
+ async.invoke( this.fn, this, val );
+
+Appears as this in the sync build:
+
+ this.fn(val);
+
+This should pressure the CPU slightly less and thus the sync build should perform better. Indeed it does, but only marginally. The biggest performance boosts are from writing efficient Javascript, not from compromising determinism.
+
+Note that while some benchmarks are waiting for the next event tick, the CPU is actually not in use during that time. So the resulting benchmark result is not completely accurate because on node.js you only care about how much the CPU is taxed. Any time spent on CPU is time the whole process (or server) is paralyzed. And it is not graceful like it would be with threads.
+
+
+```js
+var cache = new Map(); //ES6 Map or DataStructures/Map or whatever...
+function getResult(url) {
+ var resolver = Promise.pending();
+ if (cache.has(url)) {
+ resolver.resolve(cache.get(url));
+ }
+ else {
+ http.get(url, function(err, content) {
+ if (err) resolver.reject(err);
+ else {
+ cache.set(url, content);
+ resolver.resolve(content);
+ }
+ });
+ }
+ return resolver.promise;
+}
+
+
+
+//The result of console.log is truly random without async guarantees
+function guessWhatItPrints( url ) {
+ var i = 3;
+ getResult(url).then(function(){
+ i = 4;
+ });
+ console.log(i);
+}
+```
+
+# Optimization guide
+
+Articles about optimization will be periodically posted in [the wiki section](https://github.com/petkaantonov/bluebird/wiki), polishing edits are welcome.
+
+A single cohesive guide compiled from the articles will probably be done eventually.
+
+# License
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Petka Antonov
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/changelog.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/changelog.md
new file mode 100644
index 0000000000..1f506bb195
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/changelog.md
@@ -0,0 +1,1630 @@
+## 2.9.24 (2015-04-02)
+
+Bugfixes:
+
+ - Fix not being able to load multiple bluebird copies introduced in 2.9.22 ([#559](.), [#561](.), [#560](.)).
+
+## 2.9.23 (2015-04-02)
+
+Bugfixes:
+
+ - Fix node.js domain propagation ([#521](.)).
+
+## 2.9.22 (2015-04-02)
+
+ - Fix `.promisify` crashing in phantom JS ([#556](.))
+
+## 2.9.21 (2015-03-30)
+
+ - Fix error object's `'stack'`' overwriting causing an error when its defined to be a setter that throws an error ([#552](.)).
+
+## 2.9.20 (2015-03-29)
+
+Bugfixes:
+
+ - Fix regression where there is a long delay between calling `.cancel()` and promise actually getting cancelled in Chrome when long stack traces are enabled
+
+## 2.9.19 (2015-03-29)
+
+Bugfixes:
+
+ - Fix crashing in Chrome when long stack traces are disabled
+
+## 2.9.18 (2015-03-29)
+
+Bugfixes:
+
+ - Fix settlePromises using trampoline
+
+## 2.9.17 (2015-03-29)
+
+
+Bugfixes:
+
+ - Fix Chrome DevTools async stack traceability ([#542](.)).
+
+## 2.9.16 (2015-03-28)
+
+Features:
+
+ - Use setImmediate if available
+
+## 2.9.15 (2015-03-26)
+
+Features:
+
+ - Added `.asCallback` alias for `.nodeify`.
+
+Bugfixes:
+
+ - Don't always use nextTick, but try to pick up setImmediate or setTimeout in NW. Fixes [#534](.), [#525](.)
+ - Make progress a core feature. Fixes [#535](.) Note that progress has been removed in 3.x - this is only a fix necessary for 2.x custom builds.
+
+## 2.9.14 (2015-03-12)
+
+Bugfixes:
+
+ - Always use process.nextTick. Fixes [#525](.)
+
+## 2.9.13 (2015-02-27)
+
+Bugfixes:
+
+ - Fix .each, .filter, .reduce and .map callbacks being called synchornously if the input is immediate. ([#513](.))
+
+## 2.9.12 (2015-02-19)
+
+Bugfixes:
+
+ - Fix memory leak introduced in 2.9.0 ([#502](.))
+
+## 2.9.11 (2015-02-19)
+
+Bugfixes:
+
+ - Fix [#503](.)
+
+## 2.9.10 (2015-02-18)
+
+Bugfixes:
+
+ - Fix [#501](.)
+
+## 2.9.9 (2015-02-12)
+
+Bugfixes:
+
+ - Fix `TypeError: Cannot assign to read only property 'length'` when jsdom has declared a read-only length for all objects to inherit.
+
+## 2.9.8 (2015-02-10)
+
+Bugfixes:
+
+ - Fix regression introduced in 2.9.7 where promisify didn't properly dynamically look up methods on `this`
+
+## 2.9.7 (2015-02-08)
+
+Bugfixes:
+
+ - Fix `promisify` not retaining custom properties of the function. This enables promisifying the `"request"` module's export function and its methods at the same time.
+ - Fix `promisifyAll` methods being dependent on `this` when they are not originally dependent on `this`. This enables e.g. passing promisified `fs` functions directly as callbacks without having to bind them to `fs`.
+ - Fix `process.nextTick` being used over `setImmediate` in node.
+
+## 2.9.6 (2015-02-02)
+
+Bugfixes:
+
+ - Node environment detection can no longer be fooled
+
+## 2.9.5 (2015-02-02)
+
+Misc:
+
+ - Warn when [`.then()`](.) is passed non-functions
+
+## 2.9.4 (2015-01-30)
+
+Bugfixes:
+
+ - Fix [.timeout()](.) not calling `clearTimeout` with the proper handle in node causing the process to wait for unneeded timeout. This was a regression introduced in 2.9.1.
+
+## 2.9.3 (2015-01-27)
+
+Bugfixes:
+
+ - Fix node-webkit compatibility issue ([#467](https://github.com/petkaantonov/bluebird/pull/467))
+ - Fix long stack trace support in recent firefox versions
+
+## 2.9.2 (2015-01-26)
+
+Bugfixes:
+
+ - Fix critical bug regarding to using promisifyAll in browser that was introduced in 2.9.0 ([#466](https://github.com/petkaantonov/bluebird/issues/466)).
+
+Misc:
+
+ - Add `"browser"` entry point to package.json
+
+## 2.9.1 (2015-01-24)
+
+Features:
+
+ - If a bound promise is returned by the callback to [`Promise.method`](#promisemethodfunction-fn---function) and [`Promise.try`](#promisetryfunction-fn--arraydynamicdynamic-arguments--dynamic-ctx----promise), the returned promise will be bound to the same value
+
+## 2.9.0 (2015-01-24)
+
+Features:
+
+ - Add [`Promise.fromNode`](API.md#promisefromnodefunction-resolver---promise)
+ - Add new paramter `value` for [`Promise.bind`](API.md#promisebinddynamic-thisarg--dynamic-value---promise)
+
+Bugfixes:
+
+ - Fix several issues with [`cancellation`](API.md#cancellation) and [`.bind()`](API.md#binddynamic-thisarg---promise) interoperation when `thisArg` is a promise or thenable
+ - Fix promises created in [`disposers`](API#disposerfunction-disposer---disposer) not having proper long stack trace context
+ - Fix [`Promise.join`](API.md#promisejoinpromisethenablevalue-promises-function-handler---promise) sometimes passing the passed in callback function as the last argument to itself.
+
+Misc:
+
+ - Reduce minified full browser build file size by not including unused code generation functionality.
+ - Major internal refactoring related to testing code and source code file layout
+
+## 2.8.2 (2015-01-20)
+
+Features:
+
+ - [Global rejection events](https://github.com/petkaantonov/bluebird/blob/master/API.md#global-rejection-events) are now fired both as DOM3 events and as legacy events in browsers
+
+## 2.8.1 (2015-01-20)
+
+Bugfixes:
+
+ - Fix long stack trace stiching consistency when rejected from thenables
+
+## 2.8.0 (2015-01-19)
+
+Features:
+
+ - Major debuggability improvements:
+ - Long stack traces have been re-designed. They are now much more readable,
+ succint, relevant and consistent across bluebird features.
+ - Long stack traces are supported now in IE10+
+
+## 2.7.1 (2015-01-15)
+
+Bugfixes:
+
+ - Fix [#447](https://github.com/petkaantonov/bluebird/issues/447)
+
+## 2.7.0 (2015-01-15)
+
+Features:
+
+ - Added more context to stack traces originating from coroutines ([#421](https://github.com/petkaantonov/bluebird/issues/421))
+ - Implemented [global rejection events](https://github.com/petkaantonov/bluebird/blob/master/API.md#global-rejection-events) ([#428](https://github.com/petkaantonov/bluebird/issues/428), [#357](https://github.com/petkaantonov/bluebird/issues/357))
+ - [Custom promisifiers](https://github.com/petkaantonov/bluebird/blob/master/API.md#option-promisifier) are now passed the default promisifier which can be used to add enhancements on top of normal node promisification
+ - [Promisification filters](https://github.com/petkaantonov/bluebird/blob/master/API.md#option-filter) are now passed `passesDefaultFilter` boolean
+
+Bugfixes:
+
+ - Fix `.noConflict()` call signature ([#446]())
+ - Fix `Promise.method`ified functions being called with `undefined` when they were called with no arguments
+
+## 2.6.4 (2015-01-12)
+
+Bugfixes:
+
+ - `OperationalErrors` thrown by promisified functions retain custom properties, such as `.code` and `.path`.
+
+## 2.6.3 (2015-01-12)
+
+Bugfixes:
+
+ - Fix [#429](https://github.com/petkaantonov/bluebird/issues/429)
+ - Fix [#432](https://github.com/petkaantonov/bluebird/issues/432)
+ - Fix [#433](https://github.com/petkaantonov/bluebird/issues/433)
+
+## 2.6.2 (2015-01-07)
+
+Bugfixes:
+
+ - Fix [#426](https://github.com/petkaantonov/bluebird/issues/426)
+
+## 2.6.1 (2015-01-07)
+
+Bugfixes:
+
+ - Fixed built browser files not being included in the git tag release for bower
+
+## 2.6.0 (2015-01-06)
+
+Features:
+
+ - Significantly improve parallel promise performance and memory usage (+50% faster, -50% less memory)
+
+
+## 2.5.3 (2014-12-30)
+
+## 2.5.2 (2014-12-29)
+
+Bugfixes:
+
+ - Fix bug where already resolved promise gets attached more handlers while calling its handlers resulting in some handlers not being called
+ - Fix bug where then handlers are not called in the same order as they would run if Promises/A+ 2.3.2 was implemented as adoption
+ - Fix bug where using `Object.create(null)` as a rejection reason would crash bluebird
+
+## 2.5.1 (2014-12-29)
+
+Bugfixes:
+
+ - Fix `.finally` throwing null error when it is derived from a promise that is resolved with a promise that is resolved with a promise
+
+## 2.5.0 (2014-12-28)
+
+Features:
+
+ - [`.get`](#API.md#https://github.com/petkaantonov/bluebird/blob/master/API.md#getstring-propertyname---promise) now supports negative indexing.
+
+Bugfixes:
+
+ - Fix bug with `Promise.method` wrapped function returning a promise that never resolves if the function returns a promise that is resolved with another promise
+ - Fix bug with `Promise.delay` never resolving if the value is a promise that is resolved with another promise
+
+## 2.4.3 (2014-12-28)
+
+Bugfixes:
+
+ - Fix memory leak as described in [this Promises/A+ spec issue](https://github.com/promises-aplus/promises-spec/issues/179).
+
+## 2.4.2 (2014-12-21)
+
+Bugfixes:
+
+ - Fix bug where spread rejected handler is ignored in case of rejection
+ - Fix synchronous scheduler passed to `setScheduler` causing infinite loop
+
+## 2.4.1 (2014-12-20)
+
+Features:
+
+ - Error messages now have links to wiki pages for additional information
+ - Promises now clean up all references (to handlers, child promises etc) as soon as possible.
+
+## 2.4.0 (2014-12-18)
+
+Features:
+
+ - Better filtering of bluebird internal calls in long stack traces, especially when using minified file in browsers
+ - Small performance improvements for all collection methods
+ - Promises now delete references to handlers attached to them as soon as possible
+ - Additional stack traces are now output on stderr/`console.warn` for errors that are thrown in the process/window from rejected `.done()` promises. See [#411](https://github.com/petkaantonov/bluebird/issues/411)
+
+## 2.3.11 (2014-10-31)
+
+Bugfixes:
+
+ - Fix [#371](https://github.com/petkaantonov/bluebird/issues/371), [#373](https://github.com/petkaantonov/bluebird/issues/373)
+
+
+## 2.3.10 (2014-10-28)
+
+Features:
+
+ - `Promise.method` no longer wraps primitive errors
+ - `Promise.try` no longer wraps primitive errors
+
+## 2.3.7 (2014-10-25)
+
+Bugfixes:
+
+ - Fix [#359](https://github.com/petkaantonov/bluebird/issues/359), [#362](https://github.com/petkaantonov/bluebird/issues/362) and [#364](https://github.com/petkaantonov/bluebird/issues/364)
+
+## 2.3.6 (2014-10-15)
+
+Features:
+
+ - Implement [`.reflect()`](API.md#reflect---promisepromiseinspection)
+
+## 2.3.5 (2014-10-06)
+
+Bugfixes:
+
+ - Fix issue when promisifying methods whose names contain the string 'args'
+
+## 2.3.4 (2014-09-27)
+
+ - `P` alias was not declared inside WebWorkers
+
+## 2.3.3 (2014-09-27)
+
+Bugfixes:
+
+ - Fix [#318](https://github.com/petkaantonov/bluebird/issues/318), [#314](https://github.com/petkaantonov/bluebird/issues/#314)
+
+## 2.3.2 (2014-08-25)
+
+Bugfixes:
+
+ - `P` alias for `Promise` now exists in global scope when using browser builds without a module loader, fixing an issue with firefox extensions
+
+## 2.3.1 (2014-08-23)
+
+Features:
+
+ - `.using` can now be used with disposers created from different bluebird copy
+
+## 2.3.0 (2014-08-13)
+
+Features:
+
+ - [`.bind()`](API.md#binddynamic-thisarg---promise) and [`Promise.bind()`](API.md#promisebinddynamic-thisarg---promise) now await for the resolution of the `thisArg` if it's a promise or a thenable
+
+Bugfixes:
+
+ - Fix [#276](https://github.com/petkaantonov/bluebird/issues/276)
+
+## 2.2.2 (2014-07-14)
+
+ - Fix [#259](https://github.com/petkaantonov/bluebird/issues/259)
+
+## 2.2.1 (2014-07-07)
+
+ - Fix multiline error messages only showing the first line
+
+## 2.2.0 (2014-07-07)
+
+Bugfixes:
+
+ - `.any` and `.some` now consistently reject with RangeError when input array contains too few promises
+ - Fix iteration bug with `.reduce` when input array contains already fulfilled promises
+
+## 2.1.3 (2014-06-18)
+
+Bugfixes:
+
+ - Fix [#235](https://github.com/petkaantonov/bluebird/issues/235)
+
+## 2.1.2 (2014-06-15)
+
+Bugfixes:
+
+ - Fix [#232](https://github.com/petkaantonov/bluebird/issues/232)
+
+## 2.1.1 (2014-06-11)
+
+## 2.1.0 (2014-06-11)
+
+Features:
+
+ - Add [`promisifier`](API.md#option-promisifier) option to `Promise.promisifyAll()`
+ - Improve performance of `.props()` and collection methods when used with immediate values
+
+
+Bugfixes:
+
+ - Fix a bug where .reduce calls the callback for an already visited item
+ - Fix a bug where stack trace limit is calculated to be too small, which resulted in too short stack traces
+
+<sub>Add undocumented experimental `yieldHandler` option to `Promise.coroutine`</sub>
+
+## 2.0.7 (2014-06-08)
+## 2.0.6 (2014-06-07)
+## 2.0.5 (2014-06-05)
+## 2.0.4 (2014-06-05)
+## 2.0.3 (2014-06-05)
+## 2.0.2 (2014-06-04)
+## 2.0.1 (2014-06-04)
+
+## 2.0.0 (2014-06-04)
+
+#What's new in 2.0
+
+- [Resource management](API.md#resource-management) - never leak resources again
+- [Promisification](API.md#promisification) on steroids - entire modules can now be promisified with one line of code
+- [`.map()`](API.md#mapfunction-mapper--object-options---promise), [`.each()`](API.md#eachfunction-iterator---promise), [`.filter()`](API.md#filterfunction-filterer--object-options---promise), [`.reduce()`](API.md#reducefunction-reducer--dynamic-initialvalue---promise) reimagined from simple sugar to powerful concurrency coordination tools
+- [API Documentation](API.md) has been reorganized and more elaborate examples added
+- Deprecated [progression](#progression-migration) and [deferreds](#deferred-migration)
+- Improved performance and readability
+
+Features:
+
+- Added [`using()`](API.md#promiseusingpromisedisposer-promise-promisedisposer-promise--function-handler---promise) and [`disposer()`](API.md#disposerfunction-disposer---disposer)
+- [`.map()`](API.md#mapfunction-mapper--object-options---promise) now calls the handler as soon as items in the input array become fulfilled
+- Added a concurrency option to [`.map()`](API.md#mapfunction-mapper--object-options---promise)
+- [`.filter()`](API.md#filterfunction-filterer--object-options---promise) now calls the handler as soon as items in the input array become fulfilled
+- Added a concurrency option to [`.filter()`](API.md#filterfunction-filterer--object-options---promise)
+- [`.reduce()`](API.md#reducefunction-reducer--dynamic-initialvalue---promise) now calls the handler as soon as items in the input array become fulfilled, but in-order
+- Added [`.each()`](API.md#eachfunction-iterator---promise)
+- [`Promise.resolve()`](API.md#promiseresolvedynamic-value---promise) behaves like `Promise.cast`. `Promise.cast` deprecated.
+- [Synchronous inspection](API.md#synchronous-inspection): Removed `.inspect()`, added [`.value()`](API.md#value---dynamic) and [`.reason()`](API.md#reason---dynamic)
+- [`Promise.join()`](API.md#promisejoinpromisethenablevalue-promises-function-handler---promise) now takes a function as the last argument
+- Added [`Promise.setScheduler()`](API.md#promisesetschedulerfunction-scheduler---void)
+- [`.cancel()`](API.md#cancelerror-reason---promise) supports a custom cancellation reason
+- [`.timeout()`](API.md#timeoutint-ms--string-message---promise) now cancels the promise instead of rejecting it
+- [`.nodeify()`](API.md#nodeifyfunction-callback--object-options---promise) now supports passing multiple success results when mapping promises to nodebacks
+- Added `suffix` and `filter` options to [`Promise.promisifyAll()`](API.md#promisepromisifyallobject-target--object-options---object)
+
+Breaking changes:
+
+- Sparse array holes are not skipped by collection methods but treated as existing elements with `undefined` value
+- `.map()` and `.filter()` do not call the given mapper or filterer function in any specific order
+- Removed the `.inspect()` method
+- Yielding an array from a coroutine is not supported by default. You can use [`coroutine.addYieldHandler()`](API.md#promisecoroutineaddyieldhandlerfunction-handler---void) to configure the old behavior (or any behavior you want).
+- [`.any()`](API.md#any---promise) and [`.some()`](API.md#someint-count---promise) no longer use an array as the rejection reason. [`AggregateError`](API.md#aggregateerror) is used instead.
+
+
+## 1.2.4 (2014-04-27)
+
+Bugfixes:
+
+ - Fix promisifyAll causing a syntax error when a method name is not a valid identifier
+ - Fix syntax error when es5.js is used in strict mode
+
+## 1.2.3 (2014-04-17)
+
+Bugfixes:
+
+ - Fix [#179](https://github.com/petkaantonov/bluebird/issues/179)
+
+## 1.2.2 (2014-04-09)
+
+Bugfixes:
+
+ - Promisified methods from promisifyAll no longer call the original method when it is overriden
+ - Nodeify doesn't pass second argument to the callback if the promise is fulfilled with `undefined`
+
+## 1.2.1 (2014-03-31)
+
+Bugfixes:
+
+ - Fix [#168](https://github.com/petkaantonov/bluebird/issues/168)
+
+## 1.2.0 (2014-03-29)
+
+Features:
+
+ - New method: [`.value()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#value---dynamic)
+ - New method: [`.reason()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#reason---dynamic)
+ - New method: [`Promise.onUnhandledRejectionHandled()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#promiseonunhandledrejectionhandledfunction-handler---undefined)
+ - `Promise.map()`, `.map()`, `Promise.filter()` and `.filter()` start calling their callbacks as soon as possible while retaining a correct order. See [`8085922f`](https://github.com/petkaantonov/bluebird/commit/8085922fb95a9987fda0cf2337598ab4a98dc315).
+
+Bugfixes:
+
+ - Fix [#165](https://github.com/petkaantonov/bluebird/issues/165)
+ - Fix [#166](https://github.com/petkaantonov/bluebird/issues/166)
+
+## 1.1.1 (2014-03-18)
+
+Bugfixes:
+
+ - [#138](https://github.com/petkaantonov/bluebird/issues/138)
+ - [#144](https://github.com/petkaantonov/bluebird/issues/144)
+ - [#148](https://github.com/petkaantonov/bluebird/issues/148)
+ - [#151](https://github.com/petkaantonov/bluebird/issues/151)
+
+## 1.1.0 (2014-03-08)
+
+Features:
+
+ - Implement [`Promise.prototype.tap()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#tapfunction-handler---promise)
+ - Implement [`Promise.coroutine.addYieldHandler()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#promisecoroutineaddyieldhandlerfunction-handler---void)
+ - Deprecate `Promise.prototype.spawn`
+
+Bugfixes:
+
+ - Fix already rejected promises being reported as unhandled when handled through collection methods
+ - Fix browserisfy crashing from checking `process.version.indexOf`
+
+## 1.0.8 (2014-03-03)
+
+Bugfixes:
+
+ - Fix active domain being lost across asynchronous boundaries in Node.JS 10.xx
+
+## 1.0.7 (2014-02-25)
+
+Bugfixes:
+
+ - Fix handled errors being reported
+
+## 1.0.6 (2014-02-17)
+
+Bugfixes:
+
+ - Fix bug with unhandled rejections not being reported
+ when using `Promise.try` or `Promise.method` without
+ attaching further handlers
+
+## 1.0.5 (2014-02-15)
+
+Features:
+
+ - Node.js performance: promisified functions try to check amount of passed arguments in most optimal order
+ - Node.js promisified functions will have same `.length` as the original function minus one (for the callback parameter)
+
+## 1.0.4 (2014-02-09)
+
+Features:
+
+ - Possibly unhandled rejection handler will always get a stack trace, even if the rejection or thrown error was not an error
+ - Unhandled rejections are tracked per promise, not per error. So if you create multiple branches from a single ancestor and that ancestor gets rejected, each branch with no error handler with the end will cause a possibly unhandled rejection handler invocation
+
+Bugfixes:
+
+ - Fix unhandled non-writable objects or primitives not reported by possibly unhandled rejection handler
+
+## 1.0.3 (2014-02-05)
+
+Bugfixes:
+
+ - [#93](https://github.com/petkaantonov/bluebird/issues/88)
+
+## 1.0.2 (2014-02-04)
+
+Features:
+
+ - Significantly improve performance of foreign bluebird thenables
+
+Bugfixes:
+
+ - [#88](https://github.com/petkaantonov/bluebird/issues/88)
+
+## 1.0.1 (2014-01-28)
+
+Features:
+
+ - Error objects that have property `.isAsync = true` will now be caught by `.error()`
+
+Bugfixes:
+
+ - Fix TypeError and RangeError shims not working without `new` operator
+
+## 1.0.0 (2014-01-12)
+
+Features:
+
+ - `.filter`, `.map`, and `.reduce` no longer skip sparse array holes. This is a backwards incompatible change.
+ - Like `.map` and `.filter`, `.reduce` now allows returning promises and thenables from the iteration function.
+
+Bugfixes:
+
+ - [#58](https://github.com/petkaantonov/bluebird/issues/58)
+ - [#61](https://github.com/petkaantonov/bluebird/issues/61)
+ - [#64](https://github.com/petkaantonov/bluebird/issues/64)
+ - [#60](https://github.com/petkaantonov/bluebird/issues/60)
+
+## 0.11.6-1 (2013-12-29)
+
+## 0.11.6-0 (2013-12-29)
+
+Features:
+
+ - You may now return promises and thenables from the filterer function used in `Promise.filter` and `Promise.prototype.filter`.
+
+ - `.error()` now catches additional sources of rejections:
+
+ - Rejections originating from `Promise.reject`
+
+ - Rejections originating from thenables using
+ the `reject` callback
+
+ - Rejections originating from promisified callbacks
+ which use the `errback` argument
+
+ - Rejections originating from `new Promise` constructor
+ where the `reject` callback is called explicitly
+
+ - Rejections originating from `PromiseResolver` where
+ `.reject()` method is called explicitly
+
+Bugfixes:
+
+ - Fix `captureStackTrace` being called when it was `null`
+ - Fix `Promise.map` not unwrapping thenables
+
+## 0.11.5-1 (2013-12-15)
+
+## 0.11.5-0 (2013-12-03)
+
+Features:
+
+ - Improve performance of collection methods
+ - Improve performance of promise chains
+
+## 0.11.4-1 (2013-12-02)
+
+## 0.11.4-0 (2013-12-02)
+
+Bugfixes:
+
+ - Fix `Promise.some` behavior with arguments like negative integers, 0...
+ - Fix stack traces of synchronously throwing promisified functions'
+
+## 0.11.3-0 (2013-12-02)
+
+Features:
+
+ - Improve performance of generators
+
+Bugfixes:
+
+ - Fix critical bug with collection methods.
+
+## 0.11.2-0 (2013-12-02)
+
+Features:
+
+ - Improve performance of all collection methods
+
+## 0.11.1-0 (2013-12-02)
+
+Features:
+
+- Improve overall performance.
+- Improve performance of promisified functions.
+- Improve performance of catch filters.
+- Improve performance of .finally.
+
+Bugfixes:
+
+- Fix `.finally()` rejecting if passed non-function. It will now ignore non-functions like `.then`.
+- Fix `.finally()` not converting thenables returned from the handler to promises.
+- `.spread()` now rejects if the ultimate value given to it is not spreadable.
+
+## 0.11.0-0 (2013-12-02)
+
+Features:
+
+ - Improve overall performance when not using `.bind()` or cancellation.
+ - Promises are now not cancellable by default. This is backwards incompatible change - see [`.cancellable()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#cancellable---promise)
+ - [`Promise.delay`](https://github.com/petkaantonov/bluebird/blob/master/API.md#promisedelaydynamic-value-int-ms---promise)
+ - [`.delay()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#delayint-ms---promise)
+ - [`.timeout()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#timeoutint-ms--string-message---promise)
+
+## 0.10.14-0 (2013-12-01)
+
+Bugfixes:
+
+ - Fix race condition when mixing 3rd party asynchrony.
+
+## 0.10.13-1 (2013-11-30)
+
+## 0.10.13-0 (2013-11-30)
+
+Bugfixes:
+
+ - Fix another bug with progression.
+
+## 0.10.12-0 (2013-11-30)
+
+Bugfixes:
+
+ - Fix bug with progression.
+
+## 0.10.11-4 (2013-11-29)
+
+## 0.10.11-2 (2013-11-29)
+
+Bugfixes:
+
+ - Fix `.race()` not propagating bound values.
+
+## 0.10.11-1 (2013-11-29)
+
+Features:
+
+ - Improve performance of `Promise.race`
+
+## 0.10.11-0 (2013-11-29)
+
+Bugfixes:
+
+ - Fixed `Promise.promisifyAll` invoking property accessors. Only data properties with function values are considered.
+
+## 0.10.10-0 (2013-11-28)
+
+Features:
+
+ - Disable long stack traces in browsers by default. Call `Promise.longStackTraces()` to enable them.
+
+## 0.10.9-1 (2013-11-27)
+
+Bugfixes:
+
+ - Fail early when `new Promise` is constructed incorrectly
+
+## 0.10.9-0 (2013-11-27)
+
+Bugfixes:
+
+ - Promise.props now takes a [thenable-for-collection](https://github.com/petkaantonov/bluebird/blob/f41edac61b7c421608ff439bb5a09b7cffeadcf9/test/mocha/props.js#L197-L217)
+ - All promise collection methods now reject when a promise-or-thenable-for-collection turns out not to give a collection
+
+## 0.10.8-0 (2013-11-25)
+
+Features:
+
+ - All static collection methods take thenable-for-collection
+
+## 0.10.7-0 (2013-11-25)
+
+Features:
+
+ - throw TypeError when thenable resolves with itself
+ - Make .race() and Promise.race() forever pending on empty collections
+
+## 0.10.6-0 (2013-11-25)
+
+Bugfixes:
+
+ - Promise.resolve and PromiseResolver.resolve follow thenables too.
+
+## 0.10.5-0 (2013-11-24)
+
+Bugfixes:
+
+ - Fix infinite loop when thenable resolves with itself
+
+## 0.10.4-1 (2013-11-24)
+
+Bugfixes:
+
+ - Fix a file missing from build. (Critical fix)
+
+## 0.10.4-0 (2013-11-24)
+
+Features:
+
+ - Remove dependency of es5-shim and es5-sham when using ES3.
+
+## 0.10.3-0 (2013-11-24)
+
+Features:
+
+ - Improve performance of `Promise.method`
+
+## 0.10.2-1 (2013-11-24)
+
+Features:
+
+ - Rename PromiseResolver#asCallback to PromiseResolver#callback
+
+## 0.10.2-0 (2013-11-24)
+
+Features:
+
+ - Remove memoization of thenables
+
+## 0.10.1-0 (2013-11-21)
+
+Features:
+
+ - Add methods `Promise.resolve()`, `Promise.reject()`, `Promise.defer()` and `.resolve()`.
+
+## 0.10.0-1 (2013-11-17)
+
+## 0.10.0-0 (2013-11-17)
+
+Features:
+
+ - Implement `Promise.method()`
+ - Implement `.return()`
+ - Implement `.throw()`
+
+Bugfixes:
+
+ - Fix promises being able to use themselves as resolution or follower value
+
+## 0.9.11-1 (2013-11-14)
+
+Features:
+
+ - Implicit `Promise.all()` when yielding an array from generators
+
+## 0.9.11-0 (2013-11-13)
+
+Bugfixes:
+
+ - Fix `.spread` not unwrapping thenables
+
+## 0.9.10-2 (2013-11-13)
+
+Features:
+
+ - Improve performance of promisified functions on V8
+
+Bugfixes:
+
+ - Report unhandled rejections even when long stack traces are disabled
+ - Fix `.error()` showing up in stack traces
+
+## 0.9.10-1 (2013-11-05)
+
+Bugfixes:
+
+ - Catch filter method calls showing in stack traces
+
+## 0.9.10-0 (2013-11-05)
+
+Bugfixes:
+
+ - Support primitives in catch filters
+
+## 0.9.9-0 (2013-11-05)
+
+Features:
+
+ - Add `Promise.race()` and `.race()`
+
+## 0.9.8-0 (2013-11-01)
+
+Bugfixes:
+
+ - Fix bug with `Promise.try` not unwrapping returned promises and thenables
+
+## 0.9.7-0 (2013-10-29)
+
+Bugfixes:
+
+ - Fix bug with build files containing duplicated code for promise.js
+
+## 0.9.6-0 (2013-10-28)
+
+Features:
+
+ - Improve output of reporting unhandled non-errors
+ - Implement RejectionError wrapping and `.error()` method
+
+## 0.9.5-0 (2013-10-27)
+
+Features:
+
+ - Allow fresh copies of the library to be made
+
+## 0.9.4-1 (2013-10-27)
+
+## 0.9.4-0 (2013-10-27)
+
+Bugfixes:
+
+ - Rollback non-working multiple fresh copies feature
+
+## 0.9.3-0 (2013-10-27)
+
+Features:
+
+ - Allow fresh copies of the library to be made
+ - Add more components to customized builds
+
+## 0.9.2-1 (2013-10-25)
+
+## 0.9.2-0 (2013-10-25)
+
+Features:
+
+ - Allow custom builds
+
+## 0.9.1-1 (2013-10-22)
+
+Bugfixes:
+
+ - Fix unhandled rethrown exceptions not reported
+
+## 0.9.1-0 (2013-10-22)
+
+Features:
+
+ - Improve performance of `Promise.try`
+ - Extend `Promise.try` to accept arguments and ctx to make it more usable in promisification of synchronous functions.
+
+## 0.9.0-0 (2013-10-18)
+
+Features:
+
+ - Implement `.bind` and `Promise.bind`
+
+Bugfixes:
+
+ - Fix `.some()` when argument is a pending promise that later resolves to an array
+
+## 0.8.5-1 (2013-10-17)
+
+Features:
+
+ - Enable process wide long stack traces through BLUEBIRD_DEBUG environment variable
+
+## 0.8.5-0 (2013-10-16)
+
+Features:
+
+ - Improve performance of all collection methods
+
+Bugfixes:
+
+ - Fix .finally passing the value to handlers
+ - Remove kew from benchmarks due to bugs in the library breaking the benchmark
+ - Fix some bluebird library calls potentially appearing in stack traces
+
+## 0.8.4-1 (2013-10-15)
+
+Bugfixes:
+
+ - Fix .pending() call showing in long stack traces
+
+## 0.8.4-0 (2013-10-15)
+
+Bugfixes:
+
+ - Fix PromiseArray and its sub-classes swallowing possibly unhandled rejections
+
+## 0.8.3-3 (2013-10-14)
+
+Bugfixes:
+
+ - Fix AMD-declaration using named module.
+
+## 0.8.3-2 (2013-10-14)
+
+Features:
+
+ - The mortals that can handle it may now release Zalgo by `require("bluebird/zalgo");`
+
+## 0.8.3-1 (2013-10-14)
+
+Bugfixes:
+
+ - Fix memory leak when using the same promise to attach handlers over and over again
+
+## 0.8.3-0 (2013-10-13)
+
+Features:
+
+ - Add `Promise.props()` and `Promise.prototype.props()`. They work like `.all()` for object properties.
+
+Bugfixes:
+
+ - Fix bug with .some returning garbage when sparse arrays have rejections
+
+## 0.8.2-2 (2013-10-13)
+
+Features:
+
+ - Improve performance of `.reduce()` when `initialValue` can be synchronously cast to a value
+
+## 0.8.2-1 (2013-10-12)
+
+Bugfixes:
+
+ - Fix .npmignore having irrelevant files
+
+## 0.8.2-0 (2013-10-12)
+
+Features:
+
+ - Improve performance of `.some()`
+
+## 0.8.1-0 (2013-10-11)
+
+Bugfixes:
+
+ - Remove uses of dynamic evaluation (`new Function`, `eval` etc) when strictly not necessary. Use feature detection to use static evaluation to avoid errors when dynamic evaluation is prohibited.
+
+## 0.8.0-3 (2013-10-10)
+
+Features:
+
+ - Add `.asCallback` property to `PromiseResolver`s
+
+## 0.8.0-2 (2013-10-10)
+
+## 0.8.0-1 (2013-10-09)
+
+Features:
+
+ - Improve overall performance. Be able to sustain infinite recursion when using promises.
+
+## 0.8.0-0 (2013-10-09)
+
+Bugfixes:
+
+ - Fix stackoverflow error when function calls itself "synchronously" from a promise handler
+
+## 0.7.12-2 (2013-10-09)
+
+Bugfixes:
+
+ - Fix safari 6 not using `MutationObserver` as a scheduler
+ - Fix process exceptions interfering with internal queue flushing
+
+## 0.7.12-1 (2013-10-09)
+
+Bugfixes:
+
+ - Don't try to detect if generators are available to allow shims to be used
+
+## 0.7.12-0 (2013-10-08)
+
+Features:
+
+ - Promisification now consider all functions on the object and its prototype chain
+ - Individual promisifcation uses current `this` if no explicit receiver is given
+ - Give better stack traces when promisified callbacks throw or errback primitives such as strings by wrapping them in an `Error` object.
+
+Bugfixes:
+
+ - Fix runtime APIs throwing synchronous errors
+
+## 0.7.11-0 (2013-10-08)
+
+Features:
+
+ - Deprecate `Promise.promisify(Object target)` in favor of `Promise.promisifyAll(Object target)` to avoid confusion with function objects
+ - Coroutines now throw error when a non-promise is `yielded`
+
+## 0.7.10-1 (2013-10-05)
+
+Features:
+
+ - Make tests pass Internet Explorer 8
+
+## 0.7.10-0 (2013-10-05)
+
+Features:
+
+ - Create browser tests
+
+## 0.7.9-1 (2013-10-03)
+
+Bugfixes:
+
+ - Fix promise cast bug when thenable fulfills using itself as the fulfillment value
+
+## 0.7.9-0 (2013-10-03)
+
+Features:
+
+ - More performance improvements when long stack traces are enabled
+
+## 0.7.8-1 (2013-10-02)
+
+Features:
+
+ - Performance improvements when long stack traces are enabled
+
+## 0.7.8-0 (2013-10-02)
+
+Bugfixes:
+
+ - Fix promisified methods not turning synchronous exceptions into rejections
+
+## 0.7.7-1 (2013-10-02)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.7-0 (2013-10-01)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.6-0 (2013-09-29)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.5-0 (2013-09-28)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.4-1 (2013-09-28)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.4-0 (2013-09-28)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.3-1 (2013-09-28)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.3-0 (2013-09-27)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.2-0 (2013-09-27)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-5 (2013-09-26)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-4 (2013-09-25)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-3 (2013-09-25)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-2 (2013-09-24)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-1 (2013-09-24)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-0 (2013-09-24)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.0-1 (2013-09-23)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.0-0 (2013-09-23)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.5-2 (2013-09-20)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.5-1 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.5-0 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.4-1 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.4-0 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.3-4 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.3-3 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.3-2 (2013-09-16)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.3-1 (2013-09-16)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.3-0 (2013-09-15)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.2-1 (2013-09-14)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.2-0 (2013-09-14)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.1-0 (2013-09-14)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.0-0 (2013-09-13)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-6 (2013-09-12)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-5 (2013-09-12)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-4 (2013-09-12)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-3 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-2 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-1 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-0 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.8-1 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.8-0 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.7-0 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.6-1 (2013-09-10)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.6-0 (2013-09-10)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.5-1 (2013-09-10)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.5-0 (2013-09-09)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.4-1 (2013-09-08)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.4-0 (2013-09-08)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.3-0 (2013-09-07)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.2-0 (2013-09-07)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.1-0 (2013-09-07)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.0-0 (2013-09-07)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.4.0-0 (2013-09-06)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.3.0-1 (2013-09-06)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.3.0 (2013-09-06)
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.js
new file mode 100644
index 0000000000..c42fe29904
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.js
@@ -0,0 +1,5095 @@
+/* @preserve
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2014 Petka Antonov
+ *
+ * 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:</p>
+ *
+ * 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.
+ *
+ */
+/**
+ * bluebird build version 2.9.24
+ * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, cancel, using, filter, any, each, timers
+*/
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+var SomePromiseArray = Promise._SomePromiseArray;
+function any(promises) {
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(1);
+ ret.setUnwrap();
+ ret.init();
+ return promise;
+}
+
+Promise.any = function (promises) {
+ return any(promises);
+};
+
+Promise.prototype.any = function () {
+ return any(this);
+};
+
+};
+
+},{}],2:[function(_dereq_,module,exports){
+"use strict";
+var firstLineError;
+try {throw new Error(); } catch (e) {firstLineError = e;}
+var schedule = _dereq_("./schedule.js");
+var Queue = _dereq_("./queue.js");
+var util = _dereq_("./util.js");
+
+function Async() {
+ this._isTickUsed = false;
+ this._lateQueue = new Queue(16);
+ this._normalQueue = new Queue(16);
+ this._trampolineEnabled = true;
+ var self = this;
+ this.drainQueues = function () {
+ self._drainQueues();
+ };
+ this._schedule =
+ schedule.isStatic ? schedule(this.drainQueues) : schedule;
+}
+
+Async.prototype.disableTrampolineIfNecessary = function() {
+ if (util.hasDevTools) {
+ this._trampolineEnabled = false;
+ }
+};
+
+Async.prototype.enableTrampoline = function() {
+ if (!this._trampolineEnabled) {
+ this._trampolineEnabled = true;
+ this._schedule = function(fn) {
+ setTimeout(fn, 0);
+ };
+ }
+};
+
+Async.prototype.haveItemsQueued = function () {
+ return this._normalQueue.length() > 0;
+};
+
+Async.prototype.throwLater = function(fn, arg) {
+ if (arguments.length === 1) {
+ arg = fn;
+ fn = function () { throw arg; };
+ }
+ var domain = this._getDomain();
+ if (domain !== undefined) fn = domain.bind(fn);
+ if (typeof setTimeout !== "undefined") {
+ setTimeout(function() {
+ fn(arg);
+ }, 0);
+ } else try {
+ this._schedule(function() {
+ fn(arg);
+ });
+ } catch (e) {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a");
+ }
+};
+
+Async.prototype._getDomain = function() {};
+
+if (util.isNode) {
+ var EventsModule = _dereq_("events");
+
+ var domainGetter = function() {
+ var domain = process.domain;
+ if (domain === null) return undefined;
+ return domain;
+ };
+
+ if (EventsModule.usingDomains) {
+ Async.prototype._getDomain = domainGetter;
+ } else {
+ var descriptor =
+ Object.getOwnPropertyDescriptor(EventsModule, "usingDomains");
+
+ if (!descriptor.configurable) {
+ process.on("domainsActivated", function() {
+ Async.prototype._getDomain = domainGetter;
+ });
+ } else {
+ var usingDomains = false;
+ Object.defineProperty(EventsModule, "usingDomains", {
+ configurable: false,
+ enumerable: true,
+ get: function() {
+ return usingDomains;
+ },
+ set: function(value) {
+ if (usingDomains || !value) return;
+ usingDomains = true;
+ Async.prototype._getDomain = domainGetter;
+ util.toFastProperties(process);
+ process.emit("domainsActivated");
+ }
+ });
+ }
+
+
+ }
+}
+
+function AsyncInvokeLater(fn, receiver, arg) {
+ var domain = this._getDomain();
+ if (domain !== undefined) fn = domain.bind(fn);
+ this._lateQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncInvoke(fn, receiver, arg) {
+ var domain = this._getDomain();
+ if (domain !== undefined) fn = domain.bind(fn);
+ this._normalQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncSettlePromises(promise) {
+ var domain = this._getDomain();
+ if (domain !== undefined) {
+ var fn = domain.bind(promise._settlePromises);
+ this._normalQueue.push(fn, promise, undefined);
+ } else {
+ this._normalQueue._pushOne(promise);
+ }
+ this._queueTick();
+}
+
+if (!util.hasDevTools) {
+ Async.prototype.invokeLater = AsyncInvokeLater;
+ Async.prototype.invoke = AsyncInvoke;
+ Async.prototype.settlePromises = AsyncSettlePromises;
+} else {
+ Async.prototype.invokeLater = function (fn, receiver, arg) {
+ if (this._trampolineEnabled) {
+ AsyncInvokeLater.call(this, fn, receiver, arg);
+ } else {
+ setTimeout(function() {
+ fn.call(receiver, arg);
+ }, 100);
+ }
+ };
+
+ Async.prototype.invoke = function (fn, receiver, arg) {
+ if (this._trampolineEnabled) {
+ AsyncInvoke.call(this, fn, receiver, arg);
+ } else {
+ setTimeout(function() {
+ fn.call(receiver, arg);
+ }, 0);
+ }
+ };
+
+ Async.prototype.settlePromises = function(promise) {
+ if (this._trampolineEnabled) {
+ AsyncSettlePromises.call(this, promise);
+ } else {
+ setTimeout(function() {
+ promise._settlePromises();
+ }, 0);
+ }
+ };
+}
+
+Async.prototype.invokeFirst = function (fn, receiver, arg) {
+ var domain = this._getDomain();
+ if (domain !== undefined) fn = domain.bind(fn);
+ this._normalQueue.unshift(fn, receiver, arg);
+ this._queueTick();
+};
+
+Async.prototype._drainQueue = function(queue) {
+ while (queue.length() > 0) {
+ var fn = queue.shift();
+ if (typeof fn !== "function") {
+ fn._settlePromises();
+ continue;
+ }
+ var receiver = queue.shift();
+ var arg = queue.shift();
+ fn.call(receiver, arg);
+ }
+};
+
+Async.prototype._drainQueues = function () {
+ this._drainQueue(this._normalQueue);
+ this._reset();
+ this._drainQueue(this._lateQueue);
+};
+
+Async.prototype._queueTick = function () {
+ if (!this._isTickUsed) {
+ this._isTickUsed = true;
+ this._schedule(this.drainQueues);
+ }
+};
+
+Async.prototype._reset = function () {
+ this._isTickUsed = false;
+};
+
+module.exports = new Async();
+module.exports.firstLineError = firstLineError;
+
+},{"./queue.js":28,"./schedule.js":31,"./util.js":38,"events":39}],3:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise) {
+var rejectThis = function(_, e) {
+ this._reject(e);
+};
+
+var targetRejected = function(e, context) {
+ context.promiseRejectionQueued = true;
+ context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
+};
+
+var bindingResolved = function(thisArg, context) {
+ this._setBoundTo(thisArg);
+ if (this._isPending()) {
+ this._resolveCallback(context.target);
+ }
+};
+
+var bindingRejected = function(e, context) {
+ if (!context.promiseRejectionQueued) this._reject(e);
+};
+
+Promise.prototype.bind = function (thisArg) {
+ var maybePromise = tryConvertToPromise(thisArg);
+ var ret = new Promise(INTERNAL);
+ ret._propagateFrom(this, 1);
+ var target = this._target();
+ if (maybePromise instanceof Promise) {
+ var context = {
+ promiseRejectionQueued: false,
+ promise: ret,
+ target: target,
+ bindingPromise: maybePromise
+ };
+ target._then(INTERNAL, targetRejected, ret._progress, ret, context);
+ maybePromise._then(
+ bindingResolved, bindingRejected, ret._progress, ret, context);
+ } else {
+ ret._setBoundTo(thisArg);
+ ret._resolveCallback(target);
+ }
+ return ret;
+};
+
+Promise.prototype._setBoundTo = function (obj) {
+ if (obj !== undefined) {
+ this._bitField = this._bitField | 131072;
+ this._boundTo = obj;
+ } else {
+ this._bitField = this._bitField & (~131072);
+ }
+};
+
+Promise.prototype._isBound = function () {
+ return (this._bitField & 131072) === 131072;
+};
+
+Promise.bind = function (thisArg, value) {
+ var maybePromise = tryConvertToPromise(thisArg);
+ var ret = new Promise(INTERNAL);
+
+ if (maybePromise instanceof Promise) {
+ maybePromise._then(function(thisArg) {
+ ret._setBoundTo(thisArg);
+ ret._resolveCallback(value);
+ }, ret._reject, ret._progress, ret, null);
+ } else {
+ ret._setBoundTo(thisArg);
+ ret._resolveCallback(value);
+ }
+ return ret;
+};
+};
+
+},{}],4:[function(_dereq_,module,exports){
+"use strict";
+var old;
+if (typeof Promise !== "undefined") old = Promise;
+function noConflict() {
+ try { if (Promise === bluebird) Promise = old; }
+ catch (e) {}
+ return bluebird;
+}
+var bluebird = _dereq_("./promise.js")();
+bluebird.noConflict = noConflict;
+module.exports = bluebird;
+
+},{"./promise.js":23}],5:[function(_dereq_,module,exports){
+"use strict";
+var cr = Object.create;
+if (cr) {
+ var callerCache = cr(null);
+ var getterCache = cr(null);
+ callerCache[" size"] = getterCache[" size"] = 0;
+}
+
+module.exports = function(Promise) {
+var util = _dereq_("./util.js");
+var canEvaluate = util.canEvaluate;
+var isIdentifier = util.isIdentifier;
+
+var getMethodCaller;
+var getGetter;
+if (!true) {
+var makeMethodCaller = function (methodName) {
+ return new Function("ensureMethod", " \n\
+ return function(obj) { \n\
+ 'use strict' \n\
+ var len = this.length; \n\
+ ensureMethod(obj, 'methodName'); \n\
+ switch(len) { \n\
+ case 1: return obj.methodName(this[0]); \n\
+ case 2: return obj.methodName(this[0], this[1]); \n\
+ case 3: return obj.methodName(this[0], this[1], this[2]); \n\
+ case 0: return obj.methodName(); \n\
+ default: \n\
+ return obj.methodName.apply(obj, this); \n\
+ } \n\
+ }; \n\
+ ".replace(/methodName/g, methodName))(ensureMethod);
+};
+
+var makeGetter = function (propertyName) {
+ return new Function("obj", " \n\
+ 'use strict'; \n\
+ return obj.propertyName; \n\
+ ".replace("propertyName", propertyName));
+};
+
+var getCompiled = function(name, compiler, cache) {
+ var ret = cache[name];
+ if (typeof ret !== "function") {
+ if (!isIdentifier(name)) {
+ return null;
+ }
+ ret = compiler(name);
+ cache[name] = ret;
+ cache[" size"]++;
+ if (cache[" size"] > 512) {
+ var keys = Object.keys(cache);
+ for (var i = 0; i < 256; ++i) delete cache[keys[i]];
+ cache[" size"] = keys.length - 256;
+ }
+ }
+ return ret;
+};
+
+getMethodCaller = function(name) {
+ return getCompiled(name, makeMethodCaller, callerCache);
+};
+
+getGetter = function(name) {
+ return getCompiled(name, makeGetter, getterCache);
+};
+}
+
+function ensureMethod(obj, methodName) {
+ var fn;
+ if (obj != null) fn = obj[methodName];
+ if (typeof fn !== "function") {
+ var message = "Object " + util.classString(obj) + " has no method '" +
+ util.toString(methodName) + "'";
+ throw new Promise.TypeError(message);
+ }
+ return fn;
+}
+
+function caller(obj) {
+ var methodName = this.pop();
+ var fn = ensureMethod(obj, methodName);
+ return fn.apply(obj, this);
+}
+Promise.prototype.call = function (methodName) {
+ var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
+ if (!true) {
+ if (canEvaluate) {
+ var maybeCaller = getMethodCaller(methodName);
+ if (maybeCaller !== null) {
+ return this._then(
+ maybeCaller, undefined, undefined, args, undefined);
+ }
+ }
+ }
+ args.push(methodName);
+ return this._then(caller, undefined, undefined, args, undefined);
+};
+
+function namedGetter(obj) {
+ return obj[this];
+}
+function indexedGetter(obj) {
+ var index = +this;
+ if (index < 0) index = Math.max(0, index + obj.length);
+ return obj[index];
+}
+Promise.prototype.get = function (propertyName) {
+ var isIndex = (typeof propertyName === "number");
+ var getter;
+ if (!isIndex) {
+ if (canEvaluate) {
+ var maybeGetter = getGetter(propertyName);
+ getter = maybeGetter !== null ? maybeGetter : namedGetter;
+ } else {
+ getter = namedGetter;
+ }
+ } else {
+ getter = indexedGetter;
+ }
+ return this._then(getter, undefined, undefined, propertyName, undefined);
+};
+};
+
+},{"./util.js":38}],6:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+var errors = _dereq_("./errors.js");
+var async = _dereq_("./async.js");
+var CancellationError = errors.CancellationError;
+
+Promise.prototype._cancel = function (reason) {
+ if (!this.isCancellable()) return this;
+ var parent;
+ var promiseToReject = this;
+ while ((parent = promiseToReject._cancellationParent) !== undefined &&
+ parent.isCancellable()) {
+ promiseToReject = parent;
+ }
+ this._unsetCancellable();
+ promiseToReject._target()._rejectCallback(reason, false, true);
+};
+
+Promise.prototype.cancel = function (reason) {
+ if (!this.isCancellable()) return this;
+ if (reason === undefined) reason = new CancellationError();
+ async.invokeLater(this._cancel, this, reason);
+ return this;
+};
+
+Promise.prototype.cancellable = function () {
+ if (this._cancellable()) return this;
+ async.enableTrampoline();
+ this._setCancellable();
+ this._cancellationParent = undefined;
+ return this;
+};
+
+Promise.prototype.uncancellable = function () {
+ var ret = this.then();
+ ret._unsetCancellable();
+ return ret;
+};
+
+Promise.prototype.fork = function (didFulfill, didReject, didProgress) {
+ var ret = this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+
+ ret._setCancellable();
+ ret._cancellationParent = undefined;
+ return ret;
+};
+};
+
+},{"./async.js":2,"./errors.js":13}],7:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function() {
+var async = _dereq_("./async.js");
+var util = _dereq_("./util.js");
+var bluebirdFramePattern =
+ /[\\\/]bluebird[\\\/]js[\\\/](main|debug|zalgo|instrumented)/;
+var stackFramePattern = null;
+var formatStack = null;
+var indentStackFrames = false;
+var warn;
+
+function CapturedTrace(parent) {
+ this._parent = parent;
+ var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
+ captureStackTrace(this, CapturedTrace);
+ if (length > 32) this.uncycle();
+}
+util.inherits(CapturedTrace, Error);
+
+CapturedTrace.prototype.uncycle = function() {
+ var length = this._length;
+ if (length < 2) return;
+ var nodes = [];
+ var stackToIndex = {};
+
+ for (var i = 0, node = this; node !== undefined; ++i) {
+ nodes.push(node);
+ node = node._parent;
+ }
+ length = this._length = i;
+ for (var i = length - 1; i >= 0; --i) {
+ var stack = nodes[i].stack;
+ if (stackToIndex[stack] === undefined) {
+ stackToIndex[stack] = i;
+ }
+ }
+ for (var i = 0; i < length; ++i) {
+ var currentStack = nodes[i].stack;
+ var index = stackToIndex[currentStack];
+ if (index !== undefined && index !== i) {
+ if (index > 0) {
+ nodes[index - 1]._parent = undefined;
+ nodes[index - 1]._length = 1;
+ }
+ nodes[i]._parent = undefined;
+ nodes[i]._length = 1;
+ var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
+
+ if (index < length - 1) {
+ cycleEdgeNode._parent = nodes[index + 1];
+ cycleEdgeNode._parent.uncycle();
+ cycleEdgeNode._length =
+ cycleEdgeNode._parent._length + 1;
+ } else {
+ cycleEdgeNode._parent = undefined;
+ cycleEdgeNode._length = 1;
+ }
+ var currentChildLength = cycleEdgeNode._length + 1;
+ for (var j = i - 2; j >= 0; --j) {
+ nodes[j]._length = currentChildLength;
+ currentChildLength++;
+ }
+ return;
+ }
+ }
+};
+
+CapturedTrace.prototype.parent = function() {
+ return this._parent;
+};
+
+CapturedTrace.prototype.hasParent = function() {
+ return this._parent !== undefined;
+};
+
+CapturedTrace.prototype.attachExtraTrace = function(error) {
+ if (error.__stackCleaned__) return;
+ this.uncycle();
+ var parsed = CapturedTrace.parseStackAndMessage(error);
+ var message = parsed.message;
+ var stacks = [parsed.stack];
+
+ var trace = this;
+ while (trace !== undefined) {
+ stacks.push(cleanStack(trace.stack.split("\n")));
+ trace = trace._parent;
+ }
+ removeCommonRoots(stacks);
+ removeDuplicateOrEmptyJumps(stacks);
+ util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+};
+
+function reconstructStack(message, stacks) {
+ for (var i = 0; i < stacks.length - 1; ++i) {
+ stacks[i].push("From previous event:");
+ stacks[i] = stacks[i].join("\n");
+ }
+ if (i < stacks.length) {
+ stacks[i] = stacks[i].join("\n");
+ }
+ return message + "\n" + stacks.join("\n");
+}
+
+function removeDuplicateOrEmptyJumps(stacks) {
+ for (var i = 0; i < stacks.length; ++i) {
+ if (stacks[i].length === 0 ||
+ ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
+ stacks.splice(i, 1);
+ i--;
+ }
+ }
+}
+
+function removeCommonRoots(stacks) {
+ var current = stacks[0];
+ for (var i = 1; i < stacks.length; ++i) {
+ var prev = stacks[i];
+ var currentLastIndex = current.length - 1;
+ var currentLastLine = current[currentLastIndex];
+ var commonRootMeetPoint = -1;
+
+ for (var j = prev.length - 1; j >= 0; --j) {
+ if (prev[j] === currentLastLine) {
+ commonRootMeetPoint = j;
+ break;
+ }
+ }
+
+ for (var j = commonRootMeetPoint; j >= 0; --j) {
+ var line = prev[j];
+ if (current[currentLastIndex] === line) {
+ current.pop();
+ currentLastIndex--;
+ } else {
+ break;
+ }
+ }
+ current = prev;
+ }
+}
+
+function cleanStack(stack) {
+ var ret = [];
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ var isTraceLine = stackFramePattern.test(line) ||
+ " (No stack trace)" === line;
+ var isInternalFrame = isTraceLine && shouldIgnore(line);
+ if (isTraceLine && !isInternalFrame) {
+ if (indentStackFrames && line.charAt(0) !== " ") {
+ line = " " + line;
+ }
+ ret.push(line);
+ }
+ }
+ return ret;
+}
+
+function stackFramesAsArray(error) {
+ var stack = error.stack.replace(/\s+$/g, "").split("\n");
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ if (" (No stack trace)" === line || stackFramePattern.test(line)) {
+ break;
+ }
+ }
+ if (i > 0) {
+ stack = stack.slice(i);
+ }
+ return stack;
+}
+
+CapturedTrace.parseStackAndMessage = function(error) {
+ var stack = error.stack;
+ var message = error.toString();
+ stack = typeof stack === "string" && stack.length > 0
+ ? stackFramesAsArray(error) : [" (No stack trace)"];
+ return {
+ message: message,
+ stack: cleanStack(stack)
+ };
+};
+
+CapturedTrace.formatAndLogError = function(error, title) {
+ if (typeof console !== "undefined") {
+ var message;
+ if (typeof error === "object" || typeof error === "function") {
+ var stack = error.stack;
+ message = title + formatStack(stack, error);
+ } else {
+ message = title + String(error);
+ }
+ if (typeof warn === "function") {
+ warn(message);
+ } else if (typeof console.log === "function" ||
+ typeof console.log === "object") {
+ console.log(message);
+ }
+ }
+};
+
+CapturedTrace.unhandledRejection = function (reason) {
+ CapturedTrace.formatAndLogError(reason, "^--- With additional stack trace: ");
+};
+
+CapturedTrace.isSupported = function () {
+ return typeof captureStackTrace === "function";
+};
+
+CapturedTrace.fireRejectionEvent =
+function(name, localHandler, reason, promise) {
+ var localEventFired = false;
+ try {
+ if (typeof localHandler === "function") {
+ localEventFired = true;
+ if (name === "rejectionHandled") {
+ localHandler(promise);
+ } else {
+ localHandler(reason, promise);
+ }
+ }
+ } catch (e) {
+ async.throwLater(e);
+ }
+
+ var globalEventFired = false;
+ try {
+ globalEventFired = fireGlobalEvent(name, reason, promise);
+ } catch (e) {
+ globalEventFired = true;
+ async.throwLater(e);
+ }
+
+ var domEventFired = false;
+ if (fireDomEvent) {
+ try {
+ domEventFired = fireDomEvent(name.toLowerCase(), {
+ reason: reason,
+ promise: promise
+ });
+ } catch (e) {
+ domEventFired = true;
+ async.throwLater(e);
+ }
+ }
+
+ if (!globalEventFired && !localEventFired && !domEventFired &&
+ name === "unhandledRejection") {
+ CapturedTrace.formatAndLogError(reason, "Unhandled rejection ");
+ }
+};
+
+function formatNonError(obj) {
+ var str;
+ if (typeof obj === "function") {
+ str = "[function " +
+ (obj.name || "anonymous") +
+ "]";
+ } else {
+ str = obj.toString();
+ var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
+ if (ruselessToString.test(str)) {
+ try {
+ var newStr = JSON.stringify(obj);
+ str = newStr;
+ }
+ catch(e) {
+
+ }
+ }
+ if (str.length === 0) {
+ str = "(empty array)";
+ }
+ }
+ return ("(<" + snip(str) + ">, no stack trace)");
+}
+
+function snip(str) {
+ var maxChars = 41;
+ if (str.length < maxChars) {
+ return str;
+ }
+ return str.substr(0, maxChars - 3) + "...";
+}
+
+var shouldIgnore = function() { return false; };
+var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
+function parseLineInfo(line) {
+ var matches = line.match(parseLineInfoRegex);
+ if (matches) {
+ return {
+ fileName: matches[1],
+ line: parseInt(matches[2], 10)
+ };
+ }
+}
+CapturedTrace.setBounds = function(firstLineError, lastLineError) {
+ if (!CapturedTrace.isSupported()) return;
+ var firstStackLines = firstLineError.stack.split("\n");
+ var lastStackLines = lastLineError.stack.split("\n");
+ var firstIndex = -1;
+ var lastIndex = -1;
+ var firstFileName;
+ var lastFileName;
+ for (var i = 0; i < firstStackLines.length; ++i) {
+ var result = parseLineInfo(firstStackLines[i]);
+ if (result) {
+ firstFileName = result.fileName;
+ firstIndex = result.line;
+ break;
+ }
+ }
+ for (var i = 0; i < lastStackLines.length; ++i) {
+ var result = parseLineInfo(lastStackLines[i]);
+ if (result) {
+ lastFileName = result.fileName;
+ lastIndex = result.line;
+ break;
+ }
+ }
+ if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
+ firstFileName !== lastFileName || firstIndex >= lastIndex) {
+ return;
+ }
+
+ shouldIgnore = function(line) {
+ if (bluebirdFramePattern.test(line)) return true;
+ var info = parseLineInfo(line);
+ if (info) {
+ if (info.fileName === firstFileName &&
+ (firstIndex <= info.line && info.line <= lastIndex)) {
+ return true;
+ }
+ }
+ return false;
+ };
+};
+
+var captureStackTrace = (function stackDetection() {
+ var v8stackFramePattern = /^\s*at\s*/;
+ var v8stackFormatter = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if (error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ if (typeof Error.stackTraceLimit === "number" &&
+ typeof Error.captureStackTrace === "function") {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ var captureStackTrace = Error.captureStackTrace;
+
+ shouldIgnore = function(line) {
+ return bluebirdFramePattern.test(line);
+ };
+ return function(receiver, ignoreUntil) {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ captureStackTrace(receiver, ignoreUntil);
+ Error.stackTraceLimit = Error.stackTraceLimit - 6;
+ };
+ }
+ var err = new Error();
+
+ if (typeof err.stack === "string" &&
+ err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
+ stackFramePattern = /@/;
+ formatStack = v8stackFormatter;
+ indentStackFrames = true;
+ return function captureStackTrace(o) {
+ o.stack = new Error().stack;
+ };
+ }
+
+ var hasStackAfterThrow;
+ try { throw new Error(); }
+ catch(e) {
+ hasStackAfterThrow = ("stack" in e);
+ }
+ if (!("stack" in err) && hasStackAfterThrow) {
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ return function captureStackTrace(o) {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ try { throw new Error(); }
+ catch(e) { o.stack = e.stack; }
+ Error.stackTraceLimit = Error.stackTraceLimit - 6;
+ };
+ }
+
+ formatStack = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if ((typeof error === "object" ||
+ typeof error === "function") &&
+ error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ return null;
+
+})([]);
+
+var fireDomEvent;
+var fireGlobalEvent = (function() {
+ if (util.isNode) {
+ return function(name, reason, promise) {
+ if (name === "rejectionHandled") {
+ return process.emit(name, promise);
+ } else {
+ return process.emit(name, reason, promise);
+ }
+ };
+ } else {
+ var customEventWorks = false;
+ var anyEventWorks = true;
+ try {
+ var ev = new self.CustomEvent("test");
+ customEventWorks = ev instanceof CustomEvent;
+ } catch (e) {}
+ if (!customEventWorks) {
+ try {
+ var event = document.createEvent("CustomEvent");
+ event.initCustomEvent("testingtheevent", false, true, {});
+ self.dispatchEvent(event);
+ } catch (e) {
+ anyEventWorks = false;
+ }
+ }
+ if (anyEventWorks) {
+ fireDomEvent = function(type, detail) {
+ var event;
+ if (customEventWorks) {
+ event = new self.CustomEvent(type, {
+ detail: detail,
+ bubbles: false,
+ cancelable: true
+ });
+ } else if (self.dispatchEvent) {
+ event = document.createEvent("CustomEvent");
+ event.initCustomEvent(type, false, true, detail);
+ }
+
+ return event ? !self.dispatchEvent(event) : false;
+ };
+ }
+
+ var toWindowMethodNameMap = {};
+ toWindowMethodNameMap["unhandledRejection"] = ("on" +
+ "unhandledRejection").toLowerCase();
+ toWindowMethodNameMap["rejectionHandled"] = ("on" +
+ "rejectionHandled").toLowerCase();
+
+ return function(name, reason, promise) {
+ var methodName = toWindowMethodNameMap[name];
+ var method = self[methodName];
+ if (!method) return false;
+ if (name === "rejectionHandled") {
+ method.call(self, promise);
+ } else {
+ method.call(self, reason, promise);
+ }
+ return true;
+ };
+ }
+})();
+
+if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
+ warn = function (message) {
+ console.warn(message);
+ };
+ if (util.isNode && process.stderr.isTTY) {
+ warn = function(message) {
+ process.stderr.write("\u001b[31m" + message + "\u001b[39m\n");
+ };
+ } else if (!util.isNode && typeof (new Error().stack) === "string") {
+ warn = function(message) {
+ console.warn("%c" + message, "color: red");
+ };
+ }
+}
+
+return CapturedTrace;
+};
+
+},{"./async.js":2,"./util.js":38}],8:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(NEXT_FILTER) {
+var util = _dereq_("./util.js");
+var errors = _dereq_("./errors.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var keys = _dereq_("./es5.js").keys;
+var TypeError = errors.TypeError;
+
+function CatchFilter(instances, callback, promise) {
+ this._instances = instances;
+ this._callback = callback;
+ this._promise = promise;
+}
+
+function safePredicate(predicate, e) {
+ var safeObject = {};
+ var retfilter = tryCatch(predicate).call(safeObject, e);
+
+ if (retfilter === errorObj) return retfilter;
+
+ var safeKeys = keys(safeObject);
+ if (safeKeys.length) {
+ errorObj.e = new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a");
+ return errorObj;
+ }
+ return retfilter;
+}
+
+CatchFilter.prototype.doFilter = function (e) {
+ var cb = this._callback;
+ var promise = this._promise;
+ var boundTo = promise._boundTo;
+ for (var i = 0, len = this._instances.length; i < len; ++i) {
+ var item = this._instances[i];
+ var itemIsErrorType = item === Error ||
+ (item != null && item.prototype instanceof Error);
+
+ if (itemIsErrorType && e instanceof item) {
+ var ret = tryCatch(cb).call(boundTo, e);
+ if (ret === errorObj) {
+ NEXT_FILTER.e = ret.e;
+ return NEXT_FILTER;
+ }
+ return ret;
+ } else if (typeof item === "function" && !itemIsErrorType) {
+ var shouldHandle = safePredicate(item, e);
+ if (shouldHandle === errorObj) {
+ e = errorObj.e;
+ break;
+ } else if (shouldHandle) {
+ var ret = tryCatch(cb).call(boundTo, e);
+ if (ret === errorObj) {
+ NEXT_FILTER.e = ret.e;
+ return NEXT_FILTER;
+ }
+ return ret;
+ }
+ }
+ }
+ NEXT_FILTER.e = e;
+ return NEXT_FILTER;
+};
+
+return CatchFilter;
+};
+
+},{"./errors.js":13,"./es5.js":14,"./util.js":38}],9:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, CapturedTrace, isDebugging) {
+var contextStack = [];
+function Context() {
+ this._trace = new CapturedTrace(peekContext());
+}
+Context.prototype._pushContext = function () {
+ if (!isDebugging()) return;
+ if (this._trace !== undefined) {
+ contextStack.push(this._trace);
+ }
+};
+
+Context.prototype._popContext = function () {
+ if (!isDebugging()) return;
+ if (this._trace !== undefined) {
+ contextStack.pop();
+ }
+};
+
+function createContext() {
+ if (isDebugging()) return new Context();
+}
+
+function peekContext() {
+ var lastIndex = contextStack.length - 1;
+ if (lastIndex >= 0) {
+ return contextStack[lastIndex];
+ }
+ return undefined;
+}
+
+Promise.prototype._peekContext = peekContext;
+Promise.prototype._pushContext = Context.prototype._pushContext;
+Promise.prototype._popContext = Context.prototype._popContext;
+
+return createContext;
+};
+
+},{}],10:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, CapturedTrace) {
+var async = _dereq_("./async.js");
+var Warning = _dereq_("./errors.js").Warning;
+var util = _dereq_("./util.js");
+var canAttachTrace = util.canAttachTrace;
+var unhandledRejectionHandled;
+var possiblyUnhandledRejection;
+var debugging = false || (util.isNode &&
+ (!!process.env["BLUEBIRD_DEBUG"] ||
+ process.env["NODE_ENV"] === "development"));
+
+if (debugging) {
+ async.disableTrampolineIfNecessary();
+}
+
+Promise.prototype._ensurePossibleRejectionHandled = function () {
+ this._setRejectionIsUnhandled();
+ async.invokeLater(this._notifyUnhandledRejection, this, undefined);
+};
+
+Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
+ CapturedTrace.fireRejectionEvent("rejectionHandled",
+ unhandledRejectionHandled, undefined, this);
+};
+
+Promise.prototype._notifyUnhandledRejection = function () {
+ if (this._isRejectionUnhandled()) {
+ var reason = this._getCarriedStackTrace() || this._settledValue;
+ this._setUnhandledRejectionIsNotified();
+ CapturedTrace.fireRejectionEvent("unhandledRejection",
+ possiblyUnhandledRejection, reason, this);
+ }
+};
+
+Promise.prototype._setUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField | 524288;
+};
+
+Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField & (~524288);
+};
+
+Promise.prototype._isUnhandledRejectionNotified = function () {
+ return (this._bitField & 524288) > 0;
+};
+
+Promise.prototype._setRejectionIsUnhandled = function () {
+ this._bitField = this._bitField | 2097152;
+};
+
+Promise.prototype._unsetRejectionIsUnhandled = function () {
+ this._bitField = this._bitField & (~2097152);
+ if (this._isUnhandledRejectionNotified()) {
+ this._unsetUnhandledRejectionIsNotified();
+ this._notifyUnhandledRejectionIsHandled();
+ }
+};
+
+Promise.prototype._isRejectionUnhandled = function () {
+ return (this._bitField & 2097152) > 0;
+};
+
+Promise.prototype._setCarriedStackTrace = function (capturedTrace) {
+ this._bitField = this._bitField | 1048576;
+ this._fulfillmentHandler0 = capturedTrace;
+};
+
+Promise.prototype._isCarryingStackTrace = function () {
+ return (this._bitField & 1048576) > 0;
+};
+
+Promise.prototype._getCarriedStackTrace = function () {
+ return this._isCarryingStackTrace()
+ ? this._fulfillmentHandler0
+ : undefined;
+};
+
+Promise.prototype._captureStackTrace = function () {
+ if (debugging) {
+ this._trace = new CapturedTrace(this._peekContext());
+ }
+ return this;
+};
+
+Promise.prototype._attachExtraTrace = function (error, ignoreSelf) {
+ if (debugging && canAttachTrace(error)) {
+ var trace = this._trace;
+ if (trace !== undefined) {
+ if (ignoreSelf) trace = trace._parent;
+ }
+ if (trace !== undefined) {
+ trace.attachExtraTrace(error);
+ } else if (!error.__stackCleaned__) {
+ var parsed = CapturedTrace.parseStackAndMessage(error);
+ util.notEnumerableProp(error, "stack",
+ parsed.message + "\n" + parsed.stack.join("\n"));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+ }
+ }
+};
+
+Promise.prototype._warn = function(message) {
+ var warning = new Warning(message);
+ var ctx = this._peekContext();
+ if (ctx) {
+ ctx.attachExtraTrace(warning);
+ } else {
+ var parsed = CapturedTrace.parseStackAndMessage(warning);
+ warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
+ }
+ CapturedTrace.formatAndLogError(warning, "");
+};
+
+Promise.onPossiblyUnhandledRejection = function (fn) {
+ possiblyUnhandledRejection = typeof fn === "function" ? fn : undefined;
+};
+
+Promise.onUnhandledRejectionHandled = function (fn) {
+ unhandledRejectionHandled = typeof fn === "function" ? fn : undefined;
+};
+
+Promise.longStackTraces = function () {
+ if (async.haveItemsQueued() &&
+ debugging === false
+ ) {
+ throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/DT1qyG\u000a");
+ }
+ debugging = CapturedTrace.isSupported();
+ if (debugging) {
+ async.disableTrampolineIfNecessary();
+ }
+};
+
+Promise.hasLongStackTraces = function () {
+ return debugging && CapturedTrace.isSupported();
+};
+
+if (!CapturedTrace.isSupported()) {
+ Promise.longStackTraces = function(){};
+ debugging = false;
+}
+
+return function() {
+ return debugging;
+};
+};
+
+},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(_dereq_,module,exports){
+"use strict";
+var util = _dereq_("./util.js");
+var isPrimitive = util.isPrimitive;
+var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver;
+
+module.exports = function(Promise) {
+var returner = function () {
+ return this;
+};
+var thrower = function () {
+ throw this;
+};
+
+var wrapper = function (value, action) {
+ if (action === 1) {
+ return function () {
+ throw value;
+ };
+ } else if (action === 2) {
+ return function () {
+ return value;
+ };
+ }
+};
+
+
+Promise.prototype["return"] =
+Promise.prototype.thenReturn = function (value) {
+ if (wrapsPrimitiveReceiver && isPrimitive(value)) {
+ return this._then(
+ wrapper(value, 2),
+ undefined,
+ undefined,
+ undefined,
+ undefined
+ );
+ }
+ return this._then(returner, undefined, undefined, value, undefined);
+};
+
+Promise.prototype["throw"] =
+Promise.prototype.thenThrow = function (reason) {
+ if (wrapsPrimitiveReceiver && isPrimitive(reason)) {
+ return this._then(
+ wrapper(reason, 1),
+ undefined,
+ undefined,
+ undefined,
+ undefined
+ );
+ }
+ return this._then(thrower, undefined, undefined, reason, undefined);
+};
+};
+
+},{"./util.js":38}],12:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseReduce = Promise.reduce;
+
+Promise.prototype.each = function (fn) {
+ return PromiseReduce(this, fn, null, INTERNAL);
+};
+
+Promise.each = function (promises, fn) {
+ return PromiseReduce(promises, fn, null, INTERNAL);
+};
+};
+
+},{}],13:[function(_dereq_,module,exports){
+"use strict";
+var es5 = _dereq_("./es5.js");
+var Objectfreeze = es5.freeze;
+var util = _dereq_("./util.js");
+var inherits = util.inherits;
+var notEnumerableProp = util.notEnumerableProp;
+
+function subError(nameProperty, defaultMessage) {
+ function SubError(message) {
+ if (!(this instanceof SubError)) return new SubError(message);
+ notEnumerableProp(this, "message",
+ typeof message === "string" ? message : defaultMessage);
+ notEnumerableProp(this, "name", nameProperty);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ Error.call(this);
+ }
+ }
+ inherits(SubError, Error);
+ return SubError;
+}
+
+var _TypeError, _RangeError;
+var Warning = subError("Warning", "warning");
+var CancellationError = subError("CancellationError", "cancellation error");
+var TimeoutError = subError("TimeoutError", "timeout error");
+var AggregateError = subError("AggregateError", "aggregate error");
+try {
+ _TypeError = TypeError;
+ _RangeError = RangeError;
+} catch(e) {
+ _TypeError = subError("TypeError", "type error");
+ _RangeError = subError("RangeError", "range error");
+}
+
+var methods = ("join pop push shift unshift slice filter forEach some " +
+ "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
+
+for (var i = 0; i < methods.length; ++i) {
+ if (typeof Array.prototype[methods[i]] === "function") {
+ AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
+ }
+}
+
+es5.defineProperty(AggregateError.prototype, "length", {
+ value: 0,
+ configurable: false,
+ writable: true,
+ enumerable: true
+});
+AggregateError.prototype["isOperational"] = true;
+var level = 0;
+AggregateError.prototype.toString = function() {
+ var indent = Array(level * 4 + 1).join(" ");
+ var ret = "\n" + indent + "AggregateError of:" + "\n";
+ level++;
+ indent = Array(level * 4 + 1).join(" ");
+ for (var i = 0; i < this.length; ++i) {
+ var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
+ var lines = str.split("\n");
+ for (var j = 0; j < lines.length; ++j) {
+ lines[j] = indent + lines[j];
+ }
+ str = lines.join("\n");
+ ret += str + "\n";
+ }
+ level--;
+ return ret;
+};
+
+function OperationalError(message) {
+ if (!(this instanceof OperationalError))
+ return new OperationalError(message);
+ notEnumerableProp(this, "name", "OperationalError");
+ notEnumerableProp(this, "message", message);
+ this.cause = message;
+ this["isOperational"] = true;
+
+ if (message instanceof Error) {
+ notEnumerableProp(this, "message", message.message);
+ notEnumerableProp(this, "stack", message.stack);
+ } else if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+
+}
+inherits(OperationalError, Error);
+
+var errorTypes = Error["__BluebirdErrorTypes__"];
+if (!errorTypes) {
+ errorTypes = Objectfreeze({
+ CancellationError: CancellationError,
+ TimeoutError: TimeoutError,
+ OperationalError: OperationalError,
+ RejectionError: OperationalError,
+ AggregateError: AggregateError
+ });
+ notEnumerableProp(Error, "__BluebirdErrorTypes__", errorTypes);
+}
+
+module.exports = {
+ Error: Error,
+ TypeError: _TypeError,
+ RangeError: _RangeError,
+ CancellationError: errorTypes.CancellationError,
+ OperationalError: errorTypes.OperationalError,
+ TimeoutError: errorTypes.TimeoutError,
+ AggregateError: errorTypes.AggregateError,
+ Warning: Warning
+};
+
+},{"./es5.js":14,"./util.js":38}],14:[function(_dereq_,module,exports){
+var isES5 = (function(){
+ "use strict";
+ return this === undefined;
+})();
+
+if (isES5) {
+ module.exports = {
+ freeze: Object.freeze,
+ defineProperty: Object.defineProperty,
+ getDescriptor: Object.getOwnPropertyDescriptor,
+ keys: Object.keys,
+ names: Object.getOwnPropertyNames,
+ getPrototypeOf: Object.getPrototypeOf,
+ isArray: Array.isArray,
+ isES5: isES5,
+ propertyIsWritable: function(obj, prop) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
+ return !!(!descriptor || descriptor.writable || descriptor.set);
+ }
+ };
+} else {
+ var has = {}.hasOwnProperty;
+ var str = {}.toString;
+ var proto = {}.constructor.prototype;
+
+ var ObjectKeys = function (o) {
+ var ret = [];
+ for (var key in o) {
+ if (has.call(o, key)) {
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+
+ var ObjectGetDescriptor = function(o, key) {
+ return {value: o[key]};
+ };
+
+ var ObjectDefineProperty = function (o, key, desc) {
+ o[key] = desc.value;
+ return o;
+ };
+
+ var ObjectFreeze = function (obj) {
+ return obj;
+ };
+
+ var ObjectGetPrototypeOf = function (obj) {
+ try {
+ return Object(obj).constructor.prototype;
+ }
+ catch (e) {
+ return proto;
+ }
+ };
+
+ var ArrayIsArray = function (obj) {
+ try {
+ return str.call(obj) === "[object Array]";
+ }
+ catch(e) {
+ return false;
+ }
+ };
+
+ module.exports = {
+ isArray: ArrayIsArray,
+ keys: ObjectKeys,
+ names: ObjectKeys,
+ defineProperty: ObjectDefineProperty,
+ getDescriptor: ObjectGetDescriptor,
+ freeze: ObjectFreeze,
+ getPrototypeOf: ObjectGetPrototypeOf,
+ isES5: isES5,
+ propertyIsWritable: function() {
+ return true;
+ }
+ };
+}
+
+},{}],15:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseMap = Promise.map;
+
+Promise.prototype.filter = function (fn, options) {
+ return PromiseMap(this, fn, options, INTERNAL);
+};
+
+Promise.filter = function (promises, fn, options) {
+ return PromiseMap(promises, fn, options, INTERNAL);
+};
+};
+
+},{}],16:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, NEXT_FILTER, tryConvertToPromise) {
+var util = _dereq_("./util.js");
+var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver;
+var isPrimitive = util.isPrimitive;
+var thrower = util.thrower;
+
+function returnThis() {
+ return this;
+}
+function throwThis() {
+ throw this;
+}
+function return$(r) {
+ return function() {
+ return r;
+ };
+}
+function throw$(r) {
+ return function() {
+ throw r;
+ };
+}
+function promisedFinally(ret, reasonOrValue, isFulfilled) {
+ var then;
+ if (wrapsPrimitiveReceiver && isPrimitive(reasonOrValue)) {
+ then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue);
+ } else {
+ then = isFulfilled ? returnThis : throwThis;
+ }
+ return ret._then(then, thrower, undefined, reasonOrValue, undefined);
+}
+
+function finallyHandler(reasonOrValue) {
+ var promise = this.promise;
+ var handler = this.handler;
+
+ var ret = promise._isBound()
+ ? handler.call(promise._boundTo)
+ : handler();
+
+ if (ret !== undefined) {
+ var maybePromise = tryConvertToPromise(ret, promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ return promisedFinally(maybePromise, reasonOrValue,
+ promise.isFulfilled());
+ }
+ }
+
+ if (promise.isRejected()) {
+ NEXT_FILTER.e = reasonOrValue;
+ return NEXT_FILTER;
+ } else {
+ return reasonOrValue;
+ }
+}
+
+function tapHandler(value) {
+ var promise = this.promise;
+ var handler = this.handler;
+
+ var ret = promise._isBound()
+ ? handler.call(promise._boundTo, value)
+ : handler(value);
+
+ if (ret !== undefined) {
+ var maybePromise = tryConvertToPromise(ret, promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ return promisedFinally(maybePromise, value, true);
+ }
+ }
+ return value;
+}
+
+Promise.prototype._passThroughHandler = function (handler, isFinally) {
+ if (typeof handler !== "function") return this.then();
+
+ var promiseAndHandler = {
+ promise: this,
+ handler: handler
+ };
+
+ return this._then(
+ isFinally ? finallyHandler : tapHandler,
+ isFinally ? finallyHandler : undefined, undefined,
+ promiseAndHandler, undefined);
+};
+
+Promise.prototype.lastly =
+Promise.prototype["finally"] = function (handler) {
+ return this._passThroughHandler(handler, true);
+};
+
+Promise.prototype.tap = function (handler) {
+ return this._passThroughHandler(handler, false);
+};
+};
+
+},{"./util.js":38}],17:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise,
+ apiRejection,
+ INTERNAL,
+ tryConvertToPromise) {
+var errors = _dereq_("./errors.js");
+var TypeError = errors.TypeError;
+var util = _dereq_("./util.js");
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+var yieldHandlers = [];
+
+function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
+ for (var i = 0; i < yieldHandlers.length; ++i) {
+ traceParent._pushContext();
+ var result = tryCatch(yieldHandlers[i])(value);
+ traceParent._popContext();
+ if (result === errorObj) {
+ traceParent._pushContext();
+ var ret = Promise.reject(errorObj.e);
+ traceParent._popContext();
+ return ret;
+ }
+ var maybePromise = tryConvertToPromise(result, traceParent);
+ if (maybePromise instanceof Promise) return maybePromise;
+ }
+ return null;
+}
+
+function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
+ var promise = this._promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ this._stack = stack;
+ this._generatorFunction = generatorFunction;
+ this._receiver = receiver;
+ this._generator = undefined;
+ this._yieldHandlers = typeof yieldHandler === "function"
+ ? [yieldHandler].concat(yieldHandlers)
+ : yieldHandlers;
+}
+
+PromiseSpawn.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseSpawn.prototype._run = function () {
+ this._generator = this._generatorFunction.call(this._receiver);
+ this._receiver =
+ this._generatorFunction = undefined;
+ this._next(undefined);
+};
+
+PromiseSpawn.prototype._continue = function (result) {
+ if (result === errorObj) {
+ return this._promise._rejectCallback(result.e, false, true);
+ }
+
+ var value = result.value;
+ if (result.done === true) {
+ this._promise._resolveCallback(value);
+ } else {
+ var maybePromise = tryConvertToPromise(value, this._promise);
+ if (!(maybePromise instanceof Promise)) {
+ maybePromise =
+ promiseFromYieldHandler(maybePromise,
+ this._yieldHandlers,
+ this._promise);
+ if (maybePromise === null) {
+ this._throw(
+ new TypeError(
+ "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/4Y4pDk\u000a\u000a".replace("%s", value) +
+ "From coroutine:\u000a" +
+ this._stack.split("\n").slice(1, -7).join("\n")
+ )
+ );
+ return;
+ }
+ }
+ maybePromise._then(
+ this._next,
+ this._throw,
+ undefined,
+ this,
+ null
+ );
+ }
+};
+
+PromiseSpawn.prototype._throw = function (reason) {
+ this._promise._attachExtraTrace(reason);
+ this._promise._pushContext();
+ var result = tryCatch(this._generator["throw"])
+ .call(this._generator, reason);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+PromiseSpawn.prototype._next = function (value) {
+ this._promise._pushContext();
+ var result = tryCatch(this._generator.next).call(this._generator, value);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+Promise.coroutine = function (generatorFunction, options) {
+ if (typeof generatorFunction !== "function") {
+ throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a");
+ }
+ var yieldHandler = Object(options).yieldHandler;
+ var PromiseSpawn$ = PromiseSpawn;
+ var stack = new Error().stack;
+ return function () {
+ var generator = generatorFunction.apply(this, arguments);
+ var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
+ stack);
+ spawn._generator = generator;
+ spawn._next(undefined);
+ return spawn.promise();
+ };
+};
+
+Promise.coroutine.addYieldHandler = function(fn) {
+ if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ yieldHandlers.push(fn);
+};
+
+Promise.spawn = function (generatorFunction) {
+ if (typeof generatorFunction !== "function") {
+ return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a");
+ }
+ var spawn = new PromiseSpawn(generatorFunction, this);
+ var ret = spawn.promise();
+ spawn._run(Promise.spawn);
+ return ret;
+};
+};
+
+},{"./errors.js":13,"./util.js":38}],18:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+function(Promise, PromiseArray, tryConvertToPromise, INTERNAL) {
+var util = _dereq_("./util.js");
+var canEvaluate = util.canEvaluate;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var reject;
+
+if (!true) {
+if (canEvaluate) {
+ var thenCallback = function(i) {
+ return new Function("value", "holder", " \n\
+ 'use strict'; \n\
+ holder.pIndex = value; \n\
+ holder.checkFulfillment(this); \n\
+ ".replace(/Index/g, i));
+ };
+
+ var caller = function(count) {
+ var values = [];
+ for (var i = 1; i <= count; ++i) values.push("holder.p" + i);
+ return new Function("holder", " \n\
+ 'use strict'; \n\
+ var callback = holder.fn; \n\
+ return callback(values); \n\
+ ".replace(/values/g, values.join(", ")));
+ };
+ var thenCallbacks = [];
+ var callers = [undefined];
+ for (var i = 1; i <= 5; ++i) {
+ thenCallbacks.push(thenCallback(i));
+ callers.push(caller(i));
+ }
+
+ var Holder = function(total, fn) {
+ this.p1 = this.p2 = this.p3 = this.p4 = this.p5 = null;
+ this.fn = fn;
+ this.total = total;
+ this.now = 0;
+ };
+
+ Holder.prototype.callers = callers;
+ Holder.prototype.checkFulfillment = function(promise) {
+ var now = this.now;
+ now++;
+ var total = this.total;
+ if (now >= total) {
+ var handler = this.callers[total];
+ promise._pushContext();
+ var ret = tryCatch(handler)(this);
+ promise._popContext();
+ if (ret === errorObj) {
+ promise._rejectCallback(ret.e, false, true);
+ } else {
+ promise._resolveCallback(ret);
+ }
+ } else {
+ this.now = now;
+ }
+ };
+
+ var reject = function (reason) {
+ this._reject(reason);
+ };
+}
+}
+
+Promise.join = function () {
+ var last = arguments.length - 1;
+ var fn;
+ if (last > 0 && typeof arguments[last] === "function") {
+ fn = arguments[last];
+ if (!true) {
+ if (last < 6 && canEvaluate) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ var holder = new Holder(last, fn);
+ var callbacks = thenCallbacks;
+ for (var i = 0; i < last; ++i) {
+ var maybePromise = tryConvertToPromise(arguments[i], ret);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ maybePromise._then(callbacks[i], reject,
+ undefined, ret, holder);
+ } else if (maybePromise._isFulfilled()) {
+ callbacks[i].call(ret,
+ maybePromise._value(), holder);
+ } else {
+ ret._reject(maybePromise._reason());
+ }
+ } else {
+ callbacks[i].call(ret, maybePromise, holder);
+ }
+ }
+ return ret;
+ }
+ }
+ }
+ var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}
+ if (fn) args.pop();
+ var ret = new PromiseArray(args).promise();
+ return fn !== undefined ? ret.spread(fn) : ret;
+};
+
+};
+
+},{"./util.js":38}],19:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL) {
+var async = _dereq_("./async.js");
+var util = _dereq_("./util.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var PENDING = {};
+var EMPTY_ARRAY = [];
+
+function MappingPromiseArray(promises, fn, limit, _filter) {
+ this.constructor$(promises);
+ this._promise._captureStackTrace();
+ this._callback = fn;
+ this._preservedValues = _filter === INTERNAL
+ ? new Array(this.length())
+ : null;
+ this._limit = limit;
+ this._inFlight = 0;
+ this._queue = limit >= 1 ? [] : EMPTY_ARRAY;
+ async.invoke(init, this, undefined);
+}
+util.inherits(MappingPromiseArray, PromiseArray);
+function init() {this._init$(undefined, -2);}
+
+MappingPromiseArray.prototype._init = function () {};
+
+MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var values = this._values;
+ var length = this.length();
+ var preservedValues = this._preservedValues;
+ var limit = this._limit;
+ if (values[index] === PENDING) {
+ values[index] = value;
+ if (limit >= 1) {
+ this._inFlight--;
+ this._drainQueue();
+ if (this._isResolved()) return;
+ }
+ } else {
+ if (limit >= 1 && this._inFlight >= limit) {
+ values[index] = value;
+ this._queue.push(index);
+ return;
+ }
+ if (preservedValues !== null) preservedValues[index] = value;
+
+ var callback = this._callback;
+ var receiver = this._promise._boundTo;
+ this._promise._pushContext();
+ var ret = tryCatch(callback).call(receiver, value, index, length);
+ this._promise._popContext();
+ if (ret === errorObj) return this._reject(ret.e);
+
+ var maybePromise = tryConvertToPromise(ret, this._promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ if (limit >= 1) this._inFlight++;
+ values[index] = PENDING;
+ return maybePromise._proxyPromiseArray(this, index);
+ } else if (maybePromise._isFulfilled()) {
+ ret = maybePromise._value();
+ } else {
+ return this._reject(maybePromise._reason());
+ }
+ }
+ values[index] = ret;
+ }
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= length) {
+ if (preservedValues !== null) {
+ this._filter(values, preservedValues);
+ } else {
+ this._resolve(values);
+ }
+
+ }
+};
+
+MappingPromiseArray.prototype._drainQueue = function () {
+ var queue = this._queue;
+ var limit = this._limit;
+ var values = this._values;
+ while (queue.length > 0 && this._inFlight < limit) {
+ if (this._isResolved()) return;
+ var index = queue.pop();
+ this._promiseFulfilled(values[index], index);
+ }
+};
+
+MappingPromiseArray.prototype._filter = function (booleans, values) {
+ var len = values.length;
+ var ret = new Array(len);
+ var j = 0;
+ for (var i = 0; i < len; ++i) {
+ if (booleans[i]) ret[j++] = values[i];
+ }
+ ret.length = j;
+ this._resolve(ret);
+};
+
+MappingPromiseArray.prototype.preservedValues = function () {
+ return this._preservedValues;
+};
+
+function map(promises, fn, options, _filter) {
+ var limit = typeof options === "object" && options !== null
+ ? options.concurrency
+ : 0;
+ limit = typeof limit === "number" &&
+ isFinite(limit) && limit >= 1 ? limit : 0;
+ return new MappingPromiseArray(promises, fn, limit, _filter);
+}
+
+Promise.prototype.map = function (fn, options) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+
+ return map(this, fn, options, null).promise();
+};
+
+Promise.map = function (promises, fn, options, _filter) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ return map(promises, fn, options, _filter).promise();
+};
+
+
+};
+
+},{"./async.js":2,"./util.js":38}],20:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+function(Promise, INTERNAL, tryConvertToPromise, apiRejection) {
+var util = _dereq_("./util.js");
+var tryCatch = util.tryCatch;
+
+Promise.method = function (fn) {
+ if (typeof fn !== "function") {
+ throw new Promise.TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ return function () {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value = tryCatch(fn).apply(this, arguments);
+ ret._popContext();
+ ret._resolveFromSyncValue(value);
+ return ret;
+ };
+};
+
+Promise.attempt = Promise["try"] = function (fn, args, ctx) {
+ if (typeof fn !== "function") {
+ return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value = util.isArray(args)
+ ? tryCatch(fn).apply(ctx, args)
+ : tryCatch(fn).call(ctx, args);
+ ret._popContext();
+ ret._resolveFromSyncValue(value);
+ return ret;
+};
+
+Promise.prototype._resolveFromSyncValue = function (value) {
+ if (value === util.errorObj) {
+ this._rejectCallback(value.e, false, true);
+ } else {
+ this._resolveCallback(value, true);
+ }
+};
+};
+
+},{"./util.js":38}],21:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+var util = _dereq_("./util.js");
+var async = _dereq_("./async.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+function spreadAdapter(val, nodeback) {
+ var promise = this;
+ if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
+ var ret = tryCatch(nodeback).apply(promise._boundTo, [null].concat(val));
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+function successAdapter(val, nodeback) {
+ var promise = this;
+ var receiver = promise._boundTo;
+ var ret = val === undefined
+ ? tryCatch(nodeback).call(receiver, null)
+ : tryCatch(nodeback).call(receiver, null, val);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+function errorAdapter(reason, nodeback) {
+ var promise = this;
+ if (!reason) {
+ var target = promise._target();
+ var newReason = target._getCarriedStackTrace();
+ newReason.cause = reason;
+ reason = newReason;
+ }
+ var ret = tryCatch(nodeback).call(promise._boundTo, reason);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+Promise.prototype.asCallback =
+Promise.prototype.nodeify = function (nodeback, options) {
+ if (typeof nodeback == "function") {
+ var adapter = successAdapter;
+ if (options !== undefined && Object(options).spread) {
+ adapter = spreadAdapter;
+ }
+ this._then(
+ adapter,
+ errorAdapter,
+ undefined,
+ this,
+ nodeback
+ );
+ }
+ return this;
+};
+};
+
+},{"./async.js":2,"./util.js":38}],22:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, PromiseArray) {
+var util = _dereq_("./util.js");
+var async = _dereq_("./async.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+Promise.prototype.progressed = function (handler) {
+ return this._then(undefined, undefined, handler, undefined, undefined);
+};
+
+Promise.prototype._progress = function (progressValue) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._target()._progressUnchecked(progressValue);
+
+};
+
+Promise.prototype._progressHandlerAt = function (index) {
+ return index === 0
+ ? this._progressHandler0
+ : this[(index << 2) + index - 5 + 2];
+};
+
+Promise.prototype._doProgressWith = function (progression) {
+ var progressValue = progression.value;
+ var handler = progression.handler;
+ var promise = progression.promise;
+ var receiver = progression.receiver;
+
+ var ret = tryCatch(handler).call(receiver, progressValue);
+ if (ret === errorObj) {
+ if (ret.e != null &&
+ ret.e.name !== "StopProgressPropagation") {
+ var trace = util.canAttachTrace(ret.e)
+ ? ret.e : new Error(util.toString(ret.e));
+ promise._attachExtraTrace(trace);
+ promise._progress(ret.e);
+ }
+ } else if (ret instanceof Promise) {
+ ret._then(promise._progress, null, null, promise, undefined);
+ } else {
+ promise._progress(ret);
+ }
+};
+
+
+Promise.prototype._progressUnchecked = function (progressValue) {
+ var len = this._length();
+ var progress = this._progress;
+ for (var i = 0; i < len; i++) {
+ var handler = this._progressHandlerAt(i);
+ var promise = this._promiseAt(i);
+ if (!(promise instanceof Promise)) {
+ var receiver = this._receiverAt(i);
+ if (typeof handler === "function") {
+ handler.call(receiver, progressValue, promise);
+ } else if (receiver instanceof PromiseArray &&
+ !receiver._isResolved()) {
+ receiver._promiseProgressed(progressValue, promise);
+ }
+ continue;
+ }
+
+ if (typeof handler === "function") {
+ async.invoke(this._doProgressWith, this, {
+ handler: handler,
+ promise: promise,
+ receiver: this._receiverAt(i),
+ value: progressValue
+ });
+ } else {
+ async.invoke(progress, promise, progressValue);
+ }
+ }
+};
+};
+
+},{"./async.js":2,"./util.js":38}],23:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function() {
+var makeSelfResolutionError = function () {
+ return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/LhFpo0\u000a");
+};
+var reflect = function() {
+ return new Promise.PromiseInspection(this._target());
+};
+var apiRejection = function(msg) {
+ return Promise.reject(new TypeError(msg));
+};
+var util = _dereq_("./util.js");
+var async = _dereq_("./async.js");
+var errors = _dereq_("./errors.js");
+var TypeError = Promise.TypeError = errors.TypeError;
+Promise.RangeError = errors.RangeError;
+Promise.CancellationError = errors.CancellationError;
+Promise.TimeoutError = errors.TimeoutError;
+Promise.OperationalError = errors.OperationalError;
+Promise.RejectionError = errors.OperationalError;
+Promise.AggregateError = errors.AggregateError;
+var INTERNAL = function(){};
+var APPLY = {};
+var NEXT_FILTER = {e: null};
+var tryConvertToPromise = _dereq_("./thenables.js")(Promise, INTERNAL);
+var PromiseArray =
+ _dereq_("./promise_array.js")(Promise, INTERNAL,
+ tryConvertToPromise, apiRejection);
+var CapturedTrace = _dereq_("./captured_trace.js")();
+var isDebugging = _dereq_("./debuggability.js")(Promise, CapturedTrace);
+ /*jshint unused:false*/
+var createContext =
+ _dereq_("./context.js")(Promise, CapturedTrace, isDebugging);
+var CatchFilter = _dereq_("./catch_filter.js")(NEXT_FILTER);
+var PromiseResolver = _dereq_("./promise_resolver.js");
+var nodebackForPromise = PromiseResolver._nodebackForPromise;
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+function Promise(resolver) {
+ if (typeof resolver !== "function") {
+ throw new TypeError("the promise constructor requires a resolver function\u000a\u000a See http://goo.gl/EC22Yn\u000a");
+ }
+ if (this.constructor !== Promise) {
+ throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/KsIlge\u000a");
+ }
+ this._bitField = 0;
+ this._fulfillmentHandler0 = undefined;
+ this._rejectionHandler0 = undefined;
+ this._progressHandler0 = undefined;
+ this._promise0 = undefined;
+ this._receiver0 = undefined;
+ this._settledValue = undefined;
+ if (resolver !== INTERNAL) this._resolveFromResolver(resolver);
+}
+
+Promise.prototype.toString = function () {
+ return "[object Promise]";
+};
+
+Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
+ var len = arguments.length;
+ if (len > 1) {
+ var catchInstances = new Array(len - 1),
+ j = 0, i;
+ for (i = 0; i < len - 1; ++i) {
+ var item = arguments[i];
+ if (typeof item === "function") {
+ catchInstances[j++] = item;
+ } else {
+ return Promise.reject(
+ new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a"));
+ }
+ }
+ catchInstances.length = j;
+ fn = arguments[i];
+ var catchFilter = new CatchFilter(catchInstances, fn, this);
+ return this._then(undefined, catchFilter.doFilter, undefined,
+ catchFilter, undefined);
+ }
+ return this._then(undefined, fn, undefined, undefined, undefined);
+};
+
+Promise.prototype.reflect = function () {
+ return this._then(reflect, reflect, undefined, this, undefined);
+};
+
+Promise.prototype.then = function (didFulfill, didReject, didProgress) {
+ if (isDebugging() && arguments.length > 0 &&
+ typeof didFulfill !== "function" &&
+ typeof didReject !== "function") {
+ var msg = ".then() only accepts functions but was passed: " +
+ util.classString(didFulfill);
+ if (arguments.length > 1) {
+ msg += ", " + util.classString(didReject);
+ }
+ this._warn(msg);
+ }
+ return this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+};
+
+Promise.prototype.done = function (didFulfill, didReject, didProgress) {
+ var promise = this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+ promise._setIsFinal();
+};
+
+Promise.prototype.spread = function (didFulfill, didReject) {
+ return this.all()._then(didFulfill, didReject, undefined, APPLY, undefined);
+};
+
+Promise.prototype.isCancellable = function () {
+ return !this.isResolved() &&
+ this._cancellable();
+};
+
+Promise.prototype.toJSON = function () {
+ var ret = {
+ isFulfilled: false,
+ isRejected: false,
+ fulfillmentValue: undefined,
+ rejectionReason: undefined
+ };
+ if (this.isFulfilled()) {
+ ret.fulfillmentValue = this.value();
+ ret.isFulfilled = true;
+ } else if (this.isRejected()) {
+ ret.rejectionReason = this.reason();
+ ret.isRejected = true;
+ }
+ return ret;
+};
+
+Promise.prototype.all = function () {
+ return new PromiseArray(this).promise();
+};
+
+Promise.prototype.error = function (fn) {
+ return this.caught(util.originatesFromRejection, fn);
+};
+
+Promise.is = function (val) {
+ return val instanceof Promise;
+};
+
+Promise.fromNode = function(fn) {
+ var ret = new Promise(INTERNAL);
+ var result = tryCatch(fn)(nodebackForPromise(ret));
+ if (result === errorObj) {
+ ret._rejectCallback(result.e, true, true);
+ }
+ return ret;
+};
+
+Promise.all = function (promises) {
+ return new PromiseArray(promises).promise();
+};
+
+Promise.defer = Promise.pending = function () {
+ var promise = new Promise(INTERNAL);
+ return new PromiseResolver(promise);
+};
+
+Promise.cast = function (obj) {
+ var ret = tryConvertToPromise(obj);
+ if (!(ret instanceof Promise)) {
+ var val = ret;
+ ret = new Promise(INTERNAL);
+ ret._fulfillUnchecked(val);
+ }
+ return ret;
+};
+
+Promise.resolve = Promise.fulfilled = Promise.cast;
+
+Promise.reject = Promise.rejected = function (reason) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._rejectCallback(reason, true);
+ return ret;
+};
+
+Promise.setScheduler = function(fn) {
+ if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ var prev = async._schedule;
+ async._schedule = fn;
+ return prev;
+};
+
+Promise.prototype._then = function (
+ didFulfill,
+ didReject,
+ didProgress,
+ receiver,
+ internalData
+) {
+ var haveInternalData = internalData !== undefined;
+ var ret = haveInternalData ? internalData : new Promise(INTERNAL);
+
+ if (!haveInternalData) {
+ ret._propagateFrom(this, 4 | 1);
+ ret._captureStackTrace();
+ }
+
+ var target = this._target();
+ if (target !== this) {
+ if (receiver === undefined) receiver = this._boundTo;
+ if (!haveInternalData) ret._setIsMigrated();
+ }
+
+ var callbackIndex =
+ target._addCallbacks(didFulfill, didReject, didProgress, ret, receiver);
+
+ if (target._isResolved() && !target._isSettlePromisesQueued()) {
+ async.invoke(
+ target._settlePromiseAtPostResolution, target, callbackIndex);
+ }
+
+ return ret;
+};
+
+Promise.prototype._settlePromiseAtPostResolution = function (index) {
+ if (this._isRejectionUnhandled()) this._unsetRejectionIsUnhandled();
+ this._settlePromiseAt(index);
+};
+
+Promise.prototype._length = function () {
+ return this._bitField & 131071;
+};
+
+Promise.prototype._isFollowingOrFulfilledOrRejected = function () {
+ return (this._bitField & 939524096) > 0;
+};
+
+Promise.prototype._isFollowing = function () {
+ return (this._bitField & 536870912) === 536870912;
+};
+
+Promise.prototype._setLength = function (len) {
+ this._bitField = (this._bitField & -131072) |
+ (len & 131071);
+};
+
+Promise.prototype._setFulfilled = function () {
+ this._bitField = this._bitField | 268435456;
+};
+
+Promise.prototype._setRejected = function () {
+ this._bitField = this._bitField | 134217728;
+};
+
+Promise.prototype._setFollowing = function () {
+ this._bitField = this._bitField | 536870912;
+};
+
+Promise.prototype._setIsFinal = function () {
+ this._bitField = this._bitField | 33554432;
+};
+
+Promise.prototype._isFinal = function () {
+ return (this._bitField & 33554432) > 0;
+};
+
+Promise.prototype._cancellable = function () {
+ return (this._bitField & 67108864) > 0;
+};
+
+Promise.prototype._setCancellable = function () {
+ this._bitField = this._bitField | 67108864;
+};
+
+Promise.prototype._unsetCancellable = function () {
+ this._bitField = this._bitField & (~67108864);
+};
+
+Promise.prototype._setIsMigrated = function () {
+ this._bitField = this._bitField | 4194304;
+};
+
+Promise.prototype._unsetIsMigrated = function () {
+ this._bitField = this._bitField & (~4194304);
+};
+
+Promise.prototype._isMigrated = function () {
+ return (this._bitField & 4194304) > 0;
+};
+
+Promise.prototype._receiverAt = function (index) {
+ var ret = index === 0
+ ? this._receiver0
+ : this[
+ index * 5 - 5 + 4];
+ if (ret === undefined && this._isBound()) {
+ return this._boundTo;
+ }
+ return ret;
+};
+
+Promise.prototype._promiseAt = function (index) {
+ return index === 0
+ ? this._promise0
+ : this[index * 5 - 5 + 3];
+};
+
+Promise.prototype._fulfillmentHandlerAt = function (index) {
+ return index === 0
+ ? this._fulfillmentHandler0
+ : this[index * 5 - 5 + 0];
+};
+
+Promise.prototype._rejectionHandlerAt = function (index) {
+ return index === 0
+ ? this._rejectionHandler0
+ : this[index * 5 - 5 + 1];
+};
+
+Promise.prototype._migrateCallbacks = function (follower, index) {
+ var fulfill = follower._fulfillmentHandlerAt(index);
+ var reject = follower._rejectionHandlerAt(index);
+ var progress = follower._progressHandlerAt(index);
+ var promise = follower._promiseAt(index);
+ var receiver = follower._receiverAt(index);
+ if (promise instanceof Promise) promise._setIsMigrated();
+ this._addCallbacks(fulfill, reject, progress, promise, receiver);
+};
+
+Promise.prototype._addCallbacks = function (
+ fulfill,
+ reject,
+ progress,
+ promise,
+ receiver
+) {
+ var index = this._length();
+
+ if (index >= 131071 - 5) {
+ index = 0;
+ this._setLength(0);
+ }
+
+ if (index === 0) {
+ this._promise0 = promise;
+ if (receiver !== undefined) this._receiver0 = receiver;
+ if (typeof fulfill === "function" && !this._isCarryingStackTrace())
+ this._fulfillmentHandler0 = fulfill;
+ if (typeof reject === "function") this._rejectionHandler0 = reject;
+ if (typeof progress === "function") this._progressHandler0 = progress;
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] = promise;
+ this[base + 4] = receiver;
+ if (typeof fulfill === "function")
+ this[base + 0] = fulfill;
+ if (typeof reject === "function")
+ this[base + 1] = reject;
+ if (typeof progress === "function")
+ this[base + 2] = progress;
+ }
+ this._setLength(index + 1);
+ return index;
+};
+
+Promise.prototype._setProxyHandlers = function (receiver, promiseSlotValue) {
+ var index = this._length();
+
+ if (index >= 131071 - 5) {
+ index = 0;
+ this._setLength(0);
+ }
+ if (index === 0) {
+ this._promise0 = promiseSlotValue;
+ this._receiver0 = receiver;
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] = promiseSlotValue;
+ this[base + 4] = receiver;
+ }
+ this._setLength(index + 1);
+};
+
+Promise.prototype._proxyPromiseArray = function (promiseArray, index) {
+ this._setProxyHandlers(promiseArray, index);
+};
+
+Promise.prototype._resolveCallback = function(value, shouldBind) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ if (value === this)
+ return this._rejectCallback(makeSelfResolutionError(), false, true);
+ var maybePromise = tryConvertToPromise(value, this);
+ if (!(maybePromise instanceof Promise)) return this._fulfill(value);
+
+ var propagationFlags = 1 | (shouldBind ? 4 : 0);
+ this._propagateFrom(maybePromise, propagationFlags);
+ var promise = maybePromise._target();
+ if (promise._isPending()) {
+ var len = this._length();
+ for (var i = 0; i < len; ++i) {
+ promise._migrateCallbacks(this, i);
+ }
+ this._setFollowing();
+ this._setLength(0);
+ this._setFollowee(promise);
+ } else if (promise._isFulfilled()) {
+ this._fulfillUnchecked(promise._value());
+ } else {
+ this._rejectUnchecked(promise._reason(),
+ promise._getCarriedStackTrace());
+ }
+};
+
+Promise.prototype._rejectCallback =
+function(reason, synchronous, shouldNotMarkOriginatingFromRejection) {
+ if (!shouldNotMarkOriginatingFromRejection) {
+ util.markAsOriginatingFromRejection(reason);
+ }
+ var trace = util.ensureErrorObject(reason);
+ var hasStack = trace === reason;
+ this._attachExtraTrace(trace, synchronous ? hasStack : false);
+ this._reject(reason, hasStack ? undefined : trace);
+};
+
+Promise.prototype._resolveFromResolver = function (resolver) {
+ var promise = this;
+ this._captureStackTrace();
+ this._pushContext();
+ var synchronous = true;
+ var r = tryCatch(resolver)(function(value) {
+ if (promise === null) return;
+ promise._resolveCallback(value);
+ promise = null;
+ }, function (reason) {
+ if (promise === null) return;
+ promise._rejectCallback(reason, synchronous);
+ promise = null;
+ });
+ synchronous = false;
+ this._popContext();
+
+ if (r !== undefined && r === errorObj && promise !== null) {
+ promise._rejectCallback(r.e, true, true);
+ promise = null;
+ }
+};
+
+Promise.prototype._settlePromiseFromHandler = function (
+ handler, receiver, value, promise
+) {
+ if (promise._isRejected()) return;
+ promise._pushContext();
+ var x;
+ if (receiver === APPLY && !this._isRejected()) {
+ x = tryCatch(handler).apply(this._boundTo, value);
+ } else {
+ x = tryCatch(handler).call(receiver, value);
+ }
+ promise._popContext();
+
+ if (x === errorObj || x === promise || x === NEXT_FILTER) {
+ var err = x === promise ? makeSelfResolutionError() : x.e;
+ promise._rejectCallback(err, false, true);
+ } else {
+ promise._resolveCallback(x);
+ }
+};
+
+Promise.prototype._target = function() {
+ var ret = this;
+ while (ret._isFollowing()) ret = ret._followee();
+ return ret;
+};
+
+Promise.prototype._followee = function() {
+ return this._rejectionHandler0;
+};
+
+Promise.prototype._setFollowee = function(promise) {
+ this._rejectionHandler0 = promise;
+};
+
+Promise.prototype._cleanValues = function () {
+ if (this._cancellable()) {
+ this._cancellationParent = undefined;
+ }
+};
+
+Promise.prototype._propagateFrom = function (parent, flags) {
+ if ((flags & 1) > 0 && parent._cancellable()) {
+ this._setCancellable();
+ this._cancellationParent = parent;
+ }
+ if ((flags & 4) > 0 && parent._isBound()) {
+ this._setBoundTo(parent._boundTo);
+ }
+};
+
+Promise.prototype._fulfill = function (value) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._fulfillUnchecked(value);
+};
+
+Promise.prototype._reject = function (reason, carriedStackTrace) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._rejectUnchecked(reason, carriedStackTrace);
+};
+
+Promise.prototype._settlePromiseAt = function (index) {
+ var promise = this._promiseAt(index);
+ var isPromise = promise instanceof Promise;
+
+ if (isPromise && promise._isMigrated()) {
+ promise._unsetIsMigrated();
+ return async.invoke(this._settlePromiseAt, this, index);
+ }
+ var handler = this._isFulfilled()
+ ? this._fulfillmentHandlerAt(index)
+ : this._rejectionHandlerAt(index);
+
+ var carriedStackTrace =
+ this._isCarryingStackTrace() ? this._getCarriedStackTrace() : undefined;
+ var value = this._settledValue;
+ var receiver = this._receiverAt(index);
+
+
+ this._clearCallbackDataAtIndex(index);
+
+ if (typeof handler === "function") {
+ if (!isPromise) {
+ handler.call(receiver, value, promise);
+ } else {
+ this._settlePromiseFromHandler(handler, receiver, value, promise);
+ }
+ } else if (receiver instanceof PromiseArray) {
+ if (!receiver._isResolved()) {
+ if (this._isFulfilled()) {
+ receiver._promiseFulfilled(value, promise);
+ }
+ else {
+ receiver._promiseRejected(value, promise);
+ }
+ }
+ } else if (isPromise) {
+ if (this._isFulfilled()) {
+ promise._fulfill(value);
+ } else {
+ promise._reject(value, carriedStackTrace);
+ }
+ }
+
+ if (index >= 4 && (index & 31) === 4)
+ async.invokeLater(this._setLength, this, 0);
+};
+
+Promise.prototype._clearCallbackDataAtIndex = function(index) {
+ if (index === 0) {
+ if (!this._isCarryingStackTrace()) {
+ this._fulfillmentHandler0 = undefined;
+ }
+ this._rejectionHandler0 =
+ this._progressHandler0 =
+ this._receiver0 =
+ this._promise0 = undefined;
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] =
+ this[base + 4] =
+ this[base + 0] =
+ this[base + 1] =
+ this[base + 2] = undefined;
+ }
+};
+
+Promise.prototype._isSettlePromisesQueued = function () {
+ return (this._bitField &
+ -1073741824) === -1073741824;
+};
+
+Promise.prototype._setSettlePromisesQueued = function () {
+ this._bitField = this._bitField | -1073741824;
+};
+
+Promise.prototype._unsetSettlePromisesQueued = function () {
+ this._bitField = this._bitField & (~-1073741824);
+};
+
+Promise.prototype._queueSettlePromises = function() {
+ async.settlePromises(this);
+ this._setSettlePromisesQueued();
+};
+
+Promise.prototype._fulfillUnchecked = function (value) {
+ if (value === this) {
+ var err = makeSelfResolutionError();
+ this._attachExtraTrace(err);
+ return this._rejectUnchecked(err, undefined);
+ }
+ this._setFulfilled();
+ this._settledValue = value;
+ this._cleanValues();
+
+ if (this._length() > 0) {
+ this._queueSettlePromises();
+ }
+};
+
+Promise.prototype._rejectUncheckedCheckError = function (reason) {
+ var trace = util.ensureErrorObject(reason);
+ this._rejectUnchecked(reason, trace === reason ? undefined : trace);
+};
+
+Promise.prototype._rejectUnchecked = function (reason, trace) {
+ if (reason === this) {
+ var err = makeSelfResolutionError();
+ this._attachExtraTrace(err);
+ return this._rejectUnchecked(err);
+ }
+ this._setRejected();
+ this._settledValue = reason;
+ this._cleanValues();
+
+ if (this._isFinal()) {
+ async.throwLater(function(e) {
+ if ("stack" in e) {
+ async.invokeFirst(
+ CapturedTrace.unhandledRejection, undefined, e);
+ }
+ throw e;
+ }, trace === undefined ? reason : trace);
+ return;
+ }
+
+ if (trace !== undefined && trace !== reason) {
+ this._setCarriedStackTrace(trace);
+ }
+
+ if (this._length() > 0) {
+ this._queueSettlePromises();
+ } else {
+ this._ensurePossibleRejectionHandled();
+ }
+};
+
+Promise.prototype._settlePromises = function () {
+ this._unsetSettlePromisesQueued();
+ var len = this._length();
+ for (var i = 0; i < len; i++) {
+ this._settlePromiseAt(i);
+ }
+};
+
+Promise._makeSelfResolutionError = makeSelfResolutionError;
+_dereq_("./progress.js")(Promise, PromiseArray);
+_dereq_("./method.js")(Promise, INTERNAL, tryConvertToPromise, apiRejection);
+_dereq_("./bind.js")(Promise, INTERNAL, tryConvertToPromise);
+_dereq_("./finally.js")(Promise, NEXT_FILTER, tryConvertToPromise);
+_dereq_("./direct_resolve.js")(Promise);
+_dereq_("./synchronous_inspection.js")(Promise);
+_dereq_("./join.js")(Promise, PromiseArray, tryConvertToPromise, INTERNAL);
+Promise.Promise = Promise;
+_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);
+_dereq_('./cancel.js')(Promise);
+_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext);
+_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise);
+_dereq_('./nodeify.js')(Promise);
+_dereq_('./call_get.js')(Promise);
+_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);
+_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);
+_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);
+_dereq_('./settle.js')(Promise, PromiseArray);
+_dereq_('./some.js')(Promise, PromiseArray, apiRejection);
+_dereq_('./promisify.js')(Promise, INTERNAL);
+_dereq_('./any.js')(Promise);
+_dereq_('./each.js')(Promise, INTERNAL);
+_dereq_('./timers.js')(Promise, INTERNAL);
+_dereq_('./filter.js')(Promise, INTERNAL);
+
+ util.toFastProperties(Promise);
+ util.toFastProperties(Promise.prototype);
+ function fillTypes(value) {
+ var p = new Promise(INTERNAL);
+ p._fulfillmentHandler0 = value;
+ p._rejectionHandler0 = value;
+ p._progressHandler0 = value;
+ p._promise0 = value;
+ p._receiver0 = value;
+ p._settledValue = value;
+ }
+ // Complete slack tracking, opt out of field-type tracking and
+ // stabilize map
+ fillTypes({a: 1});
+ fillTypes({b: 2});
+ fillTypes({c: 3});
+ fillTypes(1);
+ fillTypes(function(){});
+ fillTypes(undefined);
+ fillTypes(false);
+ fillTypes(new Promise(INTERNAL));
+ CapturedTrace.setBounds(async.firstLineError, util.lastLineError);
+ return Promise;
+
+};
+
+},{"./any.js":1,"./async.js":2,"./bind.js":3,"./call_get.js":5,"./cancel.js":6,"./captured_trace.js":7,"./catch_filter.js":8,"./context.js":9,"./debuggability.js":10,"./direct_resolve.js":11,"./each.js":12,"./errors.js":13,"./filter.js":15,"./finally.js":16,"./generators.js":17,"./join.js":18,"./map.js":19,"./method.js":20,"./nodeify.js":21,"./progress.js":22,"./promise_array.js":24,"./promise_resolver.js":25,"./promisify.js":26,"./props.js":27,"./race.js":29,"./reduce.js":30,"./settle.js":32,"./some.js":33,"./synchronous_inspection.js":34,"./thenables.js":35,"./timers.js":36,"./using.js":37,"./util.js":38}],24:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise,
+ apiRejection) {
+var util = _dereq_("./util.js");
+var isArray = util.isArray;
+
+function toResolutionValue(val) {
+ switch(val) {
+ case -2: return [];
+ case -3: return {};
+ }
+}
+
+function PromiseArray(values) {
+ var promise = this._promise = new Promise(INTERNAL);
+ var parent;
+ if (values instanceof Promise) {
+ parent = values;
+ promise._propagateFrom(parent, 1 | 4);
+ }
+ this._values = values;
+ this._length = 0;
+ this._totalResolved = 0;
+ this._init(undefined, -2);
+}
+PromiseArray.prototype.length = function () {
+ return this._length;
+};
+
+PromiseArray.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
+ var values = tryConvertToPromise(this._values, this._promise);
+ if (values instanceof Promise) {
+ values = values._target();
+ this._values = values;
+ if (values._isFulfilled()) {
+ values = values._value();
+ if (!isArray(values)) {
+ var err = new Promise.TypeError("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a");
+ this.__hardReject__(err);
+ return;
+ }
+ } else if (values._isPending()) {
+ values._then(
+ init,
+ this._reject,
+ undefined,
+ this,
+ resolveValueIfEmpty
+ );
+ return;
+ } else {
+ this._reject(values._reason());
+ return;
+ }
+ } else if (!isArray(values)) {
+ this._promise._reject(apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a")._reason());
+ return;
+ }
+
+ if (values.length === 0) {
+ if (resolveValueIfEmpty === -5) {
+ this._resolveEmptyArray();
+ }
+ else {
+ this._resolve(toResolutionValue(resolveValueIfEmpty));
+ }
+ return;
+ }
+ var len = this.getActualLength(values.length);
+ this._length = len;
+ this._values = this.shouldCopyValues() ? new Array(len) : this._values;
+ var promise = this._promise;
+ for (var i = 0; i < len; ++i) {
+ var isResolved = this._isResolved();
+ var maybePromise = tryConvertToPromise(values[i], promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (isResolved) {
+ maybePromise._unsetRejectionIsUnhandled();
+ } else if (maybePromise._isPending()) {
+ maybePromise._proxyPromiseArray(this, i);
+ } else if (maybePromise._isFulfilled()) {
+ this._promiseFulfilled(maybePromise._value(), i);
+ } else {
+ this._promiseRejected(maybePromise._reason(), i);
+ }
+ } else if (!isResolved) {
+ this._promiseFulfilled(maybePromise, i);
+ }
+ }
+};
+
+PromiseArray.prototype._isResolved = function () {
+ return this._values === null;
+};
+
+PromiseArray.prototype._resolve = function (value) {
+ this._values = null;
+ this._promise._fulfill(value);
+};
+
+PromiseArray.prototype.__hardReject__ =
+PromiseArray.prototype._reject = function (reason) {
+ this._values = null;
+ this._promise._rejectCallback(reason, false, true);
+};
+
+PromiseArray.prototype._promiseProgressed = function (progressValue, index) {
+ this._promise._progress({
+ index: index,
+ value: progressValue
+ });
+};
+
+
+PromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ }
+};
+
+PromiseArray.prototype._promiseRejected = function (reason, index) {
+ this._totalResolved++;
+ this._reject(reason);
+};
+
+PromiseArray.prototype.shouldCopyValues = function () {
+ return true;
+};
+
+PromiseArray.prototype.getActualLength = function (len) {
+ return len;
+};
+
+return PromiseArray;
+};
+
+},{"./util.js":38}],25:[function(_dereq_,module,exports){
+"use strict";
+var util = _dereq_("./util.js");
+var maybeWrapAsError = util.maybeWrapAsError;
+var errors = _dereq_("./errors.js");
+var TimeoutError = errors.TimeoutError;
+var OperationalError = errors.OperationalError;
+var haveGetters = util.haveGetters;
+var es5 = _dereq_("./es5.js");
+
+function isUntypedError(obj) {
+ return obj instanceof Error &&
+ es5.getPrototypeOf(obj) === Error.prototype;
+}
+
+var rErrorKey = /^(?:name|message|stack|cause)$/;
+function wrapAsOperationalError(obj) {
+ var ret;
+ if (isUntypedError(obj)) {
+ ret = new OperationalError(obj);
+ ret.name = obj.name;
+ ret.message = obj.message;
+ ret.stack = obj.stack;
+ var keys = es5.keys(obj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (!rErrorKey.test(key)) {
+ ret[key] = obj[key];
+ }
+ }
+ return ret;
+ }
+ util.markAsOriginatingFromRejection(obj);
+ return obj;
+}
+
+function nodebackForPromise(promise) {
+ return function(err, value) {
+ if (promise === null) return;
+
+ if (err) {
+ var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
+ promise._attachExtraTrace(wrapped);
+ promise._reject(wrapped);
+ } else if (arguments.length > 2) {
+ var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
+ promise._fulfill(args);
+ } else {
+ promise._fulfill(value);
+ }
+
+ promise = null;
+ };
+}
+
+
+var PromiseResolver;
+if (!haveGetters) {
+ PromiseResolver = function (promise) {
+ this.promise = promise;
+ this.asCallback = nodebackForPromise(promise);
+ this.callback = this.asCallback;
+ };
+}
+else {
+ PromiseResolver = function (promise) {
+ this.promise = promise;
+ };
+}
+if (haveGetters) {
+ var prop = {
+ get: function() {
+ return nodebackForPromise(this.promise);
+ }
+ };
+ es5.defineProperty(PromiseResolver.prototype, "asCallback", prop);
+ es5.defineProperty(PromiseResolver.prototype, "callback", prop);
+}
+
+PromiseResolver._nodebackForPromise = nodebackForPromise;
+
+PromiseResolver.prototype.toString = function () {
+ return "[object PromiseResolver]";
+};
+
+PromiseResolver.prototype.resolve =
+PromiseResolver.prototype.fulfill = function (value) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._resolveCallback(value);
+};
+
+PromiseResolver.prototype.reject = function (reason) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._rejectCallback(reason);
+};
+
+PromiseResolver.prototype.progress = function (value) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._progress(value);
+};
+
+PromiseResolver.prototype.cancel = function (err) {
+ this.promise.cancel(err);
+};
+
+PromiseResolver.prototype.timeout = function () {
+ this.reject(new TimeoutError("timeout"));
+};
+
+PromiseResolver.prototype.isResolved = function () {
+ return this.promise.isResolved();
+};
+
+PromiseResolver.prototype.toJSON = function () {
+ return this.promise.toJSON();
+};
+
+module.exports = PromiseResolver;
+
+},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var THIS = {};
+var util = _dereq_("./util.js");
+var nodebackForPromise = _dereq_("./promise_resolver.js")
+ ._nodebackForPromise;
+var withAppended = util.withAppended;
+var maybeWrapAsError = util.maybeWrapAsError;
+var canEvaluate = util.canEvaluate;
+var TypeError = _dereq_("./errors").TypeError;
+var defaultSuffix = "Async";
+var defaultPromisified = {__isPromisified__: true};
+var noCopyPropsPattern =
+ /^(?:length|name|arguments|caller|callee|prototype|__isPromisified__)$/;
+var defaultFilter = function(name, func) {
+ return util.isIdentifier(name) &&
+ name.charAt(0) !== "_" &&
+ !util.isClass(func);
+};
+
+function propsFilter(key) {
+ return !noCopyPropsPattern.test(key);
+}
+
+function isPromisified(fn) {
+ try {
+ return fn.__isPromisified__ === true;
+ }
+ catch (e) {
+ return false;
+ }
+}
+
+function hasPromisified(obj, key, suffix) {
+ var val = util.getDataPropertyOrDefault(obj, key + suffix,
+ defaultPromisified);
+ return val ? isPromisified(val) : false;
+}
+function checkValid(ret, suffix, suffixRegexp) {
+ for (var i = 0; i < ret.length; i += 2) {
+ var key = ret[i];
+ if (suffixRegexp.test(key)) {
+ var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
+ for (var j = 0; j < ret.length; j += 2) {
+ if (ret[j] === keyWithoutAsyncSuffix) {
+ throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/iWrZbw\u000a"
+ .replace("%s", suffix));
+ }
+ }
+ }
+ }
+}
+
+function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
+ var keys = util.inheritedDataKeys(obj);
+ var ret = [];
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var value = obj[key];
+ var passesDefaultFilter = filter === defaultFilter
+ ? true : defaultFilter(key, value, obj);
+ if (typeof value === "function" &&
+ !isPromisified(value) &&
+ !hasPromisified(obj, key, suffix) &&
+ filter(key, value, obj, passesDefaultFilter)) {
+ ret.push(key, value);
+ }
+ }
+ checkValid(ret, suffix, suffixRegexp);
+ return ret;
+}
+
+var escapeIdentRegex = function(str) {
+ return str.replace(/([$])/, "\\$");
+};
+
+var makeNodePromisifiedEval;
+if (!true) {
+var switchCaseArgumentOrder = function(likelyArgumentCount) {
+ var ret = [likelyArgumentCount];
+ var min = Math.max(0, likelyArgumentCount - 1 - 3);
+ for(var i = likelyArgumentCount - 1; i >= min; --i) {
+ ret.push(i);
+ }
+ for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
+ ret.push(i);
+ }
+ return ret;
+};
+
+var argumentSequence = function(argumentCount) {
+ return util.filledRange(argumentCount, "_arg", "");
+};
+
+var parameterDeclaration = function(parameterCount) {
+ return util.filledRange(
+ Math.max(parameterCount, 3), "_arg", "");
+};
+
+var parameterCount = function(fn) {
+ if (typeof fn.length === "number") {
+ return Math.max(Math.min(fn.length, 1023 + 1), 0);
+ }
+ return 0;
+};
+
+makeNodePromisifiedEval =
+function(callback, receiver, originalName, fn) {
+ var newParameterCount = Math.max(0, parameterCount(fn) - 1);
+ var argumentOrder = switchCaseArgumentOrder(newParameterCount);
+ var shouldProxyThis = typeof callback === "string" || receiver === THIS;
+
+ function generateCallForArgumentCount(count) {
+ var args = argumentSequence(count).join(", ");
+ var comma = count > 0 ? ", " : "";
+ var ret;
+ if (shouldProxyThis) {
+ ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
+ } else {
+ ret = receiver === undefined
+ ? "ret = callback({{args}}, nodeback); break;\n"
+ : "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
+ }
+ return ret.replace("{{args}}", args).replace(", ", comma);
+ }
+
+ function generateArgumentSwitchCase() {
+ var ret = "";
+ for (var i = 0; i < argumentOrder.length; ++i) {
+ ret += "case " + argumentOrder[i] +":" +
+ generateCallForArgumentCount(argumentOrder[i]);
+ }
+
+ ret += " \n\
+ default: \n\
+ var args = new Array(len + 1); \n\
+ var i = 0; \n\
+ for (var i = 0; i < len; ++i) { \n\
+ args[i] = arguments[i]; \n\
+ } \n\
+ args[i] = nodeback; \n\
+ [CodeForCall] \n\
+ break; \n\
+ ".replace("[CodeForCall]", (shouldProxyThis
+ ? "ret = callback.apply(this, args);\n"
+ : "ret = callback.apply(receiver, args);\n"));
+ return ret;
+ }
+
+ var getFunctionCode = typeof callback === "string"
+ ? ("this != null ? this['"+callback+"'] : fn")
+ : "fn";
+
+ return new Function("Promise",
+ "fn",
+ "receiver",
+ "withAppended",
+ "maybeWrapAsError",
+ "nodebackForPromise",
+ "tryCatch",
+ "errorObj",
+ "INTERNAL","'use strict'; \n\
+ var ret = function (Parameters) { \n\
+ 'use strict'; \n\
+ var len = arguments.length; \n\
+ var promise = new Promise(INTERNAL); \n\
+ promise._captureStackTrace(); \n\
+ var nodeback = nodebackForPromise(promise); \n\
+ var ret; \n\
+ var callback = tryCatch([GetFunctionCode]); \n\
+ switch(len) { \n\
+ [CodeForSwitchCase] \n\
+ } \n\
+ if (ret === errorObj) { \n\
+ promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
+ } \n\
+ return promise; \n\
+ }; \n\
+ ret.__isPromisified__ = true; \n\
+ return ret; \n\
+ "
+ .replace("Parameters", parameterDeclaration(newParameterCount))
+ .replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
+ .replace("[GetFunctionCode]", getFunctionCode))(
+ Promise,
+ fn,
+ receiver,
+ withAppended,
+ maybeWrapAsError,
+ nodebackForPromise,
+ util.tryCatch,
+ util.errorObj,
+ INTERNAL
+ );
+};
+}
+
+function makeNodePromisifiedClosure(callback, receiver, _, fn) {
+ var defaultThis = (function() {return this;})();
+ var method = callback;
+ if (typeof method === "string") {
+ callback = fn;
+ }
+ function promisified() {
+ var _receiver = receiver;
+ if (receiver === THIS) _receiver = this;
+ var promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ var cb = typeof method === "string" && this !== defaultThis
+ ? this[method] : callback;
+ var fn = nodebackForPromise(promise);
+ try {
+ cb.apply(_receiver, withAppended(arguments, fn));
+ } catch(e) {
+ promise._rejectCallback(maybeWrapAsError(e), true, true);
+ }
+ return promise;
+ }
+ promisified.__isPromisified__ = true;
+ return promisified;
+}
+
+var makeNodePromisified = canEvaluate
+ ? makeNodePromisifiedEval
+ : makeNodePromisifiedClosure;
+
+function promisifyAll(obj, suffix, filter, promisifier) {
+ var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
+ var methods =
+ promisifiableMethods(obj, suffix, suffixRegexp, filter);
+
+ for (var i = 0, len = methods.length; i < len; i+= 2) {
+ var key = methods[i];
+ var fn = methods[i+1];
+ var promisifiedKey = key + suffix;
+ obj[promisifiedKey] = promisifier === makeNodePromisified
+ ? makeNodePromisified(key, THIS, key, fn, suffix)
+ : promisifier(fn, function() {
+ return makeNodePromisified(key, THIS, key, fn, suffix);
+ });
+ }
+ util.toFastProperties(obj);
+ return obj;
+}
+
+function promisify(callback, receiver) {
+ return makeNodePromisified(callback, receiver, undefined, callback);
+}
+
+Promise.promisify = function (fn, receiver) {
+ if (typeof fn !== "function") {
+ throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ if (isPromisified(fn)) {
+ return fn;
+ }
+ var ret = promisify(fn, arguments.length < 2 ? THIS : receiver);
+ util.copyDescriptors(fn, ret, propsFilter);
+ return ret;
+};
+
+Promise.promisifyAll = function (target, options) {
+ if (typeof target !== "function" && typeof target !== "object") {
+ throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/9ITlV0\u000a");
+ }
+ options = Object(options);
+ var suffix = options.suffix;
+ if (typeof suffix !== "string") suffix = defaultSuffix;
+ var filter = options.filter;
+ if (typeof filter !== "function") filter = defaultFilter;
+ var promisifier = options.promisifier;
+ if (typeof promisifier !== "function") promisifier = makeNodePromisified;
+
+ if (!util.isIdentifier(suffix)) {
+ throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/8FZo5V\u000a");
+ }
+
+ var keys = util.inheritedDataKeys(target);
+ for (var i = 0; i < keys.length; ++i) {
+ var value = target[keys[i]];
+ if (keys[i] !== "constructor" &&
+ util.isClass(value)) {
+ promisifyAll(value.prototype, suffix, filter, promisifier);
+ promisifyAll(value, suffix, filter, promisifier);
+ }
+ }
+
+ return promisifyAll(target, suffix, filter, promisifier);
+};
+};
+
+
+},{"./errors":13,"./promise_resolver.js":25,"./util.js":38}],27:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(
+ Promise, PromiseArray, tryConvertToPromise, apiRejection) {
+var util = _dereq_("./util.js");
+var isObject = util.isObject;
+var es5 = _dereq_("./es5.js");
+
+function PropertiesPromiseArray(obj) {
+ var keys = es5.keys(obj);
+ var len = keys.length;
+ var values = new Array(len * 2);
+ for (var i = 0; i < len; ++i) {
+ var key = keys[i];
+ values[i] = obj[key];
+ values[i + len] = key;
+ }
+ this.constructor$(values);
+}
+util.inherits(PropertiesPromiseArray, PromiseArray);
+
+PropertiesPromiseArray.prototype._init = function () {
+ this._init$(undefined, -3) ;
+};
+
+PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ var val = {};
+ var keyOffset = this.length();
+ for (var i = 0, len = this.length(); i < len; ++i) {
+ val[this._values[i + keyOffset]] = this._values[i];
+ }
+ this._resolve(val);
+ }
+};
+
+PropertiesPromiseArray.prototype._promiseProgressed = function (value, index) {
+ this._promise._progress({
+ key: this._values[index + this.length()],
+ value: value
+ });
+};
+
+PropertiesPromiseArray.prototype.shouldCopyValues = function () {
+ return false;
+};
+
+PropertiesPromiseArray.prototype.getActualLength = function (len) {
+ return len >> 1;
+};
+
+function props(promises) {
+ var ret;
+ var castValue = tryConvertToPromise(promises);
+
+ if (!isObject(castValue)) {
+ return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/OsFKC8\u000a");
+ } else if (castValue instanceof Promise) {
+ ret = castValue._then(
+ Promise.props, undefined, undefined, undefined, undefined);
+ } else {
+ ret = new PropertiesPromiseArray(castValue).promise();
+ }
+
+ if (castValue instanceof Promise) {
+ ret._propagateFrom(castValue, 4);
+ }
+ return ret;
+}
+
+Promise.prototype.props = function () {
+ return props(this);
+};
+
+Promise.props = function (promises) {
+ return props(promises);
+};
+};
+
+},{"./es5.js":14,"./util.js":38}],28:[function(_dereq_,module,exports){
+"use strict";
+function arrayMove(src, srcIndex, dst, dstIndex, len) {
+ for (var j = 0; j < len; ++j) {
+ dst[j + dstIndex] = src[j + srcIndex];
+ src[j + srcIndex] = void 0;
+ }
+}
+
+function Queue(capacity) {
+ this._capacity = capacity;
+ this._length = 0;
+ this._front = 0;
+}
+
+Queue.prototype._willBeOverCapacity = function (size) {
+ return this._capacity < size;
+};
+
+Queue.prototype._pushOne = function (arg) {
+ var length = this.length();
+ this._checkCapacity(length + 1);
+ var i = (this._front + length) & (this._capacity - 1);
+ this[i] = arg;
+ this._length = length + 1;
+};
+
+Queue.prototype._unshiftOne = function(value) {
+ var capacity = this._capacity;
+ this._checkCapacity(this.length() + 1);
+ var front = this._front;
+ var i = (((( front - 1 ) &
+ ( capacity - 1) ) ^ capacity ) - capacity );
+ this[i] = value;
+ this._front = i;
+ this._length = this.length() + 1;
+};
+
+Queue.prototype.unshift = function(fn, receiver, arg) {
+ this._unshiftOne(arg);
+ this._unshiftOne(receiver);
+ this._unshiftOne(fn);
+};
+
+Queue.prototype.push = function (fn, receiver, arg) {
+ var length = this.length() + 3;
+ if (this._willBeOverCapacity(length)) {
+ this._pushOne(fn);
+ this._pushOne(receiver);
+ this._pushOne(arg);
+ return;
+ }
+ var j = this._front + length - 3;
+ this._checkCapacity(length);
+ var wrapMask = this._capacity - 1;
+ this[(j + 0) & wrapMask] = fn;
+ this[(j + 1) & wrapMask] = receiver;
+ this[(j + 2) & wrapMask] = arg;
+ this._length = length;
+};
+
+Queue.prototype.shift = function () {
+ var front = this._front,
+ ret = this[front];
+
+ this[front] = undefined;
+ this._front = (front + 1) & (this._capacity - 1);
+ this._length--;
+ return ret;
+};
+
+Queue.prototype.length = function () {
+ return this._length;
+};
+
+Queue.prototype._checkCapacity = function (size) {
+ if (this._capacity < size) {
+ this._resizeTo(this._capacity << 1);
+ }
+};
+
+Queue.prototype._resizeTo = function (capacity) {
+ var oldCapacity = this._capacity;
+ this._capacity = capacity;
+ var front = this._front;
+ var length = this._length;
+ var moveItemsCount = (front + length) & (oldCapacity - 1);
+ arrayMove(this, 0, this, oldCapacity, moveItemsCount);
+};
+
+module.exports = Queue;
+
+},{}],29:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(
+ Promise, INTERNAL, tryConvertToPromise, apiRejection) {
+var isArray = _dereq_("./util.js").isArray;
+
+var raceLater = function (promise) {
+ return promise.then(function(array) {
+ return race(array, promise);
+ });
+};
+
+function race(promises, parent) {
+ var maybePromise = tryConvertToPromise(promises);
+
+ if (maybePromise instanceof Promise) {
+ return raceLater(maybePromise);
+ } else if (!isArray(promises)) {
+ return apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a");
+ }
+
+ var ret = new Promise(INTERNAL);
+ if (parent !== undefined) {
+ ret._propagateFrom(parent, 4 | 1);
+ }
+ var fulfill = ret._fulfill;
+ var reject = ret._reject;
+ for (var i = 0, len = promises.length; i < len; ++i) {
+ var val = promises[i];
+
+ if (val === undefined && !(i in promises)) {
+ continue;
+ }
+
+ Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
+ }
+ return ret;
+}
+
+Promise.race = function (promises) {
+ return race(promises, undefined);
+};
+
+Promise.prototype.race = function () {
+ return race(this, undefined);
+};
+
+};
+
+},{"./util.js":38}],30:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL) {
+var async = _dereq_("./async.js");
+var util = _dereq_("./util.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+function ReductionPromiseArray(promises, fn, accum, _each) {
+ this.constructor$(promises);
+ this._promise._captureStackTrace();
+ this._preservedValues = _each === INTERNAL ? [] : null;
+ this._zerothIsAccum = (accum === undefined);
+ this._gotAccum = false;
+ this._reducingIndex = (this._zerothIsAccum ? 1 : 0);
+ this._valuesPhase = undefined;
+ var maybePromise = tryConvertToPromise(accum, this._promise);
+ var rejected = false;
+ var isPromise = maybePromise instanceof Promise;
+ if (isPromise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ maybePromise._proxyPromiseArray(this, -1);
+ } else if (maybePromise._isFulfilled()) {
+ accum = maybePromise._value();
+ this._gotAccum = true;
+ } else {
+ this._reject(maybePromise._reason());
+ rejected = true;
+ }
+ }
+ if (!(isPromise || this._zerothIsAccum)) this._gotAccum = true;
+ this._callback = fn;
+ this._accum = accum;
+ if (!rejected) async.invoke(init, this, undefined);
+}
+function init() {
+ this._init$(undefined, -5);
+}
+util.inherits(ReductionPromiseArray, PromiseArray);
+
+ReductionPromiseArray.prototype._init = function () {};
+
+ReductionPromiseArray.prototype._resolveEmptyArray = function () {
+ if (this._gotAccum || this._zerothIsAccum) {
+ this._resolve(this._preservedValues !== null
+ ? [] : this._accum);
+ }
+};
+
+ReductionPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var values = this._values;
+ values[index] = value;
+ var length = this.length();
+ var preservedValues = this._preservedValues;
+ var isEach = preservedValues !== null;
+ var gotAccum = this._gotAccum;
+ var valuesPhase = this._valuesPhase;
+ var valuesPhaseIndex;
+ if (!valuesPhase) {
+ valuesPhase = this._valuesPhase = new Array(length);
+ for (valuesPhaseIndex=0; valuesPhaseIndex<length; ++valuesPhaseIndex) {
+ valuesPhase[valuesPhaseIndex] = 0;
+ }
+ }
+ valuesPhaseIndex = valuesPhase[index];
+
+ if (index === 0 && this._zerothIsAccum) {
+ this._accum = value;
+ this._gotAccum = gotAccum = true;
+ valuesPhase[index] = ((valuesPhaseIndex === 0)
+ ? 1 : 2);
+ } else if (index === -1) {
+ this._accum = value;
+ this._gotAccum = gotAccum = true;
+ } else {
+ if (valuesPhaseIndex === 0) {
+ valuesPhase[index] = 1;
+ } else {
+ valuesPhase[index] = 2;
+ this._accum = value;
+ }
+ }
+ if (!gotAccum) return;
+
+ var callback = this._callback;
+ var receiver = this._promise._boundTo;
+ var ret;
+
+ for (var i = this._reducingIndex; i < length; ++i) {
+ valuesPhaseIndex = valuesPhase[i];
+ if (valuesPhaseIndex === 2) {
+ this._reducingIndex = i + 1;
+ continue;
+ }
+ if (valuesPhaseIndex !== 1) return;
+ value = values[i];
+ this._promise._pushContext();
+ if (isEach) {
+ preservedValues.push(value);
+ ret = tryCatch(callback).call(receiver, value, i, length);
+ }
+ else {
+ ret = tryCatch(callback)
+ .call(receiver, this._accum, value, i, length);
+ }
+ this._promise._popContext();
+
+ if (ret === errorObj) return this._reject(ret.e);
+
+ var maybePromise = tryConvertToPromise(ret, this._promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ valuesPhase[i] = 4;
+ return maybePromise._proxyPromiseArray(this, i);
+ } else if (maybePromise._isFulfilled()) {
+ ret = maybePromise._value();
+ } else {
+ return this._reject(maybePromise._reason());
+ }
+ }
+
+ this._reducingIndex = i + 1;
+ this._accum = ret;
+ }
+
+ this._resolve(isEach ? preservedValues : this._accum);
+};
+
+function reduce(promises, fn, initialValue, _each) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
+ return array.promise();
+}
+
+Promise.prototype.reduce = function (fn, initialValue) {
+ return reduce(this, fn, initialValue, null);
+};
+
+Promise.reduce = function (promises, fn, initialValue, _each) {
+ return reduce(promises, fn, initialValue, _each);
+};
+};
+
+},{"./async.js":2,"./util.js":38}],31:[function(_dereq_,module,exports){
+"use strict";
+var schedule;
+var noAsyncScheduler = function() {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a");
+};
+if (_dereq_("./util.js").isNode) {
+ var version = process.versions.node.split(".").map(Number);
+ schedule = (version[0] === 0 && version[1] > 10) || (version[0] > 0)
+ ? global.setImmediate : process.nextTick;
+
+ if (!schedule) {
+ if (typeof setImmediate !== "undefined") {
+ schedule = setImmediate;
+ } else if (typeof setTimeout !== "undefined") {
+ schedule = setTimeout;
+ } else {
+ schedule = noAsyncScheduler;
+ }
+ }
+} else if (typeof MutationObserver !== "undefined") {
+ schedule = function(fn) {
+ var div = document.createElement("div");
+ var observer = new MutationObserver(fn);
+ observer.observe(div, {attributes: true});
+ return function() { div.classList.toggle("foo"); };
+ };
+ schedule.isStatic = true;
+} else if (typeof setImmediate !== "undefined") {
+ schedule = function (fn) {
+ setImmediate(fn);
+ };
+} else if (typeof setTimeout !== "undefined") {
+ schedule = function (fn) {
+ setTimeout(fn, 0);
+ };
+} else {
+ schedule = noAsyncScheduler;
+}
+module.exports = schedule;
+
+},{"./util.js":38}],32:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+ function(Promise, PromiseArray) {
+var PromiseInspection = Promise.PromiseInspection;
+var util = _dereq_("./util.js");
+
+function SettledPromiseArray(values) {
+ this.constructor$(values);
+}
+util.inherits(SettledPromiseArray, PromiseArray);
+
+SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
+ this._values[index] = inspection;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ }
+};
+
+SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 268435456;
+ ret._settledValue = value;
+ this._promiseResolved(index, ret);
+};
+SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 134217728;
+ ret._settledValue = reason;
+ this._promiseResolved(index, ret);
+};
+
+Promise.settle = function (promises) {
+ return new SettledPromiseArray(promises).promise();
+};
+
+Promise.prototype.settle = function () {
+ return new SettledPromiseArray(this).promise();
+};
+};
+
+},{"./util.js":38}],33:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+function(Promise, PromiseArray, apiRejection) {
+var util = _dereq_("./util.js");
+var RangeError = _dereq_("./errors.js").RangeError;
+var AggregateError = _dereq_("./errors.js").AggregateError;
+var isArray = util.isArray;
+
+
+function SomePromiseArray(values) {
+ this.constructor$(values);
+ this._howMany = 0;
+ this._unwrap = false;
+ this._initialized = false;
+}
+util.inherits(SomePromiseArray, PromiseArray);
+
+SomePromiseArray.prototype._init = function () {
+ if (!this._initialized) {
+ return;
+ }
+ if (this._howMany === 0) {
+ this._resolve([]);
+ return;
+ }
+ this._init$(undefined, -5);
+ var isArrayResolved = isArray(this._values);
+ if (!this._isResolved() &&
+ isArrayResolved &&
+ this._howMany > this._canPossiblyFulfill()) {
+ this._reject(this._getRangeError(this.length()));
+ }
+};
+
+SomePromiseArray.prototype.init = function () {
+ this._initialized = true;
+ this._init();
+};
+
+SomePromiseArray.prototype.setUnwrap = function () {
+ this._unwrap = true;
+};
+
+SomePromiseArray.prototype.howMany = function () {
+ return this._howMany;
+};
+
+SomePromiseArray.prototype.setHowMany = function (count) {
+ this._howMany = count;
+};
+
+SomePromiseArray.prototype._promiseFulfilled = function (value) {
+ this._addFulfilled(value);
+ if (this._fulfilled() === this.howMany()) {
+ this._values.length = this.howMany();
+ if (this.howMany() === 1 && this._unwrap) {
+ this._resolve(this._values[0]);
+ } else {
+ this._resolve(this._values);
+ }
+ }
+
+};
+SomePromiseArray.prototype._promiseRejected = function (reason) {
+ this._addRejected(reason);
+ if (this.howMany() > this._canPossiblyFulfill()) {
+ var e = new AggregateError();
+ for (var i = this.length(); i < this._values.length; ++i) {
+ e.push(this._values[i]);
+ }
+ this._reject(e);
+ }
+};
+
+SomePromiseArray.prototype._fulfilled = function () {
+ return this._totalResolved;
+};
+
+SomePromiseArray.prototype._rejected = function () {
+ return this._values.length - this.length();
+};
+
+SomePromiseArray.prototype._addRejected = function (reason) {
+ this._values.push(reason);
+};
+
+SomePromiseArray.prototype._addFulfilled = function (value) {
+ this._values[this._totalResolved++] = value;
+};
+
+SomePromiseArray.prototype._canPossiblyFulfill = function () {
+ return this.length() - this._rejected();
+};
+
+SomePromiseArray.prototype._getRangeError = function (count) {
+ var message = "Input array must contain at least " +
+ this._howMany + " items but contains only " + count + " items";
+ return new RangeError(message);
+};
+
+SomePromiseArray.prototype._resolveEmptyArray = function () {
+ this._reject(this._getRangeError(0));
+};
+
+function some(promises, howMany) {
+ if ((howMany | 0) !== howMany || howMany < 0) {
+ return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/1wAmHx\u000a");
+ }
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(howMany);
+ ret.init();
+ return promise;
+}
+
+Promise.some = function (promises, howMany) {
+ return some(promises, howMany);
+};
+
+Promise.prototype.some = function (howMany) {
+ return some(this, howMany);
+};
+
+Promise._SomePromiseArray = SomePromiseArray;
+};
+
+},{"./errors.js":13,"./util.js":38}],34:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+function PromiseInspection(promise) {
+ if (promise !== undefined) {
+ promise = promise._target();
+ this._bitField = promise._bitField;
+ this._settledValue = promise._settledValue;
+ }
+ else {
+ this._bitField = 0;
+ this._settledValue = undefined;
+ }
+}
+
+PromiseInspection.prototype.value = function () {
+ if (!this.isFulfilled()) {
+ throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a");
+ }
+ return this._settledValue;
+};
+
+PromiseInspection.prototype.error =
+PromiseInspection.prototype.reason = function () {
+ if (!this.isRejected()) {
+ throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a");
+ }
+ return this._settledValue;
+};
+
+PromiseInspection.prototype.isFulfilled =
+Promise.prototype._isFulfilled = function () {
+ return (this._bitField & 268435456) > 0;
+};
+
+PromiseInspection.prototype.isRejected =
+Promise.prototype._isRejected = function () {
+ return (this._bitField & 134217728) > 0;
+};
+
+PromiseInspection.prototype.isPending =
+Promise.prototype._isPending = function () {
+ return (this._bitField & 402653184) === 0;
+};
+
+PromiseInspection.prototype.isResolved =
+Promise.prototype._isResolved = function () {
+ return (this._bitField & 402653184) > 0;
+};
+
+Promise.prototype.isPending = function() {
+ return this._target()._isPending();
+};
+
+Promise.prototype.isRejected = function() {
+ return this._target()._isRejected();
+};
+
+Promise.prototype.isFulfilled = function() {
+ return this._target()._isFulfilled();
+};
+
+Promise.prototype.isResolved = function() {
+ return this._target()._isResolved();
+};
+
+Promise.prototype._value = function() {
+ return this._settledValue;
+};
+
+Promise.prototype._reason = function() {
+ this._unsetRejectionIsUnhandled();
+ return this._settledValue;
+};
+
+Promise.prototype.value = function() {
+ var target = this._target();
+ if (!target.isFulfilled()) {
+ throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a");
+ }
+ return target._settledValue;
+};
+
+Promise.prototype.reason = function() {
+ var target = this._target();
+ if (!target.isRejected()) {
+ throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a");
+ }
+ target._unsetRejectionIsUnhandled();
+ return target._settledValue;
+};
+
+
+Promise.PromiseInspection = PromiseInspection;
+};
+
+},{}],35:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var util = _dereq_("./util.js");
+var errorObj = util.errorObj;
+var isObject = util.isObject;
+
+function tryConvertToPromise(obj, context) {
+ if (isObject(obj)) {
+ if (obj instanceof Promise) {
+ return obj;
+ }
+ else if (isAnyBluebirdPromise(obj)) {
+ var ret = new Promise(INTERNAL);
+ obj._then(
+ ret._fulfillUnchecked,
+ ret._rejectUncheckedCheckError,
+ ret._progressUnchecked,
+ ret,
+ null
+ );
+ return ret;
+ }
+ var then = util.tryCatch(getThen)(obj);
+ if (then === errorObj) {
+ if (context) context._pushContext();
+ var ret = Promise.reject(then.e);
+ if (context) context._popContext();
+ return ret;
+ } else if (typeof then === "function") {
+ return doThenable(obj, then, context);
+ }
+ }
+ return obj;
+}
+
+function getThen(obj) {
+ return obj.then;
+}
+
+var hasProp = {}.hasOwnProperty;
+function isAnyBluebirdPromise(obj) {
+ return hasProp.call(obj, "_promise0");
+}
+
+function doThenable(x, then, context) {
+ var promise = new Promise(INTERNAL);
+ var ret = promise;
+ if (context) context._pushContext();
+ promise._captureStackTrace();
+ if (context) context._popContext();
+ var synchronous = true;
+ var result = util.tryCatch(then).call(x,
+ resolveFromThenable,
+ rejectFromThenable,
+ progressFromThenable);
+ synchronous = false;
+ if (promise && result === errorObj) {
+ promise._rejectCallback(result.e, true, true);
+ promise = null;
+ }
+
+ function resolveFromThenable(value) {
+ if (!promise) return;
+ if (x === value) {
+ promise._rejectCallback(
+ Promise._makeSelfResolutionError(), false, true);
+ } else {
+ promise._resolveCallback(value);
+ }
+ promise = null;
+ }
+
+ function rejectFromThenable(reason) {
+ if (!promise) return;
+ promise._rejectCallback(reason, synchronous, true);
+ promise = null;
+ }
+
+ function progressFromThenable(value) {
+ if (!promise) return;
+ if (typeof promise._progress === "function") {
+ promise._progress(value);
+ }
+ }
+ return ret;
+}
+
+return tryConvertToPromise;
+};
+
+},{"./util.js":38}],36:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var util = _dereq_("./util.js");
+var TimeoutError = Promise.TimeoutError;
+
+var afterTimeout = function (promise, message) {
+ if (!promise.isPending()) return;
+ if (typeof message !== "string") {
+ message = "operation timed out";
+ }
+ var err = new TimeoutError(message);
+ util.markAsOriginatingFromRejection(err);
+ promise._attachExtraTrace(err);
+ promise._cancel(err);
+};
+
+var afterValue = function(value) { return delay(+this).thenReturn(value); };
+var delay = Promise.delay = function (value, ms) {
+ if (ms === undefined) {
+ ms = value;
+ value = undefined;
+ var ret = new Promise(INTERNAL);
+ setTimeout(function() { ret._fulfill(); }, ms);
+ return ret;
+ }
+ ms = +ms;
+ return Promise.resolve(value)._then(afterValue, null, null, ms, undefined);
+};
+
+Promise.prototype.delay = function (ms) {
+ return delay(this, ms);
+};
+
+function successClear(value) {
+ var handle = this;
+ if (handle instanceof Number) handle = +handle;
+ clearTimeout(handle);
+ return value;
+}
+
+function failureClear(reason) {
+ var handle = this;
+ if (handle instanceof Number) handle = +handle;
+ clearTimeout(handle);
+ throw reason;
+}
+
+Promise.prototype.timeout = function (ms, message) {
+ ms = +ms;
+ var ret = this.then().cancellable();
+ ret._cancellationParent = this;
+ var handle = setTimeout(function timeoutTimeout() {
+ afterTimeout(ret, message);
+ }, ms);
+ return ret._then(successClear, failureClear, undefined, handle, undefined);
+};
+
+};
+
+},{"./util.js":38}],37:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function (Promise, apiRejection, tryConvertToPromise,
+ createContext) {
+ var TypeError = _dereq_("./errors.js").TypeError;
+ var inherits = _dereq_("./util.js").inherits;
+ var PromiseInspection = Promise.PromiseInspection;
+
+ function inspectionMapper(inspections) {
+ var len = inspections.length;
+ for (var i = 0; i < len; ++i) {
+ var inspection = inspections[i];
+ if (inspection.isRejected()) {
+ return Promise.reject(inspection.error());
+ }
+ inspections[i] = inspection._settledValue;
+ }
+ return inspections;
+ }
+
+ function thrower(e) {
+ setTimeout(function(){throw e;}, 0);
+ }
+
+ function castPreservingDisposable(thenable) {
+ var maybePromise = tryConvertToPromise(thenable);
+ if (maybePromise !== thenable &&
+ typeof thenable._isDisposable === "function" &&
+ typeof thenable._getDisposer === "function" &&
+ thenable._isDisposable()) {
+ maybePromise._setDisposable(thenable._getDisposer());
+ }
+ return maybePromise;
+ }
+ function dispose(resources, inspection) {
+ var i = 0;
+ var len = resources.length;
+ var ret = Promise.defer();
+ function iterator() {
+ if (i >= len) return ret.resolve();
+ var maybePromise = castPreservingDisposable(resources[i++]);
+ if (maybePromise instanceof Promise &&
+ maybePromise._isDisposable()) {
+ try {
+ maybePromise = tryConvertToPromise(
+ maybePromise._getDisposer().tryDispose(inspection),
+ resources.promise);
+ } catch (e) {
+ return thrower(e);
+ }
+ if (maybePromise instanceof Promise) {
+ return maybePromise._then(iterator, thrower,
+ null, null, null);
+ }
+ }
+ iterator();
+ }
+ iterator();
+ return ret.promise;
+ }
+
+ function disposerSuccess(value) {
+ var inspection = new PromiseInspection();
+ inspection._settledValue = value;
+ inspection._bitField = 268435456;
+ return dispose(this, inspection).thenReturn(value);
+ }
+
+ function disposerFail(reason) {
+ var inspection = new PromiseInspection();
+ inspection._settledValue = reason;
+ inspection._bitField = 134217728;
+ return dispose(this, inspection).thenThrow(reason);
+ }
+
+ function Disposer(data, promise, context) {
+ this._data = data;
+ this._promise = promise;
+ this._context = context;
+ }
+
+ Disposer.prototype.data = function () {
+ return this._data;
+ };
+
+ Disposer.prototype.promise = function () {
+ return this._promise;
+ };
+
+ Disposer.prototype.resource = function () {
+ if (this.promise().isFulfilled()) {
+ return this.promise().value();
+ }
+ return null;
+ };
+
+ Disposer.prototype.tryDispose = function(inspection) {
+ var resource = this.resource();
+ var context = this._context;
+ if (context !== undefined) context._pushContext();
+ var ret = resource !== null
+ ? this.doDispose(resource, inspection) : null;
+ if (context !== undefined) context._popContext();
+ this._promise._unsetDisposable();
+ this._data = null;
+ return ret;
+ };
+
+ Disposer.isDisposer = function (d) {
+ return (d != null &&
+ typeof d.resource === "function" &&
+ typeof d.tryDispose === "function");
+ };
+
+ function FunctionDisposer(fn, promise, context) {
+ this.constructor$(fn, promise, context);
+ }
+ inherits(FunctionDisposer, Disposer);
+
+ FunctionDisposer.prototype.doDispose = function (resource, inspection) {
+ var fn = this.data();
+ return fn.call(resource, resource, inspection);
+ };
+
+ function maybeUnwrapDisposer(value) {
+ if (Disposer.isDisposer(value)) {
+ this.resources[this.index]._setDisposable(value);
+ return value.promise();
+ }
+ return value;
+ }
+
+ Promise.using = function () {
+ var len = arguments.length;
+ if (len < 2) return apiRejection(
+ "you must pass at least 2 arguments to Promise.using");
+ var fn = arguments[len - 1];
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ len--;
+ var resources = new Array(len);
+ for (var i = 0; i < len; ++i) {
+ var resource = arguments[i];
+ if (Disposer.isDisposer(resource)) {
+ var disposer = resource;
+ resource = resource.promise();
+ resource._setDisposable(disposer);
+ } else {
+ var maybePromise = tryConvertToPromise(resource);
+ if (maybePromise instanceof Promise) {
+ resource =
+ maybePromise._then(maybeUnwrapDisposer, null, null, {
+ resources: resources,
+ index: i
+ }, undefined);
+ }
+ }
+ resources[i] = resource;
+ }
+
+ var promise = Promise.settle(resources)
+ .then(inspectionMapper)
+ .then(function(vals) {
+ promise._pushContext();
+ var ret;
+ try {
+ ret = fn.apply(undefined, vals);
+ } finally {
+ promise._popContext();
+ }
+ return ret;
+ })
+ ._then(
+ disposerSuccess, disposerFail, undefined, resources, undefined);
+ resources.promise = promise;
+ return promise;
+ };
+
+ Promise.prototype._setDisposable = function (disposer) {
+ this._bitField = this._bitField | 262144;
+ this._disposer = disposer;
+ };
+
+ Promise.prototype._isDisposable = function () {
+ return (this._bitField & 262144) > 0;
+ };
+
+ Promise.prototype._getDisposer = function () {
+ return this._disposer;
+ };
+
+ Promise.prototype._unsetDisposable = function () {
+ this._bitField = this._bitField & (~262144);
+ this._disposer = undefined;
+ };
+
+ Promise.prototype.disposer = function (fn) {
+ if (typeof fn === "function") {
+ return new FunctionDisposer(fn, this, createContext());
+ }
+ throw new TypeError();
+ };
+
+};
+
+},{"./errors.js":13,"./util.js":38}],38:[function(_dereq_,module,exports){
+"use strict";
+var es5 = _dereq_("./es5.js");
+var canEvaluate = typeof navigator == "undefined";
+var haveGetters = (function(){
+ try {
+ var o = {};
+ es5.defineProperty(o, "f", {
+ get: function () {
+ return 3;
+ }
+ });
+ return o.f === 3;
+ }
+ catch (e) {
+ return false;
+ }
+
+})();
+
+var errorObj = {e: {}};
+var tryCatchTarget;
+function tryCatcher() {
+ try {
+ return tryCatchTarget.apply(this, arguments);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+}
+function tryCatch(fn) {
+ tryCatchTarget = fn;
+ return tryCatcher;
+}
+
+var inherits = function(Child, Parent) {
+ var hasProp = {}.hasOwnProperty;
+
+ function T() {
+ this.constructor = Child;
+ this.constructor$ = Parent;
+ for (var propertyName in Parent.prototype) {
+ if (hasProp.call(Parent.prototype, propertyName) &&
+ propertyName.charAt(propertyName.length-1) !== "$"
+ ) {
+ this[propertyName + "$"] = Parent.prototype[propertyName];
+ }
+ }
+ }
+ T.prototype = Parent.prototype;
+ Child.prototype = new T();
+ return Child.prototype;
+};
+
+
+function isPrimitive(val) {
+ return val == null || val === true || val === false ||
+ typeof val === "string" || typeof val === "number";
+
+}
+
+function isObject(value) {
+ return !isPrimitive(value);
+}
+
+function maybeWrapAsError(maybeError) {
+ if (!isPrimitive(maybeError)) return maybeError;
+
+ return new Error(safeToString(maybeError));
+}
+
+function withAppended(target, appendee) {
+ var len = target.length;
+ var ret = new Array(len + 1);
+ var i;
+ for (i = 0; i < len; ++i) {
+ ret[i] = target[i];
+ }
+ ret[i] = appendee;
+ return ret;
+}
+
+function getDataPropertyOrDefault(obj, key, defaultValue) {
+ if (es5.isES5) {
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+ if (desc != null) {
+ return desc.get == null && desc.set == null
+ ? desc.value
+ : defaultValue;
+ }
+ } else {
+ return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
+ }
+}
+
+function notEnumerableProp(obj, name, value) {
+ if (isPrimitive(obj)) return obj;
+ var descriptor = {
+ value: value,
+ configurable: true,
+ enumerable: false,
+ writable: true
+ };
+ es5.defineProperty(obj, name, descriptor);
+ return obj;
+}
+
+
+var wrapsPrimitiveReceiver = (function() {
+ return this !== "string";
+}).call("string");
+
+function thrower(r) {
+ throw r;
+}
+
+var inheritedDataKeys = (function() {
+ if (es5.isES5) {
+ var oProto = Object.prototype;
+ var getKeys = Object.getOwnPropertyNames;
+ return function(obj) {
+ var ret = [];
+ var visitedKeys = Object.create(null);
+ while (obj != null && obj !== oProto) {
+ var keys;
+ try {
+ keys = getKeys(obj);
+ } catch (e) {
+ return ret;
+ }
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (visitedKeys[key]) continue;
+ visitedKeys[key] = true;
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+ if (desc != null && desc.get == null && desc.set == null) {
+ ret.push(key);
+ }
+ }
+ obj = es5.getPrototypeOf(obj);
+ }
+ return ret;
+ };
+ } else {
+ return function(obj) {
+ var ret = [];
+ /*jshint forin:false */
+ for (var key in obj) {
+ ret.push(key);
+ }
+ return ret;
+ };
+ }
+
+})();
+
+function isClass(fn) {
+ try {
+ if (typeof fn === "function") {
+ var keys = es5.names(fn.prototype);
+ if (es5.isES5) return keys.length > 1;
+ return keys.length > 0 &&
+ !(keys.length === 1 && keys[0] === "constructor");
+ }
+ return false;
+ } catch (e) {
+ return false;
+ }
+}
+
+function toFastProperties(obj) {
+ /*jshint -W027,-W055,-W031*/
+ function f() {}
+ f.prototype = obj;
+ var l = 8;
+ while (l--) new f();
+ return obj;
+ eval(obj);
+}
+
+var rident = /^[a-z$_][a-z$_0-9]*$/i;
+function isIdentifier(str) {
+ return rident.test(str);
+}
+
+function filledRange(count, prefix, suffix) {
+ var ret = new Array(count);
+ for(var i = 0; i < count; ++i) {
+ ret[i] = prefix + i + suffix;
+ }
+ return ret;
+}
+
+function safeToString(obj) {
+ try {
+ return obj + "";
+ } catch (e) {
+ return "[no string representation]";
+ }
+}
+
+function markAsOriginatingFromRejection(e) {
+ try {
+ notEnumerableProp(e, "isOperational", true);
+ }
+ catch(ignore) {}
+}
+
+function originatesFromRejection(e) {
+ if (e == null) return false;
+ return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
+ e["isOperational"] === true);
+}
+
+function canAttachTrace(obj) {
+ return obj instanceof Error && es5.propertyIsWritable(obj, "stack");
+}
+
+var ensureErrorObject = (function() {
+ if (!("stack" in new Error())) {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ try {throw new Error(safeToString(value));}
+ catch(err) {return err;}
+ };
+ } else {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ return new Error(safeToString(value));
+ };
+ }
+})();
+
+function classString(obj) {
+ return {}.toString.call(obj);
+}
+
+function copyDescriptors(from, to, filter) {
+ var keys = es5.names(from);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (filter(key)) {
+ es5.defineProperty(to, key, es5.getDescriptor(from, key));
+ }
+ }
+}
+
+var ret = {
+ isClass: isClass,
+ isIdentifier: isIdentifier,
+ inheritedDataKeys: inheritedDataKeys,
+ getDataPropertyOrDefault: getDataPropertyOrDefault,
+ thrower: thrower,
+ isArray: es5.isArray,
+ haveGetters: haveGetters,
+ notEnumerableProp: notEnumerableProp,
+ isPrimitive: isPrimitive,
+ isObject: isObject,
+ canEvaluate: canEvaluate,
+ errorObj: errorObj,
+ tryCatch: tryCatch,
+ inherits: inherits,
+ withAppended: withAppended,
+ maybeWrapAsError: maybeWrapAsError,
+ wrapsPrimitiveReceiver: wrapsPrimitiveReceiver,
+ toFastProperties: toFastProperties,
+ filledRange: filledRange,
+ toString: safeToString,
+ canAttachTrace: canAttachTrace,
+ ensureErrorObject: ensureErrorObject,
+ originatesFromRejection: originatesFromRejection,
+ markAsOriginatingFromRejection: markAsOriginatingFromRejection,
+ classString: classString,
+ copyDescriptors: copyDescriptors,
+ hasDevTools: typeof chrome !== "undefined" && chrome &&
+ typeof chrome.loadTimes === "function",
+ isNode: typeof process !== "undefined" &&
+ classString(process).toLowerCase() === "[object process]"
+};
+try {throw new Error(); } catch (e) {ret.lastLineError = e;}
+module.exports = ret;
+
+},{"./es5.js":14}],39:[function(_dereq_,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+function EventEmitter() {
+ this._events = this._events || {};
+ this._maxListeners = this._maxListeners || undefined;
+}
+module.exports = EventEmitter;
+
+// Backwards-compat with node 0.10.x
+EventEmitter.EventEmitter = EventEmitter;
+
+EventEmitter.prototype._events = undefined;
+EventEmitter.prototype._maxListeners = undefined;
+
+// By default EventEmitters will print a warning if more than 10 listeners are
+// added to it. This is a useful default which helps finding memory leaks.
+EventEmitter.defaultMaxListeners = 10;
+
+// Obviously not all Emitters should be limited to 10. This function allows
+// that to be increased. Set to zero for unlimited.
+EventEmitter.prototype.setMaxListeners = function(n) {
+ if (!isNumber(n) || n < 0 || isNaN(n))
+ throw TypeError('n must be a positive number');
+ this._maxListeners = n;
+ return this;
+};
+
+EventEmitter.prototype.emit = function(type) {
+ var er, handler, len, args, i, listeners;
+
+ if (!this._events)
+ this._events = {};
+
+ // If there is no 'error' event listener then throw.
+ if (type === 'error') {
+ if (!this._events.error ||
+ (isObject(this._events.error) && !this._events.error.length)) {
+ er = arguments[1];
+ if (er instanceof Error) {
+ throw er; // Unhandled 'error' event
+ }
+ throw TypeError('Uncaught, unspecified "error" event.');
+ }
+ }
+
+ handler = this._events[type];
+
+ if (isUndefined(handler))
+ return false;
+
+ if (isFunction(handler)) {
+ switch (arguments.length) {
+ // fast cases
+ case 1:
+ handler.call(this);
+ break;
+ case 2:
+ handler.call(this, arguments[1]);
+ break;
+ case 3:
+ handler.call(this, arguments[1], arguments[2]);
+ break;
+ // slower
+ default:
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+ handler.apply(this, args);
+ }
+ } else if (isObject(handler)) {
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+
+ listeners = handler.slice();
+ len = listeners.length;
+ for (i = 0; i < len; i++)
+ listeners[i].apply(this, args);
+ }
+
+ return true;
+};
+
+EventEmitter.prototype.addListener = function(type, listener) {
+ var m;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events)
+ this._events = {};
+
+ // To avoid recursion in the case that type === "newListener"! Before
+ // adding it to the listeners, first emit "newListener".
+ if (this._events.newListener)
+ this.emit('newListener', type,
+ isFunction(listener.listener) ?
+ listener.listener : listener);
+
+ if (!this._events[type])
+ // Optimize the case of one listener. Don't need the extra array object.
+ this._events[type] = listener;
+ else if (isObject(this._events[type]))
+ // If we've already got an array, just append.
+ this._events[type].push(listener);
+ else
+ // Adding the second element, need to change to array.
+ this._events[type] = [this._events[type], listener];
+
+ // Check for listener leak
+ if (isObject(this._events[type]) && !this._events[type].warned) {
+ var m;
+ if (!isUndefined(this._maxListeners)) {
+ m = this._maxListeners;
+ } else {
+ m = EventEmitter.defaultMaxListeners;
+ }
+
+ if (m && m > 0 && this._events[type].length > m) {
+ this._events[type].warned = true;
+ console.error('(node) warning: possible EventEmitter memory ' +
+ 'leak detected. %d listeners added. ' +
+ 'Use emitter.setMaxListeners() to increase limit.',
+ this._events[type].length);
+ if (typeof console.trace === 'function') {
+ // not supported in IE 10
+ console.trace();
+ }
+ }
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+EventEmitter.prototype.once = function(type, listener) {
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ var fired = false;
+
+ function g() {
+ this.removeListener(type, g);
+
+ if (!fired) {
+ fired = true;
+ listener.apply(this, arguments);
+ }
+ }
+
+ g.listener = listener;
+ this.on(type, g);
+
+ return this;
+};
+
+// emits a 'removeListener' event iff the listener was removed
+EventEmitter.prototype.removeListener = function(type, listener) {
+ var list, position, length, i;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events || !this._events[type])
+ return this;
+
+ list = this._events[type];
+ length = list.length;
+ position = -1;
+
+ if (list === listener ||
+ (isFunction(list.listener) && list.listener === listener)) {
+ delete this._events[type];
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+
+ } else if (isObject(list)) {
+ for (i = length; i-- > 0;) {
+ if (list[i] === listener ||
+ (list[i].listener && list[i].listener === listener)) {
+ position = i;
+ break;
+ }
+ }
+
+ if (position < 0)
+ return this;
+
+ if (list.length === 1) {
+ list.length = 0;
+ delete this._events[type];
+ } else {
+ list.splice(position, 1);
+ }
+
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.removeAllListeners = function(type) {
+ var key, listeners;
+
+ if (!this._events)
+ return this;
+
+ // not listening for removeListener, no need to emit
+ if (!this._events.removeListener) {
+ if (arguments.length === 0)
+ this._events = {};
+ else if (this._events[type])
+ delete this._events[type];
+ return this;
+ }
+
+ // emit removeListener for all listeners on all events
+ if (arguments.length === 0) {
+ for (key in this._events) {
+ if (key === 'removeListener') continue;
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners('removeListener');
+ this._events = {};
+ return this;
+ }
+
+ listeners = this._events[type];
+
+ if (isFunction(listeners)) {
+ this.removeListener(type, listeners);
+ } else {
+ // LIFO order
+ while (listeners.length)
+ this.removeListener(type, listeners[listeners.length - 1]);
+ }
+ delete this._events[type];
+
+ return this;
+};
+
+EventEmitter.prototype.listeners = function(type) {
+ var ret;
+ if (!this._events || !this._events[type])
+ ret = [];
+ else if (isFunction(this._events[type]))
+ ret = [this._events[type]];
+ else
+ ret = this._events[type].slice();
+ return ret;
+};
+
+EventEmitter.listenerCount = function(emitter, type) {
+ var ret;
+ if (!emitter._events || !emitter._events[type])
+ ret = 0;
+ else if (isFunction(emitter._events[type]))
+ ret = 1;
+ else
+ ret = emitter._events[type].length;
+ return ret;
+};
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+
+},{}]},{},[4])(4)
+}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.min.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.min.js
new file mode 100644
index 0000000000..bee550ccc5
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.min.js
@@ -0,0 +1,31 @@
+/* @preserve
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2014 Petka Antonov
+ *
+ * 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:</p>
+ *
+ * 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.
+ *
+ */
+/**
+ * bluebird build version 2.9.24
+ * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, cancel, using, filter, any, each, timers
+*/
+!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,r;return function n(t,e,r){function i(s,a){if(!e[s]){if(!t[s]){var u="function"==typeof _dereq_&&_dereq_;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=e[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return i(r?r:e)},l,l.exports,n,t,e,r)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(t,e){"use strict";e.exports=function(t){function e(t){var e=new r(t),n=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),n}var r=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,e){"use strict";function r(){this._isTickUsed=!1,this._lateQueue=new c(16),this._normalQueue=new c(16),this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=u.isStatic?u(this.drainQueues):u}function n(t,e,r){var n=this._getDomain();void 0!==n&&(t=n.bind(t)),this._lateQueue.push(t,e,r),this._queueTick()}function i(t,e,r){var n=this._getDomain();void 0!==n&&(t=n.bind(t)),this._normalQueue.push(t,e,r),this._queueTick()}function o(t){var e=this._getDomain();if(void 0!==e){var r=e.bind(t._settlePromises);this._normalQueue.push(r,t,void 0)}else this._normalQueue._pushOne(t);this._queueTick()}var s;try{throw new Error}catch(a){s=a}var u=t("./schedule.js"),c=t("./queue.js"),l=t("./util.js");if(r.prototype.disableTrampolineIfNecessary=function(){l.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.enableTrampoline=function(){this._trampolineEnabled||(this._trampolineEnabled=!0,this._schedule=function(t){setTimeout(t,0)})},r.prototype.haveItemsQueued=function(){return this._normalQueue.length()>0},r.prototype.throwLater=function(t,e){1===arguments.length&&(e=t,t=function(){throw e});var r=this._getDomain();if(void 0!==r&&(t=r.bind(t)),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")}},r.prototype._getDomain=function(){},l.isNode){var h=t("events"),p=function(){var t=process.domain;return null===t?void 0:t};if(h.usingDomains)r.prototype._getDomain=p;else{var f=Object.getOwnPropertyDescriptor(h,"usingDomains");if(f.configurable){var _=!1;Object.defineProperty(h,"usingDomains",{configurable:!1,enumerable:!0,get:function(){return _},set:function(t){!_&&t&&(_=!0,r.prototype._getDomain=p,l.toFastProperties(process),process.emit("domainsActivated"))}})}else process.on("domainsActivated",function(){r.prototype._getDomain=p})}}l.hasDevTools?(r.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?n.call(this,t,e,r):setTimeout(function(){t.call(e,r)},100)},r.prototype.invoke=function(t,e,r){this._trampolineEnabled?i.call(this,t,e,r):setTimeout(function(){t.call(e,r)},0)},r.prototype.settlePromises=function(t){this._trampolineEnabled?o.call(this,t):setTimeout(function(){t._settlePromises()},0)}):(r.prototype.invokeLater=n,r.prototype.invoke=i,r.prototype.settlePromises=o),r.prototype.invokeFirst=function(t,e,r){var n=this._getDomain();void 0!==n&&(t=n.bind(t)),this._normalQueue.unshift(t,e,r),this._queueTick()},r.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=new r,e.exports.firstLineError=s},{"./queue.js":28,"./schedule.js":31,"./util.js":38,events:39}],3:[function(t,e){"use strict";e.exports=function(t,e,r){var n=function(t,e){this._reject(e)},i=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(n,n,null,this,t)},o=function(t,e){this._setBoundTo(t),this._isPending()&&this._resolveCallback(e.target)},s=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(n){var a=r(n),u=new t(e);u._propagateFrom(this,1);var c=this._target();if(a instanceof t){var l={promiseRejectionQueued:!1,promise:u,target:c,bindingPromise:a};c._then(e,i,u._progress,u,l),a._then(o,s,u._progress,u,l)}else u._setBoundTo(n),u._resolveCallback(c);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=131072|this._bitField,this._boundTo=t):this._bitField=-131073&this._bitField},t.prototype._isBound=function(){return 131072===(131072&this._bitField)},t.bind=function(n,i){var o=r(n),s=new t(e);return o instanceof t?o._then(function(t){s._setBoundTo(t),s._resolveCallback(i)},s._reject,s._progress,s,null):(s._setBoundTo(n),s._resolveCallback(i)),s}}},{}],4:[function(t,e){"use strict";function r(){try{Promise===i&&(Promise=n)}catch(t){}return i}var n;"undefined"!=typeof Promise&&(n=Promise);var i=t("./promise.js")();i.noConflict=r,e.exports=i},{"./promise.js":23}],5:[function(t,e){"use strict";var r=Object.create;if(r){var n=r(null),i=r(null);n[" size"]=i[" size"]=0}e.exports=function(e){function r(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var i="Object "+a.classString(t)+" has no method '"+a.toString(r)+"'";throw new e.TypeError(i)}return n}function n(t){var e=this.pop(),n=r(t,e);return n.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}{var s,a=t("./util.js"),u=a.canEvaluate;a.isIdentifier}e.prototype.call=function(t){for(var e=arguments.length,r=new Array(e-1),i=1;e>i;++i)r[i-1]=arguments[i];return r.push(t),this._then(n,void 0,void 0,r,void 0)},e.prototype.get=function(t){var e,r="number"==typeof t;if(r)e=o;else if(u){var n=s(t);e=null!==n?n:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util.js":38}],6:[function(t,e){"use strict";e.exports=function(e){var r=t("./errors.js"),n=t("./async.js"),i=r.CancellationError;e.prototype._cancel=function(t){if(!this.isCancellable())return this;for(var e,r=this;void 0!==(e=r._cancellationParent)&&e.isCancellable();)r=e;this._unsetCancellable(),r._target()._rejectCallback(t,!1,!0)},e.prototype.cancel=function(t){return this.isCancellable()?(void 0===t&&(t=new i),n.invokeLater(this._cancel,this,t),this):this},e.prototype.cancellable=function(){return this._cancellable()?this:(n.enableTrampoline(),this._setCancellable(),this._cancellationParent=void 0,this)},e.prototype.uncancellable=function(){var t=this.then();return t._unsetCancellable(),t},e.prototype.fork=function(t,e,r){var n=this._then(t,e,r,void 0,void 0);return n._setCancellable(),n._cancellationParent=void 0,n}}},{"./async.js":2,"./errors.js":13}],7:[function(t,e){"use strict";e.exports=function(){function e(t){this._parent=t;var r=this._length=1+(void 0===t?0:t._length);j(this,e),r>32&&this.uncycle()}function r(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}function n(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function i(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],i=e.length-1,o=e[i],s=-1,a=n.length-1;a>=0;--a)if(n[a]===o){s=a;break}for(var a=s;a>=0;--a){var u=n[a];if(e[i]!==u)break;e.pop(),i--}e=n}}function o(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=_.test(n)||" (No stack trace)"===n,o=i&&y(n);i&&!o&&(v&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function s(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||_.test(n))break}return r>0&&(e=e.slice(r)),e}function a(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t.toString();var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e))try{var n=JSON.stringify(t);e=n}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+u(e)+">, no stack trace)"}function u(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function c(t){var e=t.match(g);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}var l,h=t("./async.js"),p=t("./util.js"),f=/[\\\/]bluebird[\\\/]js[\\\/](main|debug|zalgo|instrumented)/,_=null,d=null,v=!1;p.inherits(e,Error),e.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;t=this._length=n;for(var n=t-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;t>n;++n){var s=e[n].stack,a=r[s];if(void 0!==a&&a!==n){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var u=n>0?e[n-1]:this;t-1>a?(u._parent=e[a+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var c=u._length+1,l=n-2;l>=0;--l)e[l]._length=c,c++;return}}}},e.prototype.parent=function(){return this._parent},e.prototype.hasParent=function(){return void 0!==this._parent},e.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var s=e.parseStackAndMessage(t),a=s.message,u=[s.stack],c=this;void 0!==c;)u.push(o(c.stack.split("\n"))),c=c._parent;i(u),n(u),p.notEnumerableProp(t,"stack",r(a,u)),p.notEnumerableProp(t,"__stackCleaned__",!0)}},e.parseStackAndMessage=function(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?s(t):[" (No stack trace)"],{message:r,stack:o(e)}},e.formatAndLogError=function(t,e){if("undefined"!=typeof console){var r;if("object"==typeof t||"function"==typeof t){var n=t.stack;r=e+d(n,t)}else r=e+String(t);"function"==typeof l?l(r):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}},e.unhandledRejection=function(t){e.formatAndLogError(t,"^--- With additional stack trace: ")},e.isSupported=function(){return"function"==typeof j},e.fireRejectionEvent=function(t,r,n,i){var o=!1;try{"function"==typeof r&&(o=!0,"rejectionHandled"===t?r(i):r(n,i))}catch(s){h.throwLater(s)}var a=!1;try{a=b(t,n,i)}catch(s){a=!0,h.throwLater(s)}var u=!1;if(m)try{u=m(t.toLowerCase(),{reason:n,promise:i})}catch(s){u=!0,h.throwLater(s)}a||o||u||"unhandledRejection"!==t||e.formatAndLogError(n,"Unhandled rejection ")};var y=function(){return!1},g=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;e.setBounds=function(t,r){if(e.isSupported()){for(var n,i,o=t.stack.split("\n"),s=r.stack.split("\n"),a=-1,u=-1,l=0;l<o.length;++l){var h=c(o[l]);if(h){n=h.fileName,a=h.line;break}}for(var l=0;l<s.length;++l){var h=c(s[l]);if(h){i=h.fileName,u=h.line;break}}0>a||0>u||!n||!i||n!==i||a>=u||(y=function(t){if(f.test(t))return!0;var e=c(t);return e&&e.fileName===n&&a<=e.line&&e.line<=u?!0:!1})}};var m,j=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():a(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit=Error.stackTraceLimit+6,_=t,d=e;var r=Error.captureStackTrace;return y=function(t){return f.test(t)},function(t,e){Error.stackTraceLimit=Error.stackTraceLimit+6,r(t,e),Error.stackTraceLimit=Error.stackTraceLimit-6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return _=/@/,d=e,v=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in n||!i?(d=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?a(e):e.toString()},null):(_=t,d=e,function(t){Error.stackTraceLimit=Error.stackTraceLimit+6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit=Error.stackTraceLimit-6})}([]),b=function(){if(p.isNode)return function(t,e,r){return"rejectionHandled"===t?process.emit(t,r):process.emit(t,e,r)};var t=!1,e=!0;try{var r=new self.CustomEvent("test");t=r instanceof CustomEvent}catch(n){}if(!t)try{var i=document.createEvent("CustomEvent");i.initCustomEvent("testingtheevent",!1,!0,{}),self.dispatchEvent(i)}catch(n){e=!1}e&&(m=function(e,r){var n;return t?n=new self.CustomEvent(e,{detail:r,bubbles:!1,cancelable:!0}):self.dispatchEvent&&(n=document.createEvent("CustomEvent"),n.initCustomEvent(e,!1,!0,r)),n?!self.dispatchEvent(n):!1});var o={};return o.unhandledRejection="onunhandledRejection".toLowerCase(),o.rejectionHandled="onrejectionHandled".toLowerCase(),function(t,e,r){var n=o[t],i=self[n];return i?("rejectionHandled"===t?i.call(self,r):i.call(self,e,r),!0):!1}}();return"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(l=function(t){console.warn(t)},p.isNode&&process.stderr.isTTY?l=function(t){process.stderr.write(""+t+"\n")}:p.isNode||"string"!=typeof(new Error).stack||(l=function(t){console.warn("%c"+t,"color: red")})),e}},{"./async.js":2,"./util.js":38}],8:[function(t,e){"use strict";e.exports=function(e){function r(t,e,r){this._instances=t,this._callback=e,this._promise=r}function n(t,e){var r={},n=s(t).call(r,e);if(n===a)return n;var i=u(r);return i.length?(a.e=new c("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"),a):n}var i=t("./util.js"),o=t("./errors.js"),s=i.tryCatch,a=i.errorObj,u=t("./es5.js").keys,c=o.TypeError;return r.prototype.doFilter=function(t){for(var r=this._callback,i=this._promise,o=i._boundTo,u=0,c=this._instances.length;c>u;++u){var l=this._instances[u],h=l===Error||null!=l&&l.prototype instanceof Error;if(h&&t instanceof l){var p=s(r).call(o,t);return p===a?(e.e=p.e,e):p}if("function"==typeof l&&!h){var f=n(l,t);if(f===a){t=a.e;break}if(f){var p=s(r).call(o,t);return p===a?(e.e=p.e,e):p}}}return e.e=t,e},r}},{"./errors.js":13,"./es5.js":14,"./util.js":38}],9:[function(t,e){"use strict";e.exports=function(t,e,r){function n(){this._trace=new e(o())}function i(){return r()?new n:void 0}function o(){var t=s.length-1;return t>=0?s[t]:void 0}var s=[];return n.prototype._pushContext=function(){r()&&void 0!==this._trace&&s.push(this._trace)},n.prototype._popContext=function(){r()&&void 0!==this._trace&&s.pop()},t.prototype._peekContext=o,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,i}},{}],10:[function(t,e){"use strict";e.exports=function(e,r){var n,i,o=t("./async.js"),s=t("./errors.js").Warning,a=t("./util.js"),u=a.canAttachTrace,c=!1||a.isNode&&(!!process.env.BLUEBIRD_DEBUG||"development"===process.env.NODE_ENV);return c&&o.disableTrampolineIfNecessary(),e.prototype._ensurePossibleRejectionHandled=function(){this._setRejectionIsUnhandled(),o.invokeLater(this._notifyUnhandledRejection,this,void 0)},e.prototype._notifyUnhandledRejectionIsHandled=function(){r.fireRejectionEvent("rejectionHandled",n,void 0,this)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._getCarriedStackTrace()||this._settledValue;this._setUnhandledRejectionIsNotified(),r.fireRejectionEvent("unhandledRejection",i,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=524288|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-524289&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(524288&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=2097152|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-2097153&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(2097152&this._bitField)>0},e.prototype._setCarriedStackTrace=function(t){this._bitField=1048576|this._bitField,this._fulfillmentHandler0=t},e.prototype._isCarryingStackTrace=function(){return(1048576&this._bitField)>0},e.prototype._getCarriedStackTrace=function(){return this._isCarryingStackTrace()?this._fulfillmentHandler0:void 0},e.prototype._captureStackTrace=function(){return c&&(this._trace=new r(this._peekContext())),this},e.prototype._attachExtraTrace=function(t,e){if(c&&u(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var i=r.parseStackAndMessage(t);a.notEnumerableProp(t,"stack",i.message+"\n"+i.stack.join("\n")),a.notEnumerableProp(t,"__stackCleaned__",!0)}}},e.prototype._warn=function(t){var e=new s(t),n=this._peekContext();if(n)n.attachExtraTrace(e);else{var i=r.parseStackAndMessage(e);e.stack=i.message+"\n"+i.stack.join("\n")}r.formatAndLogError(e,"")},e.onPossiblyUnhandledRejection=function(t){i="function"==typeof t?t:void 0},e.onUnhandledRejectionHandled=function(t){n="function"==typeof t?t:void 0},e.longStackTraces=function(){if(o.haveItemsQueued()&&c===!1)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/DT1qyG\n");c=r.isSupported(),c&&o.disableTrampolineIfNecessary()},e.hasLongStackTraces=function(){return c&&r.isSupported()},r.isSupported()||(e.longStackTraces=function(){},c=!1),function(){return c}}},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(t,e){"use strict";var r=t("./util.js"),n=r.isPrimitive,i=r.wrapsPrimitiveReceiver;e.exports=function(t){var e=function(){return this},r=function(){throw this},o=function(t,e){return 1===e?function(){throw t}:2===e?function(){return t}:void 0};t.prototype["return"]=t.prototype.thenReturn=function(t){return i&&n(t)?this._then(o(t,2),void 0,void 0,void 0,void 0):this._then(e,void 0,void 0,t,void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return i&&n(t)?this._then(o(t,1),void 0,void 0,void 0,void 0):this._then(r,void 0,void 0,t,void 0)}}},{"./util.js":38}],12:[function(t,e){"use strict";e.exports=function(t,e){var r=t.reduce;t.prototype.each=function(t){return r(this,t,null,e)},t.each=function(t,n){return r(t,n,null,e)}}},{}],13:[function(t,e){"use strict";function r(t,e){function r(n){return this instanceof r?(l(this,"message","string"==typeof n?n:e),l(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new r(n)}return c(r,Error),r}function n(t){return this instanceof n?(l(this,"name","OperationalError"),l(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(l(this,"message",t.message),l(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new n(t)}var i,o,s=t("./es5.js"),a=s.freeze,u=t("./util.js"),c=u.inherits,l=u.notEnumerableProp,h=r("Warning","warning"),p=r("CancellationError","cancellation error"),f=r("TimeoutError","timeout error"),_=r("AggregateError","aggregate error");try{i=TypeError,o=RangeError}catch(d){i=r("TypeError","type error"),o=r("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y<v.length;++y)"function"==typeof Array.prototype[v[y]]&&(_.prototype[v[y]]=Array.prototype[v[y]]);s.defineProperty(_.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),_.prototype.isOperational=!0;var g=0;_.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];n=i.join("\n"),e+=n+"\n"}return g--,e},c(n,Error);var m=Error.__BluebirdErrorTypes__;m||(m=a({CancellationError:p,TimeoutError:f,OperationalError:n,RejectionError:n,AggregateError:_}),l(Error,"__BluebirdErrorTypes__",m)),e.exports={Error:Error,TypeError:i,RangeError:o,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:h}},{"./es5.js":14,"./util.js":38}],14:[function(t,e){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var n={}.hasOwnProperty,i={}.toString,o={}.constructor.prototype,s=function(t){var e=[];for(var r in t)n.call(t,r)&&e.push(r);return e},a=function(t,e){return{value:t[e]}},u=function(t,e,r){return t[e]=r.value,t},c=function(t){return t},l=function(t){try{return Object(t).constructor.prototype}catch(e){return o}},h=function(t){try{return"[object Array]"===i.call(t)}catch(e){return!1}};e.exports={isArray:h,keys:s,names:s,defineProperty:u,getDescriptor:a,freeze:c,getPrototypeOf:l,isES5:r,propertyIsWritable:function(){return!0}}}},{}],15:[function(t,e){"use strict";e.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,i){return r(t,n,i,e)}}},{}],16:[function(t,e){"use strict";e.exports=function(e,r,n){function i(){return this}function o(){throw this}function s(t){return function(){return t}}function a(t){return function(){throw t}}function u(t,e,r){var n;return n=p&&f(e)?r?s(e):a(e):r?i:o,t._then(n,_,void 0,e,void 0)}function c(t){var i=this.promise,o=this.handler,s=i._isBound()?o.call(i._boundTo):o();if(void 0!==s){var a=n(s,i);if(a instanceof e)return a=a._target(),u(a,t,i.isFulfilled())}return i.isRejected()?(r.e=t,r):t}function l(t){var r=this.promise,i=this.handler,o=r._isBound()?i.call(r._boundTo,t):i(t);if(void 0!==o){var s=n(o,r);if(s instanceof e)return s=s._target(),u(s,t,!0)}return t}var h=t("./util.js"),p=h.wrapsPrimitiveReceiver,f=h.isPrimitive,_=h.thrower;e.prototype._passThroughHandler=function(t,e){if("function"!=typeof t)return this.then();var r={promise:this,handler:t};return this._then(e?c:l,e?c:void 0,void 0,r,void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThroughHandler(t,!0)},e.prototype.tap=function(t){return this._passThroughHandler(t,!1)}}},{"./util.js":38}],17:[function(t,e){"use strict";e.exports=function(e,r,n,i){function o(t,r,n){for(var o=0;o<r.length;++o){n._pushContext();var s=h(r[o])(t);if(n._popContext(),s===l){n._pushContext();var a=e.reject(l.e);return n._popContext(),a}var u=i(s,n);if(u instanceof e)return u}return null}function s(t,r,i,o){var s=this._promise=new e(n);s._captureStackTrace(),this._stack=o,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(p):p}var a=t("./errors.js"),u=a.TypeError,c=t("./util.js"),l=c.errorObj,h=c.tryCatch,p=[];s.prototype.promise=function(){return this._promise},s.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._next(void 0)},s.prototype._continue=function(t){if(t===l)return this._promise._rejectCallback(t.e,!1,!0);var r=t.value;if(t.done===!0)this._promise._resolveCallback(r);else{var n=i(r,this._promise);if(!(n instanceof e)&&(n=o(n,this._yieldHandlers,this._promise),null===n))return void this._throw(new u("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/4Y4pDk\n\n".replace("%s",r)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));n._then(this._next,this._throw,void 0,this,null)}},s.prototype._throw=function(t){this._promise._attachExtraTrace(t),this._promise._pushContext();var e=h(this._generator["throw"]).call(this._generator,t);this._promise._popContext(),this._continue(e)},s.prototype._next=function(t){this._promise._pushContext();var e=h(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},e.coroutine=function(t,e){if("function"!=typeof t)throw new u("generatorFunction must be a function\n\n See http://goo.gl/6Vqhm0\n");var r=Object(e).yieldHandler,n=s,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new n(void 0,void 0,r,i);return o._generator=e,o._next(void 0),o.promise()}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new u("fn must be a function\n\n See http://goo.gl/916lJJ\n");p.push(t)},e.spawn=function(t){if("function"!=typeof t)return r("generatorFunction must be a function\n\n See http://goo.gl/6Vqhm0\n");var n=new s(t,this),i=n.promise();return n._run(e.spawn),i}}},{"./errors.js":13,"./util.js":38}],18:[function(t,e){"use strict";e.exports=function(e,r,n,i){{var o=t("./util.js");o.canEvaluate,o.tryCatch,o.errorObj}e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var n}for(var i=arguments.length,o=new Array(i),s=0;i>s;++s)o[s]=arguments[s];t&&o.pop();var n=new r(o).promise();return void 0!==t?n.spread(t):n}}},{"./util.js":38}],19:[function(t,e){"use strict";e.exports=function(e,r,n,i,o){function s(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace(),this._callback=e,this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=r>=1?[]:_,c.invoke(a,this,void 0)}function a(){this._init$(void 0,-2)}function u(t,e,r,n){var i="object"==typeof r&&null!==r?r.concurrency:0;return i="number"==typeof i&&isFinite(i)&&i>=1?i:0,new s(t,e,i,n)}var c=t("./async.js"),l=t("./util.js"),h=l.tryCatch,p=l.errorObj,f={},_=[];l.inherits(s,r),s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),s=this._preservedValues,a=this._limit;if(n[r]===f){if(n[r]=t,a>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return}else{if(a>=1&&this._inFlight>=a)return n[r]=t,void this._queue.push(r);null!==s&&(s[r]=t);var u=this._callback,c=this._promise._boundTo;this._promise._pushContext();var l=h(u).call(c,t,r,o);if(this._promise._popContext(),l===p)return this._reject(l.e);var _=i(l,this._promise);if(_ instanceof e){if(_=_._target(),_._isPending())return a>=1&&this._inFlight++,n[r]=f,_._proxyPromiseArray(this,r);if(!_._isFulfilled())return this._reject(_._reason());l=_._value()}n[r]=l}var d=++this._totalResolved;d>=o&&(null!==s?this._filter(n,s):this._resolve(n))},s.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},s.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),i=0,o=0;r>o;++o)t[o]&&(n[i++]=e[o]);n.length=i,this._resolve(n)},s.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return"function"!=typeof t?n("fn must be a function\n\n See http://goo.gl/916lJJ\n"):u(this,t,e,null).promise()},e.map=function(t,e,r,i){return"function"!=typeof e?n("fn must be a function\n\n See http://goo.gl/916lJJ\n"):u(t,e,r,i).promise()}}},{"./async.js":2,"./util.js":38}],20:[function(t,e){"use strict";e.exports=function(e,r,n,i){var o=t("./util.js"),s=o.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("fn must be a function\n\n See http://goo.gl/916lJJ\n");return function(){var n=new e(r);n._captureStackTrace(),n._pushContext();var i=s(t).apply(this,arguments);return n._popContext(),n._resolveFromSyncValue(i),n}},e.attempt=e["try"]=function(t,n,a){if("function"!=typeof t)return i("fn must be a function\n\n See http://goo.gl/916lJJ\n");var u=new e(r);u._captureStackTrace(),u._pushContext();var c=o.isArray(n)?s(t).apply(a,n):s(t).call(a,n);return u._popContext(),u._resolveFromSyncValue(c),u},e.prototype._resolveFromSyncValue=function(t){t===o.errorObj?this._rejectCallback(t.e,!1,!0):this._resolveCallback(t,!0)}}},{"./util.js":38}],21:[function(t,e){"use strict";e.exports=function(e){function r(t,e){var r=this;if(!o.isArray(t))return n.call(r,t,e);var i=a(e).apply(r._boundTo,[null].concat(t));i===u&&s.throwLater(i.e)}function n(t,e){var r=this,n=r._boundTo,i=void 0===t?a(e).call(n,null):a(e).call(n,null,t);i===u&&s.throwLater(i.e)}function i(t,e){var r=this;if(!t){var n=r._target(),i=n._getCarriedStackTrace();i.cause=t,t=i}var o=a(e).call(r._boundTo,t);o===u&&s.throwLater(o.e)}var o=t("./util.js"),s=t("./async.js"),a=o.tryCatch,u=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=n;void 0!==e&&Object(e).spread&&(o=r),this._then(o,i,void 0,this,t)}return this}}},{"./async.js":2,"./util.js":38}],22:[function(t,e){"use strict";e.exports=function(e,r){var n=t("./util.js"),i=t("./async.js"),o=n.tryCatch,s=n.errorObj;e.prototype.progressed=function(t){return this._then(void 0,void 0,t,void 0,void 0)},e.prototype._progress=function(t){this._isFollowingOrFulfilledOrRejected()||this._target()._progressUnchecked(t)},e.prototype._progressHandlerAt=function(t){return 0===t?this._progressHandler0:this[(t<<2)+t-5+2]},e.prototype._doProgressWith=function(t){var r=t.value,i=t.handler,a=t.promise,u=t.receiver,c=o(i).call(u,r);if(c===s){if(null!=c.e&&"StopProgressPropagation"!==c.e.name){var l=n.canAttachTrace(c.e)?c.e:new Error(n.toString(c.e));a._attachExtraTrace(l),a._progress(c.e)}}else c instanceof e?c._then(a._progress,null,null,a,void 0):a._progress(c)},e.prototype._progressUnchecked=function(t){for(var n=this._length(),o=this._progress,s=0;n>s;s++){var a=this._progressHandlerAt(s),u=this._promiseAt(s);if(u instanceof e)"function"==typeof a?i.invoke(this._doProgressWith,this,{handler:a,promise:u,receiver:this._receiverAt(s),value:t}):i.invoke(o,u,t);else{var c=this._receiverAt(s);"function"==typeof a?a.call(c,t,u):c instanceof r&&!c._isResolved()&&c._promiseProgressed(t,u)}}}}},{"./async.js":2,"./util.js":38}],23:[function(t,e){"use strict";e.exports=function(){function e(t){if("function"!=typeof t)throw new c("the promise constructor requires a resolver function\n\n See http://goo.gl/EC22Yn\n");if(this.constructor!==e)throw new c("the promise constructor cannot be invoked directly\n\n See http://goo.gl/KsIlge\n");this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._progressHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._settledValue=void 0,t!==l&&this._resolveFromResolver(t)}function r(t){var r=new e(l);r._fulfillmentHandler0=t,r._rejectionHandler0=t,r._progressHandler0=t,r._promise0=t,r._receiver0=t,r._settledValue=t}var n=function(){return new c("circular promise resolution chain\n\n See http://goo.gl/LhFpo0\n")},i=function(){return new e.PromiseInspection(this._target())},o=function(t){return e.reject(new c(t))},s=t("./util.js"),a=t("./async.js"),u=t("./errors.js"),c=e.TypeError=u.TypeError;e.RangeError=u.RangeError,e.CancellationError=u.CancellationError,e.TimeoutError=u.TimeoutError,e.OperationalError=u.OperationalError,e.RejectionError=u.OperationalError,e.AggregateError=u.AggregateError;var l=function(){},h={},p={e:null},f=t("./thenables.js")(e,l),_=t("./promise_array.js")(e,l,f,o),d=t("./captured_trace.js")(),v=t("./debuggability.js")(e,d),y=t("./context.js")(e,d,v),g=t("./catch_filter.js")(p),m=t("./promise_resolver.js"),j=m._nodebackForPromise,b=s.errorObj,w=s.tryCatch;return e.prototype.toString=function(){return"[object Promise]"},e.prototype.caught=e.prototype["catch"]=function(t){var r=arguments.length;if(r>1){var n,i=new Array(r-1),o=0;for(n=0;r-1>n;++n){var s=arguments[n];if("function"!=typeof s)return e.reject(new c("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"));i[o++]=s}i.length=o,t=arguments[n];var a=new g(i,t,this);return this._then(void 0,a.doFilter,void 0,a,void 0)}return this._then(void 0,t,void 0,void 0,void 0)},e.prototype.reflect=function(){return this._then(i,i,void 0,this,void 0)},e.prototype.then=function(t,e,r){if(v()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+s.classString(t);
+arguments.length>1&&(n+=", "+s.classString(e)),this._warn(n)}return this._then(t,e,r,void 0,void 0)},e.prototype.done=function(t,e,r){var n=this._then(t,e,r,void 0,void 0);n._setIsFinal()},e.prototype.spread=function(t,e){return this.all()._then(t,e,void 0,h,void 0)},e.prototype.isCancellable=function(){return!this.isResolved()&&this._cancellable()},e.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},e.prototype.all=function(){return new _(this).promise()},e.prototype.error=function(t){return this.caught(s.originatesFromRejection,t)},e.is=function(t){return t instanceof e},e.fromNode=function(t){var r=new e(l),n=w(t)(j(r));return n===b&&r._rejectCallback(n.e,!0,!0),r},e.all=function(t){return new _(t).promise()},e.defer=e.pending=function(){var t=new e(l);return new m(t)},e.cast=function(t){var r=f(t);if(!(r instanceof e)){var n=r;r=new e(l),r._fulfillUnchecked(n)}return r},e.resolve=e.fulfilled=e.cast,e.reject=e.rejected=function(t){var r=new e(l);return r._captureStackTrace(),r._rejectCallback(t,!0),r},e.setScheduler=function(t){if("function"!=typeof t)throw new c("fn must be a function\n\n See http://goo.gl/916lJJ\n");var e=a._schedule;return a._schedule=t,e},e.prototype._then=function(t,r,n,i,o){var s=void 0!==o,u=s?o:new e(l);s||(u._propagateFrom(this,5),u._captureStackTrace());var c=this._target();c!==this&&(void 0===i&&(i=this._boundTo),s||u._setIsMigrated());var h=c._addCallbacks(t,r,n,u,i);return c._isResolved()&&!c._isSettlePromisesQueued()&&a.invoke(c._settlePromiseAtPostResolution,c,h),u},e.prototype._settlePromiseAtPostResolution=function(t){this._isRejectionUnhandled()&&this._unsetRejectionIsUnhandled(),this._settlePromiseAt(t)},e.prototype._length=function(){return 131071&this._bitField},e.prototype._isFollowingOrFulfilledOrRejected=function(){return(939524096&this._bitField)>0},e.prototype._isFollowing=function(){return 536870912===(536870912&this._bitField)},e.prototype._setLength=function(t){this._bitField=-131072&this._bitField|131071&t},e.prototype._setFulfilled=function(){this._bitField=268435456|this._bitField},e.prototype._setRejected=function(){this._bitField=134217728|this._bitField},e.prototype._setFollowing=function(){this._bitField=536870912|this._bitField},e.prototype._setIsFinal=function(){this._bitField=33554432|this._bitField},e.prototype._isFinal=function(){return(33554432&this._bitField)>0},e.prototype._cancellable=function(){return(67108864&this._bitField)>0},e.prototype._setCancellable=function(){this._bitField=67108864|this._bitField},e.prototype._unsetCancellable=function(){this._bitField=-67108865&this._bitField},e.prototype._setIsMigrated=function(){this._bitField=4194304|this._bitField},e.prototype._unsetIsMigrated=function(){this._bitField=-4194305&this._bitField},e.prototype._isMigrated=function(){return(4194304&this._bitField)>0},e.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[5*t-5+4];return void 0===e&&this._isBound()?this._boundTo:e},e.prototype._promiseAt=function(t){return 0===t?this._promise0:this[5*t-5+3]},e.prototype._fulfillmentHandlerAt=function(t){return 0===t?this._fulfillmentHandler0:this[5*t-5+0]},e.prototype._rejectionHandlerAt=function(t){return 0===t?this._rejectionHandler0:this[5*t-5+1]},e.prototype._migrateCallbacks=function(t,r){var n=t._fulfillmentHandlerAt(r),i=t._rejectionHandlerAt(r),o=t._progressHandlerAt(r),s=t._promiseAt(r),a=t._receiverAt(r);s instanceof e&&s._setIsMigrated(),this._addCallbacks(n,i,o,s,a)},e.prototype._addCallbacks=function(t,e,r,n,i){var o=this._length();if(o>=131066&&(o=0,this._setLength(0)),0===o)this._promise0=n,void 0!==i&&(this._receiver0=i),"function"!=typeof t||this._isCarryingStackTrace()||(this._fulfillmentHandler0=t),"function"==typeof e&&(this._rejectionHandler0=e),"function"==typeof r&&(this._progressHandler0=r);else{var s=5*o-5;this[s+3]=n,this[s+4]=i,"function"==typeof t&&(this[s+0]=t),"function"==typeof e&&(this[s+1]=e),"function"==typeof r&&(this[s+2]=r)}return this._setLength(o+1),o},e.prototype._setProxyHandlers=function(t,e){var r=this._length();if(r>=131066&&(r=0,this._setLength(0)),0===r)this._promise0=e,this._receiver0=t;else{var n=5*r-5;this[n+3]=e,this[n+4]=t}this._setLength(r+1)},e.prototype._proxyPromiseArray=function(t,e){this._setProxyHandlers(t,e)},e.prototype._resolveCallback=function(t,r){if(!this._isFollowingOrFulfilledOrRejected()){if(t===this)return this._rejectCallback(n(),!1,!0);var i=f(t,this);if(!(i instanceof e))return this._fulfill(t);var o=1|(r?4:0);this._propagateFrom(i,o);var s=i._target();if(s._isPending()){for(var a=this._length(),u=0;a>u;++u)s._migrateCallbacks(this,u);this._setFollowing(),this._setLength(0),this._setFollowee(s)}else s._isFulfilled()?this._fulfillUnchecked(s._value()):this._rejectUnchecked(s._reason(),s._getCarriedStackTrace())}},e.prototype._rejectCallback=function(t,e,r){r||s.markAsOriginatingFromRejection(t);var n=s.ensureErrorObject(t),i=n===t;this._attachExtraTrace(n,e?i:!1),this._reject(t,i?void 0:n)},e.prototype._resolveFromResolver=function(t){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=w(t)(function(t){null!==e&&(e._resolveCallback(t),e=null)},function(t){null!==e&&(e._rejectCallback(t,r),e=null)});r=!1,this._popContext(),void 0!==n&&n===b&&null!==e&&(e._rejectCallback(n.e,!0,!0),e=null)},e.prototype._settlePromiseFromHandler=function(t,e,r,i){if(!i._isRejected()){i._pushContext();var o;if(o=e!==h||this._isRejected()?w(t).call(e,r):w(t).apply(this._boundTo,r),i._popContext(),o===b||o===i||o===p){var s=o===i?n():o.e;i._rejectCallback(s,!1,!0)}else i._resolveCallback(o)}},e.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},e.prototype._followee=function(){return this._rejectionHandler0},e.prototype._setFollowee=function(t){this._rejectionHandler0=t},e.prototype._cleanValues=function(){this._cancellable()&&(this._cancellationParent=void 0)},e.prototype._propagateFrom=function(t,e){(1&e)>0&&t._cancellable()&&(this._setCancellable(),this._cancellationParent=t),(4&e)>0&&t._isBound()&&this._setBoundTo(t._boundTo)},e.prototype._fulfill=function(t){this._isFollowingOrFulfilledOrRejected()||this._fulfillUnchecked(t)},e.prototype._reject=function(t,e){this._isFollowingOrFulfilledOrRejected()||this._rejectUnchecked(t,e)},e.prototype._settlePromiseAt=function(t){var r=this._promiseAt(t),n=r instanceof e;if(n&&r._isMigrated())return r._unsetIsMigrated(),a.invoke(this._settlePromiseAt,this,t);var i=this._isFulfilled()?this._fulfillmentHandlerAt(t):this._rejectionHandlerAt(t),o=this._isCarryingStackTrace()?this._getCarriedStackTrace():void 0,s=this._settledValue,u=this._receiverAt(t);this._clearCallbackDataAtIndex(t),"function"==typeof i?n?this._settlePromiseFromHandler(i,u,s,r):i.call(u,s,r):u instanceof _?u._isResolved()||(this._isFulfilled()?u._promiseFulfilled(s,r):u._promiseRejected(s,r)):n&&(this._isFulfilled()?r._fulfill(s):r._reject(s,o)),t>=4&&4===(31&t)&&a.invokeLater(this._setLength,this,0)},e.prototype._clearCallbackDataAtIndex=function(t){if(0===t)this._isCarryingStackTrace()||(this._fulfillmentHandler0=void 0),this._rejectionHandler0=this._progressHandler0=this._receiver0=this._promise0=void 0;else{var e=5*t-5;this[e+3]=this[e+4]=this[e+0]=this[e+1]=this[e+2]=void 0}},e.prototype._isSettlePromisesQueued=function(){return-1073741824===(-1073741824&this._bitField)},e.prototype._setSettlePromisesQueued=function(){this._bitField=-1073741824|this._bitField},e.prototype._unsetSettlePromisesQueued=function(){this._bitField=1073741823&this._bitField},e.prototype._queueSettlePromises=function(){a.settlePromises(this),this._setSettlePromisesQueued()},e.prototype._fulfillUnchecked=function(t){if(t===this){var e=n();return this._attachExtraTrace(e),this._rejectUnchecked(e,void 0)}this._setFulfilled(),this._settledValue=t,this._cleanValues(),this._length()>0&&this._queueSettlePromises()},e.prototype._rejectUncheckedCheckError=function(t){var e=s.ensureErrorObject(t);this._rejectUnchecked(t,e===t?void 0:e)},e.prototype._rejectUnchecked=function(t,e){if(t===this){var r=n();return this._attachExtraTrace(r),this._rejectUnchecked(r)}return this._setRejected(),this._settledValue=t,this._cleanValues(),this._isFinal()?void a.throwLater(function(t){throw"stack"in t&&a.invokeFirst(d.unhandledRejection,void 0,t),t},void 0===e?t:e):(void 0!==e&&e!==t&&this._setCarriedStackTrace(e),void(this._length()>0?this._queueSettlePromises():this._ensurePossibleRejectionHandled()))},e.prototype._settlePromises=function(){this._unsetSettlePromisesQueued();for(var t=this._length(),e=0;t>e;e++)this._settlePromiseAt(e)},e._makeSelfResolutionError=n,t("./progress.js")(e,_),t("./method.js")(e,l,f,o),t("./bind.js")(e,l,f),t("./finally.js")(e,p,f),t("./direct_resolve.js")(e),t("./synchronous_inspection.js")(e),t("./join.js")(e,_,f,l),e.Promise=e,t("./map.js")(e,_,o,f,l),t("./cancel.js")(e),t("./using.js")(e,o,f,y),t("./generators.js")(e,o,l,f),t("./nodeify.js")(e),t("./call_get.js")(e),t("./props.js")(e,_,f,o),t("./race.js")(e,l,f,o),t("./reduce.js")(e,_,o,f,l),t("./settle.js")(e,_),t("./some.js")(e,_,o),t("./promisify.js")(e,l),t("./any.js")(e),t("./each.js")(e,l),t("./timers.js")(e,l),t("./filter.js")(e,l),s.toFastProperties(e),s.toFastProperties(e.prototype),r({a:1}),r({b:2}),r({c:3}),r(1),r(function(){}),r(void 0),r(!1),r(new e(l)),d.setBounds(a.firstLineError,s.lastLineError),e}},{"./any.js":1,"./async.js":2,"./bind.js":3,"./call_get.js":5,"./cancel.js":6,"./captured_trace.js":7,"./catch_filter.js":8,"./context.js":9,"./debuggability.js":10,"./direct_resolve.js":11,"./each.js":12,"./errors.js":13,"./filter.js":15,"./finally.js":16,"./generators.js":17,"./join.js":18,"./map.js":19,"./method.js":20,"./nodeify.js":21,"./progress.js":22,"./promise_array.js":24,"./promise_resolver.js":25,"./promisify.js":26,"./props.js":27,"./race.js":29,"./reduce.js":30,"./settle.js":32,"./some.js":33,"./synchronous_inspection.js":34,"./thenables.js":35,"./timers.js":36,"./using.js":37,"./util.js":38}],24:[function(t,e){"use strict";e.exports=function(e,r,n,i){function o(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var n,i=this._promise=new e(r);t instanceof e&&(n=t,i._propagateFrom(n,5)),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var a=t("./util.js"),u=a.isArray;return s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function c(t,r){var s=n(this._values,this._promise);if(s instanceof e){if(s=s._target(),this._values=s,!s._isFulfilled())return s._isPending()?void s._then(c,this._reject,void 0,this,r):void this._reject(s._reason());if(s=s._value(),!u(s)){var a=new e.TypeError("expecting an array, a promise or a thenable\n\n See http://goo.gl/s8MMhc\n");return void this.__hardReject__(a)}}else if(!u(s))return void this._promise._reject(i("expecting an array, a promise or a thenable\n\n See http://goo.gl/s8MMhc\n")._reason());if(0===s.length)return void(-5===r?this._resolveEmptyArray():this._resolve(o(r)));var l=this.getActualLength(s.length);this._length=l,this._values=this.shouldCopyValues()?new Array(l):this._values;for(var h=this._promise,p=0;l>p;++p){var f=this._isResolved(),_=n(s[p],h);_ instanceof e?(_=_._target(),f?_._unsetRejectionIsUnhandled():_._isPending()?_._proxyPromiseArray(this,p):_._isFulfilled()?this._promiseFulfilled(_._value(),p):this._promiseRejected(_._reason(),p)):f||this._promiseFulfilled(_,p)}},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype.__hardReject__=s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1,!0)},s.prototype._promiseProgressed=function(t,e){this._promise._progress({index:e,value:t})},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;r>=this._length&&this._resolve(this._values)},s.prototype._promiseRejected=function(t){this._totalResolved++,this._reject(t)},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util.js":38}],25:[function(t,e){"use strict";function r(t){return t instanceof Error&&p.getPrototypeOf(t)===Error.prototype}function n(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=p.keys(t),i=0;i<n.length;++i){var o=n[i];f.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function i(t){return function(e,r){if(null!==t){if(e){var i=n(a(e));t._attachExtraTrace(i),t._reject(i)}else if(arguments.length>2){for(var o=arguments.length,s=new Array(o-1),u=1;o>u;++u)s[u-1]=arguments[u];t._fulfill(s)}else t._fulfill(r);t=null}}}var o,s=t("./util.js"),a=s.maybeWrapAsError,u=t("./errors.js"),c=u.TimeoutError,l=u.OperationalError,h=s.haveGetters,p=t("./es5.js"),f=/^(?:name|message|stack|cause)$/;if(o=h?function(t){this.promise=t}:function(t){this.promise=t,this.asCallback=i(t),this.callback=this.asCallback},h){var _={get:function(){return i(this.promise)}};p.defineProperty(o.prototype,"asCallback",_),p.defineProperty(o.prototype,"callback",_)}o._nodebackForPromise=i,o.prototype.toString=function(){return"[object PromiseResolver]"},o.prototype.resolve=o.prototype.fulfill=function(t){if(!(this instanceof o))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._resolveCallback(t)},o.prototype.reject=function(t){if(!(this instanceof o))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._rejectCallback(t)},o.prototype.progress=function(t){if(!(this instanceof o))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._progress(t)},o.prototype.cancel=function(t){this.promise.cancel(t)},o.prototype.timeout=function(){this.reject(new c("timeout"))},o.prototype.isResolved=function(){return this.promise.isResolved()},o.prototype.toJSON=function(){return this.promise.toJSON()},e.exports=o},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(t,e){"use strict";e.exports=function(e,r){function n(t){return!b.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(e){return!1}}function o(t,e,r){var n=f.getDataPropertyOrDefault(t,e+r,j);return n?i(n):!1}function s(t,e,r){for(var n=0;n<t.length;n+=2){var i=t[n];if(r.test(i))for(var o=i.replace(r,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new g("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/iWrZbw\n".replace("%s",e))}}function a(t,e,r,n){for(var a=f.inheritedDataKeys(t),u=[],c=0;c<a.length;++c){var l=a[c],h=t[l],p=n===w?!0:w(l,h,t);"function"!=typeof h||i(h)||o(t,l,e)||!n(l,h,t,p)||u.push(l,h)}return s(u,e,r),u}function u(t,n,i,o){function s(){var i=n;n===p&&(i=this);var o=new e(r);o._captureStackTrace();var s="string"==typeof u&&this!==a?this[u]:t,c=_(o);try{s.apply(i,d(arguments,c))}catch(l){o._rejectCallback(v(l),!0,!0)}return o}var a=function(){return this}(),u=t;return"string"==typeof u&&(t=o),s.__isPromisified__=!0,s}function c(t,e,r,n){for(var i=new RegExp(k(e)+"$"),o=a(t,e,i,r),s=0,u=o.length;u>s;s+=2){var c=o[s],l=o[s+1],h=c+e;t[h]=n===E?E(c,p,c,l,e):n(l,function(){return E(c,p,c,l,e)})}return f.toFastProperties(t),t}function l(t,e){return E(t,e,void 0,t)}var h,p={},f=t("./util.js"),_=t("./promise_resolver.js")._nodebackForPromise,d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,g=t("./errors").TypeError,m="Async",j={__isPromisified__:!0},b=/^(?:length|name|arguments|caller|callee|prototype|__isPromisified__)$/,w=function(t,e){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&!f.isClass(e)},k=function(t){return t.replace(/([$])/,"\\$")},E=y?h:u;e.promisify=function(t,e){if("function"!=typeof t)throw new g("fn must be a function\n\n See http://goo.gl/916lJJ\n");if(i(t))return t;var r=l(t,arguments.length<2?p:e);return f.copyDescriptors(t,r,n),r},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new g("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/9ITlV0\n");e=Object(e);var r=e.suffix;"string"!=typeof r&&(r=m);var n=e.filter;"function"!=typeof n&&(n=w);var i=e.promisifier;if("function"!=typeof i&&(i=E),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/8FZo5V\n");for(var o=f.inheritedDataKeys(t),s=0;s<o.length;++s){var a=t[o[s]];"constructor"!==o[s]&&f.isClass(a)&&(c(a.prototype,r,n,i),c(a,r,n,i))}return c(t,r,n,i)}}},{"./errors":13,"./promise_resolver.js":25,"./util.js":38}],27:[function(t,e){"use strict";e.exports=function(e,r,n,i){function o(t){for(var e=c.keys(t),r=e.length,n=new Array(2*r),i=0;r>i;++i){var o=e[i];n[i]=t[o],n[i+r]=o}this.constructor$(n)}function s(t){var r,s=n(t);return u(s)?(r=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&r._propagateFrom(s,4),r):i("cannot await properties of a non-object\n\n See http://goo.gl/OsFKC8\n")}var a=t("./util.js"),u=a.isObject,c=t("./es5.js");a.inherits(o,r),o.prototype._init=function(){this._init$(void 0,-3)},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;if(r>=this._length){for(var n={},i=this.length(),o=0,s=this.length();s>o;++o)n[this._values[o+i]]=this._values[o];this._resolve(n)}},o.prototype._promiseProgressed=function(t,e){this._promise._progress({key:this._values[e+this.length()],value:t})},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5.js":14,"./util.js":38}],28:[function(t,e){"use strict";function r(t,e,r,n,i){for(var o=0;i>o;++o)r[o+n]=t[o+e],t[o+e]=void 0}function n(t){this._capacity=t,this._length=0,this._front=0}n.prototype._willBeOverCapacity=function(t){return this._capacity<t},n.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var r=this._front+e&this._capacity-1;this[r]=t,this._length=e+1},n.prototype._unshiftOne=function(t){var e=this._capacity;this._checkCapacity(this.length()+1);var r=this._front,n=(r-1&e-1^e)-e;this[n]=t,this._front=n,this._length=this.length()+1},n.prototype.unshift=function(t,e,r){this._unshiftOne(r),this._unshiftOne(e),this._unshiftOne(t)},n.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=r,this._length=n},n.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},n.prototype.length=function(){return this._length},n.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},n.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,i=this._length,o=n+i&e-1;r(this,0,this,e,o)},e.exports=n},{}],29:[function(t,e){"use strict";e.exports=function(e,r,n,i){function o(t,o){var u=n(t);if(u instanceof e)return a(u);if(!s(t))return i("expecting an array, a promise or a thenable\n\n See http://goo.gl/s8MMhc\n");var c=new e(r);void 0!==o&&c._propagateFrom(o,5);for(var l=c._fulfill,h=c._reject,p=0,f=t.length;f>p;++p){var _=t[p];(void 0!==_||p in t)&&e.cast(_)._then(l,h,void 0,c,null)}return c}var s=t("./util.js").isArray,a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util.js":38}],30:[function(t,e){"use strict";e.exports=function(e,r,n,i,o){function s(t,r,n,s){this.constructor$(t),this._promise._captureStackTrace(),this._preservedValues=s===o?[]:null,this._zerothIsAccum=void 0===n,this._gotAccum=!1,this._reducingIndex=this._zerothIsAccum?1:0,this._valuesPhase=void 0;var u=i(n,this._promise),l=!1,h=u instanceof e;h&&(u=u._target(),u._isPending()?u._proxyPromiseArray(this,-1):u._isFulfilled()?(n=u._value(),this._gotAccum=!0):(this._reject(u._reason()),l=!0)),h||this._zerothIsAccum||(this._gotAccum=!0),this._callback=r,this._accum=n,l||c.invoke(a,this,void 0)}function a(){this._init$(void 0,-5)}function u(t,e,r,i){if("function"!=typeof e)return n("fn must be a function\n\n See http://goo.gl/916lJJ\n");var o=new s(t,e,r,i);return o.promise()}var c=t("./async.js"),l=t("./util.js"),h=l.tryCatch,p=l.errorObj;l.inherits(s,r),s.prototype._init=function(){},s.prototype._resolveEmptyArray=function(){(this._gotAccum||this._zerothIsAccum)&&this._resolve(null!==this._preservedValues?[]:this._accum)},s.prototype._promiseFulfilled=function(t,r){var n=this._values;n[r]=t;var o,s=this.length(),a=this._preservedValues,u=null!==a,c=this._gotAccum,l=this._valuesPhase;if(!l)for(l=this._valuesPhase=new Array(s),o=0;s>o;++o)l[o]=0;if(o=l[r],0===r&&this._zerothIsAccum?(this._accum=t,this._gotAccum=c=!0,l[r]=0===o?1:2):-1===r?(this._accum=t,this._gotAccum=c=!0):0===o?l[r]=1:(l[r]=2,this._accum=t),c){for(var f,_=this._callback,d=this._promise._boundTo,v=this._reducingIndex;s>v;++v)if(o=l[v],2!==o){if(1!==o)return;if(t=n[v],this._promise._pushContext(),u?(a.push(t),f=h(_).call(d,t,v,s)):f=h(_).call(d,this._accum,t,v,s),this._promise._popContext(),f===p)return this._reject(f.e);var y=i(f,this._promise);if(y instanceof e){if(y=y._target(),y._isPending())return l[v]=4,y._proxyPromiseArray(this,v);if(!y._isFulfilled())return this._reject(y._reason());f=y._value()}this._reducingIndex=v+1,this._accum=f}else this._reducingIndex=v+1;this._resolve(u?a:this._accum)}},e.prototype.reduce=function(t,e){return u(this,t,e,null)},e.reduce=function(t,e,r,n){return u(t,e,r,n)}}},{"./async.js":2,"./util.js":38}],31:[function(t,e){"use strict";var r,n=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")};if(t("./util.js").isNode){var i=process.versions.node.split(".").map(Number);r=0===i[0]&&i[1]>10||i[0]>0?global.setImmediate:process.nextTick,r||(r="undefined"!=typeof setImmediate?setImmediate:"undefined"!=typeof setTimeout?setTimeout:n)}else"undefined"!=typeof MutationObserver?(r=function(t){var e=document.createElement("div"),r=new MutationObserver(t);return r.observe(e,{attributes:!0}),function(){e.classList.toggle("foo")}},r.isStatic=!0):r="undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:n;e.exports=r},{"./util.js":38}],32:[function(t,e){"use strict";e.exports=function(e,r){function n(t){this.constructor$(t)}var i=e.PromiseInspection,o=t("./util.js");o.inherits(n,r),n.prototype._promiseResolved=function(t,e){this._values[t]=e;var r=++this._totalResolved;r>=this._length&&this._resolve(this._values)},n.prototype._promiseFulfilled=function(t,e){var r=new i;r._bitField=268435456,r._settledValue=t,this._promiseResolved(e,r)},n.prototype._promiseRejected=function(t,e){var r=new i;r._bitField=134217728,r._settledValue=t,this._promiseResolved(e,r)},e.settle=function(t){return new n(t).promise()},e.prototype.settle=function(){return new n(this).promise()}}},{"./util.js":38}],33:[function(t,e){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return n("expecting a positive integer\n\n See http://goo.gl/1wAmHx\n");var r=new i(t),o=r.promise();return r.setHowMany(e),r.init(),o}var s=t("./util.js"),a=t("./errors.js").RangeError,u=t("./errors.js").AggregateError,c=s.isArray;s.inherits(i,r),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),this._resolve(1===this.howMany()&&this._unwrap?this._values[0]:this._values))},i.prototype._promiseRejected=function(t){if(this._addRejected(t),this.howMany()>this._canPossiblyFulfill()){for(var e=new u,r=this.length();r<this._values.length;++r)e.push(this._values[r]);this._reject(e)}},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors.js":13,"./util.js":38}],34:[function(t,e){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValue=t._settledValue):(this._bitField=0,this._settledValue=void 0)}e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/hc1DLj\n");return this._settledValue},e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/hPuiwB\n");return this._settledValue},e.prototype.isFulfilled=t.prototype._isFulfilled=function(){return(268435456&this._bitField)>0},e.prototype.isRejected=t.prototype._isRejected=function(){return(134217728&this._bitField)>0},e.prototype.isPending=t.prototype._isPending=function(){return 0===(402653184&this._bitField)},e.prototype.isResolved=t.prototype._isResolved=function(){return(402653184&this._bitField)>0},t.prototype.isPending=function(){return this._target()._isPending()},t.prototype.isRejected=function(){return this._target()._isRejected()},t.prototype.isFulfilled=function(){return this._target()._isFulfilled()},t.prototype.isResolved=function(){return this._target()._isResolved()},t.prototype._value=function(){return this._settledValue},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue},t.prototype.value=function(){var t=this._target();if(!t.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/hc1DLj\n");return t._settledValue},t.prototype.reason=function(){var t=this._target();if(!t.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/hPuiwB\n");return t._unsetRejectionIsUnhandled(),t._settledValue},t.PromiseInspection=e}},{}],35:[function(t,e){"use strict";e.exports=function(e,r){function n(t,n){if(c(t)){if(t instanceof e)return t;if(o(t)){var l=new e(r);return t._then(l._fulfillUnchecked,l._rejectUncheckedCheckError,l._progressUnchecked,l,null),l}var h=a.tryCatch(i)(t);if(h===u){n&&n._pushContext();var l=e.reject(h.e);return n&&n._popContext(),l}if("function"==typeof h)return s(t,h,n)}return t}function i(t){return t.then}function o(t){return l.call(t,"_promise0")}function s(t,n,i){function o(r){l&&(t===r?l._rejectCallback(e._makeSelfResolutionError(),!1,!0):l._resolveCallback(r),l=null)}function s(t){l&&(l._rejectCallback(t,p,!0),l=null)}function c(t){l&&"function"==typeof l._progress&&l._progress(t)}var l=new e(r),h=l;i&&i._pushContext(),l._captureStackTrace(),i&&i._popContext();var p=!0,f=a.tryCatch(n).call(t,o,s,c);return p=!1,l&&f===u&&(l._rejectCallback(f.e,!0,!0),l=null),h}var a=t("./util.js"),u=a.errorObj,c=a.isObject,l={}.hasOwnProperty;return n}},{"./util.js":38}],36:[function(t,e){"use strict";e.exports=function(e,r){function n(t){var e=this;return e instanceof Number&&(e=+e),clearTimeout(e),t}function i(t){var e=this;throw e instanceof Number&&(e=+e),clearTimeout(e),t}var o=t("./util.js"),s=e.TimeoutError,a=function(t,e){if(t.isPending()){"string"!=typeof e&&(e="operation timed out");var r=new s(e);o.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._cancel(r)}},u=function(t){return c(+this).thenReturn(t)},c=e.delay=function(t,n){if(void 0===n){n=t,t=void 0;var i=new e(r);return setTimeout(function(){i._fulfill()},n),i}return n=+n,e.resolve(t)._then(u,null,null,n,void 0)};e.prototype.delay=function(t){return c(this,t)},e.prototype.timeout=function(t,e){t=+t;var r=this.then().cancellable();r._cancellationParent=this;var o=setTimeout(function(){a(r,e)},t);return r._then(n,i,void 0,o,void 0)}}},{"./util.js":38}],37:[function(t,e){"use strict";e.exports=function(e,r,n,i){function o(t){for(var r=t.length,n=0;r>n;++n){var i=t[n];if(i.isRejected())return e.reject(i.error());t[n]=i._settledValue}return t}function s(t){setTimeout(function(){throw t},0)}function a(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function u(t,r){function i(){if(o>=u)return c.resolve();var l=a(t[o++]);if(l instanceof e&&l._isDisposable()){try{l=n(l._getDisposer().tryDispose(r),t.promise)}catch(h){return s(h)}if(l instanceof e)return l._then(i,s,null,null,null)}i()}var o=0,u=t.length,c=e.defer();return i(),c.promise}function c(t){var e=new v;return e._settledValue=t,e._bitField=268435456,u(this,e).thenReturn(t)}function l(t){var e=new v;return e._settledValue=t,e._bitField=134217728,u(this,e).thenThrow(t)}function h(t,e,r){this._data=t,this._promise=e,this._context=r}function p(t,e,r){this.constructor$(t,e,r)}function f(t){return h.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}var _=t("./errors.js").TypeError,d=t("./util.js").inherits,v=e.PromiseInspection;h.prototype.data=function(){return this._data},h.prototype.promise=function(){return this._promise},h.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},h.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=null!==e?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},h.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},d(p,h),p.prototype.doDispose=function(t,e){var r=this.data();return r.call(t,t,e)},e.using=function(){var t=arguments.length;if(2>t)return r("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return r("fn must be a function\n\n See http://goo.gl/916lJJ\n");t--;for(var s=new Array(t),a=0;t>a;++a){var u=arguments[a];if(h.isDisposer(u)){var p=u;u=u.promise(),u._setDisposable(p)}else{var _=n(u);_ instanceof e&&(u=_._then(f,null,null,{resources:s,index:a},void 0))}s[a]=u}var d=e.settle(s).then(o).then(function(t){d._pushContext();var e;try{e=i.apply(void 0,t)}finally{d._popContext()}return e})._then(c,l,void 0,s,void 0);return s.promise=d,d},e.prototype._setDisposable=function(t){this._bitField=262144|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(262144&this._bitField)>0
+},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-262145&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new _}}},{"./errors.js":13,"./util.js":38}],38:[function(t,e,r){"use strict";function n(){try{return T.apply(this,arguments)}catch(t){return F.e=t,F}}function i(t){return T=t,n}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return!o(t)}function a(t){return o(t)?new Error(v(t)):t}function u(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;n>r;++r)i[r]=t[r];return i[r]=e,i}function c(t,e,r){if(!w.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function l(t,e,r){if(o(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return w.defineProperty(t,e,n),t}function h(t){throw t}function p(t){try{if("function"==typeof t){var e=w.names(t.prototype);return w.isES5?e.length>1:e.length>0&&!(1===e.length&&"constructor"===e[0])}return!1}catch(r){return!1}}function f(t){function e(){}e.prototype=t;for(var r=8;r--;)new e;return t}function _(t){return R.test(t)}function d(t,e,r){for(var n=new Array(t),i=0;t>i;++i)n[i]=e+i+r;return n}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){try{l(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function m(t){return t instanceof Error&&w.propertyIsWritable(t,"stack")}function j(t){return{}.toString.call(t)}function b(t,e,r){for(var n=w.names(t),i=0;i<n.length;++i){var o=n[i];r(o)&&w.defineProperty(e,o,w.getDescriptor(t,o))}}var w=t("./es5.js"),k="undefined"==typeof navigator,E=function(){try{var t={};return w.defineProperty(t,"f",{get:function(){return 3}}),3===t.f}catch(e){return!1}}(),F={e:{}},T,C=function(t,e){function r(){this.constructor=t,this.constructor$=e;for(var r in e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}var n={}.hasOwnProperty;return r.prototype=e.prototype,t.prototype=new r,t.prototype},x=function(){return"string"!==this}.call("string"),P=function(){if(w.isES5){var t=Object.prototype,e=Object.getOwnPropertyNames;return function(r){for(var n=[],i=Object.create(null);null!=r&&r!==t;){var o;try{o=e(r)}catch(s){return n}for(var a=0;a<o.length;++a){var u=o[a];if(!i[u]){i[u]=!0;var c=Object.getOwnPropertyDescriptor(r,u);null!=c&&null==c.get&&null==c.set&&n.push(u)}}r=w.getPrototypeOf(r)}return n}}return function(t){var e=[];for(var r in t)e.push(r);return e}}(),R=/^[a-z$_][a-z$_0-9]*$/i,A=function(){return"stack"in new Error?function(t){return m(t)?t:new Error(v(t))}:function(t){if(m(t))return t;try{throw new Error(v(t))}catch(e){return e}}}(),S={isClass:p,isIdentifier:_,inheritedDataKeys:P,getDataPropertyOrDefault:c,thrower:h,isArray:w.isArray,haveGetters:E,notEnumerableProp:l,isPrimitive:o,isObject:s,canEvaluate:k,errorObj:F,tryCatch:i,inherits:C,withAppended:u,maybeWrapAsError:a,wrapsPrimitiveReceiver:x,toFastProperties:f,filledRange:d,toString:v,canAttachTrace:m,ensureErrorObject:A,originatesFromRejection:g,markAsOriginatingFromRejection:y,classString:j,copyDescriptors:b,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:"undefined"!=typeof process&&"[object process]"===j(process).toLowerCase()};try{throw new Error}catch(O){S.lastLineError=O}e.exports=S},{"./es5.js":14}],39:[function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,a,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[t],s(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,a=new Array(i-1),u=1;i>u;u++)a[u-1]=arguments[u];r.apply(this,a)}else if(o(r)){for(i=arguments.length,a=new Array(i-1),u=1;i>u;u++)a[u-1]=arguments[u];for(c=r.slice(),i=c.length,u=0;i>u;u++)c[u].apply(this,a)}return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned){var i;i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-->0;)if(r[a]===e||r[a].listener&&r[a].listener===e){i=a;break}if(0>i)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.listenerCount=function(t,e){var r;return r=t._events&&t._events[e]?n(t._events[e])?1:t._events[e].length:0}},{}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/any.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/any.js
new file mode 100644
index 0000000000..05a6228ef9
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/any.js
@@ -0,0 +1,21 @@
+"use strict";
+module.exports = function(Promise) {
+var SomePromiseArray = Promise._SomePromiseArray;
+function any(promises) {
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(1);
+ ret.setUnwrap();
+ ret.init();
+ return promise;
+}
+
+Promise.any = function (promises) {
+ return any(promises);
+};
+
+Promise.prototype.any = function () {
+ return any(this);
+};
+
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/assert.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/assert.js
new file mode 100644
index 0000000000..a98955c475
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/assert.js
@@ -0,0 +1,55 @@
+"use strict";
+module.exports = (function(){
+var AssertionError = (function() {
+ function AssertionError(a) {
+ this.constructor$(a);
+ this.message = a;
+ this.name = "AssertionError";
+ }
+ AssertionError.prototype = new Error();
+ AssertionError.prototype.constructor = AssertionError;
+ AssertionError.prototype.constructor$ = Error;
+ return AssertionError;
+})();
+
+function getParams(args) {
+ var params = [];
+ for (var i = 0; i < args.length; ++i) params.push("arg" + i);
+ return params;
+}
+
+function nativeAssert(callName, args, expect) {
+ try {
+ var params = getParams(args);
+ var constructorArgs = params;
+ constructorArgs.push("return " +
+ callName + "("+ params.join(",") + ");");
+ var fn = Function.apply(null, constructorArgs);
+ return fn.apply(null, args);
+ } catch (e) {
+ if (!(e instanceof SyntaxError)) {
+ throw e;
+ } else {
+ return expect;
+ }
+ }
+}
+
+return function assert(boolExpr, message) {
+ if (boolExpr === true) return;
+
+ if (typeof boolExpr === "string" &&
+ boolExpr.charAt(0) === "%") {
+ var nativeCallName = boolExpr;
+ var $_len = arguments.length;var args = new Array($_len - 2); for(var $_i = 2; $_i < $_len; ++$_i) {args[$_i - 2] = arguments[$_i];}
+ if (nativeAssert(nativeCallName, args, message) === message) return;
+ message = (nativeCallName + " !== " + message);
+ }
+
+ var ret = new AssertionError(message);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(ret, assert);
+ }
+ throw ret;
+};
+})();
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/async.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/async.js
new file mode 100644
index 0000000000..39f23404ba
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/async.js
@@ -0,0 +1,202 @@
+"use strict";
+var firstLineError;
+try {throw new Error(); } catch (e) {firstLineError = e;}
+var schedule = require("./schedule.js");
+var Queue = require("./queue.js");
+var util = require("./util.js");
+
+function Async() {
+ this._isTickUsed = false;
+ this._lateQueue = new Queue(16);
+ this._normalQueue = new Queue(16);
+ this._trampolineEnabled = true;
+ var self = this;
+ this.drainQueues = function () {
+ self._drainQueues();
+ };
+ this._schedule =
+ schedule.isStatic ? schedule(this.drainQueues) : schedule;
+}
+
+Async.prototype.disableTrampolineIfNecessary = function() {
+ if (util.hasDevTools) {
+ this._trampolineEnabled = false;
+ }
+};
+
+Async.prototype.enableTrampoline = function() {
+ if (!this._trampolineEnabled) {
+ this._trampolineEnabled = true;
+ this._schedule = function(fn) {
+ setTimeout(fn, 0);
+ };
+ }
+};
+
+Async.prototype.haveItemsQueued = function () {
+ return this._normalQueue.length() > 0;
+};
+
+Async.prototype.throwLater = function(fn, arg) {
+ if (arguments.length === 1) {
+ arg = fn;
+ fn = function () { throw arg; };
+ }
+ var domain = this._getDomain();
+ if (domain !== undefined) fn = domain.bind(fn);
+ if (typeof setTimeout !== "undefined") {
+ setTimeout(function() {
+ fn(arg);
+ }, 0);
+ } else try {
+ this._schedule(function() {
+ fn(arg);
+ });
+ } catch (e) {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a");
+ }
+};
+
+Async.prototype._getDomain = function() {};
+
+if (util.isNode) {
+ var EventsModule = require("events");
+
+ var domainGetter = function() {
+ var domain = process.domain;
+ if (domain === null) return undefined;
+ return domain;
+ };
+
+ if (EventsModule.usingDomains) {
+ Async.prototype._getDomain = domainGetter;
+ } else {
+ var descriptor =
+ Object.getOwnPropertyDescriptor(EventsModule, "usingDomains");
+
+ if (!descriptor.configurable) {
+ process.on("domainsActivated", function() {
+ Async.prototype._getDomain = domainGetter;
+ });
+ } else {
+ var usingDomains = false;
+ Object.defineProperty(EventsModule, "usingDomains", {
+ configurable: false,
+ enumerable: true,
+ get: function() {
+ return usingDomains;
+ },
+ set: function(value) {
+ if (usingDomains || !value) return;
+ usingDomains = true;
+ Async.prototype._getDomain = domainGetter;
+ util.toFastProperties(process);
+ process.emit("domainsActivated");
+ }
+ });
+ }
+
+
+ }
+}
+
+function AsyncInvokeLater(fn, receiver, arg) {
+ var domain = this._getDomain();
+ if (domain !== undefined) fn = domain.bind(fn);
+ this._lateQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncInvoke(fn, receiver, arg) {
+ var domain = this._getDomain();
+ if (domain !== undefined) fn = domain.bind(fn);
+ this._normalQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncSettlePromises(promise) {
+ var domain = this._getDomain();
+ if (domain !== undefined) {
+ var fn = domain.bind(promise._settlePromises);
+ this._normalQueue.push(fn, promise, undefined);
+ } else {
+ this._normalQueue._pushOne(promise);
+ }
+ this._queueTick();
+}
+
+if (!util.hasDevTools) {
+ Async.prototype.invokeLater = AsyncInvokeLater;
+ Async.prototype.invoke = AsyncInvoke;
+ Async.prototype.settlePromises = AsyncSettlePromises;
+} else {
+ Async.prototype.invokeLater = function (fn, receiver, arg) {
+ if (this._trampolineEnabled) {
+ AsyncInvokeLater.call(this, fn, receiver, arg);
+ } else {
+ setTimeout(function() {
+ fn.call(receiver, arg);
+ }, 100);
+ }
+ };
+
+ Async.prototype.invoke = function (fn, receiver, arg) {
+ if (this._trampolineEnabled) {
+ AsyncInvoke.call(this, fn, receiver, arg);
+ } else {
+ setTimeout(function() {
+ fn.call(receiver, arg);
+ }, 0);
+ }
+ };
+
+ Async.prototype.settlePromises = function(promise) {
+ if (this._trampolineEnabled) {
+ AsyncSettlePromises.call(this, promise);
+ } else {
+ setTimeout(function() {
+ promise._settlePromises();
+ }, 0);
+ }
+ };
+}
+
+Async.prototype.invokeFirst = function (fn, receiver, arg) {
+ var domain = this._getDomain();
+ if (domain !== undefined) fn = domain.bind(fn);
+ this._normalQueue.unshift(fn, receiver, arg);
+ this._queueTick();
+};
+
+Async.prototype._drainQueue = function(queue) {
+ while (queue.length() > 0) {
+ var fn = queue.shift();
+ if (typeof fn !== "function") {
+ fn._settlePromises();
+ continue;
+ }
+ var receiver = queue.shift();
+ var arg = queue.shift();
+ fn.call(receiver, arg);
+ }
+};
+
+Async.prototype._drainQueues = function () {
+ this._drainQueue(this._normalQueue);
+ this._reset();
+ this._drainQueue(this._lateQueue);
+};
+
+Async.prototype._queueTick = function () {
+ if (!this._isTickUsed) {
+ this._isTickUsed = true;
+ this._schedule(this.drainQueues);
+ }
+};
+
+Async.prototype._reset = function () {
+ this._isTickUsed = false;
+};
+
+module.exports = new Async();
+module.exports.firstLineError = firstLineError;
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/bind.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/bind.js
new file mode 100644
index 0000000000..d6f6da2576
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/bind.js
@@ -0,0 +1,73 @@
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise) {
+var rejectThis = function(_, e) {
+ this._reject(e);
+};
+
+var targetRejected = function(e, context) {
+ context.promiseRejectionQueued = true;
+ context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
+};
+
+var bindingResolved = function(thisArg, context) {
+ this._setBoundTo(thisArg);
+ if (this._isPending()) {
+ this._resolveCallback(context.target);
+ }
+};
+
+var bindingRejected = function(e, context) {
+ if (!context.promiseRejectionQueued) this._reject(e);
+};
+
+Promise.prototype.bind = function (thisArg) {
+ var maybePromise = tryConvertToPromise(thisArg);
+ var ret = new Promise(INTERNAL);
+ ret._propagateFrom(this, 1);
+ var target = this._target();
+ if (maybePromise instanceof Promise) {
+ var context = {
+ promiseRejectionQueued: false,
+ promise: ret,
+ target: target,
+ bindingPromise: maybePromise
+ };
+ target._then(INTERNAL, targetRejected, ret._progress, ret, context);
+ maybePromise._then(
+ bindingResolved, bindingRejected, ret._progress, ret, context);
+ } else {
+ ret._setBoundTo(thisArg);
+ ret._resolveCallback(target);
+ }
+ return ret;
+};
+
+Promise.prototype._setBoundTo = function (obj) {
+ if (obj !== undefined) {
+ this._bitField = this._bitField | 131072;
+ this._boundTo = obj;
+ } else {
+ this._bitField = this._bitField & (~131072);
+ }
+};
+
+Promise.prototype._isBound = function () {
+ return (this._bitField & 131072) === 131072;
+};
+
+Promise.bind = function (thisArg, value) {
+ var maybePromise = tryConvertToPromise(thisArg);
+ var ret = new Promise(INTERNAL);
+
+ if (maybePromise instanceof Promise) {
+ maybePromise._then(function(thisArg) {
+ ret._setBoundTo(thisArg);
+ ret._resolveCallback(value);
+ }, ret._reject, ret._progress, ret, null);
+ } else {
+ ret._setBoundTo(thisArg);
+ ret._resolveCallback(value);
+ }
+ return ret;
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/bluebird.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/bluebird.js
new file mode 100644
index 0000000000..ed6226e7ea
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/bluebird.js
@@ -0,0 +1,11 @@
+"use strict";
+var old;
+if (typeof Promise !== "undefined") old = Promise;
+function noConflict() {
+ try { if (Promise === bluebird) Promise = old; }
+ catch (e) {}
+ return bluebird;
+}
+var bluebird = require("./promise.js")();
+bluebird.noConflict = noConflict;
+module.exports = bluebird;
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/call_get.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/call_get.js
new file mode 100644
index 0000000000..62c166d5c0
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/call_get.js
@@ -0,0 +1,123 @@
+"use strict";
+var cr = Object.create;
+if (cr) {
+ var callerCache = cr(null);
+ var getterCache = cr(null);
+ callerCache[" size"] = getterCache[" size"] = 0;
+}
+
+module.exports = function(Promise) {
+var util = require("./util.js");
+var canEvaluate = util.canEvaluate;
+var isIdentifier = util.isIdentifier;
+
+var getMethodCaller;
+var getGetter;
+if (!false) {
+var makeMethodCaller = function (methodName) {
+ return new Function("ensureMethod", " \n\
+ return function(obj) { \n\
+ 'use strict' \n\
+ var len = this.length; \n\
+ ensureMethod(obj, 'methodName'); \n\
+ switch(len) { \n\
+ case 1: return obj.methodName(this[0]); \n\
+ case 2: return obj.methodName(this[0], this[1]); \n\
+ case 3: return obj.methodName(this[0], this[1], this[2]); \n\
+ case 0: return obj.methodName(); \n\
+ default: \n\
+ return obj.methodName.apply(obj, this); \n\
+ } \n\
+ }; \n\
+ ".replace(/methodName/g, methodName))(ensureMethod);
+};
+
+var makeGetter = function (propertyName) {
+ return new Function("obj", " \n\
+ 'use strict'; \n\
+ return obj.propertyName; \n\
+ ".replace("propertyName", propertyName));
+};
+
+var getCompiled = function(name, compiler, cache) {
+ var ret = cache[name];
+ if (typeof ret !== "function") {
+ if (!isIdentifier(name)) {
+ return null;
+ }
+ ret = compiler(name);
+ cache[name] = ret;
+ cache[" size"]++;
+ if (cache[" size"] > 512) {
+ var keys = Object.keys(cache);
+ for (var i = 0; i < 256; ++i) delete cache[keys[i]];
+ cache[" size"] = keys.length - 256;
+ }
+ }
+ return ret;
+};
+
+getMethodCaller = function(name) {
+ return getCompiled(name, makeMethodCaller, callerCache);
+};
+
+getGetter = function(name) {
+ return getCompiled(name, makeGetter, getterCache);
+};
+}
+
+function ensureMethod(obj, methodName) {
+ var fn;
+ if (obj != null) fn = obj[methodName];
+ if (typeof fn !== "function") {
+ var message = "Object " + util.classString(obj) + " has no method '" +
+ util.toString(methodName) + "'";
+ throw new Promise.TypeError(message);
+ }
+ return fn;
+}
+
+function caller(obj) {
+ var methodName = this.pop();
+ var fn = ensureMethod(obj, methodName);
+ return fn.apply(obj, this);
+}
+Promise.prototype.call = function (methodName) {
+ var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
+ if (!false) {
+ if (canEvaluate) {
+ var maybeCaller = getMethodCaller(methodName);
+ if (maybeCaller !== null) {
+ return this._then(
+ maybeCaller, undefined, undefined, args, undefined);
+ }
+ }
+ }
+ args.push(methodName);
+ return this._then(caller, undefined, undefined, args, undefined);
+};
+
+function namedGetter(obj) {
+ return obj[this];
+}
+function indexedGetter(obj) {
+ var index = +this;
+ if (index < 0) index = Math.max(0, index + obj.length);
+ return obj[index];
+}
+Promise.prototype.get = function (propertyName) {
+ var isIndex = (typeof propertyName === "number");
+ var getter;
+ if (!isIndex) {
+ if (canEvaluate) {
+ var maybeGetter = getGetter(propertyName);
+ getter = maybeGetter !== null ? maybeGetter : namedGetter;
+ } else {
+ getter = namedGetter;
+ }
+ } else {
+ getter = indexedGetter;
+ }
+ return this._then(getter, undefined, undefined, propertyName, undefined);
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/cancel.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/cancel.js
new file mode 100644
index 0000000000..9eb40b6fb1
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/cancel.js
@@ -0,0 +1,48 @@
+"use strict";
+module.exports = function(Promise) {
+var errors = require("./errors.js");
+var async = require("./async.js");
+var CancellationError = errors.CancellationError;
+
+Promise.prototype._cancel = function (reason) {
+ if (!this.isCancellable()) return this;
+ var parent;
+ var promiseToReject = this;
+ while ((parent = promiseToReject._cancellationParent) !== undefined &&
+ parent.isCancellable()) {
+ promiseToReject = parent;
+ }
+ this._unsetCancellable();
+ promiseToReject._target()._rejectCallback(reason, false, true);
+};
+
+Promise.prototype.cancel = function (reason) {
+ if (!this.isCancellable()) return this;
+ if (reason === undefined) reason = new CancellationError();
+ async.invokeLater(this._cancel, this, reason);
+ return this;
+};
+
+Promise.prototype.cancellable = function () {
+ if (this._cancellable()) return this;
+ async.enableTrampoline();
+ this._setCancellable();
+ this._cancellationParent = undefined;
+ return this;
+};
+
+Promise.prototype.uncancellable = function () {
+ var ret = this.then();
+ ret._unsetCancellable();
+ return ret;
+};
+
+Promise.prototype.fork = function (didFulfill, didReject, didProgress) {
+ var ret = this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+
+ ret._setCancellable();
+ ret._cancellationParent = undefined;
+ return ret;
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/captured_trace.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/captured_trace.js
new file mode 100644
index 0000000000..6fda9e80c8
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/captured_trace.js
@@ -0,0 +1,492 @@
+"use strict";
+module.exports = function() {
+var async = require("./async.js");
+var util = require("./util.js");
+var bluebirdFramePattern =
+ /[\\\/]bluebird[\\\/]js[\\\/](main|debug|zalgo|instrumented)/;
+var stackFramePattern = null;
+var formatStack = null;
+var indentStackFrames = false;
+var warn;
+
+function CapturedTrace(parent) {
+ this._parent = parent;
+ var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
+ captureStackTrace(this, CapturedTrace);
+ if (length > 32) this.uncycle();
+}
+util.inherits(CapturedTrace, Error);
+
+CapturedTrace.prototype.uncycle = function() {
+ var length = this._length;
+ if (length < 2) return;
+ var nodes = [];
+ var stackToIndex = {};
+
+ for (var i = 0, node = this; node !== undefined; ++i) {
+ nodes.push(node);
+ node = node._parent;
+ }
+ length = this._length = i;
+ for (var i = length - 1; i >= 0; --i) {
+ var stack = nodes[i].stack;
+ if (stackToIndex[stack] === undefined) {
+ stackToIndex[stack] = i;
+ }
+ }
+ for (var i = 0; i < length; ++i) {
+ var currentStack = nodes[i].stack;
+ var index = stackToIndex[currentStack];
+ if (index !== undefined && index !== i) {
+ if (index > 0) {
+ nodes[index - 1]._parent = undefined;
+ nodes[index - 1]._length = 1;
+ }
+ nodes[i]._parent = undefined;
+ nodes[i]._length = 1;
+ var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
+
+ if (index < length - 1) {
+ cycleEdgeNode._parent = nodes[index + 1];
+ cycleEdgeNode._parent.uncycle();
+ cycleEdgeNode._length =
+ cycleEdgeNode._parent._length + 1;
+ } else {
+ cycleEdgeNode._parent = undefined;
+ cycleEdgeNode._length = 1;
+ }
+ var currentChildLength = cycleEdgeNode._length + 1;
+ for (var j = i - 2; j >= 0; --j) {
+ nodes[j]._length = currentChildLength;
+ currentChildLength++;
+ }
+ return;
+ }
+ }
+};
+
+CapturedTrace.prototype.parent = function() {
+ return this._parent;
+};
+
+CapturedTrace.prototype.hasParent = function() {
+ return this._parent !== undefined;
+};
+
+CapturedTrace.prototype.attachExtraTrace = function(error) {
+ if (error.__stackCleaned__) return;
+ this.uncycle();
+ var parsed = CapturedTrace.parseStackAndMessage(error);
+ var message = parsed.message;
+ var stacks = [parsed.stack];
+
+ var trace = this;
+ while (trace !== undefined) {
+ stacks.push(cleanStack(trace.stack.split("\n")));
+ trace = trace._parent;
+ }
+ removeCommonRoots(stacks);
+ removeDuplicateOrEmptyJumps(stacks);
+ util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+};
+
+function reconstructStack(message, stacks) {
+ for (var i = 0; i < stacks.length - 1; ++i) {
+ stacks[i].push("From previous event:");
+ stacks[i] = stacks[i].join("\n");
+ }
+ if (i < stacks.length) {
+ stacks[i] = stacks[i].join("\n");
+ }
+ return message + "\n" + stacks.join("\n");
+}
+
+function removeDuplicateOrEmptyJumps(stacks) {
+ for (var i = 0; i < stacks.length; ++i) {
+ if (stacks[i].length === 0 ||
+ ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
+ stacks.splice(i, 1);
+ i--;
+ }
+ }
+}
+
+function removeCommonRoots(stacks) {
+ var current = stacks[0];
+ for (var i = 1; i < stacks.length; ++i) {
+ var prev = stacks[i];
+ var currentLastIndex = current.length - 1;
+ var currentLastLine = current[currentLastIndex];
+ var commonRootMeetPoint = -1;
+
+ for (var j = prev.length - 1; j >= 0; --j) {
+ if (prev[j] === currentLastLine) {
+ commonRootMeetPoint = j;
+ break;
+ }
+ }
+
+ for (var j = commonRootMeetPoint; j >= 0; --j) {
+ var line = prev[j];
+ if (current[currentLastIndex] === line) {
+ current.pop();
+ currentLastIndex--;
+ } else {
+ break;
+ }
+ }
+ current = prev;
+ }
+}
+
+function cleanStack(stack) {
+ var ret = [];
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ var isTraceLine = stackFramePattern.test(line) ||
+ " (No stack trace)" === line;
+ var isInternalFrame = isTraceLine && shouldIgnore(line);
+ if (isTraceLine && !isInternalFrame) {
+ if (indentStackFrames && line.charAt(0) !== " ") {
+ line = " " + line;
+ }
+ ret.push(line);
+ }
+ }
+ return ret;
+}
+
+function stackFramesAsArray(error) {
+ var stack = error.stack.replace(/\s+$/g, "").split("\n");
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ if (" (No stack trace)" === line || stackFramePattern.test(line)) {
+ break;
+ }
+ }
+ if (i > 0) {
+ stack = stack.slice(i);
+ }
+ return stack;
+}
+
+CapturedTrace.parseStackAndMessage = function(error) {
+ var stack = error.stack;
+ var message = error.toString();
+ stack = typeof stack === "string" && stack.length > 0
+ ? stackFramesAsArray(error) : [" (No stack trace)"];
+ return {
+ message: message,
+ stack: cleanStack(stack)
+ };
+};
+
+CapturedTrace.formatAndLogError = function(error, title) {
+ if (typeof console !== "undefined") {
+ var message;
+ if (typeof error === "object" || typeof error === "function") {
+ var stack = error.stack;
+ message = title + formatStack(stack, error);
+ } else {
+ message = title + String(error);
+ }
+ if (typeof warn === "function") {
+ warn(message);
+ } else if (typeof console.log === "function" ||
+ typeof console.log === "object") {
+ console.log(message);
+ }
+ }
+};
+
+CapturedTrace.unhandledRejection = function (reason) {
+ CapturedTrace.formatAndLogError(reason, "^--- With additional stack trace: ");
+};
+
+CapturedTrace.isSupported = function () {
+ return typeof captureStackTrace === "function";
+};
+
+CapturedTrace.fireRejectionEvent =
+function(name, localHandler, reason, promise) {
+ var localEventFired = false;
+ try {
+ if (typeof localHandler === "function") {
+ localEventFired = true;
+ if (name === "rejectionHandled") {
+ localHandler(promise);
+ } else {
+ localHandler(reason, promise);
+ }
+ }
+ } catch (e) {
+ async.throwLater(e);
+ }
+
+ var globalEventFired = false;
+ try {
+ globalEventFired = fireGlobalEvent(name, reason, promise);
+ } catch (e) {
+ globalEventFired = true;
+ async.throwLater(e);
+ }
+
+ var domEventFired = false;
+ if (fireDomEvent) {
+ try {
+ domEventFired = fireDomEvent(name.toLowerCase(), {
+ reason: reason,
+ promise: promise
+ });
+ } catch (e) {
+ domEventFired = true;
+ async.throwLater(e);
+ }
+ }
+
+ if (!globalEventFired && !localEventFired && !domEventFired &&
+ name === "unhandledRejection") {
+ CapturedTrace.formatAndLogError(reason, "Unhandled rejection ");
+ }
+};
+
+function formatNonError(obj) {
+ var str;
+ if (typeof obj === "function") {
+ str = "[function " +
+ (obj.name || "anonymous") +
+ "]";
+ } else {
+ str = obj.toString();
+ var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
+ if (ruselessToString.test(str)) {
+ try {
+ var newStr = JSON.stringify(obj);
+ str = newStr;
+ }
+ catch(e) {
+
+ }
+ }
+ if (str.length === 0) {
+ str = "(empty array)";
+ }
+ }
+ return ("(<" + snip(str) + ">, no stack trace)");
+}
+
+function snip(str) {
+ var maxChars = 41;
+ if (str.length < maxChars) {
+ return str;
+ }
+ return str.substr(0, maxChars - 3) + "...";
+}
+
+var shouldIgnore = function() { return false; };
+var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
+function parseLineInfo(line) {
+ var matches = line.match(parseLineInfoRegex);
+ if (matches) {
+ return {
+ fileName: matches[1],
+ line: parseInt(matches[2], 10)
+ };
+ }
+}
+CapturedTrace.setBounds = function(firstLineError, lastLineError) {
+ if (!CapturedTrace.isSupported()) return;
+ var firstStackLines = firstLineError.stack.split("\n");
+ var lastStackLines = lastLineError.stack.split("\n");
+ var firstIndex = -1;
+ var lastIndex = -1;
+ var firstFileName;
+ var lastFileName;
+ for (var i = 0; i < firstStackLines.length; ++i) {
+ var result = parseLineInfo(firstStackLines[i]);
+ if (result) {
+ firstFileName = result.fileName;
+ firstIndex = result.line;
+ break;
+ }
+ }
+ for (var i = 0; i < lastStackLines.length; ++i) {
+ var result = parseLineInfo(lastStackLines[i]);
+ if (result) {
+ lastFileName = result.fileName;
+ lastIndex = result.line;
+ break;
+ }
+ }
+ if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
+ firstFileName !== lastFileName || firstIndex >= lastIndex) {
+ return;
+ }
+
+ shouldIgnore = function(line) {
+ if (bluebirdFramePattern.test(line)) return true;
+ var info = parseLineInfo(line);
+ if (info) {
+ if (info.fileName === firstFileName &&
+ (firstIndex <= info.line && info.line <= lastIndex)) {
+ return true;
+ }
+ }
+ return false;
+ };
+};
+
+var captureStackTrace = (function stackDetection() {
+ var v8stackFramePattern = /^\s*at\s*/;
+ var v8stackFormatter = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if (error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ if (typeof Error.stackTraceLimit === "number" &&
+ typeof Error.captureStackTrace === "function") {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ var captureStackTrace = Error.captureStackTrace;
+
+ shouldIgnore = function(line) {
+ return bluebirdFramePattern.test(line);
+ };
+ return function(receiver, ignoreUntil) {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ captureStackTrace(receiver, ignoreUntil);
+ Error.stackTraceLimit = Error.stackTraceLimit - 6;
+ };
+ }
+ var err = new Error();
+
+ if (typeof err.stack === "string" &&
+ err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
+ stackFramePattern = /@/;
+ formatStack = v8stackFormatter;
+ indentStackFrames = true;
+ return function captureStackTrace(o) {
+ o.stack = new Error().stack;
+ };
+ }
+
+ var hasStackAfterThrow;
+ try { throw new Error(); }
+ catch(e) {
+ hasStackAfterThrow = ("stack" in e);
+ }
+ if (!("stack" in err) && hasStackAfterThrow) {
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ return function captureStackTrace(o) {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ try { throw new Error(); }
+ catch(e) { o.stack = e.stack; }
+ Error.stackTraceLimit = Error.stackTraceLimit - 6;
+ };
+ }
+
+ formatStack = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if ((typeof error === "object" ||
+ typeof error === "function") &&
+ error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ return null;
+
+})([]);
+
+var fireDomEvent;
+var fireGlobalEvent = (function() {
+ if (util.isNode) {
+ return function(name, reason, promise) {
+ if (name === "rejectionHandled") {
+ return process.emit(name, promise);
+ } else {
+ return process.emit(name, reason, promise);
+ }
+ };
+ } else {
+ var customEventWorks = false;
+ var anyEventWorks = true;
+ try {
+ var ev = new self.CustomEvent("test");
+ customEventWorks = ev instanceof CustomEvent;
+ } catch (e) {}
+ if (!customEventWorks) {
+ try {
+ var event = document.createEvent("CustomEvent");
+ event.initCustomEvent("testingtheevent", false, true, {});
+ self.dispatchEvent(event);
+ } catch (e) {
+ anyEventWorks = false;
+ }
+ }
+ if (anyEventWorks) {
+ fireDomEvent = function(type, detail) {
+ var event;
+ if (customEventWorks) {
+ event = new self.CustomEvent(type, {
+ detail: detail,
+ bubbles: false,
+ cancelable: true
+ });
+ } else if (self.dispatchEvent) {
+ event = document.createEvent("CustomEvent");
+ event.initCustomEvent(type, false, true, detail);
+ }
+
+ return event ? !self.dispatchEvent(event) : false;
+ };
+ }
+
+ var toWindowMethodNameMap = {};
+ toWindowMethodNameMap["unhandledRejection"] = ("on" +
+ "unhandledRejection").toLowerCase();
+ toWindowMethodNameMap["rejectionHandled"] = ("on" +
+ "rejectionHandled").toLowerCase();
+
+ return function(name, reason, promise) {
+ var methodName = toWindowMethodNameMap[name];
+ var method = self[methodName];
+ if (!method) return false;
+ if (name === "rejectionHandled") {
+ method.call(self, promise);
+ } else {
+ method.call(self, reason, promise);
+ }
+ return true;
+ };
+ }
+})();
+
+if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
+ warn = function (message) {
+ console.warn(message);
+ };
+ if (util.isNode && process.stderr.isTTY) {
+ warn = function(message) {
+ process.stderr.write("\u001b[31m" + message + "\u001b[39m\n");
+ };
+ } else if (!util.isNode && typeof (new Error().stack) === "string") {
+ warn = function(message) {
+ console.warn("%c" + message, "color: red");
+ };
+ }
+}
+
+return CapturedTrace;
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/catch_filter.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/catch_filter.js
new file mode 100644
index 0000000000..040f057202
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/catch_filter.js
@@ -0,0 +1,66 @@
+"use strict";
+module.exports = function(NEXT_FILTER) {
+var util = require("./util.js");
+var errors = require("./errors.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var keys = require("./es5.js").keys;
+var TypeError = errors.TypeError;
+
+function CatchFilter(instances, callback, promise) {
+ this._instances = instances;
+ this._callback = callback;
+ this._promise = promise;
+}
+
+function safePredicate(predicate, e) {
+ var safeObject = {};
+ var retfilter = tryCatch(predicate).call(safeObject, e);
+
+ if (retfilter === errorObj) return retfilter;
+
+ var safeKeys = keys(safeObject);
+ if (safeKeys.length) {
+ errorObj.e = new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a");
+ return errorObj;
+ }
+ return retfilter;
+}
+
+CatchFilter.prototype.doFilter = function (e) {
+ var cb = this._callback;
+ var promise = this._promise;
+ var boundTo = promise._boundTo;
+ for (var i = 0, len = this._instances.length; i < len; ++i) {
+ var item = this._instances[i];
+ var itemIsErrorType = item === Error ||
+ (item != null && item.prototype instanceof Error);
+
+ if (itemIsErrorType && e instanceof item) {
+ var ret = tryCatch(cb).call(boundTo, e);
+ if (ret === errorObj) {
+ NEXT_FILTER.e = ret.e;
+ return NEXT_FILTER;
+ }
+ return ret;
+ } else if (typeof item === "function" && !itemIsErrorType) {
+ var shouldHandle = safePredicate(item, e);
+ if (shouldHandle === errorObj) {
+ e = errorObj.e;
+ break;
+ } else if (shouldHandle) {
+ var ret = tryCatch(cb).call(boundTo, e);
+ if (ret === errorObj) {
+ NEXT_FILTER.e = ret.e;
+ return NEXT_FILTER;
+ }
+ return ret;
+ }
+ }
+ }
+ NEXT_FILTER.e = e;
+ return NEXT_FILTER;
+};
+
+return CatchFilter;
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/context.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/context.js
new file mode 100644
index 0000000000..ccd7702b7e
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/context.js
@@ -0,0 +1,38 @@
+"use strict";
+module.exports = function(Promise, CapturedTrace, isDebugging) {
+var contextStack = [];
+function Context() {
+ this._trace = new CapturedTrace(peekContext());
+}
+Context.prototype._pushContext = function () {
+ if (!isDebugging()) return;
+ if (this._trace !== undefined) {
+ contextStack.push(this._trace);
+ }
+};
+
+Context.prototype._popContext = function () {
+ if (!isDebugging()) return;
+ if (this._trace !== undefined) {
+ contextStack.pop();
+ }
+};
+
+function createContext() {
+ if (isDebugging()) return new Context();
+}
+
+function peekContext() {
+ var lastIndex = contextStack.length - 1;
+ if (lastIndex >= 0) {
+ return contextStack[lastIndex];
+ }
+ return undefined;
+}
+
+Promise.prototype._peekContext = peekContext;
+Promise.prototype._pushContext = Context.prototype._pushContext;
+Promise.prototype._popContext = Context.prototype._popContext;
+
+return createContext;
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/debuggability.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/debuggability.js
new file mode 100644
index 0000000000..5ac176705f
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/debuggability.js
@@ -0,0 +1,147 @@
+"use strict";
+module.exports = function(Promise, CapturedTrace) {
+var async = require("./async.js");
+var Warning = require("./errors.js").Warning;
+var util = require("./util.js");
+var canAttachTrace = util.canAttachTrace;
+var unhandledRejectionHandled;
+var possiblyUnhandledRejection;
+var debugging = false || (util.isNode &&
+ (!!process.env["BLUEBIRD_DEBUG"] ||
+ process.env["NODE_ENV"] === "development"));
+
+if (debugging) {
+ async.disableTrampolineIfNecessary();
+}
+
+Promise.prototype._ensurePossibleRejectionHandled = function () {
+ this._setRejectionIsUnhandled();
+ async.invokeLater(this._notifyUnhandledRejection, this, undefined);
+};
+
+Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
+ CapturedTrace.fireRejectionEvent("rejectionHandled",
+ unhandledRejectionHandled, undefined, this);
+};
+
+Promise.prototype._notifyUnhandledRejection = function () {
+ if (this._isRejectionUnhandled()) {
+ var reason = this._getCarriedStackTrace() || this._settledValue;
+ this._setUnhandledRejectionIsNotified();
+ CapturedTrace.fireRejectionEvent("unhandledRejection",
+ possiblyUnhandledRejection, reason, this);
+ }
+};
+
+Promise.prototype._setUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField | 524288;
+};
+
+Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField & (~524288);
+};
+
+Promise.prototype._isUnhandledRejectionNotified = function () {
+ return (this._bitField & 524288) > 0;
+};
+
+Promise.prototype._setRejectionIsUnhandled = function () {
+ this._bitField = this._bitField | 2097152;
+};
+
+Promise.prototype._unsetRejectionIsUnhandled = function () {
+ this._bitField = this._bitField & (~2097152);
+ if (this._isUnhandledRejectionNotified()) {
+ this._unsetUnhandledRejectionIsNotified();
+ this._notifyUnhandledRejectionIsHandled();
+ }
+};
+
+Promise.prototype._isRejectionUnhandled = function () {
+ return (this._bitField & 2097152) > 0;
+};
+
+Promise.prototype._setCarriedStackTrace = function (capturedTrace) {
+ this._bitField = this._bitField | 1048576;
+ this._fulfillmentHandler0 = capturedTrace;
+};
+
+Promise.prototype._isCarryingStackTrace = function () {
+ return (this._bitField & 1048576) > 0;
+};
+
+Promise.prototype._getCarriedStackTrace = function () {
+ return this._isCarryingStackTrace()
+ ? this._fulfillmentHandler0
+ : undefined;
+};
+
+Promise.prototype._captureStackTrace = function () {
+ if (debugging) {
+ this._trace = new CapturedTrace(this._peekContext());
+ }
+ return this;
+};
+
+Promise.prototype._attachExtraTrace = function (error, ignoreSelf) {
+ if (debugging && canAttachTrace(error)) {
+ var trace = this._trace;
+ if (trace !== undefined) {
+ if (ignoreSelf) trace = trace._parent;
+ }
+ if (trace !== undefined) {
+ trace.attachExtraTrace(error);
+ } else if (!error.__stackCleaned__) {
+ var parsed = CapturedTrace.parseStackAndMessage(error);
+ util.notEnumerableProp(error, "stack",
+ parsed.message + "\n" + parsed.stack.join("\n"));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+ }
+ }
+};
+
+Promise.prototype._warn = function(message) {
+ var warning = new Warning(message);
+ var ctx = this._peekContext();
+ if (ctx) {
+ ctx.attachExtraTrace(warning);
+ } else {
+ var parsed = CapturedTrace.parseStackAndMessage(warning);
+ warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
+ }
+ CapturedTrace.formatAndLogError(warning, "");
+};
+
+Promise.onPossiblyUnhandledRejection = function (fn) {
+ possiblyUnhandledRejection = typeof fn === "function" ? fn : undefined;
+};
+
+Promise.onUnhandledRejectionHandled = function (fn) {
+ unhandledRejectionHandled = typeof fn === "function" ? fn : undefined;
+};
+
+Promise.longStackTraces = function () {
+ if (async.haveItemsQueued() &&
+ debugging === false
+ ) {
+ throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/DT1qyG\u000a");
+ }
+ debugging = CapturedTrace.isSupported();
+ if (debugging) {
+ async.disableTrampolineIfNecessary();
+ }
+};
+
+Promise.hasLongStackTraces = function () {
+ return debugging && CapturedTrace.isSupported();
+};
+
+if (!CapturedTrace.isSupported()) {
+ Promise.longStackTraces = function(){};
+ debugging = false;
+}
+
+return function() {
+ return debugging;
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/direct_resolve.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/direct_resolve.js
new file mode 100644
index 0000000000..c61a367f58
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/direct_resolve.js
@@ -0,0 +1,54 @@
+"use strict";
+var util = require("./util.js");
+var isPrimitive = util.isPrimitive;
+var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver;
+
+module.exports = function(Promise) {
+var returner = function () {
+ return this;
+};
+var thrower = function () {
+ throw this;
+};
+
+var wrapper = function (value, action) {
+ if (action === 1) {
+ return function () {
+ throw value;
+ };
+ } else if (action === 2) {
+ return function () {
+ return value;
+ };
+ }
+};
+
+
+Promise.prototype["return"] =
+Promise.prototype.thenReturn = function (value) {
+ if (wrapsPrimitiveReceiver && isPrimitive(value)) {
+ return this._then(
+ wrapper(value, 2),
+ undefined,
+ undefined,
+ undefined,
+ undefined
+ );
+ }
+ return this._then(returner, undefined, undefined, value, undefined);
+};
+
+Promise.prototype["throw"] =
+Promise.prototype.thenThrow = function (reason) {
+ if (wrapsPrimitiveReceiver && isPrimitive(reason)) {
+ return this._then(
+ wrapper(reason, 1),
+ undefined,
+ undefined,
+ undefined,
+ undefined
+ );
+ }
+ return this._then(thrower, undefined, undefined, reason, undefined);
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/each.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/each.js
new file mode 100644
index 0000000000..a37e22c058
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/each.js
@@ -0,0 +1,12 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseReduce = Promise.reduce;
+
+Promise.prototype.each = function (fn) {
+ return PromiseReduce(this, fn, null, INTERNAL);
+};
+
+Promise.each = function (promises, fn) {
+ return PromiseReduce(promises, fn, null, INTERNAL);
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/errors.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/errors.js
new file mode 100644
index 0000000000..c334bb1c83
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/errors.js
@@ -0,0 +1,111 @@
+"use strict";
+var es5 = require("./es5.js");
+var Objectfreeze = es5.freeze;
+var util = require("./util.js");
+var inherits = util.inherits;
+var notEnumerableProp = util.notEnumerableProp;
+
+function subError(nameProperty, defaultMessage) {
+ function SubError(message) {
+ if (!(this instanceof SubError)) return new SubError(message);
+ notEnumerableProp(this, "message",
+ typeof message === "string" ? message : defaultMessage);
+ notEnumerableProp(this, "name", nameProperty);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ Error.call(this);
+ }
+ }
+ inherits(SubError, Error);
+ return SubError;
+}
+
+var _TypeError, _RangeError;
+var Warning = subError("Warning", "warning");
+var CancellationError = subError("CancellationError", "cancellation error");
+var TimeoutError = subError("TimeoutError", "timeout error");
+var AggregateError = subError("AggregateError", "aggregate error");
+try {
+ _TypeError = TypeError;
+ _RangeError = RangeError;
+} catch(e) {
+ _TypeError = subError("TypeError", "type error");
+ _RangeError = subError("RangeError", "range error");
+}
+
+var methods = ("join pop push shift unshift slice filter forEach some " +
+ "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
+
+for (var i = 0; i < methods.length; ++i) {
+ if (typeof Array.prototype[methods[i]] === "function") {
+ AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
+ }
+}
+
+es5.defineProperty(AggregateError.prototype, "length", {
+ value: 0,
+ configurable: false,
+ writable: true,
+ enumerable: true
+});
+AggregateError.prototype["isOperational"] = true;
+var level = 0;
+AggregateError.prototype.toString = function() {
+ var indent = Array(level * 4 + 1).join(" ");
+ var ret = "\n" + indent + "AggregateError of:" + "\n";
+ level++;
+ indent = Array(level * 4 + 1).join(" ");
+ for (var i = 0; i < this.length; ++i) {
+ var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
+ var lines = str.split("\n");
+ for (var j = 0; j < lines.length; ++j) {
+ lines[j] = indent + lines[j];
+ }
+ str = lines.join("\n");
+ ret += str + "\n";
+ }
+ level--;
+ return ret;
+};
+
+function OperationalError(message) {
+ if (!(this instanceof OperationalError))
+ return new OperationalError(message);
+ notEnumerableProp(this, "name", "OperationalError");
+ notEnumerableProp(this, "message", message);
+ this.cause = message;
+ this["isOperational"] = true;
+
+ if (message instanceof Error) {
+ notEnumerableProp(this, "message", message.message);
+ notEnumerableProp(this, "stack", message.stack);
+ } else if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+
+}
+inherits(OperationalError, Error);
+
+var errorTypes = Error["__BluebirdErrorTypes__"];
+if (!errorTypes) {
+ errorTypes = Objectfreeze({
+ CancellationError: CancellationError,
+ TimeoutError: TimeoutError,
+ OperationalError: OperationalError,
+ RejectionError: OperationalError,
+ AggregateError: AggregateError
+ });
+ notEnumerableProp(Error, "__BluebirdErrorTypes__", errorTypes);
+}
+
+module.exports = {
+ Error: Error,
+ TypeError: _TypeError,
+ RangeError: _RangeError,
+ CancellationError: errorTypes.CancellationError,
+ OperationalError: errorTypes.OperationalError,
+ TimeoutError: errorTypes.TimeoutError,
+ AggregateError: errorTypes.AggregateError,
+ Warning: Warning
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/es5.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/es5.js
new file mode 100644
index 0000000000..ea41d5a566
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/es5.js
@@ -0,0 +1,80 @@
+var isES5 = (function(){
+ "use strict";
+ return this === undefined;
+})();
+
+if (isES5) {
+ module.exports = {
+ freeze: Object.freeze,
+ defineProperty: Object.defineProperty,
+ getDescriptor: Object.getOwnPropertyDescriptor,
+ keys: Object.keys,
+ names: Object.getOwnPropertyNames,
+ getPrototypeOf: Object.getPrototypeOf,
+ isArray: Array.isArray,
+ isES5: isES5,
+ propertyIsWritable: function(obj, prop) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
+ return !!(!descriptor || descriptor.writable || descriptor.set);
+ }
+ };
+} else {
+ var has = {}.hasOwnProperty;
+ var str = {}.toString;
+ var proto = {}.constructor.prototype;
+
+ var ObjectKeys = function (o) {
+ var ret = [];
+ for (var key in o) {
+ if (has.call(o, key)) {
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+
+ var ObjectGetDescriptor = function(o, key) {
+ return {value: o[key]};
+ };
+
+ var ObjectDefineProperty = function (o, key, desc) {
+ o[key] = desc.value;
+ return o;
+ };
+
+ var ObjectFreeze = function (obj) {
+ return obj;
+ };
+
+ var ObjectGetPrototypeOf = function (obj) {
+ try {
+ return Object(obj).constructor.prototype;
+ }
+ catch (e) {
+ return proto;
+ }
+ };
+
+ var ArrayIsArray = function (obj) {
+ try {
+ return str.call(obj) === "[object Array]";
+ }
+ catch(e) {
+ return false;
+ }
+ };
+
+ module.exports = {
+ isArray: ArrayIsArray,
+ keys: ObjectKeys,
+ names: ObjectKeys,
+ defineProperty: ObjectDefineProperty,
+ getDescriptor: ObjectGetDescriptor,
+ freeze: ObjectFreeze,
+ getPrototypeOf: ObjectGetPrototypeOf,
+ isES5: isES5,
+ propertyIsWritable: function() {
+ return true;
+ }
+ };
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/filter.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/filter.js
new file mode 100644
index 0000000000..ed57bf0159
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/filter.js
@@ -0,0 +1,12 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseMap = Promise.map;
+
+Promise.prototype.filter = function (fn, options) {
+ return PromiseMap(this, fn, options, INTERNAL);
+};
+
+Promise.filter = function (promises, fn, options) {
+ return PromiseMap(promises, fn, options, INTERNAL);
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/finally.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/finally.js
new file mode 100644
index 0000000000..ed84a2a1f8
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/finally.js
@@ -0,0 +1,99 @@
+"use strict";
+module.exports = function(Promise, NEXT_FILTER, tryConvertToPromise) {
+var util = require("./util.js");
+var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver;
+var isPrimitive = util.isPrimitive;
+var thrower = util.thrower;
+
+function returnThis() {
+ return this;
+}
+function throwThis() {
+ throw this;
+}
+function return$(r) {
+ return function() {
+ return r;
+ };
+}
+function throw$(r) {
+ return function() {
+ throw r;
+ };
+}
+function promisedFinally(ret, reasonOrValue, isFulfilled) {
+ var then;
+ if (wrapsPrimitiveReceiver && isPrimitive(reasonOrValue)) {
+ then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue);
+ } else {
+ then = isFulfilled ? returnThis : throwThis;
+ }
+ return ret._then(then, thrower, undefined, reasonOrValue, undefined);
+}
+
+function finallyHandler(reasonOrValue) {
+ var promise = this.promise;
+ var handler = this.handler;
+
+ var ret = promise._isBound()
+ ? handler.call(promise._boundTo)
+ : handler();
+
+ if (ret !== undefined) {
+ var maybePromise = tryConvertToPromise(ret, promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ return promisedFinally(maybePromise, reasonOrValue,
+ promise.isFulfilled());
+ }
+ }
+
+ if (promise.isRejected()) {
+ NEXT_FILTER.e = reasonOrValue;
+ return NEXT_FILTER;
+ } else {
+ return reasonOrValue;
+ }
+}
+
+function tapHandler(value) {
+ var promise = this.promise;
+ var handler = this.handler;
+
+ var ret = promise._isBound()
+ ? handler.call(promise._boundTo, value)
+ : handler(value);
+
+ if (ret !== undefined) {
+ var maybePromise = tryConvertToPromise(ret, promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ return promisedFinally(maybePromise, value, true);
+ }
+ }
+ return value;
+}
+
+Promise.prototype._passThroughHandler = function (handler, isFinally) {
+ if (typeof handler !== "function") return this.then();
+
+ var promiseAndHandler = {
+ promise: this,
+ handler: handler
+ };
+
+ return this._then(
+ isFinally ? finallyHandler : tapHandler,
+ isFinally ? finallyHandler : undefined, undefined,
+ promiseAndHandler, undefined);
+};
+
+Promise.prototype.lastly =
+Promise.prototype["finally"] = function (handler) {
+ return this._passThroughHandler(handler, true);
+};
+
+Promise.prototype.tap = function (handler) {
+ return this._passThroughHandler(handler, false);
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/generators.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/generators.js
new file mode 100644
index 0000000000..4c0568d21f
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/generators.js
@@ -0,0 +1,136 @@
+"use strict";
+module.exports = function(Promise,
+ apiRejection,
+ INTERNAL,
+ tryConvertToPromise) {
+var errors = require("./errors.js");
+var TypeError = errors.TypeError;
+var util = require("./util.js");
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+var yieldHandlers = [];
+
+function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
+ for (var i = 0; i < yieldHandlers.length; ++i) {
+ traceParent._pushContext();
+ var result = tryCatch(yieldHandlers[i])(value);
+ traceParent._popContext();
+ if (result === errorObj) {
+ traceParent._pushContext();
+ var ret = Promise.reject(errorObj.e);
+ traceParent._popContext();
+ return ret;
+ }
+ var maybePromise = tryConvertToPromise(result, traceParent);
+ if (maybePromise instanceof Promise) return maybePromise;
+ }
+ return null;
+}
+
+function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
+ var promise = this._promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ this._stack = stack;
+ this._generatorFunction = generatorFunction;
+ this._receiver = receiver;
+ this._generator = undefined;
+ this._yieldHandlers = typeof yieldHandler === "function"
+ ? [yieldHandler].concat(yieldHandlers)
+ : yieldHandlers;
+}
+
+PromiseSpawn.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseSpawn.prototype._run = function () {
+ this._generator = this._generatorFunction.call(this._receiver);
+ this._receiver =
+ this._generatorFunction = undefined;
+ this._next(undefined);
+};
+
+PromiseSpawn.prototype._continue = function (result) {
+ if (result === errorObj) {
+ return this._promise._rejectCallback(result.e, false, true);
+ }
+
+ var value = result.value;
+ if (result.done === true) {
+ this._promise._resolveCallback(value);
+ } else {
+ var maybePromise = tryConvertToPromise(value, this._promise);
+ if (!(maybePromise instanceof Promise)) {
+ maybePromise =
+ promiseFromYieldHandler(maybePromise,
+ this._yieldHandlers,
+ this._promise);
+ if (maybePromise === null) {
+ this._throw(
+ new TypeError(
+ "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/4Y4pDk\u000a\u000a".replace("%s", value) +
+ "From coroutine:\u000a" +
+ this._stack.split("\n").slice(1, -7).join("\n")
+ )
+ );
+ return;
+ }
+ }
+ maybePromise._then(
+ this._next,
+ this._throw,
+ undefined,
+ this,
+ null
+ );
+ }
+};
+
+PromiseSpawn.prototype._throw = function (reason) {
+ this._promise._attachExtraTrace(reason);
+ this._promise._pushContext();
+ var result = tryCatch(this._generator["throw"])
+ .call(this._generator, reason);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+PromiseSpawn.prototype._next = function (value) {
+ this._promise._pushContext();
+ var result = tryCatch(this._generator.next).call(this._generator, value);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+Promise.coroutine = function (generatorFunction, options) {
+ if (typeof generatorFunction !== "function") {
+ throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a");
+ }
+ var yieldHandler = Object(options).yieldHandler;
+ var PromiseSpawn$ = PromiseSpawn;
+ var stack = new Error().stack;
+ return function () {
+ var generator = generatorFunction.apply(this, arguments);
+ var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
+ stack);
+ spawn._generator = generator;
+ spawn._next(undefined);
+ return spawn.promise();
+ };
+};
+
+Promise.coroutine.addYieldHandler = function(fn) {
+ if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ yieldHandlers.push(fn);
+};
+
+Promise.spawn = function (generatorFunction) {
+ if (typeof generatorFunction !== "function") {
+ return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a");
+ }
+ var spawn = new PromiseSpawn(generatorFunction, this);
+ var ret = spawn.promise();
+ spawn._run(Promise.spawn);
+ return ret;
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/join.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/join.js
new file mode 100644
index 0000000000..cf33eb1d07
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/join.js
@@ -0,0 +1,107 @@
+"use strict";
+module.exports =
+function(Promise, PromiseArray, tryConvertToPromise, INTERNAL) {
+var util = require("./util.js");
+var canEvaluate = util.canEvaluate;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var reject;
+
+if (!false) {
+if (canEvaluate) {
+ var thenCallback = function(i) {
+ return new Function("value", "holder", " \n\
+ 'use strict'; \n\
+ holder.pIndex = value; \n\
+ holder.checkFulfillment(this); \n\
+ ".replace(/Index/g, i));
+ };
+
+ var caller = function(count) {
+ var values = [];
+ for (var i = 1; i <= count; ++i) values.push("holder.p" + i);
+ return new Function("holder", " \n\
+ 'use strict'; \n\
+ var callback = holder.fn; \n\
+ return callback(values); \n\
+ ".replace(/values/g, values.join(", ")));
+ };
+ var thenCallbacks = [];
+ var callers = [undefined];
+ for (var i = 1; i <= 5; ++i) {
+ thenCallbacks.push(thenCallback(i));
+ callers.push(caller(i));
+ }
+
+ var Holder = function(total, fn) {
+ this.p1 = this.p2 = this.p3 = this.p4 = this.p5 = null;
+ this.fn = fn;
+ this.total = total;
+ this.now = 0;
+ };
+
+ Holder.prototype.callers = callers;
+ Holder.prototype.checkFulfillment = function(promise) {
+ var now = this.now;
+ now++;
+ var total = this.total;
+ if (now >= total) {
+ var handler = this.callers[total];
+ promise._pushContext();
+ var ret = tryCatch(handler)(this);
+ promise._popContext();
+ if (ret === errorObj) {
+ promise._rejectCallback(ret.e, false, true);
+ } else {
+ promise._resolveCallback(ret);
+ }
+ } else {
+ this.now = now;
+ }
+ };
+
+ var reject = function (reason) {
+ this._reject(reason);
+ };
+}
+}
+
+Promise.join = function () {
+ var last = arguments.length - 1;
+ var fn;
+ if (last > 0 && typeof arguments[last] === "function") {
+ fn = arguments[last];
+ if (!false) {
+ if (last < 6 && canEvaluate) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ var holder = new Holder(last, fn);
+ var callbacks = thenCallbacks;
+ for (var i = 0; i < last; ++i) {
+ var maybePromise = tryConvertToPromise(arguments[i], ret);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ maybePromise._then(callbacks[i], reject,
+ undefined, ret, holder);
+ } else if (maybePromise._isFulfilled()) {
+ callbacks[i].call(ret,
+ maybePromise._value(), holder);
+ } else {
+ ret._reject(maybePromise._reason());
+ }
+ } else {
+ callbacks[i].call(ret, maybePromise, holder);
+ }
+ }
+ return ret;
+ }
+ }
+ }
+ var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}
+ if (fn) args.pop();
+ var ret = new PromiseArray(args).promise();
+ return fn !== undefined ? ret.spread(fn) : ret;
+};
+
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/map.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/map.js
new file mode 100644
index 0000000000..66a5b179cf
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/map.js
@@ -0,0 +1,131 @@
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL) {
+var async = require("./async.js");
+var util = require("./util.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var PENDING = {};
+var EMPTY_ARRAY = [];
+
+function MappingPromiseArray(promises, fn, limit, _filter) {
+ this.constructor$(promises);
+ this._promise._captureStackTrace();
+ this._callback = fn;
+ this._preservedValues = _filter === INTERNAL
+ ? new Array(this.length())
+ : null;
+ this._limit = limit;
+ this._inFlight = 0;
+ this._queue = limit >= 1 ? [] : EMPTY_ARRAY;
+ async.invoke(init, this, undefined);
+}
+util.inherits(MappingPromiseArray, PromiseArray);
+function init() {this._init$(undefined, -2);}
+
+MappingPromiseArray.prototype._init = function () {};
+
+MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var values = this._values;
+ var length = this.length();
+ var preservedValues = this._preservedValues;
+ var limit = this._limit;
+ if (values[index] === PENDING) {
+ values[index] = value;
+ if (limit >= 1) {
+ this._inFlight--;
+ this._drainQueue();
+ if (this._isResolved()) return;
+ }
+ } else {
+ if (limit >= 1 && this._inFlight >= limit) {
+ values[index] = value;
+ this._queue.push(index);
+ return;
+ }
+ if (preservedValues !== null) preservedValues[index] = value;
+
+ var callback = this._callback;
+ var receiver = this._promise._boundTo;
+ this._promise._pushContext();
+ var ret = tryCatch(callback).call(receiver, value, index, length);
+ this._promise._popContext();
+ if (ret === errorObj) return this._reject(ret.e);
+
+ var maybePromise = tryConvertToPromise(ret, this._promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ if (limit >= 1) this._inFlight++;
+ values[index] = PENDING;
+ return maybePromise._proxyPromiseArray(this, index);
+ } else if (maybePromise._isFulfilled()) {
+ ret = maybePromise._value();
+ } else {
+ return this._reject(maybePromise._reason());
+ }
+ }
+ values[index] = ret;
+ }
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= length) {
+ if (preservedValues !== null) {
+ this._filter(values, preservedValues);
+ } else {
+ this._resolve(values);
+ }
+
+ }
+};
+
+MappingPromiseArray.prototype._drainQueue = function () {
+ var queue = this._queue;
+ var limit = this._limit;
+ var values = this._values;
+ while (queue.length > 0 && this._inFlight < limit) {
+ if (this._isResolved()) return;
+ var index = queue.pop();
+ this._promiseFulfilled(values[index], index);
+ }
+};
+
+MappingPromiseArray.prototype._filter = function (booleans, values) {
+ var len = values.length;
+ var ret = new Array(len);
+ var j = 0;
+ for (var i = 0; i < len; ++i) {
+ if (booleans[i]) ret[j++] = values[i];
+ }
+ ret.length = j;
+ this._resolve(ret);
+};
+
+MappingPromiseArray.prototype.preservedValues = function () {
+ return this._preservedValues;
+};
+
+function map(promises, fn, options, _filter) {
+ var limit = typeof options === "object" && options !== null
+ ? options.concurrency
+ : 0;
+ limit = typeof limit === "number" &&
+ isFinite(limit) && limit >= 1 ? limit : 0;
+ return new MappingPromiseArray(promises, fn, limit, _filter);
+}
+
+Promise.prototype.map = function (fn, options) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+
+ return map(this, fn, options, null).promise();
+};
+
+Promise.map = function (promises, fn, options, _filter) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ return map(promises, fn, options, _filter).promise();
+};
+
+
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/method.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/method.js
new file mode 100644
index 0000000000..3d3eeb17c8
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/method.js
@@ -0,0 +1,44 @@
+"use strict";
+module.exports =
+function(Promise, INTERNAL, tryConvertToPromise, apiRejection) {
+var util = require("./util.js");
+var tryCatch = util.tryCatch;
+
+Promise.method = function (fn) {
+ if (typeof fn !== "function") {
+ throw new Promise.TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ return function () {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value = tryCatch(fn).apply(this, arguments);
+ ret._popContext();
+ ret._resolveFromSyncValue(value);
+ return ret;
+ };
+};
+
+Promise.attempt = Promise["try"] = function (fn, args, ctx) {
+ if (typeof fn !== "function") {
+ return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value = util.isArray(args)
+ ? tryCatch(fn).apply(ctx, args)
+ : tryCatch(fn).call(ctx, args);
+ ret._popContext();
+ ret._resolveFromSyncValue(value);
+ return ret;
+};
+
+Promise.prototype._resolveFromSyncValue = function (value) {
+ if (value === util.errorObj) {
+ this._rejectCallback(value.e, false, true);
+ } else {
+ this._resolveCallback(value, true);
+ }
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/nodeify.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/nodeify.js
new file mode 100644
index 0000000000..f305b936bf
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/nodeify.js
@@ -0,0 +1,58 @@
+"use strict";
+module.exports = function(Promise) {
+var util = require("./util.js");
+var async = require("./async.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+function spreadAdapter(val, nodeback) {
+ var promise = this;
+ if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
+ var ret = tryCatch(nodeback).apply(promise._boundTo, [null].concat(val));
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+function successAdapter(val, nodeback) {
+ var promise = this;
+ var receiver = promise._boundTo;
+ var ret = val === undefined
+ ? tryCatch(nodeback).call(receiver, null)
+ : tryCatch(nodeback).call(receiver, null, val);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+function errorAdapter(reason, nodeback) {
+ var promise = this;
+ if (!reason) {
+ var target = promise._target();
+ var newReason = target._getCarriedStackTrace();
+ newReason.cause = reason;
+ reason = newReason;
+ }
+ var ret = tryCatch(nodeback).call(promise._boundTo, reason);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+Promise.prototype.asCallback =
+Promise.prototype.nodeify = function (nodeback, options) {
+ if (typeof nodeback == "function") {
+ var adapter = successAdapter;
+ if (options !== undefined && Object(options).spread) {
+ adapter = spreadAdapter;
+ }
+ this._then(
+ adapter,
+ errorAdapter,
+ undefined,
+ this,
+ nodeback
+ );
+ }
+ return this;
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/progress.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/progress.js
new file mode 100644
index 0000000000..2e3e95e564
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/progress.js
@@ -0,0 +1,76 @@
+"use strict";
+module.exports = function(Promise, PromiseArray) {
+var util = require("./util.js");
+var async = require("./async.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+Promise.prototype.progressed = function (handler) {
+ return this._then(undefined, undefined, handler, undefined, undefined);
+};
+
+Promise.prototype._progress = function (progressValue) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._target()._progressUnchecked(progressValue);
+
+};
+
+Promise.prototype._progressHandlerAt = function (index) {
+ return index === 0
+ ? this._progressHandler0
+ : this[(index << 2) + index - 5 + 2];
+};
+
+Promise.prototype._doProgressWith = function (progression) {
+ var progressValue = progression.value;
+ var handler = progression.handler;
+ var promise = progression.promise;
+ var receiver = progression.receiver;
+
+ var ret = tryCatch(handler).call(receiver, progressValue);
+ if (ret === errorObj) {
+ if (ret.e != null &&
+ ret.e.name !== "StopProgressPropagation") {
+ var trace = util.canAttachTrace(ret.e)
+ ? ret.e : new Error(util.toString(ret.e));
+ promise._attachExtraTrace(trace);
+ promise._progress(ret.e);
+ }
+ } else if (ret instanceof Promise) {
+ ret._then(promise._progress, null, null, promise, undefined);
+ } else {
+ promise._progress(ret);
+ }
+};
+
+
+Promise.prototype._progressUnchecked = function (progressValue) {
+ var len = this._length();
+ var progress = this._progress;
+ for (var i = 0; i < len; i++) {
+ var handler = this._progressHandlerAt(i);
+ var promise = this._promiseAt(i);
+ if (!(promise instanceof Promise)) {
+ var receiver = this._receiverAt(i);
+ if (typeof handler === "function") {
+ handler.call(receiver, progressValue, promise);
+ } else if (receiver instanceof PromiseArray &&
+ !receiver._isResolved()) {
+ receiver._promiseProgressed(progressValue, promise);
+ }
+ continue;
+ }
+
+ if (typeof handler === "function") {
+ async.invoke(this._doProgressWith, this, {
+ handler: handler,
+ promise: promise,
+ receiver: this._receiverAt(i),
+ value: progressValue
+ });
+ } else {
+ async.invoke(progress, promise, progressValue);
+ }
+ }
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise.js
new file mode 100644
index 0000000000..f80d247b14
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise.js
@@ -0,0 +1,700 @@
+"use strict";
+module.exports = function() {
+var makeSelfResolutionError = function () {
+ return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/LhFpo0\u000a");
+};
+var reflect = function() {
+ return new Promise.PromiseInspection(this._target());
+};
+var apiRejection = function(msg) {
+ return Promise.reject(new TypeError(msg));
+};
+var util = require("./util.js");
+var async = require("./async.js");
+var errors = require("./errors.js");
+var TypeError = Promise.TypeError = errors.TypeError;
+Promise.RangeError = errors.RangeError;
+Promise.CancellationError = errors.CancellationError;
+Promise.TimeoutError = errors.TimeoutError;
+Promise.OperationalError = errors.OperationalError;
+Promise.RejectionError = errors.OperationalError;
+Promise.AggregateError = errors.AggregateError;
+var INTERNAL = function(){};
+var APPLY = {};
+var NEXT_FILTER = {e: null};
+var tryConvertToPromise = require("./thenables.js")(Promise, INTERNAL);
+var PromiseArray =
+ require("./promise_array.js")(Promise, INTERNAL,
+ tryConvertToPromise, apiRejection);
+var CapturedTrace = require("./captured_trace.js")();
+var isDebugging = require("./debuggability.js")(Promise, CapturedTrace);
+ /*jshint unused:false*/
+var createContext =
+ require("./context.js")(Promise, CapturedTrace, isDebugging);
+var CatchFilter = require("./catch_filter.js")(NEXT_FILTER);
+var PromiseResolver = require("./promise_resolver.js");
+var nodebackForPromise = PromiseResolver._nodebackForPromise;
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+function Promise(resolver) {
+ if (typeof resolver !== "function") {
+ throw new TypeError("the promise constructor requires a resolver function\u000a\u000a See http://goo.gl/EC22Yn\u000a");
+ }
+ if (this.constructor !== Promise) {
+ throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/KsIlge\u000a");
+ }
+ this._bitField = 0;
+ this._fulfillmentHandler0 = undefined;
+ this._rejectionHandler0 = undefined;
+ this._progressHandler0 = undefined;
+ this._promise0 = undefined;
+ this._receiver0 = undefined;
+ this._settledValue = undefined;
+ if (resolver !== INTERNAL) this._resolveFromResolver(resolver);
+}
+
+Promise.prototype.toString = function () {
+ return "[object Promise]";
+};
+
+Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
+ var len = arguments.length;
+ if (len > 1) {
+ var catchInstances = new Array(len - 1),
+ j = 0, i;
+ for (i = 0; i < len - 1; ++i) {
+ var item = arguments[i];
+ if (typeof item === "function") {
+ catchInstances[j++] = item;
+ } else {
+ return Promise.reject(
+ new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a"));
+ }
+ }
+ catchInstances.length = j;
+ fn = arguments[i];
+ var catchFilter = new CatchFilter(catchInstances, fn, this);
+ return this._then(undefined, catchFilter.doFilter, undefined,
+ catchFilter, undefined);
+ }
+ return this._then(undefined, fn, undefined, undefined, undefined);
+};
+
+Promise.prototype.reflect = function () {
+ return this._then(reflect, reflect, undefined, this, undefined);
+};
+
+Promise.prototype.then = function (didFulfill, didReject, didProgress) {
+ if (isDebugging() && arguments.length > 0 &&
+ typeof didFulfill !== "function" &&
+ typeof didReject !== "function") {
+ var msg = ".then() only accepts functions but was passed: " +
+ util.classString(didFulfill);
+ if (arguments.length > 1) {
+ msg += ", " + util.classString(didReject);
+ }
+ this._warn(msg);
+ }
+ return this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+};
+
+Promise.prototype.done = function (didFulfill, didReject, didProgress) {
+ var promise = this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+ promise._setIsFinal();
+};
+
+Promise.prototype.spread = function (didFulfill, didReject) {
+ return this.all()._then(didFulfill, didReject, undefined, APPLY, undefined);
+};
+
+Promise.prototype.isCancellable = function () {
+ return !this.isResolved() &&
+ this._cancellable();
+};
+
+Promise.prototype.toJSON = function () {
+ var ret = {
+ isFulfilled: false,
+ isRejected: false,
+ fulfillmentValue: undefined,
+ rejectionReason: undefined
+ };
+ if (this.isFulfilled()) {
+ ret.fulfillmentValue = this.value();
+ ret.isFulfilled = true;
+ } else if (this.isRejected()) {
+ ret.rejectionReason = this.reason();
+ ret.isRejected = true;
+ }
+ return ret;
+};
+
+Promise.prototype.all = function () {
+ return new PromiseArray(this).promise();
+};
+
+Promise.prototype.error = function (fn) {
+ return this.caught(util.originatesFromRejection, fn);
+};
+
+Promise.is = function (val) {
+ return val instanceof Promise;
+};
+
+Promise.fromNode = function(fn) {
+ var ret = new Promise(INTERNAL);
+ var result = tryCatch(fn)(nodebackForPromise(ret));
+ if (result === errorObj) {
+ ret._rejectCallback(result.e, true, true);
+ }
+ return ret;
+};
+
+Promise.all = function (promises) {
+ return new PromiseArray(promises).promise();
+};
+
+Promise.defer = Promise.pending = function () {
+ var promise = new Promise(INTERNAL);
+ return new PromiseResolver(promise);
+};
+
+Promise.cast = function (obj) {
+ var ret = tryConvertToPromise(obj);
+ if (!(ret instanceof Promise)) {
+ var val = ret;
+ ret = new Promise(INTERNAL);
+ ret._fulfillUnchecked(val);
+ }
+ return ret;
+};
+
+Promise.resolve = Promise.fulfilled = Promise.cast;
+
+Promise.reject = Promise.rejected = function (reason) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._rejectCallback(reason, true);
+ return ret;
+};
+
+Promise.setScheduler = function(fn) {
+ if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ var prev = async._schedule;
+ async._schedule = fn;
+ return prev;
+};
+
+Promise.prototype._then = function (
+ didFulfill,
+ didReject,
+ didProgress,
+ receiver,
+ internalData
+) {
+ var haveInternalData = internalData !== undefined;
+ var ret = haveInternalData ? internalData : new Promise(INTERNAL);
+
+ if (!haveInternalData) {
+ ret._propagateFrom(this, 4 | 1);
+ ret._captureStackTrace();
+ }
+
+ var target = this._target();
+ if (target !== this) {
+ if (receiver === undefined) receiver = this._boundTo;
+ if (!haveInternalData) ret._setIsMigrated();
+ }
+
+ var callbackIndex =
+ target._addCallbacks(didFulfill, didReject, didProgress, ret, receiver);
+
+ if (target._isResolved() && !target._isSettlePromisesQueued()) {
+ async.invoke(
+ target._settlePromiseAtPostResolution, target, callbackIndex);
+ }
+
+ return ret;
+};
+
+Promise.prototype._settlePromiseAtPostResolution = function (index) {
+ if (this._isRejectionUnhandled()) this._unsetRejectionIsUnhandled();
+ this._settlePromiseAt(index);
+};
+
+Promise.prototype._length = function () {
+ return this._bitField & 131071;
+};
+
+Promise.prototype._isFollowingOrFulfilledOrRejected = function () {
+ return (this._bitField & 939524096) > 0;
+};
+
+Promise.prototype._isFollowing = function () {
+ return (this._bitField & 536870912) === 536870912;
+};
+
+Promise.prototype._setLength = function (len) {
+ this._bitField = (this._bitField & -131072) |
+ (len & 131071);
+};
+
+Promise.prototype._setFulfilled = function () {
+ this._bitField = this._bitField | 268435456;
+};
+
+Promise.prototype._setRejected = function () {
+ this._bitField = this._bitField | 134217728;
+};
+
+Promise.prototype._setFollowing = function () {
+ this._bitField = this._bitField | 536870912;
+};
+
+Promise.prototype._setIsFinal = function () {
+ this._bitField = this._bitField | 33554432;
+};
+
+Promise.prototype._isFinal = function () {
+ return (this._bitField & 33554432) > 0;
+};
+
+Promise.prototype._cancellable = function () {
+ return (this._bitField & 67108864) > 0;
+};
+
+Promise.prototype._setCancellable = function () {
+ this._bitField = this._bitField | 67108864;
+};
+
+Promise.prototype._unsetCancellable = function () {
+ this._bitField = this._bitField & (~67108864);
+};
+
+Promise.prototype._setIsMigrated = function () {
+ this._bitField = this._bitField | 4194304;
+};
+
+Promise.prototype._unsetIsMigrated = function () {
+ this._bitField = this._bitField & (~4194304);
+};
+
+Promise.prototype._isMigrated = function () {
+ return (this._bitField & 4194304) > 0;
+};
+
+Promise.prototype._receiverAt = function (index) {
+ var ret = index === 0
+ ? this._receiver0
+ : this[
+ index * 5 - 5 + 4];
+ if (ret === undefined && this._isBound()) {
+ return this._boundTo;
+ }
+ return ret;
+};
+
+Promise.prototype._promiseAt = function (index) {
+ return index === 0
+ ? this._promise0
+ : this[index * 5 - 5 + 3];
+};
+
+Promise.prototype._fulfillmentHandlerAt = function (index) {
+ return index === 0
+ ? this._fulfillmentHandler0
+ : this[index * 5 - 5 + 0];
+};
+
+Promise.prototype._rejectionHandlerAt = function (index) {
+ return index === 0
+ ? this._rejectionHandler0
+ : this[index * 5 - 5 + 1];
+};
+
+Promise.prototype._migrateCallbacks = function (follower, index) {
+ var fulfill = follower._fulfillmentHandlerAt(index);
+ var reject = follower._rejectionHandlerAt(index);
+ var progress = follower._progressHandlerAt(index);
+ var promise = follower._promiseAt(index);
+ var receiver = follower._receiverAt(index);
+ if (promise instanceof Promise) promise._setIsMigrated();
+ this._addCallbacks(fulfill, reject, progress, promise, receiver);
+};
+
+Promise.prototype._addCallbacks = function (
+ fulfill,
+ reject,
+ progress,
+ promise,
+ receiver
+) {
+ var index = this._length();
+
+ if (index >= 131071 - 5) {
+ index = 0;
+ this._setLength(0);
+ }
+
+ if (index === 0) {
+ this._promise0 = promise;
+ if (receiver !== undefined) this._receiver0 = receiver;
+ if (typeof fulfill === "function" && !this._isCarryingStackTrace())
+ this._fulfillmentHandler0 = fulfill;
+ if (typeof reject === "function") this._rejectionHandler0 = reject;
+ if (typeof progress === "function") this._progressHandler0 = progress;
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] = promise;
+ this[base + 4] = receiver;
+ if (typeof fulfill === "function")
+ this[base + 0] = fulfill;
+ if (typeof reject === "function")
+ this[base + 1] = reject;
+ if (typeof progress === "function")
+ this[base + 2] = progress;
+ }
+ this._setLength(index + 1);
+ return index;
+};
+
+Promise.prototype._setProxyHandlers = function (receiver, promiseSlotValue) {
+ var index = this._length();
+
+ if (index >= 131071 - 5) {
+ index = 0;
+ this._setLength(0);
+ }
+ if (index === 0) {
+ this._promise0 = promiseSlotValue;
+ this._receiver0 = receiver;
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] = promiseSlotValue;
+ this[base + 4] = receiver;
+ }
+ this._setLength(index + 1);
+};
+
+Promise.prototype._proxyPromiseArray = function (promiseArray, index) {
+ this._setProxyHandlers(promiseArray, index);
+};
+
+Promise.prototype._resolveCallback = function(value, shouldBind) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ if (value === this)
+ return this._rejectCallback(makeSelfResolutionError(), false, true);
+ var maybePromise = tryConvertToPromise(value, this);
+ if (!(maybePromise instanceof Promise)) return this._fulfill(value);
+
+ var propagationFlags = 1 | (shouldBind ? 4 : 0);
+ this._propagateFrom(maybePromise, propagationFlags);
+ var promise = maybePromise._target();
+ if (promise._isPending()) {
+ var len = this._length();
+ for (var i = 0; i < len; ++i) {
+ promise._migrateCallbacks(this, i);
+ }
+ this._setFollowing();
+ this._setLength(0);
+ this._setFollowee(promise);
+ } else if (promise._isFulfilled()) {
+ this._fulfillUnchecked(promise._value());
+ } else {
+ this._rejectUnchecked(promise._reason(),
+ promise._getCarriedStackTrace());
+ }
+};
+
+Promise.prototype._rejectCallback =
+function(reason, synchronous, shouldNotMarkOriginatingFromRejection) {
+ if (!shouldNotMarkOriginatingFromRejection) {
+ util.markAsOriginatingFromRejection(reason);
+ }
+ var trace = util.ensureErrorObject(reason);
+ var hasStack = trace === reason;
+ this._attachExtraTrace(trace, synchronous ? hasStack : false);
+ this._reject(reason, hasStack ? undefined : trace);
+};
+
+Promise.prototype._resolveFromResolver = function (resolver) {
+ var promise = this;
+ this._captureStackTrace();
+ this._pushContext();
+ var synchronous = true;
+ var r = tryCatch(resolver)(function(value) {
+ if (promise === null) return;
+ promise._resolveCallback(value);
+ promise = null;
+ }, function (reason) {
+ if (promise === null) return;
+ promise._rejectCallback(reason, synchronous);
+ promise = null;
+ });
+ synchronous = false;
+ this._popContext();
+
+ if (r !== undefined && r === errorObj && promise !== null) {
+ promise._rejectCallback(r.e, true, true);
+ promise = null;
+ }
+};
+
+Promise.prototype._settlePromiseFromHandler = function (
+ handler, receiver, value, promise
+) {
+ if (promise._isRejected()) return;
+ promise._pushContext();
+ var x;
+ if (receiver === APPLY && !this._isRejected()) {
+ x = tryCatch(handler).apply(this._boundTo, value);
+ } else {
+ x = tryCatch(handler).call(receiver, value);
+ }
+ promise._popContext();
+
+ if (x === errorObj || x === promise || x === NEXT_FILTER) {
+ var err = x === promise ? makeSelfResolutionError() : x.e;
+ promise._rejectCallback(err, false, true);
+ } else {
+ promise._resolveCallback(x);
+ }
+};
+
+Promise.prototype._target = function() {
+ var ret = this;
+ while (ret._isFollowing()) ret = ret._followee();
+ return ret;
+};
+
+Promise.prototype._followee = function() {
+ return this._rejectionHandler0;
+};
+
+Promise.prototype._setFollowee = function(promise) {
+ this._rejectionHandler0 = promise;
+};
+
+Promise.prototype._cleanValues = function () {
+ if (this._cancellable()) {
+ this._cancellationParent = undefined;
+ }
+};
+
+Promise.prototype._propagateFrom = function (parent, flags) {
+ if ((flags & 1) > 0 && parent._cancellable()) {
+ this._setCancellable();
+ this._cancellationParent = parent;
+ }
+ if ((flags & 4) > 0 && parent._isBound()) {
+ this._setBoundTo(parent._boundTo);
+ }
+};
+
+Promise.prototype._fulfill = function (value) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._fulfillUnchecked(value);
+};
+
+Promise.prototype._reject = function (reason, carriedStackTrace) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._rejectUnchecked(reason, carriedStackTrace);
+};
+
+Promise.prototype._settlePromiseAt = function (index) {
+ var promise = this._promiseAt(index);
+ var isPromise = promise instanceof Promise;
+
+ if (isPromise && promise._isMigrated()) {
+ promise._unsetIsMigrated();
+ return async.invoke(this._settlePromiseAt, this, index);
+ }
+ var handler = this._isFulfilled()
+ ? this._fulfillmentHandlerAt(index)
+ : this._rejectionHandlerAt(index);
+
+ var carriedStackTrace =
+ this._isCarryingStackTrace() ? this._getCarriedStackTrace() : undefined;
+ var value = this._settledValue;
+ var receiver = this._receiverAt(index);
+
+
+ this._clearCallbackDataAtIndex(index);
+
+ if (typeof handler === "function") {
+ if (!isPromise) {
+ handler.call(receiver, value, promise);
+ } else {
+ this._settlePromiseFromHandler(handler, receiver, value, promise);
+ }
+ } else if (receiver instanceof PromiseArray) {
+ if (!receiver._isResolved()) {
+ if (this._isFulfilled()) {
+ receiver._promiseFulfilled(value, promise);
+ }
+ else {
+ receiver._promiseRejected(value, promise);
+ }
+ }
+ } else if (isPromise) {
+ if (this._isFulfilled()) {
+ promise._fulfill(value);
+ } else {
+ promise._reject(value, carriedStackTrace);
+ }
+ }
+
+ if (index >= 4 && (index & 31) === 4)
+ async.invokeLater(this._setLength, this, 0);
+};
+
+Promise.prototype._clearCallbackDataAtIndex = function(index) {
+ if (index === 0) {
+ if (!this._isCarryingStackTrace()) {
+ this._fulfillmentHandler0 = undefined;
+ }
+ this._rejectionHandler0 =
+ this._progressHandler0 =
+ this._receiver0 =
+ this._promise0 = undefined;
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] =
+ this[base + 4] =
+ this[base + 0] =
+ this[base + 1] =
+ this[base + 2] = undefined;
+ }
+};
+
+Promise.prototype._isSettlePromisesQueued = function () {
+ return (this._bitField &
+ -1073741824) === -1073741824;
+};
+
+Promise.prototype._setSettlePromisesQueued = function () {
+ this._bitField = this._bitField | -1073741824;
+};
+
+Promise.prototype._unsetSettlePromisesQueued = function () {
+ this._bitField = this._bitField & (~-1073741824);
+};
+
+Promise.prototype._queueSettlePromises = function() {
+ async.settlePromises(this);
+ this._setSettlePromisesQueued();
+};
+
+Promise.prototype._fulfillUnchecked = function (value) {
+ if (value === this) {
+ var err = makeSelfResolutionError();
+ this._attachExtraTrace(err);
+ return this._rejectUnchecked(err, undefined);
+ }
+ this._setFulfilled();
+ this._settledValue = value;
+ this._cleanValues();
+
+ if (this._length() > 0) {
+ this._queueSettlePromises();
+ }
+};
+
+Promise.prototype._rejectUncheckedCheckError = function (reason) {
+ var trace = util.ensureErrorObject(reason);
+ this._rejectUnchecked(reason, trace === reason ? undefined : trace);
+};
+
+Promise.prototype._rejectUnchecked = function (reason, trace) {
+ if (reason === this) {
+ var err = makeSelfResolutionError();
+ this._attachExtraTrace(err);
+ return this._rejectUnchecked(err);
+ }
+ this._setRejected();
+ this._settledValue = reason;
+ this._cleanValues();
+
+ if (this._isFinal()) {
+ async.throwLater(function(e) {
+ if ("stack" in e) {
+ async.invokeFirst(
+ CapturedTrace.unhandledRejection, undefined, e);
+ }
+ throw e;
+ }, trace === undefined ? reason : trace);
+ return;
+ }
+
+ if (trace !== undefined && trace !== reason) {
+ this._setCarriedStackTrace(trace);
+ }
+
+ if (this._length() > 0) {
+ this._queueSettlePromises();
+ } else {
+ this._ensurePossibleRejectionHandled();
+ }
+};
+
+Promise.prototype._settlePromises = function () {
+ this._unsetSettlePromisesQueued();
+ var len = this._length();
+ for (var i = 0; i < len; i++) {
+ this._settlePromiseAt(i);
+ }
+};
+
+Promise._makeSelfResolutionError = makeSelfResolutionError;
+require("./progress.js")(Promise, PromiseArray);
+require("./method.js")(Promise, INTERNAL, tryConvertToPromise, apiRejection);
+require("./bind.js")(Promise, INTERNAL, tryConvertToPromise);
+require("./finally.js")(Promise, NEXT_FILTER, tryConvertToPromise);
+require("./direct_resolve.js")(Promise);
+require("./synchronous_inspection.js")(Promise);
+require("./join.js")(Promise, PromiseArray, tryConvertToPromise, INTERNAL);
+Promise.Promise = Promise;
+require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);
+require('./cancel.js')(Promise);
+require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext);
+require('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise);
+require('./nodeify.js')(Promise);
+require('./call_get.js')(Promise);
+require('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);
+require('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);
+require('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);
+require('./settle.js')(Promise, PromiseArray);
+require('./some.js')(Promise, PromiseArray, apiRejection);
+require('./promisify.js')(Promise, INTERNAL);
+require('./any.js')(Promise);
+require('./each.js')(Promise, INTERNAL);
+require('./timers.js')(Promise, INTERNAL);
+require('./filter.js')(Promise, INTERNAL);
+
+ util.toFastProperties(Promise);
+ util.toFastProperties(Promise.prototype);
+ function fillTypes(value) {
+ var p = new Promise(INTERNAL);
+ p._fulfillmentHandler0 = value;
+ p._rejectionHandler0 = value;
+ p._progressHandler0 = value;
+ p._promise0 = value;
+ p._receiver0 = value;
+ p._settledValue = value;
+ }
+ // Complete slack tracking, opt out of field-type tracking and
+ // stabilize map
+ fillTypes({a: 1});
+ fillTypes({b: 2});
+ fillTypes({c: 3});
+ fillTypes(1);
+ fillTypes(function(){});
+ fillTypes(undefined);
+ fillTypes(false);
+ fillTypes(new Promise(INTERNAL));
+ CapturedTrace.setBounds(async.firstLineError, util.lastLineError);
+ return Promise;
+
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise_array.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise_array.js
new file mode 100644
index 0000000000..6dac86640a
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise_array.js
@@ -0,0 +1,142 @@
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise,
+ apiRejection) {
+var util = require("./util.js");
+var isArray = util.isArray;
+
+function toResolutionValue(val) {
+ switch(val) {
+ case -2: return [];
+ case -3: return {};
+ }
+}
+
+function PromiseArray(values) {
+ var promise = this._promise = new Promise(INTERNAL);
+ var parent;
+ if (values instanceof Promise) {
+ parent = values;
+ promise._propagateFrom(parent, 1 | 4);
+ }
+ this._values = values;
+ this._length = 0;
+ this._totalResolved = 0;
+ this._init(undefined, -2);
+}
+PromiseArray.prototype.length = function () {
+ return this._length;
+};
+
+PromiseArray.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
+ var values = tryConvertToPromise(this._values, this._promise);
+ if (values instanceof Promise) {
+ values = values._target();
+ this._values = values;
+ if (values._isFulfilled()) {
+ values = values._value();
+ if (!isArray(values)) {
+ var err = new Promise.TypeError("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a");
+ this.__hardReject__(err);
+ return;
+ }
+ } else if (values._isPending()) {
+ values._then(
+ init,
+ this._reject,
+ undefined,
+ this,
+ resolveValueIfEmpty
+ );
+ return;
+ } else {
+ this._reject(values._reason());
+ return;
+ }
+ } else if (!isArray(values)) {
+ this._promise._reject(apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a")._reason());
+ return;
+ }
+
+ if (values.length === 0) {
+ if (resolveValueIfEmpty === -5) {
+ this._resolveEmptyArray();
+ }
+ else {
+ this._resolve(toResolutionValue(resolveValueIfEmpty));
+ }
+ return;
+ }
+ var len = this.getActualLength(values.length);
+ this._length = len;
+ this._values = this.shouldCopyValues() ? new Array(len) : this._values;
+ var promise = this._promise;
+ for (var i = 0; i < len; ++i) {
+ var isResolved = this._isResolved();
+ var maybePromise = tryConvertToPromise(values[i], promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (isResolved) {
+ maybePromise._unsetRejectionIsUnhandled();
+ } else if (maybePromise._isPending()) {
+ maybePromise._proxyPromiseArray(this, i);
+ } else if (maybePromise._isFulfilled()) {
+ this._promiseFulfilled(maybePromise._value(), i);
+ } else {
+ this._promiseRejected(maybePromise._reason(), i);
+ }
+ } else if (!isResolved) {
+ this._promiseFulfilled(maybePromise, i);
+ }
+ }
+};
+
+PromiseArray.prototype._isResolved = function () {
+ return this._values === null;
+};
+
+PromiseArray.prototype._resolve = function (value) {
+ this._values = null;
+ this._promise._fulfill(value);
+};
+
+PromiseArray.prototype.__hardReject__ =
+PromiseArray.prototype._reject = function (reason) {
+ this._values = null;
+ this._promise._rejectCallback(reason, false, true);
+};
+
+PromiseArray.prototype._promiseProgressed = function (progressValue, index) {
+ this._promise._progress({
+ index: index,
+ value: progressValue
+ });
+};
+
+
+PromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ }
+};
+
+PromiseArray.prototype._promiseRejected = function (reason, index) {
+ this._totalResolved++;
+ this._reject(reason);
+};
+
+PromiseArray.prototype.shouldCopyValues = function () {
+ return true;
+};
+
+PromiseArray.prototype.getActualLength = function (len) {
+ return len;
+};
+
+return PromiseArray;
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise_resolver.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise_resolver.js
new file mode 100644
index 0000000000..b180a32803
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise_resolver.js
@@ -0,0 +1,123 @@
+"use strict";
+var util = require("./util.js");
+var maybeWrapAsError = util.maybeWrapAsError;
+var errors = require("./errors.js");
+var TimeoutError = errors.TimeoutError;
+var OperationalError = errors.OperationalError;
+var haveGetters = util.haveGetters;
+var es5 = require("./es5.js");
+
+function isUntypedError(obj) {
+ return obj instanceof Error &&
+ es5.getPrototypeOf(obj) === Error.prototype;
+}
+
+var rErrorKey = /^(?:name|message|stack|cause)$/;
+function wrapAsOperationalError(obj) {
+ var ret;
+ if (isUntypedError(obj)) {
+ ret = new OperationalError(obj);
+ ret.name = obj.name;
+ ret.message = obj.message;
+ ret.stack = obj.stack;
+ var keys = es5.keys(obj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (!rErrorKey.test(key)) {
+ ret[key] = obj[key];
+ }
+ }
+ return ret;
+ }
+ util.markAsOriginatingFromRejection(obj);
+ return obj;
+}
+
+function nodebackForPromise(promise) {
+ return function(err, value) {
+ if (promise === null) return;
+
+ if (err) {
+ var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
+ promise._attachExtraTrace(wrapped);
+ promise._reject(wrapped);
+ } else if (arguments.length > 2) {
+ var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
+ promise._fulfill(args);
+ } else {
+ promise._fulfill(value);
+ }
+
+ promise = null;
+ };
+}
+
+
+var PromiseResolver;
+if (!haveGetters) {
+ PromiseResolver = function (promise) {
+ this.promise = promise;
+ this.asCallback = nodebackForPromise(promise);
+ this.callback = this.asCallback;
+ };
+}
+else {
+ PromiseResolver = function (promise) {
+ this.promise = promise;
+ };
+}
+if (haveGetters) {
+ var prop = {
+ get: function() {
+ return nodebackForPromise(this.promise);
+ }
+ };
+ es5.defineProperty(PromiseResolver.prototype, "asCallback", prop);
+ es5.defineProperty(PromiseResolver.prototype, "callback", prop);
+}
+
+PromiseResolver._nodebackForPromise = nodebackForPromise;
+
+PromiseResolver.prototype.toString = function () {
+ return "[object PromiseResolver]";
+};
+
+PromiseResolver.prototype.resolve =
+PromiseResolver.prototype.fulfill = function (value) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._resolveCallback(value);
+};
+
+PromiseResolver.prototype.reject = function (reason) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._rejectCallback(reason);
+};
+
+PromiseResolver.prototype.progress = function (value) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._progress(value);
+};
+
+PromiseResolver.prototype.cancel = function (err) {
+ this.promise.cancel(err);
+};
+
+PromiseResolver.prototype.timeout = function () {
+ this.reject(new TimeoutError("timeout"));
+};
+
+PromiseResolver.prototype.isResolved = function () {
+ return this.promise.isResolved();
+};
+
+PromiseResolver.prototype.toJSON = function () {
+ return this.promise.toJSON();
+};
+
+module.exports = PromiseResolver;
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promisify.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promisify.js
new file mode 100644
index 0000000000..035534459b
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promisify.js
@@ -0,0 +1,291 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var THIS = {};
+var util = require("./util.js");
+var nodebackForPromise = require("./promise_resolver.js")
+ ._nodebackForPromise;
+var withAppended = util.withAppended;
+var maybeWrapAsError = util.maybeWrapAsError;
+var canEvaluate = util.canEvaluate;
+var TypeError = require("./errors").TypeError;
+var defaultSuffix = "Async";
+var defaultPromisified = {__isPromisified__: true};
+var noCopyPropsPattern =
+ /^(?:length|name|arguments|caller|callee|prototype|__isPromisified__)$/;
+var defaultFilter = function(name, func) {
+ return util.isIdentifier(name) &&
+ name.charAt(0) !== "_" &&
+ !util.isClass(func);
+};
+
+function propsFilter(key) {
+ return !noCopyPropsPattern.test(key);
+}
+
+function isPromisified(fn) {
+ try {
+ return fn.__isPromisified__ === true;
+ }
+ catch (e) {
+ return false;
+ }
+}
+
+function hasPromisified(obj, key, suffix) {
+ var val = util.getDataPropertyOrDefault(obj, key + suffix,
+ defaultPromisified);
+ return val ? isPromisified(val) : false;
+}
+function checkValid(ret, suffix, suffixRegexp) {
+ for (var i = 0; i < ret.length; i += 2) {
+ var key = ret[i];
+ if (suffixRegexp.test(key)) {
+ var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
+ for (var j = 0; j < ret.length; j += 2) {
+ if (ret[j] === keyWithoutAsyncSuffix) {
+ throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/iWrZbw\u000a"
+ .replace("%s", suffix));
+ }
+ }
+ }
+ }
+}
+
+function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
+ var keys = util.inheritedDataKeys(obj);
+ var ret = [];
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var value = obj[key];
+ var passesDefaultFilter = filter === defaultFilter
+ ? true : defaultFilter(key, value, obj);
+ if (typeof value === "function" &&
+ !isPromisified(value) &&
+ !hasPromisified(obj, key, suffix) &&
+ filter(key, value, obj, passesDefaultFilter)) {
+ ret.push(key, value);
+ }
+ }
+ checkValid(ret, suffix, suffixRegexp);
+ return ret;
+}
+
+var escapeIdentRegex = function(str) {
+ return str.replace(/([$])/, "\\$");
+};
+
+var makeNodePromisifiedEval;
+if (!false) {
+var switchCaseArgumentOrder = function(likelyArgumentCount) {
+ var ret = [likelyArgumentCount];
+ var min = Math.max(0, likelyArgumentCount - 1 - 3);
+ for(var i = likelyArgumentCount - 1; i >= min; --i) {
+ ret.push(i);
+ }
+ for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
+ ret.push(i);
+ }
+ return ret;
+};
+
+var argumentSequence = function(argumentCount) {
+ return util.filledRange(argumentCount, "_arg", "");
+};
+
+var parameterDeclaration = function(parameterCount) {
+ return util.filledRange(
+ Math.max(parameterCount, 3), "_arg", "");
+};
+
+var parameterCount = function(fn) {
+ if (typeof fn.length === "number") {
+ return Math.max(Math.min(fn.length, 1023 + 1), 0);
+ }
+ return 0;
+};
+
+makeNodePromisifiedEval =
+function(callback, receiver, originalName, fn) {
+ var newParameterCount = Math.max(0, parameterCount(fn) - 1);
+ var argumentOrder = switchCaseArgumentOrder(newParameterCount);
+ var shouldProxyThis = typeof callback === "string" || receiver === THIS;
+
+ function generateCallForArgumentCount(count) {
+ var args = argumentSequence(count).join(", ");
+ var comma = count > 0 ? ", " : "";
+ var ret;
+ if (shouldProxyThis) {
+ ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
+ } else {
+ ret = receiver === undefined
+ ? "ret = callback({{args}}, nodeback); break;\n"
+ : "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
+ }
+ return ret.replace("{{args}}", args).replace(", ", comma);
+ }
+
+ function generateArgumentSwitchCase() {
+ var ret = "";
+ for (var i = 0; i < argumentOrder.length; ++i) {
+ ret += "case " + argumentOrder[i] +":" +
+ generateCallForArgumentCount(argumentOrder[i]);
+ }
+
+ ret += " \n\
+ default: \n\
+ var args = new Array(len + 1); \n\
+ var i = 0; \n\
+ for (var i = 0; i < len; ++i) { \n\
+ args[i] = arguments[i]; \n\
+ } \n\
+ args[i] = nodeback; \n\
+ [CodeForCall] \n\
+ break; \n\
+ ".replace("[CodeForCall]", (shouldProxyThis
+ ? "ret = callback.apply(this, args);\n"
+ : "ret = callback.apply(receiver, args);\n"));
+ return ret;
+ }
+
+ var getFunctionCode = typeof callback === "string"
+ ? ("this != null ? this['"+callback+"'] : fn")
+ : "fn";
+
+ return new Function("Promise",
+ "fn",
+ "receiver",
+ "withAppended",
+ "maybeWrapAsError",
+ "nodebackForPromise",
+ "tryCatch",
+ "errorObj",
+ "INTERNAL","'use strict'; \n\
+ var ret = function (Parameters) { \n\
+ 'use strict'; \n\
+ var len = arguments.length; \n\
+ var promise = new Promise(INTERNAL); \n\
+ promise._captureStackTrace(); \n\
+ var nodeback = nodebackForPromise(promise); \n\
+ var ret; \n\
+ var callback = tryCatch([GetFunctionCode]); \n\
+ switch(len) { \n\
+ [CodeForSwitchCase] \n\
+ } \n\
+ if (ret === errorObj) { \n\
+ promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
+ } \n\
+ return promise; \n\
+ }; \n\
+ ret.__isPromisified__ = true; \n\
+ return ret; \n\
+ "
+ .replace("Parameters", parameterDeclaration(newParameterCount))
+ .replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
+ .replace("[GetFunctionCode]", getFunctionCode))(
+ Promise,
+ fn,
+ receiver,
+ withAppended,
+ maybeWrapAsError,
+ nodebackForPromise,
+ util.tryCatch,
+ util.errorObj,
+ INTERNAL
+ );
+};
+}
+
+function makeNodePromisifiedClosure(callback, receiver, _, fn) {
+ var defaultThis = (function() {return this;})();
+ var method = callback;
+ if (typeof method === "string") {
+ callback = fn;
+ }
+ function promisified() {
+ var _receiver = receiver;
+ if (receiver === THIS) _receiver = this;
+ var promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ var cb = typeof method === "string" && this !== defaultThis
+ ? this[method] : callback;
+ var fn = nodebackForPromise(promise);
+ try {
+ cb.apply(_receiver, withAppended(arguments, fn));
+ } catch(e) {
+ promise._rejectCallback(maybeWrapAsError(e), true, true);
+ }
+ return promise;
+ }
+ promisified.__isPromisified__ = true;
+ return promisified;
+}
+
+var makeNodePromisified = canEvaluate
+ ? makeNodePromisifiedEval
+ : makeNodePromisifiedClosure;
+
+function promisifyAll(obj, suffix, filter, promisifier) {
+ var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
+ var methods =
+ promisifiableMethods(obj, suffix, suffixRegexp, filter);
+
+ for (var i = 0, len = methods.length; i < len; i+= 2) {
+ var key = methods[i];
+ var fn = methods[i+1];
+ var promisifiedKey = key + suffix;
+ obj[promisifiedKey] = promisifier === makeNodePromisified
+ ? makeNodePromisified(key, THIS, key, fn, suffix)
+ : promisifier(fn, function() {
+ return makeNodePromisified(key, THIS, key, fn, suffix);
+ });
+ }
+ util.toFastProperties(obj);
+ return obj;
+}
+
+function promisify(callback, receiver) {
+ return makeNodePromisified(callback, receiver, undefined, callback);
+}
+
+Promise.promisify = function (fn, receiver) {
+ if (typeof fn !== "function") {
+ throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ if (isPromisified(fn)) {
+ return fn;
+ }
+ var ret = promisify(fn, arguments.length < 2 ? THIS : receiver);
+ util.copyDescriptors(fn, ret, propsFilter);
+ return ret;
+};
+
+Promise.promisifyAll = function (target, options) {
+ if (typeof target !== "function" && typeof target !== "object") {
+ throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/9ITlV0\u000a");
+ }
+ options = Object(options);
+ var suffix = options.suffix;
+ if (typeof suffix !== "string") suffix = defaultSuffix;
+ var filter = options.filter;
+ if (typeof filter !== "function") filter = defaultFilter;
+ var promisifier = options.promisifier;
+ if (typeof promisifier !== "function") promisifier = makeNodePromisified;
+
+ if (!util.isIdentifier(suffix)) {
+ throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/8FZo5V\u000a");
+ }
+
+ var keys = util.inheritedDataKeys(target);
+ for (var i = 0; i < keys.length; ++i) {
+ var value = target[keys[i]];
+ if (keys[i] !== "constructor" &&
+ util.isClass(value)) {
+ promisifyAll(value.prototype, suffix, filter, promisifier);
+ promisifyAll(value, suffix, filter, promisifier);
+ }
+ }
+
+ return promisifyAll(target, suffix, filter, promisifier);
+};
+};
+
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/props.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/props.js
new file mode 100644
index 0000000000..d6f9e64b07
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/props.js
@@ -0,0 +1,79 @@
+"use strict";
+module.exports = function(
+ Promise, PromiseArray, tryConvertToPromise, apiRejection) {
+var util = require("./util.js");
+var isObject = util.isObject;
+var es5 = require("./es5.js");
+
+function PropertiesPromiseArray(obj) {
+ var keys = es5.keys(obj);
+ var len = keys.length;
+ var values = new Array(len * 2);
+ for (var i = 0; i < len; ++i) {
+ var key = keys[i];
+ values[i] = obj[key];
+ values[i + len] = key;
+ }
+ this.constructor$(values);
+}
+util.inherits(PropertiesPromiseArray, PromiseArray);
+
+PropertiesPromiseArray.prototype._init = function () {
+ this._init$(undefined, -3) ;
+};
+
+PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ var val = {};
+ var keyOffset = this.length();
+ for (var i = 0, len = this.length(); i < len; ++i) {
+ val[this._values[i + keyOffset]] = this._values[i];
+ }
+ this._resolve(val);
+ }
+};
+
+PropertiesPromiseArray.prototype._promiseProgressed = function (value, index) {
+ this._promise._progress({
+ key: this._values[index + this.length()],
+ value: value
+ });
+};
+
+PropertiesPromiseArray.prototype.shouldCopyValues = function () {
+ return false;
+};
+
+PropertiesPromiseArray.prototype.getActualLength = function (len) {
+ return len >> 1;
+};
+
+function props(promises) {
+ var ret;
+ var castValue = tryConvertToPromise(promises);
+
+ if (!isObject(castValue)) {
+ return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/OsFKC8\u000a");
+ } else if (castValue instanceof Promise) {
+ ret = castValue._then(
+ Promise.props, undefined, undefined, undefined, undefined);
+ } else {
+ ret = new PropertiesPromiseArray(castValue).promise();
+ }
+
+ if (castValue instanceof Promise) {
+ ret._propagateFrom(castValue, 4);
+ }
+ return ret;
+}
+
+Promise.prototype.props = function () {
+ return props(this);
+};
+
+Promise.props = function (promises) {
+ return props(promises);
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/queue.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/queue.js
new file mode 100644
index 0000000000..84d57d5f62
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/queue.js
@@ -0,0 +1,90 @@
+"use strict";
+function arrayMove(src, srcIndex, dst, dstIndex, len) {
+ for (var j = 0; j < len; ++j) {
+ dst[j + dstIndex] = src[j + srcIndex];
+ src[j + srcIndex] = void 0;
+ }
+}
+
+function Queue(capacity) {
+ this._capacity = capacity;
+ this._length = 0;
+ this._front = 0;
+}
+
+Queue.prototype._willBeOverCapacity = function (size) {
+ return this._capacity < size;
+};
+
+Queue.prototype._pushOne = function (arg) {
+ var length = this.length();
+ this._checkCapacity(length + 1);
+ var i = (this._front + length) & (this._capacity - 1);
+ this[i] = arg;
+ this._length = length + 1;
+};
+
+Queue.prototype._unshiftOne = function(value) {
+ var capacity = this._capacity;
+ this._checkCapacity(this.length() + 1);
+ var front = this._front;
+ var i = (((( front - 1 ) &
+ ( capacity - 1) ) ^ capacity ) - capacity );
+ this[i] = value;
+ this._front = i;
+ this._length = this.length() + 1;
+};
+
+Queue.prototype.unshift = function(fn, receiver, arg) {
+ this._unshiftOne(arg);
+ this._unshiftOne(receiver);
+ this._unshiftOne(fn);
+};
+
+Queue.prototype.push = function (fn, receiver, arg) {
+ var length = this.length() + 3;
+ if (this._willBeOverCapacity(length)) {
+ this._pushOne(fn);
+ this._pushOne(receiver);
+ this._pushOne(arg);
+ return;
+ }
+ var j = this._front + length - 3;
+ this._checkCapacity(length);
+ var wrapMask = this._capacity - 1;
+ this[(j + 0) & wrapMask] = fn;
+ this[(j + 1) & wrapMask] = receiver;
+ this[(j + 2) & wrapMask] = arg;
+ this._length = length;
+};
+
+Queue.prototype.shift = function () {
+ var front = this._front,
+ ret = this[front];
+
+ this[front] = undefined;
+ this._front = (front + 1) & (this._capacity - 1);
+ this._length--;
+ return ret;
+};
+
+Queue.prototype.length = function () {
+ return this._length;
+};
+
+Queue.prototype._checkCapacity = function (size) {
+ if (this._capacity < size) {
+ this._resizeTo(this._capacity << 1);
+ }
+};
+
+Queue.prototype._resizeTo = function (capacity) {
+ var oldCapacity = this._capacity;
+ this._capacity = capacity;
+ var front = this._front;
+ var length = this._length;
+ var moveItemsCount = (front + length) & (oldCapacity - 1);
+ arrayMove(this, 0, this, oldCapacity, moveItemsCount);
+};
+
+module.exports = Queue;
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/race.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/race.js
new file mode 100644
index 0000000000..30e7bb094e
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/race.js
@@ -0,0 +1,47 @@
+"use strict";
+module.exports = function(
+ Promise, INTERNAL, tryConvertToPromise, apiRejection) {
+var isArray = require("./util.js").isArray;
+
+var raceLater = function (promise) {
+ return promise.then(function(array) {
+ return race(array, promise);
+ });
+};
+
+function race(promises, parent) {
+ var maybePromise = tryConvertToPromise(promises);
+
+ if (maybePromise instanceof Promise) {
+ return raceLater(maybePromise);
+ } else if (!isArray(promises)) {
+ return apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a");
+ }
+
+ var ret = new Promise(INTERNAL);
+ if (parent !== undefined) {
+ ret._propagateFrom(parent, 4 | 1);
+ }
+ var fulfill = ret._fulfill;
+ var reject = ret._reject;
+ for (var i = 0, len = promises.length; i < len; ++i) {
+ var val = promises[i];
+
+ if (val === undefined && !(i in promises)) {
+ continue;
+ }
+
+ Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
+ }
+ return ret;
+}
+
+Promise.race = function (promises) {
+ return race(promises, undefined);
+};
+
+Promise.prototype.race = function () {
+ return race(this, undefined);
+};
+
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/reduce.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/reduce.js
new file mode 100644
index 0000000000..319222012b
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/reduce.js
@@ -0,0 +1,146 @@
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL) {
+var async = require("./async.js");
+var util = require("./util.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+function ReductionPromiseArray(promises, fn, accum, _each) {
+ this.constructor$(promises);
+ this._promise._captureStackTrace();
+ this._preservedValues = _each === INTERNAL ? [] : null;
+ this._zerothIsAccum = (accum === undefined);
+ this._gotAccum = false;
+ this._reducingIndex = (this._zerothIsAccum ? 1 : 0);
+ this._valuesPhase = undefined;
+ var maybePromise = tryConvertToPromise(accum, this._promise);
+ var rejected = false;
+ var isPromise = maybePromise instanceof Promise;
+ if (isPromise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ maybePromise._proxyPromiseArray(this, -1);
+ } else if (maybePromise._isFulfilled()) {
+ accum = maybePromise._value();
+ this._gotAccum = true;
+ } else {
+ this._reject(maybePromise._reason());
+ rejected = true;
+ }
+ }
+ if (!(isPromise || this._zerothIsAccum)) this._gotAccum = true;
+ this._callback = fn;
+ this._accum = accum;
+ if (!rejected) async.invoke(init, this, undefined);
+}
+function init() {
+ this._init$(undefined, -5);
+}
+util.inherits(ReductionPromiseArray, PromiseArray);
+
+ReductionPromiseArray.prototype._init = function () {};
+
+ReductionPromiseArray.prototype._resolveEmptyArray = function () {
+ if (this._gotAccum || this._zerothIsAccum) {
+ this._resolve(this._preservedValues !== null
+ ? [] : this._accum);
+ }
+};
+
+ReductionPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var values = this._values;
+ values[index] = value;
+ var length = this.length();
+ var preservedValues = this._preservedValues;
+ var isEach = preservedValues !== null;
+ var gotAccum = this._gotAccum;
+ var valuesPhase = this._valuesPhase;
+ var valuesPhaseIndex;
+ if (!valuesPhase) {
+ valuesPhase = this._valuesPhase = new Array(length);
+ for (valuesPhaseIndex=0; valuesPhaseIndex<length; ++valuesPhaseIndex) {
+ valuesPhase[valuesPhaseIndex] = 0;
+ }
+ }
+ valuesPhaseIndex = valuesPhase[index];
+
+ if (index === 0 && this._zerothIsAccum) {
+ this._accum = value;
+ this._gotAccum = gotAccum = true;
+ valuesPhase[index] = ((valuesPhaseIndex === 0)
+ ? 1 : 2);
+ } else if (index === -1) {
+ this._accum = value;
+ this._gotAccum = gotAccum = true;
+ } else {
+ if (valuesPhaseIndex === 0) {
+ valuesPhase[index] = 1;
+ } else {
+ valuesPhase[index] = 2;
+ this._accum = value;
+ }
+ }
+ if (!gotAccum) return;
+
+ var callback = this._callback;
+ var receiver = this._promise._boundTo;
+ var ret;
+
+ for (var i = this._reducingIndex; i < length; ++i) {
+ valuesPhaseIndex = valuesPhase[i];
+ if (valuesPhaseIndex === 2) {
+ this._reducingIndex = i + 1;
+ continue;
+ }
+ if (valuesPhaseIndex !== 1) return;
+ value = values[i];
+ this._promise._pushContext();
+ if (isEach) {
+ preservedValues.push(value);
+ ret = tryCatch(callback).call(receiver, value, i, length);
+ }
+ else {
+ ret = tryCatch(callback)
+ .call(receiver, this._accum, value, i, length);
+ }
+ this._promise._popContext();
+
+ if (ret === errorObj) return this._reject(ret.e);
+
+ var maybePromise = tryConvertToPromise(ret, this._promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ valuesPhase[i] = 4;
+ return maybePromise._proxyPromiseArray(this, i);
+ } else if (maybePromise._isFulfilled()) {
+ ret = maybePromise._value();
+ } else {
+ return this._reject(maybePromise._reason());
+ }
+ }
+
+ this._reducingIndex = i + 1;
+ this._accum = ret;
+ }
+
+ this._resolve(isEach ? preservedValues : this._accum);
+};
+
+function reduce(promises, fn, initialValue, _each) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
+ return array.promise();
+}
+
+Promise.prototype.reduce = function (fn, initialValue) {
+ return reduce(this, fn, initialValue, null);
+};
+
+Promise.reduce = function (promises, fn, initialValue, _each) {
+ return reduce(promises, fn, initialValue, _each);
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/schedule.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/schedule.js
new file mode 100644
index 0000000000..2355ffb77d
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/schedule.js
@@ -0,0 +1,39 @@
+"use strict";
+var schedule;
+var noAsyncScheduler = function() {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a");
+};
+if (require("./util.js").isNode) {
+ var version = process.versions.node.split(".").map(Number);
+ schedule = (version[0] === 0 && version[1] > 10) || (version[0] > 0)
+ ? global.setImmediate : process.nextTick;
+
+ if (!schedule) {
+ if (typeof setImmediate !== "undefined") {
+ schedule = setImmediate;
+ } else if (typeof setTimeout !== "undefined") {
+ schedule = setTimeout;
+ } else {
+ schedule = noAsyncScheduler;
+ }
+ }
+} else if (typeof MutationObserver !== "undefined") {
+ schedule = function(fn) {
+ var div = document.createElement("div");
+ var observer = new MutationObserver(fn);
+ observer.observe(div, {attributes: true});
+ return function() { div.classList.toggle("foo"); };
+ };
+ schedule.isStatic = true;
+} else if (typeof setImmediate !== "undefined") {
+ schedule = function (fn) {
+ setImmediate(fn);
+ };
+} else if (typeof setTimeout !== "undefined") {
+ schedule = function (fn) {
+ setTimeout(fn, 0);
+ };
+} else {
+ schedule = noAsyncScheduler;
+}
+module.exports = schedule;
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/settle.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/settle.js
new file mode 100644
index 0000000000..f9299c2589
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/settle.js
@@ -0,0 +1,40 @@
+"use strict";
+module.exports =
+ function(Promise, PromiseArray) {
+var PromiseInspection = Promise.PromiseInspection;
+var util = require("./util.js");
+
+function SettledPromiseArray(values) {
+ this.constructor$(values);
+}
+util.inherits(SettledPromiseArray, PromiseArray);
+
+SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
+ this._values[index] = inspection;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ }
+};
+
+SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 268435456;
+ ret._settledValue = value;
+ this._promiseResolved(index, ret);
+};
+SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 134217728;
+ ret._settledValue = reason;
+ this._promiseResolved(index, ret);
+};
+
+Promise.settle = function (promises) {
+ return new SettledPromiseArray(promises).promise();
+};
+
+Promise.prototype.settle = function () {
+ return new SettledPromiseArray(this).promise();
+};
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/some.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/some.js
new file mode 100644
index 0000000000..f3968cf1fa
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/some.js
@@ -0,0 +1,125 @@
+"use strict";
+module.exports =
+function(Promise, PromiseArray, apiRejection) {
+var util = require("./util.js");
+var RangeError = require("./errors.js").RangeError;
+var AggregateError = require("./errors.js").AggregateError;
+var isArray = util.isArray;
+
+
+function SomePromiseArray(values) {
+ this.constructor$(values);
+ this._howMany = 0;
+ this._unwrap = false;
+ this._initialized = false;
+}
+util.inherits(SomePromiseArray, PromiseArray);
+
+SomePromiseArray.prototype._init = function () {
+ if (!this._initialized) {
+ return;
+ }
+ if (this._howMany === 0) {
+ this._resolve([]);
+ return;
+ }
+ this._init$(undefined, -5);
+ var isArrayResolved = isArray(this._values);
+ if (!this._isResolved() &&
+ isArrayResolved &&
+ this._howMany > this._canPossiblyFulfill()) {
+ this._reject(this._getRangeError(this.length()));
+ }
+};
+
+SomePromiseArray.prototype.init = function () {
+ this._initialized = true;
+ this._init();
+};
+
+SomePromiseArray.prototype.setUnwrap = function () {
+ this._unwrap = true;
+};
+
+SomePromiseArray.prototype.howMany = function () {
+ return this._howMany;
+};
+
+SomePromiseArray.prototype.setHowMany = function (count) {
+ this._howMany = count;
+};
+
+SomePromiseArray.prototype._promiseFulfilled = function (value) {
+ this._addFulfilled(value);
+ if (this._fulfilled() === this.howMany()) {
+ this._values.length = this.howMany();
+ if (this.howMany() === 1 && this._unwrap) {
+ this._resolve(this._values[0]);
+ } else {
+ this._resolve(this._values);
+ }
+ }
+
+};
+SomePromiseArray.prototype._promiseRejected = function (reason) {
+ this._addRejected(reason);
+ if (this.howMany() > this._canPossiblyFulfill()) {
+ var e = new AggregateError();
+ for (var i = this.length(); i < this._values.length; ++i) {
+ e.push(this._values[i]);
+ }
+ this._reject(e);
+ }
+};
+
+SomePromiseArray.prototype._fulfilled = function () {
+ return this._totalResolved;
+};
+
+SomePromiseArray.prototype._rejected = function () {
+ return this._values.length - this.length();
+};
+
+SomePromiseArray.prototype._addRejected = function (reason) {
+ this._values.push(reason);
+};
+
+SomePromiseArray.prototype._addFulfilled = function (value) {
+ this._values[this._totalResolved++] = value;
+};
+
+SomePromiseArray.prototype._canPossiblyFulfill = function () {
+ return this.length() - this._rejected();
+};
+
+SomePromiseArray.prototype._getRangeError = function (count) {
+ var message = "Input array must contain at least " +
+ this._howMany + " items but contains only " + count + " items";
+ return new RangeError(message);
+};
+
+SomePromiseArray.prototype._resolveEmptyArray = function () {
+ this._reject(this._getRangeError(0));
+};
+
+function some(promises, howMany) {
+ if ((howMany | 0) !== howMany || howMany < 0) {
+ return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/1wAmHx\u000a");
+ }
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(howMany);
+ ret.init();
+ return promise;
+}
+
+Promise.some = function (promises, howMany) {
+ return some(promises, howMany);
+};
+
+Promise.prototype.some = function (howMany) {
+ return some(this, howMany);
+};
+
+Promise._SomePromiseArray = SomePromiseArray;
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/synchronous_inspection.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/synchronous_inspection.js
new file mode 100644
index 0000000000..7aac1496d5
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/synchronous_inspection.js
@@ -0,0 +1,94 @@
+"use strict";
+module.exports = function(Promise) {
+function PromiseInspection(promise) {
+ if (promise !== undefined) {
+ promise = promise._target();
+ this._bitField = promise._bitField;
+ this._settledValue = promise._settledValue;
+ }
+ else {
+ this._bitField = 0;
+ this._settledValue = undefined;
+ }
+}
+
+PromiseInspection.prototype.value = function () {
+ if (!this.isFulfilled()) {
+ throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a");
+ }
+ return this._settledValue;
+};
+
+PromiseInspection.prototype.error =
+PromiseInspection.prototype.reason = function () {
+ if (!this.isRejected()) {
+ throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a");
+ }
+ return this._settledValue;
+};
+
+PromiseInspection.prototype.isFulfilled =
+Promise.prototype._isFulfilled = function () {
+ return (this._bitField & 268435456) > 0;
+};
+
+PromiseInspection.prototype.isRejected =
+Promise.prototype._isRejected = function () {
+ return (this._bitField & 134217728) > 0;
+};
+
+PromiseInspection.prototype.isPending =
+Promise.prototype._isPending = function () {
+ return (this._bitField & 402653184) === 0;
+};
+
+PromiseInspection.prototype.isResolved =
+Promise.prototype._isResolved = function () {
+ return (this._bitField & 402653184) > 0;
+};
+
+Promise.prototype.isPending = function() {
+ return this._target()._isPending();
+};
+
+Promise.prototype.isRejected = function() {
+ return this._target()._isRejected();
+};
+
+Promise.prototype.isFulfilled = function() {
+ return this._target()._isFulfilled();
+};
+
+Promise.prototype.isResolved = function() {
+ return this._target()._isResolved();
+};
+
+Promise.prototype._value = function() {
+ return this._settledValue;
+};
+
+Promise.prototype._reason = function() {
+ this._unsetRejectionIsUnhandled();
+ return this._settledValue;
+};
+
+Promise.prototype.value = function() {
+ var target = this._target();
+ if (!target.isFulfilled()) {
+ throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a");
+ }
+ return target._settledValue;
+};
+
+Promise.prototype.reason = function() {
+ var target = this._target();
+ if (!target.isRejected()) {
+ throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a");
+ }
+ target._unsetRejectionIsUnhandled();
+ return target._settledValue;
+};
+
+
+Promise.PromiseInspection = PromiseInspection;
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/thenables.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/thenables.js
new file mode 100644
index 0000000000..c858f86ab5
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/thenables.js
@@ -0,0 +1,89 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var util = require("./util.js");
+var errorObj = util.errorObj;
+var isObject = util.isObject;
+
+function tryConvertToPromise(obj, context) {
+ if (isObject(obj)) {
+ if (obj instanceof Promise) {
+ return obj;
+ }
+ else if (isAnyBluebirdPromise(obj)) {
+ var ret = new Promise(INTERNAL);
+ obj._then(
+ ret._fulfillUnchecked,
+ ret._rejectUncheckedCheckError,
+ ret._progressUnchecked,
+ ret,
+ null
+ );
+ return ret;
+ }
+ var then = util.tryCatch(getThen)(obj);
+ if (then === errorObj) {
+ if (context) context._pushContext();
+ var ret = Promise.reject(then.e);
+ if (context) context._popContext();
+ return ret;
+ } else if (typeof then === "function") {
+ return doThenable(obj, then, context);
+ }
+ }
+ return obj;
+}
+
+function getThen(obj) {
+ return obj.then;
+}
+
+var hasProp = {}.hasOwnProperty;
+function isAnyBluebirdPromise(obj) {
+ return hasProp.call(obj, "_promise0");
+}
+
+function doThenable(x, then, context) {
+ var promise = new Promise(INTERNAL);
+ var ret = promise;
+ if (context) context._pushContext();
+ promise._captureStackTrace();
+ if (context) context._popContext();
+ var synchronous = true;
+ var result = util.tryCatch(then).call(x,
+ resolveFromThenable,
+ rejectFromThenable,
+ progressFromThenable);
+ synchronous = false;
+ if (promise && result === errorObj) {
+ promise._rejectCallback(result.e, true, true);
+ promise = null;
+ }
+
+ function resolveFromThenable(value) {
+ if (!promise) return;
+ if (x === value) {
+ promise._rejectCallback(
+ Promise._makeSelfResolutionError(), false, true);
+ } else {
+ promise._resolveCallback(value);
+ }
+ promise = null;
+ }
+
+ function rejectFromThenable(reason) {
+ if (!promise) return;
+ promise._rejectCallback(reason, synchronous, true);
+ promise = null;
+ }
+
+ function progressFromThenable(value) {
+ if (!promise) return;
+ if (typeof promise._progress === "function") {
+ promise._progress(value);
+ }
+ }
+ return ret;
+}
+
+return tryConvertToPromise;
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/timers.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/timers.js
new file mode 100644
index 0000000000..ecf1b57658
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/timers.js
@@ -0,0 +1,58 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var util = require("./util.js");
+var TimeoutError = Promise.TimeoutError;
+
+var afterTimeout = function (promise, message) {
+ if (!promise.isPending()) return;
+ if (typeof message !== "string") {
+ message = "operation timed out";
+ }
+ var err = new TimeoutError(message);
+ util.markAsOriginatingFromRejection(err);
+ promise._attachExtraTrace(err);
+ promise._cancel(err);
+};
+
+var afterValue = function(value) { return delay(+this).thenReturn(value); };
+var delay = Promise.delay = function (value, ms) {
+ if (ms === undefined) {
+ ms = value;
+ value = undefined;
+ var ret = new Promise(INTERNAL);
+ setTimeout(function() { ret._fulfill(); }, ms);
+ return ret;
+ }
+ ms = +ms;
+ return Promise.resolve(value)._then(afterValue, null, null, ms, undefined);
+};
+
+Promise.prototype.delay = function (ms) {
+ return delay(this, ms);
+};
+
+function successClear(value) {
+ var handle = this;
+ if (handle instanceof Number) handle = +handle;
+ clearTimeout(handle);
+ return value;
+}
+
+function failureClear(reason) {
+ var handle = this;
+ if (handle instanceof Number) handle = +handle;
+ clearTimeout(handle);
+ throw reason;
+}
+
+Promise.prototype.timeout = function (ms, message) {
+ ms = +ms;
+ var ret = this.then().cancellable();
+ ret._cancellationParent = this;
+ var handle = setTimeout(function timeoutTimeout() {
+ afterTimeout(ret, message);
+ }, ms);
+ return ret._then(successClear, failureClear, undefined, handle, undefined);
+};
+
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/using.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/using.js
new file mode 100644
index 0000000000..40387117b6
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/using.js
@@ -0,0 +1,202 @@
+"use strict";
+module.exports = function (Promise, apiRejection, tryConvertToPromise,
+ createContext) {
+ var TypeError = require("./errors.js").TypeError;
+ var inherits = require("./util.js").inherits;
+ var PromiseInspection = Promise.PromiseInspection;
+
+ function inspectionMapper(inspections) {
+ var len = inspections.length;
+ for (var i = 0; i < len; ++i) {
+ var inspection = inspections[i];
+ if (inspection.isRejected()) {
+ return Promise.reject(inspection.error());
+ }
+ inspections[i] = inspection._settledValue;
+ }
+ return inspections;
+ }
+
+ function thrower(e) {
+ setTimeout(function(){throw e;}, 0);
+ }
+
+ function castPreservingDisposable(thenable) {
+ var maybePromise = tryConvertToPromise(thenable);
+ if (maybePromise !== thenable &&
+ typeof thenable._isDisposable === "function" &&
+ typeof thenable._getDisposer === "function" &&
+ thenable._isDisposable()) {
+ maybePromise._setDisposable(thenable._getDisposer());
+ }
+ return maybePromise;
+ }
+ function dispose(resources, inspection) {
+ var i = 0;
+ var len = resources.length;
+ var ret = Promise.defer();
+ function iterator() {
+ if (i >= len) return ret.resolve();
+ var maybePromise = castPreservingDisposable(resources[i++]);
+ if (maybePromise instanceof Promise &&
+ maybePromise._isDisposable()) {
+ try {
+ maybePromise = tryConvertToPromise(
+ maybePromise._getDisposer().tryDispose(inspection),
+ resources.promise);
+ } catch (e) {
+ return thrower(e);
+ }
+ if (maybePromise instanceof Promise) {
+ return maybePromise._then(iterator, thrower,
+ null, null, null);
+ }
+ }
+ iterator();
+ }
+ iterator();
+ return ret.promise;
+ }
+
+ function disposerSuccess(value) {
+ var inspection = new PromiseInspection();
+ inspection._settledValue = value;
+ inspection._bitField = 268435456;
+ return dispose(this, inspection).thenReturn(value);
+ }
+
+ function disposerFail(reason) {
+ var inspection = new PromiseInspection();
+ inspection._settledValue = reason;
+ inspection._bitField = 134217728;
+ return dispose(this, inspection).thenThrow(reason);
+ }
+
+ function Disposer(data, promise, context) {
+ this._data = data;
+ this._promise = promise;
+ this._context = context;
+ }
+
+ Disposer.prototype.data = function () {
+ return this._data;
+ };
+
+ Disposer.prototype.promise = function () {
+ return this._promise;
+ };
+
+ Disposer.prototype.resource = function () {
+ if (this.promise().isFulfilled()) {
+ return this.promise().value();
+ }
+ return null;
+ };
+
+ Disposer.prototype.tryDispose = function(inspection) {
+ var resource = this.resource();
+ var context = this._context;
+ if (context !== undefined) context._pushContext();
+ var ret = resource !== null
+ ? this.doDispose(resource, inspection) : null;
+ if (context !== undefined) context._popContext();
+ this._promise._unsetDisposable();
+ this._data = null;
+ return ret;
+ };
+
+ Disposer.isDisposer = function (d) {
+ return (d != null &&
+ typeof d.resource === "function" &&
+ typeof d.tryDispose === "function");
+ };
+
+ function FunctionDisposer(fn, promise, context) {
+ this.constructor$(fn, promise, context);
+ }
+ inherits(FunctionDisposer, Disposer);
+
+ FunctionDisposer.prototype.doDispose = function (resource, inspection) {
+ var fn = this.data();
+ return fn.call(resource, resource, inspection);
+ };
+
+ function maybeUnwrapDisposer(value) {
+ if (Disposer.isDisposer(value)) {
+ this.resources[this.index]._setDisposable(value);
+ return value.promise();
+ }
+ return value;
+ }
+
+ Promise.using = function () {
+ var len = arguments.length;
+ if (len < 2) return apiRejection(
+ "you must pass at least 2 arguments to Promise.using");
+ var fn = arguments[len - 1];
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ len--;
+ var resources = new Array(len);
+ for (var i = 0; i < len; ++i) {
+ var resource = arguments[i];
+ if (Disposer.isDisposer(resource)) {
+ var disposer = resource;
+ resource = resource.promise();
+ resource._setDisposable(disposer);
+ } else {
+ var maybePromise = tryConvertToPromise(resource);
+ if (maybePromise instanceof Promise) {
+ resource =
+ maybePromise._then(maybeUnwrapDisposer, null, null, {
+ resources: resources,
+ index: i
+ }, undefined);
+ }
+ }
+ resources[i] = resource;
+ }
+
+ var promise = Promise.settle(resources)
+ .then(inspectionMapper)
+ .then(function(vals) {
+ promise._pushContext();
+ var ret;
+ try {
+ ret = fn.apply(undefined, vals);
+ } finally {
+ promise._popContext();
+ }
+ return ret;
+ })
+ ._then(
+ disposerSuccess, disposerFail, undefined, resources, undefined);
+ resources.promise = promise;
+ return promise;
+ };
+
+ Promise.prototype._setDisposable = function (disposer) {
+ this._bitField = this._bitField | 262144;
+ this._disposer = disposer;
+ };
+
+ Promise.prototype._isDisposable = function () {
+ return (this._bitField & 262144) > 0;
+ };
+
+ Promise.prototype._getDisposer = function () {
+ return this._disposer;
+ };
+
+ Promise.prototype._unsetDisposable = function () {
+ this._bitField = this._bitField & (~262144);
+ this._disposer = undefined;
+ };
+
+ Promise.prototype.disposer = function (fn) {
+ if (typeof fn === "function") {
+ return new FunctionDisposer(fn, this, createContext());
+ }
+ throw new TypeError();
+ };
+
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/util.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/util.js
new file mode 100644
index 0000000000..fbee5deb7e
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/util.js
@@ -0,0 +1,280 @@
+"use strict";
+var es5 = require("./es5.js");
+var canEvaluate = typeof navigator == "undefined";
+var haveGetters = (function(){
+ try {
+ var o = {};
+ es5.defineProperty(o, "f", {
+ get: function () {
+ return 3;
+ }
+ });
+ return o.f === 3;
+ }
+ catch (e) {
+ return false;
+ }
+
+})();
+
+var errorObj = {e: {}};
+var tryCatchTarget;
+function tryCatcher() {
+ try {
+ return tryCatchTarget.apply(this, arguments);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+}
+function tryCatch(fn) {
+ tryCatchTarget = fn;
+ return tryCatcher;
+}
+
+var inherits = function(Child, Parent) {
+ var hasProp = {}.hasOwnProperty;
+
+ function T() {
+ this.constructor = Child;
+ this.constructor$ = Parent;
+ for (var propertyName in Parent.prototype) {
+ if (hasProp.call(Parent.prototype, propertyName) &&
+ propertyName.charAt(propertyName.length-1) !== "$"
+ ) {
+ this[propertyName + "$"] = Parent.prototype[propertyName];
+ }
+ }
+ }
+ T.prototype = Parent.prototype;
+ Child.prototype = new T();
+ return Child.prototype;
+};
+
+
+function isPrimitive(val) {
+ return val == null || val === true || val === false ||
+ typeof val === "string" || typeof val === "number";
+
+}
+
+function isObject(value) {
+ return !isPrimitive(value);
+}
+
+function maybeWrapAsError(maybeError) {
+ if (!isPrimitive(maybeError)) return maybeError;
+
+ return new Error(safeToString(maybeError));
+}
+
+function withAppended(target, appendee) {
+ var len = target.length;
+ var ret = new Array(len + 1);
+ var i;
+ for (i = 0; i < len; ++i) {
+ ret[i] = target[i];
+ }
+ ret[i] = appendee;
+ return ret;
+}
+
+function getDataPropertyOrDefault(obj, key, defaultValue) {
+ if (es5.isES5) {
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+ if (desc != null) {
+ return desc.get == null && desc.set == null
+ ? desc.value
+ : defaultValue;
+ }
+ } else {
+ return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
+ }
+}
+
+function notEnumerableProp(obj, name, value) {
+ if (isPrimitive(obj)) return obj;
+ var descriptor = {
+ value: value,
+ configurable: true,
+ enumerable: false,
+ writable: true
+ };
+ es5.defineProperty(obj, name, descriptor);
+ return obj;
+}
+
+
+var wrapsPrimitiveReceiver = (function() {
+ return this !== "string";
+}).call("string");
+
+function thrower(r) {
+ throw r;
+}
+
+var inheritedDataKeys = (function() {
+ if (es5.isES5) {
+ var oProto = Object.prototype;
+ var getKeys = Object.getOwnPropertyNames;
+ return function(obj) {
+ var ret = [];
+ var visitedKeys = Object.create(null);
+ while (obj != null && obj !== oProto) {
+ var keys;
+ try {
+ keys = getKeys(obj);
+ } catch (e) {
+ return ret;
+ }
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (visitedKeys[key]) continue;
+ visitedKeys[key] = true;
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+ if (desc != null && desc.get == null && desc.set == null) {
+ ret.push(key);
+ }
+ }
+ obj = es5.getPrototypeOf(obj);
+ }
+ return ret;
+ };
+ } else {
+ return function(obj) {
+ var ret = [];
+ /*jshint forin:false */
+ for (var key in obj) {
+ ret.push(key);
+ }
+ return ret;
+ };
+ }
+
+})();
+
+function isClass(fn) {
+ try {
+ if (typeof fn === "function") {
+ var keys = es5.names(fn.prototype);
+ if (es5.isES5) return keys.length > 1;
+ return keys.length > 0 &&
+ !(keys.length === 1 && keys[0] === "constructor");
+ }
+ return false;
+ } catch (e) {
+ return false;
+ }
+}
+
+function toFastProperties(obj) {
+ /*jshint -W027,-W055,-W031*/
+ function f() {}
+ f.prototype = obj;
+ var l = 8;
+ while (l--) new f();
+ return obj;
+ eval(obj);
+}
+
+var rident = /^[a-z$_][a-z$_0-9]*$/i;
+function isIdentifier(str) {
+ return rident.test(str);
+}
+
+function filledRange(count, prefix, suffix) {
+ var ret = new Array(count);
+ for(var i = 0; i < count; ++i) {
+ ret[i] = prefix + i + suffix;
+ }
+ return ret;
+}
+
+function safeToString(obj) {
+ try {
+ return obj + "";
+ } catch (e) {
+ return "[no string representation]";
+ }
+}
+
+function markAsOriginatingFromRejection(e) {
+ try {
+ notEnumerableProp(e, "isOperational", true);
+ }
+ catch(ignore) {}
+}
+
+function originatesFromRejection(e) {
+ if (e == null) return false;
+ return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
+ e["isOperational"] === true);
+}
+
+function canAttachTrace(obj) {
+ return obj instanceof Error && es5.propertyIsWritable(obj, "stack");
+}
+
+var ensureErrorObject = (function() {
+ if (!("stack" in new Error())) {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ try {throw new Error(safeToString(value));}
+ catch(err) {return err;}
+ };
+ } else {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ return new Error(safeToString(value));
+ };
+ }
+})();
+
+function classString(obj) {
+ return {}.toString.call(obj);
+}
+
+function copyDescriptors(from, to, filter) {
+ var keys = es5.names(from);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (filter(key)) {
+ es5.defineProperty(to, key, es5.getDescriptor(from, key));
+ }
+ }
+}
+
+var ret = {
+ isClass: isClass,
+ isIdentifier: isIdentifier,
+ inheritedDataKeys: inheritedDataKeys,
+ getDataPropertyOrDefault: getDataPropertyOrDefault,
+ thrower: thrower,
+ isArray: es5.isArray,
+ haveGetters: haveGetters,
+ notEnumerableProp: notEnumerableProp,
+ isPrimitive: isPrimitive,
+ isObject: isObject,
+ canEvaluate: canEvaluate,
+ errorObj: errorObj,
+ tryCatch: tryCatch,
+ inherits: inherits,
+ withAppended: withAppended,
+ maybeWrapAsError: maybeWrapAsError,
+ wrapsPrimitiveReceiver: wrapsPrimitiveReceiver,
+ toFastProperties: toFastProperties,
+ filledRange: filledRange,
+ toString: safeToString,
+ canAttachTrace: canAttachTrace,
+ ensureErrorObject: ensureErrorObject,
+ originatesFromRejection: originatesFromRejection,
+ markAsOriginatingFromRejection: markAsOriginatingFromRejection,
+ classString: classString,
+ copyDescriptors: copyDescriptors,
+ hasDevTools: typeof chrome !== "undefined" && chrome &&
+ typeof chrome.loadTimes === "function",
+ isNode: typeof process !== "undefined" &&
+ classString(process).toLowerCase() === "[object process]"
+};
+try {throw new Error(); } catch (e) {ret.lastLineError = e;}
+module.exports = ret;
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/package.json
new file mode 100644
index 0000000000..667cdfb147
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/package.json
@@ -0,0 +1,96 @@
+{
+ "name": "bluebird",
+ "description": "Full featured Promises/A+ implementation with exceptionally good performance",
+ "version": "2.9.24",
+ "keywords": [
+ "promise",
+ "performance",
+ "promises",
+ "promises-a",
+ "promises-aplus",
+ "async",
+ "await",
+ "deferred",
+ "deferreds",
+ "future",
+ "flow control",
+ "dsl",
+ "fluent interface"
+ ],
+ "scripts": {
+ "lint": "node scripts/jshint.js",
+ "test": "node tools/test.js",
+ "istanbul": "istanbul",
+ "prepublish": "node tools/build.js --no-debug --main --zalgo --browser --minify"
+ },
+ "homepage": "https://github.com/petkaantonov/bluebird",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/petkaantonov/bluebird.git"
+ },
+ "bugs": {
+ "url": "http://github.com/petkaantonov/bluebird/issues"
+ },
+ "license": "MIT",
+ "author": {
+ "name": "Petka Antonov",
+ "email": "petka_antonov@hotmail.com",
+ "url": "http://github.com/petkaantonov/"
+ },
+ "devDependencies": {
+ "acorn": "~0.6.0",
+ "baconjs": "^0.7.43",
+ "bluebird": "^2.9.2",
+ "body-parser": "^1.10.2",
+ "browserify": "^8.1.1",
+ "cli-table": "~0.3.1",
+ "co": "^4.2.0",
+ "cross-spawn": "^0.2.3",
+ "glob": "^4.3.2",
+ "grunt-saucelabs": "~8.4.1",
+ "highland": "^2.3.0",
+ "istanbul": "^0.3.5",
+ "jshint": "^2.6.0",
+ "jshint-stylish": "~0.2.0",
+ "mkdirp": "~0.5.0",
+ "mocha": "~2.1",
+ "open": "~0.0.5",
+ "optimist": "~0.6.1",
+ "rimraf": "~2.2.6",
+ "rx": "^2.3.25",
+ "serve-static": "^1.7.1",
+ "sinon": "~1.7.3",
+ "uglify-js": "~2.4.16"
+ },
+ "main": "./js/main/bluebird.js",
+ "browser": "./js/browser/bluebird.js",
+ "files": [
+ "js/browser",
+ "js/main",
+ "js/zalgo",
+ "LICENSE",
+ "zalgo.js"
+ ],
+ "gitHead": "3f58d8ea478329a2400ab7fa0bd841289b02fc07",
+ "_id": "bluebird@2.9.24",
+ "_shasum": "14a2e75f0548323dc35aa440d92007ca154e967c",
+ "_from": "bluebird@>=2.9.21 <3.0.0",
+ "_npmVersion": "2.7.1",
+ "_nodeVersion": "1.6.2",
+ "_npmUser": {
+ "name": "esailija",
+ "email": "petka_antonov@hotmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "esailija",
+ "email": "petka_antonov@hotmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "14a2e75f0548323dc35aa440d92007ca154e967c",
+ "tarball": "http://registry.npmjs.org/bluebird/-/bluebird-2.9.24.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.9.24.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/index.js
new file mode 100644
index 0000000000..4138a64dd9
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/index.js
@@ -0,0 +1,100 @@
+'use strict';
+var escapeStringRegexp = require('escape-string-regexp');
+var ansiStyles = require('ansi-styles');
+var stripAnsi = require('strip-ansi');
+var hasAnsi = require('has-ansi');
+var supportsColor = require('supports-color');
+var defineProps = Object.defineProperties;
+
+function Chalk(options) {
+ // detect mode if not set manually
+ this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
+}
+
+// use bright blue on Windows as the normal blue color is illegible
+if (process.platform === 'win32') {
+ ansiStyles.blue.open = '\u001b[94m';
+}
+
+function build(_styles) {
+ var builder = function builder() {
+ return applyStyle.apply(builder, arguments);
+ };
+ builder._styles = _styles;
+ builder.enabled = this.enabled;
+ // __proto__ is used because we must return a function, but there is
+ // no way to create a function with a different prototype.
+ builder.__proto__ = proto;
+ return builder;
+}
+
+var styles = (function () {
+ var ret = {};
+
+ Object.keys(ansiStyles).forEach(function (key) {
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
+
+ ret[key] = {
+ get: function () {
+ return build.call(this, this._styles.concat(key));
+ }
+ };
+ });
+
+ return ret;
+})();
+
+var proto = defineProps(function chalk() {}, styles);
+
+function applyStyle() {
+ // support varags, but simply cast to string in case there's only one arg
+ var args = arguments;
+ var argsLen = args.length;
+ var str = argsLen !== 0 && String(arguments[0]);
+ if (argsLen > 1) {
+ // don't slice `arguments`, it prevents v8 optimizations
+ for (var a = 1; a < argsLen; a++) {
+ str += ' ' + args[a];
+ }
+ }
+
+ if (!this.enabled || !str) {
+ return str;
+ }
+
+ /*jshint validthis: true */
+ var nestedStyles = this._styles;
+
+ var i = nestedStyles.length;
+ while (i--) {
+ var code = ansiStyles[nestedStyles[i]];
+ // Replace any instances already present with a re-opening code
+ // otherwise only the part of the string until said closing code
+ // will be colored, and the rest will simply be 'plain'.
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
+ }
+
+ return str;
+}
+
+function init() {
+ var ret = {};
+
+ Object.keys(styles).forEach(function (name) {
+ ret[name] = {
+ get: function () {
+ return build.call(this, [name]);
+ }
+ };
+ });
+
+ return ret;
+}
+
+defineProps(Chalk.prototype, init());
+
+module.exports = new Chalk();
+module.exports.styles = ansiStyles;
+module.exports.hasColor = hasAnsi;
+module.exports.stripColor = stripAnsi;
+module.exports.supportsColor = supportsColor;
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/license b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/index.js
new file mode 100644
index 0000000000..caf9e119eb
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/index.js
@@ -0,0 +1,56 @@
+'use strict';
+
+var styles = module.exports = {
+ modifiers: {
+ reset: [0, 0],
+ bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29]
+ },
+ colors: {
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+ gray: [90, 39]
+ },
+ bgColors: {
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49]
+ }
+};
+
+// fix humans
+styles.colors.grey = styles.colors.gray;
+
+Object.keys(styles).forEach(function (groupName) {
+ var group = styles[groupName];
+
+ Object.keys(group).forEach(function (styleName) {
+ var style = group[styleName];
+
+ styles[styleName] = group[styleName] = {
+ open: '\u001b[' + style[0] + 'm',
+ close: '\u001b[' + style[1] + 'm'
+ };
+ });
+
+ Object.defineProperty(styles, groupName, {
+ value: group,
+ enumerable: false
+ });
+});
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/license b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/package.json
new file mode 100644
index 0000000000..3dc27f2585
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/package.json
@@ -0,0 +1,79 @@
+{
+ "name": "ansi-styles",
+ "version": "2.0.1",
+ "description": "ANSI escape codes for styling strings in the terminal",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sindresorhus/ansi-styles"
+ },
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ }
+ ],
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "gitHead": "da6541334e1681cb803f891fab8abf4313cc4bc1",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/ansi-styles/issues"
+ },
+ "homepage": "https://github.com/sindresorhus/ansi-styles",
+ "_id": "ansi-styles@2.0.1",
+ "_shasum": "b033f57f93e2d28adeb8bc11138fa13da0fd20a3",
+ "_from": "ansi-styles@>=2.0.1 <3.0.0",
+ "_npmVersion": "2.1.16",
+ "_nodeVersion": "0.10.35",
+ "_npmUser": {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ },
+ "dist": {
+ "shasum": "b033f57f93e2d28adeb8bc11138fa13da0fd20a3",
+ "tarball": "http://registry.npmjs.org/ansi-styles/-/ansi-styles-2.0.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.0.1.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/readme.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/readme.md
new file mode 100644
index 0000000000..89ec6a7c1e
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/readme.md
@@ -0,0 +1,86 @@
+# ansi-styles [![Build Status](https://travis-ci.org/sindresorhus/ansi-styles.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-styles)
+
+> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
+
+You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.
+
+![](screenshot.png)
+
+
+## Install
+
+```sh
+$ npm install --save ansi-styles
+```
+
+
+## Usage
+
+```js
+var ansi = require('ansi-styles');
+
+console.log(ansi.green.open + 'Hello world!' + ansi.green.close);
+```
+
+
+## API
+
+Each style has an `open` and `close` property.
+
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(not widely supported)*
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `gray`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+
+
+## Advanced usage
+
+By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
+
+- `ansi.modifiers`
+- `ansi.colors`
+- `ansi.bgColors`
+
+
+###### Example
+
+```js
+console.log(ansi.colors.green.open);
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/index.js
new file mode 100644
index 0000000000..ac6572cabe
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/index.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
+
+module.exports = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ return str.replace(matchOperatorsRe, '\\$&');
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/license b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json
new file mode 100644
index 0000000000..1564c1d000
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "escape-string-regexp",
+ "version": "1.0.3",
+ "description": "Escape RegExp special characters",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sindresorhus/escape-string-regexp"
+ },
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ }
+ ],
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "regex",
+ "regexp",
+ "re",
+ "regular",
+ "expression",
+ "escape",
+ "string",
+ "str",
+ "special",
+ "characters"
+ ],
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "gitHead": "1e446e6b4449b5f1f8868cd31bf8fd25ee37fb4b",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/escape-string-regexp/issues"
+ },
+ "homepage": "https://github.com/sindresorhus/escape-string-regexp",
+ "_id": "escape-string-regexp@1.0.3",
+ "_shasum": "9e2d8b25bc2555c3336723750e03f099c2735bb5",
+ "_from": "escape-string-regexp@>=1.0.2 <2.0.0",
+ "_npmVersion": "2.1.16",
+ "_nodeVersion": "0.10.35",
+ "_npmUser": {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ },
+ "dist": {
+ "shasum": "9e2d8b25bc2555c3336723750e03f099c2735bb5",
+ "tarball": "http://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/readme.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/readme.md
new file mode 100644
index 0000000000..808a963a86
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/readme.md
@@ -0,0 +1,27 @@
+# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)
+
+> Escape RegExp special characters
+
+
+## Install
+
+```sh
+$ npm install --save escape-string-regexp
+```
+
+
+## Usage
+
+```js
+var escapeStringRegexp = require('escape-string-regexp');
+
+var escapedString = escapeStringRegexp('how much $ for a unicorn?');
+//=> how much \$ for a unicorn\?
+
+new RegExp(escapedString);
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/cli.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/cli.js
new file mode 100755
index 0000000000..0386a82423
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/cli.js
@@ -0,0 +1,45 @@
+#!/usr/bin/env node
+'use strict';
+var stdin = require('get-stdin');
+var pkg = require('./package.json');
+var hasAnsi = require('./');
+var argv = process.argv.slice(2);
+var input = argv[0];
+
+function help() {
+ console.log([
+ '',
+ ' ' + pkg.description,
+ '',
+ ' Usage',
+ ' has-ansi <string>',
+ ' echo <string> | has-ansi',
+ '',
+ ' Exits with code 0 if input has ANSI escape codes and 1 if not'
+ ].join('\n'));
+}
+
+function init(data) {
+ process.exit(hasAnsi(data) ? 0 : 1);
+}
+
+if (argv.indexOf('--help') !== -1) {
+ help();
+ return;
+}
+
+if (argv.indexOf('--version') !== -1) {
+ console.log(pkg.version);
+ return;
+}
+
+if (process.stdin.isTTY) {
+ if (!input) {
+ help();
+ return;
+ }
+
+ init(input);
+} else {
+ stdin(init);
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/index.js
new file mode 100644
index 0000000000..98fae06767
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/index.js
@@ -0,0 +1,4 @@
+'use strict';
+var ansiRegex = require('ansi-regex');
+var re = new RegExp(ansiRegex().source); // remove the `g` flag
+module.exports = re.test.bind(re);
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/license b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js
new file mode 100644
index 0000000000..0f1aeb3df4
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js
@@ -0,0 +1,49 @@
+'use strict';
+
+module.exports = function (cb) {
+ var stdin = process.stdin;
+ var ret = '';
+
+ if (stdin.isTTY) {
+ setImmediate(cb, '');
+ return;
+ }
+
+ stdin.setEncoding('utf8');
+
+ stdin.on('readable', function () {
+ var chunk;
+
+ while (chunk = stdin.read()) {
+ ret += chunk;
+ }
+ });
+
+ stdin.on('end', function () {
+ cb(ret);
+ });
+};
+
+module.exports.buffer = function (cb) {
+ var stdin = process.stdin;
+ var ret = [];
+ var len = 0;
+
+ if (stdin.isTTY) {
+ setImmediate(cb, new Buffer(''));
+ return;
+ }
+
+ stdin.on('readable', function () {
+ var chunk;
+
+ while (chunk = stdin.read()) {
+ ret.push(chunk);
+ len += chunk.length;
+ }
+ });
+
+ stdin.on('end', function () {
+ cb(Buffer.concat(ret, len));
+ });
+};
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json
new file mode 100644
index 0000000000..5ee9b6775b
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "get-stdin",
+ "version": "4.0.1",
+ "description": "Easier stdin",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sindresorhus/get-stdin"
+ },
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "node test.js && node test-buffer.js && echo unicorns | node test-real.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "std",
+ "stdin",
+ "stdio",
+ "concat",
+ "buffer",
+ "stream",
+ "process",
+ "stream"
+ ],
+ "devDependencies": {
+ "ava": "0.0.4",
+ "buffer-equal": "0.0.1"
+ },
+ "gitHead": "65c744975229b25d6cc5c7546f49b6ad9099553f",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/get-stdin/issues"
+ },
+ "homepage": "https://github.com/sindresorhus/get-stdin",
+ "_id": "get-stdin@4.0.1",
+ "_shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe",
+ "_from": "get-stdin@>=4.0.1 <5.0.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe",
+ "tarball": "http://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md
new file mode 100644
index 0000000000..bc1d32a8ad
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md
@@ -0,0 +1,44 @@
+# get-stdin [![Build Status](https://travis-ci.org/sindresorhus/get-stdin.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stdin)
+
+> Easier stdin
+
+
+## Install
+
+```sh
+$ npm install --save get-stdin
+```
+
+
+## Usage
+
+```js
+// example.js
+var stdin = require('get-stdin');
+
+stdin(function (data) {
+ console.log(data);
+ //=> unicorns
+});
+```
+
+```sh
+$ echo unicorns | node example.js
+unicorns
+```
+
+
+## API
+
+### stdin(callback)
+
+Get `stdin` as a string.
+
+### stdin.buffer(callback)
+
+Get `stdin` as a buffer.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/package.json
new file mode 100644
index 0000000000..ab7f986d52
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/package.json
@@ -0,0 +1,91 @@
+{
+ "name": "has-ansi",
+ "version": "1.0.3",
+ "description": "Check if a string has ANSI escape codes",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sindresorhus/has-ansi"
+ },
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ }
+ ],
+ "bin": {
+ "has-ansi": "cli.js"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js",
+ "cli.js"
+ ],
+ "keywords": [
+ "cli",
+ "bin",
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "string",
+ "tty",
+ "escape",
+ "shell",
+ "xterm",
+ "command-line",
+ "text",
+ "regex",
+ "regexp",
+ "re",
+ "match",
+ "test",
+ "find",
+ "pattern",
+ "has"
+ ],
+ "dependencies": {
+ "ansi-regex": "^1.1.0",
+ "get-stdin": "^4.0.1"
+ },
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "gitHead": "416428ed16f8e9718aec54cea083173af6019917",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/has-ansi/issues"
+ },
+ "homepage": "https://github.com/sindresorhus/has-ansi",
+ "_id": "has-ansi@1.0.3",
+ "_shasum": "c0b5b1615d9e382b0ff67169d967b425e48ca538",
+ "_from": "has-ansi@>=1.0.3 <2.0.0",
+ "_npmVersion": "2.1.16",
+ "_nodeVersion": "0.10.35",
+ "_npmUser": {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ },
+ "dist": {
+ "shasum": "c0b5b1615d9e382b0ff67169d967b425e48ca538",
+ "tarball": "http://registry.npmjs.org/has-ansi/-/has-ansi-1.0.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-1.0.3.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/readme.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/readme.md
new file mode 100644
index 0000000000..0fa149a82a
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/readme.md
@@ -0,0 +1,45 @@
+# has-ansi [![Build Status](https://travis-ci.org/sindresorhus/has-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/has-ansi)
+
+> Check if a string has [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```sh
+$ npm install --save has-ansi
+```
+
+
+## Usage
+
+```js
+var hasAnsi = require('has-ansi');
+
+hasAnsi('\u001b[4mcake\u001b[0m');
+//=> true
+
+hasAnsi('cake');
+//=> false
+```
+
+
+## CLI
+
+```sh
+$ npm install --global has-ansi
+```
+
+```
+$ has-ansi --help
+
+ Usage
+ has-ansi <string>
+ echo <string> | has-ansi
+
+ Exits with code 0 if input has ANSI escape codes and 1 if not
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/cli.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/cli.js
new file mode 100755
index 0000000000..e746987666
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/cli.js
@@ -0,0 +1,29 @@
+#!/usr/bin/env node
+'use strict';
+var pkg = require('./package.json');
+var supportsColor = require('./');
+var argv = process.argv.slice(2);
+
+function help() {
+ console.log([
+ '',
+ ' ' + pkg.description,
+ '',
+ ' Usage',
+ ' supports-color',
+ '',
+ ' Exits with code 0 if color is supported and 1 if not'
+ ].join('\n'));
+}
+
+if (argv.indexOf('--help') !== -1) {
+ help();
+ return;
+}
+
+if (argv.indexOf('--version') !== -1) {
+ console.log(pkg.version);
+ return;
+}
+
+process.exit(supportsColor ? 0 : 1);
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/index.js
new file mode 100644
index 0000000000..a17196485d
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/index.js
@@ -0,0 +1,43 @@
+'use strict';
+var argv = process.argv;
+
+module.exports = (function () {
+ if ('FORCE_COLOR' in process.env) {
+ return true;
+ }
+
+ if (argv.indexOf('--no-color') !== -1 ||
+ argv.indexOf('--no-colors') !== -1 ||
+ argv.indexOf('--color=false') !== -1) {
+ return false;
+ }
+
+ if (argv.indexOf('--color') !== -1 ||
+ argv.indexOf('--colors') !== -1 ||
+ argv.indexOf('--color=true') !== -1 ||
+ argv.indexOf('--color=always') !== -1) {
+ return true;
+ }
+
+ if (process.stdout && !process.stdout.isTTY) {
+ return false;
+ }
+
+ if (process.platform === 'win32') {
+ return true;
+ }
+
+ if ('COLORTERM' in process.env) {
+ return true;
+ }
+
+ if (process.env.TERM === 'dumb') {
+ return false;
+ }
+
+ if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
+ return true;
+ }
+
+ return false;
+})();
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/license b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/package.json
new file mode 100644
index 0000000000..7e3b7e63c0
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "supports-color",
+ "version": "1.3.1",
+ "description": "Detect whether a terminal supports color",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sindresorhus/supports-color"
+ },
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ }
+ ],
+ "bin": {
+ "supports-color": "cli.js"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js",
+ "cli.js"
+ ],
+ "keywords": [
+ "cli",
+ "bin",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "ansi",
+ "styles",
+ "tty",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "support",
+ "supports",
+ "capability",
+ "detect"
+ ],
+ "devDependencies": {
+ "mocha": "*",
+ "require-uncached": "^1.0.2"
+ },
+ "gitHead": "09f1b4c336cee7269b4c8b3a8880054a23fcb35e",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/supports-color/issues"
+ },
+ "homepage": "https://github.com/sindresorhus/supports-color",
+ "_id": "supports-color@1.3.1",
+ "_shasum": "15758df09d8ff3b4acc307539fabe27095e1042d",
+ "_from": "supports-color@>=1.3.0 <2.0.0",
+ "_npmVersion": "2.5.1",
+ "_nodeVersion": "0.12.0",
+ "_npmUser": {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ "dist": {
+ "shasum": "15758df09d8ff3b4acc307539fabe27095e1042d",
+ "tarball": "http://registry.npmjs.org/supports-color/-/supports-color-1.3.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.3.1.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/readme.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/readme.md
new file mode 100644
index 0000000000..fe6016f9d0
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/readme.md
@@ -0,0 +1,46 @@
+# supports-color [![Build Status](https://travis-ci.org/sindresorhus/supports-color.svg?branch=master)](https://travis-ci.org/sindresorhus/supports-color)
+
+> Detect whether a terminal supports color
+
+
+## Install
+
+```
+$ npm install --save supports-color
+```
+
+
+## Usage
+
+```js
+var supportsColor = require('supports-color');
+
+if (supportsColor) {
+ console.log('Terminal supports color');
+}
+```
+
+It obeys the `--color` and `--no-color` CLI flags.
+
+For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
+
+
+## CLI
+
+```
+$ npm install --global supports-color
+```
+
+```
+$ supports-color --help
+
+ Usage
+ supports-color
+
+ Exits with code 0 if color is supported and 1 if not
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/package.json
new file mode 100644
index 0000000000..7f2ca55b62
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/package.json
@@ -0,0 +1,82 @@
+{
+ "name": "chalk",
+ "version": "1.0.0",
+ "description": "Terminal string styling done right. Much color.",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sindresorhus/chalk"
+ },
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ }
+ ],
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha",
+ "bench": "matcha benchmark.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "ansi",
+ "styles",
+ "tty",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "dependencies": {
+ "ansi-styles": "^2.0.1",
+ "escape-string-regexp": "^1.0.2",
+ "has-ansi": "^1.0.3",
+ "strip-ansi": "^2.0.1",
+ "supports-color": "^1.3.0"
+ },
+ "devDependencies": {
+ "matcha": "^0.6.0",
+ "mocha": "*"
+ },
+ "gitHead": "8864d3563313ed15574a38dd5c9d5966080c46ce",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/chalk/issues"
+ },
+ "homepage": "https://github.com/sindresorhus/chalk",
+ "_id": "chalk@1.0.0",
+ "_shasum": "b3cf4ed0ff5397c99c75b8f679db2f52831f96dc",
+ "_from": "chalk@>=1.0.0 <2.0.0",
+ "_npmVersion": "2.5.1",
+ "_nodeVersion": "0.12.0",
+ "_npmUser": {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ "dist": {
+ "shasum": "b3cf4ed0ff5397c99c75b8f679db2f52831f96dc",
+ "tarball": "http://registry.npmjs.org/chalk/-/chalk-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.0.0.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/readme.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/readme.md
new file mode 100644
index 0000000000..43c7064335
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/readme.md
@@ -0,0 +1,197 @@
+<h1 align="center">
+ <br>
+ <img width="360" src="https://cdn.rawgit.com/sindresorhus/chalk/19935d6484811c5e468817f846b7b3d417d7bf4a/logo.svg" alt="chalk">
+ <br>
+ <br>
+</h1>
+
+> Terminal string styling done right
+
+[![Build Status](https://travis-ci.org/sindresorhus/chalk.svg?branch=master)](https://travis-ci.org/sindresorhus/chalk) [![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg?style=flat)](https://www.youtube.com/watch?v=Sm368W0OsHo)
+
+[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.
+
+**Chalk is a clean and focused alternative.**
+
+![screenshot](https://github.com/sindresorhus/ansi-styles/raw/master/screenshot.png)
+
+
+## Why
+
+- Highly performant
+- Doesn't extend `String.prototype`
+- Expressive API
+- Ability to nest styles
+- Clean and focused
+- Auto-detects color support
+- Actively maintained
+- [Used by ~3000 modules](https://www.npmjs.com/browse/depended/chalk)
+
+
+## Install
+
+```
+$ npm install --save chalk
+```
+
+
+## Usage
+
+Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
+
+```js
+var chalk = require('chalk');
+
+// style a string
+chalk.blue('Hello world!');
+
+// combine styled and normal strings
+chalk.blue('Hello') + 'World' + chalk.red('!');
+
+// compose multiple styles using the chainable API
+chalk.blue.bgRed.bold('Hello world!');
+
+// pass in multiple arguments
+chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz');
+
+// nest styles
+chalk.red('Hello', chalk.underline.bgBlue('world') + '!');
+
+// nest styles of the same type even (color, underline, background)
+chalk.green(
+ 'I am a green line ' +
+ chalk.blue.underline.bold('with a blue substring') +
+ ' that becomes green again!'
+);
+```
+
+Easily define your own themes.
+
+```js
+var chalk = require('chalk');
+var error = chalk.bold.red;
+console.log(error('Error!'));
+```
+
+Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data).
+
+```js
+var name = 'Sindre';
+console.log(chalk.green('Hello %s'), name);
+//=> Hello Sindre
+```
+
+
+## API
+
+### chalk.`<style>[.<style>...](string, [string...])`
+
+Example: `chalk.red.bold.underline('Hello', 'world');`
+
+Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `Chalk.red.yellow.green` is equivalent to `Chalk.green`.
+
+Multiple arguments will be separated by space.
+
+### chalk.enabled
+
+Color support is automatically detected, but you can override it by setting the `enabled` property. You should however only do this in your own code as it applies globally to all chalk consumers.
+
+If you need to change this in a reusable module create a new instance:
+
+```js
+var ctx = new chalk.constructor({enabled: false});
+```
+
+### chalk.supportsColor
+
+Detect whether the terminal [supports color](https://github.com/sindresorhus/supports-color). Used internally and handled for you, but exposed for convenience.
+
+Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
+
+### chalk.styles
+
+Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).
+
+Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with your own.
+
+```js
+var chalk = require('chalk');
+
+console.log(chalk.styles.red);
+//=> {open: '\u001b[31m', close: '\u001b[39m'}
+
+console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);
+```
+
+### chalk.hasColor(string)
+
+Check whether a string [has color](https://github.com/sindresorhus/has-ansi).
+
+### chalk.stripColor(string)
+
+[Strip color](https://github.com/sindresorhus/strip-ansi) from a string.
+
+Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.
+
+Example:
+
+```js
+var chalk = require('chalk');
+var styledString = getText();
+
+if (!chalk.supportsColor) {
+ styledString = chalk.stripColor(styledString);
+}
+```
+
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(not widely supported)*
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue` *(on Windows the bright version is used as normal blue is illegible)*
+- `magenta`
+- `cyan`
+- `white`
+- `gray`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+
+
+## 256-colors
+
+Chalk does not support support anything other than the base eight colors, which guarantees it will work on all terminals and systems. Some terminals, specifically `xterm` compliant ones, will support the full range of 8-bit colors. For this the lower level [ansi-256-colors](https://github.com/jbnicolai/ansi-256-colors) package can be used.
+
+
+## Windows
+
+If you're on Windows, do yourself a favor and use [`cmder`](http://bliker.github.io/cmder/) instead of `cmd.exe`.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/History.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/History.md
new file mode 100644
index 0000000000..3a69559eda
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/History.md
@@ -0,0 +1,239 @@
+
+2.7.1 / 2015-03-11
+==================
+
+ * Revert #347 (fix collisions when option and first arg have same name) which causes a bug in #367.
+
+2.7.0 / 2015-03-09
+==================
+
+ * Fix git-style bug when installed globally. Close #335 #349 @zhiyelee
+ * Fix collisions when option and first arg have same name. Close #346 #347 @tonylukasavage
+ * Add support for camelCase on `opts()`. Close #353 @nkzawa
+ * Add node.js 0.12 and io.js to travis.yml
+ * Allow RegEx options. #337 @palanik
+ * Fixes exit code when sub-command failing. Close #260 #332 @pirelenito
+ * git-style `bin` files in $PATH make sense. Close #196 #327 @zhiyelee
+
+2.6.0 / 2014-12-30
+==================
+
+ * added `Command#allowUnknownOption` method. Close #138 #318 @doozr @zhiyelee
+ * Add application description to the help msg. Close #112 @dalssoft
+
+2.5.1 / 2014-12-15
+==================
+
+ * fixed two bugs incurred by variadic arguments. Close #291 @Quentin01 #302 @zhiyelee
+
+2.5.0 / 2014-10-24
+==================
+
+ * add support for variadic arguments. Closes #277 @whitlockjc
+
+2.4.0 / 2014-10-17
+==================
+
+ * fixed a bug on executing the coercion function of subcommands option. Closes #270
+ * added `Command.prototype.name` to retrieve command name. Closes #264 #266 @tonylukasavage
+ * added `Command.prototype.opts` to retrieve all the options as a simple object of key-value pairs. Closes #262 @tonylukasavage
+ * fixed a bug on subcommand name. Closes #248 @jonathandelgado
+ * fixed function normalize doesn’t honor option terminator. Closes #216 @abbr
+
+2.3.0 / 2014-07-16
+==================
+
+ * add command alias'. Closes PR #210
+ * fix: Typos. Closes #99
+ * fix: Unused fs module. Closes #217
+
+2.2.0 / 2014-03-29
+==================
+
+ * add passing of previous option value
+ * fix: support subcommands on windows. Closes #142
+ * Now the defaultValue passed as the second argument of the coercion function.
+
+2.1.0 / 2013-11-21
+==================
+
+ * add: allow cflag style option params, unit test, fixes #174
+
+2.0.0 / 2013-07-18
+==================
+
+ * remove input methods (.prompt, .confirm, etc)
+
+1.3.2 / 2013-07-18
+==================
+
+ * add support for sub-commands to co-exist with the original command
+
+1.3.1 / 2013-07-18
+==================
+
+ * add quick .runningCommand hack so you can opt-out of other logic when running a sub command
+
+1.3.0 / 2013-07-09
+==================
+
+ * add EACCES error handling
+ * fix sub-command --help
+
+1.2.0 / 2013-06-13
+==================
+
+ * allow "-" hyphen as an option argument
+ * support for RegExp coercion
+
+1.1.1 / 2012-11-20
+==================
+
+ * add more sub-command padding
+ * fix .usage() when args are present. Closes #106
+
+1.1.0 / 2012-11-16
+==================
+
+ * add git-style executable subcommand support. Closes #94
+
+1.0.5 / 2012-10-09
+==================
+
+ * fix `--name` clobbering. Closes #92
+ * fix examples/help. Closes #89
+
+1.0.4 / 2012-09-03
+==================
+
+ * add `outputHelp()` method.
+
+1.0.3 / 2012-08-30
+==================
+
+ * remove invalid .version() defaulting
+
+1.0.2 / 2012-08-24
+==================
+
+ * add `--foo=bar` support [arv]
+ * fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus]
+
+1.0.1 / 2012-08-03
+==================
+
+ * fix issue #56
+ * fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode())
+
+1.0.0 / 2012-07-05
+==================
+
+ * add support for optional option descriptions
+ * add defaulting of `.version()` to package.json's version
+
+0.6.1 / 2012-06-01
+==================
+
+ * Added: append (yes or no) on confirmation
+ * Added: allow node.js v0.7.x
+
+0.6.0 / 2012-04-10
+==================
+
+ * Added `.prompt(obj, callback)` support. Closes #49
+ * Added default support to .choose(). Closes #41
+ * Fixed the choice example
+
+0.5.1 / 2011-12-20
+==================
+
+ * Fixed `password()` for recent nodes. Closes #36
+
+0.5.0 / 2011-12-04
+==================
+
+ * Added sub-command option support [itay]
+
+0.4.3 / 2011-12-04
+==================
+
+ * Fixed custom help ordering. Closes #32
+
+0.4.2 / 2011-11-24
+==================
+
+ * Added travis support
+ * Fixed: line-buffered input automatically trimmed. Closes #31
+
+0.4.1 / 2011-11-18
+==================
+
+ * Removed listening for "close" on --help
+
+0.4.0 / 2011-11-15
+==================
+
+ * Added support for `--`. Closes #24
+
+0.3.3 / 2011-11-14
+==================
+
+ * Fixed: wait for close event when writing help info [Jerry Hamlet]
+
+0.3.2 / 2011-11-01
+==================
+
+ * Fixed long flag definitions with values [felixge]
+
+0.3.1 / 2011-10-31
+==================
+
+ * Changed `--version` short flag to `-V` from `-v`
+ * Changed `.version()` so it's configurable [felixge]
+
+0.3.0 / 2011-10-31
+==================
+
+ * Added support for long flags only. Closes #18
+
+0.2.1 / 2011-10-24
+==================
+
+ * "node": ">= 0.4.x < 0.7.0". Closes #20
+
+0.2.0 / 2011-09-26
+==================
+
+ * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs]
+
+0.1.0 / 2011-08-24
+==================
+
+ * Added support for custom `--help` output
+
+0.0.5 / 2011-08-18
+==================
+
+ * Changed: when the user enters nothing prompt for password again
+ * Fixed issue with passwords beginning with numbers [NuckChorris]
+
+0.0.4 / 2011-08-15
+==================
+
+ * Fixed `Commander#args`
+
+0.0.3 / 2011-08-15
+==================
+
+ * Added default option value support
+
+0.0.2 / 2011-08-15
+==================
+
+ * Added mask support to `Command#password(str[, mask], fn)`
+ * Added `Command#password(str, fn)`
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/LICENSE b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/LICENSE
new file mode 100644
index 0000000000..10f997ab10
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/Readme.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/Readme.md
new file mode 100644
index 0000000000..4e091d2ab4
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/Readme.md
@@ -0,0 +1,311 @@
+# Commander.js
+
+
+[![Build Status](https://api.travis-ci.org/tj/commander.js.svg)](http://travis-ci.org/tj/commander.js)
+[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander)
+[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://www.npmjs.org/package/commander)
+[![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+ The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/tj/commander).
+ [API documentation](http://tj.github.com/commander.js/)
+
+
+## Installation
+
+ $ npm install commander
+
+## Option parsing
+
+ Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.
+
+```js
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .option('-p, --peppers', 'Add peppers')
+ .option('-P, --pineapple', 'Add pineapple')
+ .option('-b, --bbq', 'Add bbq sauce')
+ .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')
+ .parse(process.argv);
+
+console.log('you ordered a pizza with:');
+if (program.peppers) console.log(' - peppers');
+if (program.pineapple) console.log(' - pineapple');
+if (program.bbq) console.log(' - bbq');
+console.log(' - %s cheese', program.cheese);
+```
+
+ Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc.
+
+
+## Coercion
+
+```js
+function range(val) {
+ return val.split('..').map(Number);
+}
+
+function list(val) {
+ return val.split(',');
+}
+
+function collect(val, memo) {
+ memo.push(val);
+ return memo;
+}
+
+function increaseVerbosity(v, total) {
+ return total + 1;
+}
+
+program
+ .version('0.0.1')
+ .usage('[options] <file ...>')
+ .option('-i, --integer <n>', 'An integer argument', parseInt)
+ .option('-f, --float <n>', 'A float argument', parseFloat)
+ .option('-r, --range <a>..<b>', 'A range', range)
+ .option('-l, --list <items>', 'A list', list)
+ .option('-o, --optional [value]', 'An optional value')
+ .option('-c, --collect [value]', 'A repeatable value', collect, [])
+ .option('-v, --verbose', 'A value that can be increased', increaseVerbosity, 0)
+ .parse(process.argv);
+
+console.log(' int: %j', program.integer);
+console.log(' float: %j', program.float);
+console.log(' optional: %j', program.optional);
+program.range = program.range || [];
+console.log(' range: %j..%j', program.range[0], program.range[1]);
+console.log(' list: %j', program.list);
+console.log(' collect: %j', program.collect);
+console.log(' verbosity: %j', program.verbose);
+console.log(' args: %j', program.args);
+```
+
+## Regular Expression
+```js
+program
+ .version('0.0.1')
+ .option('-s --size <size>', 'Pizza size', /^(large|medium|small)$/i, 'medium')
+ .option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i)
+ .parse(process.argv);
+
+console.log(' size: %j', program.size);
+console.log(' drink: %j', program.drink);
+```
+
+## Variadic arguments
+
+ The last argument of a command can be variadic, and only the last argument. To make an argument variadic you have to
+ append `...` to the argument name. Here is an example:
+
+```js
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .command('rmdir <dir> [otherDirs...]')
+ .action(function (dir, otherDirs) {
+ console.log('rmdir %s', dir);
+ if (otherDirs) {
+ otherDirs.forEach(function (oDir) {
+ console.log('rmdir %s', oDir);
+ });
+ }
+ });
+
+program.parse(process.argv);
+```
+
+ An `Array` is used for the value of a variadic argument. This applies to `program.args` as well as the argument passed
+ to your action as demonstrated above.
+
+## Git-style sub-commands
+
+```js
+// file: ./examples/pm
+var program = require('..');
+
+program
+ .version('0.0.1')
+ .command('install [name]', 'install one or more packages')
+ .command('search [query]', 'search with optional query')
+ .command('list', 'list packages installed')
+ .parse(process.argv);
+```
+
+When `.command()` is invoked with a description argument, no `.action(callback)` should be called to handle sub-commands, otherwise there will be an error. This tells commander that you're going to use separate executables for sub-commands, much like `git(1)` and other popular tools.
+The commander will try to search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-command`, like `pm-install`, `pm-search`.
+
+If the program is designed to installed globally, make sure the executables have proper modes, like `755`.
+
+## Automated --help
+
+ The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:
+
+```
+ $ ./examples/pizza --help
+
+ Usage: pizza [options]
+
+ An application for pizzas ordering
+
+ Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+ -p, --peppers Add peppers
+ -P, --pineapple Add pineapple
+ -b, --bbq Add bbq sauce
+ -c, --cheese <type> Add the specified type of cheese [marble]
+ -C, --no-cheese You do not want any cheese
+
+```
+
+## Custom help
+
+ You can display arbitrary `-h, --help` information
+ by listening for "--help". Commander will automatically
+ exit once you are done so that the remainder of your program
+ does not execute causing undesired behaviours, for example
+ in the following executable "stuff" will not output when
+ `--help` is used.
+
+```js
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .option('-f, --foo', 'enable some foo')
+ .option('-b, --bar', 'enable some bar')
+ .option('-B, --baz', 'enable some baz');
+
+// must be before .parse() since
+// node's emit() is immediate
+
+program.on('--help', function(){
+ console.log(' Examples:');
+ console.log('');
+ console.log(' $ custom-help --help');
+ console.log(' $ custom-help -h');
+ console.log('');
+});
+
+program.parse(process.argv);
+
+console.log('stuff');
+```
+
+Yields the following help output when `node script-name.js -h` or `node script-name.js --help` are run:
+
+```
+
+Usage: custom-help [options]
+
+Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+ -f, --foo enable some foo
+ -b, --bar enable some bar
+ -B, --baz enable some baz
+
+Examples:
+
+ $ custom-help --help
+ $ custom-help -h
+
+```
+
+## .outputHelp()
+
+Output help information without exiting.
+
+If you want to display help by default (e.g. if no command was provided), you can use something like:
+
+```js
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .command('getstream [url]', 'get stream URL')
+ .parse(process.argv);
+
+ if (!process.argv.slice(2).length) {
+ program.outputHelp();
+ }
+```
+
+## .help()
+
+ Output help information and exit immediately.
+
+## Examples
+
+```js
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .option('-C, --chdir <path>', 'change the working directory')
+ .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')
+ .option('-T, --no-tests', 'ignore test hook')
+
+program
+ .command('setup [env]')
+ .description('run setup commands for all envs')
+ .option("-s, --setup_mode [mode]", "Which setup mode to use")
+ .action(function(env, options){
+ var mode = options.setup_mode || "normal";
+ env = env || 'all';
+ console.log('setup for %s env(s) with %s mode', env, mode);
+ });
+
+program
+ .command('exec <cmd>')
+ .alias('ex')
+ .description('execute the given remote cmd')
+ .option("-e, --exec_mode <mode>", "Which exec mode to use")
+ .action(function(cmd, options){
+ console.log('exec "%s" using %s mode', cmd, options.exec_mode);
+ }).on('--help', function() {
+ console.log(' Examples:');
+ console.log();
+ console.log(' $ deploy exec sequential');
+ console.log(' $ deploy exec async');
+ console.log();
+ });
+
+program
+ .command('*')
+ .action(function(env){
+ console.log('deploying "%s"', env);
+ });
+
+program.parse(process.argv);
+```
+
+More Demos can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory.
+
+## License
+
+MIT
+
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/index.js
new file mode 100644
index 0000000000..1abf4df9d5
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/index.js
@@ -0,0 +1,1051 @@
+
+/**
+ * Module dependencies.
+ */
+
+var EventEmitter = require('events').EventEmitter;
+var spawn = require('child_process').spawn;
+var readlink = require('graceful-readlink').readlinkSync;
+var path = require('path');
+var dirname = path.dirname;
+var basename = path.basename;
+var fs = require('fs');
+
+/**
+ * Expose the root command.
+ */
+
+exports = module.exports = new Command();
+
+/**
+ * Expose `Command`.
+ */
+
+exports.Command = Command;
+
+/**
+ * Expose `Option`.
+ */
+
+exports.Option = Option;
+
+/**
+ * Initialize a new `Option` with the given `flags` and `description`.
+ *
+ * @param {String} flags
+ * @param {String} description
+ * @api public
+ */
+
+function Option(flags, description) {
+ this.flags = flags;
+ this.required = ~flags.indexOf('<');
+ this.optional = ~flags.indexOf('[');
+ this.bool = !~flags.indexOf('-no-');
+ flags = flags.split(/[ ,|]+/);
+ if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift();
+ this.long = flags.shift();
+ this.description = description || '';
+}
+
+/**
+ * Return option name.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Option.prototype.name = function() {
+ return this.long
+ .replace('--', '')
+ .replace('no-', '');
+};
+
+/**
+ * Check if `arg` matches the short or long flag.
+ *
+ * @param {String} arg
+ * @return {Boolean}
+ * @api private
+ */
+
+Option.prototype.is = function(arg) {
+ return arg == this.short || arg == this.long;
+};
+
+/**
+ * Initialize a new `Command`.
+ *
+ * @param {String} name
+ * @api public
+ */
+
+function Command(name) {
+ this.commands = [];
+ this.options = [];
+ this._execs = [];
+ this._allowUnknownOption = false;
+ this._args = [];
+ this._name = name;
+}
+
+/**
+ * Inherit from `EventEmitter.prototype`.
+ */
+
+Command.prototype.__proto__ = EventEmitter.prototype;
+
+/**
+ * Add command `name`.
+ *
+ * The `.action()` callback is invoked when the
+ * command `name` is specified via __ARGV__,
+ * and the remaining arguments are applied to the
+ * function for access.
+ *
+ * When the `name` is "*" an un-matched command
+ * will be passed as the first arg, followed by
+ * the rest of __ARGV__ remaining.
+ *
+ * Examples:
+ *
+ * program
+ * .version('0.0.1')
+ * .option('-C, --chdir <path>', 'change the working directory')
+ * .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')
+ * .option('-T, --no-tests', 'ignore test hook')
+ *
+ * program
+ * .command('setup')
+ * .description('run remote setup commands')
+ * .action(function() {
+ * console.log('setup');
+ * });
+ *
+ * program
+ * .command('exec <cmd>')
+ * .description('run the given remote command')
+ * .action(function(cmd) {
+ * console.log('exec "%s"', cmd);
+ * });
+ *
+ * program
+ * .command('teardown <dir> [otherDirs...]')
+ * .description('run teardown commands')
+ * .action(function(dir, otherDirs) {
+ * console.log('dir "%s"', dir);
+ * if (otherDirs) {
+ * otherDirs.forEach(function (oDir) {
+ * console.log('dir "%s"', oDir);
+ * });
+ * }
+ * });
+ *
+ * program
+ * .command('*')
+ * .description('deploy the given env')
+ * .action(function(env) {
+ * console.log('deploying "%s"', env);
+ * });
+ *
+ * program.parse(process.argv);
+ *
+ * @param {String} name
+ * @param {String} [desc] for git-style sub-commands
+ * @return {Command} the new command
+ * @api public
+ */
+
+Command.prototype.command = function(name, desc) {
+ var args = name.split(/ +/);
+ var cmd = new Command(args.shift());
+
+ if (desc) {
+ cmd.description(desc);
+ this.executables = true;
+ this._execs[cmd._name] = true;
+ }
+
+ this.commands.push(cmd);
+ cmd.parseExpectedArgs(args);
+ cmd.parent = this;
+
+ if (desc) return this;
+ return cmd;
+};
+
+/**
+ * Add an implicit `help [cmd]` subcommand
+ * which invokes `--help` for the given command.
+ *
+ * @api private
+ */
+
+Command.prototype.addImplicitHelpCommand = function() {
+ this.command('help [cmd]', 'display help for [cmd]');
+};
+
+/**
+ * Parse expected `args`.
+ *
+ * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`.
+ *
+ * @param {Array} args
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.parseExpectedArgs = function(args) {
+ if (!args.length) return;
+ var self = this;
+ args.forEach(function(arg) {
+ var argDetails = {
+ required: false,
+ name: '',
+ variadic: false
+ };
+
+ switch (arg[0]) {
+ case '<':
+ argDetails.required = true;
+ argDetails.name = arg.slice(1, -1);
+ break;
+ case '[':
+ argDetails.name = arg.slice(1, -1);
+ break;
+ }
+
+ if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') {
+ argDetails.variadic = true;
+ argDetails.name = argDetails.name.slice(0, -3);
+ }
+ if (argDetails.name) {
+ self._args.push(argDetails);
+ }
+ });
+ return this;
+};
+
+/**
+ * Register callback `fn` for the command.
+ *
+ * Examples:
+ *
+ * program
+ * .command('help')
+ * .description('display verbose help')
+ * .action(function() {
+ * // output help here
+ * });
+ *
+ * @param {Function} fn
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.action = function(fn) {
+ var self = this;
+ var listener = function(args, unknown) {
+ // Parse any so-far unknown options
+ args = args || [];
+ unknown = unknown || [];
+
+ var parsed = self.parseOptions(unknown);
+
+ // Output help if necessary
+ outputHelpIfNecessary(self, parsed.unknown);
+
+ // If there are still any unknown options, then we simply
+ // die, unless someone asked for help, in which case we give it
+ // to them, and then we die.
+ if (parsed.unknown.length > 0) {
+ self.unknownOption(parsed.unknown[0]);
+ }
+
+ // Leftover arguments need to be pushed back. Fixes issue #56
+ if (parsed.args.length) args = parsed.args.concat(args);
+
+ self._args.forEach(function(arg, i) {
+ if (arg.required && null == args[i]) {
+ self.missingArgument(arg.name);
+ } else if (arg.variadic) {
+ if (i !== self._args.length - 1) {
+ self.variadicArgNotLast(arg.name);
+ }
+
+ args[i] = args.splice(i);
+ }
+ });
+
+ // Always append ourselves to the end of the arguments,
+ // to make sure we match the number of arguments the user
+ // expects
+ if (self._args.length) {
+ args[self._args.length] = self;
+ } else {
+ args.push(self);
+ }
+
+ fn.apply(self, args);
+ };
+ this.parent.on(this._name, listener);
+ if (this._alias) this.parent.on(this._alias, listener);
+ return this;
+};
+
+/**
+ * Define option with `flags`, `description` and optional
+ * coercion `fn`.
+ *
+ * The `flags` string should contain both the short and long flags,
+ * separated by comma, a pipe or space. The following are all valid
+ * all will output this way when `--help` is used.
+ *
+ * "-p, --pepper"
+ * "-p|--pepper"
+ * "-p --pepper"
+ *
+ * Examples:
+ *
+ * // simple boolean defaulting to false
+ * program.option('-p, --pepper', 'add pepper');
+ *
+ * --pepper
+ * program.pepper
+ * // => Boolean
+ *
+ * // simple boolean defaulting to true
+ * program.option('-C, --no-cheese', 'remove cheese');
+ *
+ * program.cheese
+ * // => true
+ *
+ * --no-cheese
+ * program.cheese
+ * // => false
+ *
+ * // required argument
+ * program.option('-C, --chdir <path>', 'change the working directory');
+ *
+ * --chdir /tmp
+ * program.chdir
+ * // => "/tmp"
+ *
+ * // optional argument
+ * program.option('-c, --cheese [type]', 'add cheese [marble]');
+ *
+ * @param {String} flags
+ * @param {String} description
+ * @param {Function|Mixed} fn or default
+ * @param {Mixed} defaultValue
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.option = function(flags, description, fn, defaultValue) {
+ var self = this
+ , option = new Option(flags, description)
+ , oname = option.name()
+ , name = camelcase(oname);
+
+ // default as 3rd arg
+ if (typeof fn != 'function') {
+ if (fn instanceof RegExp) {
+ var regex = fn;
+ fn = function(val, def) {
+ var m = regex.exec(val);
+ return m ? m[0] : def;
+ }
+ }
+ else {
+ defaultValue = fn;
+ fn = null;
+ }
+ }
+
+ // preassign default value only for --no-*, [optional], or <required>
+ if (false == option.bool || option.optional || option.required) {
+ // when --no-* we make sure default is true
+ if (false == option.bool) defaultValue = true;
+ // preassign only if we have a default
+ if (undefined !== defaultValue) self[name] = defaultValue;
+ }
+
+ // register the option
+ this.options.push(option);
+
+ // when it's passed assign the value
+ // and conditionally invoke the callback
+ this.on(oname, function(val) {
+ // coercion
+ if (null !== val && fn) val = fn(val, undefined === self[name]
+ ? defaultValue
+ : self[name]);
+
+ // unassigned or bool
+ if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) {
+ // if no value, bool true, and we have a default, then use it!
+ if (null == val) {
+ self[name] = option.bool
+ ? defaultValue || true
+ : false;
+ } else {
+ self[name] = val;
+ }
+ } else if (null !== val) {
+ // reassign
+ self[name] = val;
+ }
+ });
+
+ return this;
+};
+
+/**
+ * Allow unknown options on the command line.
+ *
+ * @param {Boolean} arg if `true` or omitted, no error will be thrown
+ * for unknown options.
+ * @api public
+ */
+Command.prototype.allowUnknownOption = function(arg) {
+ this._allowUnknownOption = arguments.length === 0 || arg;
+ return this;
+};
+
+/**
+ * Parse `argv`, settings options and invoking commands when defined.
+ *
+ * @param {Array} argv
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.parse = function(argv) {
+ // implicit help
+ if (this.executables) this.addImplicitHelpCommand();
+
+ // store raw args
+ this.rawArgs = argv;
+
+ // guess name
+ this._name = this._name || basename(argv[1], '.js');
+
+ // process argv
+ var parsed = this.parseOptions(this.normalize(argv.slice(2)));
+ var args = this.args = parsed.args;
+
+ var result = this.parseArgs(this.args, parsed.unknown);
+
+ // executable sub-commands
+ var name = result.args[0];
+ if (this._execs[name] && typeof this._execs[name] != "function") {
+ return this.executeSubCommand(argv, args, parsed.unknown);
+ }
+
+ return result;
+};
+
+/**
+ * Execute a sub-command executable.
+ *
+ * @param {Array} argv
+ * @param {Array} args
+ * @param {Array} unknown
+ * @api private
+ */
+
+Command.prototype.executeSubCommand = function(argv, args, unknown) {
+ args = args.concat(unknown);
+
+ if (!args.length) this.help();
+ if ('help' == args[0] && 1 == args.length) this.help();
+
+ // <cmd> --help
+ if ('help' == args[0]) {
+ args[0] = args[1];
+ args[1] = '--help';
+ }
+
+ // executable
+ var f = argv[1];
+ var link = readlink(f);
+ if (link !== f && link.charAt(0) !== '/') {
+ link = path.join(dirname(f), link)
+ }
+ var dir = dirname(link);
+ var bin = basename(f, '.js') + '-' + args[0];
+
+ // prefer local `./<bin>` to bin in the $PATH
+ var local = path.join(dir, bin);
+ try {
+ // for versions before node v0.8 when there weren't `fs.existsSync`
+ if (fs.statSync(local).isFile()) {
+ bin = local;
+ }
+ } catch (e) {}
+
+ // run it
+ args = args.slice(1);
+
+ var proc;
+ if (process.platform !== 'win32') {
+ proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] });
+ } else {
+ args.unshift(local);
+ proc = spawn(process.execPath, args, { stdio: 'inherit'});
+ }
+
+ proc.on('close', process.exit.bind(process));
+ proc.on('error', function(err) {
+ if (err.code == "ENOENT") {
+ console.error('\n %s(1) does not exist, try --help\n', bin);
+ } else if (err.code == "EACCES") {
+ console.error('\n %s(1) not executable. try chmod or run with root\n', bin);
+ }
+ process.exit(1);
+ });
+
+ this.runningCommand = proc;
+};
+
+/**
+ * Normalize `args`, splitting joined short flags. For example
+ * the arg "-abc" is equivalent to "-a -b -c".
+ * This also normalizes equal sign and splits "--abc=def" into "--abc def".
+ *
+ * @param {Array} args
+ * @return {Array}
+ * @api private
+ */
+
+Command.prototype.normalize = function(args) {
+ var ret = []
+ , arg
+ , lastOpt
+ , index;
+
+ for (var i = 0, len = args.length; i < len; ++i) {
+ arg = args[i];
+ if (i > 0) {
+ lastOpt = this.optionFor(args[i-1]);
+ }
+
+ if (arg === '--') {
+ // Honor option terminator
+ ret = ret.concat(args.slice(i));
+ break;
+ } else if (lastOpt && lastOpt.required) {
+ ret.push(arg);
+ } else if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) {
+ arg.slice(1).split('').forEach(function(c) {
+ ret.push('-' + c);
+ });
+ } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) {
+ ret.push(arg.slice(0, index), arg.slice(index + 1));
+ } else {
+ ret.push(arg);
+ }
+ }
+
+ return ret;
+};
+
+/**
+ * Parse command `args`.
+ *
+ * When listener(s) are available those
+ * callbacks are invoked, otherwise the "*"
+ * event is emitted and those actions are invoked.
+ *
+ * @param {Array} args
+ * @return {Command} for chaining
+ * @api private
+ */
+
+Command.prototype.parseArgs = function(args, unknown) {
+ var name;
+
+ if (args.length) {
+ name = args[0];
+ if (this.listeners(name).length) {
+ this.emit(args.shift(), args, unknown);
+ } else {
+ this.emit('*', args);
+ }
+ } else {
+ outputHelpIfNecessary(this, unknown);
+
+ // If there were no args and we have unknown options,
+ // then they are extraneous and we need to error.
+ if (unknown.length > 0) {
+ this.unknownOption(unknown[0]);
+ }
+ }
+
+ return this;
+};
+
+/**
+ * Return an option matching `arg` if any.
+ *
+ * @param {String} arg
+ * @return {Option}
+ * @api private
+ */
+
+Command.prototype.optionFor = function(arg) {
+ for (var i = 0, len = this.options.length; i < len; ++i) {
+ if (this.options[i].is(arg)) {
+ return this.options[i];
+ }
+ }
+};
+
+/**
+ * Parse options from `argv` returning `argv`
+ * void of these options.
+ *
+ * @param {Array} argv
+ * @return {Array}
+ * @api public
+ */
+
+Command.prototype.parseOptions = function(argv) {
+ var args = []
+ , len = argv.length
+ , literal
+ , option
+ , arg;
+
+ var unknownOptions = [];
+
+ // parse options
+ for (var i = 0; i < len; ++i) {
+ arg = argv[i];
+
+ // literal args after --
+ if ('--' == arg) {
+ literal = true;
+ continue;
+ }
+
+ if (literal) {
+ args.push(arg);
+ continue;
+ }
+
+ // find matching Option
+ option = this.optionFor(arg);
+
+ // option is defined
+ if (option) {
+ // requires arg
+ if (option.required) {
+ arg = argv[++i];
+ if (null == arg) return this.optionMissingArgument(option);
+ this.emit(option.name(), arg);
+ // optional arg
+ } else if (option.optional) {
+ arg = argv[i+1];
+ if (null == arg || ('-' == arg[0] && '-' != arg)) {
+ arg = null;
+ } else {
+ ++i;
+ }
+ this.emit(option.name(), arg);
+ // bool
+ } else {
+ this.emit(option.name());
+ }
+ continue;
+ }
+
+ // looks like an option
+ if (arg.length > 1 && '-' == arg[0]) {
+ unknownOptions.push(arg);
+
+ // If the next argument looks like it might be
+ // an argument for this option, we pass it on.
+ // If it isn't, then it'll simply be ignored
+ if (argv[i+1] && '-' != argv[i+1][0]) {
+ unknownOptions.push(argv[++i]);
+ }
+ continue;
+ }
+
+ // arg
+ args.push(arg);
+ }
+
+ return { args: args, unknown: unknownOptions };
+};
+
+/**
+ * Return an object containing options as key-value pairs
+ *
+ * @return {Object}
+ * @api public
+ */
+Command.prototype.opts = function() {
+ var result = {}
+ , len = this.options.length;
+
+ for (var i = 0 ; i < len; i++) {
+ var key = camelcase(this.options[i].name());
+ result[key] = key === 'version' ? this._version : this[key];
+ }
+ return result;
+};
+
+/**
+ * Argument `name` is missing.
+ *
+ * @param {String} name
+ * @api private
+ */
+
+Command.prototype.missingArgument = function(name) {
+ console.error();
+ console.error(" error: missing required argument `%s'", name);
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * `Option` is missing an argument, but received `flag` or nothing.
+ *
+ * @param {String} option
+ * @param {String} flag
+ * @api private
+ */
+
+Command.prototype.optionMissingArgument = function(option, flag) {
+ console.error();
+ if (flag) {
+ console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag);
+ } else {
+ console.error(" error: option `%s' argument missing", option.flags);
+ }
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * Unknown option `flag`.
+ *
+ * @param {String} flag
+ * @api private
+ */
+
+Command.prototype.unknownOption = function(flag) {
+ if (this._allowUnknownOption) return;
+ console.error();
+ console.error(" error: unknown option `%s'", flag);
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * Variadic argument with `name` is not the last argument as required.
+ *
+ * @param {String} name
+ * @api private
+ */
+
+Command.prototype.variadicArgNotLast = function(name) {
+ console.error();
+ console.error(" error: variadic arguments must be last `%s'", name);
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * Set the program version to `str`.
+ *
+ * This method auto-registers the "-V, --version" flag
+ * which will print the version number when passed.
+ *
+ * @param {String} str
+ * @param {String} flags
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.version = function(str, flags) {
+ if (0 == arguments.length) return this._version;
+ this._version = str;
+ flags = flags || '-V, --version';
+ this.option(flags, 'output the version number');
+ this.on('version', function() {
+ process.stdout.write(str + '\n');
+ process.exit(0);
+ });
+ return this;
+};
+
+/**
+ * Set the description to `str`.
+ *
+ * @param {String} str
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.description = function(str) {
+ if (0 == arguments.length) return this._description;
+ this._description = str;
+ return this;
+};
+
+/**
+ * Set an alias for the command
+ *
+ * @param {String} alias
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.alias = function(alias) {
+ if (0 == arguments.length) return this._alias;
+ this._alias = alias;
+ return this;
+};
+
+/**
+ * Set / get the command usage `str`.
+ *
+ * @param {String} str
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.usage = function(str) {
+ var args = this._args.map(function(arg) {
+ return humanReadableArgName(arg);
+ });
+
+ var usage = '[options]'
+ + (this.commands.length ? ' [command]' : '')
+ + (this._args.length ? ' ' + args.join(' ') : '');
+
+ if (0 == arguments.length) return this._usage || usage;
+ this._usage = str;
+
+ return this;
+};
+
+/**
+ * Get the name of the command
+ *
+ * @param {String} name
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.name = function() {
+ return this._name;
+};
+
+/**
+ * Return the largest option length.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+Command.prototype.largestOptionLength = function() {
+ return this.options.reduce(function(max, option) {
+ return Math.max(max, option.flags.length);
+ }, 0);
+};
+
+/**
+ * Return help for options.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.optionHelp = function() {
+ var width = this.largestOptionLength();
+
+ // Prepend the help information
+ return [pad('-h, --help', width) + ' ' + 'output usage information']
+ .concat(this.options.map(function(option) {
+ return pad(option.flags, width) + ' ' + option.description;
+ }))
+ .join('\n');
+};
+
+/**
+ * Return command help documentation.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.commandHelp = function() {
+ if (!this.commands.length) return '';
+
+ var commands = this.commands.map(function(cmd) {
+ var args = cmd._args.map(function(arg) {
+ return humanReadableArgName(arg);
+ }).join(' ');
+
+ return [
+ cmd._name
+ + (cmd._alias
+ ? '|' + cmd._alias
+ : '')
+ + (cmd.options.length
+ ? ' [options]'
+ : '')
+ + ' ' + args
+ , cmd.description()
+ ];
+ });
+
+ var width = commands.reduce(function(max, command) {
+ return Math.max(max, command[0].length);
+ }, 0);
+
+ return [
+ ''
+ , ' Commands:'
+ , ''
+ , commands.map(function(cmd) {
+ return pad(cmd[0], width) + ' ' + cmd[1];
+ }).join('\n').replace(/^/gm, ' ')
+ , ''
+ ].join('\n');
+};
+
+/**
+ * Return program help documentation.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.helpInformation = function() {
+ var desc = [];
+ if (this._description) {
+ desc = [
+ ' ' + this._description
+ , ''
+ ];
+ }
+
+ var cmdName = this._name;
+ if (this._alias) {
+ cmdName = cmdName + '|' + this._alias;
+ }
+ var usage = [
+ ''
+ ,' Usage: ' + cmdName + ' ' + this.usage()
+ , ''
+ ];
+
+ var cmds = [];
+ var commandHelp = this.commandHelp();
+ if (commandHelp) cmds = [commandHelp];
+
+ var options = [
+ ' Options:'
+ , ''
+ , '' + this.optionHelp().replace(/^/gm, ' ')
+ , ''
+ , ''
+ ];
+
+ return usage
+ .concat(cmds)
+ .concat(desc)
+ .concat(options)
+ .join('\n');
+};
+
+/**
+ * Output help information for this command
+ *
+ * @api public
+ */
+
+Command.prototype.outputHelp = function() {
+ process.stdout.write(this.helpInformation());
+ this.emit('--help');
+};
+
+/**
+ * Output help information and exit.
+ *
+ * @api public
+ */
+
+Command.prototype.help = function() {
+ this.outputHelp();
+ process.exit();
+};
+
+/**
+ * Camel-case the given `flag`
+ *
+ * @param {String} flag
+ * @return {String}
+ * @api private
+ */
+
+function camelcase(flag) {
+ return flag.split('-').reduce(function(str, word) {
+ return str + word[0].toUpperCase() + word.slice(1);
+ });
+}
+
+/**
+ * Pad `str` to `width`.
+ *
+ * @param {String} str
+ * @param {Number} width
+ * @return {String}
+ * @api private
+ */
+
+function pad(str, width) {
+ var len = Math.max(0, width - str.length);
+ return str + Array(len + 1).join(' ');
+}
+
+/**
+ * Output help information if necessary
+ *
+ * @param {Command} command to output help for
+ * @param {Array} array of options to search for -h or --help
+ * @api private
+ */
+
+function outputHelpIfNecessary(cmd, options) {
+ options = options || [];
+ for (var i = 0; i < options.length; i++) {
+ if (options[i] == '--help' || options[i] == '-h') {
+ cmd.outputHelp();
+ process.exit(0);
+ }
+ }
+}
+
+/**
+ * Takes an argument an returns its human readable equivalent for help usage.
+ *
+ * @param {Object} arg
+ * @return {String}
+ * @api private
+ */
+
+function humanReadableArgName(arg) {
+ var nameOutput = arg.name + (arg.variadic === true ? '...' : '');
+
+ return arg.required
+ ? '<' + nameOutput + '>'
+ : '[' + nameOutput + ']'
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/.npmignore b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/.npmignore
new file mode 100644
index 0000000000..3ac7d16c6d
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/.npmignore
@@ -0,0 +1,3 @@
+.idea/
+.DS_Store
+node_modules/
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/.travis.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/.travis.yml
new file mode 100644
index 0000000000..baf9be7f6c
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "io.js"
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/LICENSE b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/LICENSE
new file mode 100644
index 0000000000..d1f842f0bb
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Zhiye Li
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/README.md
new file mode 100644
index 0000000000..fc63b505a5
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/README.md
@@ -0,0 +1,17 @@
+# graceful-readlink
+[![NPM Version](http://img.shields.io/npm/v/graceful-readlink.svg?style=flat)](https://www.npmjs.org/package/graceful-readlink)
+[![NPM Downloads](https://img.shields.io/npm/dm/graceful-readlink.svg?style=flat)](https://www.npmjs.org/package/graceful-readlink)
+
+
+## Usage
+
+```js
+var readlinkSync = require('graceful-readlink').readlinkSync;
+console.log(readlinkSync(f));
+// output
+// the file pointed to when `f` is a symbolic link
+// the `f` itself when `f` is not a symbolic link
+```
+## Licence
+
+MIT License
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/index.js
new file mode 100644
index 0000000000..7e9fc70f0a
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/index.js
@@ -0,0 +1,12 @@
+var fs = require('fs')
+ , lstat = fs.lstatSync;
+
+exports.readlinkSync = function (p) {
+ if (lstat(p).isSymbolicLink()) {
+ return fs.readlinkSync(p);
+ } else {
+ return p;
+ }
+};
+
+
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/package.json
new file mode 100644
index 0000000000..6f38f45aae
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "graceful-readlink",
+ "version": "1.0.1",
+ "description": "graceful fs.readlink",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/zhiyelee/graceful-readlink.git"
+ },
+ "homepage": "https://github.com/zhiyelee/graceful-readlink",
+ "bugs": {
+ "url": "https://github.com/zhiyelee/graceful-readlink/issues"
+ },
+ "keywords": [
+ "fs.readlink",
+ "readlink"
+ ],
+ "author": {
+ "name": "zhiyelee"
+ },
+ "license": "MIT",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "gitHead": "f6655275bebef706fb63fd01b5f062a7052419a5",
+ "_id": "graceful-readlink@1.0.1",
+ "_shasum": "4cafad76bc62f02fa039b2f94e9a3dd3a391a725",
+ "_from": "graceful-readlink@>=1.0.0",
+ "_npmVersion": "2.1.17",
+ "_nodeVersion": "0.11.14",
+ "_npmUser": {
+ "name": "zhiyelee",
+ "email": "zhiyelee@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "zhiyelee",
+ "email": "zhiyelee@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "4cafad76bc62f02fa039b2f94e9a3dd3a391a725",
+ "tarball": "http://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/package.json
new file mode 100644
index 0000000000..25ba0464a7
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/package.json
@@ -0,0 +1,73 @@
+{
+ "name": "commander",
+ "version": "2.7.1",
+ "description": "the complete solution for node.js command-line programs",
+ "keywords": [
+ "command",
+ "option",
+ "parser"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/tj/commander.js.git"
+ },
+ "devDependencies": {
+ "should": ">= 0.0.1"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "main": "index",
+ "engines": {
+ "node": ">= 0.6.x"
+ },
+ "files": [
+ "index.js"
+ ],
+ "dependencies": {
+ "graceful-readlink": ">= 1.0.0"
+ },
+ "gitHead": "103654f8f32c010ad1e62cefc9ab92d7c8d18c8e",
+ "bugs": {
+ "url": "https://github.com/tj/commander.js/issues"
+ },
+ "homepage": "https://github.com/tj/commander.js",
+ "_id": "commander@2.7.1",
+ "_shasum": "5d419a2bbed2c32ee3e4dca9bb45ab83ecc3065a",
+ "_from": "commander@>=2.7.1 <3.0.0",
+ "_npmVersion": "2.1.17",
+ "_nodeVersion": "0.11.14",
+ "_npmUser": {
+ "name": "zhiyelee",
+ "email": "zhiyelee@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "somekittens",
+ "email": "rkoutnik@gmail.com"
+ },
+ {
+ "name": "zhiyelee",
+ "email": "zhiyelee@gmail.com"
+ },
+ {
+ "name": "thethomaseffect",
+ "email": "thethomaseffect@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "5d419a2bbed2c32ee3e4dca9bb45ab83ecc3065a",
+ "tarball": "http://registry.npmjs.org/commander/-/commander-2.7.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/commander/-/commander-2.7.1.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/.npmignore b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/.npmignore
new file mode 100644
index 0000000000..dbb0721ce5
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/.npmignore
@@ -0,0 +1,2 @@
+node_modules
+cosmicrealms.com
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/.travis.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/.travis.yml
new file mode 100644
index 0000000000..6e5919de39
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - "0.10"
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/LICENSE b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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/request/node_modules/har-validator/node_modules/is-my-json-valid/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/README.md
new file mode 100644
index 0000000000..47350d84fa
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/README.md
@@ -0,0 +1,173 @@
+# is-my-json-valid
+
+A [JSONSchema](http://json-schema.org/) validator that uses code generation
+to be extremely fast
+
+```
+npm install is-my-json-valid
+```
+
+It passes the entire JSONSchema v4 test suite except for `remoteRefs` and `maxLength`/`minLength` when using unicode surrogate pairs.
+
+[![build status](http://img.shields.io/travis/mafintosh/is-my-json-valid.svg?style=flat)](http://travis-ci.org/mafintosh/is-my-json-valid)
+
+## Usage
+
+Simply pass a schema to compile it
+
+``` js
+var validator = require('is-my-json-valid')
+
+var validate = validator({
+ required: true,
+ type: 'object',
+ properties: {
+ hello: {
+ required: true,
+ type: 'string'
+ }
+ }
+})
+
+console.log('should be valid', validate({hello: 'world'}))
+console.log('should not be valid', validate({}))
+
+// get the last list of errors by checking validate.errors
+// the following will print [{field: 'data.hello', message: 'is required'}]
+console.log(validate.errors)
+```
+
+You can also pass the schema as a string
+
+``` js
+var validate = validate('{"type": ... }')
+```
+
+Optionally you can use the require submodule to load a schema from `__dirname`
+
+``` js
+var validator = require('is-my-json-valid/require')
+var validate = validator('my-schema.json')
+```
+
+## Custom formats
+
+is-my-json-valid supports the formats specified in JSON schema v4 (such as date-time).
+If you want to add your own custom formats pass them as the formats options to the validator
+
+``` js
+var validate = validator({
+ type: 'string',
+ required: true,
+ format: 'only-a'
+}, {
+ formats: {
+ 'only-a': /^a+$/
+ }
+})
+
+console.log(validate('aa')) // true
+console.log(validate('ab')) // false
+```
+
+## External schemas
+
+You can pass in external schemas that you reference using the `$ref` attribute as the `schemas` option
+
+``` js
+var ext = {
+ required: true,
+ type: 'string'
+}
+
+var schema = {
+ $ref: '#ext' // references another schema called ext
+}
+
+// pass the external schemas as an option
+var validate = validate(schema, {schemas: {ext: ext}})
+
+validate('hello') // returns true
+validate(42) // return false
+```
+
+## Filtering away additional properties
+
+is-my-json-valid supports filtering away properties not in the schema
+
+``` js
+var filter = validator.filter({
+ required: true,
+ type: 'object',
+ properties: {
+ hello: {type: 'string', required: true}
+ },
+ additionalProperties: false
+})
+
+var doc = {hello: 'world', notInSchema: true}
+console.log(filter(doc)) // {hello: 'world'}
+```
+
+## Verbose mode outputs the value on errors
+
+is-my-json-valid outputs the value causing an error when verbose is set to true
+
+``` js
+var validate = validator({
+ required: true,
+ type: 'object',
+ properties: {
+ hello: {
+ required: true,
+ type: 'string'
+ }
+ }
+}, {
+ verbose: true
+})
+
+validate({hello: 100});
+console.log(validate.errors) // {field: 'data.hello', message: 'is the wrong type', value: 100}
+```
+
+## Greedy mode tries to validate as much as possible
+
+By default is-my-json-valid bails on first validation error but when greedy is
+set to true it tries to validate as much as possible:
+
+``` js
+var validate = validator({
+ type: 'object',
+ properties: {
+ x: {
+ type: 'number'
+ }
+ },
+ required: ['x', 'y']
+}, {
+ greedy: true
+});
+
+validate({x: 'string'});
+console.log(validate.errors) // [{field: 'data.y', message: 'is required'},
+ // {field: 'data.x', message: 'is the wrong type'}]
+```
+
+## Performance
+
+is-my-json-valid uses code generation to turn your JSON schema into basic javascript code that is easily optimizeable by v8.
+
+At the time of writing, is-my-json-valid is the __fastest validator__ when running
+
+* [json-schema-benchmark](https://github.com/Muscula/json-schema-benchmark)
+* [cosmicreals.com benchmark](http://cosmicrealms.com/blog/2014/08/29/benchmark-of-node-dot-js-json-validation-modules-part-3/)
+* [jsck benchmark](https://github.com/pandastrike/jsck/issues/72#issuecomment-70992684)
+* [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
+* [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
+
+If you know any other relevant benchmarks open a PR and I'll add them.
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/example.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/example.js
new file mode 100644
index 0000000000..f70f4dfb5c
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/example.js
@@ -0,0 +1,18 @@
+var validator = require('./')
+
+var validate = validator({
+ type: 'object',
+ properties: {
+ hello: {
+ required: true,
+ type: 'string'
+ }
+ }
+})
+
+console.log('should be valid', validate({hello: 'world'}))
+console.log('should not be valid', validate({}))
+
+// get the last error message by checking validate.error
+// the following will print "data.hello is required"
+console.log('the errors were:', validate.errors)
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/formats.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/formats.js
new file mode 100644
index 0000000000..3038daea92
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/formats.js
@@ -0,0 +1,14 @@
+exports['date-time'] = /^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}[tT ]\d{2}:\d{2}:\d{2}(\.\d+)?([zZ]|[+-]\d{2}:\d{2})$/
+exports['date'] = /^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}$/
+exports['time'] = /^\d{2}:\d{2}:\d{2}$/
+exports['email'] = /^\S+@\S+$/
+exports['ip-address'] = exports['ipv4'] = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
+exports['ipv6'] = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/
+exports['uri'] = /^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/
+exports['color'] = /(#?([0-9A-Fa-f]{3,6})\b)|(aqua)|(black)|(blue)|(fuchsia)|(gray)|(green)|(lime)|(maroon)|(navy)|(olive)|(orange)|(purple)|(red)|(silver)|(teal)|(white)|(yellow)|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\))/
+exports['hostname'] = /^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$/
+exports['alpha'] = /^[a-zA-Z]+$/
+exports['alphanumeric'] = /^[a-zA-Z0-9]+$/
+exports['style'] = /\s*(.+?):\s*([^;]+);?/g
+exports['phone'] = /^\+(?:[0-9] ?){6,14}[0-9]$/
+exports['utc-millisec'] = /^[0-9]+(\.?[0-9]+)?$/
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js
new file mode 100644
index 0000000000..445f7db2d6
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js
@@ -0,0 +1,553 @@
+var genobj = require('generate-object-property')
+var genfun = require('generate-function')
+var jsonpointer = require('jsonpointer')
+var xtend = require('xtend')
+var formats = require('./formats')
+
+var get = function(obj, additionalSchemas, ptr) {
+ if (/^https?:\/\//.test(ptr)) return null
+
+ var visit = function(sub) {
+ if (sub && sub.id === ptr) return sub
+ if (typeof sub !== 'object' || !sub) return null
+ return Object.keys(sub).reduce(function(res, k) {
+ return res || visit(sub[k])
+ }, null)
+ }
+
+ var res = visit(obj)
+ if (res) return res
+
+ ptr = ptr.replace(/^#/, '')
+ ptr = ptr.replace(/\/$/, '')
+
+ try {
+ return jsonpointer.get(obj, decodeURI(ptr))
+ } catch (err) {
+ var other = additionalSchemas[ptr] || additionalSchemas[ptr.replace(/^#/, '')]
+ return other || null
+ }
+}
+
+var formatName = function(field) {
+ var pattern = /\[[^\[\]"]+\]/
+ while (pattern.test(field)) field = field.replace(pattern, '.*')
+ return field
+}
+
+var types = {}
+
+types.any = function() {
+ return 'true'
+}
+
+types.null = function(name) {
+ return name+' === null'
+}
+
+types.boolean = function(name) {
+ return 'typeof '+name+' === "boolean"'
+}
+
+types.array = function(name) {
+ return 'Array.isArray('+name+')'
+}
+
+types.object = function(name) {
+ return 'typeof '+name+' === "object" && '+name+' && !Array.isArray('+name+')'
+}
+
+types.number = function(name) {
+ return 'typeof '+name+' === "number"'
+}
+
+types.integer = function(name) {
+ return 'typeof '+name+' === "number" && (Math.floor('+name+') === '+name+' || '+name+' > 9007199254740992 || '+name+' < -9007199254740992)'
+}
+
+types.string = function(name) {
+ return 'typeof '+name+' === "string"'
+}
+
+var unique = function(array) {
+ var list = []
+ for (var i = 0; i < array.length; i++) {
+ list.push(typeof array[i] === 'object' ? JSON.stringify(array[i]) : array[i])
+ }
+ for (var i = 1; i < list.length; i++) {
+ if (list.indexOf(list[i]) !== i) return false
+ }
+ return true
+}
+
+var toType = function(node) {
+ return node.type
+}
+
+var compile = function(schema, cache, root, reporter, opts) {
+ var fmts = opts ? xtend(formats, opts.formats) : formats
+ var scope = {unique:unique, formats:fmts}
+ var verbose = opts ? !!opts.verbose : false;
+ var greedy = opts && opts.greedy !== undefined ?
+ opts.greedy : false;
+
+ var syms = {}
+ var gensym = function(name) {
+ return name+(syms[name] = (syms[name] || 0)+1)
+ }
+
+ var reversePatterns = {}
+ var patterns = function(p) {
+ if (reversePatterns[p]) return reversePatterns[p]
+ var n = gensym('pattern')
+ scope[n] = new RegExp(p)
+ reversePatterns[p] = n
+ return n
+ }
+
+ var vars = ['i','j','k','l','m','n','o','p','q','r','s','t','u','v','x','y','z']
+ var genloop = function() {
+ var v = vars.shift()
+ vars.push(v+v[0])
+ return v
+ }
+
+ var visit = function(name, node, reporter, filter) {
+ var properties = node.properties
+ var type = node.type
+ var tuple = false
+
+ if (Array.isArray(node.items)) { // tuple type
+ properties = {}
+ node.items.forEach(function(item, i) {
+ properties[i] = item
+ })
+ type = 'array'
+ tuple = true
+ }
+
+ var indent = 0
+ var error = function(msg, prop, value) {
+ validate('errors++')
+ if (reporter === true) {
+ validate('if (validate.errors === null) validate.errors = []')
+ if (verbose) {
+ validate('validate.errors.push({field:%s,message:%s,value:%s})', JSON.stringify(formatName(prop || name)), JSON.stringify(msg), value || name)
+ } else {
+ var n = gensym('error')
+ scope[n] = {field:formatName(prop || name), message:msg}
+ validate('validate.errors.push(%s)', n)
+ }
+ }
+ }
+
+ if (node.required === true) {
+ indent++
+ validate('if (%s === undefined) {', name)
+ error('is required')
+ validate('} else {')
+ } else {
+ indent++
+ validate('if (%s !== undefined) {', name)
+ }
+
+ var valid = [].concat(type)
+ .map(function(t) {
+ return types[t || 'any'](name)
+ })
+ .join(' || ') || 'true'
+
+ if (valid !== 'true') {
+ indent++
+ validate('if (!(%s)) {', valid)
+ error('is the wrong type')
+ validate('} else {')
+ }
+
+ if (tuple) {
+ if (node.additionalItems === false) {
+ validate('if (%s.length > %d) {', name, node.items.length)
+ error('has additional items')
+ validate('}')
+ } else if (node.additionalItems) {
+ var i = genloop()
+ validate('for (var %s = %d; %s < %s.length; %s++) {', i, node.items.length, i, name, i)
+ visit(name+'['+i+']', node.additionalItems, reporter, filter)
+ validate('}')
+ }
+ }
+
+ if (node.format && fmts[node.format]) {
+ if (type !== 'string' && formats[node.format]) validate('if (%s) {', types.string(name))
+ var n = gensym('format')
+ scope[n] = fmts[node.format]
+
+ if (typeof scope[n] === 'function') validate('if (!%s(%s)) {', n, name)
+ else validate('if (!%s.test(%s)) {', n, name)
+ error('must be '+node.format+' format')
+ validate('}')
+ if (type !== 'string' && formats[node.format]) validate('}')
+ }
+
+ if (Array.isArray(node.required)) {
+ var isUndefined = function(req) {
+ return genobj(name, req) + ' === undefined'
+ }
+
+ var checkRequired = function (req) {
+ var prop = genobj(name, req);
+ validate('if (%s === undefined) {', prop)
+ error('is required', prop)
+ validate('missing++')
+ validate('}')
+ }
+ validate('if ((%s)) {', type !== 'object' ? types.object(name) : 'true')
+ validate('var missing = 0')
+ node.required.map(checkRequired)
+ validate('}');
+ if (!greedy) {
+ validate('if (missing === 0) {')
+ indent++
+ }
+ }
+
+ if (node.uniqueItems) {
+ if (type !== 'array') validate('if (%s) {', types.array(name))
+ validate('if (!(unique(%s))) {', name)
+ error('must be unique')
+ validate('}')
+ if (type !== 'array') validate('}')
+ }
+
+ if (node.enum) {
+ var complex = node.enum.some(function(e) {
+ return typeof e === 'object'
+ })
+
+ var compare = complex ?
+ function(e) {
+ return 'JSON.stringify('+name+')'+' !== JSON.stringify('+JSON.stringify(e)+')'
+ } :
+ function(e) {
+ return name+' !== '+JSON.stringify(e)
+ }
+
+ validate('if (%s) {', node.enum.map(compare).join(' && ') || 'false')
+ error('must be an enum value')
+ validate('}')
+ }
+
+ if (node.dependencies) {
+ if (type !== 'object') validate('if (%s) {', types.object(name))
+
+ Object.keys(node.dependencies).forEach(function(key) {
+ var deps = node.dependencies[key]
+ if (typeof deps === 'string') deps = [deps]
+
+ var exists = function(k) {
+ return genobj(name, k) + ' !== undefined'
+ }
+
+ if (Array.isArray(deps)) {
+ validate('if (%s !== undefined && !(%s)) {', genobj(name, key), deps.map(exists).join(' && ') || 'true')
+ error('dependencies not set')
+ validate('}')
+ }
+ if (typeof deps === 'object') {
+ validate('if (%s !== undefined) {', genobj(name, key))
+ visit(name, deps, reporter, filter)
+ validate('}')
+ }
+ })
+
+ if (type !== 'object') validate('}')
+ }
+
+ if (node.additionalProperties || node.additionalProperties === false) {
+ if (type !== 'object') validate('if (%s) {', types.object(name))
+
+ var i = genloop()
+ var keys = gensym('keys')
+
+ var toCompare = function(p) {
+ return keys+'['+i+'] !== '+JSON.stringify(p)
+ }
+
+ var toTest = function(p) {
+ return '!'+patterns(p)+'.test('+keys+'['+i+'])'
+ }
+
+ var additionalProp = Object.keys(properties || {}).map(toCompare)
+ .concat(Object.keys(node.patternProperties || {}).map(toTest))
+ .join(' && ') || 'true'
+
+ validate('var %s = Object.keys(%s)', keys, name)
+ ('for (var %s = 0; %s < %s.length; %s++) {', i, i, keys, i)
+ ('if (%s) {', additionalProp)
+
+ if (node.additionalProperties === false) {
+ if (filter) validate('delete %s', name+'['+keys+'['+i+']]')
+ error('has additional properties', null, JSON.stringify(name+'.') + ' + ' + keys + '['+i+']')
+ } else {
+ visit(name+'['+keys+'['+i+']]', node.additionalProperties, reporter, filter)
+ }
+
+ validate
+ ('}')
+ ('}')
+
+ if (type !== 'object') validate('}')
+ }
+
+ if (node.$ref) {
+ var sub = get(root, opts && opts.schemas || {}, node.$ref)
+ if (sub) {
+ var fn = cache[node.$ref]
+ if (!fn) {
+ cache[node.$ref] = function proxy(data) {
+ return fn(data)
+ }
+ fn = compile(sub, cache, root, false, opts)
+ }
+ var n = gensym('ref')
+ scope[n] = fn
+ validate('if (!(%s(%s))) {', n, name)
+ error('referenced schema does not match')
+ validate('}')
+ }
+ }
+
+ if (node.not) {
+ var prev = gensym('prev')
+ validate('var %s = errors', prev)
+ visit(name, node.not, false, filter)
+ validate('if (%s === errors) {', prev)
+ error('negative schema matches')
+ validate('} else {')
+ ('errors = %s', prev)
+ ('}')
+ }
+
+ if (node.items && !tuple) {
+ if (type !== 'array') validate('if (%s) {', types.array(name))
+
+ var i = genloop()
+ validate('for (var %s = 0; %s < %s.length; %s++) {', i, i, name, i)
+ visit(name+'['+i+']', node.items, reporter, filter)
+ validate('}')
+
+ if (type !== 'array') validate('}')
+ }
+
+ if (node.patternProperties) {
+ if (type !== 'object') validate('if (%s) {', types.object(name))
+ var keys = gensym('keys')
+ var i = genloop()
+ validate
+ ('var %s = Object.keys(%s)', keys, name)
+ ('for (var %s = 0; %s < %s.length; %s++) {', i, i, keys, i)
+
+ Object.keys(node.patternProperties).forEach(function(key) {
+ var p = patterns(key)
+ validate('if (%s.test(%s)) {', p, keys+'['+i+']')
+ visit(name+'['+keys+'['+i+']]', node.patternProperties[key], reporter, filter)
+ validate('}')
+ })
+
+ validate('}')
+ if (type !== 'object') validate('}')
+ }
+
+ if (node.pattern) {
+ var p = patterns(node.pattern)
+ if (type !== 'string') validate('if (%s) {', types.string(name))
+ validate('if (!(%s.test(%s))) {', p, name)
+ error('pattern mismatch')
+ validate('}')
+ if (type !== 'string') validate('}')
+ }
+
+ if (node.allOf) {
+ node.allOf.forEach(function(sch) {
+ visit(name, sch, reporter, filter)
+ })
+ }
+
+ if (node.anyOf && node.anyOf.length) {
+ var prev = gensym('prev')
+
+ node.anyOf.forEach(function(sch, i) {
+ if (i === 0) {
+ validate('var %s = errors', prev)
+ } else {
+ validate('if (errors !== %s) {', prev)
+ ('errors = %s', prev)
+ }
+ visit(name, sch, false, false)
+ })
+ node.anyOf.forEach(function(sch, i) {
+ if (i) validate('}')
+ })
+ validate('if (%s !== errors) {', prev)
+ error('no schemas match')
+ validate('}')
+ }
+
+ if (node.oneOf && node.oneOf.length) {
+ var prev = gensym('prev')
+ var passes = gensym('passes')
+
+ validate
+ ('var %s = errors', prev)
+ ('var %s = 0', passes)
+
+ node.oneOf.forEach(function(sch, i) {
+ visit(name, sch, false, false)
+ validate('if (%s === errors) {', prev)
+ ('%s++', passes)
+ ('} else {')
+ ('errors = %s', prev)
+ ('}')
+ })
+
+ validate('if (%s !== 1) {', passes)
+ error('no (or more than one) schemas match')
+ validate('}')
+ }
+
+ if (node.multipleOf !== undefined) {
+ if (type !== 'number' && type !== 'integer') validate('if (%s) {', types.number(name))
+
+ var factor = ((node.multipleOf | 0) !== node.multipleOf) ? Math.pow(10, node.multipleOf.toString().split('.').pop().length) : 1
+ if (factor > 1) validate('if ((%d*%s) % %d) {', factor, name, factor*node.multipleOf)
+ else validate('if (%s % %d) {', name, node.multipleOf)
+
+ error('has a remainder')
+ validate('}')
+
+ if (type !== 'number' && type !== 'integer') validate('}')
+ }
+
+ if (node.maxProperties !== undefined) {
+ if (type !== 'object') validate('if (%s) {', types.object(name))
+
+ validate('if (Object.keys(%s).length > %d) {', name, node.maxProperties)
+ error('has more properties than allowed')
+ validate('}')
+
+ if (type !== 'object') validate('}')
+ }
+
+ if (node.minProperties !== undefined) {
+ if (type !== 'object') validate('if (%s) {', types.object(name))
+
+ validate('if (Object.keys(%s).length < %d) {', name, node.minProperties)
+ error('has less properties than allowed')
+ validate('}')
+
+ if (type !== 'object') validate('}')
+ }
+
+ if (node.maxItems !== undefined) {
+ if (type !== 'array') validate('if (%s) {', types.array(name))
+
+ validate('if (%s.length > %d) {', name, node.maxItems)
+ error('has more items than allowed')
+ validate('}')
+
+ if (type !== 'array') validate('}')
+ }
+
+ if (node.minItems !== undefined) {
+ if (type !== 'array') validate('if (%s) {', types.array(name))
+
+ validate('if (%s.length < %d) {', name, node.minItems)
+ error('has less items than allowed')
+ validate('}')
+
+ if (type !== 'array') validate('}')
+ }
+
+ if (node.maxLength !== undefined) {
+ if (type !== 'string') validate('if (%s) {', types.string(name))
+
+ validate('if (%s.length > %d) {', name, node.maxLength)
+ error('has longer length than allowed')
+ validate('}')
+
+ if (type !== 'string') validate('}')
+ }
+
+ if (node.minLength !== undefined) {
+ if (type !== 'string') validate('if (%s) {', types.string(name))
+
+ validate('if (%s.length < %d) {', name, node.minLength)
+ error('has less length than allowed')
+ validate('}')
+
+ if (type !== 'string') validate('}')
+ }
+
+ if (node.minimum !== undefined) {
+ validate('if (%s %s %d) {', name, node.exclusiveMinimum ? '<=' : '<', node.minimum)
+ error('is less than minimum')
+ validate('}')
+ }
+
+ if (node.maximum !== undefined) {
+ validate('if (%s %s %d) {', name, node.exclusiveMaximum ? '>=' : '>', node.maximum)
+ error('is more than maximum')
+ validate('}')
+ }
+
+ if (properties) {
+ Object.keys(properties).forEach(function(p) {
+ visit(genobj(name, p), properties[p], reporter, filter)
+ })
+ }
+
+ while (indent--) validate('}')
+ }
+
+ var validate = genfun
+ ('function validate(data) {')
+ ('validate.errors = null')
+ ('var errors = 0')
+
+ visit('data', schema, reporter, opts && opts.filter)
+
+ validate
+ ('return errors === 0')
+ ('}')
+
+ validate = validate.toFunction(scope)
+ validate.errors = null
+
+ validate.__defineGetter__('error', function() {
+ if (!validate.errors) return ''
+ return validate.errors
+ .map(function(err) {
+ return err.field+' '+err.message
+ })
+ .join('\n')
+ })
+
+ validate.toJSON = function() {
+ return schema
+ }
+
+ return validate
+}
+
+module.exports = function(schema, opts) {
+ if (typeof schema === 'string') schema = JSON.parse(schema)
+ return compile(schema, {}, schema, true, opts)
+}
+
+module.exports.filter = function(schema, opts) {
+ var validate = module.exports(schema, xtend(opts, {filter: true}))
+ return function(sch) {
+ validate(sch)
+ return sch
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/.npmignore b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/.travis.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/.travis.yml
new file mode 100644
index 0000000000..6e5919de39
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - "0.10"
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/README.md
new file mode 100644
index 0000000000..693bff87cf
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/README.md
@@ -0,0 +1,72 @@
+# generate-function
+
+Module that helps you write generated functions in Node
+
+```
+npm install generate-function
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/generate-function.svg?style=flat)](http://travis-ci.org/mafintosh/generate-function)
+
+## Disclamer
+
+Writing code that generates code is hard.
+You should only use this if you really, really, really need this for performance reasons (like schema validators / parsers etc).
+
+## Usage
+
+``` js
+var genfun = require('generate-function')
+
+var addNumber = function(val) {
+ var fn = genfun()
+ ('function add(n) {')
+ ('return n + %d', val) // supports format strings to insert values
+ ('}')
+
+ return fn.toFunction() // will compile the function
+}
+
+var add2 = addNumber(2)
+
+console.log('1+2=', add2(1))
+console.log(add2.toString()) // prints the generated function
+```
+
+If you need to close over variables in your generated function pass them to `toFunction(scope)`
+
+``` js
+var multiply = function(a, b) {
+ return a * b
+}
+
+var addAndMultiplyNumber = function(val) {
+ var fn = genfun()
+ ('function(n) {')
+ ('if (typeof n !== "number") {') // ending a line with { will indent the source
+ ('throw new Error("argument should be a number")')
+ ('}')
+ ('var result = multiply(%d, n+%d)', val, val)
+ ('return result')
+ ('}')
+
+ // use fn.toString() if you want to see the generated source
+
+ return fn.toFunction({
+ multiply: multiply
+ })
+}
+
+var addAndMultiply2 = addAndMultiplyNumber(2)
+
+console.log('(3 + 2) * 2 =', addAndMultiply2(3))
+```
+
+## Related
+
+See [generate-object-property](https://github.com/mafintosh/generate-object-property) if you need to safely generate code that
+can be used to reference an object property
+
+## License
+
+MIT \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/example.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/example.js
new file mode 100644
index 0000000000..8d1fee1626
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/example.js
@@ -0,0 +1,27 @@
+var genfun = require('./')
+
+var multiply = function(a, b) {
+ return a * b
+}
+
+var addAndMultiplyNumber = function(val) {
+ var fn = genfun()
+ ('function(n) {')
+ ('if (typeof n !== "number") {') // ending a line with { will indent the source
+ ('throw new Error("argument should be a number")')
+ ('}')
+ ('var result = multiply(%d, n+%d)', val, val)
+ ('return result')
+ ('}')
+
+ // use fn.toString() if you want to see the generated source
+
+ return fn.toFunction({
+ multiply: multiply
+ })
+}
+
+var addAndMultiply2 = addAndMultiplyNumber(2)
+
+console.log(addAndMultiply2.toString())
+console.log('(3 + 2) * 2 =', addAndMultiply2(3)) \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/index.js
new file mode 100644
index 0000000000..37e064bb47
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/index.js
@@ -0,0 +1,61 @@
+var util = require('util')
+
+var INDENT_START = /[\{\[]/
+var INDENT_END = /[\}\]]/
+
+module.exports = function() {
+ var lines = []
+ var indent = 0
+
+ var push = function(str) {
+ var spaces = ''
+ while (spaces.length < indent*2) spaces += ' '
+ lines.push(spaces+str)
+ }
+
+ var line = function(fmt) {
+ if (!fmt) return line
+
+ if (INDENT_END.test(fmt.trim()[0]) && INDENT_START.test(fmt[fmt.length-1])) {
+ indent--
+ push(util.format.apply(util, arguments))
+ indent++
+ return line
+ }
+ if (INDENT_START.test(fmt[fmt.length-1])) {
+ push(util.format.apply(util, arguments))
+ indent++
+ return line
+ }
+ if (INDENT_END.test(fmt.trim()[0])) {
+ indent--
+ push(util.format.apply(util, arguments))
+ return line
+ }
+
+ push(util.format.apply(util, arguments))
+ return line
+ }
+
+ line.toString = function() {
+ return lines.join('\n')
+ }
+
+ line.toFunction = function(scope) {
+ var src = 'return ('+line.toString()+')'
+
+ var keys = Object.keys(scope || {}).map(function(key) {
+ return key
+ })
+
+ var vals = keys.map(function(key) {
+ return scope[key]
+ })
+
+ return Function.apply(null, keys.concat(src)).apply(null, vals)
+ }
+
+ if (arguments.length) line.apply(null, arguments)
+
+ return line
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json
new file mode 100644
index 0000000000..c09cb992b3
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "generate-function",
+ "version": "2.0.0",
+ "description": "Module that helps you write generated functions in Node",
+ "main": "index.js",
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mafintosh/generate-function"
+ },
+ "keywords": [
+ "generate",
+ "code",
+ "generation",
+ "function",
+ "performance"
+ ],
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/mafintosh/generate-function/issues"
+ },
+ "homepage": "https://github.com/mafintosh/generate-function",
+ "devDependencies": {
+ "tape": "^2.13.4"
+ },
+ "gitHead": "3d5fc8de5859be95f58e3af9bfb5f663edd95149",
+ "_id": "generate-function@2.0.0",
+ "_shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74",
+ "_from": "generate-function@>=2.0.0 <3.0.0",
+ "_npmVersion": "1.4.23",
+ "_npmUser": {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74",
+ "tarball": "http://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/test.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/test.js
new file mode 100644
index 0000000000..2768893eb1
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/test.js
@@ -0,0 +1,33 @@
+var tape = require('tape')
+var genfun = require('./')
+
+tape('generate add function', function(t) {
+ var fn = genfun()
+ ('function add(n) {')
+ ('return n + %d', 42)
+ ('}')
+
+ t.same(fn.toString(), 'function add(n) {\n return n + 42\n}', 'code is indented')
+ t.same(fn.toFunction()(10), 52, 'function works')
+ t.end()
+})
+
+tape('generate function + closed variables', function(t) {
+ var fn = genfun()
+ ('function add(n) {')
+ ('return n + %d + number', 42)
+ ('}')
+
+ var notGood = fn.toFunction()
+ var good = fn.toFunction({number:10})
+
+ try {
+ notGood(10)
+ t.ok(false, 'function should not work')
+ } catch (err) {
+ t.same(err.message, 'number is not defined', 'throws reference error')
+ }
+
+ t.same(good(11), 63, 'function with closed var works')
+ t.end()
+}) \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/.npmignore b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/.travis.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/.travis.yml
new file mode 100644
index 0000000000..6e5919de39
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - "0.10"
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/LICENSE b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/README.md
new file mode 100644
index 0000000000..0ee04613de
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/README.md
@@ -0,0 +1,19 @@
+# generate-object-property
+
+Generate safe JS code that can used to reference a object property
+
+ npm install generate-object-property
+
+[![build status](http://img.shields.io/travis/mafintosh/generate-object-property.svg?style=flat)](http://travis-ci.org/mafintosh/generate-object-property)
+
+## Usage
+
+``` js
+var gen = require('generate-object-property');
+console.log(gen('a','b')); // prints a.b
+console.log(gen('a', 'foo-bar')); // prints a["foo-bar"]
+```
+
+## License
+
+MIT \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/index.js
new file mode 100644
index 0000000000..8337c183d8
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/index.js
@@ -0,0 +1,8 @@
+var isProperty = require('is-property')
+
+var gen = function(obj, prop) {
+ return isProperty(prop) ? obj+'.'+prop : obj+'['+JSON.stringify(prop)+']'
+}
+
+gen.valid = isProperty
+module.exports = gen \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/.npmignore b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/.npmignore
new file mode 100644
index 0000000000..8ecfa25a86
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/.npmignore
@@ -0,0 +1,17 @@
+lib-cov
+*.seed
+*.log
+*.csv
+*.dat
+*.out
+*.pid
+*.gz
+
+pids
+logs
+results
+
+npm-debug.log
+node_modules/*
+*.DS_Store
+test/* \ No newline at end of file
diff --git a/deps/npm/node_modules/child-process-close/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/LICENSE
index ac6c1840f0..8ce206a845 100644
--- a/deps/npm/node_modules/child-process-close/README.md
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/LICENSE
@@ -1,30 +1,7 @@
-# child-process-close
+The MIT License (MIT)
-This module makes child process objects, (created with `spawn`, `fork`, `exec`
-or `execFile`) emit the `close` event in node v0.6 like they do in node v0.8.
-This makes it easier to write code that works correctly on both version of
-node.
-
-
-## Usage
-
-Just make sure to `require('child-process-close')` anywhere. It will patch the `child_process` module.
-
-```js
-require('child-process-close');
-var spawn = require('child_process').spawn;
-
-var cp = spawn('foo');
-cp.on('close', function(exitCode, signal) {
- // This now works on all node versions.
-});
-```
-
-
-## License
-
-Copyright (C) 2012 Bert Belder
+Copyright (c) 2013 Mikola Lysenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/README.md
new file mode 100644
index 0000000000..ef1d00b62f
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/README.md
@@ -0,0 +1,28 @@
+is-property
+===========
+Tests if a property of a JavaScript object can be accessed using the dot (.) notation or if it must be enclosed in brackets, (ie use x[" ... "])
+
+Example
+-------
+
+```javascript
+var isProperty = require("is-property")
+
+console.log(isProperty("foo")) //Prints true
+console.log(isProperty("0")) //Prints false
+```
+
+Install
+-------
+
+ npm install is-property
+
+### `require("is-property")(str)`
+Checks if str is a property
+
+* `str` is a string which we will test if it is a property or not
+
+**Returns** true or false depending if str is a property
+
+## Credits
+(c) 2013 Mikola Lysenko. MIT License \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/is-property.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/is-property.js
new file mode 100644
index 0000000000..db58b47b27
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/is-property.js
@@ -0,0 +1,5 @@
+"use strict"
+function isProperty(str) {
+ return /^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(str)
+}
+module.exports = isProperty \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json
new file mode 100644
index 0000000000..fda11c85e5
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "is-property",
+ "version": "1.0.2",
+ "description": "Tests if a JSON property can be accessed using . syntax",
+ "main": "is-property.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tape": "~1.0.4"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mikolalysenko/is-property.git"
+ },
+ "keywords": [
+ "is",
+ "property",
+ "json",
+ "dot",
+ "bracket",
+ ".",
+ "[]"
+ ],
+ "author": {
+ "name": "Mikola Lysenko"
+ },
+ "license": "MIT",
+ "gitHead": "0a85ea5b6b1264ea1cdecc6e5cf186adbb3ffc50",
+ "bugs": {
+ "url": "https://github.com/mikolalysenko/is-property/issues"
+ },
+ "homepage": "https://github.com/mikolalysenko/is-property",
+ "_id": "is-property@1.0.2",
+ "_shasum": "57fe1c4e48474edd65b09911f26b1cd4095dda84",
+ "_from": "is-property@>=1.0.0 <2.0.0",
+ "_npmVersion": "2.1.4",
+ "_nodeVersion": "0.10.26",
+ "_npmUser": {
+ "name": "mikolalysenko",
+ "email": "mikolalysenko@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "mikolalysenko",
+ "email": "mikolalysenko@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "57fe1c4e48474edd65b09911f26b1cd4095dda84",
+ "tarball": "http://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json
new file mode 100644
index 0000000000..2de77e0194
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "generate-object-property",
+ "version": "1.1.1",
+ "description": "Generate safe JS code that can used to reference a object property",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mafintosh/generate-object-property"
+ },
+ "devDependencies": {
+ "tape": "^2.13.0"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "dependencies": {
+ "is-property": "^1.0.0"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/generate-object-property/issues"
+ },
+ "homepage": "https://github.com/mafintosh/generate-object-property",
+ "main": "index.js",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "license": "MIT",
+ "gitHead": "366cb415f6b73904b809e554f685ef1eefe308d8",
+ "_id": "generate-object-property@1.1.1",
+ "_shasum": "8fda6b4cb69b34a189a6cebee7c4c268af47cc93",
+ "_from": "generate-object-property@>=1.1.0 <2.0.0",
+ "_npmVersion": "2.7.1",
+ "_nodeVersion": "1.6.2",
+ "_npmUser": {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "8fda6b4cb69b34a189a6cebee7c4c268af47cc93",
+ "tarball": "http://registry.npmjs.org/generate-object-property/-/generate-object-property-1.1.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.1.1.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/test.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/test.js
new file mode 100644
index 0000000000..6c299c67fd
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/test.js
@@ -0,0 +1,12 @@
+var tape = require('tape')
+var gen = require('./')
+
+tape('valid', function(t) {
+ t.same(gen('a', 'b'), 'a.b')
+ t.end()
+})
+
+tape('invalid', function(t) {
+ t.same(gen('a', '-b'), 'a["-b"]')
+ t.end()
+}) \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml
new file mode 100644
index 0000000000..a057a7c637
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml
@@ -0,0 +1,6 @@
+language: "node_js"
+node_js:
+ - 0.4
+ - 0.5
+ - 0.6
+ - 0.8
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md
new file mode 100644
index 0000000000..bcfdb1a4ec
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md
@@ -0,0 +1,31 @@
+# JSON Pointer for nodejs
+
+This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08).
+
+## Usage
+
+ var jsonpointer = require("jsonpointer");
+ var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]};
+ var one = jsonpointer.get(obj, "/foo");
+ var two = jsonpointer.get(obj, "/bar/baz");
+ var three = jsonpointer.get(obj, "/qux/0");
+ var four = jsonpointer.get(obj, "/qux/1");
+ var five = jsonpointer.get(obj, "/qux/2");
+
+ jsonpointer.set(obj, "/foo", 6); // obj.foo = 6;
+
+## Testing
+
+ $ node test.js
+ All tests pass.
+ $
+
+[![Build Status](https://travis-ci.org/janl/node-jsonpointer.png?branch=master)](undefined)
+
+## Author
+
+(c) 2011 Jan Lehnardt <jan@apache.org>
+
+## License
+
+MIT License. \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js
new file mode 100644
index 0000000000..3f53026efd
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js
@@ -0,0 +1,79 @@
+var console = require("console");
+
+var untilde = function(str) {
+ return str.replace(/~./g, function(m) {
+ switch (m) {
+ case "~0":
+ return "~";
+ case "~1":
+ return "/";
+ }
+ throw("Invalid tilde escape: " + m);
+ });
+}
+
+var traverse = function(obj, pointer, value) {
+ // assert(isArray(pointer))
+ var part = untilde(pointer.shift());
+ if(typeof obj[part] === "undefined") {
+ throw("Value for pointer '" + pointer + "' not found.");
+ return;
+ }
+ if(pointer.length !== 0) { // keep traversin!
+ return traverse(obj[part], pointer, value);
+ }
+ // we're done
+ if(typeof value === "undefined") {
+ // just reading
+ return obj[part];
+ }
+ // set new value, return old value
+ var old_value = obj[part];
+ if(value === null) {
+ delete obj[part];
+ } else {
+ obj[part] = value;
+ }
+ return old_value;
+}
+
+var validate_input = function(obj, pointer) {
+ if(typeof obj !== "object") {
+ throw("Invalid input object.");
+ }
+
+ if(pointer === "") {
+ return [];
+ }
+
+ if(!pointer) {
+ throw("Invalid JSON pointer.");
+ }
+
+ pointer = pointer.split("/");
+ var first = pointer.shift();
+ if (first !== "") {
+ throw("Invalid JSON pointer.");
+ }
+
+ return pointer;
+}
+
+var get = function(obj, pointer) {
+ pointer = validate_input(obj, pointer);
+ if (pointer.length === 0) {
+ return obj;
+ }
+ return traverse(obj, pointer);
+}
+
+var set = function(obj, pointer, value) {
+ pointer = validate_input(obj, pointer);
+ if (pointer.length === 0) {
+ throw("Invalid JSON pointer for set.")
+ }
+ return traverse(obj, pointer, value);
+}
+
+exports.get = get
+exports.set = set
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json
new file mode 100644
index 0000000000..1c5623b462
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "jsonpointer",
+ "description": "Simple JSON Addressing.",
+ "tags": [
+ "util",
+ "simple",
+ "util",
+ "utility"
+ ],
+ "version": "1.1.0",
+ "author": {
+ "name": "Jan Lehnardt",
+ "email": "jan@apache.org"
+ },
+ "contributors": [
+ {
+ "name": "Joe Hildebrand",
+ "email": "joe-github@cursive.net"
+ },
+ {
+ "name": "Filip Noetzel"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/janl/node-jsonpointer.git"
+ },
+ "bugs": {
+ "url": "http://github.com/janl/node-jsonpointer/issues"
+ },
+ "engines": [
+ "node >= 0.4.9"
+ ],
+ "main": "./jsonpointer",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "readme": "# JSON Pointer for nodejs\n\nThis is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08).\n\n## Usage\n\n var jsonpointer = require(\"jsonpointer\");\n var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]};\n var one = jsonpointer.get(obj, \"/foo\");\n var two = jsonpointer.get(obj, \"/bar/baz\");\n var three = jsonpointer.get(obj, \"/qux/0\");\n var four = jsonpointer.get(obj, \"/qux/1\");\n var five = jsonpointer.get(obj, \"/qux/2\");\n\n jsonpointer.set(obj, \"/foo\", 6); // obj.foo = 6;\n\n## Testing\n\n $ node test.js\n All tests pass.\n $\n\n[![Build Status](https://travis-ci.org/janl/node-jsonpointer.png?branch=master)](undefined)\n\n## Author\n\n(c) 2011 Jan Lehnardt <jan@apache.org>\n\n## License\n\nMIT License.",
+ "readmeFilename": "README.md",
+ "_id": "jsonpointer@1.1.0",
+ "dist": {
+ "shasum": "c3c72efaed3b97154163dc01dd349e1cfe0f80fc",
+ "tarball": "http://registry.npmjs.org/jsonpointer/-/jsonpointer-1.1.0.tgz"
+ },
+ "_npmVersion": "1.1.69",
+ "_npmUser": {
+ "name": "jan",
+ "email": "jan@apache.org"
+ },
+ "maintainers": [
+ {
+ "name": "jan",
+ "email": "jan@apache.org"
+ }
+ ],
+ "directories": {},
+ "_shasum": "c3c72efaed3b97154163dc01dd349e1cfe0f80fc",
+ "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-1.1.0.tgz",
+ "_from": "jsonpointer@>=1.1.0 <2.0.0"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js
new file mode 100644
index 0000000000..cdb8ec506c
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js
@@ -0,0 +1,100 @@
+var assert = require("assert");
+var console = require("console");
+var jsonpointer = require("./jsonpointer");
+
+var obj = {
+ a: 1,
+ b: {
+ c: 2
+ },
+ d: {
+ e: [{a:3}, {b:4}, {c:5}]
+ }
+};
+
+assert.equal(jsonpointer.get(obj, "/a"), 1);
+assert.equal(jsonpointer.get(obj, "/b/c"), 2);
+assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 3);
+assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 4);
+assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 5);
+
+// set returns old value
+assert.equal(jsonpointer.set(obj, "/a", 2), 1);
+assert.equal(jsonpointer.set(obj, "/b/c", 3), 2);
+assert.equal(jsonpointer.set(obj, "/d/e/0/a", 4), 3);
+assert.equal(jsonpointer.set(obj, "/d/e/1/b", 5), 4);
+assert.equal(jsonpointer.set(obj, "/d/e/2/c", 6), 5);
+
+assert.equal(jsonpointer.get(obj, "/a"), 2);
+assert.equal(jsonpointer.get(obj, "/b/c"), 3);
+assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 4);
+assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 5);
+assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 6);
+
+assert.equal(jsonpointer.get(obj, ""), obj);
+assert.throws(function() {
+ assert.equal(jsonpointer.get(obj, "a"), 3);
+});
+
+var complexKeys = {
+ "a/b": {
+ c: 1
+ },
+ d: {
+ "e/f": 2
+ },
+ "~1": 3,
+ "01": 4
+}
+
+assert.equal(jsonpointer.get(complexKeys, "/a~1b/c"), 1);
+assert.equal(jsonpointer.get(complexKeys, "/d/e~1f"), 2);
+assert.equal(jsonpointer.get(complexKeys, "/~01"), 3);
+assert.equal(jsonpointer.get(complexKeys, "/01"), 4);
+assert.throws(function() {
+ assert.equal(jsonpointer.get(complexKeys, "/a/b/c"), 1);
+});
+assert.throws(function() {
+ assert.equal(jsonpointer.get(complexKeys, "/~1"), 3);
+});
+
+// draft-ietf-appsawg-json-pointer-08 has special array rules
+var ary = [ "zero", "one", "two" ];
+
+assert.throws(function() {
+ assert.equal(jsonpointer.get(ary, "/01"), "one");
+});
+//assert.equal(jsonpointer.set(ary, "/-", "three"), null);
+//assert.equal(ary[3], "three");
+
+// Examples from the draft:
+var example = {
+ "foo": ["bar", "baz"],
+ "": 0,
+ "a/b": 1,
+ "c%d": 2,
+ "e^f": 3,
+ "g|h": 4,
+ "i\\j": 5,
+ "k\"l": 6,
+ " ": 7,
+ "m~n": 8
+};
+
+assert.equal(jsonpointer.get(example, ""), example);
+var ans = jsonpointer.get(example, "/foo");
+assert.equal(ans.length, 2);
+assert.equal(ans[0], "bar");
+assert.equal(ans[1], "baz");
+assert.equal(jsonpointer.get(example, "/foo/0"), "bar");
+assert.equal(jsonpointer.get(example, "/"), 0);
+assert.equal(jsonpointer.get(example, "/a~1b"), 1);
+assert.equal(jsonpointer.get(example, "/c%d"), 2);
+assert.equal(jsonpointer.get(example, "/e^f"), 3);
+assert.equal(jsonpointer.get(example, "/g|h"), 4);
+assert.equal(jsonpointer.get(example, "/i\\j"), 5);
+assert.equal(jsonpointer.get(example, "/k\"l"), 6);
+assert.equal(jsonpointer.get(example, "/ "), 7);
+assert.equal(jsonpointer.get(example, "/m~0n"), 8);
+
+console.log("All tests pass.");
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.npmignore b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/LICENCE b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/LICENCE
new file mode 100644
index 0000000000..1a14b437e8
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2012-2014 Raynos.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/Makefile b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/Makefile
new file mode 100644
index 0000000000..d583fcf49d
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/Makefile
@@ -0,0 +1,4 @@
+browser:
+ node ./support/compile
+
+.PHONY: browser \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/README.md
new file mode 100644
index 0000000000..093cb2978e
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/README.md
@@ -0,0 +1,32 @@
+# xtend
+
+[![browser support][3]][4]
+
+[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
+
+Extend like a boss
+
+xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
+
+## Examples
+
+```js
+var extend = require("xtend")
+
+// extend returns a new object. Does not mutate arguments
+var combination = extend({
+ a: "a",
+ b: 'c'
+}, {
+ b: "b"
+})
+// { a: "a", b: "b" }
+```
+
+## Stability status: Locked
+
+## MIT Licenced
+
+
+ [3]: http://ci.testling.com/Raynos/xtend.png
+ [4]: http://ci.testling.com/Raynos/xtend
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/immutable.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/immutable.js
new file mode 100644
index 0000000000..5b760152b7
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/immutable.js
@@ -0,0 +1,17 @@
+module.exports = extend
+
+function extend() {
+ var target = {}
+
+ for (var i = 0; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (source.hasOwnProperty(key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/mutable.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/mutable.js
new file mode 100644
index 0000000000..a34475ebdd
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/mutable.js
@@ -0,0 +1,15 @@
+module.exports = extend
+
+function extend(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (source.hasOwnProperty(key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json
new file mode 100644
index 0000000000..c087642df8
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "xtend",
+ "version": "4.0.0",
+ "description": "extend like a boss",
+ "keywords": [
+ "extend",
+ "merge",
+ "options",
+ "opts",
+ "object",
+ "array"
+ ],
+ "author": {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Raynos/xtend.git"
+ },
+ "main": "immutable",
+ "scripts": {
+ "test": "node test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tape": "~1.1.0"
+ },
+ "homepage": "https://github.com/Raynos/xtend",
+ "contributors": [
+ {
+ "name": "Jake Verbaten"
+ },
+ {
+ "name": "Matt Esch"
+ }
+ ],
+ "bugs": {
+ "url": "https://github.com/Raynos/xtend/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/raynos/xtend/raw/master/LICENSE"
+ }
+ ],
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/7..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest"
+ ]
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "readme": "# xtend\n\n[![browser support][3]][4]\n\n[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\n// extend returns a new object. Does not mutate arguments\nvar combination = extend({\n a: \"a\",\n b: 'c'\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n## Stability status: Locked\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n",
+ "readmeFilename": "README.md",
+ "_id": "xtend@4.0.0",
+ "_shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f",
+ "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz",
+ "_from": "xtend@>=4.0.0 <5.0.0"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/test.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/test.js
new file mode 100644
index 0000000000..3369d79660
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/test.js
@@ -0,0 +1,63 @@
+var test = require("tape")
+var extend = require("./")
+var mutableExtend = require("./mutable")
+
+test("merge", function(assert) {
+ var a = { a: "foo" }
+ var b = { b: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("replace", function(assert) {
+ var a = { a: "foo" }
+ var b = { a: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "bar" })
+ assert.end()
+})
+
+test("undefined", function(assert) {
+ var a = { a: undefined }
+ var b = { b: "foo" }
+
+ assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
+ assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
+ assert.end()
+})
+
+test("handle 0", function(assert) {
+ var a = { a: "default" }
+ var b = { a: 0 }
+
+ assert.deepEqual(extend(a, b), { a: 0 })
+ assert.deepEqual(extend(b, a), { a: "default" })
+ assert.end()
+})
+
+test("is immutable", function (assert) {
+ var record = {}
+
+ extend(record, { foo: "bar" })
+ assert.equal(record.foo, undefined)
+ assert.end()
+})
+
+test("null as argument", function (assert) {
+ var a = { foo: "bar" }
+ var b = null
+ var c = void 0
+
+ assert.deepEqual(extend(b, a, c), { foo: "bar" })
+ assert.end()
+})
+
+test("mutable", function (assert) {
+ var a = { foo: "bar" }
+
+ mutableExtend(a, { bar: "baz" })
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json
new file mode 100644
index 0000000000..3095187c7e
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "is-my-json-valid",
+ "version": "2.10.1",
+ "description": "A JSONSchema validator that uses code generation to be extremely fast",
+ "main": "index.js",
+ "dependencies": {
+ "generate-function": "^2.0.0",
+ "generate-object-property": "^1.1.0",
+ "jsonpointer": "^1.1.0",
+ "xtend": "^4.0.0"
+ },
+ "devDependencies": {
+ "tape": "^2.13.4"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mafintosh/is-my-json-valid"
+ },
+ "keywords": [
+ "json",
+ "schema",
+ "orderly",
+ "jsonschema"
+ ],
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/mafintosh/is-my-json-valid/issues"
+ },
+ "homepage": "https://github.com/mafintosh/is-my-json-valid",
+ "gitHead": "c2341ceadb4662cc7cd2a6b59fbffdb1c24bbc05",
+ "_id": "is-my-json-valid@2.10.1",
+ "_shasum": "bf20ca7e71116302f8660ac812659f71e22ea2d0",
+ "_from": "is-my-json-valid@>=2.10.0 <3.0.0",
+ "_npmVersion": "2.7.5",
+ "_nodeVersion": "1.6.4",
+ "_npmUser": {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ },
+ {
+ "name": "watson",
+ "email": "w@tson.dk"
+ }
+ ],
+ "dist": {
+ "shasum": "bf20ca7e71116302f8660ac812659f71e22ea2d0",
+ "tarball": "http://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.10.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.10.1.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/require.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/require.js
new file mode 100644
index 0000000000..0bfb8a29d4
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/require.js
@@ -0,0 +1,12 @@
+var fs = require('fs')
+var path = require('path')
+var compile = require('./')
+
+delete require.cache[require.resolve(__filename)]
+
+module.exports = function(file, opts) {
+ file = path.join(path.dirname(module.parent.filename), file)
+ if (!fs.existsSync(file) && fs.existsSync(file+'.schema')) file += '.schema'
+ if (!fs.existsSync(file) && fs.existsSync(file+'.json')) file += '.json'
+ return compile(fs.readFileSync(file, 'utf-8'), opts)
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/fixtures/cosmic.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/fixtures/cosmic.js
new file mode 100644
index 0000000000..4e0a34b210
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/fixtures/cosmic.js
@@ -0,0 +1,84 @@
+exports.valid = {
+ fullName : "John Doe",
+ age : 47,
+ state : "Massachusetts",
+ city : "Boston",
+ zip : 16417,
+ married : false,
+ dozen : 12,
+ dozenOrBakersDozen : 13,
+ favoriteEvenNumber : 14,
+ topThreeFavoriteColors : [ "red", "blue", "green" ],
+ favoriteSingleDigitWholeNumbers : [ 7 ],
+ favoriteFiveLetterWord : "coder",
+ emailAddresses :
+ [
+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@letters-in-local.org",
+ "01234567890@numbers-in-local.net",
+ "&'*+-./=?^_{}~@other-valid-characters-in-local.net",
+ "mixed-1234-in-{+^}-local@sld.net",
+ "a@single-character-in-local.org",
+ "\"quoted\"@sld.com",
+ "\"\\e\\s\\c\\a\\p\\e\\d\"@sld.com",
+ "\"quoted-at-sign@sld.org\"@sld.com",
+ "\"escaped\\\"quote\"@sld.com",
+ "\"back\\slash\"@sld.com",
+ "one-character-third-level@a.example.com",
+ "single-character-in-sld@x.org",
+ "local@dash-in-sld.com",
+ "letters-in-sld@123.com",
+ "one-letter-sld@x.org",
+ "uncommon-tld@sld.museum",
+ "uncommon-tld@sld.travel",
+ "uncommon-tld@sld.mobi",
+ "country-code-tld@sld.uk",
+ "country-code-tld@sld.rw",
+ "local@sld.newTLD",
+ "the-total-length@of-an-entire-address.cannot-be-longer-than-two-hundred-and-fifty-four-characters.and-this-address-is-254-characters-exactly.so-it-should-be-valid.and-im-going-to-add-some-more-words-here.to-increase-the-lenght-blah-blah-blah-blah-bla.org",
+ "the-character-limit@for-each-part.of-the-domain.is-sixty-three-characters.this-is-exactly-sixty-three-characters-so-it-is-valid-blah-blah.com",
+ "local@sub.domains.com"
+ ],
+ ipAddresses : [ "127.0.0.1", "24.48.64.2", "192.168.1.1", "209.68.44.3", "2.2.2.2" ]
+}
+
+exports.invalid = {
+ fullName : null,
+ age : -1,
+ state : 47,
+ city : false,
+ zip : [null],
+ married : "yes",
+ dozen : 50,
+ dozenOrBakersDozen : "over 9000",
+ favoriteEvenNumber : 15,
+ topThreeFavoriteColors : [ "red", 5 ],
+ favoriteSingleDigitWholeNumbers : [ 78, 2, 999 ],
+ favoriteFiveLetterWord : "codernaut",
+ emailAddresses : [],
+ ipAddresses : [ "999.0.099.1", "294.48.64.2346", false, "2221409.64214128.42414.235233", "124124.12412412" ]
+}
+
+exports.schema = { // from cosmic thingy
+ name : "test",
+ type : "object",
+ additionalProperties : false,
+ required : ["fullName", "age", "zip", "married", "dozen", "dozenOrBakersDozen", "favoriteEvenNumber", "topThreeFavoriteColors", "favoriteSingleDigitWholeNumbers", "favoriteFiveLetterWord", "emailAddresses", "ipAddresses"],
+ properties :
+ {
+ fullName : { type : "string" },
+ age : { type : "integer", minimum : 0 },
+ optionalItem : { type : "string" },
+ state : { type : "string" },
+ city : { type : "string" },
+ zip : { type : "integer", minimum : 0, maximum : 99999 },
+ married : { type : "boolean" },
+ dozen : { type : "integer", minimum : 12, maximum : 12 },
+ dozenOrBakersDozen : { type : "integer", minimum : 12, maximum : 13 },
+ favoriteEvenNumber : { type : "integer", multipleOf : 2 },
+ topThreeFavoriteColors : { type : "array", minItems : 3, maxItems : 3, uniqueItems : true, items : { type : "string" }},
+ favoriteSingleDigitWholeNumbers : { type : "array", minItems : 1, maxItems : 10, uniqueItems : true, items : { type : "integer", minimum : 0, maximum : 9 }},
+ favoriteFiveLetterWord : { type : "string", minLength : 5, maxLength : 5 },
+ emailAddresses : { type : "array", minItems : 1, uniqueItems : true, items : { type : "string", format : "email" }},
+ ipAddresses : { type : "array", uniqueItems : true, items : { type : "string", format : "ipv4" }},
+ }
+ } \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json
new file mode 100644
index 0000000000..521745c8d6
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json
@@ -0,0 +1,82 @@
+[
+ {
+ "description": "additionalItems as schema",
+ "schema": {
+ "items": [{}],
+ "additionalItems": {"type": "integer"}
+ },
+ "tests": [
+ {
+ "description": "additional items match schema",
+ "data": [ null, 2, 3, 4 ],
+ "valid": true
+ },
+ {
+ "description": "additional items do not match schema",
+ "data": [ null, 2, 3, "foo" ],
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "items is schema, no additionalItems",
+ "schema": {
+ "items": {},
+ "additionalItems": false
+ },
+ "tests": [
+ {
+ "description": "all items match schema",
+ "data": [ 1, 2, 3, 4, 5 ],
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "array of items with no additionalItems",
+ "schema": {
+ "items": [{}, {}, {}],
+ "additionalItems": false
+ },
+ "tests": [
+ {
+ "description": "no additional items present",
+ "data": [ 1, 2, 3 ],
+ "valid": true
+ },
+ {
+ "description": "additional items are not permitted",
+ "data": [ 1, 2, 3, 4 ],
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "additionalItems as false without items",
+ "schema": {"additionalItems": false},
+ "tests": [
+ {
+ "description":
+ "items defaults to empty schema so everything is valid",
+ "data": [ 1, 2, 3, 4, 5 ],
+ "valid": true
+ },
+ {
+ "description": "ignores non-arrays",
+ "data": {"foo" : "bar"},
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "additionalItems are allowed by default",
+ "schema": {"items": [{"type": "integer"}]},
+ "tests": [
+ {
+ "description": "only the first item is validated",
+ "data": [1, "foo", false],
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json
new file mode 100644
index 0000000000..40831f9e9a
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json
@@ -0,0 +1,88 @@
+[
+ {
+ "description":
+ "additionalProperties being false does not allow other properties",
+ "schema": {
+ "properties": {"foo": {}, "bar": {}},
+ "patternProperties": { "^v": {} },
+ "additionalProperties": false
+ },
+ "tests": [
+ {
+ "description": "no additional properties is valid",
+ "data": {"foo": 1},
+ "valid": true
+ },
+ {
+ "description": "an additional property is invalid",
+ "data": {"foo" : 1, "bar" : 2, "quux" : "boom"},
+ "valid": false
+ },
+ {
+ "description": "ignores non-objects",
+ "data": [1, 2, 3],
+ "valid": true
+ },
+ {
+ "description": "patternProperties are not additional properties",
+ "data": {"foo":1, "vroom": 2},
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description":
+ "additionalProperties allows a schema which should validate",
+ "schema": {
+ "properties": {"foo": {}, "bar": {}},
+ "additionalProperties": {"type": "boolean"}
+ },
+ "tests": [
+ {
+ "description": "no additional properties is valid",
+ "data": {"foo": 1},
+ "valid": true
+ },
+ {
+ "description": "an additional valid property is valid",
+ "data": {"foo" : 1, "bar" : 2, "quux" : true},
+ "valid": true
+ },
+ {
+ "description": "an additional invalid property is invalid",
+ "data": {"foo" : 1, "bar" : 2, "quux" : 12},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description":
+ "additionalProperties can exist by itself",
+ "schema": {
+ "additionalProperties": {"type": "boolean"}
+ },
+ "tests": [
+ {
+ "description": "an additional valid property is valid",
+ "data": {"foo" : true},
+ "valid": true
+ },
+ {
+ "description": "an additional invalid property is invalid",
+ "data": {"foo" : 1},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "additionalProperties are allowed by default",
+ "schema": {"properties": {"foo": {}, "bar": {}}},
+ "tests": [
+ {
+ "description": "additional properties are allowed",
+ "data": {"foo": 1, "bar": 2, "quux": true},
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json
new file mode 100644
index 0000000000..bbb5f89e4b
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json
@@ -0,0 +1,112 @@
+[
+ {
+ "description": "allOf",
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "bar": {"type": "integer"}
+ },
+ "required": ["bar"]
+ },
+ {
+ "properties": {
+ "foo": {"type": "string"}
+ },
+ "required": ["foo"]
+ }
+ ]
+ },
+ "tests": [
+ {
+ "description": "allOf",
+ "data": {"foo": "baz", "bar": 2},
+ "valid": true
+ },
+ {
+ "description": "mismatch second",
+ "data": {"foo": "baz"},
+ "valid": false
+ },
+ {
+ "description": "mismatch first",
+ "data": {"bar": 2},
+ "valid": false
+ },
+ {
+ "description": "wrong type",
+ "data": {"foo": "baz", "bar": "quux"},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "allOf with base schema",
+ "schema": {
+ "properties": {"bar": {"type": "integer"}},
+ "required": ["bar"],
+ "allOf" : [
+ {
+ "properties": {
+ "foo": {"type": "string"}
+ },
+ "required": ["foo"]
+ },
+ {
+ "properties": {
+ "baz": {"type": "null"}
+ },
+ "required": ["baz"]
+ }
+ ]
+ },
+ "tests": [
+ {
+ "description": "valid",
+ "data": {"foo": "quux", "bar": 2, "baz": null},
+ "valid": true
+ },
+ {
+ "description": "mismatch base schema",
+ "data": {"foo": "quux", "baz": null},
+ "valid": false
+ },
+ {
+ "description": "mismatch first allOf",
+ "data": {"bar": 2, "baz": null},
+ "valid": false
+ },
+ {
+ "description": "mismatch second allOf",
+ "data": {"foo": "quux", "bar": 2},
+ "valid": false
+ },
+ {
+ "description": "mismatch both",
+ "data": {"bar": 2},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "allOf simple types",
+ "schema": {
+ "allOf": [
+ {"maximum": 30},
+ {"minimum": 20}
+ ]
+ },
+ "tests": [
+ {
+ "description": "valid",
+ "data": 25,
+ "valid": true
+ },
+ {
+ "description": "mismatch one",
+ "data": 35,
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json
new file mode 100644
index 0000000000..a58714afd8
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json
@@ -0,0 +1,68 @@
+[
+ {
+ "description": "anyOf",
+ "schema": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "minimum": 2
+ }
+ ]
+ },
+ "tests": [
+ {
+ "description": "first anyOf valid",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "second anyOf valid",
+ "data": 2.5,
+ "valid": true
+ },
+ {
+ "description": "both anyOf valid",
+ "data": 3,
+ "valid": true
+ },
+ {
+ "description": "neither anyOf valid",
+ "data": 1.5,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "anyOf with base schema",
+ "schema": {
+ "type": "string",
+ "anyOf" : [
+ {
+ "maxLength": 2
+ },
+ {
+ "minLength": 4
+ }
+ ]
+ },
+ "tests": [
+ {
+ "description": "mismatch base schema",
+ "data": 3,
+ "valid": false
+ },
+ {
+ "description": "one anyOf valid",
+ "data": "foobar",
+ "valid": true
+ },
+ {
+ "description": "both anyOf invalid",
+ "data": "foo",
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json
new file mode 100644
index 0000000000..ccc7c17fe8
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json
@@ -0,0 +1,107 @@
+[
+ {
+ "description": "integer",
+ "schema": {"type": "integer"},
+ "tests": [
+ {
+ "description": "a bignum is an integer",
+ "data": 12345678910111213141516171819202122232425262728293031,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "number",
+ "schema": {"type": "number"},
+ "tests": [
+ {
+ "description": "a bignum is a number",
+ "data": 98249283749234923498293171823948729348710298301928331,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "integer",
+ "schema": {"type": "integer"},
+ "tests": [
+ {
+ "description": "a negative bignum is an integer",
+ "data": -12345678910111213141516171819202122232425262728293031,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "number",
+ "schema": {"type": "number"},
+ "tests": [
+ {
+ "description": "a negative bignum is a number",
+ "data": -98249283749234923498293171823948729348710298301928331,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "string",
+ "schema": {"type": "string"},
+ "tests": [
+ {
+ "description": "a bignum is not a string",
+ "data": 98249283749234923498293171823948729348710298301928331,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "integer comparison",
+ "schema": {"maximum": 18446744073709551615},
+ "tests": [
+ {
+ "description": "comparison works for high numbers",
+ "data": 18446744073709551600,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "float comparison with high precision",
+ "schema": {
+ "maximum": 972783798187987123879878123.18878137,
+ "exclusiveMaximum": true
+ },
+ "tests": [
+ {
+ "description": "comparison works for high numbers",
+ "data": 972783798187987123879878123.188781371,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "integer comparison",
+ "schema": {"minimum": -18446744073709551615},
+ "tests": [
+ {
+ "description": "comparison works for very negative numbers",
+ "data": -18446744073709551600,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "float comparison with high precision on negative numbers",
+ "schema": {
+ "minimum": -972783798187987123879878123.18878137,
+ "exclusiveMinimum": true
+ },
+ "tests": [
+ {
+ "description": "comparison works for very negative numbers",
+ "data": -972783798187987123879878123.188781371,
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/default.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/default.json
new file mode 100644
index 0000000000..17629779fb
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/default.json
@@ -0,0 +1,49 @@
+[
+ {
+ "description": "invalid type for default",
+ "schema": {
+ "properties": {
+ "foo": {
+ "type": "integer",
+ "default": []
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "valid when property is specified",
+ "data": {"foo": 13},
+ "valid": true
+ },
+ {
+ "description": "still valid when the invalid default is used",
+ "data": {},
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "invalid string value for default",
+ "schema": {
+ "properties": {
+ "bar": {
+ "type": "string",
+ "minLength": 4,
+ "default": "bad"
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "valid when property is specified",
+ "data": {"bar": "good"},
+ "valid": true
+ },
+ {
+ "description": "still valid when the invalid default is used",
+ "data": {},
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json
new file mode 100644
index 0000000000..cf935a3215
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json
@@ -0,0 +1,32 @@
+[
+ {
+ "description": "valid definition",
+ "schema": {"$ref": "http://json-schema.org/draft-04/schema#"},
+ "tests": [
+ {
+ "description": "valid definition schema",
+ "data": {
+ "definitions": {
+ "foo": {"type": "integer"}
+ }
+ },
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "invalid definition",
+ "schema": {"$ref": "http://json-schema.org/draft-04/schema#"},
+ "tests": [
+ {
+ "description": "invalid definition schema",
+ "data": {
+ "definitions": {
+ "foo": {"type": 1}
+ }
+ },
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json
new file mode 100644
index 0000000000..7b9b16a7e1
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json
@@ -0,0 +1,113 @@
+[
+ {
+ "description": "dependencies",
+ "schema": {
+ "dependencies": {"bar": ["foo"]}
+ },
+ "tests": [
+ {
+ "description": "neither",
+ "data": {},
+ "valid": true
+ },
+ {
+ "description": "nondependant",
+ "data": {"foo": 1},
+ "valid": true
+ },
+ {
+ "description": "with dependency",
+ "data": {"foo": 1, "bar": 2},
+ "valid": true
+ },
+ {
+ "description": "missing dependency",
+ "data": {"bar": 2},
+ "valid": false
+ },
+ {
+ "description": "ignores non-objects",
+ "data": "foo",
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "multiple dependencies",
+ "schema": {
+ "dependencies": {"quux": ["foo", "bar"]}
+ },
+ "tests": [
+ {
+ "description": "neither",
+ "data": {},
+ "valid": true
+ },
+ {
+ "description": "nondependants",
+ "data": {"foo": 1, "bar": 2},
+ "valid": true
+ },
+ {
+ "description": "with dependencies",
+ "data": {"foo": 1, "bar": 2, "quux": 3},
+ "valid": true
+ },
+ {
+ "description": "missing dependency",
+ "data": {"foo": 1, "quux": 2},
+ "valid": false
+ },
+ {
+ "description": "missing other dependency",
+ "data": {"bar": 1, "quux": 2},
+ "valid": false
+ },
+ {
+ "description": "missing both dependencies",
+ "data": {"quux": 1},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "multiple dependencies subschema",
+ "schema": {
+ "dependencies": {
+ "bar": {
+ "properties": {
+ "foo": {"type": "integer"},
+ "bar": {"type": "integer"}
+ }
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "valid",
+ "data": {"foo": 1, "bar": 2},
+ "valid": true
+ },
+ {
+ "description": "no dependency",
+ "data": {"foo": "quux"},
+ "valid": true
+ },
+ {
+ "description": "wrong type",
+ "data": {"foo": "quux", "bar": 2},
+ "valid": false
+ },
+ {
+ "description": "wrong type other",
+ "data": {"foo": 2, "bar": "quux"},
+ "valid": false
+ },
+ {
+ "description": "wrong type both",
+ "data": {"foo": "quux", "bar": "quux"},
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json
new file mode 100644
index 0000000000..f124436a7d
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json
@@ -0,0 +1,72 @@
+[
+ {
+ "description": "simple enum validation",
+ "schema": {"enum": [1, 2, 3]},
+ "tests": [
+ {
+ "description": "one of the enum is valid",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "something else is invalid",
+ "data": 4,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "heterogeneous enum validation",
+ "schema": {"enum": [6, "foo", [], true, {"foo": 12}]},
+ "tests": [
+ {
+ "description": "one of the enum is valid",
+ "data": [],
+ "valid": true
+ },
+ {
+ "description": "something else is invalid",
+ "data": null,
+ "valid": false
+ },
+ {
+ "description": "objects are deep compared",
+ "data": {"foo": false},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "enums in properties",
+ "schema": {
+ "type":"object",
+ "properties": {
+ "foo": {"enum":["foo"]},
+ "bar": {"enum":["bar"]}
+ },
+ "required": ["bar"]
+ },
+ "tests": [
+ {
+ "description": "both properties are valid",
+ "data": {"foo":"foo", "bar":"bar"},
+ "valid": true
+ },
+ {
+ "description": "missing optional property is valid",
+ "data": {"bar":"bar"},
+ "valid": true
+ },
+ {
+ "description": "missing required property is invalid",
+ "data": {"foo":"foo"},
+ "valid": false
+ },
+ {
+ "description": "missing all properties is invalid",
+ "data": {},
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/format.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/format.json
new file mode 100644
index 0000000000..53c5d25190
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/format.json
@@ -0,0 +1,143 @@
+[
+ {
+ "description": "validation of date-time strings",
+ "schema": {"format": "date-time"},
+ "tests": [
+ {
+ "description": "a valid date-time string",
+ "data": "1963-06-19T08:30:06.283185Z",
+ "valid": true
+ },
+ {
+ "description": "an invalid date-time string",
+ "data": "06/19/1963 08:30:06 PST",
+ "valid": false
+ },
+ {
+ "description": "only RFC3339 not all of ISO 8601 are valid",
+ "data": "2013-350T01:01:01",
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "validation of URIs",
+ "schema": {"format": "uri"},
+ "tests": [
+ {
+ "description": "a valid URI",
+ "data": "http://foo.bar/?baz=qux#quux",
+ "valid": true
+ },
+ {
+ "description": "an invalid URI",
+ "data": "\\\\WINDOWS\\fileshare",
+ "valid": false
+ },
+ {
+ "description": "an invalid URI though valid URI reference",
+ "data": "abc",
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "validation of e-mail addresses",
+ "schema": {"format": "email"},
+ "tests": [
+ {
+ "description": "a valid e-mail address",
+ "data": "joe.bloggs@example.com",
+ "valid": true
+ },
+ {
+ "description": "an invalid e-mail address",
+ "data": "2962",
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "validation of IP addresses",
+ "schema": {"format": "ipv4"},
+ "tests": [
+ {
+ "description": "a valid IP address",
+ "data": "192.168.0.1",
+ "valid": true
+ },
+ {
+ "description": "an IP address with too many components",
+ "data": "127.0.0.0.1",
+ "valid": false
+ },
+ {
+ "description": "an IP address with out-of-range values",
+ "data": "256.256.256.256",
+ "valid": false
+ },
+ {
+ "description": "an IP address without 4 components",
+ "data": "127.0",
+ "valid": false
+ },
+ {
+ "description": "an IP address as an integer",
+ "data": "0x7f000001",
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "validation of IPv6 addresses",
+ "schema": {"format": "ipv6"},
+ "tests": [
+ {
+ "description": "a valid IPv6 address",
+ "data": "::1",
+ "valid": true
+ },
+ {
+ "description": "an IPv6 address with out-of-range values",
+ "data": "12345::",
+ "valid": false
+ },
+ {
+ "description": "an IPv6 address with too many components",
+ "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
+ "valid": false
+ },
+ {
+ "description": "an IPv6 address containing illegal characters",
+ "data": "::laptop",
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "validation of host names",
+ "schema": {"format": "hostname"},
+ "tests": [
+ {
+ "description": "a valid host name",
+ "data": "www.example.com",
+ "valid": true
+ },
+ {
+ "description": "a host name starting with an illegal character",
+ "data": "-a-host-name-that-starts-with--",
+ "valid": false
+ },
+ {
+ "description": "a host name containing illegal characters",
+ "data": "not_a_valid_host_name",
+ "valid": false
+ },
+ {
+ "description": "a host name with a component too long",
+ "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component",
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/items.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/items.json
new file mode 100644
index 0000000000..f5e18a1384
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/items.json
@@ -0,0 +1,46 @@
+[
+ {
+ "description": "a schema given for items",
+ "schema": {
+ "items": {"type": "integer"}
+ },
+ "tests": [
+ {
+ "description": "valid items",
+ "data": [ 1, 2, 3 ],
+ "valid": true
+ },
+ {
+ "description": "wrong type of items",
+ "data": [1, "x"],
+ "valid": false
+ },
+ {
+ "description": "ignores non-arrays",
+ "data": {"foo" : "bar"},
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "an array of schemas for items",
+ "schema": {
+ "items": [
+ {"type": "integer"},
+ {"type": "string"}
+ ]
+ },
+ "tests": [
+ {
+ "description": "correct types",
+ "data": [ 1, "foo" ],
+ "valid": true
+ },
+ {
+ "description": "wrong types",
+ "data": [ "foo", 1 ],
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json
new file mode 100644
index 0000000000..3b53a6b371
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json
@@ -0,0 +1,28 @@
+[
+ {
+ "description": "maxItems validation",
+ "schema": {"maxItems": 2},
+ "tests": [
+ {
+ "description": "shorter is valid",
+ "data": [1],
+ "valid": true
+ },
+ {
+ "description": "exact length is valid",
+ "data": [1, 2],
+ "valid": true
+ },
+ {
+ "description": "too long is invalid",
+ "data": [1, 2, 3],
+ "valid": false
+ },
+ {
+ "description": "ignores non-arrays",
+ "data": "foobar",
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json
new file mode 100644
index 0000000000..48eb1296d2
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json
@@ -0,0 +1,28 @@
+[
+ {
+ "description": "maxLength validation",
+ "schema": {"maxLength": 2},
+ "tests": [
+ {
+ "description": "shorter is valid",
+ "data": "f",
+ "valid": true
+ },
+ {
+ "description": "exact length is valid",
+ "data": "fo",
+ "valid": true
+ },
+ {
+ "description": "too long is invalid",
+ "data": "foo",
+ "valid": false
+ },
+ {
+ "description": "ignores non-strings",
+ "data": 100,
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json
new file mode 100644
index 0000000000..d282446ad6
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json
@@ -0,0 +1,28 @@
+[
+ {
+ "description": "maxProperties validation",
+ "schema": {"maxProperties": 2},
+ "tests": [
+ {
+ "description": "shorter is valid",
+ "data": {"foo": 1},
+ "valid": true
+ },
+ {
+ "description": "exact length is valid",
+ "data": {"foo": 1, "bar": 2},
+ "valid": true
+ },
+ {
+ "description": "too long is invalid",
+ "data": {"foo": 1, "bar": 2, "baz": 3},
+ "valid": false
+ },
+ {
+ "description": "ignores non-objects",
+ "data": "foobar",
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json
new file mode 100644
index 0000000000..86c7b89c9a
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json
@@ -0,0 +1,42 @@
+[
+ {
+ "description": "maximum validation",
+ "schema": {"maximum": 3.0},
+ "tests": [
+ {
+ "description": "below the maximum is valid",
+ "data": 2.6,
+ "valid": true
+ },
+ {
+ "description": "above the maximum is invalid",
+ "data": 3.5,
+ "valid": false
+ },
+ {
+ "description": "ignores non-numbers",
+ "data": "x",
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "exclusiveMaximum validation",
+ "schema": {
+ "maximum": 3.0,
+ "exclusiveMaximum": true
+ },
+ "tests": [
+ {
+ "description": "below the maximum is still valid",
+ "data": 2.2,
+ "valid": true
+ },
+ {
+ "description": "boundary point is invalid",
+ "data": 3.0,
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json
new file mode 100644
index 0000000000..ed5118815e
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json
@@ -0,0 +1,28 @@
+[
+ {
+ "description": "minItems validation",
+ "schema": {"minItems": 1},
+ "tests": [
+ {
+ "description": "longer is valid",
+ "data": [1, 2],
+ "valid": true
+ },
+ {
+ "description": "exact length is valid",
+ "data": [1],
+ "valid": true
+ },
+ {
+ "description": "too short is invalid",
+ "data": [],
+ "valid": false
+ },
+ {
+ "description": "ignores non-arrays",
+ "data": "",
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json
new file mode 100644
index 0000000000..e9c14b1723
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json
@@ -0,0 +1,28 @@
+[
+ {
+ "description": "minLength validation",
+ "schema": {"minLength": 2},
+ "tests": [
+ {
+ "description": "longer is valid",
+ "data": "foo",
+ "valid": true
+ },
+ {
+ "description": "exact length is valid",
+ "data": "fo",
+ "valid": true
+ },
+ {
+ "description": "too short is invalid",
+ "data": "f",
+ "valid": false
+ },
+ {
+ "description": "ignores non-strings",
+ "data": 1,
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json
new file mode 100644
index 0000000000..a72c7d293e
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json
@@ -0,0 +1,28 @@
+[
+ {
+ "description": "minProperties validation",
+ "schema": {"minProperties": 1},
+ "tests": [
+ {
+ "description": "longer is valid",
+ "data": {"foo": 1, "bar": 2},
+ "valid": true
+ },
+ {
+ "description": "exact length is valid",
+ "data": {"foo": 1},
+ "valid": true
+ },
+ {
+ "description": "too short is invalid",
+ "data": {},
+ "valid": false
+ },
+ {
+ "description": "ignores non-objects",
+ "data": "",
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json
new file mode 100644
index 0000000000..d5bf000bcc
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json
@@ -0,0 +1,42 @@
+[
+ {
+ "description": "minimum validation",
+ "schema": {"minimum": 1.1},
+ "tests": [
+ {
+ "description": "above the minimum is valid",
+ "data": 2.6,
+ "valid": true
+ },
+ {
+ "description": "below the minimum is invalid",
+ "data": 0.6,
+ "valid": false
+ },
+ {
+ "description": "ignores non-numbers",
+ "data": "x",
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "exclusiveMinimum validation",
+ "schema": {
+ "minimum": 1.1,
+ "exclusiveMinimum": true
+ },
+ "tests": [
+ {
+ "description": "above the minimum is still valid",
+ "data": 1.2,
+ "valid": true
+ },
+ {
+ "description": "boundary point is invalid",
+ "data": 1.1,
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json
new file mode 100644
index 0000000000..ca3b761805
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json
@@ -0,0 +1,60 @@
+[
+ {
+ "description": "by int",
+ "schema": {"multipleOf": 2},
+ "tests": [
+ {
+ "description": "int by int",
+ "data": 10,
+ "valid": true
+ },
+ {
+ "description": "int by int fail",
+ "data": 7,
+ "valid": false
+ },
+ {
+ "description": "ignores non-numbers",
+ "data": "foo",
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "by number",
+ "schema": {"multipleOf": 1.5},
+ "tests": [
+ {
+ "description": "zero is multiple of anything",
+ "data": 0,
+ "valid": true
+ },
+ {
+ "description": "4.5 is multiple of 1.5",
+ "data": 4.5,
+ "valid": true
+ },
+ {
+ "description": "35 is not multiple of 1.5",
+ "data": 35,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "by small number",
+ "schema": {"multipleOf": 0.0001},
+ "tests": [
+ {
+ "description": "0.0075 is multiple of 0.0001",
+ "data": 0.0075,
+ "valid": true
+ },
+ {
+ "description": "0.00751 is not multiple of 0.0001",
+ "data": 0.00751,
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/not.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/not.json
new file mode 100644
index 0000000000..cbb7f46bf8
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/not.json
@@ -0,0 +1,96 @@
+[
+ {
+ "description": "not",
+ "schema": {
+ "not": {"type": "integer"}
+ },
+ "tests": [
+ {
+ "description": "allowed",
+ "data": "foo",
+ "valid": true
+ },
+ {
+ "description": "disallowed",
+ "data": 1,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "not multiple types",
+ "schema": {
+ "not": {"type": ["integer", "boolean"]}
+ },
+ "tests": [
+ {
+ "description": "valid",
+ "data": "foo",
+ "valid": true
+ },
+ {
+ "description": "mismatch",
+ "data": 1,
+ "valid": false
+ },
+ {
+ "description": "other mismatch",
+ "data": true,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "not more complex schema",
+ "schema": {
+ "not": {
+ "type": "object",
+ "properties": {
+ "foo": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "match",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "other match",
+ "data": {"foo": 1},
+ "valid": true
+ },
+ {
+ "description": "mismatch",
+ "data": {"foo": "bar"},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "forbidden property",
+ "schema": {
+ "properties": {
+ "foo": {
+ "not": {}
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "property present",
+ "data": {"foo": 1, "bar": 2},
+ "valid": false
+ },
+ {
+ "description": "property absent",
+ "data": {"bar": 1, "baz": 2},
+ "valid": true
+ }
+ ]
+ }
+
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json
new file mode 100644
index 0000000000..d7fce9f509
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json
@@ -0,0 +1,18 @@
+[
+ {
+ "description": "validation of null and format",
+ "schema": {"type": ["null", "string"], "format": "date-time"},
+ "tests": [
+ {
+ "description": "a valid date-time string",
+ "data": "1963-06-19T08:30:06.283185Z",
+ "valid": true
+ },
+ {
+ "description": "allow null",
+ "data": null,
+ "valid": true
+ }
+ ]
+ }
+] \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json
new file mode 100644
index 0000000000..1eaa4e4794
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json
@@ -0,0 +1,68 @@
+[
+ {
+ "description": "oneOf",
+ "schema": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "minimum": 2
+ }
+ ]
+ },
+ "tests": [
+ {
+ "description": "first oneOf valid",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "second oneOf valid",
+ "data": 2.5,
+ "valid": true
+ },
+ {
+ "description": "both oneOf valid",
+ "data": 3,
+ "valid": false
+ },
+ {
+ "description": "neither oneOf valid",
+ "data": 1.5,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "oneOf with base schema",
+ "schema": {
+ "type": "string",
+ "oneOf" : [
+ {
+ "minLength": 2
+ },
+ {
+ "maxLength": 4
+ }
+ ]
+ },
+ "tests": [
+ {
+ "description": "mismatch base schema",
+ "data": 3,
+ "valid": false
+ },
+ {
+ "description": "one oneOf valid",
+ "data": "foobar",
+ "valid": true
+ },
+ {
+ "description": "both oneOf valid",
+ "data": "foo",
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json
new file mode 100644
index 0000000000..befc4b560f
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json
@@ -0,0 +1,23 @@
+[
+ {
+ "description": "pattern validation",
+ "schema": {"pattern": "^a*$"},
+ "tests": [
+ {
+ "description": "a matching pattern is valid",
+ "data": "aaa",
+ "valid": true
+ },
+ {
+ "description": "a non-matching pattern is invalid",
+ "data": "abc",
+ "valid": false
+ },
+ {
+ "description": "ignores non-strings",
+ "data": true,
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json
new file mode 100644
index 0000000000..18586e5dab
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json
@@ -0,0 +1,110 @@
+[
+ {
+ "description":
+ "patternProperties validates properties matching a regex",
+ "schema": {
+ "patternProperties": {
+ "f.*o": {"type": "integer"}
+ }
+ },
+ "tests": [
+ {
+ "description": "a single valid match is valid",
+ "data": {"foo": 1},
+ "valid": true
+ },
+ {
+ "description": "multiple valid matches is valid",
+ "data": {"foo": 1, "foooooo" : 2},
+ "valid": true
+ },
+ {
+ "description": "a single invalid match is invalid",
+ "data": {"foo": "bar", "fooooo": 2},
+ "valid": false
+ },
+ {
+ "description": "multiple invalid matches is invalid",
+ "data": {"foo": "bar", "foooooo" : "baz"},
+ "valid": false
+ },
+ {
+ "description": "ignores non-objects",
+ "data": 12,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "multiple simultaneous patternProperties are validated",
+ "schema": {
+ "patternProperties": {
+ "a*": {"type": "integer"},
+ "aaa*": {"maximum": 20}
+ }
+ },
+ "tests": [
+ {
+ "description": "a single valid match is valid",
+ "data": {"a": 21},
+ "valid": true
+ },
+ {
+ "description": "a simultaneous match is valid",
+ "data": {"aaaa": 18},
+ "valid": true
+ },
+ {
+ "description": "multiple matches is valid",
+ "data": {"a": 21, "aaaa": 18},
+ "valid": true
+ },
+ {
+ "description": "an invalid due to one is invalid",
+ "data": {"a": "bar"},
+ "valid": false
+ },
+ {
+ "description": "an invalid due to the other is invalid",
+ "data": {"aaaa": 31},
+ "valid": false
+ },
+ {
+ "description": "an invalid due to both is invalid",
+ "data": {"aaa": "foo", "aaaa": 31},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "regexes are not anchored by default and are case sensitive",
+ "schema": {
+ "patternProperties": {
+ "[0-9]{2,}": { "type": "boolean" },
+ "X_": { "type": "string" }
+ }
+ },
+ "tests": [
+ {
+ "description": "non recognized members are ignored",
+ "data": { "answer 1": "42" },
+ "valid": true
+ },
+ {
+ "description": "recognized members are accounted for",
+ "data": { "a31b": null },
+ "valid": false
+ },
+ {
+ "description": "regexes are case sensitive",
+ "data": { "a_x_3": 3 },
+ "valid": true
+ },
+ {
+ "description": "regexes are case sensitive, 2",
+ "data": { "a_X_3": 3 },
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json
new file mode 100644
index 0000000000..cd1644dcd9
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json
@@ -0,0 +1,92 @@
+[
+ {
+ "description": "object properties validation",
+ "schema": {
+ "properties": {
+ "foo": {"type": "integer"},
+ "bar": {"type": "string"}
+ }
+ },
+ "tests": [
+ {
+ "description": "both properties present and valid is valid",
+ "data": {"foo": 1, "bar": "baz"},
+ "valid": true
+ },
+ {
+ "description": "one property invalid is invalid",
+ "data": {"foo": 1, "bar": {}},
+ "valid": false
+ },
+ {
+ "description": "both properties invalid is invalid",
+ "data": {"foo": [], "bar": {}},
+ "valid": false
+ },
+ {
+ "description": "doesn't invalidate other properties",
+ "data": {"quux": []},
+ "valid": true
+ },
+ {
+ "description": "ignores non-objects",
+ "data": [],
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description":
+ "properties, patternProperties, additionalProperties interaction",
+ "schema": {
+ "properties": {
+ "foo": {"type": "array", "maxItems": 3},
+ "bar": {"type": "array"}
+ },
+ "patternProperties": {"f.o": {"minItems": 2}},
+ "additionalProperties": {"type": "integer"}
+ },
+ "tests": [
+ {
+ "description": "property validates property",
+ "data": {"foo": [1, 2]},
+ "valid": true
+ },
+ {
+ "description": "property invalidates property",
+ "data": {"foo": [1, 2, 3, 4]},
+ "valid": false
+ },
+ {
+ "description": "patternProperty invalidates property",
+ "data": {"foo": []},
+ "valid": false
+ },
+ {
+ "description": "patternProperty validates nonproperty",
+ "data": {"fxo": [1, 2]},
+ "valid": true
+ },
+ {
+ "description": "patternProperty invalidates nonproperty",
+ "data": {"fxo": []},
+ "valid": false
+ },
+ {
+ "description": "additionalProperty ignores property",
+ "data": {"bar": []},
+ "valid": true
+ },
+ {
+ "description": "additionalProperty validates others",
+ "data": {"quux": 3},
+ "valid": true
+ },
+ {
+ "description": "additionalProperty invalidates others",
+ "data": {"quux": "foo"},
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json
new file mode 100644
index 0000000000..d8214bc2b3
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json
@@ -0,0 +1,128 @@
+[
+ {
+ "description": "root pointer ref",
+ "schema": {
+ "properties": {
+ "foo": {"$ref": "#"}
+ },
+ "additionalProperties": false
+ },
+ "tests": [
+ {
+ "description": "match",
+ "data": {"foo": false},
+ "valid": true
+ },
+ {
+ "description": "recursive match",
+ "data": {"foo": {"foo": false}},
+ "valid": true
+ },
+ {
+ "description": "mismatch",
+ "data": {"bar": false},
+ "valid": false
+ },
+ {
+ "description": "recursive mismatch",
+ "data": {"foo": {"bar": false}},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "relative pointer ref to object",
+ "schema": {
+ "properties": {
+ "foo": {"type": "integer"},
+ "bar": {"$ref": "#/properties/foo"}
+ }
+ },
+ "tests": [
+ {
+ "description": "match",
+ "data": {"bar": 3},
+ "valid": true
+ },
+ {
+ "description": "mismatch",
+ "data": {"bar": true},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "relative pointer ref to array",
+ "schema": {
+ "items": [
+ {"type": "integer"},
+ {"$ref": "#/items/0"}
+ ]
+ },
+ "tests": [
+ {
+ "description": "match array",
+ "data": [1, 2],
+ "valid": true
+ },
+ {
+ "description": "mismatch array",
+ "data": [1, "foo"],
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "escaped pointer ref",
+ "schema": {
+ "tilda~field": {"type": "integer"},
+ "slash/field": {"type": "integer"},
+ "percent%field": {"type": "integer"},
+ "properties": {
+ "tilda": {"$ref": "#/tilda~0field"},
+ "slash": {"$ref": "#/slash~1field"},
+ "percent": {"$ref": "#/percent%25field"}
+ }
+ },
+ "tests": [
+ {
+ "description": "slash",
+ "data": {"slash": "aoeu"},
+ "valid": false
+ },
+ {
+ "description": "tilda",
+ "data": {"tilda": "aoeu"},
+ "valid": false
+ },
+ {
+ "description": "percent",
+ "data": {"percent": "aoeu"},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "nested refs",
+ "schema": {
+ "definitions": {
+ "a": {"type": "integer"},
+ "b": {"$ref": "#/definitions/a"},
+ "c": {"$ref": "#/definitions/b"}
+ },
+ "$ref": "#/definitions/c"
+ },
+ "tests": [
+ {
+ "description": "nested ref valid",
+ "data": 5,
+ "valid": true
+ },
+ {
+ "description": "nested ref invalid",
+ "data": "a",
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json
new file mode 100644
index 0000000000..4ca804732c
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json
@@ -0,0 +1,74 @@
+[
+ {
+ "description": "remote ref",
+ "schema": {"$ref": "http://localhost:1234/integer.json"},
+ "tests": [
+ {
+ "description": "remote ref valid",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "remote ref invalid",
+ "data": "a",
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "fragment within remote ref",
+ "schema": {"$ref": "http://localhost:1234/subSchemas.json#/integer"},
+ "tests": [
+ {
+ "description": "remote fragment valid",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "remote fragment invalid",
+ "data": "a",
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "ref within remote ref",
+ "schema": {
+ "$ref": "http://localhost:1234/subSchemas.json#/refToInteger"
+ },
+ "tests": [
+ {
+ "description": "ref within ref valid",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "ref within ref invalid",
+ "data": "a",
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "change resolution scope",
+ "schema": {
+ "id": "http://localhost:1234/",
+ "items": {
+ "id": "folder/",
+ "items": {"$ref": "folderInteger.json"}
+ }
+ },
+ "tests": [
+ {
+ "description": "changed scope ref valid",
+ "data": [[1]],
+ "valid": true
+ },
+ {
+ "description": "changed scope ref invalid",
+ "data": [["a"]],
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/required.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/required.json
new file mode 100644
index 0000000000..612f73f347
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/required.json
@@ -0,0 +1,39 @@
+[
+ {
+ "description": "required validation",
+ "schema": {
+ "properties": {
+ "foo": {},
+ "bar": {}
+ },
+ "required": ["foo"]
+ },
+ "tests": [
+ {
+ "description": "present required property is valid",
+ "data": {"foo": 1},
+ "valid": true
+ },
+ {
+ "description": "non-present required property is invalid",
+ "data": {"bar": 1},
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "required default validation",
+ "schema": {
+ "properties": {
+ "foo": {}
+ }
+ },
+ "tests": [
+ {
+ "description": "not required by default",
+ "data": {},
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/type.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/type.json
new file mode 100644
index 0000000000..257f051292
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/type.json
@@ -0,0 +1,330 @@
+[
+ {
+ "description": "integer type matches integers",
+ "schema": {"type": "integer"},
+ "tests": [
+ {
+ "description": "an integer is an integer",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "a float is not an integer",
+ "data": 1.1,
+ "valid": false
+ },
+ {
+ "description": "a string is not an integer",
+ "data": "foo",
+ "valid": false
+ },
+ {
+ "description": "an object is not an integer",
+ "data": {},
+ "valid": false
+ },
+ {
+ "description": "an array is not an integer",
+ "data": [],
+ "valid": false
+ },
+ {
+ "description": "a boolean is not an integer",
+ "data": true,
+ "valid": false
+ },
+ {
+ "description": "null is not an integer",
+ "data": null,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "number type matches numbers",
+ "schema": {"type": "number"},
+ "tests": [
+ {
+ "description": "an integer is a number",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "a float is a number",
+ "data": 1.1,
+ "valid": true
+ },
+ {
+ "description": "a string is not a number",
+ "data": "foo",
+ "valid": false
+ },
+ {
+ "description": "an object is not a number",
+ "data": {},
+ "valid": false
+ },
+ {
+ "description": "an array is not a number",
+ "data": [],
+ "valid": false
+ },
+ {
+ "description": "a boolean is not a number",
+ "data": true,
+ "valid": false
+ },
+ {
+ "description": "null is not a number",
+ "data": null,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "string type matches strings",
+ "schema": {"type": "string"},
+ "tests": [
+ {
+ "description": "1 is not a string",
+ "data": 1,
+ "valid": false
+ },
+ {
+ "description": "a float is not a string",
+ "data": 1.1,
+ "valid": false
+ },
+ {
+ "description": "a string is a string",
+ "data": "foo",
+ "valid": true
+ },
+ {
+ "description": "an object is not a string",
+ "data": {},
+ "valid": false
+ },
+ {
+ "description": "an array is not a string",
+ "data": [],
+ "valid": false
+ },
+ {
+ "description": "a boolean is not a string",
+ "data": true,
+ "valid": false
+ },
+ {
+ "description": "null is not a string",
+ "data": null,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "object type matches objects",
+ "schema": {"type": "object"},
+ "tests": [
+ {
+ "description": "an integer is not an object",
+ "data": 1,
+ "valid": false
+ },
+ {
+ "description": "a float is not an object",
+ "data": 1.1,
+ "valid": false
+ },
+ {
+ "description": "a string is not an object",
+ "data": "foo",
+ "valid": false
+ },
+ {
+ "description": "an object is an object",
+ "data": {},
+ "valid": true
+ },
+ {
+ "description": "an array is not an object",
+ "data": [],
+ "valid": false
+ },
+ {
+ "description": "a boolean is not an object",
+ "data": true,
+ "valid": false
+ },
+ {
+ "description": "null is not an object",
+ "data": null,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "array type matches arrays",
+ "schema": {"type": "array"},
+ "tests": [
+ {
+ "description": "an integer is not an array",
+ "data": 1,
+ "valid": false
+ },
+ {
+ "description": "a float is not an array",
+ "data": 1.1,
+ "valid": false
+ },
+ {
+ "description": "a string is not an array",
+ "data": "foo",
+ "valid": false
+ },
+ {
+ "description": "an object is not an array",
+ "data": {},
+ "valid": false
+ },
+ {
+ "description": "an array is not an array",
+ "data": [],
+ "valid": true
+ },
+ {
+ "description": "a boolean is not an array",
+ "data": true,
+ "valid": false
+ },
+ {
+ "description": "null is not an array",
+ "data": null,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "boolean type matches booleans",
+ "schema": {"type": "boolean"},
+ "tests": [
+ {
+ "description": "an integer is not a boolean",
+ "data": 1,
+ "valid": false
+ },
+ {
+ "description": "a float is not a boolean",
+ "data": 1.1,
+ "valid": false
+ },
+ {
+ "description": "a string is not a boolean",
+ "data": "foo",
+ "valid": false
+ },
+ {
+ "description": "an object is not a boolean",
+ "data": {},
+ "valid": false
+ },
+ {
+ "description": "an array is not a boolean",
+ "data": [],
+ "valid": false
+ },
+ {
+ "description": "a boolean is not a boolean",
+ "data": true,
+ "valid": true
+ },
+ {
+ "description": "null is not a boolean",
+ "data": null,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "null type matches only the null object",
+ "schema": {"type": "null"},
+ "tests": [
+ {
+ "description": "an integer is not null",
+ "data": 1,
+ "valid": false
+ },
+ {
+ "description": "a float is not null",
+ "data": 1.1,
+ "valid": false
+ },
+ {
+ "description": "a string is not null",
+ "data": "foo",
+ "valid": false
+ },
+ {
+ "description": "an object is not null",
+ "data": {},
+ "valid": false
+ },
+ {
+ "description": "an array is not null",
+ "data": [],
+ "valid": false
+ },
+ {
+ "description": "a boolean is not null",
+ "data": true,
+ "valid": false
+ },
+ {
+ "description": "null is null",
+ "data": null,
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "multiple types can be specified in an array",
+ "schema": {"type": ["integer", "string"]},
+ "tests": [
+ {
+ "description": "an integer is valid",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "a string is valid",
+ "data": "foo",
+ "valid": true
+ },
+ {
+ "description": "a float is invalid",
+ "data": 1.1,
+ "valid": false
+ },
+ {
+ "description": "an object is invalid",
+ "data": {},
+ "valid": false
+ },
+ {
+ "description": "an array is invalid",
+ "data": [],
+ "valid": false
+ },
+ {
+ "description": "a boolean is invalid",
+ "data": true,
+ "valid": false
+ },
+ {
+ "description": "null is invalid",
+ "data": null,
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json
new file mode 100644
index 0000000000..c1f4ab99c9
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json
@@ -0,0 +1,79 @@
+[
+ {
+ "description": "uniqueItems validation",
+ "schema": {"uniqueItems": true},
+ "tests": [
+ {
+ "description": "unique array of integers is valid",
+ "data": [1, 2],
+ "valid": true
+ },
+ {
+ "description": "non-unique array of integers is invalid",
+ "data": [1, 1],
+ "valid": false
+ },
+ {
+ "description": "numbers are unique if mathematically unequal",
+ "data": [1.0, 1.00, 1],
+ "valid": false
+ },
+ {
+ "description": "unique array of objects is valid",
+ "data": [{"foo": "bar"}, {"foo": "baz"}],
+ "valid": true
+ },
+ {
+ "description": "non-unique array of objects is invalid",
+ "data": [{"foo": "bar"}, {"foo": "bar"}],
+ "valid": false
+ },
+ {
+ "description": "unique array of nested objects is valid",
+ "data": [
+ {"foo": {"bar" : {"baz" : true}}},
+ {"foo": {"bar" : {"baz" : false}}}
+ ],
+ "valid": true
+ },
+ {
+ "description": "non-unique array of nested objects is invalid",
+ "data": [
+ {"foo": {"bar" : {"baz" : true}}},
+ {"foo": {"bar" : {"baz" : true}}}
+ ],
+ "valid": false
+ },
+ {
+ "description": "unique array of arrays is valid",
+ "data": [["foo"], ["bar"]],
+ "valid": true
+ },
+ {
+ "description": "non-unique array of arrays is invalid",
+ "data": [["foo"], ["foo"]],
+ "valid": false
+ },
+ {
+ "description": "1 and true are unique",
+ "data": [1, true],
+ "valid": true
+ },
+ {
+ "description": "0 and false are unique",
+ "data": [0, false],
+ "valid": true
+ },
+ {
+ "description": "unique heterogeneous types are valid",
+ "data": [{}, [1], true, null, 1],
+ "valid": true
+ },
+ {
+ "description": "non-unique heterogeneous types are invalid",
+ "data": [{}, [1], true, null, {}, 1],
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
new file mode 100644
index 0000000000..e68a263a27
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
@@ -0,0 +1,23 @@
+var tape = require('tape')
+var fs = require('fs')
+var validator = require('../')
+
+var files = fs.readdirSync(__dirname+'/json-schema-draft4')
+ .map(function(file) {
+ if (file === 'definitions.json') return null
+ if (file === 'refRemote.json') return null
+ return require('./json-schema-draft4/'+file)
+ })
+ .filter(Boolean)
+
+files.forEach(function(file) {
+ file.forEach(function(f) {
+ tape('json-schema-test-suite '+f.description, function(t) {
+ var validate = validator(f.schema)
+ f.tests.forEach(function(test) {
+ t.same(validate(test.data), test.valid, test.description)
+ })
+ t.end()
+ })
+ })
+})
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js
new file mode 100644
index 0000000000..6f22d007ff
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js
@@ -0,0 +1,366 @@
+var tape = require('tape')
+var cosmic = require('./fixtures/cosmic')
+var validator = require('../')
+var validatorRequire = require('../require')
+
+tape('simple', function(t) {
+ var schema = {
+ required: true,
+ type: 'object',
+ properties: {
+ hello: {type:'string', required:true}
+ }
+ }
+
+ var validate = validator(schema)
+
+ t.ok(validate({hello: 'world'}), 'should be valid')
+ t.notOk(validate(), 'should be invalid')
+ t.notOk(validate({}), 'should be invalid')
+ t.end()
+})
+
+tape('advanced', function(t) {
+ var validate = validator(cosmic.schema)
+
+ t.ok(validate(cosmic.valid), 'should be valid')
+ t.notOk(validate(cosmic.invalid), 'should be invalid')
+ t.end()
+})
+
+tape('greedy/false', function(t) {
+ var validate = validator({
+ type: 'object',
+ properties: {
+ x: {
+ type: 'number'
+ }
+ },
+ required: ['x', 'y']
+ });
+ t.notOk(validate({}), 'should be invalid')
+ t.strictEqual(validate.errors.length, 2);
+ t.strictEqual(validate.errors[0].field, 'data.x')
+ t.strictEqual(validate.errors[0].message, 'is required')
+ t.strictEqual(validate.errors[1].field, 'data.y')
+ t.strictEqual(validate.errors[1].message, 'is required')
+ t.notOk(validate({x: 'string'}), 'should be invalid')
+ t.strictEqual(validate.errors.length, 1);
+ t.strictEqual(validate.errors[0].field, 'data.y')
+ t.strictEqual(validate.errors[0].message, 'is required')
+ t.notOk(validate({x: 'string', y: 'value'}), 'should be invalid')
+ t.strictEqual(validate.errors.length, 1);
+ t.strictEqual(validate.errors[0].field, 'data.x')
+ t.strictEqual(validate.errors[0].message, 'is the wrong type')
+ t.end();
+});
+
+tape('greedy/true', function(t) {
+ var validate = validator({
+ type: 'object',
+ properties: {
+ x: {
+ type: 'number'
+ }
+ },
+ required: ['x', 'y']
+ }, {
+ greedy: true
+ });
+ t.notOk(validate({}), 'should be invalid')
+ t.strictEqual(validate.errors.length, 2);
+ t.strictEqual(validate.errors[0].field, 'data.x')
+ t.strictEqual(validate.errors[0].message, 'is required')
+ t.strictEqual(validate.errors[1].field, 'data.y')
+ t.strictEqual(validate.errors[1].message, 'is required')
+ t.notOk(validate({x: 'string'}), 'should be invalid')
+ t.strictEqual(validate.errors.length, 2);
+ t.strictEqual(validate.errors[0].field, 'data.y')
+ t.strictEqual(validate.errors[0].message, 'is required')
+ t.strictEqual(validate.errors[1].field, 'data.x')
+ t.strictEqual(validate.errors[1].message, 'is the wrong type')
+ t.notOk(validate({x: 'string', y: 'value'}), 'should be invalid')
+ t.strictEqual(validate.errors.length, 1);
+ t.strictEqual(validate.errors[0].field, 'data.x')
+ t.strictEqual(validate.errors[0].message, 'is the wrong type')
+ t.ok(validate({x: 1, y: 'value'}), 'should be invalid')
+ t.end();
+});
+
+tape('additional props', function(t) {
+ var validate = validator({
+ type: 'object',
+ additionalProperties: false
+ }, {
+ verbose: true
+ })
+
+ t.ok(validate({}))
+ t.notOk(validate({foo:'bar'}))
+ t.ok(validate.errors[0].value === 'data.foo', 'should output the property not allowed in verbose mode')
+ t.end()
+})
+
+tape('array', function(t) {
+ var validate = validator({
+ type: 'array',
+ required: true,
+ items: {
+ type: 'string'
+ }
+ })
+
+ t.notOk(validate({}), 'wrong type')
+ t.notOk(validate(), 'is required')
+ t.ok(validate(['test']))
+ t.end()
+})
+
+tape('nested array', function(t) {
+ var validate = validator({
+ type: 'object',
+ properties: {
+ list: {
+ type: 'array',
+ required: true,
+ items: {
+ type: 'string'
+ }
+ }
+ }
+ })
+
+ t.notOk(validate({}), 'is required')
+ t.ok(validate({list:['test']}))
+ t.notOk(validate({list:[1]}))
+ t.end()
+})
+
+tape('enum', function(t) {
+ var validate = validator({
+ type: 'object',
+ properties: {
+ foo: {
+ type: 'number',
+ required: true,
+ enum: [42]
+ }
+ }
+ })
+
+ t.notOk(validate({}), 'is required')
+ t.ok(validate({foo:42}))
+ t.notOk(validate({foo:43}))
+ t.end()
+})
+
+tape('minimum/maximum', function(t) {
+ var validate = validator({
+ type: 'object',
+ properties: {
+ foo: {
+ type: 'number',
+ minimum: 0,
+ maximum: 0
+ }
+ }
+ })
+
+ t.notOk(validate({foo:-42}))
+ t.ok(validate({foo:0}))
+ t.notOk(validate({foo:42}))
+ t.end()
+})
+
+tape('exclusiveMinimum/exclusiveMaximum', function(t) {
+ var validate = validator({
+ type: 'object',
+ properties: {
+ foo: {
+ type: 'number',
+ minimum: 10,
+ maximum: 20,
+ exclusiveMinimum: true,
+ exclusiveMaximum: true
+ }
+ }
+ })
+
+ t.notOk(validate({foo:10}))
+ t.ok(validate({foo:11}))
+ t.notOk(validate({foo:20}))
+ t.ok(validate({foo:19}))
+ t.end()
+})
+
+tape('custom format', function(t) {
+ var validate = validator({
+ type: 'object',
+ properties: {
+ foo: {
+ type: 'string',
+ format: 'as'
+ }
+ }
+ }, {formats: {as:/^a+$/}})
+
+ t.notOk(validate({foo:''}), 'not as')
+ t.notOk(validate({foo:'b'}), 'not as')
+ t.notOk(validate({foo:'aaab'}), 'not as')
+ t.ok(validate({foo:'a'}), 'as')
+ t.ok(validate({foo:'aaaaaa'}), 'as')
+ t.end()
+})
+
+tape('custom format function', function(t) {
+ var validate = validator({
+ type: 'object',
+ properties: {
+ foo: {
+ type: 'string',
+ format: 'as'
+ }
+ }
+ }, {formats: {as:function(s) { return /^a+$/.test(s) } }})
+
+ t.notOk(validate({foo:''}), 'not as')
+ t.notOk(validate({foo:'b'}), 'not as')
+ t.notOk(validate({foo:'aaab'}), 'not as')
+ t.ok(validate({foo:'a'}), 'as')
+ t.ok(validate({foo:'aaaaaa'}), 'as')
+ t.end()
+})
+
+tape('do not mutate schema', function(t) {
+ var sch = {
+ items: [
+ {}
+ ],
+ additionalItems: {
+ type: 'integer'
+ }
+ }
+
+ var copy = JSON.parse(JSON.stringify(sch))
+
+ validator(sch)
+
+ t.same(sch, copy, 'did not mutate')
+ t.end()
+})
+
+tape('#toJSON()', function(t) {
+ var schema = {
+ required: true,
+ type: 'object',
+ properties: {
+ hello: {type:'string', required:true}
+ }
+ }
+
+ var validate = validator(schema)
+
+ t.deepEqual(validate.toJSON(), schema, 'should return original schema')
+ t.end()
+})
+
+tape('external schemas', function(t) {
+ var ext = {type: 'string'}
+ var schema = {
+ required: true,
+ $ref: '#ext'
+ }
+
+ var validate = validator(schema, {schemas: {ext:ext}})
+
+ t.ok(validate('hello string'), 'is a string')
+ t.notOk(validate(42), 'not a string')
+ t.end()
+})
+
+tape('nested required array decl', function(t) {
+ var schema = {
+ properties: {
+ x: {
+ type: 'object',
+ properties: {
+ y: {
+ type: 'object',
+ properties: {
+ z: {
+ type: 'string'
+ }
+ },
+ required: ['z']
+ }
+ }
+ }
+ },
+ required: ['x']
+ }
+
+ var validate = validator(schema)
+
+ t.ok(validate({x: {}}), 'should be valid')
+ t.notOk(validate({}), 'should not be valid')
+ t.strictEqual(validate.errors[0].field, 'data.x', 'should output the missing field')
+ t.end()
+})
+
+tape('verbose mode', function(t) {
+ var schema = {
+ required: true,
+ type: 'object',
+ properties: {
+ hello: {
+ required: true,
+ type: 'string'
+ }
+ }
+ };
+
+ var validate = validator(schema, {verbose: true})
+
+ t.ok(validate({hello: 'string'}), 'should be valid')
+ t.notOk(validate({hello: 100}), 'should not be valid')
+ t.strictEqual(validate.errors[0].value, 100, 'error object should contain the invalid value')
+ t.end()
+})
+
+tape('additional props in verbose mode', function(t) {
+ var schema = {
+ type: 'object',
+ required: true,
+ additionalProperties: false,
+ properties: {
+ foo: {
+ type: 'string'
+ },
+ 'hello world': {
+ type: 'object',
+ required: true,
+ additionalProperties: false,
+ properties: {
+ foo: {
+ type: 'string'
+ }
+ }
+ }
+ }
+ };
+
+ var validate = validator(schema, {verbose: true})
+
+ validate({'hello world': {bar: 'string'}});
+
+ t.strictEqual(validate.errors[0].value, 'data["hello world"].bar', 'should output the path to the additional prop in the error')
+ t.end()
+})
+
+tape('Date.now() is an integer', function(t) {
+ var schema = {type: 'integer'}
+ var validate = validator(schema)
+
+ t.ok(validate(Date.now()), 'is integer')
+ t.end()
+})
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/require-directory/.jshintrc b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/require-directory/.jshintrc
deleted file mode 100644
index e14e4dcbd2..0000000000
--- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/require-directory/.jshintrc
+++ /dev/null
@@ -1,67 +0,0 @@
-{
- "maxerr" : 50,
- "bitwise" : true,
- "camelcase" : true,
- "curly" : true,
- "eqeqeq" : true,
- "forin" : true,
- "immed" : true,
- "indent" : 2,
- "latedef" : true,
- "newcap" : true,
- "noarg" : true,
- "noempty" : true,
- "nonew" : true,
- "plusplus" : true,
- "quotmark" : true,
- "undef" : true,
- "unused" : true,
- "strict" : true,
- "trailing" : true,
- "maxparams" : false,
- "maxdepth" : false,
- "maxstatements" : false,
- "maxcomplexity" : false,
- "maxlen" : false,
- "asi" : false,
- "boss" : false,
- "debug" : false,
- "eqnull" : true,
- "es5" : false,
- "esnext" : false,
- "moz" : false,
- "evil" : false,
- "expr" : true,
- "funcscope" : true,
- "globalstrict" : true,
- "iterator" : true,
- "lastsemic" : false,
- "laxbreak" : false,
- "laxcomma" : false,
- "loopfunc" : false,
- "multistr" : false,
- "proto" : false,
- "scripturl" : false,
- "smarttabs" : false,
- "shadow" : false,
- "sub" : false,
- "supernew" : false,
- "validthis" : false,
- "browser" : true,
- "couch" : false,
- "devel" : true,
- "dojo" : false,
- "jquery" : false,
- "mootools" : false,
- "node" : true,
- "nonstandard" : false,
- "prototypejs" : false,
- "rhino" : false,
- "worker" : false,
- "wsh" : false,
- "yui" : false,
- "nomen" : true,
- "onevar" : true,
- "passfail" : false,
- "white" : true
-}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/package.json b/deps/npm/node_modules/request/node_modules/har-validator/package.json
new file mode 100644
index 0000000000..77cb604286
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/package.json
@@ -0,0 +1,78 @@
+{
+ "version": "1.6.1",
+ "name": "har-validator",
+ "description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema",
+ "author": {
+ "name": "Ahmad Nassri",
+ "email": "ahmad@ahmadnassri.com",
+ "url": "https://www.ahmadnassri.com/"
+ },
+ "homepage": "https://github.com/ahmadnassri/har-validator",
+ "license": "MIT",
+ "main": "./src/index.js",
+ "bin": {
+ "har-validator": "./bin/har-validator"
+ },
+ "keywords": [
+ "har",
+ "http",
+ "archive",
+ "validate",
+ "validator"
+ ],
+ "engines": {
+ "node": ">=0.10"
+ },
+ "files": [
+ "bin",
+ "src"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/ahmadnassri/har-validator"
+ },
+ "bugs": {
+ "url": "https://github.com/ahmadnassri/har-validator/issues"
+ },
+ "scripts": {
+ "test": "standard && mocha --reporter spec",
+ "coverage": "istanbul cover ./node_modules/mocha/bin/_mocha",
+ "codeclimate": "codeclimate < coverage/lcov.info"
+ },
+ "devDependencies": {
+ "codeclimate-test-reporter": "0.0.4",
+ "istanbul": "^0.3.11",
+ "mocha": "^2.2.1",
+ "require-directory": "^2.1.0",
+ "should": "^5.2.0",
+ "standard": "^3.3.0"
+ },
+ "dependencies": {
+ "bluebird": "^2.9.21",
+ "chalk": "^1.0.0",
+ "commander": "^2.7.1",
+ "is-my-json-valid": "^2.10.0"
+ },
+ "gitHead": "aa68c8efacea7437bb545d816a14e20db444fde5",
+ "_id": "har-validator@1.6.1",
+ "_shasum": "baef452cde645eff7d26562e8e749d7fd000b7fd",
+ "_from": "har-validator@>=1.4.0 <2.0.0",
+ "_npmVersion": "2.5.1",
+ "_nodeVersion": "0.12.1",
+ "_npmUser": {
+ "name": "ahmadnassri",
+ "email": "ahmad@ahmadnassri.com"
+ },
+ "maintainers": [
+ {
+ "name": "ahmadnassri",
+ "email": "ahmad@ahmadnassri.com"
+ }
+ ],
+ "dist": {
+ "shasum": "baef452cde645eff7d26562e8e749d7fd000b7fd",
+ "tarball": "http://registry.npmjs.org/har-validator/-/har-validator-1.6.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-1.6.1.tgz"
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/error.js b/deps/npm/node_modules/request/node_modules/har-validator/src/error.js
new file mode 100644
index 0000000000..fc08a87218
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/error.js
@@ -0,0 +1,10 @@
+'use strict'
+
+function ValidationError (errors) {
+ this.name = 'ValidationError'
+ this.errors = errors
+}
+
+ValidationError.prototype = Error.prototype
+
+module.exports = ValidationError
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/index.js b/deps/npm/node_modules/request/node_modules/har-validator/src/index.js
new file mode 100644
index 0000000000..6d521677d1
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/index.js
@@ -0,0 +1,39 @@
+'use strict'
+
+var schemas = require('./schemas')
+var ValidationError = require('./error')
+var validator = require('is-my-json-valid')
+
+var runner = function (schema, data, cb) {
+ var validate = validator(schema, {
+ greedy: true,
+ verbose: true,
+ schemas: schemas
+ })
+
+ var valid = false
+
+ if (data !== undefined) {
+ // execute is-my-json-valid
+ valid = validate(data)
+ }
+
+ // callback?
+ if (!cb) {
+ return validate.errors ? false : true
+ } else {
+ return cb(validate.errors ? new ValidationError(validate.errors) : null, valid)
+ }
+
+ return valid
+}
+
+module.exports = function (data, cb) {
+ return runner(schemas.har, data, cb)
+}
+
+Object.keys(schemas).map(function (name) {
+ module.exports[name] = function (data, cb) {
+ return runner(schemas[name], data, cb)
+ }
+})
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cache.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cache.json
new file mode 100644
index 0000000000..a3ab682d53
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cache.json
@@ -0,0 +1,13 @@
+{
+ "properties": {
+ "beforeRequest": {
+ "$ref": "#cacheEntry"
+ },
+ "afterRequest": {
+ "$ref": "#cacheEntry"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cacheEntry.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cacheEntry.json
new file mode 100644
index 0000000000..dce27c5d8e
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cacheEntry.json
@@ -0,0 +1,25 @@
+{
+ "optional": true,
+ "required": [
+ "lastAccess",
+ "eTag",
+ "hitCount"
+ ],
+ "properties": {
+ "expires": {
+ "type": "string"
+ },
+ "lastAccess": {
+ "type": "string"
+ },
+ "eTag": {
+ "type": "string"
+ },
+ "hitCount": {
+ "type": "integer"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/content.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/content.json
new file mode 100644
index 0000000000..3710d7939b
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/content.json
@@ -0,0 +1,27 @@
+{
+ "type": "object",
+ "required": [
+ "size",
+ "mimeType"
+ ],
+ "properties": {
+ "size": {
+ "type": "integer"
+ },
+ "compression": {
+ "type": "integer"
+ },
+ "mimeType": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ },
+ "encoding": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cookie.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cookie.json
new file mode 100644
index 0000000000..5768181838
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/cookie.json
@@ -0,0 +1,34 @@
+{
+ "type": "object",
+ "required": [
+ "name",
+ "value"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "path": {
+ "type": "string"
+ },
+ "domain": {
+ "type": "string"
+ },
+ "expires": {
+ "type": ["string", "null"],
+ "format": "date-time"
+ },
+ "httpOnly": {
+ "type": "boolean"
+ },
+ "secure": {
+ "type": "boolean"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/creator.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/creator.json
new file mode 100644
index 0000000000..5058600646
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/creator.json
@@ -0,0 +1,18 @@
+{
+ "type": "object",
+ "required": [
+ "name",
+ "version"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/entry.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/entry.json
new file mode 100644
index 0000000000..7acdc1b82c
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/entry.json
@@ -0,0 +1,48 @@
+{
+ "type": "object",
+ "optional": true,
+ "required": [
+ "startedDateTime",
+ "time",
+ "request",
+ "response",
+ "cache",
+ "timings"
+ ],
+ "properties": {
+ "pageref": {
+ "type": "string"
+ },
+ "startedDateTime": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"
+ },
+ "time": {
+ "type": "number",
+ "min": 0
+ },
+ "request": {
+ "$ref": "#request"
+ },
+ "response": {
+ "$ref": "#response"
+ },
+ "cache": {
+ "$ref": "#cache"
+ },
+ "timings": {
+ "$ref": "#timings"
+ },
+ "serverIPAddress": {
+ "type": "string",
+ "format": "ipv4"
+ },
+ "connection": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/har.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/har.json
new file mode 100644
index 0000000000..b542782db4
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/har.json
@@ -0,0 +1,11 @@
+{
+ "type": "object",
+ "required": [
+ "log"
+ ],
+ "properties": {
+ "log": {
+ "$ref": "#log"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/index.js b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/index.js
new file mode 100644
index 0000000000..7b6db7dabb
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/index.js
@@ -0,0 +1,49 @@
+'use strict'
+
+var schemas = {
+ cache: require('./cache.json'),
+ cacheEntry: require('./cacheEntry.json'),
+ content: require('./content.json'),
+ cookie: require('./cookie.json'),
+ creator: require('./creator.json'),
+ entry: require('./entry.json'),
+ har: require('./har.json'),
+ log: require('./log.json'),
+ page: require('./page.json'),
+ pageTimings: require('./pageTimings.json'),
+ postData: require('./postData.json'),
+ record: require('./record.json'),
+ request: require('./request.json'),
+ response: require('./response.json'),
+ timings: require('./timings.json')
+}
+
+// is-my-json-valid does not provide meaningful error messages for external schemas
+// this is a workaround
+schemas.cache.properties.beforeRequest = schemas.cacheEntry
+schemas.cache.properties.afterRequest = schemas.cacheEntry
+
+schemas.page.properties.pageTimings = schemas.pageTimings
+
+schemas.request.properties.cookies.items = schemas.cookie
+schemas.request.properties.headers.items = schemas.record
+schemas.request.properties.queryString.items = schemas.record
+schemas.request.properties.postData = schemas.postData
+
+schemas.response.properties.cookies.items = schemas.cookie
+schemas.response.properties.headers.items = schemas.record
+schemas.response.properties.content = schemas.content
+
+schemas.entry.properties.request = schemas.request
+schemas.entry.properties.response = schemas.response
+schemas.entry.properties.cache = schemas.cache
+schemas.entry.properties.timings = schemas.timings
+
+schemas.log.properties.creator = schemas.creator
+schemas.log.properties.browser = schemas.creator
+schemas.log.properties.pages.items = schemas.page
+schemas.log.properties.entries.items = schemas.entry
+
+schemas.har.properties.log = schemas.log
+
+module.exports = schemas
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/log.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/log.json
new file mode 100644
index 0000000000..0c91d38bf5
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/log.json
@@ -0,0 +1,34 @@
+{
+ "type": "object",
+ "required": [
+ "version",
+ "creator",
+ "entries"
+ ],
+ "properties": {
+ "version": {
+ "type": "string"
+ },
+ "creator": {
+ "$ref": "#creator"
+ },
+ "browser": {
+ "$ref": "#creator"
+ },
+ "pages": {
+ "type": "array",
+ "items": {
+ "$ref": "#page"
+ }
+ },
+ "entries": {
+ "type": "array",
+ "items": {
+ "$ref": "#entry"
+ }
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/page.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/page.json
new file mode 100644
index 0000000000..ef64abe5c5
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/page.json
@@ -0,0 +1,30 @@
+{
+ "type": "object",
+ "optional": true,
+ "required": [
+ "startedDateTime",
+ "id",
+ "title",
+ "pageTimings"
+ ],
+ "properties": {
+ "startedDateTime": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"
+ },
+ "id": {
+ "type": "string",
+ "unique": true
+ },
+ "title": {
+ "type": "string"
+ },
+ "pageTimings": {
+ "$ref": "#pageTimings"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/pageTimings.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/pageTimings.json
new file mode 100644
index 0000000000..adc83cccd0
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/pageTimings.json
@@ -0,0 +1,16 @@
+{
+ "type": "object",
+ "properties": {
+ "onContentLoad": {
+ "type": "number",
+ "min": -1
+ },
+ "onLoad": {
+ "type": "number",
+ "min": -1
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/postData.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/postData.json
new file mode 100644
index 0000000000..91958b64a5
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/postData.json
@@ -0,0 +1,41 @@
+{
+ "type": "object",
+ "optional": true,
+ "required": [
+ "mimeType"
+ ],
+ "properties": {
+ "mimeType": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ },
+ "params": {
+ "type": "array",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "fileName": {
+ "type": "string"
+ },
+ "contentType": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/record.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/record.json
new file mode 100644
index 0000000000..04acd51948
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/record.json
@@ -0,0 +1,18 @@
+{
+ "type": "object",
+ "required": [
+ "name",
+ "value"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/request.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/request.json
new file mode 100644
index 0000000000..639af06dc2
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/request.json
@@ -0,0 +1,55 @@
+{
+ "type": "object",
+ "required": [
+ "method",
+ "url",
+ "httpVersion",
+ "cookies",
+ "headers",
+ "queryString",
+ "headersSize",
+ "bodySize"
+ ],
+ "properties": {
+ "method": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string",
+ "format": "uri"
+ },
+ "httpVersion": {
+ "type": "string"
+ },
+ "cookies": {
+ "type": "array",
+ "items": {
+ "$ref": "#cookie"
+ }
+ },
+ "headers": {
+ "type": "array",
+ "items": {
+ "$ref": "#record"
+ }
+ },
+ "queryString": {
+ "type": "array",
+ "items": {
+ "$ref": "#record"
+ }
+ },
+ "postData": {
+ "$ref": "#postData"
+ },
+ "headersSize": {
+ "type": "integer"
+ },
+ "bodySize": {
+ "type": "integer"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/response.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/response.json
new file mode 100644
index 0000000000..de99c55bb9
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/response.json
@@ -0,0 +1,52 @@
+{
+ "type": "object",
+ "required": [
+ "status",
+ "statusText",
+ "httpVersion",
+ "cookies",
+ "headers",
+ "content",
+ "redirectURL",
+ "headersSize",
+ "bodySize"
+ ],
+ "properties": {
+ "status": {
+ "type": "integer"
+ },
+ "statusText": {
+ "type": "string"
+ },
+ "httpVersion": {
+ "type": "string"
+ },
+ "cookies": {
+ "type": "array",
+ "items": {
+ "$ref": "#cookie"
+ }
+ },
+ "headers": {
+ "type": "array",
+ "items": {
+ "$ref": "#record"
+ }
+ },
+ "content": {
+ "$ref": "#content"
+ },
+ "redirectURL": {
+ "type": "string"
+ },
+ "headersSize": {
+ "type": "integer"
+ },
+ "bodySize": {
+ "type": "integer"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/timings.json b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/timings.json
new file mode 100644
index 0000000000..066ef71a14
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/har-validator/src/schemas/timings.json
@@ -0,0 +1,40 @@
+{
+ "required": [
+ "send",
+ "wait",
+ "receive"
+ ],
+ "properties": {
+ "dns": {
+ "type": "number",
+ "min": -1
+ },
+ "connect": {
+ "type": "number",
+ "min": -1
+ },
+ "blocked": {
+ "type": "number",
+ "min": -1
+ },
+ "send": {
+ "type": "number",
+ "min": -1
+ },
+ "wait": {
+ "type": "number",
+ "min": -1
+ },
+ "receive": {
+ "type": "number",
+ "min": -1
+ },
+ "ssl": {
+ "type": "number",
+ "min": -1
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml
index 047f7e3d5e..c84aade8c3 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml
@@ -2,4 +2,6 @@ language: node_js
node_js:
- 0.10
+ - 0.12
+ - iojs
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/Makefile b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/Makefile
deleted file mode 100755
index 07a7f67126..0000000000
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-test:
- @node node_modules/lab/bin/lab -a code
-test-cov:
- @node node_modules/lab/bin/lab -a code -t 100
-test-cov-html:
- @node node_modules/lab/bin/lab -a code -r html -o coverage.html
-
-.PHONY: test test-cov test-cov-html
-
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md
index c6ada264aa..c28507d609 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md
@@ -9,6 +9,7 @@ Lead Maintainer: [Adam Bretz](https://github.com/arb)
**boom** provides a set of utilities for returning HTTP errors. Each utility returns a `Boom` error response
object (instance of `Error`) which includes the following properties:
- `isBoom` - if `true`, indicates this is a `Boom` object instance.
+- `isServer` - convenience bool indicating status code >= 500.
- `message` - the error message.
- `output` - the formatted response. Can be directly manipulated after object construction to return a custom
error response. Allowed root keys:
@@ -453,7 +454,7 @@ Generates the following response payload:
### `Boom.tooManyRequests([message], [data])`
-Returns a 422 Too Many Requests error where:
+Returns a 429 Too Many Requests error where:
- `message` - optional message.
- `data` - optional additional error data.
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js
index c34bf6a19a..388cac7680 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js
@@ -27,9 +27,10 @@ exports.create = function (statusCode, message, data) {
internals.initialize = function (error, statusCode, message) {
- Hoek.assert(!isNaN(parseFloat(statusCode)) && isFinite(statusCode) && statusCode >= 400, 'First argument must be a number (400+):', statusCode);
+ Hoek.assert(Hoek.isInteger(statusCode) && statusCode >= 400, 'First argument must be a number (400+):', statusCode);
error.isBoom = true;
+ error.isServer = statusCode >= 500;
if (!error.hasOwnProperty('data')) {
error.data = null;
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json
index c5f765de26..59152fd7bb 100755..100644
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json
@@ -1,7 +1,7 @@
{
"name": "boom",
"description": "HTTP-friendly error objects",
- "version": "2.6.1",
+ "version": "2.7.0",
"repository": {
"type": "git",
"url": "git://github.com/hapijs/boom"
@@ -22,7 +22,8 @@
"lab": "5.x.x"
},
"scripts": {
- "test": "make test-cov"
+ "test": "lab -a code -t 100",
+ "test-cov-html": "lab -a code -r html -o coverage.html"
},
"licenses": [
{
@@ -30,18 +31,19 @@
"url": "http://github.com/hapijs/boom/raw/master/LICENSE"
}
],
- "gitHead": "860d6f8b0db89b263418b8575c65560482cbd1ba",
+ "gitHead": "fe25a73234007ebb4fa8f8071592f35240e67c1b",
"bugs": {
"url": "https://github.com/hapijs/boom/issues"
},
"homepage": "https://github.com/hapijs/boom",
- "_id": "boom@2.6.1",
- "_shasum": "4dc8ef9b6dfad9c43bbbfbe71fa4c21419f22753",
+ "_id": "boom@2.7.0",
+ "_shasum": "47c6c7f62dc6d68742a75c4010b035c62615d265",
"_from": "boom@>=2.0.0 <3.0.0",
- "_npmVersion": "1.4.28",
+ "_npmVersion": "2.7.0",
+ "_nodeVersion": "0.10.36",
"_npmUser": {
- "name": "hueniverse",
- "email": "eran@hueniverse.com"
+ "name": "arb",
+ "email": "arbretz@gmail.com"
},
"maintainers": [
{
@@ -58,10 +60,9 @@
}
],
"dist": {
- "shasum": "4dc8ef9b6dfad9c43bbbfbe71fa4c21419f22753",
- "tarball": "http://registry.npmjs.org/boom/-/boom-2.6.1.tgz"
+ "shasum": "47c6c7f62dc6d68742a75c4010b035c62615d265",
+ "tarball": "http://registry.npmjs.org/boom/-/boom-2.7.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/boom/-/boom-2.6.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/boom/-/boom-2.7.0.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js
index 68ae4172c9..f2b71276d1 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js
@@ -95,6 +95,7 @@ describe('create()', function () {
var error = Boom.unauthorized(null);
expect(error.output.payload.message).to.not.exist();
+ expect(error.isServer).to.be.false();
done();
});
@@ -126,7 +127,10 @@ describe('badRequest()', function () {
it('returns a 400 error statusCode', function (done) {
- expect(Boom.badRequest().output.statusCode).to.equal(400);
+ var error = Boom.badRequest();
+
+ expect(error.output.statusCode).to.equal(400);
+ expect(error.isServer).to.be.false();
done();
});
@@ -511,6 +515,7 @@ describe('internal()', function () {
var err = Boom.internal('my message');
expect(err.message).to.equal('my message');
+ expect(err.isServer).to.true();
expect(err.output.payload.message).to.equal('An internal server error occurred');
done();
});
@@ -529,6 +534,7 @@ describe('internal()', function () {
catch (err) {
var boom = Boom.internal('Someting bad', err);
expect(boom.message).to.equal('Someting bad: Unexpected end of input');
+ expect(boom.isServer).to.be.true();
done();
}
});
@@ -587,6 +593,7 @@ describe('badImplementation()', function () {
var err = Boom.badImplementation();
expect(err.output.statusCode).to.equal(500);
expect(err.isDeveloperError).to.equal(true);
+ expect(err.isServer).to.be.true();
done();
});
});
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
index 18fee925f1..3d56485df1 100755..100644
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
@@ -60,6 +60,5 @@
"tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-2.0.4.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.4.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.4.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml
index 047f7e3d5e..c84aade8c3 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml
@@ -2,4 +2,6 @@ language: node_js
node_js:
- 0.10
+ - 0.12
+ - iojs
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md
index a22fa06e97..b5f4d8a20f 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md
@@ -72,7 +72,7 @@ Hoek provides several helpful methods for objects and arrays.
### clone(obj)
-This method is used to clone an object or an array. A *deep copy* is made (duplicates everything, including values that are objects).
+This method is used to clone an object or an array. A *deep copy* is made (duplicates everything, including values that are objects, as well as non-enumerable properties).
```javascript
@@ -179,12 +179,14 @@ var options = { server: { port: 8080 } };
var config = Hoek.applyToDefaults(defaults, options); // results in { server: { port: 8080 }, name: 'example' }
```
-### deepEqual(b, a)
+### deepEqual(b, a, [options])
-Performs a deep comparison of the two values including support for circular dependencies, prototype, and properties.
+Performs a deep comparison of the two values including support for circular dependencies, prototype, and properties. To skip prototype comparisons, use `options.prototype = false`
```javascript
-Hoek.deepEqual({ a: [1, 2], b: 'string', c: { d: true } }, { a: [1, 2], b: 'string', c: { d: true } });
+Hoek.deepEqual({ a: [1, 2], b: 'string', c: { d: true } }, { a: [1, 2], b: 'string', c: { d: true } }); //results in true
+Hoek.deepEqual(Object.create(null), {}, { prototype: false }); //results in true
+Hoek.deepEqual(Object.create(null), {}); //results in false
```
### unique(array, key)
@@ -499,7 +501,7 @@ nextFn();
console.log('Do this first');
// Results in:
-//
+//
// Do this first
// Do this later
```
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js
index 9afabcddb3..02f8f42be9 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js
@@ -61,17 +61,17 @@ exports.clone = function (obj, seen) {
seen.copy.push(newObj);
if (cloneDeep) {
- for (var i in obj) {
- if (obj.hasOwnProperty(i)) {
- var descriptor = Object.getOwnPropertyDescriptor(obj, i);
- if (descriptor.get ||
- descriptor.set) {
+ var keys = Object.getOwnPropertyNames(obj);
+ for (var i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ var descriptor = Object.getOwnPropertyDescriptor(obj, key);
+ if (descriptor.get ||
+ descriptor.set) {
- Object.defineProperty(newObj, i, descriptor);
- }
- else {
- newObj[i] = exports.clone(obj[i], seen);
- }
+ Object.defineProperty(newObj, key, descriptor);
+ }
+ else {
+ newObj[key] = exports.clone(obj[key], seen);
}
}
}
@@ -81,9 +81,9 @@ exports.clone = function (obj, seen) {
// Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied
-
+/*eslint-disable */
exports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) {
-
+/*eslint-enable */
exports.assert(target && typeof target === 'object', 'Invalid target value: must be an object');
exports.assert(source === null || source === undefined || typeof source === 'object', 'Invalid source value: must be null, undefined, or an object');
@@ -247,9 +247,12 @@ exports.applyToDefaultsWithShallow = function (defaults, options, keys) {
// Deep object or array comparison
-exports.deepEqual = function (obj, ref, seen) {
+exports.deepEqual = function (obj, ref, options, seen) {
+
+ options = options || { prototype: true };
var type = typeof obj;
+
if (type !== typeof ref) {
return false;
}
@@ -316,20 +319,27 @@ exports.deepEqual = function (obj, ref, seen) {
return (ref instanceof RegExp && obj.toString() === ref.toString());
}
- if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) {
+ if (options.prototype) {
+ if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) {
+ return false;
+ }
+ }
+
+ var keys = Object.getOwnPropertyNames(obj);
+
+ if (keys.length !== Object.getOwnPropertyNames(ref).length) {
return false;
}
- var keys = Object.keys(obj);
for (var k = 0, kl = keys.length; k < kl; ++k) {
var key = keys[k];
var descriptor = Object.getOwnPropertyDescriptor(obj, key);
if (descriptor.get) {
- if (!exports.deepEqual(descriptor, Object.getOwnPropertyDescriptor(ref, key), seen)) {
+ if (!exports.deepEqual(descriptor, Object.getOwnPropertyDescriptor(ref, key), options, seen)) {
return false;
}
}
- else if (!exports.deepEqual(obj[key], ref[key], seen)) {
+ else if (!exports.deepEqual(obj[key], ref[key], options, seen)) {
return false;
}
}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json
index 53b174e956..c2f8514e95 100644
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json
@@ -1,7 +1,7 @@
{
"name": "hoek",
"description": "General purpose node utilities",
- "version": "2.11.0",
+ "version": "2.12.0",
"repository": {
"type": "git",
"url": "git://github.com/hapijs/hoek"
@@ -27,16 +27,16 @@
"url": "http://github.com/hapijs/hoek/raw/master/LICENSE"
}
],
- "gitHead": "6f034aa12206f2ab740a9ea6ca64a4d5c7b7dfba",
+ "gitHead": "9bbb8f149b5b824f66b47ae4cf3afb1e2877396f",
"bugs": {
"url": "https://github.com/hapijs/hoek/issues"
},
"homepage": "https://github.com/hapijs/hoek",
- "_id": "hoek@2.11.0",
- "_shasum": "e588ec66a6b405b0e7140308720e1e1cd4f035b7",
+ "_id": "hoek@2.12.0",
+ "_shasum": "5d1196e0bf20c5cec957e8927101164effdaf1c9",
"_from": "hoek@>=2.0.0 <3.0.0",
- "_npmVersion": "2.1.9",
- "_nodeVersion": "0.10.32",
+ "_npmVersion": "2.6.1",
+ "_nodeVersion": "0.10.36",
"_npmUser": {
"name": "nlf",
"email": "quitlahok@gmail.com"
@@ -56,10 +56,9 @@
}
],
"dist": {
- "shasum": "e588ec66a6b405b0e7140308720e1e1cd4f035b7",
- "tarball": "http://registry.npmjs.org/hoek/-/hoek-2.11.0.tgz"
+ "shasum": "5d1196e0bf20c5cec957e8927101164effdaf1c9",
+ "tarball": "http://registry.npmjs.org/hoek/-/hoek-2.12.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/hoek/-/hoek-2.11.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/hoek/-/hoek-2.12.0.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js
index aad04356d5..1c45a601a1 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js
@@ -331,6 +331,28 @@ describe('clone()', function () {
expect(copy._test).to.equal(4);
done();
});
+
+ it('clones an object with non-enumerable properties', function (done) {
+
+ var obj = {
+ _test: 0
+ };
+
+ Object.defineProperty(obj, 'test', {
+ enumerable: false,
+ configurable: true,
+ set: function (value) {
+
+ this._test = value - 1;
+ }
+ });
+
+ var copy = Hoek.clone(obj);
+ expect(copy._test).to.equal(0);
+ copy.test = 5;
+ expect(copy._test).to.equal(4);
+ done();
+ });
});
describe('merge()', function () {
@@ -986,7 +1008,7 @@ describe('deepEqual()', function () {
var inner = function () {
- expect(Hoek.deepEqual(arg1, arguments)).to.be.true();
+ expect(Hoek.deepEqual(arg1, arguments)).to.be.false(); // callee is not the same
};
inner();
@@ -998,7 +1020,7 @@ describe('deepEqual()', function () {
it('compares dates', function (done) {
- expect(Hoek.deepEqual(new Date(), new Date())).to.be.true();
+ expect(Hoek.deepEqual(new Date(2015, 1, 1), new Date(2015, 1, 1))).to.be.true();
expect(Hoek.deepEqual(new Date(100), new Date(101))).to.be.false();
expect(Hoek.deepEqual(new Date(), {})).to.be.false();
done();
@@ -1130,6 +1152,24 @@ describe('deepEqual()', function () {
expect(Hoek.deepEqual(a, { b: 'c' })).to.be.false();
done();
});
+
+ it('compares an object with an empty object', function (done) {
+
+ var a = { a: 1, b: 2 };
+
+ expect(Hoek.deepEqual({}, a)).to.be.false();
+ expect(Hoek.deepEqual(a, {})).to.be.false();
+ done();
+ });
+
+ it('compares an object ignoring the prototype', function (done) {
+
+ var a = Object.create(null);
+ var b = {};
+
+ expect(Hoek.deepEqual(a, b, { prototype: false})).to.be.true();
+ done();
+ });
});
describe('unique()', function () {
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
index 45356c8c7a..6fe68c1b2a 100755..100644
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
@@ -60,6 +60,5 @@
"tarball": "http://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/package.json b/deps/npm/node_modules/request/node_modules/hawk/package.json
index 4fe0064cae..3986e1172e 100755..100644
--- a/deps/npm/node_modules/request/node_modules/hawk/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/package.json
@@ -66,6 +66,5 @@
"tarball": "http://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
index 8c68193cd1..aca7cedeb9 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
@@ -30,7 +30,7 @@
},
"scripts": {
"pretest": "which gjslint; if [[ \"$?\" = 0 ]] ; then gjslint --nojsdoc -r lib -r tst; else echo \"Missing gjslint. Skipping lint\"; fi",
- "test": "tap ./tst"
+ "test": "./node_modules/.bin/tap ./tst"
},
"_npmUser": {
"name": "mcavage",
@@ -54,10 +54,5 @@
"directories": {},
"_shasum": "559be18376d08a4ec4dbe80877d27818639b2df7",
"_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz",
- "_from": "asn1@0.1.11",
- "bugs": {
- "url": "https://github.com/mcavage/node-asn1/issues"
- },
- "readme": "ERROR: No README data found!",
- "homepage": "https://github.com/mcavage/node-asn1"
+ "_from": "asn1@0.1.11"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
index 1b935b6b42..0950815821 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
@@ -39,8 +39,5 @@
],
"directories": {},
"_shasum": "ee74009413002d84cec7219c6ac811812e723160",
- "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz",
- "readme": "ERROR: No README data found!",
- "homepage": "https://github.com/mcavage/node-assert-plus",
- "scripts": {}
+ "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
index 4e1d86768d..9395bfcf8c 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
@@ -34,10 +34,5 @@
"directories": {},
"_shasum": "82c18c2461f74114ef16c135224ad0b9144ca12f",
"_resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz",
- "_from": "ctype@0.5.3",
- "bugs": {
- "url": "https://github.com/rmustacc/node-ctype/issues"
- },
- "readme": "ERROR: No README data found!",
- "scripts": {}
+ "_from": "ctype@0.5.3"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/package.json b/deps/npm/node_modules/request/node_modules/http-signature/package.json
index 2dd58f537f..d93952bd37 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/package.json
@@ -67,6 +67,5 @@
"shasum": "4fbdac132559aa8323121e540779c0a012b27e66",
"tarball": "http://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz"
},
- "directories": {},
- "readme": "ERROR: No README data found!"
+ "directories": {}
}
diff --git a/deps/npm/node_modules/request/node_modules/isstream/LICENSE b/deps/npm/node_modules/request/node_modules/isstream/LICENSE
deleted file mode 100644
index e7554b50ca..0000000000
--- a/deps/npm/node_modules/request/node_modules/isstream/LICENSE
+++ /dev/null
@@ -1,39 +0,0 @@
-Copyright 2014, Rod Vagg (the "Original Author")
-All rights reserved.
-
-MIT +no-false-attribs License
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-Distributions of all or part of the Software intended to be used
-by the recipients as they would use the unmodified Software,
-containing modifications that substantially alter, remove, or
-disable functionality of the Software, outside of the documented
-configuration mechanisms provided by the Software, shall be
-modified such that the Original Author's bug reporting email
-addresses and urls are either replaced with the contact information
-of the parties responsible for the changes, or removed entirely.
-
-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.
-
-
-Except where noted, this license applies to any and all software
-programs and associated documentation files created by the
-Original Author, when distributed with the Software.
diff --git a/deps/npm/node_modules/request/node_modules/isstream/LICENSE.md b/deps/npm/node_modules/request/node_modules/isstream/LICENSE.md
new file mode 100644
index 0000000000..43f7153f9f
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/isstream/LICENSE.md
@@ -0,0 +1,11 @@
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2015 Rod Vagg
+---------------------------
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/isstream/README.md b/deps/npm/node_modules/request/node_modules/isstream/README.md
index e60fc8acf3..06770e82f2 100644
--- a/deps/npm/node_modules/request/node_modules/isstream/README.md
+++ b/deps/npm/node_modules/request/node_modules/isstream/README.md
@@ -63,4 +63,4 @@ isDuplex(new Stream.PassThrough()) // true
## License
-**isStream** is Copyright (c) 2014 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
+**isStream** is Copyright (c) 2015 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
diff --git a/deps/npm/node_modules/request/node_modules/isstream/package.json b/deps/npm/node_modules/request/node_modules/isstream/package.json
index c3c796d773..2c03471d13 100644
--- a/deps/npm/node_modules/request/node_modules/isstream/package.json
+++ b/deps/npm/node_modules/request/node_modules/isstream/package.json
@@ -1,6 +1,6 @@
{
"name": "isstream",
- "version": "0.1.1",
+ "version": "0.1.2",
"description": "Determine if an object is a Stream",
"main": "isstream.js",
"scripts": {
@@ -33,11 +33,12 @@
"url": "https://github.com/rvagg/isstream/issues"
},
"homepage": "https://github.com/rvagg/isstream",
- "gitHead": "0406cfe2677231b7b23a229a61b15999bf60ce67",
- "_id": "isstream@0.1.1",
- "_shasum": "48332c5999893996ba253c81c7bd6e7ae0905c4f",
+ "gitHead": "cd39cba6da939b4fc9110825203adc506422c3dc",
+ "_id": "isstream@0.1.2",
+ "_shasum": "47e63f7af55afa6f92e1500e690eb8b8529c099a",
"_from": "isstream@>=0.1.1 <0.2.0",
- "_npmVersion": "1.4.28",
+ "_npmVersion": "2.6.1",
+ "_nodeVersion": "1.4.3",
"_npmUser": {
"name": "rvagg",
"email": "rod@vagg.org"
@@ -49,10 +50,9 @@
}
],
"dist": {
- "shasum": "48332c5999893996ba253c81c7bd6e7ae0905c4f",
- "tarball": "http://registry.npmjs.org/isstream/-/isstream-0.1.1.tgz"
+ "shasum": "47e63f7af55afa6f92e1500e690eb8b8529c099a",
+ "tarball": "http://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/json-stringify-safe/package.json b/deps/npm/node_modules/request/node_modules/json-stringify-safe/package.json
index 90549cb6a6..7551573fd7 100644
--- a/deps/npm/node_modules/request/node_modules/json-stringify-safe/package.json
+++ b/deps/npm/node_modules/request/node_modules/json-stringify-safe/package.json
@@ -44,7 +44,5 @@
],
"directories": {},
"_shasum": "4c1f228b5050837eba9d21f50c2e6e320624566e",
- "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz",
- "readme": "ERROR: No README data found!",
- "homepage": "https://github.com/isaacs/json-stringify-safe"
+ "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md b/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md
index 5487d0d4c9..aa7cdf1691 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md
+++ b/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md
@@ -1,3 +1,16 @@
+2.0.10 / 2015-03-13
+===================
+
+ * deps: mime-db@~1.8.0
+ - Add new mime types
+
+2.0.9 / 2015-02-09
+==================
+
+ * deps: mime-db@~1.7.0
+ - Add new mime types
+ - Community extensions ownership transferred from `node-mime`
+
2.0.8 / 2015-01-29
==================
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/README.md b/deps/npm/node_modules/request/node_modules/mime-types/README.md
index 99d658b8b3..8fea7ff4c2 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/README.md
+++ b/deps/npm/node_modules/request/node_modules/mime-types/README.md
@@ -57,6 +57,9 @@ Create a full content-type header given a content-type or extension.
```js
mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
mime.contentType('file.json') // 'application/json; charset=utf-8'
+
+// from a full path
+mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8'
```
### mime.extension(type)
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
index bd218ebf4d..3c6674819a 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
+++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -1,3 +1,17 @@
+1.8.0 / 2015-03-13
+==================
+
+ * Add `application/vnd.citationstyles.style+xml`
+ * Add `application/vnd.fastcopy-disk-image`
+ * Add `application/vnd.gov.sk.xmldatacontainer+xml`
+ * Add extension `.jsonld` to `application/ld+json`
+
+1.7.0 / 2015-02-08
+==================
+
+ * Add `application/vnd.gerber`
+ * Add `application/vnd.msa-disk-image`
+
1.6.1 / 2015-02-05
==================
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md
index 25c2a3a3b7..1dde234905 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md
+++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md
@@ -51,16 +51,11 @@ Each mime type has the following properties:
If unknown, every property could be `undefined`.
-## Repository Structure
-
-- `scripts` - these are scripts to run to build the database
-- `src/` - this is a folder of files created from remote sources like Apache and IANA
-- `lib/` - this is a folder of our own custom sources and db, which will be merged into `db.json`
-- `db.json` - the final built JSON file for end-user usage
-
## Contributing
-To edit the database, only make PRs against files in the `lib/` folder.
+To edit the database, only make PRs against `src/custom.json` or
+`src/custom-suffix.json`.
+
To update the build, run `npm run update`.
## Adding Custom Media Types
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
index 35682db874..f9f3515b03 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
+++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
@@ -479,7 +479,8 @@
},
"application/ld+json": {
"source": "iana",
- "compressible": true
+ "compressible": true,
+ "extensions": ["jsonld"]
},
"application/link-format": {
"source": "iana"
@@ -1358,6 +1359,9 @@
"application/vnd.cirpack.isdn-ext": {
"source": "iana"
},
+ "application/vnd.citationstyles.style+xml": {
+ "source": "iana"
+ },
"application/vnd.claymore": {
"source": "iana",
"extensions": ["cla"]
@@ -1769,6 +1773,9 @@
"application/vnd.f-secure.mobile": {
"source": "iana"
},
+ "application/vnd.fastcopy-disk-image": {
+ "source": "iana"
+ },
"application/vnd.fdf": {
"source": "iana",
"extensions": ["fdf"]
@@ -1900,6 +1907,9 @@
"source": "iana",
"extensions": ["g3w"]
},
+ "application/vnd.gerber": {
+ "source": "iana"
+ },
"application/vnd.globalplatform.card-content-mgt": {
"source": "iana"
},
@@ -1926,6 +1936,9 @@
"application/vnd.gov.sk.e-form+zip": {
"source": "iana"
},
+ "application/vnd.gov.sk.xmldatacontainer+xml": {
+ "source": "iana"
+ },
"application/vnd.grafeq": {
"source": "iana",
"extensions": ["gqf","gqs"]
@@ -2599,6 +2612,9 @@
"compressible": false,
"extensions": ["xps"]
},
+ "application/vnd.msa-disk-image": {
+ "source": "iana"
+ },
"application/vnd.mseq": {
"source": "iana",
"extensions": ["mseq"]
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
index 9b73a7cea4..63b57485ce 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
+++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
@@ -1,18 +1,18 @@
{
"name": "mime-db",
"description": "Media Type Database",
- "version": "1.6.1",
- "author": {
- "name": "Jonathan Ong",
- "email": "me@jongleberry.com",
- "url": "http://jongleberry.com"
- },
+ "version": "1.8.0",
"contributors": [
{
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
{
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ {
"name": "Robert Kieffer",
"email": "robert@broofa.com",
"url": "http://github.com/broofa"
@@ -33,13 +33,14 @@
"url": "https://github.com/jshttp/mime-db"
},
"devDependencies": {
- "co": "4",
+ "bluebird": "~2.9.14",
+ "co": "~4.4.0",
"cogent": "1",
- "csv-parse": "0",
- "gnode": "0.1.0",
- "istanbul": "0.3.5",
+ "csv-parse": "0.0.9",
+ "gnode": "0.1.1",
+ "istanbul": "0.3.7",
"mocha": "~1.21.4",
- "raw-body": "~1.3.2",
+ "raw-body": "~1.3.3",
"stream-to-array": "2"
},
"files": [
@@ -53,20 +54,21 @@
"node": ">= 0.6"
},
"scripts": {
- "update": "gnode scripts/extensions && gnode scripts/types && node scripts/build",
- "clean": "rm src/*",
+ "build": "node scripts/build",
+ "fetch": "gnode scripts/extensions && gnode scripts/types",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
- "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "update": "npm run fetch && npm run build"
},
- "gitHead": "7f07ff87267625b73dcf73b97b2530a37a85d079",
+ "gitHead": "cd5730a475ff03d2ef49fc571d5510a548b63494",
"bugs": {
"url": "https://github.com/jshttp/mime-db/issues"
},
"homepage": "https://github.com/jshttp/mime-db",
- "_id": "mime-db@1.6.1",
- "_shasum": "6e85cd87c961d130d6ebd37efdfc2c0e06fdfcd3",
- "_from": "mime-db@>=1.6.0 <1.7.0",
+ "_id": "mime-db@1.8.0",
+ "_shasum": "82a9b385f22b0f5954dec4d445faba0722c4ad25",
+ "_from": "mime-db@>=1.8.0 <1.9.0",
"_npmVersion": "1.4.28",
"_npmUser": {
"name": "dougwilson",
@@ -83,10 +85,9 @@
}
],
"dist": {
- "shasum": "6e85cd87c961d130d6ebd37efdfc2c0e06fdfcd3",
- "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.6.1.tgz"
+ "shasum": "82a9b385f22b0f5954dec4d445faba0722c4ad25",
+ "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.8.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.6.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.8.0.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/package.json b/deps/npm/node_modules/request/node_modules/mime-types/package.json
index 060586bd77..df71018dc4 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/package.json
+++ b/deps/npm/node_modules/request/node_modules/mime-types/package.json
@@ -1,7 +1,7 @@
{
"name": "mime-types",
"description": "The ultimate javascript content-type utility.",
- "version": "2.0.8",
+ "version": "2.0.10",
"contributors": [
{
"name": "Douglas Christopher Wilson",
@@ -28,10 +28,10 @@
"url": "https://github.com/jshttp/mime-types"
},
"dependencies": {
- "mime-db": "~1.6.0"
+ "mime-db": "~1.8.0"
},
"devDependencies": {
- "istanbul": "0.3.5",
+ "istanbul": "0.3.7",
"mocha": "~1.21.5"
},
"files": [
@@ -47,13 +47,13 @@
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
},
- "gitHead": "19e01e8bd630a1719ada4a3e3e9b7192b4ddb034",
+ "gitHead": "9d4533a2b3a68af48a7f3ded9f8f525648e7bcc1",
"bugs": {
"url": "https://github.com/jshttp/mime-types/issues"
},
"homepage": "https://github.com/jshttp/mime-types",
- "_id": "mime-types@2.0.8",
- "_shasum": "5612bf6b9ec8a1285a81184fa4237fbfdbb89a7e",
+ "_id": "mime-types@2.0.10",
+ "_shasum": "eacd81bb73cab2a77447549a078d4f2018c67b4d",
"_from": "mime-types@>=2.0.1 <2.1.0",
"_npmVersion": "1.4.28",
"_npmUser": {
@@ -75,10 +75,9 @@
}
],
"dist": {
- "shasum": "5612bf6b9ec8a1285a81184fa4237fbfdbb89a7e",
- "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.0.8.tgz"
+ "shasum": "eacd81bb73cab2a77447549a078d4f2018c67b4d",
+ "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.0.10.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.8.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.10.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/bower.json b/deps/npm/node_modules/request/node_modules/node-uuid/bower.json
new file mode 100644
index 0000000000..1656dc8197
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/node-uuid/bower.json
@@ -0,0 +1,23 @@
+{
+ "name": "node-uuid",
+ "version": "1.4.3",
+ "homepage": "https://github.com/broofa/node-uuid",
+ "authors": [
+ "Robert Kieffer <robert@broofa.com>"
+ ],
+ "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
+ "main": "uuid.js",
+ "keywords": [
+ "uuid",
+ "gid",
+ "rfc4122"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/component.json b/deps/npm/node_modules/request/node_modules/node-uuid/component.json
index ace213481c..149f84b22b 100644
--- a/deps/npm/node_modules/request/node_modules/node-uuid/component.json
+++ b/deps/npm/node_modules/request/node_modules/node-uuid/component.json
@@ -2,7 +2,7 @@
"name": "node-uuid",
"repo": "broofa/node-uuid",
"description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
- "version": "1.4.0",
+ "version": "1.4.3",
"author": "Robert Kieffer <robert@broofa.com>",
"contributors": [
{"name": "Christoph Tavan <dev@tavan.de>", "github": "https://github.com/ctavan"}
@@ -15,4 +15,4 @@
"uuid.js"
],
"license": "MIT"
-} \ No newline at end of file
+}
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/package.json b/deps/npm/node_modules/request/node_modules/node-uuid/package.json
index 9753671020..ba58c717ee 100644
--- a/deps/npm/node_modules/request/node_modules/node-uuid/package.json
+++ b/deps/npm/node_modules/request/node_modules/node-uuid/package.json
@@ -29,20 +29,20 @@
"type": "git",
"url": "https://github.com/broofa/node-uuid.git"
},
- "version": "1.4.2",
+ "version": "1.4.3",
"licenses": [
{
"type": "MIT",
"url": "https://raw.github.com/broofa/node-uuid/master/LICENSE.md"
}
],
- "gitHead": "14c42d2568977f7ddfc02399bd2a6b09e2cfbe5f",
+ "gitHead": "886463c660a095dfebfa69603921a8d156fdb12c",
"bugs": {
"url": "https://github.com/broofa/node-uuid/issues"
},
"homepage": "https://github.com/broofa/node-uuid",
- "_id": "node-uuid@1.4.2",
- "_shasum": "907db3d11b7b6a2cf4f905fb7199f14ae7379ba0",
+ "_id": "node-uuid@1.4.3",
+ "_shasum": "319bb7a56e7cb63f00b5c0cd7851cd4b4ddf1df9",
"_from": "node-uuid@>=1.4.0 <1.5.0",
"_npmVersion": "1.4.28",
"_npmUser": {
@@ -56,10 +56,9 @@
}
],
"dist": {
- "shasum": "907db3d11b7b6a2cf4f905fb7199f14ae7379ba0",
- "tarball": "http://registry.npmjs.org/node-uuid/-/node-uuid-1.4.2.tgz"
+ "shasum": "319bb7a56e7cb63f00b5c0cd7851cd4b4ddf1df9",
+ "tarball": "http://registry.npmjs.org/node-uuid/-/node-uuid-1.4.3.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.2.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.3.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js b/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js
index 5e2257f093..0a61769796 100644
--- a/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js
+++ b/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js
@@ -224,12 +224,14 @@
uuid.unparse = unparse;
uuid.BufferClass = BufferClass;
- if (typeof define === 'function' && define.amd) {
- // Publish as AMD module
- define(function() {return uuid;});
- } else if (typeof(module) != 'undefined' && module.exports) {
+ if (typeof(module) != 'undefined' && module.exports) {
// Publish as node.js module
module.exports = uuid;
+ } else if (typeof define === 'function' && define.amd) {
+ // Publish as AMD module
+ define(function() {return uuid;});
+
+
} else {
// Publish as global (in browsers)
var _previousRoot = _global.uuid;
diff --git a/deps/npm/node_modules/request/node_modules/oauth-sign/package.json b/deps/npm/node_modules/request/node_modules/oauth-sign/package.json
index 019eff0cd5..bb5b0e11c4 100644
--- a/deps/npm/node_modules/request/node_modules/oauth-sign/package.json
+++ b/deps/npm/node_modules/request/node_modules/oauth-sign/package.json
@@ -48,6 +48,5 @@
"tarball": "http://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/qs/.travis.yml b/deps/npm/node_modules/request/node_modules/qs/.travis.yml
index c891dd0e04..f50217888e 100644
--- a/deps/npm/node_modules/request/node_modules/qs/.travis.yml
+++ b/deps/npm/node_modules/request/node_modules/qs/.travis.yml
@@ -1,4 +1,6 @@
language: node_js
node_js:
- - 0.10 \ No newline at end of file
+ - 0.10
+ - 0.12
+ - iojs
diff --git a/deps/npm/node_modules/request/node_modules/qs/Readme.md b/deps/npm/node_modules/request/node_modules/qs/Readme.md
index 21bf3faf3e..2d7e7f5a0d 100755
--- a/deps/npm/node_modules/request/node_modules/qs/Readme.md
+++ b/deps/npm/node_modules/request/node_modules/qs/Readme.md
@@ -200,6 +200,17 @@ Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });
// 'a=b&a=c&a=d'
```
+You may use the `arrayFormat` option to specify the format of the output array
+
+```javascript
+Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' })
+// 'a[0]=b&a[1]=c'
+Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' })
+// 'a[]=b&a[]=c'
+Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' })
+// 'a=b&a=c'
+```
+
Empty strings and null values will omit the value, but the equals sign (=) remains in place:
```javascript
diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/parse.js b/deps/npm/node_modules/request/node_modules/qs/lib/parse.js
index 4e7d02a1bf..55a0613c8e 100755
--- a/deps/npm/node_modules/request/node_modules/qs/lib/parse.js
+++ b/deps/npm/node_modules/request/node_modules/qs/lib/parse.js
@@ -29,6 +29,10 @@ internals.parseValues = function (str, options) {
var key = Utils.decode(part.slice(0, pos));
var val = Utils.decode(part.slice(pos + 1));
+ if (Object.prototype.hasOwnProperty(key)) {
+ continue;
+ }
+
if (!obj.hasOwnProperty(key)) {
obj[key] = val;
}
diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js b/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js
index b4411047fd..3ce6cc19d8 100755
--- a/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js
+++ b/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js
@@ -7,11 +7,21 @@ var Utils = require('./utils');
var internals = {
delimiter: '&',
- indices: true
+ arrayPrefixGenerators: {
+ brackets: function (prefix, key) {
+ return prefix + '[]';
+ },
+ indices: function (prefix, key) {
+ return prefix + '[' + key + ']';
+ },
+ repeat: function (prefix, key) {
+ return prefix;
+ }
+ }
};
-internals.stringify = function (obj, prefix, options) {
+internals.stringify = function (obj, prefix, generateArrayPrefix) {
if (Utils.isBuffer(obj)) {
obj = obj.toString();
@@ -39,13 +49,11 @@ internals.stringify = function (obj, prefix, options) {
var objKeys = Object.keys(obj);
for (var i = 0, il = objKeys.length; i < il; ++i) {
var key = objKeys[i];
- if (!options.indices &&
- Array.isArray(obj)) {
-
- values = values.concat(internals.stringify(obj[key], prefix, options));
+ if (Array.isArray(obj)) {
+ values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix));
}
else {
- values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', options));
+ values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix));
}
}
@@ -57,7 +65,6 @@ module.exports = function (obj, options) {
options = options || {};
var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
- options.indices = typeof options.indices === 'boolean' ? options.indices : internals.indices;
var keys = [];
@@ -67,10 +74,23 @@ module.exports = function (obj, options) {
return '';
}
+ var arrayFormat;
+ if (options.arrayFormat in internals.arrayPrefixGenerators) {
+ arrayFormat = options.arrayFormat;
+ }
+ else if ('indices' in options) {
+ arrayFormat = options.indices ? 'indices' : 'repeat';
+ }
+ else {
+ arrayFormat = 'indices';
+ }
+
+ var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];
+
var objKeys = Object.keys(obj);
for (var i = 0, il = objKeys.length; i < il; ++i) {
var key = objKeys[i];
- keys = keys.concat(internals.stringify(obj[key], key, options));
+ keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix));
}
return keys.join(delimiter);
diff --git a/deps/npm/node_modules/request/node_modules/qs/package.json b/deps/npm/node_modules/request/node_modules/qs/package.json
index 8d17dfce16..980ada8b4b 100644
--- a/deps/npm/node_modules/request/node_modules/qs/package.json
+++ b/deps/npm/node_modules/request/node_modules/qs/package.json
@@ -1,6 +1,6 @@
{
"name": "qs",
- "version": "2.3.3",
+ "version": "2.4.1",
"description": "A querystring parser that supports nesting and arrays, with a depth limit",
"homepage": "https://github.com/hapijs/qs",
"main": "index.js",
@@ -26,15 +26,15 @@
"url": "http://github.com/hapijs/qs/raw/master/LICENSE"
}
],
- "gitHead": "9250c4cda5102fcf72441445816e6d311fc6813d",
+ "gitHead": "58c6540418954867822c1af3e45fb4c26708b07e",
"bugs": {
"url": "https://github.com/hapijs/qs/issues"
},
- "_id": "qs@2.3.3",
- "_shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404",
- "_from": "qs@>=2.3.1 <2.4.0",
- "_npmVersion": "2.1.6",
- "_nodeVersion": "0.10.32",
+ "_id": "qs@2.4.1",
+ "_shasum": "68cbaea971013426a80c1404fad6b1a6b1175245",
+ "_from": "qs@>=2.4.0 <2.5.0",
+ "_npmVersion": "2.6.1",
+ "_nodeVersion": "0.10.36",
"_npmUser": {
"name": "nlf",
"email": "quitlahok@gmail.com"
@@ -50,10 +50,9 @@
}
],
"dist": {
- "shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404",
- "tarball": "http://registry.npmjs.org/qs/-/qs-2.3.3.tgz"
+ "shasum": "68cbaea971013426a80c1404fad6b1a6b1175245",
+ "tarball": "http://registry.npmjs.org/qs/-/qs-2.4.1.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/qs/-/qs-2.4.1.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/qs/test/parse.js b/deps/npm/node_modules/request/node_modules/qs/test/parse.js
index 6c20cc1be0..f06788a89c 100755
--- a/deps/npm/node_modules/request/node_modules/qs/test/parse.js
+++ b/deps/npm/node_modules/request/node_modules/qs/test/parse.js
@@ -187,7 +187,7 @@ describe('parse()', function () {
it('cannot override prototypes', function (done) {
- var obj = Qs.parse('toString=bad&bad[toString]=bad&constructor=bad');
+ var obj = Qs.parse('hasOwnProperty=bad&toString=bad&bad[toString]=bad&constructor=bad');
expect(typeof obj.toString).to.equal('function');
expect(typeof obj.bad.toString).to.equal('function');
expect(typeof obj.constructor).to.equal('function');
diff --git a/deps/npm/node_modules/request/node_modules/qs/test/stringify.js b/deps/npm/node_modules/request/node_modules/qs/test/stringify.js
index 75e397a749..7bdec32948 100755
--- a/deps/npm/node_modules/request/node_modules/qs/test/stringify.js
+++ b/deps/npm/node_modules/request/node_modules/qs/test/stringify.js
@@ -67,6 +67,36 @@ describe('stringify()', function () {
done();
});
+ it('uses indices notation for arrays when indices=true', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c'] }, { indices: true })).to.equal('a%5B0%5D=b&a%5B1%5D=c');
+ done();
+ });
+
+ it('uses indices notation for arrays when no arrayFormat is specified', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c'] })).to.equal('a%5B0%5D=b&a%5B1%5D=c');
+ done();
+ });
+
+ it('uses indices notation for arrays when no arrayFormat=indices', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' })).to.equal('a%5B0%5D=b&a%5B1%5D=c');
+ done();
+ });
+
+ it('uses repeat notation for arrays when no arrayFormat=repeat', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' })).to.equal('a=b&a=c');
+ done();
+ });
+
+ it('uses brackets notation for arrays when no arrayFormat=brackets', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' })).to.equal('a%5B%5D=b&a%5B%5D=c');
+ done();
+ });
+
it('stringifies a complicated object', function (done) {
expect(Qs.stringify({ a: { b: 'c', d: 'e' } })).to.equal('a%5Bb%5D=c&a%5Bd%5D=e');
diff --git a/deps/npm/node_modules/request/node_modules/stringstream/package.json b/deps/npm/node_modules/request/node_modules/stringstream/package.json
index b71cf2859c..ed9a306741 100644
--- a/deps/npm/node_modules/request/node_modules/stringstream/package.json
+++ b/deps/npm/node_modules/request/node_modules/stringstream/package.json
@@ -40,10 +40,5 @@
"directories": {},
"_shasum": "0f0e3423f942960b5692ac324a57dd093bc41a92",
"_resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.4.tgz",
- "_from": "stringstream@>=0.0.4 <0.1.0",
- "bugs": {
- "url": "https://github.com/mhart/StringStream/issues"
- },
- "homepage": "https://github.com/mhart/StringStream",
- "scripts": {}
+ "_from": "stringstream@>=0.0.4 <0.1.0"
}
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
index 4f62713818..fa3ba21177 100644
--- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
@@ -76,6 +76,5 @@
"tarball": "http://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json b/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json
index 5b1ebba150..2a9e6ed3fa 100644
--- a/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json
+++ b/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json
@@ -40,7 +40,5 @@
],
"directories": {},
"_shasum": "b1184e312ffbcf70b3b4c78e8c219de7ebb1c550",
- "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.0.tgz",
- "readme": "ERROR: No README data found!",
- "scripts": {}
+ "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.0.tgz"
}
diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json
index 0f021a5d13..d0311c6422 100644
--- a/deps/npm/node_modules/request/package.json
+++ b/deps/npm/node_modules/request/package.json
@@ -7,7 +7,7 @@
"util",
"utility"
],
- "version": "2.53.0",
+ "version": "2.55.0",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
@@ -27,12 +27,12 @@
"dependencies": {
"bl": "~0.9.0",
"caseless": "~0.9.0",
- "forever-agent": "~0.5.0",
+ "forever-agent": "~0.6.0",
"form-data": "~0.2.0",
"json-stringify-safe": "~5.0.0",
"mime-types": "~2.0.1",
"node-uuid": "~1.4.0",
- "qs": "~2.3.1",
+ "qs": "~2.4.0",
"tunnel-agent": "~0.4.0",
"tough-cookie": ">=0.12.0",
"http-signature": "~0.10.0",
@@ -41,10 +41,11 @@
"aws-sign2": "~0.5.0",
"stringstream": "~0.0.4",
"combined-stream": "~0.0.5",
- "isstream": "~0.1.1"
+ "isstream": "~0.1.1",
+ "har-validator": "^1.4.0"
},
"scripts": {
- "test": "npm run lint && node node_modules/.bin/taper tests/test-*.js && npm run test-browser && npm run clean",
+ "test": "npm run lint && node node_modules/.bin/taper tests/test-*.js && npm run test-browser",
"test-browser": "node tests/browser/start.js",
"lint": "node node_modules/.bin/eslint lib/ *.js tests/ && echo Lint passed."
},
@@ -52,7 +53,7 @@
"browserify": "~5.9.1",
"browserify-istanbul": "~0.1.3",
"coveralls": "~2.11.2",
- "eslint": "0.5.1",
+ "eslint": "0.17.1",
"function-bind": "~1.0.0",
"istanbul": "~0.3.2",
"karma": "~0.12.21",
@@ -64,17 +65,18 @@
"rimraf": "~2.2.8",
"server-destroy": "~1.0.0",
"tape": "~3.0.0",
- "taper": "~0.4.0"
+ "taper": "~0.4.0",
+ "bluebird": "~2.9.21"
},
- "gitHead": "541ce25648bc2ecab924d7d7197a2685fa16d348",
+ "gitHead": "b6000376387db12d0c2d7ed9ee87b0ba123e36dc",
"homepage": "https://github.com/request/request",
- "_id": "request@2.53.0",
- "_shasum": "180a3ae92b7b639802e4f9545dd8fcdeb71d760c",
- "_from": "request@>=2.53.0 <2.54.0",
- "_npmVersion": "1.4.14",
+ "_id": "request@2.55.0",
+ "_shasum": "d75c1cdf679d76bb100f9bffe1fe551b5c24e93d",
+ "_from": "request@>=2.55.0 <2.56.0",
+ "_npmVersion": "1.4.28",
"_npmUser": {
- "name": "nylen",
- "email": "jnylen@gmail.com"
+ "name": "simov",
+ "email": "simeonvelichkov@gmail.com"
},
"maintainers": [
{
@@ -88,13 +90,16 @@
{
"name": "fredkschott",
"email": "fkschott@gmail.com"
+ },
+ {
+ "name": "simov",
+ "email": "simeonvelichkov@gmail.com"
}
],
"dist": {
- "shasum": "180a3ae92b7b639802e4f9545dd8fcdeb71d760c",
- "tarball": "http://registry.npmjs.org/request/-/request-2.53.0.tgz"
+ "shasum": "d75c1cdf679d76bb100f9bffe1fe551b5c24e93d",
+ "tarball": "http://registry.npmjs.org/request/-/request-2.55.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/request/-/request-2.53.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/request/-/request-2.55.0.tgz"
}
diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js
index f43c8c6b5b..5f8f268443 100644
--- a/deps/npm/node_modules/request/request.js
+++ b/deps/npm/node_modules/request/request.js
@@ -13,7 +13,6 @@ var http = require('http')
, hawk = require('hawk')
, aws = require('aws-sign2')
, httpSignature = require('http-signature')
- , uuid = require('node-uuid')
, mime = require('mime-types')
, tunnel = require('tunnel-agent')
, stringstream = require('stringstream')
@@ -22,15 +21,14 @@ var http = require('http')
, FormData = require('form-data')
, cookies = require('./lib/cookies')
, copy = require('./lib/copy')
- , net = require('net')
- , CombinedStream = require('combined-stream')
- , isstream = require('isstream')
, getProxyFromURI = require('./lib/getProxyFromURI')
+ , Har = require('./lib/har').Har
, Auth = require('./lib/auth').Auth
- , oauth = require('./lib/oauth')
+ , OAuth = require('./lib/oauth').OAuth
+ , Multipart = require('./lib/multipart').Multipart
+ , Redirect = require('./lib/redirect').Redirect
var safeStringify = helpers.safeStringify
- , md5 = helpers.md5
, isReadStream = helpers.isReadStream
, toBase64 = helpers.toBase64
, defer = helpers.defer
@@ -38,7 +36,6 @@ var safeStringify = helpers.safeStringify
var globalPool = {}
- , isUrl = /^https?:/
var defaultProxyHeaderWhiteList = [
'accept',
@@ -248,6 +245,13 @@ function Request (options) {
// call init
var self = this
+
+ // start with HAR, then override with additional options
+ if (options.har) {
+ self._har = new Har(self)
+ options = self._har.options(options)
+ }
+
stream.Stream.call(self)
var reserved = Object.keys(Request.prototype)
var nonReserved = filterForNonReserved(reserved, options)
@@ -261,6 +265,10 @@ function Request (options) {
if (options.method) {
self.explicitMethod = true
}
+ self._auth = new Auth(self)
+ self._oauth = new OAuth(self)
+ self._multipart = new Multipart(self)
+ self._redirect = new Redirect(self)
self.init(options)
}
@@ -280,7 +288,7 @@ Request.prototype.setupTunnel = function () {
if (typeof self.proxy === 'string') {
self.proxy = url.parse(self.proxy)
}
-
+
if (!self.proxy || !self.tunnel) {
return false
}
@@ -296,7 +304,7 @@ Request.prototype.setupTunnel = function () {
self.proxyHeaders = constructProxyHeaderWhiteList(self.headers, proxyHeaderWhiteList)
self.proxyHeaders.host = constructProxyHost(self.uri)
proxyHeaderExclusiveList.forEach(self.removeHeader, self)
-
+
// Set Agent from Tunnel Data
var tunnelFn = getTunnelFn(self)
var tunnelOptions = constructTunnelOptions(self)
@@ -315,16 +323,32 @@ Request.prototype.init = function (options) {
}
self.headers = self.headers ? copy(self.headers) : {}
+ // Delete headers with value undefined since they break
+ // ClientRequest.OutgoingMessage.setHeader in node 0.12
+ for (var headerName in self.headers) {
+ if (typeof self.headers[headerName] === 'undefined') {
+ delete self.headers[headerName]
+ }
+ }
+
caseless.httpify(self, self.headers)
if (!self.method) {
self.method = options.method || 'GET'
}
- self.localAddress = options.localAddress
+ if (!self.localAddress) {
+ self.localAddress = options.localAddress
+ }
if (!self.qsLib) {
self.qsLib = (options.useQuerystring ? querystring : qs)
}
+ if (!self.qsParseOptions) {
+ self.qsParseOptions = options.qsParseOptions
+ }
+ if (!self.qsStringifyOptions) {
+ self.qsStringifyOptions = options.qsStringifyOptions
+ }
debug(options)
if (!self.pool && self.pool !== false) {
@@ -353,6 +377,38 @@ Request.prototype.init = function (options) {
delete self.url
}
+ // If there's a baseUrl, then use it as the base URL (i.e. uri must be
+ // specified as a relative path and is appended to baseUrl).
+ if (self.baseUrl) {
+ if (typeof self.baseUrl !== 'string') {
+ return self.emit('error', new Error('options.baseUrl must be a string'))
+ }
+
+ if (typeof self.uri !== 'string') {
+ return self.emit('error', new Error('options.uri must be a string when using options.baseUrl'))
+ }
+
+ if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) {
+ return self.emit('error', new Error('options.uri must be a path when using options.baseUrl'))
+ }
+
+ // Handle all cases to make sure that there's only one slash between
+ // baseUrl and uri.
+ var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1
+ var uriStartsWithSlash = self.uri.indexOf('/') === 0
+
+ if (baseUrlEndsWithSlash && uriStartsWithSlash) {
+ self.uri = self.baseUrl + self.uri.slice(1)
+ } else if (baseUrlEndsWithSlash || uriStartsWithSlash) {
+ self.uri = self.baseUrl + self.uri
+ } else if (self.uri === '') {
+ self.uri = self.baseUrl
+ } else {
+ self.uri = self.baseUrl + '/' + self.uri
+ }
+ delete self.baseUrl
+ }
+
// A URI is needed by this point, throw if we haven't been able to get one
if (!self.uri) {
return self.emit('error', new Error('options.uri is a required argument'))
@@ -413,16 +469,7 @@ Request.prototype.init = function (options) {
return self.emit('error', new Error(message))
}
- self._redirectsFollowed = self._redirectsFollowed || 0
- self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10
- self.allowRedirect = (typeof self.followRedirect === 'function') ? self.followRedirect : function(response) {
- return true
- }
- self.followRedirects = (self.followRedirect !== undefined) ? !!self.followRedirect : true
- self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false
- if (self.followRedirects || self.followAllRedirects) {
- self.redirects = self.redirects || []
- }
+ self._redirect.onRequest()
self.setHost = false
if (!self.hasHeader('host')) {
@@ -495,8 +542,6 @@ Request.prototype.init = function (options) {
}
// Auth must happen last in case signing is dependent on other headers
- self._auth = new Auth()
-
if (options.oauth) {
self.oauth(options.oauth)
}
@@ -554,10 +599,14 @@ Request.prototype.init = function (options) {
self.json(options.json)
}
if (options.multipart) {
- self.boundary = uuid()
self.multipart(options.multipart)
}
+ if (options.time) {
+ self.timing = true
+ self.elapsedTime = self.elapsedTime || 0
+ }
+
if (self.body) {
var length = 0
if (!Buffer.isBuffer(self.body)) {
@@ -652,10 +701,15 @@ Request.prototype.init = function (options) {
var end = function () {
if (self._form) {
- self._form.pipe(self)
+ if (!self._auth.hasAuth) {
+ self._form.pipe(self)
+ }
+ else if (self._auth.hasAuth && self._auth.sentAuth) {
+ self._form.pipe(self)
+ }
}
- if (self._multipart) {
- self._multipart.pipe(self)
+ if (self._multipart && self._multipart.chunked) {
+ self._multipart.body.pipe(self)
}
if (self.body) {
if (Array.isArray(self.body)) {
@@ -670,6 +724,10 @@ Request.prototype.init = function (options) {
console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.')
self.requestBodyStream.pipe(self)
} else if (!self.src) {
+ if (self._auth.hasAuth && !self._auth.sentAuth) {
+ self.end()
+ return
+ }
if (self.method !== 'GET' && typeof self.method !== 'undefined') {
self.setHeader('content-length', 0)
}
@@ -901,20 +959,26 @@ Request.prototype.start = function () {
delete reqOptions.auth
debug('make request', self.uri.href)
+
self.req = self.httpModule.request(reqOptions)
+ if (self.timing) {
+ self.startTime = new Date().getTime()
+ }
+
if (self.timeout && !self.timeoutTimer) {
+ var timeout = self.timeout < 0 ? 0 : self.timeout
self.timeoutTimer = setTimeout(function () {
self.abort()
var e = new Error('ETIMEDOUT')
e.code = 'ETIMEDOUT'
self.emit('error', e)
- }, self.timeout)
+ }, timeout)
// Set additional timeout on socket - in case if remote
// server freeze after sending headers
if (self.req.setTimeout) { // only works on node 0.6+
- self.req.setTimeout(self.timeout, function () {
+ self.req.setTimeout(timeout, function () {
if (self.req) {
self.req.abort()
var e = new Error('ESOCKETTIMEDOUT')
@@ -965,6 +1029,11 @@ Request.prototype.onRequestResponse = function (response) {
var self = this
debug('onRequestResponse', self.uri.href, response.statusCode, response.headers)
response.on('end', function() {
+ if (self.timing) {
+ self.elapsedTime += (new Date().getTime() - self.startTime)
+ debug('elapsed time', self.elapsedTime)
+ response.elapsedTime = self.elapsedTime
+ }
debug('response end', self.uri.href, response.statusCode, response.headers)
})
@@ -1036,98 +1105,9 @@ Request.prototype.onRequestResponse = function (response) {
}
}
- var redirectTo = null
- if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) {
- var location = response.caseless.get('location')
- debug('redirect', location)
-
- if (self.followAllRedirects) {
- redirectTo = location
- } else if (self.followRedirects) {
- switch (self.method) {
- case 'PATCH':
- case 'PUT':
- case 'POST':
- case 'DELETE':
- // Do not follow redirects
- break
- default:
- redirectTo = location
- break
- }
- }
- } else if (response.statusCode === 401) {
- var authHeader = self._auth.response(self.method, self.uri.path, response.headers)
- if (authHeader) {
- self.setHeader('authorization', authHeader)
- redirectTo = self.uri
- }
- }
-
- if (redirectTo && self.allowRedirect.call(self, response)) {
- debug('redirect to', redirectTo)
-
- // ignore any potential response body. it cannot possibly be useful
- // to us at this point.
- if (self._paused) {
- response.resume()
- }
-
- if (self._redirectsFollowed >= self.maxRedirects) {
- self.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + self.uri.href))
- return
- }
- self._redirectsFollowed += 1
-
- if (!isUrl.test(redirectTo)) {
- redirectTo = url.resolve(self.uri.href, redirectTo)
- }
-
- var uriPrev = self.uri
- self.uri = url.parse(redirectTo)
-
- // handle the case where we change protocol from https to http or vice versa
- if (self.uri.protocol !== uriPrev.protocol) {
- self._updateProtocol()
- }
-
- self.redirects.push(
- { statusCode : response.statusCode
- , redirectUri: redirectTo
- }
- )
- if (self.followAllRedirects && response.statusCode !== 401 && response.statusCode !== 307) {
- self.method = 'GET'
- }
- // self.method = 'GET' // Force all redirects to use GET || commented out fixes #215
- delete self.src
- delete self.req
- delete self.agent
- delete self._started
- if (response.statusCode !== 401 && response.statusCode !== 307) {
- // Remove parameters from the previous response, unless this is the second request
- // for a server that requires digest authentication.
- delete self.body
- delete self._form
- if (self.headers) {
- self.removeHeader('host')
- self.removeHeader('content-type')
- self.removeHeader('content-length')
- if (self.uri.hostname !== self.originalHost.split(':')[0]) {
- // Remove authorization if changing hostnames (but not if just
- // changing ports or protocols). This matches the behavior of curl:
- // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710
- self.removeHeader('authorization')
- }
- }
- }
-
- self.emit('redirect')
-
- self.init()
+ if (self._redirect.onResponse(response)) {
return // Ignore the rest of the response
} else {
- self._redirectsFollowed = self._redirectsFollowed || 0
// Be a good stream and emit end when the response is finished.
// Hack to emit end on close because of a core bug that never fires end
response.on('close', function () {
@@ -1310,7 +1290,7 @@ Request.prototype.qs = function (q, clobber) {
var self = this
var base
if (!clobber && self.uri.query) {
- base = self.qsLib.parse(self.uri.query)
+ base = self.qsLib.parse(self.uri.query, self.qsParseOptions)
} else {
base = {}
}
@@ -1319,11 +1299,11 @@ Request.prototype.qs = function (q, clobber) {
base[i] = q[i]
}
- if (self.qsLib.stringify(base) === ''){
+ if (self.qsLib.stringify(base, self.qsStringifyOptions) === ''){
return self
}
- var qs = self.qsLib.stringify(base)
+ var qs = self.qsLib.stringify(base, self.qsStringifyOptions)
self.uri = url.parse(self.uri.href.split('?')[0] + '?' + rfc3986(qs))
self.url = self.uri
@@ -1335,13 +1315,15 @@ Request.prototype.form = function (form) {
var self = this
if (form) {
self.setHeader('content-type', 'application/x-www-form-urlencoded')
- self.body = (typeof form === 'string') ? form.toString('utf8') : self.qsLib.stringify(form).toString('utf8')
+ self.body = (typeof form === 'string')
+ ? form.toString('utf8')
+ : self.qsLib.stringify(form, self.qsStringifyOptions).toString('utf8')
self.body = rfc3986(self.body)
return self
}
// create form-data object
self._form = new FormData()
- self._form.on('error',function(err) {
+ self._form.on('error', function(err) {
err.message = 'form-data: ' + err.message
self.emit('error', err)
self.abort()
@@ -1351,69 +1333,12 @@ Request.prototype.form = function (form) {
Request.prototype.multipart = function (multipart) {
var self = this
- var chunked = false
- var _multipart = multipart.data || multipart
-
- if (!_multipart.forEach) {
- throw new Error('Argument error, options.multipart.')
- }
-
- if (self.getHeader('transfer-encoding') === 'chunked') {
- chunked = true
- }
- if (multipart.chunked !== undefined) {
- chunked = multipart.chunked
- }
- if (!chunked) {
- _multipart.forEach(function (part) {
- if(typeof part.body === 'undefined') {
- throw new Error('Body attribute missing in multipart.')
- }
- if (isstream(part.body)) {
- chunked = true
- }
- })
- }
-
- if (chunked && !self.hasHeader('transfer-encoding')) {
- self.setHeader('transfer-encoding', 'chunked')
- }
+ self._multipart.onRequest(multipart)
- var headerName = self.hasHeader('content-type')
- if (!headerName || self.headers[headerName].indexOf('multipart') === -1) {
- self.setHeader('content-type', 'multipart/related; boundary=' + self.boundary)
- } else {
- self.setHeader(headerName, self.headers[headerName].split(';')[0] + '; boundary=' + self.boundary)
+ if (!self._multipart.chunked) {
+ self.body = self._multipart.body
}
- var parts = chunked ? new CombinedStream() : []
- function add (part) {
- return chunked ? parts.append(part) : parts.push(new Buffer(part))
- }
-
- if (self.preambleCRLF) {
- add('\r\n')
- }
-
- _multipart.forEach(function (part) {
- var body = part.body
- var preamble = '--' + self.boundary + '\r\n'
- Object.keys(part).forEach(function (key) {
- if (key === 'body') { return }
- preamble += key + ': ' + part[key] + '\r\n'
- })
- preamble += '\r\n'
- add(preamble)
- add(body)
- add('\r\n')
- })
- add('--' + self.boundary + '--')
-
- if (self.postambleCRLF) {
- add('\r\n')
- }
-
- self[chunked ? '_multipart' : 'body'] = parts
return self
}
Request.prototype.json = function (val) {
@@ -1466,24 +1391,14 @@ Request.prototype.getHeader = function (name, headers) {
})
return result
}
-var getHeader = Request.prototype.getHeader
Request.prototype.auth = function (user, pass, sendImmediately, bearer) {
var self = this
- var authHeader
- if (bearer !== undefined) {
- authHeader = self._auth.bearer(bearer, sendImmediately)
- } else {
- authHeader = self._auth.basic(user, pass, sendImmediately)
- }
- if (authHeader) {
- self.setHeader('authorization', authHeader)
- }
+ self._auth.onRequest(user, pass, sendImmediately, bearer)
return self
}
-
Request.prototype.aws = function (opts, now) {
var self = this
@@ -1521,7 +1436,7 @@ Request.prototype.httpSignature = function (opts) {
var self = this
httpSignature.signRequest({
getHeader: function(header) {
- return getHeader(header, self.headers)
+ return self.getHeader(header, self.headers)
},
setHeader: function(header, value) {
self.setHeader(header, value)
@@ -1533,33 +1448,14 @@ Request.prototype.httpSignature = function (opts) {
return self
}
-
Request.prototype.hawk = function (opts) {
var self = this
self.setHeader('Authorization', hawk.client.header(self.uri, self.method, opts).field)
}
-
Request.prototype.oauth = function (_oauth) {
var self = this
- var result = oauth.oauth({
- uri: self.uri,
- method: self.method,
- headers: self.headers,
- body: self.body,
- oauth: _oauth,
- qsLib: self.qsLib
- })
-
- if (result.transport === 'header') {
- self.setHeader('Authorization', result.oauth)
- }
- else if (result.transport === 'query') {
- self.path += result.oauth
- }
- else if (result.transport === 'body') {
- self.body = result.oauth
- }
+ self._oauth.onRequest(_oauth)
return self
}
@@ -1568,7 +1464,7 @@ Request.prototype.jar = function (jar) {
var self = this
var cookies
- if (self._redirectsFollowed === 0) {
+ if (self._redirect.redirectsFollowed === 0) {
self.originalCookieHeader = self.getHeader('cookie')
}
diff --git a/deps/npm/node_modules/rimraf/README.md b/deps/npm/node_modules/rimraf/README.md
index c178dedc34..58e7ac3034 100644
--- a/deps/npm/node_modules/rimraf/README.md
+++ b/deps/npm/node_modules/rimraf/README.md
@@ -1,4 +1,4 @@
-The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node.
+The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node.
Install with `npm install rimraf`, or just drop rimraf.js somewhere.
diff --git a/deps/npm/node_modules/semver/package.json b/deps/npm/node_modules/semver/package.json
index cbd761b48e..7617ef8b50 100644
--- a/deps/npm/node_modules/semver/package.json
+++ b/deps/npm/node_modules/semver/package.json
@@ -1,6 +1,6 @@
{
"name": "semver",
- "version": "4.3.1",
+ "version": "4.3.3",
"description": "The semantic version parser used by npm.",
"main": "semver.js",
"browser": "semver.browser.js",
@@ -21,19 +21,19 @@
"bin": {
"semver": "./bin/semver"
},
- "gitHead": "fa9be2b231666f7485e832f84d2fe99afc033e22",
+ "gitHead": "bb32a43bdfa7223e4c450d181e5a2184b00f24d4",
"bugs": {
"url": "https://github.com/npm/node-semver/issues"
},
"homepage": "https://github.com/npm/node-semver",
- "_id": "semver@4.3.1",
- "_shasum": "beb0129575b95f76110b29af08d370fd9eeb34bf",
- "_from": "semver@>=4.3.1 <4.4.0",
- "_npmVersion": "2.6.0",
- "_nodeVersion": "1.1.0",
+ "_id": "semver@4.3.3",
+ "_shasum": "15466b61220bc371cd8f0e666a9f785329ea8228",
+ "_from": "semver@>=4.3.3 <4.4.0",
+ "_npmVersion": "2.7.4",
+ "_nodeVersion": "1.4.2",
"_npmUser": {
"name": "isaacs",
- "email": "i@izs.me"
+ "email": "isaacs@npmjs.com"
},
"maintainers": [
{
@@ -46,10 +46,9 @@
}
],
"dist": {
- "shasum": "beb0129575b95f76110b29af08d370fd9eeb34bf",
- "tarball": "http://registry.npmjs.org/semver/-/semver-4.3.1.tgz"
+ "shasum": "15466b61220bc371cd8f0e666a9f785329ea8228",
+ "tarball": "http://registry.npmjs.org/semver/-/semver-4.3.3.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/semver/-/semver-4.3.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/semver/-/semver-4.3.3.tgz"
}
diff --git a/deps/npm/node_modules/semver/semver.browser.js b/deps/npm/node_modules/semver/semver.browser.js
index 1ee7204222..b84228ab51 100644
--- a/deps/npm/node_modules/semver/semver.browser.js
+++ b/deps/npm/node_modules/semver/semver.browser.js
@@ -10,6 +10,9 @@ if (typeof module === 'object' && module.exports === exports)
// Not necessarily the package version of this code.
exports.SEMVER_SPEC_VERSION = '2.0.0';
+var MAX_LENGTH = 256;
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+
// The actual regexps go on exports.re
var re = exports.re = [];
var src = exports.src = [];
@@ -223,8 +226,24 @@ for (var i = 0; i < R; i++) {
exports.parse = parse;
function parse(version, loose) {
+ if (version instanceof SemVer)
+ return version;
+
+ if (typeof version !== 'string')
+ return null;
+
+ if (version.length > MAX_LENGTH)
+ return null;
+
var r = loose ? re[LOOSE] : re[FULL];
- return (r.test(version)) ? new SemVer(version, loose) : null;
+ if (!r.test(version))
+ return null;
+
+ try {
+ return new SemVer(version, loose);
+ } catch (er) {
+ return null;
+ }
}
exports.valid = valid;
@@ -252,6 +271,9 @@ function SemVer(version, loose) {
throw new TypeError('Invalid Version: ' + version);
}
+ if (version.length > MAX_LENGTH)
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+
if (!(this instanceof SemVer))
return new SemVer(version, loose);
@@ -269,12 +291,26 @@ function SemVer(version, loose) {
this.minor = +m[2];
this.patch = +m[3];
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0)
+ throw new TypeError('Invalid major version')
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
+ throw new TypeError('Invalid minor version')
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
+ throw new TypeError('Invalid patch version')
+
// numberify any prerelease numeric ids
if (!m[4])
this.prerelease = [];
else
this.prerelease = m[4].split('.').map(function(id) {
- return (/^[0-9]+$/.test(id)) ? +id : id;
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER)
+ return num
+ }
+ return id;
});
this.build = m[5] ? m[5].split('.') : [];
diff --git a/deps/npm/node_modules/semver/semver.browser.js.gz b/deps/npm/node_modules/semver/semver.browser.js.gz
index 4bd16d689c..8971ecdfb8 100644
--- a/deps/npm/node_modules/semver/semver.browser.js.gz
+++ b/deps/npm/node_modules/semver/semver.browser.js.gz
Binary files differ
diff --git a/deps/npm/node_modules/semver/semver.js b/deps/npm/node_modules/semver/semver.js
index 544bc83123..b95992bad1 100644
--- a/deps/npm/node_modules/semver/semver.js
+++ b/deps/npm/node_modules/semver/semver.js
@@ -20,6 +20,9 @@ if (typeof module === 'object' && module.exports === exports)
// Not necessarily the package version of this code.
exports.SEMVER_SPEC_VERSION = '2.0.0';
+var MAX_LENGTH = 256;
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+
// The actual regexps go on exports.re
var re = exports.re = [];
var src = exports.src = [];
@@ -233,8 +236,24 @@ for (var i = 0; i < R; i++) {
exports.parse = parse;
function parse(version, loose) {
+ if (version instanceof SemVer)
+ return version;
+
+ if (typeof version !== 'string')
+ return null;
+
+ if (version.length > MAX_LENGTH)
+ return null;
+
var r = loose ? re[LOOSE] : re[FULL];
- return (r.test(version)) ? new SemVer(version, loose) : null;
+ if (!r.test(version))
+ return null;
+
+ try {
+ return new SemVer(version, loose);
+ } catch (er) {
+ return null;
+ }
}
exports.valid = valid;
@@ -262,6 +281,9 @@ function SemVer(version, loose) {
throw new TypeError('Invalid Version: ' + version);
}
+ if (version.length > MAX_LENGTH)
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+
if (!(this instanceof SemVer))
return new SemVer(version, loose);
@@ -279,12 +301,26 @@ function SemVer(version, loose) {
this.minor = +m[2];
this.patch = +m[3];
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0)
+ throw new TypeError('Invalid major version')
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
+ throw new TypeError('Invalid minor version')
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
+ throw new TypeError('Invalid patch version')
+
// numberify any prerelease numeric ids
if (!m[4])
this.prerelease = [];
else
this.prerelease = m[4].split('.').map(function(id) {
- return (/^[0-9]+$/.test(id)) ? +id : id;
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER)
+ return num
+ }
+ return id;
});
this.build = m[5] ? m[5].split('.') : [];
diff --git a/deps/npm/node_modules/semver/semver.min.js b/deps/npm/node_modules/semver/semver.min.js
index 6de8c73459..c2b3ff48d0 100644
--- a/deps/npm/node_modules/semver/semver.min.js
+++ b/deps/npm/node_modules/semver/semver.min.js
@@ -1 +1 @@
-(function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=H;e.SEMVER_SPEC_VERSION="2.0.0";var r=e.re=[];var t=e.src=[];var n=0;var i=n++;t[i]="0|[1-9]\\d*";var s=n++;t[s]="[0-9]+";var a=n++;t[a]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var o=n++;t[o]="("+t[i]+")\\."+"("+t[i]+")\\."+"("+t[i]+")";var f=n++;t[f]="("+t[s]+")\\."+"("+t[s]+")\\."+"("+t[s]+")";var u=n++;t[u]="(?:"+t[i]+"|"+t[a]+")";var l=n++;t[l]="(?:"+t[s]+"|"+t[a]+")";var p=n++;t[p]="(?:-("+t[u]+"(?:\\."+t[u]+")*))";var c=n++;t[c]="(?:-?("+t[l]+"(?:\\."+t[l]+")*))";var h=n++;t[h]="[0-9A-Za-z-]+";var v=n++;t[v]="(?:\\+("+t[h]+"(?:\\."+t[h]+")*))";var m=n++;var g="v?"+t[o]+t[p]+"?"+t[v]+"?";t[m]="^"+g+"$";var w="[v=\\s]*"+t[f]+t[c]+"?"+t[v]+"?";var d=n++;t[d]="^"+w+"$";var y=n++;t[y]="((?:<|>)?=?)";var j=n++;t[j]=t[s]+"|x|X|\\*";var b=n++;t[b]=t[i]+"|x|X|\\*";var $=n++;t[$]="[v=\\s]*("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:"+t[p]+")?"+t[v]+"?"+")?)?";var k=n++;t[k]="[v=\\s]*("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:"+t[c]+")?"+t[v]+"?"+")?)?";var E=n++;t[E]="^"+t[y]+"\\s*"+t[$]+"$";var x=n++;t[x]="^"+t[y]+"\\s*"+t[k]+"$";var R=n++;t[R]="(?:~>?)";var S=n++;t[S]="(\\s*)"+t[R]+"\\s+";r[S]=new RegExp(t[S],"g");var V="$1~";var I=n++;t[I]="^"+t[R]+t[$]+"$";var T=n++;t[T]="^"+t[R]+t[k]+"$";var A=n++;t[A]="(?:\\^)";var C=n++;t[C]="(\\s*)"+t[A]+"\\s+";r[C]=new RegExp(t[C],"g");var M="$1^";var z=n++;t[z]="^"+t[A]+t[$]+"$";var N=n++;t[N]="^"+t[A]+t[k]+"$";var P=n++;t[P]="^"+t[y]+"\\s*("+w+")$|^$";var Z=n++;t[Z]="^"+t[y]+"\\s*("+g+")$|^$";var q=n++;t[q]="(\\s*)"+t[y]+"\\s*("+w+"|"+t[$]+")";r[q]=new RegExp(t[q],"g");var L="$1$2$3";var X=n++;t[X]="^\\s*("+t[$]+")"+"\\s+-\\s+"+"("+t[$]+")"+"\\s*$";var _=n++;t[_]="^\\s*("+t[k]+")"+"\\s+-\\s+"+"("+t[k]+")"+"\\s*$";var O=n++;t[O]="(<|>)?=?\\s*\\*";for(var B=0;B<n;B++){if(!r[B])r[B]=new RegExp(t[B])}e.parse=D;function D(e,t){var n=t?r[d]:r[m];return n.test(e)?new H(e,t):null}e.valid=F;function F(e,r){var t=D(e,r);return t?t.version:null}e.clean=G;function G(e,r){var t=D(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null}e.SemVer=H;function H(e,t){if(e instanceof H){if(e.loose===t)return e;else e=e.version}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(!(this instanceof H))return new H(e,t);this.loose=t;var n=e.trim().match(t?r[d]:r[m]);if(!n)throw new TypeError("Invalid Version: "+e);this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(!n[4])this.prerelease=[];else this.prerelease=n[4].split(".").map(function(e){return/^[0-9]+$/.test(e)?+e:e});this.build=n[5]?n[5].split("."):[];this.format()}H.prototype.format=function(){this.version=this.major+"."+this.minor+"."+this.patch;if(this.prerelease.length)this.version+="-"+this.prerelease.join(".");return this.version};H.prototype.inspect=function(){return'<SemVer "'+this+'">'};H.prototype.toString=function(){return this.version};H.prototype.compare=function(e){if(!(e instanceof H))e=new H(e,this.loose);return this.compareMain(e)||this.comparePre(e)};H.prototype.compareMain=function(e){if(!(e instanceof H))e=new H(e,this.loose);return U(this.major,e.major)||U(this.minor,e.minor)||U(this.patch,e.patch)};H.prototype.comparePre=function(e){if(!(e instanceof H))e=new H(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return U(t,n)}while(++r)};H.prototype.inc=function(e,r){switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r);this.inc("pre",r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",r);this.inc("pre",r);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var t=this.prerelease.length;while(--t>=0){if(typeof this.prerelease[t]==="number"){this.prerelease[t]++;t=-2}}if(t===-1)this.prerelease.push(0)}if(r){if(this.prerelease[0]===r){if(isNaN(this.prerelease[1]))this.prerelease=[r,0]}else this.prerelease=[r,0]}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=J;function J(e,r,t,n){if(typeof t==="string"){n=t;t=undefined}try{return new H(e,t).inc(r,n).version}catch(i){return null}}e.diff=K;function K(e,r){if(ur(e,r)){return null}else{var t=D(e);var n=D(r);if(t.prerelease.length||n.prerelease.length){for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==n[i]){return"pre"+i}}}return"prerelease"}for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==n[i]){return i}}}}}e.compareIdentifiers=U;var Q=/^[0-9]+$/;function U(e,r){var t=Q.test(e);var n=Q.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:e<r?-1:e>r?1:0}e.rcompareIdentifiers=W;function W(e,r){return U(r,e)}e.major=Y;function Y(e,r){return new H(e,r).major}e.minor=er;function er(e,r){return new H(e,r).minor}e.patch=rr;function rr(e,r){return new H(e,r).patch}e.compare=tr;function tr(e,r,t){return new H(e,t).compare(r)}e.compareLoose=nr;function nr(e,r){return tr(e,r,true)}e.rcompare=ir;function ir(e,r,t){return tr(r,e,t)}e.sort=sr;function sr(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=ar;function ar(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=or;function or(e,r,t){return tr(e,r,t)>0}e.lt=fr;function fr(e,r,t){return tr(e,r,t)<0}e.eq=ur;function ur(e,r,t){return tr(e,r,t)===0}e.neq=lr;function lr(e,r,t){return tr(e,r,t)!==0}e.gte=pr;function pr(e,r,t){return tr(e,r,t)>=0}e.lte=cr;function cr(e,r,t){return tr(e,r,t)<=0}e.cmp=hr;function hr(e,r,t,n){var i;switch(r){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e===t;break;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e!==t;break;case"":case"=":case"==":i=ur(e,t,n);break;case"!=":i=lr(e,t,n);break;case">":i=or(e,t,n);break;case">=":i=pr(e,t,n);break;case"<":i=fr(e,t,n);break;case"<=":i=cr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=vr;function vr(e,r){if(e instanceof vr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof vr))return new vr(e,r);this.loose=r;this.parse(e);if(this.semver===mr)this.value="";else this.value=this.operator+this.semver.version}var mr={};vr.prototype.parse=function(e){var t=this.loose?r[P]:r[Z];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1];if(this.operator==="=")this.operator="";if(!n[2])this.semver=mr;else this.semver=new H(n[2],this.loose)};vr.prototype.inspect=function(){return'<SemVer Comparator "'+this+'">'};vr.prototype.toString=function(){return this.value};vr.prototype.test=function(e){if(this.semver===mr)return true;if(typeof e==="string")e=new H(e,this.loose);return hr(e,this.operator,this.semver,this.loose)};e.Range=gr;function gr(e,r){if(e instanceof gr&&e.loose===r)return e;if(!(this instanceof gr))return new gr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}gr.prototype.inspect=function(){return'<SemVer Range "'+this.range+'">'};gr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};gr.prototype.toString=function(){return this.range};gr.prototype.parseRange=function(e){var t=this.loose;e=e.trim();var n=t?r[_]:r[X];e=e.replace(n,Sr);e=e.replace(r[q],L);e=e.replace(r[S],V);e=e.replace(r[C],M);e=e.split(/\s+/).join(" ");var i=t?r[P]:r[Z];var s=e.split(" ").map(function(e){return dr(e,t)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new vr(e,t)});return s};e.toComparators=wr;function wr(e,r){return new gr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function dr(e,r){e=$r(e,r);e=jr(e,r);e=Er(e,r);e=Rr(e,r);return e}function yr(e){return!e||e.toLowerCase()==="x"||e==="*"}function jr(e,r){return e.trim().split(/\s+/).map(function(e){return br(e,r)}).join(" ")}function br(e,t){var n=t?r[T]:r[I];return e.replace(n,function(e,r,t,n,i){var s;if(yr(r))s="";else if(yr(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(yr(n))s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0";return s})}function $r(e,r){return e.trim().split(/\s+/).map(function(e){return kr(e,r)}).join(" ")}function kr(e,t){var n=t?r[N]:r[z];return e.replace(n,function(e,r,t,n,i){var s;if(yr(r))s="";else if(yr(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(yr(n)){if(r==="0")s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else s=">="+r+"."+t+".0 <"+(+r+1)+".0.0"}else if(i){if(i.charAt(0)!=="-")i="-"+i;if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+i+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0"}else{if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+(+r+1)+".0.0"}return s})}function Er(e,r){return e.split(/\s+/).map(function(e){return xr(e,r)}).join(" ")}function xr(e,t){e=e.trim();var n=t?r[x]:r[E];return e.replace(n,function(e,r,t,n,i,s){var a=yr(t);var o=a||yr(n);var f=o||yr(i);var u=f;if(r==="="&&u)r="";if(a){if(r===">"||r==="<"){e="<0.0.0"}else{e="*"}}else if(r&&u){if(o)n=0;if(f)i=0;if(r===">"){r=">=";if(o){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}else if(r==="<="){r="<";if(o)t=+t+1;else n=+n+1}e=r+t+"."+n+"."+i}else if(o){e=">="+t+".0.0 <"+(+t+1)+".0.0"}else if(f){e=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0"}return e})}function Rr(e,t){return e.trim().replace(r[O],"")}function Sr(e,r,t,n,i,s,a,o,f,u,l,p,c){if(yr(t))r="";else if(yr(n))r=">="+t+".0.0";else if(yr(i))r=">="+t+"."+n+".0";else r=">="+r;if(yr(f))o="";else if(yr(u))o="<"+(+f+1)+".0.0";else if(yr(l))o="<"+f+"."+(+u+1)+".0";else if(p)o="<="+f+"."+u+"."+l+"-"+p;else o="<="+o;return(r+" "+o).trim()}gr.prototype.test=function(e){if(!e)return false;if(typeof e==="string")e=new H(e,this.loose);for(var r=0;r<this.set.length;r++){if(Vr(this.set[r],e))return true}return false};function Vr(e,r){for(var t=0;t<e.length;t++){if(!e[t].test(r))return false}if(r.prerelease.length){for(var t=0;t<e.length;t++){if(e[t].semver===mr)return true;if(e[t].semver.prerelease.length>0){var n=e[t].semver;if(n.major===r.major&&n.minor===r.minor&&n.patch===r.patch)return true}}return false}return true}e.satisfies=Ir;function Ir(e,r,t){try{r=new gr(r,t)}catch(n){return false}return r.test(e)}e.maxSatisfying=Tr;function Tr(e,r,t){return e.filter(function(e){return Ir(e,r,t)}).sort(function(e,r){return ir(e,r,t)})[0]||null}e.validRange=Ar;function Ar(e,r){try{return new gr(e,r).range||"*"}catch(t){return null}}e.ltr=Cr;function Cr(e,r,t){return zr(e,r,"<",t)}e.gtr=Mr;function Mr(e,r,t){return zr(e,r,">",t)}e.outside=zr;function zr(e,r,t,n){e=new H(e,n);r=new gr(r,n);var i,s,a,o,f;switch(t){case">":i=or;s=cr;a=fr;o=">";f=">=";break;case"<":i=fr;s=pr;a=or;o="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ir(e,r,n)){return false}for(var u=0;u<r.set.length;++u){var l=r.set[u];var p=null;var c=null;l.forEach(function(e){p=p||e;c=c||e;if(i(e.semver,p.semver,n)){p=e}else if(a(e.semver,c.semver,n)){c=e}});if(p.operator===o||p.operator===f){return false}if((!c.operator||c.operator===o)&&s(e,c.semver)){return false}else if(c.operator===f&&a(e,c.semver)){return false}}return true}if(typeof define==="function"&&define.amd)define(e)})(typeof exports==="object"?exports:typeof define==="function"&&define.amd?{}:semver={}); \ No newline at end of file
+(function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=K;e.SEMVER_SPEC_VERSION="2.0.0";var r=256;var t=Number.MAX_SAFE_INTEGER||9007199254740991;var n=e.re=[];var i=e.src=[];var s=0;var o=s++;i[o]="0|[1-9]\\d*";var a=s++;i[a]="[0-9]+";var f=s++;i[f]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=s++;i[u]="("+i[o]+")\\."+"("+i[o]+")\\."+"("+i[o]+")";var l=s++;i[l]="("+i[a]+")\\."+"("+i[a]+")\\."+"("+i[a]+")";var p=s++;i[p]="(?:"+i[o]+"|"+i[f]+")";var h=s++;i[h]="(?:"+i[a]+"|"+i[f]+")";var c=s++;i[c]="(?:-("+i[p]+"(?:\\."+i[p]+")*))";var v=s++;i[v]="(?:-?("+i[h]+"(?:\\."+i[h]+")*))";var m=s++;i[m]="[0-9A-Za-z-]+";var g=s++;i[g]="(?:\\+("+i[m]+"(?:\\."+i[m]+")*))";var w=s++;var y="v?"+i[u]+i[c]+"?"+i[g]+"?";i[w]="^"+y+"$";var d="[v=\\s]*"+i[l]+i[v]+"?"+i[g]+"?";var j=s++;i[j]="^"+d+"$";var b=s++;i[b]="((?:<|>)?=?)";var E=s++;i[E]=i[a]+"|x|X|\\*";var $=s++;i[$]=i[o]+"|x|X|\\*";var k=s++;i[k]="[v=\\s]*("+i[$]+")"+"(?:\\.("+i[$]+")"+"(?:\\.("+i[$]+")"+"(?:"+i[c]+")?"+i[g]+"?"+")?)?";var R=s++;i[R]="[v=\\s]*("+i[E]+")"+"(?:\\.("+i[E]+")"+"(?:\\.("+i[E]+")"+"(?:"+i[v]+")?"+i[g]+"?"+")?)?";var S=s++;i[S]="^"+i[b]+"\\s*"+i[k]+"$";var x=s++;i[x]="^"+i[b]+"\\s*"+i[R]+"$";var I=s++;i[I]="(?:~>?)";var T=s++;i[T]="(\\s*)"+i[I]+"\\s+";n[T]=new RegExp(i[T],"g");var V="$1~";var A=s++;i[A]="^"+i[I]+i[k]+"$";var C=s++;i[C]="^"+i[I]+i[R]+"$";var M=s++;i[M]="(?:\\^)";var N=s++;i[N]="(\\s*)"+i[M]+"\\s+";n[N]=new RegExp(i[N],"g");var _="$1^";var z=s++;i[z]="^"+i[M]+i[k]+"$";var P=s++;i[P]="^"+i[M]+i[R]+"$";var X=s++;i[X]="^"+i[b]+"\\s*("+d+")$|^$";var Z=s++;i[Z]="^"+i[b]+"\\s*("+y+")$|^$";var q=s++;i[q]="(\\s*)"+i[b]+"\\s*("+d+"|"+i[k]+")";n[q]=new RegExp(i[q],"g");var L="$1$2$3";var F=s++;i[F]="^\\s*("+i[k]+")"+"\\s+-\\s+"+"("+i[k]+")"+"\\s*$";var G=s++;i[G]="^\\s*("+i[R]+")"+"\\s+-\\s+"+"("+i[R]+")"+"\\s*$";var O=s++;i[O]="(<|>)?=?\\s*\\*";for(var B=0;B<s;B++){if(!n[B])n[B]=new RegExp(i[B])}e.parse=D;function D(e,t){if(e instanceof K)return e;if(typeof e!=="string")return null;if(e.length>r)return null;var i=t?n[j]:n[w];if(!i.test(e))return null;try{return new K(e,t)}catch(s){return null}}e.valid=H;function H(e,r){var t=D(e,r);return t?t.version:null}e.clean=J;function J(e,r){var t=D(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null}e.SemVer=K;function K(e,i){if(e instanceof K){if(e.loose===i)return e;else e=e.version}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof K))return new K(e,i);this.loose=i;var s=e.trim().match(i?n[j]:n[w]);if(!s)throw new TypeError("Invalid Version: "+e);this.raw=e;this.major=+s[1];this.minor=+s[2];this.patch=+s[3];if(this.major>t||this.major<0)throw new TypeError("Invalid major version");if(this.minor>t||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>t||this.patch<0)throw new TypeError("Invalid patch version");if(!s[4])this.prerelease=[];else this.prerelease=s[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var r=+e;if(r>=0&&r<t)return r}return e});this.build=s[5]?s[5].split("."):[];this.format()}K.prototype.format=function(){this.version=this.major+"."+this.minor+"."+this.patch;if(this.prerelease.length)this.version+="-"+this.prerelease.join(".");return this.version};K.prototype.inspect=function(){return'<SemVer "'+this+'">'};K.prototype.toString=function(){return this.version};K.prototype.compare=function(e){if(!(e instanceof K))e=new K(e,this.loose);return this.compareMain(e)||this.comparePre(e)};K.prototype.compareMain=function(e){if(!(e instanceof K))e=new K(e,this.loose);return Y(this.major,e.major)||Y(this.minor,e.minor)||Y(this.patch,e.patch)};K.prototype.comparePre=function(e){if(!(e instanceof K))e=new K(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return Y(t,n)}while(++r)};K.prototype.inc=function(e,r){switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r);this.inc("pre",r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",r);this.inc("pre",r);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var t=this.prerelease.length;while(--t>=0){if(typeof this.prerelease[t]==="number"){this.prerelease[t]++;t=-2}}if(t===-1)this.prerelease.push(0)}if(r){if(this.prerelease[0]===r){if(isNaN(this.prerelease[1]))this.prerelease=[r,0]}else this.prerelease=[r,0]}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=Q;function Q(e,r,t,n){if(typeof t==="string"){n=t;t=undefined}try{return new K(e,t).inc(r,n).version}catch(i){return null}}e.diff=U;function U(e,r){if(pr(e,r)){return null}else{var t=D(e);var n=D(r);if(t.prerelease.length||n.prerelease.length){for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==n[i]){return"pre"+i}}}return"prerelease"}for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==n[i]){return i}}}}}e.compareIdentifiers=Y;var W=/^[0-9]+$/;function Y(e,r){var t=W.test(e);var n=W.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:e<r?-1:e>r?1:0}e.rcompareIdentifiers=er;function er(e,r){return Y(r,e)}e.major=rr;function rr(e,r){return new K(e,r).major}e.minor=tr;function tr(e,r){return new K(e,r).minor}e.patch=nr;function nr(e,r){return new K(e,r).patch}e.compare=ir;function ir(e,r,t){return new K(e,t).compare(r)}e.compareLoose=sr;function sr(e,r){return ir(e,r,true)}e.rcompare=or;function or(e,r,t){return ir(r,e,t)}e.sort=ar;function ar(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=fr;function fr(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=ur;function ur(e,r,t){return ir(e,r,t)>0}e.lt=lr;function lr(e,r,t){return ir(e,r,t)<0}e.eq=pr;function pr(e,r,t){return ir(e,r,t)===0}e.neq=hr;function hr(e,r,t){return ir(e,r,t)!==0}e.gte=cr;function cr(e,r,t){return ir(e,r,t)>=0}e.lte=vr;function vr(e,r,t){return ir(e,r,t)<=0}e.cmp=mr;function mr(e,r,t,n){var i;switch(r){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e===t;break;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e!==t;break;case"":case"=":case"==":i=pr(e,t,n);break;case"!=":i=hr(e,t,n);break;case">":i=ur(e,t,n);break;case">=":i=cr(e,t,n);break;case"<":i=lr(e,t,n);break;case"<=":i=vr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=gr;function gr(e,r){if(e instanceof gr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof gr))return new gr(e,r);this.loose=r;this.parse(e);if(this.semver===wr)this.value="";else this.value=this.operator+this.semver.version}var wr={};gr.prototype.parse=function(e){var r=this.loose?n[X]:n[Z];var t=e.match(r);if(!t)throw new TypeError("Invalid comparator: "+e);this.operator=t[1];if(this.operator==="=")this.operator="";if(!t[2])this.semver=wr;else this.semver=new K(t[2],this.loose)};gr.prototype.inspect=function(){return'<SemVer Comparator "'+this+'">'};gr.prototype.toString=function(){return this.value};gr.prototype.test=function(e){if(this.semver===wr)return true;if(typeof e==="string")e=new K(e,this.loose);return mr(e,this.operator,this.semver,this.loose)};e.Range=yr;function yr(e,r){if(e instanceof yr&&e.loose===r)return e;if(!(this instanceof yr))return new yr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}yr.prototype.inspect=function(){return'<SemVer Range "'+this.range+'">'};yr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};yr.prototype.toString=function(){return this.range};yr.prototype.parseRange=function(e){var r=this.loose;e=e.trim();var t=r?n[G]:n[F];e=e.replace(t,Tr);e=e.replace(n[q],L);e=e.replace(n[T],V);e=e.replace(n[N],_);e=e.split(/\s+/).join(" ");var i=r?n[X]:n[Z];var s=e.split(" ").map(function(e){return jr(e,r)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new gr(e,r)});return s};e.toComparators=dr;function dr(e,r){return new yr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function jr(e,r){e=kr(e,r);e=Er(e,r);e=Sr(e,r);e=Ir(e,r);return e}function br(e){return!e||e.toLowerCase()==="x"||e==="*"}function Er(e,r){return e.trim().split(/\s+/).map(function(e){return $r(e,r)}).join(" ")}function $r(e,r){var t=r?n[C]:n[A];return e.replace(t,function(e,r,t,n,i){var s;if(br(r))s="";else if(br(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(br(n))s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0";return s})}function kr(e,r){return e.trim().split(/\s+/).map(function(e){return Rr(e,r)}).join(" ")}function Rr(e,r){var t=r?n[P]:n[z];return e.replace(t,function(e,r,t,n,i){var s;if(br(r))s="";else if(br(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(br(n)){if(r==="0")s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else s=">="+r+"."+t+".0 <"+(+r+1)+".0.0"}else if(i){if(i.charAt(0)!=="-")i="-"+i;if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+i+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0"}else{if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+(+r+1)+".0.0"}return s})}function Sr(e,r){return e.split(/\s+/).map(function(e){return xr(e,r)}).join(" ")}function xr(e,r){e=e.trim();var t=r?n[x]:n[S];return e.replace(t,function(e,r,t,n,i,s){var o=br(t);var a=o||br(n);var f=a||br(i);var u=f;if(r==="="&&u)r="";if(o){if(r===">"||r==="<"){e="<0.0.0"}else{e="*"}}else if(r&&u){if(a)n=0;if(f)i=0;if(r===">"){r=">=";if(a){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}else if(r==="<="){r="<";if(a)t=+t+1;else n=+n+1}e=r+t+"."+n+"."+i}else if(a){e=">="+t+".0.0 <"+(+t+1)+".0.0"}else if(f){e=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0"}return e})}function Ir(e,r){return e.trim().replace(n[O],"")}function Tr(e,r,t,n,i,s,o,a,f,u,l,p,h){if(br(t))r="";else if(br(n))r=">="+t+".0.0";else if(br(i))r=">="+t+"."+n+".0";else r=">="+r;if(br(f))a="";else if(br(u))a="<"+(+f+1)+".0.0";else if(br(l))a="<"+f+"."+(+u+1)+".0";else if(p)a="<="+f+"."+u+"."+l+"-"+p;else a="<="+a;return(r+" "+a).trim()}yr.prototype.test=function(e){if(!e)return false;if(typeof e==="string")e=new K(e,this.loose);for(var r=0;r<this.set.length;r++){if(Vr(this.set[r],e))return true}return false};function Vr(e,r){for(var t=0;t<e.length;t++){if(!e[t].test(r))return false}if(r.prerelease.length){for(var t=0;t<e.length;t++){if(e[t].semver===wr)return true;if(e[t].semver.prerelease.length>0){var n=e[t].semver;if(n.major===r.major&&n.minor===r.minor&&n.patch===r.patch)return true}}return false}return true}e.satisfies=Ar;function Ar(e,r,t){try{r=new yr(r,t)}catch(n){return false}return r.test(e)}e.maxSatisfying=Cr;function Cr(e,r,t){return e.filter(function(e){return Ar(e,r,t)}).sort(function(e,r){return or(e,r,t)})[0]||null}e.validRange=Mr;function Mr(e,r){try{return new yr(e,r).range||"*"}catch(t){return null}}e.ltr=Nr;function Nr(e,r,t){return zr(e,r,"<",t)}e.gtr=_r;function _r(e,r,t){return zr(e,r,">",t)}e.outside=zr;function zr(e,r,t,n){e=new K(e,n);r=new yr(r,n);var i,s,o,a,f;switch(t){case">":i=ur;s=vr;o=lr;a=">";f=">=";break;case"<":i=lr;s=cr;o=ur;a="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ar(e,r,n)){return false}for(var u=0;u<r.set.length;++u){var l=r.set[u];var p=null;var h=null;l.forEach(function(e){p=p||e;h=h||e;if(i(e.semver,p.semver,n)){p=e}else if(o(e.semver,h.semver,n)){h=e}});if(p.operator===a||p.operator===f){return false}if((!h.operator||h.operator===a)&&s(e,h.semver)){return false}else if(h.operator===f&&o(e,h.semver)){return false}}return true}if(typeof define==="function"&&define.amd)define(e)})(typeof exports==="object"?exports:typeof define==="function"&&define.amd?{}:semver={}); \ No newline at end of file
diff --git a/deps/npm/node_modules/semver/semver.min.js.gz b/deps/npm/node_modules/semver/semver.min.js.gz
index 966dc9404b..6e28186d6b 100644
--- a/deps/npm/node_modules/semver/semver.min.js.gz
+++ b/deps/npm/node_modules/semver/semver.min.js.gz
Binary files differ
diff --git a/deps/npm/node_modules/semver/test/big-numbers.js b/deps/npm/node_modules/semver/test/big-numbers.js
new file mode 100644
index 0000000000..c051864bc9
--- /dev/null
+++ b/deps/npm/node_modules/semver/test/big-numbers.js
@@ -0,0 +1,31 @@
+var test = require('tap').test
+var semver = require('../')
+
+test('long version is too long', function (t) {
+ var v = '1.2.' + new Array(256).join('1')
+ t.throws(function () {
+ new semver.SemVer(v)
+ })
+ t.equal(semver.valid(v, false), null)
+ t.equal(semver.valid(v, true), null)
+ t.equal(semver.inc(v, 'patch'), null)
+ t.end()
+})
+
+test('big number is like too long version', function (t) {
+ var v = '1.2.' + new Array(100).join('1')
+ t.throws(function () {
+ new semver.SemVer(v)
+ })
+ t.equal(semver.valid(v, false), null)
+ t.equal(semver.valid(v, true), null)
+ t.equal(semver.inc(v, 'patch'), null)
+ t.end()
+})
+
+test('parsing null does not throw', function (t) {
+ t.equal(semver.parse(null), null)
+ t.equal(semver.parse({}), null)
+ t.equal(semver.parse(new semver.SemVer('1.2.3')).version, '1.2.3')
+ t.end()
+})
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js b/deps/npm/node_modules/strip-ansi/cli.js
index b83f63b907..b83f63b907 100755
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js
+++ b/deps/npm/node_modules/strip-ansi/cli.js
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js b/deps/npm/node_modules/strip-ansi/index.js
index 099480fbfc..099480fbfc 100644
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js
+++ b/deps/npm/node_modules/strip-ansi/index.js
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json b/deps/npm/node_modules/strip-ansi/package.json
index f04f66f75d..f766de042d 100644
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json
+++ b/deps/npm/node_modules/strip-ansi/package.json
@@ -63,7 +63,7 @@
"homepage": "https://github.com/sindresorhus/strip-ansi",
"_id": "strip-ansi@2.0.1",
"_shasum": "df62c1aa94ed2f114e1d0f21fd1d50482b79a60e",
- "_from": "strip-ansi@>=2.0.0 <3.0.0",
+ "_from": "strip-ansi@>=2.0.1 <2.1.0",
"_npmVersion": "1.4.28",
"_npmUser": {
"name": "sindresorhus",
@@ -84,5 +84,6 @@
"tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz"
+ "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/strip-ansi/readme.md
index 53ec26436c..53ec26436c 100644
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md
+++ b/deps/npm/node_modules/strip-ansi/readme.md
diff --git a/deps/npm/node_modules/tar/README.md b/deps/npm/node_modules/tar/README.md
index 424a2782bf..cfda2ac180 100644
--- a/deps/npm/node_modules/tar/README.md
+++ b/deps/npm/node_modules/tar/README.md
@@ -22,7 +22,9 @@ stream.
This only works with directories, it does not work with individual files.
The optional `properties` object are used to set properties in the tar
-'Global Extended Header'.
+'Global Extended Header'. If the `fromBase` property is set to true,
+the tar will contain files relative to the path passed, and not with
+the path included.
### tar.Extract([options])
diff --git a/deps/npm/node_modules/tar/lib/extract.js b/deps/npm/node_modules/tar/lib/extract.js
index 9fb1e6fb1b..fe1bb976eb 100644
--- a/deps/npm/node_modules/tar/lib/extract.js
+++ b/deps/npm/node_modules/tar/lib/extract.js
@@ -11,10 +11,6 @@ function Extract (opts) {
if (!(this instanceof Extract)) return new Extract(opts)
tar.Parse.apply(this)
- // have to dump into a directory
- opts.type = "Directory"
- opts.Directory = true
-
if (typeof opts !== "object") {
opts = { path: opts }
}
@@ -47,9 +43,20 @@ function Extract (opts) {
entry.linkpath = entry.props.linkpath = lp
}
}
- if (entry.type !== "Link") return
- entry.linkpath = entry.props.linkpath =
- path.join(opts.path, path.join("/", entry.props.linkpath))
+ if (entry.type === "Link") {
+ entry.linkpath = entry.props.linkpath =
+ path.join(opts.path, path.join("/", entry.props.linkpath))
+ }
+
+ if (entry.type === "SymbolicLink") {
+ var dn = path.dirname(entry.path) || ""
+ var linkpath = entry.props.linkpath
+ var target = path.resolve(opts.path, dn, linkpath)
+ if (target.indexOf(opts.path) !== 0) {
+ linkpath = path.join(opts.path, path.join("/", linkpath))
+ }
+ entry.linkpath = entry.props.linkpath = linkpath
+ }
})
this._fst.on("ready", function () {
@@ -71,6 +78,7 @@ function Extract (opts) {
this._fst.on("close", function () {
// console.error("\nEEEE Extract End", me._fst.path)
+ me.emit("finish")
me.emit("end")
me.emit("close")
})
@@ -80,7 +88,7 @@ inherits(Extract, tar.Parse)
Extract.prototype._streamEnd = function () {
var me = this
- if (!me._ended) me.error("unexpected eof")
+ if (!me._ended || me._entry) me.error("unexpected eof")
me._fst.end()
// my .end() is coming later.
}
diff --git a/deps/npm/node_modules/tar/lib/pack.js b/deps/npm/node_modules/tar/lib/pack.js
index 3ff14dd695..5a3bb95a12 100644
--- a/deps/npm/node_modules/tar/lib/pack.js
+++ b/deps/npm/node_modules/tar/lib/pack.js
@@ -131,7 +131,12 @@ Pack.prototype._process = function () {
// in the tarball to use. That way we can skip a lot of extra
// work when resolving symlinks for bundled dependencies in npm.
- var root = path.dirname((entry.root || entry).path)
+ var root = path.dirname((entry.root || entry).path);
+ if (me._global && me._global.fromBase && entry.root && entry.root.path) {
+ // user set 'fromBase: true' indicating tar root should be directory itself
+ root = entry.root.path;
+ }
+
var wprops = {}
Object.keys(entry.props || {}).forEach(function (k) {
diff --git a/deps/npm/node_modules/tar/lib/parse.js b/deps/npm/node_modules/tar/lib/parse.js
index 8517c481bc..1c53d9d26d 100644
--- a/deps/npm/node_modules/tar/lib/parse.js
+++ b/deps/npm/node_modules/tar/lib/parse.js
@@ -61,7 +61,7 @@ function Parse () {
// emitting "end"
Parse.prototype._streamEnd = function () {
var me = this
- if (!me._ended) me.error("unexpected eof")
+ if (!me._ended || me._entry) me.error("unexpected eof")
me.emit("end")
}
diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json
index b4a1209921..5483bf3460 100644
--- a/deps/npm/node_modules/tar/package.json
+++ b/deps/npm/node_modules/tar/package.json
@@ -6,7 +6,7 @@
},
"name": "tar",
"description": "tar for node",
- "version": "1.0.3",
+ "version": "2.1.0",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-tar.git"
@@ -27,14 +27,14 @@
"mkdirp": "^0.5.0"
},
"license": "BSD",
- "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThis only works with directories, it does not work with individual files.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n",
+ "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThis only works with directories, it does not work with individual files.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'. If the `fromBase` property is set to true,\nthe tar will contain files relative to the path passed, and not with\nthe path included.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n",
"readmeFilename": "README.md",
- "gitHead": "f4151128c585da236c6b1e278b762ecaedc20c15",
+ "gitHead": "b4c03a8e922fa522a3ddadaf2764bc1ab38d484e",
"bugs": {
"url": "https://github.com/isaacs/node-tar/issues"
},
- "homepage": "https://github.com/isaacs/node-tar",
- "_id": "tar@1.0.3",
- "_shasum": "15bcdab244fa4add44e4244a0176edb8aa9a2b44",
- "_from": "tar@>=1.0.3 <1.1.0"
+ "homepage": "https://github.com/isaacs/node-tar#readme",
+ "_id": "tar@2.1.0",
+ "_shasum": "d287aad12e947c766e319ac364f3c234900f65ec",
+ "_from": "tar@>=2.1.0 <2.2.0"
}
diff --git a/deps/npm/node_modules/tar/test/cb-never-called-1.0.1.tgz b/deps/npm/node_modules/tar/test/cb-never-called-1.0.1.tgz
new file mode 100644
index 0000000000..9e7014d85a
--- /dev/null
+++ b/deps/npm/node_modules/tar/test/cb-never-called-1.0.1.tgz
Binary files differ
diff --git a/deps/npm/node_modules/tar/test/dir-normalization.js b/deps/npm/node_modules/tar/test/dir-normalization.js
new file mode 100644
index 0000000000..9719c42f35
--- /dev/null
+++ b/deps/npm/node_modules/tar/test/dir-normalization.js
@@ -0,0 +1,177 @@
+// Set the umask, so that it works the same everywhere.
+process.umask(parseInt('22', 8))
+
+var fs = require('fs')
+var path = require('path')
+
+var fstream = require('fstream')
+var test = require('tap').test
+
+var tar = require('../tar.js')
+var file = path.resolve(__dirname, 'dir-normalization.tar')
+var target = path.resolve(__dirname, 'tmp/dir-normalization-test')
+var ee = 0
+
+var expectEntries = [
+ { path: 'fixtures/',
+ mode: '755',
+ type: '5',
+ linkpath: ''
+ },
+ { path: 'fixtures/a/',
+ mode: '755',
+ type: '5',
+ linkpath: ''
+ },
+ { path: 'fixtures/the-chumbler',
+ mode: '755',
+ type: '2',
+ linkpath: path.resolve(target, 'a/b/c/d/the-chumbler'),
+ },
+ { path: 'fixtures/a/b/',
+ mode: '755',
+ type: '5',
+ linkpath: ''
+ },
+ { path: 'fixtures/a/x',
+ mode: '644',
+ type: '0',
+ linkpath: ''
+ },
+ { path: 'fixtures/a/b/c/',
+ mode: '755',
+ type: '5',
+ linkpath: ''
+ },
+ { path: 'fixtures/a/b/c/y',
+ mode: '755',
+ type: '2',
+ linkpath: '../../x',
+ }
+]
+
+var ef = 0
+var expectFiles = [
+ { path: '',
+ mode: '40755',
+ type: 'Directory',
+ depth: 0,
+ linkpath: undefined
+ },
+ { path: '/fixtures',
+ mode: '40755',
+ type: 'Directory',
+ depth: 1,
+ linkpath: undefined
+ },
+ { path: '/fixtures/a',
+ mode: '40755',
+ type: 'Directory',
+ depth: 2,
+ linkpath: undefined
+ },
+ { path: '/fixtures/a/b',
+ mode: '40755',
+ type: 'Directory',
+ depth: 3,
+ linkpath: undefined
+ },
+ { path: '/fixtures/a/b/c',
+ mode: '40755',
+ type: 'Directory',
+ depth: 4,
+ linkpath: undefined
+ },
+ { path: '/fixtures/a/b/c/y',
+ mode: '120755',
+ type: 'SymbolicLink',
+ depth: 5,
+ linkpath: '../../x'
+ },
+ { path: '/fixtures/a/x',
+ mode: '100644',
+ type: 'File',
+ depth: 3,
+ linkpath: undefined
+ },
+ { path: '/fixtures/the-chumbler',
+ mode: '120755',
+ type: 'SymbolicLink',
+ depth: 2,
+ linkpath: path.resolve(target, 'a/b/c/d/the-chumbler')
+ }
+]
+
+test('preclean', function (t) {
+ require('rimraf').sync(path.join(__dirname, '/tmp/dir-normalization-test'))
+ t.pass('cleaned!')
+ t.end()
+})
+
+test('extract test', function (t) {
+ var extract = tar.Extract(target)
+ var inp = fs.createReadStream(file)
+
+ inp.pipe(extract)
+
+ extract.on('end', function () {
+ t.equal(ee, expectEntries.length, 'should see ' + expectEntries.length + ' entries')
+
+ // should get no more entries after end
+ extract.removeAllListeners('entry')
+ extract.on('entry', function (e) {
+ t.fail('Should not get entries after end!')
+ })
+
+ next()
+ })
+
+ extract.on('entry', function (entry) {
+ var mode = entry.props.mode & (~parseInt('22', 8))
+ var found = {
+ path: entry.path,
+ mode: mode.toString(8),
+ type: entry.props.type,
+ linkpath: entry.props.linkpath,
+ }
+
+ var wanted = expectEntries[ee++]
+ t.equivalent(found, wanted, 'tar entry ' + ee + ' ' + (wanted && wanted.path))
+ })
+
+ function next () {
+ var r = fstream.Reader({
+ path: target,
+ type: 'Directory',
+ sort: 'alpha'
+ })
+
+ r.on('ready', function () {
+ foundEntry(r)
+ })
+
+ r.on('end', finish)
+
+ function foundEntry (entry) {
+ var p = entry.path.substr(target.length)
+ var mode = entry.props.mode & (~parseInt('22', 8))
+ var found = {
+ path: p,
+ mode: mode.toString(8),
+ type: entry.props.type,
+ depth: entry.props.depth,
+ linkpath: entry.props.linkpath
+ }
+
+ var wanted = expectFiles[ef++]
+ t.equivalent(found, wanted, 'unpacked file ' + ef + ' ' + (wanted && wanted.path))
+
+ entry.on('entry', foundEntry)
+ }
+
+ function finish () {
+ t.equal(ef, expectFiles.length, 'should have ' + ef + ' items')
+ t.end()
+ }
+ }
+})
diff --git a/deps/npm/node_modules/tar/test/dir-normalization.tar b/deps/npm/node_modules/tar/test/dir-normalization.tar
new file mode 100644
index 0000000000..3c4845356c
--- /dev/null
+++ b/deps/npm/node_modules/tar/test/dir-normalization.tar
Binary files differ
diff --git a/deps/npm/node_modules/tar/test/error-on-broken.js b/deps/npm/node_modules/tar/test/error-on-broken.js
new file mode 100644
index 0000000000..e484920fd9
--- /dev/null
+++ b/deps/npm/node_modules/tar/test/error-on-broken.js
@@ -0,0 +1,33 @@
+var fs = require('fs')
+var path = require('path')
+var zlib = require('zlib')
+
+var tap = require('tap')
+
+var tar = require('../tar.js')
+
+var file = path.join(__dirname, 'cb-never-called-1.0.1.tgz')
+var target = path.join(__dirname, 'tmp/extract-test')
+
+tap.test('preclean', function (t) {
+ require('rimraf').sync(__dirname + '/tmp/extract-test')
+ t.pass('cleaned!')
+ t.end()
+})
+
+tap.test('extract test', function (t) {
+ var extract = tar.Extract(target)
+ var inp = fs.createReadStream(file)
+
+ inp.pipe(zlib.createGunzip()).pipe(extract)
+
+ extract.on('error', function (er) {
+ t.equal(er.message, 'unexpected eof', 'error noticed')
+ t.end()
+ })
+
+ extract.on('end', function () {
+ t.fail('shouldn\'t reach this point due to errors')
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/tar/test/pack.js b/deps/npm/node_modules/tar/test/pack.js
index bf033c1298..0f16c07bb0 100644
--- a/deps/npm/node_modules/tar/test/pack.js
+++ b/deps/npm/node_modules/tar/test/pack.js
@@ -830,6 +830,10 @@ tap.test("without global header", { timeout: 10000 }, function (t) {
runTest(t, false)
})
+tap.test("with from base", { timeout: 10000 }, function (t) {
+ runTest(t, true, true)
+})
+
function alphasort (a, b) {
return a === b ? 0
: a.toLowerCase() > b.toLowerCase() ? 1
@@ -839,7 +843,7 @@ function alphasort (a, b) {
}
-function runTest (t, doGH) {
+function runTest (t, doGH, doFromBase) {
var reader = Reader({ path: input
, filter: function () {
return !this.path.match(/\.(tar|hex)$/)
@@ -847,7 +851,10 @@ function runTest (t, doGH) {
, sort: alphasort
})
- var pack = Pack(doGH ? pkg : null)
+ var props = doGH ? pkg : {}
+ if(doFromBase) props.fromBase = true;
+
+ var pack = Pack(props)
var writer = Writer(target)
// skip the global header if we're not doing that.
@@ -901,6 +908,17 @@ function runTest (t, doGH) {
}
t.equal(ev, wanted[0], "event type should be "+wanted[0])
+ if(doFromBase) {
+ if(wanted[1].path.indexOf('fixtures/') && wanted[1].path.length == 100)
+ wanted[1].path = wanted[1].path.replace('fixtures/', '') + 'ccccccccc'
+
+ if(wanted[1]) wanted[1].path = wanted[1].path.replace('fixtures/', '').replace('//', '/')
+ if(wanted[1].path == '') wanted[1].path = '/'
+ if(wanted[2] && wanted[2].path) wanted[2].path = wanted[2].path.replace('fixtures', '').replace(/^\//, '')
+
+ wanted[1].linkpath = wanted[1].linkpath.replace('fixtures/', '')
+ }
+
if (ev !== wanted[0] || e.path !== wanted[1].path) {
console.error("wanted", wanted)
console.error([ev, e.props])
diff --git a/deps/npm/package.json b/deps/npm/package.json
index 0a75480c7a..5c70f6f8af 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "2.7.4",
+ "version": "2.8.4",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
@@ -33,17 +33,17 @@
"dependencies": {
"abbrev": "~1.0.5",
"ansi": "~0.3.0",
+ "ansi-regex": "~1.1.1",
"ansicolors": "~0.3.2",
"ansistyles": "~0.1.3",
"archy": "~1.0.0",
"async-some": "~1.0.1",
"block-stream": "0.0.7",
"char-spinner": "~1.0.1",
- "child-process-close": "~0.1.1",
"chmodr": "~0.1.0",
"chownr": "0",
"cmd-shim": "~2.0.1",
- "columnify": "~1.4.1",
+ "columnify": "~1.5.1",
"config-chain": "~1.1.8",
"dezalgo": "~1.0.1",
"editor": "~0.1.0",
@@ -53,44 +53,45 @@
"fstream-npm": "~1.0.2",
"github-url-from-git": "~1.4.0",
"github-url-from-username-repo": "~1.0.2",
- "glob": "~5.0.3",
+ "glob": "~5.0.5",
"graceful-fs": "~3.0.6",
- "hosted-git-info": "~1.5.3",
+ "hosted-git-info": "~2.1.2",
"inflight": "~1.0.4",
"inherits": "~2.0.1",
"ini": "~1.3.3",
- "init-package-json": "~1.3.0",
+ "init-package-json": "~1.4.1",
"lockfile": "~1.0.0",
- "lru-cache": "~2.5.0",
+ "lru-cache": "~2.6.1",
"minimatch": "~2.0.4",
"mkdirp": "~0.5.0",
"node-gyp": "~1.0.3",
"nopt": "~3.0.1",
"normalize-git-url": "~1.0.0",
- "normalize-package-data": "~1.0.3",
+ "normalize-package-data": "~2.0.0",
"npm-cache-filename": "~1.0.1",
"npm-install-checks": "~1.0.5",
- "npm-package-arg": "~3.1.1",
- "npm-registry-client": "~6.1.2",
+ "npm-package-arg": "~4.0.0",
+ "npm-registry-client": "~6.3.2",
"npm-user-validate": "~0.1.1",
"npmlog": "~1.2.0",
"once": "~1.3.1",
- "opener": "~1.4.0",
+ "opener": "~1.4.1",
"osenv": "~0.1.0",
"path-is-inside": "~1.0.0",
"read": "~1.0.4",
- "read-installed": "~3.1.5",
- "read-package-json": "~1.3.2",
+ "read-installed": "~4.0.0",
+ "read-package-json": "~2.0.0",
"readable-stream": "~1.0.33",
- "realize-package-specifier": "~2.2.0",
- "request": "~2.53.0",
+ "realize-package-specifier": "~3.0.0",
+ "request": "~2.55.0",
"retry": "~0.6.1",
"rimraf": "~2.3.2",
- "semver": "~4.3.1",
+ "semver": "~4.3.3",
"sha": "~1.3.0",
"slide": "~1.1.6",
"sorted-object": "~1.0.0",
- "tar": "~1.0.3",
+ "strip-ansi": "~2.0.1",
+ "tar": "~2.1.0",
"text-table": "~0.2.0",
"uid-number": "0.0.6",
"umask": "~1.1.0",
@@ -100,6 +101,7 @@
},
"bundleDependencies": [
"abbrev",
+ "ansi-regex",
"ansi",
"ansicolors",
"ansistyles",
@@ -107,7 +109,6 @@
"async-some",
"block-stream",
"char-spinner",
- "child-process-close",
"chmodr",
"chownr",
"cmd-shim",
@@ -158,6 +159,7 @@
"sha",
"slide",
"sorted-object",
+ "strip-ansi",
"tar",
"text-table",
"uid-number",
@@ -169,19 +171,19 @@
"devDependencies": {
"marked": "~0.3.3",
"marked-man": "~0.1.4",
- "nock": "~1.2.0",
+ "nock": "~1.6.0",
"npm-registry-couchapp": "~2.6.7",
"npm-registry-mock": "~1.0.0",
- "require-inject": "~1.1.0",
+ "require-inject": "~1.2.0",
"sprintf-js": "~1.0.2",
"tap": "~0.7.1"
},
"scripts": {
"test-legacy": "node ./test/run.js",
- "test": "tap --timeout 120 test/tap/*.js",
- "tap": "tap --timeout 120 test/tap/*.js",
- "test-all": "node ./test/run.js && tap test/tap/*.js",
- "prepublish": "node bin/npm-cli.js prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j8 doc",
+ "test": "tap --timeout 240 test/tap/*.js",
+ "tap": "tap --timeout 240 test/tap/*.js",
+ "test-all": "npm run test-legacy && npm test",
+ "prepublish": "node bin/npm-cli.js prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc",
"dumpconf": "env | grep npm | sort | uniq"
},
"license": "Artistic-2.0"
diff --git a/deps/npm/scripts/doc-build.sh b/deps/npm/scripts/doc-build.sh
index 79629c63dc..6a5c7aa70f 100755
--- a/deps/npm/scripts/doc-build.sh
+++ b/deps/npm/scripts/doc-build.sh
@@ -61,7 +61,7 @@ fi
src=$1
dest=$2
name=$(basename ${src%.*})
-date=$(date -u +'%Y-%M-%d %H:%m:%S')
+date=$(date -u +'%Y-%m-%d %H:%M:%S')
version=$(node cli.js -v)
mkdir -p $(dirname $dest)
diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js
index b33d3cb165..3537df6876 100644
--- a/deps/npm/test/common-tap.js
+++ b/deps/npm/test/common-tap.js
@@ -1,18 +1,27 @@
-var spawn = require("child_process").spawn
-var path = require("path")
+// cheesy hackaround for test deps (read: nock) that rely on setImmediate
+if (!global.setImmediate || !require('timers').setImmediate) {
+ require('timers').setImmediate = global.setImmediate = function () {
+ var args = [arguments[0], 0].concat([].slice.call(arguments, 1))
+ setTimeout.apply(this, args)
+ }
+}
+
+var spawn = require('child_process').spawn
+var path = require('path')
var port = exports.port = 1337
-exports.registry = "http://localhost:" + port
-process.env.npm_config_loglevel = "error"
+exports.registry = 'http://localhost:' + port
+process.env.npm_config_loglevel = 'error'
-var npm_config_cache = path.resolve(__dirname, "npm_cache")
+var npm_config_cache = path.resolve(__dirname, 'npm_cache')
process.env.npm_config_cache = exports.npm_config_cache = npm_config_cache
-process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, "fixtures", "config", "userconfig")
-process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, "fixtures", "config", "globalconfig")
-process.env.random_env_var = "foo"
+process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig')
+process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig')
+process.env.random_env_var = 'foo'
-var bin = exports.bin = require.resolve("../bin/npm-cli.js")
-var once = require("once")
+var bin = exports.bin = require.resolve('../bin/npm-cli.js')
+var chain = require('slide').chain
+var once = require('once')
exports.npm = function (cmd, opts, cb) {
cb = once(cb)
@@ -24,23 +33,53 @@ exports.npm = function (cmd, opts, cb) {
opts.env.npm_config_cache = npm_config_cache
}
- var stdout = ""
- , stderr = ""
- , node = process.execPath
- , child = spawn(node, cmd, opts)
+ var stdout = ''
+ var stderr = ''
+ var node = process.execPath
+ var child = spawn(node, cmd, opts)
- if (child.stderr) child.stderr.on("data", function (chunk) {
- stderr += chunk
- })
+ if (child.stderr) {
+ child.stderr.on('data', function (chunk) {
+ stderr += chunk
+ })
+ }
- if (child.stdout) child.stdout.on("data", function (chunk) {
- stdout += chunk
- })
+ if (child.stdout) {
+ child.stdout.on('data', function (chunk) {
+ stdout += chunk
+ })
+ }
- child.on("error", cb)
+ child.on('error', cb)
- child.on("close", function (code) {
+ child.on('close', function (code) {
cb(null, code, stdout, stderr)
})
return child
}
+
+exports.makeGitRepo = function (params, cb) {
+ // git must be called after npm.load because it uses config
+ var git = require('../lib/utils/git.js')
+
+ var root = params.path || process.cwd()
+ var user = params.user || 'PhantomFaker'
+ var email = params.email || 'nope@not.real'
+ var added = params.added || ['package.json']
+ var message = params.message || 'stub repo'
+
+ var opts = { cwd: root, env: { PATH: process.env.PATH }}
+ var commands = [
+ git.chainableExec(['init'], opts),
+ git.chainableExec(['config', 'user.name', user], opts),
+ git.chainableExec(['config', 'user.email', email], opts),
+ git.chainableExec(['add'].concat(added), opts),
+ git.chainableExec(['commit', '-m', message], opts)
+ ]
+
+ if (Array.isArray(params.commands)) {
+ commands = commands.concat(params.commands)
+ }
+
+ chain(commands, cb)
+}
diff --git a/deps/npm/test/tap/cache-shasum-fork/underscore-1.5.1.tgz b/deps/npm/test/fixtures/forked-underscore-1.5.1.tgz
index 5aca6247ac..5aca6247ac 100644
--- a/deps/npm/test/tap/cache-shasum-fork/underscore-1.5.1.tgz
+++ b/deps/npm/test/fixtures/forked-underscore-1.5.1.tgz
Binary files differ
diff --git a/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore-2.tar b/deps/npm/test/fixtures/gitignore-and-npmignore-2.tar
index 289dd568bd..289dd568bd 100644
--- a/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore-2.tar
+++ b/deps/npm/test/fixtures/gitignore-and-npmignore-2.tar
Binary files differ
diff --git a/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tar b/deps/npm/test/fixtures/gitignore-and-npmignore.tar
index 8b638b114a..8b638b114a 100644
--- a/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tar
+++ b/deps/npm/test/fixtures/gitignore-and-npmignore.tar
Binary files differ
diff --git a/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tgz b/deps/npm/test/fixtures/gitignore-and-npmignore.tgz
index 4be4364104..4be4364104 100644
--- a/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tgz
+++ b/deps/npm/test/fixtures/gitignore-and-npmignore.tgz
Binary files differ
diff --git a/deps/npm/test/tap/unpack-foreign-tarball/gitignore.tgz b/deps/npm/test/fixtures/gitignore.tgz
index 7f5f2d71bf..7f5f2d71bf 100644
--- a/deps/npm/test/tap/unpack-foreign-tarball/gitignore.tgz
+++ b/deps/npm/test/fixtures/gitignore.tgz
Binary files differ
diff --git a/deps/npm/test/tap/unpack-foreign-tarball/npmignore.tgz b/deps/npm/test/fixtures/npmignore.tgz
index 765593decb..765593decb 100644
--- a/deps/npm/test/tap/unpack-foreign-tarball/npmignore.tgz
+++ b/deps/npm/test/fixtures/npmignore.tgz
Binary files differ
diff --git a/deps/npm/test/tap/add-remote-git-fake-windows.js b/deps/npm/test/tap/add-remote-git-fake-windows.js
index b665f752ac..0e0d539fb0 100644
--- a/deps/npm/test/tap/add-remote-git-fake-windows.js
+++ b/deps/npm/test/tap/add-remote-git-fake-windows.js
@@ -1,23 +1,22 @@
-var fs = require("fs")
-var resolve = require("path").resolve
+var fs = require('fs')
+var resolve = require('path').resolve
-var chain = require("slide").chain
-var osenv = require("osenv")
-var mkdirp = require("mkdirp")
-var rimraf = require("rimraf")
-var test = require("tap").test
+var osenv = require('osenv')
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var test = require('tap').test
-var npm = require("../../lib/npm.js")
-var common = require("../common-tap.js")
+var npm = require('../../lib/npm.js')
+var common = require('../common-tap.js')
-var pkg = resolve(__dirname, "add-remote-git")
-var repo = resolve(__dirname, "add-remote-git-repo")
+var pkg = resolve(__dirname, 'add-remote-git')
+var repo = resolve(__dirname, 'add-remote-git-repo')
var daemon
var daemonPID
var git
-test("setup", function (t) {
+test('setup', function (t) {
bootstrap()
setup(function (er, r) {
if (er) {
@@ -33,21 +32,21 @@ test("setup", function (t) {
})
})
-test("install from repo on 'Windows'", function (t) {
+test('install from repo on \'Windows\'', function (t) {
// before we confuse everything by switching the platform
- require("../../lib/install.js")
- require("../../lib/unbuild.js")
- process.platform = "win32"
+ require('../../lib/install.js')
+ require('../../lib/unbuild.js')
+ process.platform = 'win32'
process.chdir(pkg)
- npm.commands.install(".", [], function (er) {
- t.ifError(er, "npm installed via git")
+ npm.commands.install('.', [], function (er) {
+ t.ifError(er, 'npm installed via git')
t.end()
})
})
-test("clean", function (t) {
- daemon.on("close", function () {
+test('clean', function (t) {
+ daemon.on('close', function () {
cleanup()
t.end()
})
@@ -55,83 +54,73 @@ test("clean", function (t) {
})
var pjParent = JSON.stringify({
- name : "parent",
- version : "1.2.3",
- dependencies : {
- "child" : "git://localhost:1233/child.git"
+ name: 'parent',
+ version: '1.2.3',
+ dependencies: {
+ child: 'git://localhost:1233/child.git'
}
-}, null, 2) + "\n"
+}, null, 2) + '\n'
var pjChild = JSON.stringify({
- name : "child",
- version : "1.0.3"
-}, null, 2) + "\n"
+ name: 'child',
+ version: '1.0.3'
+}, null, 2) + '\n'
function bootstrap () {
rimraf.sync(pkg)
mkdirp.sync(pkg)
- fs.writeFileSync(resolve(pkg, "package.json"), pjParent)
+ fs.writeFileSync(resolve(pkg, 'package.json'), pjParent)
}
function setup (cb) {
rimraf.sync(repo)
mkdirp.sync(repo)
- fs.writeFileSync(resolve(repo, "package.json"), pjChild)
- npm.load({ registry : common.registry, loglevel : "silent" }, function () {
+ fs.writeFileSync(resolve(repo, 'package.json'), pjChild)
+ npm.load({ registry: common.registry, loglevel: 'silent' }, function () {
// some really cheesy monkeypatching
- require("module")._cache[require.resolve("which")] = {
- exports : function (_, cb) { cb() }
+ require('module')._cache[require.resolve('which')] = {
+ exports: function (_, cb) { cb() }
}
- git = require("../../lib/utils/git.js")
+ git = require('../../lib/utils/git.js')
function startDaemon (cb) {
// start git server
var d = git.spawn(
[
- "daemon",
- "--verbose",
- "--listen=localhost",
- "--export-all",
- "--base-path=.",
- "--port=1233"
+ 'daemon',
+ '--verbose',
+ '--listen=localhost',
+ '--export-all',
+ '--base-path=.',
+ '--port=1233'
],
{
- cwd : pkg,
- env : process.env,
- stdio : ["pipe", "pipe", "pipe"]
+ cwd: pkg,
+ env: process.env,
+ stdio: ['pipe', 'pipe', 'pipe']
}
)
- d.stderr.on("data", childFinder)
+ d.stderr.on('data', childFinder)
function childFinder (c) {
var cpid = c.toString().match(/^\[(\d+)\]/)
if (cpid[1]) {
- this.removeListener("data", childFinder)
+ this.removeListener('data', childFinder)
cb(null, [d, cpid[1]])
}
}
}
- var opts = {
- cwd : repo,
- env : process.env
- }
-
- chain(
- [
- git.chainableExec(["init"], opts),
- git.chainableExec(["config", "user.name", "PhantomFaker"], opts),
- git.chainableExec(["config", "user.email", "nope@not.real"], opts),
- git.chainableExec(["add", "package.json"], opts),
- git.chainableExec(["commit", "-m", "stub package"], opts),
+ common.makeGitRepo({
+ path: repo,
+ commands: [
git.chainableExec(
- ["clone", "--bare", repo, "child.git"],
- { cwd : pkg, env : process.env }
+ ['clone', '--bare', repo, 'child.git'],
+ { cwd: pkg, env: process.env }
),
startDaemon
- ],
- cb
- )
+ ]
+ }, cb)
})
}
diff --git a/deps/npm/test/tap/add-remote-git-file.js b/deps/npm/test/tap/add-remote-git-file.js
index ca4a33cfc8..b2a7be9039 100644
--- a/deps/npm/test/tap/add-remote-git-file.js
+++ b/deps/npm/test/tap/add-remote-git-file.js
@@ -2,7 +2,6 @@ var fs = require('fs')
var resolve = require('path').resolve
var url = require('url')
-var chain = require('slide').chain
var osenv = require('osenv')
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
@@ -29,7 +28,7 @@ test('setup', function (t) {
test('cache from repo', function (t) {
process.chdir(pkg)
var addRemoteGit = require('../../lib/cache/add-remote-git.js')
- addRemoteGit(cloneURL, false, function (er, data) {
+ addRemoteGit(cloneURL, function (er, data) {
t.ifError(er, 'cached via git')
t.equal(
url.parse(data._resolved).protocol,
@@ -62,25 +61,13 @@ function setup (cb) {
npm.load({ registry: common.registry, loglevel: 'silent' }, function () {
git = require('../../lib/utils/git.js')
- var opts = {
- cwd: repo,
- env: process.env
- }
-
- chain(
- [
- git.chainableExec(['init'], opts),
- git.chainableExec(['config', 'user.name', 'PhantomFaker'], opts),
- git.chainableExec(['config', 'user.email', 'nope@not.real'], opts),
- git.chainableExec(['add', 'package.json'], opts),
- git.chainableExec(['commit', '-m', 'stub package'], opts),
- git.chainableExec(
- ['clone', '--bare', repo, 'child.git'],
- { cwd: pkg, env: process.env }
- )
- ],
- cb
- )
+ common.makeGitRepo({
+ path: repo,
+ commands: [git.chainableExec(
+ ['clone', '--bare', repo, 'child.git'],
+ { cwd: pkg, env: process.env }
+ )]
+ }, cb)
})
}
diff --git a/deps/npm/test/tap/add-remote-git-get-resolved.js b/deps/npm/test/tap/add-remote-git-get-resolved.js
new file mode 100644
index 0000000000..4a4f0a5fe5
--- /dev/null
+++ b/deps/npm/test/tap/add-remote-git-get-resolved.js
@@ -0,0 +1,101 @@
+'use strict'
+var test = require('tap').test
+
+var npm = require('../../lib/npm.js')
+var common = require('../common-tap.js')
+
+test('setup', function (t) {
+ var opts = {
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+
+ t.end()
+ })
+})
+
+test('add-remote-git#get-resolved git: passthru', function (t) {
+ var getResolved = require('../../lib/cache/add-remote-git.js').getResolved
+
+ verify('git:github.com/foo/repo')
+ verify('git:github.com/foo/repo.git')
+ verify('git://github.com/foo/repo#decadacefadabade')
+ verify('git://github.com/foo/repo.git#decadacefadabade')
+
+ function verify (uri) {
+ t.equal(
+ getResolved(uri, 'decadacefadabade'),
+ 'git://github.com/foo/repo.git#decadacefadabade',
+ uri + ' normalized to canonical form git://github.com/foo/repo.git#decadacefadabade'
+ )
+ }
+ t.end()
+})
+
+test('add-remote-git#get-resolved SSH', function (t) {
+ var getResolved = require('../../lib/cache/add-remote-git.js').getResolved
+
+ t.comment('tests for https://github.com/npm/npm/issues/7961')
+ verify('git@github.com:foo/repo')
+ verify('git@github.com:foo/repo#master')
+ verify('git+ssh://git@github.com/foo/repo#master')
+ verify('git+ssh://git@github.com/foo/repo#decadacefadabade')
+
+ function verify (uri) {
+ t.equal(
+ getResolved(uri, 'decadacefadabade'),
+ 'git+ssh://git@github.com/foo/repo.git#decadacefadabade',
+ uri + ' normalized to canonical form git+ssh://git@github.com/foo/repo.git#decadacefadabade'
+ )
+ }
+ t.end()
+})
+
+test('add-remote-git#get-resolved HTTPS', function (t) {
+ var getResolved = require('../../lib/cache/add-remote-git.js').getResolved
+
+ verify('https://github.com/foo/repo')
+ verify('https://github.com/foo/repo#master')
+ verify('git+https://github.com/foo/repo.git#master')
+ verify('git+https://github.com/foo/repo#decadacefadabade')
+
+ function verify (uri) {
+ t.equal(
+ getResolved(uri, 'decadacefadabade'),
+ 'git+https://github.com/foo/repo.git#decadacefadabade',
+ uri + ' normalized to canonical form git+https://github.com/foo/repo.git#decadacefadabade'
+ )
+ }
+ t.end()
+})
+
+test('add-remote-git#get-resolved edge cases', function (t) {
+ var getResolved = require('../../lib/cache/add-remote-git.js').getResolved
+
+ t.notOk(
+ getResolved('git@bananaboat.com:galbi.git', 'decadacefadabade'),
+ 'non-hosted Git SSH non-URI strings are invalid'
+ )
+
+ t.equal(
+ getResolved('git+ssh://git.bananaboat.net/foo', 'decadacefadabade'),
+ 'git+ssh://git.bananaboat.net/foo#decadacefadabade',
+ 'don\'t break non-hosted SSH URLs'
+ )
+
+ t.equal(
+ getResolved('git://gitbub.com/foo/bar.git', 'decadacefadabade'),
+ 'git://gitbub.com/foo/bar.git#decadacefadabade',
+ 'don\'t break non-hosted git: URLs'
+ )
+
+ t.comment('test for https://github.com/npm/npm/issues/3224')
+ t.equal(
+ getResolved('git+ssh://git@git.example.com:my-repo.git#9abe82cb339a70065e75300f62b742622774693c', 'decadacefadabade'),
+ 'git+ssh://git@git.example.com:my-repo.git#decadacefadabade',
+ 'preserve weird colon in semi-standard ssh:// URLs'
+ )
+ t.end()
+})
diff --git a/deps/npm/test/tap/add-remote-git-shrinkwrap.js b/deps/npm/test/tap/add-remote-git-shrinkwrap.js
index 555dca2131..94951e9a9d 100644
--- a/deps/npm/test/tap/add-remote-git-shrinkwrap.js
+++ b/deps/npm/test/tap/add-remote-git-shrinkwrap.js
@@ -1,7 +1,6 @@
var fs = require('fs')
var resolve = require('path').resolve
-var chain = require('slide').chain
var osenv = require('osenv')
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
@@ -141,26 +140,16 @@ function setup (cb) {
}
}
- var opts = {
- cwd: repo,
- env: process.env
- }
-
- chain(
- [
- git.chainableExec(['init'], opts),
- git.chainableExec(['config', 'user.name', 'PhantomFaker'], opts),
- git.chainableExec(['config', 'user.email', 'nope@not.real'], opts),
- git.chainableExec(['add', 'package.json'], opts),
- git.chainableExec(['commit', '-m', 'stub package'], opts),
+ common.makeGitRepo({
+ path: repo,
+ commands: [
git.chainableExec(
['clone', '--bare', repo, 'child.git'],
{ cwd: pkg, env: process.env }
),
startDaemon
- ],
- cb
- )
+ ]
+ }, cb)
})
}
diff --git a/deps/npm/test/tap/add-remote-git.js b/deps/npm/test/tap/add-remote-git.js
index 325ac2ed3d..269d0cac7d 100644
--- a/deps/npm/test/tap/add-remote-git.js
+++ b/deps/npm/test/tap/add-remote-git.js
@@ -1,26 +1,25 @@
-var fs = require("fs")
-var resolve = require("path").resolve
+var fs = require('fs')
+var resolve = require('path').resolve
-var chain = require("slide").chain
-var osenv = require("osenv")
-var mkdirp = require("mkdirp")
-var rimraf = require("rimraf")
-var test = require("tap").test
+var osenv = require('osenv')
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var test = require('tap').test
-var npm = require("../../lib/npm.js")
-var common = require("../common-tap.js")
+var npm = require('../../lib/npm.js')
+var common = require('../common-tap.js')
-var pkg = resolve(__dirname, "add-remote-git")
-var repo = resolve(__dirname, "add-remote-git-repo")
+var pkg = resolve(__dirname, 'add-remote-git')
+var repo = resolve(__dirname, 'add-remote-git-repo')
var daemon
var daemonPID
var git
-test("setup", function (t) {
+test('setup', function (t) {
bootstrap()
setup(function (er, r) {
- t.ifError(er, "git started up successfully")
+ t.ifError(er, 'git started up successfully')
if (!er) {
daemon = r[r.length - 2]
@@ -31,17 +30,17 @@ test("setup", function (t) {
})
})
-test("install from repo", function (t) {
+test('install from repo', function (t) {
process.chdir(pkg)
- npm.commands.install(".", [], function (er) {
- t.ifError(er, "npm installed via git")
+ npm.commands.install('.', [], function (er) {
+ t.ifError(er, 'npm installed via git')
t.end()
})
})
-test("clean", function (t) {
- daemon.on("close", function () {
+test('clean', function (t) {
+ daemon.on('close', function () {
cleanup()
t.end()
})
@@ -49,77 +48,67 @@ test("clean", function (t) {
})
var pjParent = JSON.stringify({
- name : "parent",
- version : "1.2.3",
- dependencies : {
- "child" : "git://localhost:1234/child.git"
+ name: 'parent',
+ version: '1.2.3',
+ dependencies: {
+ child: 'git://localhost:1234/child.git'
}
-}, null, 2) + "\n"
+}, null, 2) + '\n'
var pjChild = JSON.stringify({
- name : "child",
- version : "1.0.3"
-}, null, 2) + "\n"
+ name: 'child',
+ version: '1.0.3'
+}, null, 2) + '\n'
function bootstrap () {
mkdirp.sync(pkg)
- fs.writeFileSync(resolve(pkg, "package.json"), pjParent)
+ fs.writeFileSync(resolve(pkg, 'package.json'), pjParent)
}
function setup (cb) {
mkdirp.sync(repo)
- fs.writeFileSync(resolve(repo, "package.json"), pjChild)
- npm.load({ registry : common.registry, loglevel : "silent" }, function () {
- git = require("../../lib/utils/git.js")
+ fs.writeFileSync(resolve(repo, 'package.json'), pjChild)
+ npm.load({ registry: common.registry, loglevel: 'silent' }, function () {
+ git = require('../../lib/utils/git.js')
function startDaemon (cb) {
// start git server
var d = git.spawn(
[
- "daemon",
- "--verbose",
- "--listen=localhost",
- "--export-all",
- "--base-path=.",
- "--port=1234"
+ 'daemon',
+ '--verbose',
+ '--listen=localhost',
+ '--export-all',
+ '--base-path=.',
+ '--port=1234'
],
{
- cwd : pkg,
- env : process.env,
- stdio : ["pipe", "pipe", "pipe"]
+ cwd: pkg,
+ env: process.env,
+ stdio: ['pipe', 'pipe', 'pipe']
}
)
- d.stderr.on("data", childFinder)
+ d.stderr.on('data', childFinder)
function childFinder (c) {
var cpid = c.toString().match(/^\[(\d+)\]/)
if (cpid[1]) {
- this.removeListener("data", childFinder)
+ this.removeListener('data', childFinder)
cb(null, [d, cpid[1]])
}
}
}
- var opts = {
- cwd : repo,
- env : process.env
- }
-
- chain(
- [
- git.chainableExec(["init"], opts),
- git.chainableExec(["config", "user.name", "PhantomFaker"], opts),
- git.chainableExec(["config", "user.email", "nope@not.real"], opts),
- git.chainableExec(["add", "package.json"], opts),
- git.chainableExec(["commit", "-m", "stub package"], opts),
+ common.makeGitRepo({
+ path: repo,
+ commands: [
git.chainableExec(
- ["clone", "--bare", repo, "child.git"],
- { cwd : pkg, env : process.env }
+ ['clone', '--bare', repo, 'child.git'],
+ { cwd: pkg, env: process.env }
),
startDaemon
- ],
- cb
- )
+ ]
+ }, cb)
})
}
diff --git a/deps/npm/test/tap/adduser-legacy-auth.js b/deps/npm/test/tap/adduser-legacy-auth.js
index 9090c67b40..f9829c618a 100644
--- a/deps/npm/test/tap/adduser-legacy-auth.js
+++ b/deps/npm/test/tap/adduser-legacy-auth.js
@@ -1,90 +1,94 @@
-var fs = require("fs")
-var path = require("path")
-var mkdirp = require("mkdirp")
-var rimraf = require("rimraf")
-var mr = require("npm-registry-mock")
+var fs = require('fs')
+var path = require('path')
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var mr = require('npm-registry-mock')
-var test = require("tap").test
-var common = require("../common-tap.js")
+var test = require('tap').test
+var common = require('../common-tap.js')
-var opts = {cwd : __dirname}
-var pkg = path.resolve(__dirname, "adduser-legacy-auth")
-var outfile = path.resolve(pkg, "_npmrc")
+var opts = { cwd: __dirname }
+var pkg = path.resolve(__dirname, 'adduser-legacy-auth')
+var outfile = path.resolve(pkg, '_npmrc')
-var contents = "_auth=" + new Buffer("u:x").toString("base64") + "\n" +
- "registry=https://nonexistent.lvh.me/registry\n" +
- "email=u@p.me\n"
+var contents = '_auth=' + new Buffer('u:x').toString('base64') + '\n' +
+ 'registry=https://nonexistent.lvh.me/registry\n' +
+ 'email=u@p.me\n'
var responses = {
- "Username" : "u\n",
- "Password" : "p\n",
- "Email" : "u@p.me\n"
+ 'Username': 'u\n',
+ 'Password': 'p\n',
+ 'Email': 'u@p.me\n'
}
function mocks (server) {
server.filteringRequestBody(function (r) {
- if (r.match(/\"_id\":\"org\.couchdb\.user:u\"/)) {
- return "auth"
+ if (r.match(/"_id":"org\.couchdb\.user:u"/)) {
+ return 'auth'
}
})
- server.put("/-/user/org.couchdb.user:u", "auth")
- .reply(409, {"error": "user exists"})
- server.get("/-/user/org.couchdb.user:u?write=true")
- .reply(200, {_rev : "3-deadcafebabebeef"})
- server.put("/-/user/org.couchdb.user:u/-rev/3-deadcafebabebeef", "auth", {"authorization" : "Basic dTpw"})
- .reply(201, {username : "u", password : "p", email : "u@p.me"})
+ server.put('/-/user/org.couchdb.user:u', 'auth')
+ .reply(409, { error: 'user exists' })
+ server.get('/-/user/org.couchdb.user:u?write=true')
+ .reply(200, { _rev: '3-deadcafebabebeef' })
+ server.put(
+ '/-/user/org.couchdb.user:u/-rev/3-deadcafebabebeef',
+ 'auth',
+ { authorization: 'Basic dTpw' }
+ ).reply(201, { username: 'u', password: 'p', email: 'u@p.me' })
}
-test("setup", function (t) {
+test('setup', function (t) {
mkdirp(pkg, function (er) {
- t.ifError(er, pkg + " made successfully")
+ t.ifError(er, pkg + ' made successfully')
fs.writeFile(outfile, contents, function (er) {
- t.ifError(er, "wrote legacy config")
+ t.ifError(er, 'wrote legacy config')
t.end()
})
})
})
-test("npm login", function (t) {
- mr({port : common.port, plugin : mocks}, function (er, s) {
+test('npm login', function (t) {
+ mr({ port: common.port, plugin: mocks }, function (er, s) {
var runner = common.npm(
[
- "login",
- "--registry", common.registry,
- "--loglevel", "silly",
- "--userconfig", outfile
+ 'login',
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ '--userconfig', outfile
],
opts,
- function (err, code) {
- t.notOk(code, "exited OK")
- t.notOk(err, "no error output")
- var config = fs.readFileSync(outfile, "utf8")
- t.like(config, /:always-auth=false/, "always-auth is scoped and false (by default)")
+ function (err, code, stdout, stderr) {
+ t.ifError(err, 'npm ran without issue')
+ t.notOk(code, 'exited OK')
+ t.notOk(stderr, 'no error output')
+ var config = fs.readFileSync(outfile, 'utf8')
+ t.like(config, /:always-auth=false/, 'always-auth is scoped and false (by default)')
s.close()
rimraf(outfile, function (err) {
- t.ifError(err, "removed config file OK")
+ t.ifError(err, 'removed config file OK')
t.end()
})
})
- var o = "", e = "", remaining = Object.keys(responses).length
- runner.stdout.on("data", function (chunk) {
+ var o = '', e = '', remaining = Object.keys(responses).length
+ runner.stdout.on('data', function (chunk) {
remaining--
o += chunk
- var label = chunk.toString("utf8").split(":")[0]
+ var label = chunk.toString('utf8').split(':')[0]
runner.stdin.write(responses[label])
if (remaining === 0) runner.stdin.end()
})
- runner.stderr.on("data", function (chunk) { e += chunk })
+ runner.stderr.on('data', function (chunk) { e += chunk })
})
})
-test("cleanup", function (t) {
- rimraf.sync(outfile)
- t.pass("cleaned up")
+test('cleanup', function (t) {
+ rimraf.sync(pkg)
+ t.pass('cleaned up')
t.end()
})
diff --git a/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js b/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js
new file mode 100644
index 0000000000..e5a4142ef3
--- /dev/null
+++ b/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js
@@ -0,0 +1,83 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds-package')
+
+var json = {
+ name: 'bitbucket-https-url-with-creds-package',
+ version: '0.0.0',
+ dependencies: {
+ 'private': 'git+https://user:pass@bitbucket.org/foo/private.git'
+ }
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('bitbucket-https-url-with-creds-package', function (t) {
+ var cloneUrls = [
+ ['https://user:pass@bitbucket.org/foo/private.git', 'Bitbucket URLs with passwords try only that.']
+ ]
+
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install([], function (er) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/bitbucket-https-url-with-creds.js b/deps/npm/test/tap/bitbucket-https-url-with-creds.js
new file mode 100644
index 0000000000..3f39e3be45
--- /dev/null
+++ b/deps/npm/test/tap/bitbucket-https-url-with-creds.js
@@ -0,0 +1,80 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds')
+
+var json = {
+ name: 'bitbucket-https-url-with-creds',
+ version: '0.0.0'
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('bitbucket-https-url-with-creds', function (t) {
+ var cloneUrls = [
+ ['https://user:pass@bitbucket.org/foo/private.git', 'Bitbucket URLs with passwords try only that.']
+ ]
+
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install(['git+https://user:pass@bitbucket.org/foo/private.git'], function (er) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/bitbucket-shortcut-package.js b/deps/npm/test/tap/bitbucket-shortcut-package.js
new file mode 100644
index 0000000000..bc38bd02fe
--- /dev/null
+++ b/deps/npm/test/tap/bitbucket-shortcut-package.js
@@ -0,0 +1,84 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'bitbucket-shortcut-package')
+
+var json = {
+ name: 'bitbucket-shortcut-package',
+ version: '0.0.0',
+ dependencies: {
+ 'private': 'bitbucket:foo/private'
+ }
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('bitbucket-shortcut', function (t) {
+ var cloneUrls = [
+ ['git@bitbucket.org:foo/private.git', 'Bitbucket shortcuts try SSH first'],
+ ['https://bitbucket.org/foo/private.git', 'Bitbucket shortcuts try HTTPS URLs second']
+ ]
+
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install([], function (er) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/bitbucket-shortcut.js b/deps/npm/test/tap/bitbucket-shortcut.js
new file mode 100644
index 0000000000..51afe19926
--- /dev/null
+++ b/deps/npm/test/tap/bitbucket-shortcut.js
@@ -0,0 +1,81 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'bitbucket-shortcut')
+
+var json = {
+ name: 'bitbucket-shortcut',
+ version: '0.0.0'
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('bitbucket-shortcut', function (t) {
+ var cloneUrls = [
+ ['git@bitbucket.org:foo/private.git', 'Bitbucket shortcuts try SSH first'],
+ ['https://bitbucket.org/foo/private.git', 'Bitbucket shortcuts try HTTPS URLs second']
+ ]
+
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install(['bitbucket:foo/private'], function (er) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/cache-shasum-fork.js b/deps/npm/test/tap/cache-shasum-fork.js
index 77d7938078..f16404cb21 100644
--- a/deps/npm/test/tap/cache-shasum-fork.js
+++ b/deps/npm/test/tap/cache-shasum-fork.js
@@ -1,83 +1,101 @@
-var test = require("tap").test
-var path = require("path")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var mkdirp = require("mkdirp")
-var mr = require("npm-registry-mock")
-var common = require("../common-tap.js")
-var cache = path.resolve(__dirname, "cache-shasum-fork", "CACHE")
-var cwd = path.resolve(__dirname, "cache-shasum-fork", "CWD")
-var server
+var fs = require('graceful-fs')
+var path = require('path')
-// Test for https://github.com/npm/npm/issues/3265
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
-test("mock reg", function (t) {
- rimraf.sync(cache)
- mkdirp.sync(cache)
- rimraf.sync(cwd)
- mkdirp.sync(path.join(cwd, "node_modules"))
- mr({port : common.port}, function (er, s) {
+var common = require('../common-tap.js')
+
+// Install from a tarball that thinks it is underscore@1.5.1
+// (but is actually a fork)
+var forkPath = path.resolve(
+ __dirname, '..', 'fixtures', 'forked-underscore-1.5.1.tgz'
+)
+var pkg = path.resolve(__dirname, 'cache-shasum-fork')
+var cache = path.join(pkg, 'cache')
+var server
+
+test('setup', function (t) {
+ setup()
+ t.comment('test for https://github.com/npm/npm/issues/3265')
+ mr({ port: common.port }, function (er, s) {
server = s
- t.pass("ok")
t.end()
})
})
-test("npm cache - install from fork", function (t) {
- // Install from a tarball that thinks it is underscore@1.5.1
- // (but is actually a fork)
- var forkPath = path.resolve(
- __dirname, "cache-shasum-fork", "underscore-1.5.1.tgz")
- common.npm(["install", forkPath], {
- cwd: cwd,
- env: {
- "npm_config_cache" : cache,
- "npm_config_registry" : common.registry,
- "npm_config_loglevel" : "silent"
- }
- }, function (err, code, stdout, stderr) {
- t.ifErr(err, "install finished without error")
- t.notOk(stderr, "Should not get data on stderr: " + stderr)
- t.equal(code, 0, "install finished successfully")
+test('npm cache - install from fork', function (t) {
+ setup()
+ common.npm(
+ [
+ '--loglevel', 'silent',
+ '--registry', common.registry,
+ 'install', forkPath
+ ],
+ {
+ cwd: pkg,
+ env: { npm_config_cache: cache }
+ },
+ function (err, code, stdout, stderr) {
+ t.ifErr(err, 'install finished without error')
+ t.notOk(stderr, 'Should not get data on stderr: ' + stderr)
+ t.equal(code, 0, 'install finished successfully')
- t.equal(stdout, "underscore@1.5.1 node_modules/underscore\n")
- var index = fs.readFileSync(
- path.join(cwd, "node_modules", "underscore", "index.js"),
- "utf8"
- )
- t.equal(index, 'console.log("This is the fork");\n\n')
- t.end()
- })
+ t.equal(stdout, 'underscore@1.5.1 node_modules/underscore\n')
+ var index = fs.readFileSync(
+ path.join(pkg, 'node_modules', 'underscore', 'index.js'),
+ 'utf8'
+ )
+ t.equal(index, 'console.log("This is the fork");\n\n')
+ t.end()
+ }
+ )
})
-test("npm cache - install from origin", function (t) {
- // Now install the real 1.5.1.
- rimraf.sync(path.join(cwd, "node_modules"))
- mkdirp.sync(path.join(cwd, "node_modules"))
- common.npm(["install", "underscore"], {
- cwd: cwd,
- env: {
- "npm_config_cache" : cache,
- "npm_config_registry" : common.registry,
- "npm_config_loglevel" : "silent"
- }
- }, function (err, code, stdout, stderr) {
- t.ifErr(err, "install finished without error")
- t.equal(code, 0, "install finished successfully")
- t.notOk(stderr, "Should not get data on stderr: " + stderr)
- t.equal(stdout, "underscore@1.5.1 node_modules/underscore\n")
- var index = fs.readFileSync(
- path.join(cwd, "node_modules", "underscore", "index.js"),
- "utf8"
- )
- t.equal(index, "module.exports = require('./underscore');\n")
- t.end()
- })
+// Now install the real 1.5.1.
+test('npm cache - install from origin', function (t) {
+ setup()
+ common.npm(
+ [
+ '--loglevel', 'silent',
+ '--registry', common.registry,
+ 'install', 'underscore'
+ ],
+ {
+ cwd: pkg,
+ env: { npm_config_cache: cache }
+ },
+ function (err, code, stdout, stderr) {
+ t.ifErr(err, 'install finished without error')
+ t.equal(code, 0, 'install finished successfully')
+ t.notOk(stderr, 'Should not get data on stderr: ' + stderr)
+ t.equal(stdout, 'underscore@1.5.1 node_modules/underscore\n')
+ var index = fs.readFileSync(
+ path.join(pkg, 'node_modules', 'underscore', 'index.js'),
+ 'utf8'
+ )
+ t.equal(index, 'module.exports = require(\'./underscore\');\n')
+ t.end()
+ }
+ )
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
server.close()
- rimraf.sync(cache)
- rimraf.sync(cwd)
+ cleanup()
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
+
+function setup () {
+ mkdirp.sync(cache)
+ mkdirp.sync(path.join(pkg, 'node_modules'))
+ process.chdir(pkg)
+}
diff --git a/deps/npm/test/tap/circular-dep.js b/deps/npm/test/tap/circular-dep.js
index fd5817dbc0..002b30cd78 100644
--- a/deps/npm/test/tap/circular-dep.js
+++ b/deps/npm/test/tap/circular-dep.js
@@ -1,52 +1,99 @@
-var test = require("tap").test
- , fs = require("fs")
- , path = require("path")
- , existsSync = fs.existsSync || path.existsSync
- , npm = require("../../")
- , rimraf = require("rimraf")
- , osenv = require("osenv")
- , mr = require("npm-registry-mock")
- , common = require("../common-tap.js")
- , server
-
-var pkg = path.resolve(__dirname, "circular-dep")
-
-test("installing a package that depends on the current package", function (t) {
- t.plan(1)
+var fs = require('graceful-fs')
+var path = require('path')
+var existsSync = fs.existsSync || path.existsSync
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+var server
+
+var pkg = path.resolve(__dirname, 'circular-dep')
+var minimist = path.join(pkg, 'minimist')
+
+var EXEC_OPTS = {
+ cwd: path.join(pkg, 'minimist/node_modules'),
+ npm_config_cache: path.join(pkg, 'cache')
+}
+
+var json = {
+ name: 'minimist',
+ version: '0.0.5',
+ dependencies: {
+ optimist: '0.6.0'
+ }
+}
+
+test('setup', function (t) {
+ t.comment('test for https://github.com/npm/npm/issues/4312')
setup(function () {
- npm.install("optimist", function (err) {
- if (err) return t.fail(err)
- npm.dedupe(function (err) {
- if (err) return t.fail(err)
- t.ok(existsSync(path.resolve(pkg,
- "minimist", "node_modules", "optimist",
- "node_modules", "minimist"
- )), "circular dependency uncircled")
- cleanup()
- server.close()
- })
- })
+ t.end()
})
})
+test('installing a package that depends on the current package', function (t) {
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ 'install', 'optimist'
+ ],
+ EXEC_OPTS,
+ function (err, code, stdout, stderr) {
+ t.ifError(err, 'npm ran without issue')
+ t.notOk(code, 'npm ran without raising an error code')
+ t.notOk(stderr, 'no error output')
+
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ 'dedupe'
+ ],
+ EXEC_OPTS,
+ function (err, code, stdout, stderr) {
+ t.ifError(err, 'npm ran without issue')
+ t.notOk(code, 'npm ran without raising an error code')
+ t.notOk(stderr, 'no error output')
+
+ t.ok(existsSync(path.resolve(
+ minimist,
+ 'node_modules', 'optimist',
+ 'node_modules', 'minimist'
+ )), 'circular dependency uncircled')
+ t.end()
+ }
+ )
+ }
+ )
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ server.close()
+ t.end()
+})
+
function setup (cb) {
cleanup()
- process.chdir(path.resolve(pkg, "minimist"))
+ mkdirp.sync(minimist)
+ fs.writeFileSync(
+ path.join(minimist, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(path.resolve(pkg, 'minimist'))
- fs.mkdirSync(path.resolve(pkg, "minimist/node_modules"))
- mr({port : common.port}, function (er, s) {
+ fs.mkdirSync(path.resolve(pkg, 'minimist/node_modules'))
+ mr({ port: common.port }, function (er, s) {
server = s
- npm.load({
- loglevel: "silent",
- registry: common.registry,
- cache: path.resolve(pkg, "cache")
- }, cb)
+ cb()
})
}
-function cleanup() {
+function cleanup () {
process.chdir(osenv.tmpdir())
- rimraf.sync(path.resolve(pkg, "minimist/node_modules"))
- rimraf.sync(path.resolve(pkg, "cache"))
+ rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/circular-dep/minimist/package.json b/deps/npm/test/tap/circular-dep/minimist/package.json
deleted file mode 100644
index cdaa1913b3..0000000000
--- a/deps/npm/test/tap/circular-dep/minimist/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "name": "minimist",
- "version": "0.0.5",
- "dependencies": {
- "optimist": "0.6.0"
- }
-}
diff --git a/deps/npm/test/tap/config-new-cafile.js b/deps/npm/test/tap/config-new-cafile.js
new file mode 100644
index 0000000000..9cffb19008
--- /dev/null
+++ b/deps/npm/test/tap/config-new-cafile.js
@@ -0,0 +1,56 @@
+require('./00-config-setup.js')
+
+var path = require('path')
+var fs = require('graceful-fs')
+var test = require('tap').test
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var osenv = require('osenv')
+var npmconf = require('../../lib/config/core.js')
+
+var dir = path.resolve(__dirname, 'config-new-cafile')
+var beep = path.resolve(dir, 'beep.pem')
+
+test('setup', function (t) {
+ bootstrap()
+ t.end()
+})
+
+test('can set new cafile when old is gone', function (t) {
+ t.plan(5)
+ npmconf.load(function (error, conf) {
+ npmconf.loaded = false
+ t.ifError(error)
+ conf.set('cafile', beep, 'user')
+ conf.save('user', function (error) {
+ t.ifError(error)
+ t.equal(conf.get('cafile'), beep)
+ rimraf.sync(beep)
+ npmconf.load(function (error, conf) {
+ if (error) {
+ throw error
+ }
+ t.equal(conf.get('cafile'), beep)
+ conf.del('cafile')
+ conf.save('user', function (error) {
+ t.ifError(error)
+ })
+ })
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function bootstrap () {
+ mkdirp.sync(dir)
+ fs.writeFileSync(beep, '')
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(dir)
+}
diff --git a/deps/npm/test/tap/dedupe.js b/deps/npm/test/tap/dedupe.js
index b203e5e393..7b80102b33 100644
--- a/deps/npm/test/tap/dedupe.js
+++ b/deps/npm/test/tap/dedupe.js
@@ -1,41 +1,86 @@
-var test = require("tap").test
- , fs = require("fs")
- , path = require("path")
- , existsSync = fs.existsSync || path.existsSync
- , rimraf = require("rimraf")
- , mr = require("npm-registry-mock")
- , common = require("../common-tap.js")
-
-var EXEC_OPTS = {}
-
-test("dedupe finds the common module and moves it up one level", function (t) {
- setup(function (s) {
+var fs = require('graceful-fs')
+var path = require('path')
+var existsSync = fs.existsSync || path.existsSync
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+var server
+
+var pkg = path.join(__dirname, 'dedupe')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ author: 'Dedupe tester',
+ name: 'dedupe',
+ version: '0.0.0',
+ dependencies: {
+ optimist: '0.6.0',
+ clean: '2.1.6'
+ }
+}
+
+test('setup', function (t) {
+ t.comment('test for https://github.com/npm/npm/issues/4675')
+ setup(function () {
+ t.end()
+ })
+})
+
+test('dedupe finds the common module and moves it up one level', function (t) {
+ common.npm(
+ [
+ '--registry', common.registry,
+ 'install', '.'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'successfully installed directory')
+ t.equal(code, 0, 'npm install exited with code')
common.npm(
- [
- "install", ".",
- "--registry", common.registry
- ],
- EXEC_OPTS,
- function (err, code) {
- t.ifError(err, "successfully installed directory")
- t.equal(code, 0, "npm install exited with code")
- common.npm(["dedupe"], {}, function (err, code) {
- t.ifError(err, "successfully deduped against previous install")
- t.notOk(code, "npm dedupe exited with code")
- t.ok(existsSync(path.join(__dirname, "dedupe", "node_modules", "minimist")))
- t.ok(!existsSync(path.join(__dirname, "dedupe", "node_modules", "checker")))
- s.close() // shutdown mock registry.
+ [
+ 'dedupe'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'successfully deduped against previous install')
+ t.notOk(code, 'npm dedupe exited with code')
+
+ t.ok(existsSync(path.join(pkg, 'node_modules', 'minimist')))
+ t.notOk(existsSync(path.join(pkg, 'node_modules', 'checker')))
+
t.end()
- })
- })
+ }
+ )
})
})
+test('cleanup', function (t) {
+ server.close()
+ cleanup()
+
+ t.end()
+})
+
+function cleanup () {
+ rimraf.sync(pkg)
+}
+
function setup (cb) {
- process.chdir(path.join(__dirname, "dedupe"))
- mr({port : common.port}, function (er, s) { // create mock registry.
- rimraf.sync(path.join(__dirname, "dedupe", "node_modules"))
- fs.mkdirSync(path.join(__dirname, "dedupe", "node_modules"))
- cb(s)
+ cleanup()
+ mkdirp.sync(path.join(pkg, 'node_modules'))
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+
+ mr({ port: common.port }, function (er, s) {
+ server = s
+ cb()
})
}
diff --git a/deps/npm/test/tap/dedupe/package.json b/deps/npm/test/tap/dedupe/package.json
deleted file mode 100644
index 842d4b2b2d..0000000000
--- a/deps/npm/test/tap/dedupe/package.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "author": "Dedupe tester",
- "name": "dedupe",
- "version": "0.0.0",
- "dependencies": {
- "optimist": "0.6.0",
- "clean": "2.1.6"
- }
-}
diff --git a/deps/npm/test/tap/dev-dep-duplicate/desired-ls-results.json b/deps/npm/test/tap/dev-dep-duplicate/desired-ls-results.json
deleted file mode 100644
index 355039a092..0000000000
--- a/deps/npm/test/tap/dev-dep-duplicate/desired-ls-results.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "name": "dev-dep-duplicate",
- "version": "0.0.0",
- "dependencies": {
- "underscore": {
- "version": "1.5.1"
- }
- }
-}
diff --git a/deps/npm/test/tap/dev-dep-duplicate/package.json b/deps/npm/test/tap/dev-dep-duplicate/package.json
deleted file mode 100644
index 87061b9d54..0000000000
--- a/deps/npm/test/tap/dev-dep-duplicate/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "author": "Anders Janmyr",
- "name": "dev-dep-duplicate",
- "version": "0.0.0",
- "dependencies": {
- "underscore": "1.5.1"
- },
- "devDependencies": {
- "underscore": "1.3.1"
- }
-}
diff --git a/deps/npm/test/tap/false-name.js b/deps/npm/test/tap/false-name.js
new file mode 100644
index 0000000000..c98a5103b2
--- /dev/null
+++ b/deps/npm/test/tap/false-name.js
@@ -0,0 +1,85 @@
+// this is a test for fix #2538
+
+// the false_name-test-package has the name property 'test-package' set
+// in the package.json and a dependency named 'test-package' is also a
+// defined dependency of 'test-package-with-one-dep'.
+//
+// this leads to a conflict during installation and the fix is covered
+// by this test
+
+var fs = require('graceful-fs')
+var path = require('path')
+var existsSync = fs.existsSync || path.existsSync
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.join(__dirname, 'false-name')
+var cache = path.join(pkg, 'cache')
+var server
+
+var EXEC_OPTS = { cwd: pkg }
+
+var indexContent = 'module.exports = true\n'
+var json = {
+ name: 'test-package',
+ version: '0.0.0',
+ main: 'index.js',
+ dependencies: {
+ 'test-package-with-one-dep': '0.0.0'
+ }
+}
+
+test('setup', function (t) {
+ t.comment('test for https://github.com/npm/npm/issues/2538')
+ setup()
+ mr({ port: common.port }, function (er, s) {
+ server = s
+ t.end()
+ })
+})
+
+test('not every pkg.name can be required', function (t) {
+ common.npm(
+ [
+ 'install', '.',
+ '--cache', cache,
+ '--registry', common.registry
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifErr(err, 'install finished without error')
+ t.equal(code, 0, 'install exited ok')
+ t.ok(existsSync(path.join(
+ pkg,
+ 'node_modules/test-package-with-one-dep',
+ 'node_modules/test-package'
+ )), 'package installed OK')
+ t.end()
+ }
+ )
+})
+
+test('cleanup', function (t) {
+ server.close()
+ cleanup()
+ t.end()
+})
+
+function cleanup () {
+ rimraf.sync(pkg)
+}
+
+function setup () {
+ cleanup()
+ mkdirp.sync(cache)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ fs.writeFileSync(path.join(pkg, 'index.js'), indexContent)
+}
diff --git a/deps/npm/test/tap/false_name.js b/deps/npm/test/tap/false_name.js
deleted file mode 100644
index 26ecb5b84b..0000000000
--- a/deps/npm/test/tap/false_name.js
+++ /dev/null
@@ -1,55 +0,0 @@
-// this is a test for fix #2538
-
-// the false_name-test-package has the name property "test-package" set
-// in the package.json and a dependency named "test-package" is also a
-// defined dependency of "test-package-with-one-dep".
-//
-// this leads to a conflict during installation and the fix is covered
-// by this test
-
-var test = require("tap").test
- , fs = require("fs")
- , path = require("path")
- , existsSync = fs.existsSync || path.existsSync
- , rimraf = require("rimraf")
- , common = require("../common-tap.js")
- , mr = require("npm-registry-mock")
- , pkg = path.resolve(__dirname, "false_name")
- , cache = path.resolve(pkg, "cache")
- , nodeModules = path.resolve(pkg, "node_modules")
-
-var EXEC_OPTS = { cwd: pkg }
-
-test("setup", function(t) {
- cleanup()
- fs.mkdirSync(nodeModules)
- t.end()
-})
-
-test("not every pkg.name can be required", function (t) {
- t.plan(3)
- mr({port : common.port}, function (er, s) {
- common.npm([
- "install", ".",
- "--cache", cache,
- "--registry", common.registry
- ], EXEC_OPTS, function (err, code) {
- s.close()
- t.ifErr(err, "install finished without error")
- t.equal(code, 0, "install exited ok")
- t.ok(existsSync(path.resolve(pkg,
- "node_modules/test-package-with-one-dep",
- "node_modules/test-package")))
- })
- })
-})
-
-function cleanup() {
- rimraf.sync(cache)
- rimraf.sync(nodeModules)
-}
-
-test("cleanup", function (t) {
- cleanup()
- t.end()
-})
diff --git a/deps/npm/test/tap/false_name/index.js b/deps/npm/test/tap/false_name/index.js
deleted file mode 100644
index 33c1891f81..0000000000
--- a/deps/npm/test/tap/false_name/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = true
diff --git a/deps/npm/test/tap/false_name/package.json b/deps/npm/test/tap/false_name/package.json
deleted file mode 100644
index 9c321e8532..0000000000
--- a/deps/npm/test/tap/false_name/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "name": "test-package",
- "version": "0.0.0",
- "main": "index.js",
- "dependencies": {
- "test-package-with-one-dep": "0.0.0"
- }
-}
diff --git a/deps/npm/test/tap/gist-short-shortcut-package.js b/deps/npm/test/tap/gist-short-shortcut-package.js
new file mode 100644
index 0000000000..02457b4dc9
--- /dev/null
+++ b/deps/npm/test/tap/gist-short-shortcut-package.js
@@ -0,0 +1,84 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'gist-short-shortcut-package')
+
+var json = {
+ name: 'gist-short-shortcut-package',
+ version: '0.0.0',
+ dependencies: {
+ 'private-gist': 'gist:deadbeef'
+ }
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('gist-short-shortcut-package', function (t) {
+ var cloneUrls = [
+ ['git://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try git URLs first'],
+ ['https://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try HTTPS URLs second'],
+ ['git@gist.github.com:/deadbeef.git', 'GitHub gist shortcuts try SSH third']
+ ]
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install([], function (er, result) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/gist-short-shortcut.js b/deps/npm/test/tap/gist-short-shortcut.js
new file mode 100644
index 0000000000..57f2006b7a
--- /dev/null
+++ b/deps/npm/test/tap/gist-short-shortcut.js
@@ -0,0 +1,81 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'gist-short-shortcut')
+
+var json = {
+ name: 'gist-short-shortcut',
+ version: '0.0.0'
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('gist-shortcut', function (t) {
+ var cloneUrls = [
+ ['git://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try git URLs first'],
+ ['https://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try HTTPS URLs second'],
+ ['git@gist.github.com:/deadbeef.git', 'GitHub gist shortcuts try SSH third']
+ ]
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install(['gist:deadbeef'], function (er, result) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/gist-shortcut-package.js b/deps/npm/test/tap/gist-shortcut-package.js
new file mode 100644
index 0000000000..370476ac80
--- /dev/null
+++ b/deps/npm/test/tap/gist-shortcut-package.js
@@ -0,0 +1,84 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'gist-shortcut-package')
+
+var json = {
+ name: 'gist-shortcut-package',
+ version: '0.0.0',
+ dependencies: {
+ 'private-gist': 'gist:foo/deadbeef'
+ }
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('gist-shortcut-package', function (t) {
+ var cloneUrls = [
+ ['git://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try git URLs first'],
+ ['https://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try HTTPS URLs second'],
+ ['git@gist.github.com:/deadbeef.git', 'GitHub gist shortcuts try SSH third']
+ ]
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install([], function (er, result) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/gist-shortcut.js b/deps/npm/test/tap/gist-shortcut.js
new file mode 100644
index 0000000000..e975a09b3e
--- /dev/null
+++ b/deps/npm/test/tap/gist-shortcut.js
@@ -0,0 +1,81 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'gist-shortcut')
+
+var json = {
+ name: 'gist-shortcut',
+ version: '0.0.0'
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('gist-shortcut', function (t) {
+ var cloneUrls = [
+ ['git://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try git URLs first'],
+ ['https://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try HTTPS URLs second'],
+ ['git@gist.github.com:/deadbeef.git', 'GitHub gist shortcuts try SSH third']
+ ]
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install(['gist:foo/deadbeef'], function (er, result) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/git-cache-locking.js b/deps/npm/test/tap/git-cache-locking.js
index 39f8b279c3..e08c96e1b7 100644
--- a/deps/npm/test/tap/git-cache-locking.js
+++ b/deps/npm/test/tap/git-cache-locking.js
@@ -1,48 +1,46 @@
-var test = require("tap").test
- , common = require("../common-tap")
- , path = require("path")
- , rimraf = require("rimraf")
- , mkdirp = require("mkdirp")
- , pkg = path.resolve(__dirname, "git-cache-locking")
- , tmp = path.join(pkg, "tmp")
- , cache = path.join(pkg, "cache")
+var test = require('tap').test
+var common = require('../common-tap')
+var path = require('path')
+var rimraf = require('rimraf')
+var mkdirp = require('mkdirp')
+var pkg = path.resolve(__dirname, 'git-cache-locking')
+var tmp = path.join(pkg, 'tmp')
+var cache = path.join(pkg, 'cache')
-
-test("setup", function (t) {
+test('setup', function (t) {
rimraf.sync(pkg)
- mkdirp.sync(path.resolve(pkg, "node_modules"))
+ mkdirp.sync(path.resolve(pkg, 'node_modules'))
t.end()
})
-test("git-cache-locking: install a git dependency", function (t) {
-
+test('git-cache-locking: install a git dependency', function (t) {
// disable git integration tests on Travis.
if (process.env.TRAVIS) return t.end()
// package c depends on a.git#master and b.git#master
// package b depends on a.git#master
common.npm([
- "install",
- "git://github.com/nigelzor/npm-4503-c.git"
+ 'install',
+ 'git://github.com/nigelzor/npm-4503-c.git'
], {
cwd: pkg,
env: {
- "npm_config_cache": cache,
- "npm_config_tmp": tmp,
- "npm_config_prefix": pkg,
- "npm_config_global": "false",
+ npm_config_cache: cache,
+ npm_config_tmp: tmp,
+ npm_config_prefix: pkg,
+ npm_config_global: 'false',
HOME: process.env.HOME,
Path: process.env.PATH,
PATH: process.env.PATH
}
- }, function (err, code) {
- t.ifErr(err, "npm install finished without error")
- t.equal(0, code, "npm install should succeed")
+ }, function (err, code, stdout, stderr) {
+ t.ifErr(err, 'npm install finished without error')
+ t.equal(0, code, 'npm install should succeed')
t.end()
})
})
-test("cleanup", function(t) {
+test('cleanup', function (t) {
rimraf.sync(pkg)
t.end()
})
diff --git a/deps/npm/test/tap/git-dependency-install-link.js b/deps/npm/test/tap/git-dependency-install-link.js
index 2d382dd560..92938b3426 100644
--- a/deps/npm/test/tap/git-dependency-install-link.js
+++ b/deps/npm/test/tap/git-dependency-install-link.js
@@ -1,7 +1,6 @@
var fs = require('fs')
var resolve = require('path').resolve
-var chain = require('slide').chain
var osenv = require('osenv')
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
@@ -154,26 +153,16 @@ function setup (cb) {
}
}
- var opts = {
- cwd: repo,
- env: process.env
- }
-
- chain(
- [
- git.chainableExec(['init'], opts),
- git.chainableExec(['config', 'user.name', 'PhantomFaker'], opts),
- git.chainableExec(['config', 'user.email', 'nope@not.real'], opts),
- git.chainableExec(['add', 'package.json'], opts),
- git.chainableExec(['commit', '-m', 'stub package'], opts),
+ common.makeGitRepo({
+ path: repo,
+ commands: [
git.chainableExec(
['clone', '--bare', repo, 'child.git'],
{ cwd: pkg, env: process.env }
),
startDaemon
- ],
- cb
- )
+ ]
+ }, cb)
})
}
diff --git a/deps/npm/test/tap/github-shortcut-package.js b/deps/npm/test/tap/github-shortcut-package.js
new file mode 100644
index 0000000000..13c6806b01
--- /dev/null
+++ b/deps/npm/test/tap/github-shortcut-package.js
@@ -0,0 +1,84 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'github-shortcut-package')
+
+var json = {
+ name: 'github-shortcut-package',
+ version: '0.0.0',
+ dependencies: {
+ 'private': 'foo/private'
+ }
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('github-shortcut-package', function (t) {
+ var cloneUrls = [
+ ['git://github.com/foo/private.git', 'GitHub shortcuts try git URLs first'],
+ ['https://github.com/foo/private.git', 'GitHub shortcuts try HTTPS URLs second'],
+ ['git@github.com:foo/private.git', 'GitHub shortcuts try SSH third']
+ ]
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install([], function (er, result) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/github-shortcut.js b/deps/npm/test/tap/github-shortcut.js
new file mode 100644
index 0000000000..598aa68644
--- /dev/null
+++ b/deps/npm/test/tap/github-shortcut.js
@@ -0,0 +1,81 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'github-shortcut')
+
+var json = {
+ name: 'github-shortcut',
+ version: '0.0.0'
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('github-shortcut', function (t) {
+ var cloneUrls = [
+ ['git://github.com/foo/private.git', 'GitHub shortcuts try git URLs first'],
+ ['https://github.com/foo/private.git', 'GitHub shortcuts try HTTPS URLs third'],
+ ['git@github.com:foo/private.git', 'GitHub shortcuts try SSH second']
+ ]
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install(['foo/private'], function (er, result) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/gitlab-shortcut-package.js b/deps/npm/test/tap/gitlab-shortcut-package.js
new file mode 100644
index 0000000000..6578084471
--- /dev/null
+++ b/deps/npm/test/tap/gitlab-shortcut-package.js
@@ -0,0 +1,83 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'gitlab-shortcut-package')
+
+var json = {
+ name: 'gitlab-shortcut-package',
+ version: '0.0.0',
+ dependencies: {
+ 'private': 'gitlab:foo/private'
+ }
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('gitlab-shortcut-package', function (t) {
+ var cloneUrls = [
+ ['git@gitlab.com:foo/private.git', 'GitLab shortcuts try SSH first'],
+ ['https://gitlab.com/foo/private.git', 'GitLab shortcuts try HTTPS URLs second']
+ ]
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install([], function (er, result) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/gitlab-shortcut.js b/deps/npm/test/tap/gitlab-shortcut.js
new file mode 100644
index 0000000000..4a1e2b0bb1
--- /dev/null
+++ b/deps/npm/test/tap/gitlab-shortcut.js
@@ -0,0 +1,80 @@
+'use strict'
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'gitlab-shortcut')
+
+var json = {
+ name: 'gitlab-shortcut',
+ version: '0.0.0'
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('gitlab-shortcut', function (t) {
+ var cloneUrls = [
+ ['git@gitlab.com:foo/private.git', 'GitLab shortcuts try SSH first'],
+ ['https://gitlab.com/foo/private.git', 'GitLab shortcuts try HTTPS URLs second']
+ ]
+ var npm = requireInject.installGlobally('../../lib/npm.js', {
+ 'child_process': {
+ 'execFile': function (cmd, args, options, cb) {
+ process.nextTick(function () {
+ if (args[0] !== 'clone') return cb(null, '', '')
+ var cloneUrl = cloneUrls.shift()
+ if (cloneUrl) {
+ t.is(args[3], cloneUrl[0], cloneUrl[1])
+ } else {
+ t.fail('too many attempts to clone')
+ }
+ cb(new Error())
+ })
+ }
+ }
+ })
+
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ prefix: pkg,
+ registry: common.registry,
+ loglevel: 'silent'
+ }
+ npm.load(opts, function (er) {
+ t.ifError(er, 'npm loaded without error')
+ npm.commands.install(['gitlab:foo/private'], function (er, result) {
+ t.ok(er, 'mocked install failed as expected')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/ignore-scripts.js b/deps/npm/test/tap/ignore-scripts.js
index 8b5291f787..a446579cdf 100644
--- a/deps/npm/test/tap/ignore-scripts.js
+++ b/deps/npm/test/tap/ignore-scripts.js
@@ -1,72 +1,120 @@
-var common = require("../common-tap")
-var test = require("tap").test
-var path = require("path")
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap')
// ignore-scripts/package.json has scripts that always exit with non-zero error
-// codes. The "install" script is omitted so that npm tries to run node-gyp,
-// which should also fail.
-var pkg = path.resolve(__dirname, "ignore-scripts")
+// codes.
+var pkg = path.resolve(__dirname, 'ignore-scripts')
+
+var gypfile = 'bad_binding_file\n'
+var json = {
+ author: 'Milton the Aussie',
+ name: 'ignore-scripts',
+ version: '0.0.0',
+ scripts: {
+ prepublish: 'exit 123',
+ publish: 'exit 123',
+ postpublish: 'exit 123',
+ preinstall: 'exit 123',
+ install: 'exit 123',
+ postinstall: 'exit 123',
+ preuninstall: 'exit 123',
+ uninstall: 'exit 123',
+ postuninstall: 'exit 123',
+ pretest: 'exit 123',
+ test: 'exit 123',
+ posttest: 'exit 123',
+ prestop: 'exit 123',
+ stop: 'exit 123',
+ poststop: 'exit 123',
+ prestart: 'exit 123',
+ start: 'exit 123',
+ poststart: 'exit 123',
+ prerestart: 'exit 123',
+ restart: 'exit 123',
+ postrestart: 'exit 123'
+ }
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
-test("ignore-scripts: install using the option", function (t) {
- createChild(["install", "--ignore-scripts"], function (err, code) {
- t.ifError(err, "install with scripts ignored finished successfully")
- t.equal(code, 0, "npm install exited with code")
+test('ignore-scripts: install using the option', function (t) {
+ createChild(['install', '--ignore-scripts'], function (err, code) {
+ t.ifError(err, 'install with scripts ignored finished successfully')
+ t.equal(code, 0, 'npm install exited with code')
t.end()
})
})
-test("ignore-scripts: install NOT using the option", function (t) {
- createChild(["install"], function (err, code) {
- t.ifError(err, "install with scripts successful")
- t.notEqual(code, 0, "npm install exited with code")
+test('ignore-scripts: install NOT using the option', function (t) {
+ createChild(['install'], function (err, code) {
+ t.ifError(err, 'install with scripts successful')
+ t.notEqual(code, 0, 'npm install exited with code')
t.end()
})
})
var scripts = [
- "prepublish", "publish", "postpublish",
- "preinstall", "install", "postinstall",
- "preuninstall", "uninstall", "postuninstall",
- "pretest", "test", "posttest",
- "prestop", "stop", "poststop",
- "prestart", "start", "poststart",
- "prerestart", "restart", "postrestart"
+ 'prepublish', 'publish', 'postpublish',
+ 'preinstall', 'install', 'postinstall',
+ 'preuninstall', 'uninstall', 'postuninstall',
+ 'pretest', 'test', 'posttest',
+ 'prestop', 'stop', 'poststop',
+ 'prestart', 'start', 'poststart',
+ 'prerestart', 'restart', 'postrestart'
]
scripts.forEach(function (script) {
- test("ignore-scripts: run-script "+script+" using the option", function (t) {
- createChild(["--ignore-scripts", "run-script", script], function (err, code) {
- t.ifError(err, "run-script " + script + " with ignore-scripts successful")
- t.equal(code, 0, "npm run-script exited with code")
+ test('ignore-scripts: run-script ' + script + ' using the option', function (t) {
+ createChild(['--ignore-scripts', 'run-script', script], function (err, code, stdout, stderr) {
+ t.ifError(err, 'run-script ' + script + ' with ignore-scripts successful')
+ t.equal(code, 0, 'npm run-script exited with code')
t.end()
})
})
})
scripts.forEach(function (script) {
- test("ignore-scripts: run-script "+script+" NOT using the option", function (t) {
- createChild(["run-script", script], function (err, code) {
- t.ifError(err, "run-script " + script + " finished successfully")
- t.notEqual(code, 0, "npm run-script exited with code")
+ test('ignore-scripts: run-script ' + script + ' NOT using the option', function (t) {
+ createChild(['run-script', script], function (err, code) {
+ t.ifError(err, 'run-script ' + script + ' finished successfully')
+ t.notEqual(code, 0, 'npm run-script exited with code')
t.end()
})
})
})
-function createChild (args, cb) {
- var env = {
- HOME: process.env.HOME,
- Path: process.env.PATH,
- PATH: process.env.PATH,
- "npm_config_loglevel": "silent"
- }
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
- if (process.platform === "win32")
- env.npm_config_cache = "%APPDATA%\\npm-cache"
+function cleanup () {
+ rimraf.sync(pkg)
+}
- return common.npm(args, {
- cwd: pkg,
- stdio: "inherit",
- env: env
- }, cb)
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(path.join(pkg, 'binding.gyp'), gypfile)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+}
+
+function createChild (args, cb) {
+ return common.npm(
+ args.concat(['--loglevel', 'silent']),
+ { cwd: pkg },
+ cb
+ )
}
diff --git a/deps/npm/test/tap/ignore-scripts/binding.gyp b/deps/npm/test/tap/ignore-scripts/binding.gyp
deleted file mode 100644
index 9348f0f94b..0000000000
--- a/deps/npm/test/tap/ignore-scripts/binding.gyp
+++ /dev/null
@@ -1 +0,0 @@
-bad_binding_file
diff --git a/deps/npm/test/tap/ignore-scripts/package.json b/deps/npm/test/tap/ignore-scripts/package.json
deleted file mode 100644
index 261aa902d7..0000000000
--- a/deps/npm/test/tap/ignore-scripts/package.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "author": "Milton the Aussie",
- "name": "ignore-scripts",
- "version": "0.0.0",
- "scripts": {
- "prepublish": "exit 123",
- "publish": "exit 123",
- "postpublish": "exit 123",
- "preinstall": "exit 123",
- "postinstall": "exit 123",
- "preuninstall": "exit 123",
- "install": "exit 123",
- "uninstall": "exit 123",
- "postuninstall": "exit 123",
- "pretest": "exit 123",
- "test": "exit 123",
- "posttest": "exit 123",
- "prestop": "exit 123",
- "stop": "exit 123",
- "poststop": "exit 123",
- "prestart": "exit 123",
- "start": "exit 123",
- "poststart": "exit 123",
- "prerestart": "exit 123",
- "restart": "exit 123",
- "postrestart": "exit 123"
- }
-}
diff --git a/deps/npm/test/tap/ignore-shrinkwrap.js b/deps/npm/test/tap/ignore-shrinkwrap.js
index a8efa81917..9468162eee 100644
--- a/deps/npm/test/tap/ignore-shrinkwrap.js
+++ b/deps/npm/test/tap/ignore-shrinkwrap.js
@@ -1,75 +1,135 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var pkg = require("path").join(__dirname,"ignore-shrinkwrap")
+var fs = require('graceful-fs')
+var path = require('path')
-var mr = require("npm-registry-mock")
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var rimraf = require('rimraf')
+var test = require('tap').test
-var spawn = require("child_process").spawn
-var npm = require.resolve("../../bin/npm-cli.js")
-var node = process.execPath
+var common = require('../common-tap.js')
+
+var pkg = require('path').join(__dirname, 'ignore-shrinkwrap')
+
+var EXEC_OPTS = { cwd: pkg }
var customMocks = {
- "get": {
- "/package.js": [200, {"ente" : true}],
- "/shrinkwrap.js": [200, {"ente" : true}]
+ 'get': {
+ '/package.js': [200, { ente: true }],
+ '/shrinkwrap.js': [200, { ente: true }]
+ }
+}
+
+var json = {
+ author: 'Rocko Artischocko',
+ name: 'ignore-shrinkwrap',
+ version: '0.0.0',
+ dependencies: {
+ 'npm-test-ignore-shrinkwrap-file': 'http://localhost:1337/package.js'
+ }
+}
+
+var shrinkwrap = {
+ name: 'ignore-shrinkwrap',
+ version: '0.0.0',
+ dependencies: {
+ 'npm-test-ignore-shrinkwrap-file': {
+ version: '1.2.3',
+ from: 'http://localhost:1337/shrinkwrap.js',
+ resolved: 'http://localhost:1337/shrinkwrap.js',
+ dependencies: {
+ opener: {
+ version: '1.3.0',
+ from: 'opener@1.3.0'
+ }
+ }
+ }
}
}
-test("ignore-shrinkwrap: using the option", function (t) {
- mr({port: common.port, mocks: customMocks}, function (err, s) {
- s._server.on("request", function (req) {
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('npm install --no-shrinkwrap', function (t) {
+ mr({ port: common.port, mocks: customMocks }, function (err, s) {
+ t.ifError(err, 'mock registry bootstrapped without issue')
+ s._server.on('request', function (req) {
switch (req.url) {
- case "/shrinkwrap.js":
- t.fail()
+ case '/shrinkwrap.js':
+ t.fail('npm-shrinkwrap.json used instead of package.json')
break
- case "/package.js":
- t.pass("package.json used")
+ case '/package.js':
+ t.pass('package.json used')
}
})
- var child = createChild(true)
- child.on("close", function () {
- s.close()
- t.end()
- })
+
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ 'install', '--no-shrinkwrap'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm ran without issue')
+ t.ok(code, "install isn't going to succeed")
+ s.close()
+ t.end()
+ }
+ )
})
})
-test("ignore-shrinkwrap: NOT using the option", function (t) {
- mr({port: common.port, mocks: customMocks}, function (err, s) {
- s._server.on("request", function (req) {
+test('npm install (with shrinkwrap)', function (t) {
+ mr({ port: common.port, mocks: customMocks }, function (err, s) {
+ t.ifError(err, 'mock registry bootstrapped without issue')
+ s._server.on('request', function (req) {
switch (req.url) {
- case "/shrinkwrap.js":
- t.pass("shrinkwrap used")
+ case '/shrinkwrap.js':
+ t.pass('shrinkwrap used')
break
- case "/package.js":
- t.fail()
+ case '/package.js':
+ t.fail('shrinkwrap ignored')
}
})
- var child = createChild(false)
- child.on("close", function () {
- s.close()
- t.end()
- })
+
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ 'install'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm ran without issue')
+ t.ok(code, "install isn't going to succeed")
+ s.close()
+ t.end()
+ }
+ )
})
})
-function createChild (ignoreShrinkwrap) {
- var args
- if (ignoreShrinkwrap) {
- args = [npm, "install", "--no-shrinkwrap"]
- } else {
- args = [npm, "install"]
- }
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
- return spawn(node, args, {
- cwd: pkg,
- env: {
- "npm_config_registry": common.registry,
- "npm_config_cache_lock_stale": 1000,
- "npm_config_cache_lock_wait": 1000,
- HOME: process.env.HOME,
- Path: process.env.PATH,
- PATH: process.env.PATH
- }
- })
+function cleanup () {
+ rimraf.sync(pkg)
+}
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ fs.writeFileSync(
+ path.join(pkg, 'npm-shrinkwrap.json'),
+ JSON.stringify(shrinkwrap, null, 2)
+ )
+ process.chdir(pkg)
}
diff --git a/deps/npm/test/tap/ignore-shrinkwrap/npm-shrinkwrap.json b/deps/npm/test/tap/ignore-shrinkwrap/npm-shrinkwrap.json
deleted file mode 100644
index b155380184..0000000000
--- a/deps/npm/test/tap/ignore-shrinkwrap/npm-shrinkwrap.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "ignore-shrinkwrap",
- "version": "0.0.0",
- "dependencies": {
- "npm-test-ignore-shrinkwrap-file": {
- "version": "1.2.3",
- "from": "http://localhost:1337/shrinkwrap.js",
- "resolved": "http://localhost:1337/shrinkwrap.js",
- "dependencies": {
- "opener": {
- "version": "1.3.0",
- "from": "opener@1.3.0"
- }
- }
- }
- }
-}
diff --git a/deps/npm/test/tap/ignore-shrinkwrap/package.json b/deps/npm/test/tap/ignore-shrinkwrap/package.json
deleted file mode 100644
index 5b95006640..0000000000
--- a/deps/npm/test/tap/ignore-shrinkwrap/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "author": "Rocko Artischocko",
- "name": "ignore-shrinkwrap",
- "version": "0.0.0",
- "dependencies": {
- "npm-test-ignore-shrinkwrap-file": "http://localhost:1337/package.js"
- }
-}
diff --git a/deps/npm/test/tap/install-at-locally.js b/deps/npm/test/tap/install-at-locally.js
index 02874d0cd8..9c5d85980c 100644
--- a/deps/npm/test/tap/install-at-locally.js
+++ b/deps/npm/test/tap/install-at-locally.js
@@ -1,42 +1,69 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var path = require("path")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var mkdirp = require("mkdirp")
-var pkg = path.join(__dirname, "install-at-locally")
-
-var EXEC_OPTS = { }
-
-test("setup", function (t) {
- mkdirp.sync(pkg)
- mkdirp.sync(path.resolve(pkg, "node_modules"))
- process.chdir(pkg)
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.join(__dirname, 'install-at-locally')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'install-at-locally',
+ version: '0.0.0'
+}
+
+test('setup', function (t) {
+ cleanup()
t.end()
})
-test("\"npm install ./package@1.2.3\" should install local pkg", function(t) {
- common.npm(["install", "./package@1.2.3"], EXEC_OPTS, function(err, code) {
- var p = path.resolve(pkg, "node_modules/install-at-locally/package.json")
- t.ifError(err, "install local package successful")
- t.equal(code, 0, "npm install exited with code")
- t.ok(JSON.parse(fs.readFileSync(p, "utf8")))
+test('\'npm install ./package@1.2.3\' should install local pkg', function (t) {
+ var target = './package@1.2.3'
+ setup(target)
+ common.npm(['install', target], EXEC_OPTS, function (err, code) {
+ var p = path.resolve(pkg, 'node_modules/install-at-locally/package.json')
+ t.ifError(err, 'install local package successful')
+ t.equal(code, 0, 'npm install exited with code')
+ t.ok(JSON.parse(fs.readFileSync(p, 'utf8')))
t.end()
})
})
-test("\"npm install install/at/locally@./package@1.2.3\" should install local pkg", function(t) {
- common.npm(["install", "./package@1.2.3"], EXEC_OPTS, function(err, code) {
- var p = path.resolve(pkg, "node_modules/install-at-locally/package.json")
- t.ifError(err, "install local package in explicit directory successful")
- t.equal(code, 0, "npm install exited with code")
- t.ok(JSON.parse(fs.readFileSync(p, "utf8")))
+test('\'npm install install/at/locally@./package@1.2.3\' should install local pkg', function (t) {
+ var target = 'install/at/locally@./package@1.2.3'
+ setup(target)
+ common.npm(['install', target], EXEC_OPTS, function (err, code) {
+ var p = path.resolve(pkg, 'node_modules/install-at-locally/package.json')
+ t.ifError(err, 'install local package in explicit directory successful')
+ t.equal(code, 0, 'npm install exited with code')
+ t.ok(JSON.parse(fs.readFileSync(p, 'utf8')))
t.end()
})
})
-test("cleanup", function(t) {
- process.chdir(__dirname)
- rimraf.sync(path.resolve(pkg, "node_modules"))
+test('cleanup', function (t) {
+ cleanup()
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
+
+function setup (target) {
+ cleanup()
+ var root = path.resolve(pkg, target)
+ mkdirp.sync(root)
+ fs.writeFileSync(
+ path.join(root, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ mkdirp.sync(path.resolve(pkg, 'node_modules'))
+ process.chdir(pkg)
+}
diff --git a/deps/npm/test/tap/install-at-locally/package@1.2.3/package.json b/deps/npm/test/tap/install-at-locally/package@1.2.3/package.json
deleted file mode 100644
index b11d00c651..0000000000
--- a/deps/npm/test/tap/install-at-locally/package@1.2.3/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "install-at-locally",
- "version": "0.0.0",
- "description": "Test for 404-parent"
-}
diff --git a/deps/npm/test/tap/install-cli-production.js b/deps/npm/test/tap/install-cli-production.js
index 00c9355270..fbaf23afb4 100644
--- a/deps/npm/test/tap/install-cli-production.js
+++ b/deps/npm/test/tap/install-cli-production.js
@@ -1,44 +1,88 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var path = require("path")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var mkdirp = require("mkdirp")
-var pkg = path.join(__dirname, "install-cli-production")
-
-var EXEC_OPTS = {
- cwd: pkg
+var fs = require('graceful-fs')
+var path = require('path')
+var existsSync = fs.existsSync || path.existsSync
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.join(__dirname, 'install-cli-production')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'install-cli-production',
+ description: 'fixture',
+ version: '0.0.0',
+ scripts: {
+ prepublish: 'exit 123'
+ },
+ dependencies: {
+ dependency: 'file:./dependency'
+ },
+ devDependencies: {
+ 'dev-dependency': 'file:./dev-dependency'
+ }
+}
+
+var dependency = {
+ name: 'dependency',
+ description: 'fixture',
+ version: '0.0.0'
+}
+
+var devDependency = {
+ name: 'dev-dependency',
+ description: 'fixture',
+ version: '0.0.0'
}
-test("setup", function(t) {
- mkdirp.sync(pkg)
- mkdirp.sync(path.resolve(pkg, "node_modules"))
+test('setup', function (t) {
+ mkdirp.sync(path.join(pkg, 'dependency'))
+ fs.writeFileSync(
+ path.join(pkg, 'dependency', 'package.json'),
+ JSON.stringify(dependency, null, 2)
+ )
+
+ mkdirp.sync(path.join(pkg, 'devDependency'))
+ fs.writeFileSync(
+ path.join(pkg, 'devDependency', 'package.json'),
+ JSON.stringify(devDependency, null, 2)
+ )
+
+ mkdirp.sync(path.join(pkg, 'node_modules'))
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
process.chdir(pkg)
t.end()
})
-test("\"npm install --production\" should install dependencies", function(t) {
- common.npm(["install", "--production"], EXEC_OPTS, function(err, code) {
- t.ifError(err, "install production successful")
- t.equal(code, 0, "npm install exited with code")
- var p = path.resolve(pkg, "node_modules/dependency/package.json")
- t.ok(JSON.parse(fs.readFileSync(p, "utf8")))
- t.end()
- })
-})
-
-test("\"npm install --production\" should not install dev dependencies", function(t) {
- common.npm(["install", "--production"], EXEC_OPTS, function(err, code) {
- t.ifError(err, "install production successful")
- t.equal(code, 0, "npm install exited with code")
- var p = path.resolve(pkg, "node_modules/dev-dependency/package.json")
- t.ok(!fs.existsSync(p), "")
+test('\'npm install --production\' should only install dependencies', function (t) {
+ common.npm(['install', '--production'], EXEC_OPTS, function (err, code) {
+ t.ifError(err, 'install production successful')
+ t.equal(code, 0, 'npm install did not raise error code')
+ t.ok(
+ JSON.parse(fs.readFileSync(
+ path.resolve(pkg, 'node_modules/dependency/package.json'), 'utf8')
+ ),
+ 'dependency was installed'
+ )
+ t.notOk(
+ existsSync(path.resolve(pkg, 'node_modules/dev-dependency/package.json')),
+ 'devDependency was NOT installed'
+ )
t.end()
})
})
-test("cleanup", function(t) {
- process.chdir(__dirname)
- rimraf.sync(path.resolve(pkg, "node_modules"))
+test('cleanup', function (t) {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
t.end()
})
diff --git a/deps/npm/test/tap/install-cli-production/dependency/package.json b/deps/npm/test/tap/install-cli-production/dependency/package.json
deleted file mode 100644
index 6ee6be0c3b..0000000000
--- a/deps/npm/test/tap/install-cli-production/dependency/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "dependency",
- "description": "fixture",
- "version": "0.0.0"
-}
diff --git a/deps/npm/test/tap/install-cli-production/dev-dependency/package.json b/deps/npm/test/tap/install-cli-production/dev-dependency/package.json
deleted file mode 100644
index a6a8f69763..0000000000
--- a/deps/npm/test/tap/install-cli-production/dev-dependency/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "dev-dependency",
- "description": "fixture",
- "version": "0.0.0"
-}
diff --git a/deps/npm/test/tap/install-cli-production/package.json b/deps/npm/test/tap/install-cli-production/package.json
deleted file mode 100644
index 8f2f0e2ec2..0000000000
--- a/deps/npm/test/tap/install-cli-production/package.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "install-cli-production",
- "description": "fixture",
- "version": "0.0.0",
- "scripts": {
- "prepublish": "exit 123"
- },
- "dependencies": {
- "dependency": "file:./dependency"
- },
- "devDependencies": {
- "dev-dependency": "file:./dev-dependency"
- }
-}
diff --git a/deps/npm/test/tap/install-cli-unicode.js b/deps/npm/test/tap/install-cli-unicode.js
index 004229cf88..01a5f4a471 100644
--- a/deps/npm/test/tap/install-cli-unicode.js
+++ b/deps/npm/test/tap/install-cli-unicode.js
@@ -1,39 +1,71 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var mr = require("npm-registry-mock")
-var path = require("path")
+var fs = require('graceful-fs')
+var path = require('path')
-var pkg = path.resolve(__dirname, "install-cli")
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+var server
+
+var pkg = path.resolve(__dirname, 'install-cli-unicode')
function hasOnlyAscii (s) {
return /^[\000-\177]*$/.test(s)
}
-var EXEC_OPTS = {
- cwd : pkg
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'install-cli',
+ description: 'fixture',
+ version: '0.0.1',
+ dependencies: {
+ read: '1.0.5'
+ }
}
-test("does not use unicode with --unicode false", function (t) {
- t.plan(5)
- mr({port : common.port}, function (er, s) {
- common.npm(["install", "--unicode", "false", "read"], EXEC_OPTS, function (err, code, stdout) {
- t.ifError(err, "install package read without unicode success")
- t.notOk(code, "npm install exited with code 0")
- t.ifError(err)
- t.ok(stdout, stdout.length)
- t.ok(hasOnlyAscii(stdout))
- s.close()
- })
+test('setup', function (t) {
+ rimraf.sync(pkg)
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
+ mr({ port: common.port }, function (er, s) {
+ server = s
+ t.end()
})
})
-test("cleanup", function (t) {
- mr({port : common.port}, function (er, s) {
- common.npm(["uninstall", "read"], EXEC_OPTS, function (err, code) {
- t.ifError(err, "uninstall read package success")
- t.notOk(code, "npm uninstall exited with code 0")
- s.close()
- })
- })
+test('does not use unicode with --unicode false', function (t) {
+ common.npm(
+ [
+ '--unicode', 'false',
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ 'install', 'optimist'
+ ],
+ EXEC_OPTS,
+ function (err, code, stdout) {
+ t.ifError(err, 'install package read without unicode success')
+ t.notOk(code, 'npm install exited with code 0')
+ t.ifError(err, 'npm install ran without issue')
+ t.ok(stdout, 'got some output')
+ t.ok(hasOnlyAscii(stdout), 'only ASCII in install output')
+
+ t.end()
+ }
+ )
+})
+
+test('cleanup', function (t) {
+ server.close()
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+
t.end()
})
diff --git a/deps/npm/test/tap/install-cli/README.md b/deps/npm/test/tap/install-cli/README.md
deleted file mode 100644
index dbdfb5aa0c..0000000000
--- a/deps/npm/test/tap/install-cli/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# Tests for `npm install` CLI output.
diff --git a/deps/npm/test/tap/install-cli/index.js b/deps/npm/test/tap/install-cli/index.js
deleted file mode 100644
index 33c1891f81..0000000000
--- a/deps/npm/test/tap/install-cli/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = true
diff --git a/deps/npm/test/tap/install-cli/package.json b/deps/npm/test/tap/install-cli/package.json
deleted file mode 100644
index 3d7e41d46e..0000000000
--- a/deps/npm/test/tap/install-cli/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "install-cli",
- "description": "fixture",
- "version": "0.0.1",
- "main": "index.js",
- "dependencies": {
- "read": "1.0.5"
- },
- "repository": "git://github.com/robertkowalski/bogusfixture"
-}
diff --git a/deps/npm/test/tap/install-from-local.js b/deps/npm/test/tap/install-from-local.js
index d1fbb3b909..3cac382a70 100644
--- a/deps/npm/test/tap/install-from-local.js
+++ b/deps/npm/test/tap/install-from-local.js
@@ -1,39 +1,98 @@
-var common = require("../common-tap")
-var test = require("tap").test
-var path = require("path")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var pkg = path.join(__dirname, "install-from-local", "package-with-local-paths")
+var fs = require('graceful-fs')
+var path = require('path')
-var EXEC_OPTS = { }
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap')
+
+var root = path.join(__dirname, 'install-from-local')
+var pkg = path.join(root, 'package-with-local-paths')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var localPaths = {
+ name: 'package-with-local-paths',
+ version: '0.0.0',
+ dependencies: {
+ 'package-local-dependency': 'file:../package-local-dependency'
+ },
+ devDependencies: {
+ 'package-local-dev-dependency': 'file:../package-local-dev-dependency'
+ }
+}
+
+var localDependency = {
+ name: 'package-local-dependency',
+ version: '0.0.0',
+ description: 'Test for local installs'
+}
+
+var localDevDependency = {
+ name: 'package-local-dev-dependency',
+ version: '0.0.0',
+ description: 'Test for local installs'
+}
+
+test('setup', function (t) {
+ rimraf.sync(pkg)
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(localPaths, null, 2)
+ )
+
+ mkdirp.sync(path.join(root, 'package-local-dependency'))
+ fs.writeFileSync(
+ path.join(root, 'package-local-dependency', 'package.json'),
+ JSON.stringify(localDependency, null, 2)
+ )
+
+ mkdirp.sync(path.join(root, 'package-local-dev-dependency'))
+ fs.writeFileSync(
+ path.join(root, 'package-local-dev-dependency', 'package.json'),
+ JSON.stringify(localDevDependency, null, 2)
+ )
-test("setup", function (t) {
process.chdir(pkg)
t.end()
})
-test('"npm install" should install local packages', function (t) {
- common.npm(["install", "."], EXEC_OPTS, function (err, code) {
- t.ifError(err, "error should not exist")
- t.notOk(code, "npm install exited with code 0")
- var dependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dependency/package.json")
- t.ok(
- JSON.parse(fs.readFileSync(dependencyPackageJson, "utf8")),
- "package with local dependency installed"
- )
-
- var devDependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dev-dependency/package.json")
- t.ok(
- JSON.parse(fs.readFileSync(devDependencyPackageJson, "utf8")),
- "package with local dev dependency installed"
- )
-
- t.end()
- })
+test('\'npm install\' should install local packages', function (t) {
+ common.npm(
+ [
+ 'install', '.'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'error should not exist')
+ t.notOk(code, 'npm install exited with code 0')
+ var dependencyPackageJson = path.resolve(
+ pkg,
+ 'node_modules/package-local-dependency/package.json'
+ )
+ t.ok(
+ JSON.parse(fs.readFileSync(dependencyPackageJson, 'utf8')),
+ 'package with local dependency installed'
+ )
+
+ var devDependencyPackageJson = path.resolve(
+ pkg, 'node_modules/package-local-dev-dependency/package.json'
+ )
+ t.ok(
+ JSON.parse(fs.readFileSync(devDependencyPackageJson, 'utf8')),
+ 'package with local dev dependency installed'
+ )
+
+ t.end()
+ }
+ )
})
-test("cleanup", function (t) {
- process.chdir(__dirname)
- rimraf.sync(path.resolve(pkg, "node_modules"))
+test('cleanup', function (t) {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(root)
t.end()
})
diff --git a/deps/npm/test/tap/install-from-local/package-local-dependency/package.json b/deps/npm/test/tap/install-from-local/package-local-dependency/package.json
deleted file mode 100644
index a524d82624..0000000000
--- a/deps/npm/test/tap/install-from-local/package-local-dependency/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "package-local-dependency",
- "version": "0.0.0",
- "description": "Test for local installs"
-}
diff --git a/deps/npm/test/tap/install-from-local/package-local-dev-dependency/package.json b/deps/npm/test/tap/install-from-local/package-local-dev-dependency/package.json
deleted file mode 100644
index 23f3ad6824..0000000000
--- a/deps/npm/test/tap/install-from-local/package-local-dev-dependency/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "package-local-dev-dependency",
- "version": "0.0.0",
- "description": "Test for local installs"
-}
diff --git a/deps/npm/test/tap/install-from-local/package-scoped-dependency/package.json b/deps/npm/test/tap/install-from-local/package-scoped-dependency/package.json
deleted file mode 100644
index ec3e13214e..0000000000
--- a/deps/npm/test/tap/install-from-local/package-scoped-dependency/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "@scoped/package",
- "version": "0.0.0",
- "description": "Test for local installs"
-}
diff --git a/deps/npm/test/tap/install-from-local/package-with-local-paths/package.json b/deps/npm/test/tap/install-from-local/package-with-local-paths/package.json
deleted file mode 100644
index bf4a3e946c..0000000000
--- a/deps/npm/test/tap/install-from-local/package-with-local-paths/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "package-with-local-paths",
- "version": "0.0.0",
- "dependencies": {
- "package-local-dependency": "file:../package-local-dependency"
- },
- "devDependencies": {
- "package-local-dev-dependency": "file:../package-local-dev-dependency"
- }
-}
diff --git a/deps/npm/test/tap/install-from-local/package-with-scoped-paths/package.json b/deps/npm/test/tap/install-from-local/package-with-scoped-paths/package.json
deleted file mode 100644
index 262aa57e06..0000000000
--- a/deps/npm/test/tap/install-from-local/package-with-scoped-paths/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "name": "package-with-scoped-paths",
- "version": "0.0.0",
- "dependencies": {
- "package-local-dependency": "file:../package-local-dependency",
- "@scoped/package-scoped-dependency": "file:../package-scoped-dependency"
- }
-}
diff --git a/deps/npm/test/tap/install-save-exact.js b/deps/npm/test/tap/install-save-exact.js
index b2feaa1b46..14e32f0f84 100644
--- a/deps/npm/test/tap/install-save-exact.js
+++ b/deps/npm/test/tap/install-save-exact.js
@@ -1,92 +1,114 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var npm = require("../../")
-var path = require("path")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var mkdirp = require("mkdirp")
-var pkg = path.join(__dirname, "install-save-exact")
-var mr = require("npm-registry-mock")
-
-test("setup", function (t) {
- mkdirp.sync(pkg)
- mkdirp.sync(path.resolve(pkg, "node_modules"))
- process.chdir(pkg)
- t.end()
-})
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+var server
+
+var pkg = path.join(__dirname, 'install-save-exact')
-test("\"npm install --save --save-exact\" should install local pkg", function (t) {
- resetPackageJSON(pkg)
- mr({port : common.port}, function (er, s) {
- npm.load({
- cache: pkg + "/cache",
- loglevel: "silent",
- registry: common.registry }, function (err) {
- t.ifError(err)
- npm.config.set("save", true)
- npm.config.set("save-exact", true)
- npm.commands.install(["underscore@1.3.1"], function (err) {
- t.ifError(err)
- var p = path.resolve(pkg, "node_modules/underscore/package.json")
- t.ok(JSON.parse(fs.readFileSync(p)))
- p = path.resolve(pkg, "package.json")
- var pkgJson = JSON.parse(fs.readFileSync(p, "utf8"))
- t.deepEqual(pkgJson.dependencies, {
- "underscore": "1.3.1"
- }, "Underscore dependency should specify exactly 1.3.1")
- npm.config.set("save", undefined)
- npm.config.set("save-exact", undefined)
- s.close()
- t.end()
- })
- })
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'install-save-exact',
+ version: '0.0.1',
+ description: 'fixture'
+}
+
+test('setup', function (t) {
+ setup()
+ mr({ port: common.port }, function (er, s) {
+ server = s
+ t.end()
})
})
-test("\"npm install --save-dev --save-exact\" should install local pkg", function (t) {
- resetPackageJSON(pkg)
-
- mr({port : common.port}, function (er, s) {
- npm.load({
- cache: pkg + "/cache",
- loglevel: "silent",
- registry: common.registry }, function (err) {
- t.ifError(err)
- npm.config.set("save-dev", true)
- npm.config.set("save-exact", true)
- npm.commands.install(["underscore@1.3.1"], function (err) {
- t.ifError(err)
- var p = path.resolve(pkg, "node_modules/underscore/package.json")
- t.ok(JSON.parse(fs.readFileSync(p)))
- p = path.resolve(pkg, "package.json")
- var pkgJson = JSON.parse(fs.readFileSync(p, "utf8"))
- console.log(pkgJson)
- t.deepEqual(pkgJson.devDependencies, {
- "underscore": "1.3.1"
- }, "underscore devDependency should specify exactly 1.3.1")
- s.close()
- npm.config.set("save-dev", undefined)
- npm.config.set("save-exact", undefined)
- t.end()
- })
- })
- })
+test('\'npm install --save --save-exact\' should install local pkg', function (t) {
+ common.npm(
+ [
+ '--loglevel', 'silent',
+ '--registry', common.registry,
+ '--save',
+ '--save-exact',
+ 'install', 'underscore@1.3.1'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm ran without issue')
+ t.notOk(code, 'npm install exited without raising an error code')
+
+ var p = path.resolve(pkg, 'node_modules/underscore/package.json')
+ t.ok(JSON.parse(fs.readFileSync(p)))
+
+ p = path.resolve(pkg, 'package.json')
+ var pkgJson = JSON.parse(fs.readFileSync(p, 'utf8'))
+
+ t.same(
+ pkgJson.dependencies,
+ { 'underscore': '1.3.1' },
+ 'underscore dependency should specify exactly 1.3.1'
+ )
+
+ t.end()
+ }
+ )
+})
+
+test('\'npm install --save-dev --save-exact\' should install local pkg', function (t) {
+ setup()
+
+ common.npm(
+ [
+ '--loglevel', 'silent',
+ '--registry', common.registry,
+ '--save-dev',
+ '--save-exact',
+ 'install', 'underscore@1.3.1'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm ran without issue')
+ t.notOk(code, 'npm install exited without raising an error code')
+
+ var p = path.resolve(pkg, 'node_modules/underscore/package.json')
+ t.ok(JSON.parse(fs.readFileSync(p)))
+
+ p = path.resolve(pkg, 'package.json')
+ var pkgJson = JSON.parse(fs.readFileSync(p, 'utf8'))
+
+ t.same(
+ pkgJson.devDependencies,
+ { 'underscore': '1.3.1' },
+ 'underscore dependency should specify exactly 1.3.1'
+ )
+
+ t.end()
+ }
+ )
})
-test("cleanup", function (t) {
- process.chdir(__dirname)
- rimraf.sync(path.resolve(pkg, "node_modules"))
- rimraf.sync(path.resolve(pkg, "cache"))
- resetPackageJSON(pkg)
+test('cleanup', function (t) {
+ server.close()
+ cleanup()
t.end()
})
-function resetPackageJSON(pkg) {
- var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
- delete pkgJson.dependencies
- delete pkgJson.devDependencies
- delete pkgJson.optionalDependencies
- var json = JSON.stringify(pkgJson, null, 2) + "\n"
- var p = path.resolve(pkg, "package.json")
- fs.writeFileSync(p, json, "ascii")
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
+
+function setup () {
+ cleanup()
+ mkdirp.sync(path.resolve(pkg, 'node_modules'))
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
}
diff --git a/deps/npm/test/tap/install-save-exact/README.md b/deps/npm/test/tap/install-save-exact/README.md
deleted file mode 100644
index aca67ff17d..0000000000
--- a/deps/npm/test/tap/install-save-exact/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# just a test
diff --git a/deps/npm/test/tap/install-save-exact/index.js b/deps/npm/test/tap/install-save-exact/index.js
deleted file mode 100644
index 33c1891f81..0000000000
--- a/deps/npm/test/tap/install-save-exact/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = true
diff --git a/deps/npm/test/tap/install-save-exact/package.json b/deps/npm/test/tap/install-save-exact/package.json
deleted file mode 100644
index 84789fc224..0000000000
--- a/deps/npm/test/tap/install-save-exact/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "name": "bla",
- "description": "fixture",
- "version": "0.0.1",
- "main": "index.js",
- "repository": "git://github.com/robertkowalski/bogusfixture"
-}
diff --git a/deps/npm/test/tap/install-save-local.js b/deps/npm/test/tap/install-save-local.js
index 2a1f839984..33a1c613f1 100644
--- a/deps/npm/test/tap/install-save-local.js
+++ b/deps/npm/test/tap/install-save-local.js
@@ -1,65 +1,126 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var path = require("path")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var pkg = path.join(__dirname, "install-save-local", "package")
+var fs = require('graceful-fs')
+var path = require('path')
-var EXEC_OPTS = { }
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
-test("setup", function (t) {
- resetPackageJSON(pkg)
- process.chdir(pkg)
+var common = require('../common-tap.js')
+
+var root = path.join(__dirname, 'install-save-local')
+var pkg = path.join(root, 'package')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'install-save-local',
+ version: '0.0.0'
+}
+
+var localDependency = {
+ name: 'package-local-dependency',
+ version: '0.0.0'
+}
+
+var localDevDependency = {
+ name: 'package-local-dev-dependency',
+ version: '0.0.0'
+}
+
+test('setup', function (t) {
+ setup()
t.end()
})
-test('"npm install --save ../local/path" should install local package and save to package.json', function (t) {
- resetPackageJSON(pkg)
- common.npm(["install", "--save", "../package-local-dependency"], EXEC_OPTS, function (err, code) {
- t.ifError(err)
- t.notOk(code, "npm install exited with code 0")
-
- var dependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dependency/package.json")
- t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, "utf8")))
-
- var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
- t.deepEqual(pkgJson.dependencies, {
- "package-local-dependency": "file:../package-local-dependency"
- })
- t.end()
- })
+test('\'npm install --save ../local/path\' should save to package.json', function (t) {
+ common.npm(
+ [
+ '--loglevel', 'silent',
+ '--save',
+ 'install', '../package-local-dependency'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm install ran without issue')
+ t.notOk(code, 'npm install exited with code 0')
+
+ var dependencyPackageJson = path.join(
+ pkg, 'node_modules', 'package-local-dependency', 'package.json'
+ )
+ t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, 'utf8')))
+
+ var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
+ t.deepEqual(
+ pkgJson.dependencies,
+ { 'package-local-dependency': 'file:../package-local-dependency' },
+ 'local package saved correctly'
+ )
+ t.end()
+ }
+ )
})
-test('"npm install --save-dev ../local/path" should install local package and save to package.json', function (t) {
- resetPackageJSON(pkg)
- common.npm(["install", "--save-dev", "../package-local-dev-dependency"], EXEC_OPTS, function (err, code) {
- t.ifError(err)
- t.notOk(code, "npm install exited with code 0")
+test('\'npm install --save-dev ../local/path\' should save to package.json', function (t) {
+ setup()
+ common.npm(
+ [
+ '--loglevel', 'silent',
+ '--save-dev',
+ 'install', '../package-local-dev-dependency'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm install ran without issue')
+ t.notOk(code, 'npm install exited with code 0')
- var dependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dev-dependency/package.json")
- t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, "utf8")))
+ var dependencyPackageJson = path.resolve(
+ pkg, 'node_modules', 'package-local-dev-dependency', 'package.json'
+ )
+ t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, 'utf8')))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
- t.deepEqual(pkgJson.devDependencies, {
- "package-local-dev-dependency": "file:../package-local-dev-dependency"
- })
+ var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
+ t.deepEqual(
+ pkgJson.devDependencies,
+ { 'package-local-dev-dependency': 'file:../package-local-dev-dependency' },
+ 'local package saved correctly'
+ )
- t.end()
- })
+ t.end()
+ }
+ )
})
-
-test("cleanup", function (t) {
- resetPackageJSON(pkg)
- process.chdir(__dirname)
- rimraf.sync(path.resolve(pkg, "node_modules"))
+test('cleanup', function (t) {
+ cleanup()
t.end()
})
-function resetPackageJSON(pkg) {
- var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
- delete pkgJson.dependencies
- delete pkgJson.devDependencies
- var json = JSON.stringify(pkgJson, null, 2) + "\n"
- fs.writeFileSync(pkg + "/package.json", json, "ascii")
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ process.chdir(__dirname)
+ rimraf.sync(root)
+}
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
+ mkdirp.sync(path.join(root, 'package-local-dependency'))
+ fs.writeFileSync(
+ path.join(root, 'package-local-dependency', 'package.json'),
+ JSON.stringify(localDependency, null, 2)
+ )
+
+ mkdirp.sync(path.join(root, 'package-local-dev-dependency'))
+ fs.writeFileSync(
+ path.join(root, 'package-local-dev-dependency', 'package.json'),
+ JSON.stringify(localDevDependency, null, 2)
+ )
+
+ process.chdir(pkg)
}
diff --git a/deps/npm/test/tap/install-save-local/package-local-dependency/package.json b/deps/npm/test/tap/install-save-local/package-local-dependency/package.json
deleted file mode 100644
index a524d82624..0000000000
--- a/deps/npm/test/tap/install-save-local/package-local-dependency/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "package-local-dependency",
- "version": "0.0.0",
- "description": "Test for local installs"
-}
diff --git a/deps/npm/test/tap/install-save-local/package-local-dev-dependency/package.json b/deps/npm/test/tap/install-save-local/package-local-dev-dependency/package.json
deleted file mode 100644
index 23f3ad6824..0000000000
--- a/deps/npm/test/tap/install-save-local/package-local-dev-dependency/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "package-local-dev-dependency",
- "version": "0.0.0",
- "description": "Test for local installs"
-}
diff --git a/deps/npm/test/tap/install-save-local/package/package.json b/deps/npm/test/tap/install-save-local/package/package.json
deleted file mode 100644
index c6a5cb99d5..0000000000
--- a/deps/npm/test/tap/install-save-local/package/package.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "package",
- "version": "0.0.0"
-}
diff --git a/deps/npm/test/tap/install-save-prefix.js b/deps/npm/test/tap/install-save-prefix.js
index 1844a2c294..b669c5fb7e 100644
--- a/deps/npm/test/tap/install-save-prefix.js
+++ b/deps/npm/test/tap/install-save-prefix.js
@@ -1,139 +1,178 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var npm = require("../../")
-var path = require("path")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var mkdirp = require("mkdirp")
-var pkg = path.join(__dirname, "install-save-prefix")
-var mr = require("npm-registry-mock")
-
-test("setup", function (t) {
- mkdirp.sync(pkg)
- mkdirp.sync(path.resolve(pkg, "node_modules"))
- process.chdir(pkg)
- t.end()
-})
+var fs = require('fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+var server
+
+var pkg = path.join(__dirname, 'install-save-prefix')
+
+var EXEC_OPTS = { cwd: pkg }
-test("npm install --save with default save-prefix should install local pkg versioned to allow minor updates", function (t) {
- resetPackageJSON(pkg)
- mr({port : common.port}, function (er, s) {
- npm.load({
- cache: pkg + "/cache",
- loglevel: "silent",
- "save-prefix": "^",
- registry: common.registry }, function (err) {
- t.ifError(err)
- npm.config.set("save", true)
- npm.commands.install(["underscore@latest"], function (err) {
- t.ifError(err)
- var p = path.resolve(pkg, "node_modules/underscore/package.json")
- t.ok(JSON.parse(fs.readFileSync(p)))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
- t.deepEqual(pkgJson.dependencies, {
- "underscore": "^1.5.1"
- }, "Underscore dependency should specify ^1.5.1")
- npm.config.set("save", undefined)
- s.close()
- t.end()
- })
- })
+var json = {
+ name: 'install-save-prefix',
+ version: '0.0.1'
+}
+
+test('setup', function (t) {
+ setup()
+ mr({ port: common.port }, function (er, s) {
+ t.ifError(er, 'started mock registry')
+ server = s
+ t.end()
})
})
-test("npm install --save-dev with default save-prefix should install local pkg to dev dependencies versioned to allow minor updates", function (t) {
- resetPackageJSON(pkg)
- mr({port : common.port}, function (er, s) {
- npm.load({
- cache: pkg + "/cache",
- loglevel: "silent",
- "save-prefix": "^",
- registry: common.registry }, function (err) {
- t.ifError(err)
- npm.config.set("save-dev", true)
- npm.commands.install(["underscore@1.3.1"], function (err) {
- t.ifError(err)
- var p = path.resolve(pkg, "node_modules/underscore/package.json")
- t.ok(JSON.parse(fs.readFileSync(p)))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
- t.deepEqual(pkgJson.devDependencies, {
- "underscore": "^1.3.1"
- }, "Underscore devDependency should specify ^1.3.1")
- npm.config.set("save-dev", undefined)
- s.close()
- t.end()
- })
- })
- })
+test('install --save with \'^\' save prefix should accept minor updates', function (t) {
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ '--save-prefix', '^',
+ '--save',
+ 'install', 'underscore@latest'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm install ran without issue')
+ t.notOk(code, 'npm install exited with code 0')
+
+ var p = path.join(pkg, 'node_modules', 'underscore', 'package.json')
+ t.ok(JSON.parse(fs.readFileSync(p)))
+
+ var pkgJson = JSON.parse(fs.readFileSync(
+ path.join(pkg, 'package.json'),
+ 'utf8'
+ ))
+ t.deepEqual(
+ pkgJson.dependencies,
+ { 'underscore': '^1.5.1' },
+ 'got expected save prefix and version of 1.5.1'
+ )
+ t.end()
+ }
+ )
})
-test("npm install --save with \"~\" save-prefix should install local pkg versioned to allow patch updates", function (t) {
- resetPackageJSON(pkg)
- mr({port : common.port}, function (er, s) {
- npm.load({
- cache: pkg + "/cache",
- loglevel: "silent",
- registry: common.registry }, function (err) {
- t.ifError(err)
- npm.config.set("save", true)
- npm.config.set("save-prefix", "~")
- npm.commands.install(["underscore@1.3.1"], function (err) {
- t.ifError(err)
- var p = path.resolve(pkg, "node_modules/underscore/package.json")
- t.ok(JSON.parse(fs.readFileSync(p)))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
- t.deepEqual(pkgJson.dependencies, {
- "underscore": "~1.3.1"
- }, "Underscore dependency should specify ~1.3.1")
- npm.config.set("save", undefined)
- npm.config.set("save-prefix", undefined)
- s.close()
- t.end()
- })
- })
- })
+test('install --save-dev with \'^\' save prefix should accept minor dev updates', function (t) {
+ setup()
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ '--save-prefix', '^',
+ '--save-dev',
+ 'install', 'underscore@1.3.1'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm install ran without issue')
+ t.notOk(code, 'npm install exited with code 0')
+
+ var p = path.join(pkg, 'node_modules', 'underscore', 'package.json')
+ t.ok(JSON.parse(fs.readFileSync(p)))
+
+ var pkgJson = JSON.parse(fs.readFileSync(
+ path.join(pkg, 'package.json'),
+ 'utf8'
+ ))
+ t.deepEqual(
+ pkgJson.devDependencies,
+ { 'underscore': '^1.3.1' },
+ 'got expected save prefix and version of 1.3.1'
+ )
+ t.end()
+ }
+ )
})
-test("npm install --save-dev with \"~\" save-prefix should install local pkg to dev dependencies versioned to allow patch updates", function (t) {
- resetPackageJSON(pkg)
- mr({port : common.port}, function (er, s) {
- npm.load({
- cache: pkg + "/cache",
- loglevel: "silent",
- registry: common.registry }, function (err) {
- t.ifError(err)
- npm.config.set("save-dev", true)
- npm.config.set("save-prefix", "~")
- npm.commands.install(["underscore@1.3.1"], function (err) {
- t.ifError(err)
- var p = path.resolve(pkg, "node_modules/underscore/package.json")
- t.ok(JSON.parse(fs.readFileSync(p)))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
- t.deepEqual(pkgJson.devDependencies, {
- "underscore": "~1.3.1"
- }, "Underscore devDependency should specify ~1.3.1")
- npm.config.set("save-dev", undefined)
- npm.config.set("save-prefix", undefined)
- s.close()
- t.end()
- })
- })
- })
+test('install --save with \'~\' save prefix should accept patch updates', function (t) {
+ setup()
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ '--save-prefix', '~',
+ '--save',
+ 'install', 'underscore@1.3.1'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm install ran without issue')
+ t.notOk(code, 'npm install exited with code 0')
+
+ var p = path.join(pkg, 'node_modules', 'underscore', 'package.json')
+ t.ok(JSON.parse(fs.readFileSync(p)))
+
+ var pkgJson = JSON.parse(fs.readFileSync(
+ path.join(pkg, 'package.json'),
+ 'utf8'
+ ))
+ t.deepEqual(
+ pkgJson.dependencies,
+ { 'underscore': '~1.3.1' },
+ 'got expected save prefix and version of 1.3.1'
+ )
+ t.end()
+ }
+ )
})
-test("cleanup", function (t) {
- process.chdir(__dirname)
- rimraf.sync(path.resolve(pkg, "node_modules"))
- rimraf.sync(path.resolve(pkg, "cache"))
- resetPackageJSON(pkg)
+test('install --save-dev with \'~\' save prefix should accept patch updates', function (t) {
+ setup()
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ '--save-prefix', '~',
+ '--save-dev',
+ 'install', 'underscore@1.3.1'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm install ran without issue')
+ t.notOk(code, 'npm install exited with code 0')
+
+ var p = path.join(pkg, 'node_modules', 'underscore', 'package.json')
+ t.ok(JSON.parse(fs.readFileSync(p)))
+
+ var pkgJson = JSON.parse(fs.readFileSync(
+ path.join(pkg, 'package.json'),
+ 'utf8'
+ ))
+ t.deepEqual(
+ pkgJson.devDependencies,
+ { 'underscore': '~1.3.1' },
+ 'got expected save prefix and version of 1.3.1'
+ )
+ t.end()
+ }
+ )
+})
+
+test('cleanup', function (t) {
+ server.close()
+ cleanup()
t.end()
})
-function resetPackageJSON(pkg) {
- var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
- delete pkgJson.dependencies
- delete pkgJson.devDependencies
- delete pkgJson.optionalDependencies
- var json = JSON.stringify(pkgJson, null, 2) + "\n"
- fs.writeFileSync(pkg + "/package.json", json, "ascii")
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
+
+function setup () {
+ cleanup()
+ mkdirp.sync(path.resolve(pkg, 'node_modules'))
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
+ process.chdir(pkg)
}
diff --git a/deps/npm/test/tap/install-save-prefix/README.md b/deps/npm/test/tap/install-save-prefix/README.md
deleted file mode 100644
index aca67ff17d..0000000000
--- a/deps/npm/test/tap/install-save-prefix/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# just a test
diff --git a/deps/npm/test/tap/install-save-prefix/index.js b/deps/npm/test/tap/install-save-prefix/index.js
deleted file mode 100644
index 33c1891f81..0000000000
--- a/deps/npm/test/tap/install-save-prefix/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = true
diff --git a/deps/npm/test/tap/install-save-prefix/package.json b/deps/npm/test/tap/install-save-prefix/package.json
deleted file mode 100644
index 84789fc224..0000000000
--- a/deps/npm/test/tap/install-save-prefix/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "name": "bla",
- "description": "fixture",
- "version": "0.0.1",
- "main": "index.js",
- "repository": "git://github.com/robertkowalski/bogusfixture"
-}
diff --git a/deps/npm/test/tap/install-scoped-already-installed.js b/deps/npm/test/tap/install-scoped-already-installed.js
index a355a4a50b..1446897d44 100644
--- a/deps/npm/test/tap/install-scoped-already-installed.js
+++ b/deps/npm/test/tap/install-scoped-already-installed.js
@@ -1,79 +1,130 @@
-var common = require("../common-tap")
-var existsSync = require("fs").existsSync
-var join = require("path").join
+var fs = require('graceful-fs')
+var path = require('path')
+var existsSync = fs.existsSync || path.existsSync
-var test = require("tap").test
-var rimraf = require("rimraf")
-var mkdirp = require("mkdirp")
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
-var pkg = join(__dirname, "install-from-local", "package-with-scoped-paths")
-var modules = join(pkg, "node_modules")
+var common = require('../common-tap')
-var EXEC_OPTS = {
- cwd : pkg
+var root = path.join(__dirname, 'install-scoped-already-installed')
+var pkg = path.join(root, 'package-with-scoped-paths')
+var modules = path.join(pkg, 'node_modules')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var scopedPaths = {
+ name: 'package-with-scoped-paths',
+ version: '0.0.0',
+ dependencies: {
+ 'package-local-dependency': 'file:../package-local-dependency',
+ '@scoped/package-scoped-dependency': 'file:../package-scoped-dependency'
+ }
+}
+
+var localDependency = {
+ name: 'package-local-dependency',
+ version: '0.0.0',
+ description: 'Test for local installs'
}
-test("setup", function (t) {
- rimraf.sync(modules)
- rimraf.sync(join(pkg, "cache"))
+var scopedDependency = {
+ name: '@scoped/package',
+ version: '0.0.0',
+ description: 'Test for local installs'
+}
+
+test('setup', function (t) {
+ rimraf.sync(root)
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(scopedPaths, null, 2)
+ )
+
+ mkdirp.sync(path.join(root, 'package-local-dependency'))
+ fs.writeFileSync(
+ path.join(root, 'package-local-dependency', 'package.json'),
+ JSON.stringify(localDependency, null, 2)
+ )
+
+ mkdirp.sync(path.join(root, 'package-scoped-dependency'))
+ fs.writeFileSync(
+ path.join(root, 'package-scoped-dependency', 'package.json'),
+ JSON.stringify(scopedDependency, null, 2)
+ )
+
process.chdir(pkg)
- mkdirp.sync(modules)
t.end()
})
-test("installing already installed local scoped package", function (t) {
- common.npm(["install", "--loglevel", "silent"], EXEC_OPTS, function (err, code, stdout) {
- var installed = parseNpmInstallOutput(stdout)
- t.ifError(err, "error should not exist")
- t.notOk(code, "npm install exited with code 0")
- t.ifError(err, "install ran to completion without error")
- t.ok(
- existsSync(join(modules, "@scoped", "package", "package.json")),
- "package installed"
- )
- t.ok(
- contains(installed, "node_modules/@scoped/package"),
- "installed @scoped/package"
- )
- t.ok(
- contains(installed, "node_modules/package-local-dependency"),
- "installed package-local-dependency"
- )
-
- common.npm(["install", "--loglevel", "silent"], EXEC_OPTS, function (err, code, stdout) {
- installed = parseNpmInstallOutput(stdout)
- t.ifError(err, "error should not exist")
- t.notOk(code, "npm install exited with code 0")
-
- t.ifError(err, "install ran to completion without error")
+test('installing already installed local scoped package', function (t) {
+ common.npm(
+ [
+ '--loglevel', 'silent',
+ 'install'
+ ],
+ EXEC_OPTS,
+ function (err, code, stdout) {
+ var installed = parseNpmInstallOutput(stdout)
+ t.ifError(err, 'install ran to completion without error')
+ t.notOk(code, 'npm install exited with code 0')
t.ok(
- existsSync(join(modules, "@scoped", "package", "package.json")),
- "package installed"
+ existsSync(path.join(modules, '@scoped', 'package', 'package.json')),
+ 'package installed'
)
-
- t.notOk(
- contains(installed, "node_modules/@scoped/package"),
- "did not reinstall @scoped/package"
+ t.ok(
+ contains(installed, 'node_modules/@scoped/package'),
+ 'installed @scoped/package'
)
- t.notOk(
- contains(installed, "node_modules/package-local-dependency"),
- "did not reinstall package-local-dependency"
+ t.ok(
+ contains(installed, 'node_modules/package-local-dependency'),
+ 'installed package-local-dependency'
)
- t.end()
- })
- })
+
+ common.npm(
+ [
+ '--loglevel', 'silent',
+ 'install'
+ ],
+ EXEC_OPTS,
+ function (err, code, stdout) {
+ t.ifError(err, 'install ran to completion without error')
+ t.notOk(code, 'npm install raised no error code')
+
+ installed = parseNpmInstallOutput(stdout)
+
+ t.ok(
+ existsSync(path.join(modules, '@scoped', 'package', 'package.json')),
+ 'package installed'
+ )
+
+ t.notOk(
+ contains(installed, 'node_modules/@scoped/package'),
+ 'did not reinstall @scoped/package'
+ )
+ t.notOk(
+ contains(installed, 'node_modules/package-local-dependency'),
+ 'did not reinstall package-local-dependency'
+ )
+ t.end()
+ }
+ )
+ }
+ )
})
-test("cleanup", function (t) {
- process.chdir(__dirname)
- rimraf.sync(join(modules))
- rimraf.sync(join(pkg, "cache"))
+test('cleanup', function (t) {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(root)
t.end()
})
-function contains(list, element) {
- for (var i=0; i < list.length; ++i) {
+function contains (list, element) {
+ for (var i = 0; i < list.length; ++i) {
if (list[i] === element) {
return true
}
@@ -81,6 +132,6 @@ function contains(list, element) {
return false
}
-function parseNpmInstallOutput(stdout) {
+function parseNpmInstallOutput (stdout) {
return stdout.trim().split(/\n\n|\s+/)
}
diff --git a/deps/npm/test/tap/install-scoped-link.js b/deps/npm/test/tap/install-scoped-link.js
index b1e6ca0b22..029acb3813 100644
--- a/deps/npm/test/tap/install-scoped-link.js
+++ b/deps/npm/test/tap/install-scoped-link.js
@@ -1,51 +1,84 @@
-var common = require("../common-tap.js")
-var existsSync = require("fs").existsSync
-var join = require("path").join
-var exec = require("child_process").exec
+var exec = require('child_process').exec
+var fs = require('graceful-fs')
+var path = require('path')
+var existsSync = fs.existsSync || path.existsSync
-var test = require("tap").test
-var rimraf = require("rimraf")
-var mkdirp = require("mkdirp")
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
-var pkg = join(__dirname, "install-scoped")
-var work = join(__dirname, "install-scoped-TEST")
-var modules = join(work, "node_modules")
+var common = require('../common-tap.js')
-var EXEC_OPTS = {}
+var pkg = path.join(__dirname, 'install-scoped-link')
+var work = path.join(__dirname, 'install-scoped-link-TEST')
+var modules = path.join(work, 'node_modules')
+
+var EXEC_OPTS = { cwd: work }
+
+var world = 'console.log("hello blrbld")\n'
+
+var json = {
+ name: '@scoped/package',
+ version: '0.0.0',
+ bin: {
+ hello: './world.js'
+ }
+}
+
+test('setup', function (t) {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ fs.writeFileSync(path.join(pkg, 'world.js'), world)
-test("setup", function (t) {
mkdirp.sync(modules)
process.chdir(work)
t.end()
})
-test("installing package with links", function (t) {
- common.npm(["install", pkg], EXEC_OPTS, function (err, code) {
- t.ifError(err, "install ran to completion without error")
- t.notOk(code, "npm install exited with code 0")
+test('installing package with links', function (t) {
+ common.npm(
+ [
+ '--loglevel', 'silent',
+ 'install', pkg
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'install ran to completion without error')
+ t.notOk(code, 'npm install exited with code 0')
- t.ok(
- existsSync(join(modules, "@scoped", "package", "package.json")),
- "package installed"
- )
- t.ok(existsSync(join(modules, ".bin")), "binary link directory exists")
+ t.ok(
+ existsSync(path.join(modules, '@scoped', 'package', 'package.json')),
+ 'package installed'
+ )
+ t.ok(existsSync(path.join(modules, '.bin')), 'binary link directory exists')
- var hello = join(modules, ".bin", "hello")
- t.ok(existsSync(hello), "binary link exists")
+ var hello = path.join(modules, '.bin', 'hello')
+ t.ok(existsSync(hello), 'binary link exists')
- exec("node " + hello, function (err, stdout, stderr) {
- t.ifError(err, "command ran fine")
- t.notOk(stderr, "got no error output back")
- t.equal(stdout, "hello blrbld\n", "output was as expected")
+ exec('node ' + hello, function (err, stdout, stderr) {
+ t.ifError(err, 'command ran fine')
+ t.notOk(stderr, 'got no error output back')
+ t.equal(stdout, 'hello blrbld\n', 'output was as expected')
- t.end()
- })
- })
+ t.end()
+ })
+ }
+ )
})
-test("cleanup", function (t) {
- process.chdir(__dirname)
- rimraf.sync(work)
+test('cleanup', function (t) {
+ cleanup()
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(work)
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/install-scoped-with-peer-dependency.js b/deps/npm/test/tap/install-scoped-with-peer-dependency.js
new file mode 100644
index 0000000000..3a54b9a11f
--- /dev/null
+++ b/deps/npm/test/tap/install-scoped-with-peer-dependency.js
@@ -0,0 +1,60 @@
+var fs = require('fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+var pkg = path.join(__dirname, 'install-scoped-with-peer-dependency')
+var local = path.join(pkg, 'package')
+
+var EXEC_OPTS = { }
+
+var json = {
+ name: '@scope/package',
+ version: '0.0.0',
+ peerDependencies: {
+ underscore: '*'
+ }
+}
+
+test('setup', function (t) {
+ setup()
+
+ t.end()
+})
+
+test('it should install peerDependencies in same tree level as the parent package', function (t) {
+ common.npm(['install', './package'], EXEC_OPTS, function (err, code, stdout, stderr) {
+ t.ifError(err, 'install local package successful')
+ t.equal(code, 0, 'npm install exited with code')
+ t.notOk(stderr, 'npm install exited without any error output')
+
+ var p = path.resolve(pkg, 'node_modules/underscore/package.json')
+ t.ok(JSON.parse(fs.readFileSync(p, 'utf8')))
+ t.end()
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(local)
+ mkdirp.sync(path.resolve(pkg, 'node_modules'))
+ fs.writeFileSync(
+ path.join(local, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/install-scoped/package.json b/deps/npm/test/tap/install-scoped/package.json
deleted file mode 100644
index 32700cf6af..0000000000
--- a/deps/npm/test/tap/install-scoped/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "name": "@scoped/package",
- "version": "0.0.0",
- "bin": {
- "hello": "./world.js"
- }
-}
diff --git a/deps/npm/test/tap/install-scoped/world.js b/deps/npm/test/tap/install-scoped/world.js
deleted file mode 100644
index f6333ba5b1..0000000000
--- a/deps/npm/test/tap/install-scoped/world.js
+++ /dev/null
@@ -1 +0,0 @@
-console.log("hello blrbld")
diff --git a/deps/npm/test/tap/install-with-dev-dep-duplicate.js b/deps/npm/test/tap/install-with-dev-dep-duplicate.js
index 9df8123ed3..19ad0c2bf4 100644
--- a/deps/npm/test/tap/install-with-dev-dep-duplicate.js
+++ b/deps/npm/test/tap/install-with-dev-dep-duplicate.js
@@ -1,57 +1,85 @@
-var npm = npm = require("../../")
-var test = require("tap").test
-var path = require("path")
-var fs = require("fs")
-var osenv = require("osenv")
-var rimraf = require("rimraf")
-var mr = require("npm-registry-mock")
-var common = require("../common-tap.js")
-
-var pkg = path.resolve(__dirname, "dev-dep-duplicate")
-var desiredResultsPath = path.resolve(pkg, "desired-ls-results.json")
-
-test("prefers version from dependencies over devDependencies", function (t) {
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+var npm = npm = require('../../')
+
+var pkg = path.resolve(__dirname, 'dev-dep-duplicate')
+
+var json = {
+ author: 'Anders Janmyr',
+ name: 'dev-dep-duplicate',
+ version: '0.0.0',
+ dependencies: {
+ underscore: '1.5.1'
+ },
+ devDependencies: {
+ underscore: '1.3.1'
+ }
+}
+
+var expected = {
+ name: 'dev-dep-duplicate',
+ version: '0.0.0',
+ dependencies: {
+ underscore: {
+ version: '1.5.1',
+ from: 'underscore@1.5.1',
+ resolved: common.registry + '/underscore/-/underscore-1.5.1.tgz'
+ }
+ }
+}
+
+test('prefers version from dependencies over devDependencies', function (t) {
t.plan(1)
- mr({port : common.port}, function (er, s) {
+ mr({ port: common.port }, function (er, s) {
setup(function (err) {
if (err) return t.fail(err)
- npm.install(".", function (err) {
+ npm.install('.', function (err) {
if (err) return t.fail(err)
npm.commands.ls([], true, function (err, _, results) {
if (err) return t.fail(err)
- fs.readFile(desiredResultsPath, function (err, desired) {
- if (err) return t.fail(err)
-
- t.deepEqual(results, JSON.parse(desired))
- s.close()
- t.end()
- })
+ t.deepEqual(results, expected)
+ s.close()
+ t.end()
})
})
})
})
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
-
function setup (cb) {
cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
process.chdir(pkg)
- var opts = { cache: path.resolve(pkg, "cache"), registry: common.registry}
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ registry: common.registry
+ }
npm.load(opts, cb)
}
function cleanup () {
process.chdir(osenv.tmpdir())
- rimraf.sync(path.resolve(pkg, "node_modules"))
- rimraf.sync(path.resolve(pkg, "cache"))
+ rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/lifecycle-path.js b/deps/npm/test/tap/lifecycle-path.js
index dc05a15dcb..fae6fcc83f 100644
--- a/deps/npm/test/tap/lifecycle-path.js
+++ b/deps/npm/test/tap/lifecycle-path.js
@@ -1,61 +1,87 @@
-var test = require("tap").test
-var common = require("../common-tap.js")
-var path = require("path")
-var rimraf = require("rimraf")
-var pkg = path.resolve(__dirname, "lifecycle-path")
-var fs = require("fs")
-var link = path.resolve(pkg, "node-bin")
+var fs = require('fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'lifecycle-path')
+var link = path.resolve(pkg, 'node-bin')
var PATH
-if (process.platform === "win32") {
+if (process.platform === 'win32') {
// On Windows the 'comspec' environment variable is used,
// so cmd.exe does not need to be on the path.
- PATH = "C:\\foo\\bar"
+ PATH = 'C:\\foo\\bar'
} else {
// On non-Windows, without the path to the shell, nothing usually works.
- PATH = "/bin:/usr/bin"
+ PATH = '/bin:/usr/bin'
+}
+
+var printPath = 'console.log(process.env.PATH)\n'
+
+var json = {
+ name: 'glorb',
+ version: '1.2.3',
+ scripts: {
+ path: './node-bin/node print-path.js'
+ }
}
-test("setup", function (t) {
- rimraf.sync(link)
- fs.symlinkSync(path.dirname(process.execPath), link, "dir")
+test('setup', function (t) {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ fs.writeFileSync(path.join(pkg, 'print-path.js'), printPath)
+ fs.symlinkSync(path.dirname(process.execPath), link, 'dir')
t.end()
})
-test("make sure the path is correct", function (t) {
- common.npm(["run-script", "path"], {
+test('make sure the path is correct', function (t) {
+ common.npm(['run-script', 'path'], {
cwd: pkg,
env: {
PATH: PATH,
- stdio: [ 0, "pipe", 2 ]
+ stdio: [ 0, 'pipe', 2 ]
}
}, function (er, code, stdout) {
if (er) throw er
- t.equal(code, 0, "exit code")
+ t.equal(code, 0, 'exit code')
// remove the banner, we just care about the last line
stdout = stdout.trim().split(/\r|\n/).pop()
- var pathSplit = process.platform === "win32" ? ";" : ":"
- var root = path.resolve(__dirname, "../..")
+ var pathSplit = process.platform === 'win32' ? ';' : ':'
+ var root = path.resolve(__dirname, '../..')
var actual = stdout.split(pathSplit).map(function (p) {
if (p.indexOf(root) === 0) {
- p = "{{ROOT}}" + p.substr(root.length)
+ p = '{{ROOT}}' + p.substr(root.length)
}
- return p.replace(/\\/g, "/")
+ return p.replace(/\\/g, '/')
})
// get the ones we tacked on, then the system-specific requirements
var expect = [
- "{{ROOT}}/bin/node-gyp-bin",
- "{{ROOT}}/test/tap/lifecycle-path/node_modules/.bin"
+ '{{ROOT}}/bin/node-gyp-bin',
+ '{{ROOT}}/test/tap/lifecycle-path/node_modules/.bin'
].concat(PATH.split(pathSplit).map(function (p) {
- return p.replace(/\\/g, "/")
+ return p.replace(/\\/g, '/')
}))
t.same(actual, expect)
t.end()
})
})
-test("clean", function (t) {
- rimraf.sync(link)
+test('cleanup', function (t) {
+ cleanup()
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/lifecycle-path/package.json b/deps/npm/test/tap/lifecycle-path/package.json
deleted file mode 100644
index 42e792e467..0000000000
--- a/deps/npm/test/tap/lifecycle-path/package.json
+++ /dev/null
@@ -1 +0,0 @@
-{"name":"glorb","version":"1.2.3","scripts":{"path":"./node-bin/node print-path.js"}}
diff --git a/deps/npm/test/tap/lifecycle-path/print-path.js b/deps/npm/test/tap/lifecycle-path/print-path.js
deleted file mode 100644
index c7ad00b3d3..0000000000
--- a/deps/npm/test/tap/lifecycle-path/print-path.js
+++ /dev/null
@@ -1 +0,0 @@
-console.log(process.env.PATH)
diff --git a/deps/npm/test/tap/lifecycle-signal.js b/deps/npm/test/tap/lifecycle-signal.js
index ee56e9afc5..e28caf72f8 100644
--- a/deps/npm/test/tap/lifecycle-signal.js
+++ b/deps/npm/test/tap/lifecycle-signal.js
@@ -1,20 +1,57 @@
-var test = require("tap").test
-var npm = require.resolve("../../bin/npm-cli.js")
+var fs = require('graceful-fs')
+var path = require('path')
+var spawn = require('child_process').spawn
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
var node = process.execPath
-var spawn = require("child_process").spawn
-var path = require("path")
-var pkg = path.resolve(__dirname, "lifecycle-signal")
+var npm = require.resolve('../../bin/npm-cli.js')
+
+var pkg = path.resolve(__dirname, 'lifecycle-signal')
+
+var json = {
+ name: 'lifecycle-signal',
+ version: '1.2.5',
+ scripts: {
+ preinstall: 'node -e "process.kill(process.pid,\'SIGSEGV\')"'
+ }
+}
+
+test('setup', function (t) {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
-test("lifecycle signal abort", function (t) {
+ process.chdir(pkg)
+ t.end()
+})
+
+test('lifecycle signal abort', function (t) {
// windows does not use lifecycle signals, abort
- if (process.platform === "win32" || process.env.TRAVIS) return t.end()
+ if (process.platform === 'win32' || process.env.TRAVIS) return t.end()
- var child = spawn(node, [npm, "install"], {
+ var child = spawn(node, [npm, 'install'], {
cwd: pkg
})
- child.on("close", function (code, signal) {
+ child.on('close', function (code, signal) {
t.equal(code, null)
- t.equal(signal, "SIGSEGV")
+ t.equal(signal, 'SIGSEGV')
t.end()
})
})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/lifecycle-signal/package.json b/deps/npm/test/tap/lifecycle-signal/package.json
deleted file mode 100644
index 6b7f2f1c5c..0000000000
--- a/deps/npm/test/tap/lifecycle-signal/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{ "name":"lifecycle-signal",
- "version":"1.2.5",
- "scripts": {"preinstall":"node -e 'process.kill(process.pid,\"SIGSEGV\")'"}}
diff --git a/deps/npm/test/tap/link.js b/deps/npm/test/tap/link.js
new file mode 100644
index 0000000000..6562e35fd3
--- /dev/null
+++ b/deps/npm/test/tap/link.js
@@ -0,0 +1,119 @@
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var path = require('path')
+var rimraf = require('rimraf')
+var test = require('tap').test
+var writeFileSync = require('fs').writeFileSync
+
+var common = require('../common-tap.js')
+
+var link = path.join(__dirname, 'link')
+var linkInstall = path.join(__dirname, 'link-install')
+var linkRoot = path.join(__dirname, 'link-root')
+
+var config = 'prefix = ' + linkRoot
+var configPath = path.join(link, '_npmrc')
+
+var OPTS = {
+ env: {
+ 'npm_config_userconfig': configPath
+ }
+}
+
+test('setup', function (t) {
+ setup()
+ common.npm(['ls', '-g', '--depth=0'], OPTS, function (err, c, out) {
+ t.ifError(err)
+ t.equal(c, 0, 'set up ok')
+ t.notOk(out.match(/UNMET DEPENDENCY foo@/), "foo isn't in global")
+ t.end()
+ })
+})
+
+test('creates global link', function (t) {
+ process.chdir(link)
+ common.npm(['link'], OPTS, function (err, c, out) {
+ t.ifError(err, 'link has no error')
+ common.npm(['ls', '-g'], OPTS, function (err, c, out, stderr) {
+ t.ifError(err)
+ t.equal(c, 0)
+ t.equal(stderr, '', 'got expected stderr')
+ t.has(out, /foo@1.0.0/, 'creates global link ok')
+ t.end()
+ })
+ })
+})
+
+test('link-install the package', function (t) {
+ process.chdir(linkInstall)
+ common.npm(['link', 'foo'], OPTS, function (err) {
+ t.ifError(err, 'link-install has no error')
+ common.npm(['ls'], OPTS, function (err, c, out) {
+ t.ifError(err)
+ t.equal(c, 1)
+ t.has(out, /foo@1.0.0/, 'link-install ok')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ process.chdir(osenv.tmpdir())
+ common.npm(['rm', 'foo'], OPTS, function (err, code) {
+ t.ifError(err, 'npm removed the linked package without error')
+ t.equal(code, 0, 'cleanup foo in local ok')
+ common.npm(['rm', '-g', 'foo'], OPTS, function (err, code) {
+ t.ifError(err, 'npm removed the global package without error')
+ t.equal(code, 0, 'cleanup foo in global ok')
+
+ cleanup()
+ t.end()
+ })
+ })
+})
+
+var readJSON = {
+ name: 'foo',
+ version: '1.0.0',
+ description: '',
+ main: 'index.js',
+ scripts: {
+ test: 'echo \"Error: no test specified\" && exit 1'
+ },
+ author: '',
+ license: 'ISC'
+}
+
+var installJSON = {
+ name: 'bar',
+ version: '1.0.0',
+ description: '',
+ main: 'index.js',
+ scripts: {
+ test: 'echo \"Error: no test specified\" && exit 1'
+ },
+ author: '',
+ license: 'ISC'
+}
+
+function cleanup () {
+ rimraf.sync(linkRoot)
+ rimraf.sync(link)
+ rimraf.sync(linkInstall)
+}
+
+function setup () {
+ cleanup()
+ mkdirp.sync(linkRoot)
+ mkdirp.sync(link)
+ writeFileSync(
+ path.join(link, 'package.json'),
+ JSON.stringify(readJSON, null, 2)
+ )
+ mkdirp.sync(linkInstall)
+ writeFileSync(
+ path.join(linkInstall, 'package.json'),
+ JSON.stringify(installJSON, null, 2)
+ )
+ writeFileSync(configPath, config)
+}
diff --git a/deps/npm/test/tap/ls-depth-cli.js b/deps/npm/test/tap/ls-depth-cli.js
index b449804cdf..77689cbc54 100644
--- a/deps/npm/test/tap/ls-depth-cli.js
+++ b/deps/npm/test/tap/ls-depth-cli.js
@@ -1,75 +1,124 @@
-var common = require("../common-tap")
- , test = require("tap").test
- , path = require("path")
- , rimraf = require("rimraf")
- , osenv = require("osenv")
- , mkdirp = require("mkdirp")
- , pkg = path.resolve(__dirname, "ls-depth")
- , mr = require("npm-registry-mock")
- , opts = {cwd: pkg}
+var fs = require('graceful-fs')
+var path = require('path')
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
-function cleanup () {
- process.chdir(osenv.tmpdir())
- rimraf.sync(pkg + "/cache")
- rimraf.sync(pkg + "/tmp")
- rimraf.sync(pkg + "/node_modules")
+var common = require('../common-tap')
+
+var pkg = path.resolve(__dirname, 'ls-depth-cli')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'ls-depth-cli',
+ version: '0.0.0',
+ dependencies: {
+ 'test-package-with-one-dep': '0.0.0'
+ }
}
-test("setup", function (t) {
+test('setup', function (t) {
cleanup()
- mkdirp.sync(pkg + "/cache")
- mkdirp.sync(pkg + "/tmp")
- mr({port : common.port}, function (er, s) {
- var cmd = ["install", "--registry=" + common.registry]
- common.npm(cmd, opts, function (er, c) {
- if (er) throw er
- t.equal(c, 0)
- s.close()
- t.end()
- })
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ mr({ port: common.port }, function (er, s) {
+ common.npm(
+ [
+ '--registry', common.registry,
+ 'install'
+ ],
+ EXEC_OPTS,
+ function (er, c) {
+ t.ifError(er, 'setup installation ran without issue')
+ t.equal(c, 0)
+ s.close()
+ t.end()
+ }
+ )
})
})
-test("npm ls --depth=0", function (t) {
- common.npm(["ls", "--depth=0"], opts, function (er, c, out) {
- if (er) throw er
- t.equal(c, 0)
- t.has(out, /test-package-with-one-dep@0\.0\.0/
- , "output contains test-package-with-one-dep@0.0.0")
- t.doesNotHave(out, /test-package@0\.0\.0/
- , "output not contains test-package@0.0.0")
- t.end()
- })
+test('npm ls --depth=0', function (t) {
+ common.npm(
+ ['ls', '--depth=0'],
+ EXEC_OPTS,
+ function (er, c, out) {
+ t.ifError(er, 'npm ls ran without issue')
+ t.equal(c, 0, 'ls ran without raising error code')
+ t.has(
+ out,
+ /test-package-with-one-dep@0\.0\.0/,
+ 'output contains test-package-with-one-dep@0.0.0'
+ )
+ t.doesNotHave(
+ out,
+ /test-package@0\.0\.0/,
+ 'output not contains test-package@0.0.0'
+ )
+ t.end()
+ }
+ )
})
-test("npm ls --depth=1", function (t) {
- common.npm(["ls", "--depth=1"], opts, function (er, c, out) {
- if (er) throw er
- t.equal(c, 0)
- t.has(out, /test-package-with-one-dep@0\.0\.0/
- , "output contains test-package-with-one-dep@0.0.0")
- t.has(out, /test-package@0\.0\.0/
- , "output contains test-package@0.0.0")
- t.end()
- })
+test('npm ls --depth=1', function (t) {
+ common.npm(
+ ['ls', '--depth=1'],
+ EXEC_OPTS,
+ function (er, c, out) {
+ t.ifError(er, 'npm ls ran without issue')
+ t.equal(c, 0, 'ls ran without raising error code')
+ t.has(
+ out,
+ /test-package-with-one-dep@0\.0\.0/,
+ 'output contains test-package-with-one-dep@0.0.0'
+ )
+ t.has(
+ out,
+ /test-package@0\.0\.0/,
+ 'output contains test-package@0.0.0'
+ )
+ t.end()
+ }
+ )
})
-test("npm ls --depth=Infinity", function (t) {
+test('npm ls --depth=Infinity', function (t) {
// travis has a preconfigured depth=0, in general we can not depend
// on the default value in all environments, so explictly set it here
- common.npm(["ls", "--depth=Infinity"], opts, function (er, c, out) {
- if (er) throw er
- t.equal(c, 0)
- t.has(out, /test-package-with-one-dep@0\.0\.0/
- , "output contains test-package-with-one-dep@0.0.0")
- t.has(out, /test-package@0\.0\.0/
- , "output contains test-package@0.0.0")
- t.end()
- })
+ common.npm(
+ ['ls', '--depth=Infinity'],
+ EXEC_OPTS,
+ function (er, c, out) {
+ t.ifError(er, 'npm ls ran without issue')
+ t.equal(c, 0, 'ls ran without raising error code')
+ t.has(
+ out,
+ /test-package-with-one-dep@0\.0\.0/,
+ 'output contains test-package-with-one-dep@0.0.0'
+ )
+ t.has(
+ out,
+ /test-package@0\.0\.0/,
+ 'output contains test-package@0.0.0'
+ )
+ t.end()
+ }
+ )
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/ls-depth-unmet.js b/deps/npm/test/tap/ls-depth-unmet.js
index ddd9f3baf9..6511cdb333 100644
--- a/deps/npm/test/tap/ls-depth-unmet.js
+++ b/deps/npm/test/tap/ls-depth-unmet.js
@@ -1,96 +1,172 @@
-var common = require("../common-tap")
- , test = require("tap").test
- , path = require("path")
- , rimraf = require("rimraf")
- , osenv = require("osenv")
- , mkdirp = require("mkdirp")
- , pkg = path.resolve(__dirname, "ls-depth-unmet")
- , mr = require("npm-registry-mock")
- , opts = {cwd: pkg}
- , cache = path.resolve(pkg, "cache")
- , tmp = path.resolve(pkg, "tmp")
- , nodeModules = path.resolve(pkg, "node_modules")
+var fs = require('graceful-fs')
+var path = require('path')
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
-function cleanup () {
- process.chdir(osenv.tmpdir())
- rimraf.sync(cache)
- rimraf.sync(tmp)
- rimraf.sync(nodeModules)
+var common = require('../common-tap')
+
+var pkg = path.resolve(__dirname, 'ls-depth-unmet')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'ls-depth-umnet',
+ author: 'Evan You',
+ version: '0.0.0',
+ dependencies: {
+ 'test-package-with-one-dep': '0.0.0',
+ underscore: '1.5.1',
+ optimist: '0.6.0'
+ }
}
-test("setup", function (t) {
+test('setup', function (t) {
cleanup()
- mkdirp.sync(cache)
- mkdirp.sync(tmp)
- mr({port : common.port}, function (er, s) {
- var cmd = ["install", "underscore@1.3.1", "mkdirp", "test-package-with-one-dep", "--registry=" + common.registry]
- common.npm(cmd, opts, function (er, c) {
- if (er) throw er
- t.equal(c, 0)
- s.close()
- t.end()
- })
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ mr({ port: common.port }, function (er, s) {
+ common.npm(
+ [
+ '--registry', common.registry,
+ 'install', 'underscore@1.3.1', 'mkdirp', 'test-package-with-one-dep'
+ ],
+ EXEC_OPTS,
+ function (er, c) {
+ t.ifError(er, 'setup installation ran without issue')
+ t.equal(c, 0)
+ s.close()
+ t.end()
+ }
+ )
})
})
-test("npm ls --depth=0", function (t) {
- common.npm(["ls", "--depth=0"], opts, function (er, c, out) {
- if (er) throw er
- t.equal(c, 1)
- t.has(out, /UNMET DEPENDENCY optimist@0\.6\.0/
- , "output contains optimist@0.6.0 and labeled as unmet dependency")
- t.has(out, /mkdirp@0\.3\.5 extraneous/
- , "output contains mkdirp@0.3.5 and labeled as extraneous")
- t.has(out, /underscore@1\.3\.1 invalid/
- , "output contains underscore@1.3.1 and labeled as invalid")
- t.has(out, /test-package-with-one-dep@0\.0\.0\n/
- , "output contains test-package-with-one-dep@0.0.0 and has no labels")
- t.doesNotHave(out, /test-package@0\.0\.0/
- , "output does not contain test-package@0.0.0 which is at depth=1")
- t.end()
- })
+test('npm ls --depth=0', function (t) {
+ common.npm(
+ ['ls', '--depth=0'],
+ EXEC_OPTS,
+ function (er, c, out) {
+ t.ifError(er, 'setup installation ran without issue')
+ t.equal(c, 1, 'ls barfed')
+ t.has(
+ out,
+ /UNMET DEPENDENCY optimist@0\.6\.0/,
+ 'output contains optimist@0.6.0 and labeled as unmet dependency'
+ )
+ t.has(
+ out,
+ /mkdirp@0\.3\.5 extraneous/,
+ 'output contains mkdirp@0.3.5 and labeled as extraneous'
+ )
+ t.has(
+ out,
+ /underscore@1\.3\.1 invalid/,
+ 'output contains underscore@1.3.1 and labeled as invalid'
+ )
+ t.has(
+ out,
+ /test-package-with-one-dep@0\.0\.0\n/,
+ 'output contains test-package-with-one-dep@0.0.0 and has no labels'
+ )
+ t.doesNotHave(
+ out,
+ /test-package@0\.0\.0/,
+ 'output does not contain test-package@0.0.0 which is at depth=1'
+ )
+ t.end()
+ }
+ )
})
-test("npm ls --depth=1", function (t) {
- common.npm(["ls", "--depth=1"], opts, function (er, c, out) {
- if (er) throw er
- t.equal(c, 1)
- t.has(out, /UNMET DEPENDENCY optimist@0\.6\.0/
- , "output contains optimist@0.6.0 and labeled as unmet dependency")
- t.has(out, /mkdirp@0\.3\.5 extraneous/
- , "output contains mkdirp@0.3.5 and labeled as extraneous")
- t.has(out, /underscore@1\.3\.1 invalid/
- , "output contains underscore@1.3.1 and labeled as invalid")
- t.has(out, /test-package-with-one-dep@0\.0\.0\n/
- , "output contains test-package-with-one-dep@0.0.0 and has no labels")
- t.has(out, /test-package@0\.0\.0/
- , "output contains test-package@0.0.0 which is at depth=1")
- t.end()
- })
+test('npm ls --depth=1', function (t) {
+ common.npm(
+ ['ls', '--depth=1'],
+ EXEC_OPTS,
+ function (er, c, out) {
+ t.ifError(er, 'setup installation ran without issue')
+ t.equal(c, 1, 'ls barfed')
+ t.has(
+ out,
+ /UNMET DEPENDENCY optimist@0\.6\.0/,
+ 'output contains optimist@0.6.0 and labeled as unmet dependency'
+ )
+ t.has(
+ out,
+ /mkdirp@0\.3\.5 extraneous/,
+ 'output contains mkdirp@0.3.5 and labeled as extraneous'
+ )
+ t.has(
+ out,
+ /underscore@1\.3\.1 invalid/,
+ 'output contains underscore@1.3.1 and labeled as invalid'
+ )
+ t.has(
+ out,
+ /test-package-with-one-dep@0\.0\.0\n/,
+ 'output contains test-package-with-one-dep@0.0.0 and has no labels'
+ )
+ t.has(
+ out,
+ /test-package@0\.0\.0/,
+ 'output contains test-package@0.0.0 which is at depth=1'
+ )
+ t.end()
+ }
+ )
})
-test("npm ls --depth=Infinity", function (t) {
+test('npm ls --depth=Infinity', function (t) {
// travis has a preconfigured depth=0, in general we can not depend
// on the default value in all environments, so explictly set it here
- common.npm(["ls", "--depth=Infinity"], opts, function (er, c, out) {
- if (er) throw er
- t.equal(c, 1)
- t.has(out, /UNMET DEPENDENCY optimist@0\.6\.0/
- , "output contains optimist@0.6.0 and labeled as unmet dependency")
- t.has(out, /mkdirp@0\.3\.5 extraneous/
- , "output contains mkdirp@0.3.5 and labeled as extraneous")
- t.has(out, /underscore@1\.3\.1 invalid/
- , "output contains underscore@1.3.1 and labeled as invalid")
- t.has(out, /test-package-with-one-dep@0\.0\.0\n/
- , "output contains test-package-with-one-dep@0.0.0 and has no labels")
- t.has(out, /test-package@0\.0\.0/
- , "output contains test-package@0.0.0 which is at depth=1")
- t.end()
- })
+ common.npm(
+ ['ls', '--depth=Infinity'],
+ EXEC_OPTS,
+ function (er, c, out) {
+ t.ifError(er, 'setup installation ran without issue')
+ t.equal(c, 1, 'ls barfed')
+ t.has(
+ out,
+ /UNMET DEPENDENCY optimist@0\.6\.0/,
+ 'output contains optimist@0.6.0 and labeled as unmet dependency'
+ )
+ t.has(
+ out,
+ /mkdirp@0\.3\.5 extraneous/,
+ 'output contains mkdirp@0.3.5 and labeled as extraneous'
+ )
+ t.has(
+ out,
+ /underscore@1\.3\.1 invalid/,
+ 'output contains underscore@1.3.1 and labeled as invalid'
+ )
+ t.has(
+ out,
+ /test-package-with-one-dep@0\.0\.0\n/,
+ 'output contains test-package-with-one-dep@0.0.0 and has no labels'
+ )
+ t.has(
+ out,
+ /test-package@0\.0\.0/,
+ 'output contains test-package@0.0.0 which is at depth=1'
+ )
+ t.end()
+ }
+ )
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/ls-depth-unmet/package.json b/deps/npm/test/tap/ls-depth-unmet/package.json
deleted file mode 100644
index 391fa8d5b3..0000000000
--- a/deps/npm/test/tap/ls-depth-unmet/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "ls-depth-umnet",
- "author": "Evan You",
- "version": "0.0.0",
- "dependencies": {
- "test-package-with-one-dep": "0.0.0",
- "underscore": "1.5.1",
- "optimist": "0.6.0"
- }
-} \ No newline at end of file
diff --git a/deps/npm/test/tap/ls-depth/package.json b/deps/npm/test/tap/ls-depth/package.json
deleted file mode 100644
index 06f8e48a9f..0000000000
--- a/deps/npm/test/tap/ls-depth/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "author": "Rocko Artischocko",
- "name": "ls-depth",
- "version": "0.0.0",
- "dependencies": {
- "test-package-with-one-dep": "0.0.0"
- }
-}
diff --git a/deps/npm/test/tap/ls-env.js b/deps/npm/test/tap/ls-env.js
index 5ff0618f43..30039b5b30 100644
--- a/deps/npm/test/tap/ls-env.js
+++ b/deps/npm/test/tap/ls-env.js
@@ -1,31 +1,40 @@
-var common = require('../common-tap')
-var test = require('tap').test
+var fs = require('graceful-fs')
var path = require('path')
-var rimraf = require('rimraf')
-var osenv = require('osenv')
+
var mkdirp = require('mkdirp')
-var pkg = path.resolve(__dirname, 'ls-depth')
var mr = require('npm-registry-mock')
-var opts = {cwd: pkg}
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
-function cleanup () {
- process.chdir(osenv.tmpdir())
- rimraf.sync(pkg + '/cache')
- rimraf.sync(pkg + '/tmp')
- rimraf.sync(pkg + '/node_modules')
+var common = require('../common-tap')
+
+var pkg = path.resolve(__dirname, 'ls-depth')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'ls-env',
+ version: '0.0.0',
+ dependencies: {
+ 'test-package-with-one-dep': '0.0.0'
+ }
}
test('setup', function (t) {
cleanup()
- mkdirp.sync(pkg + '/cache')
- mkdirp.sync(pkg + '/tmp')
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
mr({port: common.port}, function (er, s) {
common.npm(
[
- 'install',
- '--registry', common.registry
+ '--registry', common.registry,
+ 'install'
],
- opts,
+ EXEC_OPTS,
function (er, c) {
t.ifError(er, 'install ran without issue')
t.equal(c, 0)
@@ -37,7 +46,7 @@ test('setup', function (t) {
})
test('npm ls --dev', function (t) {
- common.npm(['ls', '--dev'], opts, function (er, code, stdout) {
+ common.npm(['ls', '--dev'], EXEC_OPTS, function (er, code, stdout) {
t.ifError(er, 'ls --dev ran without issue')
t.equal(code, 0)
t.has(stdout, /(empty)/, 'output contains (empty)')
@@ -46,7 +55,7 @@ test('npm ls --dev', function (t) {
})
test('npm ls --production', function (t) {
- common.npm(['ls', '--production'], opts, function (er, code, stdout) {
+ common.npm(['ls', '--production'], EXEC_OPTS, function (er, code, stdout) {
t.ifError(er, 'ls --production ran without issue')
t.notOk(code, 'npm exited ok')
t.has(
@@ -59,7 +68,7 @@ test('npm ls --production', function (t) {
})
test('npm ls --prod', function (t) {
- common.npm(['ls', '--prod'], opts, function (er, code, stdout) {
+ common.npm(['ls', '--prod'], EXEC_OPTS, function (er, code, stdout) {
t.ifError(er, 'ls --prod ran without issue')
t.notOk(code, 'npm exited ok')
t.has(
@@ -75,3 +84,8 @@ test('cleanup', function (t) {
cleanup()
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/ls-l-depth-0.js b/deps/npm/test/tap/ls-l-depth-0.js
index 8833c17219..5bbc1278c4 100644
--- a/deps/npm/test/tap/ls-l-depth-0.js
+++ b/deps/npm/test/tap/ls-l-depth-0.js
@@ -1,76 +1,74 @@
-var cat = require("graceful-fs").writeFileSync
-var resolve = require("path").resolve
+var cat = require('graceful-fs').writeFileSync
+var resolve = require('path').resolve
-var mkdirp = require("mkdirp")
-var mr = require("npm-registry-mock")
-var rimraf = require("rimraf")
-var test = require("tap").test
-var tmpdir = require("osenv").tmpdir
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var rimraf = require('rimraf')
+var test = require('tap').test
+var tmpdir = require('osenv').tmpdir
-var common = require("../common-tap.js")
+var common = require('../common-tap.js')
-var pkg = resolve(__dirname, "ls-l-depth-0")
-var dep = resolve(pkg, "deps", "glock")
-var modules = resolve(pkg, "node_modules")
+var pkg = resolve(__dirname, 'ls-l-depth-0')
+var dep = resolve(pkg, 'deps', 'glock')
+var modules = resolve(pkg, 'node_modules')
var expected =
- "\n" +
- "│ " + pkg + "\n" +
- "│ \n" +
- "└── glock@1.8.7\n" +
- " an inexplicably hostile sample package\n" +
- " https://github.com/npm/glo.ck\n" +
- " https://glo.ck\n" +
- "\n"
+ '\n' +
+ '│ ' + pkg + '\n' +
+ '│ \n' +
+ '└── glock@1.8.7\n' +
+ ' an inexplicably hostile sample package\n' +
+ ' git+https://github.com/npm/glo.ck.git\n' +
+ ' https://glo.ck\n' +
+ '\n'
var server
-var EXEC_OPTS = {
- cwd : pkg
-}
+var EXEC_OPTS = { cwd: pkg }
-test("setup", function (t) {
+test('setup', function (t) {
setup()
- mr({port : common.port}, function (er, s) {
+ mr({ port: common.port }, function (er, s) {
server = s
t.end()
})
})
-test("#6311: npm ll --depth=0 duplicates listing", function (t) {
+test('#6311: npm ll --depth=0 duplicates listing', function (t) {
common.npm(
[
- "--loglevel", "silent",
- "--registry", common.registry,
- "install", dep
+ '--loglevel', 'silent',
+ '--registry', common.registry,
+ 'install', dep
],
EXEC_OPTS,
function (err, code, stdout, stderr) {
- t.ifError(err, "npm install ran without error")
- t.notOk(code, "npm install exited cleanly")
- t.notOk(stderr, "npm install ran silently")
+ t.ifError(err, 'npm install ran without error')
+ t.notOk(code, 'npm install exited cleanly')
+ t.notOk(stderr, 'npm install ran silently')
t.equal(
stdout.trim(),
- "glock@1.8.7 node_modules/glock\n└── underscore@1.5.1",
- "got expected install output"
+ 'glock@1.8.7 node_modules/glock\n└── underscore@1.5.1',
+ 'got expected install output'
)
common.npm(
[
- "--loglevel", "silent",
- "ls", "--long",
- "--depth", "0"
+ '--loglevel', 'silent',
+ 'ls', '--long',
+ '--depth', '0'
],
EXEC_OPTS,
function (err, code, stdout, stderr) {
- t.ifError(err, "npm ll ran without error")
- t.notOk(code, "npm ll exited cleanly")
- t.notOk(stderr, "npm ll ran silently")
+ t.ifError(err, 'npm ll ran without error')
+ t.notOk(code, 'npm ll exited cleanly')
+ t.notOk(stderr, 'npm ll ran silently')
t.equal(
stdout,
expected,
- "got expected package name"
+ 'got expected package name'
)
t.end()
@@ -80,7 +78,7 @@ test("#6311: npm ll --depth=0 duplicates listing", function (t) {
)
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
server.close()
@@ -88,14 +86,14 @@ test("cleanup", function (t) {
})
var fixture = {
- "name" : "glock",
- "version" : "1.8.7",
- "private" : true,
- "description" : "an inexplicably hostile sample package",
- "homepage" : "https://glo.ck",
- "repository" : "https://github.com/npm/glo.ck",
- "dependencies" : {
- "underscore" : "1.5.1"
+ 'name': 'glock',
+ 'version': '1.8.7',
+ 'private': true,
+ 'description': 'an inexplicably hostile sample package',
+ 'homepage': 'https://glo.ck',
+ 'repository': 'https://github.com/npm/glo.ck',
+ 'dependencies': {
+ 'underscore': '1.5.1'
}
}
@@ -110,5 +108,5 @@ function setup () {
mkdirp.sync(modules)
mkdirp.sync(dep)
- cat(resolve(dep, "package.json"), JSON.stringify(fixture))
+ cat(resolve(dep, 'package.json'), JSON.stringify(fixture))
}
diff --git a/deps/npm/test/tap/map-to-registry.js b/deps/npm/test/tap/map-to-registry.js
index 72cdbe5166..9f6673b92c 100644
--- a/deps/npm/test/tap/map-to-registry.js
+++ b/deps/npm/test/tap/map-to-registry.js
@@ -1,89 +1,91 @@
-var test = require("tap").test
-var npm = require("../../")
+var test = require('tap').test
+var npm = require('../../')
-var mapRegistry = require("../../lib/utils/map-to-registry.js")
+var common = require('../common-tap.js')
+var mapRegistry = require('../../lib/utils/map-to-registry.js')
var creds = {
- "//registry.npmjs.org/:username" : "u",
- "//registry.npmjs.org/:_password" : new Buffer("p").toString("base64"),
- "//registry.npmjs.org/:email" : "e"
+ '//registry.npmjs.org/:username': 'u',
+ '//registry.npmjs.org/:_password': new Buffer('p').toString('base64'),
+ '//registry.npmjs.org/:email': 'e',
+ cache: common.npm_config_cache
}
-test("setup", function (t) {
+test('setup', function (t) {
npm.load(creds, function (err) {
t.ifError(err)
t.end()
})
})
-test("mapRegistryToURI", function (t) {
+test('mapRegistryToURI', function (t) {
t.plan(16)
- mapRegistry("basic", npm.config, function (er, uri, auth, registry) {
- t.ifError(er, "mapRegistryToURI worked")
- t.equal(uri, "https://registry.npmjs.org/basic")
+ mapRegistry('basic', npm.config, function (er, uri, auth, registry) {
+ t.ifError(er, 'mapRegistryToURI worked')
+ t.equal(uri, 'https://registry.npmjs.org/basic')
t.deepEqual(auth, {
- scope : "//registry.npmjs.org/",
- token : undefined,
- username : "u",
- password : "p",
- email : "e",
- auth : "dTpw",
- alwaysAuth : false
+ scope: '//registry.npmjs.org/',
+ token: undefined,
+ username: 'u',
+ password: 'p',
+ email: 'e',
+ auth: 'dTpw',
+ alwaysAuth: false
})
- t.equal(registry, "https://registry.npmjs.org/")
+ t.equal(registry, 'https://registry.npmjs.org/')
})
- npm.config.set("scope", "test")
- npm.config.set("@test:registry", "http://reg.npm/design/-/rewrite/")
- npm.config.set("//reg.npm/design/-/rewrite/:_authToken", "a-token")
- mapRegistry("simple", npm.config, function (er, uri, auth, registry) {
- t.ifError(er, "mapRegistryToURI worked")
- t.equal(uri, "http://reg.npm/design/-/rewrite/simple")
+ npm.config.set('scope', 'test')
+ npm.config.set('@test:registry', 'http://reg.npm/design/-/rewrite/')
+ npm.config.set('//reg.npm/design/-/rewrite/:_authToken', 'a-token')
+ mapRegistry('simple', npm.config, function (er, uri, auth, registry) {
+ t.ifError(er, 'mapRegistryToURI worked')
+ t.equal(uri, 'http://reg.npm/design/-/rewrite/simple')
t.deepEqual(auth, {
- scope : "//reg.npm/design/-/rewrite/",
- token : "a-token",
- username : undefined,
- password : undefined,
- email : undefined,
- auth : undefined,
- alwaysAuth : undefined
+ scope: '//reg.npm/design/-/rewrite/',
+ token: 'a-token',
+ username: undefined,
+ password: undefined,
+ email: undefined,
+ auth: undefined,
+ alwaysAuth: undefined
})
- t.equal(registry, "http://reg.npm/design/-/rewrite/")
+ t.equal(registry, 'http://reg.npm/design/-/rewrite/')
})
- npm.config.set("scope", "")
- npm.config.set("@test2:registry", "http://reg.npm/-/rewrite/")
- npm.config.set("//reg.npm/-/rewrite/:_authToken", "b-token")
- mapRegistry("@test2/easy", npm.config, function (er, uri, auth, registry) {
- t.ifError(er, "mapRegistryToURI worked")
- t.equal(uri, "http://reg.npm/-/rewrite/@test2%2feasy")
+ npm.config.set('scope', '')
+ npm.config.set('@test2:registry', 'http://reg.npm/-/rewrite/')
+ npm.config.set('//reg.npm/-/rewrite/:_authToken', 'b-token')
+ mapRegistry('@test2/easy', npm.config, function (er, uri, auth, registry) {
+ t.ifError(er, 'mapRegistryToURI worked')
+ t.equal(uri, 'http://reg.npm/-/rewrite/@test2%2feasy')
t.deepEqual(auth, {
- scope : "//reg.npm/-/rewrite/",
- token : "b-token",
- username : undefined,
- password : undefined,
- email : undefined,
- auth : undefined,
- alwaysAuth : undefined
+ scope: '//reg.npm/-/rewrite/',
+ token: 'b-token',
+ username: undefined,
+ password: undefined,
+ email: undefined,
+ auth: undefined,
+ alwaysAuth: undefined
})
- t.equal(registry, "http://reg.npm/-/rewrite/")
+ t.equal(registry, 'http://reg.npm/-/rewrite/')
})
- npm.config.set("scope", "test")
- npm.config.set("@test3:registry", "http://reg.npm/design/-/rewrite/relative")
- npm.config.set("//reg.npm/design/-/rewrite/:_authToken", "c-token")
- mapRegistry("@test3/basic", npm.config, function (er, uri, auth, registry) {
- t.ifError(er, "mapRegistryToURI worked")
- t.equal(uri, "http://reg.npm/design/-/rewrite/relative/@test3%2fbasic")
+ npm.config.set('scope', 'test')
+ npm.config.set('@test3:registry', 'http://reg.npm/design/-/rewrite/relative')
+ npm.config.set('//reg.npm/design/-/rewrite/:_authToken', 'c-token')
+ mapRegistry('@test3/basic', npm.config, function (er, uri, auth, registry) {
+ t.ifError(er, 'mapRegistryToURI worked')
+ t.equal(uri, 'http://reg.npm/design/-/rewrite/relative/@test3%2fbasic')
t.deepEqual(auth, {
- scope : "//reg.npm/design/-/rewrite/",
- token : "c-token",
- username : undefined,
- password : undefined,
- email : undefined,
- auth : undefined,
- alwaysAuth : undefined
+ scope: '//reg.npm/design/-/rewrite/',
+ token: 'c-token',
+ username: undefined,
+ password: undefined,
+ email: undefined,
+ auth: undefined,
+ alwaysAuth: undefined
})
- t.equal(registry, "http://reg.npm/design/-/rewrite/relative/")
+ t.equal(registry, 'http://reg.npm/design/-/rewrite/relative/')
})
})
diff --git a/deps/npm/test/tap/maybe-github.js b/deps/npm/test/tap/maybe-github.js
deleted file mode 100644
index 52a62e11bb..0000000000
--- a/deps/npm/test/tap/maybe-github.js
+++ /dev/null
@@ -1,72 +0,0 @@
-require("../common-tap.js")
-var test = require("tap").test
-var npm = require("../../lib/npm.js")
-
-// this is the narrowest way to replace a function in the module cache
-var found = true
-var remoteGitPath = require.resolve("../../lib/cache/add-remote-git.js")
-require("module")._cache[remoteGitPath] = {
- id: remoteGitPath,
- exports: function stub(_, __, cb) {
- if (found) {
- cb(null, {})
- }
- else {
- cb(new Error("not on filesystem"))
- }
- }
-}
-
-// only load maybeGithub now, so it gets the stub from cache
-var maybeGithub = require("../../lib/cache/maybe-github.js")
-
-test("should throw with no parameters", function (t) {
- t.plan(1)
-
- t.throws(function () {
- maybeGithub()
- }, "throws when called without parameters")
-})
-
-test("should throw with wrong parameter types", function (t) {
- t.plan(2)
-
- t.throws(function () {
- maybeGithub({}, function () {})
- }, "expects only a package name")
-
- t.throws(function () {
- maybeGithub("npm/xxx-noexist", "ham")
- }, "is always async")
-})
-
-test("should find an existing package on Github", function (t) {
- found = true
- npm.load({}, function (error) {
- t.notOk(error, "bootstrapping succeeds")
- t.doesNotThrow(function () {
- maybeGithub("npm/npm", function (error, data) {
- t.notOk(error, "no issues in looking things up")
- t.ok(data, "received metadata from Github")
- t.end()
- })
- })
- })
-})
-
-test("shouldn't find a nonexistent package on Github", function (t) {
- found = false
- npm.load({}, function () {
- t.doesNotThrow(function () {
- maybeGithub("npm/xxx-noexist", function (error, data) {
- t.equal(
- error.message,
- "not on filesystem",
- "passed through original error message"
- )
- t.notOk(data, "didn't pass any metadata")
- t.end()
- })
- })
- })
-})
diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision.js b/deps/npm/test/tap/optional-metadep-rollback-collision.js
index f8645840bd..929c4fc0fc 100644
--- a/deps/npm/test/tap/optional-metadep-rollback-collision.js
+++ b/deps/npm/test/tap/optional-metadep-rollback-collision.js
@@ -1,56 +1,237 @@
-var test = require("tap").test
-var rimraf = require("rimraf")
-var common = require("../common-tap.js")
-var path = require("path")
-var fs = require("fs")
-
-var pkg = path.resolve(__dirname, "optional-metadep-rollback-collision")
-var nm = path.resolve(pkg, "node_modules")
-var cache = path.resolve(pkg, "cache")
-var pidfile = path.resolve(pkg, "child.pid")
-
-test("setup", function (t) {
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'optional-metadep-rollback-collision')
+var deps = path.resolve(pkg, 'deps')
+var nm = path.resolve(pkg, 'node_modules')
+var cache = path.resolve(pkg, 'cache')
+var pidfile = path.resolve(pkg, 'child.pid')
+
+var json = {
+ name: 'optional-metadep-rollback-collision',
+ version: '1.0.0',
+ description: 'let\'s just see about that race condition',
+ optionalDependencies: {
+ opdep: 'file:./deps/opdep'
+ }
+}
+
+var d1 = {
+ name: 'd1',
+ version: '1.0.0',
+ description: 'I FAIL CONSTANTLY',
+ scripts: {
+ preinstall: 'sleep 1'
+ },
+ dependencies: {
+ foo: 'http://localhost:8080/'
+ }
+}
+
+var d2 = {
+ name: 'd2',
+ version: '1.0.0',
+ description: 'how do you *really* know you exist?',
+ scripts: {
+ postinstall: 'node blart.js'
+ },
+ dependencies: {
+ 'graceful-fs': '^3.0.2',
+ mkdirp: '^0.5.0',
+ rimraf: '^2.2.8'
+ }
+}
+
+var opdep = {
+ name: 'opdep',
+ version: '1.0.0',
+ description: 'To explode, of course!',
+ main: 'index.js',
+ scripts: {
+ preinstall: 'node bad-server.js'
+ },
+ dependencies: {
+ d1: 'file:../d1',
+ d2: 'file:../d2'
+ }
+}
+
+test('setup', function (t) {
cleanup()
+
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
+ mkdirp.sync(path.join(deps, 'd1'))
+ fs.writeFileSync(
+ path.join(deps, 'd1', 'package.json'),
+ JSON.stringify(d1, null, 2)
+ )
+
+ mkdirp.sync(path.join(deps, 'd2'))
+ fs.writeFileSync(
+ path.join(deps, 'd2', 'package.json'),
+ JSON.stringify(d2, null, 2)
+ )
+ fs.writeFileSync(path.join(deps, 'd2', 'blart.js'), blart)
+
+ mkdirp.sync(path.join(deps, 'opdep'))
+ fs.writeFileSync(
+ path.join(deps, 'opdep', 'package.json'),
+ JSON.stringify(opdep, null, 2)
+ )
+ fs.writeFileSync(path.join(deps, 'opdep', 'bad-server.js'), badServer)
+
t.end()
})
-test("go go test racer", function (t) {
- common.npm(["install", "--prefix=" + pkg, "--fetch-retries=0", "--cache=" + cache], {
- cwd: pkg,
- env: {
- PATH: process.env.PATH,
- Path: process.env.Path,
- "npm_config_loglevel": "silent"
+test('go go test racer', function (t) {
+ common.npm(
+ [
+ '--prefix', pkg,
+ '--fetch-retries', '0',
+ '--loglevel', 'silent',
+ '--cache', cache,
+ 'install'
+ ],
+ {
+ cwd: pkg,
+ env: {
+ PATH: process.env.PATH,
+ Path: process.env.Path
+ },
+ stdio: [0, 'pipe', 2]
},
- stdio: [ 0, "pipe", 2 ]
- }, function (er, code, sout) {
- if (er) throw er
- t.notOk(code, "npm install exited with code 0")
- t.equal(sout, "ok\nok\n")
- t.notOk(/not ok/.test(sout), "should not contain the string 'not ok'")
- t.end()
- })
+ function (er, code, stdout, stderr) {
+ t.ifError(er, 'install ran to completion without error')
+ t.notOk(code, 'npm install exited with code 0')
+
+ t.equal(stdout, 'ok\nok\n')
+ t.notOk(/not ok/.test(stdout), 'should not contain the string \'not ok\'')
+ t.end()
+ }
+ )
})
-test("verify results", function (t) {
+test('verify results', function (t) {
t.throws(function () {
fs.statSync(nm)
})
t.end()
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
function cleanup () {
+ process.chdir(osenv.tmpdir())
try {
var pid = +fs.readFileSync(pidfile)
- process.kill(pid, "SIGKILL")
+ process.kill(pid, 'SIGKILL')
} catch (er) {}
- rimraf.sync(cache)
- rimraf.sync(nm)
- rimraf.sync(pidfile)
+ rimraf.sync(pkg)
}
+
+var badServer = function () {/*
+var createServer = require('http').createServer
+var spawn = require('child_process').spawn
+var fs = require('fs')
+var path = require('path')
+var pidfile = path.resolve(__dirname, '..', '..', 'child.pid')
+
+if (process.argv[2]) {
+ console.log('ok')
+ createServer(function (req, res) {
+ setTimeout(function () {
+ res.writeHead(404)
+ res.end()
+ }, 1000)
+ this.close()
+ }).listen(8080)
+} else {
+ var child = spawn(
+ process.execPath,
+ [__filename, 'whatever'],
+ {
+ stdio: [0, 1, 2],
+ detached: true
+ }
+ )
+ child.unref()
+
+ // kill any prior children, if existing.
+ try {
+ var pid = +fs.readFileSync(pidfile)
+ process.kill(pid, 'SIGKILL')
+ } catch (er) {}
+
+ fs.writeFileSync(pidfile, child.pid + '\n')
+}
+*/}.toString().split('\n').slice(1, -1).join('\n')
+
+var blart = function () {/*
+var rando = require('crypto').randomBytes
+var resolve = require('path').resolve
+
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var writeFile = require('graceful-fs').writeFile
+
+var BASEDIR = resolve(__dirname, 'arena')
+
+var keepItGoingLouder = {}
+var writers = 0
+var errors = 0
+
+function gensym () { return rando(16).toString('hex') }
+
+function writeAlmostForever (filename) {
+ if (!keepItGoingLouder[filename]) {
+ writers--
+ if (writers < 1) return done()
+ } else {
+ writeFile(filename, keepItGoingLouder[filename], function (err) {
+ if (err) errors++
+
+ writeAlmostForever(filename)
+ })
+ }
+}
+
+function done () {
+ rimraf(BASEDIR, function () {
+ if (errors > 0) console.log('not ok - %d errors', errors)
+ else console.log('ok')
+ })
+}
+
+mkdirp(BASEDIR, function go () {
+ for (var i = 0; i < 16; i++) {
+ var filename = resolve(BASEDIR, gensym() + '.txt')
+
+ keepItGoingLouder[filename] = ''
+ for (var j = 0; j < 512; j++) keepItGoingLouder[filename] += filename
+
+ writers++
+ writeAlmostForever(filename)
+ }
+
+ setTimeout(function viktor () {
+ // kill all the writers
+ keepItGoingLouder = {}
+ }, 3 * 1000)
+})
+*/}.toString().split('\n').slice(1, -1).join('\n')
diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision/deps/d1/package.json b/deps/npm/test/tap/optional-metadep-rollback-collision/deps/d1/package.json
deleted file mode 100644
index 26cd1dea32..0000000000
--- a/deps/npm/test/tap/optional-metadep-rollback-collision/deps/d1/package.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "name": "d1",
- "version": "1.0.0",
- "description": "I FAIL CONSTANTLY",
- "scripts": {
- "preinstall": "sleep 1"
- },
- "dependencies": {
- "foo": "http://localhost:8080/"
- },
- "author": "Forrest L Norvell <ogd@aoaioxxysz.net>",
- "license": "ISC"
-}
diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision/deps/d2/blart.js b/deps/npm/test/tap/optional-metadep-rollback-collision/deps/d2/blart.js
deleted file mode 100644
index c69b8a5d08..0000000000
--- a/deps/npm/test/tap/optional-metadep-rollback-collision/deps/d2/blart.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var rando = require("crypto").randomBytes
-var resolve = require("path").resolve
-
-var mkdirp = require("mkdirp")
-var rimraf = require("rimraf")
-var writeFile = require("graceful-fs").writeFile
-
-var BASEDIR = resolve(__dirname, "arena")
-
-var keepItGoingLouder = {}
-var writers = 0
-var errors = 0
-
-function gensym() { return rando(16).toString("hex") }
-
-function writeAlmostForever(filename) {
- if (!keepItGoingLouder[filename]) {
- writers--
- if (writers < 1) return done()
- }
- else {
- writeFile(filename, keepItGoingLouder[filename], function (err) {
- if (err) errors++
-
- writeAlmostForever(filename)
- })
- }
-}
-
-function done() {
- rimraf(BASEDIR, function () {
- if (errors > 0) console.log("not ok - %d errors", errors)
- else console.log("ok")
- })
-}
-
-mkdirp(BASEDIR, function go() {
- for (var i = 0; i < 16; i++) {
- var filename = resolve(BASEDIR, gensym() + ".txt")
-
- keepItGoingLouder[filename] = ""
- for (var j = 0; j < 512; j++) keepItGoingLouder[filename] += filename
-
- writers++
- writeAlmostForever(filename)
- }
-
- setTimeout(function viktor() {
- // kill all the writers
- keepItGoingLouder = {}
- }, 3 * 1000)
-})
diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision/deps/d2/package.json b/deps/npm/test/tap/optional-metadep-rollback-collision/deps/d2/package.json
deleted file mode 100644
index 08eeba4f7e..0000000000
--- a/deps/npm/test/tap/optional-metadep-rollback-collision/deps/d2/package.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "d2",
- "version": "1.0.0",
- "description": "how do you *really* know you exist?",
- "scripts": {
- "postinstall": "node blart.js"
- },
- "dependencies": {
- "graceful-fs": "^3.0.2",
- "mkdirp": "^0.5.0",
- "rimraf": "^2.2.8"
- },
- "author": "Forrest L Norvell <ogd@aoaioxxysz.net>",
- "license": "ISC"
-}
diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision/deps/opdep/bad-server.js b/deps/npm/test/tap/optional-metadep-rollback-collision/deps/opdep/bad-server.js
deleted file mode 100644
index 4818884c49..0000000000
--- a/deps/npm/test/tap/optional-metadep-rollback-collision/deps/opdep/bad-server.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var createServer = require("http").createServer
-var spawn = require("child_process").spawn
-var fs = require("fs")
-var path = require("path")
-var pidfile = path.resolve(__dirname, "..", "..", "child.pid")
-
-if (process.argv[2]) {
- console.log("ok")
- createServer(function (req, res) {
- setTimeout(function () {
- res.writeHead(404)
- res.end()
- }, 1000)
- this.close()
- }).listen(8080)
-}
-else {
- var child = spawn(
- process.execPath,
- [__filename, "whatever"],
- {
- stdio: [0, 1, 2],
- detached: true
- }
- )
- child.unref()
-
- // kill any prior children, if existing.
- try {
- var pid = +fs.readFileSync(pidfile)
- process.kill(pid, "SIGKILL")
- } catch (er) {}
-
- fs.writeFileSync(pidfile, child.pid + "\n")
-}
diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision/deps/opdep/package.json b/deps/npm/test/tap/optional-metadep-rollback-collision/deps/opdep/package.json
deleted file mode 100644
index 3289c123e8..0000000000
--- a/deps/npm/test/tap/optional-metadep-rollback-collision/deps/opdep/package.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "opdep",
- "version": "1.0.0",
- "description": "To explode, of course!",
- "main": "index.js",
- "scripts": {
- "preinstall": "node bad-server.js"
- },
- "dependencies": {
- "d1": "file:../d1",
- "d2": "file:../d2"
- },
- "author": "Forrest L Norvell <ogd@aoaioxxysz.net>",
- "license": "ISC"
-}
diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision/package.json b/deps/npm/test/tap/optional-metadep-rollback-collision/package.json
deleted file mode 100644
index 0d812a6e00..0000000000
--- a/deps/npm/test/tap/optional-metadep-rollback-collision/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "optional-metadep-rollback-collision",
- "version": "1.0.0",
- "description": "let's just see about that race condition",
- "optionalDependencies": {
- "opdep": "file:./deps/opdep"
- },
- "author": "Forrest L Norvell <ogd@aoaioxxysz.net>",
- "license": "ISC"
-}
diff --git a/deps/npm/test/tap/outdated-color.js b/deps/npm/test/tap/outdated-color.js
index 1a04980a3a..b35070c450 100644
--- a/deps/npm/test/tap/outdated-color.js
+++ b/deps/npm/test/tap/outdated-color.js
@@ -1,44 +1,63 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var mkdirp = require("mkdirp")
-var rimraf = require("rimraf")
-var mr = require("npm-registry-mock")
-var path = require("path")
-
-var pkg = path.resolve(__dirname, "outdated")
-var cache = path.resolve(pkg, "cache")
-mkdirp.sync(cache)
-
-var EXEC_OPTS = {
- cwd: pkg
-}
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'outdated-color')
-function hasControlCodes(str) {
+var EXEC_OPTS = { cwd: pkg }
+
+function hasControlCodes (str) {
return str.length !== ansiTrim(str).length
}
function ansiTrim (str) {
- var r = new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|" +
- "\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)", "g")
- return str.replace(r, "")
+ var r = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' +
+ '\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g')
+ return str.replace(r, '')
+}
+
+var json = {
+ name: 'outdated-color',
+ description: 'fixture',
+ version: '0.0.1',
+ dependencies: {
+ underscore: '1.3.1'
+ }
}
+test('setup', function (t) {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
+ process.chdir(pkg)
+ t.end()
+})
+
// note hard to automate tests for color = true
// as npm kills the color config when it detects
-// it"s not running in a tty
-test("does not use ansi styling", function (t) {
+// it's not running in a tty
+test('does not use ansi styling', function (t) {
t.plan(4)
- mr({port : common.port}, function (er, s) { // create mock registry.
+ mr({ port: common.port }, function (er, s) { // create mock registry.
common.npm(
[
- "outdated",
- "--registry", common.registry,
- "underscore"
+ '--registry', common.registry,
+ 'outdated', 'underscore'
],
EXEC_OPTS,
function (err, code, stdout) {
t.ifError(err)
- t.notOk(code, "npm outdated exited with code 0")
+ t.notOk(code, 'npm outdated exited with code 0')
t.ok(stdout, stdout.length)
t.ok(!hasControlCodes(stdout))
s.close()
@@ -46,7 +65,11 @@ test("does not use ansi styling", function (t) {
})
})
-test("cleanup", function (t) {
- rimraf.sync(cache)
+test('cleanup', function (t) {
+ cleanup()
t.end()
})
+
+function cleanup () {
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/outdated-depth.js b/deps/npm/test/tap/outdated-depth.js
index 4e1aca0e7d..2f06127917 100644
--- a/deps/npm/test/tap/outdated-depth.js
+++ b/deps/npm/test/tap/outdated-depth.js
@@ -1,38 +1,56 @@
-var common = require("../common-tap")
- , path = require("path")
- , test = require("tap").test
- , rimraf = require("rimraf")
- , npm = require("../../")
- , mr = require("npm-registry-mock")
- , pkg = path.resolve(__dirname, "outdated-depth")
- , cache = path.resolve(pkg, "cache")
- , nodeModules = path.resolve(pkg, "node_modules")
+var fs = require('graceful-fs')
+var path = require('path')
-function cleanup () {
- rimraf.sync(nodeModules)
- rimraf.sync(cache)
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var npm = require('../../')
+var common = require('../common-tap')
+
+var pkg = path.resolve(__dirname, 'outdated-depth')
+
+var json = {
+ name: 'outdated-depth',
+ version: '1.2.3',
+ dependencies: {
+ underscore: '1.3.1',
+ 'npm-test-peer-deps': '0.0.0'
+ }
}
-test("outdated depth zero", function (t) {
+test('setup', function (t) {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ process.chdir(pkg)
+
+ t.end()
+})
+
+test('outdated depth zero', function (t) {
var expected = [
pkg,
- "underscore",
- "1.3.1",
- "1.3.1",
- "1.5.1",
- "1.3.1"
+ 'underscore',
+ '1.3.1',
+ '1.3.1',
+ '1.5.1',
+ '1.3.1'
]
- process.chdir(pkg)
-
- mr({port : common.port}, function (er, s) {
- npm.load({
- cache: cache
- , loglevel: "silent"
- , registry: common.registry
- }
- , function () {
- npm.install(".", function (er) {
+ mr({ port: common.port }, function (er, s) {
+ npm.load(
+ {
+ loglevel: 'silent',
+ registry: common.registry
+ },
+ function () {
+ npm.install('.', function (er) {
if (er) throw new Error(er)
npm.outdated(function (err, d) {
if (err) throw new Error(err)
@@ -46,7 +64,12 @@ test("outdated depth zero", function (t) {
})
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/outdated-depth/README.md b/deps/npm/test/tap/outdated-depth/README.md
deleted file mode 100644
index aca67ff17d..0000000000
--- a/deps/npm/test/tap/outdated-depth/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# just a test
diff --git a/deps/npm/test/tap/outdated-depth/index.js b/deps/npm/test/tap/outdated-depth/index.js
deleted file mode 100644
index 33c1891f81..0000000000
--- a/deps/npm/test/tap/outdated-depth/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = true
diff --git a/deps/npm/test/tap/outdated-depth/package.json b/deps/npm/test/tap/outdated-depth/package.json
deleted file mode 100644
index aed35fe031..0000000000
--- a/deps/npm/test/tap/outdated-depth/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "whatever",
- "description": "yeah idk",
- "version": "1.2.3",
- "main": "index.js",
- "dependencies": {
- "underscore": "1.3.1",
- "npm-test-peer-deps": "0.0.0"
- },
- "repository": "git://github.com/luk-/whatever"
-}
diff --git a/deps/npm/test/tap/outdated-git.js b/deps/npm/test/tap/outdated-git.js
index 32bfead672..0ef243bee3 100644
--- a/deps/npm/test/tap/outdated-git.js
+++ b/deps/npm/test/tap/outdated-git.js
@@ -11,6 +11,18 @@ var npm = require('../../')
// config
var pkg = path.resolve(__dirname, 'outdated-git')
var cache = path.resolve(pkg, 'cache')
+var json = {
+ name: 'outdated-git',
+ author: 'Rocko Artischocko',
+ description: 'fixture',
+ version: '0.0.1',
+ main: 'index.js',
+ dependencies: {
+ 'foo-private': 'git://github.com/robertkowalski/foo-private.git',
+ 'foo-private-credentials': 'git://user:pass@github.com/robertkowalski/foo-private.git',
+ 'foo-github': 'robertkowalski/foo'
+ }
+}
test('setup', function (t) {
setup()
@@ -22,11 +34,11 @@ test('discovers new versions in outdated', function (t) {
t.plan(5)
npm.load({cache: cache, registry: common.registry, loglevel: 'silent'}, function () {
npm.commands.outdated([], function (er, d) {
- t.equal('git', d[0][3])
- t.equal('git', d[0][4])
- t.equal('git://github.com/robertkowalski/foo-private.git', d[0][5])
- t.equal('git://user:pass@github.com/robertkowalski/foo-private.git', d[1][5])
- t.equal('git+https://github.com/robertkowalski/foo', d[2][5])
+ t.equal(d[0][3], 'git')
+ t.equal(d[0][4], 'git')
+ t.equal(d[0][5], 'git://github.com/robertkowalski/foo-private.git')
+ t.equal(d[1][5], 'git://user:pass@github.com/robertkowalski/foo-private.git')
+ t.equal(d[2][5], 'github:robertkowalski/foo')
})
})
})
@@ -36,19 +48,6 @@ test('cleanup', function (t) {
t.end()
})
-var json = {
- name: 'outdated-git',
- author: 'Rocko Artischocko',
- description: 'fixture',
- version: '0.0.1',
- main: 'index.js',
- dependencies: {
- 'foo-private': 'git://github.com/robertkowalski/foo-private.git',
- 'foo-private-credentials': 'git://user:pass@github.com/robertkowalski/foo-private.git',
- 'foo-github': 'robertkowalski/foo'
- }
-}
-
function setup () {
mkdirp.sync(cache)
fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify(json, null, 2), 'utf8')
diff --git a/deps/npm/test/tap/outdated-include-devdependencies.js b/deps/npm/test/tap/outdated-include-devdependencies.js
index 9425d5b8a0..7ab0088430 100644
--- a/deps/npm/test/tap/outdated-include-devdependencies.js
+++ b/deps/npm/test/tap/outdated-include-devdependencies.js
@@ -1,22 +1,43 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var npm = require("../../")
-var mkdirp = require("mkdirp")
-var rimraf = require("rimraf")
-var mr = require("npm-registry-mock")
-var path = require("path")
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var npm = require('../../')
+var common = require('../common-tap.js')
// config
-var pkg = path.resolve(__dirname, "outdated-include-devdependencies")
-var cache = path.resolve(pkg, "cache")
-mkdirp.sync(cache)
+var pkg = path.resolve(__dirname, 'outdated-include-devdependencies')
+var cache = path.resolve(pkg, 'cache')
-test("includes devDependencies in outdated", function (t) {
+var json = {
+ author: 'Rocko Artischocko',
+ name: 'ignore-shrinkwrap',
+ version: '0.0.0',
+ devDependencies: {
+ underscore: '>=1.3.1'
+ }
+}
+
+test('setup', function (t) {
+ cleanup()
+ mkdirp.sync(cache)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ t.end()
+})
+
+test('includes devDependencies in outdated', function (t) {
process.chdir(pkg)
- mr({port : common.port}, function (er, s) {
- npm.load({cache: cache, registry: common.registry}, function () {
+ mr({ port: common.port }, function (er, s) {
+ npm.load({ cache: cache, registry: common.registry }, function () {
npm.outdated(function (er, d) {
- t.equal("1.5.1", d[0][3])
+ t.equal('1.5.1', d[0][3])
s.close()
t.end()
})
@@ -24,7 +45,11 @@ test("includes devDependencies in outdated", function (t) {
})
})
-test("cleanup", function (t) {
- rimraf.sync(cache)
+test('cleanup', function (t) {
+ cleanup()
t.end()
})
+
+function cleanup () {
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/outdated-include-devdependencies/package.json b/deps/npm/test/tap/outdated-include-devdependencies/package.json
deleted file mode 100644
index 70998419bb..0000000000
--- a/deps/npm/test/tap/outdated-include-devdependencies/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "author": "Rocko Artischocko",
- "name": "ignore-shrinkwrap",
- "version": "0.0.0",
- "devDependencies": {
- "underscore": ">=1.3.1"
- }
-} \ No newline at end of file
diff --git a/deps/npm/test/tap/outdated-json.js b/deps/npm/test/tap/outdated-json.js
index e02675afeb..2dd6867e32 100644
--- a/deps/npm/test/tap/outdated-json.js
+++ b/deps/npm/test/tap/outdated-json.js
@@ -1,67 +1,99 @@
-var common = require("../common-tap.js")
- , test = require("tap").test
- , rimraf = require("rimraf")
- , npm = require("../../")
- , mr = require("npm-registry-mock")
- , path = require("path")
- , osenv = require("osenv")
- , spawn = require("child_process").spawn
- , node = process.execPath
- , npmc = require.resolve("../../")
- , pkg = path.resolve(__dirname, "outdated-new-versions")
- , args = [ npmc
- , "outdated"
- , "--json"
- , "--silent"
- , "--registry=" + common.registry
- , "--cache=" + pkg + "/cache"
- ]
+var fs = require('graceful-fs')
+var path = require('path')
-var expected = { underscore:
- { current: "1.3.3"
- , wanted: "1.3.3"
- , latest: "1.5.1"
- , location: "node_modules" + path.sep + "underscore"
- }
- , request:
- { current: "0.9.5"
- , wanted: "0.9.5"
- , latest: "2.27.0"
- , location: "node_modules" + path.sep + "request"
- }
- }
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
-test("it should log json data", function (t) {
+var common = require('../common-tap.js')
+var server
+
+var pkg = path.resolve(__dirname, 'outdated-json')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'outdated-json',
+ author: 'Rockbert',
+ version: '0.0.0',
+ dependencies: {
+ underscore: '~1.3.1'
+ },
+ devDependencies: {
+ request: '~0.9.0'
+ }
+}
+
+var expected = {
+ underscore: {
+ current: '1.3.3',
+ wanted: '1.3.3',
+ latest: '1.5.1',
+ location: 'node_modules' + path.sep + 'underscore'
+ },
+ request: {
+ current: '0.9.5',
+ wanted: '0.9.5',
+ latest: '2.27.0',
+ location: 'node_modules' + path.sep + 'request'
+ }
+}
+
+test('setup', function (t) {
cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
process.chdir(pkg)
+ mr({ port: common.port }, function (er, s) {
+ t.ifError(er, 'mock registry should never fail to start')
+ server = s
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--silent',
+ 'install'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm install ran without issue')
+ t.notOk(code, 'npm install ran without raising error code')
- mr({port : common.port}, function (er, s) {
- npm.load({
- cache: pkg + "/cache",
- loglevel: "silent",
- registry: common.registry }
- , function () {
- npm.install(".", function (err) {
- t.ifError(err, "error should not exist")
- var child = spawn(node, args)
- , out = ""
- child.stdout
- .on("data", function (buf) {
- out += buf.toString()
- })
- .pipe(process.stdout)
- child.on("exit", function () {
- out = JSON.parse(out)
- t.deepEqual(out, expected)
- s.close()
- t.end()
- })
- })
- })
+ t.end()
+ }
+ )
})
})
-test("cleanup", function (t) {
+test('it should log json data', function (t) {
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--silent',
+ '--json',
+ 'outdated'
+ ],
+ EXEC_OPTS,
+ function (err, code, stdout) {
+ t.ifError(err, 'npm outdated ran without issue')
+ t.notOk(code, 'npm outdated ran without raising error code')
+ var out
+ t.doesNotThrow(function () {
+ out = JSON.parse(stdout)
+ }, 'output correctly parsed as JSON')
+ t.deepEqual(out, expected)
+
+ t.end()
+ }
+ )
+})
+
+test('cleanup', function (t) {
+ server.close()
cleanup()
t.end()
})
@@ -69,6 +101,5 @@ test("cleanup", function (t) {
function cleanup () {
// windows fix for locked files
process.chdir(osenv.tmpdir())
- rimraf.sync(pkg + "/node_modules")
- rimraf.sync(pkg + "/cache")
+ rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/outdated-long.js b/deps/npm/test/tap/outdated-long.js
index db011ab655..87e1f23b21 100644
--- a/deps/npm/test/tap/outdated-long.js
+++ b/deps/npm/test/tap/outdated-long.js
@@ -1,70 +1,101 @@
-var path = require("path")
+var fs = require('graceful-fs')
+var path = require('path')
-var mr = require("npm-registry-mock")
-var rimraf = require("rimraf")
-var test = require("tap").test
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var rimraf = require('rimraf')
+var test = require('tap').test
-var common = require("../common-tap.js")
-var npm = require("../../")
+var common = require('../common-tap.js')
+var npm = require('../../')
// config
-var pkg = path.resolve(__dirname, "outdated")
-var cache = path.resolve(pkg, "cache")
-var nodeModules = path.resolve(pkg, "node_modules")
+var pkg = path.resolve(__dirname, 'outdated-long')
+var cache = path.resolve(pkg, 'cache')
-test("it should not throw", function (t) {
+var json = {
+ name: 'outdated-long',
+ description: 'fixture',
+ version: '0.0.1',
+ dependencies: {
+ underscore: '1.3.1'
+ }
+}
+
+test('setup', function (t) {
cleanup()
+ mkdirp.sync(cache)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
process.chdir(pkg)
+ t.end()
+})
+test('it should not throw', function (t) {
var originalLog = console.log
+
var output = []
- var expOut = [ path.resolve(__dirname, "outdated/node_modules/underscore"),
- path.resolve(__dirname, "outdated/node_modules/underscore")
- + ":underscore@1.3.1"
- + ":underscore@1.3.1"
- + ":underscore@1.5.1"
- + ":dependencies" ]
- var expData = [ [ path.resolve(__dirname, "outdated"),
- "underscore",
- "1.3.1",
- "1.3.1",
- "1.5.1",
- "1.3.1",
- "dependencies" ] ]
+ var expOut = [
+ path.resolve(pkg, 'node_modules', 'underscore'),
+ path.resolve(pkg, 'node_modules', 'underscore') +
+ ':underscore@1.3.1' +
+ ':underscore@1.3.1' +
+ ':underscore@1.5.1' +
+ ':dependencies'
+ ]
+
+ var expData = [
+ [
+ pkg,
+ 'underscore',
+ '1.3.1',
+ '1.3.1',
+ '1.5.1',
+ '1.3.1',
+ 'dependencies'
+ ]
+ ]
console.log = function () {
output.push.apply(output, arguments)
}
- mr({port : common.port}, function (er, s) {
- npm.load({
- cache : "cache",
- loglevel : "silent",
- parseable : true,
- registry : common.registry
- },
- function () {
- npm.install(".", function (err) {
- t.ifError(err, "install success")
- npm.config.set("long", true)
- npm.outdated(function (er, d) {
- t.ifError(er, "outdated success")
- console.log = originalLog
- t.same(output, expOut)
- t.same(d, expData)
- s.close()
- t.end()
+ mr({ port: common.port }, function (er, s) {
+ npm.load(
+ {
+ cache: 'cache',
+ loglevel: 'silent',
+ parseable: true,
+ registry: common.registry
+ },
+ function () {
+ npm.install('.', function (err) {
+ t.ifError(err, 'install success')
+ npm.config.set('long', true)
+ npm.outdated(function (er, d) {
+ t.ifError(er, 'outdated success')
+
+ console.log = originalLog
+
+ t.same(output, expOut)
+ t.same(d, expData)
+
+ s.close()
+ t.end()
+ })
})
- })
- })
+ }
+ )
})
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
function cleanup () {
- rimraf.sync(nodeModules)
- rimraf.sync(cache)
+ rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/outdated-new-versions.js b/deps/npm/test/tap/outdated-new-versions.js
index 0608824dcb..c6fbd426dc 100644
--- a/deps/npm/test/tap/outdated-new-versions.js
+++ b/deps/npm/test/tap/outdated-new-versions.js
@@ -1,29 +1,49 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var npm = require("../../")
-var mkdirp = require("mkdirp")
-var rimraf = require("rimraf")
-var path = require("path")
+var fs = require('graceful-fs')
+var path = require('path')
-var mr = require("npm-registry-mock")
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var rimraf = require('rimraf')
+var test = require('tap').test
-var pkg = path.resolve(__dirname, "outdated-new-versions")
-var cache = path.resolve(pkg, "cache")
-mkdirp.sync(cache)
+var common = require('../common-tap.js')
+var npm = require('../../')
+var pkg = path.resolve(__dirname, 'outdated-new-versions')
+var cache = path.resolve(pkg, 'cache')
-test("dicovers new versions in outdated", function (t) {
+var json = {
+ name: 'new-versions-with-outdated',
+ author: 'Rockbert',
+ version: '0.0.0',
+ dependencies: {
+ underscore: '~1.3.1'
+ },
+ devDependencies: {
+ request: '~0.9.0'
+ }
+}
+
+test('setup', function (t) {
+ cleanup()
+ mkdirp.sync(cache)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ t.end()
+})
+
+test('dicovers new versions in outdated', function (t) {
process.chdir(pkg)
t.plan(2)
- mr({port : common.port}, function (er, s) {
- npm.load({cache: cache, registry: common.registry}, function () {
+ mr({ port: common.port }, function (er, s) {
+ npm.load({ cache: cache, registry: common.registry }, function () {
npm.outdated(function (er, d) {
for (var i = 0; i < d.length; i++) {
- if (d[i][1] === "underscore")
- t.equal("1.5.1", d[i][4])
- if (d[i][1] === "request")
- t.equal("2.27.0", d[i][4])
+ if (d[i][1] === 'underscore') t.equal('1.5.1', d[i][4])
+ if (d[i][1] === 'request') t.equal('2.27.0', d[i][4])
}
s.close()
t.end()
@@ -32,7 +52,11 @@ test("dicovers new versions in outdated", function (t) {
})
})
-test("cleanup", function (t) {
- rimraf.sync(cache)
+test('cleanup', function (t) {
+ cleanup()
t.end()
})
+
+function cleanup () {
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/outdated-new-versions/package.json b/deps/npm/test/tap/outdated-new-versions/package.json
deleted file mode 100644
index 2bfcdc5ab9..0000000000
--- a/deps/npm/test/tap/outdated-new-versions/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "new-versions-with-outdated",
- "author": "Rockbert",
- "version": "0.0.0",
- "dependencies": {
- "underscore": "~1.3.1"
- },
- "devDependencies": {
- "request": "~0.9.0"
- }
-}
diff --git a/deps/npm/test/tap/outdated.js b/deps/npm/test/tap/outdated.js
index 8e7ebe5687..8bda330bdd 100644
--- a/deps/npm/test/tap/outdated.js
+++ b/deps/npm/test/tap/outdated.js
@@ -1,64 +1,98 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var rimraf = require("rimraf")
-var npm = require("../../")
-var path = require("path")
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var npm = require('../../')
+var common = require('../common-tap.js')
-var mr = require("npm-registry-mock")
// config
-var pkg = path.resolve(__dirname, "outdated")
-var cache = path.resolve(pkg, "cache")
-var nodeModules = path.resolve(pkg, "node_modules")
+var pkg = path.resolve(__dirname, 'outdated')
+var cache = path.resolve(pkg, 'cache')
-test("it should not throw", function (t) {
+var json = {
+ name: 'outdated',
+ description: 'fixture',
+ version: '0.0.1',
+ dependencies: {
+ underscore: '1.3.1'
+ }
+}
+
+test('setup', function (t) {
cleanup()
+ mkdirp.sync(cache)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
process.chdir(pkg)
+ t.end()
+})
+test('it should not throw', function (t) {
var originalLog = console.log
+
var output = []
- var expOut = [ path.resolve(__dirname, "outdated/node_modules/underscore")
- , path.resolve(__dirname, "outdated/node_modules/underscore")
- + ":underscore@1.3.1"
- + ":underscore@1.3.1"
- + ":underscore@1.5.1" ]
- var expData = [ [ path.resolve(__dirname, "outdated")
- , "underscore"
- , "1.3.1"
- , "1.3.1"
- , "1.5.1"
- , "1.3.1" ] ]
+ var expOut = [
+ path.resolve(pkg, 'node_modules', 'underscore'),
+ path.resolve(pkg, 'node_modules', 'underscore') +
+ ':underscore@1.3.1' +
+ ':underscore@1.3.1' +
+ ':underscore@1.5.1'
+ ]
+
+ var expData = [
+ [
+ pkg,
+ 'underscore',
+ '1.3.1',
+ '1.3.1',
+ '1.5.1',
+ '1.3.1'
+ ]
+ ]
console.log = function () {
output.push.apply(output, arguments)
}
- mr({port : common.port}, function (er, s) {
- npm.load({
- cache: "cache",
- loglevel: "silent",
- parseable: true,
- registry: common.registry }
- , function () {
- npm.install(".", function (err) {
- t.ifError(err, "install success")
- npm.outdated(function (er, d) {
- t.ifError(er, "outdated success")
- console.log = originalLog
- t.same(output, expOut)
- t.same(d, expData)
- s.close()
- t.end()
+ mr({ port: common.port }, function (er, s) {
+ npm.load(
+ {
+ cache: 'cache',
+ loglevel: 'silent',
+ parseable: true,
+ registry: common.registry
+ },
+ function () {
+ npm.install('.', function (err) {
+ t.ifError(err, 'install success')
+ npm.outdated(function (er, d) {
+ t.ifError(er, 'outdated success')
+
+ console.log = originalLog
+
+ t.same(output, expOut)
+ t.same(d, expData)
+
+ s.close()
+ t.end()
+ })
})
- })
- })
+ }
+ )
})
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
function cleanup () {
- rimraf.sync(nodeModules)
- rimraf.sync(cache)
+ rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/outdated/README.md b/deps/npm/test/tap/outdated/README.md
deleted file mode 100644
index aca67ff17d..0000000000
--- a/deps/npm/test/tap/outdated/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# just a test
diff --git a/deps/npm/test/tap/outdated/index.js b/deps/npm/test/tap/outdated/index.js
deleted file mode 100644
index 33c1891f81..0000000000
--- a/deps/npm/test/tap/outdated/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = true
diff --git a/deps/npm/test/tap/outdated/package.json b/deps/npm/test/tap/outdated/package.json
deleted file mode 100644
index 821a94b883..0000000000
--- a/deps/npm/test/tap/outdated/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "bla",
- "description": "fixture",
- "version": "0.0.1",
- "main": "index.js",
- "dependencies": {
- "underscore": "1.3.1"
- },
- "repository": "git://github.com/robertkowalski/bogusfixture"
-}
diff --git a/deps/npm/test/tap/package-with-peer-dep/package.json b/deps/npm/test/tap/package-with-peer-dep/package.json
deleted file mode 100644
index 99cc75bb85..0000000000
--- a/deps/npm/test/tap/package-with-peer-dep/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "name": "package-with-peer-dep",
- "version": "0.0.0",
- "peerDependencies": {
- "opener": "*"
- }
-}
diff --git a/deps/npm/test/tap/peer-deps-invalid.js b/deps/npm/test/tap/peer-deps-invalid.js
index eb2ce8bb6f..7d630f8662 100644
--- a/deps/npm/test/tap/peer-deps-invalid.js
+++ b/deps/npm/test/tap/peer-deps-invalid.js
@@ -1,45 +1,102 @@
-var common = require("../common-tap")
-var path = require("path")
-var test = require("tap").test
-var rimraf = require("rimraf")
-var npm = require("../../")
-var mr = require("npm-registry-mock")
-var pkg = path.resolve(__dirname, "peer-deps-invalid")
-var cache = path.resolve(pkg, "cache")
-var nodeModules = path.resolve(pkg, "node_modules")
-
-test("installing dependencies that have conflicting peerDependencies", function (t) {
- rimraf.sync(nodeModules)
- rimraf.sync(cache)
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var npm = require('../../')
+var common = require('../common-tap')
+
+var pkg = path.resolve(__dirname, 'peer-deps-invalid')
+var cache = path.resolve(pkg, 'cache')
+
+var json = {
+ author: 'Domenic Denicola <domenic@domenicdenicola.com> (http://domenicdenicola.com/)',
+ name: 'peer-deps-invalid',
+ version: '0.0.0',
+ dependencies: {
+ 'npm-test-peer-deps-file': 'http://localhost:1337/ok.js',
+ 'npm-test-peer-deps-file-invalid': 'http://localhost:1337/invalid.js'
+ }
+}
+
+test('setup', function (t) {
+ cleanup()
+ mkdirp.sync(cache)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ fs.writeFileSync(path.join(pkg, 'file-ok.js'), fileOK)
+ fs.writeFileSync(path.join(pkg, 'file-fail.js'), fileFail)
+
process.chdir(pkg)
+ t.end()
+})
+test('installing dependencies that have conflicting peerDependencies', function (t) {
var customMocks = {
- "get": {
- "/ok.js": [200, path.join(pkg, "file-ok.js")],
- "/invalid.js": [200, path.join(pkg, "file-fail.js")]
+ 'get': {
+ '/ok.js': [200, path.join(pkg, 'file-ok.js')],
+ '/invalid.js': [200, path.join(pkg, 'file-fail.js')]
}
}
- mr({port: common.port, mocks: customMocks}, function (err, s) { // create mock registry.
- t.ifError(err, "mock registry started")
- npm.load({
- cache: cache,
- registry: common.registry
- }, function () {
- npm.commands.install([], function (err) {
- if (!err) {
- t.fail("No error!")
- } else {
- t.equal(err.code, "EPEERINVALID")
- }
- t.end()
- s.close() // shutdown mock registry.
- })
- })
+ mr({port: common.port, mocks: customMocks}, function (err, s) {
+ t.ifError(err, 'mock registry started')
+ npm.load(
+ {
+ cache: cache,
+ registry: common.registry
+ },
+ function () {
+ npm.commands.install([], function (err) {
+ if (!err) {
+ t.fail('No error!')
+ } else {
+ t.equal(err.code, 'EPEERINVALID')
+ }
+ s.close()
+ t.end()
+ })
+ }
+ )
})
})
-test("cleanup", function (t) {
- rimraf.sync(nodeModules)
- rimraf.sync(cache)
+test('cleanup', function (t) {
+ cleanup()
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
+
+var fileFail = function () {
+/**package
+* { "name": "npm-test-peer-deps-file-invalid"
+* , "main": "index.js"
+* , "version": "1.2.3"
+* , "description":"This one should conflict with the other one"
+* , "peerDependencies": { "underscore": "1.3.3" }
+* }
+**/
+ module.exports = 'I\'m just a lonely index, naked as the day I was born.'
+}.toString().split('\n').slice(1, -1).join('\n')
+
+var fileOK = function () {
+/**package
+* { "name": "npm-test-peer-deps-file"
+* , "main": "index.js"
+* , "version": "1.2.3"
+* , "description":"No package.json in sight!"
+* , "peerDependencies": { "underscore": "1.3.1" }
+* , "dependencies": { "mkdirp": "0.3.5" }
+* }
+**/
+ module.exports = 'I\'m just a lonely index, naked as the day I was born.'
+}.toString().split('\n').slice(1, -1).join('\n')
diff --git a/deps/npm/test/tap/peer-deps-invalid/file-fail.js b/deps/npm/test/tap/peer-deps-invalid/file-fail.js
deleted file mode 100644
index 5a78d0f84c..0000000000
--- a/deps/npm/test/tap/peer-deps-invalid/file-fail.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/**package
-* { "name": "npm-test-peer-deps-file-invalid"
-* , "main": "index.js"
-* , "version": "1.2.3"
-* , "description":"This one should conflict with the other one"
-* , "peerDependencies": { "underscore": "1.3.3" }
-* }
-**/
-
-module.exports = "I\'m just a lonely index, naked as the day I was born."
diff --git a/deps/npm/test/tap/peer-deps-invalid/file-ok.js b/deps/npm/test/tap/peer-deps-invalid/file-ok.js
deleted file mode 100644
index 957e20e416..0000000000
--- a/deps/npm/test/tap/peer-deps-invalid/file-ok.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**package
-* { "name": "npm-test-peer-deps-file"
-* , "main": "index.js"
-* , "version": "1.2.3"
-* , "description":"No package.json in sight!"
-* , "peerDependencies": { "underscore": "1.3.1" }
-* , "dependencies": { "mkdirp": "0.3.5" }
-* }
-**/
-
-module.exports = "I\'m just a lonely index, naked as the day I was born."
diff --git a/deps/npm/test/tap/peer-deps-invalid/package.json b/deps/npm/test/tap/peer-deps-invalid/package.json
deleted file mode 100644
index c5fa7cb032..0000000000
--- a/deps/npm/test/tap/peer-deps-invalid/package.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "author": "Domenic Denicola <domenic@domenicdenicola.com> (http://domenicdenicola.com/)",
- "name": "peer-deps-invalid",
- "version": "0.0.0",
- "dependencies": {
- "npm-test-peer-deps-file": "http://localhost:1337/ok.js",
- "npm-test-peer-deps-file-invalid": "http://localhost:1337/invalid.js"
- }
-}
diff --git a/deps/npm/test/tap/peer-deps-toplevel.js b/deps/npm/test/tap/peer-deps-toplevel.js
index 1cb71bc19b..5b5e29b06e 100644
--- a/deps/npm/test/tap/peer-deps-toplevel.js
+++ b/deps/npm/test/tap/peer-deps-toplevel.js
@@ -1,55 +1,97 @@
-var npm = npm = require("../../")
-var test = require("tap").test
-var path = require("path")
-var fs = require("fs")
-var osenv = require("osenv")
-var rimraf = require("rimraf")
-var mr = require("npm-registry-mock")
-var common = require("../common-tap.js")
-
-var pkg = path.resolve(__dirname, "peer-deps-toplevel")
-var desiredResultsPath = path.resolve(pkg, "desired-ls-results.json")
-
-test("installs the peer dependency directory structure", function (t) {
- mr({port : common.port}, function (er, s) {
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+var npm = npm = require('../../')
+
+var pkg = path.resolve(__dirname, 'peer-deps-toplevel')
+
+var expected = {
+ name: 'npm-test-peer-deps-toplevel',
+ version: '0.0.0',
+ dependencies: {
+ 'npm-test-peer-deps': {
+ version: '0.0.0',
+ from: 'npm-test-peer-deps@*',
+ resolved: common.registry + '/npm-test-peer-deps/-/npm-test-peer-deps-0.0.0.tgz',
+ dependencies: {
+ underscore: {
+ version: '1.3.1',
+ from: 'underscore@1.3.1',
+ resolved: common.registry + '/underscore/-/underscore-1.3.1.tgz'
+ }
+ }
+ },
+ mkdirp: {
+ version: '0.3.5',
+ from: 'mkdirp@*',
+ resolved: common.registry + '/mkdirp/-/mkdirp-0.3.5.tgz'
+ },
+ request: {
+ version: '0.9.5',
+ from: 'request@>=0.9.0 <0.10.0',
+ resolved: common.registry + '/request/-/request-0.9.5.tgz'
+ }
+ }
+}
+
+var json = {
+ author: 'Domenic Denicola',
+ name: 'npm-test-peer-deps-toplevel',
+ version: '0.0.0',
+ dependencies: {
+ 'npm-test-peer-deps': '*'
+ },
+ peerDependencies: {
+ mkdirp: '*'
+ }
+}
+
+test('installs the peer dependency directory structure', function (t) {
+ mr({ port: common.port }, function (er, s) {
setup(function (err) {
- t.ifError(err, "setup ran successfully")
+ t.ifError(err, 'setup ran successfully')
- npm.install(".", function (err) {
- t.ifError(err, "packages were installed")
+ npm.install('.', function (err) {
+ t.ifError(err, 'packages were installed')
npm.commands.ls([], true, function (err, _, results) {
- t.ifError(err, "listed tree without problems")
+ t.ifError(err, 'listed tree without problems')
- fs.readFile(desiredResultsPath, function (err, desired) {
- t.ifError(err, "read desired results")
-
- t.deepEqual(results, JSON.parse(desired), "got expected output from ls")
- s.close()
- t.end()
- })
+ t.deepEqual(results, expected, 'got expected output from ls')
+ s.close()
+ t.end()
})
})
})
})
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
-
function setup (cb) {
cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
process.chdir(pkg)
- var opts = { cache: path.resolve(pkg, "cache"), registry: common.registry}
+ var opts = { cache: path.resolve(pkg, 'cache'), registry: common.registry}
npm.load(opts, cb)
}
function cleanup () {
process.chdir(osenv.tmpdir())
- rimraf.sync(path.resolve(pkg, "node_modules"))
- rimraf.sync(path.resolve(pkg, "cache"))
+ rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/peer-deps-toplevel/desired-ls-results.json b/deps/npm/test/tap/peer-deps-toplevel/desired-ls-results.json
deleted file mode 100644
index 28eff4c6d1..0000000000
--- a/deps/npm/test/tap/peer-deps-toplevel/desired-ls-results.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "npm-test-peer-deps-toplevel",
- "version": "0.0.0",
- "dependencies": {
- "npm-test-peer-deps": {
- "version": "0.0.0",
- "dependencies": {
- "underscore": {
- "version": "1.3.1"
- }
- }
- },
- "mkdirp": {
- "version": "0.3.5"
- },
- "request": {
- "version": "0.9.5"
- }
- }
-}
diff --git a/deps/npm/test/tap/peer-deps-toplevel/package.json b/deps/npm/test/tap/peer-deps-toplevel/package.json
deleted file mode 100644
index ab77daeec3..0000000000
--- a/deps/npm/test/tap/peer-deps-toplevel/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "author": "Domenic Denicola",
- "name": "npm-test-peer-deps-toplevel",
- "version": "0.0.0",
- "dependencies": {
- "npm-test-peer-deps": "*"
- },
- "peerDependencies": {
- "mkdirp": "*"
- }
-}
diff --git a/deps/npm/test/tap/peer-deps-without-package-json.js b/deps/npm/test/tap/peer-deps-without-package-json.js
index 9c8daf84fb..16a3a114f6 100644
--- a/deps/npm/test/tap/peer-deps-without-package-json.js
+++ b/deps/npm/test/tap/peer-deps-without-package-json.js
@@ -1,43 +1,52 @@
-var common = require("../common-tap")
-var fs = require("fs")
-var path = require("path")
-var test = require("tap").test
-var rimraf = require("rimraf")
-var npm = require("../../")
-var mr = require("npm-registry-mock")
-var pkg = path.resolve(__dirname, "peer-deps-without-package-json")
-var cache = path.resolve(pkg, "cache")
-var nodeModules = path.resolve(pkg, "node_modules")
-
-test("installing a peerDependencies-using package without a package.json present (GH-3049)", function (t) {
-
- rimraf.sync(nodeModules)
- rimraf.sync(cache)
-
- fs.mkdirSync(nodeModules)
+var fs = require('fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var npm = require('../../')
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'peer-deps-without-package-json')
+var cache = path.resolve(pkg, 'cache')
+var nodeModules = path.resolve(pkg, 'node_modules')
+
+test('setup', function (t) {
+ t.comment('test for https://github.com/npm/npm/issues/3049')
+ cleanup()
+ mkdirp.sync(cache)
+ mkdirp.sync(nodeModules)
+ fs.writeFileSync(path.join(pkg, 'file-js.js'), fileJS)
process.chdir(pkg)
+ t.end()
+})
+
+test('installing a peerDeps-using package without package.json', function (t) {
var customMocks = {
- "get": {
- "/ok.js": [200, path.join(pkg, "file-js.js")]
+ 'get': {
+ '/ok.js': [200, path.join(pkg, 'file-js.js')]
}
}
mr({port: common.port, mocks: customMocks}, function (err, s) {
- t.ifError(err, "mock registry booted")
+ t.ifError(err, 'mock registry booted')
npm.load({
registry: common.registry,
cache: cache
}, function () {
- npm.install(common.registry + "/ok.js", function (err) {
- t.ifError(err, "installed ok.js")
+ npm.install(common.registry + '/ok.js', function (err) {
+ t.ifError(err, 'installed ok.js')
t.ok(
- fs.existsSync(path.join(nodeModules, "/npm-test-peer-deps-file")),
- "passive peer dep installed"
+ fs.existsSync(path.join(nodeModules, 'npm-test-peer-deps-file')),
+ 'passive peer dep installed'
)
t.ok(
- fs.existsSync(path.join(nodeModules, "/underscore")),
- "underscore installed"
+ fs.existsSync(path.join(nodeModules, 'underscore')),
+ 'underscore installed'
)
t.end()
@@ -47,8 +56,26 @@ test("installing a peerDependencies-using package without a package.json present
})
})
-test("cleanup", function (t) {
- rimraf.sync(nodeModules)
- rimraf.sync(cache)
+test('cleanup', function (t) {
+ cleanup()
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
+
+var fileJS = function () {
+/**package
+* { "name": "npm-test-peer-deps-file"
+* , "main": "index.js"
+* , "version": "1.2.3"
+* , "description":"No package.json in sight!"
+* , "peerDependencies": { "underscore": "1.3.1" }
+* , "dependencies": { "mkdirp": "0.3.5" }
+* }
+**/
+
+ module.exports = 'I\'m just a lonely index, naked as the day I was born.'
+}.toString().split('\n').slice(1, -1).join('\n')
diff --git a/deps/npm/test/tap/peer-deps-without-package-json/.gitkeep b/deps/npm/test/tap/peer-deps-without-package-json/.gitkeep
deleted file mode 100644
index e69de29bb2..0000000000
--- a/deps/npm/test/tap/peer-deps-without-package-json/.gitkeep
+++ /dev/null
diff --git a/deps/npm/test/tap/peer-deps-without-package-json/file-js.js b/deps/npm/test/tap/peer-deps-without-package-json/file-js.js
deleted file mode 100644
index 957e20e416..0000000000
--- a/deps/npm/test/tap/peer-deps-without-package-json/file-js.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**package
-* { "name": "npm-test-peer-deps-file"
-* , "main": "index.js"
-* , "version": "1.2.3"
-* , "description":"No package.json in sight!"
-* , "peerDependencies": { "underscore": "1.3.1" }
-* , "dependencies": { "mkdirp": "0.3.5" }
-* }
-**/
-
-module.exports = "I\'m just a lonely index, naked as the day I was born."
diff --git a/deps/npm/test/tap/peer-deps.js b/deps/npm/test/tap/peer-deps.js
index 8fa28a54f6..48023d7ac7 100644
--- a/deps/npm/test/tap/peer-deps.js
+++ b/deps/npm/test/tap/peer-deps.js
@@ -1,55 +1,89 @@
-var npm = npm = require("../../")
-var test = require("tap").test
-var path = require("path")
-var fs = require("fs")
-var osenv = require("osenv")
-var rimraf = require("rimraf")
-var mr = require("npm-registry-mock")
-var common = require("../common-tap.js")
-
-var pkg = path.resolve(__dirname, "peer-deps")
-var desiredResultsPath = path.resolve(pkg, "desired-ls-results.json")
-
-test("installs the peer dependency directory structure", function (t) {
- mr({port : common.port}, function (er, s) {
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+var npm = npm = require('../../')
+
+var pkg = path.resolve(__dirname, 'peer-deps')
+
+var expected = {
+ name: 'npm-test-peer-deps-installer',
+ version: '0.0.0',
+ dependencies: {
+ 'npm-test-peer-deps': {
+ version: '0.0.0',
+ from: 'npm-test-peer-deps@*',
+ resolved: common.registry + '/npm-test-peer-deps/-/npm-test-peer-deps-0.0.0.tgz',
+ dependencies: {
+ underscore: {
+ version: '1.3.1',
+ from: 'underscore@1.3.1',
+ resolved: common.registry + '/underscore/-/underscore-1.3.1.tgz'
+ }
+ }
+ },
+ request: {
+ version: '0.9.5',
+ from: 'request@>=0.9.0 <0.10.0',
+ resolved: common.registry + '/request/-/request-0.9.5.tgz'
+ }
+ }
+}
+
+var json = {
+ author: 'Domenic Denicola',
+ name: 'npm-test-peer-deps-installer',
+ version: '0.0.0',
+ dependencies: {
+ 'npm-test-peer-deps': '*'
+ }
+}
+
+test('installs the peer dependency directory structure', function (t) {
+ mr({ port: common.port }, function (er, s) {
setup(function (err) {
if (err) return t.fail(err)
- npm.install(".", function (err) {
+ npm.install('.', function (err) {
if (err) return t.fail(err)
npm.commands.ls([], true, function (err, _, results) {
if (err) return t.fail(err)
- fs.readFile(desiredResultsPath, function (err, desired) {
- if (err) return t.fail(err)
-
- t.deepEqual(results, JSON.parse(desired))
- s.close()
- t.end()
- })
+ t.deepEqual(results, expected)
+ s.close()
+ t.end()
})
})
})
})
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
-
function setup (cb) {
cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
process.chdir(pkg)
- var opts = { cache: path.resolve(pkg, "cache"), registry: common.registry}
+ var opts = { cache: path.resolve(pkg, 'cache'), registry: common.registry}
npm.load(opts, cb)
}
function cleanup () {
process.chdir(osenv.tmpdir())
- rimraf.sync(path.resolve(pkg, "node_modules"))
- rimraf.sync(path.resolve(pkg, "cache"))
+ rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/peer-deps/desired-ls-results.json b/deps/npm/test/tap/peer-deps/desired-ls-results.json
deleted file mode 100644
index 9c1033af0e..0000000000
--- a/deps/npm/test/tap/peer-deps/desired-ls-results.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "npm-test-peer-deps-installer",
- "version": "0.0.0",
- "dependencies": {
- "npm-test-peer-deps": {
- "version": "0.0.0",
- "dependencies": {
- "underscore": {
- "version": "1.3.1"
- }
- }
- },
- "request": {
- "version": "0.9.5"
- }
- }
-}
diff --git a/deps/npm/test/tap/peer-deps/package.json b/deps/npm/test/tap/peer-deps/package.json
deleted file mode 100644
index e78a1a7e14..0000000000
--- a/deps/npm/test/tap/peer-deps/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "author": "Domenic Denicola",
- "name": "npm-test-peer-deps-installer",
- "version": "0.0.0",
- "dependencies": {
- "npm-test-peer-deps": "*"
- }
-}
diff --git a/deps/npm/test/tap/prune.js b/deps/npm/test/tap/prune.js
index f46f6c7eb2..23c8548df5 100644
--- a/deps/npm/test/tap/prune.js
+++ b/deps/npm/test/tap/prune.js
@@ -1,116 +1,131 @@
-var test = require("tap").test
-var common = require("../common-tap")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var mr = require("npm-registry-mock")
-var env = process.env
-var path = require("path")
+var fs = require('fs')
+var path = require('path')
-var pkg = path.resolve(__dirname, "prune")
-var cache = path.resolve(pkg, "cache")
-var nodeModules = path.resolve(pkg, "node_modules")
-
-var EXEC_OPTS = { cwd: pkg, env: env }
-EXEC_OPTS.env.npm_config_depth = "Infinity"
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+var common = require('../common-tap')
var server
-test("reg mock", function (t) {
- mr({port : common.port}, function (er, s) {
- server = s
- t.pass("registry mock started")
- t.end()
- })
-})
+var pkg = path.resolve(__dirname, 'prune')
+var cache = path.resolve(pkg, 'cache')
-function cleanup () {
- rimraf.sync(cache)
- rimraf.sync(nodeModules)
+var json = {
+ name: 'prune',
+ description: 'fixture',
+ version: '0.0.1',
+ main: 'index.js',
+ dependencies: {
+ underscore: '1.3.1'
+ },
+ devDependencies: {
+ mkdirp: '*'
+ }
+}
+
+var EXEC_OPTS = {
+ cwd: pkg,
+ npm_config_depth: 'Infinity'
}
-test("setup", function (t) {
+test('setup', function (t) {
cleanup()
- t.pass("setup")
- t.end()
+ mkdirp.sync(cache)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ mr({ port: common.port }, function (er, s) {
+ server = s
+ t.end()
+ })
})
-test("npm install", function (t) {
+test('npm install', function (t) {
common.npm([
- "install",
- "--cache", cache,
- "--registry", common.registry,
- "--loglevel", "silent",
- "--production", "false"
+ 'install',
+ '--cache', cache,
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ '--production', 'false'
], EXEC_OPTS, function (err, code, stdout, stderr) {
- t.ifErr(err, "install finished successfully")
- t.notOk(code, "exit ok")
- t.notOk(stderr, "Should not get data on stderr: " + stderr)
+ t.ifErr(err, 'install finished successfully')
+ t.notOk(code, 'exit ok')
+ t.notOk(stderr, 'Should not get data on stderr: ' + stderr)
t.end()
})
})
-test("npm install test-package", function (t) {
+test('npm install test-package', function (t) {
common.npm([
- "install", "test-package",
- "--cache", cache,
- "--registry", common.registry,
- "--loglevel", "silent",
- "--production", "false"
+ 'install', 'test-package',
+ '--cache', cache,
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ '--production', 'false'
], EXEC_OPTS, function (err, code, stdout, stderr) {
- t.ifErr(err, "install finished successfully")
- t.notOk(code, "exit ok")
- t.notOk(stderr, "Should not get data on stderr: " + stderr)
+ t.ifErr(err, 'install finished successfully')
+ t.notOk(code, 'exit ok')
+ t.notOk(stderr, 'Should not get data on stderr: ' + stderr)
t.end()
})
})
-test("verify installs", function (t) {
- var dirs = fs.readdirSync(pkg + "/node_modules").sort()
- t.same(dirs, [ "test-package", "mkdirp", "underscore" ].sort())
+test('verify installs', function (t) {
+ var dirs = fs.readdirSync(pkg + '/node_modules').sort()
+ t.same(dirs, [ 'test-package', 'mkdirp', 'underscore' ].sort())
t.end()
})
-test("npm prune", function (t) {
+test('npm prune', function (t) {
common.npm([
- "prune",
- "--loglevel", "silent",
- "--production", "false"
+ 'prune',
+ '--loglevel', 'silent',
+ '--production', 'false'
], EXEC_OPTS, function (err, code, stdout, stderr) {
- t.ifErr(err, "prune finished successfully")
- t.notOk(code, "exit ok")
- t.notOk(stderr, "Should not get data on stderr: " + stderr)
+ t.ifErr(err, 'prune finished successfully')
+ t.notOk(code, 'exit ok')
+ t.notOk(stderr, 'Should not get data on stderr: ' + stderr)
t.end()
})
})
-test("verify installs", function (t) {
- var dirs = fs.readdirSync(pkg + "/node_modules").sort()
- t.same(dirs, [ "mkdirp", "underscore" ])
+test('verify installs', function (t) {
+ var dirs = fs.readdirSync(pkg + '/node_modules').sort()
+ t.same(dirs, [ 'mkdirp', 'underscore' ])
t.end()
})
-test("npm prune", function (t) {
+test('npm prune', function (t) {
common.npm([
- "prune",
- "--loglevel", "silent",
- "--production"
+ 'prune',
+ '--loglevel', 'silent',
+ '--production'
], EXEC_OPTS, function (err, code, stderr) {
- t.ifErr(err, "prune finished successfully")
- t.notOk(code, "exit ok")
- t.equal(stderr, "unbuild mkdirp@0.3.5\n")
+ t.ifErr(err, 'prune finished successfully')
+ t.notOk(code, 'exit ok')
+ t.equal(stderr, 'unbuild mkdirp@0.3.5\n')
t.end()
})
})
-test("verify installs", function (t) {
- var dirs = fs.readdirSync(pkg + "/node_modules").sort()
- t.same(dirs, [ "underscore" ])
+test('verify installs', function (t) {
+ var dirs = fs.readdirSync(pkg + '/node_modules').sort()
+ t.same(dirs, [ 'underscore' ])
t.end()
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
server.close()
cleanup()
- t.pass("cleaned up")
+ t.pass('cleaned up')
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/prune/package.json b/deps/npm/test/tap/prune/package.json
deleted file mode 100644
index 641ab65807..0000000000
--- a/deps/npm/test/tap/prune/package.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "name": "bla",
- "description": "fixture",
- "version": "0.0.1",
- "main": "index.js",
- "dependencies": {
- "underscore": "1.3.1"
- },
- "devDependencies": {
- "mkdirp": "*"
- },
- "repository": "git://github.com/robertkowalski/bogusfixture"
-}
diff --git a/deps/npm/test/tap/publish-scoped.js b/deps/npm/test/tap/publish-scoped.js
index 2658c8dd2b..f74ca2e616 100644
--- a/deps/npm/test/tap/publish-scoped.js
+++ b/deps/npm/test/tap/publish-scoped.js
@@ -11,14 +11,6 @@ var common = require("../common-tap.js")
var pkg = path.join(__dirname, "prepublish_package")
-// TODO: nock uses setImmediate, breaks 0.8: replace with mockRegistry
-if (!global.setImmediate) {
- global.setImmediate = function () {
- var args = [arguments[0], 0].concat([].slice.call(arguments, 1))
- setTimeout.apply(this, args)
- }
-}
-
test("setup", function (t) {
mkdirp(path.join(pkg, "cache"), next)
diff --git a/deps/npm/test/tap/run-script.js b/deps/npm/test/tap/run-script.js
index 35790684f5..60c9d3c4f9 100644
--- a/deps/npm/test/tap/run-script.js
+++ b/deps/npm/test/tap/run-script.js
@@ -111,6 +111,10 @@ test('npm run-script with args that contain double quotes', function (t) {
common.npm(['run-script', 'start', '--', 'what"s "up"?'], opts, testOutput.bind(null, t, 'what"s "up"?'))
})
+test('npm run-script with args that contain ticks', function (t) {
+ common.npm(['run-script', 'start', '--', 'what\'s \'up\'?'], opts, testOutput.bind(null, t, 'what\'s \'up\'?'))
+})
+
test('npm run-script with pre script', function (t) {
common.npm(['run-script', 'with-post'], opts, testOutput.bind(null, t, 'main;post'))
})
diff --git a/deps/npm/test/tap/scripts-whitespace-windows.js b/deps/npm/test/tap/scripts-whitespace-windows.js
index 44170af5b9..b4d1f3a34e 100644
--- a/deps/npm/test/tap/scripts-whitespace-windows.js
+++ b/deps/npm/test/tap/scripts-whitespace-windows.js
@@ -1,54 +1,99 @@
-var test = require("tap").test
-var common = require("../common-tap")
-var path = require("path")
-var pkg = path.resolve(__dirname, "scripts-whitespace-windows")
-var tmp = path.resolve(pkg, "tmp")
-var cache = path.resolve(pkg, "cache")
-var modules = path.resolve(pkg, "node_modules")
-var dep = path.resolve(pkg, "dep")
-
-var mkdirp = require("mkdirp")
-var rimraf = require("rimraf")
-
-test("setup", function (t) {
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap')
+
+var pkg = path.resolve(__dirname, 'scripts-whitespace-windows')
+var tmp = path.resolve(pkg, 'tmp')
+var cache = path.resolve(pkg, 'cache')
+var dep = path.resolve(pkg, 'dep')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'scripts-whitespace-windows',
+ version: '1.0.0',
+ description: 'a test',
+ repository: 'git://github.com/robertkowalski/bogus',
+ scripts: {
+ foo: 'foo --title \"Analysis of\" --recurse -d report src'
+ },
+ dependencies: {
+ 'scripts-whitespace-windows-dep': '0.0.1'
+ }
+}
+
+var dependency = {
+ name: 'scripts-whitespace-windows-dep',
+ version: '0.0.1',
+ bin: [ 'bin/foo' ]
+}
+
+test('setup', function (t) {
cleanup()
- mkdirp.sync(cache)
mkdirp.sync(tmp)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+ fs.writeFileSync(
+ path.join(pkg, 'README.md'),
+ "### THAT'S RIGHT\n"
+ )
- common.npm(["i", dep], {
+ mkdirp.sync(path.join(dep, 'bin'))
+ fs.writeFileSync(
+ path.join(dep, 'package.json'),
+ JSON.stringify(dependency, null, 2)
+ )
+ fs.writeFileSync(path.join(dep, 'bin', 'foo'), foo)
+
+ common.npm(['i', dep], {
cwd: pkg,
env: {
- "npm_config_cache": cache,
- "npm_config_tmp": tmp,
- "npm_config_prefix": pkg,
- "npm_config_global": "false"
+ npm_config_cache: cache,
+ npm_config_tmp: tmp,
+ npm_config_prefix: pkg,
+ npm_config_global: 'false'
}
}, function (err, code, stdout, stderr) {
- t.ifErr(err, "npm i " + dep + " finished without error")
- t.equal(code, 0, "npm i " + dep + " exited ok")
- t.notOk(stderr, "no output stderr")
+ t.ifErr(err, 'npm i ' + dep + ' finished without error')
+ t.equal(code, 0, 'npm i ' + dep + ' exited ok')
+ console.log('stderr', stderr)
+ t.notOk(stderr, 'no output stderr')
t.end()
})
})
-test("test", function (t) {
- common.npm(["run", "foo"], { cwd: pkg }, function (err, code, stdout, stderr) {
- t.ifErr(err, "npm run finished without error")
- t.equal(code, 0, "npm run exited ok")
- t.notOk(stderr, "no output stderr: ", stderr)
+test('test', function (t) {
+ common.npm(['run', 'foo'], EXEC_OPTS, function (err, code, stdout, stderr) {
+ t.ifErr(err, 'npm run finished without error')
+ t.equal(code, 0, 'npm run exited ok')
+ t.notOk(stderr, 'no output stderr: ', stderr)
stdout = stdout.trim()
t.ok(/npm-test-fine/.test(stdout))
t.end()
})
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
-function cleanup() {
- rimraf.sync(cache)
- rimraf.sync(tmp)
- rimraf.sync(modules)
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
}
+
+var foo = function () {/*
+#!/usr/bin/env node
+
+if (process.argv.length === 8)
+ console.log('npm-test-fine')
+*/}.toString().split('\n').slice(1, -1).join('\n')
diff --git a/deps/npm/test/tap/scripts-whitespace-windows/README.md b/deps/npm/test/tap/scripts-whitespace-windows/README.md
deleted file mode 100644
index 76f177f192..0000000000
--- a/deps/npm/test/tap/scripts-whitespace-windows/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# Hi
diff --git a/deps/npm/test/tap/scripts-whitespace-windows/dep/README.md b/deps/npm/test/tap/scripts-whitespace-windows/dep/README.md
deleted file mode 100644
index 0d9d64f271..0000000000
--- a/deps/npm/test/tap/scripts-whitespace-windows/dep/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# Hi!
diff --git a/deps/npm/test/tap/scripts-whitespace-windows/dep/bin/foo b/deps/npm/test/tap/scripts-whitespace-windows/dep/bin/foo
deleted file mode 100644
index d6708417d9..0000000000
--- a/deps/npm/test/tap/scripts-whitespace-windows/dep/bin/foo
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env node
-
-if (process.argv.length === 8)
- console.log('npm-test-fine')
diff --git a/deps/npm/test/tap/scripts-whitespace-windows/dep/package.json b/deps/npm/test/tap/scripts-whitespace-windows/dep/package.json
deleted file mode 100644
index 4ff9829130..0000000000
--- a/deps/npm/test/tap/scripts-whitespace-windows/dep/package.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "name": "scripts-whitespace-windows-dep",
- "version": "0.0.1",
- "bin": [ "bin/foo" ],
- "repository": "git://github.com/robertkowalski/bogusfixture"
-}
diff --git a/deps/npm/test/tap/scripts-whitespace-windows/package.json b/deps/npm/test/tap/scripts-whitespace-windows/package.json
deleted file mode 100644
index 06e1a572b3..0000000000
--- a/deps/npm/test/tap/scripts-whitespace-windows/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "scripts-whitespace-windows",
- "scripts": {
- "foo": "foo --title \"Analysis of\" --recurse -d report src"
- },
- "description": "a test",
- "repository": "git://github.com/robertkowalski/bogus",
- "dependencies": {
- "scripts-whitespace-windows-dep": "0.0.1"
- }
-}
diff --git a/deps/npm/test/tap/search.js b/deps/npm/test/tap/search.js
index fc3bd86e08..0412e1755d 100644
--- a/deps/npm/test/tap/search.js
+++ b/deps/npm/test/tap/search.js
@@ -1,265 +1,276 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var rimraf = require("rimraf")
-var mr = require("npm-registry-mock")
-var fs = require("fs")
-var path = require("path")
-var pkg = path.resolve(__dirname, "search")
-var cache = path.resolve(pkg, "cache")
-var registryCache = path.resolve(cache, "localhost_1337", "-", "all")
-var cacheJsonFile = path.resolve(registryCache, ".cache.json")
-var mkdirp = require("mkdirp")
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'search')
+var cache = path.resolve(pkg, 'cache')
+var registryCache = path.resolve(cache, 'localhost_1337', '-', 'all')
+var cacheJsonFile = path.resolve(registryCache, '.cache.json')
var timeMock = {
epoch: 1411727900,
- future: 1411727900+100,
- all: 1411727900+25,
+ future: 1411727900 + 100,
+ all: 1411727900 + 25,
since: 0 // filled by since server callback
}
var EXEC_OPTS = {}
-function cleanupCache() {
- rimraf.sync(cache)
-}
-function cleanup () { cleanupCache() }
-
-function setupCache() {
- mkdirp.sync(cache)
- mkdirp.sync(registryCache)
- var res = fs.writeFileSync(cacheJsonFile, stringifyUpdated(timeMock.epoch))
- if (res) throw new Error("Creating cache file failed")
-}
-
var mocks = {
/* Since request, always response with an _update time > the time requested */
- sinceFuture: function(server) {
- server.filteringPathRegEx(/startkey=[^&]*/g, function(s) {
+ sinceFuture: function (server) {
+ server.filteringPathRegEx(/startkey=[^&]*/g, function (s) {
var _allMock = JSON.parse(JSON.stringify(allMock))
- timeMock.since = _allMock._updated = s.replace("startkey=", "")
- server.get("/-/all/since?stale=update_after&" + s)
+ timeMock.since = _allMock._updated = s.replace('startkey=', '')
+ server.get('/-/all/since?stale=update_after&' + s)
.reply(200, _allMock)
return s
})
},
- allFutureUpdatedOnly: function(server) {
- server.get("/-/all")
+ allFutureUpdatedOnly: function (server) {
+ server.get('/-/all')
.reply(200, stringifyUpdated(timeMock.future))
},
- all: function(server) {
- server.get("/-/all")
+ all: function (server) {
+ server.get('/-/all')
.reply(200, allMock)
}
}
-
-test("No previous cache, init cache triggered by first search", function(t) {
- cleanupCache()
+test('No previous cache, init cache triggered by first search', function (t) {
+ cleanup()
mr({ port: common.port, plugin: mocks.allFutureUpdatedOnly }, function (err, s) {
+ t.ifError(err, 'mock registry started')
common.npm([
- "search", "do not do extra search work on my behalf",
- "--registry", common.registry,
- "--cache", cache,
- "--loglevel", "silent",
- "--color", "always"
+ 'search', 'do not do extra search work on my behalf',
+ '--registry', common.registry,
+ '--cache', cache,
+ '--loglevel', 'silent',
+ '--color', 'always'
],
EXEC_OPTS,
- function(err, code) {
+ function (err, code) {
s.close()
- t.equal(code, 0, "search finished successfully")
- t.ifErr(err, "search finished successfully")
+ t.equal(code, 0, 'search finished successfully')
+ t.ifErr(err, 'search finished successfully')
+
+ t.ok(
+ fs.existsSync(cacheJsonFile),
+ cacheJsonFile + ' expected to have been created'
+ )
- t.ok(fs.existsSync(cacheJsonFile),
- cacheJsonFile + " expected to have been created")
- var cacheData = JSON.parse(fs.readFileSync(cacheJsonFile, "utf8"))
+ var cacheData = JSON.parse(fs.readFileSync(cacheJsonFile, 'utf8'))
t.equal(cacheData._updated, String(timeMock.future))
t.end()
})
})
})
-test("previous cache, _updated set, should trigger since request", function(t) {
- cleanupCache()
+test('previous cache, _updated set, should trigger since request', function (t) {
setupCache()
- function m(server) {
- [ mocks.all, mocks.sinceFuture ].forEach(function(m) {
+ function m (server) {
+ [ mocks.all, mocks.sinceFuture ].forEach(function (m) {
m(server)
})
}
mr({ port: common.port, plugin: m }, function (err, s) {
+ t.ifError(err, 'mock registry started')
common.npm([
- "search", "do not do extra search work on my behalf",
- "--registry", common.registry,
- "--cache", cache,
- "--loglevel", "silly",
- "--color", "always"
+ 'search', 'do not do extra search work on my behalf',
+ '--registry', common.registry,
+ '--cache', cache,
+ '--loglevel', 'silly',
+ '--color', 'always'
],
EXEC_OPTS,
- function(err, code) {
+ function (err, code) {
s.close()
- t.equal(code, 0, "search finished successfully")
- t.ifErr(err, "search finished successfully")
+ t.equal(code, 0, 'search finished successfully')
+ t.ifErr(err, 'search finished successfully')
- var cacheData = JSON.parse(fs.readFileSync(cacheJsonFile, "utf8"))
- t.equal(cacheData._updated,
+ var cacheData = JSON.parse(fs.readFileSync(cacheJsonFile, 'utf8'))
+ t.equal(
+ cacheData._updated,
timeMock.since,
- "cache update time gotten from since response")
- cleanupCache()
+ 'cache update time gotten from since response'
+ )
t.end()
})
})
})
-
var searches = [
{
- term: "f36b6a6123da50959741e2ce4d634f96ec668c56",
- description: "non-regex",
+ term: 'f36b6a6123da50959741e2ce4d634f96ec668c56',
+ description: 'non-regex',
location: 241
},
{
- term: "/f36b6a6123da50959741e2ce4d634f96ec668c56/",
- description: "regex",
+ term: '/f36b6a6123da50959741e2ce4d634f96ec668c56/',
+ description: 'regex',
location: 241
}
]
-searches.forEach(function(search) {
- test(search.description + " search in color", function(t) {
- cleanupCache()
+searches.forEach(function (search) {
+ test(search.description + ' search in color', function (t) {
+ cleanup()
mr({ port: common.port, plugin: mocks.all }, function (er, s) {
common.npm([
- "search", search.term,
- "--registry", common.registry,
- "--cache", cache,
- "--loglevel", "silent",
- "--color", "always"
+ 'search', search.term,
+ '--registry', common.registry,
+ '--cache', cache,
+ '--loglevel', 'silent',
+ '--color', 'always'
],
EXEC_OPTS,
- function(err, code, stdout) {
+ function (err, code, stdout) {
s.close()
- t.equal(code, 0, "search finished successfully")
- t.ifErr(err, "search finished successfully")
+ t.equal(code, 0, 'search finished successfully')
+ t.ifErr(err, 'search finished successfully')
// \033 == \u001B
- var markStart = "\u001B\\[[0-9][0-9]m"
- var markEnd = "\u001B\\[0m"
+ var markStart = '\u001B\\[[0-9][0-9]m'
+ var markEnd = '\u001B\\[0m'
- var re = new RegExp(markStart + ".*?" + markEnd)
+ var re = new RegExp(markStart + '.*?' + markEnd)
var cnt = stdout.search(re)
- t.equal(cnt, search.location,
- search.description + " search for " + search.term)
+ t.equal(
+ cnt,
+ search.location,
+ search.description + ' search for ' + search.term
+ )
t.end()
})
})
})
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
-function stringifyUpdated(time) {
- return JSON.stringify({ _updated : String(time) })
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
+
+function setupCache () {
+ cleanup()
+ mkdirp.sync(cache)
+ mkdirp.sync(registryCache)
+ var res = fs.writeFileSync(cacheJsonFile, stringifyUpdated(timeMock.epoch))
+ if (res) throw new Error('Creating cache file failed')
+}
+
+function stringifyUpdated (time) {
+ return JSON.stringify({ _updated: String(time) })
}
var allMock = {
- "_updated": timeMock.all,
- "generator-frontcow": {
- "name": "generator-frontcow",
- "description": "f36b6a6123da50959741e2ce4d634f96ec668c56 This is a fake description to ensure we do not accidentally search the real npm registry or use some kind of cache",
- "dist-tags": {
- "latest": "0.1.19"
+ '_updated': timeMock.all,
+ 'generator-frontcow': {
+ 'name': 'generator-frontcow',
+ 'description': 'f36b6a6123da50959741e2ce4d634f96ec668c56 This is a fake description to ensure we do not accidentally search the real npm registry or use some kind of cache',
+ 'dist-tags': {
+ 'latest': '0.1.19'
},
- "maintainers": [
+ 'maintainers': [
{
- "name": "bcabanes",
- "email": "contact@benjamincabanes.com"
+ 'name': 'bcabanes',
+ 'email': 'contact@benjamincabanes.com'
}
],
- "homepage": "https://github.com/bcabanes/generator-frontcow",
- "keywords": [
- "sass",
- "frontend",
- "yeoman-generator",
- "atomic",
- "design",
- "sass",
- "foundation",
- "foundation5",
- "atomic design",
- "bourbon",
- "polyfill",
- "font awesome"
+ 'homepage': 'https://github.com/bcabanes/generator-frontcow',
+ 'keywords': [
+ 'sass',
+ 'frontend',
+ 'yeoman-generator',
+ 'atomic',
+ 'design',
+ 'sass',
+ 'foundation',
+ 'foundation5',
+ 'atomic design',
+ 'bourbon',
+ 'polyfill',
+ 'font awesome'
],
- "repository": {
- "type": "git",
- "url": "https://github.com/bcabanes/generator-frontcow"
+ 'repository': {
+ 'type': 'git',
+ 'url': 'https://github.com/bcabanes/generator-frontcow'
},
- "author": {
- "name": "ben",
- "email": "contact@benjamincabanes.com",
- "url": "https://github.com/bcabanes"
+ 'author': {
+ 'name': 'ben',
+ 'email': 'contact@benjamincabanes.com',
+ 'url': 'https://github.com/bcabanes'
},
- "bugs": {
- "url": "https://github.com/bcabanes/generator-frontcow/issues"
+ 'bugs': {
+ 'url': 'https://github.com/bcabanes/generator-frontcow/issues'
},
- "license": "MIT",
- "readmeFilename": "README.md",
- "time": {
- "modified": "2014-10-03T02:26:18.406Z"
+ 'license': 'MIT',
+ 'readmeFilename': 'README.md',
+ 'time': {
+ 'modified': '2014-10-03T02:26:18.406Z'
},
- "versions": {
- "0.1.19": "latest"
+ 'versions': {
+ '0.1.19': 'latest'
}
},
- "marko": {
- "name": "marko",
- "description": "Marko is an extensible, streaming, asynchronous, high performance, HTML-based templating language that can be used in Node.js or in the browser.",
- "dist-tags": {
- "latest": "1.2.16"
+ 'marko': {
+ 'name': 'marko',
+ 'description': 'Marko is an extensible, streaming, asynchronous, high performance, HTML-based templating language that can be used in Node.js or in the browser.',
+ 'dist-tags': {
+ 'latest': '1.2.16'
},
- "maintainers": [
+ 'maintainers': [
{
- "name": "pnidem",
- "email": "pnidem@gmail.com"
+ 'name': 'pnidem',
+ 'email': 'pnidem@gmail.com'
},
{
- "name": "philidem",
- "email": "phillip.idem@gmail.com"
+ 'name': 'philidem',
+ 'email': 'phillip.idem@gmail.com'
}
],
- "homepage": "https://github.com/raptorjs/marko",
- "keywords": [
- "templating",
- "template",
- "async",
- "streaming"
+ 'homepage': 'https://github.com/raptorjs/marko',
+ 'keywords': [
+ 'templating',
+ 'template',
+ 'async',
+ 'streaming'
],
- "repository": {
- "type": "git",
- "url": "https://github.com/raptorjs/marko.git"
+ 'repository': {
+ 'type': 'git',
+ 'url': 'https://github.com/raptorjs/marko.git'
},
- "author": {
- "name": "Patrick Steele-Idem",
- "email": "pnidem@gmail.com"
+ 'author': {
+ 'name': 'Patrick Steele-Idem',
+ 'email': 'pnidem@gmail.com'
},
- "bugs": {
- "url": "https://github.com/raptorjs/marko/issues"
+ 'bugs': {
+ 'url': 'https://github.com/raptorjs/marko/issues'
},
- "license": "Apache License v2.0",
- "readmeFilename": "README.md",
- "users": {
- "pnidem": true
+ 'license': 'Apache License v2.0',
+ 'readmeFilename': 'README.md',
+ 'users': {
+ 'pnidem': true
},
- "time": {
- "modified": "2014-10-03T02:27:31.775Z"
+ 'time': {
+ 'modified': '2014-10-03T02:27:31.775Z'
},
- "versions": {
- "1.2.16": "latest"
+ 'versions': {
+ '1.2.16': 'latest'
}
}
}
diff --git a/deps/npm/test/tap/shrinkwrap-dev-dependency.js b/deps/npm/test/tap/shrinkwrap-dev-dependency.js
index 49421107c3..a124c2b7fe 100644
--- a/deps/npm/test/tap/shrinkwrap-dev-dependency.js
+++ b/deps/npm/test/tap/shrinkwrap-dev-dependency.js
@@ -7,16 +7,16 @@ var osenv = require('osenv')
var rimraf = require('rimraf')
var test = require('tap').test
+var common = require('../common-tap.js')
var npm = npm = require('../../')
-var common = require('../common-tap.js')
var pkg = path.resolve(__dirname, 'shrinkwrap-dev-dependency')
test("shrinkwrap doesn't strip out the dependency", function (t) {
t.plan(1)
mr({port: common.port}, function (er, s) {
- setup({}, function (err) {
+ setup(function (err) {
if (err) return t.fail(err)
npm.install('.', function (err) {
@@ -44,10 +44,14 @@ var desired = {
version: '0.0.0',
dependencies: {
request: {
- version: '0.9.0'
+ version: '0.9.0',
+ from: 'request@0.9.0',
+ resolved: common.registry + '/request/-/request-0.9.0.tgz'
},
underscore: {
- version: '1.3.1'
+ version: '1.3.1',
+ from: 'underscore@1.3.1',
+ resolved: common.registry + '/underscore/-/underscore-1.3.1.tgz'
}
}
}
@@ -65,22 +69,19 @@ var json = {
}
}
-function setup (opts, cb) {
+function setup (cb) {
cleanup()
mkdirp.sync(pkg)
fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify(json, null, 2))
process.chdir(pkg)
- var allOpts = {
+ var opts = {
cache: path.resolve(pkg, 'cache'),
- registry: common.registry
+ registry: common.registry,
+ // important to make sure devDependencies don't get stripped
+ dev: true
}
-
- for (var key in opts) {
- allOpts[key] = opts[key]
- }
-
- npm.load(allOpts, cb)
+ npm.load(opts, cb)
}
function cleanup () {
diff --git a/deps/npm/test/tap/shrinkwrap-empty-deps.js b/deps/npm/test/tap/shrinkwrap-empty-deps.js
index 80ab820983..32cbd5eb40 100644
--- a/deps/npm/test/tap/shrinkwrap-empty-deps.js
+++ b/deps/npm/test/tap/shrinkwrap-empty-deps.js
@@ -1,48 +1,78 @@
-var test = require("tap").test
- , npm = require("../../")
- , mr = require("npm-registry-mock")
- , common = require("../common-tap.js")
- , path = require("path")
- , fs = require("fs")
- , osenv = require("osenv")
- , rimraf = require("rimraf")
- , pkg = path.resolve(__dirname, "shrinkwrap-empty-deps")
- , cache = path.resolve(pkg, "cache")
-
-test("returns a list of removed items", function (t) {
- var desiredResultsPath = path.resolve(pkg, "npm-shrinkwrap.json")
+var fs = require('fs')
+var path = require('path')
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'shrinkwrap-empty-deps')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ author: 'Rockbert',
+ name: 'shrinkwrap-empty-deps',
+ version: '0.0.0',
+ dependencies: {},
+ devDependencies: {}
+}
+
+test('setup', function (t) {
cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
+ process.chdir(pkg)
+ t.end()
+})
+
+test('returns a list of removed items', function (t) {
+ mr({ port: common.port }, function (er, s) {
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ 'shrinkwrap'
+ ],
+ EXEC_OPTS,
+ function (err, code, stdout, stderr) {
+ t.ifError(err, 'shrinkwrap ran without issue')
+ t.notOk(code, 'shrinkwrap ran without raising error code')
+
+ fs.readFile(path.resolve(pkg, 'npm-shrinkwrap.json'), function (err, desired) {
+ t.ifError(err, 'read npm-shrinkwrap.json without issue')
+ t.same(
+ {
+ 'name': 'shrinkwrap-empty-deps',
+ 'version': '0.0.0',
+ 'dependencies': {}
+ },
+ JSON.parse(desired),
+ 'shrinkwrap handled empty deps without exploding'
+ )
- mr({port : common.port}, function (er, s) {
- setup(function () {
- npm.shrinkwrap([], function (err) {
- if (err) return t.fail(err)
- fs.readFile(desiredResultsPath, function (err, desired) {
- if (err) return t.fail(err)
- t.deepEqual({
- "name": "npm-test-shrinkwrap-empty-deps",
- "version": "0.0.0",
- "dependencies": {}
- }, JSON.parse(desired))
- cleanup()
s.close()
t.end()
})
- })
- })
+ }
+ )
})
})
-function setup (cb) {
+test('cleanup', function (t) {
cleanup()
- process.chdir(pkg)
- npm.load({cache: cache, registry: common.registry}, function () {
- cb()
- })
-}
+
+ t.end()
+})
function cleanup () {
process.chdir(osenv.tmpdir())
- rimraf.sync(path.resolve(pkg, "npm-shrinkwrap.json"))
+ rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/shrinkwrap-empty-deps/package.json b/deps/npm/test/tap/shrinkwrap-empty-deps/package.json
deleted file mode 100644
index 9a51088c7e..0000000000
--- a/deps/npm/test/tap/shrinkwrap-empty-deps/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "author": "Rockbert",
- "name": "npm-test-shrinkwrap-empty-deps",
- "version": "0.0.0",
- "dependencies": {},
- "devDependencies": {}
-}
diff --git a/deps/npm/test/tap/shrinkwrap-prod-dependency.js b/deps/npm/test/tap/shrinkwrap-prod-dependency.js
index 1dc665091b..5bc834376e 100644
--- a/deps/npm/test/tap/shrinkwrap-prod-dependency.js
+++ b/deps/npm/test/tap/shrinkwrap-prod-dependency.js
@@ -45,10 +45,14 @@ var desired = {
version: '0.0.0',
dependencies: {
request: {
- version: '0.9.0'
+ version: '0.9.0',
+ from: 'request@0.9.0',
+ resolved: common.registry + '/request/-/request-0.9.0.tgz'
},
underscore: {
- version: '1.5.1'
+ version: '1.5.1',
+ from: 'underscore@1.5.1',
+ resolved: common.registry + '/underscore/-/underscore-1.5.1.tgz'
}
}
}
diff --git a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js
index 8a01260725..a6cddae33d 100644
--- a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js
+++ b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js
@@ -1,58 +1,90 @@
-var npm = npm = require("../../")
-var test = require("tap").test
-var path = require("path")
-var fs = require("fs")
-var osenv = require("osenv")
-var rimraf = require("rimraf")
-var mr = require("npm-registry-mock")
-var common = require("../common-tap.js")
-
-var pkg = path.resolve(__dirname, "shrinkwrap-shared-dev-dependency")
-var desiredResultsPath = path.resolve(pkg, "desired-shrinkwrap-results.json")
+var fs = require('fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+var npm = npm = require('../../')
+
+var pkg = path.resolve(__dirname, 'shrinkwrap-shared-dev-dependency')
test("shrinkwrap doesn't strip out the shared dependency", function (t) {
t.plan(1)
- mr({port : common.port}, function (er, s) {
+ mr({ port: common.port }, function (er, s) {
setup(function (err) {
if (err) return t.fail(err)
- npm.install(".", function (err) {
+ npm.install('.', function (err) {
if (err) return t.fail(err)
npm.commands.shrinkwrap([], true, function (err, results) {
if (err) return t.fail(err)
- fs.readFile(desiredResultsPath, function (err, desired) {
- if (err) return t.fail(err)
-
- t.deepEqual(results, JSON.parse(desired))
- s.close()
- t.end()
- })
+ t.deepEqual(results, desired)
+ s.close()
+ t.end()
})
})
})
})
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
+var desired = {
+ name: 'npm-test-shrinkwrap-shared-dev-dependency',
+ version: '0.0.0',
+ dependencies: {
+ 'test-package-with-one-dep': {
+ version: '0.0.0',
+ from: 'test-package-with-one-dep@0.0.0',
+ resolved: common.registry +
+ '/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz'
+ },
+ 'test-package': {
+ version: '0.0.0',
+ from: 'test-package@0.0.0',
+ resolved: common.registry + '/test-package/-/test-package-0.0.0.tgz'
+ }
+ }
+}
+
+var json = {
+ author: 'Domenic Denicola',
+ name: 'npm-test-shrinkwrap-shared-dev-dependency',
+ version: '0.0.0',
+ dependencies: {
+ 'test-package-with-one-dep': '0.0.0'
+ },
+ devDependencies: {
+ 'test-package': '0.0.0'
+ }
+}
function setup (cb) {
cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify(json, null, 2))
process.chdir(pkg)
- var opts = { cache: path.resolve(pkg, "cache"), registry: common.registry }
+ var opts = {
+ cache: path.resolve(pkg, 'cache'),
+ registry: common.registry,
+ // important to make sure devDependencies don't get stripped
+ dev: true
+ }
npm.load(opts, cb)
}
function cleanup () {
process.chdir(osenv.tmpdir())
- rimraf.sync(path.resolve(pkg, "node_modules"))
- rimraf.sync(path.resolve(pkg, "cache"))
- rimraf.sync(path.resolve(pkg, "npm-shrinkwrap.json"))
+ rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency/desired-shrinkwrap-results.json b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency/desired-shrinkwrap-results.json
deleted file mode 100644
index 230b68761d..0000000000
--- a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency/desired-shrinkwrap-results.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "name": "npm-test-shrinkwrap-shared-dev-dependency",
- "version": "0.0.0",
- "dependencies": {
- "test-package-with-one-dep": {
- "version": "0.0.0"
- },
- "test-package": {
- "version": "0.0.0"
- }
- }
-}
diff --git a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency/package.json b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency/package.json
deleted file mode 100644
index 41260accf2..0000000000
--- a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "author": "Domenic Denicola",
- "name": "npm-test-shrinkwrap-shared-dev-dependency",
- "version": "0.0.0",
- "dependencies": {
- "test-package-with-one-dep": "0.0.0"
- },
- "devDependencies": {
- "test-package": "0.0.0"
- }
-}
diff --git a/deps/npm/test/tap/startstop.js b/deps/npm/test/tap/startstop.js
index 334551ed29..b17a303c82 100644
--- a/deps/npm/test/tap/startstop.js
+++ b/deps/npm/test/tap/startstop.js
@@ -1,18 +1,30 @@
-var common = require("../common-tap")
- , test = require("tap").test
- , path = require("path")
- , rimraf = require("rimraf")
- , mkdirp = require("mkdirp")
- , pkg = path.resolve(__dirname, "startstop")
- , cache = path.resolve(pkg, "cache")
- , tmp = path.resolve(pkg, "tmp")
- , opts = { cwd: pkg }
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap')
+
+var pkg = path.resolve(__dirname, 'startstop')
+
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'startstop',
+ version: '1.2.3',
+ scripts: {
+ start: 'node -e \"console.log(\'start\')\"',
+ stop: 'node -e \"console.log(\'stop\')\"'
+ }
+}
function testOutput (t, command, er, code, stdout, stderr) {
- t.notOk(code, "npm " + command + " exited with code 0")
+ t.notOk(code, 'npm ' + command + ' exited with code 0')
- if (stderr)
- throw new Error("npm " + command + " stderr: " + stderr.toString())
+ if (stderr) throw new Error('npm ' + command + ' stderr: ' + stderr.toString())
stdout = stdout.trim().split(/\n|\r/)
stdout = stdout[stdout.length - 1]
@@ -20,41 +32,43 @@ function testOutput (t, command, er, code, stdout, stderr) {
t.end()
}
-function cleanup () {
- rimraf.sync(cache)
- rimraf.sync(tmp)
-}
-
-test("setup", function (t) {
+test('setup', function (t) {
cleanup()
- mkdirp.sync(cache)
- mkdirp.sync(tmp)
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
t.end()
})
-test("npm start", function (t) {
- common.npm(["start"], opts, testOutput.bind(null, t, "start"))
+test('npm start', function (t) {
+ common.npm(['start'], EXEC_OPTS, testOutput.bind(null, t, 'start'))
})
-test("npm stop", function (t) {
- common.npm(["stop"], opts, testOutput.bind(null, t, "stop"))
+test('npm stop', function (t) {
+ common.npm(['stop'], EXEC_OPTS, testOutput.bind(null, t, 'stop'))
})
-test("npm restart", function (t) {
- common.npm(["restart"], opts, function (er, c, stdout) {
- if (er)
- throw er
+test('npm restart', function (t) {
+ common.npm(['restart'], EXEC_OPTS, function (er, c, stdout) {
+ if (er) throw er
- var output = stdout.split("\n").filter(function (val) {
+ var output = stdout.split('\n').filter(function (val) {
return val.match(/^s/)
})
- t.same(output.sort(), ["start", "stop"].sort())
+ t.same(output.sort(), ['start', 'stop'].sort())
t.end()
})
})
-test("cleanup", function (t) {
+test('cleanup', function (t) {
cleanup()
t.end()
})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/startstop/package.json b/deps/npm/test/tap/startstop/package.json
deleted file mode 100644
index 08a6547ebb..0000000000
--- a/deps/npm/test/tap/startstop/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{"name":"startstop"
-,"version":"1.2.3"
-,"scripts":{
- "start":"node -e \"console.log('start')\"",
- "stop":"node -e \"console.log('stop')\""
- }
-}
diff --git a/deps/npm/test/tap/umask-lifecycle.js b/deps/npm/test/tap/umask-lifecycle.js
index e4f91a2df6..aa07084f15 100644
--- a/deps/npm/test/tap/umask-lifecycle.js
+++ b/deps/npm/test/tap/umask-lifecycle.js
@@ -1,53 +1,55 @@
-var path = require("path")
-var test = require("tap").test
-var fs = require("fs")
-var rimraf = require("rimraf")
-var mkdirp = require("mkdirp")
-var sprintf = require("sprintf-js").sprintf
-var common = require("../common-tap.js")
+var fs = require('fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var test = require('tap').test
+var sprintf = require('sprintf-js').sprintf
+
+var common = require('../common-tap.js')
+var pkg = path.resolve(__dirname, 'umask-lifecycle')
-var pkg = path.resolve(__dirname, "umask-lifecycle")
var pj = JSON.stringify({
- name:"x",
- version: "1.2.3",
- scripts: { umask: "$npm_execpath config get umask && echo \"$npm_config_umask\" && node -p 'process.umask()'" }
-}, null, 2) + "\n"
+ name: 'x',
+ version: '1.2.3',
+ scripts: { umask: '$npm_execpath config get umask && echo "$npm_config_umask" && node -pe "process.umask()"' }
+}, null, 2) + '\n'
var umask = process.umask()
var expected = [
- "",
- "> x@1.2.3 umask "+path.join(__dirname, "umask-lifecycle"),
- "> $npm_execpath config get umask && echo \"$npm_config_umask\" && node -p 'process.umask()'",
- "",
- sprintf("%04o", umask),
- sprintf("%04o", umask),
- sprintf("%d", umask),
- ""
-].join("\n")
+ '',
+ '> x@1.2.3 umask ' + path.join(__dirname, 'umask-lifecycle'),
+ '> $npm_execpath config get umask && echo "$npm_config_umask" && node -pe "process.umask()"',
+ '',
+ sprintf('%04o', umask),
+ sprintf('%04o', umask),
+ sprintf('%d', umask),
+ ''
+].join('\n')
-test("setup", function (t) {
+test('setup', function (t) {
rimraf.sync(pkg)
mkdirp.sync(pkg)
- fs.writeFileSync(pkg + "/package.json", pj)
+ fs.writeFileSync(pkg + '/package.json', pj)
t.end()
})
-test("umask script", function (t) {
- common.npm(["run", "umask"], {
+test('umask script', function (t) {
+ common.npm(['run', 'umask'], {
cwd: pkg,
env: {
PATH: process.env.PATH,
Path: process.env.Path,
- "npm_config_loglevel": "warn"
+ 'npm_config_loglevel': 'warn'
}
}, function (er, code, sout, serr) {
t.equal(sout, expected)
- t.equal(serr, "")
+ t.equal(serr, '')
t.end()
})
})
-test("clean", function (t) {
+test('clean', function (t) {
rimraf.sync(pkg)
t.end()
})
diff --git a/deps/npm/test/tap/uninstall-package.js b/deps/npm/test/tap/uninstall-package.js
index f62aa24dfc..6e86df531a 100644
--- a/deps/npm/test/tap/uninstall-package.js
+++ b/deps/npm/test/tap/uninstall-package.js
@@ -1,42 +1,79 @@
-var test = require("tap").test
- , npm = require("../../")
- , rimraf = require("rimraf")
- , mr = require("npm-registry-mock")
- , common = require("../common-tap.js")
- , path = require("path")
- , pkg = path.join(__dirname, "uninstall-package")
-
-test("returns a list of removed items", function (t) {
- t.plan(1)
- mr({port : common.port}, function (er, s) {
- setup(function () {
- npm.install(".", function (err) {
- if (err) return t.fail(err)
- npm.uninstall("underscore", "request", "lala", function (err, d) {
- if (err) return t.fail(err)
- t.same(d.sort(), ["underscore", "request"].sort())
- s.close()
- t.end()
- })
- })
- })
- })
-})
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+
+var pkg = path.join(__dirname, 'uninstall-package')
-test("cleanup", function (t) {
+var EXEC_OPTS = { cwd: pkg }
+
+var json = {
+ name: 'uninstall-package',
+ version: '0.0.0',
+ dependencies: {
+ underscore: '~1.3.1',
+ request: '~0.9.0'
+ }
+}
+
+test('setup', function (t) {
cleanup()
+ mkdirp.sync(pkg)
+ process.chdir(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
t.end()
})
-function setup (cb) {
- cleanup()
- process.chdir(pkg)
- npm.load({cache: pkg + "/cache", registry: common.registry}, function () {
- cb()
+test('returns a list of removed items', function (t) {
+ mr({ port: common.port }, function (er, s) {
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ 'install', '.'
+ ],
+ EXEC_OPTS,
+ function (err, code, stdout, stderr) {
+ t.ifError(err, 'install ran without issue')
+ t.notOk(code, 'install ran without raising error code')
+ common.npm(
+ [
+ '--registry', common.registry,
+ '--loglevel', 'silent',
+ 'uninstall', 'underscore', 'request', 'lala'
+ ],
+ EXEC_OPTS,
+ function (err, code, stdout, stderr) {
+ t.ifError(err, 'uninstall ran without issue')
+ t.notOk(code, 'uninstall ran without raising error code')
+ t.has(stdout, /unbuild underscore@1.3.3/, 'underscore uninstalled')
+ t.has(stdout, /unbuild request@0.9.5/, 'request uninstalled')
+
+ s.close()
+ t.end()
+ }
+ )
+ }
+ )
})
-}
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
function cleanup () {
- rimraf.sync(pkg + "/node_modules")
- rimraf.sync(pkg + "/cache")
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/uninstall-package/package.json b/deps/npm/test/tap/uninstall-package/package.json
deleted file mode 100644
index 49ce42a89d..0000000000
--- a/deps/npm/test/tap/uninstall-package/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "beep",
- "version": "0.0.0",
- "author": "Rockbert",
- "description": "i am a fixture",
- "main": "index.js",
- "dependencies": {
- "underscore": "~1.3.1",
- "request": "~0.9.0"
- }
-}
diff --git a/deps/npm/test/tap/unpack-foreign-tarball.js b/deps/npm/test/tap/unpack-foreign-tarball.js
index b998175b66..56d707c31a 100644
--- a/deps/npm/test/tap/unpack-foreign-tarball.js
+++ b/deps/npm/test/tap/unpack-foreign-tarball.js
@@ -1,82 +1,88 @@
-var test = require("tap").test
-var rimraf = require("rimraf")
-var mkdirp = require("mkdirp")
-var common = require("../common-tap.js")
-var path = require("path")
-var fs = require("fs")
-var dir = path.resolve(__dirname, "unpack-foreign-tarball")
-var root = path.resolve(dir, "root")
-var nm = path.resolve(root, "node_modules")
-var cache = path.resolve(dir, "cache")
-var tmp = path.resolve(dir, "tmp")
-var pkg = path.resolve(nm, "npm-test-gitignore")
+var fs = require('graceful-fs')
+var path = require('path')
-var env = {
- "npm_config_cache": cache,
- "npm_config_tmp": tmp
-}
+var test = require('tap').test
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+
+var common = require('../common-tap.js')
+
+var fixtures = path.resolve(__dirname, '..', 'fixtures')
+
+var pkg = path.resolve(__dirname, 'unpack-foreign-tarball')
+var nm = path.resolve(pkg, 'node_modules')
+var target = path.resolve(nm, 'npm-test-gitignore')
+var cache = path.resolve(pkg, 'cache')
+var tmp = path.resolve(pkg, 'tmp')
-var conf = {
- env: env,
- cwd: root,
- stdio: [ "pipe", "pipe", 2 ]
+var EXEC_OPTS = {
+ env: {
+ 'npm_config_cache': cache,
+ 'npm_config_tmp': tmp
+ },
+ cwd: pkg,
+ stdio: [ 'pipe', 'pipe', 2 ]
}
function verify (t, files, err, code) {
if (code) {
- t.fail("exited with failure: " + code)
+ t.fail('exited with failure: ' + code)
return t.end()
}
- var actual = fs.readdirSync(pkg).sort()
- var expect = files.concat([".npmignore", "package.json"]).sort()
+ var actual = fs.readdirSync(target).sort()
+ var expect = files.concat(['.npmignore', 'package.json']).sort()
t.same(actual, expect)
t.end()
}
-test("npmignore only", function (t) {
+test('setup', function (t) {
setup()
- var file = path.resolve(dir, "npmignore.tgz")
- common.npm(["install", file], conf, verify.bind(null, t, ["foo"]))
+ t.comment('test for https://github.com/npm/npm/issues/5658')
+ t.end()
+})
+
+test('npmignore only', function (t) {
+ var file = path.resolve(fixtures, 'npmignore.tgz')
+ common.npm(['install', file], EXEC_OPTS, verify.bind(null, t, ['foo']))
})
-test("gitignore only", function (t) {
+test('gitignore only', function (t) {
setup()
- var file = path.resolve(dir, "gitignore.tgz")
- common.npm(["install", file], conf, verify.bind(null, t, ["foo"]))
+ var file = path.resolve(fixtures, 'gitignore.tgz')
+ common.npm(['install', file], EXEC_OPTS, verify.bind(null, t, ['foo']))
})
-test("gitignore and npmignore", function (t) {
+test('gitignore and npmignore', function (t) {
setup()
- var file = path.resolve(dir, "gitignore-and-npmignore.tgz")
- common.npm(["install", file], conf, verify.bind(null, t, ["foo", "bar"]))
+ var file = path.resolve(fixtures, 'gitignore-and-npmignore.tgz')
+ common.npm(['install', file], EXEC_OPTS, verify.bind(null, t, ['foo', 'bar']))
})
-test("gitignore and npmignore, not gzipped 1/2", function (t) {
+test('gitignore and npmignore, not gzipped 1/2', function (t) {
setup()
- var file = path.resolve(dir, "gitignore-and-npmignore.tar")
- common.npm(["install", file], conf, verify.bind(null, t, ["foo", "bar"]))
+ var file = path.resolve(fixtures, 'gitignore-and-npmignore.tar')
+ common.npm(['install', file], EXEC_OPTS, verify.bind(null, t, ['foo', 'bar']))
})
-test("gitignore and npmignore, not gzipped 2/2", function (t) {
+test('gitignore and npmignore, not gzipped 2/2', function (t) {
setup()
- var file = path.resolve(dir, "gitignore-and-npmignore-2.tar")
- common.npm(["install", file], conf, verify.bind(null, t, ["foo", "bar"]))
+ var file = path.resolve(fixtures, 'gitignore-and-npmignore-2.tar')
+ common.npm(['install', file], EXEC_OPTS, verify.bind(null, t, ['foo', 'bar']))
})
-test("clean", function (t) {
- clean()
+test('cleanup', function (t) {
+ cleanup()
t.end()
})
function setup () {
- clean()
+ cleanup()
mkdirp.sync(nm)
- mkdirp.sync(cache)
mkdirp.sync(tmp)
}
-function clean () {
- rimraf.sync(root)
- rimraf.sync(cache)
- rimraf.sync(tmp)
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/update-index.js b/deps/npm/test/tap/update-index.js
index cf305900c7..0586269722 100644
--- a/deps/npm/test/tap/update-index.js
+++ b/deps/npm/test/tap/update-index.js
@@ -1,23 +1,28 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var npm = require("../../")
-var mkdirp = require("mkdirp")
-var rimraf = require("rimraf")
-var path = require("path")
-var mr = require("npm-registry-mock")
+var common = require('../common-tap.js')
+var test = require('tap').test
+var npm = require('../../')
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var path = require('path')
+var mr = require('npm-registry-mock')
-var updateIndex = require("../../lib/cache/update-index.js")
+var updateIndex = require('../../lib/cache/update-index.js')
-var PKG_DIR = path.resolve(__dirname, "get-basic")
-var CACHE_DIR = path.resolve(PKG_DIR, "cache")
+var PKG_DIR = path.resolve(__dirname, 'get-basic')
+var CACHE_DIR = path.resolve(PKG_DIR, 'cache')
var server
-function setup (t, mock) {
+function setup (t, mock, extra) {
mkdirp.sync(CACHE_DIR)
mr({ port: common.port, plugin: mock }, function (er, s) {
npm.load({ cache: CACHE_DIR, registry: common.registry }, function (err) {
- t.ifError(err, "no error")
+ if (extra) {
+ Object.keys(extra).forEach(function (k) {
+ npm.config.set(k, extra[k], 'user')
+ })
+ }
+ t.ifError(err, 'no error')
server = s
t.end()
})
@@ -32,158 +37,159 @@ function cleanup (t) {
})
}
-test("setup basic", function (t) {
+test('setup basic', function (t) {
setup(t, mocks.basic)
})
-test("request basic", function (t) {
- updateIndex("http://localhost:1337/-/all", {}, function (er) {
- t.ifError(er, "no error")
+test('request basic', function (t) {
+ updateIndex(0, function (er) {
+ t.ifError(er, 'no error')
t.end()
})
})
-test("cleanup basic", cleanup)
+test('cleanup basic', cleanup)
-test("setup auth", function (t) {
+test('setup auth', function (t) {
setup(t, mocks.auth)
})
-test("request auth failure", function (t) {
- updateIndex("http://localhost:1337/-/all", {}, function (er) {
- t.ok(er.code, "E401")
- t.ok(/^unauthorized/.test(er.message), "unauthorized message")
+test('request auth failure', function (t) {
+ updateIndex(0, function (er) {
+ t.equals(er.code, 'E401', 'gotta get that auth')
+ t.ok(/^unauthorized/.test(er.message), 'unauthorized message')
t.end()
})
})
-test("request auth success", function (t) {
+test('cleanup auth failure', cleanup)
+
+test('setup auth', function (t) {
// mimic as if alwaysAuth had been set
- var params = {
- auth: {
- username: "bobby",
- password: "tables",
- alwaysAuth: true
- }
- }
+ setup(t, mocks.auth, {
+ _auth: new Buffer('bobby:tables').toString('base64'),
+ 'always-auth': true
+ })
+})
- updateIndex("http://localhost:1337/-/all", params, function (er) {
- t.ifError(er, "no error")
+test('request auth success', function (t) {
+ updateIndex(0, function (er) {
+ t.ifError(er, 'no error')
t.end()
})
})
-test("cleanup auth", cleanup)
+test('cleanup auth', cleanup)
var mocks = {
basic: function (mock) {
- mock.get("/-/all").reply(200, allMock)
+ mock.get('/-/all').reply(200, allMock)
},
auth: function (mock) {
- var littleBobbyTablesAuth = new Buffer("bobby:tables").toString("base64")
- var auth = "Basic " + littleBobbyTablesAuth
- mock.get("/-/all", { authorization: auth }).reply(200, allMock)
- mock.get("/-/all").reply(401, {
- error: "unauthorized",
- reason: "You are not authorized to access this db."
+ var littleBobbyTablesAuth = new Buffer('bobby:tables').toString('base64')
+ var auth = 'Basic ' + littleBobbyTablesAuth
+ mock.get('/-/all', { authorization: auth }).reply(200, allMock)
+ mock.get('/-/all').reply(401, {
+ error: 'unauthorized',
+ reason: 'You are not authorized to access this db.'
})
}
}
var allMock = {
- "_updated": 1411727900+25,
- "generator-frontcow": {
- "name": "generator-frontcow",
- "description": "f36b6a6123da50959741e2ce4d634f96ec668c56 This is a fake description to ensure we do not accidentally search the real npm registry or use some kind of cache",
- "dist-tags": {
- "latest": "0.1.19"
+ '_updated': 1411727900 + 25,
+ 'generator-frontcow': {
+ 'name': 'generator-frontcow',
+ 'description': 'f36b6a6123da50959741e2ce4d634f96ec668c56 This is a fake description to ensure we do not accidentally search the real npm registry or use some kind of cache',
+ 'dist-tags': {
+ 'latest': '0.1.19'
},
- "maintainers": [
+ 'maintainers': [
{
- "name": "bcabanes",
- "email": "contact@benjamincabanes.com"
+ 'name': 'bcabanes',
+ 'email': 'contact@benjamincabanes.com'
}
],
- "homepage": "https://github.com/bcabanes/generator-frontcow",
- "keywords": [
- "sass",
- "frontend",
- "yeoman-generator",
- "atomic",
- "design",
- "sass",
- "foundation",
- "foundation5",
- "atomic design",
- "bourbon",
- "polyfill",
- "font awesome"
+ 'homepage': 'https://github.com/bcabanes/generator-frontcow',
+ 'keywords': [
+ 'sass',
+ 'frontend',
+ 'yeoman-generator',
+ 'atomic',
+ 'design',
+ 'sass',
+ 'foundation',
+ 'foundation5',
+ 'atomic design',
+ 'bourbon',
+ 'polyfill',
+ 'font awesome'
],
- "repository": {
- "type": "git",
- "url": "https://github.com/bcabanes/generator-frontcow"
+ 'repository': {
+ 'type': 'git',
+ 'url': 'https://github.com/bcabanes/generator-frontcow'
},
- "author": {
- "name": "ben",
- "email": "contact@benjamincabanes.com",
- "url": "https://github.com/bcabanes"
+ 'author': {
+ 'name': 'ben',
+ 'email': 'contact@benjamincabanes.com',
+ 'url': 'https://github.com/bcabanes'
},
- "bugs": {
- "url": "https://github.com/bcabanes/generator-frontcow/issues"
+ 'bugs': {
+ 'url': 'https://github.com/bcabanes/generator-frontcow/issues'
},
- "license": "MIT",
- "readmeFilename": "README.md",
- "time": {
- "modified": "2014-10-03T02:26:18.406Z"
+ 'license': 'MIT',
+ 'readmeFilename': 'README.md',
+ 'time': {
+ 'modified': '2014-10-03T02:26:18.406Z'
},
- "versions": {
- "0.1.19": "latest"
+ 'versions': {
+ '0.1.19': 'latest'
}
},
- "marko": {
- "name": "marko",
- "description": "Marko is an extensible, streaming, asynchronous, high performance, HTML-based templating language that can be used in Node.js or in the browser.",
- "dist-tags": {
- "latest": "1.2.16"
+ 'marko': {
+ 'name': 'marko',
+ 'description': 'Marko is an extensible, streaming, asynchronous, high performance, HTML-based templating language that can be used in Node.js or in the browser.',
+ 'dist-tags': {
+ 'latest': '1.2.16'
},
- "maintainers": [
+ 'maintainers': [
{
- "name": "pnidem",
- "email": "pnidem@gmail.com"
+ 'name': 'pnidem',
+ 'email': 'pnidem@gmail.com'
},
{
- "name": "philidem",
- "email": "phillip.idem@gmail.com"
+ 'name': 'philidem',
+ 'email': 'phillip.idem@gmail.com'
}
],
- "homepage": "https://github.com/raptorjs/marko",
- "keywords": [
- "templating",
- "template",
- "async",
- "streaming"
+ 'homepage': 'https://github.com/raptorjs/marko',
+ 'keywords': [
+ 'templating',
+ 'template',
+ 'async',
+ 'streaming'
],
- "repository": {
- "type": "git",
- "url": "https://github.com/raptorjs/marko.git"
+ 'repository': {
+ 'type': 'git',
+ 'url': 'https://github.com/raptorjs/marko.git'
},
- "author": {
- "name": "Patrick Steele-Idem",
- "email": "pnidem@gmail.com"
+ 'author': {
+ 'name': 'Patrick Steele-Idem',
+ 'email': 'pnidem@gmail.com'
},
- "bugs": {
- "url": "https://github.com/raptorjs/marko/issues"
+ 'bugs': {
+ 'url': 'https://github.com/raptorjs/marko/issues'
},
- "license": "Apache License v2.0",
- "readmeFilename": "README.md",
- "users": {
- "pnidem": true
+ 'license': 'Apache License v2.0',
+ 'readmeFilename': 'README.md',
+ 'users': {
+ 'pnidem': true
},
- "time": {
- "modified": "2014-10-03T02:27:31.775Z"
+ 'time': {
+ 'modified': '2014-10-03T02:27:31.775Z'
},
- "versions": {
- "1.2.16": "latest"
+ 'versions': {
+ '1.2.16': 'latest'
}
}
}
diff --git a/deps/npm/test/tap/update-save.js b/deps/npm/test/tap/update-save.js
index d246fa8a45..f01fa0f542 100644
--- a/deps/npm/test/tap/update-save.js
+++ b/deps/npm/test/tap/update-save.js
@@ -1,161 +1,219 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var npm = require("../../")
-var mkdirp = require("mkdirp")
-var rimraf = require("rimraf")
-var fs = require("fs")
-var path = require("path")
-var mr = require("npm-registry-mock")
-
-var PKG_DIR = path.resolve(__dirname, "update-save")
-var PKG = path.resolve(PKG_DIR, "package.json")
-var CACHE_DIR = path.resolve(PKG_DIR, "cache")
-var MODULES_DIR = path.resolve(PKG_DIR, "node_modules")
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap.js')
+var server
+
+var pkg = path.resolve(__dirname, 'update-save')
+var cache = path.resolve(pkg, 'cache')
var EXEC_OPTS = {
- cwd: PKG_DIR,
- stdio: "ignore",
+ cwd: pkg,
+ stdio: 'ignore',
env: {
- "npm_config_registry": common.registry,
- "npm_config_loglevel": "verbose",
- "npm_config_save_prefix": "^"
+ npm_config_registry: common.registry,
+ npm_config_loglevel: 'verbose',
+ npm_config_save_prefix: '^'
}
}
-var DEFAULT_PKG = {
- "name": "update-save-example",
- "version": "1.2.3",
- "dependencies": {
- "mkdirp": "~0.3.0"
+var json = {
+ name: 'update-save-example',
+ version: '1.2.3',
+ dependencies: {
+ mkdirp: '~0.3.0'
},
- "devDependencies": {
- "underscore": "~1.3.1"
+ devDependencies: {
+ underscore: '~1.3.1'
}
}
-var s // mock server reference
+function clone (a) {
+ return extend({}, a)
+}
+
+function extend (a, b) {
+ for (var key in b) { a[key] = b[key] }
+ return a
+}
-test("setup", function (t) {
- resetPackage()
+test('setup', function (t) {
+ setup()
- mr({port : common.port}, function (er, server) {
- npm.load({cache: CACHE_DIR, registry: common.registry}, function (err) {
- t.ifError(err)
- s = server
- t.end()
- })
+ mr({ port: common.port }, function (er, s) {
+ t.ifError(er)
+ server = s
+ t.end()
})
})
-test("update regular dependencies only", function (t) {
- resetPackage()
+test('update regular dependencies only', function (t) {
+ setup()
- common.npm(["update", "--save"], EXEC_OPTS, function (err, code) {
+ common.npm(['update', '--save'], EXEC_OPTS, function (err, code) {
t.ifError(err)
- t.notOk(code, "npm update exited with code 0")
+ t.notOk(code, 'npm update exited with code 0')
+
+ var pkgdata = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json'), 'utf8'))
+ t.deepEqual(
+ pkgdata.dependencies,
+ { mkdirp: '^0.3.5' },
+ 'only dependencies updated'
+ )
+ t.deepEqual(
+ pkgdata.devDependencies,
+ json.devDependencies,
+ 'dev dependencies should be untouched'
+ )
+ t.deepEqual(
+ pkgdata.optionalDependencies,
+ json.optionalDependencies,
+ 'optional dependencies should be untouched'
+ )
- var pkgdata = JSON.parse(fs.readFileSync(PKG, "utf8"))
- t.deepEqual(pkgdata.dependencies, {mkdirp: "^0.3.5"}, "only dependencies updated")
- t.deepEqual(pkgdata.devDependencies, DEFAULT_PKG.devDependencies, "dev dependencies should be untouched")
- t.deepEqual(pkgdata.optionalDependencies, DEFAULT_PKG.optionalDependencies, "optional dependencies should be untouched")
t.end()
})
})
-test("update devDependencies only", function (t) {
- resetPackage()
+test('update devDependencies only', function (t) {
+ setup()
- common.npm(["update", "--save-dev"], EXEC_OPTS, function (err, code) {
+ common.npm(['update', '--save-dev'], EXEC_OPTS, function (err, code) {
t.ifError(err)
- t.notOk(code, "npm update exited with code 0")
+ t.notOk(code, 'npm update exited with code 0')
+
+ var pkgdata = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json'), 'utf8'))
+ t.deepEqual(
+ pkgdata.dependencies,
+ json.dependencies,
+ 'dependencies should be untouched'
+ )
+ t.deepEqual(
+ pkgdata.devDependencies,
+ { underscore: '^1.3.3' },
+ 'dev dependencies should be updated'
+ )
+ t.deepEqual(
+ pkgdata.optionalDependencies,
+ json.optionalDependencies,
+ 'optional dependencies should be untouched'
+ )
- var pkgdata = JSON.parse(fs.readFileSync(PKG, "utf8"))
- t.deepEqual(pkgdata.dependencies, DEFAULT_PKG.dependencies, "dependencies should be untouched")
- t.deepEqual(pkgdata.devDependencies, {underscore: "^1.3.3"}, "dev dependencies should be updated")
- t.deepEqual(pkgdata.optionalDependencies, DEFAULT_PKG.optionalDependencies, "optional dependencies should be untouched")
t.end()
})
})
-test("update optionalDependencies only", function (t) {
- resetPackage({
- "optionalDependencies": {
- "underscore": "~1.3.1"
- }
- })
+test('update optionalDependencies only', function (t) {
+ setup({ optionalDependencies: { underscore: '~1.3.1' } })
- common.npm(["update", "--save-optional"], EXEC_OPTS, function (err, code) {
+ common.npm(['update', '--save-optional'], EXEC_OPTS, function (err, code) {
t.ifError(err)
- t.notOk(code, "npm update exited with code 0")
+ t.notOk(code, 'npm update exited with code 0')
+
+ var pkgdata = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json'), 'utf8'))
+ t.deepEqual(
+ pkgdata.dependencies,
+ json.dependencies,
+ 'dependencies should be untouched'
+ )
+ t.deepEqual(
+ pkgdata.devDependencies,
+ json.devDependencies,
+ 'dev dependencies should be untouched'
+ )
+ t.deepEqual(
+ pkgdata.optionalDependencies,
+ { underscore: '^1.3.3' },
+ 'optional dependencies should be updated'
+ )
- var pkgdata = JSON.parse(fs.readFileSync(PKG, "utf8"))
- t.deepEqual(pkgdata.dependencies, DEFAULT_PKG.dependencies, "dependencies should be untouched")
- t.deepEqual(pkgdata.devDependencies, DEFAULT_PKG.devDependencies, "dev dependencies should be untouched")
- t.deepEqual(pkgdata.optionalDependencies, {underscore: "^1.3.3"}, "optional dependencies should be updated")
t.end()
})
})
-test("optionalDependencies are merged into dependencies during --save", function (t) {
- var pkg = resetPackage({
- "optionalDependencies": {
- "underscore": "~1.3.1"
- }
- })
+test('optionalDependencies are merged into dependencies during --save', function (t) {
+ var cloned = setup({ optionalDependencies: { underscore: '~1.3.1' } })
- common.npm(["update", "--save"], EXEC_OPTS, function (err, code) {
+ common.npm(['update', '--save'], EXEC_OPTS, function (err, code) {
t.ifError(err)
- t.notOk(code, "npm update exited with code 0")
+ t.notOk(code, 'npm update exited with code 0')
+
+ var pkgdata = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json'), 'utf8'))
+ t.deepEqual(
+ pkgdata.dependencies,
+ { mkdirp: '^0.3.5' },
+ 'dependencies should not include optional dependencies'
+ )
+ t.deepEqual(
+ pkgdata.devDependencies,
+ cloned.devDependencies,
+ 'dev dependencies should be untouched'
+ )
+ t.deepEqual(
+ pkgdata.optionalDependencies,
+ cloned.optionalDependencies,
+ 'optional dependencies should be untouched'
+ )
- var pkgdata = JSON.parse(fs.readFileSync(PKG, "utf8"))
- t.deepEqual(pkgdata.dependencies, {mkdirp: "^0.3.5"}, "dependencies should not include optional dependencies")
- t.deepEqual(pkgdata.devDependencies, pkg.devDependencies, "dev dependencies should be untouched")
- t.deepEqual(pkgdata.optionalDependencies, pkg.optionalDependencies, "optional dependencies should be untouched")
t.end()
})
})
-test("semver prefix is replaced with configured save-prefix", function (t) {
- resetPackage()
+test('semver prefix is replaced with configured save-prefix', function (t) {
+ setup()
- common.npm(["update", "--save", "--save-prefix", "~"], EXEC_OPTS, function (err, code) {
+ common.npm(['update', '--save', '--save-prefix', '~'], EXEC_OPTS, function (err, code) {
t.ifError(err)
- t.notOk(code, "npm update exited with code 0")
-
- var pkgdata = JSON.parse(fs.readFileSync(PKG, "utf8"))
- t.deepEqual(pkgdata.dependencies, {
- mkdirp: "~0.3.5"
- }, "dependencies should be updated")
- t.deepEqual(pkgdata.devDependencies, DEFAULT_PKG.devDependencies, "dev dependencies should be untouched")
- t.deepEqual(pkgdata.optionalDependencies, DEFAULT_PKG.optionalDependencies, "optional dependencies should be updated")
+ t.notOk(code, 'npm update exited with code 0')
+
+ var pkgdata = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json'), 'utf8'))
+ t.deepEqual(
+ pkgdata.dependencies,
+ { mkdirp: '~0.3.5' },
+ 'dependencies should be updated'
+ )
+ t.deepEqual(
+ pkgdata.devDependencies,
+ json.devDependencies,
+ 'dev dependencies should be untouched'
+ )
+ t.deepEqual(
+ pkgdata.optionalDependencies,
+ json.optionalDependencies,
+ 'optional dependencies should be updated'
+ )
+
t.end()
})
})
-function resetPackage(extendWith) {
- rimraf.sync(CACHE_DIR)
- rimraf.sync(MODULES_DIR)
- mkdirp.sync(CACHE_DIR)
- var pkg = clone(DEFAULT_PKG)
- extend(pkg, extendWith)
- for (var key in extend) { pkg[key] = extend[key]}
- fs.writeFileSync(PKG, JSON.stringify(pkg, null, 2), "ascii")
- return pkg
-}
-
-test("cleanup", function (t) {
- s.close()
- resetPackage() // restore package.json
- rimraf.sync(CACHE_DIR)
- rimraf.sync(MODULES_DIR)
+test('cleanup', function (t) {
+ server.close()
+ cleanup()
t.end()
})
-function clone(a) {
- return extend({}, a)
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
}
-function extend(a, b) {
- for (var key in b) { a[key] = b[key]}
- return a
+function setup (extendWith) {
+ cleanup()
+ mkdirp.sync(cache)
+ process.chdir(pkg)
+
+ var template = clone(json)
+ extend(template, extendWith)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(template, null, 2)
+ )
+ return template
}
diff --git a/deps/npm/test/tap/update-save/README.md b/deps/npm/test/tap/update-save/README.md
deleted file mode 100644
index aca67ff17d..0000000000
--- a/deps/npm/test/tap/update-save/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# just a test
diff --git a/deps/npm/test/tap/update-save/index.js b/deps/npm/test/tap/update-save/index.js
deleted file mode 100644
index 33c1891f81..0000000000
--- a/deps/npm/test/tap/update-save/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = true
diff --git a/deps/npm/test/tap/update-save/package.json b/deps/npm/test/tap/update-save/package.json
deleted file mode 100644
index cb41e88cfe..0000000000
--- a/deps/npm/test/tap/update-save/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "update-save-example",
- "version": "1.2.3",
- "dependencies": {
- "mkdirp": "~0.3.0"
- },
- "devDependencies": {
- "underscore": "~1.3.1"
- }
-} \ No newline at end of file
diff --git a/deps/npm/test/tap/url-dependencies.js b/deps/npm/test/tap/url-dependencies.js
index a24e70e900..bc54da7110 100644
--- a/deps/npm/test/tap/url-dependencies.js
+++ b/deps/npm/test/tap/url-dependencies.js
@@ -1,74 +1,113 @@
-var test = require("tap").test
-var rimraf = require("rimraf")
-var path = require("path")
-var osenv = require("osenv")
-var mr = require("npm-registry-mock")
-var pkg = path.resolve(__dirname, "url-dependencies")
-var common = require("../common-tap")
+var fs = require('graceful-fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var mr = require('npm-registry-mock')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var common = require('../common-tap')
+var server
+
+var pkg = path.resolve(__dirname, 'url-dependencies')
+
+var json = {
+ author: 'Steve Mason',
+ name: 'url-dependencies',
+ version: '0.0.0',
+ dependencies: {
+ underscore: common.registry + '/underscore/-/underscore-1.3.1.tgz'
+ }
+}
var mockRoutes = {
- "get": {
- "/underscore/-/underscore-1.3.1.tgz": [200]
+ 'get': {
+ '/underscore/-/underscore-1.3.1.tgz': [200]
}
}
-test("url-dependencies: download first time", function (t) {
- cleanup()
+test('setup', function (t) {
+ mr({ port: common.port, mocks: mockRoutes }, function (er, s) {
+ server = s
+ t.end()
+ })
+})
- performInstall(t, function (output){
- if (!tarballWasFetched(output)){
- t.fail("Tarball was not fetched")
+test('url-dependencies: download first time', function (t) {
+ setup()
+
+ performInstall(t, function (output) {
+ if (!tarballWasFetched(output)) {
+ t.fail('Tarball was not fetched')
} else {
- t.pass("Tarball was fetched")
+ t.pass('Tarball was fetched')
}
t.end()
})
})
-test("url-dependencies: do not download subsequent times", function (t) {
- cleanup()
+test('url-dependencies: do not download subsequent times', function (t) {
+ setup()
performInstall(t, function () {
performInstall(t, function (output) {
- if (tarballWasFetched(output)){
- t.fail("Tarball was fetched second time around")
+ if (tarballWasFetched(output)) {
+ t.fail('Tarball was fetched second time around')
} else {
- t.pass("Tarball was not fetched")
+ t.pass('Tarball was not fetched')
}
t.end()
})
})
})
-function tarballWasFetched(output){
- return output.indexOf("http fetch GET " + common.registry + "/underscore/-/underscore-1.3.1.tgz") > -1
+test('cleanup', function (t) {
+ server.close()
+ cleanup()
+ t.end()
+})
+
+function cleanup () {
+ // windows fix for locked files
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(path.resolve(pkg))
+}
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+}
+
+function tarballWasFetched (output) {
+ return output.indexOf(
+ 'http fetch GET ' +
+ common.registry +
+ '/underscore/-/underscore-1.3.1.tgz'
+ ) > -1
}
function performInstall (t, cb) {
- mr({port: common.port, mocks: mockRoutes}, function (er, s) {
- var opts = {
- cwd : pkg,
- env: {
- "npm_config_registry": common.registry,
- "npm_config_cache_lock_stale": 1000,
- "npm_config_cache_lock_wait": 1000,
- "npm_config_loglevel": "http",
- HOME: process.env.HOME,
- Path: process.env.PATH,
- PATH: process.env.PATH
- }
+ var opts = {
+ cwd: pkg,
+ env: {
+ npm_config_registry: common.registry,
+ npm_config_cache_lock_stale: 1000,
+ npm_config_cache_lock_wait: 1000,
+ npm_config_loglevel: 'http',
+ HOME: process.env.HOME,
+ Path: process.env.PATH,
+ PATH: process.env.PATH
}
- common.npm(["install"], opts, function (err, code, stdout, stderr) {
- t.ifError(err, "install success")
- t.notOk(code, "npm install exited with code 0")
- s.close()
- cb(stderr)
- })
- })
-}
+ }
+ common.npm(['install'], opts, function (err, code, stdout, stderr) {
+ t.ifError(err, 'install success')
+ t.notOk(code, 'npm install exited with code 0')
-function cleanup() {
- // windows fix for locked files
- process.chdir(osenv.tmpdir())
- rimraf.sync(path.resolve(pkg, "node_modules"))
+ cb(stderr)
+ })
}
diff --git a/deps/npm/test/tap/url-dependencies/package.json b/deps/npm/test/tap/url-dependencies/package.json
deleted file mode 100644
index 96ae3e247d..0000000000
--- a/deps/npm/test/tap/url-dependencies/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "author": "Steve Mason",
- "name": "url-dependencies",
- "version": "0.0.0",
- "dependencies": {
- "underscore": "http://localhost:1337/underscore/-/underscore-1.3.1.tgz"
- }
-}
diff --git a/deps/npm/test/tap/version-message-config.js b/deps/npm/test/tap/version-message-config.js
index 7ce3b4c6bc..fca0d5d9af 100644
--- a/deps/npm/test/tap/version-message-config.js
+++ b/deps/npm/test/tap/version-message-config.js
@@ -2,7 +2,6 @@ var common = require('../common-tap.js')
var fs = require('fs')
var path = require('path')
-var chain = require('slide').chain
var mkdirp = require('mkdirp')
var osenv = require('osenv')
var rimraf = require('rimraf')
@@ -25,44 +24,33 @@ test('npm version <semver> with message config', function (t) {
npm.load({ prefix: pkg, userconfig: npmrc }, function () {
var git = require('../../lib/utils/git.js')
- var opts = { cwd: pkg, env: { PATH: process.env.PATH } }
- chain(
- [
- git.chainableExec(['init'], opts),
- git.chainableExec(['config', 'user.name', 'PhantomFaker'], opts),
- git.chainableExec(['config', 'user.email', 'nope@not.real'], opts),
- git.chainableExec(['add', 'package.json'], opts),
- git.chainableExec(['add', '.npmrc'], opts),
- git.chainableExec(['commit', '-m', 'stub package'], opts)
- ],
- function (er) {
- t.ifErr(er, 'git bootstrap ran without error')
+ common.makeGitRepo({ path: pkg }, function (er) {
+ t.ifErr(er, 'git bootstrap ran without error')
- common.npm(
- [
- 'version',
- 'patch',
- '--loglevel', 'silent'
- // package config is picked up from env
- ],
- opts,
- function (err, code, stdout, stderr) {
- t.ifError(err, 'npm version ran without issue')
- t.notOk(code, 'exited with a non-error code')
- t.notOk(stderr, 'no error output')
+ common.npm(
+ [
+ 'version',
+ 'patch',
+ '--loglevel', 'silent'
+ // package config is picked up from env
+ ],
+ { cwd: pkg, env: { PATH: process.env.PATH } },
+ function (err, code, stdout, stderr) {
+ t.ifError(err, 'npm version ran without issue')
+ t.notOk(code, 'exited with a non-error code')
+ t.notOk(stderr, 'no error output')
- git.whichAndExec(
- ['log'],
- { cwd: pkg, env: process.env },
- function (er, log, stderr) {
- t.ok(log.match(/:bookmark: 0\.1\.3/g), 'config was picked up by version')
- t.end()
- }
- )
- }
- )
- }
- )
+ git.whichAndExec(
+ ['log'],
+ { cwd: pkg, env: process.env },
+ function (er, log, stderr) {
+ t.ok(log.match(/:bookmark: 0\.1\.3/g), 'config was picked up by version')
+ t.end()
+ }
+ )
+ }
+ )
+ })
})
})
diff --git a/deps/npm/test/tap/version-update-shrinkwrap.js b/deps/npm/test/tap/version-update-shrinkwrap.js
index 204c7323b3..acf6cca8e5 100644
--- a/deps/npm/test/tap/version-update-shrinkwrap.js
+++ b/deps/npm/test/tap/version-update-shrinkwrap.js
@@ -1,230 +1,115 @@
-var common = require("../common-tap.js")
-var test = require("tap").test
-var npm = require("../../")
-var osenv = require("osenv")
-var path = require("path")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var mkdirp = require("mkdirp")
-var which = require("which")
-var spawn = require("child_process").spawn
-
-var pkg = path.resolve(__dirname, "version-shrinkwrap")
-var cache = path.resolve(pkg, "cache")
-
-test("npm version <semver> updates shrinkwrap - no git", function (t) {
+var fs = require('fs')
+var path = require('path')
+
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var npm = require('../../')
+var common = require('../common-tap.js')
+
+var pkg = path.resolve(__dirname, 'version-shrinkwrap')
+var cache = path.resolve(pkg, 'cache')
+
+test('npm version <semver> updates shrinkwrap - no git', function (t) {
setup()
- npm.load({ cache: pkg + "/cache", registry: common.registry }, function () {
- npm.commands.version(["patch"], function(err) {
- if (err) return t.fail("Error perform version patch")
- var shrinkwrap = require(path.resolve(pkg, "npm-shrinkwrap.json"))
- t.equal(shrinkwrap.version, "0.0.1", "got expected version")
+ npm.load({ cache: pkg + '/cache', registry: common.registry }, function () {
+ npm.commands.version(['patch'], function (err) {
+ if (err) return t.fail('Error perform version patch')
+ var shrinkwrap = require(path.resolve(pkg, 'npm-shrinkwrap.json'))
+ t.equal(shrinkwrap.version, '0.0.1', 'got expected version')
t.end()
})
})
})
-test("npm version <semver> updates git works with no shrinkwrap", function (t) {
+test('npm version <semver> updates git works with no shrinkwrap', function (t) {
setup()
+ rimraf.sync(path.resolve(pkg, 'npm-shrinkwrap.json'))
- rimraf.sync(path.resolve(pkg, "npm-shrinkwrap.json"))
-
- var opts = {
- cache : cache,
- registry : common.registry
- }
- npm.load(opts, function () {
- npm.config.set("sign-git-tag", false)
- which("git", function (err, git) {
- if (err) t.fail("Git not installed, or which git command error")
+ npm.config.set('sign-git-tag', false)
- initRepo()
+ common.makeGitRepo({
+ path: pkg,
+ added: ['package.json']
+ }, version)
- function initRepo () {
- var init = spawn(git, ["init"])
- init.stdout.pipe(process.stdout)
- init.on("exit", function (code) {
- t.notOk(code, "git init exited without issue")
-
- configName()
- })
- }
-
- function configName () {
- var namer = spawn(git, ["config", "user.name", "Phantom Faker"])
- namer.stdout.pipe(process.stdout)
- namer.on("exit", function (code) {
- t.notOk(code, "git config user.name exited without issue")
-
- configEmail()
- })
- }
+ function version (er, stdout, stderr) {
+ t.ifError(er, 'git repo initialized without issue')
+ t.notOk(stderr, 'no error output')
- function configEmail () {
- var emailer = spawn(git, ["config", "user.email", "nope@not.real"])
- emailer.stdout.pipe(process.stdout)
- emailer.on("exit", function (code) {
- t.notOk(code, "git config user.email exited without issue")
-
- addAll()
- })
- }
-
- function addAll () {
- var emailer = spawn(git, ["add", "package.json"])
- emailer.stdout.pipe(process.stdout)
- emailer.on("exit", function (code) {
- t.notOk(code, "git add package.json exited without issue")
-
- commit()
- })
-
- }
+ npm.commands.version(['patch'], checkCommit)
+ }
- function commit () {
- var emailer = spawn(git, ["commit", "-m", "test setup"])
- emailer.stdout.pipe(process.stdout)
- emailer.on("exit", function (code) {
- t.notOk(code, "git commit -m 'test setup' exited without issue")
+ function checkCommit (er) {
+ t.ifError(er, 'version command ran without error')
- version()
- })
+ var shrinkwrap = require(path.resolve(pkg, 'npm-shrinkwrap.json'))
+ t.equal(shrinkwrap.version, '0.0.1', 'got expected version')
- }
+ var opts = { cwd: pkg, env: { PATH: process.env.PATH }}
+ var git = require('../../lib/utils/git.js')
+ git.whichAndExec(
+ ['show', 'HEAD', '--name-only'],
+ opts,
+ function (er, stdout, stderr) {
+ t.ifError(er, 'git show ran without issues')
+ t.notOk(stderr, 'no error output')
- function version () {
- npm.commands.version(["patch"], checkCommit)
- }
+ var lines = stdout.split('\n')
+ t.notEqual(lines.indexOf('package.json'), -1, 'package.json commited')
+ t.equal(lines.indexOf('npm-shrinkwrap.json'), -1, 'npm-shrinkwrap.json not present')
- function checkCommit (er) {
- t.ifError(er, "version command ran without error")
-
- var shrinkwrap = require(path.resolve(pkg, "npm-shrinkwrap.json"))
- t.equal(shrinkwrap.version, "0.0.1", "got expected version")
-
- var shower = spawn(git, ["show", "HEAD", "--name-only"])
- var out = "", eout = ""
- shower.stdout.on("data", function (d) {
- out += d.toString()
- })
- shower.stderr.on("data", function (d) {
- eout += d.toString()
- })
- shower.on("exit", function (code) {
- t.notOk(code, "git show HEAD exited without issue")
- t.notOk(err, "git show produced no error output")
-
- var lines = out.split("\n")
- t.notEqual(lines.indexOf("package.json"), -1, "package.json commited")
- t.equal(lines.indexOf("npm-shrinkwrap.json"), -1, "npm-shrinkwrap.json not present")
-
- t.end()
- })
+ t.end()
}
- })
- })
+ )
+ }
})
-test("npm version <semver> updates shrinkwrap and updates git", function (t) {
+test('npm version <semver> updates shrinkwrap and updates git', function (t) {
setup()
- var opts = {
- cache : cache,
- registry : common.registry
- }
- npm.load(opts, function () {
- npm.config.set("sign-git-tag", false)
- which("git", function (err, git) {
- t.ifError(err, "git found")
-
- initRepo()
-
- function initRepo () {
- var init = spawn(git, ["init"])
- init.stdout.pipe(process.stdout)
- init.on("exit", function (code) {
- t.notOk(code, "git init exited without issue")
-
- configName()
- })
- }
-
- function configName () {
- var namer = spawn(git, ["config", "user.name", "Phantom Faker"])
- namer.stdout.pipe(process.stdout)
- namer.on("exit", function (code) {
- t.notOk(code, "git config user.name exited without issue")
-
- configEmail()
- })
- }
-
- function configEmail () {
- var emailer = spawn(git, ["config", "user.email", "nope@not.real"])
- emailer.stdout.pipe(process.stdout)
- emailer.on("exit", function (code) {
- t.notOk(code, "git config user.email exited without issue")
-
- addAll()
- })
- }
+ npm.config.set('sign-git-tag', false)
- function addAll () {
- var emailer = spawn(git, ["add", "package.json", "npm-shrinkwrap.json"])
- emailer.stdout.pipe(process.stdout)
- emailer.on("exit", function (code) {
- t.notOk(code, "git add package.json npm-shrinkwrap.json exited without issue")
+ common.makeGitRepo({
+ path: pkg,
+ added: ['package.json', 'npm-shrinkwrap.json']
+ }, version)
- commit()
- })
+ function version (er, stdout, stderr) {
+ t.ifError(er, 'git repo initialized without issue')
+ t.notOk(stderr, 'no error output')
- }
+ npm.commands.version(['patch'], checkCommit)
+ }
- function commit () {
- var emailer = spawn(git, ["commit", "-m", "test setup"])
- emailer.stdout.pipe(process.stdout)
- emailer.on("exit", function (code) {
- t.notOk(code, "git commit -m 'test setup' exited without issue")
+ function checkCommit (er) {
+ t.ifError(er, 'version command ran without error')
- version()
- })
+ var shrinkwrap = require(path.resolve(pkg, 'npm-shrinkwrap.json'))
+ t.equal(shrinkwrap.version, '0.0.1', 'got expected version')
- }
+ var git = require('../../lib/utils/git.js')
+ var opts = { cwd: pkg, env: { PATH: process.env.PATH }}
+ git.whichAndExec(
+ ['show', 'HEAD', '--name-only'],
+ opts,
+ function (er, stdout, stderr) {
+ t.ifError(er, 'git show ran without issues')
+ t.notOk(stderr, 'no error output')
- function version () {
- npm.commands.version(["patch"], checkCommit)
- }
+ var lines = stdout.split('\n')
+ t.notEqual(lines.indexOf('package.json'), -1, 'package.json commited')
+ t.notEqual(lines.indexOf('npm-shrinkwrap.json'), -1, 'npm-shrinkwrap.json commited')
- function checkCommit (er) {
- t.ifError(er, "version command ran without error")
-
- var shrinkwrap = require(path.resolve(pkg, "npm-shrinkwrap.json"))
- t.equal(shrinkwrap.version, "0.0.1", "got expected version")
-
- var shower = spawn(git, ["show", "HEAD", "--name-only"])
- var out = "", eout = ""
- shower.stdout.on("data", function (d) {
- out += d.toString()
- })
- shower.stderr.on("data", function (d) {
- eout += d.toString()
- })
- shower.on("exit", function (code) {
- t.notOk(code, "git show HEAD exited without issue")
- t.notOk(err, "git show produced no error output")
-
- var lines = out.split("\n")
- t.notEqual(lines.indexOf("package.json"), -1, "package.json commited")
- t.notEqual(lines.indexOf("npm-shrinkwrap.json"), -1, "npm-shrinkwrap.json commited")
-
- t.end()
- })
+ t.end()
}
- })
- })
+ )
+ }
})
-test("cleanup", function(t) {
+test('cleanup', function (t) {
// windows fix for locked files
process.chdir(osenv.tmpdir())
@@ -232,18 +117,18 @@ test("cleanup", function(t) {
t.end()
})
-function setup() {
+function setup () {
rimraf.sync(pkg)
mkdirp.sync(pkg)
mkdirp.sync(cache)
var contents = {
- author: "Nathan Bowser && Faiq Raza",
- name: "version-with-shrinkwrap-test",
- version: "0.0.0",
- description: "Test for version with shrinkwrap update"
+ author: 'Nathan Bowser && Faiq Raza',
+ name: 'version-with-shrinkwrap-test',
+ version: '0.0.0',
+ description: 'Test for version with shrinkwrap update'
}
- fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify(contents), "utf8")
- fs.writeFileSync(path.resolve(pkg, "npm-shrinkwrap.json"), JSON.stringify(contents), "utf8")
+ fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify(contents), 'utf8')
+ fs.writeFileSync(path.resolve(pkg, 'npm-shrinkwrap.json'), JSON.stringify(contents), 'utf8')
process.chdir(pkg)
}